const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BOiKSJmR.js","assets/hooks.module-CueF8QR8.js","assets/index-H_NM4OoF.js"])))=>i.map(i=>d[i]);
var iF=t=>{throw TypeError(t)};var G7=(t,e,n)=>e.has(t)||iF("Cannot "+n);var Ae=(t,e,n)=>(G7(t,e,"read from private field"),n?n.call(t):e.get(t)),En=(t,e,n)=>e.has(t)?iF("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),zt=(t,e,n,r)=>(G7(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),lr=(t,e,n)=>(G7(t,e,"access private method"),n);var A_=(t,e,n,r)=>({set _(i){zt(t,e,i,n)},get _(){return Ae(t,e,r)}});function ppe(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>r[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"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Hr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function RD(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var zK={exports:{}},cS={},HK={exports:{}},tr={};/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var u6=Symbol.for("react.element"),mpe=Symbol.for("react.portal"),gpe=Symbol.for("react.fragment"),wpe=Symbol.for("react.strict_mode"),ype=Symbol.for("react.profiler"),vpe=Symbol.for("react.provider"),bpe=Symbol.for("react.context"),xpe=Symbol.for("react.forward_ref"),_pe=Symbol.for("react.suspense"),Ape=Symbol.for("react.memo"),Epe=Symbol.for("react.lazy"),sF=Symbol.iterator;function Cpe(t){return t===null||typeof t!="object"?null:(t=sF&&t[sF]||t["@@iterator"],typeof t=="function"?t:null)}var WK={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},VK=Object.assign,qK={};function ub(t,e,n){this.props=t,this.context=e,this.refs=qK,this.updater=n||WK}ub.prototype.isReactComponent={};ub.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};ub.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function GK(){}GK.prototype=ub.prototype;function ND(t,e,n){this.props=t,this.context=e,this.refs=qK,this.updater=n||WK}var PD=ND.prototype=new GK;PD.constructor=ND;VK(PD,ub.prototype);PD.isPureReactComponent=!0;var oF=Array.isArray,KK=Object.prototype.hasOwnProperty,OD={current:null},YK={key:!0,ref:!0,__self:!0,__source:!0};function QK(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)KK.call(e,r)&&!YK.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var c=Array(a),l=0;l<a;l++)c[l]=arguments[l+2];i.children=c}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:u6,type:t,key:s,ref:o,props:i,_owner:OD.current}}function Spe(t,e){return{$$typeof:u6,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function DD(t){return typeof t=="object"&&t!==null&&t.$$typeof===u6}function Tpe(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var aF=/\/+/g;function K7(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Tpe(""+t.key):e.toString(36)}function CA(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case u6:case mpe:o=!0}}if(o)return o=t,i=i(o),t=r===""?"."+K7(o,0):r,oF(i)?(n="",t!=null&&(n=t.replace(aF,"$&/")+"/"),CA(i,e,n,"",function(l){return l})):i!=null&&(DD(i)&&(i=Spe(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(aF,"$&/")+"/")+t)),e.push(i)),1;if(o=0,r=r===""?".":r+":",oF(t))for(var a=0;a<t.length;a++){s=t[a];var c=r+K7(s,a);o+=CA(s,e,n,c,i)}else if(c=Cpe(t),typeof c=="function")for(t=c.call(t),a=0;!(s=t.next()).done;)s=s.value,c=r+K7(s,a++),o+=CA(s,e,n,c,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function E_(t,e,n){if(t==null)return t;var r=[],i=0;return CA(t,r,"","",function(s){return e.call(n,s,i++)}),r}function Ipe(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Wo={current:null},SA={transition:null},kpe={ReactCurrentDispatcher:Wo,ReactCurrentBatchConfig:SA,ReactCurrentOwner:OD};function ZK(){throw Error("act(...) is not supported in production builds of React.")}tr.Children={map:E_,forEach:function(t,e,n){E_(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return E_(t,function(){e++}),e},toArray:function(t){return E_(t,function(e){return e})||[]},only:function(t){if(!DD(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};tr.Component=ub;tr.Fragment=gpe;tr.Profiler=ype;tr.PureComponent=ND;tr.StrictMode=wpe;tr.Suspense=_pe;tr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kpe;tr.act=ZK;tr.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=VK({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=OD.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(c in e)KK.call(e,c)&&!YK.hasOwnProperty(c)&&(r[c]=e[c]===void 0&&a!==void 0?a[c]:e[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){a=Array(c);for(var l=0;l<c;l++)a[l]=arguments[l+2];r.children=a}return{$$typeof:u6,type:t.type,key:i,ref:s,props:r,_owner:o}};tr.createContext=function(t){return t={$$typeof:bpe,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:vpe,_context:t},t.Consumer=t};tr.createElement=QK;tr.createFactory=function(t){var e=QK.bind(null,t);return e.type=t,e};tr.createRef=function(){return{current:null}};tr.forwardRef=function(t){return{$$typeof:xpe,render:t}};tr.isValidElement=DD;tr.lazy=function(t){return{$$typeof:Epe,_payload:{_status:-1,_result:t},_init:Ipe}};tr.memo=function(t,e){return{$$typeof:Ape,type:t,compare:e===void 0?null:e}};tr.startTransition=function(t){var e=SA.transition;SA.transition={};try{t()}finally{SA.transition=e}};tr.unstable_act=ZK;tr.useCallback=function(t,e){return Wo.current.useCallback(t,e)};tr.useContext=function(t){return Wo.current.useContext(t)};tr.useDebugValue=function(){};tr.useDeferredValue=function(t){return Wo.current.useDeferredValue(t)};tr.useEffect=function(t,e){return Wo.current.useEffect(t,e)};tr.useId=function(){return Wo.current.useId()};tr.useImperativeHandle=function(t,e,n){return Wo.current.useImperativeHandle(t,e,n)};tr.useInsertionEffect=function(t,e){return Wo.current.useInsertionEffect(t,e)};tr.useLayoutEffect=function(t,e){return Wo.current.useLayoutEffect(t,e)};tr.useMemo=function(t,e){return Wo.current.useMemo(t,e)};tr.useReducer=function(t,e,n){return Wo.current.useReducer(t,e,n)};tr.useRef=function(t){return Wo.current.useRef(t)};tr.useState=function(t){return Wo.current.useState(t)};tr.useSyncExternalStore=function(t,e,n){return Wo.current.useSyncExternalStore(t,e,n)};tr.useTransition=function(){return Wo.current.useTransition()};tr.version="18.3.1";HK.exports=tr;var ce=HK.exports;const Up=Qs(ce),Rpe=ppe({__proto__:null,default:Up},[ce]);/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Npe=ce,Ppe=Symbol.for("react.element"),Ope=Symbol.for("react.fragment"),Dpe=Object.prototype.hasOwnProperty,Mpe=Npe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Bpe={key:!0,ref:!0,__self:!0,__source:!0};function JK(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)Dpe.call(e,r)&&!Bpe.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:Ppe,type:t,key:s,ref:o,props:i,_owner:Mpe.current}}cS.Fragment=Ope;cS.jsx=JK;cS.jsxs=JK;zK.exports=cS;var m=zK.exports,CR={},XK={exports:{}},dc={},eY={exports:{}},tY={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(t){function e(M,W){var z=M.length;M.push(W);e:for(;0<z;){var P=z-1>>>1,Z=M[P];if(0<i(Z,W))M[P]=W,M[z]=Z,z=P;else break e}}function n(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var W=M[0],z=M.pop();if(z!==W){M[0]=z;e:for(var P=0,Z=M.length,he=Z>>>1;P<he;){var ve=2*(P+1)-1,j=M[ve],ge=ve+1,te=M[ge];if(0>i(j,z))ge<Z&&0>i(te,j)?(M[P]=te,M[ge]=z,P=ge):(M[P]=j,M[ve]=z,P=ve);else if(ge<Z&&0>i(te,z))M[P]=te,M[ge]=z,P=ge;else break e}}return W}function i(M,W){var z=M.sortIndex-W.sortIndex;return z!==0?z:M.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var c=[],l=[],u=1,d=null,h=3,g=!1,w=!1,v=!1,_=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(M){for(var W=n(l);W!==null;){if(W.callback===null)r(l);else if(W.startTime<=M)r(l),W.sortIndex=W.expirationTime,e(c,W);else break;W=n(l)}}function D(M){if(v=!1,k(M),!w)if(n(c)!==null)w=!0,I(O);else{var W=n(l);W!==null&&B(D,W.startTime-M)}}function O(M,W){w=!1,v&&(v=!1,T(A),A=-1),g=!0;var z=h;try{for(k(W),d=n(c);d!==null&&(!(d.expirationTime>W)||M&&!Y());){var P=d.callback;if(typeof P=="function"){d.callback=null,h=d.priorityLevel;var Z=P(d.expirationTime<=W);W=t.unstable_now(),typeof Z=="function"?d.callback=Z:d===n(c)&&r(c),k(W)}else r(c);d=n(c)}if(d!==null)var he=!0;else{var ve=n(l);ve!==null&&B(D,ve.startTime-W),he=!1}return he}finally{d=null,h=z,g=!1}}var $=!1,C=null,A=-1,H=5,V=-1;function Y(){return!(t.unstable_now()-V<H)}function ee(){if(C!==null){var M=t.unstable_now();V=M;var W=!0;try{W=C(!0,M)}finally{W?x():($=!1,C=null)}}else $=!1}var x;if(typeof b=="function")x=function(){b(ee)};else if(typeof MessageChannel<"u"){var E=new MessageChannel,y=E.port2;E.port1.onmessage=ee,x=function(){y.postMessage(null)}}else x=function(){_(ee,0)};function I(M){C=M,$||($=!0,x())}function B(M,W){A=_(function(){M(t.unstable_now())},W)}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(){w||g||(w=!0,I(O))},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"):H=0<M?Math.floor(1e3/M):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return n(c)},t.unstable_next=function(M){switch(h){case 1:case 2:case 3:var W=3;break;default:W=h}var z=h;h=W;try{return M()}finally{h=z}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(M,W){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var z=h;h=M;try{return W()}finally{h=z}},t.unstable_scheduleCallback=function(M,W,z){var P=t.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?P+z:P):z=P,M){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=z+Z,M={id:u++,callback:W,priorityLevel:M,startTime:z,expirationTime:Z,sortIndex:-1},z>P?(M.sortIndex=z,e(l,M),n(c)===null&&M===n(l)&&(v?(T(A),A=-1):v=!0,B(D,z-P))):(M.sortIndex=Z,e(c,M),w||g||(w=!0,I(O))),M},t.unstable_shouldYield=Y,t.unstable_wrapCallback=function(M){var W=h;return function(){var z=h;h=W;try{return M.apply(this,arguments)}finally{h=z}}}})(tY);eY.exports=tY;var $pe=eY.exports;/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var jpe=ce,nc=$pe;function tt(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);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 nY=new Set,q3={};function w1(t,e){tv(t,e),tv(t+"Capture",e)}function tv(t,e){for(q3[t]=e,t=0;t<e.length;t++)nY.add(e[t])}var ih=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),SR=Object.prototype.hasOwnProperty,Lpe=/^[: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]*$/,cF={},lF={};function Upe(t){return SR.call(lF,t)?!0:SR.call(cF,t)?!1:Lpe.test(t)?lF[t]=!0:(cF[t]=!0,!1)}function Fpe(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function zpe(t,e,n,r){if(e===null||typeof e>"u"||Fpe(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 Vo(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Ys={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Ys[t]=new Vo(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Ys[e]=new Vo(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Ys[t]=new Vo(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Ys[t]=new Vo(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){Ys[t]=new Vo(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Ys[t]=new Vo(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Ys[t]=new Vo(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Ys[t]=new Vo(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Ys[t]=new Vo(t,5,!1,t.toLowerCase(),null,!1,!1)});var MD=/[\-:]([a-z])/g;function BD(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(MD,BD);Ys[e]=new Vo(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(MD,BD);Ys[e]=new Vo(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(MD,BD);Ys[e]=new Vo(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Ys[t]=new Vo(t,1,!1,t.toLowerCase(),null,!1,!1)});Ys.xlinkHref=new Vo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Ys[t]=new Vo(t,1,!1,t.toLowerCase(),null,!0,!0)});function $D(t,e,n,r){var i=Ys.hasOwnProperty(e)?Ys[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(zpe(e,n,i,r)&&(n=null),r||i===null?Upe(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var Rh=jpe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,C_=Symbol.for("react.element"),Zw=Symbol.for("react.portal"),Jw=Symbol.for("react.fragment"),jD=Symbol.for("react.strict_mode"),TR=Symbol.for("react.profiler"),rY=Symbol.for("react.provider"),iY=Symbol.for("react.context"),LD=Symbol.for("react.forward_ref"),IR=Symbol.for("react.suspense"),kR=Symbol.for("react.suspense_list"),UD=Symbol.for("react.memo"),vp=Symbol.for("react.lazy"),sY=Symbol.for("react.offscreen"),uF=Symbol.iterator;function x2(t){return t===null||typeof t!="object"?null:(t=uF&&t[uF]||t["@@iterator"],typeof t=="function"?t:null)}var Ci=Object.assign,Y7;function Z2(t){if(Y7===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Y7=e&&e[1]||""}return`
`+Y7+t}var Q7=!1;function Z7(t,e){if(!t||Q7)return"";Q7=!0;var n=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(l){var r=l}Reflect.construct(t,[],e)}else{try{e.call()}catch(l){r=l}t.call(e.prototype)}else{try{throw Error()}catch(l){r=l}t()}}catch(l){if(l&&r&&typeof l.stack=="string"){for(var i=l.stack.split(`
`),s=r.stack.split(`
`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var c=`
`+i[o].replace(" at new "," at ");return t.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",t.displayName)),c}while(1<=o&&0<=a);break}}}finally{Q7=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Z2(t):""}function Hpe(t){switch(t.tag){case 5:return Z2(t.type);case 16:return Z2("Lazy");case 13:return Z2("Suspense");case 19:return Z2("SuspenseList");case 0:case 2:case 15:return t=Z7(t.type,!1),t;case 11:return t=Z7(t.type.render,!1),t;case 1:return t=Z7(t.type,!0),t;default:return""}}function RR(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 Jw:return"Fragment";case Zw:return"Portal";case TR:return"Profiler";case jD:return"StrictMode";case IR:return"Suspense";case kR:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case iY:return(t.displayName||"Context")+".Consumer";case rY:return(t._context.displayName||"Context")+".Provider";case LD:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case UD:return e=t.displayName||null,e!==null?e:RR(t.type)||"Memo";case vp:e=t._payload,t=t._init;try{return RR(t(e))}catch{}}return null}function Wpe(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return RR(e);case 8:return e===jD?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function h0(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function oY(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Vpe(t){var e=oY(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function S_(t){t._valueTracker||(t._valueTracker=Vpe(t))}function aY(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=oY(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function gE(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 NR(t,e){var n=e.checked;return Ci({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function dF(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=h0(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function cY(t,e){e=e.checked,e!=null&&$D(t,"checked",e,!1)}function PR(t,e){cY(t,e);var n=h0(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?OR(t,e.type,n):e.hasOwnProperty("defaultValue")&&OR(t,e.type,h0(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function fF(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function OR(t,e,n){(e!=="number"||gE(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var J2=Array.isArray;function yy(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+h0(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function DR(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(tt(91));return Ci({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function hF(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(tt(92));if(J2(n)){if(1<n.length)throw Error(tt(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:h0(n)}}function lY(t,e){var n=h0(e.value),r=h0(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function pF(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function uY(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 MR(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?uY(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var T_,dY=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(T_=T_||document.createElement("div"),T_.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=T_.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function G3(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var v3={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qpe=["Webkit","ms","Moz","O"];Object.keys(v3).forEach(function(t){qpe.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),v3[e]=v3[t]})});function fY(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||v3.hasOwnProperty(t)&&v3[t]?(""+e).trim():e+"px"}function hY(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=fY(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var Gpe=Ci({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 BR(t,e){if(e){if(Gpe[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(tt(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(tt(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(tt(61))}if(e.style!=null&&typeof e.style!="object")throw Error(tt(62))}}function $R(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}}var jR=null;function FD(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var LR=null,vy=null,by=null;function mF(t){if(t=h6(t)){if(typeof LR!="function")throw Error(tt(280));var e=t.stateNode;e&&(e=hS(e),LR(t.stateNode,t.type,e))}}function pY(t){vy?by?by.push(t):by=[t]:vy=t}function mY(){if(vy){var t=vy,e=by;if(by=vy=null,mF(t),e)for(t=0;t<e.length;t++)mF(e[t])}}function gY(t,e){return t(e)}function wY(){}var J7=!1;function yY(t,e,n){if(J7)return t(e,n);J7=!0;try{return gY(t,e,n)}finally{J7=!1,(vy!==null||by!==null)&&(wY(),mY())}}function K3(t,e){var n=t.stateNode;if(n===null)return null;var r=hS(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(tt(231,e,typeof n));return n}var UR=!1;if(ih)try{var _2={};Object.defineProperty(_2,"passive",{get:function(){UR=!0}}),window.addEventListener("test",_2,_2),window.removeEventListener("test",_2,_2)}catch{UR=!1}function Kpe(t,e,n,r,i,s,o,a,c){var l=Array.prototype.slice.call(arguments,3);try{e.apply(n,l)}catch(u){this.onError(u)}}var b3=!1,wE=null,yE=!1,FR=null,Ype={onError:function(t){b3=!0,wE=t}};function Qpe(t,e,n,r,i,s,o,a,c){b3=!1,wE=null,Kpe.apply(Ype,arguments)}function Zpe(t,e,n,r,i,s,o,a,c){if(Qpe.apply(this,arguments),b3){if(b3){var l=wE;b3=!1,wE=null}else throw Error(tt(198));yE||(yE=!0,FR=l)}}function y1(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function vY(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 gF(t){if(y1(t)!==t)throw Error(tt(188))}function Jpe(t){var e=t.alternate;if(!e){if(e=y1(t),e===null)throw Error(tt(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return gF(i),t;if(s===r)return gF(i),e;s=s.sibling}throw Error(tt(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(tt(189))}}if(n.alternate!==r)throw Error(tt(190))}if(n.tag!==3)throw Error(tt(188));return n.stateNode.current===n?t:e}function bY(t){return t=Jpe(t),t!==null?xY(t):null}function xY(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=xY(t);if(e!==null)return e;t=t.sibling}return null}var _Y=nc.unstable_scheduleCallback,wF=nc.unstable_cancelCallback,Xpe=nc.unstable_shouldYield,e0e=nc.unstable_requestPaint,Ki=nc.unstable_now,t0e=nc.unstable_getCurrentPriorityLevel,zD=nc.unstable_ImmediatePriority,AY=nc.unstable_UserBlockingPriority,vE=nc.unstable_NormalPriority,n0e=nc.unstable_LowPriority,EY=nc.unstable_IdlePriority,lS=null,sd=null;function r0e(t){if(sd&&typeof sd.onCommitFiberRoot=="function")try{sd.onCommitFiberRoot(lS,t,void 0,(t.current.flags&128)===128)}catch{}}var nu=Math.clz32?Math.clz32:o0e,i0e=Math.log,s0e=Math.LN2;function o0e(t){return t>>>=0,t===0?32:31-(i0e(t)/s0e|0)|0}var I_=64,k_=4194304;function X2(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function bE(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=X2(a):(s&=o,s!==0&&(r=X2(s)))}else o=n&~i,o!==0?r=X2(o):s!==0&&(r=X2(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-nu(e),i=1<<n,r|=t[n],e&=~i;return r}function a0e(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function c0e(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-nu(s),a=1<<o,c=i[o];c===-1?(!(a&n)||a&r)&&(i[o]=a0e(a,e)):c<=e&&(t.expiredLanes|=a),s&=~a}}function zR(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function CY(){var t=I_;return I_<<=1,!(I_&4194240)&&(I_=64),t}function X7(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function d6(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-nu(e),t[e]=n}function l0e(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-nu(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function HD(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-nu(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var Ur=0;function SY(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var TY,WD,IY,kY,RY,HR=!1,R_=[],Qp=null,Zp=null,Jp=null,Y3=new Map,Q3=new Map,Tp=[],u0e="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 yF(t,e){switch(t){case"focusin":case"focusout":Qp=null;break;case"dragenter":case"dragleave":Zp=null;break;case"mouseover":case"mouseout":Jp=null;break;case"pointerover":case"pointerout":Y3.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Q3.delete(e.pointerId)}}function A2(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=h6(e),e!==null&&WD(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function d0e(t,e,n,r,i){switch(e){case"focusin":return Qp=A2(Qp,t,e,n,r,i),!0;case"dragenter":return Zp=A2(Zp,t,e,n,r,i),!0;case"mouseover":return Jp=A2(Jp,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return Y3.set(s,A2(Y3.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Q3.set(s,A2(Q3.get(s)||null,t,e,n,r,i)),!0}return!1}function NY(t){var e=Fm(t.target);if(e!==null){var n=y1(e);if(n!==null){if(e=n.tag,e===13){if(e=vY(n),e!==null){t.blockedOn=e,RY(t.priority,function(){IY(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function TA(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=WR(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);jR=r,n.target.dispatchEvent(r),jR=null}else return e=h6(n),e!==null&&WD(e),t.blockedOn=n,!1;e.shift()}return!0}function vF(t,e,n){TA(t)&&n.delete(e)}function f0e(){HR=!1,Qp!==null&&TA(Qp)&&(Qp=null),Zp!==null&&TA(Zp)&&(Zp=null),Jp!==null&&TA(Jp)&&(Jp=null),Y3.forEach(vF),Q3.forEach(vF)}function E2(t,e){t.blockedOn===e&&(t.blockedOn=null,HR||(HR=!0,nc.unstable_scheduleCallback(nc.unstable_NormalPriority,f0e)))}function Z3(t){function e(i){return E2(i,t)}if(0<R_.length){E2(R_[0],t);for(var n=1;n<R_.length;n++){var r=R_[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Qp!==null&&E2(Qp,t),Zp!==null&&E2(Zp,t),Jp!==null&&E2(Jp,t),Y3.forEach(e),Q3.forEach(e),n=0;n<Tp.length;n++)r=Tp[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Tp.length&&(n=Tp[0],n.blockedOn===null);)NY(n),n.blockedOn===null&&Tp.shift()}var xy=Rh.ReactCurrentBatchConfig,xE=!0;function h0e(t,e,n,r){var i=Ur,s=xy.transition;xy.transition=null;try{Ur=1,VD(t,e,n,r)}finally{Ur=i,xy.transition=s}}function p0e(t,e,n,r){var i=Ur,s=xy.transition;xy.transition=null;try{Ur=4,VD(t,e,n,r)}finally{Ur=i,xy.transition=s}}function VD(t,e,n,r){if(xE){var i=WR(t,e,n,r);if(i===null)lI(t,e,r,_E,n),yF(t,r);else if(d0e(i,t,e,n,r))r.stopPropagation();else if(yF(t,r),e&4&&-1<u0e.indexOf(t)){for(;i!==null;){var s=h6(i);if(s!==null&&TY(s),s=WR(t,e,n,r),s===null&&lI(t,e,r,_E,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else lI(t,e,r,null,n)}}var _E=null;function WR(t,e,n,r){if(_E=null,t=FD(r),t=Fm(t),t!==null)if(e=y1(t),e===null)t=null;else if(n=e.tag,n===13){if(t=vY(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return _E=t,null}function PY(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(t0e()){case zD:return 1;case AY:return 4;case vE:case n0e:return 16;case EY:return 536870912;default:return 16}default:return 16}}var Fp=null,qD=null,IA=null;function OY(){if(IA)return IA;var t,e=qD,n=e.length,r,i="value"in Fp?Fp.value:Fp.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===i[s-r];r++);return IA=i.slice(t,1<r?1-r:void 0)}function kA(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 N_(){return!0}function bF(){return!1}function fc(t){function e(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?N_:bF,this.isPropagationStopped=bF,this}return Ci(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=N_)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=N_)},persist:function(){},isPersistent:N_}),e}var db={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},GD=fc(db),f6=Ci({},db,{view:0,detail:0}),m0e=fc(f6),eI,tI,C2,uS=Ci({},f6,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:KD,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!==C2&&(C2&&t.type==="mousemove"?(eI=t.screenX-C2.screenX,tI=t.screenY-C2.screenY):tI=eI=0,C2=t),eI)},movementY:function(t){return"movementY"in t?t.movementY:tI}}),xF=fc(uS),g0e=Ci({},uS,{dataTransfer:0}),w0e=fc(g0e),y0e=Ci({},f6,{relatedTarget:0}),nI=fc(y0e),v0e=Ci({},db,{animationName:0,elapsedTime:0,pseudoElement:0}),b0e=fc(v0e),x0e=Ci({},db,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),_0e=fc(x0e),A0e=Ci({},db,{data:0}),_F=fc(A0e),E0e={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},C0e={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"},S0e={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function T0e(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=S0e[t])?!!e[t]:!1}function KD(){return T0e}var I0e=Ci({},f6,{key:function(t){if(t.key){var e=E0e[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=kA(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?C0e[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:KD,charCode:function(t){return t.type==="keypress"?kA(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?kA(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),k0e=fc(I0e),R0e=Ci({},uS,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),AF=fc(R0e),N0e=Ci({},f6,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:KD}),P0e=fc(N0e),O0e=Ci({},db,{propertyName:0,elapsedTime:0,pseudoElement:0}),D0e=fc(O0e),M0e=Ci({},uS,{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}),B0e=fc(M0e),$0e=[9,13,27,32],YD=ih&&"CompositionEvent"in window,x3=null;ih&&"documentMode"in document&&(x3=document.documentMode);var j0e=ih&&"TextEvent"in window&&!x3,DY=ih&&(!YD||x3&&8<x3&&11>=x3),EF=" ",CF=!1;function MY(t,e){switch(t){case"keyup":return $0e.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function BY(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xw=!1;function L0e(t,e){switch(t){case"compositionend":return BY(e);case"keypress":return e.which!==32?null:(CF=!0,EF);case"textInput":return t=e.data,t===EF&&CF?null:t;default:return null}}function U0e(t,e){if(Xw)return t==="compositionend"||!YD&&MY(t,e)?(t=OY(),IA=qD=Fp=null,Xw=!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 DY&&e.locale!=="ko"?null:e.data;default:return null}}var F0e={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 SF(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!F0e[t.type]:e==="textarea"}function $Y(t,e,n,r){pY(r),e=AE(e,"onChange"),0<e.length&&(n=new GD("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var _3=null,J3=null;function z0e(t){KY(t,0)}function dS(t){var e=ny(t);if(aY(e))return t}function H0e(t,e){if(t==="change")return e}var jY=!1;if(ih){var rI;if(ih){var iI="oninput"in document;if(!iI){var TF=document.createElement("div");TF.setAttribute("oninput","return;"),iI=typeof TF.oninput=="function"}rI=iI}else rI=!1;jY=rI&&(!document.documentMode||9<document.documentMode)}function IF(){_3&&(_3.detachEvent("onpropertychange",LY),J3=_3=null)}function LY(t){if(t.propertyName==="value"&&dS(J3)){var e=[];$Y(e,J3,t,FD(t)),yY(z0e,e)}}function W0e(t,e,n){t==="focusin"?(IF(),_3=e,J3=n,_3.attachEvent("onpropertychange",LY)):t==="focusout"&&IF()}function V0e(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return dS(J3)}function q0e(t,e){if(t==="click")return dS(e)}function G0e(t,e){if(t==="input"||t==="change")return dS(e)}function K0e(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var au=typeof Object.is=="function"?Object.is:K0e;function X3(t,e){if(au(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!SR.call(e,i)||!au(t[i],e[i]))return!1}return!0}function kF(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function RF(t,e){var n=kF(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=kF(n)}}function UY(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?UY(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function FY(){for(var t=window,e=gE();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=gE(t.document)}return e}function QD(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")}function Y0e(t){var e=FY(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&UY(n.ownerDocument.documentElement,n)){if(r!==null&&QD(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=RF(n,s);var o=RF(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var Q0e=ih&&"documentMode"in document&&11>=document.documentMode,ey=null,VR=null,A3=null,qR=!1;function NF(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qR||ey==null||ey!==gE(r)||(r=ey,"selectionStart"in r&&QD(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),A3&&X3(A3,r)||(A3=r,r=AE(VR,"onSelect"),0<r.length&&(e=new GD("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=ey)))}function P_(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var ty={animationend:P_("Animation","AnimationEnd"),animationiteration:P_("Animation","AnimationIteration"),animationstart:P_("Animation","AnimationStart"),transitionend:P_("Transition","TransitionEnd")},sI={},zY={};ih&&(zY=document.createElement("div").style,"AnimationEvent"in window||(delete ty.animationend.animation,delete ty.animationiteration.animation,delete ty.animationstart.animation),"TransitionEvent"in window||delete ty.transitionend.transition);function fS(t){if(sI[t])return sI[t];if(!ty[t])return t;var e=ty[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in zY)return sI[t]=e[n];return t}var HY=fS("animationend"),WY=fS("animationiteration"),VY=fS("animationstart"),qY=fS("transitionend"),GY=new Map,PF="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function M0(t,e){GY.set(t,e),w1(e,[t])}for(var oI=0;oI<PF.length;oI++){var aI=PF[oI],Z0e=aI.toLowerCase(),J0e=aI[0].toUpperCase()+aI.slice(1);M0(Z0e,"on"+J0e)}M0(HY,"onAnimationEnd");M0(WY,"onAnimationIteration");M0(VY,"onAnimationStart");M0("dblclick","onDoubleClick");M0("focusin","onFocus");M0("focusout","onBlur");M0(qY,"onTransitionEnd");tv("onMouseEnter",["mouseout","mouseover"]);tv("onMouseLeave",["mouseout","mouseover"]);tv("onPointerEnter",["pointerout","pointerover"]);tv("onPointerLeave",["pointerout","pointerover"]);w1("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));w1("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));w1("onBeforeInput",["compositionend","keypress","textInput","paste"]);w1("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));w1("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));w1("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var e3="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),X0e=new Set("cancel close invalid load scroll toggle".split(" ").concat(e3));function OF(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,Zpe(r,e,void 0,t),t.currentTarget=null}function KY(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],c=a.instance,l=a.currentTarget;if(a=a.listener,c!==s&&i.isPropagationStopped())break e;OF(i,a,l),s=c}else for(o=0;o<r.length;o++){if(a=r[o],c=a.instance,l=a.currentTarget,a=a.listener,c!==s&&i.isPropagationStopped())break e;OF(i,a,l),s=c}}}if(yE)throw t=FR,yE=!1,FR=null,t}function oi(t,e){var n=e[ZR];n===void 0&&(n=e[ZR]=new Set);var r=t+"__bubble";n.has(r)||(YY(e,t,2,!1),n.add(r))}function cI(t,e,n){var r=0;e&&(r|=4),YY(n,t,r,e)}var O_="_reactListening"+Math.random().toString(36).slice(2);function e5(t){if(!t[O_]){t[O_]=!0,nY.forEach(function(n){n!=="selectionchange"&&(X0e.has(n)||cI(n,!1,t),cI(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[O_]||(e[O_]=!0,cI("selectionchange",!1,e))}}function YY(t,e,n,r){switch(PY(e)){case 1:var i=h0e;break;case 4:i=p0e;break;default:i=VD}n=i.bind(null,e,n,t),i=void 0,!UR||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function lI(t,e,n,r,i){var s=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;a!==null;){if(o=Fm(a),o===null)return;if(c=o.tag,c===5||c===6){r=s=o;continue e}a=a.parentNode}}r=r.return}yY(function(){var l=s,u=FD(n),d=[];e:{var h=GY.get(t);if(h!==void 0){var g=GD,w=t;switch(t){case"keypress":if(kA(n)===0)break e;case"keydown":case"keyup":g=k0e;break;case"focusin":w="focus",g=nI;break;case"focusout":w="blur",g=nI;break;case"beforeblur":case"afterblur":g=nI;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=xF;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=w0e;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=P0e;break;case HY:case WY:case VY:g=b0e;break;case qY:g=D0e;break;case"scroll":g=m0e;break;case"wheel":g=B0e;break;case"copy":case"cut":case"paste":g=_0e;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=AF}var v=(e&4)!==0,_=!v&&t==="scroll",T=v?h!==null?h+"Capture":null:h;v=[];for(var b=l,k;b!==null;){k=b;var D=k.stateNode;if(k.tag===5&&D!==null&&(k=D,T!==null&&(D=K3(b,T),D!=null&&v.push(t5(b,D,k)))),_)break;b=b.return}0<v.length&&(h=new g(h,w,null,n,u),d.push({event:h,listeners:v}))}}if(!(e&7)){e:{if(h=t==="mouseover"||t==="pointerover",g=t==="mouseout"||t==="pointerout",h&&n!==jR&&(w=n.relatedTarget||n.fromElement)&&(Fm(w)||w[sh]))break e;if((g||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,g?(w=n.relatedTarget||n.toElement,g=l,w=w?Fm(w):null,w!==null&&(_=y1(w),w!==_||w.tag!==5&&w.tag!==6)&&(w=null)):(g=null,w=l),g!==w)){if(v=xF,D="onMouseLeave",T="onMouseEnter",b="mouse",(t==="pointerout"||t==="pointerover")&&(v=AF,D="onPointerLeave",T="onPointerEnter",b="pointer"),_=g==null?h:ny(g),k=w==null?h:ny(w),h=new v(D,b+"leave",g,n,u),h.target=_,h.relatedTarget=k,D=null,Fm(u)===l&&(v=new v(T,b+"enter",w,n,u),v.target=k,v.relatedTarget=_,D=v),_=D,g&&w)t:{for(v=g,T=w,b=0,k=v;k;k=xw(k))b++;for(k=0,D=T;D;D=xw(D))k++;for(;0<b-k;)v=xw(v),b--;for(;0<k-b;)T=xw(T),k--;for(;b--;){if(v===T||T!==null&&v===T.alternate)break t;v=xw(v),T=xw(T)}v=null}else v=null;g!==null&&DF(d,h,g,v,!1),w!==null&&_!==null&&DF(d,_,w,v,!0)}}e:{if(h=l?ny(l):window,g=h.nodeName&&h.nodeName.toLowerCase(),g==="select"||g==="input"&&h.type==="file")var O=H0e;else if(SF(h))if(jY)O=G0e;else{O=V0e;var $=W0e}else(g=h.nodeName)&&g.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(O=q0e);if(O&&(O=O(t,l))){$Y(d,O,n,u);break e}$&&$(t,h,l),t==="focusout"&&($=h._wrapperState)&&$.controlled&&h.type==="number"&&OR(h,"number",h.value)}switch($=l?ny(l):window,t){case"focusin":(SF($)||$.contentEditable==="true")&&(ey=$,VR=l,A3=null);break;case"focusout":A3=VR=ey=null;break;case"mousedown":qR=!0;break;case"contextmenu":case"mouseup":case"dragend":qR=!1,NF(d,n,u);break;case"selectionchange":if(Q0e)break;case"keydown":case"keyup":NF(d,n,u)}var C;if(YD)e:{switch(t){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Xw?MY(t,n)&&(A="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(DY&&n.locale!=="ko"&&(Xw||A!=="onCompositionStart"?A==="onCompositionEnd"&&Xw&&(C=OY()):(Fp=u,qD="value"in Fp?Fp.value:Fp.textContent,Xw=!0)),$=AE(l,A),0<$.length&&(A=new _F(A,t,null,n,u),d.push({event:A,listeners:$}),C?A.data=C:(C=BY(n),C!==null&&(A.data=C)))),(C=j0e?L0e(t,n):U0e(t,n))&&(l=AE(l,"onBeforeInput"),0<l.length&&(u=new _F("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:l}),u.data=C))}KY(d,e)})}function t5(t,e,n){return{instance:t,listener:e,currentTarget:n}}function AE(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=K3(t,n),s!=null&&r.unshift(t5(t,s,i)),s=K3(t,e),s!=null&&r.push(t5(t,s,i))),t=t.return}return r}function xw(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function DF(t,e,n,r,i){for(var s=e._reactName,o=[];n!==null&&n!==r;){var a=n,c=a.alternate,l=a.stateNode;if(c!==null&&c===r)break;a.tag===5&&l!==null&&(a=l,i?(c=K3(n,s),c!=null&&o.unshift(t5(n,c,a))):i||(c=K3(n,s),c!=null&&o.push(t5(n,c,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var eme=/\r\n?/g,tme=/\u0000|\uFFFD/g;function MF(t){return(typeof t=="string"?t:""+t).replace(eme,`
`).replace(tme,"")}function D_(t,e,n){if(e=MF(e),MF(t)!==e&&n)throw Error(tt(425))}function EE(){}var GR=null,KR=null;function YR(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var QR=typeof setTimeout=="function"?setTimeout:void 0,nme=typeof clearTimeout=="function"?clearTimeout:void 0,BF=typeof Promise=="function"?Promise:void 0,rme=typeof queueMicrotask=="function"?queueMicrotask:typeof BF<"u"?function(t){return BF.resolve(null).then(t).catch(ime)}:QR;function ime(t){setTimeout(function(){throw t})}function uI(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),Z3(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Z3(e)}function Xp(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function $F(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var fb=Math.random().toString(36).slice(2),Xu="__reactFiber$"+fb,n5="__reactProps$"+fb,sh="__reactContainer$"+fb,ZR="__reactEvents$"+fb,sme="__reactListeners$"+fb,ome="__reactHandles$"+fb;function Fm(t){var e=t[Xu];if(e)return e;for(var n=t.parentNode;n;){if(e=n[sh]||n[Xu]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=$F(t);t!==null;){if(n=t[Xu])return n;t=$F(t)}return e}t=n,n=t.parentNode}return null}function h6(t){return t=t[Xu]||t[sh],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function ny(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(tt(33))}function hS(t){return t[n5]||null}var JR=[],ry=-1;function B0(t){return{current:t}}function ci(t){0>ry||(t.current=JR[ry],JR[ry]=null,ry--)}function ii(t,e){ry++,JR[ry]=t.current,t.current=e}var p0={},go=B0(p0),Aa=B0(!1),Ig=p0;function nv(t,e){var n=t.type.contextTypes;if(!n)return p0;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Ea(t){return t=t.childContextTypes,t!=null}function CE(){ci(Aa),ci(go)}function jF(t,e,n){if(go.current!==p0)throw Error(tt(168));ii(go,e),ii(Aa,n)}function QY(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(tt(108,Wpe(t)||"Unknown",i));return Ci({},n,r)}function SE(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||p0,Ig=go.current,ii(go,t),ii(Aa,Aa.current),!0}function LF(t,e,n){var r=t.stateNode;if(!r)throw Error(tt(169));n?(t=QY(t,e,Ig),r.__reactInternalMemoizedMergedChildContext=t,ci(Aa),ci(go),ii(go,t)):ci(Aa),ii(Aa,n)}var Mf=null,pS=!1,dI=!1;function ZY(t){Mf===null?Mf=[t]:Mf.push(t)}function ame(t){pS=!0,ZY(t)}function $0(){if(!dI&&Mf!==null){dI=!0;var t=0,e=Ur;try{var n=Mf;for(Ur=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Mf=null,pS=!1}catch(i){throw Mf!==null&&(Mf=Mf.slice(t+1)),_Y(zD,$0),i}finally{Ur=e,dI=!1}}return null}var iy=[],sy=0,TE=null,IE=0,sl=[],ol=0,kg=null,Wf=1,Vf="";function Pm(t,e){iy[sy++]=IE,iy[sy++]=TE,TE=t,IE=e}function JY(t,e,n){sl[ol++]=Wf,sl[ol++]=Vf,sl[ol++]=kg,kg=t;var r=Wf;t=Vf;var i=32-nu(r)-1;r&=~(1<<i),n+=1;var s=32-nu(e)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Wf=1<<32-nu(e)+i|n<<i|r,Vf=s+t}else Wf=1<<s|n<<i|r,Vf=t}function ZD(t){t.return!==null&&(Pm(t,1),JY(t,1,0))}function JD(t){for(;t===TE;)TE=iy[--sy],iy[sy]=null,IE=iy[--sy],iy[sy]=null;for(;t===kg;)kg=sl[--ol],sl[ol]=null,Vf=sl[--ol],sl[ol]=null,Wf=sl[--ol],sl[ol]=null}var Ja=null,Ya=null,gi=!1,Ql=null;function XY(t,e){var n=ll(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function UF(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Ja=t,Ya=Xp(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Ja=t,Ya=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=kg!==null?{id:Wf,overflow:Vf}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=ll(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Ja=t,Ya=null,!0):!1;default:return!1}}function XR(t){return(t.mode&1)!==0&&(t.flags&128)===0}function eN(t){if(gi){var e=Ya;if(e){var n=e;if(!UF(t,e)){if(XR(t))throw Error(tt(418));e=Xp(n.nextSibling);var r=Ja;e&&UF(t,e)?XY(r,n):(t.flags=t.flags&-4097|2,gi=!1,Ja=t)}}else{if(XR(t))throw Error(tt(418));t.flags=t.flags&-4097|2,gi=!1,Ja=t}}}function FF(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Ja=t}function M_(t){if(t!==Ja)return!1;if(!gi)return FF(t),gi=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!YR(t.type,t.memoizedProps)),e&&(e=Ya)){if(XR(t))throw eQ(),Error(tt(418));for(;e;)XY(t,e),e=Xp(e.nextSibling)}if(FF(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(tt(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){Ya=Xp(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}Ya=null}}else Ya=Ja?Xp(t.stateNode.nextSibling):null;return!0}function eQ(){for(var t=Ya;t;)t=Xp(t.nextSibling)}function rv(){Ya=Ja=null,gi=!1}function XD(t){Ql===null?Ql=[t]:Ql.push(t)}var cme=Rh.ReactCurrentBatchConfig;function S2(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(tt(309));var r=n.stateNode}if(!r)throw Error(tt(147,t));var i=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(tt(284));if(!n._owner)throw Error(tt(290,t))}return t}function B_(t,e){throw t=Object.prototype.toString.call(e),Error(tt(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function zF(t){var e=t._init;return e(t._payload)}function tQ(t){function e(T,b){if(t){var k=T.deletions;k===null?(T.deletions=[b],T.flags|=16):k.push(b)}}function n(T,b){if(!t)return null;for(;b!==null;)e(T,b),b=b.sibling;return null}function r(T,b){for(T=new Map;b!==null;)b.key!==null?T.set(b.key,b):T.set(b.index,b),b=b.sibling;return T}function i(T,b){return T=r0(T,b),T.index=0,T.sibling=null,T}function s(T,b,k){return T.index=k,t?(k=T.alternate,k!==null?(k=k.index,k<b?(T.flags|=2,b):k):(T.flags|=2,b)):(T.flags|=1048576,b)}function o(T){return t&&T.alternate===null&&(T.flags|=2),T}function a(T,b,k,D){return b===null||b.tag!==6?(b=yI(k,T.mode,D),b.return=T,b):(b=i(b,k),b.return=T,b)}function c(T,b,k,D){var O=k.type;return O===Jw?u(T,b,k.props.children,D,k.key):b!==null&&(b.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===vp&&zF(O)===b.type)?(D=i(b,k.props),D.ref=S2(T,b,k),D.return=T,D):(D=BA(k.type,k.key,k.props,null,T.mode,D),D.ref=S2(T,b,k),D.return=T,D)}function l(T,b,k,D){return b===null||b.tag!==4||b.stateNode.containerInfo!==k.containerInfo||b.stateNode.implementation!==k.implementation?(b=vI(k,T.mode,D),b.return=T,b):(b=i(b,k.children||[]),b.return=T,b)}function u(T,b,k,D,O){return b===null||b.tag!==7?(b=hg(k,T.mode,D,O),b.return=T,b):(b=i(b,k),b.return=T,b)}function d(T,b,k){if(typeof b=="string"&&b!==""||typeof b=="number")return b=yI(""+b,T.mode,k),b.return=T,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case C_:return k=BA(b.type,b.key,b.props,null,T.mode,k),k.ref=S2(T,null,b),k.return=T,k;case Zw:return b=vI(b,T.mode,k),b.return=T,b;case vp:var D=b._init;return d(T,D(b._payload),k)}if(J2(b)||x2(b))return b=hg(b,T.mode,k,null),b.return=T,b;B_(T,b)}return null}function h(T,b,k,D){var O=b!==null?b.key:null;if(typeof k=="string"&&k!==""||typeof k=="number")return O!==null?null:a(T,b,""+k,D);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case C_:return k.key===O?c(T,b,k,D):null;case Zw:return k.key===O?l(T,b,k,D):null;case vp:return O=k._init,h(T,b,O(k._payload),D)}if(J2(k)||x2(k))return O!==null?null:u(T,b,k,D,null);B_(T,k)}return null}function g(T,b,k,D,O){if(typeof D=="string"&&D!==""||typeof D=="number")return T=T.get(k)||null,a(b,T,""+D,O);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case C_:return T=T.get(D.key===null?k:D.key)||null,c(b,T,D,O);case Zw:return T=T.get(D.key===null?k:D.key)||null,l(b,T,D,O);case vp:var $=D._init;return g(T,b,k,$(D._payload),O)}if(J2(D)||x2(D))return T=T.get(k)||null,u(b,T,D,O,null);B_(b,D)}return null}function w(T,b,k,D){for(var O=null,$=null,C=b,A=b=0,H=null;C!==null&&A<k.length;A++){C.index>A?(H=C,C=null):H=C.sibling;var V=h(T,C,k[A],D);if(V===null){C===null&&(C=H);break}t&&C&&V.alternate===null&&e(T,C),b=s(V,b,A),$===null?O=V:$.sibling=V,$=V,C=H}if(A===k.length)return n(T,C),gi&&Pm(T,A),O;if(C===null){for(;A<k.length;A++)C=d(T,k[A],D),C!==null&&(b=s(C,b,A),$===null?O=C:$.sibling=C,$=C);return gi&&Pm(T,A),O}for(C=r(T,C);A<k.length;A++)H=g(C,T,A,k[A],D),H!==null&&(t&&H.alternate!==null&&C.delete(H.key===null?A:H.key),b=s(H,b,A),$===null?O=H:$.sibling=H,$=H);return t&&C.forEach(function(Y){return e(T,Y)}),gi&&Pm(T,A),O}function v(T,b,k,D){var O=x2(k);if(typeof O!="function")throw Error(tt(150));if(k=O.call(k),k==null)throw Error(tt(151));for(var $=O=null,C=b,A=b=0,H=null,V=k.next();C!==null&&!V.done;A++,V=k.next()){C.index>A?(H=C,C=null):H=C.sibling;var Y=h(T,C,V.value,D);if(Y===null){C===null&&(C=H);break}t&&C&&Y.alternate===null&&e(T,C),b=s(Y,b,A),$===null?O=Y:$.sibling=Y,$=Y,C=H}if(V.done)return n(T,C),gi&&Pm(T,A),O;if(C===null){for(;!V.done;A++,V=k.next())V=d(T,V.value,D),V!==null&&(b=s(V,b,A),$===null?O=V:$.sibling=V,$=V);return gi&&Pm(T,A),O}for(C=r(T,C);!V.done;A++,V=k.next())V=g(C,T,A,V.value,D),V!==null&&(t&&V.alternate!==null&&C.delete(V.key===null?A:V.key),b=s(V,b,A),$===null?O=V:$.sibling=V,$=V);return t&&C.forEach(function(ee){return e(T,ee)}),gi&&Pm(T,A),O}function _(T,b,k,D){if(typeof k=="object"&&k!==null&&k.type===Jw&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case C_:e:{for(var O=k.key,$=b;$!==null;){if($.key===O){if(O=k.type,O===Jw){if($.tag===7){n(T,$.sibling),b=i($,k.props.children),b.return=T,T=b;break e}}else if($.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===vp&&zF(O)===$.type){n(T,$.sibling),b=i($,k.props),b.ref=S2(T,$,k),b.return=T,T=b;break e}n(T,$);break}else e(T,$);$=$.sibling}k.type===Jw?(b=hg(k.props.children,T.mode,D,k.key),b.return=T,T=b):(D=BA(k.type,k.key,k.props,null,T.mode,D),D.ref=S2(T,b,k),D.return=T,T=D)}return o(T);case Zw:e:{for($=k.key;b!==null;){if(b.key===$)if(b.tag===4&&b.stateNode.containerInfo===k.containerInfo&&b.stateNode.implementation===k.implementation){n(T,b.sibling),b=i(b,k.children||[]),b.return=T,T=b;break e}else{n(T,b);break}else e(T,b);b=b.sibling}b=vI(k,T.mode,D),b.return=T,T=b}return o(T);case vp:return $=k._init,_(T,b,$(k._payload),D)}if(J2(k))return w(T,b,k,D);if(x2(k))return v(T,b,k,D);B_(T,k)}return typeof k=="string"&&k!==""||typeof k=="number"?(k=""+k,b!==null&&b.tag===6?(n(T,b.sibling),b=i(b,k),b.return=T,T=b):(n(T,b),b=yI(k,T.mode,D),b.return=T,T=b),o(T)):n(T,b)}return _}var iv=tQ(!0),nQ=tQ(!1),kE=B0(null),RE=null,oy=null,eM=null;function tM(){eM=oy=RE=null}function nM(t){var e=kE.current;ci(kE),t._currentValue=e}function tN(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function _y(t,e){RE=t,eM=oy=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(ya=!0),t.firstContext=null)}function fl(t){var e=t._currentValue;if(eM!==t)if(t={context:t,memoizedValue:e,next:null},oy===null){if(RE===null)throw Error(tt(308));oy=t,RE.dependencies={lanes:0,firstContext:t}}else oy=oy.next=t;return e}var zm=null;function rM(t){zm===null?zm=[t]:zm.push(t)}function rQ(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,rM(e)):(n.next=i.next,i.next=n),e.interleaved=n,oh(t,r)}function oh(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var bp=!1;function iM(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function iQ(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 Qf(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function e0(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,yr&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,oh(t,n)}return i=r.interleaved,i===null?(e.next=e,rM(r)):(e.next=i.next,i.next=e),r.interleaved=e,oh(t,n)}function RA(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,HD(t,n)}}function HF(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function NE(t,e,n,r){var i=t.updateQueue;bp=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var c=a,l=c.next;c.next=null,o===null?s=l:o.next=l,o=c;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=l:a.next=l,u.lastBaseUpdate=c))}if(s!==null){var d=i.baseState;o=0,u=l=c=null,a=s;do{var h=a.lane,g=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=t,v=a;switch(h=e,g=n,v.tag){case 1:if(w=v.payload,typeof w=="function"){d=w.call(g,d,h);break e}d=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=v.payload,h=typeof w=="function"?w.call(g,d,h):w,h==null)break e;d=Ci({},d,h);break e;case 2:bp=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else g={eventTime:g,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(l=u=g,c=d):u=u.next=g,o|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);Ng|=o,t.lanes=o,t.memoizedState=d}}function WF(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(tt(191,i));i.call(r)}}}var p6={},od=B0(p6),r5=B0(p6),i5=B0(p6);function Hm(t){if(t===p6)throw Error(tt(174));return t}function sM(t,e){switch(ii(i5,e),ii(r5,t),ii(od,p6),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:MR(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=MR(e,t)}ci(od),ii(od,e)}function sv(){ci(od),ci(r5),ci(i5)}function sQ(t){Hm(i5.current);var e=Hm(od.current),n=MR(e,t.type);e!==n&&(ii(r5,t),ii(od,n))}function oM(t){r5.current===t&&(ci(od),ci(r5))}var Ai=B0(0);function PE(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)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 fI=[];function aM(){for(var t=0;t<fI.length;t++)fI[t]._workInProgressVersionPrimary=null;fI.length=0}var NA=Rh.ReactCurrentDispatcher,hI=Rh.ReactCurrentBatchConfig,Rg=0,Ei=null,ds=null,ks=null,OE=!1,E3=!1,s5=0,lme=0;function no(){throw Error(tt(321))}function cM(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!au(t[n],e[n]))return!1;return!0}function lM(t,e,n,r,i,s){if(Rg=s,Ei=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,NA.current=t===null||t.memoizedState===null?hme:pme,t=n(r,i),E3){s=0;do{if(E3=!1,s5=0,25<=s)throw Error(tt(301));s+=1,ks=ds=null,e.updateQueue=null,NA.current=mme,t=n(r,i)}while(E3)}if(NA.current=DE,e=ds!==null&&ds.next!==null,Rg=0,ks=ds=Ei=null,OE=!1,e)throw Error(tt(300));return t}function uM(){var t=s5!==0;return s5=0,t}function Lu(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ks===null?Ei.memoizedState=ks=t:ks=ks.next=t,ks}function hl(){if(ds===null){var t=Ei.alternate;t=t!==null?t.memoizedState:null}else t=ds.next;var e=ks===null?Ei.memoizedState:ks.next;if(e!==null)ks=e,ds=t;else{if(t===null)throw Error(tt(310));ds=t,t={memoizedState:ds.memoizedState,baseState:ds.baseState,baseQueue:ds.baseQueue,queue:ds.queue,next:null},ks===null?Ei.memoizedState=ks=t:ks=ks.next=t}return ks}function o5(t,e){return typeof e=="function"?e(t):e}function pI(t){var e=hl(),n=e.queue;if(n===null)throw Error(tt(311));n.lastRenderedReducer=t;var r=ds,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,c=null,l=s;do{var u=l.lane;if((Rg&u)===u)c!==null&&(c=c.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),r=l.hasEagerState?l.eagerState:t(r,l.action);else{var d={lane:u,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};c===null?(a=c=d,o=r):c=c.next=d,Ei.lanes|=u,Ng|=u}l=l.next}while(l!==null&&l!==s);c===null?o=r:c.next=a,au(r,e.memoizedState)||(ya=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=c,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,Ei.lanes|=s,Ng|=s,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function mI(t){var e=hl(),n=e.queue;if(n===null)throw Error(tt(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);au(s,e.memoizedState)||(ya=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function oQ(){}function aQ(t,e){var n=Ei,r=hl(),i=e(),s=!au(r.memoizedState,i);if(s&&(r.memoizedState=i,ya=!0),r=r.queue,dM(uQ.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||ks!==null&&ks.memoizedState.tag&1){if(n.flags|=2048,a5(9,lQ.bind(null,n,r,i,e),void 0,null),Ds===null)throw Error(tt(349));Rg&30||cQ(n,e,i)}return i}function cQ(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Ei.updateQueue,e===null?(e={lastEffect:null,stores:null},Ei.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function lQ(t,e,n,r){e.value=n,e.getSnapshot=r,dQ(e)&&fQ(t)}function uQ(t,e,n){return n(function(){dQ(e)&&fQ(t)})}function dQ(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!au(t,n)}catch{return!0}}function fQ(t){var e=oh(t,1);e!==null&&ru(e,t,1,-1)}function VF(t){var e=Lu();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o5,lastRenderedState:t},e.queue=t,t=t.dispatch=fme.bind(null,Ei,t),[e.memoizedState,t]}function a5(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=Ei.updateQueue,e===null?(e={lastEffect:null,stores:null},Ei.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function hQ(){return hl().memoizedState}function PA(t,e,n,r){var i=Lu();Ei.flags|=t,i.memoizedState=a5(1|e,n,void 0,r===void 0?null:r)}function mS(t,e,n,r){var i=hl();r=r===void 0?null:r;var s=void 0;if(ds!==null){var o=ds.memoizedState;if(s=o.destroy,r!==null&&cM(r,o.deps)){i.memoizedState=a5(e,n,s,r);return}}Ei.flags|=t,i.memoizedState=a5(1|e,n,s,r)}function qF(t,e){return PA(8390656,8,t,e)}function dM(t,e){return mS(2048,8,t,e)}function pQ(t,e){return mS(4,2,t,e)}function mQ(t,e){return mS(4,4,t,e)}function gQ(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 wQ(t,e,n){return n=n!=null?n.concat([t]):null,mS(4,4,gQ.bind(null,e,t),n)}function fM(){}function yQ(t,e){var n=hl();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&cM(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function vQ(t,e){var n=hl();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&cM(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function bQ(t,e,n){return Rg&21?(au(n,e)||(n=CY(),Ei.lanes|=n,Ng|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,ya=!0),t.memoizedState=n)}function ume(t,e){var n=Ur;Ur=n!==0&&4>n?n:4,t(!0);var r=hI.transition;hI.transition={};try{t(!1),e()}finally{Ur=n,hI.transition=r}}function xQ(){return hl().memoizedState}function dme(t,e,n){var r=n0(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},_Q(t))AQ(e,n);else if(n=rQ(t,e,n,r),n!==null){var i=Po();ru(n,t,r,i),EQ(n,e,r)}}function fme(t,e,n){var r=n0(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(_Q(t))AQ(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,au(a,o)){var c=e.interleaved;c===null?(i.next=i,rM(e)):(i.next=c.next,c.next=i),e.interleaved=i;return}}catch{}finally{}n=rQ(t,e,i,r),n!==null&&(i=Po(),ru(n,t,r,i),EQ(n,e,r))}}function _Q(t){var e=t.alternate;return t===Ei||e!==null&&e===Ei}function AQ(t,e){E3=OE=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function EQ(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,HD(t,n)}}var DE={readContext:fl,useCallback:no,useContext:no,useEffect:no,useImperativeHandle:no,useInsertionEffect:no,useLayoutEffect:no,useMemo:no,useReducer:no,useRef:no,useState:no,useDebugValue:no,useDeferredValue:no,useTransition:no,useMutableSource:no,useSyncExternalStore:no,useId:no,unstable_isNewReconciler:!1},hme={readContext:fl,useCallback:function(t,e){return Lu().memoizedState=[t,e===void 0?null:e],t},useContext:fl,useEffect:qF,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,PA(4194308,4,gQ.bind(null,e,t),n)},useLayoutEffect:function(t,e){return PA(4194308,4,t,e)},useInsertionEffect:function(t,e){return PA(4,2,t,e)},useMemo:function(t,e){var n=Lu();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Lu();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=dme.bind(null,Ei,t),[r.memoizedState,t]},useRef:function(t){var e=Lu();return t={current:t},e.memoizedState=t},useState:VF,useDebugValue:fM,useDeferredValue:function(t){return Lu().memoizedState=t},useTransition:function(){var t=VF(!1),e=t[0];return t=ume.bind(null,t[1]),Lu().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Ei,i=Lu();if(gi){if(n===void 0)throw Error(tt(407));n=n()}else{if(n=e(),Ds===null)throw Error(tt(349));Rg&30||cQ(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,qF(uQ.bind(null,r,s,t),[t]),r.flags|=2048,a5(9,lQ.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=Lu(),e=Ds.identifierPrefix;if(gi){var n=Vf,r=Wf;n=(r&~(1<<32-nu(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=s5++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=lme++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},pme={readContext:fl,useCallback:yQ,useContext:fl,useEffect:dM,useImperativeHandle:wQ,useInsertionEffect:pQ,useLayoutEffect:mQ,useMemo:vQ,useReducer:pI,useRef:hQ,useState:function(){return pI(o5)},useDebugValue:fM,useDeferredValue:function(t){var e=hl();return bQ(e,ds.memoizedState,t)},useTransition:function(){var t=pI(o5)[0],e=hl().memoizedState;return[t,e]},useMutableSource:oQ,useSyncExternalStore:aQ,useId:xQ,unstable_isNewReconciler:!1},mme={readContext:fl,useCallback:yQ,useContext:fl,useEffect:dM,useImperativeHandle:wQ,useInsertionEffect:pQ,useLayoutEffect:mQ,useMemo:vQ,useReducer:mI,useRef:hQ,useState:function(){return mI(o5)},useDebugValue:fM,useDeferredValue:function(t){var e=hl();return ds===null?e.memoizedState=t:bQ(e,ds.memoizedState,t)},useTransition:function(){var t=mI(o5)[0],e=hl().memoizedState;return[t,e]},useMutableSource:oQ,useSyncExternalStore:aQ,useId:xQ,unstable_isNewReconciler:!1};function Hl(t,e){if(t&&t.defaultProps){e=Ci({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function nN(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:Ci({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var gS={isMounted:function(t){return(t=t._reactInternals)?y1(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Po(),i=n0(t),s=Qf(r,i);s.payload=e,n!=null&&(s.callback=n),e=e0(t,s,i),e!==null&&(ru(e,t,i,r),RA(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Po(),i=n0(t),s=Qf(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=e0(t,s,i),e!==null&&(ru(e,t,i,r),RA(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Po(),r=n0(t),i=Qf(n,r);i.tag=2,e!=null&&(i.callback=e),e=e0(t,i,r),e!==null&&(ru(e,t,r,n),RA(e,t,r))}};function GF(t,e,n,r,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,o):e.prototype&&e.prototype.isPureReactComponent?!X3(n,r)||!X3(i,s):!0}function CQ(t,e,n){var r=!1,i=p0,s=e.contextType;return typeof s=="object"&&s!==null?s=fl(s):(i=Ea(e)?Ig:go.current,r=e.contextTypes,s=(r=r!=null)?nv(t,i):p0),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=gS,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function KF(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&gS.enqueueReplaceState(e,e.state,null)}function rN(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},iM(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=fl(s):(s=Ea(e)?Ig:go.current,i.context=nv(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(nN(t,e,s,n),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&&gS.enqueueReplaceState(i,i.state,null),NE(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function ov(t,e){try{var n="",r=e;do n+=Hpe(r),r=r.return;while(r);var i=n}catch(s){i=`
Error generating stack: `+s.message+`
`+s.stack}return{value:t,source:e,stack:i,digest:null}}function gI(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function iN(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var gme=typeof WeakMap=="function"?WeakMap:Map;function SQ(t,e,n){n=Qf(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){BE||(BE=!0,pN=r),iN(t,e)},n}function TQ(t,e,n){n=Qf(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){iN(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){iN(t,e),typeof r!="function"&&(t0===null?t0=new Set([this]):t0.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function YF(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new gme;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=Rme.bind(null,t,e,n),e.then(t,t))}function QF(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function ZF(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Qf(-1,1),e.tag=2,e0(n,e,1))),n.lanes|=1),t)}var wme=Rh.ReactCurrentOwner,ya=!1;function Io(t,e,n,r){e.child=t===null?nQ(e,null,n,r):iv(e,t.child,n,r)}function JF(t,e,n,r,i){n=n.render;var s=e.ref;return _y(e,i),r=lM(t,e,n,r,s,i),n=uM(),t!==null&&!ya?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,ah(t,e,i)):(gi&&n&&ZD(e),e.flags|=1,Io(t,e,r,i),e.child)}function XF(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!bM(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,IQ(t,e,s,r,i)):(t=BA(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:X3,n(o,r)&&t.ref===e.ref)return ah(t,e,i)}return e.flags|=1,t=r0(s,r),t.ref=e.ref,t.return=e,e.child=t}function IQ(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(X3(s,r)&&t.ref===e.ref)if(ya=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(ya=!0);else return e.lanes=t.lanes,ah(t,e,i)}return sN(t,e,n,r,i)}function kQ(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},ii(cy,qa),qa|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,ii(cy,qa),qa|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ii(cy,qa),qa|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,ii(cy,qa),qa|=r;return Io(t,e,i,n),e.child}function RQ(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function sN(t,e,n,r,i){var s=Ea(n)?Ig:go.current;return s=nv(e,s),_y(e,i),n=lM(t,e,n,r,s,i),r=uM(),t!==null&&!ya?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,ah(t,e,i)):(gi&&r&&ZD(e),e.flags|=1,Io(t,e,n,i),e.child)}function ez(t,e,n,r,i){if(Ea(n)){var s=!0;SE(e)}else s=!1;if(_y(e,i),e.stateNode===null)OA(t,e),CQ(e,n,r),rN(e,n,r,i),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var c=o.context,l=n.contextType;typeof l=="object"&&l!==null?l=fl(l):(l=Ea(n)?Ig:go.current,l=nv(e,l));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||c!==l)&&KF(e,o,r,l),bp=!1;var h=e.memoizedState;o.state=h,NE(e,r,o,i),c=e.memoizedState,a!==r||h!==c||Aa.current||bp?(typeof u=="function"&&(nN(e,n,u,r),c=e.memoizedState),(a=bp||GF(e,n,a,r,h,c,l))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=c),o.props=r,o.state=c,o.context=l,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,iQ(t,e),a=e.memoizedProps,l=e.type===e.elementType?a:Hl(e.type,a),o.props=l,d=e.pendingProps,h=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=fl(c):(c=Ea(n)?Ig:go.current,c=nv(e,c));var g=n.getDerivedStateFromProps;(u=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||h!==c)&&KF(e,o,r,c),bp=!1,h=e.memoizedState,o.state=h,NE(e,r,o,i);var w=e.memoizedState;a!==d||h!==w||Aa.current||bp?(typeof g=="function"&&(nN(e,n,g,r),w=e.memoizedState),(l=bp||GF(e,n,l,r,h,w,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,w,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,w,c)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=w),o.props=r,o.state=w,o.context=c,r=l):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),r=!1)}return oN(t,e,n,r,s,i)}function oN(t,e,n,r,i,s){RQ(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return i&&LF(e,n,!1),ah(t,e,s);r=e.stateNode,wme.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=iv(e,t.child,null,s),e.child=iv(e,null,a,s)):Io(t,e,a,s),e.memoizedState=r.state,i&&LF(e,n,!0),e.child}function NQ(t){var e=t.stateNode;e.pendingContext?jF(t,e.pendingContext,e.pendingContext!==e.context):e.context&&jF(t,e.context,!1),sM(t,e.containerInfo)}function tz(t,e,n,r,i){return rv(),XD(i),e.flags|=256,Io(t,e,n,r),e.child}var aN={dehydrated:null,treeContext:null,retryLane:0};function cN(t){return{baseLanes:t,cachePool:null,transitions:null}}function PQ(t,e,n){var r=e.pendingProps,i=Ai.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),ii(Ai,i&1),t===null)return eN(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,s?(r=e.mode,s=e.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=vS(o,r,0,null),t=hg(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=cN(n),e.memoizedState=aN,t):hM(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return yme(t,e,o,r,a,i,n);if(s){s=r.fallback,o=e.mode,i=t.child,a=i.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=c,e.deletions=null):(r=r0(i,c),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=r0(a,s):(s=hg(s,o,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,o=t.child.memoizedState,o=o===null?cN(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=aN,r}return s=t.child,t=s.sibling,r=r0(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function hM(t,e){return e=vS({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function $_(t,e,n,r){return r!==null&&XD(r),iv(e,t.child,null,n),t=hM(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function yme(t,e,n,r,i,s,o){if(n)return e.flags&256?(e.flags&=-257,r=gI(Error(tt(422))),$_(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=vS({mode:"visible",children:r.children},i,0,null),s=hg(s,i,o,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&iv(e,t.child,null,o),e.child.memoizedState=cN(o),e.memoizedState=aN,s);if(!(e.mode&1))return $_(t,e,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(tt(419)),r=gI(s,r,void 0),$_(t,e,o,r)}if(a=(o&t.childLanes)!==0,ya||a){if(r=Ds,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,oh(t,i),ru(r,t,i,-1))}return vM(),r=gI(Error(tt(421))),$_(t,e,o,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=Nme.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,Ya=Xp(i.nextSibling),Ja=e,gi=!0,Ql=null,t!==null&&(sl[ol++]=Wf,sl[ol++]=Vf,sl[ol++]=kg,Wf=t.id,Vf=t.overflow,kg=e),e=hM(e,r.children),e.flags|=4096,e)}function nz(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),tN(t.return,e,n)}function wI(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function OQ(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(Io(t,e,r.children,n),r=Ai.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&nz(t,n,e);else if(t.tag===19)nz(t,n,e);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}r&=1}if(ii(Ai,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&PE(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),wI(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&PE(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}wI(e,!0,n,null,s);break;case"together":wI(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function OA(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function ah(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Ng|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(tt(153));if(e.child!==null){for(t=e.child,n=r0(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=r0(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function vme(t,e,n){switch(e.tag){case 3:NQ(e),rv();break;case 5:sQ(e);break;case 1:Ea(e.type)&&SE(e);break;case 4:sM(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;ii(kE,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(ii(Ai,Ai.current&1),e.flags|=128,null):n&e.child.childLanes?PQ(t,e,n):(ii(Ai,Ai.current&1),t=ah(t,e,n),t!==null?t.sibling:null);ii(Ai,Ai.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return OQ(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ii(Ai,Ai.current),r)break;return null;case 22:case 23:return e.lanes=0,kQ(t,e,n)}return ah(t,e,n)}var DQ,lN,MQ,BQ;DQ=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};lN=function(){};MQ=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,Hm(od.current);var s=null;switch(n){case"input":i=NR(t,i),r=NR(t,r),s=[];break;case"select":i=Ci({},i,{value:void 0}),r=Ci({},r,{value:void 0}),s=[];break;case"textarea":i=DR(t,i),r=DR(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=EE)}BR(n,r);var o;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var a=i[l];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(q3.hasOwnProperty(l)?s||(s=[]):(s=s||[]).push(l,null));for(l in r){var c=r[l];if(a=i!=null?i[l]:void 0,r.hasOwnProperty(l)&&c!==a&&(c!=null||a!=null))if(l==="style")if(a){for(o in a)!a.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&a[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(s||(s=[]),s.push(l,n)),n=c;else l==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(s=s||[]).push(l,c)):l==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(l,""+c):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(q3.hasOwnProperty(l)?(c!=null&&l==="onScroll"&&oi("scroll",t),s||a===c||(s=[])):(s=s||[]).push(l,c))}n&&(s=s||[]).push("style",n);var l=s;(e.updateQueue=l)&&(e.flags|=4)}};BQ=function(t,e,n,r){n!==r&&(e.flags|=4)};function T2(t,e){if(!gi)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function ro(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function bme(t,e,n){var r=e.pendingProps;switch(JD(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ro(e),null;case 1:return Ea(e.type)&&CE(),ro(e),null;case 3:return r=e.stateNode,sv(),ci(Aa),ci(go),aM(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(M_(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Ql!==null&&(wN(Ql),Ql=null))),lN(t,e),ro(e),null;case 5:oM(e);var i=Hm(i5.current);if(n=e.type,t!==null&&e.stateNode!=null)MQ(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(tt(166));return ro(e),null}if(t=Hm(od.current),M_(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[Xu]=e,r[n5]=s,t=(e.mode&1)!==0,n){case"dialog":oi("cancel",r),oi("close",r);break;case"iframe":case"object":case"embed":oi("load",r);break;case"video":case"audio":for(i=0;i<e3.length;i++)oi(e3[i],r);break;case"source":oi("error",r);break;case"img":case"image":case"link":oi("error",r),oi("load",r);break;case"details":oi("toggle",r);break;case"input":dF(r,s),oi("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},oi("invalid",r);break;case"textarea":hF(r,s),oi("invalid",r)}BR(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&D_(r.textContent,a,t),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&D_(r.textContent,a,t),i=["children",""+a]):q3.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&oi("scroll",r)}switch(n){case"input":S_(r),fF(r,s,!0);break;case"textarea":S_(r),pF(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=EE)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=uY(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[Xu]=e,t[n5]=r,DQ(t,e,!1,!1),e.stateNode=t;e:{switch(o=$R(n,r),n){case"dialog":oi("cancel",t),oi("close",t),i=r;break;case"iframe":case"object":case"embed":oi("load",t),i=r;break;case"video":case"audio":for(i=0;i<e3.length;i++)oi(e3[i],t);i=r;break;case"source":oi("error",t),i=r;break;case"img":case"image":case"link":oi("error",t),oi("load",t),i=r;break;case"details":oi("toggle",t),i=r;break;case"input":dF(t,r),i=NR(t,r),oi("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=Ci({},r,{value:void 0}),oi("invalid",t);break;case"textarea":hF(t,r),i=DR(t,r),oi("invalid",t);break;default:i=r}BR(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var c=a[s];s==="style"?hY(t,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&dY(t,c)):s==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&G3(t,c):typeof c=="number"&&G3(t,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(q3.hasOwnProperty(s)?c!=null&&s==="onScroll"&&oi("scroll",t):c!=null&&$D(t,s,c,o))}switch(n){case"input":S_(t),fF(t,r,!1);break;case"textarea":S_(t),pF(t);break;case"option":r.value!=null&&t.setAttribute("value",""+h0(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?yy(t,!!r.multiple,s,!1):r.defaultValue!=null&&yy(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=EE)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return ro(e),null;case 6:if(t&&e.stateNode!=null)BQ(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(tt(166));if(n=Hm(i5.current),Hm(od.current),M_(e)){if(r=e.stateNode,n=e.memoizedProps,r[Xu]=e,(s=r.nodeValue!==n)&&(t=Ja,t!==null))switch(t.tag){case 3:D_(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&D_(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Xu]=e,e.stateNode=r}return ro(e),null;case 13:if(ci(Ai),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(gi&&Ya!==null&&e.mode&1&&!(e.flags&128))eQ(),rv(),e.flags|=98560,s=!1;else if(s=M_(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error(tt(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(tt(317));s[Xu]=e}else rv(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;ro(e),s=!1}else Ql!==null&&(wN(Ql),Ql=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||Ai.current&1?fs===0&&(fs=3):vM())),e.updateQueue!==null&&(e.flags|=4),ro(e),null);case 4:return sv(),lN(t,e),t===null&&e5(e.stateNode.containerInfo),ro(e),null;case 10:return nM(e.type._context),ro(e),null;case 17:return Ea(e.type)&&CE(),ro(e),null;case 19:if(ci(Ai),s=e.memoizedState,s===null)return ro(e),null;if(r=(e.flags&128)!==0,o=s.rendering,o===null)if(r)T2(s,!1);else{if(fs!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=PE(t),o!==null){for(e.flags|=128,T2(s,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return ii(Ai,Ai.current&1|2),e.child}t=t.sibling}s.tail!==null&&Ki()>av&&(e.flags|=128,r=!0,T2(s,!1),e.lanes=4194304)}else{if(!r)if(t=PE(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),T2(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!gi)return ro(e),null}else 2*Ki()-s.renderingStartTime>av&&n!==1073741824&&(e.flags|=128,r=!0,T2(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Ki(),e.sibling=null,n=Ai.current,ii(Ai,r?n&1|2:n&1),e):(ro(e),null);case 22:case 23:return yM(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?qa&1073741824&&(ro(e),e.subtreeFlags&6&&(e.flags|=8192)):ro(e),null;case 24:return null;case 25:return null}throw Error(tt(156,e.tag))}function xme(t,e){switch(JD(e),e.tag){case 1:return Ea(e.type)&&CE(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return sv(),ci(Aa),ci(go),aM(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return oM(e),null;case 13:if(ci(Ai),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(tt(340));rv()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return ci(Ai),null;case 4:return sv(),null;case 10:return nM(e.type._context),null;case 22:case 23:return yM(),null;case 24:return null;default:return null}}var j_=!1,uo=!1,_me=typeof WeakSet=="function"?WeakSet:Set,Bt=null;function ay(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Pi(t,e,r)}else n.current=null}function uN(t,e,n){try{n()}catch(r){Pi(t,e,r)}}var rz=!1;function Ame(t,e){if(GR=xE,t=FY(),QD(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,c=-1,l=0,u=0,d=t,h=null;t:for(;;){for(var g;d!==n||i!==0&&d.nodeType!==3||(a=o+i),d!==s||r!==0&&d.nodeType!==3||(c=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(g=d.firstChild)!==null;)h=d,d=g;for(;;){if(d===t)break t;if(h===n&&++l===i&&(a=o),h===s&&++u===r&&(c=o),(g=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=g}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(KR={focusedElem:t,selectionRange:n},xE=!1,Bt=e;Bt!==null;)if(e=Bt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Bt=t;else for(;Bt!==null;){e=Bt;try{var w=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,_=w.memoizedState,T=e.stateNode,b=T.getSnapshotBeforeUpdate(e.elementType===e.type?v:Hl(e.type,v),_);T.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var k=e.stateNode.containerInfo;k.nodeType===1?k.textContent="":k.nodeType===9&&k.documentElement&&k.removeChild(k.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(tt(163))}}catch(D){Pi(e,e.return,D)}if(t=e.sibling,t!==null){t.return=e.return,Bt=t;break}Bt=e.return}return w=rz,rz=!1,w}function C3(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&uN(e,n,s)}i=i.next}while(i!==r)}}function wS(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function dN(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function $Q(t){var e=t.alternate;e!==null&&(t.alternate=null,$Q(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Xu],delete e[n5],delete e[ZR],delete e[sme],delete e[ome])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function jQ(t){return t.tag===5||t.tag===3||t.tag===4}function iz(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||jQ(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function fN(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=EE));else if(r!==4&&(t=t.child,t!==null))for(fN(t,e,n),t=t.sibling;t!==null;)fN(t,e,n),t=t.sibling}function hN(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(hN(t,e,n),t=t.sibling;t!==null;)hN(t,e,n),t=t.sibling}var Hs=null,Kl=!1;function up(t,e,n){for(n=n.child;n!==null;)LQ(t,e,n),n=n.sibling}function LQ(t,e,n){if(sd&&typeof sd.onCommitFiberUnmount=="function")try{sd.onCommitFiberUnmount(lS,n)}catch{}switch(n.tag){case 5:uo||ay(n,e);case 6:var r=Hs,i=Kl;Hs=null,up(t,e,n),Hs=r,Kl=i,Hs!==null&&(Kl?(t=Hs,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Hs.removeChild(n.stateNode));break;case 18:Hs!==null&&(Kl?(t=Hs,n=n.stateNode,t.nodeType===8?uI(t.parentNode,n):t.nodeType===1&&uI(t,n),Z3(t)):uI(Hs,n.stateNode));break;case 4:r=Hs,i=Kl,Hs=n.stateNode.containerInfo,Kl=!0,up(t,e,n),Hs=r,Kl=i;break;case 0:case 11:case 14:case 15:if(!uo&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&uN(n,e,o),i=i.next}while(i!==r)}up(t,e,n);break;case 1:if(!uo&&(ay(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Pi(n,e,a)}up(t,e,n);break;case 21:up(t,e,n);break;case 22:n.mode&1?(uo=(r=uo)||n.memoizedState!==null,up(t,e,n),uo=r):up(t,e,n);break;default:up(t,e,n)}}function sz(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new _me),e.forEach(function(r){var i=Pme.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ml(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Hs=a.stateNode,Kl=!1;break e;case 3:Hs=a.stateNode.containerInfo,Kl=!0;break e;case 4:Hs=a.stateNode.containerInfo,Kl=!0;break e}a=a.return}if(Hs===null)throw Error(tt(160));LQ(s,o,i),Hs=null,Kl=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(l){Pi(i,e,l)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)UQ(e,t),e=e.sibling}function UQ(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ml(e,t),Du(t),r&4){try{C3(3,t,t.return),wS(3,t)}catch(v){Pi(t,t.return,v)}try{C3(5,t,t.return)}catch(v){Pi(t,t.return,v)}}break;case 1:Ml(e,t),Du(t),r&512&&n!==null&&ay(n,n.return);break;case 5:if(Ml(e,t),Du(t),r&512&&n!==null&&ay(n,n.return),t.flags&32){var i=t.stateNode;try{G3(i,"")}catch(v){Pi(t,t.return,v)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,a=t.type,c=t.updateQueue;if(t.updateQueue=null,c!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&cY(i,s),$R(a,o);var l=$R(a,s);for(o=0;o<c.length;o+=2){var u=c[o],d=c[o+1];u==="style"?hY(i,d):u==="dangerouslySetInnerHTML"?dY(i,d):u==="children"?G3(i,d):$D(i,u,d,l)}switch(a){case"input":PR(i,s);break;case"textarea":lY(i,s);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var g=s.value;g!=null?yy(i,!!s.multiple,g,!1):h!==!!s.multiple&&(s.defaultValue!=null?yy(i,!!s.multiple,s.defaultValue,!0):yy(i,!!s.multiple,s.multiple?[]:"",!1))}i[n5]=s}catch(v){Pi(t,t.return,v)}}break;case 6:if(Ml(e,t),Du(t),r&4){if(t.stateNode===null)throw Error(tt(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(v){Pi(t,t.return,v)}}break;case 3:if(Ml(e,t),Du(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Z3(e.containerInfo)}catch(v){Pi(t,t.return,v)}break;case 4:Ml(e,t),Du(t);break;case 13:Ml(e,t),Du(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(gM=Ki())),r&4&&sz(t);break;case 22:if(u=n!==null&&n.memoizedState!==null,t.mode&1?(uo=(l=uo)||u,Ml(e,t),uo=l):Ml(e,t),Du(t),r&8192){if(l=t.memoizedState!==null,(t.stateNode.isHidden=l)&&!u&&t.mode&1)for(Bt=t,u=t.child;u!==null;){for(d=Bt=u;Bt!==null;){switch(h=Bt,g=h.child,h.tag){case 0:case 11:case 14:case 15:C3(4,h,h.return);break;case 1:ay(h,h.return);var w=h.stateNode;if(typeof w.componentWillUnmount=="function"){r=h,n=h.return;try{e=r,w.props=e.memoizedProps,w.state=e.memoizedState,w.componentWillUnmount()}catch(v){Pi(r,n,v)}}break;case 5:ay(h,h.return);break;case 22:if(h.memoizedState!==null){az(d);continue}}g!==null?(g.return=h,Bt=g):az(d)}u=u.sibling}e:for(u=null,d=t;;){if(d.tag===5){if(u===null){u=d;try{i=d.stateNode,l?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,c=d.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=fY("display",o))}catch(v){Pi(t,t.return,v)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=l?"":d.memoizedProps}catch(v){Pi(t,t.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Ml(e,t),Du(t),r&4&&sz(t);break;case 21:break;default:Ml(e,t),Du(t)}}function Du(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(jQ(n)){var r=n;break e}n=n.return}throw Error(tt(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(G3(i,""),r.flags&=-33);var s=iz(t);hN(t,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=iz(t);fN(t,a,o);break;default:throw Error(tt(161))}}catch(c){Pi(t,t.return,c)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Eme(t,e,n){Bt=t,FQ(t)}function FQ(t,e,n){for(var r=(t.mode&1)!==0;Bt!==null;){var i=Bt,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||j_;if(!o){var a=i.alternate,c=a!==null&&a.memoizedState!==null||uo;a=j_;var l=uo;if(j_=o,(uo=c)&&!l)for(Bt=i;Bt!==null;)o=Bt,c=o.child,o.tag===22&&o.memoizedState!==null?cz(i):c!==null?(c.return=o,Bt=c):cz(i);for(;s!==null;)Bt=s,FQ(s),s=s.sibling;Bt=i,j_=a,uo=l}oz(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,Bt=s):oz(t)}}function oz(t){for(;Bt!==null;){var e=Bt;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:uo||wS(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!uo)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:Hl(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&WF(e,s,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}WF(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var c=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var l=e.alternate;if(l!==null){var u=l.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&Z3(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(tt(163))}uo||e.flags&512&&dN(e)}catch(h){Pi(e,e.return,h)}}if(e===t){Bt=null;break}if(n=e.sibling,n!==null){n.return=e.return,Bt=n;break}Bt=e.return}}function az(t){for(;Bt!==null;){var e=Bt;if(e===t){Bt=null;break}var n=e.sibling;if(n!==null){n.return=e.return,Bt=n;break}Bt=e.return}}function cz(t){for(;Bt!==null;){var e=Bt;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{wS(4,e)}catch(c){Pi(e,n,c)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(c){Pi(e,i,c)}}var s=e.return;try{dN(e)}catch(c){Pi(e,s,c)}break;case 5:var o=e.return;try{dN(e)}catch(c){Pi(e,o,c)}}}catch(c){Pi(e,e.return,c)}if(e===t){Bt=null;break}var a=e.sibling;if(a!==null){a.return=e.return,Bt=a;break}Bt=e.return}}var Cme=Math.ceil,ME=Rh.ReactCurrentDispatcher,pM=Rh.ReactCurrentOwner,dl=Rh.ReactCurrentBatchConfig,yr=0,Ds=null,is=null,Gs=0,qa=0,cy=B0(0),fs=0,c5=null,Ng=0,yS=0,mM=0,S3=null,ha=null,gM=0,av=1/0,Rf=null,BE=!1,pN=null,t0=null,L_=!1,zp=null,$E=0,T3=0,mN=null,DA=-1,MA=0;function Po(){return yr&6?Ki():DA!==-1?DA:DA=Ki()}function n0(t){return t.mode&1?yr&2&&Gs!==0?Gs&-Gs:cme.transition!==null?(MA===0&&(MA=CY()),MA):(t=Ur,t!==0||(t=window.event,t=t===void 0?16:PY(t.type)),t):1}function ru(t,e,n,r){if(50<T3)throw T3=0,mN=null,Error(tt(185));d6(t,n,r),(!(yr&2)||t!==Ds)&&(t===Ds&&(!(yr&2)&&(yS|=n),fs===4&&Ip(t,Gs)),Ca(t,r),n===1&&yr===0&&!(e.mode&1)&&(av=Ki()+500,pS&&$0()))}function Ca(t,e){var n=t.callbackNode;c0e(t,e);var r=bE(t,t===Ds?Gs:0);if(r===0)n!==null&&wF(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&wF(n),e===1)t.tag===0?ame(lz.bind(null,t)):ZY(lz.bind(null,t)),rme(function(){!(yr&6)&&$0()}),n=null;else{switch(SY(r)){case 1:n=zD;break;case 4:n=AY;break;case 16:n=vE;break;case 536870912:n=EY;break;default:n=vE}n=YQ(n,zQ.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function zQ(t,e){if(DA=-1,MA=0,yr&6)throw Error(tt(327));var n=t.callbackNode;if(Ay()&&t.callbackNode!==n)return null;var r=bE(t,t===Ds?Gs:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=jE(t,r);else{e=r;var i=yr;yr|=2;var s=WQ();(Ds!==t||Gs!==e)&&(Rf=null,av=Ki()+500,fg(t,e));do try{Ime();break}catch(a){HQ(t,a)}while(!0);tM(),ME.current=s,yr=i,is!==null?e=0:(Ds=null,Gs=0,e=fs)}if(e!==0){if(e===2&&(i=zR(t),i!==0&&(r=i,e=gN(t,i))),e===1)throw n=c5,fg(t,0),Ip(t,r),Ca(t,Ki()),n;if(e===6)Ip(t,r);else{if(i=t.current.alternate,!(r&30)&&!Sme(i)&&(e=jE(t,r),e===2&&(s=zR(t),s!==0&&(r=s,e=gN(t,s))),e===1))throw n=c5,fg(t,0),Ip(t,r),Ca(t,Ki()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(tt(345));case 2:Om(t,ha,Rf);break;case 3:if(Ip(t,r),(r&130023424)===r&&(e=gM+500-Ki(),10<e)){if(bE(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){Po(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=QR(Om.bind(null,t,ha,Rf),e);break}Om(t,ha,Rf);break;case 4:if(Ip(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var o=31-nu(r);s=1<<o,o=e[o],o>i&&(i=o),r&=~s}if(r=i,r=Ki()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cme(r/1960))-r,10<r){t.timeoutHandle=QR(Om.bind(null,t,ha,Rf),r);break}Om(t,ha,Rf);break;case 5:Om(t,ha,Rf);break;default:throw Error(tt(329))}}}return Ca(t,Ki()),t.callbackNode===n?zQ.bind(null,t):null}function gN(t,e){var n=S3;return t.current.memoizedState.isDehydrated&&(fg(t,e).flags|=256),t=jE(t,e),t!==2&&(e=ha,ha=n,e!==null&&wN(e)),t}function wN(t){ha===null?ha=t:ha.push.apply(ha,t)}function Sme(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!au(s(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Ip(t,e){for(e&=~mM,e&=~yS,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-nu(e),r=1<<n;t[n]=-1,e&=~r}}function lz(t){if(yr&6)throw Error(tt(327));Ay();var e=bE(t,0);if(!(e&1))return Ca(t,Ki()),null;var n=jE(t,e);if(t.tag!==0&&n===2){var r=zR(t);r!==0&&(e=r,n=gN(t,r))}if(n===1)throw n=c5,fg(t,0),Ip(t,e),Ca(t,Ki()),n;if(n===6)throw Error(tt(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Om(t,ha,Rf),Ca(t,Ki()),null}function wM(t,e){var n=yr;yr|=1;try{return t(e)}finally{yr=n,yr===0&&(av=Ki()+500,pS&&$0())}}function Pg(t){zp!==null&&zp.tag===0&&!(yr&6)&&Ay();var e=yr;yr|=1;var n=dl.transition,r=Ur;try{if(dl.transition=null,Ur=1,t)return t()}finally{Ur=r,dl.transition=n,yr=e,!(yr&6)&&$0()}}function yM(){qa=cy.current,ci(cy)}function fg(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,nme(n)),is!==null)for(n=is.return;n!==null;){var r=n;switch(JD(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&CE();break;case 3:sv(),ci(Aa),ci(go),aM();break;case 5:oM(r);break;case 4:sv();break;case 13:ci(Ai);break;case 19:ci(Ai);break;case 10:nM(r.type._context);break;case 22:case 23:yM()}n=n.return}if(Ds=t,is=t=r0(t.current,null),Gs=qa=e,fs=0,c5=null,mM=yS=Ng=0,ha=S3=null,zm!==null){for(e=0;e<zm.length;e++)if(n=zm[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}zm=null}return t}function HQ(t,e){do{var n=is;try{if(tM(),NA.current=DE,OE){for(var r=Ei.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}OE=!1}if(Rg=0,ks=ds=Ei=null,E3=!1,s5=0,pM.current=null,n===null||n.return===null){fs=1,c5=e,is=null;break}e:{var s=t,o=n.return,a=n,c=e;if(e=Gs,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var l=c,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var g=QF(o);if(g!==null){g.flags&=-257,ZF(g,o,a,s,e),g.mode&1&&YF(s,l,e),e=g,c=l;var w=e.updateQueue;if(w===null){var v=new Set;v.add(c),e.updateQueue=v}else w.add(c);break e}else{if(!(e&1)){YF(s,l,e),vM();break e}c=Error(tt(426))}}else if(gi&&a.mode&1){var _=QF(o);if(_!==null){!(_.flags&65536)&&(_.flags|=256),ZF(_,o,a,s,e),XD(ov(c,a));break e}}s=c=ov(c,a),fs!==4&&(fs=2),S3===null?S3=[s]:S3.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var T=SQ(s,c,e);HF(s,T);break e;case 1:a=c;var b=s.type,k=s.stateNode;if(!(s.flags&128)&&(typeof b.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(t0===null||!t0.has(k)))){s.flags|=65536,e&=-e,s.lanes|=e;var D=TQ(s,a,e);HF(s,D);break e}}s=s.return}while(s!==null)}qQ(n)}catch(O){e=O,is===n&&n!==null&&(is=n=n.return);continue}break}while(!0)}function WQ(){var t=ME.current;return ME.current=DE,t===null?DE:t}function vM(){(fs===0||fs===3||fs===2)&&(fs=4),Ds===null||!(Ng&268435455)&&!(yS&268435455)||Ip(Ds,Gs)}function jE(t,e){var n=yr;yr|=2;var r=WQ();(Ds!==t||Gs!==e)&&(Rf=null,fg(t,e));do try{Tme();break}catch(i){HQ(t,i)}while(!0);if(tM(),yr=n,ME.current=r,is!==null)throw Error(tt(261));return Ds=null,Gs=0,fs}function Tme(){for(;is!==null;)VQ(is)}function Ime(){for(;is!==null&&!Xpe();)VQ(is)}function VQ(t){var e=KQ(t.alternate,t,qa);t.memoizedProps=t.pendingProps,e===null?qQ(t):is=e,pM.current=null}function qQ(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=xme(n,e),n!==null){n.flags&=32767,is=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{fs=6,is=null;return}}else if(n=bme(n,e,qa),n!==null){is=n;return}if(e=e.sibling,e!==null){is=e;return}is=e=t}while(e!==null);fs===0&&(fs=5)}function Om(t,e,n){var r=Ur,i=dl.transition;try{dl.transition=null,Ur=1,kme(t,e,n,r)}finally{dl.transition=i,Ur=r}return null}function kme(t,e,n,r){do Ay();while(zp!==null);if(yr&6)throw Error(tt(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(tt(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(l0e(t,s),t===Ds&&(is=Ds=null,Gs=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||L_||(L_=!0,YQ(vE,function(){return Ay(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=dl.transition,dl.transition=null;var o=Ur;Ur=1;var a=yr;yr|=4,pM.current=null,Ame(t,n),UQ(n,t),Y0e(KR),xE=!!GR,KR=GR=null,t.current=n,Eme(n),e0e(),yr=a,Ur=o,dl.transition=s}else t.current=n;if(L_&&(L_=!1,zp=t,$E=i),s=t.pendingLanes,s===0&&(t0=null),r0e(n.stateNode),Ca(t,Ki()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(BE)throw BE=!1,t=pN,pN=null,t;return $E&1&&t.tag!==0&&Ay(),s=t.pendingLanes,s&1?t===mN?T3++:(T3=0,mN=t):T3=0,$0(),null}function Ay(){if(zp!==null){var t=SY($E),e=dl.transition,n=Ur;try{if(dl.transition=null,Ur=16>t?16:t,zp===null)var r=!1;else{if(t=zp,zp=null,$E=0,yr&6)throw Error(tt(331));var i=yr;for(yr|=4,Bt=t.current;Bt!==null;){var s=Bt,o=s.child;if(Bt.flags&16){var a=s.deletions;if(a!==null){for(var c=0;c<a.length;c++){var l=a[c];for(Bt=l;Bt!==null;){var u=Bt;switch(u.tag){case 0:case 11:case 15:C3(8,u,s)}var d=u.child;if(d!==null)d.return=u,Bt=d;else for(;Bt!==null;){u=Bt;var h=u.sibling,g=u.return;if($Q(u),u===l){Bt=null;break}if(h!==null){h.return=g,Bt=h;break}Bt=g}}}var w=s.alternate;if(w!==null){var v=w.child;if(v!==null){w.child=null;do{var _=v.sibling;v.sibling=null,v=_}while(v!==null)}}Bt=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,Bt=o;else e:for(;Bt!==null;){if(s=Bt,s.flags&2048)switch(s.tag){case 0:case 11:case 15:C3(9,s,s.return)}var T=s.sibling;if(T!==null){T.return=s.return,Bt=T;break e}Bt=s.return}}var b=t.current;for(Bt=b;Bt!==null;){o=Bt;var k=o.child;if(o.subtreeFlags&2064&&k!==null)k.return=o,Bt=k;else e:for(o=b;Bt!==null;){if(a=Bt,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:wS(9,a)}}catch(O){Pi(a,a.return,O)}if(a===o){Bt=null;break e}var D=a.sibling;if(D!==null){D.return=a.return,Bt=D;break e}Bt=a.return}}if(yr=i,$0(),sd&&typeof sd.onPostCommitFiberRoot=="function")try{sd.onPostCommitFiberRoot(lS,t)}catch{}r=!0}return r}finally{Ur=n,dl.transition=e}}return!1}function uz(t,e,n){e=ov(n,e),e=SQ(t,e,1),t=e0(t,e,1),e=Po(),t!==null&&(d6(t,1,e),Ca(t,e))}function Pi(t,e,n){if(t.tag===3)uz(t,t,n);else for(;e!==null;){if(e.tag===3){uz(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(t0===null||!t0.has(r))){t=ov(n,t),t=TQ(e,t,1),e=e0(e,t,1),t=Po(),e!==null&&(d6(e,1,t),Ca(e,t));break}}e=e.return}}function Rme(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=Po(),t.pingedLanes|=t.suspendedLanes&n,Ds===t&&(Gs&n)===n&&(fs===4||fs===3&&(Gs&130023424)===Gs&&500>Ki()-gM?fg(t,0):mM|=n),Ca(t,e)}function GQ(t,e){e===0&&(t.mode&1?(e=k_,k_<<=1,!(k_&130023424)&&(k_=4194304)):e=1);var n=Po();t=oh(t,e),t!==null&&(d6(t,e,n),Ca(t,n))}function Nme(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),GQ(t,n)}function Pme(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(tt(314))}r!==null&&r.delete(e),GQ(t,n)}var KQ;KQ=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Aa.current)ya=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return ya=!1,vme(t,e,n);ya=!!(t.flags&131072)}else ya=!1,gi&&e.flags&1048576&&JY(e,IE,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;OA(t,e),t=e.pendingProps;var i=nv(e,go.current);_y(e,n),i=lM(null,e,r,t,i,n);var s=uM();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ea(r)?(s=!0,SE(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,iM(e),i.updater=gS,e.stateNode=i,i._reactInternals=e,rN(e,r,t,n),e=oN(null,e,r,!0,s,n)):(e.tag=0,gi&&s&&ZD(e),Io(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(OA(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=Dme(r),t=Hl(r,t),i){case 0:e=sN(null,e,r,t,n);break e;case 1:e=ez(null,e,r,t,n);break e;case 11:e=JF(null,e,r,t,n);break e;case 14:e=XF(null,e,r,Hl(r.type,t),n);break e}throw Error(tt(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Hl(r,i),sN(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Hl(r,i),ez(t,e,r,i,n);case 3:e:{if(NQ(e),t===null)throw Error(tt(387));r=e.pendingProps,s=e.memoizedState,i=s.element,iQ(t,e),NE(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=ov(Error(tt(423)),e),e=tz(t,e,r,n,i);break e}else if(r!==i){i=ov(Error(tt(424)),e),e=tz(t,e,r,n,i);break e}else for(Ya=Xp(e.stateNode.containerInfo.firstChild),Ja=e,gi=!0,Ql=null,n=nQ(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(rv(),r===i){e=ah(t,e,n);break e}Io(t,e,r,n)}e=e.child}return e;case 5:return sQ(e),t===null&&eN(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,YR(r,i)?o=null:s!==null&&YR(r,s)&&(e.flags|=32),RQ(t,e),Io(t,e,o,n),e.child;case 6:return t===null&&eN(e),null;case 13:return PQ(t,e,n);case 4:return sM(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=iv(e,null,r,n):Io(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Hl(r,i),JF(t,e,r,i,n);case 7:return Io(t,e,e.pendingProps,n),e.child;case 8:return Io(t,e,e.pendingProps.children,n),e.child;case 12:return Io(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,ii(kE,r._currentValue),r._currentValue=o,s!==null)if(au(s.value,o)){if(s.children===i.children&&!Aa.current){e=ah(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(s.tag===1){c=Qf(-1,n&-n),c.tag=2;var l=s.updateQueue;if(l!==null){l=l.shared;var u=l.pending;u===null?c.next=c:(c.next=u.next,u.next=c),l.pending=c}}s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),tN(s.return,n,e),a.lanes|=n;break}c=c.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(tt(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),tN(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Io(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,_y(e,n),i=fl(i),r=r(i),e.flags|=1,Io(t,e,r,n),e.child;case 14:return r=e.type,i=Hl(r,e.pendingProps),i=Hl(r.type,i),XF(t,e,r,i,n);case 15:return IQ(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Hl(r,i),OA(t,e),e.tag=1,Ea(r)?(t=!0,SE(e)):t=!1,_y(e,n),CQ(e,r,i),rN(e,r,i,n),oN(null,e,r,!0,t,n);case 19:return OQ(t,e,n);case 22:return kQ(t,e,n)}throw Error(tt(156,e.tag))};function YQ(t,e){return _Y(t,e)}function Ome(t,e,n,r){this.tag=t,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ll(t,e,n,r){return new Ome(t,e,n,r)}function bM(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Dme(t){if(typeof t=="function")return bM(t)?1:0;if(t!=null){if(t=t.$$typeof,t===LD)return 11;if(t===UD)return 14}return 2}function r0(t,e){var n=t.alternate;return n===null?(n=ll(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function BA(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")bM(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Jw:return hg(n.children,i,s,e);case jD:o=8,i|=8;break;case TR:return t=ll(12,n,e,i|2),t.elementType=TR,t.lanes=s,t;case IR:return t=ll(13,n,e,i),t.elementType=IR,t.lanes=s,t;case kR:return t=ll(19,n,e,i),t.elementType=kR,t.lanes=s,t;case sY:return vS(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case rY:o=10;break e;case iY:o=9;break e;case LD:o=11;break e;case UD:o=14;break e;case vp:o=16,r=null;break e}throw Error(tt(130,t==null?t:typeof t,""))}return e=ll(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function hg(t,e,n,r){return t=ll(7,t,r,e),t.lanes=n,t}function vS(t,e,n,r){return t=ll(22,t,r,e),t.elementType=sY,t.lanes=n,t.stateNode={isHidden:!1},t}function yI(t,e,n){return t=ll(6,t,null,e),t.lanes=n,t}function vI(t,e,n){return e=ll(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Mme(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=X7(0),this.expirationTimes=X7(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=X7(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function xM(t,e,n,r,i,s,o,a,c){return t=new Mme(t,e,n,a,c),e===1?(e=1,s===!0&&(e|=8)):e=0,s=ll(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},iM(s),t}function Bme(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Zw,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function QQ(t){if(!t)return p0;t=t._reactInternals;e:{if(y1(t)!==t||t.tag!==1)throw Error(tt(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Ea(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(tt(171))}if(t.tag===1){var n=t.type;if(Ea(n))return QY(t,n,e)}return e}function ZQ(t,e,n,r,i,s,o,a,c){return t=xM(n,r,!0,t,i,s,o,a,c),t.context=QQ(null),n=t.current,r=Po(),i=n0(n),s=Qf(r,i),s.callback=e??null,e0(n,s,i),t.current.lanes=i,d6(t,i,r),Ca(t,r),t}function bS(t,e,n,r){var i=e.current,s=Po(),o=n0(i);return n=QQ(n),e.context===null?e.context=n:e.pendingContext=n,e=Qf(s,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=e0(i,e,o),t!==null&&(ru(t,i,o,s),RA(t,i,o)),o}function LE(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 dz(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function _M(t,e){dz(t,e),(t=t.alternate)&&dz(t,e)}function $me(){return null}var JQ=typeof reportError=="function"?reportError:function(t){console.error(t)};function AM(t){this._internalRoot=t}xS.prototype.render=AM.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(tt(409));bS(t,e,null,null)};xS.prototype.unmount=AM.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Pg(function(){bS(null,t,null,null)}),e[sh]=null}};function xS(t){this._internalRoot=t}xS.prototype.unstable_scheduleHydration=function(t){if(t){var e=kY();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Tp.length&&e!==0&&e<Tp[n].priority;n++);Tp.splice(n,0,t),n===0&&NY(t)}};function EM(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function _S(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function fz(){}function jme(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var l=LE(o);s.call(l)}}var o=ZQ(e,r,t,0,null,!1,!1,"",fz);return t._reactRootContainer=o,t[sh]=o.current,e5(t.nodeType===8?t.parentNode:t),Pg(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var l=LE(c);a.call(l)}}var c=xM(t,0,!1,null,null,!1,!1,"",fz);return t._reactRootContainer=c,t[sh]=c.current,e5(t.nodeType===8?t.parentNode:t),Pg(function(){bS(e,c,n,r)}),c}function AS(t,e,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var c=LE(o);a.call(c)}}bS(e,o,t,i)}else o=jme(n,e,t,i,r);return LE(o)}TY=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=X2(e.pendingLanes);n!==0&&(HD(e,n|1),Ca(e,Ki()),!(yr&6)&&(av=Ki()+500,$0()))}break;case 13:Pg(function(){var r=oh(t,1);if(r!==null){var i=Po();ru(r,t,1,i)}}),_M(t,1)}};WD=function(t){if(t.tag===13){var e=oh(t,134217728);if(e!==null){var n=Po();ru(e,t,134217728,n)}_M(t,134217728)}};IY=function(t){if(t.tag===13){var e=n0(t),n=oh(t,e);if(n!==null){var r=Po();ru(n,t,e,r)}_M(t,e)}};kY=function(){return Ur};RY=function(t,e){var n=Ur;try{return Ur=t,e()}finally{Ur=n}};LR=function(t,e,n){switch(e){case"input":if(PR(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=hS(r);if(!i)throw Error(tt(90));aY(r),PR(r,i)}}}break;case"textarea":lY(t,n);break;case"select":e=n.value,e!=null&&yy(t,!!n.multiple,e,!1)}};gY=wM;wY=Pg;var Lme={usingClientEntryPoint:!1,Events:[h6,ny,hS,pY,mY,wM]},I2={findFiberByHostInstance:Fm,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ume={bundleType:I2.bundleType,version:I2.version,rendererPackageName:I2.rendererPackageName,rendererConfig:I2.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Rh.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=bY(t),t===null?null:t.stateNode},findFiberByHostInstance:I2.findFiberByHostInstance||$me,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var U_=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!U_.isDisabled&&U_.supportsFiber)try{lS=U_.inject(Ume),sd=U_}catch{}}dc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Lme;dc.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!EM(e))throw Error(tt(200));return Bme(t,e,null,n)};dc.createRoot=function(t,e){if(!EM(t))throw Error(tt(299));var n=!1,r="",i=JQ;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=xM(t,1,!1,null,null,n,!1,r,i),t[sh]=e.current,e5(t.nodeType===8?t.parentNode:t),new AM(e)};dc.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(tt(188)):(t=Object.keys(t).join(","),Error(tt(268,t)));return t=bY(e),t=t===null?null:t.stateNode,t};dc.flushSync=function(t){return Pg(t)};dc.hydrate=function(t,e,n){if(!_S(e))throw Error(tt(200));return AS(null,t,e,!0,n)};dc.hydrateRoot=function(t,e,n){if(!EM(t))throw Error(tt(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=JQ;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=ZQ(e,null,t,1,n??null,i,!1,s,o),t[sh]=e.current,e5(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new xS(e)};dc.render=function(t,e,n){if(!_S(e))throw Error(tt(200));return AS(null,t,e,!1,n)};dc.unmountComponentAtNode=function(t){if(!_S(t))throw Error(tt(40));return t._reactRootContainer?(Pg(function(){AS(null,null,t,!1,function(){t._reactRootContainer=null,t[sh]=null})}),!0):!1};dc.unstable_batchedUpdates=wM;dc.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!_S(n))throw Error(tt(200));if(t==null||t._reactInternals===void 0)throw Error(tt(38));return AS(t,e,n,!1,r)};dc.version="18.3.1-next-f1338f8080-20240426";function XQ(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(XQ)}catch(t){console.error(t)}}XQ(),XK.exports=dc;var eZ=XK.exports;const ly=Qs(eZ);var hz=eZ;CR.createRoot=hz.createRoot,CR.hydrateRoot=hz.hydrateRoot;/**
 * @remix-run/router v1.19.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function l5(){return l5=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l5.apply(this,arguments)}var Hp;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Hp||(Hp={}));const pz="popstate";function Fme(t){t===void 0&&(t={});function e(r,i){let{pathname:s,search:o,hash:a}=r.location;return yN("",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:UE(i)}return Hme(e,n,null,t)}function ss(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function tZ(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function zme(){return Math.random().toString(36).substr(2,8)}function mz(t,e){return{usr:t.state,key:t.key,idx:e}}function yN(t,e,n,r){return n===void 0&&(n=null),l5({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?hb(e):e,{state:n,key:e&&e.key||r||zme()})}function UE(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function hb(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function Hme(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a=Hp.Pop,c=null,l=u();l==null&&(l=0,o.replaceState(l5({},o.state,{idx:l}),""));function u(){return(o.state||{idx:null}).idx}function d(){a=Hp.Pop;let _=u(),T=_==null?null:_-l;l=_,c&&c({action:a,location:v.location,delta:T})}function h(_,T){a=Hp.Push;let b=yN(v.location,_,T);l=u()+1;let k=mz(b,l),D=v.createHref(b);try{o.pushState(k,"",D)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(D)}s&&c&&c({action:a,location:v.location,delta:1})}function g(_,T){a=Hp.Replace;let b=yN(v.location,_,T);l=u();let k=mz(b,l),D=v.createHref(b);o.replaceState(k,"",D),s&&c&&c({action:a,location:v.location,delta:0})}function w(_){let T=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof _=="string"?_:UE(_);return b=b.replace(/ $/,"%20"),ss(T,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,T)}let v={get action(){return a},get location(){return t(i,o)},listen(_){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(pz,d),c=_,()=>{i.removeEventListener(pz,d),c=null}},createHref(_){return e(i,_)},createURL:w,encodeLocation(_){let T=w(_);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:h,replace:g,go(_){return o.go(_)}};return v}var gz;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(gz||(gz={}));function Wme(t,e,n){return n===void 0&&(n="/"),Vme(t,e,n,!1)}function Vme(t,e,n,r){let i=typeof e=="string"?hb(e):e,s=CM(i.pathname||"/",n);if(s==null)return null;let o=nZ(t);qme(o);let a=null;for(let c=0;a==null&&c<o.length;++c){let l=rge(s);a=tge(o[c],l,r)}return a}function nZ(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,a)=>{let c={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};c.relativePath.startsWith("/")&&(ss(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let l=i0([r,c.relativePath]),u=n.concat(c);s.children&&s.children.length>0&&(ss(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),nZ(s.children,e,u,l)),!(s.path==null&&!s.index)&&e.push({path:l,score:Xme(l,s.index),routesMeta:u})};return t.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let c of rZ(s.path))i(s,o,c)}),e}function rZ(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=rZ(r.join("/")),a=[];return a.push(...o.map(c=>c===""?s:[s,c].join("/"))),i&&a.push(...o),a.map(c=>t.startsWith("/")&&c===""?"/":c)}function qme(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:ege(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Gme=/^:[\w-]+$/,Kme=3,Yme=2,Qme=1,Zme=10,Jme=-2,wz=t=>t==="*";function Xme(t,e){let n=t.split("/"),r=n.length;return n.some(wz)&&(r+=Jme),e&&(r+=Yme),n.filter(i=>!wz(i)).reduce((i,s)=>i+(Gme.test(s)?Kme:s===""?Qme:Zme),r)}function ege(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function tge(t,e,n){let{routesMeta:r}=t,i={},s="/",o=[];for(let a=0;a<r.length;++a){let c=r[a],l=a===r.length-1,u=s==="/"?e:e.slice(s.length)||"/",d=yz({path:c.relativePath,caseSensitive:c.caseSensitive,end:l},u),h=c.route;if(!d&&l&&n&&!r[r.length-1].route.index&&(d=yz({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},u)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:i0([s,d.pathname]),pathnameBase:age(i0([s,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(s=i0([s,d.pathnameBase]))}return o}function yz(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=nge(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((l,u,d)=>{let{paramName:h,isOptional:g}=u;if(h==="*"){let v=a[d]||"";o=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const w=a[d];return g&&!w?l[h]=void 0:l[h]=(w||"").replace(/%2F/g,"/"),l},{}),pathname:s,pathnameBase:o,pattern:t}}function nge(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),tZ(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 r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,c)=>(r.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function rge(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return tZ(!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 CM(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function ige(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?hb(t):t;return{pathname:n?n.startsWith("/")?n:sge(n,e):e,search:cge(r),hash:lge(i)}}function sge(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function bI(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function oge(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function iZ(t,e){let n=oge(t);return e?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function sZ(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=hb(t):(i=l5({},t),ss(!i.pathname||!i.pathname.includes("?"),bI("?","pathname","search",i)),ss(!i.pathname||!i.pathname.includes("#"),bI("#","pathname","hash",i)),ss(!i.search||!i.search.includes("#"),bI("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let d=e.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),d-=1;i.pathname=h.join("/")}a=d>=0?e[d]:"/"}let c=ige(i,a),l=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(l||u)&&(c.pathname+="/"),c}const i0=t=>t.join("/").replace(/\/\/+/g,"/"),age=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),cge=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,lge=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function uge(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const oZ=["post","put","patch","delete"];new Set(oZ);const dge=["get",...oZ];new Set(dge);/**
 * React Router v6.26.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function u5(){return u5=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u5.apply(this,arguments)}const SM=ce.createContext(null),fge=ce.createContext(null),v1=ce.createContext(null),ES=ce.createContext(null),j0=ce.createContext({outlet:null,matches:[],isDataRoute:!1}),aZ=ce.createContext(null);function hge(t,e){let{relative:n}=e===void 0?{}:e;m6()||ss(!1);let{basename:r,navigator:i}=ce.useContext(v1),{hash:s,pathname:o,search:a}=uZ(t,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:i0([r,o])),i.createHref({pathname:c,search:a,hash:s})}function m6(){return ce.useContext(ES)!=null}function CS(){return m6()||ss(!1),ce.useContext(ES).location}function cZ(t){ce.useContext(v1).static||ce.useLayoutEffect(t)}function lZ(){let{isDataRoute:t}=ce.useContext(j0);return t?Tge():pge()}function pge(){m6()||ss(!1);let t=ce.useContext(SM),{basename:e,future:n,navigator:r}=ce.useContext(v1),{matches:i}=ce.useContext(j0),{pathname:s}=CS(),o=JSON.stringify(iZ(i,n.v7_relativeSplatPath)),a=ce.useRef(!1);return cZ(()=>{a.current=!0}),ce.useCallback(function(l,u){if(u===void 0&&(u={}),!a.current)return;if(typeof l=="number"){r.go(l);return}let d=sZ(l,JSON.parse(o),s,u.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:i0([e,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[e,r,o,s,t])}function mge(){let{matches:t}=ce.useContext(j0),e=t[t.length-1];return e?e.params:{}}function uZ(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=ce.useContext(v1),{matches:i}=ce.useContext(j0),{pathname:s}=CS(),o=JSON.stringify(iZ(i,r.v7_relativeSplatPath));return ce.useMemo(()=>sZ(t,JSON.parse(o),s,n==="path"),[t,o,s,n])}function gge(t,e){return wge(t,e)}function wge(t,e,n,r){m6()||ss(!1);let{navigator:i}=ce.useContext(v1),{matches:s}=ce.useContext(j0),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let l=CS(),u;if(e){var d;let _=typeof e=="string"?hb(e):e;c==="/"||(d=_.pathname)!=null&&d.startsWith(c)||ss(!1),u=_}else u=l;let h=u.pathname||"/",g=h;if(c!=="/"){let _=c.replace(/^\//,"").split("/");g="/"+h.replace(/^\//,"").split("/").slice(_.length).join("/")}let w=Wme(t,{pathname:g}),v=_ge(w&&w.map(_=>Object.assign({},_,{params:Object.assign({},a,_.params),pathname:i0([c,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?c:i0([c,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),s,n,r);return e&&v?ce.createElement(ES.Provider,{value:{location:u5({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Hp.Pop}},v):v}function yge(){let t=Sge(),e=uge(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return ce.createElement(ce.Fragment,null,ce.createElement("h2",null,"Unexpected Application Error!"),ce.createElement("h3",{style:{fontStyle:"italic"}},e),n?ce.createElement("pre",{style:i},n):null,null)}const vge=ce.createElement(yge,null);class bge extends ce.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,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?ce.createElement(j0.Provider,{value:this.props.routeContext},ce.createElement(aZ.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function xge(t){let{routeContext:e,match:n,children:r}=t,i=ce.useContext(SM);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),ce.createElement(j0.Provider,{value:e},r)}function _ge(t,e,n,r){var i;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var s;if(!n)return null;if(n.errors)t=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,a=(i=n)==null?void 0:i.errors;if(a!=null){let u=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||ss(!1),o=o.slice(0,Math.min(o.length,u+1))}let c=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<o.length;u++){let d=o[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(l=u),d.route.id){let{loaderData:h,errors:g}=n,w=d.route.loader&&h[d.route.id]===void 0&&(!g||g[d.route.id]===void 0);if(d.route.lazy||w){c=!0,l>=0?o=o.slice(0,l+1):o=[o[0]];break}}}return o.reduceRight((u,d,h)=>{let g,w=!1,v=null,_=null;n&&(g=a&&d.route.id?a[d.route.id]:void 0,v=d.route.errorElement||vge,c&&(l<0&&h===0?(w=!0,_=null):l===h&&(w=!0,_=d.route.hydrateFallbackElement||null)));let T=e.concat(o.slice(0,h+1)),b=()=>{let k;return g?k=v:w?k=_:d.route.Component?k=ce.createElement(d.route.Component,null):d.route.element?k=d.route.element:k=u,ce.createElement(xge,{match:d,routeContext:{outlet:u,matches:T,isDataRoute:n!=null},children:k})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?ce.createElement(bge,{location:n.location,revalidation:n.revalidation,component:v,error:g,children:b(),routeContext:{outlet:null,matches:T,isDataRoute:!0}}):b()},null)}var dZ=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(dZ||{}),FE=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}(FE||{});function Age(t){let e=ce.useContext(SM);return e||ss(!1),e}function Ege(t){let e=ce.useContext(fge);return e||ss(!1),e}function Cge(t){let e=ce.useContext(j0);return e||ss(!1),e}function fZ(t){let e=Cge(),n=e.matches[e.matches.length-1];return n.route.id||ss(!1),n.route.id}function Sge(){var t;let e=ce.useContext(aZ),n=Ege(FE.UseRouteError),r=fZ(FE.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function Tge(){let{router:t}=Age(dZ.UseNavigateStable),e=fZ(FE.UseNavigateStable),n=ce.useRef(!1);return cZ(()=>{n.current=!0}),ce.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,u5({fromRouteId:e},s)))},[t,e])}function $A(t){ss(!1)}function Ige(t){let{basename:e="/",children:n=null,location:r,navigationType:i=Hp.Pop,navigator:s,static:o=!1,future:a}=t;m6()&&ss(!1);let c=e.replace(/^\/*/,"/"),l=ce.useMemo(()=>({basename:c,navigator:s,static:o,future:u5({v7_relativeSplatPath:!1},a)}),[c,a,s,o]);typeof r=="string"&&(r=hb(r));let{pathname:u="/",search:d="",hash:h="",state:g=null,key:w="default"}=r,v=ce.useMemo(()=>{let _=CM(u,c);return _==null?null:{location:{pathname:_,search:d,hash:h,state:g,key:w},navigationType:i}},[c,u,d,h,g,w,i]);return v==null?null:ce.createElement(v1.Provider,{value:l},ce.createElement(ES.Provider,{children:n,value:v}))}function kge(t){let{children:e,location:n}=t;return gge(vN(e),n)}new Promise(()=>{});function vN(t,e){e===void 0&&(e=[]);let n=[];return ce.Children.forEach(t,(r,i)=>{if(!ce.isValidElement(r))return;let s=[...e,i];if(r.type===ce.Fragment){n.push.apply(n,vN(r.props.children,s));return}r.type!==$A&&ss(!1),!r.props.index||!r.props.children||ss(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=vN(r.props.children,s)),n.push(o)}),n}/**
 * React Router DOM v6.26.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function bN(){return bN=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},bN.apply(this,arguments)}function Rge(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Nge(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Pge(t,e){return t.button===0&&(!e||e==="_self")&&!Nge(t)}const Oge=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Dge="6";try{window.__reactRouterVersion=Dge}catch{}const Mge="startTransition",vz=Rpe[Mge];function Bge(t){let{basename:e,children:n,future:r,window:i}=t,s=ce.useRef();s.current==null&&(s.current=Fme({window:i,v5Compat:!0}));let o=s.current,[a,c]=ce.useState({action:o.action,location:o.location}),{v7_startTransition:l}=r||{},u=ce.useCallback(d=>{l&&vz?vz(()=>c(d)):c(d)},[c,l]);return ce.useLayoutEffect(()=>o.listen(u),[o,u]),ce.createElement(Ige,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const $ge=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",jge=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pr=ce.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:c,to:l,preventScrollReset:u,unstable_viewTransition:d}=e,h=Rge(e,Oge),{basename:g}=ce.useContext(v1),w,v=!1;if(typeof l=="string"&&jge.test(l)&&(w=l,$ge))try{let k=new URL(window.location.href),D=l.startsWith("//")?new URL(k.protocol+l):new URL(l),O=CM(D.pathname,g);D.origin===k.origin&&O!=null?l=O+D.search+D.hash:v=!0}catch{}let _=hge(l,{relative:i}),T=Lge(l,{replace:o,state:a,target:c,preventScrollReset:u,relative:i,unstable_viewTransition:d});function b(k){r&&r(k),k.defaultPrevented||T(k)}return ce.createElement("a",bN({},h,{href:w||_,onClick:v||s?r:b,ref:n,target:c}))});var bz;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(bz||(bz={}));var xz;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(xz||(xz={}));function Lge(t,e){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:a}=e===void 0?{}:e,c=lZ(),l=CS(),u=uZ(t,{relative:o});return ce.useCallback(d=>{if(Pge(d,n)){d.preventDefault();let h=r!==void 0?r:UE(l)===UE(u);c(t,{replace:h,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:a})}},[l,c,u,r,i,n,t,s,o,a])}let wp;function Uge(t){t&&(wp=t)}function Fge(){if(!wp)throw new Error('Please call "createWeb3Modal" before using "useWeb3Modal" hook');async function t(n){await(wp==null?void 0:wp.open(n))}async function e(){await(wp==null?void 0:wp.close())}return{open:t,close:e}}const zge="modulepreload",Hge=function(t){return"/"+t},_z={},Sa=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),o=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.all(n.map(a=>{if(a=Hge(a),a in _z)return;_z[a]=!0;const c=a.endsWith(".css"),l=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${l}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":zge,c||(u.as="script",u.crossOrigin=""),u.href=a,o&&u.setAttribute("nonce",o),document.head.appendChild(u),c)return new Promise((d,h)=>{u.addEventListener("load",d),u.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};var TM={exports:{}},Ey=typeof Reflect=="object"?Reflect:null,Az=Ey&&typeof Ey.apply=="function"?Ey.apply:function(e,n,r){return Function.prototype.apply.call(e,n,r)},jA;Ey&&typeof Ey.ownKeys=="function"?jA=Ey.ownKeys:Object.getOwnPropertySymbols?jA=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:jA=function(e){return Object.getOwnPropertyNames(e)};function Wge(t){console&&console.warn&&console.warn(t)}var hZ=Number.isNaN||function(e){return e!==e};function Wr(){Wr.init.call(this)}TM.exports=Wr;TM.exports.once=Kge;Wr.EventEmitter=Wr;Wr.prototype._events=void 0;Wr.prototype._eventsCount=0;Wr.prototype._maxListeners=void 0;var Ez=10;function SS(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Wr,"defaultMaxListeners",{enumerable:!0,get:function(){return Ez},set:function(t){if(typeof t!="number"||t<0||hZ(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");Ez=t}});Wr.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};Wr.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||hZ(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 pZ(t){return t._maxListeners===void 0?Wr.defaultMaxListeners:t._maxListeners}Wr.prototype.getMaxListeners=function(){return pZ(this)};Wr.prototype.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i=e==="error",s=this._events;if(s!==void 0)i=i&&s.error===void 0;else if(!i)return!1;if(i){var o;if(n.length>0&&(o=n[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=s[e];if(c===void 0)return!1;if(typeof c=="function")Az(c,this,n);else for(var l=c.length,u=vZ(c,l),r=0;r<l;++r)Az(u[r],this,n);return!0};function mZ(t,e,n,r){var i,s,o;if(SS(n),s=t._events,s===void 0?(s=t._events=Object.create(null),t._eventsCount=0):(s.newListener!==void 0&&(t.emit("newListener",e,n.listener?n.listener:n),s=t._events),o=s[e]),o===void 0)o=s[e]=n,++t._eventsCount;else if(typeof o=="function"?o=s[e]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),i=pZ(t),i>0&&o.length>i&&!o.warned){o.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=o.length,Wge(a)}return t}Wr.prototype.addListener=function(e,n){return mZ(this,e,n,!1)};Wr.prototype.on=Wr.prototype.addListener;Wr.prototype.prependListener=function(e,n){return mZ(this,e,n,!0)};function Vge(){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 gZ(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=Vge.bind(r);return i.listener=n,r.wrapFn=i,i}Wr.prototype.once=function(e,n){return SS(n),this.on(e,gZ(this,e,n)),this};Wr.prototype.prependOnceListener=function(e,n){return SS(n),this.prependListener(e,gZ(this,e,n)),this};Wr.prototype.removeListener=function(e,n){var r,i,s,o,a;if(SS(n),i=this._events,i===void 0)return this;if(r=i[e],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||n));else if(typeof r!="function"){for(s=-1,o=r.length-1;o>=0;o--)if(r[o]===n||r[o].listener===n){a=r[o].listener,s=o;break}if(s<0)return this;s===0?r.shift():qge(r,s),r.length===1&&(i[e]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",e,a||n)}return this};Wr.prototype.off=Wr.prototype.removeListener;Wr.prototype.removeAllListeners=function(e){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[e]),this;if(arguments.length===0){var s=Object.keys(r),o;for(i=0;i<s.length;++i)o=s[i],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=r[e],typeof n=="function")this.removeListener(e,n);else if(n!==void 0)for(i=n.length-1;i>=0;i--)this.removeListener(e,n[i]);return this};function wZ(t,e,n){var r=t._events;if(r===void 0)return[];var i=r[e];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?Gge(i):vZ(i,i.length)}Wr.prototype.listeners=function(e){return wZ(this,e,!0)};Wr.prototype.rawListeners=function(e){return wZ(this,e,!1)};Wr.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):yZ.call(t,e)};Wr.prototype.listenerCount=yZ;function yZ(t){var e=this._events;if(e!==void 0){var n=e[t];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}Wr.prototype.eventNames=function(){return this._eventsCount>0?jA(this._events):[]};function vZ(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function qge(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function Gge(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}function Kge(t,e){return new Promise(function(n,r){function i(o){t.removeListener(e,s),r(o)}function s(){typeof t.removeListener=="function"&&t.removeListener("error",i),n([].slice.call(arguments))}bZ(t,e,s,{once:!0}),e!=="error"&&Yge(t,i,{once:!0})})}function Yge(t,e,n){typeof t.on=="function"&&bZ(t,"error",e,n)}function bZ(t,e,n,r){if(typeof t.on=="function")r.once?t.once(e,n):t.on(e,n);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(s){r.once&&t.removeEventListener(e,i),n(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var hc=TM.exports;const IM=Qs(hc);var Cz=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))},Qge=function(){function t(e,n,r){this.name=e,this.version=n,this.os=r,this.type="browser"}return t}(),Zge=function(){function t(e){this.version=e,this.type="node",this.name="node",this.os=process.platform}return t}(),Jge=function(){function t(e,n,r,i){this.name=e,this.version=n,this.os=r,this.bot=i,this.type="bot-device"}return t}(),Xge=function(){function t(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return t}(),e1e=function(){function t(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return t}(),t1e=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,n1e=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Sz=3,r1e=[["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",t1e]],Tz=[["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 i1e(t){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new e1e:typeof navigator<"u"?o1e(navigator.userAgent):c1e()}function s1e(t){return t!==""&&r1e.reduce(function(e,n){var r=n[0],i=n[1];if(e)return e;var s=i.exec(t);return!!s&&[r,s]},!1)}function o1e(t){var e=s1e(t);if(!e)return null;var n=e[0],r=e[1];if(n==="searchbot")return new Xge;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<Sz&&(i=Cz(Cz([],i,!0),l1e(Sz-i.length),!0)):i=[];var s=i.join("."),o=a1e(t),a=n1e.exec(t);return a&&a[1]?new Jge(n,s,o,a[1]):new Qge(n,s,o)}function a1e(t){for(var e=0,n=Tz.length;e<n;e++){var r=Tz[e],i=r[0],s=r[1],o=s.exec(t);if(o)return i}return null}function c1e(){var t=typeof process<"u"&&process.version;return t?new Zge(process.version.slice(1)):null}function l1e(t){for(var e=[],n=0;n<t;n++)e.push("0");return e}var At={};/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var xN=function(t,e){return xN=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},xN(t,e)};function u1e(t,e){xN(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var _N=function(){return _N=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},_N.apply(this,arguments)};function d1e(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function f1e(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s}function h1e(t,e){return function(n,r){e(n,r,t)}}function p1e(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function m1e(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})}function g1e(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function w1e(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}function y1e(t,e){for(var n in t)n!=="default"&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function AN(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function xZ(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s}function v1e(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(xZ(arguments[e]));return t}function b1e(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,i++)r[i]=s[o];return r}function d5(t){return this instanceof d5?(this.v=t,this):new d5(t)}function x1e(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(h){r[h]&&(i[h]=function(g){return new Promise(function(w,v){s.push([h,g,w,v])>1||a(h,g)})})}function a(h,g){try{c(r[h](g))}catch(w){d(s[0][3],w)}}function c(h){h.value instanceof d5?Promise.resolve(h.value.v).then(l,u):d(s[0][2],h)}function l(h){a("next",h)}function u(h){a("throw",h)}function d(h,g){h(g),s.shift(),s.length&&a(s[0][0],s[0][1])}}function _1e(t){var e,n;return e={},r("next"),r("throw",function(i){throw i}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(i,s){e[i]=t[i]?function(o){return(n=!n)?{value:d5(t[i](o)),done:i==="return"}:s?s(o):o}:s}}function A1e(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof AN=="function"?AN(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=t[s]&&function(o){return new Promise(function(a,c){o=t[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(l){s({value:l,done:a})},o)}}function E1e(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function C1e(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function S1e(t){return t&&t.__esModule?t:{default:t}}function T1e(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function I1e(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}const k1e=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return _N},__asyncDelegator:_1e,__asyncGenerator:x1e,__asyncValues:A1e,__await:d5,__awaiter:m1e,__classPrivateFieldGet:T1e,__classPrivateFieldSet:I1e,__createBinding:w1e,__decorate:f1e,__exportStar:y1e,__extends:u1e,__generator:g1e,__importDefault:S1e,__importStar:C1e,__makeTemplateObject:E1e,__metadata:p1e,__param:h1e,__read:xZ,__rest:d1e,__spread:v1e,__spreadArrays:b1e,__values:AN},Symbol.toStringTag,{value:"Module"})),g6=RD(k1e);var xI={},k2={},Iz;function R1e(){if(Iz)return k2;Iz=1,Object.defineProperty(k2,"__esModule",{value:!0}),k2.delay=void 0;function t(e){return new Promise(n=>{setTimeout(()=>{n(!0)},e)})}return k2.delay=t,k2}var Em={},_I={},Cm={},kz;function N1e(){return kz||(kz=1,Object.defineProperty(Cm,"__esModule",{value:!0}),Cm.ONE_THOUSAND=Cm.ONE_HUNDRED=void 0,Cm.ONE_HUNDRED=100,Cm.ONE_THOUSAND=1e3),Cm}var AI={},Rz;function P1e(){return Rz||(Rz=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}(AI)),AI}var Nz;function _Z(){return Nz||(Nz=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=g6;e.__exportStar(N1e(),t),e.__exportStar(P1e(),t)}(_I)),_I}var Pz;function O1e(){if(Pz)return Em;Pz=1,Object.defineProperty(Em,"__esModule",{value:!0}),Em.fromMiliseconds=Em.toMiliseconds=void 0;const t=_Z();function e(r){return r*t.ONE_THOUSAND}Em.toMiliseconds=e;function n(r){return Math.floor(r/t.ONE_THOUSAND)}return Em.fromMiliseconds=n,Em}var Oz;function D1e(){return Oz||(Oz=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=g6;e.__exportStar(R1e(),t),e.__exportStar(O1e(),t)}(xI)),xI}var _w={},Dz;function M1e(){if(Dz)return _w;Dz=1,Object.defineProperty(_w,"__esModule",{value:!0}),_w.Watch=void 0;class t{constructor(){this.timestamps=new Map}start(n){if(this.timestamps.has(n))throw new Error(`Watch already started for label: ${n}`);this.timestamps.set(n,{started:Date.now()})}stop(n){const r=this.get(n);if(typeof r.elapsed<"u")throw new Error(`Watch already stopped for label: ${n}`);const i=Date.now()-r.started;this.timestamps.set(n,{started:r.started,elapsed:i})}get(n){const r=this.timestamps.get(n);if(typeof r>"u")throw new Error(`No timestamp found for label: ${n}`);return r}elapsed(n){const r=this.get(n);return r.elapsed||Date.now()-r.started}}return _w.Watch=t,_w.default=t,_w}var EI={},R2={},Mz;function B1e(){if(Mz)return R2;Mz=1,Object.defineProperty(R2,"__esModule",{value:!0}),R2.IWatch=void 0;class t{}return R2.IWatch=t,R2}var Bz;function $1e(){return Bz||(Bz=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),g6.__exportStar(B1e(),t)}(EI)),EI}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=g6;e.__exportStar(D1e(),t),e.__exportStar(M1e(),t),e.__exportStar($1e(),t),e.__exportStar(_Z(),t)})(At);var ti={};Object.defineProperty(ti,"__esModule",{value:!0});ti.getLocalStorage=ti.getLocalStorageOrThrow=ti.getCrypto=ti.getCryptoOrThrow=AZ=ti.getLocation=ti.getLocationOrThrow=RM=ti.getNavigator=ti.getNavigatorOrThrow=kM=ti.getDocument=ti.getDocumentOrThrow=ti.getFromWindowOrThrow=ti.getFromWindow=void 0;function b1(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}ti.getFromWindow=b1;function pb(t){const e=b1(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}ti.getFromWindowOrThrow=pb;function j1e(){return pb("document")}ti.getDocumentOrThrow=j1e;function L1e(){return b1("document")}var kM=ti.getDocument=L1e;function U1e(){return pb("navigator")}ti.getNavigatorOrThrow=U1e;function F1e(){return b1("navigator")}var RM=ti.getNavigator=F1e;function z1e(){return pb("location")}ti.getLocationOrThrow=z1e;function H1e(){return b1("location")}var AZ=ti.getLocation=H1e;function W1e(){return pb("crypto")}ti.getCryptoOrThrow=W1e;function V1e(){return b1("crypto")}ti.getCrypto=V1e;function q1e(){return pb("localStorage")}ti.getLocalStorageOrThrow=q1e;function G1e(){return b1("localStorage")}ti.getLocalStorage=G1e;var NM={};Object.defineProperty(NM,"__esModule",{value:!0});var EZ=NM.getWindowMetadata=void 0;const $z=ti;function K1e(){let t,e;try{t=$z.getDocumentOrThrow(),e=$z.getLocationOrThrow()}catch{return null}function n(){const d=t.getElementsByTagName("link"),h=[];for(let g=0;g<d.length;g++){const w=d[g],v=w.getAttribute("rel");if(v&&v.toLowerCase().indexOf("icon")>-1){const _=w.getAttribute("href");if(_)if(_.toLowerCase().indexOf("https:")===-1&&_.toLowerCase().indexOf("http:")===-1&&_.indexOf("//")!==0){let T=e.protocol+"//"+e.host;if(_.indexOf("/")===0)T+=_;else{const b=e.pathname.split("/");b.pop();const k=b.join("/");T+=k+"/"+_}h.push(T)}else if(_.indexOf("//")===0){const T=e.protocol+_;h.push(T)}else h.push(_)}}return h}function r(...d){const h=t.getElementsByTagName("meta");for(let g=0;g<h.length;g++){const w=h[g],v=["itemprop","property","name"].map(_=>w.getAttribute(_)).filter(_=>_?d.includes(_):!1);if(v.length&&v){const _=w.getAttribute("content");if(_)return _}}return""}function i(){let d=r("name","og:site_name","og:title","twitter:title");return d||(d=t.title),d}function s(){return r("description","og:description","twitter:description","keywords")}const o=i(),a=s(),c=e.origin,l=n();return{description:a,url:c,icons:l,name:o}}EZ=NM.getWindowMetadata=K1e;var f5={},Y1e=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),CZ="%[a-f0-9]{2}",jz=new RegExp("("+CZ+")|([^%]+?)","gi"),Lz=new RegExp("("+CZ+")+","gi");function EN(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],EN(n),EN(r))}function Q1e(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(jz)||[],n=1;n<e.length;n++)t=EN(e,n).join(""),e=t.match(jz)||[];return t}}function Z1e(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},n=Lz.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch{var r=Q1e(n[0]);r!==n[0]&&(e[n[0]]=r)}n=Lz.exec(t)}e["%C2"]="�";for(var i=Object.keys(e),s=0;s<i.length;s++){var o=i[s];t=t.replace(new RegExp(o,"g"),e[o])}return t}var J1e=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 Z1e(t)}},X1e=(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 n=t.indexOf(e);return n===-1?[t]:[t.slice(0,n),t.slice(n+e.length)]},ewe=function(t,e){for(var n={},r=Object.keys(t),i=Array.isArray(e),s=0;s<r.length;s++){var o=r[s],a=t[o];(i?e.indexOf(o)!==-1:e(o,a,t))&&(n[o]=a)}return n};(function(t){const e=Y1e,n=J1e,r=X1e,i=ewe,s=b=>b==null,o=Symbol("encodeFragmentIdentifier");function a(b){switch(b.arrayFormat){case"index":return k=>(D,O)=>{const $=D.length;return O===void 0||b.skipNull&&O===null||b.skipEmptyString&&O===""?D:O===null?[...D,[u(k,b),"[",$,"]"].join("")]:[...D,[u(k,b),"[",u($,b),"]=",u(O,b)].join("")]};case"bracket":return k=>(D,O)=>O===void 0||b.skipNull&&O===null||b.skipEmptyString&&O===""?D:O===null?[...D,[u(k,b),"[]"].join("")]:[...D,[u(k,b),"[]=",u(O,b)].join("")];case"colon-list-separator":return k=>(D,O)=>O===void 0||b.skipNull&&O===null||b.skipEmptyString&&O===""?D:O===null?[...D,[u(k,b),":list="].join("")]:[...D,[u(k,b),":list=",u(O,b)].join("")];case"comma":case"separator":case"bracket-separator":{const k=b.arrayFormat==="bracket-separator"?"[]=":"=";return D=>(O,$)=>$===void 0||b.skipNull&&$===null||b.skipEmptyString&&$===""?O:($=$===null?"":$,O.length===0?[[u(D,b),k,u($,b)].join("")]:[[O,u($,b)].join(b.arrayFormatSeparator)])}default:return k=>(D,O)=>O===void 0||b.skipNull&&O===null||b.skipEmptyString&&O===""?D:O===null?[...D,u(k,b)]:[...D,[u(k,b),"=",u(O,b)].join("")]}}function c(b){let k;switch(b.arrayFormat){case"index":return(D,O,$)=>{if(k=/\[(\d*)\]$/.exec(D),D=D.replace(/\[\d*\]$/,""),!k){$[D]=O;return}$[D]===void 0&&($[D]={}),$[D][k[1]]=O};case"bracket":return(D,O,$)=>{if(k=/(\[\])$/.exec(D),D=D.replace(/\[\]$/,""),!k){$[D]=O;return}if($[D]===void 0){$[D]=[O];return}$[D]=[].concat($[D],O)};case"colon-list-separator":return(D,O,$)=>{if(k=/(:list)$/.exec(D),D=D.replace(/:list$/,""),!k){$[D]=O;return}if($[D]===void 0){$[D]=[O];return}$[D]=[].concat($[D],O)};case"comma":case"separator":return(D,O,$)=>{const C=typeof O=="string"&&O.includes(b.arrayFormatSeparator),A=typeof O=="string"&&!C&&d(O,b).includes(b.arrayFormatSeparator);O=A?d(O,b):O;const H=C||A?O.split(b.arrayFormatSeparator).map(V=>d(V,b)):O===null?O:d(O,b);$[D]=H};case"bracket-separator":return(D,O,$)=>{const C=/(\[\])$/.test(D);if(D=D.replace(/\[\]$/,""),!C){$[D]=O&&d(O,b);return}const A=O===null?[]:O.split(b.arrayFormatSeparator).map(H=>d(H,b));if($[D]===void 0){$[D]=A;return}$[D]=[].concat($[D],A)};default:return(D,O,$)=>{if($[D]===void 0){$[D]=O;return}$[D]=[].concat($[D],O)}}}function l(b){if(typeof b!="string"||b.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function u(b,k){return k.encode?k.strict?e(b):encodeURIComponent(b):b}function d(b,k){return k.decode?n(b):b}function h(b){return Array.isArray(b)?b.sort():typeof b=="object"?h(Object.keys(b)).sort((k,D)=>Number(k)-Number(D)).map(k=>b[k]):b}function g(b){const k=b.indexOf("#");return k!==-1&&(b=b.slice(0,k)),b}function w(b){let k="";const D=b.indexOf("#");return D!==-1&&(k=b.slice(D)),k}function v(b){b=g(b);const k=b.indexOf("?");return k===-1?"":b.slice(k+1)}function _(b,k){return k.parseNumbers&&!Number.isNaN(Number(b))&&typeof b=="string"&&b.trim()!==""?b=Number(b):k.parseBooleans&&b!==null&&(b.toLowerCase()==="true"||b.toLowerCase()==="false")&&(b=b.toLowerCase()==="true"),b}function T(b,k){k=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},k),l(k.arrayFormatSeparator);const D=c(k),O=Object.create(null);if(typeof b!="string"||(b=b.trim().replace(/^[?#&]/,""),!b))return O;for(const $ of b.split("&")){if($==="")continue;let[C,A]=r(k.decode?$.replace(/\+/g," "):$,"=");A=A===void 0?null:["comma","separator","bracket-separator"].includes(k.arrayFormat)?A:d(A,k),D(d(C,k),A,O)}for(const $ of Object.keys(O)){const C=O[$];if(typeof C=="object"&&C!==null)for(const A of Object.keys(C))C[A]=_(C[A],k);else O[$]=_(C,k)}return k.sort===!1?O:(k.sort===!0?Object.keys(O).sort():Object.keys(O).sort(k.sort)).reduce(($,C)=>{const A=O[C];return A&&typeof A=="object"&&!Array.isArray(A)?$[C]=h(A):$[C]=A,$},Object.create(null))}t.extract=v,t.parse=T,t.stringify=(b,k)=>{if(!b)return"";k=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},k),l(k.arrayFormatSeparator);const D=A=>k.skipNull&&s(b[A])||k.skipEmptyString&&b[A]==="",O=a(k),$={};for(const A of Object.keys(b))D(A)||($[A]=b[A]);const C=Object.keys($);return k.sort!==!1&&C.sort(k.sort),C.map(A=>{const H=b[A];return H===void 0?"":H===null?u(A,k):Array.isArray(H)?H.length===0&&k.arrayFormat==="bracket-separator"?u(A,k)+"[]":H.reduce(O(A),[]).join("&"):u(A,k)+"="+u(H,k)}).filter(A=>A.length>0).join("&")},t.parseUrl=(b,k)=>{k=Object.assign({decode:!0},k);const[D,O]=r(b,"#");return Object.assign({url:D.split("?")[0]||"",query:T(v(b),k)},k&&k.parseFragmentIdentifier&&O?{fragmentIdentifier:d(O,k)}:{})},t.stringifyUrl=(b,k)=>{k=Object.assign({encode:!0,strict:!0,[o]:!0},k);const D=g(b.url).split("?")[0]||"",O=t.extract(b.url),$=t.parse(O,{sort:!1}),C=Object.assign($,b.query);let A=t.stringify(C,k);A&&(A=`?${A}`);let H=w(b.url);return b.fragmentIdentifier&&(H=`#${k[o]?u(b.fragmentIdentifier,k):b.fragmentIdentifier}`),`${D}${A}${H}`},t.pick=(b,k,D)=>{D=Object.assign({parseFragmentIdentifier:!0,[o]:!1},D);const{url:O,query:$,fragmentIdentifier:C}=t.parseUrl(b,D);return t.stringifyUrl({url:O,query:i($,k),fragmentIdentifier:C},D)},t.exclude=(b,k,D)=>{const O=Array.isArray(k)?$=>!k.includes($):($,C)=>!k($,C);return t.pick(b,O,D)}})(f5);var PM={},TS={},Dn={},SZ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(a,c){var l=a>>>16&65535,u=a&65535,d=c>>>16&65535,h=c&65535;return u*h+(l*h+u*d<<16>>>0)|0}t.mul=Math.imul||e;function n(a,c){return a+c|0}t.add=n;function r(a,c){return a-c|0}t.sub=r;function i(a,c){return a<<c|a>>>32-c}t.rotl=i;function s(a,c){return a<<32-c|a>>>c}t.rotr=s;function o(a){return typeof a=="number"&&isFinite(a)&&Math.floor(a)===a}t.isInteger=Number.isInteger||o,t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(a){return t.isInteger(a)&&a>=-t.MAX_SAFE_INTEGER&&a<=t.MAX_SAFE_INTEGER}})(SZ);Object.defineProperty(Dn,"__esModule",{value:!0});var TZ=SZ;function twe(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}Dn.readInt16BE=twe;function nwe(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}Dn.readUint16BE=nwe;function rwe(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}Dn.readInt16LE=rwe;function iwe(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}Dn.readUint16LE=iwe;function IZ(t,e,n){return e===void 0&&(e=new Uint8Array(2)),n===void 0&&(n=0),e[n+0]=t>>>8,e[n+1]=t>>>0,e}Dn.writeUint16BE=IZ;Dn.writeInt16BE=IZ;function kZ(t,e,n){return e===void 0&&(e=new Uint8Array(2)),n===void 0&&(n=0),e[n+0]=t>>>0,e[n+1]=t>>>8,e}Dn.writeUint16LE=kZ;Dn.writeInt16LE=kZ;function CN(t,e){return e===void 0&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}Dn.readInt32BE=CN;function SN(t,e){return e===void 0&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}Dn.readUint32BE=SN;function TN(t,e){return e===void 0&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}Dn.readInt32LE=TN;function IN(t,e){return e===void 0&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}Dn.readUint32LE=IN;function zE(t,e,n){return e===void 0&&(e=new Uint8Array(4)),n===void 0&&(n=0),e[n+0]=t>>>24,e[n+1]=t>>>16,e[n+2]=t>>>8,e[n+3]=t>>>0,e}Dn.writeUint32BE=zE;Dn.writeInt32BE=zE;function HE(t,e,n){return e===void 0&&(e=new Uint8Array(4)),n===void 0&&(n=0),e[n+0]=t>>>0,e[n+1]=t>>>8,e[n+2]=t>>>16,e[n+3]=t>>>24,e}Dn.writeUint32LE=HE;Dn.writeInt32LE=HE;function swe(t,e){e===void 0&&(e=0);var n=CN(t,e),r=CN(t,e+4);return n*4294967296+r-(r>>31)*4294967296}Dn.readInt64BE=swe;function owe(t,e){e===void 0&&(e=0);var n=SN(t,e),r=SN(t,e+4);return n*4294967296+r}Dn.readUint64BE=owe;function awe(t,e){e===void 0&&(e=0);var n=TN(t,e),r=TN(t,e+4);return r*4294967296+n-(n>>31)*4294967296}Dn.readInt64LE=awe;function cwe(t,e){e===void 0&&(e=0);var n=IN(t,e),r=IN(t,e+4);return r*4294967296+n}Dn.readUint64LE=cwe;function RZ(t,e,n){return e===void 0&&(e=new Uint8Array(8)),n===void 0&&(n=0),zE(t/4294967296>>>0,e,n),zE(t>>>0,e,n+4),e}Dn.writeUint64BE=RZ;Dn.writeInt64BE=RZ;function NZ(t,e,n){return e===void 0&&(e=new Uint8Array(8)),n===void 0&&(n=0),HE(t>>>0,e,n),HE(t/4294967296>>>0,e,n+4),e}Dn.writeUint64LE=NZ;Dn.writeInt64LE=NZ;function lwe(t,e,n){if(n===void 0&&(n=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,s=t/8+n-1;s>=n;s--)r+=e[s]*i,i*=256;return r}Dn.readUintBE=lwe;function uwe(t,e,n){if(n===void 0&&(n=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,s=n;s<n+t/8;s++)r+=e[s]*i,i*=256;return r}Dn.readUintLE=uwe;function dwe(t,e,n,r){if(n===void 0&&(n=new Uint8Array(t/8)),r===void 0&&(r=0),t%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!TZ.isSafeInteger(e))throw new Error("writeUintBE value must be an integer");for(var i=1,s=t/8+r-1;s>=r;s--)n[s]=e/i&255,i*=256;return n}Dn.writeUintBE=dwe;function fwe(t,e,n,r){if(n===void 0&&(n=new Uint8Array(t/8)),r===void 0&&(r=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!TZ.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var i=1,s=r;s<r+t/8;s++)n[s]=e/i&255,i*=256;return n}Dn.writeUintLE=fwe;function hwe(t,e){e===void 0&&(e=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat32(e)}Dn.readFloat32BE=hwe;function pwe(t,e){e===void 0&&(e=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat32(e,!0)}Dn.readFloat32LE=pwe;function mwe(t,e){e===void 0&&(e=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat64(e)}Dn.readFloat64BE=mwe;function gwe(t,e){e===void 0&&(e=0);var n=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.getFloat64(e,!0)}Dn.readFloat64LE=gwe;function wwe(t,e,n){e===void 0&&(e=new Uint8Array(4)),n===void 0&&(n=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.setFloat32(n,t),e}Dn.writeFloat32BE=wwe;function ywe(t,e,n){e===void 0&&(e=new Uint8Array(4)),n===void 0&&(n=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.setFloat32(n,t,!0),e}Dn.writeFloat32LE=ywe;function vwe(t,e,n){e===void 0&&(e=new Uint8Array(8)),n===void 0&&(n=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.setFloat64(n,t),e}Dn.writeFloat64BE=vwe;function bwe(t,e,n){e===void 0&&(e=new Uint8Array(8)),n===void 0&&(n=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.setFloat64(n,t,!0),e}Dn.writeFloat64LE=bwe;var pc={};Object.defineProperty(pc,"__esModule",{value:!0});function xwe(t){for(var e=0;e<t.length;e++)t[e]=0;return t}pc.wipe=xwe;Object.defineProperty(TS,"__esModule",{value:!0});var io=Dn,kN=pc,_we=20;function Awe(t,e,n){for(var r=1634760805,i=857760878,s=2036477234,o=1797285236,a=n[3]<<24|n[2]<<16|n[1]<<8|n[0],c=n[7]<<24|n[6]<<16|n[5]<<8|n[4],l=n[11]<<24|n[10]<<16|n[9]<<8|n[8],u=n[15]<<24|n[14]<<16|n[13]<<8|n[12],d=n[19]<<24|n[18]<<16|n[17]<<8|n[16],h=n[23]<<24|n[22]<<16|n[21]<<8|n[20],g=n[27]<<24|n[26]<<16|n[25]<<8|n[24],w=n[31]<<24|n[30]<<16|n[29]<<8|n[28],v=e[3]<<24|e[2]<<16|e[1]<<8|e[0],_=e[7]<<24|e[6]<<16|e[5]<<8|e[4],T=e[11]<<24|e[10]<<16|e[9]<<8|e[8],b=e[15]<<24|e[14]<<16|e[13]<<8|e[12],k=r,D=i,O=s,$=o,C=a,A=c,H=l,V=u,Y=d,ee=h,x=g,E=w,y=v,I=_,B=T,M=b,W=0;W<_we;W+=2)k=k+C|0,y^=k,y=y>>>16|y<<16,Y=Y+y|0,C^=Y,C=C>>>20|C<<12,D=D+A|0,I^=D,I=I>>>16|I<<16,ee=ee+I|0,A^=ee,A=A>>>20|A<<12,O=O+H|0,B^=O,B=B>>>16|B<<16,x=x+B|0,H^=x,H=H>>>20|H<<12,$=$+V|0,M^=$,M=M>>>16|M<<16,E=E+M|0,V^=E,V=V>>>20|V<<12,O=O+H|0,B^=O,B=B>>>24|B<<8,x=x+B|0,H^=x,H=H>>>25|H<<7,$=$+V|0,M^=$,M=M>>>24|M<<8,E=E+M|0,V^=E,V=V>>>25|V<<7,D=D+A|0,I^=D,I=I>>>24|I<<8,ee=ee+I|0,A^=ee,A=A>>>25|A<<7,k=k+C|0,y^=k,y=y>>>24|y<<8,Y=Y+y|0,C^=Y,C=C>>>25|C<<7,k=k+A|0,M^=k,M=M>>>16|M<<16,x=x+M|0,A^=x,A=A>>>20|A<<12,D=D+H|0,y^=D,y=y>>>16|y<<16,E=E+y|0,H^=E,H=H>>>20|H<<12,O=O+V|0,I^=O,I=I>>>16|I<<16,Y=Y+I|0,V^=Y,V=V>>>20|V<<12,$=$+C|0,B^=$,B=B>>>16|B<<16,ee=ee+B|0,C^=ee,C=C>>>20|C<<12,O=O+V|0,I^=O,I=I>>>24|I<<8,Y=Y+I|0,V^=Y,V=V>>>25|V<<7,$=$+C|0,B^=$,B=B>>>24|B<<8,ee=ee+B|0,C^=ee,C=C>>>25|C<<7,D=D+H|0,y^=D,y=y>>>24|y<<8,E=E+y|0,H^=E,H=H>>>25|H<<7,k=k+A|0,M^=k,M=M>>>24|M<<8,x=x+M|0,A^=x,A=A>>>25|A<<7;io.writeUint32LE(k+r|0,t,0),io.writeUint32LE(D+i|0,t,4),io.writeUint32LE(O+s|0,t,8),io.writeUint32LE($+o|0,t,12),io.writeUint32LE(C+a|0,t,16),io.writeUint32LE(A+c|0,t,20),io.writeUint32LE(H+l|0,t,24),io.writeUint32LE(V+u|0,t,28),io.writeUint32LE(Y+d|0,t,32),io.writeUint32LE(ee+h|0,t,36),io.writeUint32LE(x+g|0,t,40),io.writeUint32LE(E+w|0,t,44),io.writeUint32LE(y+v|0,t,48),io.writeUint32LE(I+_|0,t,52),io.writeUint32LE(B+T|0,t,56),io.writeUint32LE(M+b|0,t,60)}function PZ(t,e,n,r,i){if(i===void 0&&(i=0),t.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(r.length<n.length)throw new Error("ChaCha: destination is shorter than source");var s,o;if(i===0){if(e.length!==8&&e.length!==12)throw new Error("ChaCha nonce must be 8 or 12 bytes");s=new Uint8Array(16),o=s.length-e.length,s.set(e,o)}else{if(e.length!==16)throw new Error("ChaCha nonce with counter must be 16 bytes");s=e,o=i}for(var a=new Uint8Array(64),c=0;c<n.length;c+=64){Awe(a,s,t);for(var l=c;l<c+64&&l<n.length;l++)r[l]=n[l]^a[l-c];Cwe(s,0,o)}return kN.wipe(a),i===0&&kN.wipe(s),r}TS.streamXOR=PZ;function Ewe(t,e,n,r){return r===void 0&&(r=0),kN.wipe(n),PZ(t,e,n,n,r)}TS.stream=Ewe;function Cwe(t,e,n){for(var r=1;n--;)r=r+(t[e]&255)|0,t[e]=r&255,r>>>=8,e++;if(r>0)throw new Error("ChaCha: counter overflow")}var OZ={},L0={};Object.defineProperty(L0,"__esModule",{value:!0});function Swe(t,e,n){return~(t-1)&e|t-1&n}L0.select=Swe;function Twe(t,e){return(t|0)-(e|0)-1>>>31&1}L0.lessOrEqual=Twe;function DZ(t,e){if(t.length!==e.length)return 0;for(var n=0,r=0;r<t.length;r++)n|=t[r]^e[r];return 1&n-1>>>8}L0.compare=DZ;function Iwe(t,e){return t.length===0||e.length===0?!1:DZ(t,e)!==0}L0.equal=Iwe;(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=L0,n=pc;t.DIGEST_LENGTH=16;var r=function(){function o(a){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=a[0]|a[1]<<8;this._r[0]=c&8191;var l=a[2]|a[3]<<8;this._r[1]=(c>>>13|l<<3)&8191;var u=a[4]|a[5]<<8;this._r[2]=(l>>>10|u<<6)&7939;var d=a[6]|a[7]<<8;this._r[3]=(u>>>7|d<<9)&8191;var h=a[8]|a[9]<<8;this._r[4]=(d>>>4|h<<12)&255,this._r[5]=h>>>1&8190;var g=a[10]|a[11]<<8;this._r[6]=(h>>>14|g<<2)&8191;var w=a[12]|a[13]<<8;this._r[7]=(g>>>11|w<<5)&8065;var v=a[14]|a[15]<<8;this._r[8]=(w>>>8|v<<8)&8191,this._r[9]=v>>>5&127,this._pad[0]=a[16]|a[17]<<8,this._pad[1]=a[18]|a[19]<<8,this._pad[2]=a[20]|a[21]<<8,this._pad[3]=a[22]|a[23]<<8,this._pad[4]=a[24]|a[25]<<8,this._pad[5]=a[26]|a[27]<<8,this._pad[6]=a[28]|a[29]<<8,this._pad[7]=a[30]|a[31]<<8}return o.prototype._blocks=function(a,c,l){for(var u=this._fin?0:2048,d=this._h[0],h=this._h[1],g=this._h[2],w=this._h[3],v=this._h[4],_=this._h[5],T=this._h[6],b=this._h[7],k=this._h[8],D=this._h[9],O=this._r[0],$=this._r[1],C=this._r[2],A=this._r[3],H=this._r[4],V=this._r[5],Y=this._r[6],ee=this._r[7],x=this._r[8],E=this._r[9];l>=16;){var y=a[c+0]|a[c+1]<<8;d+=y&8191;var I=a[c+2]|a[c+3]<<8;h+=(y>>>13|I<<3)&8191;var B=a[c+4]|a[c+5]<<8;g+=(I>>>10|B<<6)&8191;var M=a[c+6]|a[c+7]<<8;w+=(B>>>7|M<<9)&8191;var W=a[c+8]|a[c+9]<<8;v+=(M>>>4|W<<12)&8191,_+=W>>>1&8191;var z=a[c+10]|a[c+11]<<8;T+=(W>>>14|z<<2)&8191;var P=a[c+12]|a[c+13]<<8;b+=(z>>>11|P<<5)&8191;var Z=a[c+14]|a[c+15]<<8;k+=(P>>>8|Z<<8)&8191,D+=Z>>>5|u;var he=0,ve=he;ve+=d*O,ve+=h*(5*E),ve+=g*(5*x),ve+=w*(5*ee),ve+=v*(5*Y),he=ve>>>13,ve&=8191,ve+=_*(5*V),ve+=T*(5*H),ve+=b*(5*A),ve+=k*(5*C),ve+=D*(5*$),he+=ve>>>13,ve&=8191;var j=he;j+=d*$,j+=h*O,j+=g*(5*E),j+=w*(5*x),j+=v*(5*ee),he=j>>>13,j&=8191,j+=_*(5*Y),j+=T*(5*V),j+=b*(5*H),j+=k*(5*A),j+=D*(5*C),he+=j>>>13,j&=8191;var ge=he;ge+=d*C,ge+=h*$,ge+=g*O,ge+=w*(5*E),ge+=v*(5*x),he=ge>>>13,ge&=8191,ge+=_*(5*ee),ge+=T*(5*Y),ge+=b*(5*V),ge+=k*(5*H),ge+=D*(5*A),he+=ge>>>13,ge&=8191;var te=he;te+=d*A,te+=h*C,te+=g*$,te+=w*O,te+=v*(5*E),he=te>>>13,te&=8191,te+=_*(5*x),te+=T*(5*ee),te+=b*(5*Y),te+=k*(5*V),te+=D*(5*H),he+=te>>>13,te&=8191;var ae=he;ae+=d*H,ae+=h*A,ae+=g*C,ae+=w*$,ae+=v*O,he=ae>>>13,ae&=8191,ae+=_*(5*E),ae+=T*(5*x),ae+=b*(5*ee),ae+=k*(5*Y),ae+=D*(5*V),he+=ae>>>13,ae&=8191;var se=he;se+=d*V,se+=h*H,se+=g*A,se+=w*C,se+=v*$,he=se>>>13,se&=8191,se+=_*O,se+=T*(5*E),se+=b*(5*x),se+=k*(5*ee),se+=D*(5*Y),he+=se>>>13,se&=8191;var L=he;L+=d*Y,L+=h*V,L+=g*H,L+=w*A,L+=v*C,he=L>>>13,L&=8191,L+=_*$,L+=T*O,L+=b*(5*E),L+=k*(5*x),L+=D*(5*ee),he+=L>>>13,L&=8191;var re=he;re+=d*ee,re+=h*Y,re+=g*V,re+=w*H,re+=v*A,he=re>>>13,re&=8191,re+=_*C,re+=T*$,re+=b*O,re+=k*(5*E),re+=D*(5*x),he+=re>>>13,re&=8191;var be=he;be+=d*x,be+=h*ee,be+=g*Y,be+=w*V,be+=v*H,he=be>>>13,be&=8191,be+=_*A,be+=T*C,be+=b*$,be+=k*O,be+=D*(5*E),he+=be>>>13,be&=8191;var Se=he;Se+=d*E,Se+=h*x,Se+=g*ee,Se+=w*Y,Se+=v*V,he=Se>>>13,Se&=8191,Se+=_*H,Se+=T*A,Se+=b*C,Se+=k*$,Se+=D*O,he+=Se>>>13,Se&=8191,he=(he<<2)+he|0,he=he+ve|0,ve=he&8191,he=he>>>13,j+=he,d=ve,h=j,g=ge,w=te,v=ae,_=se,T=L,b=re,k=be,D=Se,c+=16,l-=16}this._h[0]=d,this._h[1]=h,this._h[2]=g,this._h[3]=w,this._h[4]=v,this._h[5]=_,this._h[6]=T,this._h[7]=b,this._h[8]=k,this._h[9]=D},o.prototype.finish=function(a,c){c===void 0&&(c=0);var l=new Uint16Array(10),u,d,h,g;if(this._leftover){for(g=this._leftover,this._buffer[g++]=1;g<16;g++)this._buffer[g]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(u=this._h[1]>>>13,this._h[1]&=8191,g=2;g<10;g++)this._h[g]+=u,u=this._h[g]>>>13,this._h[g]&=8191;for(this._h[0]+=u*5,u=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=u,u=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=u,l[0]=this._h[0]+5,u=l[0]>>>13,l[0]&=8191,g=1;g<10;g++)l[g]=this._h[g]+u,u=l[g]>>>13,l[g]&=8191;for(l[9]-=8192,d=(u^1)-1,g=0;g<10;g++)l[g]&=d;for(d=~d,g=0;g<10;g++)this._h[g]=this._h[g]&d|l[g];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,h=this._h[0]+this._pad[0],this._h[0]=h&65535,g=1;g<8;g++)h=(this._h[g]+this._pad[g]|0)+(h>>>16)|0,this._h[g]=h&65535;return a[c+0]=this._h[0]>>>0,a[c+1]=this._h[0]>>>8,a[c+2]=this._h[1]>>>0,a[c+3]=this._h[1]>>>8,a[c+4]=this._h[2]>>>0,a[c+5]=this._h[2]>>>8,a[c+6]=this._h[3]>>>0,a[c+7]=this._h[3]>>>8,a[c+8]=this._h[4]>>>0,a[c+9]=this._h[4]>>>8,a[c+10]=this._h[5]>>>0,a[c+11]=this._h[5]>>>8,a[c+12]=this._h[6]>>>0,a[c+13]=this._h[6]>>>8,a[c+14]=this._h[7]>>>0,a[c+15]=this._h[7]>>>8,this._finished=!0,this},o.prototype.update=function(a){var c=0,l=a.length,u;if(this._leftover){u=16-this._leftover,u>l&&(u=l);for(var d=0;d<u;d++)this._buffer[this._leftover+d]=a[c+d];if(l-=u,c+=u,this._leftover+=u,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(l>=16&&(u=l-l%16,this._blocks(a,c,u),c+=u,l-=u),l){for(var d=0;d<l;d++)this._buffer[this._leftover+d]=a[c+d];this._leftover+=l}return this},o.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var a=new Uint8Array(16);return this.finish(a),a},o.prototype.clean=function(){return n.wipe(this._buffer),n.wipe(this._r),n.wipe(this._h),n.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},o}();t.Poly1305=r;function i(o,a){var c=new r(o);c.update(a);var l=c.digest();return c.clean(),l}t.oneTimeAuth=i;function s(o,a){return o.length!==t.DIGEST_LENGTH||a.length!==t.DIGEST_LENGTH?!1:e.equal(o,a)}t.equal=s})(OZ);(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=TS,n=OZ,r=pc,i=Dn,s=L0;t.KEY_LENGTH=32,t.NONCE_LENGTH=12,t.TAG_LENGTH=16;var o=new Uint8Array(16),a=function(){function c(l){if(this.nonceLength=t.NONCE_LENGTH,this.tagLength=t.TAG_LENGTH,l.length!==t.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(l)}return c.prototype.seal=function(l,u,d,h){if(l.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var g=new Uint8Array(16);g.set(l,g.length-l.length);var w=new Uint8Array(32);e.stream(this._key,g,w,4);var v=u.length+this.tagLength,_;if(h){if(h.length!==v)throw new Error("ChaCha20Poly1305: incorrect destination length");_=h}else _=new Uint8Array(v);return e.streamXOR(this._key,g,u,_,4),this._authenticate(_.subarray(_.length-this.tagLength,_.length),w,_.subarray(0,_.length-this.tagLength),d),r.wipe(g),_},c.prototype.open=function(l,u,d,h){if(l.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(u.length<this.tagLength)return null;var g=new Uint8Array(16);g.set(l,g.length-l.length);var w=new Uint8Array(32);e.stream(this._key,g,w,4);var v=new Uint8Array(this.tagLength);if(this._authenticate(v,w,u.subarray(0,u.length-this.tagLength),d),!s.equal(v,u.subarray(u.length-this.tagLength,u.length)))return null;var _=u.length-this.tagLength,T;if(h){if(h.length!==_)throw new Error("ChaCha20Poly1305: incorrect destination length");T=h}else T=new Uint8Array(_);return e.streamXOR(this._key,g,u.subarray(0,u.length-this.tagLength),T,4),r.wipe(g),T},c.prototype.clean=function(){return r.wipe(this._key),this},c.prototype._authenticate=function(l,u,d,h){var g=new n.Poly1305(u);h&&(g.update(h),h.length%16>0&&g.update(o.subarray(h.length%16))),g.update(d),d.length%16>0&&g.update(o.subarray(d.length%16));var w=new Uint8Array(8);h&&i.writeUint64LE(h.length,w),g.update(w),i.writeUint64LE(d.length,w),g.update(w);for(var v=g.digest(),_=0;_<v.length;_++)l[_]=v[_];g.clean(),r.wipe(v),r.wipe(w)},c}();t.ChaCha20Poly1305=a})(PM);var MZ={},w6={},OM={};Object.defineProperty(OM,"__esModule",{value:!0});function kwe(t){return typeof t.saveState<"u"&&typeof t.restoreState<"u"&&typeof t.cleanSavedState<"u"}OM.isSerializableHash=kwe;Object.defineProperty(w6,"__esModule",{value:!0});var Mu=OM,Rwe=L0,Nwe=pc,BZ=function(){function t(e,n){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var r=new Uint8Array(this.blockSize);n.length>this.blockSize?this._inner.update(n).finish(r).clean():r.set(n);for(var i=0;i<r.length;i++)r[i]^=54;this._inner.update(r);for(var i=0;i<r.length;i++)r[i]^=106;this._outer.update(r),Mu.isSerializableHash(this._inner)&&Mu.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),Nwe.wipe(r)}return t.prototype.reset=function(){if(!Mu.isSerializableHash(this._inner)||!Mu.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(){Mu.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),Mu.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(!Mu.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(!Mu.isSerializableHash(this._inner)||!Mu.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(!Mu.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},t}();w6.HMAC=BZ;function Pwe(t,e,n){var r=new BZ(t,e);r.update(n);var i=r.digest();return r.clean(),i}w6.hmac=Pwe;w6.equal=Rwe.equal;Object.defineProperty(MZ,"__esModule",{value:!0});var Uz=w6,Fz=pc,Owe=function(){function t(e,n,r,i){r===void 0&&(r=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=i;var s=Uz.hmac(this._hash,r,n);this._hmac=new Uz.HMAC(e,s),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 n=new Uint8Array(e),r=0;r<n.length;r++)this._bufpos===this._buffer.length&&this._fillBuffer(),n[r]=this._buffer[this._bufpos++];return n},t.prototype.clean=function(){this._hmac.clean(),Fz.wipe(this._buffer),Fz.wipe(this._counter),this._bufpos=0},t}(),Dwe=MZ.HKDF=Owe,mb={},IS={},kS={};Object.defineProperty(kS,"__esModule",{value:!0});kS.BrowserRandomSource=void 0;const zz=65536;class Mwe{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 n=new Uint8Array(e);for(let r=0;r<n.length;r+=zz)this._crypto.getRandomValues(n.subarray(r,r+Math.min(n.length-r,zz)));return n}}kS.BrowserRandomSource=Mwe;function Bwe(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 RS={};const $we={},jwe=Object.freeze(Object.defineProperty({__proto__:null,default:$we},Symbol.toStringTag,{value:"Module"})),Lwe=RD(jwe);Object.defineProperty(RS,"__esModule",{value:!0});RS.NodeRandomSource=void 0;const Uwe=pc;class Fwe{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof Bwe<"u"){const e=Lwe;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 n=this._crypto.randomBytes(e);if(n.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const r=new Uint8Array(e);for(let i=0;i<r.length;i++)r[i]=n[i];return(0,Uwe.wipe)(n),r}}RS.NodeRandomSource=Fwe;Object.defineProperty(IS,"__esModule",{value:!0});IS.SystemRandomSource=void 0;const zwe=kS,Hwe=RS;class Wwe{constructor(){if(this.isAvailable=!1,this.name="",this._source=new zwe.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new Hwe.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)}}IS.SystemRandomSource=Wwe;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.randomStringForEntropy=t.randomString=t.randomUint32=t.randomBytes=t.defaultRandomSource=void 0;const e=IS,n=Dn,r=pc;t.defaultRandomSource=new e.SystemRandomSource;function i(l,u=t.defaultRandomSource){return u.randomBytes(l)}t.randomBytes=i;function s(l=t.defaultRandomSource){const u=i(4,l),d=(0,n.readUint32LE)(u);return(0,r.wipe)(u),d}t.randomUint32=s;const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function a(l,u=o,d=t.defaultRandomSource){if(u.length<2)throw new Error("randomString charset is too short");if(u.length>256)throw new Error("randomString charset is too long");let h="";const g=u.length,w=256-256%g;for(;l>0;){const v=i(Math.ceil(l*256/w),d);for(let _=0;_<v.length&&l>0;_++){const T=v[_];T<w&&(h+=u.charAt(T%g),l--)}(0,r.wipe)(v)}return h}t.randomString=a;function c(l,u=o,d=t.defaultRandomSource){const h=Math.ceil(l/(Math.log(u.length)/Math.LN2));return a(h,u,d)}t.randomStringForEntropy=c})(mb);var NS={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Dn,n=pc;t.DIGEST_LENGTH=32,t.BLOCK_SIZE=64;var r=function(){function a(){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 a.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},a.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},a.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._temp),this.reset()},a.prototype.update=function(c,l){if(l===void 0&&(l=c.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var u=0;if(this._bytesHashed+=l,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&l>0;)this._buffer[this._bufferLength++]=c[u++],l--;this._bufferLength===this.blockSize&&(s(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(l>=this.blockSize&&(u=s(this._temp,this._state,c,u,l),l%=this.blockSize);l>0;)this._buffer[this._bufferLength++]=c[u++],l--;return this},a.prototype.finish=function(c){if(!this._finished){var l=this._bytesHashed,u=this._bufferLength,d=l/536870912|0,h=l<<3,g=l%64<56?64:128;this._buffer[u]=128;for(var w=u+1;w<g-8;w++)this._buffer[w]=0;e.writeUint32BE(d,this._buffer,g-8),e.writeUint32BE(h,this._buffer,g-4),s(this._temp,this._state,this._buffer,0,g),this._finished=!0}for(var w=0;w<this.digestLength/4;w++)e.writeUint32BE(this._state[w],c,w*4);return this},a.prototype.digest=function(){var c=new Uint8Array(this.digestLength);return this.finish(c),c},a.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}},a.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},a.prototype.cleanSavedState=function(c){n.wipe(c.state),c.buffer&&n.wipe(c.buffer),c.bufferLength=0,c.bytesHashed=0},a}();t.SHA256=r;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 s(a,c,l,u,d){for(;d>=64;){for(var h=c[0],g=c[1],w=c[2],v=c[3],_=c[4],T=c[5],b=c[6],k=c[7],D=0;D<16;D++){var O=u+D*4;a[D]=e.readUint32BE(l,O)}for(var D=16;D<64;D++){var $=a[D-2],C=($>>>17|$<<15)^($>>>19|$<<13)^$>>>10;$=a[D-15];var A=($>>>7|$<<25)^($>>>18|$<<14)^$>>>3;a[D]=(C+a[D-7]|0)+(A+a[D-16]|0)}for(var D=0;D<64;D++){var C=(((_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7))+(_&T^~_&b)|0)+(k+(i[D]+a[D]|0)|0)|0,A=((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+(h&g^h&w^g&w)|0;k=b,b=T,T=_,_=v+C|0,v=w,w=g,g=h,h=C+A|0}c[0]+=h,c[1]+=g,c[2]+=w,c[3]+=v,c[4]+=_,c[5]+=T,c[6]+=b,c[7]+=k,u+=64,d-=64}return u}function o(a){var c=new r;c.update(a);var l=c.digest();return c.clean(),l}t.hash=o})(NS);var DM={};(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=mb,n=pc;t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=32,t.SHARED_KEY_LENGTH=32;function r(D){const O=new Float64Array(16);if(D)for(let $=0;$<D.length;$++)O[$]=D[$];return O}const i=new Uint8Array(32);i[0]=9;const s=r([56129,1]);function o(D){let O=1;for(let $=0;$<16;$++){let C=D[$]+O+65535;O=Math.floor(C/65536),D[$]=C-O*65536}D[0]+=O-1+37*(O-1)}function a(D,O,$){const C=~($-1);for(let A=0;A<16;A++){const H=C&(D[A]^O[A]);D[A]^=H,O[A]^=H}}function c(D,O){const $=r(),C=r();for(let A=0;A<16;A++)C[A]=O[A];o(C),o(C),o(C);for(let A=0;A<2;A++){$[0]=C[0]-65517;for(let V=1;V<15;V++)$[V]=C[V]-65535-($[V-1]>>16&1),$[V-1]&=65535;$[15]=C[15]-32767-($[14]>>16&1);const H=$[15]>>16&1;$[14]&=65535,a(C,$,1-H)}for(let A=0;A<16;A++)D[2*A]=C[A]&255,D[2*A+1]=C[A]>>8}function l(D,O){for(let $=0;$<16;$++)D[$]=O[2*$]+(O[2*$+1]<<8);D[15]&=32767}function u(D,O,$){for(let C=0;C<16;C++)D[C]=O[C]+$[C]}function d(D,O,$){for(let C=0;C<16;C++)D[C]=O[C]-$[C]}function h(D,O,$){let C,A,H=0,V=0,Y=0,ee=0,x=0,E=0,y=0,I=0,B=0,M=0,W=0,z=0,P=0,Z=0,he=0,ve=0,j=0,ge=0,te=0,ae=0,se=0,L=0,re=0,be=0,Se=0,Ie=0,Ue=0,lt=0,je=0,Vt=0,vt=0,ut=$[0],ft=$[1],He=$[2],ct=$[3],Gt=$[4],ot=$[5],qe=$[6],X=$[7],U=$[8],G=$[9],ie=$[10],fe=$[11],we=$[12],Re=$[13],Ge=$[14],nt=$[15];C=O[0],H+=C*ut,V+=C*ft,Y+=C*He,ee+=C*ct,x+=C*Gt,E+=C*ot,y+=C*qe,I+=C*X,B+=C*U,M+=C*G,W+=C*ie,z+=C*fe,P+=C*we,Z+=C*Re,he+=C*Ge,ve+=C*nt,C=O[1],V+=C*ut,Y+=C*ft,ee+=C*He,x+=C*ct,E+=C*Gt,y+=C*ot,I+=C*qe,B+=C*X,M+=C*U,W+=C*G,z+=C*ie,P+=C*fe,Z+=C*we,he+=C*Re,ve+=C*Ge,j+=C*nt,C=O[2],Y+=C*ut,ee+=C*ft,x+=C*He,E+=C*ct,y+=C*Gt,I+=C*ot,B+=C*qe,M+=C*X,W+=C*U,z+=C*G,P+=C*ie,Z+=C*fe,he+=C*we,ve+=C*Re,j+=C*Ge,ge+=C*nt,C=O[3],ee+=C*ut,x+=C*ft,E+=C*He,y+=C*ct,I+=C*Gt,B+=C*ot,M+=C*qe,W+=C*X,z+=C*U,P+=C*G,Z+=C*ie,he+=C*fe,ve+=C*we,j+=C*Re,ge+=C*Ge,te+=C*nt,C=O[4],x+=C*ut,E+=C*ft,y+=C*He,I+=C*ct,B+=C*Gt,M+=C*ot,W+=C*qe,z+=C*X,P+=C*U,Z+=C*G,he+=C*ie,ve+=C*fe,j+=C*we,ge+=C*Re,te+=C*Ge,ae+=C*nt,C=O[5],E+=C*ut,y+=C*ft,I+=C*He,B+=C*ct,M+=C*Gt,W+=C*ot,z+=C*qe,P+=C*X,Z+=C*U,he+=C*G,ve+=C*ie,j+=C*fe,ge+=C*we,te+=C*Re,ae+=C*Ge,se+=C*nt,C=O[6],y+=C*ut,I+=C*ft,B+=C*He,M+=C*ct,W+=C*Gt,z+=C*ot,P+=C*qe,Z+=C*X,he+=C*U,ve+=C*G,j+=C*ie,ge+=C*fe,te+=C*we,ae+=C*Re,se+=C*Ge,L+=C*nt,C=O[7],I+=C*ut,B+=C*ft,M+=C*He,W+=C*ct,z+=C*Gt,P+=C*ot,Z+=C*qe,he+=C*X,ve+=C*U,j+=C*G,ge+=C*ie,te+=C*fe,ae+=C*we,se+=C*Re,L+=C*Ge,re+=C*nt,C=O[8],B+=C*ut,M+=C*ft,W+=C*He,z+=C*ct,P+=C*Gt,Z+=C*ot,he+=C*qe,ve+=C*X,j+=C*U,ge+=C*G,te+=C*ie,ae+=C*fe,se+=C*we,L+=C*Re,re+=C*Ge,be+=C*nt,C=O[9],M+=C*ut,W+=C*ft,z+=C*He,P+=C*ct,Z+=C*Gt,he+=C*ot,ve+=C*qe,j+=C*X,ge+=C*U,te+=C*G,ae+=C*ie,se+=C*fe,L+=C*we,re+=C*Re,be+=C*Ge,Se+=C*nt,C=O[10],W+=C*ut,z+=C*ft,P+=C*He,Z+=C*ct,he+=C*Gt,ve+=C*ot,j+=C*qe,ge+=C*X,te+=C*U,ae+=C*G,se+=C*ie,L+=C*fe,re+=C*we,be+=C*Re,Se+=C*Ge,Ie+=C*nt,C=O[11],z+=C*ut,P+=C*ft,Z+=C*He,he+=C*ct,ve+=C*Gt,j+=C*ot,ge+=C*qe,te+=C*X,ae+=C*U,se+=C*G,L+=C*ie,re+=C*fe,be+=C*we,Se+=C*Re,Ie+=C*Ge,Ue+=C*nt,C=O[12],P+=C*ut,Z+=C*ft,he+=C*He,ve+=C*ct,j+=C*Gt,ge+=C*ot,te+=C*qe,ae+=C*X,se+=C*U,L+=C*G,re+=C*ie,be+=C*fe,Se+=C*we,Ie+=C*Re,Ue+=C*Ge,lt+=C*nt,C=O[13],Z+=C*ut,he+=C*ft,ve+=C*He,j+=C*ct,ge+=C*Gt,te+=C*ot,ae+=C*qe,se+=C*X,L+=C*U,re+=C*G,be+=C*ie,Se+=C*fe,Ie+=C*we,Ue+=C*Re,lt+=C*Ge,je+=C*nt,C=O[14],he+=C*ut,ve+=C*ft,j+=C*He,ge+=C*ct,te+=C*Gt,ae+=C*ot,se+=C*qe,L+=C*X,re+=C*U,be+=C*G,Se+=C*ie,Ie+=C*fe,Ue+=C*we,lt+=C*Re,je+=C*Ge,Vt+=C*nt,C=O[15],ve+=C*ut,j+=C*ft,ge+=C*He,te+=C*ct,ae+=C*Gt,se+=C*ot,L+=C*qe,re+=C*X,be+=C*U,Se+=C*G,Ie+=C*ie,Ue+=C*fe,lt+=C*we,je+=C*Re,Vt+=C*Ge,vt+=C*nt,H+=38*j,V+=38*ge,Y+=38*te,ee+=38*ae,x+=38*se,E+=38*L,y+=38*re,I+=38*be,B+=38*Se,M+=38*Ie,W+=38*Ue,z+=38*lt,P+=38*je,Z+=38*Vt,he+=38*vt,A=1,C=H+A+65535,A=Math.floor(C/65536),H=C-A*65536,C=V+A+65535,A=Math.floor(C/65536),V=C-A*65536,C=Y+A+65535,A=Math.floor(C/65536),Y=C-A*65536,C=ee+A+65535,A=Math.floor(C/65536),ee=C-A*65536,C=x+A+65535,A=Math.floor(C/65536),x=C-A*65536,C=E+A+65535,A=Math.floor(C/65536),E=C-A*65536,C=y+A+65535,A=Math.floor(C/65536),y=C-A*65536,C=I+A+65535,A=Math.floor(C/65536),I=C-A*65536,C=B+A+65535,A=Math.floor(C/65536),B=C-A*65536,C=M+A+65535,A=Math.floor(C/65536),M=C-A*65536,C=W+A+65535,A=Math.floor(C/65536),W=C-A*65536,C=z+A+65535,A=Math.floor(C/65536),z=C-A*65536,C=P+A+65535,A=Math.floor(C/65536),P=C-A*65536,C=Z+A+65535,A=Math.floor(C/65536),Z=C-A*65536,C=he+A+65535,A=Math.floor(C/65536),he=C-A*65536,C=ve+A+65535,A=Math.floor(C/65536),ve=C-A*65536,H+=A-1+37*(A-1),A=1,C=H+A+65535,A=Math.floor(C/65536),H=C-A*65536,C=V+A+65535,A=Math.floor(C/65536),V=C-A*65536,C=Y+A+65535,A=Math.floor(C/65536),Y=C-A*65536,C=ee+A+65535,A=Math.floor(C/65536),ee=C-A*65536,C=x+A+65535,A=Math.floor(C/65536),x=C-A*65536,C=E+A+65535,A=Math.floor(C/65536),E=C-A*65536,C=y+A+65535,A=Math.floor(C/65536),y=C-A*65536,C=I+A+65535,A=Math.floor(C/65536),I=C-A*65536,C=B+A+65535,A=Math.floor(C/65536),B=C-A*65536,C=M+A+65535,A=Math.floor(C/65536),M=C-A*65536,C=W+A+65535,A=Math.floor(C/65536),W=C-A*65536,C=z+A+65535,A=Math.floor(C/65536),z=C-A*65536,C=P+A+65535,A=Math.floor(C/65536),P=C-A*65536,C=Z+A+65535,A=Math.floor(C/65536),Z=C-A*65536,C=he+A+65535,A=Math.floor(C/65536),he=C-A*65536,C=ve+A+65535,A=Math.floor(C/65536),ve=C-A*65536,H+=A-1+37*(A-1),D[0]=H,D[1]=V,D[2]=Y,D[3]=ee,D[4]=x,D[5]=E,D[6]=y,D[7]=I,D[8]=B,D[9]=M,D[10]=W,D[11]=z,D[12]=P,D[13]=Z,D[14]=he,D[15]=ve}function g(D,O){h(D,O,O)}function w(D,O){const $=r();for(let C=0;C<16;C++)$[C]=O[C];for(let C=253;C>=0;C--)g($,$),C!==2&&C!==4&&h($,$,O);for(let C=0;C<16;C++)D[C]=$[C]}function v(D,O){const $=new Uint8Array(32),C=new Float64Array(80),A=r(),H=r(),V=r(),Y=r(),ee=r(),x=r();for(let B=0;B<31;B++)$[B]=D[B];$[31]=D[31]&127|64,$[0]&=248,l(C,O);for(let B=0;B<16;B++)H[B]=C[B];A[0]=Y[0]=1;for(let B=254;B>=0;--B){const M=$[B>>>3]>>>(B&7)&1;a(A,H,M),a(V,Y,M),u(ee,A,V),d(A,A,V),u(V,H,Y),d(H,H,Y),g(Y,ee),g(x,A),h(A,V,A),h(V,H,ee),u(ee,A,V),d(A,A,V),g(H,A),d(V,Y,x),h(A,V,s),u(A,A,Y),h(V,V,A),h(A,Y,x),h(Y,H,C),g(H,ee),a(A,H,M),a(V,Y,M)}for(let B=0;B<16;B++)C[B+16]=A[B],C[B+32]=V[B],C[B+48]=H[B],C[B+64]=Y[B];const E=C.subarray(32),y=C.subarray(16);w(E,E),h(y,y,E);const I=new Uint8Array(32);return c(I,y),I}t.scalarMult=v;function _(D){return v(D,i)}t.scalarMultBase=_;function T(D){if(D.length!==t.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${t.SECRET_KEY_LENGTH} bytes`);const O=new Uint8Array(D);return{publicKey:_(O),secretKey:O}}t.generateKeyPairFromSeed=T;function b(D){const O=(0,e.randomBytes)(32,D),$=T(O);return(0,n.wipe)(O),$}t.generateKeyPair=b;function k(D,O,$=!1){if(D.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(O.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const C=v(D,O);if($){let A=0;for(let H=0;H<C.length;H++)A|=C[H];if(A===0)throw new Error("X25519: invalid shared key")}return C}t.sharedKey=k})(DM);function $Z(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(t):new Uint8Array(t)}function RN(t,e){e||(e=t.reduce((i,s)=>i+s.length,0));const n=$Z(e);let r=0;for(const i of t)n.set(i,r),r+=i.length;return n}function Vwe(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(n[o]!==255)throw new TypeError(s+" is ambiguous");n[o]=i}var a=t.length,c=t.charAt(0),l=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function d(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,_=0,T=0,b=w.length;T!==b&&w[T]===0;)T++,v++;for(var k=(b-T)*u+1>>>0,D=new Uint8Array(k);T!==b;){for(var O=w[T],$=0,C=k-1;(O!==0||$<_)&&C!==-1;C--,$++)O+=256*D[C]>>>0,D[C]=O%a>>>0,O=O/a>>>0;if(O!==0)throw new Error("Non-zero carry");_=$,T++}for(var A=k-_;A!==k&&D[A]===0;)A++;for(var H=c.repeat(v);A<k;++A)H+=t.charAt(D[A]);return H}function h(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 _=0,T=0;w[v]===c;)_++,v++;for(var b=(w.length-v)*l+1>>>0,k=new Uint8Array(b);w[v];){var D=n[w.charCodeAt(v)];if(D===255)return;for(var O=0,$=b-1;(D!==0||O<T)&&$!==-1;$--,O++)D+=a*k[$]>>>0,k[$]=D%256>>>0,D=D/256>>>0;if(D!==0)throw new Error("Non-zero carry");T=O,v++}if(w[v]!==" "){for(var C=b-T;C!==b&&k[C]===0;)C++;for(var A=new Uint8Array(_+(b-C)),H=_;C!==b;)A[H++]=k[C++];return A}}}function g(w){var v=h(w);if(v)return v;throw new Error(`Non-${e} character`)}return{encode:d,decodeUnsafe:h,decode:g}}var qwe=Vwe,Gwe=qwe;const Kwe=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")},Ywe=t=>new TextEncoder().encode(t),Qwe=t=>new TextDecoder().decode(t);class Zwe{constructor(e,n,r){this.name=e,this.prefix=n,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class Jwe{constructor(e,n,r){if(this.name=e,this.prefix=n,n.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=r}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 jZ(this,e)}}class Xwe{constructor(e){this.decoders=e}or(e){return jZ(this,e)}decode(e){const n=e[0],r=this.decoders[n];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const jZ=(t,e)=>new Xwe({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class eye{constructor(e,n,r,i){this.name=e,this.prefix=n,this.baseEncode=r,this.baseDecode=i,this.encoder=new Zwe(e,n,r),this.decoder=new Jwe(e,n,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const PS=({name:t,prefix:e,encode:n,decode:r})=>new eye(t,e,n,r),y6=({prefix:t,name:e,alphabet:n})=>{const{encode:r,decode:i}=Gwe(n,e);return PS({prefix:t,name:e,encode:r,decode:s=>Kwe(i(s))})},tye=(t,e,n,r)=>{const i={};for(let u=0;u<e.length;++u)i[e[u]]=u;let s=t.length;for(;t[s-1]==="=";)--s;const o=new Uint8Array(s*n/8|0);let a=0,c=0,l=0;for(let u=0;u<s;++u){const d=i[t[u]];if(d===void 0)throw new SyntaxError(`Non-${r} character`);c=c<<n|d,a+=n,a>=8&&(a-=8,o[l++]=255&c>>a)}if(a>=n||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o},nye=(t,e,n)=>{const r=e[e.length-1]==="=",i=(1<<n)-1;let s="",o=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],o+=8;o>n;)o-=n,s+=e[i&a>>o];if(o&&(s+=e[i&a<<n-o]),r)for(;s.length*n&7;)s+="=";return s},Zs=({name:t,prefix:e,bitsPerChar:n,alphabet:r})=>PS({prefix:e,name:t,encode(i){return nye(i,r,n)},decode(i){return tye(i,r,n,t)}}),rye=PS({prefix:"\0",name:"identity",encode:t=>Qwe(t),decode:t=>Ywe(t)}),iye=Object.freeze(Object.defineProperty({__proto__:null,identity:rye},Symbol.toStringTag,{value:"Module"})),sye=Zs({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),oye=Object.freeze(Object.defineProperty({__proto__:null,base2:sye},Symbol.toStringTag,{value:"Module"})),aye=Zs({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),cye=Object.freeze(Object.defineProperty({__proto__:null,base8:aye},Symbol.toStringTag,{value:"Module"})),lye=y6({prefix:"9",name:"base10",alphabet:"0123456789"}),uye=Object.freeze(Object.defineProperty({__proto__:null,base10:lye},Symbol.toStringTag,{value:"Module"})),dye=Zs({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),fye=Zs({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),hye=Object.freeze(Object.defineProperty({__proto__:null,base16:dye,base16upper:fye},Symbol.toStringTag,{value:"Module"})),pye=Zs({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),mye=Zs({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),gye=Zs({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),wye=Zs({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),yye=Zs({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),vye=Zs({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),bye=Zs({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),xye=Zs({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),_ye=Zs({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Aye=Object.freeze(Object.defineProperty({__proto__:null,base32:pye,base32hex:yye,base32hexpad:bye,base32hexpadupper:xye,base32hexupper:vye,base32pad:gye,base32padupper:wye,base32upper:mye,base32z:_ye},Symbol.toStringTag,{value:"Module"})),Eye=y6({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Cye=y6({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),Sye=Object.freeze(Object.defineProperty({__proto__:null,base36:Eye,base36upper:Cye},Symbol.toStringTag,{value:"Module"})),Tye=y6({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Iye=y6({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),kye=Object.freeze(Object.defineProperty({__proto__:null,base58btc:Tye,base58flickr:Iye},Symbol.toStringTag,{value:"Module"})),Rye=Zs({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Nye=Zs({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Pye=Zs({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Oye=Zs({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Dye=Object.freeze(Object.defineProperty({__proto__:null,base64:Rye,base64pad:Nye,base64url:Pye,base64urlpad:Oye},Symbol.toStringTag,{value:"Module"})),LZ=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Mye=LZ.reduce((t,e,n)=>(t[n]=e,t),[]),Bye=LZ.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);function $ye(t){return t.reduce((e,n)=>(e+=Mye[n],e),"")}function jye(t){const e=[];for(const n of t){const r=Bye[n.codePointAt(0)];if(r===void 0)throw new Error(`Non-base256emoji character: ${n}`);e.push(r)}return new Uint8Array(e)}const Lye=PS({prefix:"🚀",name:"base256emoji",encode:$ye,decode:jye}),Uye=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:Lye},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const Hz={...iye,...oye,...cye,...uye,...hye,...Aye,...Sye,...kye,...Dye,...Uye};function UZ(t,e,n,r){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:r}}}const Wz=UZ("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),CI=UZ("ascii","a",t=>{let e="a";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e},t=>{t=t.substring(1);const e=$Z(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}),FZ={utf8:Wz,"utf-8":Wz,hex:Hz.base16,latin1:CI,ascii:CI,binary:CI,...Hz};function va(t,e="utf8"){const n=FZ[e];if(!n)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t,"utf8"):n.decoder.decode(`${n.prefix}${t}`)}function Do(t,e="utf8"){const n=FZ[e];if(!n)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"):n.encoder.encode(t).substring(1)}const Fye={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe",batchFetchMessages:"waku_batchFetchMessages"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe",batchFetchMessages:"irn_batchFetchMessages"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe",batchFetchMessages:"iridium_batchFetchMessages"}},MM=":";function I3(t){const[e,n]=t.split(MM);return{namespace:e,reference:n}}function zye(t){const{namespace:e,reference:n}=t;return[e,n].join(MM)}function Hye(t){const[e,n,r]=t.split(MM);return{namespace:e,reference:n,address:r}}function Wye(t,e){const n=[];return t.forEach(r=>{const i=e(r);n.includes(i)||n.push(i)}),n}function Vye(t){const{namespace:e,reference:n}=Hye(t);return zye({namespace:e,reference:n})}function qye(t){return Wye(t,Vye)}function Vz(t,e=[]){const n=[];return Object.keys(t).forEach(r=>{if(e.length&&!e.includes(r))return;const i=t[r];n.push(...i.accounts)}),n}function zZ(t,e){return t.includes(":")?[t]:e.chains||[]}var Gye=Object.defineProperty,qz=Object.getOwnPropertySymbols,Kye=Object.prototype.hasOwnProperty,Yye=Object.prototype.propertyIsEnumerable,Gz=(t,e,n)=>e in t?Gye(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Kz=(t,e)=>{for(var n in e||(e={}))Kye.call(e,n)&&Gz(t,n,e[n]);if(qz)for(var n of qz(e))Yye.call(e,n)&&Gz(t,n,e[n]);return t};const Qye="ReactNative",Qa={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},Zye="js";function h5(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function gb(){return!kM()&&!!RM()&&navigator.product===Qye}function wb(){return!h5()&&!!RM()&&!!kM()}function v6(){return gb()?Qa.reactNative:h5()?Qa.node:wb()?Qa.browser:Qa.unknown}function Jye(){var t;try{return gb()&&typeof global<"u"&&typeof(global==null?void 0:global.Application)<"u"?(t=global.Application)==null?void 0:t.applicationId:void 0}catch{return}}function Xye(t,e){let n=f5.parse(t);return n=Kz(Kz({},n),e),t=f5.stringify(n),t}function eve(){return EZ()||{name:"",description:"",url:"",icons:[""]}}function tve(){if(v6()===Qa.reactNative&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"){const{OS:n,Version:r}=global.Platform;return[n,r].join("-")}const t=i1e();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 nve(){var t;const e=v6();return e===Qa.browser?[e,((t=AZ())==null?void 0:t.host)||"unknown"].join(":"):e}function rve(t,e,n){const r=tve(),i=nve();return[[t,e].join("-"),[Zye,n].join("-"),r,i].join("/")}function ive({protocol:t,version:e,relayUrl:n,sdkVersion:r,auth:i,projectId:s,useOnCloseEvent:o,bundleId:a}){const c=n.split("?"),l=rve(t,e,r),u={auth:i,ua:l,projectId:s,useOnCloseEvent:o||void 0,origin:a||void 0},d=Xye(c[1]||"",u);return c[0]+"?"+d}function Wm(t,e){return t.filter(n=>e.includes(n)).length===t.length}function HZ(t){return Object.fromEntries(t.entries())}function WZ(t){return new Map(Object.entries(t))}function Dm(t=At.FIVE_MINUTES,e){const n=At.toMiliseconds(t||At.FIVE_MINUTES);let r,i,s;return{resolve:o=>{s&&r&&(clearTimeout(s),r(o))},reject:o=>{s&&i&&(clearTimeout(s),i(o))},done:()=>new Promise((o,a)=>{s=setTimeout(()=>{a(new Error(e))},n),r=o,i=a})}}function Cy(t,e,n){return new Promise(async(r,i)=>{const s=setTimeout(()=>i(new Error(n)),e);try{const o=await t;r(o)}catch(o){i(o)}clearTimeout(s)})}function VZ(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 sve(t){return VZ("topic",t)}function ove(t){return VZ("id",t)}function qZ(t){const[e,n]=t.split(":"),r={id:void 0,topic:void 0};if(e==="topic"&&typeof n=="string")r.topic=n;else if(e==="id"&&Number.isInteger(Number(n)))r.id=Number(n);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${n}`);return r}function zs(t,e){return At.fromMiliseconds(Date.now()+At.toMiliseconds(t))}function xp(t){return Date.now()>=At.toMiliseconds(t)}function Xn(t,e){return`${t}${e?`:${e}`:""}`}function LA(t=[],e=[]){return[...new Set([...t,...e])]}async function ave({id:t,topic:e,wcDeepLink:n}){try{if(!n)return;const r=typeof n=="string"?JSON.parse(n):n;let i=r==null?void 0:r.href;if(typeof i!="string")return;i.endsWith("/")&&(i=i.slice(0,-1));const s=`${i}/wc?requestId=${t}&sessionTopic=${e}`,o=v6();o===Qa.browser?s.startsWith("https://")||s.startsWith("http://")?window.open(s,"_blank","noreferrer noopener"):window.open(s,"_self","noreferrer noopener"):o===Qa.reactNative&&typeof(global==null?void 0:global.Linking)<"u"&&await global.Linking.openURL(s)}catch(r){console.error(r)}}async function cve(t,e){try{return await t.getItem(e)||(wb()?localStorage.getItem(e):void 0)}catch(n){console.error(n)}}var GZ=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lve(t){var e=t.default;if(typeof e=="function"){var n=function(){return e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var KZ={exports:{}};/**
* [js-sha3]{@link https://github.com/emn178/js-sha3}
*
* @version 0.8.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2015-2018
* @license MIT
*/(function(t){(function(){var e="input is invalid type",n="finalize already called",r=typeof window=="object",i=r?window:{};i.JS_SHA3_NO_WINDOW&&(r=!1);var s=!r&&typeof self=="object",o=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?i=GZ:s&&(i=self);var a=!i.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,c=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),u=[31,7936,2031616,520093696],d=[4,1024,262144,67108864],h=[1,256,65536,16777216],g=[6,1536,393216,100663296],w=[0,8,16,24],v=[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],_=[224,256,384,512],T=[128,256],b=["hex","buffer","arrayBuffer","array","digest"],k={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(j){return Object.prototype.toString.call(j)==="[object Array]"}),c&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(j){return typeof j=="object"&&j.buffer&&j.buffer.constructor===ArrayBuffer});for(var D=function(j,ge,te){return function(ae){return new Z(j,ge,j).update(ae)[te]()}},O=function(j,ge,te){return function(ae,se){return new Z(j,ge,se).update(ae)[te]()}},$=function(j,ge,te){return function(ae,se,L,re){return E["cshake"+j].update(ae,se,L,re)[te]()}},C=function(j,ge,te){return function(ae,se,L,re){return E["kmac"+j].update(ae,se,L,re)[te]()}},A=function(j,ge,te,ae){for(var se=0;se<b.length;++se){var L=b[se];j[L]=ge(te,ae,L)}return j},H=function(j,ge){var te=D(j,ge,"hex");return te.create=function(){return new Z(j,ge,j)},te.update=function(ae){return te.create().update(ae)},A(te,D,j,ge)},V=function(j,ge){var te=O(j,ge,"hex");return te.create=function(ae){return new Z(j,ge,ae)},te.update=function(ae,se){return te.create(se).update(ae)},A(te,O,j,ge)},Y=function(j,ge){var te=k[j],ae=$(j,ge,"hex");return ae.create=function(se,L,re){return!L&&!re?E["shake"+j].create(se):new Z(j,ge,se).bytepad([L,re],te)},ae.update=function(se,L,re,be){return ae.create(L,re,be).update(se)},A(ae,$,j,ge)},ee=function(j,ge){var te=k[j],ae=C(j,ge,"hex");return ae.create=function(se,L,re){return new he(j,ge,L).bytepad(["KMAC",re],te).bytepad([se],te)},ae.update=function(se,L,re,be){return ae.create(se,re,be).update(L)},A(ae,C,j,ge)},x=[{name:"keccak",padding:h,bits:_,createMethod:H},{name:"sha3",padding:g,bits:_,createMethod:H},{name:"shake",padding:u,bits:T,createMethod:V},{name:"cshake",padding:d,bits:T,createMethod:Y},{name:"kmac",padding:d,bits:T,createMethod:ee}],E={},y=[],I=0;I<x.length;++I)for(var B=x[I],M=B.bits,W=0;W<M.length;++W){var z=B.name+"_"+M[W];if(y.push(z),E[z]=B.createMethod(M[W],B.padding),B.name!=="sha3"){var P=B.name+M[W];y.push(P),E[P]=E[z]}}function Z(j,ge,te){this.blocks=[],this.s=[],this.padding=ge,this.outputBits=te,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(j<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=te>>5,this.extraBytes=(te&31)>>3;for(var ae=0;ae<50;++ae)this.s[ae]=0}Z.prototype.update=function(j){if(this.finalized)throw new Error(n);var ge,te=typeof j;if(te!=="string"){if(te==="object"){if(j===null)throw new Error(e);if(c&&j.constructor===ArrayBuffer)j=new Uint8Array(j);else if(!Array.isArray(j)&&(!c||!ArrayBuffer.isView(j)))throw new Error(e)}else throw new Error(e);ge=!0}for(var ae=this.blocks,se=this.byteCount,L=j.length,re=this.blockCount,be=0,Se=this.s,Ie,Ue;be<L;){if(this.reset)for(this.reset=!1,ae[0]=this.block,Ie=1;Ie<re+1;++Ie)ae[Ie]=0;if(ge)for(Ie=this.start;be<L&&Ie<se;++be)ae[Ie>>2]|=j[be]<<w[Ie++&3];else for(Ie=this.start;be<L&&Ie<se;++be)Ue=j.charCodeAt(be),Ue<128?ae[Ie>>2]|=Ue<<w[Ie++&3]:Ue<2048?(ae[Ie>>2]|=(192|Ue>>6)<<w[Ie++&3],ae[Ie>>2]|=(128|Ue&63)<<w[Ie++&3]):Ue<55296||Ue>=57344?(ae[Ie>>2]|=(224|Ue>>12)<<w[Ie++&3],ae[Ie>>2]|=(128|Ue>>6&63)<<w[Ie++&3],ae[Ie>>2]|=(128|Ue&63)<<w[Ie++&3]):(Ue=65536+((Ue&1023)<<10|j.charCodeAt(++be)&1023),ae[Ie>>2]|=(240|Ue>>18)<<w[Ie++&3],ae[Ie>>2]|=(128|Ue>>12&63)<<w[Ie++&3],ae[Ie>>2]|=(128|Ue>>6&63)<<w[Ie++&3],ae[Ie>>2]|=(128|Ue&63)<<w[Ie++&3]);if(this.lastByteIndex=Ie,Ie>=se){for(this.start=Ie-se,this.block=ae[re],Ie=0;Ie<re;++Ie)Se[Ie]^=ae[Ie];ve(Se),this.reset=!0}else this.start=Ie}return this},Z.prototype.encode=function(j,ge){var te=j&255,ae=1,se=[te];for(j=j>>8,te=j&255;te>0;)se.unshift(te),j=j>>8,te=j&255,++ae;return ge?se.push(ae):se.unshift(ae),this.update(se),se.length},Z.prototype.encodeString=function(j){var ge,te=typeof j;if(te!=="string"){if(te==="object"){if(j===null)throw new Error(e);if(c&&j.constructor===ArrayBuffer)j=new Uint8Array(j);else if(!Array.isArray(j)&&(!c||!ArrayBuffer.isView(j)))throw new Error(e)}else throw new Error(e);ge=!0}var ae=0,se=j.length;if(ge)ae=se;else for(var L=0;L<j.length;++L){var re=j.charCodeAt(L);re<128?ae+=1:re<2048?ae+=2:re<55296||re>=57344?ae+=3:(re=65536+((re&1023)<<10|j.charCodeAt(++L)&1023),ae+=4)}return ae+=this.encode(ae*8),this.update(j),ae},Z.prototype.bytepad=function(j,ge){for(var te=this.encode(ge),ae=0;ae<j.length;++ae)te+=this.encodeString(j[ae]);var se=ge-te%ge,L=[];return L.length=se,this.update(L),this},Z.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var j=this.blocks,ge=this.lastByteIndex,te=this.blockCount,ae=this.s;if(j[ge>>2]|=this.padding[ge&3],this.lastByteIndex===this.byteCount)for(j[0]=j[te],ge=1;ge<te+1;++ge)j[ge]=0;for(j[te-1]|=2147483648,ge=0;ge<te;++ge)ae[ge]^=j[ge];ve(ae)}},Z.prototype.toString=Z.prototype.hex=function(){this.finalize();for(var j=this.blockCount,ge=this.s,te=this.outputBlocks,ae=this.extraBytes,se=0,L=0,re="",be;L<te;){for(se=0;se<j&&L<te;++se,++L)be=ge[se],re+=l[be>>4&15]+l[be&15]+l[be>>12&15]+l[be>>8&15]+l[be>>20&15]+l[be>>16&15]+l[be>>28&15]+l[be>>24&15];L%j===0&&(ve(ge),se=0)}return ae&&(be=ge[se],re+=l[be>>4&15]+l[be&15],ae>1&&(re+=l[be>>12&15]+l[be>>8&15]),ae>2&&(re+=l[be>>20&15]+l[be>>16&15])),re},Z.prototype.arrayBuffer=function(){this.finalize();var j=this.blockCount,ge=this.s,te=this.outputBlocks,ae=this.extraBytes,se=0,L=0,re=this.outputBits>>3,be;ae?be=new ArrayBuffer(te+1<<2):be=new ArrayBuffer(re);for(var Se=new Uint32Array(be);L<te;){for(se=0;se<j&&L<te;++se,++L)Se[L]=ge[se];L%j===0&&ve(ge)}return ae&&(Se[se]=ge[se],be=be.slice(0,re)),be},Z.prototype.buffer=Z.prototype.arrayBuffer,Z.prototype.digest=Z.prototype.array=function(){this.finalize();for(var j=this.blockCount,ge=this.s,te=this.outputBlocks,ae=this.extraBytes,se=0,L=0,re=[],be,Se;L<te;){for(se=0;se<j&&L<te;++se,++L)be=L<<2,Se=ge[se],re[be]=Se&255,re[be+1]=Se>>8&255,re[be+2]=Se>>16&255,re[be+3]=Se>>24&255;L%j===0&&ve(ge)}return ae&&(be=L<<2,Se=ge[se],re[be]=Se&255,ae>1&&(re[be+1]=Se>>8&255),ae>2&&(re[be+2]=Se>>16&255)),re};function he(j,ge,te){Z.call(this,j,ge,te)}he.prototype=new Z,he.prototype.finalize=function(){return this.encode(this.outputBits,!0),Z.prototype.finalize.call(this)};var ve=function(j){var ge,te,ae,se,L,re,be,Se,Ie,Ue,lt,je,Vt,vt,ut,ft,He,ct,Gt,ot,qe,X,U,G,ie,fe,we,Re,Ge,nt,nn,Ct,St,qr,Bn,$n,Si,sn,Pe,It,$t,jt,Yn,fn,hn,Lt,Kt,Yt,Qn,Ot,kt,vr,pn,ar,Zr,Cr,jn,yo,eo,Go,vo,Ko,es;for(ae=0;ae<48;ae+=2)se=j[0]^j[10]^j[20]^j[30]^j[40],L=j[1]^j[11]^j[21]^j[31]^j[41],re=j[2]^j[12]^j[22]^j[32]^j[42],be=j[3]^j[13]^j[23]^j[33]^j[43],Se=j[4]^j[14]^j[24]^j[34]^j[44],Ie=j[5]^j[15]^j[25]^j[35]^j[45],Ue=j[6]^j[16]^j[26]^j[36]^j[46],lt=j[7]^j[17]^j[27]^j[37]^j[47],je=j[8]^j[18]^j[28]^j[38]^j[48],Vt=j[9]^j[19]^j[29]^j[39]^j[49],ge=je^(re<<1|be>>>31),te=Vt^(be<<1|re>>>31),j[0]^=ge,j[1]^=te,j[10]^=ge,j[11]^=te,j[20]^=ge,j[21]^=te,j[30]^=ge,j[31]^=te,j[40]^=ge,j[41]^=te,ge=se^(Se<<1|Ie>>>31),te=L^(Ie<<1|Se>>>31),j[2]^=ge,j[3]^=te,j[12]^=ge,j[13]^=te,j[22]^=ge,j[23]^=te,j[32]^=ge,j[33]^=te,j[42]^=ge,j[43]^=te,ge=re^(Ue<<1|lt>>>31),te=be^(lt<<1|Ue>>>31),j[4]^=ge,j[5]^=te,j[14]^=ge,j[15]^=te,j[24]^=ge,j[25]^=te,j[34]^=ge,j[35]^=te,j[44]^=ge,j[45]^=te,ge=Se^(je<<1|Vt>>>31),te=Ie^(Vt<<1|je>>>31),j[6]^=ge,j[7]^=te,j[16]^=ge,j[17]^=te,j[26]^=ge,j[27]^=te,j[36]^=ge,j[37]^=te,j[46]^=ge,j[47]^=te,ge=Ue^(se<<1|L>>>31),te=lt^(L<<1|se>>>31),j[8]^=ge,j[9]^=te,j[18]^=ge,j[19]^=te,j[28]^=ge,j[29]^=te,j[38]^=ge,j[39]^=te,j[48]^=ge,j[49]^=te,vt=j[0],ut=j[1],Lt=j[11]<<4|j[10]>>>28,Kt=j[10]<<4|j[11]>>>28,Re=j[20]<<3|j[21]>>>29,Ge=j[21]<<3|j[20]>>>29,Go=j[31]<<9|j[30]>>>23,vo=j[30]<<9|j[31]>>>23,jt=j[40]<<18|j[41]>>>14,Yn=j[41]<<18|j[40]>>>14,qr=j[2]<<1|j[3]>>>31,Bn=j[3]<<1|j[2]>>>31,ft=j[13]<<12|j[12]>>>20,He=j[12]<<12|j[13]>>>20,Yt=j[22]<<10|j[23]>>>22,Qn=j[23]<<10|j[22]>>>22,nt=j[33]<<13|j[32]>>>19,nn=j[32]<<13|j[33]>>>19,Ko=j[42]<<2|j[43]>>>30,es=j[43]<<2|j[42]>>>30,ar=j[5]<<30|j[4]>>>2,Zr=j[4]<<30|j[5]>>>2,$n=j[14]<<6|j[15]>>>26,Si=j[15]<<6|j[14]>>>26,ct=j[25]<<11|j[24]>>>21,Gt=j[24]<<11|j[25]>>>21,Ot=j[34]<<15|j[35]>>>17,kt=j[35]<<15|j[34]>>>17,Ct=j[45]<<29|j[44]>>>3,St=j[44]<<29|j[45]>>>3,G=j[6]<<28|j[7]>>>4,ie=j[7]<<28|j[6]>>>4,Cr=j[17]<<23|j[16]>>>9,jn=j[16]<<23|j[17]>>>9,sn=j[26]<<25|j[27]>>>7,Pe=j[27]<<25|j[26]>>>7,ot=j[36]<<21|j[37]>>>11,qe=j[37]<<21|j[36]>>>11,vr=j[47]<<24|j[46]>>>8,pn=j[46]<<24|j[47]>>>8,fn=j[8]<<27|j[9]>>>5,hn=j[9]<<27|j[8]>>>5,fe=j[18]<<20|j[19]>>>12,we=j[19]<<20|j[18]>>>12,yo=j[29]<<7|j[28]>>>25,eo=j[28]<<7|j[29]>>>25,It=j[38]<<8|j[39]>>>24,$t=j[39]<<8|j[38]>>>24,X=j[48]<<14|j[49]>>>18,U=j[49]<<14|j[48]>>>18,j[0]=vt^~ft&ct,j[1]=ut^~He&Gt,j[10]=G^~fe&Re,j[11]=ie^~we&Ge,j[20]=qr^~$n&sn,j[21]=Bn^~Si&Pe,j[30]=fn^~Lt&Yt,j[31]=hn^~Kt&Qn,j[40]=ar^~Cr&yo,j[41]=Zr^~jn&eo,j[2]=ft^~ct&ot,j[3]=He^~Gt&qe,j[12]=fe^~Re&nt,j[13]=we^~Ge&nn,j[22]=$n^~sn&It,j[23]=Si^~Pe&$t,j[32]=Lt^~Yt&Ot,j[33]=Kt^~Qn&kt,j[42]=Cr^~yo&Go,j[43]=jn^~eo&vo,j[4]=ct^~ot&X,j[5]=Gt^~qe&U,j[14]=Re^~nt&Ct,j[15]=Ge^~nn&St,j[24]=sn^~It&jt,j[25]=Pe^~$t&Yn,j[34]=Yt^~Ot&vr,j[35]=Qn^~kt&pn,j[44]=yo^~Go&Ko,j[45]=eo^~vo&es,j[6]=ot^~X&vt,j[7]=qe^~U&ut,j[16]=nt^~Ct&G,j[17]=nn^~St&ie,j[26]=It^~jt&qr,j[27]=$t^~Yn&Bn,j[36]=Ot^~vr&fn,j[37]=kt^~pn&hn,j[46]=Go^~Ko&ar,j[47]=vo^~es&Zr,j[8]=X^~vt&ft,j[9]=U^~ut&He,j[18]=Ct^~G&fe,j[19]=St^~ie&we,j[28]=jt^~qr&$n,j[29]=Yn^~Bn&Si,j[38]=vr^~fn&Lt,j[39]=pn^~hn&Kt,j[48]=Ko^~ar&Cr,j[49]=es^~Zr&jn,j[0]^=v[ae],j[1]^=v[ae+1]};if(a)t.exports=E;else for(I=0;I<y.length;++I)i[y[I]]=E[y[I]]})()})(KZ);var uve=KZ.exports;const dve="logger/5.7.0";let Yz=!1,Qz=!1;const UA={debug:1,default:2,info:2,warning:3,error:4,off:5};let Zz=UA.default,SI=null;function fve(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(t){return t.message}return null}const Jz=fve();var NN;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(NN||(NN={}));var Wl;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(Wl||(Wl={}));const Xz="0123456789abcdef";let Vs=class ls{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,n){const r=e.toLowerCase();UA[r]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Zz>UA[r])&&console.log.apply(console,n)}debug(...e){this._log(ls.levels.DEBUG,e)}info(...e){this._log(ls.levels.INFO,e)}warn(...e){this._log(ls.levels.WARNING,e)}makeError(e,n,r){if(Qz)return this.makeError("censored error",n,{});n||(n=ls.errors.UNKNOWN_ERROR),r||(r={});const i=[];Object.keys(r).forEach(c=>{const l=r[c];try{if(l instanceof Uint8Array){let u="";for(let d=0;d<l.length;d++)u+=Xz[l[d]>>4],u+=Xz[l[d]&15];i.push(c+"=Uint8Array(0x"+u+")")}else i.push(c+"="+JSON.stringify(l))}catch{i.push(c+"="+JSON.stringify(r[c].toString()))}}),i.push(`code=${n}`),i.push(`version=${this.version}`);const s=e;let o="";switch(n){case Wl.NUMERIC_FAULT:{o="NUMERIC_FAULT";const c=e;switch(c){case"overflow":case"underflow":case"division-by-zero":o+="-"+c;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case Wl.CALL_EXCEPTION:case Wl.INSUFFICIENT_FUNDS:case Wl.MISSING_NEW:case Wl.NONCE_EXPIRED:case Wl.REPLACEMENT_UNDERPRICED:case Wl.TRANSACTION_REPLACED:case Wl.UNPREDICTABLE_GAS_LIMIT:o=n;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const a=new Error(e);return a.reason=s,a.code=n,Object.keys(r).forEach(function(c){a[c]=r[c]}),a}throwError(e,n,r){throw this.makeError(e,n,r)}throwArgumentError(e,n,r){return this.throwError(e,ls.errors.INVALID_ARGUMENT,{argument:n,value:r})}assert(e,n,r,i){e||this.throwError(n,r,i)}assertArgument(e,n,r,i){e||this.throwArgumentError(n,r,i)}checkNormalize(e){Jz&&this.throwError("platform missing String.prototype.normalize",ls.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Jz})}checkSafeUint53(e,n){typeof e=="number"&&(n==null&&(n="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(n,ls.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(n,ls.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,n,r){r?r=": "+r:r="",e<n&&this.throwError("missing argument"+r,ls.errors.MISSING_ARGUMENT,{count:e,expectedCount:n}),e>n&&this.throwError("too many arguments"+r,ls.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:n})}checkNew(e,n){(e===Object||e==null)&&this.throwError("missing new",ls.errors.MISSING_NEW,{name:n.name})}checkAbstract(e,n){e===n?this.throwError("cannot instantiate abstract class "+JSON.stringify(n.name)+" directly; use a sub-class",ls.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",ls.errors.MISSING_NEW,{name:n.name})}static globalLogger(){return SI||(SI=new ls(dve)),SI}static setCensorship(e,n){if(!e&&n&&this.globalLogger().throwError("cannot permanently disable censorship",ls.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Yz){if(!e)return;this.globalLogger().throwError("error censorship permanent",ls.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Qz=!!e,Yz=!!n}static setLogLevel(e){const n=UA[e.toLowerCase()];if(n==null){ls.globalLogger().warn("invalid log level - "+e);return}Zz=n}static from(e){return new ls(e)}};Vs.errors=Wl,Vs.levels=NN;const hve="bytes/5.7.0",qi=new Vs(hve);function YZ(t){return!!t.toHexString}function Sy(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return Sy(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function pve(t){return Xa(t)&&!(t.length%2)||yb(t)}function eH(t){return typeof t=="number"&&t==t&&t%1===0}function yb(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!eH(t.length)||t.length<0)return!1;for(let e=0;e<t.length;e++){const n=t[e];if(!eH(n)||n<0||n>=256)return!1}return!0}function Di(t,e){if(e||(e={}),typeof t=="number"){qi.checkSafeUint53(t,"invalid arrayify value");const n=[];for(;t;)n.unshift(t&255),t=parseInt(String(t/256));return n.length===0&&n.push(0),Sy(new Uint8Array(n))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),YZ(t)&&(t=t.toHexString()),Xa(t)){let n=t.substring(2);n.length%2&&(e.hexPad==="left"?n="0"+n:e.hexPad==="right"?n+="0":qi.throwArgumentError("hex data is odd-length","value",t));const r=[];for(let i=0;i<n.length;i+=2)r.push(parseInt(n.substring(i,i+2),16));return Sy(new Uint8Array(r))}return yb(t)?Sy(new Uint8Array(t)):qi.throwArgumentError("invalid arrayify value","value",t)}function mve(t){const e=t.map(i=>Di(i)),n=e.reduce((i,s)=>i+s.length,0),r=new Uint8Array(n);return e.reduce((i,s)=>(r.set(s,i),i+s.length),0),Sy(r)}function gve(t,e){t=Di(t),t.length>e&&qi.throwArgumentError("value out of range","value",arguments[0]);const n=new Uint8Array(e);return n.set(t,e-t.length),Sy(n)}function Xa(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const TI="0123456789abcdef";function ua(t,e){if(e||(e={}),typeof t=="number"){qi.checkSafeUint53(t,"invalid hexlify value");let n="";for(;t;)n=TI[t&15]+n,t=Math.floor(t/16);return n.length?(n.length%2&&(n="0"+n),"0x"+n):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),YZ(t))return t.toHexString();if(Xa(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":qi.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(yb(t)){let n="0x";for(let r=0;r<t.length;r++){let i=t[r];n+=TI[(i&240)>>4]+TI[i&15]}return n}return qi.throwArgumentError("invalid hexlify value","value",t)}function wve(t){if(typeof t!="string")t=ua(t);else if(!Xa(t)||t.length%2)return null;return(t.length-2)/2}function tH(t,e,n){return typeof t!="string"?t=ua(t):(!Xa(t)||t.length%2)&&qi.throwArgumentError("invalid hexData","value",t),e=2+2*e,n!=null?"0x"+t.substring(e,2+2*n):"0x"+t.substring(e)}function ad(t,e){for(typeof t!="string"?t=ua(t):Xa(t)||qi.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&qi.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function QZ(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(pve(t)){let n=Di(t);n.length===64?(e.v=27+(n[32]>>7),n[32]&=127,e.r=ua(n.slice(0,32)),e.s=ua(n.slice(32,64))):n.length===65?(e.r=ua(n.slice(0,32)),e.s=ua(n.slice(32,64)),e.v=n[64]):qi.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:qi.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(n[32]|=128),e._vs=ua(n.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const i=gve(Di(e._vs),32);e._vs=ua(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&qi.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const o=ua(i);e.s==null?e.s=o:e.s!==o&&qi.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?qi.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&qi.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Xa(e.r)?qi.throwArgumentError("signature missing or invalid r","signature",t):e.r=ad(e.r,32),e.s==null||!Xa(e.s)?qi.throwArgumentError("signature missing or invalid s","signature",t):e.s=ad(e.s,32);const n=Di(e.s);n[0]>=128&&qi.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(n[0]|=128);const r=ua(n);e._vs&&(Xa(e._vs)||qi.throwArgumentError("signature invalid _vs","signature",t),e._vs=ad(e._vs,32)),e._vs==null?e._vs=r:e._vs!==r&&qi.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function BM(t){return"0x"+uve.keccak_256(Di(t))}var ZZ={exports:{}},yve={},vve=Object.freeze({__proto__:null,default:yve}),bve=lve(vve);(function(t){(function(e,n){function r(x,E){if(!x)throw new Error(E||"Assertion failed")}function i(x,E){x.super_=E;var y=function(){};y.prototype=E.prototype,x.prototype=new y,x.prototype.constructor=x}function s(x,E,y){if(s.isBN(x))return x;this.negative=0,this.words=null,this.length=0,this.red=null,x!==null&&((E==="le"||E==="be")&&(y=E,E=10),this._init(x||0,E||10,y||"be"))}typeof e=="object"?e.exports=s:n.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=bve.Buffer}catch{}s.isBN=function(x){return x instanceof s?!0:x!==null&&typeof x=="object"&&x.constructor.wordSize===s.wordSize&&Array.isArray(x.words)},s.max=function(x,E){return x.cmp(E)>0?x:E},s.min=function(x,E){return x.cmp(E)<0?x:E},s.prototype._init=function(x,E,y){if(typeof x=="number")return this._initNumber(x,E,y);if(typeof x=="object")return this._initArray(x,E,y);E==="hex"&&(E=16),r(E===(E|0)&&E>=2&&E<=36),x=x.toString().replace(/\s+/g,"");var I=0;x[0]==="-"&&(I++,this.negative=1),I<x.length&&(E===16?this._parseHex(x,I,y):(this._parseBase(x,E,I),y==="le"&&this._initArray(this.toArray(),E,y)))},s.prototype._initNumber=function(x,E,y){x<0&&(this.negative=1,x=-x),x<67108864?(this.words=[x&67108863],this.length=1):x<4503599627370496?(this.words=[x&67108863,x/67108864&67108863],this.length=2):(r(x<9007199254740992),this.words=[x&67108863,x/67108864&67108863,1],this.length=3),y==="le"&&this._initArray(this.toArray(),E,y)},s.prototype._initArray=function(x,E,y){if(r(typeof x.length=="number"),x.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(x.length/3),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var B,M,W=0;if(y==="be")for(I=x.length-1,B=0;I>=0;I-=3)M=x[I]|x[I-1]<<8|x[I-2]<<16,this.words[B]|=M<<W&67108863,this.words[B+1]=M>>>26-W&67108863,W+=24,W>=26&&(W-=26,B++);else if(y==="le")for(I=0,B=0;I<x.length;I+=3)M=x[I]|x[I+1]<<8|x[I+2]<<16,this.words[B]|=M<<W&67108863,this.words[B+1]=M>>>26-W&67108863,W+=24,W>=26&&(W-=26,B++);return this._strip()};function a(x,E){var y=x.charCodeAt(E);if(y>=48&&y<=57)return y-48;if(y>=65&&y<=70)return y-55;if(y>=97&&y<=102)return y-87;r(!1,"Invalid character in "+x)}function c(x,E,y){var I=a(x,y);return y-1>=E&&(I|=a(x,y-1)<<4),I}s.prototype._parseHex=function(x,E,y){this.length=Math.ceil((x.length-E)/6),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var B=0,M=0,W;if(y==="be")for(I=x.length-1;I>=E;I-=2)W=c(x,E,I)<<B,this.words[M]|=W&67108863,B>=18?(B-=18,M+=1,this.words[M]|=W>>>26):B+=8;else{var z=x.length-E;for(I=z%2===0?E+1:E;I<x.length;I+=2)W=c(x,E,I)<<B,this.words[M]|=W&67108863,B>=18?(B-=18,M+=1,this.words[M]|=W>>>26):B+=8}this._strip()};function l(x,E,y,I){for(var B=0,M=0,W=Math.min(x.length,y),z=E;z<W;z++){var P=x.charCodeAt(z)-48;B*=I,P>=49?M=P-49+10:P>=17?M=P-17+10:M=P,r(P>=0&&M<I,"Invalid character"),B+=M}return B}s.prototype._parseBase=function(x,E,y){this.words=[0],this.length=1;for(var I=0,B=1;B<=67108863;B*=E)I++;I--,B=B/E|0;for(var M=x.length-y,W=M%I,z=Math.min(M,M-W)+y,P=0,Z=y;Z<z;Z+=I)P=l(x,Z,Z+I,E),this.imuln(B),this.words[0]+P<67108864?this.words[0]+=P:this._iaddn(P);if(W!==0){var he=1;for(P=l(x,Z,x.length,E),Z=0;Z<W;Z++)he*=E;this.imuln(he),this.words[0]+P<67108864?this.words[0]+=P:this._iaddn(P)}this._strip()},s.prototype.copy=function(x){x.words=new Array(this.length);for(var E=0;E<this.length;E++)x.words[E]=this.words[E];x.length=this.length,x.negative=this.negative,x.red=this.red};function u(x,E){x.words=E.words,x.length=E.length,x.negative=E.negative,x.red=E.red}if(s.prototype._move=function(x){u(x,this)},s.prototype.clone=function(){var x=new s(null);return this.copy(x),x},s.prototype._expand=function(x){for(;this.length<x;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch{s.prototype.inspect=d}else s.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],w=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(x,E){x=x||10,E=E|0||1;var y;if(x===16||x==="hex"){y="";for(var I=0,B=0,M=0;M<this.length;M++){var W=this.words[M],z=((W<<I|B)&16777215).toString(16);B=W>>>24-I&16777215,I+=2,I>=26&&(I-=26,M--),B!==0||M!==this.length-1?y=h[6-z.length]+z+y:y=z+y}for(B!==0&&(y=B.toString(16)+y);y.length%E!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(x===(x|0)&&x>=2&&x<=36){var P=g[x],Z=w[x];y="";var he=this.clone();for(he.negative=0;!he.isZero();){var ve=he.modrn(Z).toString(x);he=he.idivn(Z),he.isZero()?y=ve+y:y=h[P-ve.length]+ve+y}for(this.isZero()&&(y="0"+y);y.length%E!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var x=this.words[0];return this.length===2?x+=this.words[1]*67108864:this.length===3&&this.words[2]===1?x+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-x:x},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(x,E){return this.toArrayLike(o,x,E)}),s.prototype.toArray=function(x,E){return this.toArrayLike(Array,x,E)};var v=function(x,E){return x.allocUnsafe?x.allocUnsafe(E):new x(E)};s.prototype.toArrayLike=function(x,E,y){this._strip();var I=this.byteLength(),B=y||Math.max(1,I);r(I<=B,"byte array longer than desired length"),r(B>0,"Requested array length <= 0");var M=v(x,B),W=E==="le"?"LE":"BE";return this["_toArrayLike"+W](M,I),M},s.prototype._toArrayLikeLE=function(x,E){for(var y=0,I=0,B=0,M=0;B<this.length;B++){var W=this.words[B]<<M|I;x[y++]=W&255,y<x.length&&(x[y++]=W>>8&255),y<x.length&&(x[y++]=W>>16&255),M===6?(y<x.length&&(x[y++]=W>>24&255),I=0,M=0):(I=W>>>24,M+=2)}if(y<x.length)for(x[y++]=I;y<x.length;)x[y++]=0},s.prototype._toArrayLikeBE=function(x,E){for(var y=x.length-1,I=0,B=0,M=0;B<this.length;B++){var W=this.words[B]<<M|I;x[y--]=W&255,y>=0&&(x[y--]=W>>8&255),y>=0&&(x[y--]=W>>16&255),M===6?(y>=0&&(x[y--]=W>>24&255),I=0,M=0):(I=W>>>24,M+=2)}if(y>=0)for(x[y--]=I;y>=0;)x[y--]=0},Math.clz32?s.prototype._countBits=function(x){return 32-Math.clz32(x)}:s.prototype._countBits=function(x){var E=x,y=0;return E>=4096&&(y+=13,E>>>=13),E>=64&&(y+=7,E>>>=7),E>=8&&(y+=4,E>>>=4),E>=2&&(y+=2,E>>>=2),y+E},s.prototype._zeroBits=function(x){if(x===0)return 26;var E=x,y=0;return E&8191||(y+=13,E>>>=13),E&127||(y+=7,E>>>=7),E&15||(y+=4,E>>>=4),E&3||(y+=2,E>>>=2),E&1||y++,y},s.prototype.bitLength=function(){var x=this.words[this.length-1],E=this._countBits(x);return(this.length-1)*26+E};function _(x){for(var E=new Array(x.bitLength()),y=0;y<E.length;y++){var I=y/26|0,B=y%26;E[y]=x.words[I]>>>B&1}return E}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var x=0,E=0;E<this.length;E++){var y=this._zeroBits(this.words[E]);if(x+=y,y!==26)break}return x},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(x){return this.negative!==0?this.abs().inotn(x).iaddn(1):this.clone()},s.prototype.fromTwos=function(x){return this.testn(x-1)?this.notn(x).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(x){for(;this.length<x.length;)this.words[this.length++]=0;for(var E=0;E<x.length;E++)this.words[E]=this.words[E]|x.words[E];return this._strip()},s.prototype.ior=function(x){return r((this.negative|x.negative)===0),this.iuor(x)},s.prototype.or=function(x){return this.length>x.length?this.clone().ior(x):x.clone().ior(this)},s.prototype.uor=function(x){return this.length>x.length?this.clone().iuor(x):x.clone().iuor(this)},s.prototype.iuand=function(x){var E;this.length>x.length?E=x:E=this;for(var y=0;y<E.length;y++)this.words[y]=this.words[y]&x.words[y];return this.length=E.length,this._strip()},s.prototype.iand=function(x){return r((this.negative|x.negative)===0),this.iuand(x)},s.prototype.and=function(x){return this.length>x.length?this.clone().iand(x):x.clone().iand(this)},s.prototype.uand=function(x){return this.length>x.length?this.clone().iuand(x):x.clone().iuand(this)},s.prototype.iuxor=function(x){var E,y;this.length>x.length?(E=this,y=x):(E=x,y=this);for(var I=0;I<y.length;I++)this.words[I]=E.words[I]^y.words[I];if(this!==E)for(;I<E.length;I++)this.words[I]=E.words[I];return this.length=E.length,this._strip()},s.prototype.ixor=function(x){return r((this.negative|x.negative)===0),this.iuxor(x)},s.prototype.xor=function(x){return this.length>x.length?this.clone().ixor(x):x.clone().ixor(this)},s.prototype.uxor=function(x){return this.length>x.length?this.clone().iuxor(x):x.clone().iuxor(this)},s.prototype.inotn=function(x){r(typeof x=="number"&&x>=0);var E=Math.ceil(x/26)|0,y=x%26;this._expand(E),y>0&&E--;for(var I=0;I<E;I++)this.words[I]=~this.words[I]&67108863;return y>0&&(this.words[I]=~this.words[I]&67108863>>26-y),this._strip()},s.prototype.notn=function(x){return this.clone().inotn(x)},s.prototype.setn=function(x,E){r(typeof x=="number"&&x>=0);var y=x/26|0,I=x%26;return this._expand(y+1),E?this.words[y]=this.words[y]|1<<I:this.words[y]=this.words[y]&~(1<<I),this._strip()},s.prototype.iadd=function(x){var E;if(this.negative!==0&&x.negative===0)return this.negative=0,E=this.isub(x),this.negative^=1,this._normSign();if(this.negative===0&&x.negative!==0)return x.negative=0,E=this.isub(x),x.negative=1,E._normSign();var y,I;this.length>x.length?(y=this,I=x):(y=x,I=this);for(var B=0,M=0;M<I.length;M++)E=(y.words[M]|0)+(I.words[M]|0)+B,this.words[M]=E&67108863,B=E>>>26;for(;B!==0&&M<y.length;M++)E=(y.words[M]|0)+B,this.words[M]=E&67108863,B=E>>>26;if(this.length=y.length,B!==0)this.words[this.length]=B,this.length++;else if(y!==this)for(;M<y.length;M++)this.words[M]=y.words[M];return this},s.prototype.add=function(x){var E;return x.negative!==0&&this.negative===0?(x.negative=0,E=this.sub(x),x.negative^=1,E):x.negative===0&&this.negative!==0?(this.negative=0,E=x.sub(this),this.negative=1,E):this.length>x.length?this.clone().iadd(x):x.clone().iadd(this)},s.prototype.isub=function(x){if(x.negative!==0){x.negative=0;var E=this.iadd(x);return x.negative=1,E._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(x),this.negative=1,this._normSign();var y=this.cmp(x);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var I,B;y>0?(I=this,B=x):(I=x,B=this);for(var M=0,W=0;W<B.length;W++)E=(I.words[W]|0)-(B.words[W]|0)+M,M=E>>26,this.words[W]=E&67108863;for(;M!==0&&W<I.length;W++)E=(I.words[W]|0)+M,M=E>>26,this.words[W]=E&67108863;if(M===0&&W<I.length&&I!==this)for(;W<I.length;W++)this.words[W]=I.words[W];return this.length=Math.max(this.length,W),I!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(x){return this.clone().isub(x)};function T(x,E,y){y.negative=E.negative^x.negative;var I=x.length+E.length|0;y.length=I,I=I-1|0;var B=x.words[0]|0,M=E.words[0]|0,W=B*M,z=W&67108863,P=W/67108864|0;y.words[0]=z;for(var Z=1;Z<I;Z++){for(var he=P>>>26,ve=P&67108863,j=Math.min(Z,E.length-1),ge=Math.max(0,Z-x.length+1);ge<=j;ge++){var te=Z-ge|0;B=x.words[te]|0,M=E.words[ge]|0,W=B*M+ve,he+=W/67108864|0,ve=W&67108863}y.words[Z]=ve|0,P=he|0}return P!==0?y.words[Z]=P|0:y.length--,y._strip()}var b=function(x,E,y){var I=x.words,B=E.words,M=y.words,W=0,z,P,Z,he=I[0]|0,ve=he&8191,j=he>>>13,ge=I[1]|0,te=ge&8191,ae=ge>>>13,se=I[2]|0,L=se&8191,re=se>>>13,be=I[3]|0,Se=be&8191,Ie=be>>>13,Ue=I[4]|0,lt=Ue&8191,je=Ue>>>13,Vt=I[5]|0,vt=Vt&8191,ut=Vt>>>13,ft=I[6]|0,He=ft&8191,ct=ft>>>13,Gt=I[7]|0,ot=Gt&8191,qe=Gt>>>13,X=I[8]|0,U=X&8191,G=X>>>13,ie=I[9]|0,fe=ie&8191,we=ie>>>13,Re=B[0]|0,Ge=Re&8191,nt=Re>>>13,nn=B[1]|0,Ct=nn&8191,St=nn>>>13,qr=B[2]|0,Bn=qr&8191,$n=qr>>>13,Si=B[3]|0,sn=Si&8191,Pe=Si>>>13,It=B[4]|0,$t=It&8191,jt=It>>>13,Yn=B[5]|0,fn=Yn&8191,hn=Yn>>>13,Lt=B[6]|0,Kt=Lt&8191,Yt=Lt>>>13,Qn=B[7]|0,Ot=Qn&8191,kt=Qn>>>13,vr=B[8]|0,pn=vr&8191,ar=vr>>>13,Zr=B[9]|0,Cr=Zr&8191,jn=Zr>>>13;y.negative=x.negative^E.negative,y.length=19,z=Math.imul(ve,Ge),P=Math.imul(ve,nt),P=P+Math.imul(j,Ge)|0,Z=Math.imul(j,nt);var yo=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+(yo>>>26)|0,yo&=67108863,z=Math.imul(te,Ge),P=Math.imul(te,nt),P=P+Math.imul(ae,Ge)|0,Z=Math.imul(ae,nt),z=z+Math.imul(ve,Ct)|0,P=P+Math.imul(ve,St)|0,P=P+Math.imul(j,Ct)|0,Z=Z+Math.imul(j,St)|0;var eo=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+(eo>>>26)|0,eo&=67108863,z=Math.imul(L,Ge),P=Math.imul(L,nt),P=P+Math.imul(re,Ge)|0,Z=Math.imul(re,nt),z=z+Math.imul(te,Ct)|0,P=P+Math.imul(te,St)|0,P=P+Math.imul(ae,Ct)|0,Z=Z+Math.imul(ae,St)|0,z=z+Math.imul(ve,Bn)|0,P=P+Math.imul(ve,$n)|0,P=P+Math.imul(j,Bn)|0,Z=Z+Math.imul(j,$n)|0;var Go=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+(Go>>>26)|0,Go&=67108863,z=Math.imul(Se,Ge),P=Math.imul(Se,nt),P=P+Math.imul(Ie,Ge)|0,Z=Math.imul(Ie,nt),z=z+Math.imul(L,Ct)|0,P=P+Math.imul(L,St)|0,P=P+Math.imul(re,Ct)|0,Z=Z+Math.imul(re,St)|0,z=z+Math.imul(te,Bn)|0,P=P+Math.imul(te,$n)|0,P=P+Math.imul(ae,Bn)|0,Z=Z+Math.imul(ae,$n)|0,z=z+Math.imul(ve,sn)|0,P=P+Math.imul(ve,Pe)|0,P=P+Math.imul(j,sn)|0,Z=Z+Math.imul(j,Pe)|0;var vo=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+(vo>>>26)|0,vo&=67108863,z=Math.imul(lt,Ge),P=Math.imul(lt,nt),P=P+Math.imul(je,Ge)|0,Z=Math.imul(je,nt),z=z+Math.imul(Se,Ct)|0,P=P+Math.imul(Se,St)|0,P=P+Math.imul(Ie,Ct)|0,Z=Z+Math.imul(Ie,St)|0,z=z+Math.imul(L,Bn)|0,P=P+Math.imul(L,$n)|0,P=P+Math.imul(re,Bn)|0,Z=Z+Math.imul(re,$n)|0,z=z+Math.imul(te,sn)|0,P=P+Math.imul(te,Pe)|0,P=P+Math.imul(ae,sn)|0,Z=Z+Math.imul(ae,Pe)|0,z=z+Math.imul(ve,$t)|0,P=P+Math.imul(ve,jt)|0,P=P+Math.imul(j,$t)|0,Z=Z+Math.imul(j,jt)|0;var Ko=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+(Ko>>>26)|0,Ko&=67108863,z=Math.imul(vt,Ge),P=Math.imul(vt,nt),P=P+Math.imul(ut,Ge)|0,Z=Math.imul(ut,nt),z=z+Math.imul(lt,Ct)|0,P=P+Math.imul(lt,St)|0,P=P+Math.imul(je,Ct)|0,Z=Z+Math.imul(je,St)|0,z=z+Math.imul(Se,Bn)|0,P=P+Math.imul(Se,$n)|0,P=P+Math.imul(Ie,Bn)|0,Z=Z+Math.imul(Ie,$n)|0,z=z+Math.imul(L,sn)|0,P=P+Math.imul(L,Pe)|0,P=P+Math.imul(re,sn)|0,Z=Z+Math.imul(re,Pe)|0,z=z+Math.imul(te,$t)|0,P=P+Math.imul(te,jt)|0,P=P+Math.imul(ae,$t)|0,Z=Z+Math.imul(ae,jt)|0,z=z+Math.imul(ve,fn)|0,P=P+Math.imul(ve,hn)|0,P=P+Math.imul(j,fn)|0,Z=Z+Math.imul(j,hn)|0;var es=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+(es>>>26)|0,es&=67108863,z=Math.imul(He,Ge),P=Math.imul(He,nt),P=P+Math.imul(ct,Ge)|0,Z=Math.imul(ct,nt),z=z+Math.imul(vt,Ct)|0,P=P+Math.imul(vt,St)|0,P=P+Math.imul(ut,Ct)|0,Z=Z+Math.imul(ut,St)|0,z=z+Math.imul(lt,Bn)|0,P=P+Math.imul(lt,$n)|0,P=P+Math.imul(je,Bn)|0,Z=Z+Math.imul(je,$n)|0,z=z+Math.imul(Se,sn)|0,P=P+Math.imul(Se,Pe)|0,P=P+Math.imul(Ie,sn)|0,Z=Z+Math.imul(Ie,Pe)|0,z=z+Math.imul(L,$t)|0,P=P+Math.imul(L,jt)|0,P=P+Math.imul(re,$t)|0,Z=Z+Math.imul(re,jt)|0,z=z+Math.imul(te,fn)|0,P=P+Math.imul(te,hn)|0,P=P+Math.imul(ae,fn)|0,Z=Z+Math.imul(ae,hn)|0,z=z+Math.imul(ve,Kt)|0,P=P+Math.imul(ve,Yt)|0,P=P+Math.imul(j,Kt)|0,Z=Z+Math.imul(j,Yt)|0;var ws=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+(ws>>>26)|0,ws&=67108863,z=Math.imul(ot,Ge),P=Math.imul(ot,nt),P=P+Math.imul(qe,Ge)|0,Z=Math.imul(qe,nt),z=z+Math.imul(He,Ct)|0,P=P+Math.imul(He,St)|0,P=P+Math.imul(ct,Ct)|0,Z=Z+Math.imul(ct,St)|0,z=z+Math.imul(vt,Bn)|0,P=P+Math.imul(vt,$n)|0,P=P+Math.imul(ut,Bn)|0,Z=Z+Math.imul(ut,$n)|0,z=z+Math.imul(lt,sn)|0,P=P+Math.imul(lt,Pe)|0,P=P+Math.imul(je,sn)|0,Z=Z+Math.imul(je,Pe)|0,z=z+Math.imul(Se,$t)|0,P=P+Math.imul(Se,jt)|0,P=P+Math.imul(Ie,$t)|0,Z=Z+Math.imul(Ie,jt)|0,z=z+Math.imul(L,fn)|0,P=P+Math.imul(L,hn)|0,P=P+Math.imul(re,fn)|0,Z=Z+Math.imul(re,hn)|0,z=z+Math.imul(te,Kt)|0,P=P+Math.imul(te,Yt)|0,P=P+Math.imul(ae,Kt)|0,Z=Z+Math.imul(ae,Yt)|0,z=z+Math.imul(ve,Ot)|0,P=P+Math.imul(ve,kt)|0,P=P+Math.imul(j,Ot)|0,Z=Z+Math.imul(j,kt)|0;var Wd=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+(Wd>>>26)|0,Wd&=67108863,z=Math.imul(U,Ge),P=Math.imul(U,nt),P=P+Math.imul(G,Ge)|0,Z=Math.imul(G,nt),z=z+Math.imul(ot,Ct)|0,P=P+Math.imul(ot,St)|0,P=P+Math.imul(qe,Ct)|0,Z=Z+Math.imul(qe,St)|0,z=z+Math.imul(He,Bn)|0,P=P+Math.imul(He,$n)|0,P=P+Math.imul(ct,Bn)|0,Z=Z+Math.imul(ct,$n)|0,z=z+Math.imul(vt,sn)|0,P=P+Math.imul(vt,Pe)|0,P=P+Math.imul(ut,sn)|0,Z=Z+Math.imul(ut,Pe)|0,z=z+Math.imul(lt,$t)|0,P=P+Math.imul(lt,jt)|0,P=P+Math.imul(je,$t)|0,Z=Z+Math.imul(je,jt)|0,z=z+Math.imul(Se,fn)|0,P=P+Math.imul(Se,hn)|0,P=P+Math.imul(Ie,fn)|0,Z=Z+Math.imul(Ie,hn)|0,z=z+Math.imul(L,Kt)|0,P=P+Math.imul(L,Yt)|0,P=P+Math.imul(re,Kt)|0,Z=Z+Math.imul(re,Yt)|0,z=z+Math.imul(te,Ot)|0,P=P+Math.imul(te,kt)|0,P=P+Math.imul(ae,Ot)|0,Z=Z+Math.imul(ae,kt)|0,z=z+Math.imul(ve,pn)|0,P=P+Math.imul(ve,ar)|0,P=P+Math.imul(j,pn)|0,Z=Z+Math.imul(j,ar)|0;var _c=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+(_c>>>26)|0,_c&=67108863,z=Math.imul(fe,Ge),P=Math.imul(fe,nt),P=P+Math.imul(we,Ge)|0,Z=Math.imul(we,nt),z=z+Math.imul(U,Ct)|0,P=P+Math.imul(U,St)|0,P=P+Math.imul(G,Ct)|0,Z=Z+Math.imul(G,St)|0,z=z+Math.imul(ot,Bn)|0,P=P+Math.imul(ot,$n)|0,P=P+Math.imul(qe,Bn)|0,Z=Z+Math.imul(qe,$n)|0,z=z+Math.imul(He,sn)|0,P=P+Math.imul(He,Pe)|0,P=P+Math.imul(ct,sn)|0,Z=Z+Math.imul(ct,Pe)|0,z=z+Math.imul(vt,$t)|0,P=P+Math.imul(vt,jt)|0,P=P+Math.imul(ut,$t)|0,Z=Z+Math.imul(ut,jt)|0,z=z+Math.imul(lt,fn)|0,P=P+Math.imul(lt,hn)|0,P=P+Math.imul(je,fn)|0,Z=Z+Math.imul(je,hn)|0,z=z+Math.imul(Se,Kt)|0,P=P+Math.imul(Se,Yt)|0,P=P+Math.imul(Ie,Kt)|0,Z=Z+Math.imul(Ie,Yt)|0,z=z+Math.imul(L,Ot)|0,P=P+Math.imul(L,kt)|0,P=P+Math.imul(re,Ot)|0,Z=Z+Math.imul(re,kt)|0,z=z+Math.imul(te,pn)|0,P=P+Math.imul(te,ar)|0,P=P+Math.imul(ae,pn)|0,Z=Z+Math.imul(ae,ar)|0,z=z+Math.imul(ve,Cr)|0,P=P+Math.imul(ve,jn)|0,P=P+Math.imul(j,Cr)|0,Z=Z+Math.imul(j,jn)|0;var Vd=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+(Vd>>>26)|0,Vd&=67108863,z=Math.imul(fe,Ct),P=Math.imul(fe,St),P=P+Math.imul(we,Ct)|0,Z=Math.imul(we,St),z=z+Math.imul(U,Bn)|0,P=P+Math.imul(U,$n)|0,P=P+Math.imul(G,Bn)|0,Z=Z+Math.imul(G,$n)|0,z=z+Math.imul(ot,sn)|0,P=P+Math.imul(ot,Pe)|0,P=P+Math.imul(qe,sn)|0,Z=Z+Math.imul(qe,Pe)|0,z=z+Math.imul(He,$t)|0,P=P+Math.imul(He,jt)|0,P=P+Math.imul(ct,$t)|0,Z=Z+Math.imul(ct,jt)|0,z=z+Math.imul(vt,fn)|0,P=P+Math.imul(vt,hn)|0,P=P+Math.imul(ut,fn)|0,Z=Z+Math.imul(ut,hn)|0,z=z+Math.imul(lt,Kt)|0,P=P+Math.imul(lt,Yt)|0,P=P+Math.imul(je,Kt)|0,Z=Z+Math.imul(je,Yt)|0,z=z+Math.imul(Se,Ot)|0,P=P+Math.imul(Se,kt)|0,P=P+Math.imul(Ie,Ot)|0,Z=Z+Math.imul(Ie,kt)|0,z=z+Math.imul(L,pn)|0,P=P+Math.imul(L,ar)|0,P=P+Math.imul(re,pn)|0,Z=Z+Math.imul(re,ar)|0,z=z+Math.imul(te,Cr)|0,P=P+Math.imul(te,jn)|0,P=P+Math.imul(ae,Cr)|0,Z=Z+Math.imul(ae,jn)|0;var qd=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+(qd>>>26)|0,qd&=67108863,z=Math.imul(fe,Bn),P=Math.imul(fe,$n),P=P+Math.imul(we,Bn)|0,Z=Math.imul(we,$n),z=z+Math.imul(U,sn)|0,P=P+Math.imul(U,Pe)|0,P=P+Math.imul(G,sn)|0,Z=Z+Math.imul(G,Pe)|0,z=z+Math.imul(ot,$t)|0,P=P+Math.imul(ot,jt)|0,P=P+Math.imul(qe,$t)|0,Z=Z+Math.imul(qe,jt)|0,z=z+Math.imul(He,fn)|0,P=P+Math.imul(He,hn)|0,P=P+Math.imul(ct,fn)|0,Z=Z+Math.imul(ct,hn)|0,z=z+Math.imul(vt,Kt)|0,P=P+Math.imul(vt,Yt)|0,P=P+Math.imul(ut,Kt)|0,Z=Z+Math.imul(ut,Yt)|0,z=z+Math.imul(lt,Ot)|0,P=P+Math.imul(lt,kt)|0,P=P+Math.imul(je,Ot)|0,Z=Z+Math.imul(je,kt)|0,z=z+Math.imul(Se,pn)|0,P=P+Math.imul(Se,ar)|0,P=P+Math.imul(Ie,pn)|0,Z=Z+Math.imul(Ie,ar)|0,z=z+Math.imul(L,Cr)|0,P=P+Math.imul(L,jn)|0,P=P+Math.imul(re,Cr)|0,Z=Z+Math.imul(re,jn)|0;var Ac=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+(Ac>>>26)|0,Ac&=67108863,z=Math.imul(fe,sn),P=Math.imul(fe,Pe),P=P+Math.imul(we,sn)|0,Z=Math.imul(we,Pe),z=z+Math.imul(U,$t)|0,P=P+Math.imul(U,jt)|0,P=P+Math.imul(G,$t)|0,Z=Z+Math.imul(G,jt)|0,z=z+Math.imul(ot,fn)|0,P=P+Math.imul(ot,hn)|0,P=P+Math.imul(qe,fn)|0,Z=Z+Math.imul(qe,hn)|0,z=z+Math.imul(He,Kt)|0,P=P+Math.imul(He,Yt)|0,P=P+Math.imul(ct,Kt)|0,Z=Z+Math.imul(ct,Yt)|0,z=z+Math.imul(vt,Ot)|0,P=P+Math.imul(vt,kt)|0,P=P+Math.imul(ut,Ot)|0,Z=Z+Math.imul(ut,kt)|0,z=z+Math.imul(lt,pn)|0,P=P+Math.imul(lt,ar)|0,P=P+Math.imul(je,pn)|0,Z=Z+Math.imul(je,ar)|0,z=z+Math.imul(Se,Cr)|0,P=P+Math.imul(Se,jn)|0,P=P+Math.imul(Ie,Cr)|0,Z=Z+Math.imul(Ie,jn)|0;var Ec=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+(Ec>>>26)|0,Ec&=67108863,z=Math.imul(fe,$t),P=Math.imul(fe,jt),P=P+Math.imul(we,$t)|0,Z=Math.imul(we,jt),z=z+Math.imul(U,fn)|0,P=P+Math.imul(U,hn)|0,P=P+Math.imul(G,fn)|0,Z=Z+Math.imul(G,hn)|0,z=z+Math.imul(ot,Kt)|0,P=P+Math.imul(ot,Yt)|0,P=P+Math.imul(qe,Kt)|0,Z=Z+Math.imul(qe,Yt)|0,z=z+Math.imul(He,Ot)|0,P=P+Math.imul(He,kt)|0,P=P+Math.imul(ct,Ot)|0,Z=Z+Math.imul(ct,kt)|0,z=z+Math.imul(vt,pn)|0,P=P+Math.imul(vt,ar)|0,P=P+Math.imul(ut,pn)|0,Z=Z+Math.imul(ut,ar)|0,z=z+Math.imul(lt,Cr)|0,P=P+Math.imul(lt,jn)|0,P=P+Math.imul(je,Cr)|0,Z=Z+Math.imul(je,jn)|0;var Tu=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+(Tu>>>26)|0,Tu&=67108863,z=Math.imul(fe,fn),P=Math.imul(fe,hn),P=P+Math.imul(we,fn)|0,Z=Math.imul(we,hn),z=z+Math.imul(U,Kt)|0,P=P+Math.imul(U,Yt)|0,P=P+Math.imul(G,Kt)|0,Z=Z+Math.imul(G,Yt)|0,z=z+Math.imul(ot,Ot)|0,P=P+Math.imul(ot,kt)|0,P=P+Math.imul(qe,Ot)|0,Z=Z+Math.imul(qe,kt)|0,z=z+Math.imul(He,pn)|0,P=P+Math.imul(He,ar)|0,P=P+Math.imul(ct,pn)|0,Z=Z+Math.imul(ct,ar)|0,z=z+Math.imul(vt,Cr)|0,P=P+Math.imul(vt,jn)|0,P=P+Math.imul(ut,Cr)|0,Z=Z+Math.imul(ut,jn)|0;var $s=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+($s>>>26)|0,$s&=67108863,z=Math.imul(fe,Kt),P=Math.imul(fe,Yt),P=P+Math.imul(we,Kt)|0,Z=Math.imul(we,Yt),z=z+Math.imul(U,Ot)|0,P=P+Math.imul(U,kt)|0,P=P+Math.imul(G,Ot)|0,Z=Z+Math.imul(G,kt)|0,z=z+Math.imul(ot,pn)|0,P=P+Math.imul(ot,ar)|0,P=P+Math.imul(qe,pn)|0,Z=Z+Math.imul(qe,ar)|0,z=z+Math.imul(He,Cr)|0,P=P+Math.imul(He,jn)|0,P=P+Math.imul(ct,Cr)|0,Z=Z+Math.imul(ct,jn)|0;var bo=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+(bo>>>26)|0,bo&=67108863,z=Math.imul(fe,Ot),P=Math.imul(fe,kt),P=P+Math.imul(we,Ot)|0,Z=Math.imul(we,kt),z=z+Math.imul(U,pn)|0,P=P+Math.imul(U,ar)|0,P=P+Math.imul(G,pn)|0,Z=Z+Math.imul(G,ar)|0,z=z+Math.imul(ot,Cr)|0,P=P+Math.imul(ot,jn)|0,P=P+Math.imul(qe,Cr)|0,Z=Z+Math.imul(qe,jn)|0;var Gd=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+(Gd>>>26)|0,Gd&=67108863,z=Math.imul(fe,pn),P=Math.imul(fe,ar),P=P+Math.imul(we,pn)|0,Z=Math.imul(we,ar),z=z+Math.imul(U,Cr)|0,P=P+Math.imul(U,jn)|0,P=P+Math.imul(G,Cr)|0,Z=Z+Math.imul(G,jn)|0;var Kd=(W+z|0)+((P&8191)<<13)|0;W=(Z+(P>>>13)|0)+(Kd>>>26)|0,Kd&=67108863,z=Math.imul(fe,Cr),P=Math.imul(fe,jn),P=P+Math.imul(we,Cr)|0,Z=Math.imul(we,jn);var Yd=(W+z|0)+((P&8191)<<13)|0;return W=(Z+(P>>>13)|0)+(Yd>>>26)|0,Yd&=67108863,M[0]=yo,M[1]=eo,M[2]=Go,M[3]=vo,M[4]=Ko,M[5]=es,M[6]=ws,M[7]=Wd,M[8]=_c,M[9]=Vd,M[10]=qd,M[11]=Ac,M[12]=Ec,M[13]=Tu,M[14]=$s,M[15]=bo,M[16]=Gd,M[17]=Kd,M[18]=Yd,W!==0&&(M[19]=W,y.length++),y};Math.imul||(b=T);function k(x,E,y){y.negative=E.negative^x.negative,y.length=x.length+E.length;for(var I=0,B=0,M=0;M<y.length-1;M++){var W=B;B=0;for(var z=I&67108863,P=Math.min(M,E.length-1),Z=Math.max(0,M-x.length+1);Z<=P;Z++){var he=M-Z,ve=x.words[he]|0,j=E.words[Z]|0,ge=ve*j,te=ge&67108863;W=W+(ge/67108864|0)|0,te=te+z|0,z=te&67108863,W=W+(te>>>26)|0,B+=W>>>26,W&=67108863}y.words[M]=z,I=W,W=B}return I!==0?y.words[M]=I:y.length--,y._strip()}function D(x,E,y){return k(x,E,y)}s.prototype.mulTo=function(x,E){var y,I=this.length+x.length;return this.length===10&&x.length===10?y=b(this,x,E):I<63?y=T(this,x,E):I<1024?y=k(this,x,E):y=D(this,x,E),y},s.prototype.mul=function(x){var E=new s(null);return E.words=new Array(this.length+x.length),this.mulTo(x,E)},s.prototype.mulf=function(x){var E=new s(null);return E.words=new Array(this.length+x.length),D(this,x,E)},s.prototype.imul=function(x){return this.clone().mulTo(x,this)},s.prototype.imuln=function(x){var E=x<0;E&&(x=-x),r(typeof x=="number"),r(x<67108864);for(var y=0,I=0;I<this.length;I++){var B=(this.words[I]|0)*x,M=(B&67108863)+(y&67108863);y>>=26,y+=B/67108864|0,y+=M>>>26,this.words[I]=M&67108863}return y!==0&&(this.words[I]=y,this.length++),E?this.ineg():this},s.prototype.muln=function(x){return this.clone().imuln(x)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(x){var E=_(x);if(E.length===0)return new s(1);for(var y=this,I=0;I<E.length&&E[I]===0;I++,y=y.sqr());if(++I<E.length)for(var B=y.sqr();I<E.length;I++,B=B.sqr())E[I]!==0&&(y=y.mul(B));return y},s.prototype.iushln=function(x){r(typeof x=="number"&&x>=0);var E=x%26,y=(x-E)/26,I=67108863>>>26-E<<26-E,B;if(E!==0){var M=0;for(B=0;B<this.length;B++){var W=this.words[B]&I,z=(this.words[B]|0)-W<<E;this.words[B]=z|M,M=W>>>26-E}M&&(this.words[B]=M,this.length++)}if(y!==0){for(B=this.length-1;B>=0;B--)this.words[B+y]=this.words[B];for(B=0;B<y;B++)this.words[B]=0;this.length+=y}return this._strip()},s.prototype.ishln=function(x){return r(this.negative===0),this.iushln(x)},s.prototype.iushrn=function(x,E,y){r(typeof x=="number"&&x>=0);var I;E?I=(E-E%26)/26:I=0;var B=x%26,M=Math.min((x-B)/26,this.length),W=67108863^67108863>>>B<<B,z=y;if(I-=M,I=Math.max(0,I),z){for(var P=0;P<M;P++)z.words[P]=this.words[P];z.length=M}if(M!==0)if(this.length>M)for(this.length-=M,P=0;P<this.length;P++)this.words[P]=this.words[P+M];else this.words[0]=0,this.length=1;var Z=0;for(P=this.length-1;P>=0&&(Z!==0||P>=I);P--){var he=this.words[P]|0;this.words[P]=Z<<26-B|he>>>B,Z=he&W}return z&&Z!==0&&(z.words[z.length++]=Z),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(x,E,y){return r(this.negative===0),this.iushrn(x,E,y)},s.prototype.shln=function(x){return this.clone().ishln(x)},s.prototype.ushln=function(x){return this.clone().iushln(x)},s.prototype.shrn=function(x){return this.clone().ishrn(x)},s.prototype.ushrn=function(x){return this.clone().iushrn(x)},s.prototype.testn=function(x){r(typeof x=="number"&&x>=0);var E=x%26,y=(x-E)/26,I=1<<E;if(this.length<=y)return!1;var B=this.words[y];return!!(B&I)},s.prototype.imaskn=function(x){r(typeof x=="number"&&x>=0);var E=x%26,y=(x-E)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(E!==0&&y++,this.length=Math.min(y,this.length),E!==0){var I=67108863^67108863>>>E<<E;this.words[this.length-1]&=I}return this._strip()},s.prototype.maskn=function(x){return this.clone().imaskn(x)},s.prototype.iaddn=function(x){return r(typeof x=="number"),r(x<67108864),x<0?this.isubn(-x):this.negative!==0?this.length===1&&(this.words[0]|0)<=x?(this.words[0]=x-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(x),this.negative=1,this):this._iaddn(x)},s.prototype._iaddn=function(x){this.words[0]+=x;for(var E=0;E<this.length&&this.words[E]>=67108864;E++)this.words[E]-=67108864,E===this.length-1?this.words[E+1]=1:this.words[E+1]++;return this.length=Math.max(this.length,E+1),this},s.prototype.isubn=function(x){if(r(typeof x=="number"),r(x<67108864),x<0)return this.iaddn(-x);if(this.negative!==0)return this.negative=0,this.iaddn(x),this.negative=1,this;if(this.words[0]-=x,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var E=0;E<this.length&&this.words[E]<0;E++)this.words[E]+=67108864,this.words[E+1]-=1;return this._strip()},s.prototype.addn=function(x){return this.clone().iaddn(x)},s.prototype.subn=function(x){return this.clone().isubn(x)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(x,E,y){var I=x.length+y,B;this._expand(I);var M,W=0;for(B=0;B<x.length;B++){M=(this.words[B+y]|0)+W;var z=(x.words[B]|0)*E;M-=z&67108863,W=(M>>26)-(z/67108864|0),this.words[B+y]=M&67108863}for(;B<this.length-y;B++)M=(this.words[B+y]|0)+W,W=M>>26,this.words[B+y]=M&67108863;if(W===0)return this._strip();for(r(W===-1),W=0,B=0;B<this.length;B++)M=-(this.words[B]|0)+W,W=M>>26,this.words[B]=M&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(x,E){var y=this.length-x.length,I=this.clone(),B=x,M=B.words[B.length-1]|0,W=this._countBits(M);y=26-W,y!==0&&(B=B.ushln(y),I.iushln(y),M=B.words[B.length-1]|0);var z=I.length-B.length,P;if(E!=="mod"){P=new s(null),P.length=z+1,P.words=new Array(P.length);for(var Z=0;Z<P.length;Z++)P.words[Z]=0}var he=I.clone()._ishlnsubmul(B,1,z);he.negative===0&&(I=he,P&&(P.words[z]=1));for(var ve=z-1;ve>=0;ve--){var j=(I.words[B.length+ve]|0)*67108864+(I.words[B.length+ve-1]|0);for(j=Math.min(j/M|0,67108863),I._ishlnsubmul(B,j,ve);I.negative!==0;)j--,I.negative=0,I._ishlnsubmul(B,1,ve),I.isZero()||(I.negative^=1);P&&(P.words[ve]=j)}return P&&P._strip(),I._strip(),E!=="div"&&y!==0&&I.iushrn(y),{div:P||null,mod:I}},s.prototype.divmod=function(x,E,y){if(r(!x.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var I,B,M;return this.negative!==0&&x.negative===0?(M=this.neg().divmod(x,E),E!=="mod"&&(I=M.div.neg()),E!=="div"&&(B=M.mod.neg(),y&&B.negative!==0&&B.iadd(x)),{div:I,mod:B}):this.negative===0&&x.negative!==0?(M=this.divmod(x.neg(),E),E!=="mod"&&(I=M.div.neg()),{div:I,mod:M.mod}):this.negative&x.negative?(M=this.neg().divmod(x.neg(),E),E!=="div"&&(B=M.mod.neg(),y&&B.negative!==0&&B.isub(x)),{div:M.div,mod:B}):x.length>this.length||this.cmp(x)<0?{div:new s(0),mod:this}:x.length===1?E==="div"?{div:this.divn(x.words[0]),mod:null}:E==="mod"?{div:null,mod:new s(this.modrn(x.words[0]))}:{div:this.divn(x.words[0]),mod:new s(this.modrn(x.words[0]))}:this._wordDiv(x,E)},s.prototype.div=function(x){return this.divmod(x,"div",!1).div},s.prototype.mod=function(x){return this.divmod(x,"mod",!1).mod},s.prototype.umod=function(x){return this.divmod(x,"mod",!0).mod},s.prototype.divRound=function(x){var E=this.divmod(x);if(E.mod.isZero())return E.div;var y=E.div.negative!==0?E.mod.isub(x):E.mod,I=x.ushrn(1),B=x.andln(1),M=y.cmp(I);return M<0||B===1&&M===0?E.div:E.div.negative!==0?E.div.isubn(1):E.div.iaddn(1)},s.prototype.modrn=function(x){var E=x<0;E&&(x=-x),r(x<=67108863);for(var y=(1<<26)%x,I=0,B=this.length-1;B>=0;B--)I=(y*I+(this.words[B]|0))%x;return E?-I:I},s.prototype.modn=function(x){return this.modrn(x)},s.prototype.idivn=function(x){var E=x<0;E&&(x=-x),r(x<=67108863);for(var y=0,I=this.length-1;I>=0;I--){var B=(this.words[I]|0)+y*67108864;this.words[I]=B/x|0,y=B%x}return this._strip(),E?this.ineg():this},s.prototype.divn=function(x){return this.clone().idivn(x)},s.prototype.egcd=function(x){r(x.negative===0),r(!x.isZero());var E=this,y=x.clone();E.negative!==0?E=E.umod(x):E=E.clone();for(var I=new s(1),B=new s(0),M=new s(0),W=new s(1),z=0;E.isEven()&&y.isEven();)E.iushrn(1),y.iushrn(1),++z;for(var P=y.clone(),Z=E.clone();!E.isZero();){for(var he=0,ve=1;!(E.words[0]&ve)&&he<26;++he,ve<<=1);if(he>0)for(E.iushrn(he);he-- >0;)(I.isOdd()||B.isOdd())&&(I.iadd(P),B.isub(Z)),I.iushrn(1),B.iushrn(1);for(var j=0,ge=1;!(y.words[0]&ge)&&j<26;++j,ge<<=1);if(j>0)for(y.iushrn(j);j-- >0;)(M.isOdd()||W.isOdd())&&(M.iadd(P),W.isub(Z)),M.iushrn(1),W.iushrn(1);E.cmp(y)>=0?(E.isub(y),I.isub(M),B.isub(W)):(y.isub(E),M.isub(I),W.isub(B))}return{a:M,b:W,gcd:y.iushln(z)}},s.prototype._invmp=function(x){r(x.negative===0),r(!x.isZero());var E=this,y=x.clone();E.negative!==0?E=E.umod(x):E=E.clone();for(var I=new s(1),B=new s(0),M=y.clone();E.cmpn(1)>0&&y.cmpn(1)>0;){for(var W=0,z=1;!(E.words[0]&z)&&W<26;++W,z<<=1);if(W>0)for(E.iushrn(W);W-- >0;)I.isOdd()&&I.iadd(M),I.iushrn(1);for(var P=0,Z=1;!(y.words[0]&Z)&&P<26;++P,Z<<=1);if(P>0)for(y.iushrn(P);P-- >0;)B.isOdd()&&B.iadd(M),B.iushrn(1);E.cmp(y)>=0?(E.isub(y),I.isub(B)):(y.isub(E),B.isub(I))}var he;return E.cmpn(1)===0?he=I:he=B,he.cmpn(0)<0&&he.iadd(x),he},s.prototype.gcd=function(x){if(this.isZero())return x.abs();if(x.isZero())return this.abs();var E=this.clone(),y=x.clone();E.negative=0,y.negative=0;for(var I=0;E.isEven()&&y.isEven();I++)E.iushrn(1),y.iushrn(1);do{for(;E.isEven();)E.iushrn(1);for(;y.isEven();)y.iushrn(1);var B=E.cmp(y);if(B<0){var M=E;E=y,y=M}else if(B===0||y.cmpn(1)===0)break;E.isub(y)}while(!0);return y.iushln(I)},s.prototype.invm=function(x){return this.egcd(x).a.umod(x)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(x){return this.words[0]&x},s.prototype.bincn=function(x){r(typeof x=="number");var E=x%26,y=(x-E)/26,I=1<<E;if(this.length<=y)return this._expand(y+1),this.words[y]|=I,this;for(var B=I,M=y;B!==0&&M<this.length;M++){var W=this.words[M]|0;W+=B,B=W>>>26,W&=67108863,this.words[M]=W}return B!==0&&(this.words[M]=B,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(x){var E=x<0;if(this.negative!==0&&!E)return-1;if(this.negative===0&&E)return 1;this._strip();var y;if(this.length>1)y=1;else{E&&(x=-x),r(x<=67108863,"Number is too big");var I=this.words[0]|0;y=I===x?0:I<x?-1:1}return this.negative!==0?-y|0:y},s.prototype.cmp=function(x){if(this.negative!==0&&x.negative===0)return-1;if(this.negative===0&&x.negative!==0)return 1;var E=this.ucmp(x);return this.negative!==0?-E|0:E},s.prototype.ucmp=function(x){if(this.length>x.length)return 1;if(this.length<x.length)return-1;for(var E=0,y=this.length-1;y>=0;y--){var I=this.words[y]|0,B=x.words[y]|0;if(I!==B){I<B?E=-1:I>B&&(E=1);break}}return E},s.prototype.gtn=function(x){return this.cmpn(x)===1},s.prototype.gt=function(x){return this.cmp(x)===1},s.prototype.gten=function(x){return this.cmpn(x)>=0},s.prototype.gte=function(x){return this.cmp(x)>=0},s.prototype.ltn=function(x){return this.cmpn(x)===-1},s.prototype.lt=function(x){return this.cmp(x)===-1},s.prototype.lten=function(x){return this.cmpn(x)<=0},s.prototype.lte=function(x){return this.cmp(x)<=0},s.prototype.eqn=function(x){return this.cmpn(x)===0},s.prototype.eq=function(x){return this.cmp(x)===0},s.red=function(x){return new Y(x)},s.prototype.toRed=function(x){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),x.convertTo(this)._forceRed(x)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(x){return this.red=x,this},s.prototype.forceRed=function(x){return r(!this.red,"Already a number in reduction context"),this._forceRed(x)},s.prototype.redAdd=function(x){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,x)},s.prototype.redIAdd=function(x){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,x)},s.prototype.redSub=function(x){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,x)},s.prototype.redISub=function(x){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,x)},s.prototype.redShl=function(x){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,x)},s.prototype.redMul=function(x){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,x),this.red.mul(this,x)},s.prototype.redIMul=function(x){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,x),this.red.imul(this,x)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(x){return r(this.red&&!x.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,x)};var O={k256:null,p224:null,p192:null,p25519:null};function $(x,E){this.name=x,this.p=new s(E,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var x=new s(null);return x.words=new Array(Math.ceil(this.n/13)),x},$.prototype.ireduce=function(x){var E=x,y;do this.split(E,this.tmp),E=this.imulK(E),E=E.iadd(this.tmp),y=E.bitLength();while(y>this.n);var I=y<this.n?-1:E.ucmp(this.p);return I===0?(E.words[0]=0,E.length=1):I>0?E.isub(this.p):E.strip!==void 0?E.strip():E._strip(),E},$.prototype.split=function(x,E){x.iushrn(this.n,0,E)},$.prototype.imulK=function(x){return x.imul(this.k)};function C(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(C,$),C.prototype.split=function(x,E){for(var y=4194303,I=Math.min(x.length,9),B=0;B<I;B++)E.words[B]=x.words[B];if(E.length=I,x.length<=9){x.words[0]=0,x.length=1;return}var M=x.words[9];for(E.words[E.length++]=M&y,B=10;B<x.length;B++){var W=x.words[B]|0;x.words[B-10]=(W&y)<<4|M>>>22,M=W}M>>>=22,x.words[B-10]=M,M===0&&x.length>10?x.length-=10:x.length-=9},C.prototype.imulK=function(x){x.words[x.length]=0,x.words[x.length+1]=0,x.length+=2;for(var E=0,y=0;y<x.length;y++){var I=x.words[y]|0;E+=I*977,x.words[y]=E&67108863,E=I*64+(E/67108864|0)}return x.words[x.length-1]===0&&(x.length--,x.words[x.length-1]===0&&x.length--),x};function A(){$.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(A,$);function H(){$.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(H,$);function V(){$.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(V,$),V.prototype.imulK=function(x){for(var E=0,y=0;y<x.length;y++){var I=(x.words[y]|0)*19+E,B=I&67108863;I>>>=26,x.words[y]=B,E=I}return E!==0&&(x.words[x.length++]=E),x},s._prime=function(x){if(O[x])return O[x];var E;if(x==="k256")E=new C;else if(x==="p224")E=new A;else if(x==="p192")E=new H;else if(x==="p25519")E=new V;else throw new Error("Unknown prime "+x);return O[x]=E,E};function Y(x){if(typeof x=="string"){var E=s._prime(x);this.m=E.p,this.prime=E}else r(x.gtn(1),"modulus must be greater than 1"),this.m=x,this.prime=null}Y.prototype._verify1=function(x){r(x.negative===0,"red works only with positives"),r(x.red,"red works only with red numbers")},Y.prototype._verify2=function(x,E){r((x.negative|E.negative)===0,"red works only with positives"),r(x.red&&x.red===E.red,"red works only with red numbers")},Y.prototype.imod=function(x){return this.prime?this.prime.ireduce(x)._forceRed(this):(u(x,x.umod(this.m)._forceRed(this)),x)},Y.prototype.neg=function(x){return x.isZero()?x.clone():this.m.sub(x)._forceRed(this)},Y.prototype.add=function(x,E){this._verify2(x,E);var y=x.add(E);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},Y.prototype.iadd=function(x,E){this._verify2(x,E);var y=x.iadd(E);return y.cmp(this.m)>=0&&y.isub(this.m),y},Y.prototype.sub=function(x,E){this._verify2(x,E);var y=x.sub(E);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},Y.prototype.isub=function(x,E){this._verify2(x,E);var y=x.isub(E);return y.cmpn(0)<0&&y.iadd(this.m),y},Y.prototype.shl=function(x,E){return this._verify1(x),this.imod(x.ushln(E))},Y.prototype.imul=function(x,E){return this._verify2(x,E),this.imod(x.imul(E))},Y.prototype.mul=function(x,E){return this._verify2(x,E),this.imod(x.mul(E))},Y.prototype.isqr=function(x){return this.imul(x,x.clone())},Y.prototype.sqr=function(x){return this.mul(x,x)},Y.prototype.sqrt=function(x){if(x.isZero())return x.clone();var E=this.m.andln(3);if(r(E%2===1),E===3){var y=this.m.add(new s(1)).iushrn(2);return this.pow(x,y)}for(var I=this.m.subn(1),B=0;!I.isZero()&&I.andln(1)===0;)B++,I.iushrn(1);r(!I.isZero());var M=new s(1).toRed(this),W=M.redNeg(),z=this.m.subn(1).iushrn(1),P=this.m.bitLength();for(P=new s(2*P*P).toRed(this);this.pow(P,z).cmp(W)!==0;)P.redIAdd(W);for(var Z=this.pow(P,I),he=this.pow(x,I.addn(1).iushrn(1)),ve=this.pow(x,I),j=B;ve.cmp(M)!==0;){for(var ge=ve,te=0;ge.cmp(M)!==0;te++)ge=ge.redSqr();r(te<j);var ae=this.pow(Z,new s(1).iushln(j-te-1));he=he.redMul(ae),Z=ae.redSqr(),ve=ve.redMul(Z),j=te}return he},Y.prototype.invm=function(x){var E=x._invmp(this.m);return E.negative!==0?(E.negative=0,this.imod(E).redNeg()):this.imod(E)},Y.prototype.pow=function(x,E){if(E.isZero())return new s(1).toRed(this);if(E.cmpn(1)===0)return x.clone();var y=4,I=new Array(1<<y);I[0]=new s(1).toRed(this),I[1]=x;for(var B=2;B<I.length;B++)I[B]=this.mul(I[B-1],x);var M=I[0],W=0,z=0,P=E.bitLength()%26;for(P===0&&(P=26),B=E.length-1;B>=0;B--){for(var Z=E.words[B],he=P-1;he>=0;he--){var ve=Z>>he&1;if(M!==I[0]&&(M=this.sqr(M)),ve===0&&W===0){z=0;continue}W<<=1,W|=ve,z++,!(z!==y&&(B!==0||he!==0))&&(M=this.mul(M,I[W]),z=0,W=0)}P=26}return M},Y.prototype.convertTo=function(x){var E=x.umod(this.m);return E===x?E.clone():E},Y.prototype.convertFrom=function(x){var E=x.clone();return E.red=null,E},s.mont=function(x){return new ee(x)};function ee(x){Y.call(this,x),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ee,Y),ee.prototype.convertTo=function(x){return this.imod(x.ushln(this.shift))},ee.prototype.convertFrom=function(x){var E=this.imod(x.mul(this.rinv));return E.red=null,E},ee.prototype.imul=function(x,E){if(x.isZero()||E.isZero())return x.words[0]=0,x.length=1,x;var y=x.imul(E),I=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=y.isub(I).iushrn(this.shift),M=B;return B.cmp(this.m)>=0?M=B.isub(this.m):B.cmpn(0)<0&&(M=B.iadd(this.m)),M._forceRed(this)},ee.prototype.mul=function(x,E){if(x.isZero()||E.isZero())return new s(0)._forceRed(this);var y=x.mul(E),I=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=y.isub(I).iushrn(this.shift),M=B;return B.cmp(this.m)>=0?M=B.isub(this.m):B.cmpn(0)<0&&(M=B.iadd(this.m)),M._forceRed(this)},ee.prototype.invm=function(x){var E=this.imod(x._invmp(this.m).mul(this.r2));return E._forceRed(this)}})(t,GZ)})(ZZ);var Rn=ZZ.exports;const JZ="bignumber/5.7.0";var WE=Rn.BN;const Nf=new Vs(JZ),II={},nH=9007199254740991;function xve(t){return t!=null&&(Mo.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Xa(t)||typeof t=="bigint"||yb(t))}let rH=!1,Mo=class Ul{constructor(e,n){e!==II&&Nf.throwError("cannot call constructor directly; use BigNumber.from",Vs.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=n,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return na(nr(this).fromTwos(e))}toTwos(e){return na(nr(this).toTwos(e))}abs(){return this._hex[0]==="-"?Ul.from(this._hex.substring(1)):this}add(e){return na(nr(this).add(nr(e)))}sub(e){return na(nr(this).sub(nr(e)))}div(e){return Ul.from(e).isZero()&&Dc("division-by-zero","div"),na(nr(this).div(nr(e)))}mul(e){return na(nr(this).mul(nr(e)))}mod(e){const n=nr(e);return n.isNeg()&&Dc("division-by-zero","mod"),na(nr(this).umod(n))}pow(e){const n=nr(e);return n.isNeg()&&Dc("negative-power","pow"),na(nr(this).pow(n))}and(e){const n=nr(e);return(this.isNegative()||n.isNeg())&&Dc("unbound-bitwise-result","and"),na(nr(this).and(n))}or(e){const n=nr(e);return(this.isNegative()||n.isNeg())&&Dc("unbound-bitwise-result","or"),na(nr(this).or(n))}xor(e){const n=nr(e);return(this.isNegative()||n.isNeg())&&Dc("unbound-bitwise-result","xor"),na(nr(this).xor(n))}mask(e){return(this.isNegative()||e<0)&&Dc("negative-width","mask"),na(nr(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Dc("negative-width","shl"),na(nr(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Dc("negative-width","shr"),na(nr(this).shrn(e))}eq(e){return nr(this).eq(nr(e))}lt(e){return nr(this).lt(nr(e))}lte(e){return nr(this).lte(nr(e))}gt(e){return nr(this).gt(nr(e))}gte(e){return nr(this).gte(nr(e))}isNegative(){return this._hex[0]==="-"}isZero(){return nr(this).isZero()}toNumber(){try{return nr(this).toNumber()}catch{Dc("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Nf.throwError("this platform does not support BigInt",Vs.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?rH||(rH=!0,Nf.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Nf.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",Vs.errors.UNEXPECTED_ARGUMENT,{}):Nf.throwError("BigNumber.toString does not accept parameters",Vs.errors.UNEXPECTED_ARGUMENT,{})),nr(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Ul)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new Ul(II,p5(e)):e.match(/^-?[0-9]+$/)?new Ul(II,p5(new WE(e))):Nf.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Dc("underflow","BigNumber.from",e),(e>=nH||e<=-nH)&&Dc("overflow","BigNumber.from",e),Ul.from(String(e));const n=e;if(typeof n=="bigint")return Ul.from(n.toString());if(yb(n))return Ul.from(ua(n));if(n)if(n.toHexString){const r=n.toHexString();if(typeof r=="string")return Ul.from(r)}else{let r=n._hex;if(r==null&&n.type==="BigNumber"&&(r=n.hex),typeof r=="string"&&(Xa(r)||r[0]==="-"&&Xa(r.substring(1))))return Ul.from(r)}return Nf.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function p5(t){if(typeof t!="string")return p5(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Nf.throwArgumentError("invalid hex","value",t),t=p5(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function na(t){return Mo.from(p5(t))}function nr(t){const e=Mo.from(t).toHexString();return e[0]==="-"?new WE("-"+e.substring(3),16):new WE(e.substring(2),16)}function Dc(t,e,n){const r={fault:t,operation:e};return n!=null&&(r.value=n),Nf.throwError(t,Vs.errors.NUMERIC_FAULT,r)}function _ve(t){return new WE(t,36).toString(16)}const ko=new Vs(JZ),k3={},XZ=Mo.from(0),eJ=Mo.from(-1);function tJ(t,e,n,r){const i={fault:e,operation:n};return r!==void 0&&(i.value=r),ko.throwError(t,Vs.errors.NUMERIC_FAULT,i)}let R3="0";for(;R3.length<256;)R3+=R3;function $M(t){if(typeof t!="number")try{t=Mo.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+R3.substring(0,t):ko.throwArgumentError("invalid decimal size","decimals",t)}function kI(t,e){e==null&&(e=0);const n=$M(e);t=Mo.from(t);const r=t.lt(XZ);r&&(t=t.mul(eJ));let i=t.mod(n).toString();for(;i.length<n.length-1;)i="0"+i;i=i.match(/^([0-9]*[1-9]|0)(0*)/)[1];const s=t.div(n).toString();return n.length===1?t=s:t=s+"."+i,r&&(t="-"+t),t}function hf(t,e){e==null&&(e=0);const n=$M(e);(typeof t!="string"||!t.match(/^-?[0-9.]+$/))&&ko.throwArgumentError("invalid decimal value","value",t);const r=t.substring(0,1)==="-";r&&(t=t.substring(1)),t==="."&&ko.throwArgumentError("missing value","value",t);const i=t.split(".");i.length>2&&ko.throwArgumentError("too many decimal points","value",t);let s=i[0],o=i[1];for(s||(s="0"),o||(o="0");o[o.length-1]==="0";)o=o.substring(0,o.length-1);for(o.length>n.length-1&&tJ("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.length<n.length-1;)o+="0";const a=Mo.from(s),c=Mo.from(o);let l=a.mul(n).add(c);return r&&(l=l.mul(eJ)),l}let RI=class PN{constructor(e,n,r,i){e!==k3&&ko.throwError("cannot use FixedFormat constructor; use FixedFormat.from",Vs.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=n,this.width=r,this.decimals=i,this.name=(n?"":"u")+"fixed"+String(r)+"x"+String(i),this._multiplier=$M(i),Object.freeze(this)}static from(e){if(e instanceof PN)return e;typeof e=="number"&&(e=`fixed128x${e}`);let n=!0,r=128,i=18;if(typeof e=="string"){if(e!=="fixed")if(e==="ufixed")n=!1;else{const s=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);s||ko.throwArgumentError("invalid fixed format","format",e),n=s[1]!=="u",r=parseInt(s[2]),i=parseInt(s[3])}}else if(e){const s=(o,a,c)=>e[o]==null?c:(typeof e[o]!==a&&ko.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);n=s("signed","boolean",n),r=s("width","number",r),i=s("decimals","number",i)}return r%8&&ko.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),i>80&&ko.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new PN(k3,n,r,i)}},nJ=class Co{constructor(e,n,r,i){e!==k3&&ko.throwError("cannot use FixedNumber constructor; use FixedNumber.from",Vs.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=n,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&ko.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const n=hf(this._value,this.format.decimals),r=hf(e._value,e.format.decimals);return Co.fromValue(n.add(r),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const n=hf(this._value,this.format.decimals),r=hf(e._value,e.format.decimals);return Co.fromValue(n.sub(r),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const n=hf(this._value,this.format.decimals),r=hf(e._value,e.format.decimals);return Co.fromValue(n.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const n=hf(this._value,this.format.decimals),r=hf(e._value,e.format.decimals);return Co.fromValue(n.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let n=Co.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return this.isNegative()&&r&&(n=n.subUnsafe(iH.toFormat(n.format))),n}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let n=Co.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return!this.isNegative()&&r&&(n=n.addUnsafe(iH.toFormat(n.format))),n}round(e){e==null&&(e=0);const n=this.toString().split(".");if(n.length===1&&n.push("0"),(e<0||e>80||e%1)&&ko.throwArgumentError("invalid decimal count","decimals",e),n[1].length<=e)return this;const r=Co.from("1"+R3.substring(0,e),this.format),i=Ave.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(i).floor().divUnsafe(r)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&ko.throwArgumentError("invalid byte width","width",e);const n=Mo.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return ad(n,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return Co.fromString(this._value,e)}static fromValue(e,n,r){return r==null&&n!=null&&!xve(n)&&(r=n,n=null),n==null&&(n=0),r==null&&(r="fixed"),Co.fromString(kI(e,n),RI.from(r))}static fromString(e,n){n==null&&(n="fixed");const r=RI.from(n),i=hf(e,r.decimals);!r.signed&&i.lt(XZ)&&tJ("unsigned value cannot be negative","overflow","value",e);let s=null;r.signed?s=i.toTwos(r.width).toHexString():(s=i.toHexString(),s=ad(s,r.width/8));const o=kI(i,r.decimals);return new Co(k3,s,o,r)}static fromBytes(e,n){n==null&&(n="fixed");const r=RI.from(n);if(Di(e).length>r.width/8)throw new Error("overflow");let i=Mo.from(e);r.signed&&(i=i.fromTwos(r.width));const s=i.toTwos((r.signed?0:1)+r.width).toHexString(),o=kI(i,r.decimals);return new Co(k3,s,o,r)}static from(e,n){if(typeof e=="string")return Co.fromString(e,n);if(yb(e))return Co.fromBytes(e,n);try{return Co.fromValue(e,0,n)}catch(r){if(r.code!==Vs.errors.INVALID_ARGUMENT)throw r}return ko.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}};const iH=nJ.from(1),Ave=nJ.from("0.5"),Eve="strings/5.7.0",Cve=new Vs(Eve);var VE;(function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"})(VE||(VE={}));var sH;(function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"})(sH||(sH={}));function NI(t,e=VE.current){e!=VE.current&&(Cve.checkNormalize(),t=t.normalize(e));let n=[];for(let r=0;r<t.length;r++){const i=t.charCodeAt(r);if(i<128)n.push(i);else if(i<2048)n.push(i>>6|192),n.push(i&63|128);else if((i&64512)==55296){r++;const s=t.charCodeAt(r);if(r>=t.length||(s&64512)!==56320)throw new Error("invalid utf-8 string");const o=65536+((i&1023)<<10)+(s&1023);n.push(o>>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(o&63|128)}else n.push(i>>12|224),n.push(i>>6&63|128),n.push(i&63|128)}return Di(n)}function Sve(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let n=0;n<t.length;n+=4)e.push(parseInt(t.substring(n,n+4),16));return e}function PI(t,e){e||(e=function(i){return[parseInt(i,16)]});let n=0,r={};return t.split(",").forEach(i=>{let s=i.split(":");n+=parseInt(s[0],16),r[n]=e(s[1])}),r}function oH(t){let e=0;return t.split(",").map(n=>{let r=n.split("-");r.length===1?r[1]="0":r[1]===""&&(r[1]="1");let i=e+parseInt(r[0],16);return e=parseInt(r[1],16),{l:i,h:e}})}oH("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),PI("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),PI("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),PI("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",Sve),oH("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function Tve(t){t=atob(t);const e=[];for(let n=0;n<t.length;n++)e.push(t.charCodeAt(n));return Di(e)}function rJ(t,e){e==null&&(e=1);const n=[],r=n.forEach,i=function(s,o){r.call(s,function(a){o>0&&Array.isArray(a)?i(a,o-1):n.push(a)})};return i(t,e),n}function Ive(t){const e={};for(let n=0;n<t.length;n++){const r=t[n];e[r[0]]=r[1]}return e}function kve(t){let e=0;function n(){return t[e++]<<8|t[e++]}let r=n(),i=1,s=[0,1];for(let O=1;O<r;O++)s.push(i+=n());let o=n(),a=e;e+=o;let c=0,l=0;function u(){return c==0&&(l=l<<8|t[e++],c=8),l>>--c&1}const d=31,h=Math.pow(2,d),g=h>>>1,w=g>>1,v=h-1;let _=0;for(let O=0;O<d;O++)_=_<<1|u();let T=[],b=0,k=h;for(;;){let O=Math.floor(((_-b+1)*i-1)/k),$=0,C=r;for(;C-$>1;){let V=$+C>>>1;O<s[V]?C=V:$=V}if($==0)break;T.push($);let A=b+Math.floor(k*s[$]/i),H=b+Math.floor(k*s[$+1]/i)-1;for(;!((A^H)&g);)_=_<<1&v|u(),A=A<<1&v,H=H<<1&v|1;for(;A&~H&w;)_=_&g|_<<1&v>>>1|u(),A=A<<1^g,H=(H^g)<<1|g|1;b=A,k=1+H-A}let D=r-4;return T.map(O=>{switch(O-D){case 3:return D+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return D+256+(t[a++]<<8|t[a++]);case 1:return D+t[a++];default:return O-1}})}function Rve(t){let e=0;return()=>t[e++]}function Nve(t){return Rve(kve(t))}function Pve(t){return t&1?~t>>1:t>>1}function Ove(t,e){let n=Array(t);for(let r=0;r<t;r++)n[r]=1+e();return n}function aH(t,e){let n=Array(t);for(let r=0,i=-1;r<t;r++)n[r]=i+=1+e();return n}function Dve(t,e){let n=Array(t);for(let r=0,i=0;r<t;r++)n[r]=i+=Pve(e());return n}function qE(t,e){let n=aH(t(),t),r=t(),i=aH(r,t),s=Ove(r,t);for(let o=0;o<r;o++)for(let a=0;a<s[o];a++)n.push(i[o]+a);return e?n.map(o=>e[o]):n}function Mve(t){let e=[];for(;;){let n=t();if(n==0)break;e.push($ve(n,t))}for(;;){let n=t()-1;if(n<0)break;e.push(jve(n,t))}return Ive(rJ(e))}function Bve(t){let e=[];for(;;){let n=t();if(n==0)break;e.push(n)}return e}function iJ(t,e,n){let r=Array(t).fill(void 0).map(()=>[]);for(let i=0;i<e;i++)Dve(t,n).forEach((s,o)=>r[o].push(s));return r}function $ve(t,e){let n=1+e(),r=e(),i=Bve(e),s=iJ(i.length,1+t,e);return rJ(s.map((o,a)=>{const c=o[0],l=o.slice(1);return Array(i[a]).fill(void 0).map((u,d)=>{let h=d*r;return[c+d*n,l.map(g=>g+h)]})}))}function jve(t,e){let n=1+e();return iJ(n,1+t,e).map(r=>[r[0],r.slice(1)])}function Lve(t){let e=qE(t).sort((r,i)=>r-i);return n();function n(){let r=[];for(;;){let l=qE(t,e);if(l.length==0)break;r.push({set:new Set(l),node:n()})}r.sort((l,u)=>u.set.size-l.set.size);let i=t(),s=i%3;i=i/3|0;let o=!!(i&1);i>>=1;let a=i==1,c=i==2;return{branches:r,valid:s,fe0f:o,save:a,check:c}}}function Uve(){return Nve(Tve("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const F_=Uve();new Set(qE(F_)),new Set(qE(F_)),Mve(F_),Lve(F_);const Fve=new Uint8Array(32);Fve.fill(0);const zve=`Ethereum Signed Message:
`;function sJ(t){return typeof t=="string"&&(t=NI(t)),BM(mve([NI(zve),NI(String(t.length)),t]))}const Hve="address/5.7.0",t3=new Vs(Hve);function cH(t){Xa(t,20)||t3.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),n=new Uint8Array(40);for(let i=0;i<40;i++)n[i]=e[i].charCodeAt(0);const r=Di(BM(n));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(r[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const Wve=9007199254740991;function Vve(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const jM={};for(let t=0;t<10;t++)jM[String(t)]=String(t);for(let t=0;t<26;t++)jM[String.fromCharCode(65+t)]=String(10+t);const lH=Math.floor(Vve(Wve));function qve(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(r=>jM[r]).join("");for(;e.length>=lH;){let r=e.substring(0,lH);e=parseInt(r,10)%97+e.substring(r.length)}let n=String(98-parseInt(e,10)%97);for(;n.length<2;)n="0"+n;return n}function Gve(t){let e=null;if(typeof t!="string"&&t3.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=cH(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&t3.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==qve(t)&&t3.throwArgumentError("bad icap checksum","address",t),e=_ve(t.substring(4));e.length<40;)e="0"+e;e=cH("0x"+e)}else t3.throwArgumentError("invalid address","address",t);return e}function N2(t,e,n){Object.defineProperty(t,e,{enumerable:!0,value:n,writable:!1})}const Kve=new Uint8Array(32);Kve.fill(0),Mo.from(-1);const Yve=Mo.from(0),Qve=Mo.from(1);Mo.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),ad(Qve.toHexString(),32),ad(Yve.toHexString(),32);var Uu={},or={},b6=oJ;function oJ(t,e){if(!t)throw new Error(e||"Assertion failed")}oJ.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)};var ON={exports:{}};typeof Object.create=="function"?ON.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:ON.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}};var Zve=b6,Jve=ON.exports;or.inherits=Jve;function Xve(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function ebe(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i<t.length;i+=2)n.push(parseInt(t[i]+t[i+1],16))}else for(var r=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=s&63|128):Xve(t,i)?(s=65536+((s&1023)<<10)+(t.charCodeAt(++i)&1023),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=s&63|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=s&63|128)}else for(i=0;i<t.length;i++)n[i]=t[i]|0;return n}or.toArray=ebe;function tbe(t){for(var e="",n=0;n<t.length;n++)e+=cJ(t[n].toString(16));return e}or.toHex=tbe;function aJ(t){var e=t>>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}or.htonl=aJ;function nbe(t,e){for(var n="",r=0;r<t.length;r++){var i=t[r];e==="little"&&(i=aJ(i)),n+=lJ(i.toString(16))}return n}or.toHex32=nbe;function cJ(t){return t.length===1?"0"+t:t}or.zero2=cJ;function lJ(t){return t.length===7?"0"+t:t.length===6?"00"+t:t.length===5?"000"+t:t.length===4?"0000"+t:t.length===3?"00000"+t:t.length===2?"000000"+t:t.length===1?"0000000"+t:t}or.zero8=lJ;function rbe(t,e,n,r){var i=n-e;Zve(i%4===0);for(var s=new Array(i/4),o=0,a=e;o<s.length;o++,a+=4){var c;r==="big"?c=t[a]<<24|t[a+1]<<16|t[a+2]<<8|t[a+3]:c=t[a+3]<<24|t[a+2]<<16|t[a+1]<<8|t[a],s[o]=c>>>0}return s}or.join32=rbe;function ibe(t,e){for(var n=new Array(t.length*4),r=0,i=0;r<t.length;r++,i+=4){var s=t[r];e==="big"?(n[i]=s>>>24,n[i+1]=s>>>16&255,n[i+2]=s>>>8&255,n[i+3]=s&255):(n[i+3]=s>>>24,n[i+2]=s>>>16&255,n[i+1]=s>>>8&255,n[i]=s&255)}return n}or.split32=ibe;function sbe(t,e){return t>>>e|t<<32-e}or.rotr32=sbe;function obe(t,e){return t<<e|t>>>32-e}or.rotl32=obe;function abe(t,e){return t+e>>>0}or.sum32=abe;function cbe(t,e,n){return t+e+n>>>0}or.sum32_3=cbe;function lbe(t,e,n,r){return t+e+n+r>>>0}or.sum32_4=lbe;function ube(t,e,n,r,i){return t+e+n+r+i>>>0}or.sum32_5=ube;function dbe(t,e,n,r){var i=t[e],s=t[e+1],o=r+s>>>0,a=(o<r?1:0)+n+i;t[e]=a>>>0,t[e+1]=o}or.sum64=dbe;function fbe(t,e,n,r){var i=e+r>>>0,s=(i<e?1:0)+t+n;return s>>>0}or.sum64_hi=fbe;function hbe(t,e,n,r){var i=e+r;return i>>>0}or.sum64_lo=hbe;function pbe(t,e,n,r,i,s,o,a){var c=0,l=e;l=l+r>>>0,c+=l<e?1:0,l=l+s>>>0,c+=l<s?1:0,l=l+a>>>0,c+=l<a?1:0;var u=t+n+i+o+c;return u>>>0}or.sum64_4_hi=pbe;function mbe(t,e,n,r,i,s,o,a){var c=e+r+s+a;return c>>>0}or.sum64_4_lo=mbe;function gbe(t,e,n,r,i,s,o,a,c,l){var u=0,d=e;d=d+r>>>0,u+=d<e?1:0,d=d+s>>>0,u+=d<s?1:0,d=d+a>>>0,u+=d<a?1:0,d=d+l>>>0,u+=d<l?1:0;var h=t+n+i+o+c+u;return h>>>0}or.sum64_5_hi=gbe;function wbe(t,e,n,r,i,s,o,a,c,l){var u=e+r+s+a+l;return u>>>0}or.sum64_5_lo=wbe;function ybe(t,e,n){var r=e<<32-n|t>>>n;return r>>>0}or.rotr64_hi=ybe;function vbe(t,e,n){var r=t<<32-n|e>>>n;return r>>>0}or.rotr64_lo=vbe;function bbe(t,e,n){return t>>>n}or.shr64_hi=bbe;function xbe(t,e,n){var r=t<<32-n|e>>>n;return r>>>0}or.shr64_lo=xbe;var vb={},uH=or,_be=b6;function z_(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}vb.BlockHash=z_,z_.prototype.update=function(t,e){if(t=uH.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var n=t.length%this._delta8;this.pending=t.slice(t.length-n,t.length),this.pending.length===0&&(this.pending=null),t=uH.join32(t,0,t.length-n,this.endian);for(var r=0;r<t.length;r+=this._delta32)this._update(t,r,r+this._delta32)}return this},z_.prototype.digest=function(t){return this.update(this._pad()),_be(this.pending===null),this._digest(t)},z_.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,n=e-(t+this.padLength)%e,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(t<<=3,this.endian==="big"){for(var s=8;s<this.padLength;s++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=t>>>24&255,r[i++]=t>>>16&255,r[i++]=t>>>8&255,r[i++]=t&255}else for(r[i++]=t&255,r[i++]=t>>>8&255,r[i++]=t>>>16&255,r[i++]=t>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,s=8;s<this.padLength;s++)r[i++]=0;return r};var $w={},Nd={},Abe=or,cd=Abe.rotr32;function Ebe(t,e,n,r){if(t===0)return uJ(e,n,r);if(t===1||t===3)return fJ(e,n,r);if(t===2)return dJ(e,n,r)}Nd.ft_1=Ebe;function uJ(t,e,n){return t&e^~t&n}Nd.ch32=uJ;function dJ(t,e,n){return t&e^t&n^e&n}Nd.maj32=dJ;function fJ(t,e,n){return t^e^n}Nd.p32=fJ;function Cbe(t){return cd(t,2)^cd(t,13)^cd(t,22)}Nd.s0_256=Cbe;function Sbe(t){return cd(t,6)^cd(t,11)^cd(t,25)}Nd.s1_256=Sbe;function Tbe(t){return cd(t,7)^cd(t,18)^t>>>3}Nd.g0_256=Tbe;function Ibe(t){return cd(t,17)^cd(t,19)^t>>>10}Nd.g1_256=Ibe;var cv=or,kbe=vb,Rbe=Nd,OI=cv.rotl32,P2=cv.sum32,Nbe=cv.sum32_5,Pbe=Rbe.ft_1,hJ=kbe.BlockHash,Obe=[1518500249,1859775393,2400959708,3395469782];function Qu(){if(!(this instanceof Qu))return new Qu;hJ.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}cv.inherits(Qu,hJ);var Dbe=Qu;Qu.blockSize=512,Qu.outSize=160,Qu.hmacStrength=80,Qu.padLength=64,Qu.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=OI(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],s=this.h[1],o=this.h[2],a=this.h[3],c=this.h[4];for(r=0;r<n.length;r++){var l=~~(r/20),u=Nbe(OI(i,5),Pbe(l,s,o,a),c,n[r],Obe[l]);c=a,a=o,o=OI(s,30),s=i,i=u}this.h[0]=P2(this.h[0],i),this.h[1]=P2(this.h[1],s),this.h[2]=P2(this.h[2],o),this.h[3]=P2(this.h[3],a),this.h[4]=P2(this.h[4],c)},Qu.prototype._digest=function(t){return t==="hex"?cv.toHex32(this.h,"big"):cv.split32(this.h,"big")};var lv=or,Mbe=vb,bb=Nd,Bbe=b6,Bl=lv.sum32,$be=lv.sum32_4,jbe=lv.sum32_5,Lbe=bb.ch32,Ube=bb.maj32,Fbe=bb.s0_256,zbe=bb.s1_256,Hbe=bb.g0_256,Wbe=bb.g1_256,pJ=Mbe.BlockHash,Vbe=[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 Zu(){if(!(this instanceof Zu))return new Zu;pJ.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Vbe,this.W=new Array(64)}lv.inherits(Zu,pJ);var mJ=Zu;Zu.blockSize=512,Zu.outSize=256,Zu.hmacStrength=192,Zu.padLength=64,Zu.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=$be(Wbe(n[r-2]),n[r-7],Hbe(n[r-15]),n[r-16]);var i=this.h[0],s=this.h[1],o=this.h[2],a=this.h[3],c=this.h[4],l=this.h[5],u=this.h[6],d=this.h[7];for(Bbe(this.k.length===n.length),r=0;r<n.length;r++){var h=jbe(d,zbe(c),Lbe(c,l,u),this.k[r],n[r]),g=Bl(Fbe(i),Ube(i,s,o));d=u,u=l,l=c,c=Bl(a,h),a=o,o=s,s=i,i=Bl(h,g)}this.h[0]=Bl(this.h[0],i),this.h[1]=Bl(this.h[1],s),this.h[2]=Bl(this.h[2],o),this.h[3]=Bl(this.h[3],a),this.h[4]=Bl(this.h[4],c),this.h[5]=Bl(this.h[5],l),this.h[6]=Bl(this.h[6],u),this.h[7]=Bl(this.h[7],d)},Zu.prototype._digest=function(t){return t==="hex"?lv.toHex32(this.h,"big"):lv.split32(this.h,"big")};var DN=or,gJ=mJ;function jf(){if(!(this instanceof jf))return new jf;gJ.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}DN.inherits(jf,gJ);var qbe=jf;jf.blockSize=512,jf.outSize=224,jf.hmacStrength=192,jf.padLength=64,jf.prototype._digest=function(t){return t==="hex"?DN.toHex32(this.h.slice(0,7),"big"):DN.split32(this.h.slice(0,7),"big")};var Ra=or,Gbe=vb,Kbe=b6,ld=Ra.rotr64_hi,ud=Ra.rotr64_lo,wJ=Ra.shr64_hi,yJ=Ra.shr64_lo,dp=Ra.sum64,DI=Ra.sum64_hi,MI=Ra.sum64_lo,Ybe=Ra.sum64_4_hi,Qbe=Ra.sum64_4_lo,Zbe=Ra.sum64_5_hi,Jbe=Ra.sum64_5_lo,vJ=Gbe.BlockHash,Xbe=[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 Yl(){if(!(this instanceof Yl))return new Yl;vJ.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Xbe,this.W=new Array(160)}Ra.inherits(Yl,vJ);var bJ=Yl;Yl.blockSize=1024,Yl.outSize=512,Yl.hmacStrength=192,Yl.padLength=128,Yl.prototype._prepareBlock=function(t,e){for(var n=this.W,r=0;r<32;r++)n[r]=t[e+r];for(;r<n.length;r+=2){var i=u2e(n[r-4],n[r-3]),s=d2e(n[r-4],n[r-3]),o=n[r-14],a=n[r-13],c=c2e(n[r-30],n[r-29]),l=l2e(n[r-30],n[r-29]),u=n[r-32],d=n[r-31];n[r]=Ybe(i,s,o,a,c,l,u,d),n[r+1]=Qbe(i,s,o,a,c,l,u,d)}},Yl.prototype._update=function(t,e){this._prepareBlock(t,e);var n=this.W,r=this.h[0],i=this.h[1],s=this.h[2],o=this.h[3],a=this.h[4],c=this.h[5],l=this.h[6],u=this.h[7],d=this.h[8],h=this.h[9],g=this.h[10],w=this.h[11],v=this.h[12],_=this.h[13],T=this.h[14],b=this.h[15];Kbe(this.k.length===n.length);for(var k=0;k<n.length;k+=2){var D=T,O=b,$=o2e(d,h),C=a2e(d,h),A=e2e(d,h,g,w,v),H=t2e(d,h,g,w,v,_),V=this.k[k],Y=this.k[k+1],ee=n[k],x=n[k+1],E=Zbe(D,O,$,C,A,H,V,Y,ee,x),y=Jbe(D,O,$,C,A,H,V,Y,ee,x);D=i2e(r,i),O=s2e(r,i),$=n2e(r,i,s,o,a),C=r2e(r,i,s,o,a,c);var I=DI(D,O,$,C),B=MI(D,O,$,C);T=v,b=_,v=g,_=w,g=d,w=h,d=DI(l,u,E,y),h=MI(u,u,E,y),l=a,u=c,a=s,c=o,s=r,o=i,r=DI(E,y,I,B),i=MI(E,y,I,B)}dp(this.h,0,r,i),dp(this.h,2,s,o),dp(this.h,4,a,c),dp(this.h,6,l,u),dp(this.h,8,d,h),dp(this.h,10,g,w),dp(this.h,12,v,_),dp(this.h,14,T,b)},Yl.prototype._digest=function(t){return t==="hex"?Ra.toHex32(this.h,"big"):Ra.split32(this.h,"big")};function e2e(t,e,n,r,i){var s=t&n^~t&i;return s<0&&(s+=4294967296),s}function t2e(t,e,n,r,i,s){var o=e&r^~e&s;return o<0&&(o+=4294967296),o}function n2e(t,e,n,r,i){var s=t&n^t&i^n&i;return s<0&&(s+=4294967296),s}function r2e(t,e,n,r,i,s){var o=e&r^e&s^r&s;return o<0&&(o+=4294967296),o}function i2e(t,e){var n=ld(t,e,28),r=ld(e,t,2),i=ld(e,t,7),s=n^r^i;return s<0&&(s+=4294967296),s}function s2e(t,e){var n=ud(t,e,28),r=ud(e,t,2),i=ud(e,t,7),s=n^r^i;return s<0&&(s+=4294967296),s}function o2e(t,e){var n=ld(t,e,14),r=ld(t,e,18),i=ld(e,t,9),s=n^r^i;return s<0&&(s+=4294967296),s}function a2e(t,e){var n=ud(t,e,14),r=ud(t,e,18),i=ud(e,t,9),s=n^r^i;return s<0&&(s+=4294967296),s}function c2e(t,e){var n=ld(t,e,1),r=ld(t,e,8),i=wJ(t,e,7),s=n^r^i;return s<0&&(s+=4294967296),s}function l2e(t,e){var n=ud(t,e,1),r=ud(t,e,8),i=yJ(t,e,7),s=n^r^i;return s<0&&(s+=4294967296),s}function u2e(t,e){var n=ld(t,e,19),r=ld(e,t,29),i=wJ(t,e,6),s=n^r^i;return s<0&&(s+=4294967296),s}function d2e(t,e){var n=ud(t,e,19),r=ud(e,t,29),i=yJ(t,e,6),s=n^r^i;return s<0&&(s+=4294967296),s}var MN=or,xJ=bJ;function Lf(){if(!(this instanceof Lf))return new Lf;xJ.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}MN.inherits(Lf,xJ);var f2e=Lf;Lf.blockSize=1024,Lf.outSize=384,Lf.hmacStrength=192,Lf.padLength=128,Lf.prototype._digest=function(t){return t==="hex"?MN.toHex32(this.h.slice(0,12),"big"):MN.split32(this.h.slice(0,12),"big")},$w.sha1=Dbe,$w.sha224=qbe,$w.sha256=mJ,$w.sha384=f2e,$w.sha512=bJ;var _J={},pg=or,h2e=vb,H_=pg.rotl32,dH=pg.sum32,O2=pg.sum32_3,fH=pg.sum32_4,AJ=h2e.BlockHash;function Fu(){if(!(this instanceof Fu))return new Fu;AJ.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}pg.inherits(Fu,AJ),_J.ripemd160=Fu,Fu.blockSize=512,Fu.outSize=160,Fu.hmacStrength=192,Fu.padLength=64,Fu.prototype._update=function(t,e){for(var n=this.h[0],r=this.h[1],i=this.h[2],s=this.h[3],o=this.h[4],a=n,c=r,l=i,u=s,d=o,h=0;h<80;h++){var g=dH(H_(fH(n,hH(h,r,i,s),t[g2e[h]+e],p2e(h)),y2e[h]),o);n=o,o=s,s=H_(i,10),i=r,r=g,g=dH(H_(fH(a,hH(79-h,c,l,u),t[w2e[h]+e],m2e(h)),v2e[h]),d),a=d,d=u,u=H_(l,10),l=c,c=g}g=O2(this.h[1],i,u),this.h[1]=O2(this.h[2],s,d),this.h[2]=O2(this.h[3],o,a),this.h[3]=O2(this.h[4],n,c),this.h[4]=O2(this.h[0],r,l),this.h[0]=g},Fu.prototype._digest=function(t){return t==="hex"?pg.toHex32(this.h,"little"):pg.split32(this.h,"little")};function hH(t,e,n,r){return t<=15?e^n^r:t<=31?e&n|~e&r:t<=47?(e|~n)^r:t<=63?e&r|n&~r:e^(n|~r)}function p2e(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function m2e(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var g2e=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],w2e=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y2e=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v2e=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],b2e=or,x2e=b6;function Ty(t,e,n){if(!(this instanceof Ty))return new Ty(t,e,n);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(b2e.toArray(e,n))}var _2e=Ty;Ty.prototype._init=function(t){t.length>this.blockSize&&(t=new this.Hash().update(t).digest()),x2e(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=new this.Hash().update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=new this.Hash().update(t)},Ty.prototype.update=function(t,e){return this.inner.update(t,e),this},Ty.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)},function(t){var e=t;e.utils=or,e.common=vb,e.sha=$w,e.ripemd=_J,e.hmac=_2e,e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160}(Uu);function xb(t,e,n){return n={path:e,exports:{},require:function(r,i){return A2e(r,i??n.path)}},t(n,n.exports),n.exports}function A2e(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var LM=EJ;function EJ(t,e){if(!t)throw new Error(e||"Assertion failed")}EJ.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)};var Xl=xb(function(t,e){var n=e;function r(o,a){if(Array.isArray(o))return o.slice();if(!o)return[];var c=[];if(typeof o!="string"){for(var l=0;l<o.length;l++)c[l]=o[l]|0;return c}if(a==="hex"){o=o.replace(/[^a-z0-9]+/ig,""),o.length%2!==0&&(o="0"+o);for(var l=0;l<o.length;l+=2)c.push(parseInt(o[l]+o[l+1],16))}else for(var l=0;l<o.length;l++){var u=o.charCodeAt(l),d=u>>8,h=u&255;d?c.push(d,h):c.push(h)}return c}n.toArray=r;function i(o){return o.length===1?"0"+o:o}n.zero2=i;function s(o){for(var a="",c=0;c<o.length;c++)a+=i(o[c].toString(16));return a}n.toHex=s,n.encode=function(o,a){return a==="hex"?s(o):o}}),rc=xb(function(t,e){var n=e;n.assert=LM,n.toArray=Xl.toArray,n.zero2=Xl.zero2,n.toHex=Xl.toHex,n.encode=Xl.encode;function r(c,l,u){var d=new Array(Math.max(c.bitLength(),u)+1);d.fill(0);for(var h=1<<l+1,g=c.clone(),w=0;w<d.length;w++){var v,_=g.andln(h-1);g.isOdd()?(_>(h>>1)-1?v=(h>>1)-_:v=_,g.isubn(v)):v=0,d[w]=v,g.iushrn(1)}return d}n.getNAF=r;function i(c,l){var u=[[],[]];c=c.clone(),l=l.clone();for(var d=0,h=0,g;c.cmpn(-d)>0||l.cmpn(-h)>0;){var w=c.andln(3)+d&3,v=l.andln(3)+h&3;w===3&&(w=-1),v===3&&(v=-1);var _;w&1?(g=c.andln(7)+d&7,(g===3||g===5)&&v===2?_=-w:_=w):_=0,u[0].push(_);var T;v&1?(g=l.andln(7)+h&7,(g===3||g===5)&&w===2?T=-v:T=v):T=0,u[1].push(T),2*d===_+1&&(d=1-d),2*h===T+1&&(h=1-h),c.iushrn(1),l.iushrn(1)}return u}n.getJSF=i;function s(c,l,u){var d="_"+l;c.prototype[l]=function(){return this[d]!==void 0?this[d]:this[d]=u.call(this)}}n.cachedProperty=s;function o(c){return typeof c=="string"?n.toArray(c,"hex"):c}n.parseBytes=o;function a(c){return new Rn(c,"hex","le")}n.intFromLE=a}),W_=rc.getNAF,E2e=rc.getJSF,GE=rc.assert;function kp(t,e){this.type=t,this.p=new Rn(e.p,16),this.red=e.prime?Rn.red(e.prime):Rn.mont(this.p),this.zero=new Rn(0).toRed(this.red),this.one=new Rn(1).toRed(this.red),this.two=new Rn(2).toRed(this.red),this.n=e.n&&new Rn(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var x1=kp;kp.prototype.point=function(){throw new Error("Not implemented")},kp.prototype.validate=function(){throw new Error("Not implemented")},kp.prototype._fixedNafMul=function(t,e){GE(t.precomputed);var n=t._getDoubles(),r=W_(e,1,this._bitLength),i=(1<<n.step+1)-(n.step%2===0?2:1);i/=3;var s=[],o,a;for(o=0;o<r.length;o+=n.step){a=0;for(var c=o+n.step-1;c>=o;c--)a=(a<<1)+r[c];s.push(a)}for(var l=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=i;d>0;d--){for(o=0;o<s.length;o++)a=s[o],a===d?u=u.mixedAdd(n.points[o]):a===-d&&(u=u.mixedAdd(n.points[o].neg()));l=l.add(u)}return l.toP()},kp.prototype._wnafMul=function(t,e){var n=4,r=t._getNAFPoints(n);n=r.wnd;for(var i=r.points,s=W_(e,n,this._bitLength),o=this.jpoint(null,null,null),a=s.length-1;a>=0;a--){for(var c=0;a>=0&&s[a]===0;a--)c++;if(a>=0&&c++,o=o.dblp(c),a<0)break;var l=s[a];GE(l!==0),t.type==="affine"?l>0?o=o.mixedAdd(i[l-1>>1]):o=o.mixedAdd(i[-l-1>>1].neg()):l>0?o=o.add(i[l-1>>1]):o=o.add(i[-l-1>>1].neg())}return t.type==="affine"?o.toP():o},kp.prototype._wnafMulAdd=function(t,e,n,r,i){var s=this._wnafT1,o=this._wnafT2,a=this._wnafT3,c=0,l,u,d;for(l=0;l<r;l++){d=e[l];var h=d._getNAFPoints(t);s[l]=h.wnd,o[l]=h.points}for(l=r-1;l>=1;l-=2){var g=l-1,w=l;if(s[g]!==1||s[w]!==1){a[g]=W_(n[g],s[g],this._bitLength),a[w]=W_(n[w],s[w],this._bitLength),c=Math.max(a[g].length,c),c=Math.max(a[w].length,c);continue}var v=[e[g],null,null,e[w]];e[g].y.cmp(e[w].y)===0?(v[1]=e[g].add(e[w]),v[2]=e[g].toJ().mixedAdd(e[w].neg())):e[g].y.cmp(e[w].y.redNeg())===0?(v[1]=e[g].toJ().mixedAdd(e[w]),v[2]=e[g].add(e[w].neg())):(v[1]=e[g].toJ().mixedAdd(e[w]),v[2]=e[g].toJ().mixedAdd(e[w].neg()));var _=[-3,-1,-5,-7,0,7,5,1,3],T=E2e(n[g],n[w]);for(c=Math.max(T[0].length,c),a[g]=new Array(c),a[w]=new Array(c),u=0;u<c;u++){var b=T[0][u]|0,k=T[1][u]|0;a[g][u]=_[(b+1)*3+(k+1)],a[w][u]=0,o[g]=v}}var D=this.jpoint(null,null,null),O=this._wnafT4;for(l=c;l>=0;l--){for(var $=0;l>=0;){var C=!0;for(u=0;u<r;u++)O[u]=a[u][l]|0,O[u]!==0&&(C=!1);if(!C)break;$++,l--}if(l>=0&&$++,D=D.dblp($),l<0)break;for(u=0;u<r;u++){var A=O[u];A!==0&&(A>0?d=o[u][A-1>>1]:A<0&&(d=o[u][-A-1>>1].neg()),d.type==="affine"?D=D.mixedAdd(d):D=D.add(d))}}for(l=0;l<r;l++)o[l]=null;return i?D:D.toP()};function Mc(t,e){this.curve=t,this.type=e,this.precomputed=null}kp.BasePoint=Mc,Mc.prototype.eq=function(){throw new Error("Not implemented")},Mc.prototype.validate=function(){return this.curve.validate(this)},kp.prototype.decodePoint=function(t,e){t=rc.toArray(t,e);var n=this.p.byteLength();if((t[0]===4||t[0]===6||t[0]===7)&&t.length-1===2*n){t[0]===6?GE(t[t.length-1]%2===0):t[0]===7&&GE(t[t.length-1]%2===1);var r=this.point(t.slice(1,1+n),t.slice(1+n,1+2*n));return r}else if((t[0]===2||t[0]===3)&&t.length-1===n)return this.pointFromX(t.slice(1,1+n),t[0]===3);throw new Error("Unknown point format")},Mc.prototype.encodeCompressed=function(t){return this.encode(t,!0)},Mc.prototype._encode=function(t){var e=this.curve.p.byteLength(),n=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",e))},Mc.prototype.encode=function(t,e){return rc.encode(this._encode(e),t)},Mc.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},Mc.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return e?e.points.length>=Math.ceil((t.bitLength()+1)/e.step):!1},Mc.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<e;i+=t){for(var s=0;s<t;s++)r=r.dbl();n.push(r)}return{step:t,points:n}},Mc.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],n=(1<<t)-1,r=n===1?null:this.dbl(),i=1;i<n;i++)e[i]=e[i-1].add(r);return{wnd:t,points:e}},Mc.prototype._getBeta=function(){return null},Mc.prototype.dblp=function(t){for(var e=this,n=0;n<t;n++)e=e.dbl();return e};var UM=xb(function(t){typeof Object.create=="function"?t.exports=function(e,n){n&&(e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,n){if(n){e.super_=n;var r=function(){};r.prototype=n.prototype,e.prototype=new r,e.prototype.constructor=e}}}),C2e=rc.assert;function il(t){x1.call(this,"short",t),this.a=new Rn(t.a,16).toRed(this.red),this.b=new Rn(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}UM(il,x1);var S2e=il;il.prototype._getEndomorphism=function(t){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var e,n;if(t.beta)e=new Rn(t.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);e=r[0].cmp(r[1])<0?r[0]:r[1],e=e.toRed(this.red)}if(t.lambda)n=new Rn(t.lambda,16);else{var i=this._getEndoRoots(this.n);this.g.mul(i[0]).x.cmp(this.g.x.redMul(e))===0?n=i[0]:(n=i[1],C2e(this.g.mul(n).x.cmp(this.g.x.redMul(e))===0))}var s;return t.basis?s=t.basis.map(function(o){return{a:new Rn(o.a,16),b:new Rn(o.b,16)}}):s=this._getEndoBasis(n),{beta:e,lambda:n,basis:s}}},il.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:Rn.mont(t),n=new Rn(2).toRed(e).redInvm(),r=n.redNeg(),i=new Rn(3).toRed(e).redNeg().redSqrt().redMul(n),s=r.redAdd(i).fromRed(),o=r.redSub(i).fromRed();return[s,o]},il.prototype._getEndoBasis=function(t){for(var e=this.n.ushrn(Math.floor(this.n.bitLength()/2)),n=t,r=this.n.clone(),i=new Rn(1),s=new Rn(0),o=new Rn(0),a=new Rn(1),c,l,u,d,h,g,w,v=0,_,T;n.cmpn(0)!==0;){var b=r.div(n);_=r.sub(b.mul(n)),T=o.sub(b.mul(i));var k=a.sub(b.mul(s));if(!u&&_.cmp(e)<0)c=w.neg(),l=i,u=_.neg(),d=T;else if(u&&++v===2)break;w=_,r=n,n=_,o=i,i=T,a=s,s=k}h=_.neg(),g=T;var D=u.sqr().add(d.sqr()),O=h.sqr().add(g.sqr());return O.cmp(D)>=0&&(h=c,g=l),u.negative&&(u=u.neg(),d=d.neg()),h.negative&&(h=h.neg(),g=g.neg()),[{a:u,b:d},{a:h,b:g}]},il.prototype._endoSplit=function(t){var e=this.endo.basis,n=e[0],r=e[1],i=r.b.mul(t).divRound(this.n),s=n.b.neg().mul(t).divRound(this.n),o=i.mul(n.a),a=s.mul(r.a),c=i.mul(n.b),l=s.mul(r.b),u=t.sub(o).sub(a),d=c.add(l).neg();return{k1:u,k2:d}},il.prototype.pointFromX=function(t,e){t=new Rn(t,16),t.red||(t=t.toRed(this.red));var n=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(r.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var i=r.fromRed().isOdd();return(e&&!i||!e&&i)&&(r=r.redNeg()),this.point(t,r)},il.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,n=t.y,r=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(r).redIAdd(this.b);return n.redSqr().redISub(i).cmpn(0)===0},il.prototype._endoWnafMulAdd=function(t,e,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,s=0;s<t.length;s++){var o=this._endoSplit(e[s]),a=t[s],c=a._getBeta();o.k1.negative&&(o.k1.ineg(),a=a.neg(!0)),o.k2.negative&&(o.k2.ineg(),c=c.neg(!0)),r[s*2]=a,r[s*2+1]=c,i[s*2]=o.k1,i[s*2+1]=o.k2}for(var l=this._wnafMulAdd(1,r,i,s*2,n),u=0;u<s*2;u++)r[u]=null,i[u]=null;return l};function _s(t,e,n,r){x1.BasePoint.call(this,t,"affine"),e===null&&n===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new Rn(e,16),this.y=new Rn(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}UM(_s,x1.BasePoint),il.prototype.point=function(t,e,n){return new _s(this,t,e,n)},il.prototype.pointFromJSON=function(t,e){return _s.fromJSON(this,t,e)},_s.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var n=this.curve,r=function(i){return n.point(i.x.redMul(n.endo.beta),i.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(r)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(r)}}}return e}},_s.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},_s.fromJSON=function(t,e,n){typeof e=="string"&&(e=JSON.parse(e));var r=t.point(e[0],e[1],n);if(!e[2])return r;function i(o){return t.point(o[0],o[1],n)}var s=e[2];return r.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[r].concat(s.doubles.points.map(i))},naf:s.naf&&{wnd:s.naf.wnd,points:[r].concat(s.naf.points.map(i))}},r},_s.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},_s.prototype.isInfinity=function(){return this.inf},_s.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(this.x.cmp(t.x)===0)return this.curve.point(null,null);var e=this.y.redSub(t.y);e.cmpn(0)!==0&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var n=e.redSqr().redISub(this.x).redISub(t.x),r=e.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},_s.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.cmpn(0)===0)return this.curve.point(null,null);var e=this.curve.a,n=this.x.redSqr(),r=t.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(e).redMul(r),s=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,o)},_s.prototype.getX=function(){return this.x.fromRed()},_s.prototype.getY=function(){return this.y.fromRed()},_s.prototype.mul=function(t){return t=new Rn(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},_s.prototype.mulAdd=function(t,e,n){var r=[this,e],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},_s.prototype.jmulAdd=function(t,e,n){var r=[this,e],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},_s.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||this.x.cmp(t.x)===0&&this.y.cmp(t.y)===0)},_s.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var n=this.precomputed,r=function(i){return i.neg()};e.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return e},_s.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t};function Ls(t,e,n,r){x1.BasePoint.call(this,t,"jacobian"),e===null&&n===null&&r===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Rn(0)):(this.x=new Rn(e,16),this.y=new Rn(n,16),this.z=new Rn(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}UM(Ls,x1.BasePoint),il.prototype.jpoint=function(t,e,n){return new Ls(this,t,e,n)},Ls.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),n=this.x.redMul(e),r=this.y.redMul(e).redMul(t);return this.curve.point(n,r)},Ls.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Ls.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(e),i=t.x.redMul(n),s=this.y.redMul(e.redMul(t.z)),o=t.y.redMul(n.redMul(this.z)),a=r.redSub(i),c=s.redSub(o);if(a.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),u=l.redMul(a),d=r.redMul(l),h=c.redSqr().redIAdd(u).redISub(d).redISub(d),g=c.redMul(d.redISub(h)).redISub(s.redMul(u)),w=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(h,g,w)},Ls.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),n=this.x,r=t.x.redMul(e),i=this.y,s=t.y.redMul(e).redMul(this.z),o=n.redSub(r),a=i.redSub(s);if(o.cmpn(0)===0)return a.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),l=c.redMul(o),u=n.redMul(c),d=a.redSqr().redIAdd(l).redISub(u).redISub(u),h=a.redMul(u.redISub(d)).redISub(i.redMul(l)),g=this.z.redMul(o);return this.curve.jpoint(d,h,g)},Ls.prototype.dblp=function(t){if(t===0)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var n=this;for(e=0;e<t;e++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,s=this.x,o=this.y,a=this.z,c=a.redSqr().redSqr(),l=o.redAdd(o);for(e=0;e<t;e++){var u=s.redSqr(),d=l.redSqr(),h=d.redSqr(),g=u.redAdd(u).redIAdd(u).redIAdd(r.redMul(c)),w=s.redMul(d),v=g.redSqr().redISub(w.redAdd(w)),_=w.redISub(v),T=g.redMul(_);T=T.redIAdd(T).redISub(h);var b=l.redMul(a);e+1<t&&(c=c.redMul(h)),s=v,a=b,l=T}return this.curve.jpoint(s,l.redMul(i),a)},Ls.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},Ls.prototype._zeroDbl=function(){var t,e,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(r).redISub(s);o=o.redIAdd(o);var a=r.redAdd(r).redIAdd(r),c=a.redSqr().redISub(o).redISub(o),l=s.redIAdd(s);l=l.redIAdd(l),l=l.redIAdd(l),t=c,e=a.redMul(o.redISub(c)).redISub(l),n=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),d=this.y.redSqr(),h=d.redSqr(),g=this.x.redAdd(d).redSqr().redISub(u).redISub(h);g=g.redIAdd(g);var w=u.redAdd(u).redIAdd(u),v=w.redSqr(),_=h.redIAdd(h);_=_.redIAdd(_),_=_.redIAdd(_),t=v.redISub(g).redISub(g),e=w.redMul(g.redISub(t)).redISub(_),n=this.y.redMul(this.z),n=n.redIAdd(n)}return this.curve.jpoint(t,e,n)},Ls.prototype._threeDbl=function(){var t,e,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(r).redISub(s);o=o.redIAdd(o);var a=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=a.redSqr().redISub(o).redISub(o);t=c;var l=s.redIAdd(s);l=l.redIAdd(l),l=l.redIAdd(l),e=a.redMul(o.redISub(c)).redISub(l),n=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),d=this.y.redSqr(),h=this.x.redMul(d),g=this.x.redSub(u).redMul(this.x.redAdd(u));g=g.redAdd(g).redIAdd(g);var w=h.redIAdd(h);w=w.redIAdd(w);var v=w.redAdd(w);t=g.redSqr().redISub(v),n=this.y.redAdd(this.z).redSqr().redISub(d).redISub(u);var _=d.redSqr();_=_.redIAdd(_),_=_.redIAdd(_),_=_.redIAdd(_),e=g.redMul(w.redISub(t)).redISub(_)}return this.curve.jpoint(t,e,n)},Ls.prototype._dbl=function(){var t=this.curve.a,e=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),s=e.redSqr(),o=n.redSqr(),a=s.redAdd(s).redIAdd(s).redIAdd(t.redMul(i)),c=e.redAdd(e);c=c.redIAdd(c);var l=c.redMul(o),u=a.redSqr().redISub(l.redAdd(l)),d=l.redISub(u),h=o.redSqr();h=h.redIAdd(h),h=h.redIAdd(h),h=h.redIAdd(h);var g=a.redMul(d).redISub(h),w=n.redAdd(n).redMul(r);return this.curve.jpoint(u,g,w)},Ls.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),n=this.z.redSqr(),r=e.redSqr(),i=t.redAdd(t).redIAdd(t),s=i.redSqr(),o=this.x.redAdd(e).redSqr().redISub(t).redISub(r);o=o.redIAdd(o),o=o.redAdd(o).redIAdd(o),o=o.redISub(s);var a=o.redSqr(),c=r.redIAdd(r);c=c.redIAdd(c),c=c.redIAdd(c),c=c.redIAdd(c);var l=i.redIAdd(o).redSqr().redISub(s).redISub(a).redISub(c),u=e.redMul(l);u=u.redIAdd(u),u=u.redIAdd(u);var d=this.x.redMul(a).redISub(u);d=d.redIAdd(d),d=d.redIAdd(d);var h=this.y.redMul(l.redMul(c.redISub(l)).redISub(o.redMul(a)));h=h.redIAdd(h),h=h.redIAdd(h),h=h.redIAdd(h);var g=this.z.redAdd(o).redSqr().redISub(n).redISub(a);return this.curve.jpoint(d,h,g)},Ls.prototype.mul=function(t,e){return t=new Rn(t,e),this.curve._wnafMul(this,t)},Ls.prototype.eq=function(t){if(t.type==="affine")return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),n=t.z.redSqr();if(this.x.redMul(n).redISub(t.x.redMul(e)).cmpn(0)!==0)return!1;var r=e.redMul(this.z),i=n.redMul(t.z);return this.y.redMul(i).redISub(t.y.redMul(r)).cmpn(0)===0},Ls.prototype.eqXToP=function(t){var e=this.z.redSqr(),n=t.toRed(this.curve.red).redMul(e);if(this.x.cmp(n)===0)return!0;for(var r=t.clone(),i=this.curve.redN.redMul(e);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),this.x.cmp(n)===0)return!0}},Ls.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},Ls.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var FA=xb(function(t,e){var n=e;n.base=x1,n.short=S2e,n.mont=null,n.edwards=null}),zA=xb(function(t,e){var n=e,r=rc.assert;function i(a){a.type==="short"?this.curve=new FA.short(a):a.type==="edwards"?this.curve=new FA.edwards(a):this.curve=new FA.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,r(this.g.validate(),"Invalid curve"),r(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}n.PresetCurve=i;function s(a,c){Object.defineProperty(n,a,{configurable:!0,enumerable:!0,get:function(){var l=new i(c);return Object.defineProperty(n,a,{configurable:!0,enumerable:!0,value:l}),l}})}s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Uu.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Uu.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Uu.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Uu.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Uu.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Uu.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Uu.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var o;try{o=null.crash()}catch{o=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Uu.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function Rp(t){if(!(this instanceof Rp))return new Rp(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Xl.toArray(t.entropy,t.entropyEnc||"hex"),n=Xl.toArray(t.nonce,t.nonceEnc||"hex"),r=Xl.toArray(t.pers,t.persEnc||"hex");LM(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,n,r)}var pH=Rp;Rp.prototype._init=function(t,e,n){var r=t.concat(e).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},Rp.prototype._hmac=function(){return new Uu.hmac(this.hash,this.K)},Rp.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},Rp.prototype.reseed=function(t,e,n,r){typeof e!="string"&&(r=n,n=e,e=null),t=Xl.toArray(t,e),n=Xl.toArray(n,r),LM(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(n||[])),this._reseed=1},Rp.prototype.generate=function(t,e,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof e!="string"&&(r=n,n=e,e=null),n&&(n=Xl.toArray(n,r||"hex"),this._update(n));for(var i=[];i.length<t;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var s=i.slice(0,t);return this._update(n),this._reseed++,Xl.encode(s,e)};var BI=rc.assert;function oo(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var $I=oo;oo.fromPublic=function(t,e,n){return e instanceof oo?e:new oo(t,{pub:e,pubEnc:n})},oo.fromPrivate=function(t,e,n){return e instanceof oo?e:new oo(t,{priv:e,privEnc:n})},oo.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},oo.prototype.getPublic=function(t,e){return typeof t=="string"&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},oo.prototype.getPrivate=function(t){return t==="hex"?this.priv.toString(16,2):this.priv},oo.prototype._importPrivate=function(t,e){this.priv=new Rn(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},oo.prototype._importPublic=function(t,e){if(t.x||t.y){this.ec.curve.type==="mont"?BI(t.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&BI(t.x&&t.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(t.x,t.y);return}this.pub=this.ec.curve.decodePoint(t,e)},oo.prototype.derive=function(t){return t.validate()||BI(t.validate(),"public point not validated"),t.mul(this.priv).getX()},oo.prototype.sign=function(t,e,n){return this.ec.sign(t,this,e,n)},oo.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},oo.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var T2e=rc.assert;function OS(t,e){if(t instanceof OS)return t;this._importDER(t,e)||(T2e(t.r&&t.s,"Signature without r or s"),this.r=new Rn(t.r,16),this.s=new Rn(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var V_=OS;function I2e(){this.place=0}function jI(t,e){var n=t[e.place++];if(!(n&128))return n;var r=n&15;if(r===0||r>4)return!1;for(var i=0,s=0,o=e.place;s<r;s++,o++)i<<=8,i|=t[o],i>>>=0;return i<=127?!1:(e.place=o,i)}function mH(t){for(var e=0,n=t.length-1;!t[e]&&!(t[e+1]&128)&&e<n;)e++;return e===0?t:t.slice(e)}OS.prototype._importDER=function(t,e){t=rc.toArray(t,e);var n=new I2e;if(t[n.place++]!==48)return!1;var r=jI(t,n);if(r===!1||r+n.place!==t.length||t[n.place++]!==2)return!1;var i=jI(t,n);if(i===!1)return!1;var s=t.slice(n.place,i+n.place);if(n.place+=i,t[n.place++]!==2)return!1;var o=jI(t,n);if(o===!1||t.length!==o+n.place)return!1;var a=t.slice(n.place,o+n.place);if(s[0]===0)if(s[1]&128)s=s.slice(1);else return!1;if(a[0]===0)if(a[1]&128)a=a.slice(1);else return!1;return this.r=new Rn(s),this.s=new Rn(a),this.recoveryParam=null,!0};function LI(t,e){if(e<128){t.push(e);return}var n=1+(Math.log(e)/Math.LN2>>>3);for(t.push(n|128);--n;)t.push(e>>>(n<<3)&255);t.push(e)}OS.prototype.toDER=function(t){var e=this.r.toArray(),n=this.s.toArray();for(e[0]&128&&(e=[0].concat(e)),n[0]&128&&(n=[0].concat(n)),e=mH(e),n=mH(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var r=[2];LI(r,e.length),r=r.concat(e),r.push(2),LI(r,n.length);var i=r.concat(n),s=[48];return LI(s,i.length),s=s.concat(i),rc.encode(s,t)};var k2e=function(){throw new Error("unsupported")},CJ=rc.assert;function Qc(t){if(!(this instanceof Qc))return new Qc(t);typeof t=="string"&&(CJ(Object.prototype.hasOwnProperty.call(zA,t),"Unknown curve "+t),t=zA[t]),t instanceof zA.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var R2e=Qc;Qc.prototype.keyPair=function(t){return new $I(this,t)},Qc.prototype.keyFromPrivate=function(t,e){return $I.fromPrivate(this,t,e)},Qc.prototype.keyFromPublic=function(t,e){return $I.fromPublic(this,t,e)},Qc.prototype.genKeyPair=function(t){t||(t={});for(var e=new pH({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||k2e(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new Rn(2));;){var i=new Rn(e.generate(n));if(!(i.cmp(r)>0))return i.iaddn(1),this.keyFromPrivate(i)}},Qc.prototype._truncateToN=function(t,e){var n=t.byteLength()*8-this.n.bitLength();return n>0&&(t=t.ushrn(n)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},Qc.prototype.sign=function(t,e,n,r){typeof n=="object"&&(r=n,n=null),r||(r={}),e=this.keyFromPrivate(e,n),t=this._truncateToN(new Rn(t,16));for(var i=this.n.byteLength(),s=e.getPrivate().toArray("be",i),o=t.toArray("be",i),a=new pH({hash:this.hash,entropy:s,nonce:o,pers:r.pers,persEnc:r.persEnc||"utf8"}),c=this.n.sub(new Rn(1)),l=0;;l++){var u=r.k?r.k(l):new Rn(a.generate(this.n.byteLength()));if(u=this._truncateToN(u,!0),!(u.cmpn(1)<=0||u.cmp(c)>=0)){var d=this.g.mul(u);if(!d.isInfinity()){var h=d.getX(),g=h.umod(this.n);if(g.cmpn(0)!==0){var w=u.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t));if(w=w.umod(this.n),w.cmpn(0)!==0){var v=(d.getY().isOdd()?1:0)|(h.cmp(g)!==0?2:0);return r.canonical&&w.cmp(this.nh)>0&&(w=this.n.sub(w),v^=1),new V_({r:g,s:w,recoveryParam:v})}}}}}},Qc.prototype.verify=function(t,e,n,r){t=this._truncateToN(new Rn(t,16)),n=this.keyFromPublic(n,r),e=new V_(e,"hex");var i=e.r,s=e.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o=s.invm(this.n),a=o.mul(t).umod(this.n),c=o.mul(i).umod(this.n),l;return this.curve._maxwellTrick?(l=this.g.jmulAdd(a,n.getPublic(),c),l.isInfinity()?!1:l.eqXToP(i)):(l=this.g.mulAdd(a,n.getPublic(),c),l.isInfinity()?!1:l.getX().umod(this.n).cmp(i)===0)},Qc.prototype.recoverPubKey=function(t,e,n,r){CJ((3&n)===n,"The recovery param is more than two bits"),e=new V_(e,r);var i=this.n,s=new Rn(t),o=e.r,a=e.s,c=n&1,l=n>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");l?o=this.curve.pointFromX(o.add(this.curve.n),c):o=this.curve.pointFromX(o,c);var u=e.r.invm(i),d=i.sub(s).mul(u).umod(i),h=a.mul(u).umod(i);return this.g.mulAdd(d,o,h)},Qc.prototype.getKeyRecoveryParam=function(t,e,n,r){if(e=new V_(e,r),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(t,e,i)}catch{continue}if(s.eq(n))return i}throw new Error("Unable to find valid recovery factor")};var N2e=xb(function(t,e){var n=e;n.version="6.5.4",n.utils=rc,n.rand=function(){throw new Error("unsupported")},n.curve=FA,n.curves=zA,n.ec=R2e,n.eddsa=null}),P2e=N2e.ec;const O2e="signing-key/5.7.0",BN=new Vs(O2e);let UI=null;function _p(){return UI||(UI=new P2e("secp256k1")),UI}class D2e{constructor(e){N2(this,"curve","secp256k1"),N2(this,"privateKey",ua(e)),wve(this.privateKey)!==32&&BN.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const n=_p().keyFromPrivate(Di(this.privateKey));N2(this,"publicKey","0x"+n.getPublic(!1,"hex")),N2(this,"compressedPublicKey","0x"+n.getPublic(!0,"hex")),N2(this,"_isSigningKey",!0)}_addPoint(e){const n=_p().keyFromPublic(Di(this.publicKey)),r=_p().keyFromPublic(Di(e));return"0x"+n.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const n=_p().keyFromPrivate(Di(this.privateKey)),r=Di(e);r.length!==32&&BN.throwArgumentError("bad digest length","digest",e);const i=n.sign(r,{canonical:!0});return QZ({recoveryParam:i.recoveryParam,r:ad("0x"+i.r.toString(16),32),s:ad("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const n=_p().keyFromPrivate(Di(this.privateKey)),r=_p().keyFromPublic(Di(SJ(e)));return ad("0x"+n.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function M2e(t,e){const n=QZ(e),r={r:Di(n.r),s:Di(n.s)};return"0x"+_p().recoverPubKey(Di(t),r,n.recoveryParam).encode("hex",!1)}function SJ(t,e){const n=Di(t);return n.length===32?new D2e(n).publicKey:n.length===33?"0x"+_p().keyFromPublic(n).getPublic(!1,"hex"):n.length===65?ua(n):BN.throwArgumentError("invalid public or private key","key","[REDACTED]")}var gH;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(gH||(gH={}));function B2e(t){const e=SJ(t);return Gve(tH(BM(tH(e,1)),12))}function $2e(t,e){return B2e(M2e(Di(t),e))}const j2e="https://rpc.walletconnect.com/v1";async function L2e(t,e,n,r,i,s){switch(n.t){case"eip191":return U2e(t,e,n.s);case"eip1271":return await F2e(t,e,n.s,r,i,s);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${n.t}`)}}function U2e(t,e,n){return $2e(sJ(e),n).toLowerCase()===t.toLowerCase()}async function F2e(t,e,n,r,i,s){try{const o="0x1626ba7e",a="0000000000000000000000000000000000000000000000000000000000000040",c="0000000000000000000000000000000000000000000000000000000000000041",l=n.substring(2),u=sJ(e).substring(2),d=o+u+a+c+l,h=await fetch(`${s||j2e}/?chainId=${r}&projectId=${i}`,{method:"POST",body:JSON.stringify({id:z2e(),jsonrpc:"2.0",method:"eth_call",params:[{to:t,data:d},"latest"]})}),{result:g}=await h.json();return g?g.slice(0,o.length).toLowerCase()===o.toLowerCase():!1}catch(o){return console.error("isValidEip1271Signature: ",o),!1}}function z2e(){return Date.now()+Math.floor(Math.random()*1e3)}var H2e=Object.defineProperty,W2e=Object.defineProperties,V2e=Object.getOwnPropertyDescriptors,wH=Object.getOwnPropertySymbols,q2e=Object.prototype.hasOwnProperty,G2e=Object.prototype.propertyIsEnumerable,yH=(t,e,n)=>e in t?H2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,K2e=(t,e)=>{for(var n in e||(e={}))q2e.call(e,n)&&yH(t,n,e[n]);if(wH)for(var n of wH(e))G2e.call(e,n)&&yH(t,n,e[n]);return t},Y2e=(t,e)=>W2e(t,V2e(e));const Q2e="did:pkh:",FM=t=>t==null?void 0:t.split(":"),TJ=t=>{const e=t&&FM(t);if(e)return t.includes(Q2e)?e[3]:e[1]},vH=t=>{const e=t&&FM(t);if(e)return e[2]+":"+e[3]},KE=t=>{const e=t&&FM(t);if(e)return e.pop()};async function bH(t){const{cacao:e,projectId:n}=t,{s:r,p:i}=e,s=IJ(i,i.iss),o=KE(i.iss);return await L2e(o,s,r,TJ(i.iss),n)}const IJ=(t,e)=>{const n=`${t.domain} wants you to sign in with your Ethereum account:`,r=KE(e);if(!t.aud&&!t.uri)throw new Error("Either `aud` or `uri` is required to construct the message");let i=t.statement||void 0;const s=`URI: ${t.aud||t.uri}`,o=`Version: ${t.version}`,a=`Chain ID: ${TJ(e)}`,c=`Nonce: ${t.nonce}`,l=`Issued At: ${t.iat}`,u=t.exp?`Expiration Time: ${t.exp}`:void 0,d=t.nbf?`Not Before: ${t.nbf}`:void 0,h=t.requestId?`Request ID: ${t.requestId}`:void 0,g=t.resources?`Resources:${t.resources.map(v=>`
- ${v}`).join("")}`:void 0,w=HA(t.resources);if(w){const v=m5(w);i=s3e(i,v)}return[n,r,"",i,"",s,o,a,c,l,u,d,h,g].filter(v=>v!=null).join(`
`)};function Z2e(t){return Buffer.from(JSON.stringify(t)).toString("base64")}function J2e(t){return JSON.parse(Buffer.from(t,"base64").toString("utf-8"))}function Og(t){if(!t)throw new Error("No recap provided, value is undefined");if(!t.att)throw new Error("No `att` property found");const e=Object.keys(t.att);if(!(e!=null&&e.length))throw new Error("No resources found in `att` property");e.forEach(n=>{const r=t.att[n];if(Array.isArray(r))throw new Error(`Resource must be an object: ${n}`);if(typeof r!="object")throw new Error(`Resource must be an object: ${n}`);if(!Object.keys(r).length)throw new Error(`Resource object is empty: ${n}`);Object.keys(r).forEach(i=>{const s=r[i];if(!Array.isArray(s))throw new Error(`Ability limits ${i} must be an array of objects, found: ${s}`);if(!s.length)throw new Error(`Value of ${i} is empty array, must be an array with objects`);s.forEach(o=>{if(typeof o!="object")throw new Error(`Ability limits (${i}) must be an array of objects, found: ${o}`)})})})}function X2e(t,e,n,r={}){return n==null||n.sort((i,s)=>i.localeCompare(s)),{att:{[t]:e3e(e,n,r)}}}function e3e(t,e,n={}){e=e==null?void 0:e.sort((i,s)=>i.localeCompare(s));const r=e.map(i=>({[`${t}/${i}`]:[n]}));return Object.assign({},...r)}function kJ(t){return Og(t),`urn:recap:${Z2e(t).replace(/=/g,"")}`}function m5(t){const e=J2e(t.replace("urn:recap:",""));return Og(e),e}function t3e(t,e,n){const r=X2e(t,e,n);return kJ(r)}function n3e(t){return t&&t.includes("urn:recap:")}function r3e(t,e){const n=m5(t),r=m5(e),i=i3e(n,r);return kJ(i)}function i3e(t,e){Og(t),Og(e);const n=Object.keys(t.att).concat(Object.keys(e.att)).sort((i,s)=>i.localeCompare(s)),r={att:{}};return n.forEach(i=>{var s,o;Object.keys(((s=t.att)==null?void 0:s[i])||{}).concat(Object.keys(((o=e.att)==null?void 0:o[i])||{})).sort((a,c)=>a.localeCompare(c)).forEach(a=>{var c,l;r.att[i]=Y2e(K2e({},r.att[i]),{[a]:((c=t.att[i])==null?void 0:c[a])||((l=e.att[i])==null?void 0:l[a])})})}),r}function s3e(t="",e){Og(e);const n="I further authorize the stated URI to perform the following actions on my behalf: ";if(t.includes(n))return t;const r=[];let i=0;Object.keys(e.att).forEach(a=>{const c=Object.keys(e.att[a]).map(d=>({ability:d.split("/")[0],action:d.split("/")[1]}));c.sort((d,h)=>d.action.localeCompare(h.action));const l={};c.forEach(d=>{l[d.ability]||(l[d.ability]=[]),l[d.ability].push(d.action)});const u=Object.keys(l).map(d=>(i++,`(${i}) '${d}': '${l[d].join("', '")}' for '${a}'.`));r.push(u.join(", ").replace(".,","."))});const s=r.join(" "),o=`${n}${s}`;return`${t?t+" ":""}${o}`}function xH(t){var e;const n=m5(t);Og(n);const r=(e=n.att)==null?void 0:e.eip155;return r?Object.keys(r).map(i=>i.split("/")[1]):[]}function _H(t){const e=m5(t);Og(e);const n=[];return Object.values(e.att).forEach(r=>{Object.values(r).forEach(i=>{var s;(s=i==null?void 0:i[0])!=null&&s.chains&&n.push(i[0].chains)})}),[...new Set(n.flat())]}function HA(t){if(!t)return;const e=t==null?void 0:t[t.length-1];return n3e(e)?e:void 0}const RJ="base10",Oo="base16",$N="base64pad",zM="utf8",NJ=0,Zf=1,o3e=0,AH=1,jN=12,HM=32;function a3e(){const t=DM.generateKeyPair();return{privateKey:Do(t.secretKey,Oo),publicKey:Do(t.publicKey,Oo)}}function LN(){const t=mb.randomBytes(HM);return Do(t,Oo)}function c3e(t,e){const n=DM.sharedKey(va(t,Oo),va(e,Oo),!0),r=new Dwe(NS.SHA256,n).expand(HM);return Do(r,Oo)}function WA(t){const e=NS.hash(va(t,Oo));return Do(e,Oo)}function Vm(t){const e=NS.hash(va(t,zM));return Do(e,Oo)}function l3e(t){return va(`${t}`,RJ)}function x6(t){return Number(Do(t,RJ))}function u3e(t){const e=l3e(typeof t.type<"u"?t.type:NJ);if(x6(e)===Zf&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof t.senderPublicKey<"u"?va(t.senderPublicKey,Oo):void 0,r=typeof t.iv<"u"?va(t.iv,Oo):mb.randomBytes(jN),i=new PM.ChaCha20Poly1305(va(t.symKey,Oo)).seal(r,va(t.message,zM));return f3e({type:e,sealed:i,iv:r,senderPublicKey:n})}function d3e(t){const e=new PM.ChaCha20Poly1305(va(t.symKey,Oo)),{sealed:n,iv:r}=YE(t.encoded),i=e.open(r,n);if(i===null)throw new Error("Failed to decrypt");return Do(i,zM)}function f3e(t){if(x6(t.type)===Zf){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Do(RN([t.type,t.senderPublicKey,t.iv,t.sealed]),$N)}return Do(RN([t.type,t.iv,t.sealed]),$N)}function YE(t){const e=va(t,$N),n=e.slice(o3e,AH),r=AH;if(x6(n)===Zf){const a=r+HM,c=a+jN,l=e.slice(r,a),u=e.slice(a,c),d=e.slice(c);return{type:n,sealed:d,iv:u,senderPublicKey:l}}const i=r+jN,s=e.slice(r,i),o=e.slice(i);return{type:n,sealed:o,iv:s}}function h3e(t,e){const n=YE(t);return PJ({type:x6(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?Do(n.senderPublicKey,Oo):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function PJ(t){const e=(t==null?void 0:t.type)||NJ;if(e===Zf){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 EH(t){return t.type===Zf&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}const p3e="irn";function UN(t){return(t==null?void 0:t.relay)||{protocol:p3e}}function n3(t){const e=Fye[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var m3e=Object.defineProperty,g3e=Object.defineProperties,w3e=Object.getOwnPropertyDescriptors,CH=Object.getOwnPropertySymbols,y3e=Object.prototype.hasOwnProperty,v3e=Object.prototype.propertyIsEnumerable,SH=(t,e,n)=>e in t?m3e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,TH=(t,e)=>{for(var n in e||(e={}))y3e.call(e,n)&&SH(t,n,e[n]);if(CH)for(var n of CH(e))v3e.call(e,n)&&SH(t,n,e[n]);return t},b3e=(t,e)=>g3e(t,w3e(e));function x3e(t,e="-"){const n={},r="relay"+e;return Object.keys(t).forEach(i=>{if(i.startsWith(r)){const s=i.replace(r,""),o=t[i];n[s]=o}}),n}function IH(t){t=t.includes("wc://")?t.replace("wc://",""):t,t=t.includes("wc:")?t.replace("wc:",""):t;const e=t.indexOf(":"),n=t.indexOf("?")!==-1?t.indexOf("?"):void 0,r=t.substring(0,e),i=t.substring(e+1,n).split("@"),s=typeof n<"u"?t.substring(n):"",o=f5.parse(s),a=typeof o.methods=="string"?o.methods.split(","):void 0;return{protocol:r,topic:_3e(i[0]),version:parseInt(i[1],10),symKey:o.symKey,relay:x3e(o),methods:a,expiryTimestamp:o.expiryTimestamp?parseInt(o.expiryTimestamp,10):void 0}}function _3e(t){return t.startsWith("//")?t.substring(2):t}function A3e(t,e="-"){const n="relay",r={};return Object.keys(t).forEach(i=>{const s=n+e+i;t[i]&&(r[s]=t[i])}),r}function E3e(t){return`${t.protocol}:${t.topic}@${t.version}?`+f5.stringify(TH(b3e(TH({symKey:t.symKey},A3e(t.relay)),{expiryTimestamp:t.expiryTimestamp}),t.methods?{methods:t.methods.join(",")}:{}))}function _b(t){const e=[];return t.forEach(n=>{const[r,i]=n.split(":");e.push(`${r}:${i}`)}),e}function C3e(t){const e=[];return Object.values(t).forEach(n=>{e.push(..._b(n.accounts))}),e}function S3e(t,e){const n=[];return Object.values(t).forEach(r=>{_b(r.accounts).includes(e)&&n.push(...r.methods)}),n}function T3e(t,e){const n=[];return Object.values(t).forEach(r=>{_b(r.accounts).includes(e)&&n.push(...r.events)}),n}function WM(t){return t.includes(":")}function r3(t){return WM(t)?t.split(":")[0]:t}function I3e(t){const e={};return t==null||t.forEach(n=>{const[r,i]=n.split(":");e[r]||(e[r]={accounts:[],chains:[],events:[]}),e[r].accounts.push(n),e[r].chains.push(`${r}:${i}`)}),e}function kH(t,e){e=e.map(r=>r.replace("did:pkh:",""));const n=I3e(e);for(const[r,i]of Object.entries(n))i.methods?i.methods=LA(i.methods,t):i.methods=t,i.events=["chainChanged","accountsChanged"];return n}const k3e={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}},R3e={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 dt(t,e){const{message:n,code:r}=R3e[t];return{message:e?`${n} ${e}`:n,code:r}}function Lr(t,e){const{message:n,code:r}=k3e[t];return{message:e?`${n} ${e}`:n,code:r}}function hd(t,e){return!!Array.isArray(t)}function g5(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function ma(t){return typeof t>"u"}function Gi(t,e){return e&&ma(t)?!0:typeof t=="string"&&!!t.trim().length}function VM(t,e){return typeof t=="number"&&!isNaN(t)}function N3e(t,e){const{requiredNamespaces:n}=e,r=Object.keys(t.namespaces),i=Object.keys(n);let s=!0;return Wm(i,r)?(r.forEach(o=>{const{accounts:a,methods:c,events:l}=t.namespaces[o],u=_b(a),d=n[o];(!Wm(zZ(o,d),u)||!Wm(d.methods,c)||!Wm(d.events,l))&&(s=!1)}),s):!1}function QE(t){return Gi(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function P3e(t){if(Gi(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const n=e[0]+":"+e[1];return!!e[2]&&QE(n)}}return!1}function O3e(t){if(Gi(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function D3e(t){var e;return(e=t==null?void 0:t.proposer)==null?void 0:e.publicKey}function M3e(t){return t==null?void 0:t.topic}function B3e(t,e){let n=null;return Gi(t==null?void 0:t.publicKey,!1)||(n=dt("MISSING_OR_INVALID",`${e} controller public key should be a string`)),n}function RH(t){let e=!0;return hd(t)?t.length&&(e=t.every(n=>Gi(n,!1))):e=!1,e}function $3e(t,e,n){let r=null;return hd(e)&&e.length?e.forEach(i=>{r||QE(i)||(r=Lr("UNSUPPORTED_CHAINS",`${n}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):QE(t)||(r=Lr("UNSUPPORTED_CHAINS",`${n}, 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"] }`)),r}function j3e(t,e,n){let r=null;return Object.entries(t).forEach(([i,s])=>{if(r)return;const o=$3e(i,zZ(i,s),`${e} ${n}`);o&&(r=o)}),r}function L3e(t,e){let n=null;return hd(t)?t.forEach(r=>{n||P3e(r)||(n=Lr("UNSUPPORTED_ACCOUNTS",`${e}, account ${r} should be a string and conform to "namespace:chainId:address" format`))}):n=Lr("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function U3e(t,e){let n=null;return Object.values(t).forEach(r=>{if(n)return;const i=L3e(r==null?void 0:r.accounts,`${e} namespace`);i&&(n=i)}),n}function F3e(t,e){let n=null;return RH(t==null?void 0:t.methods)?RH(t==null?void 0:t.events)||(n=Lr("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):n=Lr("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),n}function OJ(t,e){let n=null;return Object.values(t).forEach(r=>{if(n)return;const i=F3e(r,`${e}, namespace`);i&&(n=i)}),n}function z3e(t,e,n){let r=null;if(t&&g5(t)){const i=OJ(t,e);i&&(r=i);const s=j3e(t,e,n);s&&(r=s)}else r=dt("MISSING_OR_INVALID",`${e}, ${n} should be an object with data`);return r}function FI(t,e){let n=null;if(t&&g5(t)){const r=OJ(t,e);r&&(n=r);const i=U3e(t,e);i&&(n=i)}else n=dt("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return n}function DJ(t){return Gi(t.protocol,!0)}function H3e(t,e){let n=!1;return t?t&&hd(t)&&t.length&&t.forEach(r=>{n=DJ(r)}):n=!0,n}function W3e(t){return typeof t=="number"}function aa(t){return typeof t<"u"&&typeof t!==null}function V3e(t){return!(!t||typeof t!="object"||!t.code||!VM(t.code)||!t.message||!Gi(t.message,!1))}function q3e(t){return!(ma(t)||!Gi(t.method,!1))}function G3e(t){return!(ma(t)||ma(t.result)&&ma(t.error)||!VM(t.id)||!Gi(t.jsonrpc,!1))}function K3e(t){return!(ma(t)||!Gi(t.name,!1))}function NH(t,e){return!(!QE(e)||!C3e(t).includes(e))}function Y3e(t,e,n){return Gi(n,!1)?S3e(t,e).includes(n):!1}function Q3e(t,e,n){return Gi(n,!1)?T3e(t,e).includes(n):!1}function PH(t,e,n){let r=null;const i=Z3e(t),s=J3e(e),o=Object.keys(i),a=Object.keys(s),c=OH(Object.keys(t)),l=OH(Object.keys(e)),u=c.filter(d=>!l.includes(d));return u.length&&(r=dt("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.
      Required: ${u.toString()}
      Received: ${Object.keys(e).toString()}`)),Wm(o,a)||(r=dt("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.
      Required: ${o.toString()}
      Approved: ${a.toString()}`)),Object.keys(e).forEach(d=>{if(!d.includes(":")||r)return;const h=_b(e[d].accounts);h.includes(d)||(r=dt("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${d}
        Required: ${d}
        Approved: ${h.toString()}`))}),o.forEach(d=>{r||(Wm(i[d].methods,s[d].methods)?Wm(i[d].events,s[d].events)||(r=dt("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${d}`)):r=dt("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${d}`))}),r}function Z3e(t){const e={};return Object.keys(t).forEach(n=>{var r;n.includes(":")?e[n]=t[n]:(r=t[n].chains)==null||r.forEach(i=>{e[i]={methods:t[n].methods,events:t[n].events}})}),e}function OH(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function J3e(t){const e={};return Object.keys(t).forEach(n=>{if(n.includes(":"))e[n]=t[n];else{const r=_b(t[n].accounts);r==null||r.forEach(i=>{e[i]={accounts:t[n].accounts.filter(s=>s.includes(`${i}:`)),methods:t[n].methods,events:t[n].events}})}}),e}function X3e(t,e){return VM(t)&&t<=e.max&&t>=e.min}function DH(){const t=v6();return new Promise(e=>{switch(t){case Qa.browser:e(e5e());break;case Qa.reactNative:e(t5e());break;case Qa.node:e(n5e());break;default:e(!0)}})}function e5e(){return wb()&&(navigator==null?void 0:navigator.onLine)}async function t5e(){if(gb()&&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 n5e(){return!0}function r5e(t){switch(v6()){case Qa.browser:i5e(t);break;case Qa.reactNative:s5e(t);break}}function i5e(t){!gb()&&wb()&&(window.addEventListener("online",()=>t(!0)),window.addEventListener("offline",()=>t(!1)))}function s5e(t){gb()&&typeof global<"u"&&global!=null&&global.NetInfo&&(global==null||global.NetInfo.addEventListener(e=>t(e==null?void 0:e.isConnected)))}const zI={};class D2{static get(e){return zI[e]}static set(e,n){zI[e]=n}static delete(e){delete zI[e]}}const o5e=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,a5e=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,c5e=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function l5e(t,e){if(t==="__proto__"||t==="constructor"&&e&&typeof e=="object"&&"prototype"in e){u5e(t);return}return e}function u5e(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)}function q_(t,e={}){if(typeof t!="string")return t;const n=t.trim();if(t[0]==='"'&&t.endsWith('"')&&!t.includes("\\"))return n.slice(1,-1);if(n.length<=9){const r=n.toLowerCase();if(r==="true")return!0;if(r==="false")return!1;if(r==="undefined")return;if(r==="null")return null;if(r==="nan")return Number.NaN;if(r==="infinity")return Number.POSITIVE_INFINITY;if(r==="-infinity")return Number.NEGATIVE_INFINITY}if(!c5e.test(t)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(o5e.test(t)||a5e.test(t)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,l5e)}return JSON.parse(t)}catch(r){if(e.strict)throw r;return t}}function d5e(t){return!t||typeof t.then!="function"?Promise.resolve(t):t}function Ts(t,...e){try{return d5e(t(...e))}catch(n){return Promise.reject(n)}}function f5e(t){const e=typeof t;return t===null||e!=="object"&&e!=="function"}function h5e(t){const e=Object.getPrototypeOf(t);return!e||e.isPrototypeOf(Object)}function VA(t){if(f5e(t))return String(t);if(h5e(t)||Array.isArray(t))return JSON.stringify(t);if(typeof t.toJSON=="function")return VA(t.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function MJ(){if(typeof Buffer===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const FN="base64:";function p5e(t){if(typeof t=="string")return t;MJ();const e=Buffer.from(t).toString("base64");return FN+e}function m5e(t){return typeof t!="string"||!t.startsWith(FN)?t:(MJ(),Buffer.from(t.slice(FN.length),"base64"))}function sa(t){return t?t.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function g5e(...t){return sa(t.join(":"))}function G_(t){return t=sa(t),t?t+":":""}const w5e="memory",y5e=()=>{const t=new Map;return{name:w5e,options:{},hasItem(e){return t.has(e)},getItem(e){return t.get(e)??null},getItemRaw(e){return t.get(e)??null},setItem(e,n){t.set(e,n)},setItemRaw(e,n){t.set(e,n)},removeItem(e){t.delete(e)},getKeys(){return Array.from(t.keys())},clear(){t.clear()},dispose(){t.clear()}}};function v5e(t={}){const e={mounts:{"":t.driver||y5e()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=l=>{for(const u of e.mountpoints)if(l.startsWith(u))return{base:u,relativeKey:l.slice(u.length),driver:e.mounts[u]};return{base:"",relativeKey:l,driver:e.mounts[""]}},r=(l,u)=>e.mountpoints.filter(d=>d.startsWith(l)||u&&l.startsWith(d)).map(d=>({relativeBase:l.length>d.length?l.slice(d.length):void 0,mountpoint:d,driver:e.mounts[d]})),i=(l,u)=>{if(e.watching){u=sa(u);for(const d of e.watchListeners)d(l,u)}},s=async()=>{if(!e.watching){e.watching=!0;for(const l in e.mounts)e.unwatch[l]=await MH(e.mounts[l],i,l)}},o=async()=>{if(e.watching){for(const l in e.unwatch)await e.unwatch[l]();e.unwatch={},e.watching=!1}},a=(l,u,d)=>{const h=new Map,g=w=>{let v=h.get(w.base);return v||(v={driver:w.driver,base:w.base,items:[]},h.set(w.base,v)),v};for(const w of l){const v=typeof w=="string",_=sa(v?w:w.key),T=v?void 0:w.value,b=v||!w.options?u:{...u,...w.options},k=n(_);g(k).items.push({key:_,value:T,relativeKey:k.relativeKey,options:b})}return Promise.all([...h.values()].map(w=>d(w))).then(w=>w.flat())},c={hasItem(l,u={}){l=sa(l);const{relativeKey:d,driver:h}=n(l);return Ts(h.hasItem,d,u)},getItem(l,u={}){l=sa(l);const{relativeKey:d,driver:h}=n(l);return Ts(h.getItem,d,u).then(g=>q_(g))},getItems(l,u){return a(l,u,d=>d.driver.getItems?Ts(d.driver.getItems,d.items.map(h=>({key:h.relativeKey,options:h.options})),u).then(h=>h.map(g=>({key:g5e(d.base,g.key),value:q_(g.value)}))):Promise.all(d.items.map(h=>Ts(d.driver.getItem,h.relativeKey,h.options).then(g=>({key:h.key,value:q_(g)})))))},getItemRaw(l,u={}){l=sa(l);const{relativeKey:d,driver:h}=n(l);return h.getItemRaw?Ts(h.getItemRaw,d,u):Ts(h.getItem,d,u).then(g=>m5e(g))},async setItem(l,u,d={}){if(u===void 0)return c.removeItem(l);l=sa(l);const{relativeKey:h,driver:g}=n(l);g.setItem&&(await Ts(g.setItem,h,VA(u),d),g.watch||i("update",l))},async setItems(l,u){await a(l,u,async d=>{if(d.driver.setItems)return Ts(d.driver.setItems,d.items.map(h=>({key:h.relativeKey,value:VA(h.value),options:h.options})),u);d.driver.setItem&&await Promise.all(d.items.map(h=>Ts(d.driver.setItem,h.relativeKey,VA(h.value),h.options)))})},async setItemRaw(l,u,d={}){if(u===void 0)return c.removeItem(l,d);l=sa(l);const{relativeKey:h,driver:g}=n(l);if(g.setItemRaw)await Ts(g.setItemRaw,h,u,d);else if(g.setItem)await Ts(g.setItem,h,p5e(u),d);else return;g.watch||i("update",l)},async removeItem(l,u={}){typeof u=="boolean"&&(u={removeMeta:u}),l=sa(l);const{relativeKey:d,driver:h}=n(l);h.removeItem&&(await Ts(h.removeItem,d,u),(u.removeMeta||u.removeMata)&&await Ts(h.removeItem,d+"$",u),h.watch||i("remove",l))},async getMeta(l,u={}){typeof u=="boolean"&&(u={nativeOnly:u}),l=sa(l);const{relativeKey:d,driver:h}=n(l),g=Object.create(null);if(h.getMeta&&Object.assign(g,await Ts(h.getMeta,d,u)),!u.nativeOnly){const w=await Ts(h.getItem,d+"$",u).then(v=>q_(v));w&&typeof w=="object"&&(typeof w.atime=="string"&&(w.atime=new Date(w.atime)),typeof w.mtime=="string"&&(w.mtime=new Date(w.mtime)),Object.assign(g,w))}return g},setMeta(l,u,d={}){return this.setItem(l+"$",u,d)},removeMeta(l,u={}){return this.removeItem(l+"$",u)},async getKeys(l,u={}){l=G_(l);const d=r(l,!0);let h=[];const g=[];for(const w of d){const _=(await Ts(w.driver.getKeys,w.relativeBase,u)).map(T=>w.mountpoint+sa(T)).filter(T=>!h.some(b=>T.startsWith(b)));g.push(..._),h=[w.mountpoint,...h.filter(T=>!T.startsWith(w.mountpoint))]}return l?g.filter(w=>w.startsWith(l)&&!w.endsWith("$")):g.filter(w=>!w.endsWith("$"))},async clear(l,u={}){l=G_(l),await Promise.all(r(l,!1).map(async d=>{if(d.driver.clear)return Ts(d.driver.clear,d.relativeBase,u);if(d.driver.removeItem){const h=await d.driver.getKeys(d.relativeBase||"",u);return Promise.all(h.map(g=>d.driver.removeItem(g,u)))}}))},async dispose(){await Promise.all(Object.values(e.mounts).map(l=>BH(l)))},async watch(l){return await s(),e.watchListeners.push(l),async()=>{e.watchListeners=e.watchListeners.filter(u=>u!==l),e.watchListeners.length===0&&await o()}},async unwatch(){e.watchListeners=[],await o()},mount(l,u){if(l=G_(l),l&&e.mounts[l])throw new Error(`already mounted at ${l}`);return l&&(e.mountpoints.push(l),e.mountpoints.sort((d,h)=>h.length-d.length)),e.mounts[l]=u,e.watching&&Promise.resolve(MH(u,i,l)).then(d=>{e.unwatch[l]=d}).catch(console.error),c},async unmount(l,u=!0){l=G_(l),!(!l||!e.mounts[l])&&(e.watching&&l in e.unwatch&&(e.unwatch[l](),delete e.unwatch[l]),u&&await BH(e.mounts[l]),e.mountpoints=e.mountpoints.filter(d=>d!==l),delete e.mounts[l])},getMount(l=""){l=sa(l)+":";const u=n(l);return{driver:u.driver,base:u.base}},getMounts(l="",u={}){return l=sa(l),r(l,u.parents).map(h=>({driver:h.driver,base:h.mountpoint}))}};return c}function MH(t,e,n){return t.watch?t.watch((r,i)=>e(r,n+i)):()=>{}}async function BH(t){typeof t.dispose=="function"&&await Ts(t.dispose)}function _1(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function BJ(t,e){const n=indexedDB.open(t);n.onupgradeneeded=()=>n.result.createObjectStore(e);const r=_1(n);return(i,s)=>r.then(o=>s(o.transaction(e,i).objectStore(e)))}let HI;function _6(){return HI||(HI=BJ("keyval-store","keyval")),HI}function $H(t,e=_6()){return e("readonly",n=>_1(n.get(t)))}function b5e(t,e,n=_6()){return n("readwrite",r=>(r.put(e,t),_1(r.transaction)))}function x5e(t,e=_6()){return e("readwrite",n=>(n.delete(t),_1(n.transaction)))}function _5e(t=_6()){return t("readwrite",e=>(e.clear(),_1(e.transaction)))}function A5e(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},_1(t.transaction)}function E5e(t=_6()){return t("readonly",e=>{if(e.getAllKeys)return _1(e.getAllKeys());const n=[];return A5e(e,r=>n.push(r.key)).then(()=>n)})}const C5e=t=>JSON.stringify(t,(e,n)=>typeof n=="bigint"?n.toString()+"n":n),S5e=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,n=t.replace(e,'$1"$2n"$3');return JSON.parse(n,(r,i)=>typeof i=="string"&&i.match(/^\d+n$/)?BigInt(i.substring(0,i.length-1)):i)};function A6(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return S5e(t)}catch{return t}}function ch(t){return typeof t=="string"?t:C5e(t)||""}const T5e="idb-keyval";var I5e=(t={})=>{const e=t.base&&t.base.length>0?`${t.base}:`:"",n=i=>e+i;let r;return t.dbName&&t.storeName&&(r=BJ(t.dbName,t.storeName)),{name:T5e,options:t,async hasItem(i){return!(typeof await $H(n(i),r)>"u")},async getItem(i){return await $H(n(i),r)??null},setItem(i,s){return b5e(n(i),s,r)},removeItem(i){return x5e(n(i),r)},getKeys(){return E5e(r)},clear(){return _5e(r)}}};const k5e="WALLET_CONNECT_V2_INDEXED_DB",R5e="keyvaluestorage";let N5e=class{constructor(){this.indexedDb=v5e({driver:I5e({dbName:k5e,storeName:R5e})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){const n=await this.indexedDb.getItem(e);if(n!==null)return n}async setItem(e,n){await this.indexedDb.setItem(e,ch(n))}async removeItem(e){await this.indexedDb.removeItem(e)}};var WI=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qA={exports:{}};(function(){let t;function e(){}t=e,t.prototype.getItem=function(n){return this.hasOwnProperty(n)?String(this[n]):null},t.prototype.setItem=function(n,r){this[n]=String(r)},t.prototype.removeItem=function(n){delete this[n]},t.prototype.clear=function(){const n=this;Object.keys(n).forEach(function(r){n[r]=void 0,delete n[r]})},t.prototype.key=function(n){return n=n||0,Object.keys(this)[n]},t.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof WI<"u"&&WI.localStorage?qA.exports=WI.localStorage:typeof window<"u"&&window.localStorage?qA.exports=window.localStorage:qA.exports=new e})();function P5e(t){var e;return[t[0],A6((e=t[1])!=null?e:"")]}let O5e=class{constructor(){this.localStorage=qA.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(P5e)}async getItem(e){const n=this.localStorage.getItem(e);if(n!==null)return A6(n)}async setItem(e,n){this.localStorage.setItem(e,ch(n))}async removeItem(e){this.localStorage.removeItem(e)}};const D5e="wc_storage_version",jH=1,M5e=async(t,e,n)=>{const r=D5e,i=await e.getItem(r);if(i&&i>=jH){n(e);return}const s=await t.getKeys();if(!s.length){n(e);return}const o=[];for(;s.length;){const a=s.shift();if(!a)continue;const c=a.toLowerCase();if(c.includes("wc@")||c.includes("walletconnect")||c.includes("wc_")||c.includes("wallet_connect")){const l=await t.getItem(a);await e.setItem(a,l),o.push(a)}}await e.setItem(r,jH),n(e),B5e(t,o)},B5e=async(t,e)=>{e.length&&e.forEach(async n=>{await t.removeItem(n)})};let $5e=class{constructor(){this.initialized=!1,this.setInitialized=n=>{this.storage=n,this.initialized=!0};const e=new O5e;this.storage=e;try{const n=new N5e;M5e(e,n,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,n){return await this.initialize(),this.storage.setItem(e,n)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{const n=setInterval(()=>{this.initialized&&(clearInterval(n),e())},20)})}};class A1{}let j5e=class extends A1{constructor(e){super()}};const LH=At.FIVE_SECONDS,E6={pulse:"heartbeat_pulse"};let L5e=class $J extends j5e{constructor(e){super(e),this.events=new hc.EventEmitter,this.interval=LH,this.interval=(e==null?void 0:e.interval)||LH}static async init(e){const n=new $J(e);return await n.init(),n}async init(){await this.initialize()}stop(){clearInterval(this.intervalRef)}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}async initialize(){this.intervalRef=setInterval(()=>this.pulse(),At.toMiliseconds(this.interval))}pulse(){this.events.emit(E6.pulse)}};function U5e(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}var F5e=z5e;function z5e(t,e,n){var r=n&&n.stringify||U5e,i=1;if(typeof t=="object"&&t!==null){var s=e.length+i;if(s===1)return t;var o=new Array(s);o[0]=r(t);for(var a=1;a<s;a++)o[a]=r(e[a]);return o.join(" ")}if(typeof t!="string")return t;var c=e.length;if(c===0)return t;for(var l="",u=1-i,d=-1,h=t&&t.length||0,g=0;g<h;){if(t.charCodeAt(g)===37&&g+1<h){switch(d=d>-1?d:0,t.charCodeAt(g+1)){case 100:case 102:if(u>=c||e[u]==null)break;d<g&&(l+=t.slice(d,g)),l+=Number(e[u]),d=g+2,g++;break;case 105:if(u>=c||e[u]==null)break;d<g&&(l+=t.slice(d,g)),l+=Math.floor(Number(e[u])),d=g+2,g++;break;case 79:case 111:case 106:if(u>=c||e[u]===void 0)break;d<g&&(l+=t.slice(d,g));var w=typeof e[u];if(w==="string"){l+="'"+e[u]+"'",d=g+2,g++;break}if(w==="function"){l+=e[u].name||"<anonymous>",d=g+2,g++;break}l+=r(e[u]),d=g+2,g++;break;case 115:if(u>=c)break;d<g&&(l+=t.slice(d,g)),l+=String(e[u]),d=g+2,g++;break;case 37:d<g&&(l+=t.slice(d,g)),l+="%",d=g+2,g++,u--;break}++u}++g}return d===-1?t:(d<h&&(l+=t.slice(d)),l)}const UH=F5e;var jw=dd;const w5=J5e().console||{},H5e={mapHttpRequest:K_,mapHttpResponse:K_,wrapRequestSerializer:VI,wrapResponseSerializer:VI,wrapErrorSerializer:VI,req:K_,res:K_,err:K5e};function W5e(t,e){return Array.isArray(t)?t.filter(function(r){return r!=="!stdSerializers.err"}):t===!0?Object.keys(e):!1}function dd(t){t=t||{},t.browser=t.browser||{};const e=t.browser.transmit;if(e&&typeof e.send!="function")throw Error("pino: transmit option must have a send function");const n=t.browser.write||w5;t.browser.write&&(t.browser.asObject=!0);const r=t.serializers||{},i=W5e(t.browser.serialize,r);let s=t.browser.serialize;Array.isArray(t.browser.serialize)&&t.browser.serialize.indexOf("!stdSerializers.err")>-1&&(s=!1);const o=["error","fatal","warn","info","debug","trace"];typeof n=="function"&&(n.error=n.fatal=n.warn=n.info=n.debug=n.trace=n),t.enabled===!1&&(t.level="silent");const a=t.level||"info",c=Object.create(n);c.log||(c.log=y5),Object.defineProperty(c,"levelVal",{get:u}),Object.defineProperty(c,"level",{get:d,set:h});const l={transmit:e,serialize:i,asObject:t.browser.asObject,levels:o,timestamp:Y5e(t)};c.levels=dd.levels,c.level=a,c.setMaxListeners=c.getMaxListeners=c.emit=c.addListener=c.on=c.prependListener=c.once=c.prependOnceListener=c.removeListener=c.removeAllListeners=c.listeners=c.listenerCount=c.eventNames=c.write=c.flush=y5,c.serializers=r,c._serialize=i,c._stdErrSerialize=s,c.child=g,e&&(c._logEvent=zN());function u(){return this.level==="silent"?1/0:this.levels.values[this.level]}function d(){return this._level}function h(w){if(w!=="silent"&&!this.levels.values[w])throw Error("unknown level "+w);this._level=w,Aw(l,c,"error","log"),Aw(l,c,"fatal","error"),Aw(l,c,"warn","error"),Aw(l,c,"info","log"),Aw(l,c,"debug","log"),Aw(l,c,"trace","log")}function g(w,v){if(!w)throw new Error("missing bindings for child Pino");v=v||{},i&&w.serializers&&(v.serializers=w.serializers);const _=v.serializers;if(i&&_){var T=Object.assign({},r,_),b=t.browser.serialize===!0?Object.keys(T):i;delete w.serializers,DS([w],b,T,this._stdErrSerialize)}function k(D){this._childLevel=(D._childLevel|0)+1,this.error=Ew(D,w,"error"),this.fatal=Ew(D,w,"fatal"),this.warn=Ew(D,w,"warn"),this.info=Ew(D,w,"info"),this.debug=Ew(D,w,"debug"),this.trace=Ew(D,w,"trace"),T&&(this.serializers=T,this._serialize=b),e&&(this._logEvent=zN([].concat(D._logEvent.bindings,w)))}return k.prototype=this,new k(this)}return c}dd.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"}};dd.stdSerializers=H5e;dd.stdTimeFunctions=Object.assign({},{nullTime:jJ,epochTime:LJ,unixTime:Q5e,isoTime:Z5e});function Aw(t,e,n,r){const i=Object.getPrototypeOf(e);e[n]=e.levelVal>e.levels.values[n]?y5:i[n]?i[n]:w5[n]||w5[r]||y5,V5e(t,e,n)}function V5e(t,e,n){!t.transmit&&e[n]===y5||(e[n]=function(r){return function(){const s=t.timestamp(),o=new Array(arguments.length),a=Object.getPrototypeOf&&Object.getPrototypeOf(this)===w5?w5:this;for(var c=0;c<o.length;c++)o[c]=arguments[c];if(t.serialize&&!t.asObject&&DS(o,this._serialize,this.serializers,this._stdErrSerialize),t.asObject?r.call(a,q5e(this,n,o,s)):r.apply(a,o),t.transmit){const l=t.transmit.level||e.level,u=dd.levels.values[l],d=dd.levels.values[n];if(d<u)return;G5e(this,{ts:s,methodLevel:n,methodValue:d,transmitLevel:l,transmitValue:dd.levels.values[t.transmit.level||e.level],send:t.transmit.send,val:e.levelVal},o)}}}(e[n]))}function q5e(t,e,n,r){t._serialize&&DS(n,t._serialize,t.serializers,t._stdErrSerialize);const i=n.slice();let s=i[0];const o={};r&&(o.time=r),o.level=dd.levels.values[e];let a=(t._childLevel|0)+1;if(a<1&&(a=1),s!==null&&typeof s=="object"){for(;a--&&typeof i[0]=="object";)Object.assign(o,i.shift());s=i.length?UH(i.shift(),i):void 0}else typeof s=="string"&&(s=UH(i.shift(),i));return s!==void 0&&(o.msg=s),o}function DS(t,e,n,r){for(const i in t)if(r&&t[i]instanceof Error)t[i]=dd.stdSerializers.err(t[i]);else if(typeof t[i]=="object"&&!Array.isArray(t[i]))for(const s in t[i])e&&e.indexOf(s)>-1&&s in n&&(t[i][s]=n[s](t[i][s]))}function Ew(t,e,n){return function(){const r=new Array(1+arguments.length);r[0]=e;for(var i=1;i<r.length;i++)r[i]=arguments[i-1];return t[n].apply(this,r)}}function G5e(t,e,n){const r=e.send,i=e.ts,s=e.methodLevel,o=e.methodValue,a=e.val,c=t._logEvent.bindings;DS(n,t._serialize||Object.keys(t.serializers),t.serializers,t._stdErrSerialize===void 0?!0:t._stdErrSerialize),t._logEvent.ts=i,t._logEvent.messages=n.filter(function(l){return c.indexOf(l)===-1}),t._logEvent.level.label=s,t._logEvent.level.value=o,r(s,t._logEvent,a),t._logEvent=zN(c)}function zN(t){return{ts:0,messages:[],bindings:t||[],level:{label:"",value:0}}}function K5e(t){const e={type:t.constructor.name,msg:t.message,stack:t.stack};for(const n in t)e[n]===void 0&&(e[n]=t[n]);return e}function Y5e(t){return typeof t.timestamp=="function"?t.timestamp:t.timestamp===!1?jJ:LJ}function K_(){return{}}function VI(t){return t}function y5(){}function jJ(){return!1}function LJ(){return Date.now()}function Q5e(){return Math.round(Date.now()/1e3)}function Z5e(){return new Date(Date.now()).toISOString()}function J5e(){function t(e){return typeof e<"u"&&e}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 t(self)||t(window)||t(this)||{}}}const C6=Qs(jw),X5e={level:"info"},S6="custom_context",qM=1e3*1024;let exe=class{constructor(e){this.nodeValue=e,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}},FH=class{constructor(e){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=e,this.sizeInBytes=0}append(e){const n=new exe(e);if(n.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${e} with size ${n.size}`);for(;this.size+n.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=n),this.tail=n):(this.head=n,this.tail=n),this.lengthInNodes++,this.sizeInBytes+=n.size}shift(){if(!this.head)return;const e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){const e=[];let n=this.head;for(;n!==null;)e.push(n.value),n=n.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};const n=e.value;return e=e.next,{done:!1,value:n}}}}},UJ=class{constructor(e,n=qM){this.level=e??"error",this.levelValue=jw.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=n,this.logs=new FH(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(e,n){n===jw.levels.values.error?console.error(e):n===jw.levels.values.warn?console.warn(e):n===jw.levels.values.debug?console.debug(e):n===jw.levels.values.trace?console.trace(e):console.log(e)}appendToLogs(e){this.logs.append(ch({timestamp:new Date().toISOString(),log:e}));const n=typeof e=="string"?JSON.parse(e).level:e.level;n>=this.levelValue&&this.forwardToConsole(e,n)}getLogs(){return this.logs}clearLogs(){this.logs=new FH(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){const n=this.getLogArray();return n.push(ch({extraMetadata:e})),new Blob(n,{type:"application/json"})}},txe=class{constructor(e,n=qM){this.baseChunkLogger=new UJ(e,n)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){const n=URL.createObjectURL(this.logsToBlob(e)),r=document.createElement("a");r.href=n,r.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}},nxe=class{constructor(e,n=qM){this.baseChunkLogger=new UJ(e,n)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}};var rxe=Object.defineProperty,ixe=Object.defineProperties,sxe=Object.getOwnPropertyDescriptors,zH=Object.getOwnPropertySymbols,oxe=Object.prototype.hasOwnProperty,axe=Object.prototype.propertyIsEnumerable,HH=(t,e,n)=>e in t?rxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ZE=(t,e)=>{for(var n in e||(e={}))oxe.call(e,n)&&HH(t,n,e[n]);if(zH)for(var n of zH(e))axe.call(e,n)&&HH(t,n,e[n]);return t},JE=(t,e)=>ixe(t,sxe(e));function T6(t){return JE(ZE({},t),{level:(t==null?void 0:t.level)||X5e.level})}function cxe(t,e=S6){return t[e]||""}function lxe(t,e,n=S6){return t[n]=e,t}function Ma(t,e=S6){let n="";return typeof t.bindings>"u"?n=cxe(t,e):n=t.bindings().context||"",n}function uxe(t,e,n=S6){const r=Ma(t,n);return r.trim()?`${r}/${e}`:e}function qo(t,e,n=S6){const r=uxe(t,e,n),i=t.child({context:r});return lxe(i,r,n)}function dxe(t){var e,n;const r=new txe((e=t.opts)==null?void 0:e.level,t.maxSizeInBytes);return{logger:C6(JE(ZE({},t.opts),{level:"trace",browser:JE(ZE({},(n=t.opts)==null?void 0:n.browser),{write:i=>r.write(i)})})),chunkLoggerController:r}}function fxe(t){var e;const n=new nxe((e=t.opts)==null?void 0:e.level,t.maxSizeInBytes);return{logger:C6(JE(ZE({},t.opts),{level:"trace"}),n),chunkLoggerController:n}}function FJ(t){return typeof t.loggerOverride<"u"&&typeof t.loggerOverride!="string"?{logger:t.loggerOverride,chunkLoggerController:null}:typeof window<"u"?dxe(t):fxe(t)}let hxe=class extends A1{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}},pxe=class extends A1{constructor(e,n){super(),this.core=e,this.logger=n,this.records=new Map}},mxe=class{constructor(e,n){this.logger=e,this.core=n}},gxe=class extends A1{constructor(e,n){super(),this.relayer=e,this.logger=n}},wxe=class extends A1{constructor(e){super()}},yxe=class{constructor(e,n,r,i){this.core=e,this.logger=n,this.name=r}},vxe=class extends A1{constructor(e,n){super(),this.relayer=e,this.logger=n}},bxe=class extends A1{constructor(e,n){super(),this.core=e,this.logger=n}},xxe=class{constructor(e,n){this.projectId=e,this.logger=n}},_xe=class{constructor(e,n){this.projectId=e,this.logger=n}},Axe=class{constructor(e){this.opts=e,this.protocol="wc",this.version=2}},Exe=class{constructor(e){this.client=e}};var GM={},zJ={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Dn,n=pc;t.DIGEST_LENGTH=64,t.BLOCK_SIZE=128;var r=function(){function a(){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 a.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},a.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},a.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._tempHi),n.wipe(this._tempLo),this.reset()},a.prototype.update=function(c,l){if(l===void 0&&(l=c.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var u=0;if(this._bytesHashed+=l,this._bufferLength>0){for(;this._bufferLength<t.BLOCK_SIZE&&l>0;)this._buffer[this._bufferLength++]=c[u++],l--;this._bufferLength===this.blockSize&&(s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(l>=this.blockSize&&(u=s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,c,u,l),l%=this.blockSize);l>0;)this._buffer[this._bufferLength++]=c[u++],l--;return this},a.prototype.finish=function(c){if(!this._finished){var l=this._bytesHashed,u=this._bufferLength,d=l/536870912|0,h=l<<3,g=l%128<112?128:256;this._buffer[u]=128;for(var w=u+1;w<g-8;w++)this._buffer[w]=0;e.writeUint32BE(d,this._buffer,g-8),e.writeUint32BE(h,this._buffer,g-4),s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,g),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},a.prototype.digest=function(){var c=new Uint8Array(this.digestLength);return this.finish(c),c},a.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}},a.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},a.prototype.cleanSavedState=function(c){n.wipe(c.stateHi),n.wipe(c.stateLo),c.buffer&&n.wipe(c.buffer),c.bufferLength=0,c.bytesHashed=0},a}();t.SHA512=r;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 s(a,c,l,u,d,h,g){for(var w=l[0],v=l[1],_=l[2],T=l[3],b=l[4],k=l[5],D=l[6],O=l[7],$=u[0],C=u[1],A=u[2],H=u[3],V=u[4],Y=u[5],ee=u[6],x=u[7],E,y,I,B,M,W,z,P;g>=128;){for(var Z=0;Z<16;Z++){var he=8*Z+h;a[Z]=e.readUint32BE(d,he),c[Z]=e.readUint32BE(d,he+4)}for(var Z=0;Z<80;Z++){var ve=w,j=v,ge=_,te=T,ae=b,se=k,L=D,re=O,be=$,Se=C,Ie=A,Ue=H,lt=V,je=Y,Vt=ee,vt=x;if(E=O,y=x,M=y&65535,W=y>>>16,z=E&65535,P=E>>>16,E=(b>>>14|V<<18)^(b>>>18|V<<14)^(V>>>9|b<<23),y=(V>>>14|b<<18)^(V>>>18|b<<14)^(b>>>9|V<<23),M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,E=b&k^~b&D,y=V&Y^~V&ee,M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,E=i[Z*2],y=i[Z*2+1],M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,E=a[Z%16],y=c[Z%16],M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,W+=M>>>16,z+=W>>>16,P+=z>>>16,I=z&65535|P<<16,B=M&65535|W<<16,E=I,y=B,M=y&65535,W=y>>>16,z=E&65535,P=E>>>16,E=(w>>>28|$<<4)^($>>>2|w<<30)^($>>>7|w<<25),y=($>>>28|w<<4)^(w>>>2|$<<30)^(w>>>7|$<<25),M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,E=w&v^w&_^v&_,y=$&C^$&A^C&A,M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,W+=M>>>16,z+=W>>>16,P+=z>>>16,re=z&65535|P<<16,vt=M&65535|W<<16,E=te,y=Ue,M=y&65535,W=y>>>16,z=E&65535,P=E>>>16,E=I,y=B,M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,W+=M>>>16,z+=W>>>16,P+=z>>>16,te=z&65535|P<<16,Ue=M&65535|W<<16,v=ve,_=j,T=ge,b=te,k=ae,D=se,O=L,w=re,C=be,A=Se,H=Ie,V=Ue,Y=lt,ee=je,x=Vt,$=vt,Z%16===15)for(var he=0;he<16;he++)E=a[he],y=c[he],M=y&65535,W=y>>>16,z=E&65535,P=E>>>16,E=a[(he+9)%16],y=c[(he+9)%16],M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,I=a[(he+1)%16],B=c[(he+1)%16],E=(I>>>1|B<<31)^(I>>>8|B<<24)^I>>>7,y=(B>>>1|I<<31)^(B>>>8|I<<24)^(B>>>7|I<<25),M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,I=a[(he+14)%16],B=c[(he+14)%16],E=(I>>>19|B<<13)^(B>>>29|I<<3)^I>>>6,y=(B>>>19|I<<13)^(I>>>29|B<<3)^(B>>>6|I<<26),M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,W+=M>>>16,z+=W>>>16,P+=z>>>16,a[he]=z&65535|P<<16,c[he]=M&65535|W<<16}E=w,y=$,M=y&65535,W=y>>>16,z=E&65535,P=E>>>16,E=l[0],y=u[0],M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,W+=M>>>16,z+=W>>>16,P+=z>>>16,l[0]=w=z&65535|P<<16,u[0]=$=M&65535|W<<16,E=v,y=C,M=y&65535,W=y>>>16,z=E&65535,P=E>>>16,E=l[1],y=u[1],M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,W+=M>>>16,z+=W>>>16,P+=z>>>16,l[1]=v=z&65535|P<<16,u[1]=C=M&65535|W<<16,E=_,y=A,M=y&65535,W=y>>>16,z=E&65535,P=E>>>16,E=l[2],y=u[2],M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,W+=M>>>16,z+=W>>>16,P+=z>>>16,l[2]=_=z&65535|P<<16,u[2]=A=M&65535|W<<16,E=T,y=H,M=y&65535,W=y>>>16,z=E&65535,P=E>>>16,E=l[3],y=u[3],M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,W+=M>>>16,z+=W>>>16,P+=z>>>16,l[3]=T=z&65535|P<<16,u[3]=H=M&65535|W<<16,E=b,y=V,M=y&65535,W=y>>>16,z=E&65535,P=E>>>16,E=l[4],y=u[4],M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,W+=M>>>16,z+=W>>>16,P+=z>>>16,l[4]=b=z&65535|P<<16,u[4]=V=M&65535|W<<16,E=k,y=Y,M=y&65535,W=y>>>16,z=E&65535,P=E>>>16,E=l[5],y=u[5],M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,W+=M>>>16,z+=W>>>16,P+=z>>>16,l[5]=k=z&65535|P<<16,u[5]=Y=M&65535|W<<16,E=D,y=ee,M=y&65535,W=y>>>16,z=E&65535,P=E>>>16,E=l[6],y=u[6],M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,W+=M>>>16,z+=W>>>16,P+=z>>>16,l[6]=D=z&65535|P<<16,u[6]=ee=M&65535|W<<16,E=O,y=x,M=y&65535,W=y>>>16,z=E&65535,P=E>>>16,E=l[7],y=u[7],M+=y&65535,W+=y>>>16,z+=E&65535,P+=E>>>16,W+=M>>>16,z+=W>>>16,P+=z>>>16,l[7]=O=z&65535|P<<16,u[7]=x=M&65535|W<<16,h+=128,g-=128}return h}function o(a){var c=new r;c.update(a);var l=c.digest();return c.clean(),l}t.hash=o})(zJ);(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=mb,n=zJ,r=pc;t.SIGNATURE_LENGTH=64,t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=64,t.SEED_LENGTH=32;function i(te){const ae=new Float64Array(16);if(te)for(let se=0;se<te.length;se++)ae[se]=te[se];return ae}const s=new Uint8Array(32);s[0]=9;const o=i(),a=i([1]),c=i([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=i([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),u=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=i([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),h=i([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function g(te,ae){for(let se=0;se<16;se++)te[se]=ae[se]|0}function w(te){let ae=1;for(let se=0;se<16;se++){let L=te[se]+ae+65535;ae=Math.floor(L/65536),te[se]=L-ae*65536}te[0]+=ae-1+37*(ae-1)}function v(te,ae,se){const L=~(se-1);for(let re=0;re<16;re++){const be=L&(te[re]^ae[re]);te[re]^=be,ae[re]^=be}}function _(te,ae){const se=i(),L=i();for(let re=0;re<16;re++)L[re]=ae[re];w(L),w(L),w(L);for(let re=0;re<2;re++){se[0]=L[0]-65517;for(let Se=1;Se<15;Se++)se[Se]=L[Se]-65535-(se[Se-1]>>16&1),se[Se-1]&=65535;se[15]=L[15]-32767-(se[14]>>16&1);const be=se[15]>>16&1;se[14]&=65535,v(L,se,1-be)}for(let re=0;re<16;re++)te[2*re]=L[re]&255,te[2*re+1]=L[re]>>8}function T(te,ae){let se=0;for(let L=0;L<32;L++)se|=te[L]^ae[L];return(1&se-1>>>8)-1}function b(te,ae){const se=new Uint8Array(32),L=new Uint8Array(32);return _(se,te),_(L,ae),T(se,L)}function k(te){const ae=new Uint8Array(32);return _(ae,te),ae[0]&1}function D(te,ae){for(let se=0;se<16;se++)te[se]=ae[2*se]+(ae[2*se+1]<<8);te[15]&=32767}function O(te,ae,se){for(let L=0;L<16;L++)te[L]=ae[L]+se[L]}function $(te,ae,se){for(let L=0;L<16;L++)te[L]=ae[L]-se[L]}function C(te,ae,se){let L,re,be=0,Se=0,Ie=0,Ue=0,lt=0,je=0,Vt=0,vt=0,ut=0,ft=0,He=0,ct=0,Gt=0,ot=0,qe=0,X=0,U=0,G=0,ie=0,fe=0,we=0,Re=0,Ge=0,nt=0,nn=0,Ct=0,St=0,qr=0,Bn=0,$n=0,Si=0,sn=se[0],Pe=se[1],It=se[2],$t=se[3],jt=se[4],Yn=se[5],fn=se[6],hn=se[7],Lt=se[8],Kt=se[9],Yt=se[10],Qn=se[11],Ot=se[12],kt=se[13],vr=se[14],pn=se[15];L=ae[0],be+=L*sn,Se+=L*Pe,Ie+=L*It,Ue+=L*$t,lt+=L*jt,je+=L*Yn,Vt+=L*fn,vt+=L*hn,ut+=L*Lt,ft+=L*Kt,He+=L*Yt,ct+=L*Qn,Gt+=L*Ot,ot+=L*kt,qe+=L*vr,X+=L*pn,L=ae[1],Se+=L*sn,Ie+=L*Pe,Ue+=L*It,lt+=L*$t,je+=L*jt,Vt+=L*Yn,vt+=L*fn,ut+=L*hn,ft+=L*Lt,He+=L*Kt,ct+=L*Yt,Gt+=L*Qn,ot+=L*Ot,qe+=L*kt,X+=L*vr,U+=L*pn,L=ae[2],Ie+=L*sn,Ue+=L*Pe,lt+=L*It,je+=L*$t,Vt+=L*jt,vt+=L*Yn,ut+=L*fn,ft+=L*hn,He+=L*Lt,ct+=L*Kt,Gt+=L*Yt,ot+=L*Qn,qe+=L*Ot,X+=L*kt,U+=L*vr,G+=L*pn,L=ae[3],Ue+=L*sn,lt+=L*Pe,je+=L*It,Vt+=L*$t,vt+=L*jt,ut+=L*Yn,ft+=L*fn,He+=L*hn,ct+=L*Lt,Gt+=L*Kt,ot+=L*Yt,qe+=L*Qn,X+=L*Ot,U+=L*kt,G+=L*vr,ie+=L*pn,L=ae[4],lt+=L*sn,je+=L*Pe,Vt+=L*It,vt+=L*$t,ut+=L*jt,ft+=L*Yn,He+=L*fn,ct+=L*hn,Gt+=L*Lt,ot+=L*Kt,qe+=L*Yt,X+=L*Qn,U+=L*Ot,G+=L*kt,ie+=L*vr,fe+=L*pn,L=ae[5],je+=L*sn,Vt+=L*Pe,vt+=L*It,ut+=L*$t,ft+=L*jt,He+=L*Yn,ct+=L*fn,Gt+=L*hn,ot+=L*Lt,qe+=L*Kt,X+=L*Yt,U+=L*Qn,G+=L*Ot,ie+=L*kt,fe+=L*vr,we+=L*pn,L=ae[6],Vt+=L*sn,vt+=L*Pe,ut+=L*It,ft+=L*$t,He+=L*jt,ct+=L*Yn,Gt+=L*fn,ot+=L*hn,qe+=L*Lt,X+=L*Kt,U+=L*Yt,G+=L*Qn,ie+=L*Ot,fe+=L*kt,we+=L*vr,Re+=L*pn,L=ae[7],vt+=L*sn,ut+=L*Pe,ft+=L*It,He+=L*$t,ct+=L*jt,Gt+=L*Yn,ot+=L*fn,qe+=L*hn,X+=L*Lt,U+=L*Kt,G+=L*Yt,ie+=L*Qn,fe+=L*Ot,we+=L*kt,Re+=L*vr,Ge+=L*pn,L=ae[8],ut+=L*sn,ft+=L*Pe,He+=L*It,ct+=L*$t,Gt+=L*jt,ot+=L*Yn,qe+=L*fn,X+=L*hn,U+=L*Lt,G+=L*Kt,ie+=L*Yt,fe+=L*Qn,we+=L*Ot,Re+=L*kt,Ge+=L*vr,nt+=L*pn,L=ae[9],ft+=L*sn,He+=L*Pe,ct+=L*It,Gt+=L*$t,ot+=L*jt,qe+=L*Yn,X+=L*fn,U+=L*hn,G+=L*Lt,ie+=L*Kt,fe+=L*Yt,we+=L*Qn,Re+=L*Ot,Ge+=L*kt,nt+=L*vr,nn+=L*pn,L=ae[10],He+=L*sn,ct+=L*Pe,Gt+=L*It,ot+=L*$t,qe+=L*jt,X+=L*Yn,U+=L*fn,G+=L*hn,ie+=L*Lt,fe+=L*Kt,we+=L*Yt,Re+=L*Qn,Ge+=L*Ot,nt+=L*kt,nn+=L*vr,Ct+=L*pn,L=ae[11],ct+=L*sn,Gt+=L*Pe,ot+=L*It,qe+=L*$t,X+=L*jt,U+=L*Yn,G+=L*fn,ie+=L*hn,fe+=L*Lt,we+=L*Kt,Re+=L*Yt,Ge+=L*Qn,nt+=L*Ot,nn+=L*kt,Ct+=L*vr,St+=L*pn,L=ae[12],Gt+=L*sn,ot+=L*Pe,qe+=L*It,X+=L*$t,U+=L*jt,G+=L*Yn,ie+=L*fn,fe+=L*hn,we+=L*Lt,Re+=L*Kt,Ge+=L*Yt,nt+=L*Qn,nn+=L*Ot,Ct+=L*kt,St+=L*vr,qr+=L*pn,L=ae[13],ot+=L*sn,qe+=L*Pe,X+=L*It,U+=L*$t,G+=L*jt,ie+=L*Yn,fe+=L*fn,we+=L*hn,Re+=L*Lt,Ge+=L*Kt,nt+=L*Yt,nn+=L*Qn,Ct+=L*Ot,St+=L*kt,qr+=L*vr,Bn+=L*pn,L=ae[14],qe+=L*sn,X+=L*Pe,U+=L*It,G+=L*$t,ie+=L*jt,fe+=L*Yn,we+=L*fn,Re+=L*hn,Ge+=L*Lt,nt+=L*Kt,nn+=L*Yt,Ct+=L*Qn,St+=L*Ot,qr+=L*kt,Bn+=L*vr,$n+=L*pn,L=ae[15],X+=L*sn,U+=L*Pe,G+=L*It,ie+=L*$t,fe+=L*jt,we+=L*Yn,Re+=L*fn,Ge+=L*hn,nt+=L*Lt,nn+=L*Kt,Ct+=L*Yt,St+=L*Qn,qr+=L*Ot,Bn+=L*kt,$n+=L*vr,Si+=L*pn,be+=38*U,Se+=38*G,Ie+=38*ie,Ue+=38*fe,lt+=38*we,je+=38*Re,Vt+=38*Ge,vt+=38*nt,ut+=38*nn,ft+=38*Ct,He+=38*St,ct+=38*qr,Gt+=38*Bn,ot+=38*$n,qe+=38*Si,re=1,L=be+re+65535,re=Math.floor(L/65536),be=L-re*65536,L=Se+re+65535,re=Math.floor(L/65536),Se=L-re*65536,L=Ie+re+65535,re=Math.floor(L/65536),Ie=L-re*65536,L=Ue+re+65535,re=Math.floor(L/65536),Ue=L-re*65536,L=lt+re+65535,re=Math.floor(L/65536),lt=L-re*65536,L=je+re+65535,re=Math.floor(L/65536),je=L-re*65536,L=Vt+re+65535,re=Math.floor(L/65536),Vt=L-re*65536,L=vt+re+65535,re=Math.floor(L/65536),vt=L-re*65536,L=ut+re+65535,re=Math.floor(L/65536),ut=L-re*65536,L=ft+re+65535,re=Math.floor(L/65536),ft=L-re*65536,L=He+re+65535,re=Math.floor(L/65536),He=L-re*65536,L=ct+re+65535,re=Math.floor(L/65536),ct=L-re*65536,L=Gt+re+65535,re=Math.floor(L/65536),Gt=L-re*65536,L=ot+re+65535,re=Math.floor(L/65536),ot=L-re*65536,L=qe+re+65535,re=Math.floor(L/65536),qe=L-re*65536,L=X+re+65535,re=Math.floor(L/65536),X=L-re*65536,be+=re-1+37*(re-1),re=1,L=be+re+65535,re=Math.floor(L/65536),be=L-re*65536,L=Se+re+65535,re=Math.floor(L/65536),Se=L-re*65536,L=Ie+re+65535,re=Math.floor(L/65536),Ie=L-re*65536,L=Ue+re+65535,re=Math.floor(L/65536),Ue=L-re*65536,L=lt+re+65535,re=Math.floor(L/65536),lt=L-re*65536,L=je+re+65535,re=Math.floor(L/65536),je=L-re*65536,L=Vt+re+65535,re=Math.floor(L/65536),Vt=L-re*65536,L=vt+re+65535,re=Math.floor(L/65536),vt=L-re*65536,L=ut+re+65535,re=Math.floor(L/65536),ut=L-re*65536,L=ft+re+65535,re=Math.floor(L/65536),ft=L-re*65536,L=He+re+65535,re=Math.floor(L/65536),He=L-re*65536,L=ct+re+65535,re=Math.floor(L/65536),ct=L-re*65536,L=Gt+re+65535,re=Math.floor(L/65536),Gt=L-re*65536,L=ot+re+65535,re=Math.floor(L/65536),ot=L-re*65536,L=qe+re+65535,re=Math.floor(L/65536),qe=L-re*65536,L=X+re+65535,re=Math.floor(L/65536),X=L-re*65536,be+=re-1+37*(re-1),te[0]=be,te[1]=Se,te[2]=Ie,te[3]=Ue,te[4]=lt,te[5]=je,te[6]=Vt,te[7]=vt,te[8]=ut,te[9]=ft,te[10]=He,te[11]=ct,te[12]=Gt,te[13]=ot,te[14]=qe,te[15]=X}function A(te,ae){C(te,ae,ae)}function H(te,ae){const se=i();let L;for(L=0;L<16;L++)se[L]=ae[L];for(L=253;L>=0;L--)A(se,se),L!==2&&L!==4&&C(se,se,ae);for(L=0;L<16;L++)te[L]=se[L]}function V(te,ae){const se=i();let L;for(L=0;L<16;L++)se[L]=ae[L];for(L=250;L>=0;L--)A(se,se),L!==1&&C(se,se,ae);for(L=0;L<16;L++)te[L]=se[L]}function Y(te,ae){const se=i(),L=i(),re=i(),be=i(),Se=i(),Ie=i(),Ue=i(),lt=i(),je=i();$(se,te[1],te[0]),$(je,ae[1],ae[0]),C(se,se,je),O(L,te[0],te[1]),O(je,ae[0],ae[1]),C(L,L,je),C(re,te[3],ae[3]),C(re,re,l),C(be,te[2],ae[2]),O(be,be,be),$(Se,L,se),$(Ie,be,re),O(Ue,be,re),O(lt,L,se),C(te[0],Se,Ie),C(te[1],lt,Ue),C(te[2],Ue,Ie),C(te[3],Se,lt)}function ee(te,ae,se){for(let L=0;L<4;L++)v(te[L],ae[L],se)}function x(te,ae){const se=i(),L=i(),re=i();H(re,ae[2]),C(se,ae[0],re),C(L,ae[1],re),_(te,L),te[31]^=k(se)<<7}function E(te,ae,se){g(te[0],o),g(te[1],a),g(te[2],a),g(te[3],o);for(let L=255;L>=0;--L){const re=se[L/8|0]>>(L&7)&1;ee(te,ae,re),Y(ae,te),Y(te,te),ee(te,ae,re)}}function y(te,ae){const se=[i(),i(),i(),i()];g(se[0],u),g(se[1],d),g(se[2],a),C(se[3],u,d),E(te,se,ae)}function I(te){if(te.length!==t.SEED_LENGTH)throw new Error(`ed25519: seed must be ${t.SEED_LENGTH} bytes`);const ae=(0,n.hash)(te);ae[0]&=248,ae[31]&=127,ae[31]|=64;const se=new Uint8Array(32),L=[i(),i(),i(),i()];y(L,ae),x(se,L);const re=new Uint8Array(64);return re.set(te),re.set(se,32),{publicKey:se,secretKey:re}}t.generateKeyPairFromSeed=I;function B(te){const ae=(0,e.randomBytes)(32,te),se=I(ae);return(0,r.wipe)(ae),se}t.generateKeyPair=B;function M(te){if(te.length!==t.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${t.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(te.subarray(32))}t.extractPublicKeyFromSecretKey=M;const W=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 z(te,ae){let se,L,re,be;for(L=63;L>=32;--L){for(se=0,re=L-32,be=L-12;re<be;++re)ae[re]+=se-16*ae[L]*W[re-(L-32)],se=Math.floor((ae[re]+128)/256),ae[re]-=se*256;ae[re]+=se,ae[L]=0}for(se=0,re=0;re<32;re++)ae[re]+=se-(ae[31]>>4)*W[re],se=ae[re]>>8,ae[re]&=255;for(re=0;re<32;re++)ae[re]-=se*W[re];for(L=0;L<32;L++)ae[L+1]+=ae[L]>>8,te[L]=ae[L]&255}function P(te){const ae=new Float64Array(64);for(let se=0;se<64;se++)ae[se]=te[se];for(let se=0;se<64;se++)te[se]=0;z(te,ae)}function Z(te,ae){const se=new Float64Array(64),L=[i(),i(),i(),i()],re=(0,n.hash)(te.subarray(0,32));re[0]&=248,re[31]&=127,re[31]|=64;const be=new Uint8Array(64);be.set(re.subarray(32),32);const Se=new n.SHA512;Se.update(be.subarray(32)),Se.update(ae);const Ie=Se.digest();Se.clean(),P(Ie),y(L,Ie),x(be,L),Se.reset(),Se.update(be.subarray(0,32)),Se.update(te.subarray(32)),Se.update(ae);const Ue=Se.digest();P(Ue);for(let lt=0;lt<32;lt++)se[lt]=Ie[lt];for(let lt=0;lt<32;lt++)for(let je=0;je<32;je++)se[lt+je]+=Ue[lt]*re[je];return z(be.subarray(32),se),be}t.sign=Z;function he(te,ae){const se=i(),L=i(),re=i(),be=i(),Se=i(),Ie=i(),Ue=i();return g(te[2],a),D(te[1],ae),A(re,te[1]),C(be,re,c),$(re,re,te[2]),O(be,te[2],be),A(Se,be),A(Ie,Se),C(Ue,Ie,Se),C(se,Ue,re),C(se,se,be),V(se,se),C(se,se,re),C(se,se,be),C(se,se,be),C(te[0],se,be),A(L,te[0]),C(L,L,be),b(L,re)&&C(te[0],te[0],h),A(L,te[0]),C(L,L,be),b(L,re)?-1:(k(te[0])===ae[31]>>7&&$(te[0],o,te[0]),C(te[3],te[0],te[1]),0)}function ve(te,ae,se){const L=new Uint8Array(32),re=[i(),i(),i(),i()],be=[i(),i(),i(),i()];if(se.length!==t.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${t.SIGNATURE_LENGTH} bytes`);if(he(be,te))return!1;const Se=new n.SHA512;Se.update(se.subarray(0,32)),Se.update(te),Se.update(ae);const Ie=Se.digest();return P(Ie),E(re,be,Ie),y(be,se.subarray(32)),Y(re,be),x(L,re),!T(se,L)}t.verify=ve;function j(te){let ae=[i(),i(),i(),i()];if(he(ae,te))throw new Error("Ed25519: invalid public key");let se=i(),L=i(),re=ae[1];O(se,a,re),$(L,a,re),H(L,L),C(se,se,L);let be=new Uint8Array(32);return _(be,se),be}t.convertPublicKeyToX25519=j;function ge(te){const ae=(0,n.hash)(te.subarray(0,32));ae[0]&=248,ae[31]&=127,ae[31]|=64;const se=new Uint8Array(ae.subarray(0,32));return(0,r.wipe)(ae),se}t.convertSecretKeyToX25519=ge})(GM);const Cxe="EdDSA",Sxe="JWT",HJ=".",WJ="base64url",Txe="utf8",Ixe="utf8",kxe=":",Rxe="did",Nxe="key",WH="base58btc",Pxe="z",Oxe="K36",Dxe=32;function XE(t){return Do(va(ch(t),Txe),WJ)}function VJ(t){const e=va(Oxe,WH),n=Pxe+Do(RN([e,t]),WH);return[Rxe,Nxe,n].join(kxe)}function Mxe(t){return Do(t,WJ)}function Bxe(t){return va([XE(t.header),XE(t.payload)].join(HJ),Ixe)}function $xe(t){return[XE(t.header),XE(t.payload),Mxe(t.signature)].join(HJ)}function VH(t=mb.randomBytes(Dxe)){return GM.generateKeyPairFromSeed(t)}async function jxe(t,e,n,r,i=At.fromMiliseconds(Date.now())){const s={alg:Cxe,typ:Sxe},o=VJ(r.publicKey),a=i+n,c={iss:o,sub:t,aud:e,iat:i,exp:a},l=Bxe({header:s,payload:c}),u=GM.sign(r.secretKey,l);return $xe({header:s,payload:c,signature:u})}const Lxe="PARSE_ERROR",Uxe="INVALID_REQUEST",Fxe="METHOD_NOT_FOUND",zxe="INVALID_PARAMS",qJ="INTERNAL_ERROR",KM="SERVER_ERROR",Hxe=[-32700,-32600,-32601,-32602,-32603],N3={[Lxe]:{code:-32700,message:"Parse error"},[Uxe]:{code:-32600,message:"Invalid Request"},[Fxe]:{code:-32601,message:"Method not found"},[zxe]:{code:-32602,message:"Invalid params"},[qJ]:{code:-32603,message:"Internal error"},[KM]:{code:-32e3,message:"Server error"}},GJ=KM;function Wxe(t){return Hxe.includes(t)}function qH(t){return Object.keys(N3).includes(t)?N3[t]:N3[GJ]}function Vxe(t){const e=Object.values(N3).find(n=>n.code===t);return e||N3[GJ]}function KJ(t,e,n){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${e}`):t}var YJ={},pf={},GH;function qxe(){if(GH)return pf;GH=1,Object.defineProperty(pf,"__esModule",{value:!0}),pf.isBrowserCryptoAvailable=pf.getSubtleCrypto=pf.getBrowerCrypto=void 0;function t(){return(Hr==null?void 0:Hr.crypto)||(Hr==null?void 0:Hr.msCrypto)||{}}pf.getBrowerCrypto=t;function e(){const r=t();return r.subtle||r.webkitSubtle}pf.getSubtleCrypto=e;function n(){return!!t()&&!!e()}return pf.isBrowserCryptoAvailable=n,pf}var mf={},KH;function Gxe(){if(KH)return mf;KH=1,Object.defineProperty(mf,"__esModule",{value:!0}),mf.isBrowser=mf.isNode=mf.isReactNative=void 0;function t(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}mf.isReactNative=t;function e(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}mf.isNode=e;function n(){return!t()&&!e()}return mf.isBrowser=n,mf}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=g6;e.__exportStar(qxe(),t),e.__exportStar(Gxe(),t)})(YJ);function Ap(t=3){const e=Date.now()*Math.pow(10,t),n=Math.floor(Math.random()*Math.pow(10,t));return e+n}function qm(t=6){return BigInt(Ap(t))}function Iy(t,e,n){return{id:n||Ap(),jsonrpc:"2.0",method:t,params:e}}function MS(t,e){return{id:t,jsonrpc:"2.0",result:e}}function BS(t,e,n){return{id:t,jsonrpc:"2.0",error:Kxe(e)}}function Kxe(t,e){return typeof t>"u"?qH(qJ):(typeof t=="string"&&(t=Object.assign(Object.assign({},qH(KM)),{message:t})),Wxe(t.code)&&(t=Vxe(t.code)),t)}let Yxe=class{},Qxe=class extends Yxe{constructor(){super()}},Zxe=class extends Qxe{constructor(e){super()}};const Jxe="^https?:",Xxe="^wss?:";function e6e(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(!(!e||!e.length))return e[0]}function QJ(t,e){const n=e6e(t);return typeof n>"u"?!1:new RegExp(e).test(n)}function YH(t){return QJ(t,Jxe)}function QH(t){return QJ(t,Xxe)}function t6e(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function ZJ(t){return typeof t=="object"&&"id"in t&&"jsonrpc"in t&&t.jsonrpc==="2.0"}function YM(t){return ZJ(t)&&"method"in t}function $S(t){return ZJ(t)&&(zu(t)||Xc(t))}function zu(t){return"result"in t}function Xc(t){return"error"in t}let Pd=class extends Zxe{constructor(e){super(e),this.events=new hc.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,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}async request(e,n){return this.requestStrict(Iy(e.method,e.params||[],e.id||qm().toString()),n)}async requestStrict(e,n){return new Promise(async(r,i)=>{if(!this.connection.connected)try{await this.open()}catch(s){i(s)}this.events.on(`${e.id}`,s=>{Xc(s)?i(s.error):r(s.result)});try{await this.connection.send(e,n)}catch(s){i(s)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),$S(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 n6e=()=>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"),r6e=()=>typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",ZH=t=>t.split("?")[0],JH=10,i6e=n6e();let s6e=class{constructor(e){if(this.url=e,this.events=new hc.EventEmitter,this.registering=!1,!QH(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,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,n)=>{if(typeof this.socket>"u"){n(new Error("Connection already closed"));return}this.socket.onclose=r=>{this.onClose(r),e()},this.socket.close()})}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(ch(e))}catch(n){this.onError(e.id,n)}}register(e=this.url){if(!QH(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const n=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=n||this.events.listenerCount("open")>=n)&&this.events.setMaxListeners(n+1),new Promise((r,i)=>{this.events.once("register_error",s=>{this.resetMaxListeners(),i(s)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return i(new Error("WebSocket connection is missing or invalid"));r(this.socket)})})}return this.url=e,this.registering=!0,new Promise((n,r)=>{const i=new URLSearchParams(e).get("origin"),s=YJ.isReactNative()?{headers:{origin:i}}:{rejectUnauthorized:!t6e(e)},o=new i6e(e,[],s);r6e()?o.onerror=a=>{const c=a;r(this.emitError(c.error))}:o.on("error",a=>{r(this.emitError(a))}),o.onopen=()=>{this.onOpen(o),n(o)}})}onOpen(e){e.onmessage=n=>this.onPayload(n),e.onclose=n=>this.onClose(n),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 n=typeof e.data=="string"?A6(e.data):e.data;this.events.emit("payload",n)}onError(e,n){const r=this.parseError(n),i=r.message||r.toString(),s=BS(e,i);this.events.emit("payload",s)}parseError(e,n=this.url){return KJ(e,ZH(n),"WS")}resetMaxListeners(){this.events.getMaxListeners()>JH&&this.events.setMaxListeners(JH)}emitError(e){const n=this.parseError(new Error((e==null?void 0:e.message)||`WebSocket connection failed for host: ${ZH(this.url)}`));return this.events.emit("register_error",n),n}};var eC={exports:{}};eC.exports;(function(t,e){var n=200,r="__lodash_hash_undefined__",i=1,s=2,o=9007199254740991,a="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",g="[object Function]",w="[object GeneratorFunction]",v="[object Map]",_="[object Number]",T="[object Null]",b="[object Object]",k="[object Promise]",D="[object Proxy]",O="[object RegExp]",$="[object Set]",C="[object String]",A="[object Symbol]",H="[object Undefined]",V="[object WeakMap]",Y="[object ArrayBuffer]",ee="[object DataView]",x="[object Float32Array]",E="[object Float64Array]",y="[object Int8Array]",I="[object Int16Array]",B="[object Int32Array]",M="[object Uint8Array]",W="[object Uint8ClampedArray]",z="[object Uint16Array]",P="[object Uint32Array]",Z=/[\\^$.*+?()[\]{}|]/g,he=/^\[object .+?Constructor\]$/,ve=/^(?:0|[1-9]\d*)$/,j={};j[x]=j[E]=j[y]=j[I]=j[B]=j[M]=j[W]=j[z]=j[P]=!0,j[a]=j[c]=j[Y]=j[u]=j[ee]=j[d]=j[h]=j[g]=j[v]=j[_]=j[b]=j[O]=j[$]=j[C]=j[V]=!1;var ge=typeof Hr=="object"&&Hr&&Hr.Object===Object&&Hr,te=typeof self=="object"&&self&&self.Object===Object&&self,ae=ge||te||Function("return this")(),se=e&&!e.nodeType&&e,L=se&&!0&&t&&!t.nodeType&&t,re=L&&L.exports===se,be=re&&ge.process,Se=function(){try{return be&&be.binding&&be.binding("util")}catch{}}(),Ie=Se&&Se.isTypedArray;function Ue(de,xe){for(var Ve=-1,xt=de==null?0:de.length,Pr=0,An=[];++Ve<xt;){var Gr=de[Ve];xe(Gr,Ve,de)&&(An[Pr++]=Gr)}return An}function lt(de,xe){for(var Ve=-1,xt=xe.length,Pr=de.length;++Ve<xt;)de[Pr+Ve]=xe[Ve];return de}function je(de,xe){for(var Ve=-1,xt=de==null?0:de.length;++Ve<xt;)if(xe(de[Ve],Ve,de))return!0;return!1}function Vt(de,xe){for(var Ve=-1,xt=Array(de);++Ve<de;)xt[Ve]=xe(Ve);return xt}function vt(de){return function(xe){return de(xe)}}function ut(de,xe){return de.has(xe)}function ft(de,xe){return de==null?void 0:de[xe]}function He(de){var xe=-1,Ve=Array(de.size);return de.forEach(function(xt,Pr){Ve[++xe]=[Pr,xt]}),Ve}function ct(de,xe){return function(Ve){return de(xe(Ve))}}function Gt(de){var xe=-1,Ve=Array(de.size);return de.forEach(function(xt){Ve[++xe]=xt}),Ve}var ot=Array.prototype,qe=Function.prototype,X=Object.prototype,U=ae["__core-js_shared__"],G=qe.toString,ie=X.hasOwnProperty,fe=function(){var de=/[^.]+$/.exec(U&&U.keys&&U.keys.IE_PROTO||"");return de?"Symbol(src)_1."+de:""}(),we=X.toString,Re=RegExp("^"+G.call(ie).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ge=re?ae.Buffer:void 0,nt=ae.Symbol,nn=ae.Uint8Array,Ct=X.propertyIsEnumerable,St=ot.splice,qr=nt?nt.toStringTag:void 0,Bn=Object.getOwnPropertySymbols,$n=Ge?Ge.isBuffer:void 0,Si=ct(Object.keys,Object),sn=ys(ae,"DataView"),Pe=ys(ae,"Map"),It=ys(ae,"Promise"),$t=ys(ae,"Set"),jt=ys(ae,"WeakMap"),Yn=ys(Object,"create"),fn=Tc(sn),hn=Tc(Pe),Lt=Tc(It),Kt=Tc($t),Yt=Tc(jt),Qn=nt?nt.prototype:void 0,Ot=Qn?Qn.valueOf:void 0;function kt(de){var xe=-1,Ve=de==null?0:de.length;for(this.clear();++xe<Ve;){var xt=de[xe];this.set(xt[0],xt[1])}}function vr(){this.__data__=Yn?Yn(null):{},this.size=0}function pn(de){var xe=this.has(de)&&delete this.__data__[de];return this.size-=xe?1:0,xe}function ar(de){var xe=this.__data__;if(Yn){var Ve=xe[de];return Ve===r?void 0:Ve}return ie.call(xe,de)?xe[de]:void 0}function Zr(de){var xe=this.__data__;return Yn?xe[de]!==void 0:ie.call(xe,de)}function Cr(de,xe){var Ve=this.__data__;return this.size+=this.has(de)?0:1,Ve[de]=Yn&&xe===void 0?r:xe,this}kt.prototype.clear=vr,kt.prototype.delete=pn,kt.prototype.get=ar,kt.prototype.has=Zr,kt.prototype.set=Cr;function jn(de){var xe=-1,Ve=de==null?0:de.length;for(this.clear();++xe<Ve;){var xt=de[xe];this.set(xt[0],xt[1])}}function yo(){this.__data__=[],this.size=0}function eo(de){var xe=this.__data__,Ve=Qd(xe,de);if(Ve<0)return!1;var xt=xe.length-1;return Ve==xt?xe.pop():St.call(xe,Ve,1),--this.size,!0}function Go(de){var xe=this.__data__,Ve=Qd(xe,de);return Ve<0?void 0:xe[Ve][1]}function vo(de){return Qd(this.__data__,de)>-1}function Ko(de,xe){var Ve=this.__data__,xt=Qd(Ve,de);return xt<0?(++this.size,Ve.push([de,xe])):Ve[xt][1]=xe,this}jn.prototype.clear=yo,jn.prototype.delete=eo,jn.prototype.get=Go,jn.prototype.has=vo,jn.prototype.set=Ko;function es(de){var xe=-1,Ve=de==null?0:de.length;for(this.clear();++xe<Ve;){var xt=de[xe];this.set(xt[0],xt[1])}}function ws(){this.size=0,this.__data__={hash:new kt,map:new(Pe||jn),string:new kt}}function Wd(de){var xe=Tl(this,de).delete(de);return this.size-=xe?1:0,xe}function _c(de){return Tl(this,de).get(de)}function Vd(de){return Tl(this,de).has(de)}function qd(de,xe){var Ve=Tl(this,de),xt=Ve.size;return Ve.set(de,xe),this.size+=Ve.size==xt?0:1,this}es.prototype.clear=ws,es.prototype.delete=Wd,es.prototype.get=_c,es.prototype.has=Vd,es.prototype.set=qd;function Ac(de){var xe=-1,Ve=de==null?0:de.length;for(this.__data__=new es;++xe<Ve;)this.add(de[xe])}function Ec(de){return this.__data__.set(de,r),this}function Tu(de){return this.__data__.has(de)}Ac.prototype.add=Ac.prototype.push=Ec,Ac.prototype.has=Tu;function $s(de){var xe=this.__data__=new jn(de);this.size=xe.size}function bo(){this.__data__=new jn,this.size=0}function Gd(de){var xe=this.__data__,Ve=xe.delete(de);return this.size=xe.size,Ve}function Kd(de){return this.__data__.get(de)}function Yd(de){return this.__data__.has(de)}function zh(de,xe){var Ve=this.__data__;if(Ve instanceof jn){var xt=Ve.__data__;if(!Pe||xt.length<n-1)return xt.push([de,xe]),this.size=++Ve.size,this;Ve=this.__data__=new es(xt)}return Ve.set(de,xe),this.size=Ve.size,this}$s.prototype.clear=bo,$s.prototype.delete=Gd,$s.prototype.get=Kd,$s.prototype.has=Yd,$s.prototype.set=zh;function U1(de,xe){var Ve=Vh(de),xt=!Ve&&lm(de),Pr=!Ve&&!xt&&um(de),An=!Ve&&!xt&&!Pr&&Z1(de),Gr=Ve||xt||Pr||An,Ti=Gr?Vt(de.length,String):[],Zn=Ti.length;for(var $r in de)ie.call(de,$r)&&!(Gr&&($r=="length"||Pr&&($r=="offset"||$r=="parent")||An&&($r=="buffer"||$r=="byteLength"||$r=="byteOffset")||V1($r,Zn)))&&Ti.push($r);return Ti}function Qd(de,xe){for(var Ve=de.length;Ve--;)if(K1(de[Ve][0],xe))return Ve;return-1}function om(de,xe,Ve){var xt=xe(de);return Vh(de)?xt:lt(xt,Ve(de))}function Zd(de){return de==null?de===void 0?H:T:qr&&qr in Object(de)?Jr(de):Jb(de)}function am(de){return Iu(de)&&Zd(de)==a}function dr(de,xe,Ve,xt,Pr){return de===xe?!0:de==null||xe==null||!Iu(de)&&!Iu(xe)?de!==de&&xe!==xe:F1(de,xe,Ve,xt,dr,Pr)}function F1(de,xe,Ve,xt,Pr,An){var Gr=Vh(de),Ti=Vh(xe),Zn=Gr?c:Sc(de),$r=Ti?c:Sc(xe);Zn=Zn==a?b:Zn,$r=$r==a?b:$r;var yi=Zn==b,Ui=$r==b,Ii=Zn==$r;if(Ii&&um(de)){if(!um(xe))return!1;Gr=!0,yi=!1}if(Ii&&!yi)return An||(An=new $s),Gr||Z1(de)?Hh(de,xe,Ve,xt,Pr,An):Zb(de,xe,Zn,Ve,xt,Pr,An);if(!(Ve&i)){var zr=yi&&ie.call(de,"__wrapped__"),vs=Ui&&ie.call(xe,"__wrapped__");if(zr||vs){var La=zr?de.value():de,Yo=vs?xe.value():xe;return An||(An=new $s),Pr(La,Yo,Ve,xt,An)}}return Ii?(An||(An=new $s),Wh(de,xe,Ve,xt,Pr,An)):!1}function Qb(de){if(!Q1(de)||q1(de))return!1;var xe=qh(de)?Re:he;return xe.test(Tc(de))}function z1(de){return Iu(de)&&Y1(de.length)&&!!j[Zd(de)]}function H1(de){if(!G1(de))return Si(de);var xe=[];for(var Ve in Object(de))ie.call(de,Ve)&&Ve!="constructor"&&xe.push(Ve);return xe}function Hh(de,xe,Ve,xt,Pr,An){var Gr=Ve&i,Ti=de.length,Zn=xe.length;if(Ti!=Zn&&!(Gr&&Zn>Ti))return!1;var $r=An.get(de);if($r&&An.get(xe))return $r==xe;var yi=-1,Ui=!0,Ii=Ve&s?new Ac:void 0;for(An.set(de,xe),An.set(xe,de);++yi<Ti;){var zr=de[yi],vs=xe[yi];if(xt)var La=Gr?xt(vs,zr,yi,xe,de,An):xt(zr,vs,yi,de,xe,An);if(La!==void 0){if(La)continue;Ui=!1;break}if(Ii){if(!je(xe,function(Yo,Ic){if(!ut(Ii,Ic)&&(zr===Yo||Pr(zr,Yo,Ve,xt,An)))return Ii.push(Ic)})){Ui=!1;break}}else if(!(zr===vs||Pr(zr,vs,Ve,xt,An))){Ui=!1;break}}return An.delete(de),An.delete(xe),Ui}function Zb(de,xe,Ve,xt,Pr,An,Gr){switch(Ve){case ee:if(de.byteLength!=xe.byteLength||de.byteOffset!=xe.byteOffset)return!1;de=de.buffer,xe=xe.buffer;case Y:return!(de.byteLength!=xe.byteLength||!An(new nn(de),new nn(xe)));case u:case d:case _:return K1(+de,+xe);case h:return de.name==xe.name&&de.message==xe.message;case O:case C:return de==xe+"";case v:var Ti=He;case $:var Zn=xt&i;if(Ti||(Ti=Gt),de.size!=xe.size&&!Zn)return!1;var $r=Gr.get(de);if($r)return $r==xe;xt|=s,Gr.set(de,xe);var yi=Hh(Ti(de),Ti(xe),xt,Pr,An,Gr);return Gr.delete(de),yi;case A:if(Ot)return Ot.call(de)==Ot.call(xe)}return!1}function Wh(de,xe,Ve,xt,Pr,An){var Gr=Ve&i,Ti=Cc(de),Zn=Ti.length,$r=Cc(xe),yi=$r.length;if(Zn!=yi&&!Gr)return!1;for(var Ui=Zn;Ui--;){var Ii=Ti[Ui];if(!(Gr?Ii in xe:ie.call(xe,Ii)))return!1}var zr=An.get(de);if(zr&&An.get(xe))return zr==xe;var vs=!0;An.set(de,xe),An.set(xe,de);for(var La=Gr;++Ui<Zn;){Ii=Ti[Ui];var Yo=de[Ii],Ic=xe[Ii];if(xt)var dm=Gr?xt(Ic,Yo,Ii,xe,de,An):xt(Yo,Ic,Ii,de,xe,An);if(!(dm===void 0?Yo===Ic||Pr(Yo,Ic,Ve,xt,An):dm)){vs=!1;break}La||(La=Ii=="constructor")}if(vs&&!La){var Jd=de.constructor,ts=xe.constructor;Jd!=ts&&"constructor"in de&&"constructor"in xe&&!(typeof Jd=="function"&&Jd instanceof Jd&&typeof ts=="function"&&ts instanceof ts)&&(vs=!1)}return An.delete(de),An.delete(xe),vs}function Cc(de){return om(de,J1,W1)}function Tl(de,xe){var Ve=de.__data__;return cm(xe)?Ve[typeof xe=="string"?"string":"hash"]:Ve.map}function ys(de,xe){var Ve=ft(de,xe);return Qb(Ve)?Ve:void 0}function Jr(de){var xe=ie.call(de,qr),Ve=de[qr];try{de[qr]=void 0;var xt=!0}catch{}var Pr=we.call(de);return xt&&(xe?de[qr]=Ve:delete de[qr]),Pr}var W1=Bn?function(de){return de==null?[]:(de=Object(de),Ue(Bn(de),function(xe){return Ct.call(de,xe)}))}:Br,Sc=Zd;(sn&&Sc(new sn(new ArrayBuffer(1)))!=ee||Pe&&Sc(new Pe)!=v||It&&Sc(It.resolve())!=k||$t&&Sc(new $t)!=$||jt&&Sc(new jt)!=V)&&(Sc=function(de){var xe=Zd(de),Ve=xe==b?de.constructor:void 0,xt=Ve?Tc(Ve):"";if(xt)switch(xt){case fn:return ee;case hn:return v;case Lt:return k;case Kt:return $;case Yt:return V}return xe});function V1(de,xe){return xe=xe??o,!!xe&&(typeof de=="number"||ve.test(de))&&de>-1&&de%1==0&&de<xe}function cm(de){var xe=typeof de;return xe=="string"||xe=="number"||xe=="symbol"||xe=="boolean"?de!=="__proto__":de===null}function q1(de){return!!fe&&fe in de}function G1(de){var xe=de&&de.constructor,Ve=typeof xe=="function"&&xe.prototype||X;return de===Ve}function Jb(de){return we.call(de)}function Tc(de){if(de!=null){try{return G.call(de)}catch{}try{return de+""}catch{}}return""}function K1(de,xe){return de===xe||de!==de&&xe!==xe}var lm=am(function(){return arguments}())?am:function(de){return Iu(de)&&ie.call(de,"callee")&&!Ct.call(de,"callee")},Vh=Array.isArray;function Xb(de){return de!=null&&Y1(de.length)&&!qh(de)}var um=$n||Nr;function e2(de,xe){return dr(de,xe)}function qh(de){if(!Q1(de))return!1;var xe=Zd(de);return xe==g||xe==w||xe==l||xe==D}function Y1(de){return typeof de=="number"&&de>-1&&de%1==0&&de<=o}function Q1(de){var xe=typeof de;return de!=null&&(xe=="object"||xe=="function")}function Iu(de){return de!=null&&typeof de=="object"}var Z1=Ie?vt(Ie):z1;function J1(de){return Xb(de)?U1(de):H1(de)}function Br(){return[]}function Nr(){return!1}t.exports=e2})(eC,eC.exports);var o6e=eC.exports;const a6e=Qs(o6e);function c6e(t,e){return e=e||{},new Promise(function(n,r){var i=new XMLHttpRequest,s=[],o=[],a={},c=function(){return{ok:(i.status/100|0)==2,statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:c,headers:{keys:function(){return s},entries:function(){return o},get:function(u){return a[u.toLowerCase()]},has:function(u){return u.toLowerCase()in a}}}};for(var l in i.open(e.method||"get",t,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(u,d,h){s.push(d=d.toLowerCase()),o.push([d,h]),a[d]=a[d]?a[d]+","+h:h}),n(c())},i.onerror=r,i.withCredentials=e.credentials=="include",e.headers)i.setRequestHeader(l,e.headers[l]);i.send(e.body||null)})}const l6e=Object.freeze(Object.defineProperty({__proto__:null,default:c6e},Symbol.toStringTag,{value:"Module"})),XH=RD(l6e);var u6e=self.fetch||(self.fetch=XH.default||XH);const d6e=Qs(u6e);var f6e={};function h6e(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(n[o]!==255)throw new TypeError(s+" is ambiguous");n[o]=i}var a=t.length,c=t.charAt(0),l=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function d(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,_=0,T=0,b=w.length;T!==b&&w[T]===0;)T++,v++;for(var k=(b-T)*u+1>>>0,D=new Uint8Array(k);T!==b;){for(var O=w[T],$=0,C=k-1;(O!==0||$<_)&&C!==-1;C--,$++)O+=256*D[C]>>>0,D[C]=O%a>>>0,O=O/a>>>0;if(O!==0)throw new Error("Non-zero carry");_=$,T++}for(var A=k-_;A!==k&&D[A]===0;)A++;for(var H=c.repeat(v);A<k;++A)H+=t.charAt(D[A]);return H}function h(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 _=0,T=0;w[v]===c;)_++,v++;for(var b=(w.length-v)*l+1>>>0,k=new Uint8Array(b);w[v];){var D=n[w.charCodeAt(v)];if(D===255)return;for(var O=0,$=b-1;(D!==0||O<T)&&$!==-1;$--,O++)D+=a*k[$]>>>0,k[$]=D%256>>>0,D=D/256>>>0;if(D!==0)throw new Error("Non-zero carry");T=O,v++}if(w[v]!==" "){for(var C=b-T;C!==b&&k[C]===0;)C++;for(var A=new Uint8Array(_+(b-C)),H=_;C!==b;)A[H++]=k[C++];return A}}}function g(w){var v=h(w);if(v)return v;throw new Error(`Non-${e} character`)}return{encode:d,decodeUnsafe:h,decode:g}}var p6e=h6e,m6e=p6e;const JJ=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")},g6e=t=>new TextEncoder().encode(t),w6e=t=>new TextDecoder().decode(t);class y6e{constructor(e,n,r){this.name=e,this.prefix=n,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class v6e{constructor(e,n,r){if(this.name=e,this.prefix=n,n.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=r}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 XJ(this,e)}}let b6e=class{constructor(e){this.decoders=e}or(e){return XJ(this,e)}decode(e){const n=e[0],r=this.decoders[n];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};const XJ=(t,e)=>new b6e({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});let x6e=class{constructor(e,n,r,i){this.name=e,this.prefix=n,this.baseEncode=r,this.baseDecode=i,this.encoder=new y6e(e,n,r),this.decoder=new v6e(e,n,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};const jS=({name:t,prefix:e,encode:n,decode:r})=>new x6e(t,e,n,r),I6=({prefix:t,name:e,alphabet:n})=>{const{encode:r,decode:i}=m6e(n,e);return jS({prefix:t,name:e,encode:r,decode:s=>JJ(i(s))})},_6e=(t,e,n,r)=>{const i={};for(let u=0;u<e.length;++u)i[e[u]]=u;let s=t.length;for(;t[s-1]==="=";)--s;const o=new Uint8Array(s*n/8|0);let a=0,c=0,l=0;for(let u=0;u<s;++u){const d=i[t[u]];if(d===void 0)throw new SyntaxError(`Non-${r} character`);c=c<<n|d,a+=n,a>=8&&(a-=8,o[l++]=255&c>>a)}if(a>=n||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o},A6e=(t,e,n)=>{const r=e[e.length-1]==="=",i=(1<<n)-1;let s="",o=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],o+=8;o>n;)o-=n,s+=e[i&a>>o];if(o&&(s+=e[i&a<<n-o]),r)for(;s.length*n&7;)s+="=";return s},Js=({name:t,prefix:e,bitsPerChar:n,alphabet:r})=>jS({prefix:e,name:t,encode(i){return A6e(i,r,n)},decode(i){return _6e(i,r,n,t)}}),E6e=jS({prefix:"\0",name:"identity",encode:t=>w6e(t),decode:t=>g6e(t)});var C6e=Object.freeze({__proto__:null,identity:E6e});const S6e=Js({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var T6e=Object.freeze({__proto__:null,base2:S6e});const I6e=Js({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var k6e=Object.freeze({__proto__:null,base8:I6e});const R6e=I6({prefix:"9",name:"base10",alphabet:"0123456789"});var N6e=Object.freeze({__proto__:null,base10:R6e});const P6e=Js({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),O6e=Js({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var D6e=Object.freeze({__proto__:null,base16:P6e,base16upper:O6e});const M6e=Js({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),B6e=Js({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),$6e=Js({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),j6e=Js({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),L6e=Js({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),U6e=Js({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),F6e=Js({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),z6e=Js({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),H6e=Js({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var W6e=Object.freeze({__proto__:null,base32:M6e,base32upper:B6e,base32pad:$6e,base32padupper:j6e,base32hex:L6e,base32hexupper:U6e,base32hexpad:F6e,base32hexpadupper:z6e,base32z:H6e});const V6e=I6({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),q6e=I6({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var G6e=Object.freeze({__proto__:null,base36:V6e,base36upper:q6e});const K6e=I6({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Y6e=I6({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Q6e=Object.freeze({__proto__:null,base58btc:K6e,base58flickr:Y6e});const Z6e=Js({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),J6e=Js({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),X6e=Js({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),e4e=Js({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var t4e=Object.freeze({__proto__:null,base64:Z6e,base64pad:J6e,base64url:X6e,base64urlpad:e4e});const eX=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),n4e=eX.reduce((t,e,n)=>(t[n]=e,t),[]),r4e=eX.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);function i4e(t){return t.reduce((e,n)=>(e+=n4e[n],e),"")}function s4e(t){const e=[];for(const n of t){const r=r4e[n.codePointAt(0)];if(r===void 0)throw new Error(`Non-base256emoji character: ${n}`);e.push(r)}return new Uint8Array(e)}const o4e=jS({prefix:"🚀",name:"base256emoji",encode:i4e,decode:s4e});var a4e=Object.freeze({__proto__:null,base256emoji:o4e}),c4e=tX,eW=128,l4e=127,u4e=~l4e,d4e=Math.pow(2,31);function tX(t,e,n){e=e||[],n=n||0;for(var r=n;t>=d4e;)e[n++]=t&255|eW,t/=128;for(;t&u4e;)e[n++]=t&255|eW,t>>>=7;return e[n]=t|0,tX.bytes=n-r+1,e}var f4e=HN,h4e=128,tW=127;function HN(t,r){var n=0,r=r||0,i=0,s=r,o,a=t.length;do{if(s>=a)throw HN.bytes=0,new RangeError("Could not decode varint");o=t[s++],n+=i<28?(o&tW)<<i:(o&tW)*Math.pow(2,i),i+=7}while(o>=h4e);return HN.bytes=s-r,n}var p4e=Math.pow(2,7),m4e=Math.pow(2,14),g4e=Math.pow(2,21),w4e=Math.pow(2,28),y4e=Math.pow(2,35),v4e=Math.pow(2,42),b4e=Math.pow(2,49),x4e=Math.pow(2,56),_4e=Math.pow(2,63),A4e=function(t){return t<p4e?1:t<m4e?2:t<g4e?3:t<w4e?4:t<y4e?5:t<v4e?6:t<b4e?7:t<x4e?8:t<_4e?9:10},E4e={encode:c4e,decode:f4e,encodingLength:A4e},nX=E4e;const nW=(t,e,n=0)=>(nX.encode(t,e,n),e),rW=t=>nX.encodingLength(t),WN=(t,e)=>{const n=e.byteLength,r=rW(t),i=r+rW(n),s=new Uint8Array(i+n);return nW(t,s,0),nW(n,s,r),s.set(e,i),new C4e(t,n,e,s)};class C4e{constructor(e,n,r,i){this.code=e,this.size=n,this.digest=r,this.bytes=i}}const rX=({name:t,code:e,encode:n})=>new S4e(t,e,n);class S4e{constructor(e,n,r){this.name=e,this.code=n,this.encode=r}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?WN(this.code,n):n.then(r=>WN(this.code,r))}else throw Error("Unknown type, must be binary type")}}const iX=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),T4e=rX({name:"sha2-256",code:18,encode:iX("SHA-256")}),I4e=rX({name:"sha2-512",code:19,encode:iX("SHA-512")});var k4e=Object.freeze({__proto__:null,sha256:T4e,sha512:I4e});const sX=0,R4e="identity",oX=JJ,N4e=t=>WN(sX,oX(t)),P4e={code:sX,name:R4e,encode:oX,digest:N4e};var O4e=Object.freeze({__proto__:null,identity:P4e});new TextEncoder,new TextDecoder;const iW={...C6e,...T6e,...k6e,...N6e,...D6e,...W6e,...G6e,...Q6e,...t4e,...a4e};({...k4e,...O4e});function D4e(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(t):new Uint8Array(t)}function aX(t,e,n,r){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:r}}}const sW=aX("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),qI=aX("ascii","a",t=>{let e="a";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e},t=>{t=t.substring(1);const e=D4e(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}),M4e={utf8:sW,"utf-8":sW,hex:iW.base16,latin1:qI,ascii:qI,binary:qI,...iW};function B4e(t,e="utf8"){const n=M4e[e];if(!n)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t,"utf8"):n.decoder.decode(`${n.prefix}${t}`)}const cX="wc",$4e=2,QM="core",m0=`${cX}@2:${QM}:`,j4e={name:QM,logger:"error"},L4e={database:":memory:"},U4e="crypto",oW="client_ed25519_seed",F4e=At.ONE_DAY,z4e="keychain",H4e="0.3",W4e="messages",V4e="0.3",q4e=At.SIX_HOURS,G4e="publisher",lX="irn",K4e="error",uX="wss://relay.walletconnect.org",Y4e="relayer",ga={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"},Q4e="_subscription",Bc={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},Z4e=.1,J4e="2.14.0",X4e=1e4,e_e="0.3",t_e="WALLETCONNECT_CLIENT_ID",Hu={created:"subscription_created",deleted:"subscription_deleted",expired:"subscription_expired",disabled:"subscription_disabled",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},n_e="subscription",r_e="0.3",i_e=At.FIVE_SECONDS*1e3,s_e="pairing",o_e="0.3",M2={wc_pairingDelete:{req:{ttl:At.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:At.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:At.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:At.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:At.ONE_DAY,prompt:!1,tag:0},res:{ttl:At.ONE_DAY,prompt:!1,tag:0}}},uy={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},$l={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},a_e="history",c_e="0.3",l_e="expirer",Kc={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},u_e="0.3",GI="verify-api",d_e="https://verify.walletconnect.com",dX="https://verify.walletconnect.org",i3=dX,f_e=[d_e,dX],h_e="echo",p_e="https://echo.walletconnect.com";class m_e{constructor(e,n){this.core=e,this.logger=n,this.keychain=new Map,this.name=z4e,this.version=H4e,this.initialized=!1,this.storagePrefix=m0,this.init=async()=>{if(!this.initialized){const r=await this.getKeyChain();typeof r<"u"&&(this.keychain=r),this.initialized=!0}},this.has=r=>(this.isInitialized(),this.keychain.has(r)),this.set=async(r,i)=>{this.isInitialized(),this.keychain.set(r,i),await this.persist()},this.get=r=>{this.isInitialized();const i=this.keychain.get(r);if(typeof i>"u"){const{message:s}=dt("NO_MATCHING_KEY",`${this.name}: ${r}`);throw new Error(s)}return i},this.del=async r=>{this.isInitialized(),this.keychain.delete(r),await this.persist()},this.core=e,this.logger=qo(n,this.name)}get context(){return Ma(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,HZ(e))}async getKeyChain(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?WZ(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:e}=dt("NOT_INITIALIZED",this.name);throw new Error(e)}}}class g_e{constructor(e,n,r){this.core=e,this.logger=n,this.name=U4e,this.randomSessionIdentifier=LN(),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(),s=VH(i);return VJ(s.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const i=a3e();return this.setPrivateKey(i.publicKey,i.privateKey)},this.signJWT=async i=>{this.isInitialized();const s=await this.getClientSeed(),o=VH(s),a=this.randomSessionIdentifier;return await jxe(a,i,F4e,o)},this.generateSharedKey=(i,s,o)=>{this.isInitialized();const a=this.getPrivateKey(i),c=c3e(a,s);return this.setSymKey(c,o)},this.setSymKey=async(i,s)=>{this.isInitialized();const o=s||WA(i);return await this.keychain.set(o,i),o},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,s,o)=>{this.isInitialized();const a=PJ(o),c=ch(s);if(EH(a)){const h=a.senderPublicKey,g=a.receiverPublicKey;i=await this.generateSharedKey(h,g)}const l=this.getSymKey(i),{type:u,senderPublicKey:d}=a;return u3e({type:u,symKey:l,message:c,senderPublicKey:d})},this.decode=async(i,s,o)=>{this.isInitialized();const a=h3e(s,o);if(EH(a)){const c=a.receiverPublicKey,l=a.senderPublicKey;i=await this.generateSharedKey(c,l)}try{const c=this.getSymKey(i),l=d3e({symKey:c,encoded:s});return A6(l)}catch(c){this.logger.error(`Failed to decode message from topic: '${i}', clientId: '${await this.getClientId()}'`),this.logger.error(c)}},this.getPayloadType=i=>{const s=YE(i);return x6(s.type)},this.getPayloadSenderPublicKey=i=>{const s=YE(i);return s.senderPublicKey?Do(s.senderPublicKey,Oo):void 0},this.core=e,this.logger=qo(n,this.name),this.keychain=r||new m_e(this.core,this.logger)}get context(){return Ma(this.logger)}async setPrivateKey(e,n){return await this.keychain.set(e,n),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(oW)}catch{e=LN(),await this.keychain.set(oW,e)}return B4e(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=dt("NOT_INITIALIZED",this.name);throw new Error(e)}}}class w_e extends mxe{constructor(e,n){super(e,n),this.logger=e,this.core=n,this.messages=new Map,this.name=W4e,this.version=V4e,this.initialized=!1,this.storagePrefix=m0,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const r=await this.getRelayerMessages();typeof r<"u"&&(this.messages=r),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(r){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(r)}finally{this.initialized=!0}}},this.set=async(r,i)=>{this.isInitialized();const s=Vm(i);let o=this.messages.get(r);return typeof o>"u"&&(o={}),typeof o[s]<"u"||(o[s]=i,this.messages.set(r,o),await this.persist()),s},this.get=r=>{this.isInitialized();let i=this.messages.get(r);return typeof i>"u"&&(i={}),i},this.has=(r,i)=>{this.isInitialized();const s=this.get(r),o=Vm(i);return typeof s[o]<"u"},this.del=async r=>{this.isInitialized(),this.messages.delete(r),await this.persist()},this.logger=qo(e,this.name),this.core=n}get context(){return Ma(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,HZ(e))}async getRelayerMessages(){const e=await this.core.storage.getItem(this.storageKey);return typeof e<"u"?WZ(e):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:e}=dt("NOT_INITIALIZED",this.name);throw new Error(e)}}}class y_e extends gxe{constructor(e,n){super(e,n),this.relayer=e,this.logger=n,this.events=new hc.EventEmitter,this.name=G4e,this.queue=new Map,this.publishTimeout=At.toMiliseconds(At.ONE_MINUTE),this.failedPublishTimeout=At.toMiliseconds(At.ONE_SECOND),this.needsTransportRestart=!1,this.publish=async(r,i,s)=>{var o;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:r,message:i,opts:s}});const a=(s==null?void 0:s.ttl)||q4e,c=UN(s),l=(s==null?void 0:s.prompt)||!1,u=(s==null?void 0:s.tag)||0,d=(s==null?void 0:s.id)||qm().toString(),h={topic:r,message:i,opts:{ttl:a,relay:c,prompt:l,tag:u,id:d}},g=`Failed to publish payload, please try again. id:${d} tag:${u}`,w=Date.now();let v,_=1;try{for(;v===void 0;){if(Date.now()-w>this.publishTimeout)throw new Error(g);this.logger.trace({id:d,attempts:_},`publisher.publish - attempt ${_}`),v=await await Cy(this.rpcPublish(r,i,a,c,l,u,d).catch(T=>this.logger.warn(T)),this.publishTimeout,g),_++,v||await new Promise(T=>setTimeout(T,this.failedPublishTimeout))}this.relayer.events.emit(ga.publish,h),this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{id:d,topic:r,message:i,opts:s}})}catch(T){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(T),(o=s==null?void 0:s.internal)!=null&&o.throwOnFailedPublish)throw T;this.queue.set(d,h)}},this.on=(r,i)=>{this.events.on(r,i)},this.once=(r,i)=>{this.events.once(r,i)},this.off=(r,i)=>{this.events.off(r,i)},this.removeListener=(r,i)=>{this.events.removeListener(r,i)},this.relayer=e,this.logger=qo(n,this.name),this.registerEventListeners()}get context(){return Ma(this.logger)}rpcPublish(e,n,r,i,s,o,a){var c,l,u,d;const h={method:n3(i.protocol).publish,params:{topic:e,message:n,ttl:r,prompt:s,tag:o},id:a};return ma((c=h.params)==null?void 0:c.prompt)&&((l=h.params)==null||delete l.prompt),ma((u=h.params)==null?void 0:u.tag)&&((d=h.params)==null||delete d.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:h}),this.relayer.request(h)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async e=>{const{topic:n,message:r,opts:i}=e;await this.publish(n,r,i)})}registerEventListeners(){this.relayer.core.heartbeat.on(E6.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(ga.connection_stalled);return}this.checkQueue()}),this.relayer.on(ga.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}class v_e{constructor(){this.map=new Map,this.set=(e,n)=>{const r=this.get(e);this.exists(e,n)||this.map.set(e,[...r,n])},this.get=e=>this.map.get(e)||[],this.exists=(e,n)=>this.get(e).includes(n),this.delete=(e,n)=>{if(typeof n>"u"){this.map.delete(e);return}if(!this.map.has(e))return;const r=this.get(e);if(!this.exists(e,n))return;const i=r.filter(s=>s!==n);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 b_e=Object.defineProperty,x_e=Object.defineProperties,__e=Object.getOwnPropertyDescriptors,aW=Object.getOwnPropertySymbols,A_e=Object.prototype.hasOwnProperty,E_e=Object.prototype.propertyIsEnumerable,cW=(t,e,n)=>e in t?b_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,B2=(t,e)=>{for(var n in e||(e={}))A_e.call(e,n)&&cW(t,n,e[n]);if(aW)for(var n of aW(e))E_e.call(e,n)&&cW(t,n,e[n]);return t},KI=(t,e)=>x_e(t,__e(e));class C_e extends vxe{constructor(e,n){super(e,n),this.relayer=e,this.logger=n,this.subscriptions=new Map,this.topicMap=new v_e,this.events=new hc.EventEmitter,this.name=n_e,this.version=r_e,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=m0,this.subscribeTimeout=At.toMiliseconds(At.ONE_MINUTE),this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.pendingBatchMessages=[],this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(r,i)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:r,opts:i}});try{const s=UN(i),o={topic:r,relay:s};this.pending.set(r,o);const a=await this.rpcSubscribe(r,s);return typeof a=="string"&&(this.onSubscribe(a,o),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:r,opts:i}})),a}catch(s){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(s),s}},this.unsubscribe=async(r,i)=>{await this.restartToComplete(),this.isInitialized(),typeof(i==null?void 0:i.id)<"u"?await this.unsubscribeById(r,i.id,i):await this.unsubscribeByTopic(r,i)},this.isSubscribed=async r=>{if(this.topics.includes(r))return!0;const i=`${this.pendingSubscriptionWatchLabel}_${r}`;return await new Promise((s,o)=>{const a=new At.Watch;a.start(i);const c=setInterval(()=>{!this.pending.has(r)&&this.topics.includes(r)&&(clearInterval(c),a.stop(i),s(!0)),a.elapsed(i)>=i_e&&(clearInterval(c),a.stop(i),o(new Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1)},this.on=(r,i)=>{this.events.on(r,i)},this.once=(r,i)=>{this.events.once(r,i)},this.off=(r,i)=>{this.events.off(r,i)},this.removeListener=(r,i)=>{this.events.removeListener(r,i)},this.start=async()=>{await this.onConnect()},this.stop=async()=>{await this.onDisconnect()},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=e,this.logger=qo(n,this.name),this.clientId=""}get context(){return Ma(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,n){let r=!1;try{r=this.getSubscription(e).topic===n}catch{}return r}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,n){const r=this.topicMap.get(e);await Promise.all(r.map(async i=>await this.unsubscribeById(e,i,n)))}async unsubscribeById(e,n,r){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:n,opts:r}});try{const i=UN(r);await this.rpcUnsubscribe(e,n,i);const s=Lr("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,n,s),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:n,opts:r}})}catch(i){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(i),i}}async rpcSubscribe(e,n){const r={method:n3(n.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{return await await Cy(this.relayer.request(r).catch(i=>this.logger.warn(i)),this.subscribeTimeout)?Vm(e+this.clientId):null}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(ga.connection_stalled)}return null}async rpcBatchSubscribe(e){if(!e.length)return;const n=e[0].relay,r={method:n3(n.protocol).batchSubscribe,params:{topics:e.map(i=>i.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{return await await Cy(this.relayer.request(r).catch(i=>this.logger.warn(i)),this.subscribeTimeout)}catch{this.relayer.events.emit(ga.connection_stalled)}}async rpcBatchFetchMessages(e){if(!e.length)return;const n=e[0].relay,r={method:n3(n.protocol).batchFetchMessages,params:{topics:e.map(s=>s.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});let i;try{i=await await Cy(this.relayer.request(r).catch(s=>this.logger.warn(s)),this.subscribeTimeout)}catch{this.relayer.events.emit(ga.connection_stalled)}return i}rpcUnsubscribe(e,n,r){const i={method:n3(r.protocol).unsubscribe,params:{topic:e,id:n}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,n){this.setSubscription(e,KI(B2({},n),{id:e})),this.pending.delete(n.topic)}onBatchSubscribe(e){e.length&&e.forEach(n=>{this.setSubscription(n.id,B2({},n)),this.pending.delete(n.topic)})}async onUnsubscribe(e,n,r){this.events.removeAllListeners(n),this.hasSubscription(n,e)&&this.deleteSubscription(n,r),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,n){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:n}),this.addSubscription(e,n)}addSubscription(e,n){this.subscriptions.set(e,B2({},n)),this.topicMap.set(n.topic,e),this.events.emit(Hu.created,n)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const n=this.subscriptions.get(e);if(!n){const{message:r}=dt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(r)}return n}deleteSubscription(e,n){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:n});const r=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(r.topic,e),this.events.emit(Hu.deleted,KI(B2({},r),{reason:n}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Hu.sync)}async reset(){if(this.cached.length){const e=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let n=0;n<e;n++){const r=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchFetchMessages(r),await this.batchSubscribe(r)}}this.events.emit(Hu.resubscribed)}async restore(){try{const e=await this.getRelayerSubscriptions();if(typeof e>"u"||!e.length)return;if(this.subscriptions.size){const{message:n}=dt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(n),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(n)}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 n=await this.rpcBatchSubscribe(e);hd(n)&&this.onBatchSubscribe(n.map((r,i)=>KI(B2({},e[i]),{id:r})))}async batchFetchMessages(e){if(!e.length)return;this.logger.trace(`Fetching batch messages for ${e.length} subscriptions`);const n=await this.rpcBatchFetchMessages(e);n&&n.messages&&(this.pendingBatchMessages=this.pendingBatchMessages.concat(n.messages))}async onConnect(){await this.restart(),this.onEnable()}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||!this.relayer.connected)return;const e=[];this.pending.forEach(n=>{e.push(n)}),await this.batchSubscribe(e),this.pendingBatchMessages.length&&(await this.relayer.handleBatchMessageEvents(this.pendingBatchMessages),this.pendingBatchMessages=[])}registerEventListeners(){this.relayer.core.heartbeat.on(E6.pulse,async()=>{await this.checkPending()}),this.events.on(Hu.created,async e=>{const n=Hu.created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),await this.persist()}),this.events.on(Hu.deleted,async e=>{const n=Hu.deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=dt("NOT_INITIALIZED",this.name);throw new Error(e)}}async restartToComplete(){this.restartInProgress&&await new Promise(e=>{const n=setInterval(()=>{this.restartInProgress||(clearInterval(n),e())},this.pollingInterval)})}}var S_e=Object.defineProperty,lW=Object.getOwnPropertySymbols,T_e=Object.prototype.hasOwnProperty,I_e=Object.prototype.propertyIsEnumerable,uW=(t,e,n)=>e in t?S_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,k_e=(t,e)=>{for(var n in e||(e={}))T_e.call(e,n)&&uW(t,n,e[n]);if(lW)for(var n of lW(e))I_e.call(e,n)&&uW(t,n,e[n]);return t};class R_e extends wxe{constructor(e){super(e),this.protocol="wc",this.version=2,this.events=new hc.EventEmitter,this.name=Y4e,this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","stalled","interrupted"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.heartBeatTimeout=At.toMiliseconds(At.THIRTY_SECONDS+At.ONE_SECOND),this.request=async n=>{var r,i;this.logger.debug("Publishing Request Payload");const s=n.id||qm().toString();await this.toEstablishConnection();try{const o=this.provider.request(n);this.requestsInFlight.set(s,{promise:o,request:n}),this.logger.trace({id:s,method:n.method,topic:(r=n.params)==null?void 0:r.topic},"relayer.request - attempt to publish...");const a=await new Promise(async(c,l)=>{const u=()=>{l(new Error(`relayer.request - publish interrupted, id: ${s}`))};this.provider.on(Bc.disconnect,u);const d=await o;this.provider.off(Bc.disconnect,u),c(d)});return this.logger.trace({id:s,method:n.method,topic:(i=n.params)==null?void 0:i.topic},"relayer.request - published"),a}catch(o){throw this.logger.debug(`Failed to Publish Request: ${s}`),o}finally{this.requestsInFlight.delete(s)}},this.resetPingTimeout=()=>{if(h5())try{clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var n,r,i;(i=(r=(n=this.provider)==null?void 0:n.connection)==null?void 0:r.socket)==null||i.terminate()},this.heartBeatTimeout)}catch(n){this.logger.warn(n)}},this.onPayloadHandler=n=>{this.onProviderPayload(n),this.resetPingTimeout()},this.onConnectHandler=()=>{this.logger.trace("relayer connected"),this.startPingTimeout(),this.events.emit(ga.connect)},this.onDisconnectHandler=()=>{this.logger.trace("relayer disconnected"),this.onProviderDisconnect()},this.onProviderErrorHandler=n=>{this.logger.error(n),this.events.emit(ga.error,n),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(Bc.payload,this.onPayloadHandler),this.provider.on(Bc.connect,this.onConnectHandler),this.provider.on(Bc.disconnect,this.onDisconnectHandler),this.provider.on(Bc.error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&typeof e.logger!="string"?qo(e.logger,this.name):C6(T6({level:e.logger||K4e})),this.messages=new w_e(this.logger,e.core),this.subscriber=new C_e(this,this.logger),this.publisher=new y_e(this,this.logger),this.relayUrl=(e==null?void 0:e.relayUrl)||uX,this.projectId=e.projectId,this.bundleId=Jye(),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),await this.transportOpen(),this.initialized=!0,setTimeout(async()=>{this.subscriber.topics.length===0&&this.subscriber.pending.size===0&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)},X4e)}get context(){return Ma(this.logger)}get connected(){var e,n,r;return((r=(n=(e=this.provider)==null?void 0:e.connection)==null?void 0:n.socket)==null?void 0:r.readyState)===1}get connecting(){var e,n,r;return((r=(n=(e=this.provider)==null?void 0:e.connection)==null?void 0:n.socket)==null?void 0:r.readyState)===0}async publish(e,n,r){this.isInitialized(),await this.publisher.publish(e,n,r),await this.recordMessageEvent({topic:e,message:n,publishedAt:Date.now()})}async subscribe(e,n){var r;this.isInitialized();let i=((r=this.subscriber.topicMap.get(e))==null?void 0:r[0])||"",s;const o=a=>{a.topic===e&&(this.subscriber.off(Hu.created,o),s())};return await Promise.all([new Promise(a=>{s=a,this.subscriber.on(Hu.created,o)}),new Promise(async a=>{i=await this.subscriber.subscribe(e,n)||i,a()})]),i}async unsubscribe(e,n){this.isInitialized(),await this.subscriber.unsubscribe(e,n)}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}async transportDisconnect(){if(!this.hasExperiencedNetworkDisruption&&this.connected&&this.requestsInFlight.size>0)try{await Promise.all(Array.from(this.requestsInFlight.values()).map(e=>e.promise))}catch(e){this.logger.warn(e)}this.hasExperiencedNetworkDisruption||this.connected?await Cy(this.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect()),await this.createProvider(),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;try{await new Promise(async(n,r)=>{const i=()=>{this.provider.off(Bc.disconnect,i),r(new Error("Connection interrupted while trying to subscribe"))};this.provider.on(Bc.disconnect,i),await Cy(this.provider.connect(),At.toMiliseconds(At.ONE_MINUTE),`Socket stalled when trying to connect to ${this.relayUrl}`).catch(s=>{r(s)}),this.subscriber.start().catch(s=>{this.logger.error(s),this.onDisconnectHandler()}),this.hasExperiencedNetworkDisruption=!1,n()})}catch(n){this.logger.error(n);const r=n;if(this.hasExperiencedNetworkDisruption=!0,!this.isConnectionStalled(r.message))throw n}finally{this.connectionAttemptInProgress=!1}}async restartTransport(e){this.connectionAttemptInProgress||(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await DH())throw new Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(e){if((e==null?void 0:e.length)===0){this.logger.trace("Batch message events is empty. Ignoring...");return}const n=e.sort((r,i)=>r.publishedAt-i.publishedAt);this.logger.trace(`Batch of ${n.length} message events sorted`);for(const r of n)try{await this.onMessageEvent(r)}catch(i){this.logger.warn(i)}this.logger.trace(`Batch of ${n.length} message events processed`)}startPingTimeout(){var e,n,r,i,s;if(h5())try{(n=(e=this.provider)==null?void 0:e.connection)!=null&&n.socket&&((s=(i=(r=this.provider)==null?void 0:r.connection)==null?void 0:i.socket)==null||s.once("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(o){this.logger.warn(o)}}isConnectionStalled(e){return this.staleConnectionErrors.some(n=>e.includes(n))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new Pd(new s6e(ive({sdkVersion:J4e,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(e){const{topic:n,message:r}=e;await this.messages.set(n,r)}async shouldIgnoreMessageEvent(e){const{topic:n,message:r}=e;if(!r||r.length===0)return this.logger.debug(`Ignoring invalid/empty message: ${r}`),!0;if(!await this.subscriber.isSubscribed(n))return this.logger.debug(`Ignoring message for non-subscribed topic ${n}`),!0;const i=this.messages.has(n,r);return i&&this.logger.debug(`Ignoring duplicate message: ${r}`),i}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),YM(e)){if(!e.method.endsWith(Q4e))return;const n=e.params,{topic:r,message:i,publishedAt:s}=n.data,o={topic:r,message:i,publishedAt:s};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(k_e({type:"event",event:n.id},o)),this.events.emit(n.id,o),await this.acknowledgePayload(e),await this.onMessageEvent(o)}else $S(e)&&this.events.emit(ga.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(this.events.emit(ga.message,e),await this.recordMessageEvent(e))}async acknowledgePayload(e){const n=MS(e.id,!0);await this.provider.connection.send(n)}unregisterProviderListeners(){this.provider.off(Bc.payload,this.onPayloadHandler),this.provider.off(Bc.connect,this.onConnectHandler),this.provider.off(Bc.disconnect,this.onDisconnectHandler),this.provider.off(Bc.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let e=await DH();r5e(async n=>{e!==n&&(e=n,n?await this.restartTransport().catch(r=>this.logger.error(r)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))})}async onProviderDisconnect(){await this.subscriber.stop(),this.requestsInFlight.clear(),clearTimeout(this.pingTimeout),this.events.emit(ga.disconnect),this.connectionAttemptInProgress=!1,!this.transportExplicitlyClosed&&setTimeout(async()=>{await this.transportOpen().catch(e=>this.logger.error(e))},At.toMiliseconds(Z4e))}isInitialized(){if(!this.initialized){const{message:e}=dt("NOT_INITIALIZED",this.name);throw new Error(e)}}async toEstablishConnection(){await this.confirmOnlineStateOrThrow(),!this.connected&&(this.connectionAttemptInProgress&&await new Promise(e=>{const n=setInterval(()=>{this.connected&&(clearInterval(n),e())},this.connectionStatusPollingInterval)}),await this.transportOpen())}}var N_e=Object.defineProperty,dW=Object.getOwnPropertySymbols,P_e=Object.prototype.hasOwnProperty,O_e=Object.prototype.propertyIsEnumerable,fW=(t,e,n)=>e in t?N_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,hW=(t,e)=>{for(var n in e||(e={}))P_e.call(e,n)&&fW(t,n,e[n]);if(dW)for(var n of dW(e))O_e.call(e,n)&&fW(t,n,e[n]);return t};let E1=class extends yxe{constructor(e,n,r,i=m0,s=void 0){super(e,n,r,i),this.core=e,this.logger=n,this.name=r,this.map=new Map,this.version=e_e,this.cached=[],this.initialized=!1,this.storagePrefix=m0,this.recentlyDeleted=[],this.recentlyDeletedLimit=200,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(o=>{this.getKey&&o!==null&&!ma(o)?this.map.set(this.getKey(o),o):D3e(o)?this.map.set(o.id,o):M3e(o)&&this.map.set(o.topic,o)}),this.cached=[],this.initialized=!0)},this.set=async(o,a)=>{this.isInitialized(),this.map.has(o)?await this.update(o,a):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:o,value:a}),this.map.set(o,a),await this.persist())},this.get=o=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:o}),this.getData(o)),this.getAll=o=>(this.isInitialized(),o?this.values.filter(a=>Object.keys(o).every(c=>a6e(a[c],o[c]))):this.values),this.update=async(o,a)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:o,update:a});const c=hW(hW({},this.getData(o)),a);this.map.set(o,c),await this.persist()},this.delete=async(o,a)=>{this.isInitialized(),this.map.has(o)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:o,reason:a}),this.map.delete(o),this.addToRecentlyDeleted(o),await this.persist())},this.logger=qo(n,this.name),this.storagePrefix=i,this.getKey=s}get context(){return Ma(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())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){const n=this.map.get(e);if(!n){if(this.recentlyDeleted.includes(e)){const{message:i}=dt("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(i),new Error(i)}const{message:r}=dt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(r),new Error(r)}return n}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:n}=dt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(n),new Error(n)}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}=dt("NOT_INITIALIZED",this.name);throw new Error(e)}}},D_e=class{constructor(e,n){this.core=e,this.logger=n,this.name=s_e,this.version=o_e,this.events=new IM,this.initialized=!1,this.storagePrefix=m0,this.ignoredPayloadTypes=[Zf],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:r})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...r])]},this.create=async r=>{this.isInitialized();const i=LN(),s=await this.core.crypto.setSymKey(i),o=zs(At.FIVE_MINUTES),a={protocol:lX},c={topic:s,expiry:o,relay:a,active:!1},l=E3e({protocol:this.core.protocol,version:this.core.version,topic:s,symKey:i,relay:a,expiryTimestamp:o,methods:r==null?void 0:r.methods});return this.core.expirer.set(s,o),await this.pairings.set(s,c),await this.core.relayer.subscribe(s),{topic:s,uri:l}},this.pair=async r=>{this.isInitialized(),this.isValidPair(r);const{topic:i,symKey:s,relay:o,expiryTimestamp:a,methods:c}=IH(r.uri);let l;if(this.pairings.keys.includes(i)&&(l=this.pairings.get(i),l.active))throw new Error(`Pairing already exists: ${i}. Please try again with a new connection URI.`);const u=a||zs(At.FIVE_MINUTES),d={topic:i,relay:o,expiry:u,active:!1,methods:c};return this.core.expirer.set(i,u),await this.pairings.set(i,d),r.activatePairing&&await this.activate({topic:i}),this.events.emit(uy.create,d),this.core.crypto.keychain.has(i)||await this.core.crypto.setSymKey(s,i),await this.core.relayer.subscribe(i,{relay:o}),d},this.activate=async({topic:r})=>{this.isInitialized();const i=zs(At.THIRTY_DAYS);this.core.expirer.set(r,i),await this.pairings.update(r,{active:!0,expiry:i})},this.ping=async r=>{this.isInitialized(),await this.isValidPing(r);const{topic:i}=r;if(this.pairings.keys.includes(i)){const s=await this.sendRequest(i,"wc_pairingPing",{}),{done:o,resolve:a,reject:c}=Dm();this.events.once(Xn("pairing_ping",s),({error:l})=>{l?c(l):a()}),await o()}},this.updateExpiry=async({topic:r,expiry:i})=>{this.isInitialized(),await this.pairings.update(r,{expiry:i})},this.updateMetadata=async({topic:r,metadata:i})=>{this.isInitialized(),await this.pairings.update(r,{peerMetadata:i})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async r=>{this.isInitialized(),await this.isValidDisconnect(r);const{topic:i}=r;this.pairings.keys.includes(i)&&(await this.sendRequest(i,"wc_pairingDelete",Lr("USER_DISCONNECTED")),await this.deletePairing(i))},this.sendRequest=async(r,i,s)=>{const o=Iy(i,s),a=await this.core.crypto.encode(r,o),c=M2[i].req;return this.core.history.set(r,o),this.core.relayer.publish(r,a,c),o.id},this.sendResult=async(r,i,s)=>{const o=MS(r,s),a=await this.core.crypto.encode(i,o),c=await this.core.history.get(i,r),l=M2[c.request.method].res;await this.core.relayer.publish(i,a,l),await this.core.history.resolve(o)},this.sendError=async(r,i,s)=>{const o=BS(r,s),a=await this.core.crypto.encode(i,o),c=await this.core.history.get(i,r),l=M2[c.request.method]?M2[c.request.method].res:M2.unregistered_method.res;await this.core.relayer.publish(i,a,l),await this.core.history.resolve(o)},this.deletePairing=async(r,i)=>{await this.core.relayer.unsubscribe(r),await Promise.all([this.pairings.delete(r,Lr("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(r),i?Promise.resolve():this.core.expirer.del(r)])},this.cleanup=async()=>{const r=this.pairings.getAll().filter(i=>xp(i.expiry));await Promise.all(r.map(i=>this.deletePairing(i.topic)))},this.onRelayEventRequest=r=>{const{topic:i,payload:s}=r;switch(s.method){case"wc_pairingPing":return this.onPairingPingRequest(i,s);case"wc_pairingDelete":return this.onPairingDeleteRequest(i,s);default:return this.onUnknownRpcMethodRequest(i,s)}},this.onRelayEventResponse=async r=>{const{topic:i,payload:s}=r,o=(await this.core.history.get(i,s.id)).request.method;switch(o){case"wc_pairingPing":return this.onPairingPingResponse(i,s);default:return this.onUnknownRpcMethodResponse(o)}},this.onPairingPingRequest=async(r,i)=>{const{id:s}=i;try{this.isValidPing({topic:r}),await this.sendResult(s,r,!0),this.events.emit(uy.ping,{id:s,topic:r})}catch(o){await this.sendError(s,r,o),this.logger.error(o)}},this.onPairingPingResponse=(r,i)=>{const{id:s}=i;setTimeout(()=>{zu(i)?this.events.emit(Xn("pairing_ping",s),{}):Xc(i)&&this.events.emit(Xn("pairing_ping",s),{error:i.error})},500)},this.onPairingDeleteRequest=async(r,i)=>{const{id:s}=i;try{this.isValidDisconnect({topic:r}),await this.deletePairing(r),this.events.emit(uy.delete,{id:s,topic:r})}catch(o){await this.sendError(s,r,o),this.logger.error(o)}},this.onUnknownRpcMethodRequest=async(r,i)=>{const{id:s,method:o}=i;try{if(this.registeredMethods.includes(o))return;const a=Lr("WC_METHOD_UNSUPPORTED",o);await this.sendError(s,r,a),this.logger.error(a)}catch(a){await this.sendError(s,r,a),this.logger.error(a)}},this.onUnknownRpcMethodResponse=r=>{this.registeredMethods.includes(r)||this.logger.error(Lr("WC_METHOD_UNSUPPORTED",r))},this.isValidPair=r=>{var i;if(!aa(r)){const{message:o}=dt("MISSING_OR_INVALID",`pair() params: ${r}`);throw new Error(o)}if(!O3e(r.uri)){const{message:o}=dt("MISSING_OR_INVALID",`pair() uri: ${r.uri}`);throw new Error(o)}const s=IH(r.uri);if(!((i=s==null?void 0:s.relay)!=null&&i.protocol)){const{message:o}=dt("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(o)}if(!(s!=null&&s.symKey)){const{message:o}=dt("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(o)}if(s!=null&&s.expiryTimestamp&&At.toMiliseconds(s==null?void 0:s.expiryTimestamp)<Date.now()){const{message:o}=dt("EXPIRED","pair() URI has expired. Please try again with a new connection URI.");throw new Error(o)}},this.isValidPing=async r=>{if(!aa(r)){const{message:s}=dt("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(s)}const{topic:i}=r;await this.isValidPairingTopic(i)},this.isValidDisconnect=async r=>{if(!aa(r)){const{message:s}=dt("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(s)}const{topic:i}=r;await this.isValidPairingTopic(i)},this.isValidPairingTopic=async r=>{if(!Gi(r,!1)){const{message:i}=dt("MISSING_OR_INVALID",`pairing topic should be a string: ${r}`);throw new Error(i)}if(!this.pairings.keys.includes(r)){const{message:i}=dt("NO_MATCHING_KEY",`pairing topic doesn't exist: ${r}`);throw new Error(i)}if(xp(this.pairings.get(r).expiry)){await this.deletePairing(r);const{message:i}=dt("EXPIRED",`pairing topic: ${r}`);throw new Error(i)}},this.core=e,this.logger=qo(n,this.name),this.pairings=new E1(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Ma(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=dt("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){this.core.relayer.on(ga.message,async e=>{const{topic:n,message:r}=e;if(!this.pairings.keys.includes(n)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(r)))return;const i=await this.core.crypto.decode(n,r);try{YM(i)?(this.core.history.set(n,i),this.onRelayEventRequest({topic:n,payload:i})):$S(i)&&(await this.core.history.resolve(i),await this.onRelayEventResponse({topic:n,payload:i}),this.core.history.delete(n,i.id))}catch(s){this.logger.error(s)}})}registerExpirerEvents(){this.core.expirer.on(Kc.expired,async e=>{const{topic:n}=qZ(e.target);n&&this.pairings.keys.includes(n)&&(await this.deletePairing(n,!0),this.events.emit(uy.expire,{topic:n}))})}},M_e=class extends pxe{constructor(e,n){super(e,n),this.core=e,this.logger=n,this.records=new Map,this.events=new hc.EventEmitter,this.name=a_e,this.version=c_e,this.cached=[],this.initialized=!1,this.storagePrefix=m0,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(r=>this.records.set(r.id,r)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(r,i,s)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:r,request:i,chainId:s}),this.records.has(i.id))return;const o={id:i.id,topic:r,request:{method:i.method,params:i.params||null},chainId:s,expiry:zs(At.THIRTY_DAYS)};this.records.set(o.id,o),this.persist(),this.events.emit($l.created,o)},this.resolve=async r=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:r}),!this.records.has(r.id))return;const i=await this.getRecord(r.id);typeof i.response>"u"&&(i.response=Xc(r)?{error:r.error}:{result:r.result},this.records.set(i.id,i),this.persist(),this.events.emit($l.updated,i))},this.get=async(r,i)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:r,id:i}),await this.getRecord(i)),this.delete=(r,i)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:i}),this.values.forEach(s=>{if(s.topic===r){if(typeof i<"u"&&s.id!==i)return;this.records.delete(s.id),this.events.emit($l.deleted,s)}}),this.persist()},this.exists=async(r,i)=>(this.isInitialized(),this.records.has(i)?(await this.getRecord(i)).topic===r:!1),this.on=(r,i)=>{this.events.on(r,i)},this.once=(r,i)=>{this.events.once(r,i)},this.off=(r,i)=>{this.events.off(r,i)},this.removeListener=(r,i)=>{this.events.removeListener(r,i)},this.logger=qo(n,this.name)}get context(){return Ma(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(n=>{if(typeof n.response<"u")return;const r={topic:n.topic,request:Iy(n.request.method,n.request.params,n.id),chainId:n.chainId};return e.push(r)}),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 n=this.records.get(e);if(!n){const{message:r}=dt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(r)}return n}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit($l.sync)}async restore(){try{const e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){const{message:n}=dt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(n),new Error(n)}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($l.created,e=>{const n=$l.created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e})}),this.events.on($l.updated,e=>{const n=$l.updated;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e})}),this.events.on($l.deleted,e=>{const n=$l.deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e})}),this.core.heartbeat.on(E6.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(n=>{At.toMiliseconds(n.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${n.id}`),this.records.delete(n.id),this.events.emit($l.deleted,n,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=dt("NOT_INITIALIZED",this.name);throw new Error(e)}}};class B_e extends bxe{constructor(e,n){super(e,n),this.core=e,this.logger=n,this.expirations=new Map,this.events=new hc.EventEmitter,this.name=l_e,this.version=u_e,this.cached=[],this.initialized=!1,this.storagePrefix=m0,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(r=>this.expirations.set(r.target,r)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=r=>{try{const i=this.formatTarget(r);return typeof this.getExpiration(i)<"u"}catch{return!1}},this.set=(r,i)=>{this.isInitialized();const s=this.formatTarget(r),o={target:s,expiry:i};this.expirations.set(s,o),this.checkExpiry(s,o),this.events.emit(Kc.created,{target:s,expiration:o})},this.get=r=>{this.isInitialized();const i=this.formatTarget(r);return this.getExpiration(i)},this.del=r=>{if(this.isInitialized(),this.has(r)){const i=this.formatTarget(r),s=this.getExpiration(i);this.expirations.delete(i),this.events.emit(Kc.deleted,{target:i,expiration:s})}},this.on=(r,i)=>{this.events.on(r,i)},this.once=(r,i)=>{this.events.once(r,i)},this.off=(r,i)=>{this.events.off(r,i)},this.removeListener=(r,i)=>{this.events.removeListener(r,i)},this.logger=qo(n,this.name)}get context(){return Ma(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 sve(e);if(typeof e=="number")return ove(e);const{message:n}=dt("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw new Error(n)}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(Kc.sync)}async restore(){try{const e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){const{message:n}=dt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(n),new Error(n)}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 n=this.expirations.get(e);if(!n){const{message:r}=dt("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.warn(r),new Error(r)}return n}checkExpiry(e,n){const{expiry:r}=n;At.toMiliseconds(r)-Date.now()<=0&&this.expire(e,n)}expire(e,n){this.expirations.delete(e),this.events.emit(Kc.expired,{target:e,expiration:n})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,n)=>this.checkExpiry(n,e))}registerEventListeners(){this.core.heartbeat.on(E6.pulse,()=>this.checkExpirations()),this.events.on(Kc.created,e=>{const n=Kc.created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()}),this.events.on(Kc.expired,e=>{const n=Kc.expired;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()}),this.events.on(Kc.deleted,e=>{const n=Kc.deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=dt("NOT_INITIALIZED",this.name);throw new Error(e)}}}class $_e extends xxe{constructor(e,n){super(e,n),this.projectId=e,this.logger=n,this.name=GI,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async r=>{if(this.verifyDisabled||gb()||!wb())return;const i=this.getVerifyUrl(r==null?void 0:r.verifyUrl);this.verifyUrl!==i&&this.removeIframe(),this.verifyUrl=i;try{await this.createIframe()}catch(s){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(s),this.verifyDisabled=!0}},this.register=async r=>{this.initialized?this.sendPost(r.attestationId):(this.addToQueue(r.attestationId),await this.init())},this.resolve=async r=>{if(this.isDevEnv)return"";const i=this.getVerifyUrl(r==null?void 0:r.verifyUrl);return this.fetchAttestation(r.attestationId,i)},this.fetchAttestation=async(r,i)=>{this.logger.info(`resolving attestation: ${r} from url: ${i}`);const s=this.startAbortTimer(At.ONE_SECOND*5),o=await fetch(`${i}/attestation/${r}`,{signal:this.abortController.signal});return clearTimeout(s),o.status===200?await o.json():void 0},this.addToQueue=r=>{this.queue.push(r)},this.processQueue=()=>{this.queue.length!==0&&(this.queue.forEach(r=>this.sendPost(r)),this.queue=[])},this.sendPost=r=>{var i;try{if(!this.iframe)return;(i=this.iframe.contentWindow)==null||i.postMessage(r,"*"),this.logger.info(`postMessage sent: ${r} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let r;const i=s=>{s.data==="verify_ready"&&(this.onInit(),window.removeEventListener("message",i),r())};await Promise.race([new Promise(s=>{const o=document.getElementById(GI);if(o)return this.iframe=o,this.onInit(),s();window.addEventListener("message",i);const a=document.createElement("iframe");a.id=GI,a.src=`${this.verifyUrl}/${this.projectId}`,a.style.display="none",document.body.append(a),this.iframe=a,r=s}),new Promise((s,o)=>setTimeout(()=>{window.removeEventListener("message",i),o("verify iframe load timeout")},At.toMiliseconds(At.FIVE_SECONDS)))])},this.onInit=()=>{this.initialized=!0,this.processQueue()},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=r=>{let i=r||i3;return f_e.includes(i)||(this.logger.info(`verify url: ${i}, not included in trusted list, assigning default: ${i3}`),i=i3),i},this.logger=qo(n,this.name),this.verifyUrl=i3,this.abortController=new AbortController,this.isDevEnv=h5()&&f6e.IS_VITEST}get context(){return Ma(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),At.toMiliseconds(e))}}class j_e extends _xe{constructor(e,n){super(e,n),this.projectId=e,this.logger=n,this.context=h_e,this.registerDeviceToken=async r=>{const{clientId:i,token:s,notificationType:o,enableEncrypted:a=!1}=r,c=`${p_e}/${this.projectId}/clients`;await d6e(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:i,type:o,token:s,always_raw:a})})},this.logger=qo(n,this.context)}}var L_e=Object.defineProperty,pW=Object.getOwnPropertySymbols,U_e=Object.prototype.hasOwnProperty,F_e=Object.prototype.propertyIsEnumerable,mW=(t,e,n)=>e in t?L_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gW=(t,e)=>{for(var n in e||(e={}))U_e.call(e,n)&&mW(t,n,e[n]);if(pW)for(var n of pW(e))F_e.call(e,n)&&mW(t,n,e[n]);return t};class ZM extends hxe{constructor(e){var n;super(e),this.protocol=cX,this.version=$4e,this.name=QM,this.events=new hc.EventEmitter,this.initialized=!1,this.on=(o,a)=>this.events.on(o,a),this.once=(o,a)=>this.events.once(o,a),this.off=(o,a)=>this.events.off(o,a),this.removeListener=(o,a)=>this.events.removeListener(o,a),this.projectId=e==null?void 0:e.projectId,this.relayUrl=(e==null?void 0:e.relayUrl)||uX,this.customStoragePrefix=e!=null&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const r=T6({level:typeof(e==null?void 0:e.logger)=="string"&&e.logger?e.logger:j4e.logger}),{logger:i,chunkLoggerController:s}=FJ({opts:r,maxSizeInBytes:e==null?void 0:e.maxLogBlobSizeInBytes,loggerOverride:e==null?void 0:e.logger});this.logChunkController=s,(n=this.logChunkController)!=null&&n.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var o,a;(o=this.logChunkController)!=null&&o.downloadLogsBlobInBrowser&&((a=this.logChunkController)==null||a.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=qo(i,this.name),this.heartbeat=new L5e,this.crypto=new g_e(this,this.logger,e==null?void 0:e.keychain),this.history=new M_e(this,this.logger),this.expirer=new B_e(this,this.logger),this.storage=e!=null&&e.storage?e.storage:new $5e(gW(gW({},L4e),e==null?void 0:e.storageOptions)),this.relayer=new R_e({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new D_e(this,this.logger),this.verify=new $_e(this.projectId||"",this.logger),this.echoClient=new j_e(this.projectId||"",this.logger)}static async init(e){const n=new ZM(e);await n.initialize();const r=await n.crypto.getClientId();return await n.storage.setItem(t_e,r),n}get context(){return Ma(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return(e=this.logChunkController)==null?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}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 z_e=ZM,fX="wc",hX=2,pX="client",JM=`${fX}@${hX}:${pX}:`,YI={name:pX,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},wW="WALLETCONNECT_DEEPLINK_CHOICE",H_e="proposal",mX="Proposal expired",W_e="session",Cw=At.SEVEN_DAYS,V_e="engine",Us={wc_sessionPropose:{req:{ttl:At.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:At.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:At.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:At.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:At.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:At.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:At.ONE_DAY,prompt:!1,tag:1104},res:{ttl:At.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:At.ONE_DAY,prompt:!1,tag:1106},res:{ttl:At.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:At.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:At.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:At.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:At.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:At.ONE_DAY,prompt:!1,tag:1112},res:{ttl:At.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:At.ONE_DAY,prompt:!1,tag:1114},res:{ttl:At.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:At.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:At.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:At.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:At.FIVE_MINUTES,prompt:!1,tag:1119}}},QI={min:At.FIVE_MINUTES,max:At.SEVEN_DAYS},Bu={idle:"IDLE",active:"ACTIVE"},q_e="request",G_e=["wc_sessionPropose","wc_sessionRequest","wc_authRequest","wc_sessionAuthenticate"],K_e="wc",Y_e="auth",Q_e="authKeys",Z_e="pairingTopics",J_e="requests",LS=`${K_e}@${1.5}:${Y_e}:`,GA=`${LS}:PUB_KEY`;var X_e=Object.defineProperty,eAe=Object.defineProperties,tAe=Object.getOwnPropertyDescriptors,yW=Object.getOwnPropertySymbols,nAe=Object.prototype.hasOwnProperty,rAe=Object.prototype.propertyIsEnumerable,vW=(t,e,n)=>e in t?X_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cs=(t,e)=>{for(var n in e||(e={}))nAe.call(e,n)&&vW(t,n,e[n]);if(yW)for(var n of yW(e))rAe.call(e,n)&&vW(t,n,e[n]);return t},Sm=(t,e)=>eAe(t,tAe(e));let iAe=class extends Exe{constructor(e){super(e),this.name=V_e,this.events=new IM,this.initialized=!1,this.requestQueue={state:Bu.idle,queue:[]},this.sessionRequestQueue={state:Bu.idle,queue:[]},this.requestQueueDelay=At.ONE_SECOND,this.expectedPairingMethodMap=new Map,this.recentlyDeletedMap=new Map,this.recentlyDeletedLimit=200,this.relayMessageCache=[],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(Us)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},At.toMiliseconds(this.requestQueueDelay)))},this.connect=async n=>{await this.isInitialized();const r=Sm(cs({},n),{requiredNamespaces:n.requiredNamespaces||{},optionalNamespaces:n.optionalNamespaces||{}});await this.isValidConnect(r);const{pairingTopic:i,requiredNamespaces:s,optionalNamespaces:o,sessionProperties:a,relays:c}=r;let l=i,u,d=!1;try{l&&(d=this.client.core.pairing.pairings.get(l).active)}catch(D){throw this.client.logger.error(`connect() -> pairing.get(${l}) failed`),D}if(!l||!d){const{topic:D,uri:O}=await this.client.core.pairing.create();l=D,u=O}if(!l){const{message:D}=dt("NO_MATCHING_KEY",`connect() pairing topic: ${l}`);throw new Error(D)}const h=await this.client.core.crypto.generateKeyPair(),g=Us.wc_sessionPropose.req.ttl||At.FIVE_MINUTES,w=zs(g),v=cs({requiredNamespaces:s,optionalNamespaces:o,relays:c??[{protocol:lX}],proposer:{publicKey:h,metadata:this.client.metadata},expiryTimestamp:w,pairingTopic:l},a&&{sessionProperties:a}),{reject:_,resolve:T,done:b}=Dm(g,mX);this.events.once(Xn("session_connect"),async({error:D,session:O})=>{if(D)_(D);else if(O){O.self.publicKey=h;const $=Sm(cs({},O),{pairingTopic:v.pairingTopic,requiredNamespaces:v.requiredNamespaces,optionalNamespaces:v.optionalNamespaces});await this.client.session.set(O.topic,$),await this.setExpiry(O.topic,O.expiry),l&&await this.client.core.pairing.updateMetadata({topic:l,metadata:O.peer.metadata}),this.cleanupDuplicatePairings($),T($)}});const k=await this.sendRequest({topic:l,method:"wc_sessionPropose",params:v,throwOnFailedPublish:!0});return await this.setProposal(k,cs({id:k},v)),{uri:u,approval:b}},this.pair=async n=>{await this.isInitialized();try{return await this.client.core.pairing.pair(n)}catch(r){throw this.client.logger.error("pair() failed"),r}},this.approve=async n=>{await this.isInitialized();try{await this.isValidApprove(n)}catch(b){throw this.client.logger.error("approve() -> isValidApprove() failed"),b}const{id:r,relayProtocol:i,namespaces:s,sessionProperties:o,sessionConfig:a}=n;let c;try{c=this.client.proposal.get(r)}catch(b){throw this.client.logger.error(`approve() -> proposal.get(${r}) failed`),b}const{pairingTopic:l,proposer:u,requiredNamespaces:d,optionalNamespaces:h}=c,g=await this.client.core.crypto.generateKeyPair(),w=u.publicKey,v=await this.client.core.crypto.generateSharedKey(g,w),_=cs(cs({relay:{protocol:i??"irn"},namespaces:s,controller:{publicKey:g,metadata:this.client.metadata},expiry:zs(Cw)},o&&{sessionProperties:o}),a&&{sessionConfig:a});await this.client.core.relayer.subscribe(v);const T=Sm(cs({},_),{topic:v,requiredNamespaces:d,optionalNamespaces:h,pairingTopic:l,acknowledged:!1,self:_.controller,peer:{publicKey:u.publicKey,metadata:u.metadata},controller:g});await this.client.session.set(v,T);try{await this.sendResult({id:r,topic:l,result:{relay:{protocol:i??"irn"},responderPublicKey:g},throwOnFailedPublish:!0}),await this.sendRequest({topic:v,method:"wc_sessionSettle",params:_,throwOnFailedPublish:!0})}catch(b){throw this.client.logger.error(b),this.client.session.delete(v,Lr("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(v),b}return await this.client.core.pairing.updateMetadata({topic:l,metadata:u.metadata}),await this.client.proposal.delete(r,Lr("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:l}),await this.setExpiry(v,zs(Cw)),{topic:v,acknowledged:()=>new Promise(b=>setTimeout(()=>b(this.client.session.get(v)),500))}},this.reject=async n=>{await this.isInitialized();try{await this.isValidReject(n)}catch(o){throw this.client.logger.error("reject() -> isValidReject() failed"),o}const{id:r,reason:i}=n;let s;try{s=this.client.proposal.get(r).pairingTopic}catch(o){throw this.client.logger.error(`reject() -> proposal.get(${r}) failed`),o}s&&(await this.sendError({id:r,topic:s,error:i,rpcOpts:Us.wc_sessionPropose.reject}),await this.client.proposal.delete(r,Lr("USER_DISCONNECTED")))},this.update=async n=>{await this.isInitialized();try{await this.isValidUpdate(n)}catch(d){throw this.client.logger.error("update() -> isValidUpdate() failed"),d}const{topic:r,namespaces:i}=n,{done:s,resolve:o,reject:a}=Dm(),c=Ap(),l=qm().toString(),u=this.client.session.get(r).namespaces;return this.events.once(Xn("session_update",c),({error:d})=>{d?a(d):o()}),await this.client.session.update(r,{namespaces:i}),await this.sendRequest({topic:r,method:"wc_sessionUpdate",params:{namespaces:i},throwOnFailedPublish:!0,clientRpcId:c,relayRpcId:l}).catch(d=>{this.client.logger.error(d),this.client.session.update(r,{namespaces:u}),a(d)}),{acknowledged:s}},this.extend=async n=>{await this.isInitialized();try{await this.isValidExtend(n)}catch(c){throw this.client.logger.error("extend() -> isValidExtend() failed"),c}const{topic:r}=n,i=Ap(),{done:s,resolve:o,reject:a}=Dm();return this.events.once(Xn("session_extend",i),({error:c})=>{c?a(c):o()}),await this.setExpiry(r,zs(Cw)),this.sendRequest({topic:r,method:"wc_sessionExtend",params:{},clientRpcId:i,throwOnFailedPublish:!0}).catch(c=>{a(c)}),{acknowledged:s}},this.request=async n=>{await this.isInitialized();try{await this.isValidRequest(n)}catch(g){throw this.client.logger.error("request() -> isValidRequest() failed"),g}const{chainId:r,request:i,topic:s,expiry:o=Us.wc_sessionRequest.req.ttl}=n,a=this.client.session.get(s),c=Ap(),l=qm().toString(),{done:u,resolve:d,reject:h}=Dm(o,"Request expired. Please try again.");return this.events.once(Xn("session_request",c),({error:g,result:w})=>{g?h(g):d(w)}),await Promise.all([new Promise(async g=>{await this.sendRequest({clientRpcId:c,relayRpcId:l,topic:s,method:"wc_sessionRequest",params:{request:Sm(cs({},i),{expiryTimestamp:zs(o)}),chainId:r},expiry:o,throwOnFailedPublish:!0}).catch(w=>h(w)),this.client.events.emit("session_request_sent",{topic:s,request:i,chainId:r,id:c}),g()}),new Promise(async g=>{var w;if(!((w=a.sessionConfig)!=null&&w.disableDeepLink)){const v=await cve(this.client.core.storage,wW);ave({id:c,topic:s,wcDeepLink:v})}g()}),u()]).then(g=>g[2])},this.respond=async n=>{await this.isInitialized(),await this.isValidRespond(n);const{topic:r,response:i}=n,{id:s}=i;zu(i)?await this.sendResult({id:s,topic:r,result:i.result,throwOnFailedPublish:!0}):Xc(i)&&await this.sendError({id:s,topic:r,error:i.error}),this.cleanupAfterResponse(n)},this.ping=async n=>{await this.isInitialized();try{await this.isValidPing(n)}catch(i){throw this.client.logger.error("ping() -> isValidPing() failed"),i}const{topic:r}=n;if(this.client.session.keys.includes(r)){const i=Ap(),s=qm().toString(),{done:o,resolve:a,reject:c}=Dm();this.events.once(Xn("session_ping",i),({error:l})=>{l?c(l):a()}),await Promise.all([this.sendRequest({topic:r,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:i,relayRpcId:s}),o()])}else this.client.core.pairing.pairings.keys.includes(r)&&await this.client.core.pairing.ping({topic:r})},this.emit=async n=>{await this.isInitialized(),await this.isValidEmit(n);const{topic:r,event:i,chainId:s}=n,o=qm().toString();await this.sendRequest({topic:r,method:"wc_sessionEvent",params:{event:i,chainId:s},throwOnFailedPublish:!0,relayRpcId:o})},this.disconnect=async n=>{await this.isInitialized(),await this.isValidDisconnect(n);const{topic:r}=n;if(this.client.session.keys.includes(r))await this.sendRequest({topic:r,method:"wc_sessionDelete",params:Lr("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:r,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(r))await this.client.core.pairing.disconnect({topic:r});else{const{message:i}=dt("MISMATCHED_TOPIC",`Session or pairing topic not found: ${r}`);throw new Error(i)}},this.find=n=>(this.isInitialized(),this.client.session.getAll().filter(r=>N3e(r,n))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.authenticate=async n=>{this.isInitialized(),this.isValidAuthenticate(n);const{chains:r,statement:i="",uri:s,domain:o,nonce:a,type:c,exp:l,nbf:u,methods:d=[],expiry:h}=n,g=[...n.resources||[]],{topic:w,uri:v}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"]});this.client.logger.info({message:"Generated new pairing",pairing:{topic:w,uri:v}});const _=await this.client.core.crypto.generateKeyPair(),T=WA(_);if(await Promise.all([this.client.auth.authKeys.set(GA,{responseTopic:T,publicKey:_}),this.client.auth.pairingTopics.set(T,{topic:T,pairingTopic:w})]),await this.client.core.relayer.subscribe(T),this.client.logger.info(`sending request to new pairing topic: ${w}`),d.length>0){const{namespace:x}=I3(r[0]);let E=t3e(x,"request",d);HA(g)&&(E=r3e(E,g.pop())),g.push(E)}const b=h&&h>Us.wc_sessionAuthenticate.req.ttl?h:Us.wc_sessionAuthenticate.req.ttl,k={authPayload:{type:c??"caip122",chains:r,statement:i,aud:s,domain:o,version:"1",nonce:a,iat:new Date().toISOString(),exp:l,nbf:u,resources:g},requester:{publicKey:_,metadata:this.client.metadata},expiryTimestamp:zs(b)},D={eip155:{chains:r,methods:[...new Set(["personal_sign",...d])],events:["chainChanged","accountsChanged"]}},O={requiredNamespaces:{},optionalNamespaces:D,relays:[{protocol:"irn"}],pairingTopic:w,proposer:{publicKey:_,metadata:this.client.metadata},expiryTimestamp:zs(Us.wc_sessionPropose.req.ttl)},{done:$,resolve:C,reject:A}=Dm(b,"Request expired"),H=async({error:x,session:E})=>{if(this.events.off(Xn("session_request",Y),V),x)A(x);else if(E){E.self.publicKey=_,await this.client.session.set(E.topic,E),await this.setExpiry(E.topic,E.expiry),w&&await this.client.core.pairing.updateMetadata({topic:w,metadata:E.peer.metadata});const y=this.client.session.get(E.topic);await this.deleteProposal(ee),C({session:y})}},V=async x=>{if(await this.deletePendingAuthRequest(Y,{message:"fulfilled",code:0}),x.error){const z=Lr("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return x.error.code===z.code?void 0:(this.events.off(Xn("session_connect"),H),A(x.error.message))}await this.deleteProposal(ee),this.events.off(Xn("session_connect"),H);const{cacaos:E,responder:y}=x.result,I=[],B=[];for(const z of E){await bH({cacao:z,projectId:this.client.core.projectId})||(this.client.logger.error(z,"Signature verification failed"),A(Lr("SESSION_SETTLEMENT_FAILED","Signature verification failed")));const{p:P}=z,Z=HA(P.resources),he=[vH(P.iss)],ve=KE(P.iss);if(Z){const j=xH(Z),ge=_H(Z);I.push(...j),he.push(...ge)}for(const j of he)B.push(`${j}:${ve}`)}const M=await this.client.core.crypto.generateSharedKey(_,y.publicKey);let W;I.length>0&&(W={topic:M,acknowledged:!0,self:{publicKey:_,metadata:this.client.metadata},peer:y,controller:y.publicKey,expiry:zs(Cw),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:w,namespaces:kH([...new Set(I)],[...new Set(B)])},await this.client.core.relayer.subscribe(M),await this.client.session.set(M,W),w&&await this.client.core.pairing.updateMetadata({topic:w,metadata:y.metadata}),W=this.client.session.get(M)),C({auths:E,session:W})},Y=Ap(),ee=Ap();this.events.once(Xn("session_connect"),H),this.events.once(Xn("session_request",Y),V);try{await Promise.all([this.sendRequest({topic:w,method:"wc_sessionAuthenticate",params:k,expiry:n.expiry,throwOnFailedPublish:!0,clientRpcId:Y}),this.sendRequest({topic:w,method:"wc_sessionPropose",params:O,expiry:Us.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:ee})])}catch(x){throw this.events.off(Xn("session_connect"),H),this.events.off(Xn("session_request",Y),V),x}return await this.setProposal(ee,cs({id:ee},O)),await this.setAuthRequest(Y,{request:Sm(cs({},k),{verifyContext:{}}),pairingTopic:w}),{uri:v,response:$}},this.approveSessionAuthenticate=async n=>{this.isInitialized();const{id:r,auths:i}=n,s=this.getPendingAuthRequest(r);if(!s)throw new Error(`Could not find pending auth request with id ${r}`);const o=s.requester.publicKey,a=await this.client.core.crypto.generateKeyPair(),c=WA(o),l={type:Zf,receiverPublicKey:o,senderPublicKey:a},u=[],d=[];for(const w of i){if(!await bH({cacao:w,projectId:this.client.core.projectId})){const k=Lr("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:r,topic:c,error:k,encodeOpts:l}),new Error(k.message)}const{p:v}=w,_=HA(v.resources),T=[vH(v.iss)],b=KE(v.iss);if(_){const k=xH(_),D=_H(_);u.push(...k),T.push(...D)}for(const k of T)d.push(`${k}:${b}`)}const h=await this.client.core.crypto.generateSharedKey(a,o);let g;return(u==null?void 0:u.length)>0&&(g={topic:h,acknowledged:!0,self:{publicKey:a,metadata:this.client.metadata},peer:{publicKey:o,metadata:s.requester.metadata},controller:o,expiry:zs(Cw),authentication:i,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:s.pairingTopic,namespaces:kH([...new Set(u)],[...new Set(d)])},await this.client.core.relayer.subscribe(h),await this.client.session.set(h,g),await this.client.core.pairing.updateMetadata({topic:s.pairingTopic,metadata:s.requester.metadata})),await this.sendResult({topic:c,id:r,result:{cacaos:i,responder:{publicKey:a,metadata:this.client.metadata}},encodeOpts:l,throwOnFailedPublish:!0}),await this.client.auth.requests.delete(r,{message:"fulfilled",code:0}),await this.client.core.pairing.activate({topic:s.pairingTopic}),{session:g}},this.rejectSessionAuthenticate=async n=>{await this.isInitialized();const{id:r,reason:i}=n,s=this.getPendingAuthRequest(r);if(!s)throw new Error(`Could not find pending auth request with id ${r}`);const o=s.requester.publicKey,a=await this.client.core.crypto.generateKeyPair(),c=WA(o),l={type:Zf,receiverPublicKey:o,senderPublicKey:a};await this.sendError({id:r,topic:c,error:i,encodeOpts:l,rpcOpts:Us.wc_sessionAuthenticate.reject}),await this.client.auth.requests.delete(r,{message:"rejected",code:0}),await this.client.proposal.delete(r,Lr("USER_DISCONNECTED"))},this.formatAuthMessage=n=>{this.isInitialized();const{request:r,iss:i}=n;return IJ(r,i)},this.processRelayMessageCache=()=>{setTimeout(async()=>{if(this.relayMessageCache.length!==0)for(;this.relayMessageCache.length>0;)try{const n=this.relayMessageCache.shift();n&&await this.onRelayMessage(n)}catch(n){this.client.logger.error(n)}},50)},this.cleanupDuplicatePairings=async n=>{if(n.pairingTopic)try{const r=this.client.core.pairing.pairings.get(n.pairingTopic),i=this.client.core.pairing.pairings.getAll().filter(s=>{var o,a;return((o=s.peerMetadata)==null?void 0:o.url)&&((a=s.peerMetadata)==null?void 0:a.url)===n.peer.metadata.url&&s.topic&&s.topic!==r.topic});if(i.length===0)return;this.client.logger.info(`Cleaning up ${i.length} duplicate pairing(s)`),await Promise.all(i.map(s=>this.client.core.pairing.disconnect({topic:s.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(r){this.client.logger.error(r)}},this.deleteSession=async n=>{var r;const{topic:i,expirerHasDeleted:s=!1,emitEvent:o=!0,id:a=0}=n,{self:c}=this.client.session.get(i);await this.client.core.relayer.unsubscribe(i),await this.client.session.delete(i,Lr("USER_DISCONNECTED")),this.addToRecentlyDeleted(i,"session"),this.client.core.crypto.keychain.has(c.publicKey)&&await this.client.core.crypto.deleteKeyPair(c.publicKey),this.client.core.crypto.keychain.has(i)&&await this.client.core.crypto.deleteSymKey(i),s||this.client.core.expirer.del(i),this.client.core.storage.removeItem(wW).catch(l=>this.client.logger.warn(l)),this.getPendingSessionRequests().forEach(l=>{l.topic===i&&this.deletePendingSessionRequest(l.id,Lr("USER_DISCONNECTED"))}),i===((r=this.sessionRequestQueue.queue[0])==null?void 0:r.topic)&&(this.sessionRequestQueue.state=Bu.idle),o&&this.client.events.emit("session_delete",{id:a,topic:i})},this.deleteProposal=async(n,r)=>{await Promise.all([this.client.proposal.delete(n,Lr("USER_DISCONNECTED")),r?Promise.resolve():this.client.core.expirer.del(n)]),this.addToRecentlyDeleted(n,"proposal")},this.deletePendingSessionRequest=async(n,r,i=!1)=>{await Promise.all([this.client.pendingRequest.delete(n,r),i?Promise.resolve():this.client.core.expirer.del(n)]),this.addToRecentlyDeleted(n,"request"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(s=>s.id!==n),i&&(this.sessionRequestQueue.state=Bu.idle,this.client.events.emit("session_request_expire",{id:n}))},this.deletePendingAuthRequest=async(n,r,i=!1)=>{await Promise.all([this.client.auth.requests.delete(n,r),i?Promise.resolve():this.client.core.expirer.del(n)])},this.setExpiry=async(n,r)=>{this.client.session.keys.includes(n)&&(this.client.core.expirer.set(n,r),await this.client.session.update(n,{expiry:r}))},this.setProposal=async(n,r)=>{this.client.core.expirer.set(n,zs(Us.wc_sessionPropose.req.ttl)),await this.client.proposal.set(n,r)},this.setAuthRequest=async(n,r)=>{const{request:i,pairingTopic:s}=r;this.client.core.expirer.set(n,i.expiryTimestamp),await this.client.auth.requests.set(n,{authPayload:i.authPayload,requester:i.requester,expiryTimestamp:i.expiryTimestamp,id:n,pairingTopic:s,verifyContext:i.verifyContext})},this.setPendingSessionRequest=async n=>{const{id:r,topic:i,params:s,verifyContext:o}=n,a=s.request.expiryTimestamp||zs(Us.wc_sessionRequest.req.ttl);this.client.core.expirer.set(r,a),await this.client.pendingRequest.set(r,{id:r,topic:i,params:s,verifyContext:o})},this.sendRequest=async n=>{const{topic:r,method:i,params:s,expiry:o,relayRpcId:a,clientRpcId:c,throwOnFailedPublish:l}=n,u=Iy(i,s,c);if(wb()&&G_e.includes(i)){const g=Vm(JSON.stringify(u));this.client.core.verify.register({attestationId:g})}let d;try{d=await this.client.core.crypto.encode(r,u)}catch(g){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${r} failed`),g}const h=Us[i].req;return o&&(h.ttl=o),a&&(h.id=a),this.client.core.history.set(r,u),l?(h.internal=Sm(cs({},h.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(r,d,h)):this.client.core.relayer.publish(r,d,h).catch(g=>this.client.logger.error(g)),u.id},this.sendResult=async n=>{const{id:r,topic:i,result:s,throwOnFailedPublish:o,encodeOpts:a}=n,c=MS(r,s);let l;try{l=await this.client.core.crypto.encode(i,c,a)}catch(h){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${i} failed`),h}let u;try{u=await this.client.core.history.get(i,r)}catch(h){throw this.client.logger.error(`sendResult() -> history.get(${i}, ${r}) failed`),h}const d=Us[u.request.method].res;o?(d.internal=Sm(cs({},d.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,l,d)):this.client.core.relayer.publish(i,l,d).catch(h=>this.client.logger.error(h)),await this.client.core.history.resolve(c)},this.sendError=async n=>{const{id:r,topic:i,error:s,encodeOpts:o,rpcOpts:a}=n,c=BS(r,s);let l;try{l=await this.client.core.crypto.encode(i,c,o)}catch(h){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${i} failed`),h}let u;try{u=await this.client.core.history.get(i,r)}catch(h){throw this.client.logger.error(`sendError() -> history.get(${i}, ${r}) failed`),h}const d=a||Us[u.request.method].res;this.client.core.relayer.publish(i,l,d),await this.client.core.history.resolve(c)},this.cleanup=async()=>{const n=[],r=[];this.client.session.getAll().forEach(i=>{let s=!1;xp(i.expiry)&&(s=!0),this.client.core.crypto.keychain.has(i.topic)||(s=!0),s&&n.push(i.topic)}),this.client.proposal.getAll().forEach(i=>{xp(i.expiryTimestamp)&&r.push(i.id)}),await Promise.all([...n.map(i=>this.deleteSession({topic:i})),...r.map(i=>this.deleteProposal(i))])},this.onRelayEventRequest=async n=>{this.requestQueue.queue.push(n),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===Bu.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=Bu.active;const n=this.requestQueue.queue.shift();if(n)try{await this.processRequest(n)}catch(r){this.client.logger.warn(r)}}this.requestQueue.state=Bu.idle},this.processRequest=async n=>{const{topic:r,payload:i}=n,s=i.method;if(!this.shouldIgnorePairingRequest({topic:r,requestMethod:s}))switch(s){case"wc_sessionPropose":return await this.onSessionProposeRequest(r,i);case"wc_sessionSettle":return await this.onSessionSettleRequest(r,i);case"wc_sessionUpdate":return await this.onSessionUpdateRequest(r,i);case"wc_sessionExtend":return await this.onSessionExtendRequest(r,i);case"wc_sessionPing":return await this.onSessionPingRequest(r,i);case"wc_sessionDelete":return await this.onSessionDeleteRequest(r,i);case"wc_sessionRequest":return await this.onSessionRequest(r,i);case"wc_sessionEvent":return await this.onSessionEventRequest(r,i);case"wc_sessionAuthenticate":return await this.onSessionAuthenticateRequest(r,i);default:return this.client.logger.info(`Unsupported request method ${s}`)}},this.onRelayEventResponse=async n=>{const{topic:r,payload:i}=n,s=(await this.client.core.history.get(r,i.id)).request.method;switch(s){case"wc_sessionPropose":return this.onSessionProposeResponse(r,i);case"wc_sessionSettle":return this.onSessionSettleResponse(r,i);case"wc_sessionUpdate":return this.onSessionUpdateResponse(r,i);case"wc_sessionExtend":return this.onSessionExtendResponse(r,i);case"wc_sessionPing":return this.onSessionPingResponse(r,i);case"wc_sessionRequest":return this.onSessionRequestResponse(r,i);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(r,i);default:return this.client.logger.info(`Unsupported response method ${s}`)}},this.onRelayEventUnknownPayload=n=>{const{topic:r}=n,{message:i}=dt("MISSING_OR_INVALID",`Decoded payload on topic ${r} is not identifiable as a JSON-RPC request or a response.`);throw new Error(i)},this.shouldIgnorePairingRequest=n=>{const{topic:r,requestMethod:i}=n,s=this.expectedPairingMethodMap.get(r);return!s||s.includes(i)?!1:!!(s.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)},this.onSessionProposeRequest=async(n,r)=>{const{params:i,id:s}=r;try{this.isValidConnect(cs({},r.params));const o=i.expiryTimestamp||zs(Us.wc_sessionPropose.req.ttl),a=cs({id:s,pairingTopic:n,expiryTimestamp:o},i);await this.setProposal(s,a);const c=Vm(JSON.stringify(r)),l=await this.getVerifyContext(c,a.proposer.metadata);this.client.events.emit("session_proposal",{id:s,params:a,verifyContext:l})}catch(o){await this.sendError({id:s,topic:n,error:o,rpcOpts:Us.wc_sessionPropose.autoReject}),this.client.logger.error(o)}},this.onSessionProposeResponse=async(n,r)=>{const{id:i}=r;if(zu(r)){const{result:s}=r;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:s});const o=this.client.proposal.get(i);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:o});const a=o.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:a});const c=s.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:c});const l=await this.client.core.crypto.generateSharedKey(a,c);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:l});const u=await this.client.core.relayer.subscribe(l);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:u}),await this.client.core.pairing.activate({topic:n})}else if(Xc(r)){await this.client.proposal.delete(i,Lr("USER_DISCONNECTED"));const s=Xn("session_connect");if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners, 954`);this.events.emit(Xn("session_connect"),{error:r.error})}},this.onSessionSettleRequest=async(n,r)=>{const{id:i,params:s}=r;try{this.isValidSessionSettleRequest(s);const{relay:o,controller:a,expiry:c,namespaces:l,sessionProperties:u,sessionConfig:d}=r.params,h=cs(cs({topic:n,relay:o,expiry:c,namespaces:l,acknowledged:!0,pairingTopic:"",requiredNamespaces:{},optionalNamespaces:{},controller:a.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:a.publicKey,metadata:a.metadata}},u&&{sessionProperties:u}),d&&{sessionConfig:d});await this.sendResult({id:r.id,topic:n,result:!0,throwOnFailedPublish:!0});const g=Xn("session_connect");if(this.events.listenerCount(g)===0)throw new Error(`emitting ${g} without any listeners 997`);this.events.emit(Xn("session_connect"),{session:h})}catch(o){await this.sendError({id:i,topic:n,error:o}),this.client.logger.error(o)}},this.onSessionSettleResponse=async(n,r)=>{const{id:i}=r;zu(r)?(await this.client.session.update(n,{acknowledged:!0}),this.events.emit(Xn("session_approve",i),{})):Xc(r)&&(await this.client.session.delete(n,Lr("USER_DISCONNECTED")),this.events.emit(Xn("session_approve",i),{error:r.error}))},this.onSessionUpdateRequest=async(n,r)=>{const{params:i,id:s}=r;try{const o=`${n}_session_update`,a=D2.get(o);if(a&&this.isRequestOutOfSync(a,s)){this.client.logger.info(`Discarding out of sync request - ${s}`),this.sendError({id:s,topic:n,error:Lr("INVALID_UPDATE_REQUEST")});return}this.isValidUpdate(cs({topic:n},i));try{D2.set(o,s),await this.client.session.update(n,{namespaces:i.namespaces}),await this.sendResult({id:s,topic:n,result:!0,throwOnFailedPublish:!0})}catch(c){throw D2.delete(o),c}this.client.events.emit("session_update",{id:s,topic:n,params:i})}catch(o){await this.sendError({id:s,topic:n,error:o}),this.client.logger.error(o)}},this.isRequestOutOfSync=(n,r)=>parseInt(r.toString().slice(0,-3))<=parseInt(n.toString().slice(0,-3)),this.onSessionUpdateResponse=(n,r)=>{const{id:i}=r,s=Xn("session_update",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);zu(r)?this.events.emit(Xn("session_update",i),{}):Xc(r)&&this.events.emit(Xn("session_update",i),{error:r.error})},this.onSessionExtendRequest=async(n,r)=>{const{id:i}=r;try{this.isValidExtend({topic:n}),await this.setExpiry(n,zs(Cw)),await this.sendResult({id:i,topic:n,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_extend",{id:i,topic:n})}catch(s){await this.sendError({id:i,topic:n,error:s}),this.client.logger.error(s)}},this.onSessionExtendResponse=(n,r)=>{const{id:i}=r,s=Xn("session_extend",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);zu(r)?this.events.emit(Xn("session_extend",i),{}):Xc(r)&&this.events.emit(Xn("session_extend",i),{error:r.error})},this.onSessionPingRequest=async(n,r)=>{const{id:i}=r;try{this.isValidPing({topic:n}),await this.sendResult({id:i,topic:n,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:i,topic:n})}catch(s){await this.sendError({id:i,topic:n,error:s}),this.client.logger.error(s)}},this.onSessionPingResponse=(n,r)=>{const{id:i}=r,s=Xn("session_ping",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);setTimeout(()=>{zu(r)?this.events.emit(Xn("session_ping",i),{}):Xc(r)&&this.events.emit(Xn("session_ping",i),{error:r.error})},500)},this.onSessionDeleteRequest=async(n,r)=>{const{id:i}=r;try{this.isValidDisconnect({topic:n,reason:r.params}),await Promise.all([new Promise(s=>{this.client.core.relayer.once(ga.publish,async()=>{s(await this.deleteSession({topic:n,id:i}))})}),this.sendResult({id:i,topic:n,result:!0,throwOnFailedPublish:!0}),this.cleanupPendingSentRequestsForTopic({topic:n,error:Lr("USER_DISCONNECTED")})])}catch(s){this.client.logger.error(s)}},this.onSessionRequest=async(n,r)=>{var i;const{id:s,params:o}=r;try{await this.isValidRequest(cs({topic:n},o));const a=Vm(JSON.stringify(Iy("wc_sessionRequest",o,s))),c=this.client.session.get(n),l=await this.getVerifyContext(a,c.peer.metadata),u={id:s,topic:n,params:o,verifyContext:l};await this.setPendingSessionRequest(u),(i=this.client.signConfig)!=null&&i.disableRequestQueue?this.emitSessionRequest(u):(this.addSessionRequestToSessionRequestQueue(u),this.processSessionRequestQueue())}catch(a){await this.sendError({id:s,topic:n,error:a}),this.client.logger.error(a)}},this.onSessionRequestResponse=(n,r)=>{const{id:i}=r,s=Xn("session_request",i);if(this.events.listenerCount(s)===0)throw new Error(`emitting ${s} without any listeners`);zu(r)?this.events.emit(Xn("session_request",i),{result:r.result}):Xc(r)&&this.events.emit(Xn("session_request",i),{error:r.error})},this.onSessionEventRequest=async(n,r)=>{const{id:i,params:s}=r;try{const o=`${n}_session_event_${s.event.name}`,a=D2.get(o);if(a&&this.isRequestOutOfSync(a,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidEmit(cs({topic:n},s)),this.client.events.emit("session_event",{id:i,topic:n,params:s}),D2.set(o,i)}catch(o){await this.sendError({id:i,topic:n,error:o}),this.client.logger.error(o)}},this.onSessionAuthenticateResponse=(n,r)=>{const{id:i}=r;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:n,payload:r}),zu(r)?this.events.emit(Xn("session_request",i),{result:r.result}):Xc(r)&&this.events.emit(Xn("session_request",i),{error:r.error})},this.onSessionAuthenticateRequest=async(n,r)=>{try{const{requester:i,authPayload:s,expiryTimestamp:o}=r.params,a=Vm(JSON.stringify(r)),c=await this.getVerifyContext(a,this.client.metadata),l={requester:i,pairingTopic:n,id:r.id,authPayload:s,verifyContext:c,expiryTimestamp:o};await this.setAuthRequest(r.id,{request:l,pairingTopic:n}),this.client.events.emit("session_authenticate",{topic:n,params:r.params,id:r.id,verifyContext:c})}catch(i){this.client.logger.error(i);const s=r.params.requester.publicKey,o=await this.client.core.crypto.generateKeyPair(),a={type:Zf,receiverPublicKey:s,senderPublicKey:o};await this.sendError({id:r.id,topic:n,error:i,encodeOpts:a,rpcOpts:Us.wc_sessionAuthenticate.autoReject})}},this.addSessionRequestToSessionRequestQueue=n=>{this.sessionRequestQueue.queue.push(n)},this.cleanupAfterResponse=n=>{this.deletePendingSessionRequest(n.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=Bu.idle,this.processSessionRequestQueue()},At.toMiliseconds(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:n,error:r})=>{const i=this.client.core.history.pending;i.length>0&&i.filter(s=>s.topic===n&&s.request.method==="wc_sessionRequest").forEach(s=>{const o=s.request.id,a=Xn("session_request",o);if(this.events.listenerCount(a)===0)throw new Error(`emitting ${a} without any listeners`);this.events.emit(Xn("session_request",s.request.id),{error:r})})},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===Bu.active){this.client.logger.info("session request queue is already active.");return}const n=this.sessionRequestQueue.queue[0];if(!n){this.client.logger.info("session request queue is empty.");return}try{this.sessionRequestQueue.state=Bu.active,this.emitSessionRequest(n)}catch(r){this.client.logger.error(r)}},this.emitSessionRequest=n=>{this.client.events.emit("session_request",n)},this.onPairingCreated=n=>{if(n.methods&&this.expectedPairingMethodMap.set(n.topic,n.methods),n.active)return;const r=this.client.proposal.getAll().find(i=>i.pairingTopic===n.topic);r&&this.onSessionProposeRequest(n.topic,Iy("wc_sessionPropose",{requiredNamespaces:r.requiredNamespaces,optionalNamespaces:r.optionalNamespaces,relays:r.relays,proposer:r.proposer,sessionProperties:r.sessionProperties},r.id))},this.isValidConnect=async n=>{if(!aa(n)){const{message:c}=dt("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(n)}`);throw new Error(c)}const{pairingTopic:r,requiredNamespaces:i,optionalNamespaces:s,sessionProperties:o,relays:a}=n;if(ma(r)||await this.isValidPairingTopic(r),!H3e(a)){const{message:c}=dt("MISSING_OR_INVALID",`connect() relays: ${a}`);throw new Error(c)}!ma(i)&&g5(i)!==0&&this.validateNamespaces(i,"requiredNamespaces"),!ma(s)&&g5(s)!==0&&this.validateNamespaces(s,"optionalNamespaces"),ma(o)||this.validateSessionProps(o,"sessionProperties")},this.validateNamespaces=(n,r)=>{const i=z3e(n,"connect()",r);if(i)throw new Error(i.message)},this.isValidApprove=async n=>{if(!aa(n))throw new Error(dt("MISSING_OR_INVALID",`approve() params: ${n}`).message);const{id:r,namespaces:i,relayProtocol:s,sessionProperties:o}=n;this.checkRecentlyDeleted(r),await this.isValidProposalId(r);const a=this.client.proposal.get(r),c=FI(i,"approve()");if(c)throw new Error(c.message);const l=PH(a.requiredNamespaces,i,"approve()");if(l)throw new Error(l.message);if(!Gi(s,!0)){const{message:u}=dt("MISSING_OR_INVALID",`approve() relayProtocol: ${s}`);throw new Error(u)}ma(o)||this.validateSessionProps(o,"sessionProperties")},this.isValidReject=async n=>{if(!aa(n)){const{message:s}=dt("MISSING_OR_INVALID",`reject() params: ${n}`);throw new Error(s)}const{id:r,reason:i}=n;if(this.checkRecentlyDeleted(r),await this.isValidProposalId(r),!V3e(i)){const{message:s}=dt("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(i)}`);throw new Error(s)}},this.isValidSessionSettleRequest=n=>{if(!aa(n)){const{message:l}=dt("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${n}`);throw new Error(l)}const{relay:r,controller:i,namespaces:s,expiry:o}=n;if(!DJ(r)){const{message:l}=dt("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(l)}const a=B3e(i,"onSessionSettleRequest()");if(a)throw new Error(a.message);const c=FI(s,"onSessionSettleRequest()");if(c)throw new Error(c.message);if(xp(o)){const{message:l}=dt("EXPIRED","onSessionSettleRequest()");throw new Error(l)}},this.isValidUpdate=async n=>{if(!aa(n)){const{message:c}=dt("MISSING_OR_INVALID",`update() params: ${n}`);throw new Error(c)}const{topic:r,namespaces:i}=n;this.checkRecentlyDeleted(r),await this.isValidSessionTopic(r);const s=this.client.session.get(r),o=FI(i,"update()");if(o)throw new Error(o.message);const a=PH(s.requiredNamespaces,i,"update()");if(a)throw new Error(a.message)},this.isValidExtend=async n=>{if(!aa(n)){const{message:i}=dt("MISSING_OR_INVALID",`extend() params: ${n}`);throw new Error(i)}const{topic:r}=n;this.checkRecentlyDeleted(r),await this.isValidSessionTopic(r)},this.isValidRequest=async n=>{if(!aa(n)){const{message:c}=dt("MISSING_OR_INVALID",`request() params: ${n}`);throw new Error(c)}const{topic:r,request:i,chainId:s,expiry:o}=n;this.checkRecentlyDeleted(r),await this.isValidSessionTopic(r);const{namespaces:a}=this.client.session.get(r);if(!NH(a,s)){const{message:c}=dt("MISSING_OR_INVALID",`request() chainId: ${s}`);throw new Error(c)}if(!q3e(i)){const{message:c}=dt("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw new Error(c)}if(!Y3e(a,s,i.method)){const{message:c}=dt("MISSING_OR_INVALID",`request() method: ${i.method}`);throw new Error(c)}if(o&&!X3e(o,QI)){const{message:c}=dt("MISSING_OR_INVALID",`request() expiry: ${o}. Expiry must be a number (in seconds) between ${QI.min} and ${QI.max}`);throw new Error(c)}},this.isValidRespond=async n=>{var r;if(!aa(n)){const{message:o}=dt("MISSING_OR_INVALID",`respond() params: ${n}`);throw new Error(o)}const{topic:i,response:s}=n;try{await this.isValidSessionTopic(i)}catch(o){throw(r=n==null?void 0:n.response)!=null&&r.id&&this.cleanupAfterResponse(n),o}if(!G3e(s)){const{message:o}=dt("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(s)}`);throw new Error(o)}},this.isValidPing=async n=>{if(!aa(n)){const{message:i}=dt("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(i)}const{topic:r}=n;await this.isValidSessionOrPairingTopic(r)},this.isValidEmit=async n=>{if(!aa(n)){const{message:a}=dt("MISSING_OR_INVALID",`emit() params: ${n}`);throw new Error(a)}const{topic:r,event:i,chainId:s}=n;await this.isValidSessionTopic(r);const{namespaces:o}=this.client.session.get(r);if(!NH(o,s)){const{message:a}=dt("MISSING_OR_INVALID",`emit() chainId: ${s}`);throw new Error(a)}if(!K3e(i)){const{message:a}=dt("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}if(!Q3e(o,s,i.name)){const{message:a}=dt("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw new Error(a)}},this.isValidDisconnect=async n=>{if(!aa(n)){const{message:i}=dt("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(i)}const{topic:r}=n;await this.isValidSessionOrPairingTopic(r)},this.isValidAuthenticate=n=>{const{chains:r,uri:i,domain:s,nonce:o}=n;if(!Array.isArray(r)||r.length===0)throw new Error("chains is required and must be a non-empty array");if(!Gi(i,!1))throw new Error("uri is required parameter");if(!Gi(s,!1))throw new Error("domain is required parameter");if(!Gi(o,!1))throw new Error("nonce is required parameter");if([...new Set(r.map(c=>I3(c).namespace))].length>1)throw new Error("Multi-namespace requests are not supported. Please request single namespace only.");const{namespace:a}=I3(r[0]);if(a!=="eip155")throw new Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")},this.getVerifyContext=async(n,r)=>{const i={verified:{verifyUrl:r.verifyUrl||i3,validation:"UNKNOWN",origin:r.url||""}};try{const s=await this.client.core.verify.resolve({attestationId:n,verifyUrl:r.verifyUrl});s&&(i.verified.origin=s.origin,i.verified.isScam=s.isScam,i.verified.validation=s.origin===new URL(r.url).origin?"VALID":"INVALID")}catch(s){this.client.logger.info(s)}return this.client.logger.info(`Verify context: ${JSON.stringify(i)}`),i},this.validateSessionProps=(n,r)=>{Object.values(n).forEach(i=>{if(!Gi(i,!1)){const{message:s}=dt("MISSING_OR_INVALID",`${r} must be in Record<string, string> format. Received: ${JSON.stringify(i)}`);throw new Error(s)}})},this.getPendingAuthRequest=n=>{const r=this.client.auth.requests.get(n);return typeof r=="object"?r:void 0},this.addToRecentlyDeleted=(n,r)=>{if(this.recentlyDeletedMap.set(n,r),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let i=0;const s=this.recentlyDeletedLimit/2;for(const o of this.recentlyDeletedMap.keys()){if(i++>=s)break;this.recentlyDeletedMap.delete(o)}}},this.checkRecentlyDeleted=n=>{const r=this.recentlyDeletedMap.get(n);if(r){const{message:i}=dt("MISSING_OR_INVALID",`Record was recently deleted - ${r}: ${n}`);throw new Error(i)}}}async isInitialized(){if(!this.initialized){const{message:e}=dt("NOT_INITIALIZED",this.name);throw new Error(e)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(ga.message,e=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(e):this.onRelayMessage(e)})}async onRelayMessage(e){const{topic:n,message:r}=e,{publicKey:i}=this.client.auth.authKeys.keys.includes(GA)?this.client.auth.authKeys.get(GA):{responseTopic:void 0,publicKey:void 0},s=await this.client.core.crypto.decode(n,r,{receiverPublicKey:i});try{YM(s)?(this.client.core.history.set(n,s),this.onRelayEventRequest({topic:n,payload:s})):$S(s)?(await this.client.core.history.resolve(s),await this.onRelayEventResponse({topic:n,payload:s}),this.client.core.history.delete(n,s.id)):this.onRelayEventUnknownPayload({topic:n,payload:s})}catch(o){this.client.logger.error(o)}}registerExpirerEvents(){this.client.core.expirer.on(Kc.expired,async e=>{const{topic:n,id:r}=qZ(e.target);if(r&&this.client.pendingRequest.keys.includes(r))return await this.deletePendingSessionRequest(r,dt("EXPIRED"),!0);if(r&&this.client.auth.requests.keys.includes(r))return await this.deletePendingAuthRequest(r,dt("EXPIRED"),!0);n?this.client.session.keys.includes(n)&&(await this.deleteSession({topic:n,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:n})):r&&(await this.deleteProposal(r,!0),this.client.events.emit("proposal_expire",{id:r}))})}registerPairingEvents(){this.client.core.pairing.events.on(uy.create,e=>this.onPairingCreated(e)),this.client.core.pairing.events.on(uy.delete,e=>{this.addToRecentlyDeleted(e.topic,"pairing")})}isValidPairingTopic(e){if(!Gi(e,!1)){const{message:n}=dt("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(n)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:n}=dt("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(n)}if(xp(this.client.core.pairing.pairings.get(e).expiry)){const{message:n}=dt("EXPIRED",`pairing topic: ${e}`);throw new Error(n)}}async isValidSessionTopic(e){if(!Gi(e,!1)){const{message:n}=dt("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(n)}if(this.checkRecentlyDeleted(e),!this.client.session.keys.includes(e)){const{message:n}=dt("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(n)}if(xp(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});const{message:n}=dt("EXPIRED",`session topic: ${e}`);throw new Error(n)}if(!this.client.core.crypto.keychain.has(e)){const{message:n}=dt("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),new Error(n)}}async isValidSessionOrPairingTopic(e){if(this.checkRecentlyDeleted(e),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(Gi(e,!1)){const{message:n}=dt("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(n)}else{const{message:n}=dt("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(n)}}async isValidProposalId(e){if(!W3e(e)){const{message:n}=dt("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(n)}if(!this.client.proposal.keys.includes(e)){const{message:n}=dt("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(n)}if(xp(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);const{message:n}=dt("EXPIRED",`proposal id: ${e}`);throw new Error(n)}}};class sAe extends E1{constructor(e,n){super(e,n,H_e,JM),this.core=e,this.logger=n}}class oAe extends E1{constructor(e,n){super(e,n,W_e,JM),this.core=e,this.logger=n}}class aAe extends E1{constructor(e,n){super(e,n,q_e,JM,r=>r.id),this.core=e,this.logger=n}}class cAe extends E1{constructor(e,n){super(e,n,Q_e,LS,()=>GA),this.core=e,this.logger=n}}class lAe extends E1{constructor(e,n){super(e,n,Z_e,LS),this.core=e,this.logger=n}}class uAe extends E1{constructor(e,n){super(e,n,J_e,LS,r=>r.id),this.core=e,this.logger=n}}class dAe{constructor(e,n){this.core=e,this.logger=n,this.authKeys=new cAe(this.core,this.logger),this.pairingTopics=new lAe(this.core,this.logger),this.requests=new uAe(this.core,this.logger)}async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}class XM extends Axe{constructor(e){super(e),this.protocol=fX,this.version=hX,this.name=YI.name,this.events=new hc.EventEmitter,this.on=(r,i)=>this.events.on(r,i),this.once=(r,i)=>this.events.once(r,i),this.off=(r,i)=>this.events.off(r,i),this.removeListener=(r,i)=>this.events.removeListener(r,i),this.removeAllListeners=r=>this.events.removeAllListeners(r),this.connect=async r=>{try{return await this.engine.connect(r)}catch(i){throw this.logger.error(i.message),i}},this.pair=async r=>{try{return await this.engine.pair(r)}catch(i){throw this.logger.error(i.message),i}},this.approve=async r=>{try{return await this.engine.approve(r)}catch(i){throw this.logger.error(i.message),i}},this.reject=async r=>{try{return await this.engine.reject(r)}catch(i){throw this.logger.error(i.message),i}},this.update=async r=>{try{return await this.engine.update(r)}catch(i){throw this.logger.error(i.message),i}},this.extend=async r=>{try{return await this.engine.extend(r)}catch(i){throw this.logger.error(i.message),i}},this.request=async r=>{try{return await this.engine.request(r)}catch(i){throw this.logger.error(i.message),i}},this.respond=async r=>{try{return await this.engine.respond(r)}catch(i){throw this.logger.error(i.message),i}},this.ping=async r=>{try{return await this.engine.ping(r)}catch(i){throw this.logger.error(i.message),i}},this.emit=async r=>{try{return await this.engine.emit(r)}catch(i){throw this.logger.error(i.message),i}},this.disconnect=async r=>{try{return await this.engine.disconnect(r)}catch(i){throw this.logger.error(i.message),i}},this.find=r=>{try{return this.engine.find(r)}catch(i){throw this.logger.error(i.message),i}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(r){throw this.logger.error(r.message),r}},this.authenticate=async r=>{try{return await this.engine.authenticate(r)}catch(i){throw this.logger.error(i.message),i}},this.formatAuthMessage=r=>{try{return this.engine.formatAuthMessage(r)}catch(i){throw this.logger.error(i.message),i}},this.approveSessionAuthenticate=async r=>{try{return await this.engine.approveSessionAuthenticate(r)}catch(i){throw this.logger.error(i.message),i}},this.rejectSessionAuthenticate=async r=>{try{return await this.engine.rejectSessionAuthenticate(r)}catch(i){throw this.logger.error(i.message),i}},this.name=(e==null?void 0:e.name)||YI.name,this.metadata=(e==null?void 0:e.metadata)||eve(),this.signConfig=e==null?void 0:e.signConfig;const n=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:C6(T6({level:(e==null?void 0:e.logger)||YI.logger}));this.core=(e==null?void 0:e.core)||new z_e(e),this.logger=qo(n,this.name),this.session=new oAe(this.core,this.logger),this.proposal=new sAe(this.core,this.logger),this.pendingRequest=new aAe(this.core,this.logger),this.engine=new iAe(this),this.auth=new dAe(this.core,this.logger)}static async init(e){const n=new XM(e);return await n.initialize(),n}get context(){return Ma(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(),await this.auth.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success"),this.engine.processRelayMessageCache()}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}var VN={exports:{}};(function(t,e){var n=typeof self<"u"?self:Hr,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var a={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function c(E){return E&&DataView.prototype.isPrototypeOf(E)}if(a.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(E){return E&&l.indexOf(Object.prototype.toString.call(E))>-1};function d(E){if(typeof E!="string"&&(E=String(E)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(E))throw new TypeError("Invalid character in header field name");return E.toLowerCase()}function h(E){return typeof E!="string"&&(E=String(E)),E}function g(E){var y={next:function(){var I=E.shift();return{done:I===void 0,value:I}}};return a.iterable&&(y[Symbol.iterator]=function(){return y}),y}function w(E){this.map={},E instanceof w?E.forEach(function(y,I){this.append(I,y)},this):Array.isArray(E)?E.forEach(function(y){this.append(y[0],y[1])},this):E&&Object.getOwnPropertyNames(E).forEach(function(y){this.append(y,E[y])},this)}w.prototype.append=function(E,y){E=d(E),y=h(y);var I=this.map[E];this.map[E]=I?I+", "+y:y},w.prototype.delete=function(E){delete this.map[d(E)]},w.prototype.get=function(E){return E=d(E),this.has(E)?this.map[E]:null},w.prototype.has=function(E){return this.map.hasOwnProperty(d(E))},w.prototype.set=function(E,y){this.map[d(E)]=h(y)},w.prototype.forEach=function(E,y){for(var I in this.map)this.map.hasOwnProperty(I)&&E.call(y,this.map[I],I,this)},w.prototype.keys=function(){var E=[];return this.forEach(function(y,I){E.push(I)}),g(E)},w.prototype.values=function(){var E=[];return this.forEach(function(y){E.push(y)}),g(E)},w.prototype.entries=function(){var E=[];return this.forEach(function(y,I){E.push([I,y])}),g(E)},a.iterable&&(w.prototype[Symbol.iterator]=w.prototype.entries);function v(E){if(E.bodyUsed)return Promise.reject(new TypeError("Already read"));E.bodyUsed=!0}function _(E){return new Promise(function(y,I){E.onload=function(){y(E.result)},E.onerror=function(){I(E.error)}})}function T(E){var y=new FileReader,I=_(y);return y.readAsArrayBuffer(E),I}function b(E){var y=new FileReader,I=_(y);return y.readAsText(E),I}function k(E){for(var y=new Uint8Array(E),I=new Array(y.length),B=0;B<y.length;B++)I[B]=String.fromCharCode(y[B]);return I.join("")}function D(E){if(E.slice)return E.slice(0);var y=new Uint8Array(E.byteLength);return y.set(new Uint8Array(E)),y.buffer}function O(){return this.bodyUsed=!1,this._initBody=function(E){this._bodyInit=E,E?typeof E=="string"?this._bodyText=E:a.blob&&Blob.prototype.isPrototypeOf(E)?this._bodyBlob=E:a.formData&&FormData.prototype.isPrototypeOf(E)?this._bodyFormData=E:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(E)?this._bodyText=E.toString():a.arrayBuffer&&a.blob&&c(E)?(this._bodyArrayBuffer=D(E.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(E)||u(E))?this._bodyArrayBuffer=D(E):this._bodyText=E=Object.prototype.toString.call(E):this._bodyText="",this.headers.get("content-type")||(typeof E=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(E)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var E=v(this);if(E)return E;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(T)}),this.text=function(){var E=v(this);if(E)return E;if(this._bodyBlob)return b(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(k(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then(H)}),this.json=function(){return this.text().then(JSON.parse)},this}var $=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function C(E){var y=E.toUpperCase();return $.indexOf(y)>-1?y:E}function A(E,y){y=y||{};var I=y.body;if(E instanceof A){if(E.bodyUsed)throw new TypeError("Already read");this.url=E.url,this.credentials=E.credentials,y.headers||(this.headers=new w(E.headers)),this.method=E.method,this.mode=E.mode,this.signal=E.signal,!I&&E._bodyInit!=null&&(I=E._bodyInit,E.bodyUsed=!0)}else this.url=String(E);if(this.credentials=y.credentials||this.credentials||"same-origin",(y.headers||!this.headers)&&(this.headers=new w(y.headers)),this.method=C(y.method||this.method||"GET"),this.mode=y.mode||this.mode||null,this.signal=y.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&I)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(I)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})};function H(E){var y=new FormData;return E.trim().split("&").forEach(function(I){if(I){var B=I.split("="),M=B.shift().replace(/\+/g," "),W=B.join("=").replace(/\+/g," ");y.append(decodeURIComponent(M),decodeURIComponent(W))}}),y}function V(E){var y=new w,I=E.replace(/\r?\n[\t ]+/g," ");return I.split(/\r?\n/).forEach(function(B){var M=B.split(":"),W=M.shift().trim();if(W){var z=M.join(":").trim();y.append(W,z)}}),y}O.call(A.prototype);function Y(E,y){y||(y={}),this.type="default",this.status=y.status===void 0?200:y.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in y?y.statusText:"OK",this.headers=new w(y.headers),this.url=y.url||"",this._initBody(E)}O.call(Y.prototype),Y.prototype.clone=function(){return new Y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new w(this.headers),url:this.url})},Y.error=function(){var E=new Y(null,{status:0,statusText:""});return E.type="error",E};var ee=[301,302,303,307,308];Y.redirect=function(E,y){if(ee.indexOf(y)===-1)throw new RangeError("Invalid status code");return new Y(null,{status:y,headers:{location:E}})},o.DOMException=s.DOMException;try{new o.DOMException}catch{o.DOMException=function(y,I){this.message=y,this.name=I;var B=Error(y);this.stack=B.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function x(E,y){return new Promise(function(I,B){var M=new A(E,y);if(M.signal&&M.signal.aborted)return B(new o.DOMException("Aborted","AbortError"));var W=new XMLHttpRequest;function z(){W.abort()}W.onload=function(){var P={status:W.status,statusText:W.statusText,headers:V(W.getAllResponseHeaders()||"")};P.url="responseURL"in W?W.responseURL:P.headers.get("X-Request-URL");var Z="response"in W?W.response:W.responseText;I(new Y(Z,P))},W.onerror=function(){B(new TypeError("Network request failed"))},W.ontimeout=function(){B(new TypeError("Network request failed"))},W.onabort=function(){B(new o.DOMException("Aborted","AbortError"))},W.open(M.method,M.url,!0),M.credentials==="include"?W.withCredentials=!0:M.credentials==="omit"&&(W.withCredentials=!1),"responseType"in W&&a.blob&&(W.responseType="blob"),M.headers.forEach(function(P,Z){W.setRequestHeader(Z,P)}),M.signal&&(M.signal.addEventListener("abort",z),W.onreadystatechange=function(){W.readyState===4&&M.signal.removeEventListener("abort",z)}),W.send(typeof M._bodyInit>"u"?null:M._bodyInit)})}return x.polyfill=!0,s.fetch||(s.fetch=x,s.Headers=w,s.Request=A,s.Response=Y),o.Headers=w,o.Request=A,o.Response=Y,o.fetch=x,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;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})(VN,VN.exports);var fAe=VN.exports;const bW=Qs(fAe);var hAe=Object.defineProperty,pAe=Object.defineProperties,mAe=Object.getOwnPropertyDescriptors,xW=Object.getOwnPropertySymbols,gAe=Object.prototype.hasOwnProperty,wAe=Object.prototype.propertyIsEnumerable,_W=(t,e,n)=>e in t?hAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AW=(t,e)=>{for(var n in e||(e={}))gAe.call(e,n)&&_W(t,n,e[n]);if(xW)for(var n of xW(e))wAe.call(e,n)&&_W(t,n,e[n]);return t},EW=(t,e)=>pAe(t,mAe(e));const yAe={Accept:"application/json","Content-Type":"application/json"},vAe="POST",CW={headers:yAe,method:vAe},SW=10;let Nh=class{constructor(e,n=!1){if(this.url=e,this.disableProviderPing=n,this.events=new hc.EventEmitter,this.isAvailable=!1,this.registering=!1,!YH(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=n}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}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){this.isAvailable||await this.register();try{const n=ch(e),r=await(await bW(this.url,EW(AW({},CW),{body:n}))).json();this.onPayload({data:r})}catch(n){this.onError(e.id,n)}}async register(e=this.url){if(!YH(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const n=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=n||this.events.listenerCount("open")>=n)&&this.events.setMaxListeners(n+1),new Promise((r,i)=>{this.events.once("register_error",s=>{this.resetMaxListeners(),i(s)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return i(new Error("HTTP connection is missing or invalid"));r()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const n=ch({id:1,jsonrpc:"2.0",method:"test",params:[]});await bW(e,EW(AW({},CW),{body:n}))}this.onOpen()}catch(n){const r=this.parseError(n);throw this.events.emit("register_error",r),this.onClose(),r}}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 n=typeof e.data=="string"?A6(e.data):e.data;this.events.emit("payload",n)}onError(e,n){const r=this.parseError(n),i=r.message||r.toString(),s=BS(e,i);this.events.emit("payload",s)}parseError(e,n=this.url){return KJ(e,n,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>SW&&this.events.setMaxListeners(SW)}};const TW="error",bAe="wss://relay.walletconnect.com",xAe="wc",_Ae="universal_provider",IW=`${xAe}@2:${_Ae}:`,AAe="https://rpc.walletconnect.com/v1/",Lw="generic",Od={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var $2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qN={exports:{}};/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/(function(t,e){(function(){var n,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",a="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",l=500,u="__lodash_placeholder__",d=1,h=2,g=4,w=1,v=2,_=1,T=2,b=4,k=8,D=16,O=32,$=64,C=128,A=256,H=512,V=30,Y="...",ee=800,x=16,E=1,y=2,I=3,B=1/0,M=9007199254740991,W=17976931348623157e292,z=NaN,P=4294967295,Z=P-1,he=P>>>1,ve=[["ary",C],["bind",_],["bindKey",T],["curry",k],["curryRight",D],["flip",H],["partial",O],["partialRight",$],["rearg",A]],j="[object Arguments]",ge="[object Array]",te="[object AsyncFunction]",ae="[object Boolean]",se="[object Date]",L="[object DOMException]",re="[object Error]",be="[object Function]",Se="[object GeneratorFunction]",Ie="[object Map]",Ue="[object Number]",lt="[object Null]",je="[object Object]",Vt="[object Promise]",vt="[object Proxy]",ut="[object RegExp]",ft="[object Set]",He="[object String]",ct="[object Symbol]",Gt="[object Undefined]",ot="[object WeakMap]",qe="[object WeakSet]",X="[object ArrayBuffer]",U="[object DataView]",G="[object Float32Array]",ie="[object Float64Array]",fe="[object Int8Array]",we="[object Int16Array]",Re="[object Int32Array]",Ge="[object Uint8Array]",nt="[object Uint8ClampedArray]",nn="[object Uint16Array]",Ct="[object Uint32Array]",St=/\b__p \+= '';/g,qr=/\b(__p \+=) '' \+/g,Bn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$n=/&(?:amp|lt|gt|quot|#39);/g,Si=/[&<>"']/g,sn=RegExp($n.source),Pe=RegExp(Si.source),It=/<%-([\s\S]+?)%>/g,$t=/<%([\s\S]+?)%>/g,jt=/<%=([\s\S]+?)%>/g,Yn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fn=/^\w*$/,hn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lt=/[\\^$.*+?()[\]{}|]/g,Kt=RegExp(Lt.source),Yt=/^\s+/,Qn=/\s/,Ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,kt=/\{\n\/\* \[wrapped with (.+)\] \*/,vr=/,? & /,pn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ar=/[()=,{}\[\]\/\s]/,Zr=/\\(\\)?/g,Cr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,jn=/\w*$/,yo=/^[-+]0x[0-9a-f]+$/i,eo=/^0b[01]+$/i,Go=/^\[object .+?Constructor\]$/,vo=/^0o[0-7]+$/i,Ko=/^(?:0|[1-9]\d*)$/,es=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ws=/($^)/,Wd=/['\n\r\u2028\u2029\\]/g,_c="\\ud800-\\udfff",Vd="\\u0300-\\u036f",qd="\\ufe20-\\ufe2f",Ac="\\u20d0-\\u20ff",Ec=Vd+qd+Ac,Tu="\\u2700-\\u27bf",$s="a-z\\xdf-\\xf6\\xf8-\\xff",bo="\\xac\\xb1\\xd7\\xf7",Gd="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Kd="\\u2000-\\u206f",Yd=" \\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",zh="A-Z\\xc0-\\xd6\\xd8-\\xde",U1="\\ufe0e\\ufe0f",Qd=bo+Gd+Kd+Yd,om="['’]",Zd="["+_c+"]",am="["+Qd+"]",dr="["+Ec+"]",F1="\\d+",Qb="["+Tu+"]",z1="["+$s+"]",H1="[^"+_c+Qd+F1+Tu+$s+zh+"]",Hh="\\ud83c[\\udffb-\\udfff]",Zb="(?:"+dr+"|"+Hh+")",Wh="[^"+_c+"]",Cc="(?:\\ud83c[\\udde6-\\uddff]){2}",Tl="[\\ud800-\\udbff][\\udc00-\\udfff]",ys="["+zh+"]",Jr="\\u200d",W1="(?:"+z1+"|"+H1+")",Sc="(?:"+ys+"|"+H1+")",V1="(?:"+om+"(?:d|ll|m|re|s|t|ve))?",cm="(?:"+om+"(?:D|LL|M|RE|S|T|VE))?",q1=Zb+"?",G1="["+U1+"]?",Jb="(?:"+Jr+"(?:"+[Wh,Cc,Tl].join("|")+")"+G1+q1+")*",Tc="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",K1="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",lm=G1+q1+Jb,Vh="(?:"+[Qb,Cc,Tl].join("|")+")"+lm,Xb="(?:"+[Wh+dr+"?",dr,Cc,Tl,Zd].join("|")+")",um=RegExp(om,"g"),e2=RegExp(dr,"g"),qh=RegExp(Hh+"(?="+Hh+")|"+Xb+lm,"g"),Y1=RegExp([ys+"?"+z1+"+"+V1+"(?="+[am,ys,"$"].join("|")+")",Sc+"+"+cm+"(?="+[am,ys+W1,"$"].join("|")+")",ys+"?"+W1+"+"+V1,ys+"+"+cm,K1,Tc,F1,Vh].join("|"),"g"),Q1=RegExp("["+Jr+_c+Ec+U1+"]"),Iu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Z1=["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"],J1=-1,Br={};Br[G]=Br[ie]=Br[fe]=Br[we]=Br[Re]=Br[Ge]=Br[nt]=Br[nn]=Br[Ct]=!0,Br[j]=Br[ge]=Br[X]=Br[ae]=Br[U]=Br[se]=Br[re]=Br[be]=Br[Ie]=Br[Ue]=Br[je]=Br[ut]=Br[ft]=Br[He]=Br[ot]=!1;var Nr={};Nr[j]=Nr[ge]=Nr[X]=Nr[U]=Nr[ae]=Nr[se]=Nr[G]=Nr[ie]=Nr[fe]=Nr[we]=Nr[Re]=Nr[Ie]=Nr[Ue]=Nr[je]=Nr[ut]=Nr[ft]=Nr[He]=Nr[ct]=Nr[Ge]=Nr[nt]=Nr[nn]=Nr[Ct]=!0,Nr[re]=Nr[be]=Nr[ot]=!1;var de={À:"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",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"},xe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ve={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},xt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pr=parseFloat,An=parseInt,Gr=typeof $2=="object"&&$2&&$2.Object===Object&&$2,Ti=typeof self=="object"&&self&&self.Object===Object&&self,Zn=Gr||Ti||Function("return this")(),$r=e&&!e.nodeType&&e,yi=$r&&!0&&t&&!t.nodeType&&t,Ui=yi&&yi.exports===$r,Ii=Ui&&Gr.process,zr=function(){try{var _e=yi&&yi.require&&yi.require("util").types;return _e||Ii&&Ii.binding&&Ii.binding("util")}catch{}}(),vs=zr&&zr.isArrayBuffer,La=zr&&zr.isDate,Yo=zr&&zr.isMap,Ic=zr&&zr.isRegExp,dm=zr&&zr.isSet,Jd=zr&&zr.isTypedArray;function ts(_e,Fe,Me){switch(Me.length){case 0:return _e.call(Fe);case 1:return _e.call(Fe,Me[0]);case 2:return _e.call(Fe,Me[0],Me[1]);case 3:return _e.call(Fe,Me[0],Me[1],Me[2])}return _e.apply(Fe,Me)}function NT(_e,Fe,Me,Tt){for(var xn=-1,fr=_e==null?0:_e.length;++xn<fr;){var vi=_e[xn];Fe(Tt,vi,Me(vi),_e)}return Tt}function as(_e,Fe){for(var Me=-1,Tt=_e==null?0:_e.length;++Me<Tt&&Fe(_e[Me],Me,_e)!==!1;);return _e}function PT(_e,Fe){for(var Me=_e==null?0:_e.length;Me--&&Fe(_e[Me],Me,_e)!==!1;);return _e}function R4(_e,Fe){for(var Me=-1,Tt=_e==null?0:_e.length;++Me<Tt;)if(!Fe(_e[Me],Me,_e))return!1;return!0}function Il(_e,Fe){for(var Me=-1,Tt=_e==null?0:_e.length,xn=0,fr=[];++Me<Tt;){var vi=_e[Me];Fe(vi,Me,_e)&&(fr[xn++]=vi)}return fr}function X1(_e,Fe){var Me=_e==null?0:_e.length;return!!Me&&Kh(_e,Fe,0)>-1}function kc(_e,Fe,Me){for(var Tt=-1,xn=_e==null?0:_e.length;++Tt<xn;)if(Me(Fe,_e[Tt]))return!0;return!1}function Xr(_e,Fe){for(var Me=-1,Tt=_e==null?0:_e.length,xn=Array(Tt);++Me<Tt;)xn[Me]=Fe(_e[Me],Me,_e);return xn}function kl(_e,Fe){for(var Me=-1,Tt=Fe.length,xn=_e.length;++Me<Tt;)_e[xn+Me]=Fe[Me];return _e}function Xd(_e,Fe,Me,Tt){var xn=-1,fr=_e==null?0:_e.length;for(Tt&&fr&&(Me=_e[++xn]);++xn<fr;)Me=Fe(Me,_e[xn],xn,_e);return Me}function OT(_e,Fe,Me,Tt){var xn=_e==null?0:_e.length;for(Tt&&xn&&(Me=_e[--xn]);xn--;)Me=Fe(Me,_e[xn],xn,_e);return Me}function t2(_e,Fe){for(var Me=-1,Tt=_e==null?0:_e.length;++Me<Tt;)if(Fe(_e[Me],Me,_e))return!0;return!1}var DT=n2("length");function N4(_e){return _e.split("")}function Gh(_e){return _e.match(pn)||[]}function P4(_e,Fe,Me){var Tt;return Me(_e,function(xn,fr,vi){if(Fe(xn,fr,vi))return Tt=fr,!1}),Tt}function ew(_e,Fe,Me,Tt){for(var xn=_e.length,fr=Me+(Tt?1:-1);Tt?fr--:++fr<xn;)if(Fe(_e[fr],fr,_e))return fr;return-1}function Kh(_e,Fe,Me){return Fe===Fe?H4(_e,Fe,Me):ew(_e,O4,Me)}function MT(_e,Fe,Me,Tt){for(var xn=Me-1,fr=_e.length;++xn<fr;)if(Tt(_e[xn],Fe))return xn;return-1}function O4(_e){return _e!==_e}function D4(_e,Fe){var Me=_e==null?0:_e.length;return Me?Yh(_e,Fe)/Me:z}function n2(_e){return function(Fe){return Fe==null?n:Fe[_e]}}function r2(_e){return function(Fe){return _e==null?n:_e[Fe]}}function M4(_e,Fe,Me,Tt,xn){return xn(_e,function(fr,vi,jr){Me=Tt?(Tt=!1,fr):Fe(Me,fr,vi,jr)}),Me}function BT(_e,Fe){var Me=_e.length;for(_e.sort(Fe);Me--;)_e[Me]=_e[Me].value;return _e}function Yh(_e,Fe){for(var Me,Tt=-1,xn=_e.length;++Tt<xn;){var fr=Fe(_e[Tt]);fr!==n&&(Me=Me===n?fr:Me+fr)}return Me}function tw(_e,Fe){for(var Me=-1,Tt=Array(_e);++Me<_e;)Tt[Me]=Fe(Me);return Tt}function nw(_e,Fe){return Xr(Fe,function(Me){return[Me,_e[Me]]})}function B4(_e){return _e&&_e.slice(0,W4(_e)+1).replace(Yt,"")}function xo(_e){return function(Fe){return _e(Fe)}}function i2(_e,Fe){return Xr(Fe,function(Me){return _e[Me]})}function Qh(_e,Fe){return _e.has(Fe)}function $4(_e,Fe){for(var Me=-1,Tt=_e.length;++Me<Tt&&Kh(Fe,_e[Me],0)>-1;);return Me}function rw(_e,Fe){for(var Me=_e.length;Me--&&Kh(Fe,_e[Me],0)>-1;);return Me}function j4(_e,Fe){for(var Me=_e.length,Tt=0;Me--;)_e[Me]===Fe&&++Tt;return Tt}var L4=r2(de),s2=r2(xe);function iw(_e){return"\\"+xt[_e]}function $T(_e,Fe){return _e==null?n:_e[Fe]}function ef(_e){return Q1.test(_e)}function U4(_e){return Iu.test(_e)}function F4(_e){for(var Fe,Me=[];!(Fe=_e.next()).done;)Me.push(Fe.value);return Me}function sw(_e){var Fe=-1,Me=Array(_e.size);return _e.forEach(function(Tt,xn){Me[++Fe]=[xn,Tt]}),Me}function o2(_e,Fe){return function(Me){return _e(Fe(Me))}}function Rl(_e,Fe){for(var Me=-1,Tt=_e.length,xn=0,fr=[];++Me<Tt;){var vi=_e[Me];(vi===Fe||vi===u)&&(_e[Me]=u,fr[xn++]=Me)}return fr}function fm(_e){var Fe=-1,Me=Array(_e.size);return _e.forEach(function(Tt){Me[++Fe]=Tt}),Me}function z4(_e){var Fe=-1,Me=Array(_e.size);return _e.forEach(function(Tt){Me[++Fe]=[Tt,Tt]}),Me}function H4(_e,Fe,Me){for(var Tt=Me-1,xn=_e.length;++Tt<xn;)if(_e[Tt]===Fe)return Tt;return-1}function Zh(_e,Fe,Me){for(var Tt=Me+1;Tt--;)if(_e[Tt]===Fe)return Tt;return Tt}function Jh(_e){return ef(_e)?q4(_e):DT(_e)}function Ua(_e){return ef(_e)?G4(_e):N4(_e)}function W4(_e){for(var Fe=_e.length;Fe--&&Qn.test(_e.charAt(Fe)););return Fe}var V4=r2(Ve);function q4(_e){for(var Fe=qh.lastIndex=0;qh.test(_e);)++Fe;return Fe}function G4(_e){return _e.match(qh)||[]}function jT(_e){return _e.match(Y1)||[]}var LT=function _e(Fe){Fe=Fe==null?Zn:Xh.defaults(Zn.Object(),Fe,Xh.pick(Zn,Z1));var Me=Fe.Array,Tt=Fe.Date,xn=Fe.Error,fr=Fe.Function,vi=Fe.Math,jr=Fe.Object,a2=Fe.RegExp,UT=Fe.String,Qo=Fe.TypeError,tf=Me.prototype,FT=fr.prototype,ep=jr.prototype,ow=Fe["__core-js_shared__"],aw=FT.toString,br=ep.hasOwnProperty,zT=0,K4=function(){var f=/[^.]+$/.exec(ow&&ow.keys&&ow.keys.IE_PROTO||"");return f?"Symbol(src)_1."+f:""}(),cw=ep.toString,HT=aw.call(jr),Y4=Zn._,Q4=a2("^"+aw.call(br).replace(Lt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lw=Ui?Fe.Buffer:n,ku=Fe.Symbol,uw=Fe.Uint8Array,c2=lw?lw.allocUnsafe:n,tp=o2(jr.getPrototypeOf,jr),Z4=jr.create,J4=ep.propertyIsEnumerable,dw=tf.splice,X4=ku?ku.isConcatSpreadable:n,np=ku?ku.iterator:n,nf=ku?ku.toStringTag:n,fw=function(){try{var f=xm(jr,"defineProperty");return f({},"",{}),f}catch{}}(),WT=Fe.clearTimeout!==Zn.clearTimeout&&Fe.clearTimeout,VT=Tt&&Tt.now!==Zn.Date.now&&Tt.now,qT=Fe.setTimeout!==Zn.setTimeout&&Fe.setTimeout,hw=vi.ceil,pw=vi.floor,l2=jr.getOwnPropertySymbols,GT=lw?lw.isBuffer:n,Ru=Fe.isFinite,e_=tf.join,KT=o2(jr.keys,jr),ki=vi.max,bs=vi.min,YT=Tt.now,QT=Fe.parseInt,u2=vi.random,ZT=tf.reverse,d2=xm(Fe,"DataView"),hm=xm(Fe,"Map"),Zo=xm(Fe,"Promise"),Nl=xm(Fe,"Set"),Kr=xm(Fe,"WeakMap"),pm=xm(jr,"create"),mw=Kr&&new Kr,rp={},JT=_m(d2),XT=_m(hm),e7=_m(Zo),t7=_m(Nl),n7=_m(Kr),mm=ku?ku.prototype:n,ip=mm?mm.valueOf:n,gm=mm?mm.toString:n;function N(f){if(Ri(f)&&!In(f)&&!(f instanceof le)){if(f instanceof Q)return f;if(br.call(f,"__wrapped__"))return AU(f)}return new Q(f)}var R=function(){function f(){}return function(p){if(!bi(p))return{};if(Z4)return Z4(p);f.prototype=p;var S=new f;return f.prototype=n,S}}();function F(){}function Q(f,p){this.__wrapped__=f,this.__actions__=[],this.__chain__=!!p,this.__index__=0,this.__values__=n}N.templateSettings={escape:It,evaluate:$t,interpolate:jt,variable:"",imports:{_:N}},N.prototype=F.prototype,N.prototype.constructor=N,Q.prototype=R(F.prototype),Q.prototype.constructor=Q;function le(f){this.__wrapped__=f,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=P,this.__views__=[]}function Be(){var f=new le(this.__wrapped__);return f.__actions__=Jo(this.__actions__),f.__dir__=this.__dir__,f.__filtered__=this.__filtered__,f.__iteratees__=Jo(this.__iteratees__),f.__takeCount__=this.__takeCount__,f.__views__=Jo(this.__views__),f}function ht(){if(this.__filtered__){var f=new le(this);f.__dir__=-1,f.__filtered__=!0}else f=this.clone(),f.__dir__*=-1;return f}function Tn(){var f=this.__wrapped__.value(),p=this.__dir__,S=In(f),q=p<0,J=S?f.length:0,oe=Fle(0,J,this.__views__),me=oe.start,ye=oe.end,Ee=ye-me,ze=q?ye:me-1,We=this.__iteratees__,Ke=We.length,yt=0,Wt=bs(Ee,this.__takeCount__);if(!S||!q&&J==Ee&&Wt==Ee)return qL(f,this.__actions__);var ln=[];e:for(;Ee--&&yt<Wt;){ze+=p;for(var zn=-1,un=f[ze];++zn<Ke;){var Jn=We[zn],cr=Jn.iteratee,Ha=Jn.type,Eo=cr(un);if(Ha==y)un=Eo;else if(!Eo){if(Ha==E)continue e;break e}}ln[yt++]=un}return ln}le.prototype=R(F.prototype),le.prototype.constructor=le;function on(f){var p=-1,S=f==null?0:f.length;for(this.clear();++p<S;){var q=f[p];this.set(q[0],q[1])}}function di(){this.__data__=pm?pm(null):{},this.size=0}function wm(f){var p=this.has(f)&&delete this.__data__[f];return this.size-=p?1:0,p}function Pce(f){var p=this.__data__;if(pm){var S=p[f];return S===c?n:S}return br.call(p,f)?p[f]:n}function Oce(f){var p=this.__data__;return pm?p[f]!==n:br.call(p,f)}function Dce(f,p){var S=this.__data__;return this.size+=this.has(f)?0:1,S[f]=pm&&p===n?c:p,this}on.prototype.clear=di,on.prototype.delete=wm,on.prototype.get=Pce,on.prototype.has=Oce,on.prototype.set=Dce;function rf(f){var p=-1,S=f==null?0:f.length;for(this.clear();++p<S;){var q=f[p];this.set(q[0],q[1])}}function Mce(){this.__data__=[],this.size=0}function Bce(f){var p=this.__data__,S=t_(p,f);if(S<0)return!1;var q=p.length-1;return S==q?p.pop():dw.call(p,S,1),--this.size,!0}function $ce(f){var p=this.__data__,S=t_(p,f);return S<0?n:p[S][1]}function jce(f){return t_(this.__data__,f)>-1}function Lce(f,p){var S=this.__data__,q=t_(S,f);return q<0?(++this.size,S.push([f,p])):S[q][1]=p,this}rf.prototype.clear=Mce,rf.prototype.delete=Bce,rf.prototype.get=$ce,rf.prototype.has=jce,rf.prototype.set=Lce;function sf(f){var p=-1,S=f==null?0:f.length;for(this.clear();++p<S;){var q=f[p];this.set(q[0],q[1])}}function Uce(){this.size=0,this.__data__={hash:new on,map:new(hm||rf),string:new on}}function Fce(f){var p=h_(this,f).delete(f);return this.size-=p?1:0,p}function zce(f){return h_(this,f).get(f)}function Hce(f){return h_(this,f).has(f)}function Wce(f,p){var S=h_(this,f),q=S.size;return S.set(f,p),this.size+=S.size==q?0:1,this}sf.prototype.clear=Uce,sf.prototype.delete=Fce,sf.prototype.get=zce,sf.prototype.has=Hce,sf.prototype.set=Wce;function ym(f){var p=-1,S=f==null?0:f.length;for(this.__data__=new sf;++p<S;)this.add(f[p])}function Vce(f){return this.__data__.set(f,c),this}function qce(f){return this.__data__.has(f)}ym.prototype.add=ym.prototype.push=Vce,ym.prototype.has=qce;function Pl(f){var p=this.__data__=new rf(f);this.size=p.size}function Gce(){this.__data__=new rf,this.size=0}function Kce(f){var p=this.__data__,S=p.delete(f);return this.size=p.size,S}function Yce(f){return this.__data__.get(f)}function Qce(f){return this.__data__.has(f)}function Zce(f,p){var S=this.__data__;if(S instanceof rf){var q=S.__data__;if(!hm||q.length<i-1)return q.push([f,p]),this.size=++S.size,this;S=this.__data__=new sf(q)}return S.set(f,p),this.size=S.size,this}Pl.prototype.clear=Gce,Pl.prototype.delete=Kce,Pl.prototype.get=Yce,Pl.prototype.has=Qce,Pl.prototype.set=Zce;function AL(f,p){var S=In(f),q=!S&&Am(f),J=!S&&!q&&lp(f),oe=!S&&!q&&!J&&vw(f),me=S||q||J||oe,ye=me?tw(f.length,UT):[],Ee=ye.length;for(var ze in f)(p||br.call(f,ze))&&!(me&&(ze=="length"||J&&(ze=="offset"||ze=="parent")||oe&&(ze=="buffer"||ze=="byteLength"||ze=="byteOffset")||lf(ze,Ee)))&&ye.push(ze);return ye}function EL(f){var p=f.length;return p?f[h7(0,p-1)]:n}function Jce(f,p){return p_(Jo(f),vm(p,0,f.length))}function Xce(f){return p_(Jo(f))}function r7(f,p,S){(S!==n&&!Ol(f[p],S)||S===n&&!(p in f))&&of(f,p,S)}function f2(f,p,S){var q=f[p];(!(br.call(f,p)&&Ol(q,S))||S===n&&!(p in f))&&of(f,p,S)}function t_(f,p){for(var S=f.length;S--;)if(Ol(f[S][0],p))return S;return-1}function ele(f,p,S,q){return sp(f,function(J,oe,me){p(q,J,S(J),me)}),q}function CL(f,p){return f&&Pu(p,xs(p),f)}function tle(f,p){return f&&Pu(p,ea(p),f)}function of(f,p,S){p=="__proto__"&&fw?fw(f,p,{configurable:!0,enumerable:!0,value:S,writable:!0}):f[p]=S}function i7(f,p){for(var S=-1,q=p.length,J=Me(q),oe=f==null;++S<q;)J[S]=oe?n:j7(f,p[S]);return J}function vm(f,p,S){return f===f&&(S!==n&&(f=f<=S?f:S),p!==n&&(f=f>=p?f:p)),f}function Rc(f,p,S,q,J,oe){var me,ye=p&d,Ee=p&h,ze=p&g;if(S&&(me=J?S(f,q,J,oe):S(f)),me!==n)return me;if(!bi(f))return f;var We=In(f);if(We){if(me=Hle(f),!ye)return Jo(f,me)}else{var Ke=to(f),yt=Ke==be||Ke==Se;if(lp(f))return YL(f,ye);if(Ke==je||Ke==j||yt&&!J){if(me=Ee||yt?{}:pU(f),!ye)return Ee?Ple(f,tle(me,f)):Nle(f,CL(me,f))}else{if(!Nr[Ke])return J?f:{};me=Wle(f,Ke,ye)}}oe||(oe=new Pl);var Wt=oe.get(f);if(Wt)return Wt;oe.set(f,me),HU(f)?f.forEach(function(un){me.add(Rc(un,p,S,un,f,oe))}):FU(f)&&f.forEach(function(un,Jn){me.set(Jn,Rc(un,p,S,Jn,f,oe))});var ln=ze?Ee?E7:A7:Ee?ea:xs,zn=We?n:ln(f);return as(zn||f,function(un,Jn){zn&&(Jn=un,un=f[Jn]),f2(me,Jn,Rc(un,p,S,Jn,f,oe))}),me}function nle(f){var p=xs(f);return function(S){return SL(S,f,p)}}function SL(f,p,S){var q=S.length;if(f==null)return!q;for(f=jr(f);q--;){var J=S[q],oe=p[J],me=f[J];if(me===n&&!(J in f)||!oe(me))return!1}return!0}function TL(f,p,S){if(typeof f!="function")throw new Qo(o);return v2(function(){f.apply(n,S)},p)}function h2(f,p,S,q){var J=-1,oe=X1,me=!0,ye=f.length,Ee=[],ze=p.length;if(!ye)return Ee;S&&(p=Xr(p,xo(S))),q?(oe=kc,me=!1):p.length>=i&&(oe=Qh,me=!1,p=new ym(p));e:for(;++J<ye;){var We=f[J],Ke=S==null?We:S(We);if(We=q||We!==0?We:0,me&&Ke===Ke){for(var yt=ze;yt--;)if(p[yt]===Ke)continue e;Ee.push(We)}else oe(p,Ke,q)||Ee.push(We)}return Ee}var sp=eU(Nu),IL=eU(o7,!0);function rle(f,p){var S=!0;return sp(f,function(q,J,oe){return S=!!p(q,J,oe),S}),S}function n_(f,p,S){for(var q=-1,J=f.length;++q<J;){var oe=f[q],me=p(oe);if(me!=null&&(ye===n?me===me&&!za(me):S(me,ye)))var ye=me,Ee=oe}return Ee}function ile(f,p,S,q){var J=f.length;for(S=Ln(S),S<0&&(S=-S>J?0:J+S),q=q===n||q>J?J:Ln(q),q<0&&(q+=J),q=S>q?0:VU(q);S<q;)f[S++]=p;return f}function kL(f,p){var S=[];return sp(f,function(q,J,oe){p(q,J,oe)&&S.push(q)}),S}function js(f,p,S,q,J){var oe=-1,me=f.length;for(S||(S=qle),J||(J=[]);++oe<me;){var ye=f[oe];p>0&&S(ye)?p>1?js(ye,p-1,S,q,J):kl(J,ye):q||(J[J.length]=ye)}return J}var s7=tU(),RL=tU(!0);function Nu(f,p){return f&&s7(f,p,xs)}function o7(f,p){return f&&RL(f,p,xs)}function r_(f,p){return Il(p,function(S){return uf(f[S])})}function bm(f,p){p=ap(p,f);for(var S=0,q=p.length;f!=null&&S<q;)f=f[Ou(p[S++])];return S&&S==q?f:n}function NL(f,p,S){var q=p(f);return In(f)?q:kl(q,S(f))}function _o(f){return f==null?f===n?Gt:lt:nf&&nf in jr(f)?Ule(f):Xle(f)}function a7(f,p){return f>p}function sle(f,p){return f!=null&&br.call(f,p)}function ole(f,p){return f!=null&&p in jr(f)}function ale(f,p,S){return f>=bs(p,S)&&f<ki(p,S)}function c7(f,p,S){for(var q=S?kc:X1,J=f[0].length,oe=f.length,me=oe,ye=Me(oe),Ee=1/0,ze=[];me--;){var We=f[me];me&&p&&(We=Xr(We,xo(p))),Ee=bs(We.length,Ee),ye[me]=!S&&(p||J>=120&&We.length>=120)?new ym(me&&We):n}We=f[0];var Ke=-1,yt=ye[0];e:for(;++Ke<J&&ze.length<Ee;){var Wt=We[Ke],ln=p?p(Wt):Wt;if(Wt=S||Wt!==0?Wt:0,!(yt?Qh(yt,ln):q(ze,ln,S))){for(me=oe;--me;){var zn=ye[me];if(!(zn?Qh(zn,ln):q(f[me],ln,S)))continue e}yt&&yt.push(ln),ze.push(Wt)}}return ze}function cle(f,p,S,q){return Nu(f,function(J,oe,me){p(q,S(J),oe,me)}),q}function p2(f,p,S){p=ap(p,f),f=yU(f,p);var q=f==null?f:f[Ou(Pc(p))];return q==null?n:ts(q,f,S)}function PL(f){return Ri(f)&&_o(f)==j}function lle(f){return Ri(f)&&_o(f)==X}function ule(f){return Ri(f)&&_o(f)==se}function m2(f,p,S,q,J){return f===p?!0:f==null||p==null||!Ri(f)&&!Ri(p)?f!==f&&p!==p:dle(f,p,S,q,m2,J)}function dle(f,p,S,q,J,oe){var me=In(f),ye=In(p),Ee=me?ge:to(f),ze=ye?ge:to(p);Ee=Ee==j?je:Ee,ze=ze==j?je:ze;var We=Ee==je,Ke=ze==je,yt=Ee==ze;if(yt&&lp(f)){if(!lp(p))return!1;me=!0,We=!1}if(yt&&!We)return oe||(oe=new Pl),me||vw(f)?dU(f,p,S,q,J,oe):jle(f,p,Ee,S,q,J,oe);if(!(S&w)){var Wt=We&&br.call(f,"__wrapped__"),ln=Ke&&br.call(p,"__wrapped__");if(Wt||ln){var zn=Wt?f.value():f,un=ln?p.value():p;return oe||(oe=new Pl),J(zn,un,S,q,oe)}}return yt?(oe||(oe=new Pl),Lle(f,p,S,q,J,oe)):!1}function fle(f){return Ri(f)&&to(f)==Ie}function l7(f,p,S,q){var J=S.length,oe=J,me=!q;if(f==null)return!oe;for(f=jr(f);J--;){var ye=S[J];if(me&&ye[2]?ye[1]!==f[ye[0]]:!(ye[0]in f))return!1}for(;++J<oe;){ye=S[J];var Ee=ye[0],ze=f[Ee],We=ye[1];if(me&&ye[2]){if(ze===n&&!(Ee in f))return!1}else{var Ke=new Pl;if(q)var yt=q(ze,We,Ee,f,p,Ke);if(!(yt===n?m2(We,ze,w|v,q,Ke):yt))return!1}}return!0}function OL(f){if(!bi(f)||Kle(f))return!1;var p=uf(f)?Q4:Go;return p.test(_m(f))}function hle(f){return Ri(f)&&_o(f)==ut}function ple(f){return Ri(f)&&to(f)==ft}function mle(f){return Ri(f)&&b_(f.length)&&!!Br[_o(f)]}function DL(f){return typeof f=="function"?f:f==null?ta:typeof f=="object"?In(f)?$L(f[0],f[1]):BL(f):nF(f)}function u7(f){if(!y2(f))return KT(f);var p=[];for(var S in jr(f))br.call(f,S)&&S!="constructor"&&p.push(S);return p}function gle(f){if(!bi(f))return Jle(f);var p=y2(f),S=[];for(var q in f)q=="constructor"&&(p||!br.call(f,q))||S.push(q);return S}function d7(f,p){return f<p}function ML(f,p){var S=-1,q=Xo(f)?Me(f.length):[];return sp(f,function(J,oe,me){q[++S]=p(J,oe,me)}),q}function BL(f){var p=S7(f);return p.length==1&&p[0][2]?gU(p[0][0],p[0][1]):function(S){return S===f||l7(S,f,p)}}function $L(f,p){return I7(f)&&mU(p)?gU(Ou(f),p):function(S){var q=j7(S,f);return q===n&&q===p?L7(S,f):m2(p,q,w|v)}}function i_(f,p,S,q,J){f!==p&&s7(p,function(oe,me){if(J||(J=new Pl),bi(oe))wle(f,p,me,S,i_,q,J);else{var ye=q?q(R7(f,me),oe,me+"",f,p,J):n;ye===n&&(ye=oe),r7(f,me,ye)}},ea)}function wle(f,p,S,q,J,oe,me){var ye=R7(f,S),Ee=R7(p,S),ze=me.get(Ee);if(ze){r7(f,S,ze);return}var We=oe?oe(ye,Ee,S+"",f,p,me):n,Ke=We===n;if(Ke){var yt=In(Ee),Wt=!yt&&lp(Ee),ln=!yt&&!Wt&&vw(Ee);We=Ee,yt||Wt||ln?In(ye)?We=ye:Fi(ye)?We=Jo(ye):Wt?(Ke=!1,We=YL(Ee,!0)):ln?(Ke=!1,We=QL(Ee,!0)):We=[]:b2(Ee)||Am(Ee)?(We=ye,Am(ye)?We=qU(ye):(!bi(ye)||uf(ye))&&(We=pU(Ee))):Ke=!1}Ke&&(me.set(Ee,We),J(We,Ee,q,oe,me),me.delete(Ee)),r7(f,S,We)}function jL(f,p){var S=f.length;if(S)return p+=p<0?S:0,lf(p,S)?f[p]:n}function LL(f,p,S){p.length?p=Xr(p,function(oe){return In(oe)?function(me){return bm(me,oe.length===1?oe[0]:oe)}:oe}):p=[ta];var q=-1;p=Xr(p,xo(an()));var J=ML(f,function(oe,me,ye){var Ee=Xr(p,function(ze){return ze(oe)});return{criteria:Ee,index:++q,value:oe}});return BT(J,function(oe,me){return Rle(oe,me,S)})}function yle(f,p){return UL(f,p,function(S,q){return L7(f,q)})}function UL(f,p,S){for(var q=-1,J=p.length,oe={};++q<J;){var me=p[q],ye=bm(f,me);S(ye,me)&&g2(oe,ap(me,f),ye)}return oe}function vle(f){return function(p){return bm(p,f)}}function f7(f,p,S,q){var J=q?MT:Kh,oe=-1,me=p.length,ye=f;for(f===p&&(p=Jo(p)),S&&(ye=Xr(f,xo(S)));++oe<me;)for(var Ee=0,ze=p[oe],We=S?S(ze):ze;(Ee=J(ye,We,Ee,q))>-1;)ye!==f&&dw.call(ye,Ee,1),dw.call(f,Ee,1);return f}function FL(f,p){for(var S=f?p.length:0,q=S-1;S--;){var J=p[S];if(S==q||J!==oe){var oe=J;lf(J)?dw.call(f,J,1):g7(f,J)}}return f}function h7(f,p){return f+pw(u2()*(p-f+1))}function ble(f,p,S,q){for(var J=-1,oe=ki(hw((p-f)/(S||1)),0),me=Me(oe);oe--;)me[q?oe:++J]=f,f+=S;return me}function p7(f,p){var S="";if(!f||p<1||p>M)return S;do p%2&&(S+=f),p=pw(p/2),p&&(f+=f);while(p);return S}function Vn(f,p){return N7(wU(f,p,ta),f+"")}function xle(f){return EL(bw(f))}function _le(f,p){var S=bw(f);return p_(S,vm(p,0,S.length))}function g2(f,p,S,q){if(!bi(f))return f;p=ap(p,f);for(var J=-1,oe=p.length,me=oe-1,ye=f;ye!=null&&++J<oe;){var Ee=Ou(p[J]),ze=S;if(Ee==="__proto__"||Ee==="constructor"||Ee==="prototype")return f;if(J!=me){var We=ye[Ee];ze=q?q(We,Ee,ye):n,ze===n&&(ze=bi(We)?We:lf(p[J+1])?[]:{})}f2(ye,Ee,ze),ye=ye[Ee]}return f}var zL=mw?function(f,p){return mw.set(f,p),f}:ta,Ale=fw?function(f,p){return fw(f,"toString",{configurable:!0,enumerable:!1,value:F7(p),writable:!0})}:ta;function Ele(f){return p_(bw(f))}function Nc(f,p,S){var q=-1,J=f.length;p<0&&(p=-p>J?0:J+p),S=S>J?J:S,S<0&&(S+=J),J=p>S?0:S-p>>>0,p>>>=0;for(var oe=Me(J);++q<J;)oe[q]=f[q+p];return oe}function Cle(f,p){var S;return sp(f,function(q,J,oe){return S=p(q,J,oe),!S}),!!S}function s_(f,p,S){var q=0,J=f==null?q:f.length;if(typeof p=="number"&&p===p&&J<=he){for(;q<J;){var oe=q+J>>>1,me=f[oe];me!==null&&!za(me)&&(S?me<=p:me<p)?q=oe+1:J=oe}return J}return m7(f,p,ta,S)}function m7(f,p,S,q){var J=0,oe=f==null?0:f.length;if(oe===0)return 0;p=S(p);for(var me=p!==p,ye=p===null,Ee=za(p),ze=p===n;J<oe;){var We=pw((J+oe)/2),Ke=S(f[We]),yt=Ke!==n,Wt=Ke===null,ln=Ke===Ke,zn=za(Ke);if(me)var un=q||ln;else ze?un=ln&&(q||yt):ye?un=ln&&yt&&(q||!Wt):Ee?un=ln&&yt&&!Wt&&(q||!zn):Wt||zn?un=!1:un=q?Ke<=p:Ke<p;un?J=We+1:oe=We}return bs(oe,Z)}function HL(f,p){for(var S=-1,q=f.length,J=0,oe=[];++S<q;){var me=f[S],ye=p?p(me):me;if(!S||!Ol(ye,Ee)){var Ee=ye;oe[J++]=me===0?0:me}}return oe}function WL(f){return typeof f=="number"?f:za(f)?z:+f}function Fa(f){if(typeof f=="string")return f;if(In(f))return Xr(f,Fa)+"";if(za(f))return gm?gm.call(f):"";var p=f+"";return p=="0"&&1/f==-B?"-0":p}function op(f,p,S){var q=-1,J=X1,oe=f.length,me=!0,ye=[],Ee=ye;if(S)me=!1,J=kc;else if(oe>=i){var ze=p?null:Ble(f);if(ze)return fm(ze);me=!1,J=Qh,Ee=new ym}else Ee=p?[]:ye;e:for(;++q<oe;){var We=f[q],Ke=p?p(We):We;if(We=S||We!==0?We:0,me&&Ke===Ke){for(var yt=Ee.length;yt--;)if(Ee[yt]===Ke)continue e;p&&Ee.push(Ke),ye.push(We)}else J(Ee,Ke,S)||(Ee!==ye&&Ee.push(Ke),ye.push(We))}return ye}function g7(f,p){return p=ap(p,f),f=yU(f,p),f==null||delete f[Ou(Pc(p))]}function VL(f,p,S,q){return g2(f,p,S(bm(f,p)),q)}function o_(f,p,S,q){for(var J=f.length,oe=q?J:-1;(q?oe--:++oe<J)&&p(f[oe],oe,f););return S?Nc(f,q?0:oe,q?oe+1:J):Nc(f,q?oe+1:0,q?J:oe)}function qL(f,p){var S=f;return S instanceof le&&(S=S.value()),Xd(p,function(q,J){return J.func.apply(J.thisArg,kl([q],J.args))},S)}function w7(f,p,S){var q=f.length;if(q<2)return q?op(f[0]):[];for(var J=-1,oe=Me(q);++J<q;)for(var me=f[J],ye=-1;++ye<q;)ye!=J&&(oe[J]=h2(oe[J]||me,f[ye],p,S));return op(js(oe,1),p,S)}function GL(f,p,S){for(var q=-1,J=f.length,oe=p.length,me={};++q<J;){var ye=q<oe?p[q]:n;S(me,f[q],ye)}return me}function y7(f){return Fi(f)?f:[]}function v7(f){return typeof f=="function"?f:ta}function ap(f,p){return In(f)?f:I7(f,p)?[f]:_U(Or(f))}var Sle=Vn;function cp(f,p,S){var q=f.length;return S=S===n?q:S,!p&&S>=q?f:Nc(f,p,S)}var KL=WT||function(f){return Zn.clearTimeout(f)};function YL(f,p){if(p)return f.slice();var S=f.length,q=c2?c2(S):new f.constructor(S);return f.copy(q),q}function b7(f){var p=new f.constructor(f.byteLength);return new uw(p).set(new uw(f)),p}function Tle(f,p){var S=p?b7(f.buffer):f.buffer;return new f.constructor(S,f.byteOffset,f.byteLength)}function Ile(f){var p=new f.constructor(f.source,jn.exec(f));return p.lastIndex=f.lastIndex,p}function kle(f){return ip?jr(ip.call(f)):{}}function QL(f,p){var S=p?b7(f.buffer):f.buffer;return new f.constructor(S,f.byteOffset,f.length)}function ZL(f,p){if(f!==p){var S=f!==n,q=f===null,J=f===f,oe=za(f),me=p!==n,ye=p===null,Ee=p===p,ze=za(p);if(!ye&&!ze&&!oe&&f>p||oe&&me&&Ee&&!ye&&!ze||q&&me&&Ee||!S&&Ee||!J)return 1;if(!q&&!oe&&!ze&&f<p||ze&&S&&J&&!q&&!oe||ye&&S&&J||!me&&J||!Ee)return-1}return 0}function Rle(f,p,S){for(var q=-1,J=f.criteria,oe=p.criteria,me=J.length,ye=S.length;++q<me;){var Ee=ZL(J[q],oe[q]);if(Ee){if(q>=ye)return Ee;var ze=S[q];return Ee*(ze=="desc"?-1:1)}}return f.index-p.index}function JL(f,p,S,q){for(var J=-1,oe=f.length,me=S.length,ye=-1,Ee=p.length,ze=ki(oe-me,0),We=Me(Ee+ze),Ke=!q;++ye<Ee;)We[ye]=p[ye];for(;++J<me;)(Ke||J<oe)&&(We[S[J]]=f[J]);for(;ze--;)We[ye++]=f[J++];return We}function XL(f,p,S,q){for(var J=-1,oe=f.length,me=-1,ye=S.length,Ee=-1,ze=p.length,We=ki(oe-ye,0),Ke=Me(We+ze),yt=!q;++J<We;)Ke[J]=f[J];for(var Wt=J;++Ee<ze;)Ke[Wt+Ee]=p[Ee];for(;++me<ye;)(yt||J<oe)&&(Ke[Wt+S[me]]=f[J++]);return Ke}function Jo(f,p){var S=-1,q=f.length;for(p||(p=Me(q));++S<q;)p[S]=f[S];return p}function Pu(f,p,S,q){var J=!S;S||(S={});for(var oe=-1,me=p.length;++oe<me;){var ye=p[oe],Ee=q?q(S[ye],f[ye],ye,S,f):n;Ee===n&&(Ee=f[ye]),J?of(S,ye,Ee):f2(S,ye,Ee)}return S}function Nle(f,p){return Pu(f,T7(f),p)}function Ple(f,p){return Pu(f,fU(f),p)}function a_(f,p){return function(S,q){var J=In(S)?NT:ele,oe=p?p():{};return J(S,f,an(q,2),oe)}}function gw(f){return Vn(function(p,S){var q=-1,J=S.length,oe=J>1?S[J-1]:n,me=J>2?S[2]:n;for(oe=f.length>3&&typeof oe=="function"?(J--,oe):n,me&&Ao(S[0],S[1],me)&&(oe=J<3?n:oe,J=1),p=jr(p);++q<J;){var ye=S[q];ye&&f(p,ye,q,oe)}return p})}function eU(f,p){return function(S,q){if(S==null)return S;if(!Xo(S))return f(S,q);for(var J=S.length,oe=p?J:-1,me=jr(S);(p?oe--:++oe<J)&&q(me[oe],oe,me)!==!1;);return S}}function tU(f){return function(p,S,q){for(var J=-1,oe=jr(p),me=q(p),ye=me.length;ye--;){var Ee=me[f?ye:++J];if(S(oe[Ee],Ee,oe)===!1)break}return p}}function Ole(f,p,S){var q=p&_,J=w2(f);function oe(){var me=this&&this!==Zn&&this instanceof oe?J:f;return me.apply(q?S:this,arguments)}return oe}function nU(f){return function(p){p=Or(p);var S=ef(p)?Ua(p):n,q=S?S[0]:p.charAt(0),J=S?cp(S,1).join(""):p.slice(1);return q[f]()+J}}function ww(f){return function(p){return Xd(eF(XU(p).replace(um,"")),f,"")}}function w2(f){return function(){var p=arguments;switch(p.length){case 0:return new f;case 1:return new f(p[0]);case 2:return new f(p[0],p[1]);case 3:return new f(p[0],p[1],p[2]);case 4:return new f(p[0],p[1],p[2],p[3]);case 5:return new f(p[0],p[1],p[2],p[3],p[4]);case 6:return new f(p[0],p[1],p[2],p[3],p[4],p[5]);case 7:return new f(p[0],p[1],p[2],p[3],p[4],p[5],p[6])}var S=R(f.prototype),q=f.apply(S,p);return bi(q)?q:S}}function Dle(f,p,S){var q=w2(f);function J(){for(var oe=arguments.length,me=Me(oe),ye=oe,Ee=yw(J);ye--;)me[ye]=arguments[ye];var ze=oe<3&&me[0]!==Ee&&me[oe-1]!==Ee?[]:Rl(me,Ee);if(oe-=ze.length,oe<S)return aU(f,p,c_,J.placeholder,n,me,ze,n,n,S-oe);var We=this&&this!==Zn&&this instanceof J?q:f;return ts(We,this,me)}return J}function rU(f){return function(p,S,q){var J=jr(p);if(!Xo(p)){var oe=an(S,3);p=xs(p),S=function(ye){return oe(J[ye],ye,J)}}var me=f(p,S,q);return me>-1?J[oe?p[me]:me]:n}}function iU(f){return cf(function(p){var S=p.length,q=S,J=Q.prototype.thru;for(f&&p.reverse();q--;){var oe=p[q];if(typeof oe!="function")throw new Qo(o);if(J&&!me&&f_(oe)=="wrapper")var me=new Q([],!0)}for(q=me?q:S;++q<S;){oe=p[q];var ye=f_(oe),Ee=ye=="wrapper"?C7(oe):n;Ee&&k7(Ee[0])&&Ee[1]==(C|k|O|A)&&!Ee[4].length&&Ee[9]==1?me=me[f_(Ee[0])].apply(me,Ee[3]):me=oe.length==1&&k7(oe)?me[ye]():me.thru(oe)}return function(){var ze=arguments,We=ze[0];if(me&&ze.length==1&&In(We))return me.plant(We).value();for(var Ke=0,yt=S?p[Ke].apply(this,ze):We;++Ke<S;)yt=p[Ke].call(this,yt);return yt}})}function c_(f,p,S,q,J,oe,me,ye,Ee,ze){var We=p&C,Ke=p&_,yt=p&T,Wt=p&(k|D),ln=p&H,zn=yt?n:w2(f);function un(){for(var Jn=arguments.length,cr=Me(Jn),Ha=Jn;Ha--;)cr[Ha]=arguments[Ha];if(Wt)var Eo=yw(un),Wa=j4(cr,Eo);if(q&&(cr=JL(cr,q,J,Wt)),oe&&(cr=XL(cr,oe,me,Wt)),Jn-=Wa,Wt&&Jn<ze){var zi=Rl(cr,Eo);return aU(f,p,c_,un.placeholder,S,cr,zi,ye,Ee,ze-Jn)}var Dl=Ke?S:this,ff=yt?Dl[f]:f;return Jn=cr.length,ye?cr=eue(cr,ye):ln&&Jn>1&&cr.reverse(),We&&Ee<Jn&&(cr.length=Ee),this&&this!==Zn&&this instanceof un&&(ff=zn||w2(ff)),ff.apply(Dl,cr)}return un}function sU(f,p){return function(S,q){return cle(S,f,p(q),{})}}function l_(f,p){return function(S,q){var J;if(S===n&&q===n)return p;if(S!==n&&(J=S),q!==n){if(J===n)return q;typeof S=="string"||typeof q=="string"?(S=Fa(S),q=Fa(q)):(S=WL(S),q=WL(q)),J=f(S,q)}return J}}function x7(f){return cf(function(p){return p=Xr(p,xo(an())),Vn(function(S){var q=this;return f(p,function(J){return ts(J,q,S)})})})}function u_(f,p){p=p===n?" ":Fa(p);var S=p.length;if(S<2)return S?p7(p,f):p;var q=p7(p,hw(f/Jh(p)));return ef(p)?cp(Ua(q),0,f).join(""):q.slice(0,f)}function Mle(f,p,S,q){var J=p&_,oe=w2(f);function me(){for(var ye=-1,Ee=arguments.length,ze=-1,We=q.length,Ke=Me(We+Ee),yt=this&&this!==Zn&&this instanceof me?oe:f;++ze<We;)Ke[ze]=q[ze];for(;Ee--;)Ke[ze++]=arguments[++ye];return ts(yt,J?S:this,Ke)}return me}function oU(f){return function(p,S,q){return q&&typeof q!="number"&&Ao(p,S,q)&&(S=q=n),p=df(p),S===n?(S=p,p=0):S=df(S),q=q===n?p<S?1:-1:df(q),ble(p,S,q,f)}}function d_(f){return function(p,S){return typeof p=="string"&&typeof S=="string"||(p=Oc(p),S=Oc(S)),f(p,S)}}function aU(f,p,S,q,J,oe,me,ye,Ee,ze){var We=p&k,Ke=We?me:n,yt=We?n:me,Wt=We?oe:n,ln=We?n:oe;p|=We?O:$,p&=~(We?$:O),p&b||(p&=~(_|T));var zn=[f,p,J,Wt,Ke,ln,yt,ye,Ee,ze],un=S.apply(n,zn);return k7(f)&&vU(un,zn),un.placeholder=q,bU(un,f,p)}function _7(f){var p=vi[f];return function(S,q){if(S=Oc(S),q=q==null?0:bs(Ln(q),292),q&&Ru(S)){var J=(Or(S)+"e").split("e"),oe=p(J[0]+"e"+(+J[1]+q));return J=(Or(oe)+"e").split("e"),+(J[0]+"e"+(+J[1]-q))}return p(S)}}var Ble=Nl&&1/fm(new Nl([,-0]))[1]==B?function(f){return new Nl(f)}:W7;function cU(f){return function(p){var S=to(p);return S==Ie?sw(p):S==ft?z4(p):nw(p,f(p))}}function af(f,p,S,q,J,oe,me,ye){var Ee=p&T;if(!Ee&&typeof f!="function")throw new Qo(o);var ze=q?q.length:0;if(ze||(p&=~(O|$),q=J=n),me=me===n?me:ki(Ln(me),0),ye=ye===n?ye:Ln(ye),ze-=J?J.length:0,p&$){var We=q,Ke=J;q=J=n}var yt=Ee?n:C7(f),Wt=[f,p,S,q,J,We,Ke,oe,me,ye];if(yt&&Zle(Wt,yt),f=Wt[0],p=Wt[1],S=Wt[2],q=Wt[3],J=Wt[4],ye=Wt[9]=Wt[9]===n?Ee?0:f.length:ki(Wt[9]-ze,0),!ye&&p&(k|D)&&(p&=~(k|D)),!p||p==_)var ln=Ole(f,p,S);else p==k||p==D?ln=Dle(f,p,ye):(p==O||p==(_|O))&&!J.length?ln=Mle(f,p,S,q):ln=c_.apply(n,Wt);var zn=yt?zL:vU;return bU(zn(ln,Wt),f,p)}function lU(f,p,S,q){return f===n||Ol(f,ep[S])&&!br.call(q,S)?p:f}function uU(f,p,S,q,J,oe){return bi(f)&&bi(p)&&(oe.set(p,f),i_(f,p,n,uU,oe),oe.delete(p)),f}function $le(f){return b2(f)?n:f}function dU(f,p,S,q,J,oe){var me=S&w,ye=f.length,Ee=p.length;if(ye!=Ee&&!(me&&Ee>ye))return!1;var ze=oe.get(f),We=oe.get(p);if(ze&&We)return ze==p&&We==f;var Ke=-1,yt=!0,Wt=S&v?new ym:n;for(oe.set(f,p),oe.set(p,f);++Ke<ye;){var ln=f[Ke],zn=p[Ke];if(q)var un=me?q(zn,ln,Ke,p,f,oe):q(ln,zn,Ke,f,p,oe);if(un!==n){if(un)continue;yt=!1;break}if(Wt){if(!t2(p,function(Jn,cr){if(!Qh(Wt,cr)&&(ln===Jn||J(ln,Jn,S,q,oe)))return Wt.push(cr)})){yt=!1;break}}else if(!(ln===zn||J(ln,zn,S,q,oe))){yt=!1;break}}return oe.delete(f),oe.delete(p),yt}function jle(f,p,S,q,J,oe,me){switch(S){case U:if(f.byteLength!=p.byteLength||f.byteOffset!=p.byteOffset)return!1;f=f.buffer,p=p.buffer;case X:return!(f.byteLength!=p.byteLength||!oe(new uw(f),new uw(p)));case ae:case se:case Ue:return Ol(+f,+p);case re:return f.name==p.name&&f.message==p.message;case ut:case He:return f==p+"";case Ie:var ye=sw;case ft:var Ee=q&w;if(ye||(ye=fm),f.size!=p.size&&!Ee)return!1;var ze=me.get(f);if(ze)return ze==p;q|=v,me.set(f,p);var We=dU(ye(f),ye(p),q,J,oe,me);return me.delete(f),We;case ct:if(ip)return ip.call(f)==ip.call(p)}return!1}function Lle(f,p,S,q,J,oe){var me=S&w,ye=A7(f),Ee=ye.length,ze=A7(p),We=ze.length;if(Ee!=We&&!me)return!1;for(var Ke=Ee;Ke--;){var yt=ye[Ke];if(!(me?yt in p:br.call(p,yt)))return!1}var Wt=oe.get(f),ln=oe.get(p);if(Wt&&ln)return Wt==p&&ln==f;var zn=!0;oe.set(f,p),oe.set(p,f);for(var un=me;++Ke<Ee;){yt=ye[Ke];var Jn=f[yt],cr=p[yt];if(q)var Ha=me?q(cr,Jn,yt,p,f,oe):q(Jn,cr,yt,f,p,oe);if(!(Ha===n?Jn===cr||J(Jn,cr,S,q,oe):Ha)){zn=!1;break}un||(un=yt=="constructor")}if(zn&&!un){var Eo=f.constructor,Wa=p.constructor;Eo!=Wa&&"constructor"in f&&"constructor"in p&&!(typeof Eo=="function"&&Eo instanceof Eo&&typeof Wa=="function"&&Wa instanceof Wa)&&(zn=!1)}return oe.delete(f),oe.delete(p),zn}function cf(f){return N7(wU(f,n,SU),f+"")}function A7(f){return NL(f,xs,T7)}function E7(f){return NL(f,ea,fU)}var C7=mw?function(f){return mw.get(f)}:W7;function f_(f){for(var p=f.name+"",S=rp[p],q=br.call(rp,p)?S.length:0;q--;){var J=S[q],oe=J.func;if(oe==null||oe==f)return J.name}return p}function yw(f){var p=br.call(N,"placeholder")?N:f;return p.placeholder}function an(){var f=N.iteratee||z7;return f=f===z7?DL:f,arguments.length?f(arguments[0],arguments[1]):f}function h_(f,p){var S=f.__data__;return Gle(p)?S[typeof p=="string"?"string":"hash"]:S.map}function S7(f){for(var p=xs(f),S=p.length;S--;){var q=p[S],J=f[q];p[S]=[q,J,mU(J)]}return p}function xm(f,p){var S=$T(f,p);return OL(S)?S:n}function Ule(f){var p=br.call(f,nf),S=f[nf];try{f[nf]=n;var q=!0}catch{}var J=cw.call(f);return q&&(p?f[nf]=S:delete f[nf]),J}var T7=l2?function(f){return f==null?[]:(f=jr(f),Il(l2(f),function(p){return J4.call(f,p)}))}:V7,fU=l2?function(f){for(var p=[];f;)kl(p,T7(f)),f=tp(f);return p}:V7,to=_o;(d2&&to(new d2(new ArrayBuffer(1)))!=U||hm&&to(new hm)!=Ie||Zo&&to(Zo.resolve())!=Vt||Nl&&to(new Nl)!=ft||Kr&&to(new Kr)!=ot)&&(to=function(f){var p=_o(f),S=p==je?f.constructor:n,q=S?_m(S):"";if(q)switch(q){case JT:return U;case XT:return Ie;case e7:return Vt;case t7:return ft;case n7:return ot}return p});function Fle(f,p,S){for(var q=-1,J=S.length;++q<J;){var oe=S[q],me=oe.size;switch(oe.type){case"drop":f+=me;break;case"dropRight":p-=me;break;case"take":p=bs(p,f+me);break;case"takeRight":f=ki(f,p-me);break}}return{start:f,end:p}}function zle(f){var p=f.match(kt);return p?p[1].split(vr):[]}function hU(f,p,S){p=ap(p,f);for(var q=-1,J=p.length,oe=!1;++q<J;){var me=Ou(p[q]);if(!(oe=f!=null&&S(f,me)))break;f=f[me]}return oe||++q!=J?oe:(J=f==null?0:f.length,!!J&&b_(J)&&lf(me,J)&&(In(f)||Am(f)))}function Hle(f){var p=f.length,S=new f.constructor(p);return p&&typeof f[0]=="string"&&br.call(f,"index")&&(S.index=f.index,S.input=f.input),S}function pU(f){return typeof f.constructor=="function"&&!y2(f)?R(tp(f)):{}}function Wle(f,p,S){var q=f.constructor;switch(p){case X:return b7(f);case ae:case se:return new q(+f);case U:return Tle(f,S);case G:case ie:case fe:case we:case Re:case Ge:case nt:case nn:case Ct:return QL(f,S);case Ie:return new q;case Ue:case He:return new q(f);case ut:return Ile(f);case ft:return new q;case ct:return kle(f)}}function Vle(f,p){var S=p.length;if(!S)return f;var q=S-1;return p[q]=(S>1?"& ":"")+p[q],p=p.join(S>2?", ":" "),f.replace(Ot,`{
/* [wrapped with `+p+`] */
`)}function qle(f){return In(f)||Am(f)||!!(X4&&f&&f[X4])}function lf(f,p){var S=typeof f;return p=p??M,!!p&&(S=="number"||S!="symbol"&&Ko.test(f))&&f>-1&&f%1==0&&f<p}function Ao(f,p,S){if(!bi(S))return!1;var q=typeof p;return(q=="number"?Xo(S)&&lf(p,S.length):q=="string"&&p in S)?Ol(S[p],f):!1}function I7(f,p){if(In(f))return!1;var S=typeof f;return S=="number"||S=="symbol"||S=="boolean"||f==null||za(f)?!0:fn.test(f)||!Yn.test(f)||p!=null&&f in jr(p)}function Gle(f){var p=typeof f;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?f!=="__proto__":f===null}function k7(f){var p=f_(f),S=N[p];if(typeof S!="function"||!(p in le.prototype))return!1;if(f===S)return!0;var q=C7(S);return!!q&&f===q[0]}function Kle(f){return!!K4&&K4 in f}var Yle=ow?uf:q7;function y2(f){var p=f&&f.constructor,S=typeof p=="function"&&p.prototype||ep;return f===S}function mU(f){return f===f&&!bi(f)}function gU(f,p){return function(S){return S==null?!1:S[f]===p&&(p!==n||f in jr(S))}}function Qle(f){var p=y_(f,function(q){return S.size===l&&S.clear(),q}),S=p.cache;return p}function Zle(f,p){var S=f[1],q=p[1],J=S|q,oe=J<(_|T|C),me=q==C&&S==k||q==C&&S==A&&f[7].length<=p[8]||q==(C|A)&&p[7].length<=p[8]&&S==k;if(!(oe||me))return f;q&_&&(f[2]=p[2],J|=S&_?0:b);var ye=p[3];if(ye){var Ee=f[3];f[3]=Ee?JL(Ee,ye,p[4]):ye,f[4]=Ee?Rl(f[3],u):p[4]}return ye=p[5],ye&&(Ee=f[5],f[5]=Ee?XL(Ee,ye,p[6]):ye,f[6]=Ee?Rl(f[5],u):p[6]),ye=p[7],ye&&(f[7]=ye),q&C&&(f[8]=f[8]==null?p[8]:bs(f[8],p[8])),f[9]==null&&(f[9]=p[9]),f[0]=p[0],f[1]=J,f}function Jle(f){var p=[];if(f!=null)for(var S in jr(f))p.push(S);return p}function Xle(f){return cw.call(f)}function wU(f,p,S){return p=ki(p===n?f.length-1:p,0),function(){for(var q=arguments,J=-1,oe=ki(q.length-p,0),me=Me(oe);++J<oe;)me[J]=q[p+J];J=-1;for(var ye=Me(p+1);++J<p;)ye[J]=q[J];return ye[p]=S(me),ts(f,this,ye)}}function yU(f,p){return p.length<2?f:bm(f,Nc(p,0,-1))}function eue(f,p){for(var S=f.length,q=bs(p.length,S),J=Jo(f);q--;){var oe=p[q];f[q]=lf(oe,S)?J[oe]:n}return f}function R7(f,p){if(!(p==="constructor"&&typeof f[p]=="function")&&p!="__proto__")return f[p]}var vU=xU(zL),v2=qT||function(f,p){return Zn.setTimeout(f,p)},N7=xU(Ale);function bU(f,p,S){var q=p+"";return N7(f,Vle(q,tue(zle(q),S)))}function xU(f){var p=0,S=0;return function(){var q=YT(),J=x-(q-S);if(S=q,J>0){if(++p>=ee)return arguments[0]}else p=0;return f.apply(n,arguments)}}function p_(f,p){var S=-1,q=f.length,J=q-1;for(p=p===n?q:p;++S<p;){var oe=h7(S,J),me=f[oe];f[oe]=f[S],f[S]=me}return f.length=p,f}var _U=Qle(function(f){var p=[];return f.charCodeAt(0)===46&&p.push(""),f.replace(hn,function(S,q,J,oe){p.push(J?oe.replace(Zr,"$1"):q||S)}),p});function Ou(f){if(typeof f=="string"||za(f))return f;var p=f+"";return p=="0"&&1/f==-B?"-0":p}function _m(f){if(f!=null){try{return aw.call(f)}catch{}try{return f+""}catch{}}return""}function tue(f,p){return as(ve,function(S){var q="_."+S[0];p&S[1]&&!X1(f,q)&&f.push(q)}),f.sort()}function AU(f){if(f instanceof le)return f.clone();var p=new Q(f.__wrapped__,f.__chain__);return p.__actions__=Jo(f.__actions__),p.__index__=f.__index__,p.__values__=f.__values__,p}function nue(f,p,S){(S?Ao(f,p,S):p===n)?p=1:p=ki(Ln(p),0);var q=f==null?0:f.length;if(!q||p<1)return[];for(var J=0,oe=0,me=Me(hw(q/p));J<q;)me[oe++]=Nc(f,J,J+=p);return me}function rue(f){for(var p=-1,S=f==null?0:f.length,q=0,J=[];++p<S;){var oe=f[p];oe&&(J[q++]=oe)}return J}function iue(){var f=arguments.length;if(!f)return[];for(var p=Me(f-1),S=arguments[0],q=f;q--;)p[q-1]=arguments[q];return kl(In(S)?Jo(S):[S],js(p,1))}var sue=Vn(function(f,p){return Fi(f)?h2(f,js(p,1,Fi,!0)):[]}),oue=Vn(function(f,p){var S=Pc(p);return Fi(S)&&(S=n),Fi(f)?h2(f,js(p,1,Fi,!0),an(S,2)):[]}),aue=Vn(function(f,p){var S=Pc(p);return Fi(S)&&(S=n),Fi(f)?h2(f,js(p,1,Fi,!0),n,S):[]});function cue(f,p,S){var q=f==null?0:f.length;return q?(p=S||p===n?1:Ln(p),Nc(f,p<0?0:p,q)):[]}function lue(f,p,S){var q=f==null?0:f.length;return q?(p=S||p===n?1:Ln(p),p=q-p,Nc(f,0,p<0?0:p)):[]}function uue(f,p){return f&&f.length?o_(f,an(p,3),!0,!0):[]}function due(f,p){return f&&f.length?o_(f,an(p,3),!0):[]}function fue(f,p,S,q){var J=f==null?0:f.length;return J?(S&&typeof S!="number"&&Ao(f,p,S)&&(S=0,q=J),ile(f,p,S,q)):[]}function EU(f,p,S){var q=f==null?0:f.length;if(!q)return-1;var J=S==null?0:Ln(S);return J<0&&(J=ki(q+J,0)),ew(f,an(p,3),J)}function CU(f,p,S){var q=f==null?0:f.length;if(!q)return-1;var J=q-1;return S!==n&&(J=Ln(S),J=S<0?ki(q+J,0):bs(J,q-1)),ew(f,an(p,3),J,!0)}function SU(f){var p=f==null?0:f.length;return p?js(f,1):[]}function hue(f){var p=f==null?0:f.length;return p?js(f,B):[]}function pue(f,p){var S=f==null?0:f.length;return S?(p=p===n?1:Ln(p),js(f,p)):[]}function mue(f){for(var p=-1,S=f==null?0:f.length,q={};++p<S;){var J=f[p];q[J[0]]=J[1]}return q}function TU(f){return f&&f.length?f[0]:n}function gue(f,p,S){var q=f==null?0:f.length;if(!q)return-1;var J=S==null?0:Ln(S);return J<0&&(J=ki(q+J,0)),Kh(f,p,J)}function wue(f){var p=f==null?0:f.length;return p?Nc(f,0,-1):[]}var yue=Vn(function(f){var p=Xr(f,y7);return p.length&&p[0]===f[0]?c7(p):[]}),vue=Vn(function(f){var p=Pc(f),S=Xr(f,y7);return p===Pc(S)?p=n:S.pop(),S.length&&S[0]===f[0]?c7(S,an(p,2)):[]}),bue=Vn(function(f){var p=Pc(f),S=Xr(f,y7);return p=typeof p=="function"?p:n,p&&S.pop(),S.length&&S[0]===f[0]?c7(S,n,p):[]});function xue(f,p){return f==null?"":e_.call(f,p)}function Pc(f){var p=f==null?0:f.length;return p?f[p-1]:n}function _ue(f,p,S){var q=f==null?0:f.length;if(!q)return-1;var J=q;return S!==n&&(J=Ln(S),J=J<0?ki(q+J,0):bs(J,q-1)),p===p?Zh(f,p,J):ew(f,O4,J,!0)}function Aue(f,p){return f&&f.length?jL(f,Ln(p)):n}var Eue=Vn(IU);function IU(f,p){return f&&f.length&&p&&p.length?f7(f,p):f}function Cue(f,p,S){return f&&f.length&&p&&p.length?f7(f,p,an(S,2)):f}function Sue(f,p,S){return f&&f.length&&p&&p.length?f7(f,p,n,S):f}var Tue=cf(function(f,p){var S=f==null?0:f.length,q=i7(f,p);return FL(f,Xr(p,function(J){return lf(J,S)?+J:J}).sort(ZL)),q});function Iue(f,p){var S=[];if(!(f&&f.length))return S;var q=-1,J=[],oe=f.length;for(p=an(p,3);++q<oe;){var me=f[q];p(me,q,f)&&(S.push(me),J.push(q))}return FL(f,J),S}function P7(f){return f==null?f:ZT.call(f)}function kue(f,p,S){var q=f==null?0:f.length;return q?(S&&typeof S!="number"&&Ao(f,p,S)?(p=0,S=q):(p=p==null?0:Ln(p),S=S===n?q:Ln(S)),Nc(f,p,S)):[]}function Rue(f,p){return s_(f,p)}function Nue(f,p,S){return m7(f,p,an(S,2))}function Pue(f,p){var S=f==null?0:f.length;if(S){var q=s_(f,p);if(q<S&&Ol(f[q],p))return q}return-1}function Oue(f,p){return s_(f,p,!0)}function Due(f,p,S){return m7(f,p,an(S,2),!0)}function Mue(f,p){var S=f==null?0:f.length;if(S){var q=s_(f,p,!0)-1;if(Ol(f[q],p))return q}return-1}function Bue(f){return f&&f.length?HL(f):[]}function $ue(f,p){return f&&f.length?HL(f,an(p,2)):[]}function jue(f){var p=f==null?0:f.length;return p?Nc(f,1,p):[]}function Lue(f,p,S){return f&&f.length?(p=S||p===n?1:Ln(p),Nc(f,0,p<0?0:p)):[]}function Uue(f,p,S){var q=f==null?0:f.length;return q?(p=S||p===n?1:Ln(p),p=q-p,Nc(f,p<0?0:p,q)):[]}function Fue(f,p){return f&&f.length?o_(f,an(p,3),!1,!0):[]}function zue(f,p){return f&&f.length?o_(f,an(p,3)):[]}var Hue=Vn(function(f){return op(js(f,1,Fi,!0))}),Wue=Vn(function(f){var p=Pc(f);return Fi(p)&&(p=n),op(js(f,1,Fi,!0),an(p,2))}),Vue=Vn(function(f){var p=Pc(f);return p=typeof p=="function"?p:n,op(js(f,1,Fi,!0),n,p)});function que(f){return f&&f.length?op(f):[]}function Gue(f,p){return f&&f.length?op(f,an(p,2)):[]}function Kue(f,p){return p=typeof p=="function"?p:n,f&&f.length?op(f,n,p):[]}function O7(f){if(!(f&&f.length))return[];var p=0;return f=Il(f,function(S){if(Fi(S))return p=ki(S.length,p),!0}),tw(p,function(S){return Xr(f,n2(S))})}function kU(f,p){if(!(f&&f.length))return[];var S=O7(f);return p==null?S:Xr(S,function(q){return ts(p,n,q)})}var Yue=Vn(function(f,p){return Fi(f)?h2(f,p):[]}),Que=Vn(function(f){return w7(Il(f,Fi))}),Zue=Vn(function(f){var p=Pc(f);return Fi(p)&&(p=n),w7(Il(f,Fi),an(p,2))}),Jue=Vn(function(f){var p=Pc(f);return p=typeof p=="function"?p:n,w7(Il(f,Fi),n,p)}),Xue=Vn(O7);function ede(f,p){return GL(f||[],p||[],f2)}function tde(f,p){return GL(f||[],p||[],g2)}var nde=Vn(function(f){var p=f.length,S=p>1?f[p-1]:n;return S=typeof S=="function"?(f.pop(),S):n,kU(f,S)});function RU(f){var p=N(f);return p.__chain__=!0,p}function rde(f,p){return p(f),f}function m_(f,p){return p(f)}var ide=cf(function(f){var p=f.length,S=p?f[0]:0,q=this.__wrapped__,J=function(oe){return i7(oe,f)};return p>1||this.__actions__.length||!(q instanceof le)||!lf(S)?this.thru(J):(q=q.slice(S,+S+(p?1:0)),q.__actions__.push({func:m_,args:[J],thisArg:n}),new Q(q,this.__chain__).thru(function(oe){return p&&!oe.length&&oe.push(n),oe}))});function sde(){return RU(this)}function ode(){return new Q(this.value(),this.__chain__)}function ade(){this.__values__===n&&(this.__values__=WU(this.value()));var f=this.__index__>=this.__values__.length,p=f?n:this.__values__[this.__index__++];return{done:f,value:p}}function cde(){return this}function lde(f){for(var p,S=this;S instanceof F;){var q=AU(S);q.__index__=0,q.__values__=n,p?J.__wrapped__=q:p=q;var J=q;S=S.__wrapped__}return J.__wrapped__=f,p}function ude(){var f=this.__wrapped__;if(f instanceof le){var p=f;return this.__actions__.length&&(p=new le(this)),p=p.reverse(),p.__actions__.push({func:m_,args:[P7],thisArg:n}),new Q(p,this.__chain__)}return this.thru(P7)}function dde(){return qL(this.__wrapped__,this.__actions__)}var fde=a_(function(f,p,S){br.call(f,S)?++f[S]:of(f,S,1)});function hde(f,p,S){var q=In(f)?R4:rle;return S&&Ao(f,p,S)&&(p=n),q(f,an(p,3))}function pde(f,p){var S=In(f)?Il:kL;return S(f,an(p,3))}var mde=rU(EU),gde=rU(CU);function wde(f,p){return js(g_(f,p),1)}function yde(f,p){return js(g_(f,p),B)}function vde(f,p,S){return S=S===n?1:Ln(S),js(g_(f,p),S)}function NU(f,p){var S=In(f)?as:sp;return S(f,an(p,3))}function PU(f,p){var S=In(f)?PT:IL;return S(f,an(p,3))}var bde=a_(function(f,p,S){br.call(f,S)?f[S].push(p):of(f,S,[p])});function xde(f,p,S,q){f=Xo(f)?f:bw(f),S=S&&!q?Ln(S):0;var J=f.length;return S<0&&(S=ki(J+S,0)),x_(f)?S<=J&&f.indexOf(p,S)>-1:!!J&&Kh(f,p,S)>-1}var _de=Vn(function(f,p,S){var q=-1,J=typeof p=="function",oe=Xo(f)?Me(f.length):[];return sp(f,function(me){oe[++q]=J?ts(p,me,S):p2(me,p,S)}),oe}),Ade=a_(function(f,p,S){of(f,S,p)});function g_(f,p){var S=In(f)?Xr:ML;return S(f,an(p,3))}function Ede(f,p,S,q){return f==null?[]:(In(p)||(p=p==null?[]:[p]),S=q?n:S,In(S)||(S=S==null?[]:[S]),LL(f,p,S))}var Cde=a_(function(f,p,S){f[S?0:1].push(p)},function(){return[[],[]]});function Sde(f,p,S){var q=In(f)?Xd:M4,J=arguments.length<3;return q(f,an(p,4),S,J,sp)}function Tde(f,p,S){var q=In(f)?OT:M4,J=arguments.length<3;return q(f,an(p,4),S,J,IL)}function Ide(f,p){var S=In(f)?Il:kL;return S(f,v_(an(p,3)))}function kde(f){var p=In(f)?EL:xle;return p(f)}function Rde(f,p,S){(S?Ao(f,p,S):p===n)?p=1:p=Ln(p);var q=In(f)?Jce:_le;return q(f,p)}function Nde(f){var p=In(f)?Xce:Ele;return p(f)}function Pde(f){if(f==null)return 0;if(Xo(f))return x_(f)?Jh(f):f.length;var p=to(f);return p==Ie||p==ft?f.size:u7(f).length}function Ode(f,p,S){var q=In(f)?t2:Cle;return S&&Ao(f,p,S)&&(p=n),q(f,an(p,3))}var Dde=Vn(function(f,p){if(f==null)return[];var S=p.length;return S>1&&Ao(f,p[0],p[1])?p=[]:S>2&&Ao(p[0],p[1],p[2])&&(p=[p[0]]),LL(f,js(p,1),[])}),w_=VT||function(){return Zn.Date.now()};function Mde(f,p){if(typeof p!="function")throw new Qo(o);return f=Ln(f),function(){if(--f<1)return p.apply(this,arguments)}}function OU(f,p,S){return p=S?n:p,p=f&&p==null?f.length:p,af(f,C,n,n,n,n,p)}function DU(f,p){var S;if(typeof p!="function")throw new Qo(o);return f=Ln(f),function(){return--f>0&&(S=p.apply(this,arguments)),f<=1&&(p=n),S}}var D7=Vn(function(f,p,S){var q=_;if(S.length){var J=Rl(S,yw(D7));q|=O}return af(f,q,p,S,J)}),MU=Vn(function(f,p,S){var q=_|T;if(S.length){var J=Rl(S,yw(MU));q|=O}return af(p,q,f,S,J)});function BU(f,p,S){p=S?n:p;var q=af(f,k,n,n,n,n,n,p);return q.placeholder=BU.placeholder,q}function $U(f,p,S){p=S?n:p;var q=af(f,D,n,n,n,n,n,p);return q.placeholder=$U.placeholder,q}function jU(f,p,S){var q,J,oe,me,ye,Ee,ze=0,We=!1,Ke=!1,yt=!0;if(typeof f!="function")throw new Qo(o);p=Oc(p)||0,bi(S)&&(We=!!S.leading,Ke="maxWait"in S,oe=Ke?ki(Oc(S.maxWait)||0,p):oe,yt="trailing"in S?!!S.trailing:yt);function Wt(zi){var Dl=q,ff=J;return q=J=n,ze=zi,me=f.apply(ff,Dl),me}function ln(zi){return ze=zi,ye=v2(Jn,p),We?Wt(zi):me}function zn(zi){var Dl=zi-Ee,ff=zi-ze,rF=p-Dl;return Ke?bs(rF,oe-ff):rF}function un(zi){var Dl=zi-Ee,ff=zi-ze;return Ee===n||Dl>=p||Dl<0||Ke&&ff>=oe}function Jn(){var zi=w_();if(un(zi))return cr(zi);ye=v2(Jn,zn(zi))}function cr(zi){return ye=n,yt&&q?Wt(zi):(q=J=n,me)}function Ha(){ye!==n&&KL(ye),ze=0,q=Ee=J=ye=n}function Eo(){return ye===n?me:cr(w_())}function Wa(){var zi=w_(),Dl=un(zi);if(q=arguments,J=this,Ee=zi,Dl){if(ye===n)return ln(Ee);if(Ke)return KL(ye),ye=v2(Jn,p),Wt(Ee)}return ye===n&&(ye=v2(Jn,p)),me}return Wa.cancel=Ha,Wa.flush=Eo,Wa}var Bde=Vn(function(f,p){return TL(f,1,p)}),$de=Vn(function(f,p,S){return TL(f,Oc(p)||0,S)});function jde(f){return af(f,H)}function y_(f,p){if(typeof f!="function"||p!=null&&typeof p!="function")throw new Qo(o);var S=function(){var q=arguments,J=p?p.apply(this,q):q[0],oe=S.cache;if(oe.has(J))return oe.get(J);var me=f.apply(this,q);return S.cache=oe.set(J,me)||oe,me};return S.cache=new(y_.Cache||sf),S}y_.Cache=sf;function v_(f){if(typeof f!="function")throw new Qo(o);return function(){var p=arguments;switch(p.length){case 0:return!f.call(this);case 1:return!f.call(this,p[0]);case 2:return!f.call(this,p[0],p[1]);case 3:return!f.call(this,p[0],p[1],p[2])}return!f.apply(this,p)}}function Lde(f){return DU(2,f)}var Ude=Sle(function(f,p){p=p.length==1&&In(p[0])?Xr(p[0],xo(an())):Xr(js(p,1),xo(an()));var S=p.length;return Vn(function(q){for(var J=-1,oe=bs(q.length,S);++J<oe;)q[J]=p[J].call(this,q[J]);return ts(f,this,q)})}),M7=Vn(function(f,p){var S=Rl(p,yw(M7));return af(f,O,n,p,S)}),LU=Vn(function(f,p){var S=Rl(p,yw(LU));return af(f,$,n,p,S)}),Fde=cf(function(f,p){return af(f,A,n,n,n,p)});function zde(f,p){if(typeof f!="function")throw new Qo(o);return p=p===n?p:Ln(p),Vn(f,p)}function Hde(f,p){if(typeof f!="function")throw new Qo(o);return p=p==null?0:ki(Ln(p),0),Vn(function(S){var q=S[p],J=cp(S,0,p);return q&&kl(J,q),ts(f,this,J)})}function Wde(f,p,S){var q=!0,J=!0;if(typeof f!="function")throw new Qo(o);return bi(S)&&(q="leading"in S?!!S.leading:q,J="trailing"in S?!!S.trailing:J),jU(f,p,{leading:q,maxWait:p,trailing:J})}function Vde(f){return OU(f,1)}function qde(f,p){return M7(v7(p),f)}function Gde(){if(!arguments.length)return[];var f=arguments[0];return In(f)?f:[f]}function Kde(f){return Rc(f,g)}function Yde(f,p){return p=typeof p=="function"?p:n,Rc(f,g,p)}function Qde(f){return Rc(f,d|g)}function Zde(f,p){return p=typeof p=="function"?p:n,Rc(f,d|g,p)}function Jde(f,p){return p==null||SL(f,p,xs(p))}function Ol(f,p){return f===p||f!==f&&p!==p}var Xde=d_(a7),efe=d_(function(f,p){return f>=p}),Am=PL(function(){return arguments}())?PL:function(f){return Ri(f)&&br.call(f,"callee")&&!J4.call(f,"callee")},In=Me.isArray,tfe=vs?xo(vs):lle;function Xo(f){return f!=null&&b_(f.length)&&!uf(f)}function Fi(f){return Ri(f)&&Xo(f)}function nfe(f){return f===!0||f===!1||Ri(f)&&_o(f)==ae}var lp=GT||q7,rfe=La?xo(La):ule;function ife(f){return Ri(f)&&f.nodeType===1&&!b2(f)}function sfe(f){if(f==null)return!0;if(Xo(f)&&(In(f)||typeof f=="string"||typeof f.splice=="function"||lp(f)||vw(f)||Am(f)))return!f.length;var p=to(f);if(p==Ie||p==ft)return!f.size;if(y2(f))return!u7(f).length;for(var S in f)if(br.call(f,S))return!1;return!0}function ofe(f,p){return m2(f,p)}function afe(f,p,S){S=typeof S=="function"?S:n;var q=S?S(f,p):n;return q===n?m2(f,p,n,S):!!q}function B7(f){if(!Ri(f))return!1;var p=_o(f);return p==re||p==L||typeof f.message=="string"&&typeof f.name=="string"&&!b2(f)}function cfe(f){return typeof f=="number"&&Ru(f)}function uf(f){if(!bi(f))return!1;var p=_o(f);return p==be||p==Se||p==te||p==vt}function UU(f){return typeof f=="number"&&f==Ln(f)}function b_(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=M}function bi(f){var p=typeof f;return f!=null&&(p=="object"||p=="function")}function Ri(f){return f!=null&&typeof f=="object"}var FU=Yo?xo(Yo):fle;function lfe(f,p){return f===p||l7(f,p,S7(p))}function ufe(f,p,S){return S=typeof S=="function"?S:n,l7(f,p,S7(p),S)}function dfe(f){return zU(f)&&f!=+f}function ffe(f){if(Yle(f))throw new xn(s);return OL(f)}function hfe(f){return f===null}function pfe(f){return f==null}function zU(f){return typeof f=="number"||Ri(f)&&_o(f)==Ue}function b2(f){if(!Ri(f)||_o(f)!=je)return!1;var p=tp(f);if(p===null)return!0;var S=br.call(p,"constructor")&&p.constructor;return typeof S=="function"&&S instanceof S&&aw.call(S)==HT}var $7=Ic?xo(Ic):hle;function mfe(f){return UU(f)&&f>=-M&&f<=M}var HU=dm?xo(dm):ple;function x_(f){return typeof f=="string"||!In(f)&&Ri(f)&&_o(f)==He}function za(f){return typeof f=="symbol"||Ri(f)&&_o(f)==ct}var vw=Jd?xo(Jd):mle;function gfe(f){return f===n}function wfe(f){return Ri(f)&&to(f)==ot}function yfe(f){return Ri(f)&&_o(f)==qe}var vfe=d_(d7),bfe=d_(function(f,p){return f<=p});function WU(f){if(!f)return[];if(Xo(f))return x_(f)?Ua(f):Jo(f);if(np&&f[np])return F4(f[np]());var p=to(f),S=p==Ie?sw:p==ft?fm:bw;return S(f)}function df(f){if(!f)return f===0?f:0;if(f=Oc(f),f===B||f===-B){var p=f<0?-1:1;return p*W}return f===f?f:0}function Ln(f){var p=df(f),S=p%1;return p===p?S?p-S:p:0}function VU(f){return f?vm(Ln(f),0,P):0}function Oc(f){if(typeof f=="number")return f;if(za(f))return z;if(bi(f)){var p=typeof f.valueOf=="function"?f.valueOf():f;f=bi(p)?p+"":p}if(typeof f!="string")return f===0?f:+f;f=B4(f);var S=eo.test(f);return S||vo.test(f)?An(f.slice(2),S?2:8):yo.test(f)?z:+f}function qU(f){return Pu(f,ea(f))}function xfe(f){return f?vm(Ln(f),-M,M):f===0?f:0}function Or(f){return f==null?"":Fa(f)}var _fe=gw(function(f,p){if(y2(p)||Xo(p)){Pu(p,xs(p),f);return}for(var S in p)br.call(p,S)&&f2(f,S,p[S])}),GU=gw(function(f,p){Pu(p,ea(p),f)}),__=gw(function(f,p,S,q){Pu(p,ea(p),f,q)}),Afe=gw(function(f,p,S,q){Pu(p,xs(p),f,q)}),Efe=cf(i7);function Cfe(f,p){var S=R(f);return p==null?S:CL(S,p)}var Sfe=Vn(function(f,p){f=jr(f);var S=-1,q=p.length,J=q>2?p[2]:n;for(J&&Ao(p[0],p[1],J)&&(q=1);++S<q;)for(var oe=p[S],me=ea(oe),ye=-1,Ee=me.length;++ye<Ee;){var ze=me[ye],We=f[ze];(We===n||Ol(We,ep[ze])&&!br.call(f,ze))&&(f[ze]=oe[ze])}return f}),Tfe=Vn(function(f){return f.push(n,uU),ts(KU,n,f)});function Ife(f,p){return P4(f,an(p,3),Nu)}function kfe(f,p){return P4(f,an(p,3),o7)}function Rfe(f,p){return f==null?f:s7(f,an(p,3),ea)}function Nfe(f,p){return f==null?f:RL(f,an(p,3),ea)}function Pfe(f,p){return f&&Nu(f,an(p,3))}function Ofe(f,p){return f&&o7(f,an(p,3))}function Dfe(f){return f==null?[]:r_(f,xs(f))}function Mfe(f){return f==null?[]:r_(f,ea(f))}function j7(f,p,S){var q=f==null?n:bm(f,p);return q===n?S:q}function Bfe(f,p){return f!=null&&hU(f,p,sle)}function L7(f,p){return f!=null&&hU(f,p,ole)}var $fe=sU(function(f,p,S){p!=null&&typeof p.toString!="function"&&(p=cw.call(p)),f[p]=S},F7(ta)),jfe=sU(function(f,p,S){p!=null&&typeof p.toString!="function"&&(p=cw.call(p)),br.call(f,p)?f[p].push(S):f[p]=[S]},an),Lfe=Vn(p2);function xs(f){return Xo(f)?AL(f):u7(f)}function ea(f){return Xo(f)?AL(f,!0):gle(f)}function Ufe(f,p){var S={};return p=an(p,3),Nu(f,function(q,J,oe){of(S,p(q,J,oe),q)}),S}function Ffe(f,p){var S={};return p=an(p,3),Nu(f,function(q,J,oe){of(S,J,p(q,J,oe))}),S}var zfe=gw(function(f,p,S){i_(f,p,S)}),KU=gw(function(f,p,S,q){i_(f,p,S,q)}),Hfe=cf(function(f,p){var S={};if(f==null)return S;var q=!1;p=Xr(p,function(oe){return oe=ap(oe,f),q||(q=oe.length>1),oe}),Pu(f,E7(f),S),q&&(S=Rc(S,d|h|g,$le));for(var J=p.length;J--;)g7(S,p[J]);return S});function Wfe(f,p){return YU(f,v_(an(p)))}var Vfe=cf(function(f,p){return f==null?{}:yle(f,p)});function YU(f,p){if(f==null)return{};var S=Xr(E7(f),function(q){return[q]});return p=an(p),UL(f,S,function(q,J){return p(q,J[0])})}function qfe(f,p,S){p=ap(p,f);var q=-1,J=p.length;for(J||(J=1,f=n);++q<J;){var oe=f==null?n:f[Ou(p[q])];oe===n&&(q=J,oe=S),f=uf(oe)?oe.call(f):oe}return f}function Gfe(f,p,S){return f==null?f:g2(f,p,S)}function Kfe(f,p,S,q){return q=typeof q=="function"?q:n,f==null?f:g2(f,p,S,q)}var QU=cU(xs),ZU=cU(ea);function Yfe(f,p,S){var q=In(f),J=q||lp(f)||vw(f);if(p=an(p,4),S==null){var oe=f&&f.constructor;J?S=q?new oe:[]:bi(f)?S=uf(oe)?R(tp(f)):{}:S={}}return(J?as:Nu)(f,function(me,ye,Ee){return p(S,me,ye,Ee)}),S}function Qfe(f,p){return f==null?!0:g7(f,p)}function Zfe(f,p,S){return f==null?f:VL(f,p,v7(S))}function Jfe(f,p,S,q){return q=typeof q=="function"?q:n,f==null?f:VL(f,p,v7(S),q)}function bw(f){return f==null?[]:i2(f,xs(f))}function Xfe(f){return f==null?[]:i2(f,ea(f))}function ehe(f,p,S){return S===n&&(S=p,p=n),S!==n&&(S=Oc(S),S=S===S?S:0),p!==n&&(p=Oc(p),p=p===p?p:0),vm(Oc(f),p,S)}function the(f,p,S){return p=df(p),S===n?(S=p,p=0):S=df(S),f=Oc(f),ale(f,p,S)}function nhe(f,p,S){if(S&&typeof S!="boolean"&&Ao(f,p,S)&&(p=S=n),S===n&&(typeof p=="boolean"?(S=p,p=n):typeof f=="boolean"&&(S=f,f=n)),f===n&&p===n?(f=0,p=1):(f=df(f),p===n?(p=f,f=0):p=df(p)),f>p){var q=f;f=p,p=q}if(S||f%1||p%1){var J=u2();return bs(f+J*(p-f+Pr("1e-"+((J+"").length-1))),p)}return h7(f,p)}var rhe=ww(function(f,p,S){return p=p.toLowerCase(),f+(S?JU(p):p)});function JU(f){return U7(Or(f).toLowerCase())}function XU(f){return f=Or(f),f&&f.replace(es,L4).replace(e2,"")}function ihe(f,p,S){f=Or(f),p=Fa(p);var q=f.length;S=S===n?q:vm(Ln(S),0,q);var J=S;return S-=p.length,S>=0&&f.slice(S,J)==p}function she(f){return f=Or(f),f&&Pe.test(f)?f.replace(Si,s2):f}function ohe(f){return f=Or(f),f&&Kt.test(f)?f.replace(Lt,"\\$&"):f}var ahe=ww(function(f,p,S){return f+(S?"-":"")+p.toLowerCase()}),che=ww(function(f,p,S){return f+(S?" ":"")+p.toLowerCase()}),lhe=nU("toLowerCase");function uhe(f,p,S){f=Or(f),p=Ln(p);var q=p?Jh(f):0;if(!p||q>=p)return f;var J=(p-q)/2;return u_(pw(J),S)+f+u_(hw(J),S)}function dhe(f,p,S){f=Or(f),p=Ln(p);var q=p?Jh(f):0;return p&&q<p?f+u_(p-q,S):f}function fhe(f,p,S){f=Or(f),p=Ln(p);var q=p?Jh(f):0;return p&&q<p?u_(p-q,S)+f:f}function hhe(f,p,S){return S||p==null?p=0:p&&(p=+p),QT(Or(f).replace(Yt,""),p||0)}function phe(f,p,S){return(S?Ao(f,p,S):p===n)?p=1:p=Ln(p),p7(Or(f),p)}function mhe(){var f=arguments,p=Or(f[0]);return f.length<3?p:p.replace(f[1],f[2])}var ghe=ww(function(f,p,S){return f+(S?"_":"")+p.toLowerCase()});function whe(f,p,S){return S&&typeof S!="number"&&Ao(f,p,S)&&(p=S=n),S=S===n?P:S>>>0,S?(f=Or(f),f&&(typeof p=="string"||p!=null&&!$7(p))&&(p=Fa(p),!p&&ef(f))?cp(Ua(f),0,S):f.split(p,S)):[]}var yhe=ww(function(f,p,S){return f+(S?" ":"")+U7(p)});function vhe(f,p,S){return f=Or(f),S=S==null?0:vm(Ln(S),0,f.length),p=Fa(p),f.slice(S,S+p.length)==p}function bhe(f,p,S){var q=N.templateSettings;S&&Ao(f,p,S)&&(p=n),f=Or(f),p=__({},p,q,lU);var J=__({},p.imports,q.imports,lU),oe=xs(J),me=i2(J,oe),ye,Ee,ze=0,We=p.interpolate||ws,Ke="__p += '",yt=a2((p.escape||ws).source+"|"+We.source+"|"+(We===jt?Cr:ws).source+"|"+(p.evaluate||ws).source+"|$","g"),Wt="//# sourceURL="+(br.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++J1+"]")+`
`;f.replace(yt,function(un,Jn,cr,Ha,Eo,Wa){return cr||(cr=Ha),Ke+=f.slice(ze,Wa).replace(Wd,iw),Jn&&(ye=!0,Ke+=`' +
__e(`+Jn+`) +
'`),Eo&&(Ee=!0,Ke+=`';
`+Eo+`;
__p += '`),cr&&(Ke+=`' +
((__t = (`+cr+`)) == null ? '' : __t) +
'`),ze=Wa+un.length,un}),Ke+=`';
`;var ln=br.call(p,"variable")&&p.variable;if(!ln)Ke=`with (obj) {
`+Ke+`
}
`;else if(ar.test(ln))throw new xn(a);Ke=(Ee?Ke.replace(St,""):Ke).replace(qr,"$1").replace(Bn,"$1;"),Ke="function("+(ln||"obj")+`) {
`+(ln?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(ye?", __e = _.escape":"")+(Ee?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Ke+`return __p
}`;var zn=tF(function(){return fr(oe,Wt+"return "+Ke).apply(n,me)});if(zn.source=Ke,B7(zn))throw zn;return zn}function xhe(f){return Or(f).toLowerCase()}function _he(f){return Or(f).toUpperCase()}function Ahe(f,p,S){if(f=Or(f),f&&(S||p===n))return B4(f);if(!f||!(p=Fa(p)))return f;var q=Ua(f),J=Ua(p),oe=$4(q,J),me=rw(q,J)+1;return cp(q,oe,me).join("")}function Ehe(f,p,S){if(f=Or(f),f&&(S||p===n))return f.slice(0,W4(f)+1);if(!f||!(p=Fa(p)))return f;var q=Ua(f),J=rw(q,Ua(p))+1;return cp(q,0,J).join("")}function Che(f,p,S){if(f=Or(f),f&&(S||p===n))return f.replace(Yt,"");if(!f||!(p=Fa(p)))return f;var q=Ua(f),J=$4(q,Ua(p));return cp(q,J).join("")}function She(f,p){var S=V,q=Y;if(bi(p)){var J="separator"in p?p.separator:J;S="length"in p?Ln(p.length):S,q="omission"in p?Fa(p.omission):q}f=Or(f);var oe=f.length;if(ef(f)){var me=Ua(f);oe=me.length}if(S>=oe)return f;var ye=S-Jh(q);if(ye<1)return q;var Ee=me?cp(me,0,ye).join(""):f.slice(0,ye);if(J===n)return Ee+q;if(me&&(ye+=Ee.length-ye),$7(J)){if(f.slice(ye).search(J)){var ze,We=Ee;for(J.global||(J=a2(J.source,Or(jn.exec(J))+"g")),J.lastIndex=0;ze=J.exec(We);)var Ke=ze.index;Ee=Ee.slice(0,Ke===n?ye:Ke)}}else if(f.indexOf(Fa(J),ye)!=ye){var yt=Ee.lastIndexOf(J);yt>-1&&(Ee=Ee.slice(0,yt))}return Ee+q}function The(f){return f=Or(f),f&&sn.test(f)?f.replace($n,V4):f}var Ihe=ww(function(f,p,S){return f+(S?" ":"")+p.toUpperCase()}),U7=nU("toUpperCase");function eF(f,p,S){return f=Or(f),p=S?n:p,p===n?U4(f)?jT(f):Gh(f):f.match(p)||[]}var tF=Vn(function(f,p){try{return ts(f,n,p)}catch(S){return B7(S)?S:new xn(S)}}),khe=cf(function(f,p){return as(p,function(S){S=Ou(S),of(f,S,D7(f[S],f))}),f});function Rhe(f){var p=f==null?0:f.length,S=an();return f=p?Xr(f,function(q){if(typeof q[1]!="function")throw new Qo(o);return[S(q[0]),q[1]]}):[],Vn(function(q){for(var J=-1;++J<p;){var oe=f[J];if(ts(oe[0],this,q))return ts(oe[1],this,q)}})}function Nhe(f){return nle(Rc(f,d))}function F7(f){return function(){return f}}function Phe(f,p){return f==null||f!==f?p:f}var Ohe=iU(),Dhe=iU(!0);function ta(f){return f}function z7(f){return DL(typeof f=="function"?f:Rc(f,d))}function Mhe(f){return BL(Rc(f,d))}function Bhe(f,p){return $L(f,Rc(p,d))}var $he=Vn(function(f,p){return function(S){return p2(S,f,p)}}),jhe=Vn(function(f,p){return function(S){return p2(f,S,p)}});function H7(f,p,S){var q=xs(p),J=r_(p,q);S==null&&!(bi(p)&&(J.length||!q.length))&&(S=p,p=f,f=this,J=r_(p,xs(p)));var oe=!(bi(S)&&"chain"in S)||!!S.chain,me=uf(f);return as(J,function(ye){var Ee=p[ye];f[ye]=Ee,me&&(f.prototype[ye]=function(){var ze=this.__chain__;if(oe||ze){var We=f(this.__wrapped__),Ke=We.__actions__=Jo(this.__actions__);return Ke.push({func:Ee,args:arguments,thisArg:f}),We.__chain__=ze,We}return Ee.apply(f,kl([this.value()],arguments))})}),f}function Lhe(){return Zn._===this&&(Zn._=Y4),this}function W7(){}function Uhe(f){return f=Ln(f),Vn(function(p){return jL(p,f)})}var Fhe=x7(Xr),zhe=x7(R4),Hhe=x7(t2);function nF(f){return I7(f)?n2(Ou(f)):vle(f)}function Whe(f){return function(p){return f==null?n:bm(f,p)}}var Vhe=oU(),qhe=oU(!0);function V7(){return[]}function q7(){return!1}function Ghe(){return{}}function Khe(){return""}function Yhe(){return!0}function Qhe(f,p){if(f=Ln(f),f<1||f>M)return[];var S=P,q=bs(f,P);p=an(p),f-=P;for(var J=tw(q,p);++S<f;)p(S);return J}function Zhe(f){return In(f)?Xr(f,Ou):za(f)?[f]:Jo(_U(Or(f)))}function Jhe(f){var p=++zT;return Or(f)+p}var Xhe=l_(function(f,p){return f+p},0),epe=_7("ceil"),tpe=l_(function(f,p){return f/p},1),npe=_7("floor");function rpe(f){return f&&f.length?n_(f,ta,a7):n}function ipe(f,p){return f&&f.length?n_(f,an(p,2),a7):n}function spe(f){return D4(f,ta)}function ope(f,p){return D4(f,an(p,2))}function ape(f){return f&&f.length?n_(f,ta,d7):n}function cpe(f,p){return f&&f.length?n_(f,an(p,2),d7):n}var lpe=l_(function(f,p){return f*p},1),upe=_7("round"),dpe=l_(function(f,p){return f-p},0);function fpe(f){return f&&f.length?Yh(f,ta):0}function hpe(f,p){return f&&f.length?Yh(f,an(p,2)):0}return N.after=Mde,N.ary=OU,N.assign=_fe,N.assignIn=GU,N.assignInWith=__,N.assignWith=Afe,N.at=Efe,N.before=DU,N.bind=D7,N.bindAll=khe,N.bindKey=MU,N.castArray=Gde,N.chain=RU,N.chunk=nue,N.compact=rue,N.concat=iue,N.cond=Rhe,N.conforms=Nhe,N.constant=F7,N.countBy=fde,N.create=Cfe,N.curry=BU,N.curryRight=$U,N.debounce=jU,N.defaults=Sfe,N.defaultsDeep=Tfe,N.defer=Bde,N.delay=$de,N.difference=sue,N.differenceBy=oue,N.differenceWith=aue,N.drop=cue,N.dropRight=lue,N.dropRightWhile=uue,N.dropWhile=due,N.fill=fue,N.filter=pde,N.flatMap=wde,N.flatMapDeep=yde,N.flatMapDepth=vde,N.flatten=SU,N.flattenDeep=hue,N.flattenDepth=pue,N.flip=jde,N.flow=Ohe,N.flowRight=Dhe,N.fromPairs=mue,N.functions=Dfe,N.functionsIn=Mfe,N.groupBy=bde,N.initial=wue,N.intersection=yue,N.intersectionBy=vue,N.intersectionWith=bue,N.invert=$fe,N.invertBy=jfe,N.invokeMap=_de,N.iteratee=z7,N.keyBy=Ade,N.keys=xs,N.keysIn=ea,N.map=g_,N.mapKeys=Ufe,N.mapValues=Ffe,N.matches=Mhe,N.matchesProperty=Bhe,N.memoize=y_,N.merge=zfe,N.mergeWith=KU,N.method=$he,N.methodOf=jhe,N.mixin=H7,N.negate=v_,N.nthArg=Uhe,N.omit=Hfe,N.omitBy=Wfe,N.once=Lde,N.orderBy=Ede,N.over=Fhe,N.overArgs=Ude,N.overEvery=zhe,N.overSome=Hhe,N.partial=M7,N.partialRight=LU,N.partition=Cde,N.pick=Vfe,N.pickBy=YU,N.property=nF,N.propertyOf=Whe,N.pull=Eue,N.pullAll=IU,N.pullAllBy=Cue,N.pullAllWith=Sue,N.pullAt=Tue,N.range=Vhe,N.rangeRight=qhe,N.rearg=Fde,N.reject=Ide,N.remove=Iue,N.rest=zde,N.reverse=P7,N.sampleSize=Rde,N.set=Gfe,N.setWith=Kfe,N.shuffle=Nde,N.slice=kue,N.sortBy=Dde,N.sortedUniq=Bue,N.sortedUniqBy=$ue,N.split=whe,N.spread=Hde,N.tail=jue,N.take=Lue,N.takeRight=Uue,N.takeRightWhile=Fue,N.takeWhile=zue,N.tap=rde,N.throttle=Wde,N.thru=m_,N.toArray=WU,N.toPairs=QU,N.toPairsIn=ZU,N.toPath=Zhe,N.toPlainObject=qU,N.transform=Yfe,N.unary=Vde,N.union=Hue,N.unionBy=Wue,N.unionWith=Vue,N.uniq=que,N.uniqBy=Gue,N.uniqWith=Kue,N.unset=Qfe,N.unzip=O7,N.unzipWith=kU,N.update=Zfe,N.updateWith=Jfe,N.values=bw,N.valuesIn=Xfe,N.without=Yue,N.words=eF,N.wrap=qde,N.xor=Que,N.xorBy=Zue,N.xorWith=Jue,N.zip=Xue,N.zipObject=ede,N.zipObjectDeep=tde,N.zipWith=nde,N.entries=QU,N.entriesIn=ZU,N.extend=GU,N.extendWith=__,H7(N,N),N.add=Xhe,N.attempt=tF,N.camelCase=rhe,N.capitalize=JU,N.ceil=epe,N.clamp=ehe,N.clone=Kde,N.cloneDeep=Qde,N.cloneDeepWith=Zde,N.cloneWith=Yde,N.conformsTo=Jde,N.deburr=XU,N.defaultTo=Phe,N.divide=tpe,N.endsWith=ihe,N.eq=Ol,N.escape=she,N.escapeRegExp=ohe,N.every=hde,N.find=mde,N.findIndex=EU,N.findKey=Ife,N.findLast=gde,N.findLastIndex=CU,N.findLastKey=kfe,N.floor=npe,N.forEach=NU,N.forEachRight=PU,N.forIn=Rfe,N.forInRight=Nfe,N.forOwn=Pfe,N.forOwnRight=Ofe,N.get=j7,N.gt=Xde,N.gte=efe,N.has=Bfe,N.hasIn=L7,N.head=TU,N.identity=ta,N.includes=xde,N.indexOf=gue,N.inRange=the,N.invoke=Lfe,N.isArguments=Am,N.isArray=In,N.isArrayBuffer=tfe,N.isArrayLike=Xo,N.isArrayLikeObject=Fi,N.isBoolean=nfe,N.isBuffer=lp,N.isDate=rfe,N.isElement=ife,N.isEmpty=sfe,N.isEqual=ofe,N.isEqualWith=afe,N.isError=B7,N.isFinite=cfe,N.isFunction=uf,N.isInteger=UU,N.isLength=b_,N.isMap=FU,N.isMatch=lfe,N.isMatchWith=ufe,N.isNaN=dfe,N.isNative=ffe,N.isNil=pfe,N.isNull=hfe,N.isNumber=zU,N.isObject=bi,N.isObjectLike=Ri,N.isPlainObject=b2,N.isRegExp=$7,N.isSafeInteger=mfe,N.isSet=HU,N.isString=x_,N.isSymbol=za,N.isTypedArray=vw,N.isUndefined=gfe,N.isWeakMap=wfe,N.isWeakSet=yfe,N.join=xue,N.kebabCase=ahe,N.last=Pc,N.lastIndexOf=_ue,N.lowerCase=che,N.lowerFirst=lhe,N.lt=vfe,N.lte=bfe,N.max=rpe,N.maxBy=ipe,N.mean=spe,N.meanBy=ope,N.min=ape,N.minBy=cpe,N.stubArray=V7,N.stubFalse=q7,N.stubObject=Ghe,N.stubString=Khe,N.stubTrue=Yhe,N.multiply=lpe,N.nth=Aue,N.noConflict=Lhe,N.noop=W7,N.now=w_,N.pad=uhe,N.padEnd=dhe,N.padStart=fhe,N.parseInt=hhe,N.random=nhe,N.reduce=Sde,N.reduceRight=Tde,N.repeat=phe,N.replace=mhe,N.result=qfe,N.round=upe,N.runInContext=_e,N.sample=kde,N.size=Pde,N.snakeCase=ghe,N.some=Ode,N.sortedIndex=Rue,N.sortedIndexBy=Nue,N.sortedIndexOf=Pue,N.sortedLastIndex=Oue,N.sortedLastIndexBy=Due,N.sortedLastIndexOf=Mue,N.startCase=yhe,N.startsWith=vhe,N.subtract=dpe,N.sum=fpe,N.sumBy=hpe,N.template=bhe,N.times=Qhe,N.toFinite=df,N.toInteger=Ln,N.toLength=VU,N.toLower=xhe,N.toNumber=Oc,N.toSafeInteger=xfe,N.toString=Or,N.toUpper=_he,N.trim=Ahe,N.trimEnd=Ehe,N.trimStart=Che,N.truncate=She,N.unescape=The,N.uniqueId=Jhe,N.upperCase=Ihe,N.upperFirst=U7,N.each=NU,N.eachRight=PU,N.first=TU,H7(N,function(){var f={};return Nu(N,function(p,S){br.call(N.prototype,S)||(f[S]=p)}),f}(),{chain:!1}),N.VERSION=r,as(["bind","bindKey","curry","curryRight","partial","partialRight"],function(f){N[f].placeholder=N}),as(["drop","take"],function(f,p){le.prototype[f]=function(S){S=S===n?1:ki(Ln(S),0);var q=this.__filtered__&&!p?new le(this):this.clone();return q.__filtered__?q.__takeCount__=bs(S,q.__takeCount__):q.__views__.push({size:bs(S,P),type:f+(q.__dir__<0?"Right":"")}),q},le.prototype[f+"Right"]=function(S){return this.reverse()[f](S).reverse()}}),as(["filter","map","takeWhile"],function(f,p){var S=p+1,q=S==E||S==I;le.prototype[f]=function(J){var oe=this.clone();return oe.__iteratees__.push({iteratee:an(J,3),type:S}),oe.__filtered__=oe.__filtered__||q,oe}}),as(["head","last"],function(f,p){var S="take"+(p?"Right":"");le.prototype[f]=function(){return this[S](1).value()[0]}}),as(["initial","tail"],function(f,p){var S="drop"+(p?"":"Right");le.prototype[f]=function(){return this.__filtered__?new le(this):this[S](1)}}),le.prototype.compact=function(){return this.filter(ta)},le.prototype.find=function(f){return this.filter(f).head()},le.prototype.findLast=function(f){return this.reverse().find(f)},le.prototype.invokeMap=Vn(function(f,p){return typeof f=="function"?new le(this):this.map(function(S){return p2(S,f,p)})}),le.prototype.reject=function(f){return this.filter(v_(an(f)))},le.prototype.slice=function(f,p){f=Ln(f);var S=this;return S.__filtered__&&(f>0||p<0)?new le(S):(f<0?S=S.takeRight(-f):f&&(S=S.drop(f)),p!==n&&(p=Ln(p),S=p<0?S.dropRight(-p):S.take(p-f)),S)},le.prototype.takeRightWhile=function(f){return this.reverse().takeWhile(f).reverse()},le.prototype.toArray=function(){return this.take(P)},Nu(le.prototype,function(f,p){var S=/^(?:filter|find|map|reject)|While$/.test(p),q=/^(?:head|last)$/.test(p),J=N[q?"take"+(p=="last"?"Right":""):p],oe=q||/^find/.test(p);J&&(N.prototype[p]=function(){var me=this.__wrapped__,ye=q?[1]:arguments,Ee=me instanceof le,ze=ye[0],We=Ee||In(me),Ke=function(Jn){var cr=J.apply(N,kl([Jn],ye));return q&&yt?cr[0]:cr};We&&S&&typeof ze=="function"&&ze.length!=1&&(Ee=We=!1);var yt=this.__chain__,Wt=!!this.__actions__.length,ln=oe&&!yt,zn=Ee&&!Wt;if(!oe&&We){me=zn?me:new le(this);var un=f.apply(me,ye);return un.__actions__.push({func:m_,args:[Ke],thisArg:n}),new Q(un,yt)}return ln&&zn?f.apply(this,ye):(un=this.thru(Ke),ln?q?un.value()[0]:un.value():un)})}),as(["pop","push","shift","sort","splice","unshift"],function(f){var p=tf[f],S=/^(?:push|sort|unshift)$/.test(f)?"tap":"thru",q=/^(?:pop|shift)$/.test(f);N.prototype[f]=function(){var J=arguments;if(q&&!this.__chain__){var oe=this.value();return p.apply(In(oe)?oe:[],J)}return this[S](function(me){return p.apply(In(me)?me:[],J)})}}),Nu(le.prototype,function(f,p){var S=N[p];if(S){var q=S.name+"";br.call(rp,q)||(rp[q]=[]),rp[q].push({name:p,func:S})}}),rp[c_(n,T).name]=[{name:"wrapper",func:n}],le.prototype.clone=Be,le.prototype.reverse=ht,le.prototype.value=Tn,N.prototype.at=ide,N.prototype.chain=sde,N.prototype.commit=ode,N.prototype.next=ade,N.prototype.plant=lde,N.prototype.reverse=ude,N.prototype.toJSON=N.prototype.valueOf=N.prototype.value=dde,N.prototype.first=N.prototype.head,np&&(N.prototype[np]=cde),N},Xh=LT();yi?((yi.exports=Xh)._=Xh,$r._=Xh):Zn._=Xh}).call($2)})(qN,qN.exports);var EAe=Object.defineProperty,CAe=Object.defineProperties,SAe=Object.getOwnPropertyDescriptors,kW=Object.getOwnPropertySymbols,TAe=Object.prototype.hasOwnProperty,IAe=Object.prototype.propertyIsEnumerable,RW=(t,e,n)=>e in t?EAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Y_=(t,e)=>{for(var n in e||(e={}))TAe.call(e,n)&&RW(t,n,e[n]);if(kW)for(var n of kW(e))IAe.call(e,n)&&RW(t,n,e[n]);return t},kAe=(t,e)=>CAe(t,SAe(e));function lh(t,e,n){var r;const i=I3(t);return((r=e.rpcMap)==null?void 0:r[i.reference])||`${AAe}?chainId=${i.namespace}:${i.reference}&projectId=${n}`}function C1(t){return t.includes(":")?t.split(":")[1]:t}function gX(t){return t.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function RAe(t,e){const n=Object.keys(e.namespaces).filter(i=>i.includes(t));if(!n.length)return[];const r=[];return n.forEach(i=>{const s=e.namespaces[i].accounts;r.push(...s)}),r}function ZI(t={},e={}){const n=NW(t),r=NW(e);return qN.exports.merge(n,r)}function NW(t){var e,n,r,i;const s={};if(!g5(t))return s;for(const[o,a]of Object.entries(t)){const c=WM(o)?[o]:a.chains,l=a.methods||[],u=a.events||[],d=a.rpcMap||{},h=r3(o);s[h]=kAe(Y_(Y_({},s[h]),a),{chains:LA(c,(e=s[h])==null?void 0:e.chains),methods:LA(l,(n=s[h])==null?void 0:n.methods),events:LA(u,(r=s[h])==null?void 0:r.events),rpcMap:Y_(Y_({},d),(i=s[h])==null?void 0:i.rpcMap)})}return s}function NAe(t){return t.includes(":")?t.split(":")[2]:t}function PW(t){const e={};for(const[n,r]of Object.entries(t)){const i=r.methods||[],s=r.events||[],o=r.accounts||[],a=WM(n)?[n]:r.chains?r.chains:gX(r.accounts);e[n]={chains:a,methods:i,events:s,accounts:o}}return e}function JI(t){return typeof t=="number"?t:t.includes("0x")?parseInt(t,16):(t=t.includes(":")?t.split(":")[1]:t,isNaN(Number(t))?t:Number(t))}const wX={},Qr=t=>wX[t],XI=(t,e)=>{wX[t]=e};class PAe{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=Qr("events"),this.client=Qr("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,n){this.httpProviders[e]||this.setHttpProvider(e,n),this.chainId=e,this.events.emit(Od.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;const i=C1(n);e[i]=this.createHttpProvider(i,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||lh(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pd(new Nh(r,Qr("disableProviderPing")))}}var OAe=Object.defineProperty,DAe=Object.defineProperties,MAe=Object.getOwnPropertyDescriptors,OW=Object.getOwnPropertySymbols,BAe=Object.prototype.hasOwnProperty,$Ae=Object.prototype.propertyIsEnumerable,DW=(t,e,n)=>e in t?OAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,MW=(t,e)=>{for(var n in e||(e={}))BAe.call(e,n)&&DW(t,n,e[n]);if(OW)for(var n of OW(e))$Ae.call(e,n)&&DW(t,n,e[n]);return t},BW=(t,e)=>DAe(t,MAe(e));class jAe{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=Qr("events"),this.client=Qr("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());case"wallet_getCapabilities":return await this.getCapabilities(e)}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,n){this.httpProviders[e]||this.setHttpProvider(parseInt(e),n),this.chainId=parseInt(e),this.events.emit(Od.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,n){const r=n||lh(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pd(new Nh(r,Qr("disableProviderPing")))}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;const i=parseInt(C1(n));e[i]=this.createHttpProvider(i,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}async handleSwitchChain(e){var n,r;let i=e.request.params?(n=e.request.params[0])==null?void 0:n.chainId:"0x0";i=i.startsWith("0x")?i:`0x${i}`;const s=parseInt(i,16);if(this.isChainApproved(s))this.setDefaultChain(`${s}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:i}]},chainId:(r=this.namespace.chains)==null?void 0:r[0]}),this.setDefaultChain(`${s}`);else throw new Error(`Failed to switch to chain 'eip155:${s}'. 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}`)}async getCapabilities(e){var n,r,i;const s=(r=(n=e.request)==null?void 0:n.params)==null?void 0:r[0];if(!s)throw new Error("Missing address parameter in `wallet_getCapabilities` request");const o=this.client.session.get(e.topic),a=((i=o==null?void 0:o.sessionProperties)==null?void 0:i.capabilities)||{};if(a!=null&&a[s])return a==null?void 0:a[s];const c=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:BW(MW({},o.sessionProperties||{}),{capabilities:BW(MW({},a||{}),{[s]:c})})})}catch(l){console.warn("Failed to update session with capabilities",l)}return c}}class LAe{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=Qr("events"),this.client=Qr("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,n){this.httpProviders[e]||this.setHttpProvider(e,n),this.chainId=e,this.events.emit(Od.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(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;const i=C1(n);e[i]=this.createHttpProvider(i,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||lh(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pd(new Nh(r,Qr("disableProviderPing")))}}class UAe{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=Qr("events"),this.client=Qr("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,n){this.httpProviders[e]||this.setHttpProvider(e,n),this.chainId=e,this.events.emit(Od.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;const i=C1(n);e[i]=this.createHttpProvider(i,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||lh(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pd(new Nh(r,Qr("disableProviderPing")))}}class FAe{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=Qr("events"),this.client=Qr("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,n){this.httpProviders[e]||this.setHttpProvider(e,n),this.chainId=e,this.events.emit(Od.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{const r=this.getCardanoRPCUrl(n),i=C1(n);e[i]=this.createHttpProvider(i,r)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}getCardanoRPCUrl(e){const n=this.namespace.rpcMap;if(n)return n[e]}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||this.getCardanoRPCUrl(e);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pd(new Nh(r,Qr("disableProviderPing")))}}class zAe{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=Qr("events"),this.client=Qr("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,n){this.httpProviders[e]||this.setHttpProvider(e,n),this.chainId=e,this.events.emit(Od.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(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;const i=C1(n);e[i]=this.createHttpProvider(i,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||lh(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pd(new Nh(r,Qr("disableProviderPing")))}}class HAe{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=Qr("events"),this.client=Qr("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,n){this.httpProviders[e]||this.setHttpProvider(e,n),this.chainId=e,this.events.emit(Od.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(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;const i=C1(n);e[i]=this.createHttpProvider(i,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||lh(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pd(new Nh(r,Qr("disableProviderPing")))}}class WAe{constructor(e){this.name="near",this.namespace=e.namespace,this.events=Qr("events"),this.client=Qr("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,n){if(this.chainId=e,!this.httpProviders[e]){const r=n||lh(`${this.name}:${e}`,this.namespace);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,r)}this.events.emit(Od.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(n=>{var r;e[n]=this.createHttpProvider(n,(r=this.namespace.rpcMap)==null?void 0:r[n])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||lh(e,this.namespace);return typeof r>"u"?void 0:new Pd(new Nh(r,Qr("disableProviderPing")))}}class VAe{constructor(e){this.name=Lw,this.namespace=e.namespace,this.events=Qr("events"),this.client=Qr("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(e.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(e.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(e.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(e.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider(e.chainId).request(e.request)}setDefaultChain(e,n){this.httpProviders[e]||this.setHttpProvider(e,n),this.chainId=e,this.events.emit(Od.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(n=>n.split(":")[1]===this.chainId.toString()).map(n=>n.split(":")[2]))]:[]}createHttpProviders(){var e,n;const r={};return(n=(e=this.namespace)==null?void 0:e.accounts)==null||n.forEach(i=>{const s=I3(i);r[`${s.namespace}:${s.reference}`]=this.createHttpProvider(i)}),r}getHttpProvider(e){const n=this.httpProviders[e];if(typeof n>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return n}setHttpProvider(e,n){const r=this.createHttpProvider(e,n);r&&(this.httpProviders[e]=r)}createHttpProvider(e,n){const r=n||lh(e,this.namespace,this.client.core.projectId);if(!r)throw new Error(`No RPC url provided for chainId: ${e}`);return new Pd(new Nh(r,Qr("disableProviderPing")))}}var qAe=Object.defineProperty,GAe=Object.defineProperties,KAe=Object.getOwnPropertyDescriptors,$W=Object.getOwnPropertySymbols,YAe=Object.prototype.hasOwnProperty,QAe=Object.prototype.propertyIsEnumerable,jW=(t,e,n)=>e in t?qAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Q_=(t,e)=>{for(var n in e||(e={}))YAe.call(e,n)&&jW(t,n,e[n]);if($W)for(var n of $W(e))QAe.call(e,n)&&jW(t,n,e[n]);return t},ek=(t,e)=>GAe(t,KAe(e));class eB{constructor(e){this.events=new IM,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:C6(T6({level:(e==null?void 0:e.logger)||TW})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const n=new eB(e);return await n.initialize(),n}async request(e,n,r){const[i,s]=this.validateChain(n);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(i).request({request:Q_({},e),chainId:`${i}:${s}`,topic:this.session.topic,expiry:r})}sendAsync(e,n,r,i){const s=new Date().getTime();this.request(e,r,i).then(o=>n(null,MS(s,o))).catch(o=>n(o,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:Lr("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)}async authenticate(e){if(!this.client)throw new Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();const{uri:n,response:r}=await this.client.authenticate(e);n&&(this.uri=n,this.events.emit("display_uri",n));const i=await r();if(this.session=i.session,this.session){const s=PW(this.session.namespaces);this.namespaces=ZI(this.namespaces,s),this.persist("namespaces",this.namespaces),this.onConnect()}return i}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}removeListener(e,n){this.events.removeListener(e,n)}off(e,n){this.events.off(e,n)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let n=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(n>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:r,approval:i}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});r&&(this.uri=r,this.events.emit("display_uri",r)),await i().then(s=>{this.session=s;const o=PW(s.namespaces);this.namespaces=ZI(this.namespaces,o),this.persist("namespaces",this.namespaces)}).catch(s=>{if(s.message!==mX)throw s;n++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,n){try{if(!this.session)return;const[r,i]=this.validateChain(e),s=this.getProvider(r);s.name===Lw?s.setDefaultChain(`${r}:${i}`,n):s.setDefaultChain(i,n)}catch(r){if(!/Please call connect/.test(r.message))throw r}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const n=this.client.pairing.getAll();if(hd(n)){for(const r of n)e.deletePairings?this.client.core.expirer.set(r.topic,0):await this.client.core.relayer.subscriber.unsubscribe(r.topic);this.logger.info(`Inactive pairings cleared: ${n.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 XM.init({logger:this.providerOpts.logger||TW,relayUrl:this.providerOpts.relayUrl||bAe,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(n=>r3(n)))];XI("client",this.client),XI("events",this.events),XI("disableProviderPing",this.disableProviderPing),e.forEach(n=>{if(!this.session)return;const r=RAe(n,this.session),i=gX(r),s=ZI(this.namespaces,this.optionalNamespaces),o=ek(Q_({},s[n]),{accounts:r,chains:i});switch(n){case"eip155":this.rpcProviders[n]=new jAe({namespace:o});break;case"solana":this.rpcProviders[n]=new LAe({namespace:o});break;case"cosmos":this.rpcProviders[n]=new UAe({namespace:o});break;case"polkadot":this.rpcProviders[n]=new PAe({namespace:o});break;case"cip34":this.rpcProviders[n]=new FAe({namespace:o});break;case"elrond":this.rpcProviders[n]=new zAe({namespace:o});break;case"multiversx":this.rpcProviders[n]=new HAe({namespace:o});break;case"near":this.rpcProviders[n]=new WAe({namespace:o});break;default:this.rpcProviders[Lw]?this.rpcProviders[Lw].updateNamespace(o):this.rpcProviders[Lw]=new VAe({namespace:o})}})}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:n}=e,{event:r}=n;if(r.name==="accountsChanged"){const i=r.data;i&&hd(i)&&this.events.emit("accountsChanged",i.map(NAe))}else if(r.name==="chainChanged"){const i=n.chainId,s=n.event.data,o=r3(i),a=JI(i)!==JI(s)?`${o}:${JI(s)}`:i;this.onChainChanged(a)}else this.events.emit(r.name,r.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:n})=>{var r;const{namespaces:i}=n,s=(r=this.client)==null?void 0:r.session.get(e);this.session=ek(Q_({},s),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:n})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",ek(Q_({},Lr("USER_DISCONNECTED")),{data:e.topic}))}),this.on(Od.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[Lw]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var n;this.getProvider(e).updateNamespace((n=this.session)==null?void 0:n.namespaces[e])})}setNamespaces(e){const{namespaces:n,optionalNamespaces:r,sessionProperties:i}=e;n&&Object.keys(n).length&&(this.namespaces=n),r&&Object.keys(r).length&&(this.optionalNamespaces=r),this.sessionProperties=i,this.persist("namespaces",n),this.persist("optionalNamespaces",r)}validateChain(e){const[n,r]=(e==null?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[n,r];if(n&&!Object.keys(this.namespaces||{}).map(o=>r3(o)).includes(n))throw new Error(`Namespace '${n}' is not configured. Please call connect() first with namespace config.`);if(n&&r)return[n,r];const i=r3(Object.keys(this.namespaces)[0]),s=this.rpcProviders[i].getDefaultChain();return[i,s]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,n=!1){if(!this.namespaces)return;const[r,i]=this.validateChain(e);i&&(n||this.getProvider(r).setDefaultChain(i),this.namespaces[r]?this.namespaces[r].defaultChain=i:this.namespaces[`${r}:${i}`]?this.namespaces[`${r}:${i}`].defaultChain=i:this.namespaces[`${r}:${i}`]={defaultChain:i},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i))}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,n){this.client.core.storage.setItem(`${IW}/${e}`,n)}async getFromStore(e){return await this.client.core.storage.getItem(`${IW}/${e}`)}}const ZAe=eB,JAe="wc",XAe="ethereum_provider",eEe=`${JAe}@2:${XAe}:`,tEe="https://rpc.walletconnect.com/v1/",tC=["eth_sendTransaction","personal_sign"],tB=["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","wallet_sendCalls","wallet_getCapabilities","wallet_getCallsStatus","wallet_showCallsStatus"],nC=["chainChanged","accountsChanged"],yX=["chainChanged","accountsChanged","message","disconnect","connect"];var nEe=Object.defineProperty,rEe=Object.defineProperties,iEe=Object.getOwnPropertyDescriptors,LW=Object.getOwnPropertySymbols,sEe=Object.prototype.hasOwnProperty,oEe=Object.prototype.propertyIsEnumerable,UW=(t,e,n)=>e in t?nEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Uw=(t,e)=>{for(var n in e||(e={}))sEe.call(e,n)&&UW(t,n,e[n]);if(LW)for(var n of LW(e))oEe.call(e,n)&&UW(t,n,e[n]);return t},tk=(t,e)=>rEe(t,iEe(e));function rC(t){return Number(t[0].split(":")[1])}function Z_(t){return`0x${t.toString(16)}`}function aEe(t){const{chains:e,optionalChains:n,methods:r,optionalMethods:i,events:s,optionalEvents:o,rpcMap:a}=t;if(!hd(e))throw new Error("Invalid chains");const c={chains:e,methods:r||tC,events:s||nC,rpcMap:Uw({},e.length?{[rC(e)]:a[rC(e)]}:{})},l=s==null?void 0:s.filter(g=>!nC.includes(g)),u=r==null?void 0:r.filter(g=>!tC.includes(g));if(!n&&!o&&!i&&!(l!=null&&l.length)&&!(u!=null&&u.length))return{required:e.length?c:void 0};const d=(l==null?void 0:l.length)&&(u==null?void 0:u.length)||!n,h={chains:[...new Set(d?c.chains.concat(n||[]):n)],methods:[...new Set(c.methods.concat(i!=null&&i.length?i:tB))],events:[...new Set(c.events.concat(o!=null&&o.length?o:yX))],rpcMap:a};return{required:e.length?c:void 0,optional:n.length?h:void 0}}let vX=class bX{constructor(){this.events=new hc.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=eEe,this.on=(e,n)=>(this.events.on(e,n),this),this.once=(e,n)=>(this.events.once(e,n),this),this.removeListener=(e,n)=>(this.events.removeListener(e,n),this),this.off=(e,n)=>(this.events.off(e,n),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const n=new bX;return await n.initialize(e),n}async request(e,n){return await this.signer.request(e,this.formatChainId(this.chainId),n)}sendAsync(e,n,r){this.signer.sendAsync(e,n,this.formatChainId(this.chainId),r)}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:n,optional:r}=aEe(this.rpc);try{const i=await new Promise(async(o,a)=>{var c;this.rpc.showQrModal&&((c=this.modal)==null||c.subscribeModal(l=>{!l.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),a(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(tk(Uw({namespaces:Uw({},n&&{[this.namespace]:n})},r&&{optionalNamespaces:{[this.namespace]:r}}),{pairingTopic:e==null?void 0:e.pairingTopic})).then(l=>{o(l)}).catch(l=>{a(new Error(l.message))})});if(!i)return;const s=Vz(i.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:s),this.setAccounts(s),this.events.emit("connect",{chainId:Z_(this.chainId)})}catch(i){throw this.signer.logger.error(i),i}finally{this.modal&&this.modal.closeModal()}}async authenticate(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts({chains:e==null?void 0:e.chains});try{const n=await new Promise(async(i,s)=>{var o;this.rpc.showQrModal&&((o=this.modal)==null||o.subscribeModal(a=>{!a.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),s(new Error("Connection request reset. Please try again.")))})),await this.signer.authenticate(tk(Uw({},e),{chains:this.rpc.chains})).then(a=>{i(a)}).catch(a=>{s(new Error(a.message))})}),r=n.session;if(r){const i=Vz(r.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:i),this.setAccounts(i),this.events.emit("connect",{chainId:Z_(this.chainId)})}return n}catch(n){throw this.signer.logger.error(n),n}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:n}=e,{event:r}=n;r.name==="accountsChanged"?(this.accounts=this.parseAccounts(r.data),this.events.emit("accountsChanged",this.accounts)):r.name==="chainChanged"?this.setChainId(this.formatChainId(r.data)):this.events.emit(r.name,r.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const n=parseInt(e);this.chainId=n,this.events.emit("chainChanged",Z_(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",tk(Uw({},Lr("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var n,r;this.rpc.showQrModal&&((n=this.modal)==null||n.closeModal(),(r=this.modal)==null||r.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 n=e.filter(r=>this.isCompatibleChainId(r)).map(r=>this.parseChainId(r));n.length&&(this.chainId=n[0],this.events.emit("chainChanged",Z_(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const n=this.parseChainId(e);this.chainId=n,this.switchEthereumChain(n)}}parseAccountId(e){const[n,r,i]=e.split(":");return{chainId:`${n}:${r}`,address:i}}setAccounts(e){this.accounts=e.filter(n=>this.parseChainId(this.parseAccountId(n).chainId)===this.chainId).map(n=>this.parseAccountId(n).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var n,r;const i=(n=e==null?void 0:e.chains)!=null?n:[],s=(r=e==null?void 0:e.optionalChains)!=null?r:[],o=i.concat(s);if(!o.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const a=i.length?(e==null?void 0:e.methods)||tC:[],c=i.length?(e==null?void 0:e.events)||nC:[],l=(e==null?void 0:e.optionalMethods)||[],u=(e==null?void 0:e.optionalEvents)||[],d=(e==null?void 0:e.rpcMap)||this.buildRpcMap(o,e.projectId),h=(e==null?void 0:e.qrModalOptions)||void 0;return{chains:i==null?void 0:i.map(g=>this.formatChainId(g)),optionalChains:s.map(g=>this.formatChainId(g)),methods:a,events:c,optionalMethods:l,optionalEvents:u,rpcMap:d,showQrModal:!!(e!=null&&e.showQrModal),qrModalOptions:h,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,n){const r={};return e.forEach(i=>{r[i]=this.getRpcUrl(i,n)}),r}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?rC(this.rpc.chains):rC(this.rpc.optionalChains),this.signer=await ZAe.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 n;try{const{WalletConnectModal:r}=await Sa(()=>import("./index-DK9Wqvl0.js").then(i=>i.i),[]);n=r}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(n)try{this.modal=new n(Uw({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(r){throw this.signer.logger.error(r),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:n,optionalChains:r,rpcMap:i}=e;n&&hd(n)&&(this.rpc.chains=n.map(s=>this.formatChainId(s)),n.forEach(s=>{this.rpc.rpcMap[s]=(i==null?void 0:i[s])||this.getRpcUrl(s)})),r&&hd(r)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=r==null?void 0:r.map(s=>this.formatChainId(s)),r.forEach(s=>{this.rpc.rpcMap[s]=(i==null?void 0:i[s])||this.getRpcUrl(s)}))}getRpcUrl(e,n){var r;return((r=this.rpc.rpcMap)==null?void 0:r[e])||`${tEe}?chainId=eip155:${e}&projectId=${n||this.rpc.projectId}`}async loadPersistedSession(){if(this.session)try{const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),n=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:n==null?void 0:n.accounts),this.setAccounts(n==null?void 0:n.accounts)}catch(e){this.signer.logger.error("Failed to load persisted session, clearing state..."),this.signer.logger.error(e),await this.disconnect().catch(n=>this.signer.logger.warn(n))}}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(n=>this.parseAccount(n))}};const cEe=vX,lEe=Object.freeze(Object.defineProperty({__proto__:null,EthereumProvider:cEe,OPTIONAL_EVENTS:yX,OPTIONAL_METHODS:tB,REQUIRED_EVENTS:nC,REQUIRED_METHODS:tC,default:vX},Symbol.toStringTag,{value:"Module"})),xX="2.19.4";let J_={getDocsUrl:({docsBaseUrl:t,docsPath:e="",docsSlug:n})=>e?`${t??"https://viem.sh"}${e}${n?`#${n}`:""}`:void 0,version:xX},Je=class GN extends Error{constructor(e,n={}){var a;const r=(()=>{var c;return n.cause instanceof GN?n.cause.details:(c=n.cause)!=null&&c.message?n.cause.message:n.details})(),i=n.cause instanceof GN&&n.cause.docsPath||n.docsPath,s=(a=J_.getDocsUrl)==null?void 0:a.call(J_,{...n,docsPath:i}),o=[e||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...r?[`Details: ${r}`]:[],`Version: ${J_.version}`].join(`
`);super(o,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=e,this.version=xX}walk(e){return _X(this,e)}};function _X(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t?_X(t.cause,e):e?null:t}class uEe extends Je{constructor({max:e,min:n,signed:r,size:i,value:s}){super(`Number "${s}" is not in safe ${i?`${i*8}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${n} to ${e})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}}class dEe extends Je{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class fEe extends Je{constructor({givenSize:e,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}class AX extends Je{constructor({offset:e,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}}class EX extends Je{constructor({size:e,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}}class FW extends Je{constructor({size:e,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${e} ${r} long.`,{name:"InvalidBytesLengthError"})}}function Ab(t,{dir:e,size:n=32}={}){return typeof t=="string"?s0(t,{dir:e,size:n}):hEe(t,{dir:e,size:n})}function s0(t,{dir:e,size:n=32}={}){if(n===null)return t;const r=t.replace("0x","");if(r.length>n*2)throw new EX({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[e==="right"?"padEnd":"padStart"](n*2,"0")}`}function hEe(t,{dir:e,size:n=32}={}){if(n===null)return t;if(t.length>n)throw new EX({size:t.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let i=0;i<n;i++){const s=e==="right";r[s?i:n-i-1]=t[s?i:t.length-i-1]}return r}function pl(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}function Ji(t){return pl(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}function Eb(t,{dir:e="left"}={}){let n=typeof t=="string"?t.replace("0x",""):t,r=0;for(let i=0;i<n.length-1&&n[e==="left"?i:n.length-i-1].toString()==="0";i++)r++;return n=e==="left"?n.slice(r):n.slice(0,n.length-r),typeof t=="string"?(n.length===1&&e==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}const pEe=new TextEncoder;function g0(t,e={}){return typeof t=="number"||typeof t=="bigint"?gEe(t,e):typeof t=="boolean"?mEe(t,e):pl(t)?ml(t,e):mg(t,e)}function mEe(t,e={}){const n=new Uint8Array(1);return n[0]=Number(t),typeof e.size=="number"?(vu(n,{size:e.size}),Ab(n,{size:e.size})):n}const gf={zero:48,nine:57,A:65,F:70,a:97,f:102};function zW(t){if(t>=gf.zero&&t<=gf.nine)return t-gf.zero;if(t>=gf.A&&t<=gf.F)return t-(gf.A-10);if(t>=gf.a&&t<=gf.f)return t-(gf.a-10)}function ml(t,e={}){let n=t;e.size&&(vu(n,{size:e.size}),n=Ab(n,{dir:"right",size:e.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const i=r.length/2,s=new Uint8Array(i);for(let o=0,a=0;o<i;o++){const c=zW(r.charCodeAt(a++)),l=zW(r.charCodeAt(a++));if(c===void 0||l===void 0)throw new Je(`Invalid byte sequence ("${r[a-2]}${r[a-1]}" in "${r}").`);s[o]=c*16+l}return s}function gEe(t,e){const n=Jt(t,e);return ml(n)}function mg(t,e={}){const n=pEe.encode(t);return typeof e.size=="number"?(vu(n,{size:e.size}),Ab(n,{dir:"right",size:e.size})):n}function vu(t,{size:e}){if(Ji(t)>e)throw new fEe({givenSize:Ji(t),maxSize:e})}function w0(t,e={}){const{signed:n}=e;e.size&&vu(t,{size:e.size});const r=BigInt(t);if(!n)return r;const i=(t.length-2)/2,s=(1n<<BigInt(i)*8n-1n)-1n;return r<=s?r:r-BigInt(`0x${"f".padStart(i*2,"f")}`)-1n}function uh(t,e={}){return Number(w0(t,e))}function CX(t,e={}){let n=ml(t);return e.size&&(vu(n,{size:e.size}),n=Eb(n,{dir:"right"})),new TextDecoder().decode(n)}const wEe=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function pd(t,e={}){return typeof t=="number"||typeof t=="bigint"?Jt(t,e):typeof t=="string"?uv(t,e):typeof t=="boolean"?SX(t,e):ps(t,e)}function SX(t,e={}){const n=`0x${Number(t)}`;return typeof e.size=="number"?(vu(n,{size:e.size}),Ab(n,{size:e.size})):n}function ps(t,e={}){let n="";for(let i=0;i<t.length;i++)n+=wEe[t[i]];const r=`0x${n}`;return typeof e.size=="number"?(vu(r,{size:e.size}),Ab(r,{dir:"right",size:e.size})):r}function Jt(t,e={}){const{signed:n,size:r}=e,i=BigInt(t);let s;r?n?s=(1n<<BigInt(r)*8n-1n)-1n:s=2n**(BigInt(r)*8n)-1n:typeof t=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const o=typeof s=="bigint"&&n?-s-1n:0;if(s&&i>s||i<o){const c=typeof t=="bigint"?"n":"";throw new uEe({max:s?`${s}${c}`:void 0,min:`${o}${c}`,signed:n,size:r,value:`${t}${c}`})}const a=`0x${(n&&i<0?(1n<<BigInt(r*8))+BigInt(i):i).toString(16)}`;return r?Ab(a,{size:r}):a}const yEe=new TextEncoder;function uv(t,e={}){const n=yEe.encode(t);return ps(n,e)}async function vEe(t,{chain:e}){const{id:n,name:r,nativeCurrency:i,rpcUrls:s,blockExplorers:o}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:Jt(n),chainName:r,nativeCurrency:i,rpcUrls:s.default.http,blockExplorerUrls:o?Object.values(o).map(({url:a})=>a):void 0}]},{dedupe:!0,retryCount:0})}function dh(t,{includeName:e=!1}={}){if(t.type!=="function"&&t.type!=="event"&&t.type!=="error")throw new PEe(t.type);return`${t.name}(${US(t.inputs,{includeName:e})})`}function US(t,{includeName:e=!1}={}){return t?t.map(n=>bEe(n,{includeName:e})).join(e?", ":","):""}function bEe(t,{includeName:e}){return t.type.startsWith("tuple")?`(${US(t.components,{includeName:e})})${t.type.slice(5)}`:t.type+(e&&t.name?` ${t.name}`:"")}class xEe extends Je{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
`),{docsPath:e,name:"AbiConstructorNotFoundError"})}}class HW extends Je{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
`),{docsPath:e,name:"AbiConstructorParamsNotFoundError"})}}class TX extends Je{constructor({data:e,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(`
`),{metaMessages:[`Params: (${US(n,{includeName:!0})})`,`Data:   ${e} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=n,this.size=r}}class FS extends Je{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class _Ee extends Je{constructor({expectedLength:e,givenLength:n,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${e}`,`Given length: ${n}`].join(`
`),{name:"AbiEncodingArrayLengthMismatchError"})}}class AEe extends Je{constructor({expectedSize:e,value:n}){super(`Size of bytes "${n}" (bytes${Ji(n)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class EEe extends Je{constructor({expectedLength:e,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${n}`].join(`
`),{name:"AbiEncodingLengthMismatchError"})}}class IX extends Je{constructor(e,{docsPath:n}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join(`
`),{docsPath:n,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class CEe extends Je{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e,name:"AbiEventSignatureEmptyTopicsError"})}}class kX extends Je{constructor(e,{docsPath:n}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join(`
`),{docsPath:n,name:"AbiEventSignatureNotFoundError"})}}class WW extends Je{constructor(e,{docsPath:n}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(`
`),{docsPath:n,name:"AbiEventNotFoundError"})}}class iC extends Je{constructor(e,{docsPath:n}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
`),{docsPath:n,name:"AbiFunctionNotFoundError"})}}class SEe extends Je{constructor(e,{docsPath:n}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(`
`),{docsPath:n,name:"AbiFunctionOutputsNotFoundError"})}}class TEe extends Je{constructor(e,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${dh(e.abiItem)}\`, and`,`\`${n.type}\` in \`${dh(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class IEe extends Je{constructor({expectedSize:e,givenSize:n}){super(`Expected bytes${e}, got bytes${n}.`,{name:"BytesSizeMismatchError"})}}class v5 extends Je{constructor({abiItem:e,data:n,params:r,size:i}){super([`Data size of ${i} bytes is too small for non-indexed event parameters.`].join(`
`),{metaMessages:[`Params: (${US(r,{includeName:!0})})`,`Data:   ${n} (${i} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=n,this.params=r,this.size=i}}class zS extends Je{constructor({abiItem:e,param:n}){super([`Expected a topic for indexed event parameter${n.name?` "${n.name}"`:""} on event "${dh(e,{includeName:!0})}".`].join(`
`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class kEe extends Je{constructor(e,{docsPath:n}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
`),{docsPath:n,name:"InvalidAbiEncodingType"})}}class REe extends Je{constructor(e,{docsPath:n}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
`),{docsPath:n,name:"InvalidAbiDecodingType"})}}class NEe extends Je{constructor(e){super([`Value "${e}" is not a valid array.`].join(`
`),{name:"InvalidArrayError"})}}class PEe extends Je{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
`),{name:"InvalidDefinitionTypeError"})}}function fh(t){return typeof t[0]=="string"?k6(t):OEe(t)}function OEe(t){let e=0;for(const i of t)e+=i.length;const n=new Uint8Array(e);let r=0;for(const i of t)n.set(i,r),r+=i.length;return n}function k6(t){return`0x${t.reduce((e,n)=>e+n.replace("0x",""),"")}`}let y0=class extends Je{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}};class nB extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}set(e,n){return super.set(e,n),this.maxSize&&this.size>this.maxSize&&this.delete(this.keys().next().value),this}}function pa(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function DEe(t){if(typeof t!="boolean")throw new Error(`boolean expected, not ${t}`)}function MEe(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function Cb(t,...e){if(!MEe(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function rB(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");pa(t.outputLen),pa(t.blockLen)}function Dg(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 iB(t,e){Cb(t);const n=e.outputLen;if(t.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}const RX={number:pa,bool:DEe,bytes:Cb,hash:rB,exists:Dg,output:iB},X_=BigInt(2**32-1),VW=BigInt(32);function BEe(t,e=!1){return e?{h:Number(t&X_),l:Number(t>>VW&X_)}:{h:Number(t>>VW&X_)|0,l:Number(t&X_)|0}}function $Ee(t,e=!1){let n=new Uint32Array(t.length),r=new Uint32Array(t.length);for(let i=0;i<t.length;i++){const{h:s,l:o}=BEe(t[i],e);[n[i],r[i]]=[s,o]}return[n,r]}const jEe=(t,e,n)=>t<<n|e>>>32-n,LEe=(t,e,n)=>e<<n|t>>>32-n,UEe=(t,e,n)=>e<<n-32|t>>>64-n,FEe=(t,e,n)=>t<<n-32|e>>>64-n,KA=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const YA=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),QA=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),$u=(t,e)=>t<<32-e|t>>>e,xr=(t,e)=>t<<e|t>>>32-e>>>0,sC=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,zEe=t=>t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255;function oC(t){for(let e=0;e<t.length;e++)t[e]=zEe(t[e])}function dv(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function fv(t){return typeof t=="string"&&(t=dv(t)),Cb(t),t}function b5(...t){let e=0;for(let r=0;r<t.length;r++){const i=t[r];Cb(i),e+=i.length}const n=new Uint8Array(e);for(let r=0,i=0;r<t.length;r++){const s=t[r];n.set(s,i),i+=s.length}return n}class sB{clone(){return this._cloneInto()}}const HEe={}.toString;function NX(t,e){if(e!==void 0&&HEe.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function PX(t){const e=r=>t().update(fv(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function oB(t=32){if(KA&&typeof KA.getRandomValues=="function")return KA.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}const OX=[],DX=[],MX=[],WEe=BigInt(0),j2=BigInt(1),VEe=BigInt(2),qEe=BigInt(7),GEe=BigInt(256),KEe=BigInt(113);for(let t=0,e=j2,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],OX.push(2*(5*r+n)),DX.push((t+1)*(t+2)/2%64);let i=WEe;for(let s=0;s<7;s++)e=(e<<j2^(e>>qEe)*KEe)%GEe,e&VEe&&(i^=j2<<(j2<<BigInt(s))-j2);MX.push(i)}const[YEe,QEe]=$Ee(MX,!0),qW=(t,e,n)=>n>32?UEe(t,e,n):jEe(t,e,n),GW=(t,e,n)=>n>32?FEe(t,e,n):LEe(t,e,n);function ZEe(t,e=24){const n=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let o=0;o<10;o++)n[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=n[c],u=n[c+1],d=qW(l,u,1)^n[a],h=GW(l,u,1)^n[a+1];for(let g=0;g<50;g+=10)t[o+g]^=d,t[o+g+1]^=h}let i=t[2],s=t[3];for(let o=0;o<24;o++){const a=DX[o],c=qW(i,s,a),l=GW(i,s,a),u=OX[o];i=t[u],s=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)n[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~n[(a+2)%10]&n[(a+4)%10]}t[0]^=YEe[r],t[1]^=QEe[r]}n.fill(0)}class aB extends sB{constructor(e,n,r,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,pa(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=YA(this.state)}keccak(){sC||oC(this.state32),ZEe(this.state32,this.rounds),sC||oC(this.state32),this.posOut=0,this.pos=0}update(e){Dg(this);const{blockLen:n,state:r}=this;e=fv(e);const i=e.length;for(let s=0;s<i;){const o=Math.min(n-this.pos,i-s);for(let a=0;a<o;a++)r[this.pos++]^=e[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:n,pos:r,blockLen:i}=this;e[r]^=n,n&128&&r===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){Dg(this,!1),Cb(e),this.finish();const n=this.state,{blockLen:r}=this;for(let i=0,s=e.length;i<s;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,s-i);e.set(n.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return pa(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(iB(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:n,suffix:r,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new aB(n,r,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=r,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}}const JEe=(t,e,n)=>PX(()=>new aB(e,t,n)),KN=JEe(1,136,256/8);function Ns(t,e){const n=e||"hex",r=KN(pl(t,{strict:!1})?g0(t):t);return n==="bytes"?r:pd(r)}const nk=new nB(8192);function R6(t,e){if(nk.has(`${t}.${e}`))return nk.get(`${t}.${e}`);const n=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),r=Ns(mg(n),"bytes"),i=(e?n.substring(`${e}0x`.length):n).split("");for(let o=0;o<40;o+=2)r[o>>1]>>4>=8&&i[o]&&(i[o]=i[o].toUpperCase()),(r[o>>1]&15)>=8&&i[o+1]&&(i[o+1]=i[o+1].toUpperCase());const s=`0x${i.join("")}`;return nk.set(`${t}.${e}`,s),s}function qs(t,e){if(!cu(t,{strict:!1}))throw new y0({address:t});return R6(t,e)}const XEe=/^0x[a-fA-F0-9]{40}$/,rk=new nB(8192);function cu(t,e){const{strict:n=!0}=e??{},r=`${t}.${n}`;if(rk.has(r))return rk.get(r);const i=XEe.test(t)?t.toLowerCase()===t?!0:n?R6(t)===t:!0:!1;return rk.set(r,i),i}function aC(t,e,n,{strict:r}={}){return pl(t,{strict:!1})?LX(t,e,n,{strict:r}):jX(t,e,n,{strict:r})}function BX(t,e){if(typeof e=="number"&&e>0&&e>Ji(t)-1)throw new AX({offset:e,position:"start",size:Ji(t)})}function $X(t,e,n){if(typeof e=="number"&&typeof n=="number"&&Ji(t)!==n-e)throw new AX({offset:n,position:"end",size:Ji(t)})}function jX(t,e,n,{strict:r}={}){BX(t,e);const i=t.slice(e,n);return r&&$X(i,e,n),i}function LX(t,e,n,{strict:r}={}){BX(t,e);const i=`0x${t.replace("0x","").slice((e??0)*2,(n??t.length)*2)}`;return r&&$X(i,e,n),i}function Sb(t,e){if(t.length!==e.length)throw new EEe({expectedLength:t.length,givenLength:e.length});const n=eCe({params:t,values:e}),r=lB(n);return r.length===0?"0x":r}function eCe({params:t,values:e}){const n=[];for(let r=0;r<t.length;r++)n.push(cB({param:t[r],value:e[r]}));return n}function cB({param:t,value:e}){const n=uB(t.type);if(n){const[r,i]=n;return nCe(e,{length:r,param:{...t,type:i}})}if(t.type==="tuple")return aCe(e,{param:t});if(t.type==="address")return tCe(e);if(t.type==="bool")return iCe(e);if(t.type.startsWith("uint")||t.type.startsWith("int")){const r=t.type.startsWith("int");return sCe(e,{signed:r})}if(t.type.startsWith("bytes"))return rCe(e,{param:t});if(t.type==="string")return oCe(e);throw new kEe(t.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function lB(t){let e=0;for(let s=0;s<t.length;s++){const{dynamic:o,encoded:a}=t[s];o?e+=32:e+=Ji(a)}const n=[],r=[];let i=0;for(let s=0;s<t.length;s++){const{dynamic:o,encoded:a}=t[s];o?(n.push(Jt(e+i,{size:32})),r.push(a),i+=Ji(a)):n.push(a)}return fh([...n,...r])}function tCe(t){if(!cu(t))throw new y0({address:t});return{dynamic:!1,encoded:s0(t.toLowerCase())}}function nCe(t,{length:e,param:n}){const r=e===null;if(!Array.isArray(t))throw new NEe(t);if(!r&&t.length!==e)throw new _Ee({expectedLength:e,givenLength:t.length,type:`${n.type}[${e}]`});let i=!1;const s=[];for(let o=0;o<t.length;o++){const a=cB({param:n,value:t[o]});a.dynamic&&(i=!0),s.push(a)}if(r||i){const o=lB(s);if(r){const a=Jt(s.length,{size:32});return{dynamic:!0,encoded:s.length>0?fh([a,o]):a}}if(i)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:fh(s.map(({encoded:o})=>o))}}function rCe(t,{param:e}){const[,n]=e.type.split("bytes"),r=Ji(t);if(!n){let i=t;return r%32!==0&&(i=s0(i,{dir:"right",size:Math.ceil((t.length-2)/2/32)*32})),{dynamic:!0,encoded:fh([s0(Jt(r,{size:32})),i])}}if(r!==Number.parseInt(n))throw new AEe({expectedSize:Number.parseInt(n),value:t});return{dynamic:!1,encoded:s0(t,{dir:"right"})}}function iCe(t){if(typeof t!="boolean")throw new Je(`Invalid boolean value: "${t}" (type: ${typeof t}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:s0(SX(t))}}function sCe(t,{signed:e}){return{dynamic:!1,encoded:Jt(t,{size:32,signed:e})}}function oCe(t){const e=uv(t),n=Math.ceil(Ji(e)/32),r=[];for(let i=0;i<n;i++)r.push(s0(aC(e,i*32,(i+1)*32),{dir:"right"}));return{dynamic:!0,encoded:fh([s0(Jt(Ji(e),{size:32})),...r])}}function aCe(t,{param:e}){let n=!1;const r=[];for(let i=0;i<e.components.length;i++){const s=e.components[i],o=Array.isArray(t)?i:s.name,a=cB({param:s,value:t[o]});r.push(a),a.dynamic&&(n=!0)}return{dynamic:n,encoded:n?lB(r):fh(r.map(({encoded:i})=>i))}}function uB(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}const ik="/docs/contract/encodeDeployData";function HS(t){const{abi:e,args:n,bytecode:r}=t;if(!n||n.length===0)return r;const i=e.find(o=>"type"in o&&o.type==="constructor");if(!i)throw new xEe({docsPath:ik});if(!("inputs"in i))throw new HW({docsPath:ik});if(!i.inputs||i.inputs.length===0)throw new HW({docsPath:ik});const s=Sb(i.inputs,n);return k6([r,s])}function mc(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}class WS extends Je{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
`),{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}class sk extends Je{constructor({docsPath:e,metaMessages:n,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:e,metaMessages:n,name:"AccountTypeNotSupportedError"})}}function cCe(t){const e=Ns(`0x${t.substring(4)}`).substring(26);return R6(`0x${e}`)}async function lCe({hash:t,signature:e}){const n=pl(t)?t:pd(t),{secp256k1:r}=await Sa(async()=>{const{secp256k1:o}=await Promise.resolve().then(()=>uTe);return{secp256k1:o}},void 0);return`0x${(()=>{if(typeof e=="object"&&"r"in e&&"s"in e){const{r:l,s:u,v:d,yParity:h}=e,g=Number(h??d),w=KW(g);return new r.Signature(w0(l),w0(u)).addRecoveryBit(w)}const o=pl(e)?e:pd(e),a=uh(`0x${o.slice(130)}`),c=KW(a);return r.Signature.fromCompact(o.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(n.substring(2)).toHex(!1)}`}function KW(t){if(t===0||t===1)return t;if(t===27)return 0;if(t===28)return 1;throw new Error("Invalid yParityOrV value")}async function UX({hash:t,signature:e}){return cCe(await lCe({hash:t,signature:e}))}class YW extends Je{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class FX extends Je{constructor({length:e,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class uCe extends Je{constructor({count:e,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}const dCe={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new uCe({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new FX({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new YW({offset:t});const e=this.position-t;this.assertPosition(e),this.position=e},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new YW({offset:t});const e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){const n=e??this.position;return this.assertPosition(n+t-1),this.bytes.subarray(n,n+t)},inspectUint8(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){const e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){const e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){const e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const t=this.inspectByte();return this.position++,t},readBytes(t,e){this.assertReadLimit(),this._touch();const n=this.inspectBytes(t);return this.position+=e??t,n},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},get remaining(){return this.bytes.length-this.position},setPosition(t){const e=this.position;return this.assertPosition(t),this.position=t,()=>this.position=e},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function dB(t,{recursiveReadLimit:e=8192}={}){const n=Object.create(dCe);return n.bytes=t,n.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=e,n}function fCe(t,e="hex"){const n=zX(t),r=dB(new Uint8Array(n.length));return n.encode(r),e==="hex"?ps(r.bytes):r.bytes}function zX(t){return Array.isArray(t)?hCe(t.map(e=>zX(e))):pCe(t)}function hCe(t){const e=t.reduce((i,s)=>i+s.length,0),n=HX(e);return{length:e<=55?1+e:1+n+e,encode(i){e<=55?i.pushByte(192+e):(i.pushByte(247+n),n===1?i.pushUint8(e):n===2?i.pushUint16(e):n===3?i.pushUint24(e):i.pushUint32(e));for(const{encode:s}of t)s(i)}}}function pCe(t){const e=typeof t=="string"?ml(t):t,n=HX(e.length);return{length:e.length===1&&e[0]<128?1:e.length<=55?1+e.length:1+n+e.length,encode(i){e.length===1&&e[0]<128?i.pushBytes(e):e.length<=55?(i.pushByte(128+e.length),i.pushBytes(e)):(i.pushByte(183+n),n===1?i.pushUint8(e.length):n===2?i.pushUint16(e.length):n===3?i.pushUint24(e.length):i.pushUint32(e.length),i.pushBytes(e))}}}function HX(t){if(t<2**8)return 1;if(t<2**16)return 2;if(t<2**24)return 3;if(t<2**32)return 4;throw new Je("Length is too large.")}function mCe(t){const{chainId:e,contractAddress:n,nonce:r,to:i}=t,s=Ns(k6(["0x05",fCe([Jt(e),n,[r?Jt(r):"0x"]])]));return i==="bytes"?ml(s):s}async function WX(t){const{authorization:e,signature:n}=t;return UX({hash:mCe(e),signature:n??e})}class YN extends Je{constructor({blockNumber:e,chain:n,contract:r}){super(`Chain "${n.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...e&&r.blockCreated&&r.blockCreated>e?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}let gCe=class extends Je{constructor({chain:e,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID:  ${n}`,`Expected Chain ID: ${e.id} – ${e.name}`],name:"ChainMismatchError"})}};class wCe extends Je{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
`),{name:"ChainNotFoundError"})}}class VX extends Je{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}function qX({chain:t,currentChainId:e}){if(!t)throw new wCe;if(e!==t.id)throw new gCe({chain:t,currentChainId:e})}const yCe={gwei:9,wei:18},vCe={ether:-9,wei:9},bCe={ether:-18,gwei:-9};function N6(t,e){let n=t.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(e,"0");let[i,s]=[n.slice(0,n.length-e),n.slice(n.length-e)];return s=s.replace(/(0+)$/,""),`${r?"-":""}${i||"0"}${s?`.${s}`:""}`}function Ta(t,e="wei"){return N6(t,vCe[e])}class dy extends Je{constructor({cause:e,message:n}={}){var i;const r=(i=n==null?void 0:n.replace("execution reverted: ",""))==null?void 0:i.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(dy,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(dy,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class cC extends Je{constructor({cause:e,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Ta(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(cC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class QN extends Je{constructor({cause:e,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${Ta(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(QN,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class ZN extends Je{constructor({cause:e,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(ZN,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class JN extends Je{constructor({cause:e,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
`),{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(JN,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class XN extends Je{constructor({cause:e,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(XN,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class eP extends Je{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
`),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(eP,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class tP extends Je{constructor({cause:e,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(tP,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class nP extends Je{constructor({cause:e,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(nP,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class rP extends Je{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(rP,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class lC extends Je{constructor({cause:e,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${Ta(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${Ta(r)} gwei`:""}).`].join(`
`),{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(lC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class VS extends Je{constructor({cause:e}){super(`An error occurred while executing: ${e==null?void 0:e.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}function fB(t,e="wei"){return N6(t,yCe[e])}function P6(t){const e=Object.entries(t).map(([r,i])=>i===void 0||i===!1?null:[r,i]).filter(Boolean),n=e.reduce((r,[i])=>Math.max(r,i.length),0);return e.map(([r,i])=>`  ${`${r}:`.padEnd(n+1)}  ${i}`).join(`
`)}class xCe extends Je{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(`
`),{name:"FeeConflictError"})}}class _Ce extends Je{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",P6(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class ACe extends Je{constructor(e,{account:n,docsPath:r,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:d,value:h}){var w;const g=P6({chain:i&&`${i==null?void 0:i.name} (id: ${i==null?void 0:i.id})`,from:n==null?void 0:n.address,to:d,value:typeof h<"u"&&`${fB(h)} ${((w=i==null?void 0:i.nativeCurrency)==null?void 0:w.symbol)||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${Ta(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${Ta(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Ta(l)} gwei`,nonce:u});super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",g].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class GX extends Je{constructor({blockHash:e,blockNumber:n,blockTag:r,hash:i,index:s}){let o="Transaction";r&&s!==void 0&&(o=`Transaction at block time "${r}" at index "${s}"`),e&&s!==void 0&&(o=`Transaction at block hash "${e}" at index "${s}"`),n&&s!==void 0&&(o=`Transaction at block number "${n}" at index "${s}"`),i&&(o=`Transaction with hash "${i}"`),super(`${o} could not be found.`,{name:"TransactionNotFoundError"})}}class KX extends Je{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class QW extends Je{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}const Ks=(t,e,n)=>JSON.stringify(t,(r,i)=>typeof i=="bigint"?i.toString():i,n),ECe=t=>t,hB=t=>t;class P3 extends Je{constructor({body:e,cause:n,details:r,headers:i,status:s,url:o}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[s&&`Status: ${s}`,`URL: ${hB(o)}`,e&&`Request body: ${Ks(e)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=i,this.status=s,this.url=o}}class YX extends Je{constructor({body:e,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${hB(r)}`,`Request body: ${Ks(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code}}class ZW extends Je{constructor({body:e,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${hB(n)}`,`Request body: ${Ks(e)}`],name:"TimeoutError"})}}const CCe=-1;let Ba=class extends Je{constructor(e,{code:n,docsPath:r,metaMessages:i,name:s,shortMessage:o}){super(o,{cause:e,docsPath:r,metaMessages:i||(e==null?void 0:e.metaMessages),name:s||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=s||e.name,this.code=e instanceof YX?e.code:n??CCe}};class Tb extends Ba{constructor(e,n){super(e,n),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=n.data}}class x5 extends Ba{constructor(e){super(e,{code:x5.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(x5,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class _5 extends Ba{constructor(e){super(e,{code:_5.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(_5,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class A5 extends Ba{constructor(e,{method:n}={}){super(e,{code:A5.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`})}}Object.defineProperty(A5,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class E5 extends Ba{constructor(e){super(e,{code:E5.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
`)})}}Object.defineProperty(E5,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Mg extends Ba{constructor(e){super(e,{code:Mg.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(Mg,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class Bg extends Ba{constructor(e){super(e,{code:Bg.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
`)})}}Object.defineProperty(Bg,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class C5 extends Ba{constructor(e){super(e,{code:C5.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(C5,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class o0 extends Ba{constructor(e){super(e,{code:o0.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(o0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class hv extends Ba{constructor(e){super(e,{code:hv.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(hv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class S5 extends Ba{constructor(e,{method:n}={}){super(e,{code:S5.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not implemented.`})}}Object.defineProperty(S5,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class pv extends Ba{constructor(e){super(e,{code:pv.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(pv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class T5 extends Ba{constructor(e){super(e,{code:T5.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(T5,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class ai extends Tb{constructor(e){super(e,{code:ai.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(ai,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class I5 extends Tb{constructor(e){super(e,{code:I5.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(I5,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class k5 extends Tb{constructor(e,{method:n}={}){super(e,{code:k5.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`})}}Object.defineProperty(k5,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class R5 extends Tb{constructor(e){super(e,{code:R5.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(R5,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class N5 extends Tb{constructor(e){super(e,{code:N5.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(N5,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class Na extends Tb{constructor(e){super(e,{code:Na.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(Na,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class SCe extends Ba{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}function pB(t,e){const n=(t.details||"").toLowerCase(),r=t instanceof Je?t.walk(i=>i.code===dy.code):t;return r instanceof Je?new dy({cause:t,message:r.details}):dy.nodeMessage.test(n)?new dy({cause:t,message:t.details}):cC.nodeMessage.test(n)?new cC({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):QN.nodeMessage.test(n)?new QN({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):ZN.nodeMessage.test(n)?new ZN({cause:t,nonce:e==null?void 0:e.nonce}):JN.nodeMessage.test(n)?new JN({cause:t,nonce:e==null?void 0:e.nonce}):XN.nodeMessage.test(n)?new XN({cause:t,nonce:e==null?void 0:e.nonce}):eP.nodeMessage.test(n)?new eP({cause:t}):tP.nodeMessage.test(n)?new tP({cause:t,gas:e==null?void 0:e.gas}):nP.nodeMessage.test(n)?new nP({cause:t,gas:e==null?void 0:e.gas}):rP.nodeMessage.test(n)?new rP({cause:t}):lC.nodeMessage.test(n)?new lC({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas,maxPriorityFeePerGas:e==null?void 0:e.maxPriorityFeePerGas}):new VS({cause:t})}function TCe(t,{docsPath:e,...n}){const r=(()=>{const i=pB(t,n);return i instanceof VS?t:i})();return new ACe(r,{docsPath:e,...n})}function mB(t,{format:e}){if(!e)return{};const n={};function r(s){const o=Object.keys(s);for(const a of o)a in t&&(n[a]=t[a]),s[a]&&typeof s[a]=="object"&&!Array.isArray(s[a])&&r(s[a])}const i=e(t||{});return r(i),n}const ICe={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function qS(t){const e={};return typeof t.authorizationList<"u"&&(e.authorizationList=kCe(t.authorizationList)),typeof t.accessList<"u"&&(e.accessList=t.accessList),typeof t.blobVersionedHashes<"u"&&(e.blobVersionedHashes=t.blobVersionedHashes),typeof t.blobs<"u"&&(typeof t.blobs[0]!="string"?e.blobs=t.blobs.map(n=>ps(n)):e.blobs=t.blobs),typeof t.data<"u"&&(e.data=t.data),typeof t.from<"u"&&(e.from=t.from),typeof t.gas<"u"&&(e.gas=Jt(t.gas)),typeof t.gasPrice<"u"&&(e.gasPrice=Jt(t.gasPrice)),typeof t.maxFeePerBlobGas<"u"&&(e.maxFeePerBlobGas=Jt(t.maxFeePerBlobGas)),typeof t.maxFeePerGas<"u"&&(e.maxFeePerGas=Jt(t.maxFeePerGas)),typeof t.maxPriorityFeePerGas<"u"&&(e.maxPriorityFeePerGas=Jt(t.maxPriorityFeePerGas)),typeof t.nonce<"u"&&(e.nonce=Jt(t.nonce)),typeof t.to<"u"&&(e.to=t.to),typeof t.type<"u"&&(e.type=ICe[t.type]),typeof t.value<"u"&&(e.value=Jt(t.value)),e}function kCe(t){return t.map(e=>({address:e.contractAddress,r:e.r,s:e.s,chainId:Jt(e.chainId),nonce:Jt(e.nonce),...typeof e.yParity<"u"?{yParity:Jt(e.yParity)}:{},...typeof e.v<"u"&&typeof e.yParity>"u"?{v:Jt(e.v)}:{}}))}function Xt(t,e,n){const r=t[e.name];if(typeof r=="function")return r;const i=t[n];return typeof i=="function"?i:s=>e(t,s)}function O6(t){const{account:e,gasPrice:n,maxFeePerGas:r,maxPriorityFeePerGas:i,to:s}=t,o=e?mc(e):void 0;if(o&&!cu(o.address))throw new y0({address:o.address});if(s&&!cu(s))throw new y0({address:s});if(typeof n<"u"&&(typeof r<"u"||typeof i<"u"))throw new xCe;if(r&&r>2n**256n-1n)throw new cC({maxFeePerGas:r});if(i&&r&&i>r)throw new lC({maxFeePerGas:r,maxPriorityFeePerGas:i})}async function D6(t){const e=await t.request({method:"eth_chainId"},{dedupe:!0});return uh(e)}class RCe extends Je{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class gB extends Je{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class NCe extends Je{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${Ta(e)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}class QX extends Je{constructor({blockHash:e,blockNumber:n}){let r="Block";e&&(r=`Block at hash "${e}"`),n&&(r=`Block at number "${n}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}const ZX={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function JX(t){const e={...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,chainId:t.chainId?uh(t.chainId):void 0,gas:t.gas?BigInt(t.gas):void 0,gasPrice:t.gasPrice?BigInt(t.gasPrice):void 0,maxFeePerBlobGas:t.maxFeePerBlobGas?BigInt(t.maxFeePerBlobGas):void 0,maxFeePerGas:t.maxFeePerGas?BigInt(t.maxFeePerGas):void 0,maxPriorityFeePerGas:t.maxPriorityFeePerGas?BigInt(t.maxPriorityFeePerGas):void 0,nonce:t.nonce?uh(t.nonce):void 0,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,type:t.type?ZX[t.type]:void 0,typeHex:t.type?t.type:void 0,value:t.value?BigInt(t.value):void 0,v:t.v?BigInt(t.v):void 0};return t.authorizationList&&(e.authorizationList=PCe(t.authorizationList)),e.yParity=(()=>{if(t.yParity)return Number(t.yParity);if(typeof e.v=="bigint"){if(e.v===0n||e.v===27n)return 0;if(e.v===1n||e.v===28n)return 1;if(e.v>=35n)return e.v%2n===0n?1:0}})(),e.type==="legacy"&&(delete e.accessList,delete e.maxFeePerBlobGas,delete e.maxFeePerGas,delete e.maxPriorityFeePerGas,delete e.yParity),e.type==="eip2930"&&(delete e.maxFeePerBlobGas,delete e.maxFeePerGas,delete e.maxPriorityFeePerGas),e.type==="eip1559"&&delete e.maxFeePerBlobGas,e}function PCe(t){return t.map(e=>({contractAddress:e.address,r:e.r,s:e.s,chainId:Number(e.chainId),nonce:Number(e.nonce),...typeof e.yParity<"u"?{yParity:Number(e.yParity)}:{},...typeof e.v<"u"&&typeof e.yParity>"u"?{v:Number(e.v)}:{}}))}function XX(t){var n;const e=(n=t.transactions)==null?void 0:n.map(r=>typeof r=="string"?r:JX(r));return{...t,baseFeePerGas:t.baseFeePerGas?BigInt(t.baseFeePerGas):null,blobGasUsed:t.blobGasUsed?BigInt(t.blobGasUsed):void 0,difficulty:t.difficulty?BigInt(t.difficulty):void 0,excessBlobGas:t.excessBlobGas?BigInt(t.excessBlobGas):void 0,gasLimit:t.gasLimit?BigInt(t.gasLimit):void 0,gasUsed:t.gasUsed?BigInt(t.gasUsed):void 0,hash:t.hash?t.hash:null,logsBloom:t.logsBloom?t.logsBloom:null,nonce:t.nonce?t.nonce:null,number:t.number?BigInt(t.number):null,size:t.size?BigInt(t.size):void 0,timestamp:t.timestamp?BigInt(t.timestamp):void 0,transactions:e,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}async function v0(t,{blockHash:e,blockNumber:n,blockTag:r,includeTransactions:i}={}){var u,d,h;const s=r??"latest",o=i??!1,a=n!==void 0?Jt(n):void 0;let c=null;if(e?c=await t.request({method:"eth_getBlockByHash",params:[e,o]},{dedupe:!0}):c=await t.request({method:"eth_getBlockByNumber",params:[a||s,o]},{dedupe:!!a}),!c)throw new QX({blockHash:e,blockNumber:n});return(((h=(d=(u=t.chain)==null?void 0:u.formatters)==null?void 0:d.block)==null?void 0:h.format)||XX)(c)}async function wB(t){const e=await t.request({method:"eth_gasPrice"});return BigInt(e)}async function OCe(t,e){return eee(t,e)}async function eee(t,e){var s,o,a;const{block:n,chain:r=t.chain,request:i}=e||{};if(typeof((s=r==null?void 0:r.fees)==null?void 0:s.defaultPriorityFee)=="function"){const c=n||await Xt(t,v0,"getBlock")({});return r.fees.defaultPriorityFee({block:c,client:t,request:i})}if(typeof((o=r==null?void 0:r.fees)==null?void 0:o.defaultPriorityFee)<"u")return(a=r==null?void 0:r.fees)==null?void 0:a.defaultPriorityFee;try{const c=await t.request({method:"eth_maxPriorityFeePerGas"});return w0(c)}catch{const[c,l]=await Promise.all([n?Promise.resolve(n):Xt(t,v0,"getBlock")({}),Xt(t,wB,"getGasPrice")({})]);if(typeof c.baseFeePerGas!="bigint")throw new gB;const u=l-c.baseFeePerGas;return u<0n?0n:u}}async function DCe(t,e){return iP(t,e)}async function iP(t,e){var h,g;const{block:n,chain:r=t.chain,request:i,type:s="eip1559"}=e||{},o=await(async()=>{var w,v;return typeof((w=r==null?void 0:r.fees)==null?void 0:w.baseFeeMultiplier)=="function"?r.fees.baseFeeMultiplier({block:n,client:t,request:i}):((v=r==null?void 0:r.fees)==null?void 0:v.baseFeeMultiplier)??1.2})();if(o<1)throw new RCe;const c=10**(((h=o.toString().split(".")[1])==null?void 0:h.length)??0),l=w=>w*BigInt(Math.ceil(o*c))/BigInt(c),u=n||await Xt(t,v0,"getBlock")({});if(typeof((g=r==null?void 0:r.fees)==null?void 0:g.estimateFeesPerGas)=="function"){const w=await r.fees.estimateFeesPerGas({block:n,client:t,multiply:l,request:i,type:s});if(w!==null)return w}if(s==="eip1559"){if(typeof u.baseFeePerGas!="bigint")throw new gB;const w=typeof(i==null?void 0:i.maxPriorityFeePerGas)=="bigint"?i.maxPriorityFeePerGas:await eee(t,{block:u,chain:r,request:i}),v=l(u.baseFeePerGas);return{maxFeePerGas:(i==null?void 0:i.maxFeePerGas)??v+w,maxPriorityFeePerGas:w}}return{gasPrice:(i==null?void 0:i.gasPrice)??l(await Xt(t,wB,"getGasPrice")({}))}}class MCe extends Je{constructor(e,{account:n,docsPath:r,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:d,value:h}){var w;const g=P6({from:n==null?void 0:n.address,to:d,value:typeof h<"u"&&`${fB(h)} ${((w=i==null?void 0:i.nativeCurrency)==null?void 0:w.symbol)||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${Ta(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${Ta(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Ta(l)} gwei`,nonce:u});super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",g].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}function BCe(t,{docsPath:e,...n}){const r=(()=>{const i=pB(t,n);return i instanceof VS?t:i})();return new MCe(r,{docsPath:e,...n})}class $Ce extends Je{constructor({address:e}){super(`State for account "${e}" is set multiple times.`,{name:"AccountStateConflictError"})}}class jCe extends Je{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function JW(t){return t.reduce((e,{slot:n,value:r})=>`${e}        ${n}: ${r}
`,"")}function LCe(t){return t.reduce((e,{address:n,...r})=>{let i=`${e}    ${n}:
`;return r.nonce&&(i+=`      nonce: ${r.nonce}
`),r.balance&&(i+=`      balance: ${r.balance}
`),r.code&&(i+=`      code: ${r.code}
`),r.state&&(i+=`      state:
`,i+=JW(r.state)),r.stateDiff&&(i+=`      stateDiff:
`,i+=JW(r.stateDiff)),i},`  State Override:
`).slice(0,-1)}function XW(t){if(!(!t||t.length===0))return t.reduce((e,{slot:n,value:r})=>{if(n.length!==66)throw new FW({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new FW({size:r.length,targetSize:66,type:"hex"});return e[n]=r,e},{})}function UCe(t){const{balance:e,nonce:n,state:r,stateDiff:i,code:s}=t,o={};if(s!==void 0&&(o.code=s),e!==void 0&&(o.balance=Jt(e)),n!==void 0&&(o.nonce=Jt(n)),r!==void 0&&(o.state=XW(r)),i!==void 0){if(o.state)throw new jCe;o.stateDiff=XW(i)}return o}function tee(t){if(!t)return;const e={};for(const{address:n,...r}of t){if(!cu(n,{strict:!1}))throw new y0({address:n});if(e[n])throw new $Ce({address:n});e[n]=UCe(r)}return e}async function yB(t,{address:e,blockNumber:n,blockTag:r="latest"}){const i=n?Jt(n):void 0,s=await t.request({method:"eth_getBalance",params:[e,i||r]});return BigInt(s)}async function M6(t,e){var i,s,o;const n=e.account??t.account,r=n?mc(n):void 0;try{let E=function(I){const{block:B,request:M,rpcStateOverride:W}=I;return t.request({method:"eth_estimateGas",params:W?[M,B??"latest",W]:B?[M,B]:[M]})};const{accessList:a,authorizationList:c,blobs:l,blobVersionedHashes:u,blockNumber:d,blockTag:h,data:g,gas:w,gasPrice:v,maxFeePerBlobGas:_,maxFeePerGas:T,maxPriorityFeePerGas:b,nonce:k,value:D,stateOverride:O,...$}=await B6(t,{...e,parameters:(r==null?void 0:r.type)==="local"?void 0:["blobVersionedHashes"]}),A=(d?Jt(d):void 0)||h,H=tee(O),V=await(async()=>{if($.to)return $.to;if(c&&c.length>0)return await WX({authorization:c[0]}).catch(()=>{throw new Je("`to` is required. Could not infer from `authorizationList`")})})();O6(e);const Y=(o=(s=(i=t.chain)==null?void 0:i.formatters)==null?void 0:s.transactionRequest)==null?void 0:o.format,x=(Y||qS)({...mB($,{format:Y}),from:r==null?void 0:r.address,accessList:a,authorizationList:c,blobs:l,blobVersionedHashes:u,data:g,gas:w,gasPrice:v,maxFeePerBlobGas:_,maxFeePerGas:T,maxPriorityFeePerGas:b,nonce:k,to:V,value:D});let y=BigInt(await E({block:A,request:x,rpcStateOverride:H}));if(c){const I=await yB(t,{address:x.from}),B=await Promise.all(c.map(async M=>{const{contractAddress:W}=M,z=await E({block:A,request:{authorizationList:void 0,data:g,from:r==null?void 0:r.address,to:W,value:Jt(I)},rpcStateOverride:H}).catch(()=>100000n);return 2n*BigInt(z)}));y+=B.reduce((M,W)=>M+W,0n)}return y}catch(a){throw BCe(a,{...e,account:r,chain:t.chain})}}async function nee(t,{address:e,blockTag:n="latest",blockNumber:r}){const i=await t.request({method:"eth_getTransactionCount",params:[e,r?Jt(r):n]},{dedupe:!!r});return uh(i)}function ree(t){const{kzg:e}=t,n=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),r=typeof t.blobs[0]=="string"?t.blobs.map(s=>ml(s)):t.blobs,i=[];for(const s of r)i.push(Uint8Array.from(e.blobToKzgCommitment(s)));return n==="bytes"?i:i.map(s=>ps(s))}function iee(t){const{kzg:e}=t,n=t.to??(typeof t.blobs[0]=="string"?"hex":"bytes"),r=typeof t.blobs[0]=="string"?t.blobs.map(o=>ml(o)):t.blobs,i=typeof t.commitments[0]=="string"?t.commitments.map(o=>ml(o)):t.commitments,s=[];for(let o=0;o<r.length;o++){const a=r[o],c=i[o];s.push(Uint8Array.from(e.computeBlobKzgProof(a,c)))}return n==="bytes"?s:s.map(o=>ps(o))}function FCe(t,e,n,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,n,r);const i=BigInt(32),s=BigInt(4294967295),o=Number(n>>i&s),a=Number(n&s),c=r?4:0,l=r?0:4;t.setUint32(e+c,o,r),t.setUint32(e+l,a,r)}const zCe=(t,e,n)=>t&e^~t&n,HCe=(t,e,n)=>t&e^t&n^e&n;class WCe extends sB{constructor(e,n,r,i){super(),this.blockLen=e,this.outputLen=n,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=QA(this.buffer)}update(e){Dg(this);const{view:n,buffer:r,blockLen:i}=this;e=fv(e);const s=e.length;for(let o=0;o<s;){const a=Math.min(i-this.pos,s-o);if(a===i){const c=QA(e);for(;i<=s-o;o+=i)this.process(c,o);continue}r.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(n,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Dg(this),iB(e,this),this.finished=!0;const{buffer:n,view:r,blockLen:i,isLE:s}=this;let{pos:o}=this;n[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(r,0),o=0);for(let d=o;d<i;d++)n[d]=0;FCe(r,i-8,BigInt(this.length*8),s),this.process(r,0);const a=QA(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<l;d++)a.setUint32(4*d,u[d],s)}digest(){const{buffer:e,outputLen:n}=this;this.digestInto(e);const r=e.slice(0,n);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:n,buffer:r,length:i,finished:s,destroyed:o,pos:a}=this;return e.length=i,e.pos=a,e.finished=s,e.destroyed=o,i%n&&e.buffer.set(r),e}}const VCe=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]),fp=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),hp=new Uint32Array(64);class qCe extends WCe{constructor(){super(64,32,8,!1),this.A=fp[0]|0,this.B=fp[1]|0,this.C=fp[2]|0,this.D=fp[3]|0,this.E=fp[4]|0,this.F=fp[5]|0,this.G=fp[6]|0,this.H=fp[7]|0}get(){const{A:e,B:n,C:r,D:i,E:s,F:o,G:a,H:c}=this;return[e,n,r,i,s,o,a,c]}set(e,n,r,i,s,o,a,c){this.A=e|0,this.B=n|0,this.C=r|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,n){for(let d=0;d<16;d++,n+=4)hp[d]=e.getUint32(n,!1);for(let d=16;d<64;d++){const h=hp[d-15],g=hp[d-2],w=$u(h,7)^$u(h,18)^h>>>3,v=$u(g,17)^$u(g,19)^g>>>10;hp[d]=v+hp[d-7]+w+hp[d-16]|0}let{A:r,B:i,C:s,D:o,E:a,F:c,G:l,H:u}=this;for(let d=0;d<64;d++){const h=$u(a,6)^$u(a,11)^$u(a,25),g=u+h+zCe(a,c,l)+VCe[d]+hp[d]|0,v=($u(r,2)^$u(r,13)^$u(r,22))+HCe(r,i,s)|0;u=l,l=c,c=a,a=o+g|0,o=s,s=i,i=r,r=g+v|0}r=r+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(r,i,s,o,a,c,l,u)}roundClean(){hp.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Ib=PX(()=>new qCe);function GCe(t,e){return Ib(pl(t,{strict:!1})?g0(t):t)}function KCe(t){const{commitment:e,version:n=1}=t,r=t.to??(typeof e=="string"?"hex":"bytes"),i=GCe(e);return i.set([n],0),r==="bytes"?i:ps(i)}function YCe(t){const{commitments:e,version:n}=t,r=t.to??(typeof e[0]=="string"?"hex":"bytes"),i=[];for(const s of e)i.push(KCe({commitment:s,to:r,version:n}));return i}const eV=6,see=32,vB=4096,oee=see*vB,tV=oee*eV-1-1*vB*eV;class QCe extends Je{constructor({maxSize:e,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class ZCe extends Je{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}function JCe(t){const e=t.to??(typeof t.data=="string"?"hex":"bytes"),n=typeof t.data=="string"?ml(t.data):t.data,r=Ji(n);if(!r)throw new ZCe;if(r>tV)throw new QCe({maxSize:tV,size:r});const i=[];let s=!0,o=0;for(;s;){const a=dB(new Uint8Array(oee));let c=0;for(;c<vB;){const l=n.slice(o,o+(see-1));if(a.pushByte(0),a.pushBytes(l),l.length<31){a.pushByte(128),s=!1;break}c++,o+=31}i.push(a)}return e==="bytes"?i.map(a=>a.bytes):i.map(a=>ps(a.bytes))}function XCe(t){const{data:e,kzg:n,to:r}=t,i=t.blobs??JCe({data:e,to:r}),s=t.commitments??ree({blobs:i,kzg:n,to:r}),o=t.proofs??iee({blobs:i,commitments:s,kzg:n,to:r}),a=[];for(let c=0;c<i.length;c++)a.push({blob:i[c],commitment:s[c],proof:o[c]});return a}function e8e(t){if(t.type)return t.type;if(typeof t.authorizationList<"u")return"eip7702";if(typeof t.blobs<"u"||typeof t.blobVersionedHashes<"u"||typeof t.maxFeePerBlobGas<"u"||typeof t.sidecars<"u")return"eip4844";if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")return"eip1559";if(typeof t.gasPrice<"u")return typeof t.accessList<"u"?"eip2930":"legacy";throw new _Ce({transaction:t})}const aee=["blobVersionedHashes","chainId","fees","gas","nonce","type"];async function B6(t,e){const{account:n=t.account,blobs:r,chain:i,gas:s,kzg:o,nonce:a,parameters:c=aee,type:l}=e,u=n?mc(n):void 0,d={...e,...u?{from:u==null?void 0:u.address}:{}};let h;async function g(){return h||(h=await Xt(t,v0,"getBlock")({blockTag:"latest"}),h)}let w;async function v(){return w||(i?i.id:typeof e.chainId<"u"?e.chainId:(w=await Xt(t,D6,"getChainId")({}),w))}if((c.includes("blobVersionedHashes")||c.includes("sidecars"))&&r&&o){const _=ree({blobs:r,kzg:o});if(c.includes("blobVersionedHashes")){const T=YCe({commitments:_,to:"hex"});d.blobVersionedHashes=T}if(c.includes("sidecars")){const T=iee({blobs:r,commitments:_,kzg:o}),b=XCe({blobs:r,commitments:_,proofs:T,to:"hex"});d.sidecars=b}}if(c.includes("chainId")&&(d.chainId=await v()),c.includes("nonce")&&typeof a>"u"&&u)if(u.nonceManager){const _=await v();d.nonce=await u.nonceManager.consume({address:u.address,chainId:_,client:t})}else d.nonce=await Xt(t,nee,"getTransactionCount")({address:u.address,blockTag:"pending"});if((c.includes("fees")||c.includes("type"))&&typeof l>"u")try{d.type=e8e(d)}catch{const _=await g();d.type=typeof(_==null?void 0:_.baseFeePerGas)=="bigint"?"eip1559":"legacy"}if(c.includes("fees"))if(d.type!=="legacy"&&d.type!=="eip2930"){if(typeof d.maxFeePerGas>"u"||typeof d.maxPriorityFeePerGas>"u"){const _=await g(),{maxFeePerGas:T,maxPriorityFeePerGas:b}=await iP(t,{block:_,chain:i,request:d});if(typeof e.maxPriorityFeePerGas>"u"&&e.maxFeePerGas&&e.maxFeePerGas<b)throw new NCe({maxPriorityFeePerGas:b});d.maxPriorityFeePerGas=b,d.maxFeePerGas=T}}else{if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")throw new gB;const _=await g(),{gasPrice:T}=await iP(t,{block:_,chain:i,request:d,type:"legacy"});d.gasPrice=T}return c.includes("gas")&&typeof s>"u"&&(d.gas=await Xt(t,M6,"estimateGas")({...d,account:u?{address:u.address,type:"json-rpc"}:void 0})),O6(d),delete d.parameters,d}async function bB(t,{serializedTransaction:e}){return t.request({method:"eth_sendRawTransaction",params:[e]},{retryCount:0})}async function GS(t,e){var T,b,k,D;const{account:n=t.account,chain:r=t.chain,accessList:i,authorizationList:s,blobs:o,data:a,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:g,value:w,...v}=e;if(!n)throw new WS({docsPath:"/docs/actions/wallet/sendTransaction"});const _=mc(n);try{O6(e);const O=await(async()=>{if(e.to)return e.to;if(s&&s.length>0)return await WX({authorization:s[0]}).catch(()=>{throw new Je("`to` is required. Could not infer from `authorizationList`.")})})();if(_.type==="json-rpc"){let $;r!==null&&($=await Xt(t,D6,"getChainId")({}),qX({currentChainId:$,chain:r}));const C=(k=(b=(T=t.chain)==null?void 0:T.formatters)==null?void 0:b.transactionRequest)==null?void 0:k.format,H=(C||qS)({...mB(v,{format:C}),accessList:i,authorizationList:s,blobs:o,chainId:$,data:a,from:_.address,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:g,to:O,value:w});return await t.request({method:"eth_sendTransaction",params:[H]},{retryCount:0})}if(_.type==="local"){const $=await Xt(t,B6,"prepareTransactionRequest")({account:_,accessList:i,authorizationList:s,blobs:o,chain:r,data:a,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:g,parameters:[...aee,"sidecars"],value:w,...v,to:O}),C=(D=r==null?void 0:r.serializers)==null?void 0:D.transaction,A=await _.signTransaction($,{serializer:C});return await Xt(t,bB,"sendRawTransaction")({serializedTransaction:A})}throw _.type==="smart"?new sk({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new sk({docsPath:"/docs/actions/wallet/sendTransaction",type:_.type})}catch(O){throw O instanceof sk?O:TCe(O,{...e,account:_,chain:e.chain||void 0})}}function t8e(t,e){const{abi:n,args:r,bytecode:i,...s}=e,o=HS({abi:n,args:r,bytecode:i});return GS(t,{...s,data:o})}const sP=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],cee=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],lee=[...cee,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],n8e=[...cee,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],nV=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],rV=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],r8e=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}];function i8e(t,e={}){typeof e.size<"u"&&vu(t,{size:e.size});const n=ps(t,e);return w0(n,e)}function s8e(t,e={}){let n=t;if(typeof e.size<"u"&&(vu(n,{size:e.size}),n=Eb(n)),n.length>1||n[0]>1)throw new dEe(n);return!!n[0]}function Jf(t,e={}){typeof e.size<"u"&&vu(t,{size:e.size});const n=ps(t,e);return uh(n,e)}function o8e(t,e={}){let n=t;return typeof e.size<"u"&&(vu(n,{size:e.size}),n=Eb(n,{dir:"right"})),new TextDecoder().decode(n)}function KS(t,e){const n=typeof e=="string"?ml(e):e,r=dB(n);if(Ji(n)===0&&t.length>0)throw new FS;if(Ji(e)&&Ji(e)<32)throw new TX({data:typeof e=="string"?e:ps(e),params:t,size:Ji(e)});let i=0;const s=[];for(let o=0;o<t.length;++o){const a=t[o];r.setPosition(i);const[c,l]=ky(r,a,{staticPosition:0});i+=l,s.push(c)}return s}function ky(t,e,{staticPosition:n}){const r=uB(e.type);if(r){const[i,s]=r;return c8e(t,{...e,type:s},{length:i,staticPosition:n})}if(e.type==="tuple")return f8e(t,e,{staticPosition:n});if(e.type==="address")return a8e(t);if(e.type==="bool")return l8e(t);if(e.type.startsWith("bytes"))return u8e(t,e,{staticPosition:n});if(e.type.startsWith("uint")||e.type.startsWith("int"))return d8e(t,e);if(e.type==="string")return h8e(t,{staticPosition:n});throw new REe(e.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const iV=32,oP=32;function a8e(t){const e=t.readBytes(32);return[R6(ps(jX(e,-20))),32]}function c8e(t,e,{length:n,staticPosition:r}){if(!n){const o=Jf(t.readBytes(oP)),a=r+o,c=a+iV;t.setPosition(a);const l=Jf(t.readBytes(iV)),u=P5(e);let d=0;const h=[];for(let g=0;g<l;++g){t.setPosition(c+(u?g*32:d));const[w,v]=ky(t,e,{staticPosition:c});d+=v,h.push(w)}return t.setPosition(r+32),[h,32]}if(P5(e)){const o=Jf(t.readBytes(oP)),a=r+o,c=[];for(let l=0;l<n;++l){t.setPosition(a+l*32);const[u]=ky(t,e,{staticPosition:a});c.push(u)}return t.setPosition(r+32),[c,32]}let i=0;const s=[];for(let o=0;o<n;++o){const[a,c]=ky(t,e,{staticPosition:r+i});i+=c,s.push(a)}return[s,i]}function l8e(t){return[s8e(t.readBytes(32),{size:32}),32]}function u8e(t,e,{staticPosition:n}){const[r,i]=e.type.split("bytes");if(!i){const o=Jf(t.readBytes(32));t.setPosition(n+o);const a=Jf(t.readBytes(32));if(a===0)return t.setPosition(n+32),["0x",32];const c=t.readBytes(a);return t.setPosition(n+32),[ps(c),32]}return[ps(t.readBytes(Number.parseInt(i),32)),32]}function d8e(t,e){const n=e.type.startsWith("int"),r=Number.parseInt(e.type.split("int")[1]||"256"),i=t.readBytes(32);return[r>48?i8e(i,{signed:n}):Jf(i,{signed:n}),32]}function f8e(t,e,{staticPosition:n}){const r=e.components.length===0||e.components.some(({name:o})=>!o),i=r?[]:{};let s=0;if(P5(e)){const o=Jf(t.readBytes(oP)),a=n+o;for(let c=0;c<e.components.length;++c){const l=e.components[c];t.setPosition(a+s);const[u,d]=ky(t,l,{staticPosition:a});s+=d,i[r?c:l==null?void 0:l.name]=u}return t.setPosition(n+32),[i,32]}for(let o=0;o<e.components.length;++o){const a=e.components[o],[c,l]=ky(t,a,{staticPosition:n});i[r?o:a==null?void 0:a.name]=c,s+=l}return[i,s]}function h8e(t,{staticPosition:e}){const n=Jf(t.readBytes(32)),r=e+n;t.setPosition(r);const i=Jf(t.readBytes(32));if(i===0)return t.setPosition(e+32),["",32];const s=t.readBytes(i,32),o=o8e(Eb(s));return t.setPosition(e+32),[o,32]}function P5(t){var r;const{type:e}=t;if(e==="string"||e==="bytes"||e.endsWith("[]"))return!0;if(e==="tuple")return(r=t.components)==null?void 0:r.some(P5);const n=uB(t.type);return!!(n&&P5({...t,type:n[1]}))}const p8e=t=>Ns(g0(t));function m8e(t){return p8e(t)}const g8e="1.0.5";let _l=class aP extends Error{constructor(e,n={}){var o;const r=n.cause instanceof aP?n.cause.details:(o=n.cause)!=null&&o.message?n.cause.message:n.details,i=n.cause instanceof aP&&n.cause.docsPath||n.docsPath,s=[e||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${g8e}`].join(`
`);super(s),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=e}};function U0(t,e){const n=t.exec(e);return n==null?void 0:n.groups}const uee=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,dee=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,fee=/^\(.+?\).*?$/,sV=/^tuple(?<array>(\[(\d*)\])*)$/;function cP(t){let e=t.type;if(sV.test(t.type)&&"components"in t){e="(";const n=t.components.length;for(let i=0;i<n;i++){const s=t.components[i];e+=cP(s),i<n-1&&(e+=", ")}const r=U0(sV,t.type);return e+=`)${(r==null?void 0:r.array)??""}`,cP({...t,type:e})}return"indexed"in t&&t.indexed&&(e=`${e} indexed`),t.name?`${e} ${t.name}`:e}function L2(t){let e="";const n=t.length;for(let r=0;r<n;r++){const i=t[r];e+=cP(i),r!==n-1&&(e+=", ")}return e}function w8e(t){return t.type==="function"?`function ${t.name}(${L2(t.inputs)})${t.stateMutability&&t.stateMutability!=="nonpayable"?` ${t.stateMutability}`:""}${t.outputs.length?` returns (${L2(t.outputs)})`:""}`:t.type==="event"?`event ${t.name}(${L2(t.inputs)})`:t.type==="error"?`error ${t.name}(${L2(t.inputs)})`:t.type==="constructor"?`constructor(${L2(t.inputs)})${t.stateMutability==="payable"?" payable":""}`:t.type==="fallback"?"fallback()":"receive() external payable"}const hee=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function y8e(t){return hee.test(t)}function v8e(t){return U0(hee,t)}const pee=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function b8e(t){return pee.test(t)}function x8e(t){return U0(pee,t)}const mee=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function _8e(t){return mee.test(t)}function A8e(t){return U0(mee,t)}const gee=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function wee(t){return gee.test(t)}function E8e(t){return U0(gee,t)}const yee=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function C8e(t){return yee.test(t)}function S8e(t){return U0(yee,t)}const T8e=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function I8e(t){return T8e.test(t)}const k8e=/^receive\(\) external payable$/;function R8e(t){return k8e.test(t)}const N8e=new Set(["indexed"]),lP=new Set(["calldata","memory","storage"]);class P8e extends _l{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class O8e extends _l{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class D8e extends _l{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class M8e extends _l{constructor({param:e,name:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class B8e extends _l{constructor({param:e,type:n,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class $8e extends _l{constructor({param:e,type:n,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class j8e extends _l{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}let s3=class extends _l{constructor({signature:e,type:n}){super(`Invalid ${n} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}};class L8e extends _l{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class U8e extends _l{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class F8e extends _l{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class z8e extends _l{constructor({current:e,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function H8e(t,e){return e?`${e}:${t}`:t}const ok=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function W8e(t,e={}){if(_8e(t)){const n=A8e(t);if(!n)throw new s3({signature:t,type:"function"});const r=Jl(n.parameters),i=[],s=r.length;for(let a=0;a<s;a++)i.push($m(r[a],{modifiers:lP,structs:e,type:"function"}));const o=[];if(n.returns){const a=Jl(n.returns),c=a.length;for(let l=0;l<c;l++)o.push($m(a[l],{modifiers:lP,structs:e,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:i,outputs:o}}if(b8e(t)){const n=x8e(t);if(!n)throw new s3({signature:t,type:"event"});const r=Jl(n.parameters),i=[],s=r.length;for(let o=0;o<s;o++)i.push($m(r[o],{modifiers:N8e,structs:e,type:"event"}));return{name:n.name,type:"event",inputs:i}}if(y8e(t)){const n=v8e(t);if(!n)throw new s3({signature:t,type:"error"});const r=Jl(n.parameters),i=[],s=r.length;for(let o=0;o<s;o++)i.push($m(r[o],{structs:e,type:"error"}));return{name:n.name,type:"error",inputs:i}}if(C8e(t)){const n=S8e(t);if(!n)throw new s3({signature:t,type:"constructor"});const r=Jl(n.parameters),i=[],s=r.length;for(let o=0;o<s;o++)i.push($m(r[o],{structs:e,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:i}}if(I8e(t))return{type:"fallback"};if(R8e(t))return{type:"receive",stateMutability:"payable"};throw new L8e({signature:t})}const V8e=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,q8e=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,G8e=/^u?int$/;function $m(t,e){var d,h;const n=H8e(t,e==null?void 0:e.type);if(ok.has(n))return ok.get(n);const r=fee.test(t),i=U0(r?q8e:V8e,t);if(!i)throw new D8e({param:t});if(i.name&&Y8e(i.name))throw new M8e({param:t,name:i.name});const s=i.name?{name:i.name}:{},o=i.modifier==="indexed"?{indexed:!0}:{},a=(e==null?void 0:e.structs)??{};let c,l={};if(r){c="tuple";const g=Jl(i.type),w=[],v=g.length;for(let _=0;_<v;_++)w.push($m(g[_],{structs:a}));l={components:w}}else if(i.type in a)c="tuple",l={components:a[i.type]};else if(G8e.test(i.type))c=`${i.type}256`;else if(c=i.type,(e==null?void 0:e.type)!=="struct"&&!vee(c))throw new O8e({type:c});if(i.modifier){if(!((h=(d=e==null?void 0:e.modifiers)==null?void 0:d.has)!=null&&h.call(d,i.modifier)))throw new B8e({param:t,type:e==null?void 0:e.type,modifier:i.modifier});if(lP.has(i.modifier)&&!Q8e(c,!!i.array))throw new $8e({param:t,type:e==null?void 0:e.type,modifier:i.modifier})}const u={type:`${c}${i.array??""}`,...s,...o,...l};return ok.set(n,u),u}function Jl(t,e=[],n="",r=0){const i=t.trim().length;for(let s=0;s<i;s++){const o=t[s],a=t.slice(s+1);switch(o){case",":return r===0?Jl(a,[...e,n.trim()]):Jl(a,e,`${n}${o}`,r);case"(":return Jl(a,e,`${n}${o}`,r+1);case")":return Jl(a,e,`${n}${o}`,r-1);default:return Jl(a,e,`${n}${o}`,r)}}if(n==="")return e;if(r!==0)throw new z8e({current:n,depth:r});return e.push(n.trim()),e}function vee(t){return t==="address"||t==="bool"||t==="function"||t==="string"||uee.test(t)||dee.test(t)}const K8e=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function Y8e(t){return t==="address"||t==="bool"||t==="function"||t==="string"||t==="tuple"||uee.test(t)||dee.test(t)||K8e.test(t)}function Q8e(t,e){return e||t==="bytes"||t==="string"||t==="tuple"}function Z8e(t){const e={},n=t.length;for(let o=0;o<n;o++){const a=t[o];if(!wee(a))continue;const c=E8e(a);if(!c)throw new s3({signature:a,type:"struct"});const l=c.properties.split(";"),u=[],d=l.length;for(let h=0;h<d;h++){const w=l[h].trim();if(!w)continue;const v=$m(w,{type:"struct"});u.push(v)}if(!u.length)throw new U8e({signature:a});e[c.name]=u}const r={},i=Object.entries(e),s=i.length;for(let o=0;o<s;o++){const[a,c]=i[o];r[a]=bee(c,e)}return r}const J8e=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function bee(t,e,n=new Set){const r=[],i=t.length;for(let s=0;s<i;s++){const o=t[s];if(fee.test(o.type))r.push(o);else{const c=U0(J8e,o.type);if(!(c!=null&&c.type))throw new j8e({abiParameter:o});const{array:l,type:u}=c;if(u in e){if(n.has(u))throw new F8e({type:u});r.push({...o,type:`tuple${l??""}`,components:bee(e[u]??[],e,new Set([...n,u]))})}else if(vee(u))r.push(o);else throw new P8e({type:u})}}return r}function xee(t){const e=Z8e(t),n=[],r=t.length;for(let i=0;i<r;i++){const s=t[i];wee(s)||n.push(W8e(s,e))}return n}function X8e(t){let e=!0,n="",r=0,i="",s=!1;for(let o=0;o<t.length;o++){const a=t[o];if(["(",")",","].includes(a)&&(e=!0),a==="("&&r++,a===")"&&r--,!!e){if(r===0){if(a===" "&&["event","function",""].includes(i))i="";else if(i+=a,a===")"){s=!0;break}continue}if(a===" "){t[o-1]!==","&&n!==","&&n!==",("&&(n="",e=!1);continue}i+=a,n+=a}}if(!s)throw new Je("Unable to normalize signature.");return i}const eSe=t=>{const e=typeof t=="string"?t:w8e(t);return X8e(e)};function _ee(t){return m8e(eSe(t))}const xB=_ee,_B=t=>aC(_ee(t),0,4);function kb(t){const{abi:e,args:n=[],name:r}=t,i=pl(r,{strict:!1}),s=e.filter(a=>i?a.type==="function"?_B(a)===r:a.type==="event"?xB(a)===r:!1:"name"in a&&a.name===r);if(s.length===0)return;if(s.length===1)return s[0];let o;for(const a of s){if(!("inputs"in a))continue;if(!n||n.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==n.length)continue;if(n.every((l,u)=>{const d="inputs"in a&&a.inputs[u];return d?uP(l,d):!1})){if(o&&"inputs"in o&&o.inputs){const l=Aee(a.inputs,o.inputs,n);if(l)throw new TEe({abiItem:a,type:l[0]},{abiItem:o,type:l[1]})}o=a}}return o||s[0]}function uP(t,e){const n=typeof t,r=e.type;switch(r){case"address":return cu(t,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in e?Object.values(e.components).every((i,s)=>uP(Object.values(t)[s],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(t)&&t.every(i=>uP(i,{...e,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function Aee(t,e,n){for(const r in t){const i=t[r],s=e[r];if(i.type==="tuple"&&s.type==="tuple"&&"components"in i&&"components"in s)return Aee(i.components,s.components,n[r]);const o=[i.type,s.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")?cu(n[r],{strict:!1}):o.includes("address")&&o.includes("bytes")?cu(n[r],{strict:!1}):!1)return o}}const ak="/docs/contract/decodeFunctionResult";function Rb(t){const{abi:e,args:n,functionName:r,data:i}=t;let s=e[0];if(r){const a=kb({abi:e,args:n,name:r});if(!a)throw new iC(r,{docsPath:ak});s=a}if(s.type!=="function")throw new iC(void 0,{docsPath:ak});if(!s.outputs)throw new SEe(s.name,{docsPath:ak});const o=KS(s.outputs,i);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}const oV="/docs/contract/encodeFunctionData";function tSe(t){const{abi:e,args:n,functionName:r}=t;let i=e[0];if(r){const s=kb({abi:e,args:n,name:r});if(!s)throw new iC(r,{docsPath:oV});i=s}if(i.type!=="function")throw new iC(void 0,{docsPath:oV});return{abi:[i],functionName:_B(dh(i))}}function F0(t){const{args:e}=t,{abi:n,functionName:r}=(()=>{var a;return t.abi.length===1&&((a=t.functionName)!=null&&a.startsWith("0x"))?t:tSe(t)})(),i=n[0],s=r,o="inputs"in i&&i.inputs?Sb(i.inputs,e??[]):void 0;return k6([s,o??"0x"])}function Nb({blockNumber:t,chain:e,contract:n}){var i;const r=(i=e==null?void 0:e.contracts)==null?void 0:i[n];if(!r)throw new YN({chain:e,contract:{name:n}});if(t&&r.blockCreated&&r.blockCreated>t)throw new YN({blockNumber:t,chain:e,contract:{name:n,blockCreated:r.blockCreated}});return r.address}const Eee={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},nSe={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},rSe={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function iSe(t){const{abi:e,data:n}=t,r=aC(n,0,4);if(r==="0x")throw new FS;const s=[...e||[],nSe,rSe].find(o=>o.type==="error"&&r===_B(dh(o)));if(!s)throw new IX(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?KS(s.inputs,aC(n,4)):void 0,errorName:s.name}}function Cee({abiItem:t,args:e,includeFunctionName:n=!0,includeName:r=!1}){if("name"in t&&"inputs"in t&&t.inputs)return`${n?t.name:""}(${t.inputs.map((i,s)=>`${r&&i.name?`${i.name}: `:""}${typeof e[s]=="object"?Ks(e[s]):e[s]}`).join(", ")})`}class See extends Je{constructor(e,{account:n,docsPath:r,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:d,value:h,stateOverride:g}){var _;const w=n?mc(n):void 0;let v=P6({from:w==null?void 0:w.address,to:d,value:typeof h<"u"&&`${fB(h)} ${((_=i==null?void 0:i.nativeCurrency)==null?void 0:_.symbol)||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${Ta(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${Ta(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${Ta(l)} gwei`,nonce:u});g&&(v+=`
${LCe(g)}`),super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",v].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class AB extends Je{constructor(e,{abi:n,args:r,contractAddress:i,docsPath:s,functionName:o,sender:a}){const c=kb({abi:n,args:r,name:o}),l=c?Cee({abiItem:c,args:r,includeFunctionName:!1,includeName:!1}):void 0,u=c?dh(c,{includeName:!0}):void 0,d=P6({address:i&&ECe(i),function:u,args:l&&l!=="()"&&`${[...Array((o==null?void 0:o.length)??0).keys()].map(()=>" ").join("")}${l}`,sender:a});super(e.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:e,docsPath:s,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],d&&"Contract Call:",d].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=n,this.args=r,this.cause=e,this.contractAddress=i,this.functionName=o,this.sender=a}}class dP extends Je{constructor({abi:e,data:n,functionName:r,message:i}){let s,o,a,c;if(n&&n!=="0x")try{o=iSe({abi:e,data:n});const{abiItem:u,errorName:d,args:h}=o;if(d==="Error")c=h[0];else if(d==="Panic"){const[g]=h;c=Eee[g]}else{const g=u?dh(u,{includeName:!0}):void 0,w=u&&h?Cee({abiItem:u,args:h,includeFunctionName:!1,includeName:!1}):void 0;a=[g?`Error: ${g}`:"",w&&w!=="()"?`       ${[...Array((d==null?void 0:d.length)??0).keys()].map(()=>" ").join("")}${w}`:""]}}catch(u){s=u}else i&&(c=i);let l;s instanceof IX&&(l=s.signature,a=[`Unable to decode signature "${l}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${l}.`]),super(c&&c!=="execution reverted"||l?[`The contract function "${r}" reverted with the following ${l?"signature":"reason"}:`,c||l].join(`
`):`The contract function "${r}" reverted.`,{cause:s,metaMessages:a,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=o,this.reason=c,this.signature=l}}class sSe extends Je{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",`  - The contract does not have the function "${e}",`,"  - The parameters passed to the contract function may be invalid, or","  - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class oSe extends Je{constructor({factory:e}){super(`Deployment for counterfactual contract call failed${e?` for factory "${e}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class EB extends Je{constructor({data:e,message:n}){super(n||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}function CB(t,e){var r,i,s,o,a,c;if(!(t instanceof Je))return!1;const n=t.walk(l=>l instanceof dP);return n instanceof dP?!!(((r=n.data)==null?void 0:r.errorName)==="ResolverNotFound"||((i=n.data)==null?void 0:i.errorName)==="ResolverWildcardNotSupported"||((s=n.data)==null?void 0:s.errorName)==="ResolverNotContract"||((o=n.data)==null?void 0:o.errorName)==="ResolverError"||((a=n.data)==null?void 0:a.errorName)==="HttpError"||(c=n.reason)!=null&&c.includes("Wildcard on non-extended resolvers is not supported")||e==="reverse"&&n.reason===Eee[50]):!1}function Tee(t){if(t.length!==66||t.indexOf("[")!==0||t.indexOf("]")!==65)return null;const e=`0x${t.slice(1,65)}`;return pl(e)?e:null}function ZA(t){let e=new Uint8Array(32).fill(0);if(!t)return ps(e);const n=t.split(".");for(let r=n.length-1;r>=0;r-=1){const i=Tee(n[r]),s=i?g0(i):Ns(mg(n[r]),"bytes");e=Ns(fh([e,s]),"bytes")}return ps(e)}function aSe(t){return`[${t.slice(2)}]`}function cSe(t){const e=new Uint8Array(32).fill(0);return t?Tee(t)||Ns(mg(t)):ps(e)}function YS(t){const e=t.replace(/^\.|\.$/gm,"");if(e.length===0)return new Uint8Array(1);const n=new Uint8Array(mg(e).byteLength+2);let r=0;const i=e.split(".");for(let s=0;s<i.length;s++){let o=mg(i[s]);o.byteLength>255&&(o=mg(aSe(cSe(i[s])))),n[r]=o.length,n.set(o,r+1),r+=o.length+1}return n.byteLength!==r+1?n.slice(0,r+1):n}const lSe=3;function O5(t,{abi:e,address:n,args:r,docsPath:i,functionName:s,sender:o}){const{code:a,data:c,message:l,shortMessage:u}=t instanceof EB?t:t instanceof Je?t.walk(h=>"data"in h)||t.walk():{},d=t instanceof FS?new sSe({functionName:s}):[lSe,Mg.code].includes(a)&&(c||l||u)?new dP({abi:e,data:typeof c=="object"?c.data:c,functionName:s,message:u??l}):t;return new AB(d,{abi:e,args:r,contractAddress:n,docsPath:i,functionName:s,sender:o})}const uSe="0x82ad56cb",dSe="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",fSe="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",hSe="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";function pSe(t,{docsPath:e,...n}){const r=(()=>{const i=pB(t,n);return i instanceof VS?t:i})();return new See(r,{docsPath:e,...n})}const ck=new Map;function Iee({fn:t,id:e,shouldSplitBatch:n,wait:r=0,sort:i}){const s=async()=>{const u=c();o();const d=u.map(({args:h})=>h);d.length!==0&&t(d).then(h=>{var g;i&&Array.isArray(h)&&h.sort(i);for(let w=0;w<u.length;w++){const{pendingPromise:v}=u[w];(g=v.resolve)==null||g.call(v,[h[w],h])}}).catch(h=>{var g;for(let w=0;w<u.length;w++){const{pendingPromise:v}=u[w];(g=v.reject)==null||g.call(v,h)}})},o=()=>ck.delete(e),a=()=>c().map(({args:u})=>u),c=()=>ck.get(e)||[],l=u=>ck.set(e,[...c(),u]);return{flush:o,async schedule(u){const d={},h=new Promise((v,_)=>{d.resolve=v,d.reject=_});return(n==null?void 0:n([...a(),u]))&&s(),c().length>0?(l({args:u,pendingPromise:d}),h):(l({args:u,pendingPromise:d}),setTimeout(s,r),h)}}}async function $6(t,e){var Y,ee,x,E;const{account:n=t.account,batch:r=!!((Y=t.batch)!=null&&Y.multicall),blockNumber:i,blockTag:s="latest",accessList:o,blobs:a,code:c,data:l,factory:u,factoryData:d,gas:h,gasPrice:g,maxFeePerBlobGas:w,maxFeePerGas:v,maxPriorityFeePerGas:_,nonce:T,to:b,value:k,stateOverride:D,...O}=e,$=n?mc(n):void 0;if(c&&(u||d))throw new Je("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(c&&b)throw new Je("Cannot provide both `code` & `to` as parameters.");const C=c&&l,A=u&&d&&b&&l,H=C||A,V=C?wSe({code:c,data:l}):A?ySe({data:l,factory:u,factoryData:d,to:b}):l;try{O6(e);const I=(i?Jt(i):void 0)||s,B=tee(D),M=(E=(x=(ee=t.chain)==null?void 0:ee.formatters)==null?void 0:x.transactionRequest)==null?void 0:E.format,z=(M||qS)({...mB(O,{format:M}),from:$==null?void 0:$.address,accessList:o,blobs:a,data:V,gas:h,gasPrice:g,maxFeePerBlobGas:w,maxFeePerGas:v,maxPriorityFeePerGas:_,nonce:T,to:H?void 0:b,value:k});if(r&&mSe({request:z})&&!B)try{return await gSe(t,{...z,blockNumber:i,blockTag:s})}catch(Z){if(!(Z instanceof VX)&&!(Z instanceof YN))throw Z}const P=await t.request({method:"eth_call",params:B?[z,I,B]:[z,I]});return P==="0x"?{data:void 0}:{data:P}}catch(y){const I=vSe(y),{offchainLookup:B,offchainLookupSignature:M}=await Sa(async()=>{const{offchainLookup:W,offchainLookupSignature:z}=await import("./ccip-BEydpSGN.js");return{offchainLookup:W,offchainLookupSignature:z}},[]);if(t.ccipRead!==!1&&(I==null?void 0:I.slice(0,10))===M&&b)return{data:await B(t,{data:I,to:b})};throw H&&(I==null?void 0:I.slice(0,10))==="0x101bb98d"?new oSe({factory:u}):pSe(y,{...e,account:$,chain:t.chain})}}function mSe({request:t}){const{data:e,to:n,...r}=t;return!(!e||e.startsWith(uSe)||!n||Object.values(r).filter(i=>typeof i<"u").length>0)}async function gSe(t,e){var v;const{batchSize:n=1024,wait:r=0}=typeof((v=t.batch)==null?void 0:v.multicall)=="object"?t.batch.multicall:{},{blockNumber:i,blockTag:s="latest",data:o,multicallAddress:a,to:c}=e;let l=a;if(!l){if(!t.chain)throw new VX;l=Nb({blockNumber:i,chain:t.chain,contract:"multicall3"})}const d=(i?Jt(i):void 0)||s,{schedule:h}=Iee({id:`${t.uid}.${d}`,wait:r,shouldSplitBatch(_){return _.reduce((b,{data:k})=>b+(k.length-2),0)>n*2},fn:async _=>{const T=_.map(D=>({allowFailure:!0,callData:D.data,target:D.to})),b=F0({abi:sP,args:[T],functionName:"aggregate3"}),k=await t.request({method:"eth_call",params:[{data:b,to:l},d]});return Rb({abi:sP,args:[T],functionName:"aggregate3",data:k||"0x"})}}),[{returnData:g,success:w}]=await h({data:o,to:c});if(!w)throw new EB({data:g});return g==="0x"?{data:void 0}:{data:g}}function wSe(t){const{code:e,data:n}=t;return HS({abi:xee(["constructor(bytes, bytes)"]),bytecode:dSe,args:[e,n]})}function ySe(t){const{data:e,factory:n,factoryData:r,to:i}=t;return HS({abi:xee(["constructor(address, bytes, address, bytes)"]),bytecode:fSe,args:[i,e,n,r]})}function vSe(t){var n;if(!(t instanceof Je))return;const e=t.walk();return typeof(e==null?void 0:e.data)=="object"?(n=e.data)==null?void 0:n.data:e.data}async function lu(t,e){const{abi:n,address:r,args:i,functionName:s,...o}=e,a=F0({abi:n,args:i,functionName:s});try{const{data:c}=await Xt(t,$6,"call")({...o,data:a,to:r});return Rb({abi:n,args:i,functionName:s,data:c||"0x"})}catch(c){throw O5(c,{abi:n,address:r,args:i,docsPath:"/docs/contract/readContract",functionName:s})}}async function kee(t,{blockNumber:e,blockTag:n,coinType:r,name:i,gatewayUrls:s,strict:o,universalResolverAddress:a}){let c=a;if(!c){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");c=Nb({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const l=F0({abi:rV,functionName:"addr",...r!=null?{args:[ZA(i),BigInt(r)]}:{args:[ZA(i)]}}),u={address:c,abi:lee,functionName:"resolve",args:[pd(YS(i)),l],blockNumber:e,blockTag:n},d=Xt(t,lu,"readContract"),h=s?await d({...u,args:[...u.args,s]}):await d(u);if(h[0]==="0x")return null;const g=Rb({abi:rV,args:r!=null?[ZA(i),BigInt(r)]:void 0,functionName:"addr",data:h[0]});return g==="0x"||Eb(g)==="0x00"?null:g}catch(l){if(o)throw l;if(CB(l,"resolve"))return null;throw l}}class bSe extends Je{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`],name:"EnsAvatarInvalidMetadataError"})}}class U2 extends Je{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`,{name:"EnsAvatarInvalidNftUriError"})}}class SB extends Je{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class xSe extends Je{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}const _Se=/(?<protocol>https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,ASe=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,ESe=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,CSe=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function SSe(t){try{const e=await fetch(t,{method:"HEAD"});if(e.status===200){const n=e.headers.get("content-type");return n==null?void 0:n.startsWith("image/")}return!1}catch(e){return typeof e=="object"&&typeof e.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(n=>{const r=new Image;r.onload=()=>{n(!0)},r.onerror=()=>{n(!1)},r.src=t})}}function aV(t,e){return t?t.endsWith("/")?t.slice(0,-1):t:e}function Ree({uri:t,gatewayUrls:e}){const n=ESe.test(t);if(n)return{uri:t,isOnChain:!0,isEncoded:n};const r=aV(e==null?void 0:e.ipfs,"https://ipfs.io"),i=aV(e==null?void 0:e.arweave,"https://arweave.net"),s=t.match(_Se),{protocol:o,subpath:a,target:c,subtarget:l=""}=(s==null?void 0:s.groups)||{},u=o==="ipns:/"||a==="ipns/",d=o==="ipfs:/"||a==="ipfs/"||ASe.test(t);if(t.startsWith("http")&&!u&&!d){let g=t;return e!=null&&e.arweave&&(g=t.replace(/https:\/\/arweave.net/g,e==null?void 0:e.arweave)),{uri:g,isOnChain:!1,isEncoded:!1}}if((u||d)&&c)return{uri:`${r}/${u?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if(o==="ar:/"&&c)return{uri:`${i}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let h=t.replace(CSe,"");if(h.startsWith("<svg")&&(h=`data:image/svg+xml;base64,${btoa(h)}`),h.startsWith("data:")||h.startsWith("{"))return{uri:h,isOnChain:!0,isEncoded:!1};throw new SB({uri:t})}function Nee(t){if(typeof t!="object"||!("image"in t)&&!("image_url"in t)&&!("image_data"in t))throw new bSe({data:t});return t.image||t.image_url||t.image_data}async function TSe({gatewayUrls:t,uri:e}){try{const n=await fetch(e).then(i=>i.json());return await TB({gatewayUrls:t,uri:Nee(n)})}catch{throw new SB({uri:e})}}async function TB({gatewayUrls:t,uri:e}){const{uri:n,isOnChain:r}=Ree({uri:e,gatewayUrls:t});if(r||await SSe(n))return n;throw new SB({uri:e})}function ISe(t){let e=t;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[n,r,i]=e.split("/"),[s,o]=n.split(":"),[a,c]=r.split(":");if(!s||s.toLowerCase()!=="eip155")throw new U2({reason:"Only EIP-155 supported"});if(!o)throw new U2({reason:"Chain ID not found"});if(!c)throw new U2({reason:"Contract address not found"});if(!i)throw new U2({reason:"Token ID not found"});if(!a)throw new U2({reason:"ERC namespace not found"});return{chainID:Number.parseInt(o),namespace:a.toLowerCase(),contractAddress:c,tokenID:i}}async function kSe(t,{nft:e}){if(e.namespace==="erc721")return lu(t,{address:e.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(e.tokenID)]});if(e.namespace==="erc1155")return lu(t,{address:e.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(e.tokenID)]});throw new xSe({namespace:e.namespace})}async function RSe(t,{gatewayUrls:e,record:n}){return/eip155:/i.test(n)?NSe(t,{gatewayUrls:e,record:n}):TB({uri:n,gatewayUrls:e})}async function NSe(t,{gatewayUrls:e,record:n}){const r=ISe(n),i=await kSe(t,{nft:r}),{uri:s,isOnChain:o,isEncoded:a}=Ree({uri:i,gatewayUrls:e});if(o&&(s.includes("data:application/json;base64,")||s.startsWith("{"))){const l=a?atob(s.replace("data:application/json;base64,","")):s,u=JSON.parse(l);return TB({uri:Nee(u),gatewayUrls:e})}let c=r.tokenID;return r.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),TSe({gatewayUrls:e,uri:s.replace(/(?:0x)?{id}/,c)})}async function Pee(t,{blockNumber:e,blockTag:n,name:r,key:i,gatewayUrls:s,strict:o,universalResolverAddress:a}){let c=a;if(!c){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");c=Nb({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const l={address:c,abi:lee,functionName:"resolve",args:[pd(YS(r)),F0({abi:nV,functionName:"text",args:[ZA(r),i]})],blockNumber:e,blockTag:n},u=Xt(t,lu,"readContract"),d=s?await u({...l,args:[...l.args,s]}):await u(l);if(d[0]==="0x")return null;const h=Rb({abi:nV,functionName:"text",data:d[0]});return h===""?null:h}catch(l){if(o)throw l;if(CB(l,"resolve"))return null;throw l}}async function Oee(t,{blockNumber:e,blockTag:n,assetGatewayUrls:r,name:i,gatewayUrls:s,strict:o,universalResolverAddress:a}){const c=await Xt(t,Pee,"getEnsText")({blockNumber:e,blockTag:n,key:"avatar",name:i,universalResolverAddress:a,gatewayUrls:s,strict:o});if(!c)return null;try{return await RSe(t,{record:c,gatewayUrls:r})}catch{return null}}async function Dee(t,{address:e,blockNumber:n,blockTag:r,gatewayUrls:i,strict:s,universalResolverAddress:o}){let a=o;if(!a){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=Nb({blockNumber:n,chain:t.chain,contract:"ensUniversalResolver"})}const c=`${e.toLowerCase().substring(2)}.addr.reverse`;try{const l={address:a,abi:n8e,functionName:"reverse",args:[pd(YS(c))],blockNumber:n,blockTag:r},u=Xt(t,lu,"readContract"),[d,h]=i?await u({...l,args:[...l.args,i]}):await u(l);return e.toLowerCase()!==h.toLowerCase()?null:d}catch(l){if(s)throw l;if(CB(l,"reverse"))return null;throw l}}async function PSe(t,{blockNumber:e,blockTag:n,name:r,universalResolverAddress:i}){let s=i;if(!s){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");s=Nb({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}const[o]=await Xt(t,lu,"readContract")({address:s,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[pd(YS(r))],blockNumber:e,blockTag:n});return o}function QS(t,{method:e}){var r,i;const n={};return t.transport.type==="fallback"&&((i=(r=t.transport).onResponse)==null||i.call(r,({method:s,response:o,status:a,transport:c})=>{a==="success"&&e===s&&(n[o]=c.request)})),s=>n[s]||t.request}async function OSe(t){const e=QS(t,{method:"eth_newBlockFilter"}),n=await t.request({method:"eth_newBlockFilter"});return{id:n,request:e(n),type:"block"}}class DSe extends Je{constructor(e){super(`Filter type "${e}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}const cV="/docs/contract/encodeEventTopics";function j6(t){var c;const{abi:e,eventName:n,args:r}=t;let i=e[0];if(n){const l=kb({abi:e,name:n});if(!l)throw new WW(n,{docsPath:cV});i=l}if(i.type!=="event")throw new WW(void 0,{docsPath:cV});const s=dh(i),o=xB(s);let a=[];if(r&&"inputs"in i){const l=(c=i.inputs)==null?void 0:c.filter(d=>"indexed"in d&&d.indexed),u=Array.isArray(r)?r:Object.values(r).length>0?(l==null?void 0:l.map(d=>r[d.name]))??[]:[];u.length>0&&(a=(l==null?void 0:l.map((d,h)=>Array.isArray(u[h])?u[h].map((g,w)=>lV({param:d,value:u[h][w]})):u[h]?lV({param:d,value:u[h]}):null))??[])}return[o,...a]}function lV({param:t,value:e}){if(t.type==="string"||t.type==="bytes")return Ns(g0(e));if(t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/))throw new DSe(t.type);return Sb([t],[e])}async function IB(t,e){const{address:n,abi:r,args:i,eventName:s,fromBlock:o,strict:a,toBlock:c}=e,l=QS(t,{method:"eth_newFilter"}),u=s?j6({abi:r,args:i,eventName:s}):void 0,d=await t.request({method:"eth_newFilter",params:[{address:n,fromBlock:typeof o=="bigint"?Jt(o):o,toBlock:typeof c=="bigint"?Jt(c):c,topics:u}]});return{abi:r,args:i,eventName:s,id:d,request:l(d),strict:!!a,type:"event"}}async function Mee(t,{address:e,args:n,event:r,events:i,fromBlock:s,strict:o,toBlock:a}={}){const c=i??(r?[r]:void 0),l=QS(t,{method:"eth_newFilter"});let u=[];c&&(u=[c.flatMap(g=>j6({abi:[g],eventName:g.name,args:n}))],r&&(u=u[0]));const d=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof s=="bigint"?Jt(s):s,toBlock:typeof a=="bigint"?Jt(a):a,...u.length?{topics:u}:{}}]});return{abi:c,args:n,eventName:r?r.name:void 0,fromBlock:s,id:d,request:l(d),strict:!!o,toBlock:a,type:"event"}}async function Bee(t){const e=QS(t,{method:"eth_newPendingTransactionFilter"}),n=await t.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:e(n),type:"transaction"}}async function $ee(t,e){const{abi:n,address:r,args:i,functionName:s,...o}=e,a=F0({abi:n,args:i,functionName:s});try{return await Xt(t,M6,"estimateGas")({data:a,to:r,...o})}catch(c){const l=o.account?mc(o.account):void 0;throw O5(c,{abi:n,address:r,args:i,docsPath:"/docs/contract/estimateContractGas",functionName:s,sender:l==null?void 0:l.address})}}async function MSe(t){const e=await t.request({method:"eth_blobBaseFee"});return BigInt(e)}const BSe=new Map,$Se=new Map;function jSe(t){const e=(i,s)=>({clear:()=>s.delete(i),get:()=>s.get(i),set:o=>s.set(i,o)}),n=e(t,BSe),r=e(t,$Se);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}async function LSe(t,{cacheKey:e,cacheTime:n=Number.POSITIVE_INFINITY}){const r=jSe(e),i=r.response.get();if(i&&n>0&&new Date().getTime()-i.created.getTime()<n)return i.data;let s=r.promise.get();s||(s=t(),r.promise.set(s));try{const o=await s;return r.response.set({created:new Date,data:o}),o}finally{r.promise.clear()}}const USe=t=>`blockNumber.${t}`;async function Pb(t,{cacheTime:e=t.cacheTime}={}){const n=await LSe(()=>t.request({method:"eth_blockNumber"}),{cacheKey:USe(t.uid),cacheTime:e});return BigInt(n)}async function FSe(t,{blockHash:e,blockNumber:n,blockTag:r="latest"}={}){const i=n!==void 0?Jt(n):void 0;let s;return e?s=await t.request({method:"eth_getBlockTransactionCountByHash",params:[e]},{dedupe:!0}):s=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[i||r]},{dedupe:!!i}),uh(s)}async function uV(t,{address:e,blockNumber:n,blockTag:r="latest"}){const i=n!==void 0?Jt(n):void 0,s=await t.request({method:"eth_getCode",params:[e,i||r]},{dedupe:!!i});if(s!=="0x")return s}function kB(t,e){if(!cu(t,{strict:!1}))throw new y0({address:t});if(!cu(e,{strict:!1}))throw new y0({address:e});return t.toLowerCase()===e.toLowerCase()}const dV="/docs/contract/decodeEventLog";function RB(t){const{abi:e,data:n,strict:r,topics:i}=t,s=r??!0,[o,...a]=i;if(!o)throw new CEe({docsPath:dV});const c=e.find(v=>v.type==="event"&&o===xB(dh(v)));if(!(c&&"name"in c)||c.type!=="event")throw new kX(o,{docsPath:dV});const{name:l,inputs:u}=c,d=u==null?void 0:u.some(v=>!("name"in v&&v.name));let h=d?[]:{};const g=u.filter(v=>"indexed"in v&&v.indexed);for(let v=0;v<g.length;v++){const _=g[v],T=a[v];if(!T)throw new zS({abiItem:c,param:_});h[d?v:_.name||v]=zSe({param:_,value:T})}const w=u.filter(v=>!("indexed"in v&&v.indexed));if(w.length>0){if(n&&n!=="0x")try{const v=KS(w,n);if(v)if(d)h=[...h,...v];else for(let _=0;_<w.length;_++)h[w[_].name]=v[_]}catch(v){if(s)throw v instanceof TX||v instanceof FX?new v5({abiItem:c,data:n,params:w,size:Ji(n)}):v}else if(s)throw new v5({abiItem:c,data:"0x",params:w,size:0})}return{eventName:l,args:Object.values(h).length>0?h:void 0}}function zSe({param:t,value:e}){return t.type==="string"||t.type==="bytes"||t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/)?e:(KS([t],e)||[])[0]}function NB(t){const{abi:e,args:n,logs:r,strict:i=!0}=t,s=(()=>{if(t.eventName)return Array.isArray(t.eventName)?t.eventName:[t.eventName]})();return r.map(o=>{var a;try{const c=kb({abi:e,name:o.topics[0]});if(!c)return null;const l=RB({...o,abi:[c],strict:i});return s&&!s.includes(l.eventName)||!HSe({args:l.args,inputs:c.inputs,matchArgs:n})?null:{...l,...o}}catch(c){let l,u;if(c instanceof kX)return null;if(c instanceof v5||c instanceof zS){if(i)return null;l=c.abiItem.name,u=(a=c.abiItem.inputs)==null?void 0:a.some(d=>!("name"in d&&d.name))}return{...o,args:u?[]:{},eventName:l}}}).filter(Boolean)}function HSe(t){const{args:e,inputs:n,matchArgs:r}=t;if(!r)return!0;if(!e)return!1;function i(s,o,a){try{return s.type==="address"?kB(o,a):s.type==="string"||s.type==="bytes"?Ns(g0(o))===a:o===a}catch{return!1}}return Array.isArray(e)&&Array.isArray(r)?r.every((s,o)=>{if(!s)return!0;const a=n[o];return a?(Array.isArray(s)?s:[s]).some(l=>i(a,l,e[o])):!1}):typeof e=="object"&&!Array.isArray(e)&&typeof r=="object"&&!Array.isArray(r)?Object.entries(r).every(([s,o])=>{if(!o)return!0;const a=n.find(l=>l.name===s);return a?(Array.isArray(o)?o:[o]).some(l=>i(a,l,e[s])):!1}):!1}function b0(t,{args:e,eventName:n}={}){return{...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,logIndex:t.logIndex?Number(t.logIndex):null,transactionHash:t.transactionHash?t.transactionHash:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,...n?{args:e,eventName:n}:{}}}async function PB(t,{address:e,blockHash:n,fromBlock:r,toBlock:i,event:s,events:o,args:a,strict:c}={}){const l=c??!1,u=o??(s?[s]:void 0);let d=[];u&&(d=[u.flatMap(v=>j6({abi:[v],eventName:v.name,args:o?void 0:a}))],s&&(d=d[0]));let h;n?h=await t.request({method:"eth_getLogs",params:[{address:e,topics:d,blockHash:n}]}):h=await t.request({method:"eth_getLogs",params:[{address:e,topics:d,fromBlock:typeof r=="bigint"?Jt(r):r,toBlock:typeof i=="bigint"?Jt(i):i}]});const g=h.map(w=>b0(w));return u?NB({abi:u,args:a,logs:g,strict:l}):g}async function OB(t,e){const{abi:n,address:r,args:i,blockHash:s,eventName:o,fromBlock:a,toBlock:c,strict:l}=e,u=o?kb({abi:n,name:o}):void 0,d=u?void 0:n.filter(h=>h.type==="event");return Xt(t,PB,"getLogs")({address:r,args:i,blockHash:s,event:u,events:d,fromBlock:a,toBlock:c,strict:l})}class WSe extends Je{constructor({address:e}){super(`No EIP-712 domain found on contract "${e}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${e}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function VSe(t,e){const{address:n,factory:r,factoryData:i}=e;try{const[s,o,a,c,l,u,d]=await Xt(t,lu,"readContract")({abi:qSe,address:n,functionName:"eip712Domain",factory:r,factoryData:i});return{domain:{name:o,version:a,chainId:Number(c),verifyingContract:l,salt:u},extensions:d,fields:s}}catch(s){const o=s;throw o.name==="ContractFunctionExecutionError"&&o.cause.name==="ContractFunctionZeroDataError"?new WSe({address:n}):o}}const qSe=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];function GSe(t){var e;return{baseFeePerGas:t.baseFeePerGas.map(n=>BigInt(n)),gasUsedRatio:t.gasUsedRatio,oldestBlock:BigInt(t.oldestBlock),reward:(e=t.reward)==null?void 0:e.map(n=>n.map(r=>BigInt(r)))}}async function KSe(t,{blockCount:e,blockNumber:n,blockTag:r="latest",rewardPercentiles:i}){const s=n?Jt(n):void 0,o=await t.request({method:"eth_feeHistory",params:[Jt(e),s||r,i]},{dedupe:!!s});return GSe(o)}async function ZS(t,{filter:e}){const n="strict"in e&&e.strict,r=await e.request({method:"eth_getFilterChanges",params:[e.id]});if(typeof r[0]=="string")return r;const i=r.map(s=>b0(s));return!("abi"in e)||!e.abi?i:NB({abi:e.abi,logs:i,strict:n})}async function YSe(t,{filter:e}){const n=e.strict??!1,i=(await e.request({method:"eth_getFilterLogs",params:[e.id]})).map(s=>b0(s));return e.abi?NB({abi:e.abi,logs:i,strict:n}):i}async function QSe(t,{address:e,blockNumber:n,blockTag:r="latest",slot:i}){const s=n!==void 0?Jt(n):void 0;return await t.request({method:"eth_getStorageAt",params:[e,i,s||r]})}async function JS(t,{blockHash:e,blockNumber:n,blockTag:r,hash:i,index:s}){var u,d,h;const o=r||"latest",a=n!==void 0?Jt(n):void 0;let c=null;if(i?c=await t.request({method:"eth_getTransactionByHash",params:[i]},{dedupe:!0}):e?c=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[e,Jt(s)]},{dedupe:!0}):(a||o)&&(c=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||o,Jt(s)]},{dedupe:!!a})),!c)throw new GX({blockHash:e,blockNumber:n,blockTag:o,hash:i,index:s});return(((h=(d=(u=t.chain)==null?void 0:u.formatters)==null?void 0:d.transaction)==null?void 0:h.format)||JX)(c)}async function ZSe(t,{hash:e,transactionReceipt:n}){const[r,i]=await Promise.all([Xt(t,Pb,"getBlockNumber")({}),e?Xt(t,JS,"getTransaction")({hash:e}):void 0]),s=(n==null?void 0:n.blockNumber)||(i==null?void 0:i.blockNumber);return s?r-s+1n:0n}const JSe={"0x0":"reverted","0x1":"success"};function XSe(t){const e={...t,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,contractAddress:t.contractAddress?t.contractAddress:null,cumulativeGasUsed:t.cumulativeGasUsed?BigInt(t.cumulativeGasUsed):null,effectiveGasPrice:t.effectiveGasPrice?BigInt(t.effectiveGasPrice):null,gasUsed:t.gasUsed?BigInt(t.gasUsed):null,logs:t.logs?t.logs.map(n=>b0(n)):null,to:t.to?t.to:null,transactionIndex:t.transactionIndex?uh(t.transactionIndex):null,status:t.status?JSe[t.status]:null,type:t.type?ZX[t.type]||t.type:null};return t.blobGasPrice&&(e.blobGasPrice=BigInt(t.blobGasPrice)),t.blobGasUsed&&(e.blobGasUsed=BigInt(t.blobGasUsed)),e}async function fP(t,{hash:e}){var i,s,o;const n=await t.request({method:"eth_getTransactionReceipt",params:[e]},{dedupe:!0});if(!n)throw new KX({hash:e});return(((o=(s=(i=t.chain)==null?void 0:i.formatters)==null?void 0:s.transactionReceipt)==null?void 0:o.format)||XSe)(n)}async function jee(t,e){var _;const{allowFailure:n=!0,batchSize:r,blockNumber:i,blockTag:s,multicallAddress:o,stateOverride:a}=e,c=e.contracts,l=r??(typeof((_=t.batch)==null?void 0:_.multicall)=="object"&&t.batch.multicall.batchSize||1024);let u=o;if(!u){if(!t.chain)throw new Error("client chain not configured. multicallAddress is required.");u=Nb({blockNumber:i,chain:t.chain,contract:"multicall3"})}const d=[[]];let h=0,g=0;for(let T=0;T<c.length;T++){const{abi:b,address:k,args:D,functionName:O}=c[T];try{const $=F0({abi:b,args:D,functionName:O});g+=($.length-2)/2,l>0&&g>l&&d[h].length>0&&(h++,g=($.length-2)/2,d[h]=[]),d[h]=[...d[h],{allowFailure:!0,callData:$,target:k}]}catch($){const C=O5($,{abi:b,address:k,args:D,docsPath:"/docs/contract/multicall",functionName:O});if(!n)throw C;d[h]=[...d[h],{allowFailure:!0,callData:"0x",target:k}]}}const w=await Promise.allSettled(d.map(T=>Xt(t,lu,"readContract")({abi:sP,address:u,args:[T],blockNumber:i,blockTag:s,functionName:"aggregate3",stateOverride:a}))),v=[];for(let T=0;T<w.length;T++){const b=w[T];if(b.status==="rejected"){if(!n)throw b.reason;for(let D=0;D<d[T].length;D++)v.push({status:"failure",error:b.reason,result:void 0});continue}const k=b.value;for(let D=0;D<k.length;D++){const{returnData:O,success:$}=k[D],{callData:C}=d[T][D],{abi:A,address:H,functionName:V,args:Y}=c[v.length];try{if(C==="0x")throw new FS;if(!$)throw new EB({data:O});const ee=Rb({abi:A,args:Y,data:O,functionName:V});v.push(n?{result:ee,status:"success"}:ee)}catch(ee){const x=O5(ee,{abi:A,address:H,args:Y,docsPath:"/docs/contract/multicall",functionName:V});if(!n)throw x;v.push({error:x,result:void 0,status:"failure"})}}}if(v.length!==c.length)throw new Je("multicall results mismatch");return v}const lk=new Map,fV=new Map;let e9e=0;function x0(t,e,n){const r=++e9e,i=()=>lk.get(t)||[],s=()=>{const u=i();lk.set(t,u.filter(d=>d.id!==r))},o=()=>{const u=fV.get(t);i().length===1&&u&&u(),s()},a=i();if(lk.set(t,[...a,{id:r,fns:e}]),a&&a.length>0)return o;const c={};for(const u in e)c[u]=(...d)=>{var g,w;const h=i();if(h.length!==0)for(const v of h)(w=(g=v.fns)[u])==null||w.call(g,...d)};const l=n(c);return typeof l=="function"&&fV.set(t,l),o}async function uC(t){return new Promise(e=>setTimeout(e,t))}function L6(t,{emitOnBegin:e,initialWaitTime:n,interval:r}){let i=!0;const s=()=>i=!1;return(async()=>{let a;e&&(a=await t({unpoll:s}));const c=await(n==null?void 0:n(a))??r;await uC(c);const l=async()=>{i&&(await t({unpoll:s}),await uC(r),l())};l()})(),s}function t9e(t,{blockTag:e="latest",emitMissed:n=!1,emitOnBegin:r=!1,onBlock:i,onError:s,includeTransactions:o,poll:a,pollingInterval:c=t.pollingInterval}){const l=typeof a<"u"?a:!(t.transport.type==="webSocket"||t.transport.type==="fallback"&&t.transport.transports[0].config.type==="webSocket"),u=o??!1;let d;return l?(()=>{const w=Ks(["watchBlocks",t.uid,e,n,r,u,c]);return x0(w,{onBlock:i,onError:s},v=>L6(async()=>{var _;try{const T=await Xt(t,v0,"getBlock")({blockTag:e,includeTransactions:u});if(T.number&&(d!=null&&d.number)){if(T.number===d.number)return;if(T.number-d.number>1&&n)for(let b=(d==null?void 0:d.number)+1n;b<T.number;b++){const k=await Xt(t,v0,"getBlock")({blockNumber:b,includeTransactions:u});v.onBlock(k,d),d=k}}(!(d!=null&&d.number)||e==="pending"&&!(T!=null&&T.number)||T.number&&T.number>d.number)&&(v.onBlock(T,d),d=T)}catch(T){(_=v.onError)==null||_.call(v,T)}},{emitOnBegin:r,interval:c}))})():(()=>{let w=!0,v=()=>w=!1;return(async()=>{try{const _=(()=>{if(t.transport.type==="fallback"){const b=t.transport.transports.find(k=>k.config.type==="webSocket");return b?b.value:t.transport}return t.transport})(),{unsubscribe:T}=await _.subscribe({params:["newHeads"],onData(b){var O,$,C;if(!w)return;const D=(((C=($=(O=t.chain)==null?void 0:O.formatters)==null?void 0:$.block)==null?void 0:C.format)||XX)(b.result);i(D,d),d=D},onError(b){s==null||s(b)}});v=T,w||v()}catch(_){s==null||s(_)}})(),()=>v()})()}function DB(t,{emitOnBegin:e=!1,emitMissed:n=!1,onBlockNumber:r,onError:i,poll:s,pollingInterval:o=t.pollingInterval}){const a=typeof s<"u"?s:!(t.transport.type==="webSocket"||t.transport.type==="fallback"&&t.transport.transports[0].config.type==="webSocket");let c;return a?(()=>{const d=Ks(["watchBlockNumber",t.uid,e,n,o]);return x0(d,{onBlockNumber:r,onError:i},h=>L6(async()=>{var g;try{const w=await Xt(t,Pb,"getBlockNumber")({cacheTime:0});if(c){if(w===c)return;if(w-c>1&&n)for(let v=c+1n;v<w;v++)h.onBlockNumber(v,c),c=v}(!c||w>c)&&(h.onBlockNumber(w,c),c=w)}catch(w){(g=h.onError)==null||g.call(h,w)}},{emitOnBegin:e,interval:o}))})():(()=>{const d=Ks(["watchBlockNumber",t.uid,e,n]);return x0(d,{onBlockNumber:r,onError:i},h=>{let g=!0,w=()=>g=!1;return(async()=>{try{const v=(()=>{if(t.transport.type==="fallback"){const T=t.transport.transports.find(b=>b.config.type==="webSocket");return T?T.value:t.transport}return t.transport})(),{unsubscribe:_}=await v.subscribe({params:["newHeads"],onData(T){var k;if(!g)return;const b=w0((k=T.result)==null?void 0:k.number);h.onBlockNumber(b,c),c=b},onError(T){var b;(b=h.onError)==null||b.call(h,T)}});w=_,g||w()}catch(v){i==null||i(v)}})(),()=>w()})})()}async function XS(t,{filter:e}){return e.request({method:"eth_uninstallFilter",params:[e.id]})}function n9e(t,{address:e,args:n,batch:r=!0,event:i,events:s,fromBlock:o,onError:a,onLogs:c,poll:l,pollingInterval:u=t.pollingInterval,strict:d}){const h=typeof l<"u"?l:typeof o=="bigint"?!0:!(t.transport.type==="webSocket"||t.transport.type==="fallback"&&t.transport.transports[0].config.type==="webSocket"),g=d??!1;return h?(()=>{const _=Ks(["watchEvent",e,n,r,t.uid,i,u,o]);return x0(_,{onLogs:c,onError:a},T=>{let b;o!==void 0&&(b=o-1n);let k,D=!1;const O=L6(async()=>{var $;if(!D){try{k=await Xt(t,Mee,"createEventFilter")({address:e,args:n,event:i,events:s,strict:g,fromBlock:o})}catch{}D=!0;return}try{let C;if(k)C=await Xt(t,ZS,"getFilterChanges")({filter:k});else{const A=await Xt(t,Pb,"getBlockNumber")({});b&&b!==A?C=await Xt(t,PB,"getLogs")({address:e,args:n,event:i,events:s,fromBlock:b+1n,toBlock:A}):C=[],b=A}if(C.length===0)return;if(r)T.onLogs(C);else for(const A of C)T.onLogs([A])}catch(C){k&&C instanceof Bg&&(D=!1),($=T.onError)==null||$.call(T,C)}},{emitOnBegin:!0,interval:u});return async()=>{k&&await Xt(t,XS,"uninstallFilter")({filter:k}),O()}})})():(()=>{let _=!0,T=()=>_=!1;return(async()=>{try{const b=(()=>{if(t.transport.type==="fallback"){const $=t.transport.transports.find(C=>C.config.type==="webSocket");return $?$.value:t.transport}return t.transport})(),k=s??(i?[i]:void 0);let D=[];k&&(D=[k.flatMap(C=>j6({abi:[C],eventName:C.name,args:n}))],i&&(D=D[0]));const{unsubscribe:O}=await b.subscribe({params:["logs",{address:e,topics:D}],onData($){var A;if(!_)return;const C=$.result;try{const{eventName:H,args:V}=RB({abi:k??[],data:C.data,topics:C.topics,strict:g}),Y=b0(C,{args:V,eventName:H});c([Y])}catch(H){let V,Y;if(H instanceof v5||H instanceof zS){if(d)return;V=H.abiItem.name,Y=(A=H.abiItem.inputs)==null?void 0:A.some(x=>!("name"in x&&x.name))}const ee=b0(C,{args:Y?[]:{},eventName:V});c([ee])}},onError($){a==null||a($)}});T=O,_||T()}catch(b){a==null||a(b)}})(),()=>T()})()}function r9e(t,{batch:e=!0,onError:n,onTransactions:r,poll:i,pollingInterval:s=t.pollingInterval}){return(typeof i<"u"?i:t.transport.type!=="webSocket")?(()=>{const l=Ks(["watchPendingTransactions",t.uid,e,s]);return x0(l,{onTransactions:r,onError:n},u=>{let d;const h=L6(async()=>{var g;try{if(!d)try{d=await Xt(t,Bee,"createPendingTransactionFilter")({});return}catch(v){throw h(),v}const w=await Xt(t,ZS,"getFilterChanges")({filter:d});if(w.length===0)return;if(e)u.onTransactions(w);else for(const v of w)u.onTransactions([v])}catch(w){(g=u.onError)==null||g.call(u,w)}},{emitOnBegin:!0,interval:s});return async()=>{d&&await Xt(t,XS,"uninstallFilter")({filter:d}),h()}})})():(()=>{let l=!0,u=()=>l=!1;return(async()=>{try{const{unsubscribe:d}=await t.transport.subscribe({params:["newPendingTransactions"],onData(h){if(!l)return;const g=h.result;r([g])},onError(h){n==null||n(h)}});u=d,l||u()}catch(d){n==null||n(d)}})(),()=>u()})()}async function i9e(t){var n;return((n=t.account)==null?void 0:n.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(r=>R6(r))}async function s9e(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}const eA=new nB(8192);function o9e(t,{enabled:e=!0,id:n}){if(!e||!n)return t();if(eA.get(n))return eA.get(n);const r=t().finally(()=>eA.delete(n));return eA.set(n,r),r}function dC(t,{delay:e=100,retryCount:n=2,shouldRetry:r=()=>!0}={}){return new Promise((i,s)=>{const o=async({count:a=0}={})=>{const c=async({error:l})=>{const u=typeof e=="function"?e({count:a,error:l}):e;u&&await uC(u),o({count:a+1})};try{const l=await t();i(l)}catch(l){if(a<n&&await r({count:a,error:l}))return c({error:l});s(l)}};o()})}function a9e(t,e={}){return async(n,r={})=>{const{dedupe:i=!1,retryDelay:s=150,retryCount:o=3,uid:a}={...e,...r},c=i?Ns(uv(`${a}.${Ks(n)}`)):void 0;return o9e(()=>dC(async()=>{try{return await t(n)}catch(l){const u=l;switch(u.code){case x5.code:throw new x5(u);case _5.code:throw new _5(u);case A5.code:throw new A5(u,{method:n.method});case E5.code:throw new E5(u);case Mg.code:throw new Mg(u);case Bg.code:throw new Bg(u);case C5.code:throw new C5(u);case o0.code:throw new o0(u);case hv.code:throw new hv(u);case S5.code:throw new S5(u,{method:n.method});case pv.code:throw new pv(u);case T5.code:throw new T5(u);case ai.code:throw new ai(u);case I5.code:throw new I5(u);case k5.code:throw new k5(u);case R5.code:throw new R5(u);case N5.code:throw new N5(u);case Na.code:throw new Na(u);case 5e3:throw new ai(u);default:throw l instanceof Je?l:new SCe(u)}}},{delay:({count:l,error:u})=>{var d;if(u&&u instanceof P3){const h=(d=u==null?void 0:u.headers)==null?void 0:d.get("Retry-After");if(h!=null&&h.match(/\d/))return Number.parseInt(h)*1e3}return~~(1<<l)*s},retryCount:o,shouldRetry:({error:l})=>c9e(l)}),{enabled:i,id:c})}}function c9e(t){return"code"in t&&typeof t.code=="number"?t.code===-1||t.code===pv.code||t.code===Mg.code:t instanceof P3&&t.status?t.status===403||t.status===408||t.status===413||t.status===429||t.status===500||t.status===502||t.status===503||t.status===504:!0}function l9e(t){return{formatters:void 0,fees:void 0,serializers:void 0,...t}}const u9e=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,d9e=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function Lee(t,{errorInstance:e=new Error("timed out"),timeout:n,signal:r}){return new Promise((i,s)=>{(async()=>{let o;try{const a=new AbortController;n>0&&(o=setTimeout(()=>{r?a.abort():s(e)},n)),i(await t({signal:(a==null?void 0:a.signal)||null}))}catch(a){(a==null?void 0:a.name)==="AbortError"&&s(e),s(a)}finally{clearTimeout(o)}})()})}function f9e(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const hV=f9e();function h9e(t,e={}){return{async request(n){var d;const{body:r,onRequest:i=e.onRequest,onResponse:s=e.onResponse,timeout:o=e.timeout??1e4}=n,a={...e.fetchOptions??{},...n.fetchOptions??{}},{headers:c,method:l,signal:u}=a;try{const h=await Lee(async({signal:w})=>{const v={...a,body:Array.isArray(r)?Ks(r.map(b=>({jsonrpc:"2.0",id:b.id??hV.take(),...b}))):Ks({jsonrpc:"2.0",id:r.id??hV.take(),...r}),headers:{"Content-Type":"application/json",...c},method:l||"POST",signal:u||(o>0?w:null)},_=new Request(t,v);return i&&await i(_),await fetch(t,v)},{errorInstance:new ZW({body:r,url:t}),timeout:o,signal:!0});s&&await s(h);let g;if((d=h.headers.get("Content-Type"))!=null&&d.startsWith("application/json")?g=await h.json():(g=await h.text(),g=JSON.parse(g||"{}")),!h.ok)throw new P3({body:r,details:Ks(g.error)||h.statusText,headers:h.headers,status:h.status,url:t});return g}catch(h){throw h instanceof P3||h instanceof ZW?h:new P3({body:r,cause:h,url:t})}}}}function p9e(t){const{domain:e={},message:n,primaryType:r}=t,i={EIP712Domain:Vee({domain:e}),...t.types};Wee({domain:e,message:n,primaryType:r,types:i});const s=["0x1901"];return e&&s.push(m9e({domain:e,types:i})),r!=="EIP712Domain"&&s.push(Uee({data:n,primaryType:r,types:i})),Ns(fh(s))}function m9e({domain:t,types:e}){return Uee({data:t,primaryType:"EIP712Domain",types:e})}function Uee({data:t,primaryType:e,types:n}){const r=Fee({data:t,primaryType:e,types:n});return Ns(r)}function Fee({data:t,primaryType:e,types:n}){const r=[{type:"bytes32"}],i=[g9e({primaryType:e,types:n})];for(const s of n[e]){const[o,a]=Hee({types:n,name:s.name,type:s.type,value:t[s.name]});r.push(o),i.push(a)}return Sb(r,i)}function g9e({primaryType:t,types:e}){const n=pd(w9e({primaryType:t,types:e}));return Ns(n)}function w9e({primaryType:t,types:e}){let n="";const r=zee({primaryType:t,types:e});r.delete(t);const i=[t,...Array.from(r).sort()];for(const s of i)n+=`${s}(${e[s].map(({name:o,type:a})=>`${a} ${o}`).join(",")})`;return n}function zee({primaryType:t,types:e},n=new Set){const r=t.match(/^\w*/u),i=r==null?void 0:r[0];if(n.has(i)||e[i]===void 0)return n;n.add(i);for(const s of e[i])zee({primaryType:s.type,types:e},n);return n}function Hee({types:t,name:e,type:n,value:r}){if(t[n]!==void 0)return[{type:"bytes32"},Ns(Fee({data:r,primaryType:n,types:t}))];if(n==="bytes")return r=`0x${(r.length%2?"0":"")+r.slice(2)}`,[{type:"bytes32"},Ns(r)];if(n==="string")return[{type:"bytes32"},Ns(pd(r))];if(n.lastIndexOf("]")===n.length-1){const i=n.slice(0,n.lastIndexOf("[")),s=r.map(o=>Hee({name:e,type:i,types:t,value:o}));return[{type:"bytes32"},Ns(Sb(s.map(([o])=>o),s.map(([,o])=>o)))]}return[{type:n},r]}function y9e(t){const{domain:e,message:n,primaryType:r,types:i}=t,s=(c,l)=>{const u={...l};for(const d of c){const{name:h,type:g}=d;g==="address"&&(u[h]=u[h].toLowerCase())}return u},o=i.EIP712Domain?e?s(i.EIP712Domain,e):{}:{},a=(()=>{if(r!=="EIP712Domain")return s(i[r],n)})();return Ks({domain:o,message:a,primaryType:r,types:i})}function Wee(t){const{domain:e,message:n,primaryType:r,types:i}=t,s=(o,a)=>{for(const c of o){const{name:l,type:u}=c,d=a[l],h=u.match(d9e);if(h&&(typeof d=="number"||typeof d=="bigint")){const[v,_,T]=h;Jt(d,{signed:_==="int",size:Number.parseInt(T)/8})}if(u==="address"&&typeof d=="string"&&!cu(d))throw new y0({address:d});const g=u.match(u9e);if(g){const[v,_]=g;if(_&&Ji(d)!==Number.parseInt(_))throw new IEe({expectedSize:Number.parseInt(_),givenSize:Ji(d)})}const w=i[u];w&&s(w,d)}};i.EIP712Domain&&e&&s(i.EIP712Domain,e),r!=="EIP712Domain"&&s(i[r],n)}function Vee({domain:t}){return[typeof(t==null?void 0:t.name)=="string"&&{name:"name",type:"string"},(t==null?void 0:t.version)&&{name:"version",type:"string"},typeof(t==null?void 0:t.chainId)=="number"&&{name:"chainId",type:"uint256"},(t==null?void 0:t.verifyingContract)&&{name:"verifyingContract",type:"address"},(t==null?void 0:t.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}const v9e=`Ethereum Signed Message:
`;function b9e(t){const e=typeof t=="string"?uv(t):typeof t.raw=="string"?t.raw:ps(t.raw),n=uv(`${v9e}${Ji(e)}`);return fh([n,e])}function qee(t,e){return Ns(b9e(t),e)}const Gee="0x6492649264926492649264926492649264926492649264926492649264926492";function x9e(t){return LX(t,-32)===Gee}function _9e(t){const{address:e,data:n,signature:r,to:i="hex"}=t,s=k6([Sb([{type:"address"},{type:"bytes"},{type:"bytes"}],[e,n,r]),Gee]);return i==="hex"?s:ml(s)}function A9e(t,e){let[n,r="0"]=t.split(".");const i=n.startsWith("-");if(i&&(n=n.slice(1)),r=r.replace(/(0+)$/,""),e===0)Math.round(+`.${r}`)===1&&(n=`${BigInt(n)+1n}`),r="";else if(r.length>e){const[s,o,a]=[r.slice(0,e-1),r.slice(e-1,e),r.slice(e)],c=Math.round(+`${o}.${a}`);c>9?r=`${BigInt(s)+BigInt(1)}0`.padStart(s.length+1,"0"):r=`${s}${c}`,r.length>e&&(r=r.slice(1),n=`${BigInt(n)+1n}`),r=r.slice(0,e)}else r=r.padEnd(e,"0");return BigInt(`${i?"-":""}${n}${r}`)}function E9e(t){return t.map(e=>({...e,value:BigInt(e.value)}))}function C9e(t){return{...t,balance:t.balance?BigInt(t.balance):void 0,nonce:t.nonce?uh(t.nonce):void 0,storageProof:t.storageProof?E9e(t.storageProof):void 0}}async function S9e(t,{address:e,blockNumber:n,blockTag:r,storageKeys:i}){const s=r??"latest",o=n!==void 0?Jt(n):void 0,a=await t.request({method:"eth_getProof",params:[e,i,o||s]});return C9e(a)}async function Kee(t,{confirmations:e=1,hash:n,onReplaced:r,pollingInterval:i=t.pollingInterval,retryCount:s=6,retryDelay:o=({count:c})=>~~(1<<c)*200,timeout:a}){const c=Ks(["waitForTransactionReceipt",t.uid,n]);let l=0,u,d,h,g=!1;return new Promise((w,v)=>{a&&setTimeout(()=>v(new QW({hash:n})),a);const _=x0(c,{onReplaced:r,resolve:w,reject:v},T=>{const b=Xt(t,DB,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:i,async onBlockNumber(k){const D=$=>{b(),$(),_()};let O=k;if(!g){l>s&&D(()=>T.reject(new QW({hash:n})));try{if(h){if(e>1&&(!h.blockNumber||O-h.blockNumber+1n<e))return;D(()=>T.resolve(h));return}if(u||(g=!0,await dC(async()=>{u=await Xt(t,JS,"getTransaction")({hash:n}),u.blockNumber&&(O=u.blockNumber)},{delay:o,retryCount:s}),g=!1),h=await Xt(t,fP,"getTransactionReceipt")({hash:n}),e>1&&(!h.blockNumber||O-h.blockNumber+1n<e))return;D(()=>T.resolve(h))}catch($){if($ instanceof GX||$ instanceof KX){if(!u){g=!1;return}try{d=u,g=!0;const C=await dC(()=>Xt(t,v0,"getBlock")({blockNumber:O,includeTransactions:!0}),{delay:o,retryCount:s,shouldRetry:({error:V})=>V instanceof QX});g=!1;const A=C.transactions.find(({from:V,nonce:Y})=>V===d.from&&Y===d.nonce);if(!A||(h=await Xt(t,fP,"getTransactionReceipt")({hash:A.hash}),e>1&&(!h.blockNumber||O-h.blockNumber+1n<e)))return;let H="replaced";A.to===d.to&&A.value===d.value?H="repriced":A.from===A.to&&A.value===0n&&(H="cancelled"),D(()=>{var V;(V=T.onReplaced)==null||V.call(T,{reason:H,replacedTransaction:d,transaction:A,transactionReceipt:h}),T.resolve(h)})}catch(C){D(()=>T.reject(C))}}else D(()=>T.reject($))}finally{l++}}}})})})}async function T9e(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(n=>qs(n))}async function I9e(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}async function k9e(t,e){var l,u,d,h;const{account:n=t.account,chain:r=t.chain,...i}=e;if(!n)throw new WS({docsPath:"/docs/actions/wallet/signTransaction"});const s=mc(n);O6({account:s,...e});const o=await Xt(t,D6,"getChainId")({});r!==null&&qX({currentChainId:o,chain:r});const a=(r==null?void 0:r.formatters)||((l=t.chain)==null?void 0:l.formatters),c=((u=a==null?void 0:a.transactionRequest)==null?void 0:u.format)||qS;return s.signTransaction?s.signTransaction({...i,chainId:o},{serializer:(h=(d=t.chain)==null?void 0:d.serializers)==null?void 0:h.transaction}):await t.request({method:"eth_signTransaction",params:[{...c(i),chainId:Jt(o),from:s.address}]},{retryCount:0})}async function Yee(t,{account:e=t.account,message:n}){if(!e)throw new WS({docsPath:"/docs/actions/wallet/signMessage"});const r=mc(e);if(r.signMessage)return r.signMessage({message:n});const i=typeof n=="string"?uv(n):n.raw instanceof Uint8Array?pd(n.raw):n.raw;return t.request({method:"personal_sign",params:[i,r.address]},{retryCount:0})}async function R9e(t,e){const{account:n=t.account,domain:r,message:i,primaryType:s}=e;if(!n)throw new WS({docsPath:"/docs/actions/wallet/signTypedData"});const o=mc(n),a={EIP712Domain:Vee({domain:r}),...e.types};if(Wee({domain:r,message:i,primaryType:s,types:a}),o.signTypedData)return o.signTypedData({domain:r,message:i,primaryType:s,types:a});const c=y9e({domain:r,message:i,primaryType:s,types:a});return t.request({method:"eth_signTypedData_v4",params:[o.address,c]},{retryCount:0})}async function MB(t,e){const{abi:n,address:r,args:i,dataSuffix:s,functionName:o,...a}=e,c=a.account?mc(a.account):t.account,l=F0({abi:n,args:i,functionName:o});try{const{data:u}=await Xt(t,$6,"call")({batch:!1,data:`${l}${s?s.replace("0x",""):""}`,to:r,...a,account:c}),d=Rb({abi:n,args:i,functionName:o,data:u||"0x"}),h=n.filter(g=>"name"in g&&g.name===e.functionName);return{result:d,request:{abi:h,address:r,args:i,dataSuffix:s,functionName:o,...a,account:c}}}catch(u){throw O5(u,{abi:n,address:r,args:i,docsPath:"/docs/contract/simulateContract",functionName:o,sender:c==null?void 0:c.address})}}async function N9e(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:Jt(e)}]},{retryCount:0})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Qee=BigInt(0),e9=BigInt(1),P9e=BigInt(2);function $g(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function U6(t){if(!$g(t))throw new Error("Uint8Array expected")}const O9e=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function mv(t){U6(t);let e="";for(let n=0;n<t.length;n++)e+=O9e[t[n]];return e}function Zee(t){const e=t.toString(16);return e.length&1?`0${e}`:e}function BB(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}const wf={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function pV(t){if(t>=wf._0&&t<=wf._9)return t-wf._0;if(t>=wf._A&&t<=wf._F)return t-(wf._A-10);if(t>=wf._a&&t<=wf._f)return t-(wf._a-10)}function gv(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length,n=e/2;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(n);for(let i=0,s=0;i<n;i++,s+=2){const o=pV(t.charCodeAt(s)),a=pV(t.charCodeAt(s+1));if(o===void 0||a===void 0){const c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}r[i]=o*16+a}return r}function gg(t){return BB(mv(t))}function $B(t){return U6(t),BB(mv(Uint8Array.from(t).reverse()))}function wv(t,e){return gv(t.toString(16).padStart(e*2,"0"))}function jB(t,e){return wv(t,e).reverse()}function D9e(t){return gv(Zee(t))}function Vl(t,e,n){let r;if(typeof e=="string")try{r=gv(e)}catch(s){throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${s}`)}else if($g(e))r=Uint8Array.from(e);else throw new Error(`${t} must be hex string or Uint8Array`);const i=r.length;if(typeof n=="number"&&i!==n)throw new Error(`${t} expected ${n} bytes, got ${i}`);return r}function D5(...t){let e=0;for(let r=0;r<t.length;r++){const i=t[r];U6(i),e+=i.length}const n=new Uint8Array(e);for(let r=0,i=0;r<t.length;r++){const s=t[r];n.set(s,i),i+=s.length}return n}function Jee(t,e){if(t.length!==e.length)return!1;let n=0;for(let r=0;r<t.length;r++)n|=t[r]^e[r];return n===0}function M9e(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function B9e(t){let e;for(e=0;t>Qee;t>>=e9,e+=1);return e}function $9e(t,e){return t>>BigInt(e)&e9}function j9e(t,e,n){return t|(n?e9:Qee)<<BigInt(e)}const LB=t=>(P9e<<BigInt(t-1))-e9,uk=t=>new Uint8Array(t),mV=t=>Uint8Array.from(t);function Xee(t,e,n){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 n!="function")throw new Error("hmacFn must be a function");let r=uk(t),i=uk(t),s=0;const o=()=>{r.fill(1),i.fill(0),s=0},a=(...d)=>n(i,r,...d),c=(d=uk())=>{i=a(mV([0]),d),r=a(),d.length!==0&&(i=a(mV([1]),d),r=a())},l=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let d=0;const h=[];for(;d<e;){r=a();const g=r.slice();h.push(g),d+=r.length}return D5(...h)};return(d,h)=>{o(),c(d);let g;for(;!(g=h(l()));)c();return o(),g}}const L9e={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"||$g(t),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 F6(t,e,n={}){const r=(i,s,o)=>{const a=L9e[s];if(typeof a!="function")throw new Error(`Invalid validator "${s}", expected function`);const c=t[i];if(!(o&&c===void 0)&&!a(c,t))throw new Error(`Invalid param ${String(i)}=${c} (${typeof c}), expected ${s}`)};for(const[i,s]of Object.entries(e))r(i,s,!1);for(const[i,s]of Object.entries(n))r(i,s,!0);return t}const U9e=Object.freeze(Object.defineProperty({__proto__:null,abytes:U6,bitGet:$9e,bitLen:B9e,bitMask:LB,bitSet:j9e,bytesToHex:mv,bytesToNumberBE:gg,bytesToNumberLE:$B,concatBytes:D5,createHmacDrbg:Xee,ensureBytes:Vl,equalBytes:Jee,hexToBytes:gv,hexToNumber:BB,isBytes:$g,numberToBytesBE:wv,numberToBytesLE:jB,numberToHexUnpadded:Zee,numberToVarBytesBE:D9e,utf8ToBytes:M9e,validateObject:F6},Symbol.toStringTag,{value:"Module"}));function F9e(t,e){const n=pl(t)?g0(t):t,r=pl(e)?g0(e):e;return Jee(n,r)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ps=BigInt(0),Yi=BigInt(1),jm=BigInt(2),z9e=BigInt(3),hP=BigInt(4),gV=BigInt(5),wV=BigInt(8);BigInt(9);BigInt(16);function da(t,e){const n=t%e;return n>=Ps?n:e+n}function H9e(t,e,n){if(n<=Ps||e<Ps)throw new Error("Expected power/modulo > 0");if(n===Yi)return Ps;let r=Yi;for(;e>Ps;)e&Yi&&(r=r*t%n),t=t*t%n,e>>=Yi;return r}function $c(t,e,n){let r=t;for(;e-- >Ps;)r*=r,r%=n;return r}function pP(t,e){if(t===Ps||e<=Ps)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let n=da(t,e),r=e,i=Ps,s=Yi;for(;n!==Ps;){const a=r/n,c=r%n,l=i-s*a;r=n,n=c,i=s,s=l}if(r!==Yi)throw new Error("invert: does not exist");return da(i,e)}function W9e(t){const e=(t-Yi)/jm;let n,r,i;for(n=t-Yi,r=0;n%jm===Ps;n/=jm,r++);for(i=jm;i<t&&H9e(i,e,t)!==t-Yi;i++);if(r===1){const o=(t+Yi)/hP;return function(c,l){const u=c.pow(l,o);if(!c.eql(c.sqr(u),l))throw new Error("Cannot find square root");return u}}const s=(n+Yi)/jm;return function(a,c){if(a.pow(c,e)===a.neg(a.ONE))throw new Error("Cannot find square root");let l=r,u=a.pow(a.mul(a.ONE,i),n),d=a.pow(c,s),h=a.pow(c,n);for(;!a.eql(h,a.ONE);){if(a.eql(h,a.ZERO))return a.ZERO;let g=1;for(let v=a.sqr(h);g<l&&!a.eql(v,a.ONE);g++)v=a.sqr(v);const w=a.pow(u,Yi<<BigInt(l-g-1));u=a.sqr(w),d=a.mul(d,w),h=a.mul(h,u),l=g}return d}}function V9e(t){if(t%hP===z9e){const e=(t+Yi)/hP;return function(r,i){const s=r.pow(i,e);if(!r.eql(r.sqr(s),i))throw new Error("Cannot find square root");return s}}if(t%wV===gV){const e=(t-gV)/wV;return function(r,i){const s=r.mul(i,jm),o=r.pow(s,e),a=r.mul(i,o),c=r.mul(r.mul(a,jm),o),l=r.mul(a,r.sub(c,r.ONE));if(!r.eql(r.sqr(l),i))throw new Error("Cannot find square root");return l}}return W9e(t)}const q9e=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function G9e(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=q9e.reduce((r,i)=>(r[i]="function",r),e);return F6(t,n)}function K9e(t,e,n){if(n<Ps)throw new Error("Expected power > 0");if(n===Ps)return t.ONE;if(n===Yi)return e;let r=t.ONE,i=e;for(;n>Ps;)n&Yi&&(r=t.mul(r,i)),i=t.sqr(i),n>>=Yi;return r}function Y9e(t,e){const n=new Array(e.length),r=e.reduce((s,o,a)=>t.is0(o)?s:(n[a]=s,t.mul(s,o)),t.ONE),i=t.inv(r);return e.reduceRight((s,o,a)=>t.is0(o)?s:(n[a]=t.mul(s,n[a]),t.mul(s,o)),i),n}function ete(t,e){const n=e!==void 0?e:t.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Q9e(t,e,n=!1,r={}){if(t<=Ps)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:s}=ete(t,e);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=V9e(t),a=Object.freeze({ORDER:t,BITS:i,BYTES:s,MASK:LB(i),ZERO:Ps,ONE:Yi,create:c=>da(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return Ps<=c&&c<t},is0:c=>c===Ps,isOdd:c=>(c&Yi)===Yi,neg:c=>da(-c,t),eql:(c,l)=>c===l,sqr:c=>da(c*c,t),add:(c,l)=>da(c+l,t),sub:(c,l)=>da(c-l,t),mul:(c,l)=>da(c*l,t),pow:(c,l)=>K9e(a,c,l),div:(c,l)=>da(c*pP(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>pP(c,t),sqrt:r.sqrt||(c=>o(a,c)),invertBatch:c=>Y9e(a,c),cmov:(c,l,u)=>u?l:c,toBytes:c=>n?jB(c,s):wv(c,s),fromBytes:c=>{if(c.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${c.length}`);return n?$B(c):gg(c)}});return Object.freeze(a)}function tte(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 nte(t){const e=tte(t);return e+Math.ceil(e/2)}function Z9e(t,e,n=!1){const r=t.length,i=tte(e),s=nte(e);if(r<16||r<s||r>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${r}`);const o=n?gg(t):$B(t),a=da(o,e-Yi)+Yi;return n?jB(a,i):wv(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const J9e=BigInt(0),dk=BigInt(1);function X9e(t,e){const n=(i,s)=>{const o=s.negate();return i?o:s},r=i=>{const s=Math.ceil(e/i)+1,o=2**(i-1);return{windows:s,windowSize:o}};return{constTimeNegate:n,unsafeLadder(i,s){let o=t.ZERO,a=i;for(;s>J9e;)s&dk&&(o=o.add(a)),a=a.double(),s>>=dk;return o},precomputeWindow(i,s){const{windows:o,windowSize:a}=r(s),c=[];let l=i,u=l;for(let d=0;d<o;d++){u=l,c.push(u);for(let h=1;h<a;h++)u=u.add(l),c.push(u);l=u.double()}return c},wNAF(i,s,o){const{windows:a,windowSize:c}=r(i);let l=t.ZERO,u=t.BASE;const d=BigInt(2**i-1),h=2**i,g=BigInt(i);for(let w=0;w<a;w++){const v=w*c;let _=Number(o&d);o>>=g,_>c&&(_-=h,o+=dk);const T=v,b=v+Math.abs(_)-1,k=w%2!==0,D=_<0;_===0?u=u.add(n(k,s[T])):l=l.add(n(D,s[b]))}return{p:l,f:u}},wNAFCached(i,s,o,a){const c=i._WINDOW_SIZE||1;let l=s.get(i);return l||(l=this.precomputeWindow(i,c),c!==1&&s.set(i,a(l))),this.wNAF(c,l,o)}}}function rte(t){return G9e(t.Fp),F6(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...ete(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function eTe(t){const e=rte(t);F6(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:i}=e;if(n){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:tTe,hexToBytes:nTe}=U9e,Gm={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=Gm;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const n=t[1],r=t.subarray(2,n+2);if(!n||r.length!==n)throw new e("Invalid signature integer: wrong length");if(r[0]&128)throw new e("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:tTe(r),l:t.subarray(n+2)}},toSig(t){const{Err:e}=Gm,n=typeof t=="string"?nTe(t):t;U6(n);let r=n.length;if(r<2||n[0]!=48)throw new e("Invalid signature tag");if(n[1]!==r-2)throw new e("Invalid signature: incorrect length");const{d:i,l:s}=Gm._parseInt(n.subarray(2)),{d:o,l:a}=Gm._parseInt(s);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s:o}},hexFromSig(t){const e=l=>Number.parseInt(l[0],16)&8?"00"+l:l,n=l=>{const u=l.toString(16);return u.length&1?`0${u}`:u},r=e(n(t.s)),i=e(n(t.r)),s=r.length/2,o=i.length/2,a=n(s),c=n(o);return`30${n(o+s+4)}02${c}${i}02${a}${r}`}},Uf=BigInt(0),el=BigInt(1);BigInt(2);const yV=BigInt(3);BigInt(4);function rTe(t){const e=eTe(t),{Fp:n}=e,r=e.toBytes||((w,v,_)=>{const T=v.toAffine();return D5(Uint8Array.from([4]),n.toBytes(T.x),n.toBytes(T.y))}),i=e.fromBytes||(w=>{const v=w.subarray(1),_=n.fromBytes(v.subarray(0,n.BYTES)),T=n.fromBytes(v.subarray(n.BYTES,2*n.BYTES));return{x:_,y:T}});function s(w){const{a:v,b:_}=e,T=n.sqr(w),b=n.mul(T,w);return n.add(n.add(b,n.mul(w,v)),_)}if(!n.eql(n.sqr(e.Gy),s(e.Gx)))throw new Error("bad generator point: equation left != right");function o(w){return typeof w=="bigint"&&Uf<w&&w<e.n}function a(w){if(!o(w))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(w){const{allowedPrivateKeyLengths:v,nByteLength:_,wrapPrivateKey:T,n:b}=e;if(v&&typeof w!="bigint"){if($g(w)&&(w=mv(w)),typeof w!="string"||!v.includes(w.length))throw new Error("Invalid key");w=w.padStart(_*2,"0")}let k;try{k=typeof w=="bigint"?w:gg(Vl("private key",w,_))}catch{throw new Error(`private key must be ${_} bytes, hex or bigint, not ${typeof w}`)}return T&&(k=da(k,b)),a(k),k}const l=new Map;function u(w){if(!(w instanceof d))throw new Error("ProjectivePoint expected")}class d{constructor(v,_,T){if(this.px=v,this.py=_,this.pz=T,v==null||!n.isValid(v))throw new Error("x required");if(_==null||!n.isValid(_))throw new Error("y required");if(T==null||!n.isValid(T))throw new Error("z required")}static fromAffine(v){const{x:_,y:T}=v||{};if(!v||!n.isValid(_)||!n.isValid(T))throw new Error("invalid affine point");if(v instanceof d)throw new Error("projective point not allowed");const b=k=>n.eql(k,n.ZERO);return b(_)&&b(T)?d.ZERO:new d(_,T,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(v){const _=n.invertBatch(v.map(T=>T.pz));return v.map((T,b)=>T.toAffine(_[b])).map(d.fromAffine)}static fromHex(v){const _=d.fromAffine(i(Vl("pointHex",v)));return _.assertValidity(),_}static fromPrivateKey(v){return d.BASE.multiply(c(v))}_setWindowSize(v){this._WINDOW_SIZE=v,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:v,y:_}=this.toAffine();if(!n.isValid(v)||!n.isValid(_))throw new Error("bad point: x or y not FE");const T=n.sqr(_),b=s(v);if(!n.eql(T,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(n.isOdd)return!n.isOdd(v);throw new Error("Field doesn't support isOdd")}equals(v){u(v);const{px:_,py:T,pz:b}=this,{px:k,py:D,pz:O}=v,$=n.eql(n.mul(_,O),n.mul(k,b)),C=n.eql(n.mul(T,O),n.mul(D,b));return $&&C}negate(){return new d(this.px,n.neg(this.py),this.pz)}double(){const{a:v,b:_}=e,T=n.mul(_,yV),{px:b,py:k,pz:D}=this;let O=n.ZERO,$=n.ZERO,C=n.ZERO,A=n.mul(b,b),H=n.mul(k,k),V=n.mul(D,D),Y=n.mul(b,k);return Y=n.add(Y,Y),C=n.mul(b,D),C=n.add(C,C),O=n.mul(v,C),$=n.mul(T,V),$=n.add(O,$),O=n.sub(H,$),$=n.add(H,$),$=n.mul(O,$),O=n.mul(Y,O),C=n.mul(T,C),V=n.mul(v,V),Y=n.sub(A,V),Y=n.mul(v,Y),Y=n.add(Y,C),C=n.add(A,A),A=n.add(C,A),A=n.add(A,V),A=n.mul(A,Y),$=n.add($,A),V=n.mul(k,D),V=n.add(V,V),A=n.mul(V,Y),O=n.sub(O,A),C=n.mul(V,H),C=n.add(C,C),C=n.add(C,C),new d(O,$,C)}add(v){u(v);const{px:_,py:T,pz:b}=this,{px:k,py:D,pz:O}=v;let $=n.ZERO,C=n.ZERO,A=n.ZERO;const H=e.a,V=n.mul(e.b,yV);let Y=n.mul(_,k),ee=n.mul(T,D),x=n.mul(b,O),E=n.add(_,T),y=n.add(k,D);E=n.mul(E,y),y=n.add(Y,ee),E=n.sub(E,y),y=n.add(_,b);let I=n.add(k,O);return y=n.mul(y,I),I=n.add(Y,x),y=n.sub(y,I),I=n.add(T,b),$=n.add(D,O),I=n.mul(I,$),$=n.add(ee,x),I=n.sub(I,$),A=n.mul(H,y),$=n.mul(V,x),A=n.add($,A),$=n.sub(ee,A),A=n.add(ee,A),C=n.mul($,A),ee=n.add(Y,Y),ee=n.add(ee,Y),x=n.mul(H,x),y=n.mul(V,y),ee=n.add(ee,x),x=n.sub(Y,x),x=n.mul(H,x),y=n.add(y,x),Y=n.mul(ee,y),C=n.add(C,Y),Y=n.mul(I,y),$=n.mul(E,$),$=n.sub($,Y),Y=n.mul(E,ee),A=n.mul(I,A),A=n.add(A,Y),new d($,C,A)}subtract(v){return this.add(v.negate())}is0(){return this.equals(d.ZERO)}wNAF(v){return g.wNAFCached(this,l,v,_=>{const T=n.invertBatch(_.map(b=>b.pz));return _.map((b,k)=>b.toAffine(T[k])).map(d.fromAffine)})}multiplyUnsafe(v){const _=d.ZERO;if(v===Uf)return _;if(a(v),v===el)return this;const{endo:T}=e;if(!T)return g.unsafeLadder(this,v);let{k1neg:b,k1:k,k2neg:D,k2:O}=T.splitScalar(v),$=_,C=_,A=this;for(;k>Uf||O>Uf;)k&el&&($=$.add(A)),O&el&&(C=C.add(A)),A=A.double(),k>>=el,O>>=el;return b&&($=$.negate()),D&&(C=C.negate()),C=new d(n.mul(C.px,T.beta),C.py,C.pz),$.add(C)}multiply(v){a(v);let _=v,T,b;const{endo:k}=e;if(k){const{k1neg:D,k1:O,k2neg:$,k2:C}=k.splitScalar(_);let{p:A,f:H}=this.wNAF(O),{p:V,f:Y}=this.wNAF(C);A=g.constTimeNegate(D,A),V=g.constTimeNegate($,V),V=new d(n.mul(V.px,k.beta),V.py,V.pz),T=A.add(V),b=H.add(Y)}else{const{p:D,f:O}=this.wNAF(_);T=D,b=O}return d.normalizeZ([T,b])[0]}multiplyAndAddUnsafe(v,_,T){const b=d.BASE,k=(O,$)=>$===Uf||$===el||!O.equals(b)?O.multiplyUnsafe($):O.multiply($),D=k(this,_).add(k(v,T));return D.is0()?void 0:D}toAffine(v){const{px:_,py:T,pz:b}=this,k=this.is0();v==null&&(v=k?n.ONE:n.inv(b));const D=n.mul(_,v),O=n.mul(T,v),$=n.mul(b,v);if(k)return{x:n.ZERO,y:n.ZERO};if(!n.eql($,n.ONE))throw new Error("invZ was invalid");return{x:D,y:O}}isTorsionFree(){const{h:v,isTorsionFree:_}=e;if(v===el)return!0;if(_)return _(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:v,clearCofactor:_}=e;return v===el?this:_?_(d,this):this.multiplyUnsafe(e.h)}toRawBytes(v=!0){return this.assertValidity(),r(d,this,v)}toHex(v=!0){return mv(this.toRawBytes(v))}}d.BASE=new d(e.Gx,e.Gy,n.ONE),d.ZERO=new d(n.ZERO,n.ONE,n.ZERO);const h=e.nBitLength,g=X9e(d,e.endo?Math.ceil(h/2):h);return{CURVE:e,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:o}}function iTe(t){const e=rte(t);return F6(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function sTe(t){const e=iTe(t),{Fp:n,n:r}=e,i=n.BYTES+1,s=2*n.BYTES+1;function o(y){return Uf<y&&y<n.ORDER}function a(y){return da(y,r)}function c(y){return pP(y,r)}const{ProjectivePoint:l,normPrivateKeyToScalar:u,weierstrassEquation:d,isWithinCurveOrder:h}=rTe({...e,toBytes(y,I,B){const M=I.toAffine(),W=n.toBytes(M.x),z=D5;return B?z(Uint8Array.from([I.hasEvenY()?2:3]),W):z(Uint8Array.from([4]),W,n.toBytes(M.y))},fromBytes(y){const I=y.length,B=y[0],M=y.subarray(1);if(I===i&&(B===2||B===3)){const W=gg(M);if(!o(W))throw new Error("Point is not on curve");const z=d(W);let P;try{P=n.sqrt(z)}catch(ve){const j=ve instanceof Error?": "+ve.message:"";throw new Error("Point is not on curve"+j)}const Z=(P&el)===el;return(B&1)===1!==Z&&(P=n.neg(P)),{x:W,y:P}}else if(I===s&&B===4){const W=n.fromBytes(M.subarray(0,n.BYTES)),z=n.fromBytes(M.subarray(n.BYTES,2*n.BYTES));return{x:W,y:z}}else throw new Error(`Point of length ${I} was invalid. Expected ${i} compressed bytes or ${s} uncompressed bytes`)}}),g=y=>mv(wv(y,e.nByteLength));function w(y){const I=r>>el;return y>I}function v(y){return w(y)?a(-y):y}const _=(y,I,B)=>gg(y.slice(I,B));class T{constructor(I,B,M){this.r=I,this.s=B,this.recovery=M,this.assertValidity()}static fromCompact(I){const B=e.nByteLength;return I=Vl("compactSignature",I,B*2),new T(_(I,0,B),_(I,B,2*B))}static fromDER(I){const{r:B,s:M}=Gm.toSig(Vl("DER",I));return new T(B,M)}assertValidity(){if(!h(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!h(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(I){return new T(this.r,this.s,I)}recoverPublicKey(I){const{r:B,s:M,recovery:W}=this,z=C(Vl("msgHash",I));if(W==null||![0,1,2,3].includes(W))throw new Error("recovery id invalid");const P=W===2||W===3?B+e.n:B;if(P>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const Z=W&1?"03":"02",he=l.fromHex(Z+g(P)),ve=c(P),j=a(-z*ve),ge=a(M*ve),te=l.BASE.multiplyAndAddUnsafe(he,j,ge);if(!te)throw new Error("point at infinify");return te.assertValidity(),te}hasHighS(){return w(this.s)}normalizeS(){return this.hasHighS()?new T(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return gv(this.toDERHex())}toDERHex(){return Gm.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return gv(this.toCompactHex())}toCompactHex(){return g(this.r)+g(this.s)}}const b={isValidPrivateKey(y){try{return u(y),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const y=nte(e.n);return Z9e(e.randomBytes(y),e.n)},precompute(y=8,I=l.BASE){return I._setWindowSize(y),I.multiply(BigInt(3)),I}};function k(y,I=!0){return l.fromPrivateKey(y).toRawBytes(I)}function D(y){const I=$g(y),B=typeof y=="string",M=(I||B)&&y.length;return I?M===i||M===s:B?M===2*i||M===2*s:y instanceof l}function O(y,I,B=!0){if(D(y))throw new Error("first arg must be private key");if(!D(I))throw new Error("second arg must be public key");return l.fromHex(I).multiply(u(y)).toRawBytes(B)}const $=e.bits2int||function(y){const I=gg(y),B=y.length*8-e.nBitLength;return B>0?I>>BigInt(B):I},C=e.bits2int_modN||function(y){return a($(y))},A=LB(e.nBitLength);function H(y){if(typeof y!="bigint")throw new Error("bigint expected");if(!(Uf<=y&&y<A))throw new Error(`bigint expected < 2^${e.nBitLength}`);return wv(y,e.nByteLength)}function V(y,I,B=Y){if(["recovered","canonical"].some(se=>se in B))throw new Error("sign() legacy options not supported");const{hash:M,randomBytes:W}=e;let{lowS:z,prehash:P,extraEntropy:Z}=B;z==null&&(z=!0),y=Vl("msgHash",y),P&&(y=Vl("prehashed msgHash",M(y)));const he=C(y),ve=u(I),j=[H(ve),H(he)];if(Z!=null&&Z!==!1){const se=Z===!0?W(n.BYTES):Z;j.push(Vl("extraEntropy",se))}const ge=D5(...j),te=he;function ae(se){const L=$(se);if(!h(L))return;const re=c(L),be=l.BASE.multiply(L).toAffine(),Se=a(be.x);if(Se===Uf)return;const Ie=a(re*a(te+Se*ve));if(Ie===Uf)return;let Ue=(be.x===Se?0:2)|Number(be.y&el),lt=Ie;return z&&w(Ie)&&(lt=v(Ie),Ue^=1),new T(Se,lt,Ue)}return{seed:ge,k2sig:ae}}const Y={lowS:e.lowS,prehash:!1},ee={lowS:e.lowS,prehash:!1};function x(y,I,B=Y){const{seed:M,k2sig:W}=V(y,I,B),z=e;return Xee(z.hash.outputLen,z.nByteLength,z.hmac)(M,W)}l.BASE._setWindowSize(8);function E(y,I,B,M=ee){var be;const W=y;if(I=Vl("msgHash",I),B=Vl("publicKey",B),"strict"in M)throw new Error("options.strict was renamed to lowS");const{lowS:z,prehash:P}=M;let Z,he;try{if(typeof W=="string"||$g(W))try{Z=T.fromDER(W)}catch(Se){if(!(Se instanceof Gm.Err))throw Se;Z=T.fromCompact(W)}else if(typeof W=="object"&&typeof W.r=="bigint"&&typeof W.s=="bigint"){const{r:Se,s:Ie}=W;Z=new T(Se,Ie)}else throw new Error("PARSE");he=l.fromHex(B)}catch(Se){if(Se.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(z&&Z.hasHighS())return!1;P&&(I=e.hash(I));const{r:ve,s:j}=Z,ge=C(I),te=c(j),ae=a(ge*te),se=a(ve*te),L=(be=l.BASE.multiplyAndAddUnsafe(he,ae,se))==null?void 0:be.toAffine();return L?a(L.x)===ve:!1}return{CURVE:e,getPublicKey:k,getSharedSecret:O,sign:x,verify:E,ProjectivePoint:l,Signature:T,utils:b}}class ite extends sB{constructor(e,n){super(),this.finished=!1,this.destroyed=!1,rB(e);const r=fv(n);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,s=new Uint8Array(i);s.set(r.length>i?e.create().update(r).digest():r);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),s.fill(0)}update(e){return Dg(this),this.iHash.update(e),this}digestInto(e){Dg(this),Cb(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:n,iHash:r,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=a,e.oHash=n._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const t9=(t,e,n)=>new ite(t,e).update(n).digest();t9.create=(t,e)=>new ite(t,e);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function oTe(t){return{hash:t,hmac:(e,...n)=>t9(t,e,b5(...n)),randomBytes:oB}}function aTe(t,e){const n=r=>sTe({...t,...oTe(r)});return Object.freeze({...n(e),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ste=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),vV=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),cTe=BigInt(1),mP=BigInt(2),bV=(t,e)=>(t+e/mP)/e;function lTe(t){const e=ste,n=BigInt(3),r=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=t*t*t%e,u=l*l*t%e,d=$c(u,n,e)*u%e,h=$c(d,n,e)*u%e,g=$c(h,mP,e)*l%e,w=$c(g,i,e)*g%e,v=$c(w,s,e)*w%e,_=$c(v,a,e)*v%e,T=$c(_,c,e)*_%e,b=$c(T,a,e)*v%e,k=$c(b,n,e)*u%e,D=$c(k,o,e)*w%e,O=$c(D,r,e)*l%e,$=$c(O,mP,e);if(!gP.eql(gP.sqr($),t))throw new Error("Cannot find square root");return $}const gP=Q9e(ste,void 0,void 0,{sqrt:lTe}),UB=aTe({a:BigInt(0),b:BigInt(7),Fp:gP,n:vV,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=vV,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-cTe*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=n,o=BigInt("0x100000000000000000000000000000000"),a=bV(s*t,e),c=bV(-r*t,e);let l=da(t-a*n-c*i,e),u=da(-a*r-c*s,e);const d=l>o,h=u>o;if(d&&(l=e-l),h&&(u=e-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:d,k1:l,k2neg:h,k2:u}}}},Ib);BigInt(0);UB.ProjectivePoint;const uTe=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:UB},Symbol.toStringTag,{value:"Module"}));function dTe({r:t,s:e,to:n="hex",v:r,yParity:i}){const s=(()=>{if(i===0||i===1)return i;if(r&&(r===27n||r===28n||r>=35n))return r%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),o=`0x${new UB.Signature(w0(t),w0(e)).toCompactHex()}${s===0?"1b":"1c"}`;return n==="hex"?o:ml(o)}async function FB(t,e){const{address:n,factory:r,factoryData:i,hash:s,signature:o,...a}=e,c=pl(o)?o:typeof o=="object"&&"r"in o&&"s"in o?dTe(o):ps(o),l=await(async()=>!r&&!i||x9e(c)?c:_9e({address:r,data:i,signature:c}))();try{const{data:u}=await Xt(t,$6,"call")({data:HS({abi:r8e,args:[n,s,l],bytecode:hSe}),...a});return F9e(u??"0x0","0x1")}catch(u){try{if(kB(qs(n),await UX({hash:s,signature:o})))return!0}catch{}if(u instanceof See)return!1;throw u}}async function fTe(t,{address:e,message:n,factory:r,factoryData:i,signature:s,...o}){const a=qee(n);return FB(t,{address:e,factory:r,factoryData:i,hash:a,signature:s,...o})}async function hTe(t,e){const{address:n,factory:r,factoryData:i,signature:s,message:o,primaryType:a,types:c,domain:l,...u}=e,d=p9e({message:o,primaryType:a,types:c,domain:l});return FB(t,{address:n,factory:r,factoryData:i,hash:d,signature:s,...u})}async function pTe(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}function ote(t,e){const{abi:n,address:r,args:i,batch:s=!0,eventName:o,fromBlock:a,onError:c,onLogs:l,poll:u,pollingInterval:d=t.pollingInterval,strict:h}=e;return(typeof u<"u"?u:typeof a=="bigint"?!0:!(t.transport.type==="webSocket"||t.transport.type==="fallback"&&t.transport.transports[0].config.type==="webSocket"))?(()=>{const _=h??!1,T=Ks(["watchContractEvent",r,i,s,t.uid,o,d,_,a]);return x0(T,{onLogs:l,onError:c},b=>{let k;a!==void 0&&(k=a-1n);let D,O=!1;const $=L6(async()=>{var C;if(!O){try{D=await Xt(t,IB,"createContractEventFilter")({abi:n,address:r,args:i,eventName:o,strict:_,fromBlock:a})}catch{}O=!0;return}try{let A;if(D)A=await Xt(t,ZS,"getFilterChanges")({filter:D});else{const H=await Xt(t,Pb,"getBlockNumber")({});k&&k<H?A=await Xt(t,OB,"getContractEvents")({abi:n,address:r,args:i,eventName:o,fromBlock:k+1n,toBlock:H,strict:_}):A=[],k=H}if(A.length===0)return;if(s)b.onLogs(A);else for(const H of A)b.onLogs([H])}catch(A){D&&A instanceof Bg&&(O=!1),(C=b.onError)==null||C.call(b,A)}},{emitOnBegin:!0,interval:d});return async()=>{D&&await Xt(t,XS,"uninstallFilter")({filter:D}),$()}})})():(()=>{const _=h??!1,T=Ks(["watchContractEvent",r,i,s,t.uid,o,d,_]);let b=!0,k=()=>b=!1;return x0(T,{onLogs:l,onError:c},D=>((async()=>{try{const O=(()=>{if(t.transport.type==="fallback"){const A=t.transport.transports.find(H=>H.config.type==="webSocket");return A?A.value:t.transport}return t.transport})(),$=o?j6({abi:n,eventName:o,args:i}):[],{unsubscribe:C}=await O.subscribe({params:["logs",{address:r,topics:$}],onData(A){var V;if(!b)return;const H=A.result;try{const{eventName:Y,args:ee}=RB({abi:n,data:H.data,topics:H.topics,strict:h}),x=b0(H,{args:ee,eventName:Y});D.onLogs([x])}catch(Y){let ee,x;if(Y instanceof v5||Y instanceof zS){if(h)return;ee=Y.abiItem.name,x=(V=Y.abiItem.inputs)==null?void 0:V.some(y=>!("name"in y&&y.name))}const E=b0(H,{args:x?[]:{},eventName:ee});D.onLogs([E])}},onError(A){var H;(H=D.onError)==null||H.call(D,A)}});k=C,b||k()}catch(O){c==null||c(O)}})(),()=>k()))})()}async function zB(t,e){const{abi:n,address:r,args:i,dataSuffix:s,functionName:o,...a}=e,c=F0({abi:n,args:i,functionName:o});return Xt(t,GS,"sendTransaction")({data:`${c}${s?s.replace("0x",""):""}`,to:r,...a})}function Ms(t,e,n){const r=t[e.name];if(typeof r=="function")return r;const i=t[n];return typeof i=="function"?i:s=>e(t,s)}const JA="2.13.4",mTe=()=>`@wagmi/core@${JA}`;var ate=function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},fC,cte;let z0=class wP extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return mTe()}constructor(e,n={}){var s;super(),fC.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const r=n.cause instanceof wP?n.cause.details:(s=n.cause)!=null&&s.message?n.cause.message:n.details,i=n.cause instanceof wP&&n.cause.docsPath||n.docsPath;this.message=[e||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: ${this.docsBaseUrl}${i}.html${n.docsSlug?`#${n.docsSlug}`:""}`]:[],...r?[`Details: ${r}`]:[],`Version: ${this.version}`].join(`
`),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=e}walk(e){return ate(this,fC,"m",cte).call(this,this,e)}};fC=new WeakSet,cte=function t(e,n){return n!=null&&n(e)?e:e.cause?ate(this,fC,"m",t).call(this,e.cause,n):e};class jg extends z0{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class gTe extends z0{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class lte extends z0{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class wTe extends z0{constructor({address:e,connector:n}){super(`Account "${e}" not found for connector "${n.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class yTe extends z0{constructor({connectionChainId:e,connectorChainId:n}){super(`The current chain of the connector (id: ${n}) does not match the connection's chain (id: ${e}).`,{metaMessages:[`Current Chain ID:  ${n}`,`Expected Chain ID: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}async function xV(t,e){var r;let n;if(typeof e.connector=="function"?n=t._internal.connectors.setup(e.connector):n=e.connector,n.uid===t.state.current)throw new gTe;try{t.setState(o=>({...o,status:"connecting"})),n.emitter.emit("message",{type:"connecting"});const i=await n.connect({chainId:e.chainId}),s=i.accounts;return n.emitter.off("connect",t._internal.events.connect),n.emitter.on("change",t._internal.events.change),n.emitter.on("disconnect",t._internal.events.disconnect),await((r=t.storage)==null?void 0:r.setItem("recentConnectorId",n.id)),t.setState(o=>({...o,connections:new Map(o.connections).set(n.uid,{accounts:s,chainId:i.chainId,connector:n}),current:n.uid,status:"connected"})),{accounts:s,chainId:i.chainId}}catch(i){throw t.setState(s=>({...s,status:s.current?"connected":"disconnected"})),i}}function ute({abi:t,address:e,client:n}){const r=n,[i,s]=r?"public"in r&&"wallet"in r?[r.public,r.wallet]:"public"in r?[r.public,void 0]:"wallet"in r?[void 0,r.wallet]:[r,r]:[void 0,void 0],o=i!=null,a=s!=null,c={};let l=!1,u=!1,d=!1;for(const h of t)if(h.type==="function"?h.stateMutability==="view"||h.stateMutability==="pure"?l=!0:u=!0:h.type==="event"&&(d=!0),l&&u&&d)break;return o&&(l&&(c.read=new Proxy({},{get(h,g){return(...w)=>{const{args:v,options:_}=tA(w);return Xt(i,lu,"readContract")({abi:t,address:e,functionName:g,args:v,..._})}}})),u&&(c.simulate=new Proxy({},{get(h,g){return(...w)=>{const{args:v,options:_}=tA(w);return Xt(i,MB,"simulateContract")({abi:t,address:e,functionName:g,args:v,..._})}}})),d&&(c.createEventFilter=new Proxy({},{get(h,g){return(...w)=>{const v=t.find(b=>b.type==="event"&&b.name===g),{args:_,options:T}=fk(w,v);return Xt(i,IB,"createContractEventFilter")({abi:t,address:e,eventName:g,args:_,...T})}}}),c.getEvents=new Proxy({},{get(h,g){return(...w)=>{const v=t.find(b=>b.type==="event"&&b.name===g),{args:_,options:T}=fk(w,v);return Xt(i,OB,"getContractEvents")({abi:t,address:e,eventName:g,args:_,...T})}}}),c.watchEvent=new Proxy({},{get(h,g){return(...w)=>{const v=t.find(b=>b.type==="event"&&b.name===g),{args:_,options:T}=fk(w,v);return Xt(i,ote,"watchContractEvent")({abi:t,address:e,eventName:g,args:_,...T})}}}))),a&&u&&(c.write=new Proxy({},{get(h,g){return(...w)=>{const{args:v,options:_}=tA(w);return Xt(s,zB,"writeContract")({abi:t,address:e,functionName:g,args:v,..._})}}})),(o||a)&&u&&(c.estimateGas=new Proxy({},{get(h,g){return(...w)=>{const{args:v,options:_}=tA(w);return Xt(i??s,$ee,"estimateContractGas")({abi:t,address:e,functionName:g,args:v,..._,account:_.account??s.account})}}})),c.address=e,c.abi=t,c}function tA(t){const e=t.length&&Array.isArray(t[0]),n=e?t[0]:[],r=(e?t[1]:t[0])??{};return{args:n,options:r}}function fk(t,e){let n=!1;Array.isArray(t[0])?n=!0:t.length===1?n=e.inputs.some(s=>s.indexed):t.length===2&&(n=!0);const r=n?t[0]:void 0,i=(n?t[1]:t[0])??{};return{args:r,options:i}}const yP=256;let nA=yP,rA;function dte(t=11){if(!rA||nA+t>yP*2){rA="",nA=0;for(let e=0;e<yP;e++)rA+=(256+Math.random()*256|0).toString(16).substring(1)}return rA.substring(nA,nA+++t)}function HB(t){const{batch:e,cacheTime:n=t.pollingInterval??4e3,ccipRead:r,key:i="base",name:s="Base Client",pollingInterval:o=4e3,type:a="base"}=t,c=t.chain,l=t.account?mc(t.account):void 0,{config:u,request:d,value:h}=t.transport({chain:c,pollingInterval:o}),g={...u,...h},w={account:l,batch:e,cacheTime:n,ccipRead:r,chain:c,key:i,name:s,pollingInterval:o,request:d,transport:g,type:a,uid:dte()};function v(_){return T=>{const b=T(_);for(const D in w)delete b[D];const k={..._,...b};return Object.assign(k,{extend:v(k)})}}return Object.assign(w,{extend:v(w)})}function WB({key:t,name:e,request:n,retryCount:r=3,retryDelay:i=150,timeout:s,type:o},a){const c=dte();return{config:{key:t,name:e,request:n,retryCount:r,retryDelay:i,timeout:s,type:o},request:a9e(n,{retryCount:r,retryDelay:i,uid:c}),value:a}}function vTe(t,e={}){const{key:n="custom",name:r="Custom Provider",retryDelay:i}=e;return({retryCount:s})=>WB({key:n,name:r,request:t.request.bind(t),retryCount:e.retryCount??s,retryDelay:i,type:"custom"})}function bTe(t,e={}){const{key:n="fallback",name:r="Fallback",rank:i=!1,retryCount:s,retryDelay:o}=e;return({chain:a,pollingInterval:c=4e3,timeout:l,...u})=>{let d=t,h=()=>{};const g=WB({key:n,name:r,async request({method:w,params:v}){const _=async(T=0)=>{const b=d[T]({...u,chain:a,retryCount:0,timeout:l});try{const k=await b.request({method:w,params:v});return h({method:w,params:v,response:k,transport:b,status:"success"}),k}catch(k){if(h({error:k,method:w,params:v,transport:b,status:"error"}),xTe(k)||T===d.length-1)throw k;return _(T+1)}};return _()},retryCount:s,retryDelay:o,type:"fallback"},{onResponse:w=>h=w,transports:d.map(w=>w({chain:a,retryCount:0}))});if(i){const w=typeof i=="object"?i:{};_Te({chain:a,interval:w.interval??c,onTransports:v=>d=v,sampleCount:w.sampleCount,timeout:w.timeout,transports:d,weights:w.weights})}return g}}function xTe(t){return"code"in t&&typeof t.code=="number"&&(t.code===hv.code||t.code===ai.code||t.code===5e3)}function _Te({chain:t,interval:e=4e3,onTransports:n,sampleCount:r=10,timeout:i=1e3,transports:s,weights:o={}}){const{stability:a=.7,latency:c=.3}=o,l=[],u=async()=>{const d=await Promise.all(s.map(async w=>{const v=w({chain:t,retryCount:0,timeout:i}),_=Date.now();let T,b;try{await v.request({method:"net_listening"}),b=1}catch{b=0}finally{T=Date.now()}return{latency:T-_,success:b}}));l.push(d),l.length>r&&l.shift();const h=Math.max(...l.map(w=>Math.max(...w.map(({latency:v})=>v)))),g=s.map((w,v)=>{const _=l.map(O=>O[v].latency),b=1-_.reduce((O,$)=>O+$,0)/_.length/h,k=l.map(O=>O[v].success),D=k.reduce((O,$)=>O+$,0)/k.length;return D===0?[0,v]:[c*b+a*D,v]}).sort((w,v)=>v[0]-w[0]);n(g.map(([,w])=>s[w])),await uC(e),u()};u()}class ATe extends Je{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}function XA(t,e={}){const{batch:n,fetchOptions:r,key:i="http",name:s="HTTP JSON-RPC",onFetchRequest:o,onFetchResponse:a,retryDelay:c}=e;return({chain:l,retryCount:u,timeout:d})=>{const{batchSize:h=1e3,wait:g=0}=typeof n=="object"?n:{},w=e.retryCount??u,v=d??e.timeout??1e4,_=t||(l==null?void 0:l.rpcUrls.default.http[0]);if(!_)throw new ATe;const T=h9e(_,{fetchOptions:r,onRequest:o,onResponse:a,timeout:v});return WB({key:i,name:s,async request({method:b,params:k}){const D={method:b,params:k},{schedule:O}=Iee({id:_,wait:g,shouldSplitBatch(H){return H.length>h},fn:H=>T.request({body:H}),sort:(H,V)=>H.id-V.id}),$=async H=>n?O(H):[await T.request({body:H})],[{error:C,result:A}]=await $(D);if(C)throw new YX({body:D,error:C,url:_});return A},retryCount:w,retryDelay:c,timeout:v,type:"http"},{fetchOptions:r,url:_})}}function ETe(t){var d,h,g;const{scheme:e,statement:n,...r}=((d=t.match(CTe))==null?void 0:d.groups)??{},{chainId:i,expirationTime:s,issuedAt:o,notBefore:a,requestId:c,...l}=((h=t.match(STe))==null?void 0:h.groups)??{},u=(g=t.split("Resources:")[1])==null?void 0:g.split(`
- `).slice(1);return{...r,...l,...i?{chainId:Number(i)}:{},...s?{expirationTime:new Date(s)}:{},...o?{issuedAt:new Date(o)}:{},...a?{notBefore:new Date(a)}:{},...c?{requestId:c}:{},...u?{resources:u}:{},...e?{scheme:e}:{},...n?{statement:n}:{}}}const CTe=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,STe=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function TTe(t){const{address:e,domain:n,message:r,nonce:i,scheme:s,time:o=new Date}=t;if(n&&r.domain!==n||i&&r.nonce!==i||s&&r.scheme!==s||r.expirationTime&&o>=r.expirationTime||r.notBefore&&o<r.notBefore)return!1;try{if(!r.address||e&&!kB(r.address,e))return!1}catch{return!1}return!0}async function ITe(t,e){const{address:n,domain:r,message:i,nonce:s,scheme:o,signature:a,time:c=new Date,...l}=e,u=ETe(i);if(!u.address||!TTe({address:n,domain:r,message:u,nonce:s,scheme:o,time:c}))return!1;const h=qee(i);return FB(t,{address:u.address,hash:h,signature:a,...l})}function fte(t){return{call:e=>$6(t,e),createBlockFilter:()=>OSe(t),createContractEventFilter:e=>IB(t,e),createEventFilter:e=>Mee(t,e),createPendingTransactionFilter:()=>Bee(t),estimateContractGas:e=>$ee(t,e),estimateGas:e=>M6(t,e),getBalance:e=>yB(t,e),getBlobBaseFee:()=>MSe(t),getBlock:e=>v0(t,e),getBlockNumber:e=>Pb(t,e),getBlockTransactionCount:e=>FSe(t,e),getBytecode:e=>uV(t,e),getChainId:()=>D6(t),getCode:e=>uV(t,e),getContractEvents:e=>OB(t,e),getEip712Domain:e=>VSe(t,e),getEnsAddress:e=>kee(t,e),getEnsAvatar:e=>Oee(t,e),getEnsName:e=>Dee(t,e),getEnsResolver:e=>PSe(t,e),getEnsText:e=>Pee(t,e),getFeeHistory:e=>KSe(t,e),estimateFeesPerGas:e=>DCe(t,e),getFilterChanges:e=>ZS(t,e),getFilterLogs:e=>YSe(t,e),getGasPrice:()=>wB(t),getLogs:e=>PB(t,e),getProof:e=>S9e(t,e),estimateMaxPriorityFeePerGas:e=>OCe(t,e),getStorageAt:e=>QSe(t,e),getTransaction:e=>JS(t,e),getTransactionConfirmations:e=>ZSe(t,e),getTransactionCount:e=>nee(t,e),getTransactionReceipt:e=>fP(t,e),multicall:e=>jee(t,e),prepareTransactionRequest:e=>B6(t,e),readContract:e=>lu(t,e),sendRawTransaction:e=>bB(t,e),simulateContract:e=>MB(t,e),verifyMessage:e=>fTe(t,e),verifySiweMessage:e=>ITe(t,e),verifyTypedData:e=>hTe(t,e),uninstallFilter:e=>XS(t,e),waitForTransactionReceipt:e=>Kee(t,e),watchBlocks:e=>t9e(t,e),watchBlockNumber:e=>DB(t,e),watchContractEvent:e=>ote(t,e),watchEvent:e=>n9e(t,e),watchPendingTransactions:e=>r9e(t,e)}}function kTe(t){const{key:e="public",name:n="Public Client"}=t;return HB({...t,key:e,name:n,type:"publicClient"}).extend(fte)}function _V(t){return{addChain:e=>vEe(t,e),deployContract:e=>t8e(t,e),getAddresses:()=>i9e(t),getChainId:()=>D6(t),getPermissions:()=>s9e(t),prepareTransactionRequest:e=>B6(t,e),requestAddresses:()=>T9e(t),requestPermissions:e=>I9e(t,e),sendRawTransaction:e=>bB(t,e),sendTransaction:e=>GS(t,e),signMessage:e=>Yee(t,e),signTransaction:e=>k9e(t,e),signTypedData:e=>R9e(t,e),switchChain:e=>N9e(t,e),watchAsset:e=>pTe(t,e),writeContract:e=>zB(t,e)}}async function Ob(t,e={}){let n;if(e.connector){const{connector:l}=e,[u,d]=await Promise.all([l.getAccounts(),l.getChainId()]);n={accounts:u,chainId:d,connector:l}}else n=t.state.connections.get(t.state.current);if(!n)throw new lte;const r=e.chainId??n.chainId,i=await n.connector.getChainId();if(i!==n.chainId)throw new yTe({connectionChainId:n.chainId,connectorChainId:i});const s=n.connector;if(s.getClient)return s.getClient({chainId:r});const o=mc(e.account??n.accounts[0]);o.address=qs(o.address);const a=t.chains.find(l=>l.id===r),c=await n.connector.getProvider({chainId:r});if(e.account&&!n.accounts.some(l=>l.toLowerCase()===o.address.toLowerCase()))throw new wTe({address:o.address,connector:s});return HB({account:o,chain:a,name:"Connector Client",transport:l=>vTe(c)({...l,retryCount:0})})}async function RTe(t,e={}){var i,s;let n;if(e.connector)n=e.connector;else{const{connections:o,current:a}=t.state,c=o.get(a);n=c==null?void 0:c.connector}const r=t.state.connections;n&&(await n.disconnect(),n.emitter.off("change",t._internal.events.change),n.emitter.off("disconnect",t._internal.events.disconnect),n.emitter.on("connect",t._internal.events.connect),r.delete(n.uid)),t.setState(o=>{if(r.size===0)return{...o,connections:new Map,current:null,status:"disconnected"};const a=r.values().next().value;return{...o,connections:new Map(r),current:a.connector.uid}});{const o=t.state.current;if(!o)return;const a=(i=t.state.connections.get(o))==null?void 0:i.connector;if(!a)return;await((s=t.storage)==null?void 0:s.setItem("recentConnectorId",a.id))}}async function NTe(t,e){const{chainId:n,connector:r,...i}=e;let s;e.account?s=e.account:s=(await Ob(t,{account:e.account,chainId:n,connector:r})).account;const o=t.getClient({chainId:n});return Ms(o,M6,"estimateGas")({...i,account:s})}function hte(t){return typeof t=="number"?t:t==="wei"?0:Math.abs(bCe[t])}function Db(t){const e=t.state.current,n=t.state.connections.get(e),r=n==null?void 0:n.accounts,i=r==null?void 0:r[0],s=t.chains.find(a=>a.id===(n==null?void 0:n.chainId)),o=t.state.status;switch(o){case"connected":return{address:i,addresses:r,chain:s,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:o};case"reconnecting":return{address:i,addresses:r,chain:s,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!!i,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:o};case"connecting":return{address:i,addresses:r,chain:s,chainId:n==null?void 0:n.chainId,connector:n==null?void 0:n.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:o};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:o}}}async function PTe(t,e){const{allowFailure:n=!0,chainId:r,contracts:i,...s}=e,o=t.getClient({chainId:r});return Ms(o,jee,"multicall")({allowFailure:n,contracts:i,...s})}function OTe(t,e){const{chainId:n,...r}=e,i=t.getClient({chainId:n});return Ms(i,lu,"readContract")(r)}async function DTe(t,e){var a;const{allowFailure:n=!0,blockNumber:r,blockTag:i,...s}=e,o=e.contracts;try{const c={};for(const[h,g]of o.entries()){const w=g.chainId??t.state.chainId;c[w]||(c[w]=[]),(a=c[w])==null||a.push({contract:g,index:h})}const l=()=>Object.entries(c).map(([h,g])=>PTe(t,{...s,allowFailure:n,blockNumber:r,blockTag:i,chainId:Number.parseInt(h),contracts:g.map(({contract:w})=>w)})),u=(await Promise.all(l())).flat(),d=Object.values(c).flatMap(h=>h.map(({index:g})=>g));return u.reduce((h,g,w)=>(h&&(h[d[w]]=g),h),[])}catch(c){if(c instanceof AB)throw c;const l=()=>o.map(u=>OTe(t,{...u,blockNumber:r,blockTag:i}));return n?(await Promise.allSettled(l())).map(u=>u.status==="fulfilled"?{result:u.value,status:"success"}:{error:u.reason,result:void 0,status:"failure"}):await Promise.all(l())}}async function pte(t,e){const{address:n,blockNumber:r,blockTag:i,chainId:s,token:o,unit:a="ether"}=e;if(o)try{return AV(t,{balanceAddress:n,chainId:s,symbolType:"string",tokenAddress:o})}catch(h){if(h instanceof AB){const g=await AV(t,{balanceAddress:n,chainId:s,symbolType:"bytes32",tokenAddress:o}),w=CX(Eb(g.symbol,{dir:"right"}));return{...g,symbol:w}}throw h}const c=t.getClient({chainId:s}),u=await Ms(c,yB,"getBalance")(r?{address:n,blockNumber:r}:{address:n,blockTag:i}),d=t.chains.find(h=>h.id===s)??c.chain;return{decimals:d.nativeCurrency.decimals,formatted:N6(u,hte(a)),symbol:d.nativeCurrency.symbol,value:u}}async function AV(t,e){const{balanceAddress:n,chainId:r,symbolType:i,tokenAddress:s,unit:o}=e,a={abi:[{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:i}]}],address:s},[c,l,u]=await DTe(t,{allowFailure:!1,contracts:[{...a,functionName:"balanceOf",args:[n],chainId:r},{...a,functionName:"decimals",chainId:r},{...a,functionName:"symbol",chainId:r}]}),d=N6(c??"0",hte(o??l));return{decimals:l,formatted:d,symbol:u,value:c}}function MTe(t,e={}){const{chainId:n,...r}=e,i=t.getClient({chainId:n});return Ms(i,Pb,"getBlockNumber")(r)}function EV(t){return t.state.chainId}function M5(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let n,r;if(Array.isArray(t)&&Array.isArray(e)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!M5(t[r],e[r]))return!1;return!0}if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const i=Object.keys(t);if(n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(s&&!M5(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function BTe(t,e={}){let n;try{n=t.getClient(e)}catch{}return n}let iA=[];function $Te(t){const e=[...t.state.connections.values()];return t.state.status==="reconnecting"||M5(iA,e)?iA:(iA=e,e)}function jTe(t,e){const{chainId:n,...r}=e,i=t.getClient({chainId:n});return Ms(i,kee,"getEnsAddress")(r)}function CV(t,e){const{chainId:n,...r}=e,i=t.getClient({chainId:n});return Ms(i,Oee,"getEnsAvatar")(r)}function LTe(t,e){const{chainId:n,...r}=e,i=t.getClient({chainId:n});return Ms(i,Dee,"getEnsName")(r)}function vP(t,e={}){const n=BTe(t,e);return n==null?void 0:n.extend(fte)}async function UTe(t,e={}){const n=await Ob(t,e);return n.extend(_V),n.extend(_V)}async function FTe(t,e){const{account:n,chainId:r,...i}=e,s=n??Db(t).address,o=t.getClient({chainId:r});return Ms(o,B6,"prepareTransactionRequest")({...i,...s?{account:s}:{}})}let hk=!1;async function mte(t,e={}){var l,u;if(hk)return[];hk=!0,t.setState(d=>({...d,status:d.current?"reconnecting":"connecting"}));const n=[];if((l=e.connectors)!=null&&l.length)for(const d of e.connectors){let h;typeof d=="function"?h=t._internal.connectors.setup(d):h=d,n.push(h)}else n.push(...t.connectors);let r;try{r=await((u=t.storage)==null?void 0:u.getItem("recentConnectorId"))}catch{}const i={};for(const[,d]of t.state.connections)i[d.connector.id]=1;r&&(i[r]=0);const s=Object.keys(i).length>0?[...n].sort((d,h)=>(i[d.id]??10)-(i[h.id]??10)):n;let o=!1;const a=[],c=[];for(const d of s){const h=await d.getProvider().catch(()=>{});if(!h||c.some(v=>v===h)||!await d.isAuthorized())continue;const w=await d.connect({isReconnecting:!0}).catch(()=>null);w&&(d.emitter.off("connect",t._internal.events.connect),d.emitter.on("change",t._internal.events.change),d.emitter.on("disconnect",t._internal.events.disconnect),t.setState(v=>{const _=new Map(o?v.connections:new Map).set(d.uid,{accounts:w.accounts,chainId:w.chainId,connector:d});return{...v,current:o?v.current:d.uid,connections:_}}),a.push({accounts:w.accounts,chainId:w.chainId,connector:d}),c.push(h),o=!0)}return(t.state.status==="reconnecting"||t.state.status==="connecting")&&(o?t.setState(d=>({...d,status:"connected"})):t.setState(d=>({...d,connections:new Map,current:null,status:"disconnected"}))),hk=!1,a}async function zTe(t,e){const{account:n,chainId:r,connector:i,gas:s,...o}=e;let a;typeof n=="object"&&n.type==="local"?a=t.getClient({chainId:r}):a=await Ob(t,{account:n,chainId:r,connector:i});const{connector:c}=Db(t),l=await(async()=>{var h;if(!(!("data"in e)||!e.data)&&!((h=i??c)!=null&&h.supportsSimulation)&&s!==null)return s===void 0?Ms(a,M6,"estimateGas")({...o,account:n,chain:r?{id:r}:null}):s})();return await Ms(a,GS,"sendTransaction")({...o,...n?{account:n}:{},gas:l,chain:r?{id:r}:null})}async function HTe(t,e){const{account:n,connector:r,...i}=e;let s;return typeof n=="object"&&n.type==="local"?s=t.getClient():s=await Ob(t,{account:n,connector:r}),Ms(s,Yee,"signMessage")({...i,...n?{account:n}:{}})}async function WTe(t,e){const{abi:n,chainId:r,connector:i,...s}=e;let o;e.account?o=e.account:o=(await Ob(t,{chainId:r,connector:i})).account;const a=t.getClient({chainId:r}),c=Ms(a,MB,"simulateContract"),{result:l,request:u}=await c({...s,abi:n,account:o});return{chainId:a.chain.id,result:l,request:{__mode:"prepared",...u,chainId:r}}}async function VTe(t,e){var i;const{connector:n}=e,r=t.state.connections.get(n.uid);if(!r)throw new lte;return await((i=t.storage)==null?void 0:i.setItem("recentConnectorId",n.id)),t.setState(s=>({...s,current:n.uid})),{accounts:r.accounts,chainId:r.chainId}}class Ep extends z0{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class qTe extends z0{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}async function GTe(t,e){var o;const{addEthereumChainParameter:n,chainId:r}=e,i=t.state.connections.get(((o=e.connector)==null?void 0:o.uid)??t.state.current);if(i){const a=i.connector;if(!a.switchChain)throw new qTe({connector:a});return await a.switchChain({addEthereumChainParameter:n,chainId:r})}const s=t.chains.find(a=>a.id===r);if(!s)throw new jg;return t.setState(a=>({...a,chainId:r})),s}function gte(t,e){const{onChange:n}=e;return t.subscribe(()=>Db(t),n,{equalityFn(r,i){const{connector:s,...o}=r,{connector:a,...c}=i;return M5(o,c)&&(s==null?void 0:s.id)===(a==null?void 0:a.id)&&(s==null?void 0:s.uid)===(a==null?void 0:a.uid)}})}function KTe(t,e){const{syncConnectedChain:n=t._internal.syncConnectedChain,...r}=e;let i;const s=c=>{i&&i();const l=t.getClient({chainId:c});return i=Ms(l,DB,"watchBlockNumber")(r),i},o=s(e.chainId);let a;return n&&!e.chainId&&(a=t.subscribe(({chainId:c})=>c,async c=>s(c))),()=>{o==null||o(),a==null||a()}}function YTe(t,e){const{onChange:n}=e;return t.subscribe(r=>r.chainId,n)}function QTe(t,e){const{onChange:n}=e;return t._internal.connectors.subscribe((r,i)=>{n(Object.values(r),i)})}function ZTe(t,e){const{onChange:n}=e;return t.subscribe(()=>vP(t),n,{equalityFn(r,i){return(r==null?void 0:r.uid)===(i==null?void 0:i.uid)}})}async function JTe(t,e){const{chainId:n,timeout:r=0,...i}=e,s=t.getClient({chainId:n}),a=await Ms(s,Kee,"waitForTransactionReceipt")({...i,timeout:r});if(a.status==="reverted"){const l=await Ms(s,JS,"getTransaction")({hash:a.transactionHash}),d=await Ms(s,$6,"call")({...l,gasPrice:l.type!=="eip1559"?l.gasPrice:void 0,maxFeePerGas:l.type==="eip1559"?l.maxFeePerGas:void 0,maxPriorityFeePerGas:l.type==="eip1559"?l.maxPriorityFeePerGas:void 0}),h=d!=null&&d.data?CX(`0x${d.data.substring(138)}`):"unknown reason";throw new Error(h)}return{...a,chainId:s.chain.id}}async function XTe(t,e){const{account:n,chainId:r,connector:i,__mode:s,...o}=e;let a;typeof n=="object"&&n.type==="local"?a=t.getClient({chainId:r}):a=await Ob(t,{account:n,chainId:r,connector:i});const{connector:c}=Db(t);let l;if(s==="prepared"||c!=null&&c.supportsSimulation)l=o;else{const{request:h}=await WTe(t,{...o,account:n,chainId:r});l=h}return await Ms(a,zB,"writeContract")({...l,...n?{account:n}:{},chain:r?{id:r}:null})}const e7e=/(rabby|trustwallet)/,t7e={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(t){return t!=null&&t.coinbaseWalletExtension?t.coinbaseWalletExtension:eE(t,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(t){return eE(t,e=>{if(!e.isMetaMask||e.isBraveWallet&&!e._events&&!e._state)return!1;const n=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPortal","isRabby","isTokenPocket","isTokenary","isZerion"];for(const r of n)if(e[r])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(t){var e,n;return(e=t==null?void 0:t.phantom)!=null&&e.ethereum?(n=t.phantom)==null?void 0:n.ethereum:eE(t,"isPhantom")}}};n9.type="injected";function n9(t={}){const{shimDisconnect:e=!0,unstable_shimAsyncInject:n}=t;function r(){const c=t.target;if(typeof c=="function"){const l=c();if(l)return l}return typeof c=="object"?c:typeof c=="string"?{...t7e[c]??{id:c,name:`${c[0].toUpperCase()}${c.slice(1)}`,provider:`is${c[0].toUpperCase()}${c.slice(1)}`}}:{id:"injected",name:"Injected",provider(l){return l==null?void 0:l.ethereum}}}let i,s,o,a;return c=>({get icon(){return r().icon},get id(){return r().id},get name(){return r().name},get supportsSimulation(){return e7e.test(this.id.toLowerCase())},type:n9.type,async setup(){const l=await this.getProvider();l&&t.target&&(o||(o=this.onConnect.bind(this),l.on("connect",o)),i||(i=this.onAccountsChanged.bind(this),l.on("accountsChanged",i)))},async connect({chainId:l,isReconnecting:u}={}){var g,w,v,_,T,b;const d=await this.getProvider();if(!d)throw new Ep;let h=[];if(u)h=await this.getAccounts().catch(()=>[]);else if(e)try{h=(_=(v=(w=(g=(await d.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0])==null?void 0:g.caveats)==null?void 0:w[0])==null?void 0:v.value)==null?void 0:_.map(D=>qs(D)),h.length>0&&(h=await this.getAccounts())}catch(k){const D=k;if(D.code===ai.code)throw new ai(D);if(D.code===o0.code)throw D}try{!(h!=null&&h.length)&&!u&&(h=(await d.request({method:"eth_requestAccounts"})).map(O=>qs(O))),o&&(d.removeListener("connect",o),o=void 0),i||(i=this.onAccountsChanged.bind(this),d.on("accountsChanged",i)),s||(s=this.onChainChanged.bind(this),d.on("chainChanged",s)),a||(a=this.onDisconnect.bind(this),d.on("disconnect",a));let k=await this.getChainId();if(l&&k!==l){const D=await this.switchChain({chainId:l}).catch(O=>{if(O.code===ai.code)throw O;return{id:k}});k=(D==null?void 0:D.id)??k}return e&&await((T=c.storage)==null?void 0:T.removeItem(`${this.id}.disconnected`)),t.target||await((b=c.storage)==null?void 0:b.setItem("injected.connected",!0)),{accounts:h,chainId:k}}catch(k){const D=k;throw D.code===ai.code?new ai(D):D.code===o0.code?new o0(D):D}},async disconnect(){var u,d;const l=await this.getProvider();if(!l)throw new Ep;s&&(l.removeListener("chainChanged",s),s=void 0),a&&(l.removeListener("disconnect",a),a=void 0),o||(o=this.onConnect.bind(this),l.on("connect",o));try{await Lee(()=>l.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}e&&await((u=c.storage)==null?void 0:u.setItem(`${this.id}.disconnected`,!0)),t.target||await((d=c.storage)==null?void 0:d.removeItem("injected.connected"))},async getAccounts(){const l=await this.getProvider();if(!l)throw new Ep;return(await l.request({method:"eth_accounts"})).map(d=>qs(d))},async getChainId(){const l=await this.getProvider();if(!l)throw new Ep;const u=await l.request({method:"eth_chainId"});return Number(u)},async getProvider(){if(typeof window>"u")return;let l;const u=r();return typeof u.provider=="function"?l=u.provider(window):typeof u.provider=="string"?l=eE(window,u.provider):l=u.provider,l&&!l.removeListener&&("off"in l&&typeof l.off=="function"?l.removeListener=l.off:l.removeListener=()=>{}),l},async isAuthorized(){var l,u;try{if(e&&await((l=c.storage)==null?void 0:l.getItem(`${this.id}.disconnected`))||!t.target&&!await((u=c.storage)==null?void 0:u.getItem("injected.connected")))return!1;if(!await this.getProvider()){if(n!==void 0&&n!==!1){const w=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",w),!!await this.getProvider()),v=typeof n=="number"?n:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(T=>window.addEventListener("ethereum#initialized",()=>T(w()),{once:!0}))]:[],new Promise(T=>setTimeout(()=>T(w()),v))]))return!0}throw new Ep}return!!(await dC(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:l,chainId:u}){var g,w,v,_;const d=await this.getProvider();if(!d)throw new Ep;const h=c.chains.find(T=>T.id===u);if(!h)throw new Na(new jg);try{return await Promise.all([d.request({method:"wallet_switchEthereumChain",params:[{chainId:Jt(u)}]}).then(async()=>{await this.getChainId()===u&&c.emitter.emit("change",{chainId:u})}),new Promise(T=>c.emitter.once("change",({chainId:b})=>{b===u&&T()}))]),h}catch(T){const b=T;if(b.code===4902||((w=(g=b==null?void 0:b.data)==null?void 0:g.originalError)==null?void 0:w.code)===4902)try{const{default:k,...D}=h.blockExplorers??{};let O;l!=null&&l.blockExplorerUrls?O=l.blockExplorerUrls:k&&(O=[k.url,...Object.values(D).map(H=>H.url)]);let $;(v=l==null?void 0:l.rpcUrls)!=null&&v.length?$=l.rpcUrls:$=[((_=h.rpcUrls.default)==null?void 0:_.http[0])??""];const C={blockExplorerUrls:O,chainId:Jt(u),chainName:(l==null?void 0:l.chainName)??h.name,iconUrls:l==null?void 0:l.iconUrls,nativeCurrency:(l==null?void 0:l.nativeCurrency)??h.nativeCurrency,rpcUrls:$};if(await d.request({method:"wallet_addEthereumChain",params:[C]}),await this.getChainId()!==u)throw new ai(new Error("User rejected switch after adding network."));return h}catch(k){throw new ai(k)}throw b.code===ai.code?new ai(b):new Na(b)}},async onAccountsChanged(l){var u;if(l.length===0)this.onDisconnect();else if(c.emitter.listenerCount("connect")){const d=(await this.getChainId()).toString();this.onConnect({chainId:d}),e&&await((u=c.storage)==null?void 0:u.removeItem(`${this.id}.disconnected`))}else c.emitter.emit("change",{accounts:l.map(d=>qs(d))})},onChainChanged(l){const u=Number(l);c.emitter.emit("change",{chainId:u})},async onConnect(l){const u=await this.getAccounts();if(u.length===0)return;const d=Number(l.chainId);c.emitter.emit("connect",{accounts:u,chainId:d});const h=await this.getProvider();h&&(o&&(h.removeListener("connect",o),o=void 0),i||(i=this.onAccountsChanged.bind(this),h.on("accountsChanged",i)),s||(s=this.onChainChanged.bind(this),h.on("chainChanged",s)),a||(a=this.onDisconnect.bind(this),h.on("disconnect",a)))},async onDisconnect(l){const u=await this.getProvider();l&&l.code===1013&&u&&(await this.getAccounts()).length||(c.emitter.emit("disconnect"),u&&(s&&(u.removeListener("chainChanged",s),s=void 0),a&&(u.removeListener("disconnect",a),a=void 0),o||(o=this.onConnect.bind(this),u.on("connect",o))))}})}function eE(t,e){function n(i){return typeof e=="function"?e(i):typeof e=="string"?i[e]:!0}const r=t.ethereum;if(r!=null&&r.providers)return r.providers.find(i=>n(i));if(r&&n(r))return r}function n7e(t){if(typeof window>"u")return;const e=n=>t(n.detail);return window.addEventListener("eip6963:announceProvider",e),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",e)}function r7e(){const t=new Set;let e=[];const n=()=>n7e(i=>{e.some(({info:s})=>s.uuid===i.info.uuid)||(e=[...e,i],t.forEach(s=>s(e,{added:[i]})))});let r=n();return{_listeners(){return t},clear(){t.forEach(i=>i([],{removed:[...e]})),e=[]},destroy(){this.clear(),t.clear(),r==null||r()},findProvider({rdns:i}){return e.find(s=>s.info.rdns===i)},getProviders(){return e},reset(){this.clear(),r==null||r(),r=n()},subscribe(i,{emitImmediately:s}={}){return t.add(i),s&&i(e,{added:e}),()=>t.delete(i)}}}const i7e={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_CHAIN_ID:"721",VITE_CHAIN_NAME:"Lycan",VITE_CONFIRMATIONS:"6;",VITE_CONTRACT_ADDRESS:"0x3A1A1a46d2Ae1F50edEe56fEfE7385F9c71960fA",VITE_CONTRACT_ADDRESS_BETA:"0x2543a1BbE1dcb3192Dc00ed046f3d1146f805915",VITE_DECIMALS:"18;",VITE_EXPLORER_SUBDOMAIN:"explorer",VITE_FIX_DECIMALS:"6;",VITE_ROOT_URL:'"http://18.117.41.254:8545";',VITE_RPC:"https://rpc.lycanchain.com",VITE_SYMBOL:"LYC",VITE_VALIDATOR_CONTRACT_ADDRESS:"0x094096D94a0639491e5E91E5039ff24AF5e2D783"},s7e=t=>(e,n,r)=>{const i=r.subscribe;return r.subscribe=(o,a,c)=>{let l=o;if(a){const u=(c==null?void 0:c.equalityFn)||Object.is;let d=o(r.getState());l=h=>{const g=o(h);if(!u(d,g)){const w=d;a(d=g,w)}},c!=null&&c.fireImmediately&&a(d,d)}return i(l)},t(e,n,r)},o7e=s7e;function a7e(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var s;const o=c=>c===null?null:JSON.parse(c,void 0),a=(s=n.getItem(i))!=null?s:null;return a instanceof Promise?a.then(o):o(a)},setItem:(i,s)=>n.setItem(i,JSON.stringify(s,void 0)),removeItem:i=>n.removeItem(i)}}const B5=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return B5(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return B5(r)(n)}}}},c7e=(t,e)=>(n,r,i)=>{let s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:_=>_,version:0,merge:(_,T)=>({...T,..._}),...e},o=!1;const a=new Set,c=new Set;let l;try{l=s.getStorage()}catch{}if(!l)return t((..._)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(..._)},r,i);const u=B5(s.serialize),d=()=>{const _=s.partialize({...r()});let T;const b=u({state:_,version:s.version}).then(k=>l.setItem(s.name,k)).catch(k=>{T=k});if(T)throw T;return b},h=i.setState;i.setState=(_,T)=>{h(_,T),d()};const g=t((..._)=>{n(..._),d()},r,i);let w;const v=()=>{var _;if(!l)return;o=!1,a.forEach(b=>b(r()));const T=((_=s.onRehydrateStorage)==null?void 0:_.call(s,r()))||void 0;return B5(l.getItem.bind(l))(s.name).then(b=>{if(b)return s.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==s.version){if(s.migrate)return s.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var k;return w=s.merge(b,(k=r())!=null?k:g),n(w,!0),d()}).then(()=>{T==null||T(w,void 0),o=!0,c.forEach(b=>b(w))}).catch(b=>{T==null||T(void 0,b)})};return i.persist={setOptions:_=>{s={...s,..._},_.getStorage&&(l=_.getStorage())},clearStorage:()=>{l==null||l.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>v(),hasHydrated:()=>o,onHydrate:_=>(a.add(_),()=>{a.delete(_)}),onFinishHydration:_=>(c.add(_),()=>{c.delete(_)})},v(),w||g},l7e=(t,e)=>(n,r,i)=>{let s={storage:a7e(()=>localStorage),partialize:v=>v,version:0,merge:(v,_)=>({..._,...v}),...e},o=!1;const a=new Set,c=new Set;let l=s.storage;if(!l)return t((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...v)},r,i);const u=()=>{const v=s.partialize({...r()});return l.setItem(s.name,{state:v,version:s.version})},d=i.setState;i.setState=(v,_)=>{d(v,_),u()};const h=t((...v)=>{n(...v),u()},r,i);let g;const w=()=>{var v,_;if(!l)return;o=!1,a.forEach(b=>{var k;return b((k=r())!=null?k:h)});const T=((_=s.onRehydrateStorage)==null?void 0:_.call(s,(v=r())!=null?v:h))||void 0;return B5(l.getItem.bind(l))(s.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==s.version){if(s.migrate)return s.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var k;return g=s.merge(b,(k=r())!=null?k:h),n(g,!0),u()}).then(()=>{T==null||T(g,void 0),g=r(),o=!0,c.forEach(b=>b(g))}).catch(b=>{T==null||T(void 0,b)})};return i.persist={setOptions:v=>{s={...s,...v},v.storage&&(l=v.storage)},clearStorage:()=>{l==null||l.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>w(),hasHydrated:()=>o,onHydrate:v=>(a.add(v),()=>{a.delete(v)}),onFinishHydration:v=>(c.add(v),()=>{c.delete(v)})},s.skipHydration||w(),g||h},u7e=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((i7e?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),c7e(t,e)):l7e(t,e),d7e=u7e,f7e={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_CHAIN_ID:"721",VITE_CHAIN_NAME:"Lycan",VITE_CONFIRMATIONS:"6;",VITE_CONTRACT_ADDRESS:"0x3A1A1a46d2Ae1F50edEe56fEfE7385F9c71960fA",VITE_CONTRACT_ADDRESS_BETA:"0x2543a1BbE1dcb3192Dc00ed046f3d1146f805915",VITE_DECIMALS:"18;",VITE_EXPLORER_SUBDOMAIN:"explorer",VITE_FIX_DECIMALS:"6;",VITE_ROOT_URL:'"http://18.117.41.254:8545";',VITE_RPC:"https://rpc.lycanchain.com",VITE_SYMBOL:"LYC",VITE_VALIDATOR_CONTRACT_ADDRESS:"0x094096D94a0639491e5E91E5039ff24AF5e2D783"},SV=t=>{let e;const n=new Set,r=(c,l)=>{const u=typeof c=="function"?c(e):c;if(!Object.is(u,e)){const d=e;e=l??typeof u!="object"?u:Object.assign({},e,u),n.forEach(h=>h(e,d))}},i=()=>e,a={setState:r,getState:i,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(f7e?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return e=t(r,i,a),a},pk=t=>t?SV(t):SV;var wte={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,l,u){this.fn=c,this.context=l,this.once=u||!1}function s(c,l,u,d,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var g=new i(u,d||c,h),w=n?n+l:l;return c._events[w]?c._events[w].fn?c._events[w]=[c._events[w],g]:c._events[w].push(g):(c._events[w]=g,c._eventsCount++),c}function o(c,l){--c._eventsCount===0?c._events=new r:delete c._events[l]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],u,d;if(this._eventsCount===0)return l;for(d in u=this._events)e.call(u,d)&&l.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(u)):l},a.prototype.listeners=function(l){var u=n?n+l:l,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,g=d.length,w=new Array(g);h<g;h++)w[h]=d[h].fn;return w},a.prototype.listenerCount=function(l){var u=n?n+l:l,d=this._events[u];return d?d.fn?1:d.length:0},a.prototype.emit=function(l,u,d,h,g,w){var v=n?n+l:l;if(!this._events[v])return!1;var _=this._events[v],T=arguments.length,b,k;if(_.fn){switch(_.once&&this.removeListener(l,_.fn,void 0,!0),T){case 1:return _.fn.call(_.context),!0;case 2:return _.fn.call(_.context,u),!0;case 3:return _.fn.call(_.context,u,d),!0;case 4:return _.fn.call(_.context,u,d,h),!0;case 5:return _.fn.call(_.context,u,d,h,g),!0;case 6:return _.fn.call(_.context,u,d,h,g,w),!0}for(k=1,b=new Array(T-1);k<T;k++)b[k-1]=arguments[k];_.fn.apply(_.context,b)}else{var D=_.length,O;for(k=0;k<D;k++)switch(_[k].once&&this.removeListener(l,_[k].fn,void 0,!0),T){case 1:_[k].fn.call(_[k].context);break;case 2:_[k].fn.call(_[k].context,u);break;case 3:_[k].fn.call(_[k].context,u,d);break;case 4:_[k].fn.call(_[k].context,u,d,h);break;default:if(!b)for(O=1,b=new Array(T-1);O<T;O++)b[O-1]=arguments[O];_[k].fn.apply(_[k].context,b)}}return!0},a.prototype.on=function(l,u,d){return s(this,l,u,d,!1)},a.prototype.once=function(l,u,d){return s(this,l,u,d,!0)},a.prototype.removeListener=function(l,u,d,h){var g=n?n+l:l;if(!this._events[g])return this;if(!u)return o(this,g),this;var w=this._events[g];if(w.fn)w.fn===u&&(!h||w.once)&&(!d||w.context===d)&&o(this,g);else{for(var v=0,_=[],T=w.length;v<T;v++)(w[v].fn!==u||h&&!w[v].once||d&&w[v].context!==d)&&_.push(w[v]);_.length?this._events[g]=_.length===1?_[0]:_:o(this,g)}return this},a.prototype.removeAllListeners=function(l){var u;return l?(u=n?n+l:l,this._events[u]&&o(this,u)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})(wte);var h7e=wte.exports;const VB=Qs(h7e);class p7e{constructor(e){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new VB})}on(e,n){this._emitter.on(e,n)}once(e,n){this._emitter.once(e,n)}off(e,n){this._emitter.off(e,n)}emit(e,...n){const r=n[0];this._emitter.emit(e,{uid:this.uid,...r})}listenerCount(e){return this._emitter.listenerCount(e)}}function m7e(t){return new p7e(t)}function g7e(t,e){return JSON.parse(t,(n,r)=>{let i=r;return(i==null?void 0:i.__type)==="bigint"&&(i=BigInt(i.value)),(i==null?void 0:i.__type)==="Map"&&(i=new Map(i.value)),(e==null?void 0:e(n,i))??i})}function TV(t,e){return t.slice(0,e).join(".")||"."}function IV(t,e){const{length:n}=t;for(let r=0;r<n;++r)if(t[r]===e)return r+1;return 0}function w7e(t,e){const n=typeof t=="function",r=typeof e=="function",i=[],s=[];return function(a,c){if(typeof c=="object")if(i.length){const l=IV(i,this);l===0?i[i.length]=this:(i.splice(l),s.splice(l)),s[s.length]=a;const u=IV(i,c);if(u!==0)return r?e.call(this,a,c,TV(s,u)):`[ref=${TV(s,u)}]`}else i[0]=c,s[0]=a;return n?t.call(this,a,c):c}}function y7e(t,e,n,r){return JSON.stringify(t,w7e((i,s)=>{let o=s;return typeof o=="bigint"&&(o={__type:"bigint",value:s.toString()}),o instanceof Map&&(o={__type:"Map",value:Array.from(s.entries())}),(e==null?void 0:e(i,o))??o},r),n??void 0)}function v7e(t){const{deserialize:e=g7e,key:n="wagmi",serialize:r=y7e,storage:i=yte}=t;function s(o){return o instanceof Promise?o.then(a=>a).catch(()=>null):o}return{...i,key:n,async getItem(o,a){const c=i.getItem(`${n}.${o}`),l=await s(c);return l?e(l)??null:a??null},async setItem(o,a){const c=`${n}.${o}`;a===null?await s(i.removeItem(c)):await s(i.setItem(c,r(a)))},async removeItem(o){await s(i.removeItem(`${n}.${o}`))}}}const yte={getItem:()=>null,setItem:()=>{},removeItem:()=>{}},bP=256;let sA=bP,oA;function b7e(t=11){if(!oA||sA+t>bP*2){oA="",sA=0;for(let e=0;e<bP;e++)oA+=(256+Math.random()*256|0).toString(16).substring(1)}return oA.substring(sA,sA+++t)}function x7e(t){const{multiInjectedProviderDiscovery:e=!0,storage:n=v7e({storage:typeof window<"u"&&window.localStorage?window.localStorage:yte}),syncConnectedChain:r=!0,ssr:i=!1,...s}=t,o=typeof window<"u"&&e?r7e():void 0,a=pk(()=>s.chains),c=pk(()=>[...s.connectors??[],...i?[]:(o==null?void 0:o.getProviders().map(u))??[]].map(l));function l(O){var A;const $=m7e(b7e()),C={...O({emitter:$,chains:a.getState(),storage:n,transports:s.transports}),emitter:$,uid:$.uid};return $.on("connect",k),(A=C.setup)==null||A.call(C),C}function u(O){const{info:$}=O,C=O.provider;return n9({target:{...$,id:$.rdns,provider:C}})}const d=new Map;function h(O={}){const $=O.chainId??_.getState().chainId,C=a.getState().find(H=>H.id===$);if(O.chainId&&!C)throw new jg;{const H=d.get(_.getState().chainId);if(H&&!C)return H;if(!C)throw new jg}{const H=d.get($);if(H)return H}let A;if(s.client)A=s.client({chain:C});else{const H=C.id,V=a.getState().map(x=>x.id),Y={},ee=Object.entries(s);for(const[x,E]of ee)if(!(x==="chains"||x==="client"||x==="connectors"||x==="transports"))if(typeof E=="object")if(H in E)Y[x]=E[H];else{if(V.some(I=>I in E))continue;Y[x]=E}else Y[x]=E;A=HB({...Y,chain:C,batch:Y.batch??{multicall:!0},transport:x=>s.transports[H]({...x,connectors:c})})}return d.set($,A),A}function g(){return{chainId:a.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let w;const v="0.0.0-canary-";JA.startsWith(v)?w=Number.parseInt(JA.replace(v,"")):w=Number.parseInt(JA.split(".")[0]??"0");const _=pk(o7e(n?d7e(g,{migrate(O,$){if($===w)return O;const C=g(),A=T(O,C.chainId);return{...C,chainId:A}},name:"store",partialize(O){return{connections:{__type:"Map",value:Array.from(O.connections.entries()).map(([$,C])=>{const{id:A,name:H,type:V,uid:Y}=C.connector;return[$,{...C,connector:{id:A,name:H,type:V,uid:Y}}]})},chainId:O.chainId,current:O.current}},merge(O,$){typeof O=="object"&&O&&"status"in O&&delete O.status;const C=T(O,$.chainId);return{...$,...O,chainId:C}},skipHydration:i,storage:n,version:w}):g));function T(O,$){return O&&typeof O=="object"&&"chainId"in O&&typeof O.chainId=="number"&&a.getState().some(C=>C.id===O.chainId)?O.chainId:$}r&&_.subscribe(({connections:O,current:$})=>{var C;return $?(C=O.get($))==null?void 0:C.chainId:void 0},O=>{if(a.getState().some(C=>C.id===O))return _.setState(C=>({...C,chainId:O??C.chainId}))}),o==null||o.subscribe(O=>{const $=new Map;for(const A of c.getState())$.set(A.id,!0);const C=[];for(const A of O){const H=l(u(A));$.has(H.id)||C.push(H)}n&&!_.persist.hasHydrated()||c.setState(A=>[...A,...C],!0)});function b(O){_.setState($=>{const C=$.connections.get(O.uid);return C?{...$,connections:new Map($.connections).set(O.uid,{accounts:O.accounts??C.accounts,chainId:O.chainId??C.chainId,connector:C.connector})}:$})}function k(O){_.getState().status==="connecting"||_.getState().status==="reconnecting"||_.setState($=>{const C=c.getState().find(A=>A.uid===O.uid);return C?(C.emitter.listenerCount("connect")&&C.emitter.off("connect",b),C.emitter.listenerCount("change")||C.emitter.on("change",b),C.emitter.listenerCount("disconnect")||C.emitter.on("disconnect",D),{...$,connections:new Map($.connections).set(O.uid,{accounts:O.accounts,chainId:O.chainId,connector:C}),current:O.uid,status:"connected"}):$})}function D(O){_.setState($=>{const C=$.connections.get(O.uid);if(C){const H=C.connector;H.emitter.listenerCount("change")&&C.connector.emitter.off("change",b),H.emitter.listenerCount("disconnect")&&C.connector.emitter.off("disconnect",D),H.emitter.listenerCount("connect")||C.connector.emitter.on("connect",k)}if($.connections.delete(O.uid),$.connections.size===0)return{...$,connections:new Map,current:null,status:"disconnected"};const A=$.connections.values().next().value;return{...$,connections:new Map($.connections),current:A.connector.uid}})}return{get chains(){return a.getState()},get connectors(){return c.getState()},storage:n,getClient:h,get state(){return _.getState()},setState(O){let $;typeof O=="function"?$=O(_.getState()):$=O;const C=g();typeof $!="object"&&($=C),Object.keys(C).some(H=>!(H in $))&&($=C),_.setState($,!0)},subscribe(O,$,C){return _.subscribe(O,$,C?{...C,fireImmediately:C.emitImmediately}:void 0)},_internal:{mipd:o,store:_,ssr:!!i,syncConnectedChain:r,transports:s.transports,chains:{setState(O){const $=typeof O=="function"?O(a.getState()):O;if($.length!==0)return a.setState($,!0)},subscribe(O){return a.subscribe(O)}},connectors:{providerDetailToConnector:u,setup:l,setState(O){return c.setState(typeof O=="function"?O(c.getState()):O,!0)},subscribe(O){return c.subscribe(O)}},events:{change:b,connect:k,disconnect:D}}}}function _7e(t,e){const{initialState:n,reconnectOnMount:r}=e;return n&&!t._internal.store.persist.hasHydrated()&&t.setState({...n,chainId:t.chains.some(i=>i.id===n.chainId)?n.chainId:t.chains[0].id,connections:r?n.connections:new Map,status:r?"reconnecting":"disconnected"}),{async onMount(){var i;if(t._internal.ssr){await t._internal.store.persist.rehydrate();const s=(i=t._internal.mipd)==null?void 0:i.getProviders().map(t._internal.connectors.providerDetailToConnector).map(t._internal.connectors.setup);t._internal.connectors.setState(o=>[...o,...s??[]])}r?mte(t):t.storage&&t.setState(s=>({...s,connections:new Map}))}}}function A7e(t){var s,o,a;const{chain:e}=t,n=e.rpcUrls.default.http[0];if(!t.transports)return[n];const r=(o=(s=t.transports)==null?void 0:s[e.id])==null?void 0:o.call(s,{chain:e});return(((a=r==null?void 0:r.value)==null?void 0:a.transports)||[r]).map(({value:c})=>(c==null?void 0:c.url)||n)}const mk=l9e({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cloudflare-eth.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),E7e=Symbol(),kV=Object.getPrototypeOf,xP=new WeakMap,C7e=t=>t&&(xP.has(t)?xP.get(t):kV(t)===Object.prototype||kV(t)===Array.prototype),S7e=t=>C7e(t)&&t[E7e]||null,RV=(t,e=!0)=>{xP.set(t,e)},hC={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_CHAIN_ID:"721",VITE_CHAIN_NAME:"Lycan",VITE_CONFIRMATIONS:"6;",VITE_CONTRACT_ADDRESS:"0x3A1A1a46d2Ae1F50edEe56fEfE7385F9c71960fA",VITE_CONTRACT_ADDRESS_BETA:"0x2543a1BbE1dcb3192Dc00ed046f3d1146f805915",VITE_DECIMALS:"18;",VITE_EXPLORER_SUBDOMAIN:"explorer",VITE_FIX_DECIMALS:"6;",VITE_ROOT_URL:'"http://18.117.41.254:8545";',VITE_RPC:"https://rpc.lycanchain.com",VITE_SYMBOL:"LYC",VITE_VALIDATOR_CONTRACT_ADDRESS:"0x094096D94a0639491e5E91E5039ff24AF5e2D783"},gk=t=>typeof t=="object"&&t!==null,Cp=new WeakMap,o3=new WeakSet,T7e=(t=Object.is,e=(l,u)=>new Proxy(l,u),n=l=>gk(l)&&!o3.has(l)&&(Array.isArray(l)||!(Symbol.iterator in l))&&!(l instanceof WeakMap)&&!(l instanceof WeakSet)&&!(l instanceof Error)&&!(l instanceof Number)&&!(l instanceof Date)&&!(l instanceof String)&&!(l instanceof RegExp)&&!(l instanceof ArrayBuffer),r=l=>{switch(l.status){case"fulfilled":return l.value;case"rejected":throw l.reason;default:throw l}},i=new WeakMap,s=(l,u,d=r)=>{const h=i.get(l);if((h==null?void 0:h[0])===u)return h[1];const g=Array.isArray(l)?[]:Object.create(Object.getPrototypeOf(l));return RV(g,!0),i.set(l,[u,g]),Reflect.ownKeys(l).forEach(w=>{if(Object.getOwnPropertyDescriptor(g,w))return;const v=Reflect.get(l,w),_={value:v,enumerable:!0,configurable:!0};if(o3.has(v))RV(v,!1);else if(v instanceof Promise)delete _.value,_.get=()=>d(v);else if(Cp.has(v)){const[T,b]=Cp.get(v);_.value=s(T,b(),d)}Object.defineProperty(g,w,_)}),Object.preventExtensions(g)},o=new WeakMap,a=[1,1],c=l=>{if(!gk(l))throw new Error("object required");const u=o.get(l);if(u)return u;let d=a[0];const h=new Set,g=(H,V=++a[0])=>{d!==V&&(d=V,h.forEach(Y=>Y(H,V)))};let w=a[1];const v=(H=++a[1])=>(w!==H&&!h.size&&(w=H,T.forEach(([V])=>{const Y=V[1](H);Y>d&&(d=Y)})),d),_=H=>(V,Y)=>{const ee=[...V];ee[1]=[H,...ee[1]],g(ee,Y)},T=new Map,b=(H,V)=>{if((hC?"production":void 0)!=="production"&&T.has(H))throw new Error("prop listener already exists");if(h.size){const Y=V[3](_(H));T.set(H,[V,Y])}else T.set(H,[V])},k=H=>{var V;const Y=T.get(H);Y&&(T.delete(H),(V=Y[1])==null||V.call(Y))},D=H=>(h.add(H),h.size===1&&T.forEach(([Y,ee],x)=>{if((hC?"production":void 0)!=="production"&&ee)throw new Error("remove already exists");const E=Y[3](_(x));T.set(x,[Y,E])}),()=>{h.delete(H),h.size===0&&T.forEach(([Y,ee],x)=>{ee&&(ee(),T.set(x,[Y]))})}),O=Array.isArray(l)?[]:Object.create(Object.getPrototypeOf(l)),C=e(O,{deleteProperty(H,V){const Y=Reflect.get(H,V);k(V);const ee=Reflect.deleteProperty(H,V);return ee&&g(["delete",[V],Y]),ee},set(H,V,Y,ee){const x=Reflect.has(H,V),E=Reflect.get(H,V,ee);if(x&&(t(E,Y)||o.has(Y)&&t(E,o.get(Y))))return!0;k(V),gk(Y)&&(Y=S7e(Y)||Y);let y=Y;if(Y instanceof Promise)Y.then(I=>{Y.status="fulfilled",Y.value=I,g(["resolve",[V],I])}).catch(I=>{Y.status="rejected",Y.reason=I,g(["reject",[V],I])});else{!Cp.has(Y)&&n(Y)&&(y=c(Y));const I=!o3.has(y)&&Cp.get(y);I&&b(V,I)}return Reflect.set(H,V,y,ee),g(["set",[V],Y,E]),!0}});o.set(l,C);const A=[O,v,s,D];return Cp.set(C,A),Reflect.ownKeys(l).forEach(H=>{const V=Object.getOwnPropertyDescriptor(l,H);"value"in V&&(C[H]=l[H],delete V.value,delete V.writable),Object.defineProperty(O,H,V)}),C})=>[c,Cp,o3,t,e,n,r,i,s,o,a],[I7e]=T7e();function Li(t={}){return I7e(t)}function Bo(t,e,n){const r=Cp.get(t);(hC?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let i;const s=[],o=r[3];let a=!1;const l=o(u=>{s.push(u),i||(i=Promise.resolve().then(()=>{i=void 0,a&&e(s.splice(0))}))});return a=!0,()=>{a=!1,l()}}function vte(t,e){const n=Cp.get(t);(hC?"production":void 0)!=="production"&&!n&&console.warn("Please use proxy object");const[r,i,s]=n;return s(r,i(),e)}function wg(t){return o3.add(t),t}function $a(t,e,n,r){let i=t[e];return Bo(t,()=>{const s=t[e];Object.is(i,s)||n(i=s)})}function k7e(t){const e=Li({data:Array.from([]),has(n){return this.data.some(r=>r[0]===n)},set(n,r){const i=this.data.find(s=>s[0]===n);return i?i[1]=r:this.data.push([n,r]),this},get(n){var r;return(r=this.data.find(i=>i[0]===n))==null?void 0:r[1]},delete(n){const r=this.data.findIndex(i=>i[0]===n);return r===-1?!1:(this.data.splice(r,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON(){return new Map(this.data)},forEach(n){this.data.forEach(r=>{n(r[1],r[0],this)})},keys(){return this.data.map(n=>n[0]).values()},values(){return this.data.map(n=>n[1]).values()},entries(){return new Map(this.data).entries()},get[Symbol.toStringTag](){return"Map"},[Symbol.iterator](){return this.entries()}});return Object.defineProperties(e,{data:{enumerable:!1},size:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(e),e}var bte={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Hr,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",a="minute",c="hour",l="day",u="week",d="month",h="quarter",g="year",w="date",v="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var y=["th","st","nd","rd"],I=E%100;return"["+E+(y[(I-20)%10]||y[I]||y[0])+"]"}},k=function(E,y,I){var B=String(E);return!B||B.length>=y?E:""+Array(y+1-B.length).join(I)+E},D={s:k,z:function(E){var y=-E.utcOffset(),I=Math.abs(y),B=Math.floor(I/60),M=I%60;return(y<=0?"+":"-")+k(B,2,"0")+":"+k(M,2,"0")},m:function E(y,I){if(y.date()<I.date())return-E(I,y);var B=12*(I.year()-y.year())+(I.month()-y.month()),M=y.clone().add(B,d),W=I-M<0,z=y.clone().add(B+(W?-1:1),d);return+(-(B+(I-M)/(W?M-z:z-M))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:d,y:g,w:u,d:l,D:w,h:c,m:a,s:o,ms:s,Q:h}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},O="en",$={};$[O]=b;var C="$isDayjsObject",A=function(E){return E instanceof ee||!(!E||!E[C])},H=function E(y,I,B){var M;if(!y)return O;if(typeof y=="string"){var W=y.toLowerCase();$[W]&&(M=W),I&&($[W]=I,M=W);var z=y.split("-");if(!M&&z.length>1)return E(z[0])}else{var P=y.name;$[P]=y,M=P}return!B&&M&&(O=M),M||!B&&O},V=function(E,y){if(A(E))return E.clone();var I=typeof y=="object"?y:{};return I.date=E,I.args=arguments,new ee(I)},Y=D;Y.l=H,Y.i=A,Y.w=function(E,y){return V(E,{locale:y.$L,utc:y.$u,x:y.$x,$offset:y.$offset})};var ee=function(){function E(I){this.$L=H(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[C]=!0}var y=E.prototype;return y.parse=function(I){this.$d=function(B){var M=B.date,W=B.utc;if(M===null)return new Date(NaN);if(Y.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var z=M.match(_);if(z){var P=z[2]-1||0,Z=(z[7]||"0").substring(0,3);return W?new Date(Date.UTC(z[1],P,z[3]||1,z[4]||0,z[5]||0,z[6]||0,Z)):new Date(z[1],P,z[3]||1,z[4]||0,z[5]||0,z[6]||0,Z)}}return new Date(M)}(I),this.init()},y.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},y.$utils=function(){return Y},y.isValid=function(){return this.$d.toString()!==v},y.isSame=function(I,B){var M=V(I);return this.startOf(B)<=M&&M<=this.endOf(B)},y.isAfter=function(I,B){return V(I)<this.startOf(B)},y.isBefore=function(I,B){return this.endOf(B)<V(I)},y.$g=function(I,B,M){return Y.u(I)?this[B]:this.set(M,I)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(I,B){var M=this,W=!!Y.u(B)||B,z=Y.p(I),P=function(se,L){var re=Y.w(M.$u?Date.UTC(M.$y,L,se):new Date(M.$y,L,se),M);return W?re:re.endOf(l)},Z=function(se,L){return Y.w(M.toDate()[se].apply(M.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(L)),M)},he=this.$W,ve=this.$M,j=this.$D,ge="set"+(this.$u?"UTC":"");switch(z){case g:return W?P(1,0):P(31,11);case d:return W?P(1,ve):P(0,ve+1);case u:var te=this.$locale().weekStart||0,ae=(he<te?he+7:he)-te;return P(W?j-ae:j+(6-ae),ve);case l:case w:return Z(ge+"Hours",0);case c:return Z(ge+"Minutes",1);case a:return Z(ge+"Seconds",2);case o:return Z(ge+"Milliseconds",3);default:return this.clone()}},y.endOf=function(I){return this.startOf(I,!1)},y.$set=function(I,B){var M,W=Y.p(I),z="set"+(this.$u?"UTC":""),P=(M={},M[l]=z+"Date",M[w]=z+"Date",M[d]=z+"Month",M[g]=z+"FullYear",M[c]=z+"Hours",M[a]=z+"Minutes",M[o]=z+"Seconds",M[s]=z+"Milliseconds",M)[W],Z=W===l?this.$D+(B-this.$W):B;if(W===d||W===g){var he=this.clone().set(w,1);he.$d[P](Z),he.init(),this.$d=he.set(w,Math.min(this.$D,he.daysInMonth())).$d}else P&&this.$d[P](Z);return this.init(),this},y.set=function(I,B){return this.clone().$set(I,B)},y.get=function(I){return this[Y.p(I)]()},y.add=function(I,B){var M,W=this;I=Number(I);var z=Y.p(B),P=function(ve){var j=V(W);return Y.w(j.date(j.date()+Math.round(ve*I)),W)};if(z===d)return this.set(d,this.$M+I);if(z===g)return this.set(g,this.$y+I);if(z===l)return P(1);if(z===u)return P(7);var Z=(M={},M[a]=r,M[c]=i,M[o]=n,M)[z]||1,he=this.$d.getTime()+I*Z;return Y.w(he,this)},y.subtract=function(I,B){return this.add(-1*I,B)},y.format=function(I){var B=this,M=this.$locale();if(!this.isValid())return M.invalidDate||v;var W=I||"YYYY-MM-DDTHH:mm:ssZ",z=Y.z(this),P=this.$H,Z=this.$m,he=this.$M,ve=M.weekdays,j=M.months,ge=M.meridiem,te=function(L,re,be,Se){return L&&(L[re]||L(B,W))||be[re].slice(0,Se)},ae=function(L){return Y.s(P%12||12,L,"0")},se=ge||function(L,re,be){var Se=L<12?"AM":"PM";return be?Se.toLowerCase():Se};return W.replace(T,function(L,re){return re||function(be){switch(be){case"YY":return String(B.$y).slice(-2);case"YYYY":return Y.s(B.$y,4,"0");case"M":return he+1;case"MM":return Y.s(he+1,2,"0");case"MMM":return te(M.monthsShort,he,j,3);case"MMMM":return te(j,he);case"D":return B.$D;case"DD":return Y.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return te(M.weekdaysMin,B.$W,ve,2);case"ddd":return te(M.weekdaysShort,B.$W,ve,3);case"dddd":return ve[B.$W];case"H":return String(P);case"HH":return Y.s(P,2,"0");case"h":return ae(1);case"hh":return ae(2);case"a":return se(P,Z,!0);case"A":return se(P,Z,!1);case"m":return String(Z);case"mm":return Y.s(Z,2,"0");case"s":return String(B.$s);case"ss":return Y.s(B.$s,2,"0");case"SSS":return Y.s(B.$ms,3,"0");case"Z":return z}return null}(L)||z.replace(":","")})},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(I,B,M){var W,z=this,P=Y.p(B),Z=V(I),he=(Z.utcOffset()-this.utcOffset())*r,ve=this-Z,j=function(){return Y.m(z,Z)};switch(P){case g:W=j()/12;break;case d:W=j();break;case h:W=j()/3;break;case u:W=(ve-he)/6048e5;break;case l:W=(ve-he)/864e5;break;case c:W=ve/i;break;case a:W=ve/r;break;case o:W=ve/n;break;default:W=ve}return M?W:Y.a(W)},y.daysInMonth=function(){return this.endOf(d).$D},y.$locale=function(){return $[this.$L]},y.locale=function(I,B){if(!I)return this.$L;var M=this.clone(),W=H(I,B,!0);return W&&(M.$L=W),M},y.clone=function(){return Y.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},E}(),x=ee.prototype;return V.prototype=x,[["$ms",s],["$s",o],["$m",a],["$H",c],["$W",l],["$M",d],["$y",g],["$D",w]].forEach(function(E){x[E[1]]=function(y){return this.$g(y,E[0],E[1])}}),V.extend=function(E,y){return E.$i||(E(y,ee,V),E.$i=!0),V},V.locale=H,V.isDayjs=A,V.unix=function(E){return V(1e3*E)},V.en=$[O],V.Ls=$,V.p={},V})})(bte);var R7e=bte.exports;const Ry=Qs(R7e);var xte={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Hr,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var r=["th","st","nd","rd"],i=n%100;return"["+n+(r[(i-20)%10]||r[i]||r[0])+"]"}}})})(xte);var N7e=xte.exports;const P7e=Qs(N7e);var _te={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Hr,function(){return function(n,r,i){n=n||{};var s=r.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(l,u,d,h){return s.fromToBase(l,u,d,h)}i.en.relativeTime=o,s.fromToBase=function(l,u,d,h,g){for(var w,v,_,T=d.$locale().relativeTime||o,b=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],k=b.length,D=0;D<k;D+=1){var O=b[D];O.d&&(w=h?i(l).diff(d,O.d,!0):d.diff(l,O.d,!0));var $=(n.rounding||Math.round)(Math.abs(w));if(_=w>0,$<=O.r||!O.r){$<=1&&D>0&&(O=b[D-1]);var C=T[O.l];g&&($=g(""+$)),v=typeof C=="string"?C.replace("%d",$):C($,u,O.l,_);break}}if(u)return v;var A=_?T.future:T.past;return typeof A=="function"?A(v):A.replace("%s",v)},s.to=function(l,u){return a(l,u,this,!0)},s.from=function(l,u){return a(l,u,this)};var c=function(l){return l.$u?i.utc():i()};s.toNow=function(l){return this.to(c(this),l)},s.fromNow=function(l){return this.from(c(this),l)}}})})(_te);var O7e=_te.exports;const D7e=Qs(O7e);var Ate={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Hr,function(){return function(n,r,i){i.updateLocale=function(s,o){var a=i.Ls[s];if(a)return(o?Object.keys(o):[]).forEach(function(c){a[c]=o[c]}),a}}})})(Ate);var M7e=Ate.exports;const B7e=Qs(M7e);Ry.extend(D7e);Ry.extend(B7e);const $7e={...P7e,name:"en-web3-modal",relativeTime:{future:"in %s",past:"%s ago",s:"%d sec",m:"1 min",mm:"%d min",h:"1 hr",hh:"%d hrs",d:"1 d",dd:"%d d",M:"1 mo",MM:"%d mo",y:"1 yr",yy:"%d yr"}};Ry.locale("en-web3-modal",$7e);const qB={getYear(t=new Date().toISOString()){return Ry(t).year()},getRelativeDateFromNow(t){return Ry(t).locale("en-web3-modal").fromNow(!0)},formatDate(t,e="DD MMM"){return Ry(t).format(e)}},zl={caipNetworkIdToNumber(t){return t?Number(t.split(":")[1]):void 0}};var j7e=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,wk=Math.ceil,Vc=Math.floor,oa="[BigNumber Error] ",NV=oa+"Number primitive has more than 15 significant digits: ",jl=1e14,kn=14,yk=9007199254740991,vk=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],pp=1e7,As=1e9;function Ete(t){var e,n,r,i=b.prototype={constructor:b,toString:null,valueOf:null},s=new b(1),o=20,a=4,c=-7,l=21,u=-1e7,d=1e7,h=!1,g=1,w=0,v={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},_="0123456789abcdefghijklmnopqrstuvwxyz",T=!0;function b(A,H){var V,Y,ee,x,E,y,I,B,M=this;if(!(M instanceof b))return new b(A,H);if(H==null){if(A&&A._isBigNumber===!0){M.s=A.s,!A.c||A.e>d?M.c=M.e=null:A.e<u?M.c=[M.e=0]:(M.e=A.e,M.c=A.c.slice());return}if((y=typeof A=="number")&&A*0==0){if(M.s=1/A<0?(A=-A,-1):1,A===~~A){for(x=0,E=A;E>=10;E/=10,x++);x>d?M.c=M.e=null:(M.e=x,M.c=[A]);return}B=String(A)}else{if(!j7e.test(B=String(A)))return r(M,B,y);M.s=B.charCodeAt(0)==45?(B=B.slice(1),-1):1}(x=B.indexOf("."))>-1&&(B=B.replace(".","")),(E=B.search(/e/i))>0?(x<0&&(x=E),x+=+B.slice(E+1),B=B.substring(0,E)):x<0&&(x=B.length)}else{if(xi(H,2,_.length,"Base"),H==10&&T)return M=new b(A),$(M,o+M.e+1,a);if(B=String(A),y=typeof A=="number"){if(A*0!=0)return r(M,B,y,H);if(M.s=1/A<0?(B=B.slice(1),-1):1,b.DEBUG&&B.replace(/^0\.0*|\./,"").length>15)throw Error(NV+A)}else M.s=B.charCodeAt(0)===45?(B=B.slice(1),-1):1;for(V=_.slice(0,H),x=E=0,I=B.length;E<I;E++)if(V.indexOf(Y=B.charAt(E))<0){if(Y=="."){if(E>x){x=I;continue}}else if(!ee&&(B==B.toUpperCase()&&(B=B.toLowerCase())||B==B.toLowerCase()&&(B=B.toUpperCase()))){ee=!0,E=-1,x=0;continue}return r(M,String(A),y,H)}y=!1,B=n(B,H,10,M.s),(x=B.indexOf("."))>-1?B=B.replace(".",""):x=B.length}for(E=0;B.charCodeAt(E)===48;E++);for(I=B.length;B.charCodeAt(--I)===48;);if(B=B.slice(E,++I)){if(I-=E,y&&b.DEBUG&&I>15&&(A>yk||A!==Vc(A)))throw Error(NV+M.s*A);if((x=x-E-1)>d)M.c=M.e=null;else if(x<u)M.c=[M.e=0];else{if(M.e=x,M.c=[],E=(x+1)%kn,x<0&&(E+=kn),E<I){for(E&&M.c.push(+B.slice(0,E)),I-=kn;E<I;)M.c.push(+B.slice(E,E+=kn));E=kn-(B=B.slice(E)).length}else E-=I;for(;E--;B+="0");M.c.push(+B)}}else M.c=[M.e=0]}b.clone=Ete,b.ROUND_UP=0,b.ROUND_DOWN=1,b.ROUND_CEIL=2,b.ROUND_FLOOR=3,b.ROUND_HALF_UP=4,b.ROUND_HALF_DOWN=5,b.ROUND_HALF_EVEN=6,b.ROUND_HALF_CEIL=7,b.ROUND_HALF_FLOOR=8,b.EUCLID=9,b.config=b.set=function(A){var H,V;if(A!=null)if(typeof A=="object"){if(A.hasOwnProperty(H="DECIMAL_PLACES")&&(V=A[H],xi(V,0,As,H),o=V),A.hasOwnProperty(H="ROUNDING_MODE")&&(V=A[H],xi(V,0,8,H),a=V),A.hasOwnProperty(H="EXPONENTIAL_AT")&&(V=A[H],V&&V.pop?(xi(V[0],-As,0,H),xi(V[1],0,As,H),c=V[0],l=V[1]):(xi(V,-As,As,H),c=-(l=V<0?-V:V))),A.hasOwnProperty(H="RANGE"))if(V=A[H],V&&V.pop)xi(V[0],-As,-1,H),xi(V[1],1,As,H),u=V[0],d=V[1];else if(xi(V,-As,As,H),V)u=-(d=V<0?-V:V);else throw Error(oa+H+" cannot be zero: "+V);if(A.hasOwnProperty(H="CRYPTO"))if(V=A[H],V===!!V)if(V)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))h=V;else throw h=!V,Error(oa+"crypto unavailable");else h=V;else throw Error(oa+H+" not true or false: "+V);if(A.hasOwnProperty(H="MODULO_MODE")&&(V=A[H],xi(V,0,9,H),g=V),A.hasOwnProperty(H="POW_PRECISION")&&(V=A[H],xi(V,0,As,H),w=V),A.hasOwnProperty(H="FORMAT"))if(V=A[H],typeof V=="object")v=V;else throw Error(oa+H+" not an object: "+V);if(A.hasOwnProperty(H="ALPHABET"))if(V=A[H],typeof V=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(V))T=V.slice(0,10)=="0123456789",_=V;else throw Error(oa+H+" invalid: "+V)}else throw Error(oa+"Object expected: "+A);return{DECIMAL_PLACES:o,ROUNDING_MODE:a,EXPONENTIAL_AT:[c,l],RANGE:[u,d],CRYPTO:h,MODULO_MODE:g,POW_PRECISION:w,FORMAT:v,ALPHABET:_}},b.isBigNumber=function(A){if(!A||A._isBigNumber!==!0)return!1;if(!b.DEBUG)return!0;var H,V,Y=A.c,ee=A.e,x=A.s;e:if({}.toString.call(Y)=="[object Array]"){if((x===1||x===-1)&&ee>=-As&&ee<=As&&ee===Vc(ee)){if(Y[0]===0){if(ee===0&&Y.length===1)return!0;break e}if(H=(ee+1)%kn,H<1&&(H+=kn),String(Y[0]).length==H){for(H=0;H<Y.length;H++)if(V=Y[H],V<0||V>=jl||V!==Vc(V))break e;if(V!==0)return!0}}}else if(Y===null&&ee===null&&(x===null||x===1||x===-1))return!0;throw Error(oa+"Invalid BigNumber: "+A)},b.maximum=b.max=function(){return D(arguments,-1)},b.minimum=b.min=function(){return D(arguments,1)},b.random=function(){var A=9007199254740992,H=Math.random()*A&2097151?function(){return Vc(Math.random()*A)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(V){var Y,ee,x,E,y,I=0,B=[],M=new b(s);if(V==null?V=o:xi(V,0,As),E=wk(V/kn),h)if(crypto.getRandomValues){for(Y=crypto.getRandomValues(new Uint32Array(E*=2));I<E;)y=Y[I]*131072+(Y[I+1]>>>11),y>=9e15?(ee=crypto.getRandomValues(new Uint32Array(2)),Y[I]=ee[0],Y[I+1]=ee[1]):(B.push(y%1e14),I+=2);I=E/2}else if(crypto.randomBytes){for(Y=crypto.randomBytes(E*=7);I<E;)y=(Y[I]&31)*281474976710656+Y[I+1]*1099511627776+Y[I+2]*4294967296+Y[I+3]*16777216+(Y[I+4]<<16)+(Y[I+5]<<8)+Y[I+6],y>=9e15?crypto.randomBytes(7).copy(Y,I):(B.push(y%1e14),I+=7);I=E/7}else throw h=!1,Error(oa+"crypto unavailable");if(!h)for(;I<E;)y=H(),y<9e15&&(B[I++]=y%1e14);for(E=B[--I],V%=kn,E&&V&&(y=vk[kn-V],B[I]=Vc(E/y)*y);B[I]===0;B.pop(),I--);if(I<0)B=[x=0];else{for(x=-1;B[0]===0;B.splice(0,1),x-=kn);for(I=1,y=B[0];y>=10;y/=10,I++);I<kn&&(x-=kn-I)}return M.e=x,M.c=B,M}}(),b.sum=function(){for(var A=1,H=arguments,V=new b(H[0]);A<H.length;)V=V.plus(H[A++]);return V},n=function(){var A="0123456789";function H(V,Y,ee,x){for(var E,y=[0],I,B=0,M=V.length;B<M;){for(I=y.length;I--;y[I]*=Y);for(y[0]+=x.indexOf(V.charAt(B++)),E=0;E<y.length;E++)y[E]>ee-1&&(y[E+1]==null&&(y[E+1]=0),y[E+1]+=y[E]/ee|0,y[E]%=ee)}return y.reverse()}return function(V,Y,ee,x,E){var y,I,B,M,W,z,P,Z,he=V.indexOf("."),ve=o,j=a;for(he>=0&&(M=w,w=0,V=V.replace(".",""),Z=new b(Y),z=Z.pow(V.length-he),w=M,Z.c=H(yf(jc(z.c),z.e,"0"),10,ee,A),Z.e=Z.c.length),P=H(V,Y,ee,E?(y=_,A):(y=A,_)),B=M=P.length;P[--M]==0;P.pop());if(!P[0])return y.charAt(0);if(he<0?--B:(z.c=P,z.e=B,z.s=x,z=e(z,Z,ve,j,ee),P=z.c,W=z.r,B=z.e),I=B+ve+1,he=P[I],M=ee/2,W=W||I<0||P[I+1]!=null,W=j<4?(he!=null||W)&&(j==0||j==(z.s<0?3:2)):he>M||he==M&&(j==4||W||j==6&&P[I-1]&1||j==(z.s<0?8:7)),I<1||!P[0])V=W?yf(y.charAt(1),-ve,y.charAt(0)):y.charAt(0);else{if(P.length=I,W)for(--ee;++P[--I]>ee;)P[I]=0,I||(++B,P=[1].concat(P));for(M=P.length;!P[--M];);for(he=0,V="";he<=M;V+=y.charAt(P[he++]));V=yf(V,B,y.charAt(0))}return V}}(),e=function(){function A(Y,ee,x){var E,y,I,B,M=0,W=Y.length,z=ee%pp,P=ee/pp|0;for(Y=Y.slice();W--;)I=Y[W]%pp,B=Y[W]/pp|0,E=P*I+B*z,y=z*I+E%pp*pp+M,M=(y/x|0)+(E/pp|0)+P*B,Y[W]=y%x;return M&&(Y=[M].concat(Y)),Y}function H(Y,ee,x,E){var y,I;if(x!=E)I=x>E?1:-1;else for(y=I=0;y<x;y++)if(Y[y]!=ee[y]){I=Y[y]>ee[y]?1:-1;break}return I}function V(Y,ee,x,E){for(var y=0;x--;)Y[x]-=y,y=Y[x]<ee[x]?1:0,Y[x]=y*E+Y[x]-ee[x];for(;!Y[0]&&Y.length>1;Y.splice(0,1));}return function(Y,ee,x,E,y){var I,B,M,W,z,P,Z,he,ve,j,ge,te,ae,se,L,re,be,Se=Y.s==ee.s?1:-1,Ie=Y.c,Ue=ee.c;if(!Ie||!Ie[0]||!Ue||!Ue[0])return new b(!Y.s||!ee.s||(Ie?Ue&&Ie[0]==Ue[0]:!Ue)?NaN:Ie&&Ie[0]==0||!Ue?Se*0:Se/0);for(he=new b(Se),ve=he.c=[],B=Y.e-ee.e,Se=x+B+1,y||(y=jl,B=qc(Y.e/kn)-qc(ee.e/kn),Se=Se/kn|0),M=0;Ue[M]==(Ie[M]||0);M++);if(Ue[M]>(Ie[M]||0)&&B--,Se<0)ve.push(1),W=!0;else{for(se=Ie.length,re=Ue.length,M=0,Se+=2,z=Vc(y/(Ue[0]+1)),z>1&&(Ue=A(Ue,z,y),Ie=A(Ie,z,y),re=Ue.length,se=Ie.length),ae=re,j=Ie.slice(0,re),ge=j.length;ge<re;j[ge++]=0);be=Ue.slice(),be=[0].concat(be),L=Ue[0],Ue[1]>=y/2&&L++;do{if(z=0,I=H(Ue,j,re,ge),I<0){if(te=j[0],re!=ge&&(te=te*y+(j[1]||0)),z=Vc(te/L),z>1)for(z>=y&&(z=y-1),P=A(Ue,z,y),Z=P.length,ge=j.length;H(P,j,Z,ge)==1;)z--,V(P,re<Z?be:Ue,Z,y),Z=P.length,I=1;else z==0&&(I=z=1),P=Ue.slice(),Z=P.length;if(Z<ge&&(P=[0].concat(P)),V(j,P,ge,y),ge=j.length,I==-1)for(;H(Ue,j,re,ge)<1;)z++,V(j,re<ge?be:Ue,ge,y),ge=j.length}else I===0&&(z++,j=[0]);ve[M++]=z,j[0]?j[ge++]=Ie[ae]||0:(j=[Ie[ae]],ge=1)}while((ae++<se||j[0]!=null)&&Se--);W=j[0]!=null,ve[0]||ve.splice(0,1)}if(y==jl){for(M=1,Se=ve[0];Se>=10;Se/=10,M++);$(he,x+(he.e=M+B*kn-1)+1,E,W)}else he.e=B,he.r=+W;return he}}();function k(A,H,V,Y){var ee,x,E,y,I;if(V==null?V=a:xi(V,0,8),!A.c)return A.toString();if(ee=A.c[0],E=A.e,H==null)I=jc(A.c),I=Y==1||Y==2&&(E<=c||E>=l)?cA(I,E):yf(I,E,"0");else if(A=$(new b(A),H,V),x=A.e,I=jc(A.c),y=I.length,Y==1||Y==2&&(H<=x||x<=c)){for(;y<H;I+="0",y++);I=cA(I,x)}else if(H-=E,I=yf(I,x,"0"),x+1>y){if(--H>0)for(I+=".";H--;I+="0");}else if(H+=x-y,H>0)for(x+1==y&&(I+=".");H--;I+="0");return A.s<0&&ee?"-"+I:I}function D(A,H){for(var V,Y,ee=1,x=new b(A[0]);ee<A.length;ee++)Y=new b(A[ee]),(!Y.s||(V=Tm(x,Y))===H||V===0&&x.s===H)&&(x=Y);return x}function O(A,H,V){for(var Y=1,ee=H.length;!H[--ee];H.pop());for(ee=H[0];ee>=10;ee/=10,Y++);return(V=Y+V*kn-1)>d?A.c=A.e=null:V<u?A.c=[A.e=0]:(A.e=V,A.c=H),A}r=function(){var A=/^(-?)0([xbo])(?=\w[\w.]*$)/i,H=/^([^.]+)\.$/,V=/^\.([^.]+)$/,Y=/^-?(Infinity|NaN)$/,ee=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(x,E,y,I){var B,M=y?E:E.replace(ee,"");if(Y.test(M))x.s=isNaN(M)?null:M<0?-1:1;else{if(!y&&(M=M.replace(A,function(W,z,P){return B=(P=P.toLowerCase())=="x"?16:P=="b"?2:8,!I||I==B?z:W}),I&&(B=I,M=M.replace(H,"$1").replace(V,"0.$1")),E!=M))return new b(M,B);if(b.DEBUG)throw Error(oa+"Not a"+(I?" base "+I:"")+" number: "+E);x.s=null}x.c=x.e=null}}();function $(A,H,V,Y){var ee,x,E,y,I,B,M,W=A.c,z=vk;if(W){e:{for(ee=1,y=W[0];y>=10;y/=10,ee++);if(x=H-ee,x<0)x+=kn,E=H,I=W[B=0],M=Vc(I/z[ee-E-1]%10);else if(B=wk((x+1)/kn),B>=W.length)if(Y){for(;W.length<=B;W.push(0));I=M=0,ee=1,x%=kn,E=x-kn+1}else break e;else{for(I=y=W[B],ee=1;y>=10;y/=10,ee++);x%=kn,E=x-kn+ee,M=E<0?0:Vc(I/z[ee-E-1]%10)}if(Y=Y||H<0||W[B+1]!=null||(E<0?I:I%z[ee-E-1]),Y=V<4?(M||Y)&&(V==0||V==(A.s<0?3:2)):M>5||M==5&&(V==4||Y||V==6&&(x>0?E>0?I/z[ee-E]:0:W[B-1])%10&1||V==(A.s<0?8:7)),H<1||!W[0])return W.length=0,Y?(H-=A.e+1,W[0]=z[(kn-H%kn)%kn],A.e=-H||0):W[0]=A.e=0,A;if(x==0?(W.length=B,y=1,B--):(W.length=B+1,y=z[kn-x],W[B]=E>0?Vc(I/z[ee-E]%z[E])*y:0),Y)for(;;)if(B==0){for(x=1,E=W[0];E>=10;E/=10,x++);for(E=W[0]+=y,y=1;E>=10;E/=10,y++);x!=y&&(A.e++,W[0]==jl&&(W[0]=1));break}else{if(W[B]+=y,W[B]!=jl)break;W[B--]=0,y=1}for(x=W.length;W[--x]===0;W.pop());}A.e>d?A.c=A.e=null:A.e<u&&(A.c=[A.e=0])}return A}function C(A){var H,V=A.e;return V===null?A.toString():(H=jc(A.c),H=V<=c||V>=l?cA(H,V):yf(H,V,"0"),A.s<0?"-"+H:H)}return i.absoluteValue=i.abs=function(){var A=new b(this);return A.s<0&&(A.s=1),A},i.comparedTo=function(A,H){return Tm(this,new b(A,H))},i.decimalPlaces=i.dp=function(A,H){var V,Y,ee,x=this;if(A!=null)return xi(A,0,As),H==null?H=a:xi(H,0,8),$(new b(x),A+x.e+1,H);if(!(V=x.c))return null;if(Y=((ee=V.length-1)-qc(this.e/kn))*kn,ee=V[ee])for(;ee%10==0;ee/=10,Y--);return Y<0&&(Y=0),Y},i.dividedBy=i.div=function(A,H){return e(this,new b(A,H),o,a)},i.dividedToIntegerBy=i.idiv=function(A,H){return e(this,new b(A,H),0,1)},i.exponentiatedBy=i.pow=function(A,H){var V,Y,ee,x,E,y,I,B,M,W=this;if(A=new b(A),A.c&&!A.isInteger())throw Error(oa+"Exponent not an integer: "+C(A));if(H!=null&&(H=new b(H)),y=A.e>14,!W.c||!W.c[0]||W.c[0]==1&&!W.e&&W.c.length==1||!A.c||!A.c[0])return M=new b(Math.pow(+C(W),y?A.s*(2-aA(A)):+C(A))),H?M.mod(H):M;if(I=A.s<0,H){if(H.c?!H.c[0]:!H.s)return new b(NaN);Y=!I&&W.isInteger()&&H.isInteger(),Y&&(W=W.mod(H))}else{if(A.e>9&&(W.e>0||W.e<-1||(W.e==0?W.c[0]>1||y&&W.c[1]>=24e7:W.c[0]<8e13||y&&W.c[0]<=9999975e7)))return x=W.s<0&&aA(A)?-0:0,W.e>-1&&(x=1/x),new b(I?1/x:x);w&&(x=wk(w/kn+2))}for(y?(V=new b(.5),I&&(A.s=1),B=aA(A)):(ee=Math.abs(+C(A)),B=ee%2),M=new b(s);;){if(B){if(M=M.times(W),!M.c)break;x?M.c.length>x&&(M.c.length=x):Y&&(M=M.mod(H))}if(ee){if(ee=Vc(ee/2),ee===0)break;B=ee%2}else if(A=A.times(V),$(A,A.e+1,1),A.e>14)B=aA(A);else{if(ee=+C(A),ee===0)break;B=ee%2}W=W.times(W),x?W.c&&W.c.length>x&&(W.c.length=x):Y&&(W=W.mod(H))}return Y?M:(I&&(M=s.div(M)),H?M.mod(H):x?$(M,w,a,E):M)},i.integerValue=function(A){var H=new b(this);return A==null?A=a:xi(A,0,8),$(H,H.e+1,A)},i.isEqualTo=i.eq=function(A,H){return Tm(this,new b(A,H))===0},i.isFinite=function(){return!!this.c},i.isGreaterThan=i.gt=function(A,H){return Tm(this,new b(A,H))>0},i.isGreaterThanOrEqualTo=i.gte=function(A,H){return(H=Tm(this,new b(A,H)))===1||H===0},i.isInteger=function(){return!!this.c&&qc(this.e/kn)>this.c.length-2},i.isLessThan=i.lt=function(A,H){return Tm(this,new b(A,H))<0},i.isLessThanOrEqualTo=i.lte=function(A,H){return(H=Tm(this,new b(A,H)))===-1||H===0},i.isNaN=function(){return!this.s},i.isNegative=function(){return this.s<0},i.isPositive=function(){return this.s>0},i.isZero=function(){return!!this.c&&this.c[0]==0},i.minus=function(A,H){var V,Y,ee,x,E=this,y=E.s;if(A=new b(A,H),H=A.s,!y||!H)return new b(NaN);if(y!=H)return A.s=-H,E.plus(A);var I=E.e/kn,B=A.e/kn,M=E.c,W=A.c;if(!I||!B){if(!M||!W)return M?(A.s=-H,A):new b(W?E:NaN);if(!M[0]||!W[0])return W[0]?(A.s=-H,A):new b(M[0]?E:a==3?-0:0)}if(I=qc(I),B=qc(B),M=M.slice(),y=I-B){for((x=y<0)?(y=-y,ee=M):(B=I,ee=W),ee.reverse(),H=y;H--;ee.push(0));ee.reverse()}else for(Y=(x=(y=M.length)<(H=W.length))?y:H,y=H=0;H<Y;H++)if(M[H]!=W[H]){x=M[H]<W[H];break}if(x&&(ee=M,M=W,W=ee,A.s=-A.s),H=(Y=W.length)-(V=M.length),H>0)for(;H--;M[V++]=0);for(H=jl-1;Y>y;){if(M[--Y]<W[Y]){for(V=Y;V&&!M[--V];M[V]=H);--M[V],M[Y]+=jl}M[Y]-=W[Y]}for(;M[0]==0;M.splice(0,1),--B);return M[0]?O(A,M,B):(A.s=a==3?-1:1,A.c=[A.e=0],A)},i.modulo=i.mod=function(A,H){var V,Y,ee=this;return A=new b(A,H),!ee.c||!A.s||A.c&&!A.c[0]?new b(NaN):!A.c||ee.c&&!ee.c[0]?new b(ee):(g==9?(Y=A.s,A.s=1,V=e(ee,A,0,3),A.s=Y,V.s*=Y):V=e(ee,A,0,g),A=ee.minus(V.times(A)),!A.c[0]&&g==1&&(A.s=ee.s),A)},i.multipliedBy=i.times=function(A,H){var V,Y,ee,x,E,y,I,B,M,W,z,P,Z,he,ve,j=this,ge=j.c,te=(A=new b(A,H)).c;if(!ge||!te||!ge[0]||!te[0])return!j.s||!A.s||ge&&!ge[0]&&!te||te&&!te[0]&&!ge?A.c=A.e=A.s=null:(A.s*=j.s,!ge||!te?A.c=A.e=null:(A.c=[0],A.e=0)),A;for(Y=qc(j.e/kn)+qc(A.e/kn),A.s*=j.s,I=ge.length,W=te.length,I<W&&(Z=ge,ge=te,te=Z,ee=I,I=W,W=ee),ee=I+W,Z=[];ee--;Z.push(0));for(he=jl,ve=pp,ee=W;--ee>=0;){for(V=0,z=te[ee]%ve,P=te[ee]/ve|0,E=I,x=ee+E;x>ee;)B=ge[--E]%ve,M=ge[E]/ve|0,y=P*B+M*z,B=z*B+y%ve*ve+Z[x]+V,V=(B/he|0)+(y/ve|0)+P*M,Z[x--]=B%he;Z[x]=V}return V?++Y:Z.splice(0,1),O(A,Z,Y)},i.negated=function(){var A=new b(this);return A.s=-A.s||null,A},i.plus=function(A,H){var V,Y=this,ee=Y.s;if(A=new b(A,H),H=A.s,!ee||!H)return new b(NaN);if(ee!=H)return A.s=-H,Y.minus(A);var x=Y.e/kn,E=A.e/kn,y=Y.c,I=A.c;if(!x||!E){if(!y||!I)return new b(ee/0);if(!y[0]||!I[0])return I[0]?A:new b(y[0]?Y:ee*0)}if(x=qc(x),E=qc(E),y=y.slice(),ee=x-E){for(ee>0?(E=x,V=I):(ee=-ee,V=y),V.reverse();ee--;V.push(0));V.reverse()}for(ee=y.length,H=I.length,ee-H<0&&(V=I,I=y,y=V,H=ee),ee=0;H;)ee=(y[--H]=y[H]+I[H]+ee)/jl|0,y[H]=jl===y[H]?0:y[H]%jl;return ee&&(y=[ee].concat(y),++E),O(A,y,E)},i.precision=i.sd=function(A,H){var V,Y,ee,x=this;if(A!=null&&A!==!!A)return xi(A,1,As),H==null?H=a:xi(H,0,8),$(new b(x),A,H);if(!(V=x.c))return null;if(ee=V.length-1,Y=ee*kn+1,ee=V[ee]){for(;ee%10==0;ee/=10,Y--);for(ee=V[0];ee>=10;ee/=10,Y++);}return A&&x.e+1>Y&&(Y=x.e+1),Y},i.shiftedBy=function(A){return xi(A,-yk,yk),this.times("1e"+A)},i.squareRoot=i.sqrt=function(){var A,H,V,Y,ee,x=this,E=x.c,y=x.s,I=x.e,B=o+4,M=new b("0.5");if(y!==1||!E||!E[0])return new b(!y||y<0&&(!E||E[0])?NaN:E?x:1/0);if(y=Math.sqrt(+C(x)),y==0||y==1/0?(H=jc(E),(H.length+I)%2==0&&(H+="0"),y=Math.sqrt(+H),I=qc((I+1)/2)-(I<0||I%2),y==1/0?H="5e"+I:(H=y.toExponential(),H=H.slice(0,H.indexOf("e")+1)+I),V=new b(H)):V=new b(y+""),V.c[0]){for(I=V.e,y=I+B,y<3&&(y=0);;)if(ee=V,V=M.times(ee.plus(e(x,ee,B,1))),jc(ee.c).slice(0,y)===(H=jc(V.c)).slice(0,y))if(V.e<I&&--y,H=H.slice(y-3,y+1),H=="9999"||!Y&&H=="4999"){if(!Y&&($(ee,ee.e+o+2,0),ee.times(ee).eq(x))){V=ee;break}B+=4,y+=4,Y=1}else{(!+H||!+H.slice(1)&&H.charAt(0)=="5")&&($(V,V.e+o+2,1),A=!V.times(V).eq(x));break}}return $(V,V.e+o+1,a,A)},i.toExponential=function(A,H){return A!=null&&(xi(A,0,As),A++),k(this,A,H,1)},i.toFixed=function(A,H){return A!=null&&(xi(A,0,As),A=A+this.e+1),k(this,A,H)},i.toFormat=function(A,H,V){var Y,ee=this;if(V==null)A!=null&&H&&typeof H=="object"?(V=H,H=null):A&&typeof A=="object"?(V=A,A=H=null):V=v;else if(typeof V!="object")throw Error(oa+"Argument not an object: "+V);if(Y=ee.toFixed(A,H),ee.c){var x,E=Y.split("."),y=+V.groupSize,I=+V.secondaryGroupSize,B=V.groupSeparator||"",M=E[0],W=E[1],z=ee.s<0,P=z?M.slice(1):M,Z=P.length;if(I&&(x=y,y=I,I=x,Z-=x),y>0&&Z>0){for(x=Z%y||y,M=P.substr(0,x);x<Z;x+=y)M+=B+P.substr(x,y);I>0&&(M+=B+P.slice(x)),z&&(M="-"+M)}Y=W?M+(V.decimalSeparator||"")+((I=+V.fractionGroupSize)?W.replace(new RegExp("\\d{"+I+"}\\B","g"),"$&"+(V.fractionGroupSeparator||"")):W):M}return(V.prefix||"")+Y+(V.suffix||"")},i.toFraction=function(A){var H,V,Y,ee,x,E,y,I,B,M,W,z,P=this,Z=P.c;if(A!=null&&(y=new b(A),!y.isInteger()&&(y.c||y.s!==1)||y.lt(s)))throw Error(oa+"Argument "+(y.isInteger()?"out of range: ":"not an integer: ")+C(y));if(!Z)return new b(P);for(H=new b(s),B=V=new b(s),Y=I=new b(s),z=jc(Z),x=H.e=z.length-P.e-1,H.c[0]=vk[(E=x%kn)<0?kn+E:E],A=!A||y.comparedTo(H)>0?x>0?H:B:y,E=d,d=1/0,y=new b(z),I.c[0]=0;M=e(y,H,0,1),ee=V.plus(M.times(Y)),ee.comparedTo(A)!=1;)V=Y,Y=ee,B=I.plus(M.times(ee=B)),I=ee,H=y.minus(M.times(ee=H)),y=ee;return ee=e(A.minus(V),Y,0,1),I=I.plus(ee.times(B)),V=V.plus(ee.times(Y)),I.s=B.s=P.s,x=x*2,W=e(B,Y,x,a).minus(P).abs().comparedTo(e(I,V,x,a).minus(P).abs())<1?[B,Y]:[I,V],d=E,W},i.toNumber=function(){return+C(this)},i.toPrecision=function(A,H){return A!=null&&xi(A,1,As),k(this,A,H,2)},i.toString=function(A){var H,V=this,Y=V.s,ee=V.e;return ee===null?Y?(H="Infinity",Y<0&&(H="-"+H)):H="NaN":(A==null?H=ee<=c||ee>=l?cA(jc(V.c),ee):yf(jc(V.c),ee,"0"):A===10&&T?(V=$(new b(V),o+ee+1,a),H=yf(jc(V.c),V.e,"0")):(xi(A,2,_.length,"Base"),H=n(yf(jc(V.c),ee,"0"),10,A,Y,!0)),Y<0&&V.c[0]&&(H="-"+H)),H},i.valueOf=i.toJSON=function(){return C(this)},i._isBigNumber=!0,i[Symbol.toStringTag]="BigNumber",i[Symbol.for("nodejs.util.inspect.custom")]=i.valueOf,t!=null&&b.set(t),b}function qc(t){var e=t|0;return t>0||t===e?e:e-1}function jc(t){for(var e,n,r=1,i=t.length,s=t[0]+"";r<i;){for(e=t[r++]+"",n=kn-e.length;n--;e="0"+e);s+=e}for(i=s.length;s.charCodeAt(--i)===48;);return s.slice(0,i+1||1)}function Tm(t,e){var n,r,i=t.c,s=e.c,o=t.s,a=e.s,c=t.e,l=e.e;if(!o||!a)return null;if(n=i&&!i[0],r=s&&!s[0],n||r)return n?r?0:-a:o;if(o!=a)return o;if(n=o<0,r=c==l,!i||!s)return r?0:!i^n?1:-1;if(!r)return c>l^n?1:-1;for(a=(c=i.length)<(l=s.length)?c:l,o=0;o<a;o++)if(i[o]!=s[o])return i[o]>s[o]^n?1:-1;return c==l?0:c>l^n?1:-1}function xi(t,e,n,r){if(t<e||t>n||t!==Vc(t))throw Error(oa+(r||"Argument")+(typeof t=="number"?t<e||t>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function aA(t){var e=t.c.length-1;return qc(t.e/kn)==e&&t.c[e]%2!=0}function cA(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function yf(t,e,n){var r,i;if(e<0){for(i=n+".";++e;i+=n);t=i+t}else if(r=t.length,++e>r){for(i=n,e-=r;--e;i+=n);t+=i}else e<r&&(t=t.slice(0,e)+"."+t.slice(e));return t}var lA=Ete();const hr={bigNumber(t){return new lA(t)},multiply(t,e){if(t===void 0||e===void 0)return lA(0);const n=new lA(t),r=new lA(e);return n.multipliedBy(r)},formatNumberToLocalString(t,e=2){return t===void 0?"0.00":typeof t=="number"?t.toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e}):parseFloat(t).toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e})}},L7e={numericInputKeyDown(t,e,n){const r=["Backspace","Meta","Ctrl","a","A","c","C","x","X","v","V","ArrowLeft","ArrowRight","Tab"],i=t.metaKey||t.ctrlKey,s=t.key,o=s.toLocaleLowerCase(),a=o==="a",c=o==="c",l=o==="v",u=o==="x",d=s===",",h=s===".",g=s>="0"&&s<="9";!i&&(a||c||l||u)&&t.preventDefault(),e==="0"&&!d&&!h&&s==="0"&&t.preventDefault(),e==="0"&&g&&(n(s),t.preventDefault()),(d||h)&&(e||(n("0."),t.preventDefault()),(e!=null&&e.includes(".")||e!=null&&e.includes(","))&&t.preventDefault()),!g&&!r.includes(s)&&!h&&!d&&t.preventDefault()}},U7e=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}],GB={URLS:{FAQ:"https://walletconnect.com/faq"}},Bi={WC_NAME_SUFFIX:".wcn.id",BLOCKCHAIN_API_RPC_URL:"https://rpc.walletconnect.org",PULSE_API_URL:"https://pulse.walletconnect.org",W3M_API_URL:"https://api.web3modal.org",CHAIN:{EVM:"evm",SOLANA:"solana"},CHAIN_NAME:{EVM:"Ethereum",SOLANA:"Solana"}};function Wp(t,e){return e==="light"?{"--w3m-accent":(t==null?void 0:t["--w3m-accent"])||"hsla(231, 100%, 70%, 1)","--w3m-background":"#fff"}:{"--w3m-accent":(t==null?void 0:t["--w3m-accent"])||"hsla(230, 100%, 67%, 1)","--w3m-background":"#121313"}}const bk="https://secure.walletconnect.org",Cte=[{label:"Coinbase",name:"coinbase",feeRange:"1-2%",url:""}],os={FOUR_MINUTES_MS:24e4,TEN_SEC_MS:1e4,ONE_SEC_MS:1e3,SECURE_SITE:bk,SECURE_SITE_DASHBOARD:`${bk}/dashboard`,SECURE_SITE_FAVICON:`${bk}/images/favicon.png`,RESTRICTED_TIMEZONES:["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],WC_COINBASE_PAY_SDK_CHAINS:["ethereum","arbitrum","polygon","avalanche-c-chain","optimism","celo","base"],WC_COINBASE_PAY_SDK_FALLBACK_CHAIN:"ethereum",WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP:{Ethereum:"ethereum","Arbitrum One":"arbitrum",Polygon:"polygon",Avalanche:"avalanche-c-chain","OP Mainnet":"optimism",Celo:"celo",Base:"base"},WC_COINBASE_ONRAMP_APP_ID:"bf18c88d-495a-463b-b249-0b9d3656cf5e",SWAP_SUGGESTED_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP"],SWAP_POPULAR_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP","METAL","DAI","CHAMP","WOLF","SALE","BAL","BUSD","MUST","BTCpx","ROUTE","HEX","WELT","amDAI","VSQ","VISION","AURUM","pSP","SNX","VC","LINK","CHP","amUSDT","SPHERE","FOX","GIDDY","GFC","OMEN","OX_OLD","DE","WNT"],SWAP_SUPPORTED_NETWORKS:["eip155:1","eip155:42161","eip155:10","eip155:324","eip155:8453","eip155:56","eip155:137","eip155:100","eip155:43114","eip155:250","eip155:8217","eip155:1313161554"],NATIVE_TOKEN_ADDRESS:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",CONVERT_SLIPPAGE_TOLERANCE:1},st={isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},checkCaipNetwork(t,e=""){return t==null?void 0:t.id.toLocaleLowerCase().includes(e.toLowerCase())},isAndroid(){const t=window.navigator.userAgent.toLowerCase();return st.isMobile()&&t.includes("android")},isIos(){const t=window.navigator.userAgent.toLowerCase();return st.isMobile()&&(t.includes("iphone")||t.includes("ipad"))},isClient(){return typeof window<"u"},isPairingExpired(t){return t?t-Date.now()<=os.TEN_SEC_MS:!0},isAllowedRetry(t){return Date.now()-t>=os.ONE_SEC_MS},copyToClopboard(t){navigator.clipboard.writeText(t)},getPairingExpiry(){return Date.now()+os.FOUR_MINUTES_MS},getNetworkId(t){return t==null?void 0:t.split(":")[1]},getPlainAddress(t){return t==null?void 0:t.split(":")[2]},async wait(t){return new Promise(e=>{setTimeout(e,t)})},debounce(t,e=500){let n;return(...r)=>{function i(){t(...r)}n&&clearTimeout(n),n=setTimeout(i,e)}},isHttpUrl(t){return t.startsWith("http://")||t.startsWith("https://")},formatNativeUrl(t,e){if(st.isHttpUrl(t))return this.formatUniversalUrl(t,e);let n=t;n.includes("://")||(n=t.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`);const r=encodeURIComponent(e);return{redirect:`${n}wc?uri=${r}`,href:n}},formatUniversalUrl(t,e){if(!st.isHttpUrl(t))return this.formatNativeUrl(t,e);let n=t;n.endsWith("/")||(n=`${n}/`);const r=encodeURIComponent(e);return{redirect:`${n}wc?uri=${r}`,href:n}},openHref(t,e,n){window.open(t,e,n||"noreferrer noopener")},returnOpenHref(t,e,n){return window.open(t,e,n||"noreferrer noopener")},async preloadImage(t){const e=new Promise((n,r)=>{const i=new Image;i.onload=n,i.onerror=r,i.crossOrigin="anonymous",i.src=t});return Promise.race([e,st.wait(2e3)])},formatBalance(t,e){var r;let n;if(t==="0")n="0.000";else if(typeof t=="string"){const i=Number(t);i&&(n=(r=i.toString().match(/^-?\d+(?:\.\d{0,3})?/u))==null?void 0:r[0])}return n?`${n} ${e??""}`:`0.000 ${e??""}`},formatBalance2(t,e){var r;let n;if(t==="0")n="0";else if(typeof t=="string"){const i=Number(t);i&&(n=(r=i.toString().match(/^-?\d+(?:\.\d{0,3})?/u))==null?void 0:r[0])}return{value:n??"0",rest:n==="0"?"000":"",symbol:e}},getApiUrl(){return Bi.W3M_API_URL},getBlockchainApiUrl(){return Bi.BLOCKCHAIN_API_RPC_URL},getAnalyticsUrl(){return Bi.PULSE_API_URL},getUUID(){return crypto!=null&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})},parseError(t){var e,n;return typeof t=="string"?t:typeof((n=(e=t==null?void 0:t.issues)==null?void 0:e[0])==null?void 0:n.message)=="string"?t.issues[0].message:t instanceof Error?t.message:"Unknown error"},sortRequestedNetworks(t,e=[]){const n={};return e&&t&&(t.forEach((r,i)=>{n[r]=i}),e.sort((r,i)=>{const s=n[r.id],o=n[i.id];return s!==void 0&&o!==void 0?s-o:s!==void 0?-1:o!==void 0?1:0})),e},calculateBalance(t){let e=0;for(const n of t)e+=n.value??0;return e},formatTokenBalance(t){const e=t.toFixed(2),[n,r]=e.split(".");return{dollars:n,pennies:r}},isAddress(t){if(/^(?:0x)?[0-9a-f]{40}$/iu.test(t)){if(/^(?:0x)?[0-9a-f]{40}$/iu.test(t)||/^(?:0x)?[0-9A-F]{40}$/iu.test(t))return!0}else return!1;return!1},uniqueBy(t,e){const n=new Set;return t.filter(r=>{const i=r[e];return n.has(i)?!1:(n.add(i),!0)})}};async function F2(...t){const e=await fetch(...t);if(!e.ok)throw new Error(`HTTP status code: ${e.status}`,{cause:e});return e}class r9{constructor({baseUrl:e,clientId:n}){this.baseUrl=e,this.clientId=n}async get({headers:e,signal:n,cache:r,...i}){const s=this.createUrl(i);return(await F2(s,{method:"GET",headers:e,signal:n,cache:r})).json()}async getBlob({headers:e,signal:n,...r}){const i=this.createUrl(r);return(await F2(i,{method:"GET",headers:e,signal:n})).blob()}async post({body:e,headers:n,signal:r,...i}){const s=this.createUrl(i);return(await F2(s,{method:"POST",headers:n,body:e?JSON.stringify(e):void 0,signal:r})).json()}async put({body:e,headers:n,signal:r,...i}){const s=this.createUrl(i);return(await F2(s,{method:"PUT",headers:n,body:e?JSON.stringify(e):void 0,signal:r})).json()}async delete({body:e,headers:n,signal:r,...i}){const s=this.createUrl(i);return(await F2(s,{method:"DELETE",headers:n,body:e?JSON.stringify(e):void 0,signal:r})).json()}createUrl({path:e,params:n}){const r=new URL(e,this.baseUrl);return n&&Object.entries(n).forEach(([i,s])=>{s&&r.searchParams.append(i,s)}),this.clientId&&r.searchParams.append("clientId",this.clientId),r}}const xk="WALLETCONNECT_DEEPLINK_CHOICE",PV="@w3m/recent",_k="@w3m/connected_wallet_image_url",OV="@w3m/connected_connector",DV="@w3m/connected_social",F7e="@w3m-storage/SOCIAL_USERNAME",er={setWalletConnectDeepLink({href:t,name:e}){try{localStorage.setItem(xk,JSON.stringify({href:t,name:e}))}catch{console.info("Unable to set WalletConnect deep link")}},getWalletConnectDeepLink(){try{const t=localStorage.getItem(xk);if(t)return JSON.parse(t)}catch{console.info("Unable to get WalletConnect deep link")}},deleteWalletConnectDeepLink(){try{localStorage.removeItem(xk)}catch{console.info("Unable to delete WalletConnect deep link")}},setWeb3ModalRecent(t){try{const e=er.getRecentWallets();e.find(r=>r.id===t.id)||(e.unshift(t),e.length>2&&e.pop(),localStorage.setItem(PV,JSON.stringify(e)))}catch{console.info("Unable to set Web3Modal recent")}},getRecentWallets(){try{const t=localStorage.getItem(PV);return t?JSON.parse(t):[]}catch{console.info("Unable to get Web3Modal recent")}return[]},setConnectedWalletImageUrl(t){try{localStorage.setItem(_k,t)}catch{console.info("Unable to set Connected Wallet Image Url")}},removeConnectedWalletImageUrl(){try{localStorage.removeItem(_k)}catch{console.info("Unable to remove Connected Wallet Image Url")}},getConnectedWalletImageUrl(){try{return localStorage.getItem(_k)}catch{console.info("Unable to set Connected Wallet Image Url")}},setConnectedConnector(t){try{localStorage.setItem(OV,t)}catch{console.info("Unable to set Connected Connector")}},getConnectedConnector(){try{return localStorage.getItem(OV)}catch{console.info("Unable to get Connected Connector")}},setConnectedSocialProvider(t){try{localStorage.setItem(DV,t)}catch{console.info("Unable to set Connected Social Provider")}},getConnectedSocialProvider(){try{return localStorage.getItem(DV)}catch{console.info("Unable to get Connected Social Provider")}},getConnectedSocialUsername(){try{return localStorage.getItem(F7e)}catch{console.info("Unable to get Connected Social Username")}}},Lc=Li({walletImages:{},networkImages:{},chainImages:{},connectorImages:{},tokenImages:{},currencyImages:{}}),Rs={state:Lc,subscribeNetworkImages(t){return Bo(Lc.networkImages,()=>t(Lc.networkImages))},subscribeKey(t,e){return $a(Lc,t,e)},subscribe(t){return Bo(Lc,()=>t(Lc))},setWalletImage(t,e){Lc.walletImages[t]=e},setNetworkImage(t,e){Lc.networkImages[t]=e},setChainImage(t,e){Lc.chainImages[t]=e},setConnectorImage(t,e){Lc.connectorImages[t]=e},setTokenImage(t,e){Lc.tokenImages[t]=e},setCurrencyImage(t,e){Lc.currencyImages[t]=e}},vf=Li({themeMode:"dark",themeVariables:{},w3mThemeVariables:void 0}),Oi={state:vf,subscribe(t){return Bo(vf,()=>t(vf))},setThemeMode(t){vf.themeMode=t;try{const e=Pt.getAuthConnector();if(e){const n=Oi.getSnapshot().themeVariables;e.provider.syncTheme({themeMode:t,themeVariables:n,w3mThemeVariables:Wp(n,t)})}}catch{console.info("Unable to sync theme to auth connector")}},setThemeVariables(t){vf.themeVariables={...vf.themeVariables,...t};try{const e=Pt.getAuthConnector();if(e){const n=Oi.getSnapshot().themeVariables;e.provider.syncTheme({themeVariables:n,w3mThemeVariables:Wp(vf.themeVariables,vf.themeMode)})}}catch{console.info("Unable to sync theme to auth connector")}},getSnapshot(){return vte(vf)}},Uc=Li({connectors:[]}),Pt={state:Uc,subscribeKey(t,e){return $a(Uc,t,e)},setConnectors(t,e){e?(Uc.connectors=[...Uc.connectors,...t.map(n=>wg(n))],Uc.connectors=this.mergeMultiChainConnectors(Uc.connectors)):Uc.connectors=t.map(n=>wg(n))},mergeMultiChainConnectors(t){const e=[];return t.forEach(n=>{const{name:r,chain:i,type:s}=n,o=e.findIndex(a=>a.name===r);if(o===-1)e.push({...n});else{const a=e[o];a&&((a==null?void 0:a.chain)===i||a.type===s?e.push({...n}):a.type==="MULTI_CHAIN"?e.push({...n}):e[o]={...a,type:"MULTI_CHAIN",providers:[a,n]})}}),e},addConnector(t){var e,n;if(Uc.connectors.push(wg(t)),t.id==="w3mAuth"){const r=t,i=vte(pt.state),s=Oi.getSnapshot().themeMode,o=Oi.getSnapshot().themeVariables;(n=(e=r==null?void 0:r.provider)==null?void 0:e.syncDappData)==null||n.call(e,{metadata:i.metadata,sdkVersion:i.sdkVersion,projectId:i.projectId}),r.provider.syncTheme({themeMode:s,themeVariables:o,w3mThemeVariables:Wp(o,s)})}},getAuthConnector(){return Uc.connectors.find(t=>t.type==="AUTH")},getAnnouncedConnectorRdns(){return Uc.connectors.filter(t=>t.type==="ANNOUNCED").map(t=>{var e;return(e=t.info)==null?void 0:e.rdns})},getConnectors(){return Uc.connectors},getConnector(t,e){return Uc.connectors.find(n=>{var r;return n.explorerId===t||((r=n.info)==null?void 0:r.rdns)===e})}},z2=Li({loading:!1,open:!1,selectedNetworkId:void 0,activeChain:void 0}),Xf={state:z2,subscribe(t){return Bo(z2,()=>t(z2))},set(t){Object.assign(z2,{...z2,...t})}},z7e=st.getAnalyticsUrl(),H7e=new r9({baseUrl:z7e,clientId:null}),W7e=["MODAL_CREATED"],Sw=Li({timestamp:Date.now(),data:{type:"track",event:"MODAL_CREATED"}}),wt={state:Sw,subscribe(t){return Bo(Sw,()=>t(Sw))},_getApiHeaders(){const{projectId:t,sdkType:e,sdkVersion:n}=pt.state;return{"x-project-id":t,"x-sdk-type":e,"x-sdk-version":n}},async _sendAnalyticsEvent(t){try{if(W7e.includes(t.data.event)||typeof window>"u")return;await H7e.post({path:"/e",headers:wt._getApiHeaders(),body:{eventId:st.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:t.timestamp,props:t.data}})}catch{}},sendEvent(t){Sw.timestamp=Date.now(),Sw.data=t,pt.state.enableAnalytics&&wt._sendAnalyticsEvent(Sw)}};var Ste={exports:{}},Tte={};/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var yv=ce;function V7e(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var q7e=typeof Object.is=="function"?Object.is:V7e,G7e=yv.useState,K7e=yv.useEffect,Y7e=yv.useLayoutEffect,Q7e=yv.useDebugValue;function Z7e(t,e){var n=e(),r=G7e({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return Y7e(function(){i.value=n,i.getSnapshot=e,Ak(i)&&s({inst:i})},[t,n,e]),K7e(function(){return Ak(i)&&s({inst:i}),t(function(){Ak(i)&&s({inst:i})})},[t]),Q7e(n),n}function Ak(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!q7e(t,n)}catch{return!0}}function J7e(t,e){return e()}var X7e=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?J7e:Z7e;Tte.useSyncExternalStore=yv.useSyncExternalStore!==void 0?yv.useSyncExternalStore:X7e;Ste.exports=Tte;var eIe=Ste.exports;const tIe={isConnected:!1,currentTab:0,tokenBalance:[],smartAccountDeployed:!1,addressLabels:new Map,allAccounts:[]},nIe={supportsAllNetworks:!0,isDefaultCaipNetwork:!1,smartAccountEnabledNetworks:[]},rr=Li({multiChainEnabled:!1,chains:k7e(),activeChain:void 0,activeCaipNetwork:void 0}),Qe={state:rr,subscribeKey(t,e){return $a(rr,t,e)},subscribeChain(t){let e;const n=rr.activeChain;return n?Bo(rr.chains,()=>{const r=rr.chains.get(n);(!e||e!==r)&&(e=r,t(r))}):()=>{}},subscribeChainProp(t,e){let n;const r=rr.activeChain;return r?Bo(rr.chains,()=>{var s;const i=(s=rr.chains.get(r))==null?void 0:s[t];n!==i&&(n=i,e(i))}):()=>{}},initialize(t){var n;const e=(n=t==null?void 0:t[0])==null?void 0:n.chain;if(!e)throw new Error("Chain is required to initialize ChainController");rr.activeChain=e,t.forEach(r=>{rr.chains.set(r.chain,{chain:r.chain,connectionControllerClient:r.connectionControllerClient,networkControllerClient:r.networkControllerClient,accountState:tIe,networkState:nIe})})},setMultiChainEnabled(t){rr.multiChainEnabled=t},setChainNetworkData(t,e){if(!t)throw new Error("Chain is required to update chain network data");const n=rr.chains.get(t);n&&(n.networkState={...n.networkState,...e},rr.chains.set(t,n),rt.replaceState(n.networkState))},setChainAccountData(t,e){if(!t)throw new Error("Chain is required to update chain account data");const n=rr.chains.get(t);n&&(n.accountState={...n.accountState,...e},rr.chains.set(t,n),Ne.replaceState(n.accountState))},setAccountProp(t,e,n){this.setChainAccountData(rr.multiChainEnabled?n:rr.activeChain,{[t]:e})},setActiveChain(t){var n,r,i;const e=t?rr.chains.get(t):void 0;e&&(rr.activeChain=e.chain,rr.activeCaipNetwork=(i=(r=(n=rr.chains.get(e.chain))==null?void 0:n.networkState)==null?void 0:r.requestedCaipNetworks)==null?void 0:i[0],Xf.set({activeChain:t}))},setActiveConnector(t){t&&(rr.activeConnector=wg(t))},getNetworkControllerClient(){const t=rr.activeChain;if(!t)throw new Error("Chain is required to get network controller client");const e=rr.chains.get(t);if(!e)throw new Error("Chain adapter not found");if(!e.networkControllerClient)throw new Error("NetworkController client not set");return e.networkControllerClient},getConnectionControllerClient(){const t=rr.activeChain;if(!t)throw new Error("Chain is required to get connection controller client");const e=rr.chains.get(t);if(!e)throw new Error("Chain adapter not found");if(!e.connectionControllerClient)throw new Error("ConnectionController client not set");return e.connectionControllerClient},getAccountProp(t){var r;const e=(rr.multiChainEnabled,rr.activeChain);if(!e)return;const n=(r=rr.chains.get(e))==null?void 0:r.accountState;if(n)return n[t]},getNetworkProp(t){var r;const e=(rr.multiChainEnabled,rr.activeChain);if(!e)return;const n=(r=rr.chains.get(e))==null?void 0:r.networkState;if(n)return n[t]},resetAccount(t){const e=rr.multiChainEnabled?t:rr.activeChain;if(!e)throw new Error("Chain is required to set account prop");this.setChainAccountData(e,{isConnected:!1,smartAccountDeployed:!1,currentTab:0,caipAddress:void 0,address:void 0,balance:void 0,balanceSymbol:void 0,profileName:void 0,profileImage:void 0,addressExplorerUrl:void 0,tokenBalance:[],connectedWalletInfo:void 0,preferredAccountType:void 0,socialProvider:void 0,socialWindow:void 0,farcasterUrl:void 0})}},MV=Li({supportsAllNetworks:!0,isDefaultCaipNetwork:!1,smartAccountEnabledNetworks:[]}),rt={state:MV,replaceState(t){Object.assign(MV,t)},subscribeKey(t,e){let n;return Qe.subscribeChainProp("networkState",r=>{if(r){const i=r[t];n!==i&&(n=i,e(i))}})},_getClient(){return Qe.getNetworkControllerClient()},initializeDefaultNetwork(){const t=this.getRequestedCaipNetworks();t.length>0&&this.setCaipNetwork(t[0])},setCaipNetwork(t){var n,r;const e=Qe.state.multiChainEnabled?t==null?void 0:t.chain:Qe.state.activeChain;if(!e)throw new Error("chain is required to set active network");if(!t)throw new Error("caipNetwork is required to set active network");Qe.state.activeCaipNetwork=t,Qe.state.activeChain=e,Qe.setChainNetworkData(e,{caipNetwork:t}),Xf.set({activeChain:e,selectedNetworkId:t==null?void 0:t.id}),(r=(n=Qe.state.chains.get(e))==null?void 0:n.networkState)!=null&&r.allowUnsupportedChain||this.checkIfSupportedNetwork()||this.showUnsupportedChainUI()},setDefaultCaipNetwork(t,e){const n=Qe.state.multiChainEnabled?e:Qe.state.activeChain;if(!n)throw new Error("chain is required to set default network");Qe.state.activeCaipNetwork=t,Qe.state.activeChain=n,Qe.setChainNetworkData(n,{caipNetwork:t,isDefaultCaipNetwork:!0}),Xf.set({selectedNetworkId:t==null?void 0:t.id,activeChain:e})},setRequestedCaipNetworks(t,e){Qe.setChainNetworkData(Qe.state.multiChainEnabled?e:Qe.state.activeChain,{requestedCaipNetworks:t})},setAllowUnsupportedChain(t,e){Qe.setChainNetworkData(e||Qe.state.activeChain,{allowUnsupportedChain:t})},setSmartAccountEnabledNetworks(t,e){Qe.setChainNetworkData(Qe.state.multiChainEnabled?e:Qe.state.activeChain,{smartAccountEnabledNetworks:t})},getRequestedCaipNetworks(t){let e;if(!Qe.state.activeChain)throw new Error("activeChain is required to get requested networks");if(t){const s=Qe.state.multiChainEnabled?t:Qe.state.activeChain;if(!s)throw new Error("chain is required to get requested networks");e=[s]}else e=Qe.state.multiChainEnabled?[...Qe.state.chains.keys()]:[Qe.state.activeChain];const n=[],r=[];return e.forEach(s=>{var o,a,c,l,u,d,h,g;(a=(o=Qe.state.chains.get(s))==null?void 0:o.networkState)!=null&&a.approvedCaipNetworkIds&&n.push(...((l=(c=Qe.state.chains.get(s))==null?void 0:c.networkState)==null?void 0:l.approvedCaipNetworkIds)||[]),(d=(u=Qe.state.chains.get(s))==null?void 0:u.networkState)!=null&&d.requestedCaipNetworks&&r.push(...((g=(h=Qe.state.chains.get(s))==null?void 0:h.networkState)==null?void 0:g.requestedCaipNetworks)||[])}),st.sortRequestedNetworks(n,r)},async switchActiveNetwork(t){await Qe.getNetworkControllerClient().switchCaipNetwork(t);const n=Qe.state.multiChainEnabled?t==null?void 0:t.chain:Qe.state.activeChain;if(!n)throw new Error("chain is required to switch active network");if(!t)throw new Error("network is required to switch active network");Qe.state.activeCaipNetwork=t,Qe.state.activeChain=n,Qe.setChainNetworkData(n,{caipNetwork:t}),Xf.set({activeChain:n,selectedNetworkId:t.id}),t&&wt.sendEvent({type:"track",event:"SWITCH_NETWORK",properties:{network:t.id}})},getApprovedCaipNetworkIds(t){var n,r;if(t){const i=Qe.state.multiChainEnabled?t:Qe.state.activeChain;if(!i)throw new Error("chain is required to get approved network IDs");return(r=(n=Qe.state.chains.get(i))==null?void 0:n.networkState)==null?void 0:r.approvedCaipNetworkIds}const e=[];return Object.values(Qe.state.chains).forEach(i=>{var s;i.networkState.approvedCaipNetworkIds&&e.push(...((s=i.networkState)==null?void 0:s.approvedCaipNetworkIds)||[])}),e},async setApprovedCaipNetworksData(t){const n=await Qe.getNetworkControllerClient().getApprovedCaipNetworksData(),r=Qe.state.multiChainEnabled?t:Qe.state.activeChain;if(!r)throw new Error("chain is required to set approved network data");Qe.setChainNetworkData(r,{approvedCaipNetworkIds:n==null?void 0:n.approvedCaipNetworkIds,supportsAllNetworks:(n==null?void 0:n.supportsAllNetworks)||!1})},checkIfSupportedNetwork(){var r,i;const t=Qe.state.activeChain;if(!t)return!1;const e=(i=(r=Qe.state.chains.get(t))==null?void 0:r.networkState)==null?void 0:i.caipNetwork,n=this.getRequestedCaipNetworks();return n==null?void 0:n.some(s=>s.id===(e==null?void 0:e.id))},checkIfSmartAccountEnabled(){var r,i,s;const t=zl.caipNetworkIdToNumber((r=Qe.state.activeCaipNetwork)==null?void 0:r.id),e=Qe.state.activeChain;if(!e)throw new Error("activeChain is required to check if smart account is enabled");if(!t)return!1;const n=((s=(i=Qe.state.chains.get(e))==null?void 0:i.networkState)==null?void 0:s.smartAccountEnabledNetworks)||[];return!!(n!=null&&n.includes(t))},resetNetwork(){var e,n;const t=Qe.state.activeChain;if(!t)throw new Error("chain is required to reset network");(n=(e=Qe.state.chains.get(t))==null?void 0:e.networkState)!=null&&n.isDefaultCaipNetwork||Qe.setChainNetworkData(t,{caipNetwork:void 0}),Qe.setChainNetworkData(t,{approvedCaipNetworkIds:void 0,supportsAllNetworks:!0,smartAccountEnabledNetworks:[]})},getSupportsAllNetworks(){var e,n;const t=(Qe.state.multiChainEnabled,Qe.state.activeChain);if(!t)throw new Error("chain is required to check if network supports all networks");return(n=(e=Qe.state.chains.get(t))==null?void 0:e.networkState)==null?void 0:n.supportsAllNetworks},showUnsupportedChainUI(){setTimeout(()=>{dn.open({view:"UnsupportedChain"})},300)}},rIe=st.getApiUrl(),so=new r9({baseUrl:rIe,clientId:null}),iIe="40",BV="4",Es=Li({page:1,count:0,featured:[],recommended:[],wallets:[],search:[],isAnalyticsEnabled:!1,excludedRDNS:[]}),Qt={state:Es,subscribeKey(t,e){return $a(Es,t,e)},_getApiHeaders(){const{projectId:t,sdkType:e,sdkVersion:n}=pt.state;return{"x-project-id":t,"x-sdk-type":e,"x-sdk-version":n}},_filterOutExtensions(t){return pt.state.isUniversalProvider?t.filter(e=>!!(e.mobile_link||e.desktop_link||e.webapp_link)):t},async _fetchWalletImage(t){const e=`${so.baseUrl}/getWalletImage/${t}`,n=await so.getBlob({path:e,headers:Qt._getApiHeaders()});Rs.setWalletImage(t,URL.createObjectURL(n))},async _fetchNetworkImage(t){const e=`${so.baseUrl}/public/getAssetImage/${t}`,n=await so.getBlob({path:e,headers:Qt._getApiHeaders()});Rs.setNetworkImage(t,URL.createObjectURL(n))},async _fetchConnectorImage(t){const e=`${so.baseUrl}/public/getAssetImage/${t}`,n=await so.getBlob({path:e,headers:Qt._getApiHeaders()});Rs.setConnectorImage(t,URL.createObjectURL(n))},async _fetchCurrencyImage(t){const e=`${so.baseUrl}/public/getCurrencyImage/${t}`,n=await so.getBlob({path:e,headers:Qt._getApiHeaders()});Rs.setCurrencyImage(t,URL.createObjectURL(n))},async _fetchTokenImage(t){const e=`${so.baseUrl}/public/getTokenImage/${t}`,n=await so.getBlob({path:e,headers:Qt._getApiHeaders()});Rs.setTokenImage(t,URL.createObjectURL(n))},async fetchNetworkImages(){const t=rt.getRequestedCaipNetworks(),e=t==null?void 0:t.map(({imageId:n})=>n).filter(Boolean);e&&await Promise.allSettled(e.map(n=>Qt._fetchNetworkImage(n)))},async fetchConnectorImages(){const{connectors:t}=Pt.state,e=t.map(({imageId:n})=>n).filter(Boolean);await Promise.allSettled(e.map(n=>Qt._fetchConnectorImage(n)))},async fetchCurrencyImages(t=[]){await Promise.allSettled(t.map(e=>Qt._fetchCurrencyImage(e)))},async fetchTokenImages(t=[]){await Promise.allSettled(t.map(e=>Qt._fetchTokenImage(e)))},async fetchFeaturedWallets(){const{featuredWalletIds:t}=pt.state;if(t!=null&&t.length){const{data:e}=await so.get({path:"/getWallets",headers:Qt._getApiHeaders(),params:{page:"1",entries:t!=null&&t.length?String(t.length):BV,include:t==null?void 0:t.join(",")}});e.sort((r,i)=>t.indexOf(r.id)-t.indexOf(i.id));const n=e.map(r=>r.image_id).filter(Boolean);await Promise.allSettled(n.map(r=>Qt._fetchWalletImage(r))),Es.featured=e}},async fetchRecommendedWallets(){var l;const{includeWalletIds:t,excludeWalletIds:e,featuredWalletIds:n}=pt.state,r=[...e??[],...n??[]].filter(Boolean),{data:i,count:s}=await so.get({path:"/getWallets",headers:Qt._getApiHeaders(),params:{page:"1",chains:(l=rt.state.caipNetwork)==null?void 0:l.id,entries:BV,include:t==null?void 0:t.join(","),exclude:r==null?void 0:r.join(",")}}),o=er.getRecentWallets(),a=i.map(u=>u.image_id).filter(Boolean),c=o.map(u=>u.image_id).filter(Boolean);await Promise.allSettled([...a,...c].map(u=>Qt._fetchWalletImage(u))),Es.recommended=i,Es.count=s??0},async fetchWallets({page:t}){var c;const{includeWalletIds:e,excludeWalletIds:n,featuredWalletIds:r}=pt.state,i=[...Es.recommended.map(({id:l})=>l),...n??[],...r??[]].filter(Boolean),{data:s,count:o}=await so.get({path:"/getWallets",headers:Qt._getApiHeaders(),params:{page:String(t),entries:iIe,chains:(c=rt.state.caipNetwork)==null?void 0:c.id,include:e==null?void 0:e.join(","),exclude:i.join(",")}}),a=s.map(l=>l.image_id).filter(Boolean);await Promise.allSettled([...a.map(l=>Qt._fetchWalletImage(l)),st.wait(300)]),Es.wallets=st.uniqueBy([...Es.wallets,...Qt._filterOutExtensions(s)],"id"),Es.count=o>Es.count?o:Es.count,Es.page=t},async searchWalletByIds({ids:t}){var n;const{data:e}=await so.get({path:"/getWallets",headers:Qt._getApiHeaders(),params:{page:"1",entries:String(t.length),chains:(n=rt.state.caipNetwork)==null?void 0:n.id,include:t==null?void 0:t.join(",")}});e&&e.forEach(r=>{r!=null&&r.rdns&&Es.excludedRDNS.push(r.rdns)})},async searchWallet({search:t}){var s;const{includeWalletIds:e,excludeWalletIds:n}=pt.state;Es.search=[];const{data:r}=await so.get({path:"/getWallets",headers:Qt._getApiHeaders(),params:{page:"1",entries:"100",search:t==null?void 0:t.trim(),chains:(s=rt.state.caipNetwork)==null?void 0:s.id,include:e==null?void 0:e.join(","),exclude:n==null?void 0:n.join(",")}}),i=r.map(o=>o.image_id).filter(Boolean);await Promise.allSettled([...i.map(o=>Qt._fetchWalletImage(o)),st.wait(300)]),Es.search=Qt._filterOutExtensions(r)},async reFetchWallets(){Es.page=1,Es.wallets=[],await Qt.fetchFeaturedWallets(),await Qt.fetchRecommendedWallets()},prefetch(){const t=[Qt.fetchFeaturedWallets(),Qt.fetchRecommendedWallets(),Qt.fetchNetworkImages(),Qt.fetchConnectorImages()];pt.state.enableAnalytics===void 0&&t.push(Qt.fetchAnalyticsConfig()),Es.prefetchPromise=Promise.race([Promise.allSettled(t),st.wait(3e3)])},async fetchAnalyticsConfig(){const{isAnalyticsEnabled:t}=await so.get({path:"/getAnalyticsConfig",headers:Qt._getApiHeaders()});pt.setEnableAnalytics(t)}},Hi=Li({projectId:"",sdkType:"w3m",sdkVersion:"html-wagmi-undefined"}),pt={state:Hi,subscribeKey(t,e){return $a(Hi,t,e)},setProjectId(t){Hi.projectId=t},setAllWallets(t){Hi.allWallets=t},setIncludeWalletIds(t){Hi.includeWalletIds=t},setExcludeWalletIds(t){Hi.excludeWalletIds=t,t&&Qt.searchWalletByIds({ids:t})},setFeaturedWalletIds(t){Hi.featuredWalletIds=t},setTokens(t){Hi.tokens=t},setTermsConditionsUrl(t){Hi.termsConditionsUrl=t},setPrivacyPolicyUrl(t){Hi.privacyPolicyUrl=t},setCustomWallets(t){Hi.customWallets=t},setIsSiweEnabled(t){Hi.isSiweEnabled=t},setIsUniversalProvider(t){Hi.isUniversalProvider=t},setEnableAnalytics(t){Hi.enableAnalytics=t},setSdkVersion(t){Hi.sdkVersion=t},setMetadata(t){Hi.metadata=t},setOnrampEnabled(t){Hi.enableOnramp=t},setDisableAppend(t){Hi.disableAppend=t},setEIP6963Enabled(t){Hi.enableEIP6963=t},setHasMultipleAddresses(t){Hi.hasMultipleAddresses=t},setEnableSwaps(t){Hi.enableSwaps=t}},sIe={purchaseCurrencies:[{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"Ether",symbol:"ETH",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]}],paymentCurrencies:[{id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},{id:"EUR",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]}]},Ite=st.getBlockchainApiUrl(),ns=Li({clientId:null,api:new r9({baseUrl:Ite,clientId:null})}),wi={state:ns,fetchIdentity({address:t}){return ns.api.get({path:`/v1/identity/${t}`,params:{projectId:pt.state.projectId}})},fetchTransactions({account:t,projectId:e,cursor:n,onramp:r,signal:i,cache:s}){const o=n?{cursor:n}:{};return ns.api.get({path:`/v1/account/${t}/history?projectId=${e}${r?`&onramp=${r}`:""}`,params:o,signal:i,cache:s})},fetchSwapQuote({projectId:t,amount:e,userAddress:n,from:r,to:i,gasPrice:s}){return ns.api.get({path:"/v1/convert/quotes",headers:{"Content-Type":"application/json"},params:{projectId:t,amount:e,userAddress:n,from:r,to:i,gasPrice:s}})},fetchSwapTokens({projectId:t,chainId:e}){return ns.api.get({path:`/v1/convert/tokens?projectId=${t}&chainId=${e}`})},fetchTokenPrice({projectId:t,addresses:e}){return ns.api.post({path:"/v1/fungible/price",body:{projectId:t,currency:"usd",addresses:e},headers:{"Content-Type":"application/json"}})},fetchSwapAllowance({projectId:t,tokenAddress:e,userAddress:n}){const{sdkType:r,sdkVersion:i}=pt.state;return ns.api.get({path:`/v1/convert/allowance?projectId=${t}&tokenAddress=${e}&userAddress=${n}`,headers:{"Content-Type":"application/json","x-sdk-type":r,"x-sdk-version":i}})},fetchGasPrice({projectId:t,chainId:e}){const{sdkType:n,sdkVersion:r}=pt.state;return ns.api.get({path:"/v1/convert/gas-price",headers:{"Content-Type":"application/json","x-sdk-type":n,"x-sdk-version":r},params:{projectId:t,chainId:e}})},generateSwapCalldata({amount:t,from:e,projectId:n,to:r,userAddress:i}){return ns.api.post({path:"/v1/convert/build-transaction",headers:{"Content-Type":"application/json"},body:{amount:t,eip155:{slippage:os.CONVERT_SLIPPAGE_TOLERANCE},from:e,projectId:n,to:r,userAddress:i}})},generateApproveCalldata({from:t,projectId:e,to:n,userAddress:r}){const{sdkType:i,sdkVersion:s}=pt.state;return ns.api.get({path:"/v1/convert/build-approve",headers:{"Content-Type":"application/json","x-sdk-type":i,"x-sdk-version":s},params:{projectId:e,userAddress:r,from:t,to:n}})},async getBalance(t,e,n){const{sdkType:r,sdkVersion:i}=pt.state;return ns.api.get({path:`/v1/account/${t}/balance`,headers:{"x-sdk-type":r,"x-sdk-version":i},params:{currency:"usd",projectId:pt.state.projectId,chainId:e,forceUpdate:n}})},async lookupEnsName(t){return ns.api.get({path:`/v1/profile/account/${t}${Bi.WC_NAME_SUFFIX}?projectId=${pt.state.projectId}`})},async reverseLookupEnsName({address:t}){return ns.api.get({path:`/v1/profile/reverse/${t}?projectId=${pt.state.projectId}`})},async getEnsNameSuggestions(t){return ns.api.get({path:`/v1/profile/suggestions/${t}?projectId=${pt.state.projectId}`})},async registerEnsName({coinType:t,address:e,message:n,signature:r}){return ns.api.post({path:"/v1/profile/account",body:{coin_type:t,address:e,message:n,signature:r},headers:{"Content-Type":"application/json"}})},async generateOnRampURL({destinationWallets:t,partnerUserId:e,defaultNetwork:n,purchaseAmount:r,paymentAmount:i}){return(await ns.api.post({path:`/v1/generators/onrampurl?projectId=${pt.state.projectId}`,body:{destinationWallets:t,defaultNetwork:n,partnerUserId:e,defaultExperience:"buy",presetCryptoAmount:r,presetFiatAmount:i}})).url},async getOnrampOptions(){try{return await ns.api.get({path:`/v1/onramp/options?projectId=${pt.state.projectId}`})}catch{return sIe}},async getOnrampQuote({purchaseCurrency:t,paymentCurrency:e,amount:n,network:r}){try{return await ns.api.post({path:`/v1/onramp/quote?projectId=${pt.state.projectId}`,body:{purchaseCurrency:t,paymentCurrency:e,amount:n,network:r}})}catch{return{coinbaseFee:{amount:n,currency:e.id},networkFee:{amount:n,currency:e.id},paymentSubtotal:{amount:n,currency:e.id},paymentTotal:{amount:n,currency:e.id},purchaseAmount:{amount:n,currency:e.id},quoteId:"mocked-quote-id"}}},setClientId(t){ns.clientId=t,ns.api=new r9({baseUrl:Ite,clientId:t})}},Fc=Li({message:"",variant:"success",open:!1}),Ht={state:Fc,subscribeKey(t,e){return $a(Fc,t,e)},showLoading(t){Fc.message=t,Fc.variant="loading",Fc.open=!0},showSuccess(t){Fc.message=t,Fc.variant="success",Fc.open=!0},showError(t){const e=st.parseError(t);Fc.message=e,Fc.variant="error",Fc.open=!0},hide(){Fc.open=!1}};var kte={},i9={};i9.byteLength=cIe;i9.toByteArray=uIe;i9.fromByteArray=hIe;var ed=[],Zc=[],oIe=typeof Uint8Array<"u"?Uint8Array:Array,Ek="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Tw=0,aIe=Ek.length;Tw<aIe;++Tw)ed[Tw]=Ek[Tw],Zc[Ek.charCodeAt(Tw)]=Tw;Zc[45]=62;Zc[95]=63;function Rte(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function cIe(t){var e=Rte(t),n=e[0],r=e[1];return(n+r)*3/4-r}function lIe(t,e,n){return(e+n)*3/4-n}function uIe(t){var e,n=Rte(t),r=n[0],i=n[1],s=new oIe(lIe(t,r,i)),o=0,a=i>0?r-4:r,c;for(c=0;c<a;c+=4)e=Zc[t.charCodeAt(c)]<<18|Zc[t.charCodeAt(c+1)]<<12|Zc[t.charCodeAt(c+2)]<<6|Zc[t.charCodeAt(c+3)],s[o++]=e>>16&255,s[o++]=e>>8&255,s[o++]=e&255;return i===2&&(e=Zc[t.charCodeAt(c)]<<2|Zc[t.charCodeAt(c+1)]>>4,s[o++]=e&255),i===1&&(e=Zc[t.charCodeAt(c)]<<10|Zc[t.charCodeAt(c+1)]<<4|Zc[t.charCodeAt(c+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function dIe(t){return ed[t>>18&63]+ed[t>>12&63]+ed[t>>6&63]+ed[t&63]}function fIe(t,e,n){for(var r,i=[],s=e;s<n;s+=3)r=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),i.push(dIe(r));return i.join("")}function hIe(t){for(var e,n=t.length,r=n%3,i=[],s=16383,o=0,a=n-r;o<a;o+=s)i.push(fIe(t,o,o+s>a?a:o+s));return r===1?(e=t[n-1],i.push(ed[e>>2]+ed[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(ed[e>>10]+ed[e>>4&63]+ed[e<<2&63]+"=")),i.join("")}var KB={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */KB.read=function(t,e,n,r,i){var s,o,a=i*8-r-1,c=(1<<a)-1,l=c>>1,u=-7,d=n?i-1:0,h=n?-1:1,g=t[e+d];for(d+=h,s=g&(1<<-u)-1,g>>=-u,u+=a;u>0;s=s*256+t[e+d],d+=h,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=r;u>0;o=o*256+t[e+d],d+=h,u-=8);if(s===0)s=1-l;else{if(s===c)return o?NaN:(g?-1:1)*(1/0);o=o+Math.pow(2,r),s=s-l}return(g?-1:1)*o*Math.pow(2,s-r)};KB.write=function(t,e,n,r,i,s){var o,a,c,l=s*8-i-1,u=(1<<l)-1,d=u>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=r?0:s-1,w=r?1:-1,v=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+d>=1?e+=h/c:e+=h*Math.pow(2,1-d),e*c>=2&&(o++,c/=2),o+d>=u?(a=0,o=u):o+d>=1?(a=(e*c-1)*Math.pow(2,i),o=o+d):(a=e*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;t[n+g]=a&255,g+=w,a/=256,i-=8);for(o=o<<i|a,l+=i;l>0;t[n+g]=o&255,g+=w,o/=256,l-=8);t[n+g-w]|=v*128};/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */(function(t){const e=i9,n=KB,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=b,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=s(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const X=new Uint8Array(1),U={foo:function(){return 42}};return Object.setPrototypeOf(U,Uint8Array.prototype),Object.setPrototypeOf(X,U),X.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(X){if(X>i)throw new RangeError('The value "'+X+'" is invalid for option "size"');const U=new Uint8Array(X);return Object.setPrototypeOf(U,a.prototype),U}function a(X,U,G){if(typeof X=="number"){if(typeof U=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(X)}return c(X,U,G)}a.poolSize=8192;function c(X,U,G){if(typeof X=="string")return h(X,U);if(ArrayBuffer.isView(X))return w(X);if(X==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X);if(He(X,ArrayBuffer)||X&&He(X.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(He(X,SharedArrayBuffer)||X&&He(X.buffer,SharedArrayBuffer)))return v(X,U,G);if(typeof X=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const ie=X.valueOf&&X.valueOf();if(ie!=null&&ie!==X)return a.from(ie,U,G);const fe=_(X);if(fe)return fe;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof X[Symbol.toPrimitive]=="function")return a.from(X[Symbol.toPrimitive]("string"),U,G);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X)}a.from=function(X,U,G){return c(X,U,G)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function l(X){if(typeof X!="number")throw new TypeError('"size" argument must be of type number');if(X<0)throw new RangeError('The value "'+X+'" is invalid for option "size"')}function u(X,U,G){return l(X),X<=0?o(X):U!==void 0?typeof G=="string"?o(X).fill(U,G):o(X).fill(U):o(X)}a.alloc=function(X,U,G){return u(X,U,G)};function d(X){return l(X),o(X<0?0:T(X)|0)}a.allocUnsafe=function(X){return d(X)},a.allocUnsafeSlow=function(X){return d(X)};function h(X,U){if((typeof U!="string"||U==="")&&(U="utf8"),!a.isEncoding(U))throw new TypeError("Unknown encoding: "+U);const G=k(X,U)|0;let ie=o(G);const fe=ie.write(X,U);return fe!==G&&(ie=ie.slice(0,fe)),ie}function g(X){const U=X.length<0?0:T(X.length)|0,G=o(U);for(let ie=0;ie<U;ie+=1)G[ie]=X[ie]&255;return G}function w(X){if(He(X,Uint8Array)){const U=new Uint8Array(X);return v(U.buffer,U.byteOffset,U.byteLength)}return g(X)}function v(X,U,G){if(U<0||X.byteLength<U)throw new RangeError('"offset" is outside of buffer bounds');if(X.byteLength<U+(G||0))throw new RangeError('"length" is outside of buffer bounds');let ie;return U===void 0&&G===void 0?ie=new Uint8Array(X):G===void 0?ie=new Uint8Array(X,U):ie=new Uint8Array(X,U,G),Object.setPrototypeOf(ie,a.prototype),ie}function _(X){if(a.isBuffer(X)){const U=T(X.length)|0,G=o(U);return G.length===0||X.copy(G,0,0,U),G}if(X.length!==void 0)return typeof X.length!="number"||ct(X.length)?o(0):g(X);if(X.type==="Buffer"&&Array.isArray(X.data))return g(X.data)}function T(X){if(X>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return X|0}function b(X){return+X!=X&&(X=0),a.alloc(+X)}a.isBuffer=function(U){return U!=null&&U._isBuffer===!0&&U!==a.prototype},a.compare=function(U,G){if(He(U,Uint8Array)&&(U=a.from(U,U.offset,U.byteLength)),He(G,Uint8Array)&&(G=a.from(G,G.offset,G.byteLength)),!a.isBuffer(U)||!a.isBuffer(G))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(U===G)return 0;let ie=U.length,fe=G.length;for(let we=0,Re=Math.min(ie,fe);we<Re;++we)if(U[we]!==G[we]){ie=U[we],fe=G[we];break}return ie<fe?-1:fe<ie?1:0},a.isEncoding=function(U){switch(String(U).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(U,G){if(!Array.isArray(U))throw new TypeError('"list" argument must be an Array of Buffers');if(U.length===0)return a.alloc(0);let ie;if(G===void 0)for(G=0,ie=0;ie<U.length;++ie)G+=U[ie].length;const fe=a.allocUnsafe(G);let we=0;for(ie=0;ie<U.length;++ie){let Re=U[ie];if(He(Re,Uint8Array))we+Re.length>fe.length?(a.isBuffer(Re)||(Re=a.from(Re)),Re.copy(fe,we)):Uint8Array.prototype.set.call(fe,Re,we);else if(a.isBuffer(Re))Re.copy(fe,we);else throw new TypeError('"list" argument must be an Array of Buffers');we+=Re.length}return fe};function k(X,U){if(a.isBuffer(X))return X.length;if(ArrayBuffer.isView(X)||He(X,ArrayBuffer))return X.byteLength;if(typeof X!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof X);const G=X.length,ie=arguments.length>2&&arguments[2]===!0;if(!ie&&G===0)return 0;let fe=!1;for(;;)switch(U){case"ascii":case"latin1":case"binary":return G;case"utf8":case"utf-8":return je(X).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G*2;case"hex":return G>>>1;case"base64":return ut(X).length;default:if(fe)return ie?-1:je(X).length;U=(""+U).toLowerCase(),fe=!0}}a.byteLength=k;function D(X,U,G){let ie=!1;if((U===void 0||U<0)&&(U=0),U>this.length||((G===void 0||G>this.length)&&(G=this.length),G<=0)||(G>>>=0,U>>>=0,G<=U))return"";for(X||(X="utf8");;)switch(X){case"hex":return W(this,U,G);case"utf8":case"utf-8":return E(this,U,G);case"ascii":return B(this,U,G);case"latin1":case"binary":return M(this,U,G);case"base64":return x(this,U,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,U,G);default:if(ie)throw new TypeError("Unknown encoding: "+X);X=(X+"").toLowerCase(),ie=!0}}a.prototype._isBuffer=!0;function O(X,U,G){const ie=X[U];X[U]=X[G],X[G]=ie}a.prototype.swap16=function(){const U=this.length;if(U%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let G=0;G<U;G+=2)O(this,G,G+1);return this},a.prototype.swap32=function(){const U=this.length;if(U%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let G=0;G<U;G+=4)O(this,G,G+3),O(this,G+1,G+2);return this},a.prototype.swap64=function(){const U=this.length;if(U%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let G=0;G<U;G+=8)O(this,G,G+7),O(this,G+1,G+6),O(this,G+2,G+5),O(this,G+3,G+4);return this},a.prototype.toString=function(){const U=this.length;return U===0?"":arguments.length===0?E(this,0,U):D.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(U){if(!a.isBuffer(U))throw new TypeError("Argument must be a Buffer");return this===U?!0:a.compare(this,U)===0},a.prototype.inspect=function(){let U="";const G=t.INSPECT_MAX_BYTES;return U=this.toString("hex",0,G).replace(/(.{2})/g,"$1 ").trim(),this.length>G&&(U+=" ... "),"<Buffer "+U+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(U,G,ie,fe,we){if(He(U,Uint8Array)&&(U=a.from(U,U.offset,U.byteLength)),!a.isBuffer(U))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof U);if(G===void 0&&(G=0),ie===void 0&&(ie=U?U.length:0),fe===void 0&&(fe=0),we===void 0&&(we=this.length),G<0||ie>U.length||fe<0||we>this.length)throw new RangeError("out of range index");if(fe>=we&&G>=ie)return 0;if(fe>=we)return-1;if(G>=ie)return 1;if(G>>>=0,ie>>>=0,fe>>>=0,we>>>=0,this===U)return 0;let Re=we-fe,Ge=ie-G;const nt=Math.min(Re,Ge),nn=this.slice(fe,we),Ct=U.slice(G,ie);for(let St=0;St<nt;++St)if(nn[St]!==Ct[St]){Re=nn[St],Ge=Ct[St];break}return Re<Ge?-1:Ge<Re?1:0};function $(X,U,G,ie,fe){if(X.length===0)return-1;if(typeof G=="string"?(ie=G,G=0):G>2147483647?G=2147483647:G<-2147483648&&(G=-2147483648),G=+G,ct(G)&&(G=fe?0:X.length-1),G<0&&(G=X.length+G),G>=X.length){if(fe)return-1;G=X.length-1}else if(G<0)if(fe)G=0;else return-1;if(typeof U=="string"&&(U=a.from(U,ie)),a.isBuffer(U))return U.length===0?-1:C(X,U,G,ie,fe);if(typeof U=="number")return U=U&255,typeof Uint8Array.prototype.indexOf=="function"?fe?Uint8Array.prototype.indexOf.call(X,U,G):Uint8Array.prototype.lastIndexOf.call(X,U,G):C(X,[U],G,ie,fe);throw new TypeError("val must be string, number or Buffer")}function C(X,U,G,ie,fe){let we=1,Re=X.length,Ge=U.length;if(ie!==void 0&&(ie=String(ie).toLowerCase(),ie==="ucs2"||ie==="ucs-2"||ie==="utf16le"||ie==="utf-16le")){if(X.length<2||U.length<2)return-1;we=2,Re/=2,Ge/=2,G/=2}function nt(Ct,St){return we===1?Ct[St]:Ct.readUInt16BE(St*we)}let nn;if(fe){let Ct=-1;for(nn=G;nn<Re;nn++)if(nt(X,nn)===nt(U,Ct===-1?0:nn-Ct)){if(Ct===-1&&(Ct=nn),nn-Ct+1===Ge)return Ct*we}else Ct!==-1&&(nn-=nn-Ct),Ct=-1}else for(G+Ge>Re&&(G=Re-Ge),nn=G;nn>=0;nn--){let Ct=!0;for(let St=0;St<Ge;St++)if(nt(X,nn+St)!==nt(U,St)){Ct=!1;break}if(Ct)return nn}return-1}a.prototype.includes=function(U,G,ie){return this.indexOf(U,G,ie)!==-1},a.prototype.indexOf=function(U,G,ie){return $(this,U,G,ie,!0)},a.prototype.lastIndexOf=function(U,G,ie){return $(this,U,G,ie,!1)};function A(X,U,G,ie){G=Number(G)||0;const fe=X.length-G;ie?(ie=Number(ie),ie>fe&&(ie=fe)):ie=fe;const we=U.length;ie>we/2&&(ie=we/2);let Re;for(Re=0;Re<ie;++Re){const Ge=parseInt(U.substr(Re*2,2),16);if(ct(Ge))return Re;X[G+Re]=Ge}return Re}function H(X,U,G,ie){return ft(je(U,X.length-G),X,G,ie)}function V(X,U,G,ie){return ft(Vt(U),X,G,ie)}function Y(X,U,G,ie){return ft(ut(U),X,G,ie)}function ee(X,U,G,ie){return ft(vt(U,X.length-G),X,G,ie)}a.prototype.write=function(U,G,ie,fe){if(G===void 0)fe="utf8",ie=this.length,G=0;else if(ie===void 0&&typeof G=="string")fe=G,ie=this.length,G=0;else if(isFinite(G))G=G>>>0,isFinite(ie)?(ie=ie>>>0,fe===void 0&&(fe="utf8")):(fe=ie,ie=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const we=this.length-G;if((ie===void 0||ie>we)&&(ie=we),U.length>0&&(ie<0||G<0)||G>this.length)throw new RangeError("Attempt to write outside buffer bounds");fe||(fe="utf8");let Re=!1;for(;;)switch(fe){case"hex":return A(this,U,G,ie);case"utf8":case"utf-8":return H(this,U,G,ie);case"ascii":case"latin1":case"binary":return V(this,U,G,ie);case"base64":return Y(this,U,G,ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee(this,U,G,ie);default:if(Re)throw new TypeError("Unknown encoding: "+fe);fe=(""+fe).toLowerCase(),Re=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(X,U,G){return U===0&&G===X.length?e.fromByteArray(X):e.fromByteArray(X.slice(U,G))}function E(X,U,G){G=Math.min(X.length,G);const ie=[];let fe=U;for(;fe<G;){const we=X[fe];let Re=null,Ge=we>239?4:we>223?3:we>191?2:1;if(fe+Ge<=G){let nt,nn,Ct,St;switch(Ge){case 1:we<128&&(Re=we);break;case 2:nt=X[fe+1],(nt&192)===128&&(St=(we&31)<<6|nt&63,St>127&&(Re=St));break;case 3:nt=X[fe+1],nn=X[fe+2],(nt&192)===128&&(nn&192)===128&&(St=(we&15)<<12|(nt&63)<<6|nn&63,St>2047&&(St<55296||St>57343)&&(Re=St));break;case 4:nt=X[fe+1],nn=X[fe+2],Ct=X[fe+3],(nt&192)===128&&(nn&192)===128&&(Ct&192)===128&&(St=(we&15)<<18|(nt&63)<<12|(nn&63)<<6|Ct&63,St>65535&&St<1114112&&(Re=St))}}Re===null?(Re=65533,Ge=1):Re>65535&&(Re-=65536,ie.push(Re>>>10&1023|55296),Re=56320|Re&1023),ie.push(Re),fe+=Ge}return I(ie)}const y=4096;function I(X){const U=X.length;if(U<=y)return String.fromCharCode.apply(String,X);let G="",ie=0;for(;ie<U;)G+=String.fromCharCode.apply(String,X.slice(ie,ie+=y));return G}function B(X,U,G){let ie="";G=Math.min(X.length,G);for(let fe=U;fe<G;++fe)ie+=String.fromCharCode(X[fe]&127);return ie}function M(X,U,G){let ie="";G=Math.min(X.length,G);for(let fe=U;fe<G;++fe)ie+=String.fromCharCode(X[fe]);return ie}function W(X,U,G){const ie=X.length;(!U||U<0)&&(U=0),(!G||G<0||G>ie)&&(G=ie);let fe="";for(let we=U;we<G;++we)fe+=Gt[X[we]];return fe}function z(X,U,G){const ie=X.slice(U,G);let fe="";for(let we=0;we<ie.length-1;we+=2)fe+=String.fromCharCode(ie[we]+ie[we+1]*256);return fe}a.prototype.slice=function(U,G){const ie=this.length;U=~~U,G=G===void 0?ie:~~G,U<0?(U+=ie,U<0&&(U=0)):U>ie&&(U=ie),G<0?(G+=ie,G<0&&(G=0)):G>ie&&(G=ie),G<U&&(G=U);const fe=this.subarray(U,G);return Object.setPrototypeOf(fe,a.prototype),fe};function P(X,U,G){if(X%1!==0||X<0)throw new RangeError("offset is not uint");if(X+U>G)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(U,G,ie){U=U>>>0,G=G>>>0,ie||P(U,G,this.length);let fe=this[U],we=1,Re=0;for(;++Re<G&&(we*=256);)fe+=this[U+Re]*we;return fe},a.prototype.readUintBE=a.prototype.readUIntBE=function(U,G,ie){U=U>>>0,G=G>>>0,ie||P(U,G,this.length);let fe=this[U+--G],we=1;for(;G>0&&(we*=256);)fe+=this[U+--G]*we;return fe},a.prototype.readUint8=a.prototype.readUInt8=function(U,G){return U=U>>>0,G||P(U,1,this.length),this[U]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(U,G){return U=U>>>0,G||P(U,2,this.length),this[U]|this[U+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(U,G){return U=U>>>0,G||P(U,2,this.length),this[U]<<8|this[U+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(U,G){return U=U>>>0,G||P(U,4,this.length),(this[U]|this[U+1]<<8|this[U+2]<<16)+this[U+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(U,G){return U=U>>>0,G||P(U,4,this.length),this[U]*16777216+(this[U+1]<<16|this[U+2]<<8|this[U+3])},a.prototype.readBigUInt64LE=ot(function(U){U=U>>>0,Se(U,"offset");const G=this[U],ie=this[U+7];(G===void 0||ie===void 0)&&Ie(U,this.length-8);const fe=G+this[++U]*2**8+this[++U]*2**16+this[++U]*2**24,we=this[++U]+this[++U]*2**8+this[++U]*2**16+ie*2**24;return BigInt(fe)+(BigInt(we)<<BigInt(32))}),a.prototype.readBigUInt64BE=ot(function(U){U=U>>>0,Se(U,"offset");const G=this[U],ie=this[U+7];(G===void 0||ie===void 0)&&Ie(U,this.length-8);const fe=G*2**24+this[++U]*2**16+this[++U]*2**8+this[++U],we=this[++U]*2**24+this[++U]*2**16+this[++U]*2**8+ie;return(BigInt(fe)<<BigInt(32))+BigInt(we)}),a.prototype.readIntLE=function(U,G,ie){U=U>>>0,G=G>>>0,ie||P(U,G,this.length);let fe=this[U],we=1,Re=0;for(;++Re<G&&(we*=256);)fe+=this[U+Re]*we;return we*=128,fe>=we&&(fe-=Math.pow(2,8*G)),fe},a.prototype.readIntBE=function(U,G,ie){U=U>>>0,G=G>>>0,ie||P(U,G,this.length);let fe=G,we=1,Re=this[U+--fe];for(;fe>0&&(we*=256);)Re+=this[U+--fe]*we;return we*=128,Re>=we&&(Re-=Math.pow(2,8*G)),Re},a.prototype.readInt8=function(U,G){return U=U>>>0,G||P(U,1,this.length),this[U]&128?(255-this[U]+1)*-1:this[U]},a.prototype.readInt16LE=function(U,G){U=U>>>0,G||P(U,2,this.length);const ie=this[U]|this[U+1]<<8;return ie&32768?ie|4294901760:ie},a.prototype.readInt16BE=function(U,G){U=U>>>0,G||P(U,2,this.length);const ie=this[U+1]|this[U]<<8;return ie&32768?ie|4294901760:ie},a.prototype.readInt32LE=function(U,G){return U=U>>>0,G||P(U,4,this.length),this[U]|this[U+1]<<8|this[U+2]<<16|this[U+3]<<24},a.prototype.readInt32BE=function(U,G){return U=U>>>0,G||P(U,4,this.length),this[U]<<24|this[U+1]<<16|this[U+2]<<8|this[U+3]},a.prototype.readBigInt64LE=ot(function(U){U=U>>>0,Se(U,"offset");const G=this[U],ie=this[U+7];(G===void 0||ie===void 0)&&Ie(U,this.length-8);const fe=this[U+4]+this[U+5]*2**8+this[U+6]*2**16+(ie<<24);return(BigInt(fe)<<BigInt(32))+BigInt(G+this[++U]*2**8+this[++U]*2**16+this[++U]*2**24)}),a.prototype.readBigInt64BE=ot(function(U){U=U>>>0,Se(U,"offset");const G=this[U],ie=this[U+7];(G===void 0||ie===void 0)&&Ie(U,this.length-8);const fe=(G<<24)+this[++U]*2**16+this[++U]*2**8+this[++U];return(BigInt(fe)<<BigInt(32))+BigInt(this[++U]*2**24+this[++U]*2**16+this[++U]*2**8+ie)}),a.prototype.readFloatLE=function(U,G){return U=U>>>0,G||P(U,4,this.length),n.read(this,U,!0,23,4)},a.prototype.readFloatBE=function(U,G){return U=U>>>0,G||P(U,4,this.length),n.read(this,U,!1,23,4)},a.prototype.readDoubleLE=function(U,G){return U=U>>>0,G||P(U,8,this.length),n.read(this,U,!0,52,8)},a.prototype.readDoubleBE=function(U,G){return U=U>>>0,G||P(U,8,this.length),n.read(this,U,!1,52,8)};function Z(X,U,G,ie,fe,we){if(!a.isBuffer(X))throw new TypeError('"buffer" argument must be a Buffer instance');if(U>fe||U<we)throw new RangeError('"value" argument is out of bounds');if(G+ie>X.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(U,G,ie,fe){if(U=+U,G=G>>>0,ie=ie>>>0,!fe){const Ge=Math.pow(2,8*ie)-1;Z(this,U,G,ie,Ge,0)}let we=1,Re=0;for(this[G]=U&255;++Re<ie&&(we*=256);)this[G+Re]=U/we&255;return G+ie},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(U,G,ie,fe){if(U=+U,G=G>>>0,ie=ie>>>0,!fe){const Ge=Math.pow(2,8*ie)-1;Z(this,U,G,ie,Ge,0)}let we=ie-1,Re=1;for(this[G+we]=U&255;--we>=0&&(Re*=256);)this[G+we]=U/Re&255;return G+ie},a.prototype.writeUint8=a.prototype.writeUInt8=function(U,G,ie){return U=+U,G=G>>>0,ie||Z(this,U,G,1,255,0),this[G]=U&255,G+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(U,G,ie){return U=+U,G=G>>>0,ie||Z(this,U,G,2,65535,0),this[G]=U&255,this[G+1]=U>>>8,G+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(U,G,ie){return U=+U,G=G>>>0,ie||Z(this,U,G,2,65535,0),this[G]=U>>>8,this[G+1]=U&255,G+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(U,G,ie){return U=+U,G=G>>>0,ie||Z(this,U,G,4,4294967295,0),this[G+3]=U>>>24,this[G+2]=U>>>16,this[G+1]=U>>>8,this[G]=U&255,G+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(U,G,ie){return U=+U,G=G>>>0,ie||Z(this,U,G,4,4294967295,0),this[G]=U>>>24,this[G+1]=U>>>16,this[G+2]=U>>>8,this[G+3]=U&255,G+4};function he(X,U,G,ie,fe){be(U,ie,fe,X,G,7);let we=Number(U&BigInt(4294967295));X[G++]=we,we=we>>8,X[G++]=we,we=we>>8,X[G++]=we,we=we>>8,X[G++]=we;let Re=Number(U>>BigInt(32)&BigInt(4294967295));return X[G++]=Re,Re=Re>>8,X[G++]=Re,Re=Re>>8,X[G++]=Re,Re=Re>>8,X[G++]=Re,G}function ve(X,U,G,ie,fe){be(U,ie,fe,X,G,7);let we=Number(U&BigInt(4294967295));X[G+7]=we,we=we>>8,X[G+6]=we,we=we>>8,X[G+5]=we,we=we>>8,X[G+4]=we;let Re=Number(U>>BigInt(32)&BigInt(4294967295));return X[G+3]=Re,Re=Re>>8,X[G+2]=Re,Re=Re>>8,X[G+1]=Re,Re=Re>>8,X[G]=Re,G+8}a.prototype.writeBigUInt64LE=ot(function(U,G=0){return he(this,U,G,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=ot(function(U,G=0){return ve(this,U,G,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(U,G,ie,fe){if(U=+U,G=G>>>0,!fe){const nt=Math.pow(2,8*ie-1);Z(this,U,G,ie,nt-1,-nt)}let we=0,Re=1,Ge=0;for(this[G]=U&255;++we<ie&&(Re*=256);)U<0&&Ge===0&&this[G+we-1]!==0&&(Ge=1),this[G+we]=(U/Re>>0)-Ge&255;return G+ie},a.prototype.writeIntBE=function(U,G,ie,fe){if(U=+U,G=G>>>0,!fe){const nt=Math.pow(2,8*ie-1);Z(this,U,G,ie,nt-1,-nt)}let we=ie-1,Re=1,Ge=0;for(this[G+we]=U&255;--we>=0&&(Re*=256);)U<0&&Ge===0&&this[G+we+1]!==0&&(Ge=1),this[G+we]=(U/Re>>0)-Ge&255;return G+ie},a.prototype.writeInt8=function(U,G,ie){return U=+U,G=G>>>0,ie||Z(this,U,G,1,127,-128),U<0&&(U=255+U+1),this[G]=U&255,G+1},a.prototype.writeInt16LE=function(U,G,ie){return U=+U,G=G>>>0,ie||Z(this,U,G,2,32767,-32768),this[G]=U&255,this[G+1]=U>>>8,G+2},a.prototype.writeInt16BE=function(U,G,ie){return U=+U,G=G>>>0,ie||Z(this,U,G,2,32767,-32768),this[G]=U>>>8,this[G+1]=U&255,G+2},a.prototype.writeInt32LE=function(U,G,ie){return U=+U,G=G>>>0,ie||Z(this,U,G,4,2147483647,-2147483648),this[G]=U&255,this[G+1]=U>>>8,this[G+2]=U>>>16,this[G+3]=U>>>24,G+4},a.prototype.writeInt32BE=function(U,G,ie){return U=+U,G=G>>>0,ie||Z(this,U,G,4,2147483647,-2147483648),U<0&&(U=4294967295+U+1),this[G]=U>>>24,this[G+1]=U>>>16,this[G+2]=U>>>8,this[G+3]=U&255,G+4},a.prototype.writeBigInt64LE=ot(function(U,G=0){return he(this,U,G,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=ot(function(U,G=0){return ve(this,U,G,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function j(X,U,G,ie,fe,we){if(G+ie>X.length)throw new RangeError("Index out of range");if(G<0)throw new RangeError("Index out of range")}function ge(X,U,G,ie,fe){return U=+U,G=G>>>0,fe||j(X,U,G,4),n.write(X,U,G,ie,23,4),G+4}a.prototype.writeFloatLE=function(U,G,ie){return ge(this,U,G,!0,ie)},a.prototype.writeFloatBE=function(U,G,ie){return ge(this,U,G,!1,ie)};function te(X,U,G,ie,fe){return U=+U,G=G>>>0,fe||j(X,U,G,8),n.write(X,U,G,ie,52,8),G+8}a.prototype.writeDoubleLE=function(U,G,ie){return te(this,U,G,!0,ie)},a.prototype.writeDoubleBE=function(U,G,ie){return te(this,U,G,!1,ie)},a.prototype.copy=function(U,G,ie,fe){if(!a.isBuffer(U))throw new TypeError("argument should be a Buffer");if(ie||(ie=0),!fe&&fe!==0&&(fe=this.length),G>=U.length&&(G=U.length),G||(G=0),fe>0&&fe<ie&&(fe=ie),fe===ie||U.length===0||this.length===0)return 0;if(G<0)throw new RangeError("targetStart out of bounds");if(ie<0||ie>=this.length)throw new RangeError("Index out of range");if(fe<0)throw new RangeError("sourceEnd out of bounds");fe>this.length&&(fe=this.length),U.length-G<fe-ie&&(fe=U.length-G+ie);const we=fe-ie;return this===U&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(G,ie,fe):Uint8Array.prototype.set.call(U,this.subarray(ie,fe),G),we},a.prototype.fill=function(U,G,ie,fe){if(typeof U=="string"){if(typeof G=="string"?(fe=G,G=0,ie=this.length):typeof ie=="string"&&(fe=ie,ie=this.length),fe!==void 0&&typeof fe!="string")throw new TypeError("encoding must be a string");if(typeof fe=="string"&&!a.isEncoding(fe))throw new TypeError("Unknown encoding: "+fe);if(U.length===1){const Re=U.charCodeAt(0);(fe==="utf8"&&Re<128||fe==="latin1")&&(U=Re)}}else typeof U=="number"?U=U&255:typeof U=="boolean"&&(U=Number(U));if(G<0||this.length<G||this.length<ie)throw new RangeError("Out of range index");if(ie<=G)return this;G=G>>>0,ie=ie===void 0?this.length:ie>>>0,U||(U=0);let we;if(typeof U=="number")for(we=G;we<ie;++we)this[we]=U;else{const Re=a.isBuffer(U)?U:a.from(U,fe),Ge=Re.length;if(Ge===0)throw new TypeError('The value "'+U+'" is invalid for argument "value"');for(we=0;we<ie-G;++we)this[we+G]=Re[we%Ge]}return this};const ae={};function se(X,U,G){ae[X]=class extends G{constructor(){super(),Object.defineProperty(this,"message",{value:U.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${X}]`,this.stack,delete this.name}get code(){return X}set code(fe){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:fe,writable:!0})}toString(){return`${this.name} [${X}]: ${this.message}`}}}se("ERR_BUFFER_OUT_OF_BOUNDS",function(X){return X?`${X} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),se("ERR_INVALID_ARG_TYPE",function(X,U){return`The "${X}" argument must be of type number. Received type ${typeof U}`},TypeError),se("ERR_OUT_OF_RANGE",function(X,U,G){let ie=`The value of "${X}" is out of range.`,fe=G;return Number.isInteger(G)&&Math.abs(G)>2**32?fe=L(String(G)):typeof G=="bigint"&&(fe=String(G),(G>BigInt(2)**BigInt(32)||G<-(BigInt(2)**BigInt(32)))&&(fe=L(fe)),fe+="n"),ie+=` It must be ${U}. Received ${fe}`,ie},RangeError);function L(X){let U="",G=X.length;const ie=X[0]==="-"?1:0;for(;G>=ie+4;G-=3)U=`_${X.slice(G-3,G)}${U}`;return`${X.slice(0,G)}${U}`}function re(X,U,G){Se(U,"offset"),(X[U]===void 0||X[U+G]===void 0)&&Ie(U,X.length-(G+1))}function be(X,U,G,ie,fe,we){if(X>G||X<U){const Re=typeof U=="bigint"?"n":"";let Ge;throw U===0||U===BigInt(0)?Ge=`>= 0${Re} and < 2${Re} ** ${(we+1)*8}${Re}`:Ge=`>= -(2${Re} ** ${(we+1)*8-1}${Re}) and < 2 ** ${(we+1)*8-1}${Re}`,new ae.ERR_OUT_OF_RANGE("value",Ge,X)}re(ie,fe,we)}function Se(X,U){if(typeof X!="number")throw new ae.ERR_INVALID_ARG_TYPE(U,"number",X)}function Ie(X,U,G){throw Math.floor(X)!==X?(Se(X,G),new ae.ERR_OUT_OF_RANGE("offset","an integer",X)):U<0?new ae.ERR_BUFFER_OUT_OF_BOUNDS:new ae.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${U}`,X)}const Ue=/[^+/0-9A-Za-z-_]/g;function lt(X){if(X=X.split("=")[0],X=X.trim().replace(Ue,""),X.length<2)return"";for(;X.length%4!==0;)X=X+"=";return X}function je(X,U){U=U||1/0;let G;const ie=X.length;let fe=null;const we=[];for(let Re=0;Re<ie;++Re){if(G=X.charCodeAt(Re),G>55295&&G<57344){if(!fe){if(G>56319){(U-=3)>-1&&we.push(239,191,189);continue}else if(Re+1===ie){(U-=3)>-1&&we.push(239,191,189);continue}fe=G;continue}if(G<56320){(U-=3)>-1&&we.push(239,191,189),fe=G;continue}G=(fe-55296<<10|G-56320)+65536}else fe&&(U-=3)>-1&&we.push(239,191,189);if(fe=null,G<128){if((U-=1)<0)break;we.push(G)}else if(G<2048){if((U-=2)<0)break;we.push(G>>6|192,G&63|128)}else if(G<65536){if((U-=3)<0)break;we.push(G>>12|224,G>>6&63|128,G&63|128)}else if(G<1114112){if((U-=4)<0)break;we.push(G>>18|240,G>>12&63|128,G>>6&63|128,G&63|128)}else throw new Error("Invalid code point")}return we}function Vt(X){const U=[];for(let G=0;G<X.length;++G)U.push(X.charCodeAt(G)&255);return U}function vt(X,U){let G,ie,fe;const we=[];for(let Re=0;Re<X.length&&!((U-=2)<0);++Re)G=X.charCodeAt(Re),ie=G>>8,fe=G%256,we.push(fe),we.push(ie);return we}function ut(X){return e.toByteArray(lt(X))}function ft(X,U,G,ie){let fe;for(fe=0;fe<ie&&!(fe+G>=U.length||fe>=X.length);++fe)U[fe+G]=X[fe];return fe}function He(X,U){return X instanceof U||X!=null&&X.constructor!=null&&X.constructor.name!=null&&X.constructor.name===U.name}function ct(X){return X!==X}const Gt=function(){const X="0123456789abcdef",U=new Array(256);for(let G=0;G<16;++G){const ie=G*16;for(let fe=0;fe<16;++fe)U[ie+fe]=X[G]+X[fe]}return U}();function ot(X){return typeof BigInt>"u"?qe:X}function qe(){throw new Error("BigInt not supported")}})(kte);var NK;typeof window<"u"&&(window.Buffer||(window.Buffer=kte.Buffer),window.global||(window.global=window),window.process||(window.process={}),(NK=window.process)!=null&&NK.env||(window.process={env:{}}));var Nte={};const pIe=Nte.NEXT_PUBLIC_SECURE_SITE_SDK_URL||"https://secure.walletconnect.org/sdk",mIe=Nte.NEXT_PUBLIC_DEFAULT_LOG_LEVEL||"error",Ye={APP_EVENT_KEY:"@w3m-app/",FRAME_EVENT_KEY:"@w3m-frame/",RPC_METHOD_KEY:"RPC_",STORAGE_KEY:"@w3m-storage/",SESSION_TOKEN_KEY:"SESSION_TOKEN_KEY",EMAIL_LOGIN_USED_KEY:"EMAIL_LOGIN_USED_KEY",LAST_USED_CHAIN_KEY:"LAST_USED_CHAIN_KEY",LAST_EMAIL_LOGIN_TIME:"LAST_EMAIL_LOGIN_TIME",EMAIL:"EMAIL",PREFERRED_ACCOUNT_TYPE:"PREFERRED_ACCOUNT_TYPE",SMART_ACCOUNT_ENABLED:"SMART_ACCOUNT_ENABLED",SMART_ACCOUNT_ENABLED_NETWORKS:"SMART_ACCOUNT_ENABLED_NETWORKS",SOCIAL_USERNAME:"SOCIAL_USERNAME",SOCIAL:"@w3m/connected_social",APP_SWITCH_NETWORK:"@w3m-app/SWITCH_NETWORK",APP_CONNECT_EMAIL:"@w3m-app/CONNECT_EMAIL",APP_CONNECT_DEVICE:"@w3m-app/CONNECT_DEVICE",APP_CONNECT_OTP:"@w3m-app/CONNECT_OTP",APP_CONNECT_SOCIAL:"@w3m-app/CONNECT_SOCIAL",APP_GET_SOCIAL_REDIRECT_URI:"@w3m-app/GET_SOCIAL_REDIRECT_URI",APP_GET_USER:"@w3m-app/GET_USER",APP_SIGN_OUT:"@w3m-app/SIGN_OUT",APP_IS_CONNECTED:"@w3m-app/IS_CONNECTED",APP_GET_CHAIN_ID:"@w3m-app/GET_CHAIN_ID",APP_RPC_REQUEST:"@w3m-app/RPC_REQUEST",APP_UPDATE_EMAIL:"@w3m-app/UPDATE_EMAIL",APP_UPDATE_EMAIL_PRIMARY_OTP:"@w3m-app/UPDATE_EMAIL_PRIMARY_OTP",APP_UPDATE_EMAIL_SECONDARY_OTP:"@w3m-app/UPDATE_EMAIL_SECONDARY_OTP",APP_AWAIT_UPDATE_EMAIL:"@w3m-app/AWAIT_UPDATE_EMAIL",APP_SYNC_THEME:"@w3m-app/SYNC_THEME",APP_SYNC_DAPP_DATA:"@w3m-app/SYNC_DAPP_DATA",APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS:"@w3m-app/GET_SMART_ACCOUNT_ENABLED_NETWORKS",APP_INIT_SMART_ACCOUNT:"@w3m-app/INIT_SMART_ACCOUNT",APP_SET_PREFERRED_ACCOUNT:"@w3m-app/SET_PREFERRED_ACCOUNT",APP_CONNECT_FARCASTER:"@w3m-app/CONNECT_FARCASTER",APP_GET_FARCASTER_URI:"@w3m-app/GET_FARCASTER_URI",FRAME_SWITCH_NETWORK_ERROR:"@w3m-frame/SWITCH_NETWORK_ERROR",FRAME_SWITCH_NETWORK_SUCCESS:"@w3m-frame/SWITCH_NETWORK_SUCCESS",FRAME_CONNECT_EMAIL_ERROR:"@w3m-frame/CONNECT_EMAIL_ERROR",FRAME_CONNECT_EMAIL_SUCCESS:"@w3m-frame/CONNECT_EMAIL_SUCCESS",FRAME_CONNECT_DEVICE_ERROR:"@w3m-frame/CONNECT_DEVICE_ERROR",FRAME_CONNECT_DEVICE_SUCCESS:"@w3m-frame/CONNECT_DEVICE_SUCCESS",FRAME_CONNECT_OTP_SUCCESS:"@w3m-frame/CONNECT_OTP_SUCCESS",FRAME_CONNECT_OTP_ERROR:"@w3m-frame/CONNECT_OTP_ERROR",FRAME_CONNECT_SOCIAL_SUCCESS:"@w3m-frame/CONNECT_SOCIAL_SUCCESS",FRAME_CONNECT_SOCIAL_ERROR:"@w3m-frame/CONNECT_SOCIAL_ERROR",FRAME_CONNECT_FARCASTER_SUCCESS:"@w3m-frame/CONNECT_FARCASTER_SUCCESS",FRAME_CONNECT_FARCASTER_ERROR:"@w3m-frame/CONNECT_FARCASTER_ERROR",FRAME_GET_FARCASTER_URI_SUCCESS:"@w3m-frame/GET_FARCASTER_URI_SUCCESS",FRAME_GET_FARCASTER_URI_ERROR:"@w3m-frame/GET_FARCASTER_URI_ERROR",FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS:"@w3m-frame/GET_SOCIAL_REDIRECT_URI_SUCCESS",FRAME_GET_SOCIAL_REDIRECT_URI_ERROR:"@w3m-frame/GET_SOCIAL_REDIRECT_URI_ERROR",FRAME_GET_USER_SUCCESS:"@w3m-frame/GET_USER_SUCCESS",FRAME_GET_USER_ERROR:"@w3m-frame/GET_USER_ERROR",FRAME_SIGN_OUT_SUCCESS:"@w3m-frame/SIGN_OUT_SUCCESS",FRAME_SIGN_OUT_ERROR:"@w3m-frame/SIGN_OUT_ERROR",FRAME_IS_CONNECTED_SUCCESS:"@w3m-frame/IS_CONNECTED_SUCCESS",FRAME_IS_CONNECTED_ERROR:"@w3m-frame/IS_CONNECTED_ERROR",FRAME_GET_CHAIN_ID_SUCCESS:"@w3m-frame/GET_CHAIN_ID_SUCCESS",FRAME_GET_CHAIN_ID_ERROR:"@w3m-frame/GET_CHAIN_ID_ERROR",FRAME_RPC_REQUEST_SUCCESS:"@w3m-frame/RPC_REQUEST_SUCCESS",FRAME_RPC_REQUEST_ERROR:"@w3m-frame/RPC_REQUEST_ERROR",FRAME_SESSION_UPDATE:"@w3m-frame/SESSION_UPDATE",FRAME_UPDATE_EMAIL_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SUCCESS",FRAME_UPDATE_EMAIL_ERROR:"@w3m-frame/UPDATE_EMAIL_ERROR",FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_ERROR",FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_ERROR",FRAME_SYNC_THEME_SUCCESS:"@w3m-frame/SYNC_THEME_SUCCESS",FRAME_SYNC_THEME_ERROR:"@w3m-frame/SYNC_THEME_ERROR",FRAME_SYNC_DAPP_DATA_SUCCESS:"@w3m-frame/SYNC_DAPP_DATA_SUCCESS",FRAME_SYNC_DAPP_DATA_ERROR:"@w3m-frame/SYNC_DAPP_DATA_ERROR",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR",FRAME_INIT_SMART_ACCOUNT_SUCCESS:"@w3m-frame/INIT_SMART_ACCOUNT_SUCCESS",FRAME_INIT_SMART_ACCOUNT_ERROR:"@w3m-frame/INIT_SMART_ACCOUNT_ERROR",FRAME_SET_PREFERRED_ACCOUNT_SUCCESS:"@w3m-frame/SET_PREFERRED_ACCOUNT_SUCCESS",FRAME_SET_PREFERRED_ACCOUNT_ERROR:"@w3m-frame/SET_PREFERRED_ACCOUNT_ERROR",RPC_RESPONSE_TYPE_ERROR:"RPC_RESPONSE_ERROR",RPC_RESPONSE_TYPE_TX:"RPC_RESPONSE_TRANSACTION_HASH",RPC_RESPONSE_TYPE_OBJECT:"RPC_RESPONSE_OBJECT"},Fn={SAFE_RPC_METHODS:["eth_accounts","eth_blockNumber","eth_call","eth_chainId","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getAccount","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockReceipts","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_maxPriorityFeePerGas","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter"],NOT_SAFE_RPC_METHODS:["personal_sign","eth_signTypedData_v4","eth_sendTransaction","wallet_grantPermissions"],GET_CHAIN_ID:"eth_chainId",RPC_METHOD_NOT_ALLOWED_MESSAGE:"Requested RPC call is not allowed",RPC_METHOD_NOT_ALLOWED_UI_MESSAGE:"Action not allowed",ACCOUNT_TYPES:{EOA:"eoa",SMART_ACCOUNT:"smartAccount"}};var _r;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const s={};for(const o of i)s[o]=o;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(const a of s)o[a]=i[a];return t.objectValues(o)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},t.find=(i,s)=>{for(const o of i)if(s(o))return o},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}t.joinValues=r,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(_r||(_r={}));var _P;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(_P||(_P={}));const Rt=_r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Np=t=>{switch(typeof t){case"undefined":return Rt.undefined;case"string":return Rt.string;case"number":return isNaN(t)?Rt.nan:Rt.number;case"boolean":return Rt.boolean;case"function":return Rt.function;case"bigint":return Rt.bigint;case"symbol":return Rt.symbol;case"object":return Array.isArray(t)?Rt.array:t===null?Rt.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Rt.promise:typeof Map<"u"&&t instanceof Map?Rt.map:typeof Set<"u"&&t instanceof Set?Rt.set:typeof Date<"u"&&t instanceof Date?Rt.date:Rt.object;default:return Rt.unknown}},at=_r.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),gIe=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");let iu=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(s){return s.message},r={_errors:[]},i=s=>{for(const o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,c=0;for(;c<o.path.length;){const l=o.path[c];c===o.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(n(o))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,_r.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};iu.create=t=>new iu(t);const $5=(t,e)=>{let n;switch(t.code){case at.invalid_type:t.received===Rt.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case at.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,_r.jsonStringifyReplacer)}`;break;case at.unrecognized_keys:n=`Unrecognized key(s) in object: ${_r.joinValues(t.keys,", ")}`;break;case at.invalid_union:n="Invalid input";break;case at.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${_r.joinValues(t.options)}`;break;case at.invalid_enum_value:n=`Invalid enum value. Expected ${_r.joinValues(t.options)}, received '${t.received}'`;break;case at.invalid_arguments:n="Invalid function arguments";break;case at.invalid_return_type:n="Invalid function return type";break;case at.invalid_date:n="Invalid date";break;case at.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:_r.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case at.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case at.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case at.custom:n="Invalid input";break;case at.invalid_intersection_types:n="Intersection results could not be merged";break;case at.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case at.not_finite:n="Number must be finite";break;default:n=e.defaultError,_r.assertNever(t)}return{message:n}};let Pte=$5;function wIe(t){Pte=t}function pC(){return Pte}const mC=t=>{const{data:e,path:n,errorMaps:r,issueData:i}=t,s=[...n,...i.path||[]],o={...i,path:s};let a="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)a=l(o,{data:e,defaultError:a}).message;return{...i,path:s,message:i.message||a}},yIe=[];function Dt(t,e){const n=mC({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,pC(),$5].filter(r=>!!r)});t.common.issues.push(n)}let Pa=class Ote{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const i of n){if(i.status==="aborted")return Cn;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return Ote.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const i of n){const{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return Cn;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[s.value]=o.value)}return{status:e.value,value:r}}};const Cn=Object.freeze({status:"aborted"}),Dte=t=>({status:"dirty",value:t}),$o=t=>({status:"valid",value:t}),AP=t=>t.status==="aborted",EP=t=>t.status==="dirty",j5=t=>t.status==="valid",gC=t=>typeof Promise<"u"&&t instanceof Promise;var rn;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(rn||(rn={}));let md=class{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const $V=(t,e)=>{if(j5(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new iu(t.common.issues);return this._error=n,this._error}}};function Pn(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,a)=>o.code!=="invalid_type"?{message:a.defaultError}:typeof a.data>"u"?{message:r??a.defaultError}:{message:n??a.defaultError},description:i}}let Hn=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Np(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Np(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Pa,ctx:{common:e.parent.common,data:e.data,parsedType:Np(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(gC(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Np(e)},s=this._parseSync({data:e,path:i.path,parent:i});return $V(i,s)}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Np(e)},i=this._parse({data:e,path:r.path,parent:r}),s=await(gC(i)?i:Promise.resolve(i));return $V(r,s)}refine(e,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const o=e(i),a=()=>s.addIssue({code:at.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,i)=>e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new uu({schema:this,typeName:gn.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return eh.create(this,this._def)}nullable(){return Ug.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Lg.create(this,this._def)}promise(){return xv.create(this,this._def)}or(e){return V5.create([this,e],this._def)}and(e){return q5.create(this,e,this._def)}transform(e){return new uu({...Pn(this._def),schema:this,typeName:gn.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Q5({...Pn(this._def),innerType:this,defaultValue:n,typeName:gn.ZodDefault})}brand(){return new zte({typeName:gn.ZodBranded,type:this,...Pn(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new xC({...Pn(this._def),innerType:this,catchValue:n,typeName:gn.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return YB.create(this,e)}readonly(){return AC.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const vIe=/^c[^\s-]{8,}$/i,bIe=/^[a-z][a-z0-9]*$/,xIe=/^[0-9A-HJKMNP-TV-Z]{26}$/,_Ie=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,AIe=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,EIe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ck;const CIe=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,SIe=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,TIe=t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function IIe(t,e){return!!((e==="v4"||!e)&&CIe.test(t)||(e==="v6"||!e)&&SIe.test(t))}let vv=class a3 extends Hn{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Rt.string){const s=this._getOrReturnCtx(e);return Dt(s,{code:at.invalid_type,expected:Rt.string,received:s.parsedType}),Cn}const r=new Pa;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),Dt(i,{code:at.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),Dt(i,{code:at.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const o=e.data.length>s.value,a=e.data.length<s.value;(o||a)&&(i=this._getOrReturnCtx(e,i),o?Dt(i,{code:at.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&Dt(i,{code:at.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")AIe.test(e.data)||(i=this._getOrReturnCtx(e,i),Dt(i,{validation:"email",code:at.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Ck||(Ck=new RegExp(EIe,"u")),Ck.test(e.data)||(i=this._getOrReturnCtx(e,i),Dt(i,{validation:"emoji",code:at.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")_Ie.test(e.data)||(i=this._getOrReturnCtx(e,i),Dt(i,{validation:"uuid",code:at.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")vIe.test(e.data)||(i=this._getOrReturnCtx(e,i),Dt(i,{validation:"cuid",code:at.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")bIe.test(e.data)||(i=this._getOrReturnCtx(e,i),Dt(i,{validation:"cuid2",code:at.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")xIe.test(e.data)||(i=this._getOrReturnCtx(e,i),Dt(i,{validation:"ulid",code:at.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),Dt(i,{validation:"url",code:at.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),Dt(i,{validation:"regex",code:at.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),Dt(i,{code:at.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),Dt(i,{code:at.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),Dt(i,{code:at.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?TIe(s).test(e.data)||(i=this._getOrReturnCtx(e,i),Dt(i,{code:at.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="ip"?IIe(e.data,s.version)||(i=this._getOrReturnCtx(e,i),Dt(i,{validation:"ip",code:at.invalid_string,message:s.message}),r.dirty()):_r.assertNever(s);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),{validation:n,code:at.invalid_string,...rn.errToObj(r)})}_addCheck(e){return new a3({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...rn.errToObj(e)})}url(e){return this._addCheck({kind:"url",...rn.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...rn.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...rn.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...rn.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...rn.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...rn.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...rn.errToObj(e)})}datetime(e){var n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,...rn.errToObj(e==null?void 0:e.message)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...rn.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...rn.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...rn.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...rn.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...rn.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...rn.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...rn.errToObj(n)})}nonempty(e){return this.min(1,rn.errToObj(e))}trim(){return new a3({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new a3({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new a3({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};vv.create=t=>{var e;return new vv({checks:[],typeName:gn.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Pn(t)})};function kIe(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,s=parseInt(t.toFixed(i).replace(".","")),o=parseInt(e.toFixed(i).replace(".",""));return s%o/Math.pow(10,i)}let L5=class CP extends Hn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Rt.number){const s=this._getOrReturnCtx(e);return Dt(s,{code:at.invalid_type,expected:Rt.number,received:s.parsedType}),Cn}let r;const i=new Pa;for(const s of this._def.checks)s.kind==="int"?_r.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),Dt(r,{code:at.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),Dt(r,{code:at.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),Dt(r,{code:at.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?kIe(e.data,s.value)!==0&&(r=this._getOrReturnCtx(e,r),Dt(r,{code:at.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),Dt(r,{code:at.not_finite,message:s.message}),i.dirty()):_r.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,rn.toString(n))}gt(e,n){return this.setLimit("min",e,!1,rn.toString(n))}lte(e,n){return this.setLimit("max",e,!0,rn.toString(n))}lt(e,n){return this.setLimit("max",e,!1,rn.toString(n))}setLimit(e,n,r,i){return new CP({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:rn.toString(i)}]})}_addCheck(e){return new CP({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:rn.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:rn.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:rn.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:rn.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:rn.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:rn.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:rn.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:rn.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:rn.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&_r.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}};L5.create=t=>new L5({checks:[],typeName:gn.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Pn(t)});let U5=class SP extends Hn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==Rt.bigint){const s=this._getOrReturnCtx(e);return Dt(s,{code:at.invalid_type,expected:Rt.bigint,received:s.parsedType}),Cn}let r;const i=new Pa;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),Dt(r,{code:at.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),Dt(r,{code:at.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),Dt(r,{code:at.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):_r.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,rn.toString(n))}gt(e,n){return this.setLimit("min",e,!1,rn.toString(n))}lte(e,n){return this.setLimit("max",e,!0,rn.toString(n))}lt(e,n){return this.setLimit("max",e,!1,rn.toString(n))}setLimit(e,n,r,i){return new SP({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:rn.toString(i)}]})}_addCheck(e){return new SP({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:rn.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:rn.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:rn.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:rn.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:rn.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};U5.create=t=>{var e;return new U5({checks:[],typeName:gn.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Pn(t)})};let F5=class extends Hn{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Rt.boolean){const r=this._getOrReturnCtx(e);return Dt(r,{code:at.invalid_type,expected:Rt.boolean,received:r.parsedType}),Cn}return $o(e.data)}};F5.create=t=>new F5({typeName:gn.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Pn(t)});let z5=class Mte extends Hn{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Rt.date){const s=this._getOrReturnCtx(e);return Dt(s,{code:at.invalid_type,expected:Rt.date,received:s.parsedType}),Cn}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return Dt(s,{code:at.invalid_date}),Cn}const r=new Pa;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),Dt(i,{code:at.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),Dt(i,{code:at.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):_r.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Mte({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:rn.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:rn.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};z5.create=t=>new z5({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:gn.ZodDate,...Pn(t)});let wC=class extends Hn{_parse(e){if(this._getType(e)!==Rt.symbol){const r=this._getOrReturnCtx(e);return Dt(r,{code:at.invalid_type,expected:Rt.symbol,received:r.parsedType}),Cn}return $o(e.data)}};wC.create=t=>new wC({typeName:gn.ZodSymbol,...Pn(t)});let H5=class extends Hn{_parse(e){if(this._getType(e)!==Rt.undefined){const r=this._getOrReturnCtx(e);return Dt(r,{code:at.invalid_type,expected:Rt.undefined,received:r.parsedType}),Cn}return $o(e.data)}};H5.create=t=>new H5({typeName:gn.ZodUndefined,...Pn(t)});let W5=class extends Hn{_parse(e){if(this._getType(e)!==Rt.null){const r=this._getOrReturnCtx(e);return Dt(r,{code:at.invalid_type,expected:Rt.null,received:r.parsedType}),Cn}return $o(e.data)}};W5.create=t=>new W5({typeName:gn.ZodNull,...Pn(t)});let bv=class extends Hn{constructor(){super(...arguments),this._any=!0}_parse(e){return $o(e.data)}};bv.create=t=>new bv({typeName:gn.ZodAny,...Pn(t)});let yg=class extends Hn{constructor(){super(...arguments),this._unknown=!0}_parse(e){return $o(e.data)}};yg.create=t=>new yg({typeName:gn.ZodUnknown,...Pn(t)});let hh=class extends Hn{_parse(e){const n=this._getOrReturnCtx(e);return Dt(n,{code:at.invalid_type,expected:Rt.never,received:n.parsedType}),Cn}};hh.create=t=>new hh({typeName:gn.ZodNever,...Pn(t)});let yC=class extends Hn{_parse(e){if(this._getType(e)!==Rt.undefined){const r=this._getOrReturnCtx(e);return Dt(r,{code:at.invalid_type,expected:Rt.void,received:r.parsedType}),Cn}return $o(e.data)}};yC.create=t=>new yC({typeName:gn.ZodVoid,...Pn(t)});let Lg=class tE extends Hn{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==Rt.array)return Dt(n,{code:at.invalid_type,expected:Rt.array,received:n.parsedType}),Cn;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,a=n.data.length<i.exactLength.value;(o||a)&&(Dt(n,{code:o?at.too_big:at.too_small,minimum:a?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(Dt(n,{code:at.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(Dt(n,{code:at.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>i.type._parseAsync(new md(n,o,n.path,a)))).then(o=>Pa.mergeArray(r,o));const s=[...n.data].map((o,a)=>i.type._parseSync(new md(n,o,n.path,a)));return Pa.mergeArray(r,s)}get element(){return this._def.type}min(e,n){return new tE({...this._def,minLength:{value:e,message:rn.toString(n)}})}max(e,n){return new tE({...this._def,maxLength:{value:e,message:rn.toString(n)}})}length(e,n){return new tE({...this._def,exactLength:{value:e,message:rn.toString(n)}})}nonempty(e){return this.min(1,e)}};Lg.create=(t,e)=>new Lg({type:t,minLength:null,maxLength:null,exactLength:null,typeName:gn.ZodArray,...Pn(e)});function Fw(t){if(t instanceof gl){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=eh.create(Fw(r))}return new gl({...t._def,shape:()=>e})}else return t instanceof Lg?new Lg({...t._def,type:Fw(t.element)}):t instanceof eh?eh.create(Fw(t.unwrap())):t instanceof Ug?Ug.create(Fw(t.unwrap())):t instanceof _0?_0.create(t.items.map(e=>Fw(e))):t}let gl=class Fl extends Hn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=_r.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==Rt.object){const l=this._getOrReturnCtx(e);return Dt(l,{code:at.invalid_type,expected:Rt.object,received:l.parsedType}),Cn}const{status:r,ctx:i}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof hh&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||a.push(l);const c=[];for(const l of o){const u=s[l],d=i.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new md(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof hh){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of a)c.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(l==="strict")a.length>0&&(Dt(i,{code:at.unrecognized_keys,keys:a}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of a){const d=i.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new md(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key;l.push({key:d,value:await u.value,alwaysSet:u.alwaysSet})}return l}).then(l=>Pa.mergeObjectSync(r,l)):Pa.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(e){return rn.errToObj,new Fl({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var i,s,o,a;const c=(o=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=rn.errToObj(e).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new Fl({...this._def,unknownKeys:"strip"})}passthrough(){return new Fl({...this._def,unknownKeys:"passthrough"})}extend(e){return new Fl({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Fl({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:gn.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Fl({...this._def,catchall:e})}pick(e){const n={};return _r.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Fl({...this._def,shape:()=>n})}omit(e){const n={};return _r.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new Fl({...this._def,shape:()=>n})}deepPartial(){return Fw(this)}partial(e){const n={};return _r.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}),new Fl({...this._def,shape:()=>n})}required(e){const n={};return _r.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof eh;)s=s._def.innerType;n[r]=s}}),new Fl({...this._def,shape:()=>n})}keyof(){return Fte(_r.objectKeys(this.shape))}};gl.create=(t,e)=>new gl({shape:()=>t,unknownKeys:"strip",catchall:hh.create(),typeName:gn.ZodObject,...Pn(e)});gl.strictCreate=(t,e)=>new gl({shape:()=>t,unknownKeys:"strict",catchall:hh.create(),typeName:gn.ZodObject,...Pn(e)});gl.lazycreate=(t,e)=>new gl({shape:t,unknownKeys:"strip",catchall:hh.create(),typeName:gn.ZodObject,...Pn(e)});let V5=class extends Hn{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function i(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(a=>new iu(a.ctx.common.issues));return Dt(n,{code:at.invalid_union,unionErrors:o}),Cn}if(n.common.async)return Promise.all(r.map(async s=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let s;const o=[];for(const c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(c=>new iu(c));return Dt(n,{code:at.invalid_union,unionErrors:a}),Cn}}get options(){return this._def.options}};V5.create=(t,e)=>new V5({options:t,typeName:gn.ZodUnion,...Pn(e)});const nE=t=>t instanceof G5?nE(t.schema):t instanceof uu?nE(t.innerType()):t instanceof K5?[t.value]:t instanceof z6?t.options:t instanceof Y5?Object.keys(t.enum):t instanceof Q5?nE(t._def.innerType):t instanceof H5?[void 0]:t instanceof W5?[null]:null;let Bte=class $te extends Hn{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Rt.object)return Dt(n,{code:at.invalid_type,expected:Rt.object,received:n.parsedType}),Cn;const r=this.discriminator,i=n.data[r],s=this.optionsMap.get(i);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(Dt(n,{code:at.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Cn)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const i=new Map;for(const s of n){const o=nE(s.shape[e]);if(!o)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of o){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,s)}}return new $te({typeName:gn.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Pn(r)})}};function TP(t,e){const n=Np(t),r=Np(e);if(t===e)return{valid:!0,data:t};if(n===Rt.object&&r===Rt.object){const i=_r.objectKeys(e),s=_r.objectKeys(t).filter(a=>i.indexOf(a)!==-1),o={...t,...e};for(const a of s){const c=TP(t[a],e[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(n===Rt.array&&r===Rt.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const o=t[s],a=e[s],c=TP(o,a);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===Rt.date&&r===Rt.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}let q5=class extends Hn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=(s,o)=>{if(AP(s)||AP(o))return Cn;const a=TP(s.value,o.value);return a.valid?((EP(s)||EP(o))&&n.dirty(),{status:n.value,value:a.data}):(Dt(r,{code:at.invalid_intersection_types}),Cn)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,o])=>i(s,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};q5.create=(t,e,n)=>new q5({left:t,right:e,typeName:gn.ZodIntersection,...Pn(n)});let _0=class jte extends Hn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Rt.array)return Dt(r,{code:at.invalid_type,expected:Rt.array,received:r.parsedType}),Cn;if(r.data.length<this._def.items.length)return Dt(r,{code:at.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Cn;!this._def.rest&&r.data.length>this._def.items.length&&(Dt(r,{code:at.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((o,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new md(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(s).then(o=>Pa.mergeArray(n,o)):Pa.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new jte({...this._def,rest:e})}};_0.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new _0({items:t,typeName:gn.ZodTuple,rest:null,...Pn(e)})};let Lte=class IP extends Hn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Rt.object)return Dt(r,{code:at.invalid_type,expected:Rt.object,received:r.parsedType}),Cn;const i=[],s=this._def.keyType,o=this._def.valueType;for(const a in r.data)i.push({key:s._parse(new md(r,a,r.path,a)),value:o._parse(new md(r,r.data[a],r.path,a))});return r.common.async?Pa.mergeObjectAsync(n,i):Pa.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof Hn?new IP({keyType:e,valueType:n,typeName:gn.ZodRecord,...Pn(r)}):new IP({keyType:vv.create(),valueType:e,typeName:gn.ZodRecord,...Pn(n)})}},vC=class extends Hn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Rt.map)return Dt(r,{code:at.invalid_type,expected:Rt.map,received:r.parsedType}),Cn;const i=this._def.keyType,s=this._def.valueType,o=[...r.data.entries()].map(([a,c],l)=>({key:i._parse(new md(r,a,r.path,[l,"key"])),value:s._parse(new md(r,c,r.path,[l,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of o){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Cn;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(l.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const c of o){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return Cn;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(l.value,u.value)}return{status:n.value,value:a}}}};vC.create=(t,e,n)=>new vC({valueType:e,keyType:t,typeName:gn.ZodMap,...Pn(n)});let bC=class kP extends Hn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Rt.set)return Dt(r,{code:at.invalid_type,expected:Rt.set,received:r.parsedType}),Cn;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Dt(r,{code:at.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(Dt(r,{code:at.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function o(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Cn;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const a=[...r.data.values()].map((c,l)=>s._parse(new md(r,c,r.path,l)));return r.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(e,n){return new kP({...this._def,minSize:{value:e,message:rn.toString(n)}})}max(e,n){return new kP({...this._def,maxSize:{value:e,message:rn.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};bC.create=(t,e)=>new bC({valueType:t,minSize:null,maxSize:null,typeName:gn.ZodSet,...Pn(e)});let Ute=class rE extends Hn{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Rt.function)return Dt(n,{code:at.invalid_type,expected:Rt.function,received:n.parsedType}),Cn;function r(a,c){return mC({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,pC(),$5].filter(l=>!!l),issueData:{code:at.invalid_arguments,argumentsError:c}})}function i(a,c){return mC({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,pC(),$5].filter(l=>!!l),issueData:{code:at.invalid_return_type,returnTypeError:c}})}const s={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof xv){const a=this;return $o(async function(...c){const l=new iu([]),u=await a._def.args.parseAsync(c,s).catch(g=>{throw l.addIssue(r(c,g)),l}),d=await Reflect.apply(o,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(g=>{throw l.addIssue(i(d,g)),l})})}else{const a=this;return $o(function(...c){const l=a._def.args.safeParse(c,s);if(!l.success)throw new iu([r(c,l.error)]);const u=Reflect.apply(o,this,l.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new iu([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new rE({...this._def,args:_0.create(e).rest(yg.create())})}returns(e){return new rE({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new rE({args:e||_0.create([]).rest(yg.create()),returns:n||yg.create(),typeName:gn.ZodFunction,...Pn(r)})}},G5=class extends Hn{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};G5.create=(t,e)=>new G5({getter:t,typeName:gn.ZodLazy,...Pn(e)});let K5=class extends Hn{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return Dt(n,{received:n.data,code:at.invalid_literal,expected:this._def.value}),Cn}return{status:"valid",value:e.data}}get value(){return this._def.value}};K5.create=(t,e)=>new K5({value:t,typeName:gn.ZodLiteral,...Pn(e)});function Fte(t,e){return new z6({values:t,typeName:gn.ZodEnum,...Pn(e)})}let z6=class RP extends Hn{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return Dt(n,{expected:_r.joinValues(r),received:n.parsedType,code:at.invalid_type}),Cn}if(this._def.values.indexOf(e.data)===-1){const n=this._getOrReturnCtx(e),r=this._def.values;return Dt(n,{received:n.data,code:at.invalid_enum_value,options:r}),Cn}return $o(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e){return RP.create(e)}exclude(e){return RP.create(this.options.filter(n=>!e.includes(n)))}};z6.create=Fte;let Y5=class extends Hn{_parse(e){const n=_r.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==Rt.string&&r.parsedType!==Rt.number){const i=_r.objectValues(n);return Dt(r,{expected:_r.joinValues(i),received:r.parsedType,code:at.invalid_type}),Cn}if(n.indexOf(e.data)===-1){const i=_r.objectValues(n);return Dt(r,{received:r.data,code:at.invalid_enum_value,options:i}),Cn}return $o(e.data)}get enum(){return this._def.values}};Y5.create=(t,e)=>new Y5({values:t,typeName:gn.ZodNativeEnum,...Pn(e)});let xv=class extends Hn{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Rt.promise&&n.common.async===!1)return Dt(n,{code:at.invalid_type,expected:Rt.promise,received:n.parsedType}),Cn;const r=n.parsedType===Rt.promise?n.data:Promise.resolve(n.data);return $o(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}};xv.create=(t,e)=>new xv({type:t,typeName:gn.ZodPromise,...Pn(e)});let uu=class extends Hn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===gn.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:o=>{Dt(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const o=i.transform(r.data,s);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(o).then(a=>this._def.schema._parseAsync({data:a,path:r.path,parent:r})):this._def.schema._parseSync({data:o,path:r.path,parent:r})}if(i.type==="refinement"){const o=a=>{const c=i.refinement(a,s);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Cn:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?Cn:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!j5(o))return o;const a=i.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>j5(o)?Promise.resolve(i.transform(o.value,s)).then(a=>({status:n.value,value:a})):o);_r.assertNever(i)}};uu.create=(t,e,n)=>new uu({schema:t,typeName:gn.ZodEffects,effect:e,...Pn(n)});uu.createWithPreprocess=(t,e,n)=>new uu({schema:e,effect:{type:"preprocess",transform:t},typeName:gn.ZodEffects,...Pn(n)});let eh=class extends Hn{_parse(e){return this._getType(e)===Rt.undefined?$o(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};eh.create=(t,e)=>new eh({innerType:t,typeName:gn.ZodOptional,...Pn(e)});let Ug=class extends Hn{_parse(e){return this._getType(e)===Rt.null?$o(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ug.create=(t,e)=>new Ug({innerType:t,typeName:gn.ZodNullable,...Pn(e)});let Q5=class extends Hn{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===Rt.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Q5.create=(t,e)=>new Q5({innerType:t,typeName:gn.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Pn(e)});let xC=class extends Hn{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return gC(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new iu(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new iu(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};xC.create=(t,e)=>new xC({innerType:t,typeName:gn.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Pn(e)});let _C=class extends Hn{_parse(e){if(this._getType(e)!==Rt.nan){const r=this._getOrReturnCtx(e);return Dt(r,{code:at.invalid_type,expected:Rt.nan,received:r.parsedType}),Cn}return{status:"valid",value:e.data}}};_C.create=t=>new _C({typeName:gn.ZodNaN,...Pn(t)});const RIe=Symbol("zod_brand");let zte=class extends Hn{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},YB=class Hte extends Hn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Cn:s.status==="dirty"?(n.dirty(),Dte(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Cn:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new Hte({in:e,out:n,typeName:gn.ZodPipeline})}},AC=class extends Hn{_parse(e){const n=this._def.innerType._parse(e);return j5(n)&&(n.value=Object.freeze(n.value)),n}};AC.create=(t,e)=>new AC({innerType:t,typeName:gn.ZodReadonly,...Pn(e)});const Wte=(t,e={},n)=>t?bv.create().superRefine((r,i)=>{var s,o;if(!t(r)){const a=typeof e=="function"?e(r):typeof e=="string"?{message:e}:e,c=(o=(s=a.fatal)!==null&&s!==void 0?s:n)!==null&&o!==void 0?o:!0,l=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...l,fatal:c})}}):bv.create(),NIe={object:gl.lazycreate};var gn;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(gn||(gn={}));const PIe=(t,e={message:`Input not instance of ${t.name}`})=>Wte(n=>n instanceof t,e),Vte=vv.create,qte=L5.create,OIe=_C.create,DIe=U5.create,Gte=F5.create,MIe=z5.create,BIe=wC.create,$Ie=H5.create,jIe=W5.create,LIe=bv.create,UIe=yg.create,FIe=hh.create,zIe=yC.create,HIe=Lg.create,WIe=gl.create,VIe=gl.strictCreate,qIe=V5.create,GIe=Bte.create,KIe=q5.create,YIe=_0.create,QIe=Lte.create,ZIe=vC.create,JIe=bC.create,XIe=Ute.create,eke=G5.create,tke=K5.create,nke=z6.create,rke=Y5.create,ike=xv.create,jV=uu.create,ske=eh.create,oke=Ug.create,ake=uu.createWithPreprocess,cke=YB.create,lke=()=>Vte().optional(),uke=()=>qte().optional(),dke=()=>Gte().optional(),fke={string:t=>vv.create({...t,coerce:!0}),number:t=>L5.create({...t,coerce:!0}),boolean:t=>F5.create({...t,coerce:!0}),bigint:t=>U5.create({...t,coerce:!0}),date:t=>z5.create({...t,coerce:!0})},hke=Cn;var ue=Object.freeze({__proto__:null,defaultErrorMap:$5,setErrorMap:wIe,getErrorMap:pC,makeIssue:mC,EMPTY_PATH:yIe,addIssueToContext:Dt,ParseStatus:Pa,INVALID:Cn,DIRTY:Dte,OK:$o,isAborted:AP,isDirty:EP,isValid:j5,isAsync:gC,get util(){return _r},get objectUtil(){return _P},ZodParsedType:Rt,getParsedType:Np,ZodType:Hn,ZodString:vv,ZodNumber:L5,ZodBigInt:U5,ZodBoolean:F5,ZodDate:z5,ZodSymbol:wC,ZodUndefined:H5,ZodNull:W5,ZodAny:bv,ZodUnknown:yg,ZodNever:hh,ZodVoid:yC,ZodArray:Lg,ZodObject:gl,ZodUnion:V5,ZodDiscriminatedUnion:Bte,ZodIntersection:q5,ZodTuple:_0,ZodRecord:Lte,ZodMap:vC,ZodSet:bC,ZodFunction:Ute,ZodLazy:G5,ZodLiteral:K5,ZodEnum:z6,ZodNativeEnum:Y5,ZodPromise:xv,ZodEffects:uu,ZodTransformer:uu,ZodOptional:eh,ZodNullable:Ug,ZodDefault:Q5,ZodCatch:xC,ZodNaN:_C,BRAND:RIe,ZodBranded:zte,ZodPipeline:YB,ZodReadonly:AC,custom:Wte,Schema:Hn,ZodSchema:Hn,late:NIe,get ZodFirstPartyTypeKind(){return gn},coerce:fke,any:LIe,array:HIe,bigint:DIe,boolean:Gte,date:MIe,discriminatedUnion:GIe,effect:jV,enum:nke,function:XIe,instanceof:PIe,intersection:KIe,lazy:eke,literal:tke,map:ZIe,nan:OIe,nativeEnum:rke,never:FIe,null:jIe,nullable:oke,number:qte,object:WIe,oboolean:dke,onumber:uke,optional:ske,ostring:lke,pipeline:cke,preprocess:ake,promise:ike,record:QIe,set:JIe,strictObject:VIe,string:Vte,symbol:BIe,transformer:jV,tuple:YIe,undefined:$Ie,union:qIe,unknown:UIe,void:zIe,NEVER:hke,ZodIssueCode:at,quotelessJson:gIe,ZodError:iu});const Wi=ue.object({message:ue.string()});function Ut(t){return ue.literal(Ye[t])}ue.object({accessList:ue.array(ue.string()),blockHash:ue.string().nullable(),blockNumber:ue.string().nullable(),chainId:ue.string(),from:ue.string(),gas:ue.string(),hash:ue.string(),input:ue.string().nullable(),maxFeePerGas:ue.string(),maxPriorityFeePerGas:ue.string(),nonce:ue.string(),r:ue.string(),s:ue.string(),to:ue.string(),transactionIndex:ue.string().nullable(),type:ue.string(),v:ue.string(),value:ue.string()});const pke=ue.object({chainId:ue.number()}),mke=ue.object({email:ue.string().email()}),gke=ue.object({otp:ue.string()}),wke=ue.object({uri:ue.string()}),yke=ue.object({chainId:ue.optional(ue.number()),preferredAccountType:ue.optional(ue.string())}),vke=ue.object({provider:ue.enum(["google","github","apple","facebook","x","discord"])}),bke=ue.object({email:ue.string().email()}),xke=ue.object({otp:ue.string()}),_ke=ue.object({otp:ue.string()}),Ake=ue.object({themeMode:ue.optional(ue.enum(["light","dark"])),themeVariables:ue.optional(ue.record(ue.string(),ue.string().or(ue.number()))),w3mThemeVariables:ue.optional(ue.record(ue.string(),ue.string()))}),Eke=ue.object({metadata:ue.object({name:ue.string(),description:ue.string(),url:ue.string(),icons:ue.array(ue.string())}).optional(),sdkVersion:ue.string(),projectId:ue.string()}),Cke=ue.object({type:ue.string()}),Ske=ue.object({action:ue.enum(["VERIFY_DEVICE","VERIFY_OTP"])}),Tke=ue.object({url:ue.string()}),Ike=ue.object({userName:ue.string()}),kke=ue.object({email:ue.string(),address:ue.string(),chainId:ue.number(),accounts:ue.array(ue.object({address:ue.string(),type:ue.enum([Fn.ACCOUNT_TYPES.EOA,Fn.ACCOUNT_TYPES.SMART_ACCOUNT])})).optional(),userName:ue.string().optional()}),Rke=ue.object({action:ue.enum(["VERIFY_PRIMARY_OTP","VERIFY_SECONDARY_OTP"])}),Nke=ue.object({email:ue.string().email().optional().nullable(),address:ue.string(),chainId:ue.number(),smartAccountDeployed:ue.optional(ue.boolean()),accounts:ue.array(ue.object({address:ue.string(),type:ue.enum([Fn.ACCOUNT_TYPES.EOA,Fn.ACCOUNT_TYPES.SMART_ACCOUNT])})).optional(),preferredAccountType:ue.optional(ue.string())}),Pke=ue.object({uri:ue.string()}),Oke=ue.object({isConnected:ue.boolean()}),Dke=ue.object({chainId:ue.number()}),Mke=ue.object({chainId:ue.number()}),Bke=ue.object({newEmail:ue.string().email()}),$ke=ue.object({smartAccountEnabledNetworks:ue.array(ue.number())});ue.object({address:ue.string(),isDeployed:ue.boolean()});const jke=ue.object({type:ue.string(),address:ue.string()}),Lke=ue.any(),Uke=ue.object({method:ue.literal("eth_accounts")}),Fke=ue.object({method:ue.literal("eth_blockNumber")}),zke=ue.object({method:ue.literal("eth_call"),params:ue.array(ue.any())}),Hke=ue.object({method:ue.literal("eth_chainId")}),Wke=ue.object({method:ue.literal("eth_estimateGas"),params:ue.array(ue.any())}),Vke=ue.object({method:ue.literal("eth_feeHistory"),params:ue.array(ue.any())}),qke=ue.object({method:ue.literal("eth_gasPrice")}),Gke=ue.object({method:ue.literal("eth_getAccount"),params:ue.array(ue.any())}),Kke=ue.object({method:ue.literal("eth_getBalance"),params:ue.array(ue.any())}),Yke=ue.object({method:ue.literal("eth_getBlockByHash"),params:ue.array(ue.any())}),Qke=ue.object({method:ue.literal("eth_getBlockByNumber"),params:ue.array(ue.any())}),Zke=ue.object({method:ue.literal("eth_getBlockReceipts"),params:ue.array(ue.any())}),Jke=ue.object({method:ue.literal("eth_getBlockTransactionCountByHash"),params:ue.array(ue.any())}),Xke=ue.object({method:ue.literal("eth_getBlockTransactionCountByNumber"),params:ue.array(ue.any())}),eRe=ue.object({method:ue.literal("eth_getCode"),params:ue.array(ue.any())}),tRe=ue.object({method:ue.literal("eth_getFilterChanges"),params:ue.array(ue.any())}),nRe=ue.object({method:ue.literal("eth_getFilterLogs"),params:ue.array(ue.any())}),rRe=ue.object({method:ue.literal("eth_getLogs"),params:ue.array(ue.any())}),iRe=ue.object({method:ue.literal("eth_getProof"),params:ue.array(ue.any())}),sRe=ue.object({method:ue.literal("eth_getStorageAt"),params:ue.array(ue.any())}),oRe=ue.object({method:ue.literal("eth_getTransactionByBlockHashAndIndex"),params:ue.array(ue.any())}),aRe=ue.object({method:ue.literal("eth_getTransactionByBlockNumberAndIndex"),params:ue.array(ue.any())}),cRe=ue.object({method:ue.literal("eth_getTransactionByHash"),params:ue.array(ue.any())}),lRe=ue.object({method:ue.literal("eth_getTransactionCount"),params:ue.array(ue.any())}),uRe=ue.object({method:ue.literal("eth_getTransactionReceipt"),params:ue.array(ue.any())}),dRe=ue.object({method:ue.literal("eth_getUncleCountByBlockHash"),params:ue.array(ue.any())}),fRe=ue.object({method:ue.literal("eth_getUncleCountByBlockNumber"),params:ue.array(ue.any())}),hRe=ue.object({method:ue.literal("eth_maxPriorityFeePerGas")}),pRe=ue.object({method:ue.literal("eth_newBlockFilter")}),mRe=ue.object({method:ue.literal("eth_newFilter"),params:ue.array(ue.any())}),gRe=ue.object({method:ue.literal("eth_newPendingTransactionFilter")}),wRe=ue.object({method:ue.literal("eth_sendRawTransaction"),params:ue.array(ue.any())}),yRe=ue.object({method:ue.literal("eth_syncing"),params:ue.array(ue.any())}),vRe=ue.object({method:ue.literal("eth_uninstallFilter"),params:ue.array(ue.any())}),LV=ue.object({method:ue.literal("personal_sign"),params:ue.array(ue.any())}),bRe=ue.object({method:ue.literal("eth_signTypedData_v4"),params:ue.array(ue.any())}),UV=ue.object({method:ue.literal("eth_sendTransaction"),params:ue.array(ue.any())}),xRe=ue.object({method:ue.literal("wallet_sendCalls"),params:ue.array(ue.object({chainId:ue.string().optional(),from:ue.string().optional(),version:ue.string().optional(),capabilities:ue.any().optional(),calls:ue.array(ue.object({to:ue.string().startsWith("0x"),data:ue.string().startsWith("0x").optional(),value:ue.string().optional()}))}))}),_Re=ue.object({method:ue.literal("wallet_getCallsStatus"),params:ue.array(ue.string())}),ARe=ue.object({method:ue.literal("wallet_getCapabilities")}),ERe=ue.object({method:ue.literal("wallet_grantPermissions"),params:ue.array(ue.any())}),FV=ue.object({token:ue.string()}),Ft=ue.object({id:ue.string().optional()}),uA={appEvent:Ft.extend({type:Ut("APP_SWITCH_NETWORK"),payload:pke}).or(Ft.extend({type:Ut("APP_CONNECT_EMAIL"),payload:mke})).or(Ft.extend({type:Ut("APP_CONNECT_DEVICE")})).or(Ft.extend({type:Ut("APP_CONNECT_OTP"),payload:gke})).or(Ft.extend({type:Ut("APP_CONNECT_SOCIAL"),payload:wke})).or(Ft.extend({type:Ut("APP_GET_FARCASTER_URI")})).or(Ft.extend({type:Ut("APP_CONNECT_FARCASTER")})).or(Ft.extend({type:Ut("APP_GET_USER"),payload:ue.optional(yke)})).or(Ft.extend({type:Ut("APP_GET_SOCIAL_REDIRECT_URI"),payload:vke})).or(Ft.extend({type:Ut("APP_SIGN_OUT")})).or(Ft.extend({type:Ut("APP_IS_CONNECTED"),payload:ue.optional(FV)})).or(Ft.extend({type:Ut("APP_GET_CHAIN_ID")})).or(Ft.extend({type:Ut("APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS")})).or(Ft.extend({type:Ut("APP_INIT_SMART_ACCOUNT")})).or(Ft.extend({type:Ut("APP_SET_PREFERRED_ACCOUNT"),payload:Cke})).or(Ft.extend({type:Ut("APP_RPC_REQUEST"),payload:LV.or(UV).or(Uke).or(Fke).or(zke).or(Hke).or(Wke).or(Vke).or(qke).or(Gke).or(Kke).or(Yke).or(Qke).or(Zke).or(Jke).or(Xke).or(eRe).or(tRe).or(nRe).or(rRe).or(iRe).or(sRe).or(oRe).or(aRe).or(cRe).or(lRe).or(uRe).or(dRe).or(fRe).or(hRe).or(pRe).or(mRe).or(gRe).or(wRe).or(yRe).or(vRe).or(LV).or(bRe).or(UV).or(_Re).or(xRe).or(ARe).or(ERe)})).or(Ft.extend({type:Ut("APP_UPDATE_EMAIL"),payload:bke})).or(Ft.extend({type:Ut("APP_UPDATE_EMAIL_PRIMARY_OTP"),payload:xke})).or(Ft.extend({type:Ut("APP_UPDATE_EMAIL_SECONDARY_OTP"),payload:_ke})).or(Ft.extend({type:Ut("APP_SYNC_THEME"),payload:Ake})).or(Ft.extend({type:Ut("APP_SYNC_DAPP_DATA"),payload:Eke})),frameEvent:Ft.extend({type:Ut("FRAME_SWITCH_NETWORK_ERROR"),payload:Wi}).or(Ft.extend({type:Ut("FRAME_SWITCH_NETWORK_SUCCESS"),payload:Mke})).or(Ft.extend({type:Ut("FRAME_CONNECT_EMAIL_SUCCESS"),payload:Ske})).or(Ft.extend({type:Ut("FRAME_CONNECT_EMAIL_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_GET_FARCASTER_URI_SUCCESS"),payload:Tke})).or(Ft.extend({type:Ut("FRAME_GET_FARCASTER_URI_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_CONNECT_FARCASTER_SUCCESS"),payload:Ike})).or(Ft.extend({type:Ut("FRAME_CONNECT_FARCASTER_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_CONNECT_OTP_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_CONNECT_OTP_SUCCESS")})).or(Ft.extend({type:Ut("FRAME_CONNECT_DEVICE_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_CONNECT_DEVICE_SUCCESS")})).or(Ft.extend({type:Ut("FRAME_CONNECT_SOCIAL_SUCCESS"),payload:kke})).or(Ft.extend({type:Ut("FRAME_CONNECT_SOCIAL_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_GET_USER_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_GET_USER_SUCCESS"),payload:Nke})).or(Ft.extend({type:Ut("FRAME_GET_SOCIAL_REDIRECT_URI_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS"),payload:Pke})).or(Ft.extend({type:Ut("FRAME_SIGN_OUT_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_SIGN_OUT_SUCCESS")})).or(Ft.extend({type:Ut("FRAME_IS_CONNECTED_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_IS_CONNECTED_SUCCESS"),payload:Oke})).or(Ft.extend({type:Ut("FRAME_GET_CHAIN_ID_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_GET_CHAIN_ID_SUCCESS"),payload:Dke})).or(Ft.extend({type:Ut("FRAME_RPC_REQUEST_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_RPC_REQUEST_SUCCESS"),payload:Lke})).or(Ft.extend({type:Ut("FRAME_SESSION_UPDATE"),payload:FV})).or(Ft.extend({type:Ut("FRAME_UPDATE_EMAIL_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_UPDATE_EMAIL_SUCCESS"),payload:Rke})).or(Ft.extend({type:Ut("FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS")})).or(Ft.extend({type:Ut("FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS"),payload:Bke})).or(Ft.extend({type:Ut("FRAME_SYNC_THEME_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_SYNC_THEME_SUCCESS")})).or(Ft.extend({type:Ut("FRAME_SYNC_DAPP_DATA_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_SYNC_DAPP_DATA_SUCCESS")})).or(Ft.extend({type:Ut("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS"),payload:$ke})).or(Ft.extend({type:Ut("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_INIT_SMART_ACCOUNT_ERROR"),payload:Wi})).or(Ft.extend({type:Ut("FRAME_SET_PREFERRED_ACCOUNT_SUCCESS"),payload:jke})).or(Ft.extend({type:Ut("FRAME_SET_PREFERRED_ACCOUNT_ERROR"),payload:Wi}))},Fs={set(t,e){fo.isClient&&localStorage.setItem(`${Ye.STORAGE_KEY}${t}`,e)},get(t){return fo.isClient?localStorage.getItem(`${Ye.STORAGE_KEY}${t}`):null},delete(t,e){fo.isClient&&(e?localStorage.removeItem(t):localStorage.removeItem(`${Ye.STORAGE_KEY}${t}`))}},zV={address:/^0x(?:[A-Fa-f0-9]{40})$/u,transactionHash:/^0x(?:[A-Fa-f0-9]{64})$/u,signedMessage:/^0x(?:[a-fA-F0-9]{62,})$/u},dA=30*1e3,fo={checkIfAllowedToTriggerEmail(){const t=Fs.get(Ye.LAST_EMAIL_LOGIN_TIME);if(t){const e=Date.now()-Number(t);if(e<dA){const n=Math.ceil((dA-e)/1e3);throw new Error(`Please try again after ${n} seconds`)}}},getTimeToNextEmailLogin(){const t=Fs.get(Ye.LAST_EMAIL_LOGIN_TIME);if(t){const e=Date.now()-Number(t);if(e<dA)return Math.ceil((dA-e)/1e3)}return 0},checkIfRequestExists(t){return Fn.NOT_SAFE_RPC_METHODS.includes(t.method)||Fn.SAFE_RPC_METHODS.includes(t.method)},getResponseType(t){const{type:e,payload:n}=t;return e===Ye.FRAME_RPC_REQUEST_ERROR?Ye.RPC_RESPONSE_TYPE_ERROR:typeof n=="string"&&(n.match(zV.transactionHash)||n.match(zV.signedMessage))?Ye.RPC_RESPONSE_TYPE_TX:Ye.RPC_RESPONSE_TYPE_OBJECT},checkIfRequestIsAllowed(t){return Fn.SAFE_RPC_METHODS.includes(t.method)},isClient:typeof window<"u"};class CRe{constructor(e,n=!1){if(this.iframe=null,this.rpcUrl=Bi.BLOCKCHAIN_API_RPC_URL,this.events={onFrameEvent:r=>{fo.isClient&&window.addEventListener("message",({data:i})=>{var o;if(!((o=i.type)!=null&&o.includes(Ye.FRAME_EVENT_KEY)))return;const s=uA.frameEvent.parse(i);r(s)})},onAppEvent:r=>{fo.isClient&&window.addEventListener("message",({data:i})=>{var o;if(!((o=i.type)!=null&&o.includes(Ye.APP_EVENT_KEY)))return;const s=uA.appEvent.parse(i);r(s)})},postAppEvent:r=>{var i;if(fo.isClient){if(!((i=this.iframe)!=null&&i.contentWindow))throw new Error("W3mFrame: iframe is not set");uA.appEvent.parse(r),window.postMessage(r),this.iframe.contentWindow.postMessage(r,"*")}},postFrameEvent:r=>{if(fo.isClient){if(!parent)throw new Error("W3mFrame: parent is not set");uA.frameEvent.parse(r),parent.postMessage(r,"*")}}},this.projectId=e,this.frameLoadPromise=new Promise((r,i)=>{this.frameLoadPromiseResolver={resolve:r,reject:i}}),n&&(this.frameLoadPromise=new Promise((r,i)=>{this.frameLoadPromiseResolver={resolve:r,reject:i}}),fo.isClient)){const r=document.createElement("iframe");r.id="w3m-iframe",r.src=`${pIe}?projectId=${e}`,r.style.position="fixed",r.style.zIndex="999999",r.style.display="none",r.style.opacity="0",r.style.borderBottomLeftRadius="clamp(0px, var(--wui-border-radius-l), 44px)",r.style.borderBottomRightRadius="clamp(0px, var(--wui-border-radius-l), 44px)",document.body.appendChild(r),this.iframe=r,this.iframe.onload=()=>{var i;(i=this.frameLoadPromiseResolver)==null||i.resolve(void 0)},this.iframe.onerror=()=>{var i;(i=this.frameLoadPromiseResolver)==null||i.reject("Unable to load email login dependency")}}}get networks(){const e=[1,5,11155111,10,420,42161,421613,137,80001,42220,1313161554,1313161555,56,97,43114,43113,324,280,100,8453,84531,7777777,999].map(n=>({[n]:{rpcUrl:`${this.rpcUrl}/v1/?chainId=eip155:${n}&projectId=${this.projectId}`,chainId:n}}));return Object.assign({},...e)}}class SRe{constructor(e){var s;this.connectEmailResolver=void 0,this.connectDeviceResolver=void 0,this.connectOtpResolver=void 0,this.connectResolver=void 0,this.connectSocialResolver=void 0,this.connectFarcasterResolver=void 0,this.getFarcasterUriResolver=void 0,this.disconnectResolver=void 0,this.isConnectedResolver=void 0,this.getChainIdResolver=void 0,this.getSocialRedirectUriResolver=void 0,this.switchChainResolver=void 0,this.rpcRequestResolver=void 0,this.updateEmailResolver=void 0,this.updateEmailPrimaryOtpResolver=void 0,this.updateEmailSecondaryOtpResolver=void 0,this.syncThemeResolver=void 0,this.syncDappDataResolver=void 0,this.smartAccountEnabledNetworksResolver=void 0,this.setPreferredAccountResolver=void 0;const n=T6({level:mIe}),{logger:r,chunkLoggerController:i}=FJ({opts:n});this.logger=qo(r,this.constructor.name),this.chunkLoggerController=i,typeof window<"u"&&((s=this.chunkLoggerController)!=null&&s.downloadLogsBlobInBrowser)&&(window.dowdownloadAppKitLogsBlob||(window.downloadAppKitLogsBlob={}),window.downloadAppKitLogsBlob.sdk=()=>{var o;(o=this.chunkLoggerController)!=null&&o.downloadLogsBlobInBrowser&&this.chunkLoggerController.downloadLogsBlobInBrowser({projectId:e})}),this.w3mFrame=new CRe(e,!0),this.w3mFrame.events.onFrameEvent(o=>{switch(this.logger.info({event:o},"Event received"),o.type){case Ye.FRAME_CONNECT_EMAIL_SUCCESS:return this.onConnectEmailSuccess(o);case Ye.FRAME_CONNECT_EMAIL_ERROR:return this.onConnectEmailError(o);case Ye.FRAME_CONNECT_FARCASTER_SUCCESS:return this.onConnectFarcasterSuccess(o);case Ye.FRAME_CONNECT_FARCASTER_ERROR:return this.onConnectFarcasterError(o);case Ye.FRAME_GET_FARCASTER_URI_SUCCESS:return this.onGetFarcasterUriSuccess(o);case Ye.FRAME_GET_FARCASTER_URI_ERROR:return this.onGetFarcasterUriError(o);case Ye.FRAME_CONNECT_DEVICE_SUCCESS:return this.onConnectDeviceSuccess();case Ye.FRAME_CONNECT_DEVICE_ERROR:return this.onConnectDeviceError(o);case Ye.FRAME_CONNECT_OTP_SUCCESS:return this.onConnectOtpSuccess();case Ye.FRAME_CONNECT_OTP_ERROR:return this.onConnectOtpError(o);case Ye.FRAME_CONNECT_SOCIAL_SUCCESS:return this.onConnectSocialSuccess(o);case Ye.FRAME_CONNECT_SOCIAL_ERROR:return this.onConnectSocialError(o);case Ye.FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS:return this.onGetSocialRedirectUriSuccess(o);case Ye.FRAME_GET_SOCIAL_REDIRECT_URI_ERROR:return this.onGetSocialRedirectUriError(o);case Ye.FRAME_GET_USER_SUCCESS:return this.onConnectSuccess(o);case Ye.FRAME_GET_USER_ERROR:return this.onConnectError(o);case Ye.FRAME_IS_CONNECTED_SUCCESS:return this.onIsConnectedSuccess(o);case Ye.FRAME_IS_CONNECTED_ERROR:return this.onIsConnectedError(o);case Ye.FRAME_GET_CHAIN_ID_SUCCESS:return this.onGetChainIdSuccess(o);case Ye.FRAME_GET_CHAIN_ID_ERROR:return this.onGetChainIdError(o);case Ye.FRAME_SIGN_OUT_SUCCESS:return this.onSignOutSuccess();case Ye.FRAME_SIGN_OUT_ERROR:return this.onSignOutError(o);case Ye.FRAME_SWITCH_NETWORK_SUCCESS:return this.onSwitchChainSuccess(o);case Ye.FRAME_SWITCH_NETWORK_ERROR:return this.onSwitchChainError(o);case Ye.FRAME_RPC_REQUEST_SUCCESS:return this.onRpcRequestSuccess(o);case Ye.FRAME_RPC_REQUEST_ERROR:return this.onRpcRequestError(o);case Ye.FRAME_SESSION_UPDATE:return this.onSessionUpdate(o);case Ye.FRAME_UPDATE_EMAIL_SUCCESS:return this.onUpdateEmailSuccess(o);case Ye.FRAME_UPDATE_EMAIL_ERROR:return this.onUpdateEmailError(o);case Ye.FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS:return this.onUpdateEmailPrimaryOtpSuccess();case Ye.FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR:return this.onUpdateEmailPrimaryOtpError(o);case Ye.FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS:return this.onUpdateEmailSecondaryOtpSuccess(o);case Ye.FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR:return this.onUpdateEmailSecondaryOtpError(o);case Ye.FRAME_SYNC_THEME_SUCCESS:return this.onSyncThemeSuccess();case Ye.FRAME_SYNC_THEME_ERROR:return this.onSyncThemeError(o);case Ye.FRAME_SYNC_DAPP_DATA_SUCCESS:return this.onSyncDappDataSuccess();case Ye.FRAME_SYNC_DAPP_DATA_ERROR:return this.onSyncDappDataError(o);case Ye.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS:return this.onSmartAccountEnabledNetworksSuccess(o);case Ye.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR:return this.onSmartAccountEnabledNetworksError(o);case Ye.FRAME_SET_PREFERRED_ACCOUNT_SUCCESS:return this.onSetPreferredAccountSuccess();case Ye.FRAME_SET_PREFERRED_ACCOUNT_ERROR:return this.onSetPreferredAccountError();default:return null}})}getLoginEmailUsed(){return!!Fs.get(Ye.EMAIL_LOGIN_USED_KEY)}getEmail(){return Fs.get(Ye.EMAIL)}rejectRpcRequest(){var e;(e=this.rpcRequestResolver)==null||e.reject()}async connectEmail(e){return await this.w3mFrame.frameLoadPromise,fo.checkIfAllowedToTriggerEmail(),this.w3mFrame.events.postAppEvent({type:Ye.APP_CONNECT_EMAIL,payload:e}),new Promise((n,r)=>{this.connectEmailResolver={resolve:n,reject:r}})}async connectDevice(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Ye.APP_CONNECT_DEVICE}),new Promise((e,n)=>{this.connectDeviceResolver={resolve:e,reject:n}})}async connectOtp(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Ye.APP_CONNECT_OTP,payload:e}),new Promise((n,r)=>{this.connectOtpResolver={resolve:n,reject:r}})}async isConnected(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Ye.APP_IS_CONNECTED,payload:void 0}),new Promise((e,n)=>{this.isConnectedResolver={resolve:e,reject:n}})}async getChainId(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Ye.APP_GET_CHAIN_ID}),new Promise((e,n)=>{this.getChainIdResolver={resolve:e,reject:n}})}async getFarcasterUri(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Ye.APP_GET_FARCASTER_URI}),new Promise((e,n)=>{this.getFarcasterUriResolver={resolve:e,reject:n}})}async getSocialRedirectUri(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Ye.APP_GET_SOCIAL_REDIRECT_URI,payload:e}),new Promise((n,r)=>{this.getSocialRedirectUriResolver={resolve:n,reject:r}})}async updateEmail(e){return await this.w3mFrame.frameLoadPromise,fo.checkIfAllowedToTriggerEmail(),this.w3mFrame.events.postAppEvent({type:Ye.APP_UPDATE_EMAIL,payload:e}),new Promise((n,r)=>{this.updateEmailResolver={resolve:n,reject:r}})}async updateEmailPrimaryOtp(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Ye.APP_UPDATE_EMAIL_PRIMARY_OTP,payload:e}),new Promise((n,r)=>{this.updateEmailPrimaryOtpResolver={resolve:n,reject:r}})}async updateEmailSecondaryOtp(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Ye.APP_UPDATE_EMAIL_SECONDARY_OTP,payload:e}),new Promise((n,r)=>{this.updateEmailSecondaryOtpResolver={resolve:n,reject:r}})}async syncTheme(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Ye.APP_SYNC_THEME,payload:e}),new Promise((n,r)=>{this.syncThemeResolver={resolve:n,reject:r}})}async syncDappData(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Ye.APP_SYNC_DAPP_DATA,payload:e}),new Promise((n,r)=>{this.syncDappDataResolver={resolve:n,reject:r}})}async getSmartAccountEnabledNetworks(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Ye.APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS}),new Promise((e,n)=>{this.smartAccountEnabledNetworksResolver={resolve:e,reject:n}})}async setPreferredAccount(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Ye.APP_SET_PREFERRED_ACCOUNT,payload:{type:e}}),new Promise((n,r)=>{this.setPreferredAccountResolver={resolve:n,reject:r}})}async connect(e){const n=(e==null?void 0:e.chainId)??this.getLastUsedChainId()??1;return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Ye.APP_GET_USER,payload:{chainId:n}}),new Promise((r,i)=>{this.connectResolver||(this.connectResolver={resolve:r,reject:i})})}async connectSocial(e){return this.w3mFrame.events.postAppEvent({type:Ye.APP_CONNECT_SOCIAL,payload:{uri:e}}),new Promise((n,r)=>{this.connectSocialResolver={resolve:n,reject:r}})}async connectFarcaster(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Ye.APP_CONNECT_FARCASTER}),new Promise((e,n)=>{this.connectFarcasterResolver={resolve:e,reject:n}})}async switchNetwork(e){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Ye.APP_SWITCH_NETWORK,payload:{chainId:e}}),new Promise((n,r)=>{this.switchChainResolver={resolve:n,reject:r}})}async disconnect(){return await this.w3mFrame.frameLoadPromise,this.w3mFrame.events.postAppEvent({type:Ye.APP_SIGN_OUT}),new Promise((e,n)=>{this.disconnectResolver={resolve:e,reject:n}})}async request(e){return await this.w3mFrame.frameLoadPromise,Fn.GET_CHAIN_ID===e.method?this.getLastUsedChainId():(this.w3mFrame.events.postAppEvent({type:Ye.APP_RPC_REQUEST,payload:e}),new Promise((n,r)=>{this.rpcRequestResolver={resolve:n,reject:r}}))}onRpcRequest(e){this.w3mFrame.events.onAppEvent(n=>{n.type.includes(Ye.RPC_METHOD_KEY)&&e(n==null?void 0:n.payload)})}onRpcResponse(e){this.w3mFrame.events.onFrameEvent(n=>{n.type.includes(Ye.RPC_METHOD_KEY)&&e(n)})}onIsConnected(e){this.w3mFrame.events.onFrameEvent(n=>{n.type===Ye.FRAME_GET_USER_SUCCESS&&e(n.payload)})}onNotConnected(e){this.w3mFrame.events.onFrameEvent(n=>{n.type===Ye.FRAME_IS_CONNECTED_ERROR&&e(),n.type===Ye.FRAME_IS_CONNECTED_SUCCESS&&!n.payload.isConnected&&e()})}onSetPreferredAccount(e){this.w3mFrame.events.onFrameEvent(n=>{n.type===Ye.FRAME_SET_PREFERRED_ACCOUNT_SUCCESS?e(n.payload):n.type===Ye.FRAME_SET_PREFERRED_ACCOUNT_ERROR&&e({type:Fn.ACCOUNT_TYPES.EOA})})}onGetSmartAccountEnabledNetworks(e){this.w3mFrame.events.onFrameEvent(n=>{n.type===Ye.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS?e(n.payload.smartAccountEnabledNetworks):n.type===Ye.FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR&&e([])})}onConnectEmailSuccess(e){var n;(n=this.connectEmailResolver)==null||n.resolve(e.payload),this.setNewLastEmailLoginTime()}onConnectEmailError(e){var n;(n=this.connectEmailResolver)==null||n.reject(e.payload.message)}onGetFarcasterUriSuccess(e){var n;(n=this.getFarcasterUriResolver)==null||n.resolve(e.payload)}onGetFarcasterUriError(e){var n;(n=this.getFarcasterUriResolver)==null||n.reject(e.payload.message)}onConnectFarcasterSuccess(e){var n;e.payload.userName&&this.setSocialLoginSuccess(e.payload.userName),(n=this.connectFarcasterResolver)==null||n.resolve(e.payload)}onConnectFarcasterError(e){var n;(n=this.connectFarcasterResolver)==null||n.reject(e.payload.message)}onConnectDeviceSuccess(){var e;(e=this.connectDeviceResolver)==null||e.resolve(void 0)}onConnectDeviceError(e){var n;(n=this.connectDeviceResolver)==null||n.reject(e.payload.message)}onConnectOtpSuccess(){var e;(e=this.connectOtpResolver)==null||e.resolve(void 0)}onConnectOtpError(e){var n;(n=this.connectOtpResolver)==null||n.reject(e.payload.message)}onConnectSuccess(e){var n;this.setLoginSuccess(e.payload.email),this.setLastUsedChainId(e.payload.chainId),(n=this.connectResolver)==null||n.resolve(e.payload),this.connectResolver=void 0}onConnectError(e){var n;(n=this.connectResolver)==null||n.reject(e.payload.message),this.connectResolver=void 0}onConnectSocialSuccess(e){var n;e.payload.userName&&this.setSocialLoginSuccess(e.payload.userName),(n=this.connectSocialResolver)==null||n.resolve(e.payload)}onConnectSocialError(e){var n;(n=this.connectSocialResolver)==null||n.reject(e.payload.message)}onIsConnectedSuccess(e){var n;e.payload.isConnected||this.deleteAuthLoginCache(),(n=this.isConnectedResolver)==null||n.resolve(e.payload)}onIsConnectedError(e){var n;(n=this.isConnectedResolver)==null||n.reject(e.payload.message)}onGetChainIdSuccess(e){var n;this.setLastUsedChainId(e.payload.chainId),(n=this.getChainIdResolver)==null||n.resolve(e.payload)}onGetChainIdError(e){var n;(n=this.getChainIdResolver)==null||n.reject(e.payload.message)}onGetSocialRedirectUriSuccess(e){var n;(n=this.getSocialRedirectUriResolver)==null||n.resolve(e.payload)}onGetSocialRedirectUriError(e){var n;(n=this.getSocialRedirectUriResolver)==null||n.reject(e.payload.message)}onSignOutSuccess(){var e;(e=this.disconnectResolver)==null||e.resolve(void 0),this.deleteAuthLoginCache()}onSignOutError(e){var n;(n=this.disconnectResolver)==null||n.reject(e.payload.message)}onSwitchChainSuccess(e){var n;this.setLastUsedChainId(e.payload.chainId),(n=this.switchChainResolver)==null||n.resolve(e.payload)}onSwitchChainError(e){var n;(n=this.switchChainResolver)==null||n.reject(e.payload.message)}onRpcRequestSuccess(e){var n;(n=this.rpcRequestResolver)==null||n.resolve(e.payload)}onRpcRequestError(e){var n;(n=this.rpcRequestResolver)==null||n.reject(e.payload.message)}onSessionUpdate(e){}onUpdateEmailSuccess(e){var n;(n=this.updateEmailResolver)==null||n.resolve(e.payload),this.setNewLastEmailLoginTime()}onUpdateEmailError(e){var n;(n=this.updateEmailResolver)==null||n.reject(e.payload.message)}onUpdateEmailPrimaryOtpSuccess(){var e;(e=this.updateEmailPrimaryOtpResolver)==null||e.resolve(void 0)}onUpdateEmailPrimaryOtpError(e){var n;(n=this.updateEmailPrimaryOtpResolver)==null||n.reject(e.payload.message)}onUpdateEmailSecondaryOtpSuccess(e){var r;const{newEmail:n}=e.payload;this.setLoginSuccess(n),(r=this.updateEmailSecondaryOtpResolver)==null||r.resolve({newEmail:n})}onUpdateEmailSecondaryOtpError(e){var n;(n=this.updateEmailSecondaryOtpResolver)==null||n.reject(e.payload.message)}onSyncThemeSuccess(){var e;(e=this.syncThemeResolver)==null||e.resolve(void 0)}onSyncThemeError(e){var n;(n=this.syncThemeResolver)==null||n.reject(e.payload.message)}onSyncDappDataSuccess(){var e;(e=this.syncDappDataResolver)==null||e.resolve(void 0)}onSyncDappDataError(e){var n;(n=this.syncDappDataResolver)==null||n.reject(e.payload.message)}onSmartAccountEnabledNetworksSuccess(e){var n;this.persistSmartAccountEnabledNetworks(e.payload.smartAccountEnabledNetworks),(n=this.smartAccountEnabledNetworksResolver)==null||n.resolve(e.payload)}onSmartAccountEnabledNetworksError(e){var n;this.persistSmartAccountEnabledNetworks([]),(n=this.smartAccountEnabledNetworksResolver)==null||n.reject(e.payload.message)}onSetPreferredAccountSuccess(){var e;(e=this.setPreferredAccountResolver)==null||e.resolve(void 0)}onSetPreferredAccountError(){var e;(e=this.setPreferredAccountResolver)==null||e.reject()}setNewLastEmailLoginTime(){Fs.set(Ye.LAST_EMAIL_LOGIN_TIME,Date.now().toString())}setSocialLoginSuccess(e){Fs.set(Ye.SOCIAL_USERNAME,e)}setLoginSuccess(e){e&&Fs.set(Ye.EMAIL,e),Fs.set(Ye.EMAIL_LOGIN_USED_KEY,"true"),Fs.delete(Ye.LAST_EMAIL_LOGIN_TIME)}deleteAuthLoginCache(){Fs.delete(Ye.EMAIL_LOGIN_USED_KEY),Fs.delete(Ye.EMAIL),Fs.delete(Ye.LAST_USED_CHAIN_KEY),Fs.delete(Ye.SOCIAL_USERNAME),Fs.delete(Ye.SOCIAL,!0)}setLastUsedChainId(e){Fs.set(Ye.LAST_USED_CHAIN_KEY,String(e))}getLastUsedChainId(){return Number(Fs.get(Ye.LAST_USED_CHAIN_KEY))}persistSmartAccountEnabledNetworks(e){Fs.set(Ye.SMART_ACCOUNT_ENABLED_NETWORKS,e.join(","))}}const fi=Li({transactions:[],coinbaseTransactions:{},transactionsByYear:{},loading:!1,empty:!1,next:void 0}),lo={state:fi,subscribe(t){return Bo(fi,()=>t(fi))},async fetchTransactions(t,e){const{projectId:n}=pt.state;if(!n||!t)throw new Error("Transactions can't be fetched without a projectId and an accountAddress");fi.loading=!0;try{const r=await wi.fetchTransactions({account:t,projectId:n,cursor:fi.next,onramp:e,cache:e==="coinbase"?"no-cache":void 0}),i=this.filterSpamTransactions(r.data),s=[...fi.transactions,...i];fi.loading=!1,e==="coinbase"?fi.coinbaseTransactions=this.groupTransactionsByYearAndMonth(fi.coinbaseTransactions,r.data):(fi.transactions=s,fi.transactionsByYear=this.groupTransactionsByYearAndMonth(fi.transactionsByYear,i)),fi.empty=s.length===0,fi.next=r.next?r.next:void 0}catch{wt.sendEvent({type:"track",event:"ERROR_FETCH_TRANSACTIONS",properties:{address:t,projectId:n,cursor:fi.next,isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT}}),Ht.showError("Failed to fetch transactions"),fi.loading=!1,fi.empty=!0,fi.next=void 0}},groupTransactionsByYearAndMonth(t={},e=[]){const n=t;return e.forEach(r=>{const i=new Date(r.metadata.minedAt).getFullYear(),s=new Date(r.metadata.minedAt).getMonth(),o=n[i]??{},c=(o[s]??[]).filter(l=>l.id!==r.id);n[i]={...o,[s]:[...c,r].sort((l,u)=>new Date(u.metadata.minedAt).getTime()-new Date(l.metadata.minedAt).getTime())}}),n},filterSpamTransactions(t){return t.filter(e=>!e.transfers.every(r=>{var i;return((i=r.nft_info)==null?void 0:i.flags.is_spam)===!0}))},clearCursor(){fi.next=void 0},resetTransactions(){fi.transactions=[],fi.transactionsByYear={},fi.loading=!1,fi.empty=!1,fi.next=void 0}},ra=Li({wcError:!1,buffering:!1}),tn={state:ra,subscribeKey(t,e){return $a(ra,t,e)},_getClient(){return Qe.getConnectionControllerClient()},setClient(t){ra._client=wg(t)},async connectWalletConnect(){er.setConnectedConnector("WALLET_CONNECT"),await this._getClient().connectWalletConnect(t=>{ra.wcUri=t,ra.wcPairingExpiry=st.getPairingExpiry()})},async connectExternal(t,e){var n,r;await((r=(n=this._getClient()).connectExternal)==null?void 0:r.call(n,t)),Qe.setActiveChain(e),er.setConnectedConnector(t.type)},async reconnectExternal(t){var e,n;await((n=(e=this._getClient()).reconnectExternal)==null?void 0:n.call(e,t)),er.setConnectedConnector(t.type)},async setPreferredAccountType(t){var n;dn.setLoading(!0);const e=Pt.getAuthConnector();e&&(await(e==null?void 0:e.provider.setPreferredAccount(t)),await this.reconnectExternal(e),dn.setLoading(!1),wt.sendEvent({type:"track",event:"SET_PREFERRED_ACCOUNT_TYPE",properties:{accountType:t,network:((n=rt.state.caipNetwork)==null?void 0:n.id)||""}}))},async signMessage(t){return this._getClient().signMessage(t)},parseUnits(t,e){return this._getClient().parseUnits(t,e)},formatUnits(t,e){return this._getClient().formatUnits(t,e)},async sendTransaction(t){return this._getClient().sendTransaction(t)},async estimateGas(t){return this._getClient().estimateGas(t)},async writeContract(t){return this._getClient().writeContract(t)},async getEnsAddress(t){return this._getClient().getEnsAddress(t)},async getEnsAvatar(t){return this._getClient().getEnsAvatar(t)},checkInstalled(t){var e,n;return(n=(e=this._getClient()).checkInstalled)==null?void 0:n.call(e,t)},resetWcConnection(){ra.wcUri=void 0,ra.wcPairingExpiry=void 0,ra.wcLinking=void 0,ra.recentWallet=void 0,lo.resetTransactions(),er.deleteWalletConnectDeepLink()},setWcLinking(t){ra.wcLinking=t},setWcError(t){ra.wcError=t,ra.buffering=!1},setRecentWallet(t){ra.recentWallet=t},setBuffering(t){ra.buffering=t},async disconnect(){const t=this._getClient();try{await t.disconnect(),er.removeConnectedWalletImageUrl(),this.resetWcConnection()}catch{throw new Error("Failed to disconnect")}}},c3={async getTokenList(){var r;const t=rt.state.caipNetwork,e=await wi.fetchSwapTokens({chainId:t==null?void 0:t.id,projectId:pt.state.projectId});return((r=e==null?void 0:e.tokens)==null?void 0:r.map(i=>({...i,eip2612:!1,quantity:{decimals:"0",numeric:"0"},price:0,value:0})))||[]},async fetchGasPrice(){const t=pt.state.projectId,e=rt.state.caipNetwork;return e?await wi.fetchGasPrice({projectId:t,chainId:e.id}):null},async fetchSwapAllowance({tokenAddress:t,userAddress:e,sourceTokenAmount:n,sourceTokenDecimals:r}){const i=pt.state.projectId,s=await wi.fetchSwapAllowance({projectId:i,tokenAddress:t,userAddress:e});if(s!=null&&s.allowance&&n&&r){const o=tn.parseUnits(n,r);return BigInt(s.allowance)>=o}return!1},async getMyTokensWithBalance(t){const e=Ne.state.address,n=rt.state.caipNetwork;if(!e||!n)return[];const i=(await wi.getBalance(e,n.id,t)).balances.filter(s=>s.quantity.decimals!=="0");return Ne.setTokenBalance(i),this.mapBalancesToSwapTokens(i)},mapBalancesToSwapTokens(t){return(t==null?void 0:t.map(e=>({...e,address:e!=null&&e.address?e.address:`${e.chainId}:${os.NATIVE_TOKEN_ADDRESS}`,decimals:parseInt(e.quantity.decimals,10),logoUri:e.iconUrl,eip2612:!1})))||[]}},si=Li({view:"Connect",history:["Connect"],transactionStack:[]}),ke={state:si,subscribeKey(t,e){return $a(si,t,e)},pushTransactionStack(t){si.transactionStack.push(t)},popTransactionStack(t){var n,r;const e=si.transactionStack.pop();e&&(t?(this.goBack(),(n=e==null?void 0:e.onCancel)==null||n.call(e)):(e.goBack?this.goBack():e.view&&this.reset(e.view),(r=e==null?void 0:e.onSuccess)==null||r.call(e)))},push(t,e){t!==si.view&&(si.view=t,si.history.push(t),si.data=e)},reset(t){si.view=t,si.history=[t]},replace(t,e){si.history.length>=1&&si.history.at(-1)!==t&&(si.view=t,si.history[si.history.length-1]=t,si.data=e)},goBack(){if(si.history.length>1){si.history.pop();const[t]=si.history.slice(-1);t&&(si.view=t)}},goBackToIndex(t){if(si.history.length>1){si.history=si.history.slice(0,t+1);const[e]=si.history.slice(-1);e&&(si.view=e)}}},Tf={getGasPriceInEther(t,e){const n=e*t;return Number(n)/1e18},getGasPriceInUSD(t,e,n){const r=Tf.getGasPriceInEther(e,n);return hr.bigNumber(t).multipliedBy(r).toNumber()},getPriceImpact({sourceTokenAmount:t,sourceTokenPriceInUSD:e,toTokenPriceInUSD:n,toTokenAmount:r}){const i=hr.bigNumber(t).multipliedBy(e),s=hr.bigNumber(r).multipliedBy(n);return i.minus(s).dividedBy(i).multipliedBy(100).toNumber()},getMaxSlippage(t,e){const n=hr.bigNumber(t).dividedBy(100);return hr.multiply(e,n).toNumber()},getProviderFee(t,e=.0085){return hr.bigNumber(t).multipliedBy(e).toString()},isInsufficientNetworkTokenForGas(t,e){const n=e||"0";return hr.bigNumber(t).isZero()?!0:hr.bigNumber(hr.bigNumber(n)).isGreaterThan(t)},isInsufficientSourceTokenForSwap(t,e,n){var s,o;const r=(o=(s=n==null?void 0:n.find(a=>a.address===e))==null?void 0:s.quantity)==null?void 0:o.numeric;return hr.bigNumber(r||"0").isLessThan(t)},getToTokenAmount({sourceToken:t,toToken:e,sourceTokenPrice:n,toTokenPrice:r,sourceTokenAmount:i}){if(i==="0"||!t||!e)return"0";const s=t.decimals,o=n,a=e.decimals,c=r;if(c<=0)return"0";const l=hr.bigNumber(i).multipliedBy(.0085),d=hr.bigNumber(i).minus(l).multipliedBy(hr.bigNumber(10).pow(s)),h=hr.bigNumber(o).dividedBy(c),g=s-a;return d.multipliedBy(h).dividedBy(hr.bigNumber(10).pow(g)).dividedBy(hr.bigNumber(10).pow(a)).toFixed(a).toString()}},HV=15e4,TRe=6,ia={initializing:!1,initialized:!1,loadingPrices:!1,loadingQuote:!1,loadingApprovalTransaction:!1,loadingBuildTransaction:!1,loadingTransaction:!1,fetchError:!1,approvalTransaction:void 0,swapTransaction:void 0,transactionError:void 0,sourceToken:void 0,sourceTokenAmount:"",sourceTokenPriceInUSD:0,toToken:void 0,toTokenAmount:"",toTokenPriceInUSD:0,networkPrice:"0",networkBalanceInUSD:"0",networkTokenSymbol:"",inputError:void 0,slippage:os.CONVERT_SLIPPAGE_TOLERANCE,tokens:void 0,popularTokens:void 0,suggestedTokens:void 0,foundTokens:void 0,myTokensWithBalance:void 0,tokensPriceMap:{},gasFee:"0",gasPriceInUSD:0,priceImpact:void 0,maxSlippage:void 0,providerFee:void 0},Oe=Li(ia),mt={state:Oe,subscribe(t){return Bo(Oe,()=>t(Oe))},subscribeKey(t,e){return $a(Oe,t,e)},getParams(){var l,u,d,h,g,w,v,_;const t=rt.state.caipNetwork,e=Ne.state.address,n=`${t==null?void 0:t.id}:${os.NATIVE_TOKEN_ADDRESS}`,r=er.getConnectedConnector(),i=Pt.getAuthConnector();if(!e)throw new Error("No address found to swap the tokens from.");const s=Ne.state.caipAddress,o=!((l=Oe.toToken)!=null&&l.address)||!((u=Oe.toToken)!=null&&u.decimals),a=!((d=Oe.sourceToken)!=null&&d.address)||!((h=Oe.sourceToken)!=null&&h.decimals)||!hr.bigNumber(Oe.sourceTokenAmount).isGreaterThan(0),c=!Oe.sourceTokenAmount;return{networkAddress:n,fromAddress:e,fromCaipAddress:Ne.state.caipAddress,sourceTokenAddress:(g=Oe.sourceToken)==null?void 0:g.address,toTokenAddress:(w=Oe.toToken)==null?void 0:w.address,toTokenAmount:Oe.toTokenAmount,toTokenDecimals:(v=Oe.toToken)==null?void 0:v.decimals,sourceTokenAmount:Oe.sourceTokenAmount,sourceTokenDecimals:(_=Oe.sourceToken)==null?void 0:_.decimals,invalidToToken:o,invalidSourceToken:a,invalidSourceTokenAmount:c,availableToSwap:s&&!o&&!a&&!c,isAuthConnector:(i==null?void 0:i.walletFeatures)&&r==="AUTH"}},setSourceToken(t){if(!t){Oe.sourceToken=t,Oe.sourceTokenAmount="",Oe.sourceTokenPriceInUSD=0;return}Oe.sourceToken=t,this.setTokenPrice(t.address,"sourceToken")},setSourceTokenAmount(t){Oe.sourceTokenAmount=t},setToToken(t){if(!t){Oe.toToken=t,Oe.toTokenAmount="",Oe.toTokenPriceInUSD=0;return}Oe.toToken=t,this.setTokenPrice(t.address,"toToken")},setToTokenAmount(t){Oe.toTokenAmount=t?hr.formatNumberToLocalString(t,TRe):""},async setTokenPrice(t,e){const{availableToSwap:n}=this.getParams();let r=Oe.tokensPriceMap[t]||0;r||(Oe.loadingPrices=!0,r=await this.getAddressPrice(t)),e==="sourceToken"?Oe.sourceTokenPriceInUSD=r:e==="toToken"&&(Oe.toTokenPriceInUSD=r),Oe.loadingPrices&&(Oe.loadingPrices=!1,n&&this.swapTokens())},switchTokens(){if(Oe.initializing||!Oe.initialized)return;const t=Oe.toToken?{...Oe.toToken}:void 0,e=Oe.sourceToken?{...Oe.sourceToken}:void 0,n=t&&Oe.toTokenAmount===""?"1":Oe.toTokenAmount;this.setSourceToken(t),this.setToToken(e),this.setSourceTokenAmount(n),this.setToTokenAmount(""),this.swapTokens()},resetState(){Oe.myTokensWithBalance=ia.myTokensWithBalance,Oe.tokensPriceMap=ia.tokensPriceMap,Oe.initialized=ia.initialized,Oe.sourceToken=ia.sourceToken,Oe.sourceTokenAmount=ia.sourceTokenAmount,Oe.sourceTokenPriceInUSD=ia.sourceTokenPriceInUSD,Oe.toToken=ia.toToken,Oe.toTokenAmount=ia.toTokenAmount,Oe.toTokenPriceInUSD=ia.toTokenPriceInUSD,Oe.networkPrice=ia.networkPrice,Oe.networkTokenSymbol=ia.networkTokenSymbol,Oe.networkBalanceInUSD=ia.networkBalanceInUSD,Oe.inputError=ia.inputError},resetValues(){var n;const{networkAddress:t}=this.getParams(),e=(n=Oe.tokens)==null?void 0:n.find(r=>r.address===t);this.setSourceToken(e),this.setToToken(void 0)},getApprovalLoadingState(){return Oe.loadingApprovalTransaction},clearError(){Oe.transactionError=void 0},async initializeState(){if(!Oe.initializing){if(Oe.initializing=!0,!Oe.initialized)try{await this.fetchTokens(),Oe.initialized=!0}catch{Oe.initialized=!1,Ht.showError("Failed to initialize swap"),ke.goBack()}Oe.initializing=!1}},async fetchTokens(){var n;const{networkAddress:t}=this.getParams();await this.getTokenList(),await this.getNetworkTokenPrice(),await this.getMyTokensWithBalance();const e=(n=Oe.tokens)==null?void 0:n.find(r=>r.address===t);e&&(Oe.networkTokenSymbol=e.symbol,this.setSourceToken(e),this.setSourceTokenAmount("1"))},async getTokenList(){const t=await c3.getTokenList();Oe.tokens=t,Oe.popularTokens=t.sort((e,n)=>e.symbol<n.symbol?-1:e.symbol>n.symbol?1:0),Oe.suggestedTokens=t.filter(e=>!!os.SWAP_SUGGESTED_TOKENS.includes(e.symbol),{})},async getAddressPrice(t){var c,l;const e=Oe.tokensPriceMap[t];if(e)return e;const r=(await wi.fetchTokenPrice({projectId:pt.state.projectId,addresses:[t]})).fungibles||[],i=[...Oe.tokens||[],...Oe.myTokensWithBalance||[]],s=(c=i==null?void 0:i.find(u=>u.address===t))==null?void 0:c.symbol,o=((l=r.find(u=>u.symbol.toLowerCase()===(s==null?void 0:s.toLowerCase())))==null?void 0:l.price)||0,a=parseFloat(o.toString());return Oe.tokensPriceMap[t]=a,a},async getNetworkTokenPrice(){var i;const{networkAddress:t}=this.getParams(),n=(i=(await wi.fetchTokenPrice({projectId:pt.state.projectId,addresses:[t]})).fungibles)==null?void 0:i[0],r=(n==null?void 0:n.price.toString())||"0";Oe.tokensPriceMap[t]=parseFloat(r),Oe.networkTokenSymbol=(n==null?void 0:n.symbol)||"",Oe.networkPrice=r},async getMyTokensWithBalance(t){const e=await c3.getMyTokensWithBalance(t);e&&(await this.getInitialGasPrice(),this.setBalances(e))},setBalances(t){const{networkAddress:e}=this.getParams(),n=rt.state.caipNetwork;if(!n)return;const r=t.find(i=>i.address===e);t.forEach(i=>{Oe.tokensPriceMap[i.address]=i.price||0}),Oe.myTokensWithBalance=t.filter(i=>i.address.startsWith(n.id)),Oe.networkBalanceInUSD=r?hr.multiply(r.quantity.numeric,r.price).toString():"0"},async getInitialGasPrice(){const t=await c3.fetchGasPrice();if(!t)return{gasPrice:null,gasPriceInUsd:null};const e=t.standard,n=BigInt(e),r=BigInt(HV),i=Tf.getGasPriceInUSD(Oe.networkPrice,r,n);return Oe.gasFee=e,Oe.gasPriceInUSD=i,{gasPrice:n,gasPriceInUSD:Oe.gasPriceInUSD}},async swapTokens(){var l,u;const t=Ne.state.address,e=Oe.sourceToken,n=Oe.toToken,r=hr.bigNumber(Oe.sourceTokenAmount).isGreaterThan(0);if(!n||!e||Oe.loadingPrices||!r)return;Oe.loadingQuote=!0;const i=hr.bigNumber(Oe.sourceTokenAmount).multipliedBy(10**e.decimals),s=await wi.fetchSwapQuote({userAddress:t,projectId:pt.state.projectId,from:e.address,to:n.address,gasPrice:Oe.gasFee,amount:i.toString()});Oe.loadingQuote=!1;const o=(u=(l=s==null?void 0:s.quotes)==null?void 0:l[0])==null?void 0:u.toAmount;if(!o)return;const a=hr.bigNumber(o).dividedBy(10**n.decimals).toString();this.setToTokenAmount(a),this.hasInsufficientToken(Oe.sourceTokenAmount,e.address)?Oe.inputError="Insufficient balance":(Oe.inputError=void 0,this.setTransactionDetails())},async getTransaction(){const{fromCaipAddress:t,availableToSwap:e}=this.getParams(),n=Oe.sourceToken,r=Oe.toToken;if(!(!t||!e||!n||!r||Oe.loadingQuote))try{Oe.loadingBuildTransaction=!0;const i=await c3.fetchSwapAllowance({userAddress:t,tokenAddress:n.address,sourceTokenAmount:Oe.sourceTokenAmount,sourceTokenDecimals:n.decimals});let s;return i?s=await this.createSwapTransaction():s=await this.createAllowanceTransaction(),Oe.loadingBuildTransaction=!1,Oe.fetchError=!1,s}catch{ke.goBack(),Ht.showError("Failed to check allowance"),Oe.loadingBuildTransaction=!1,Oe.approvalTransaction=void 0,Oe.swapTransaction=void 0,Oe.fetchError=!0;return}},async createAllowanceTransaction(){const{fromCaipAddress:t,fromAddress:e,sourceTokenAddress:n,toTokenAddress:r}=this.getParams();if(!(!t||!r)){if(!n)throw new Error("createAllowanceTransaction - No source token address found.");try{const i=await wi.generateApproveCalldata({projectId:pt.state.projectId,from:n,to:r,userAddress:t}),s=await tn.estimateGas({address:e,to:st.getPlainAddress(i.tx.to),data:i.tx.data}),o={data:i.tx.data,to:st.getPlainAddress(i.tx.from),gas:s,gasPrice:BigInt(i.tx.eip155.gasPrice),value:BigInt(i.tx.value),toAmount:Oe.toTokenAmount};return Oe.swapTransaction=void 0,Oe.approvalTransaction=o,o}catch{ke.goBack(),Ht.showError("Failed to create approval transaction"),Oe.approvalTransaction=void 0,Oe.swapTransaction=void 0,Oe.fetchError=!0;return}}},async createSwapTransaction(){const{networkAddress:t,fromCaipAddress:e,sourceTokenAmount:n}=this.getParams(),r=Oe.sourceToken,i=Oe.toToken;if(!e||!n||!r||!i)return;const s=tn.parseUnits(n,r.decimals).toString();try{const o=await wi.generateSwapCalldata({projectId:pt.state.projectId,userAddress:e,from:r.address,to:i.address,amount:s}),a=r.address===t,c=BigInt(o.tx.eip155.gas),l=BigInt(o.tx.eip155.gasPrice),u={data:o.tx.data,to:st.getPlainAddress(o.tx.to),gas:c,gasPrice:l,value:BigInt(a?s:"0"),toAmount:Oe.toTokenAmount};return Oe.gasPriceInUSD=Tf.getGasPriceInUSD(Oe.networkPrice,c,l),Oe.approvalTransaction=void 0,Oe.swapTransaction=u,u}catch{ke.goBack(),Ht.showError("Failed to create transaction"),Oe.approvalTransaction=void 0,Oe.swapTransaction=void 0,Oe.fetchError=!0;return}},async sendTransactionForApproval(t){const{fromAddress:e,isAuthConnector:n}=this.getParams();Oe.loadingApprovalTransaction=!0;const r="Approve limit increase in your wallet";n?ke.pushTransactionStack({view:null,goBack:!0,onSuccess(){Ht.showLoading(r)}}):Ht.showLoading(r);try{await tn.sendTransaction({address:e,to:t.to,data:t.data,value:BigInt(t.value),gasPrice:BigInt(t.gasPrice)}),await this.swapTokens(),await this.getTransaction(),Oe.approvalTransaction=void 0,Oe.loadingApprovalTransaction=!1}catch(i){const s=i;Oe.transactionError=s==null?void 0:s.shortMessage,Oe.loadingApprovalTransaction=!1,Ht.showError((s==null?void 0:s.shortMessage)||"Transaction error")}},async sendTransactionForSwap(t){var o,a,c,l,u,d,h,g,w,v,_,T;if(!t)return;const{fromAddress:e,toTokenAmount:n,isAuthConnector:r}=this.getParams();Oe.loadingTransaction=!0;const i=`Swapping ${(o=Oe.sourceToken)==null?void 0:o.symbol} to ${hr.formatNumberToLocalString(n,3)} ${(a=Oe.toToken)==null?void 0:a.symbol}`,s=`Swapped ${(c=Oe.sourceToken)==null?void 0:c.symbol} to ${hr.formatNumberToLocalString(n,3)} ${(l=Oe.toToken)==null?void 0:l.symbol}`;r?ke.pushTransactionStack({view:"Account",goBack:!1,onSuccess(){Ht.showLoading(i),mt.resetState()}}):Ht.showLoading("Confirm transaction in your wallet");try{const b=[(u=Oe.sourceToken)==null?void 0:u.address,(d=Oe.toToken)==null?void 0:d.address].join(","),k=await tn.sendTransaction({address:e,to:t.to,data:t.data,gas:t.gas,gasPrice:BigInt(t.gasPrice),value:t.value});return Oe.loadingTransaction=!1,Ht.showSuccess(s),wt.sendEvent({type:"track",event:"SWAP_SUCCESS",properties:{network:((h=rt.state.caipNetwork)==null?void 0:h.id)||"",swapFromToken:((g=this.state.sourceToken)==null?void 0:g.symbol)||"",swapToToken:((w=this.state.toToken)==null?void 0:w.symbol)||"",swapFromAmount:this.state.sourceTokenAmount||"",swapToAmount:this.state.toTokenAmount||"",isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT}}),mt.resetState(),r||ke.replace("Account"),mt.getMyTokensWithBalance(b),k}catch(b){const k=b;Oe.transactionError=k==null?void 0:k.shortMessage,Oe.loadingTransaction=!1,Ht.showError((k==null?void 0:k.shortMessage)||"Transaction error"),wt.sendEvent({type:"track",event:"SWAP_ERROR",properties:{network:((v=rt.state.caipNetwork)==null?void 0:v.id)||"",swapFromToken:((_=this.state.sourceToken)==null?void 0:_.symbol)||"",swapToToken:((T=this.state.toToken)==null?void 0:T.symbol)||"",swapFromAmount:this.state.sourceTokenAmount||"",swapToAmount:this.state.toTokenAmount||"",isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT}});return}},hasInsufficientToken(t,e){const n=Tf.isInsufficientSourceTokenForSwap(t,e,Oe.myTokensWithBalance);return Tf.isInsufficientNetworkTokenForGas(Oe.networkBalanceInUSD,Oe.gasPriceInUSD)||n},setTransactionDetails(){const{toTokenAddress:t,toTokenDecimals:e}=this.getParams();!t||!e||(Oe.gasPriceInUSD=Tf.getGasPriceInUSD(Oe.networkPrice,BigInt(Oe.gasFee),BigInt(HV)),Oe.priceImpact=Tf.getPriceImpact({sourceTokenAmount:Oe.sourceTokenAmount,sourceTokenPriceInUSD:Oe.sourceTokenPriceInUSD,toTokenPriceInUSD:Oe.toTokenPriceInUSD,toTokenAmount:Oe.toTokenAmount}),Oe.maxSlippage=Tf.getMaxSlippage(Oe.slippage,Oe.toTokenAmount),Oe.providerFee=Tf.getProviderFee(Oe.sourceTokenAmount))}},WV=Li({isConnected:!1,currentTab:0,tokenBalance:[],smartAccountDeployed:!1,addressLabels:new Map,allAccounts:[]}),Ne={state:WV,replaceState(t){Object.assign(WV,t)},subscribe(t){return Qe.subscribeChainProp("accountState",e=>{if(e)return t(e)})},subscribeKey(t,e){let n;return Qe.subscribeChainProp("accountState",r=>{if(r){const i=r[t];n!==i&&(n=i,e(i))}})},setIsConnected(t,e){Qe.setAccountProp("isConnected",t,e)},setCaipAddress(t,e){const n=t?st.getPlainAddress(t):void 0;Qe.setAccountProp("caipAddress",t,e),Qe.setAccountProp("address",n,e)},setBalance(t,e,n){Qe.setAccountProp("balance",t,n),Qe.setAccountProp("balanceSymbol",e,n)},setProfileName(t,e){Qe.setAccountProp("profileName",t,e)},setProfileImage(t,e){Qe.setAccountProp("profileImage",t,e)},setAddressExplorerUrl(t,e){Qe.setAccountProp("addressExplorerUrl",t,e)},setSmartAccountDeployed(t,e){Qe.setAccountProp("smartAccountDeployed",t,e)},setCurrentTab(t,e){Qe.setAccountProp("currentTab",t,e)},setTokenBalance(t,e){t&&Qe.setAccountProp("tokenBalance",t,e)},setShouldUpdateToAddress(t){Qe.setAccountProp("shouldUpdateToAddress",t)},setAllAccounts(t,e){Qe.setAccountProp("allAccounts",t,e)},addAddressLabel(t,e){const n=Qe.getAccountProp("addressLabels")||new Map;n.set(t,e),Qe.setAccountProp("addressLabels",n)},removeAddressLabel(t){const e=Qe.getAccountProp("addressLabels")||new Map;e.delete(t),Qe.setAccountProp("addressLabels",e)},setConnectedWalletInfo(t,e){Qe.setAccountProp("connectedWalletInfo",t,e)},setPreferredAccountType(t,e){Qe.setAccountProp("preferredAccountType",t,e)},setSocialProvider(t,e){t&&Qe.setAccountProp("socialProvider",t,e)},setSocialWindow(t,e){t&&Qe.setAccountProp("socialWindow",wg(t),e)},setFarcasterUrl(t,e){t&&Qe.setAccountProp("farcasterUrl",t,e)},async fetchTokenBalance(){var r,i;const t=(r=rt.state.caipNetwork)==null?void 0:r.id,e=(i=rt.state.caipNetwork)==null?void 0:i.chain,n=Ne.state.address;try{if(n&&t){const s=await wi.getBalance(n,t),o=s.balances.filter(a=>a.quantity.decimals!=="0");this.setTokenBalance(o,e),mt.setBalances(c3.mapBalancesToSwapTokens(s.balances))}}catch{Ht.showError("Failed to fetch token balance")}},resetAccount(t){Qe.resetAccount(t)}},Im=Li({loading:!1,open:!1}),dn={state:Im,subscribe(t){return Bo(Im,()=>t(Im))},subscribeKey(t,e){return $a(Im,t,e)},async open(t){await Qt.state.prefetchPromise;const e=Ne.state.isConnected;t!=null&&t.view?ke.reset(t.view):e?ke.reset("Account"):ke.reset("Connect"),Im.open=!0,Xf.set({open:!0}),wt.sendEvent({type:"track",event:"MODAL_OPEN",properties:{connected:e}})},close(){const t=Ne.state.isConnected;Im.open=!1,Xf.set({open:!1}),wt.sendEvent({type:"track",event:"MODAL_CLOSE",properties:{connected:t}})},setLoading(t){Im.loading=t,Xf.set({loading:t})}},O3={id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},NP={id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},IRe={providers:Cte,selectedProvider:null,error:null,purchaseCurrency:O3,paymentCurrency:NP,purchaseCurrencies:[O3],paymentCurrencies:[],quotesLoading:!1},Sr=Li(IRe),Tr={state:Sr,subscribe(t){return Bo(Sr,()=>t(Sr))},subscribeKey(t,e){return $a(Sr,t,e)},setSelectedProvider(t){Sr.selectedProvider=t},setPurchaseCurrency(t){Sr.purchaseCurrency=t},setPaymentCurrency(t){Sr.paymentCurrency=t},setPurchaseAmount(t){this.state.purchaseAmount=t},setPaymentAmount(t){this.state.paymentAmount=t},async getAvailableCurrencies(){const t=await wi.getOnrampOptions();Sr.purchaseCurrencies=t.purchaseCurrencies,Sr.paymentCurrencies=t.paymentCurrencies,Sr.paymentCurrency=t.paymentCurrencies[0]||NP,Sr.purchaseCurrency=t.purchaseCurrencies[0]||O3,await Qt.fetchCurrencyImages(t.paymentCurrencies.map(e=>e.id)),await Qt.fetchTokenImages(t.purchaseCurrencies.map(e=>e.symbol))},async getQuote(){var t,e;Sr.quotesLoading=!0;try{const n=await wi.getOnrampQuote({purchaseCurrency:Sr.purchaseCurrency,paymentCurrency:Sr.paymentCurrency,amount:((t=Sr.paymentAmount)==null?void 0:t.toString())||"0",network:(e=Sr.purchaseCurrency)==null?void 0:e.symbol});return Sr.quotesLoading=!1,Sr.purchaseAmount=Number(n.purchaseAmount.amount),n}catch(n){return Sr.error=n.message,Sr.quotesLoading=!1,null}finally{Sr.quotesLoading=!1}},resetState(){Sr.providers=Cte,Sr.selectedProvider=null,Sr.error=null,Sr.purchaseCurrency=O3,Sr.paymentCurrency=NP,Sr.purchaseCurrencies=[O3],Sr.paymentCurrencies=[],Sr.paymentAmount=void 0,Sr.purchaseAmount=void 0,Sr.quotesLoading=!1}},Cs=Li({loading:!1}),Ir={state:Cs,subscribe(t){return Bo(Cs,()=>t(Cs))},subscribeKey(t,e){return $a(Cs,t,e)},setToken(t){t&&(Cs.token=wg(t))},setTokenAmount(t){Cs.sendTokenAmount=t},setReceiverAddress(t){Cs.receiverAddress=t},setReceiverProfileImageUrl(t){Cs.receiverProfileImageUrl=t},setReceiverProfileName(t){Cs.receiverProfileName=t},setGasPrice(t){Cs.gasPrice=t},setGasPriceInUsd(t){Cs.gasPriceInUSD=t},setLoading(t){Cs.loading=t},sendToken(){var t,e,n,r,i;(t=this.state.token)!=null&&t.address&&this.state.sendTokenAmount&&this.state.receiverAddress?(wt.sendEvent({type:"track",event:"SEND_INITIATED",properties:{isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT,token:this.state.token.address,amount:this.state.sendTokenAmount,network:((e=rt.state.caipNetwork)==null?void 0:e.id)||""}}),this.sendERC20Token({receiverAddress:this.state.receiverAddress,tokenAddress:this.state.token.address,sendTokenAmount:this.state.sendTokenAmount,decimals:this.state.token.quantity.decimals})):this.state.receiverAddress&&this.state.sendTokenAmount&&this.state.gasPrice&&((n=this.state.token)!=null&&n.quantity.decimals)&&(wt.sendEvent({type:"track",event:"SEND_INITIATED",properties:{isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT,token:(r=this.state.token)==null?void 0:r.symbol,amount:this.state.sendTokenAmount,network:((i=rt.state.caipNetwork)==null?void 0:i.id)||""}}),this.sendNativeToken({receiverAddress:this.state.receiverAddress,sendTokenAmount:this.state.sendTokenAmount,gasPrice:this.state.gasPrice,decimals:this.state.token.quantity.decimals}))},async sendNativeToken(t){var s,o,a,c;ke.pushTransactionStack({view:"Account",goBack:!1});const e=t.receiverAddress,n=Ne.state.address,r=tn.parseUnits(t.sendTokenAmount.toString(),Number(t.decimals)),i="0x";try{await tn.sendTransaction({to:e,address:n,data:i,value:r,gasPrice:t.gasPrice}),Ht.showSuccess("Transaction started"),wt.sendEvent({type:"track",event:"SEND_SUCCESS",properties:{isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT,token:((s=this.state.token)==null?void 0:s.symbol)||"",amount:t.sendTokenAmount,network:((o=rt.state.caipNetwork)==null?void 0:o.id)||""}}),this.resetSend()}catch{wt.sendEvent({type:"track",event:"SEND_ERROR",properties:{isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT,token:((a=this.state.token)==null?void 0:a.symbol)||"",amount:t.sendTokenAmount,network:((c=rt.state.caipNetwork)==null?void 0:c.id)||""}}),Ht.showError("Something went wrong")}},async sendERC20Token(t){ke.pushTransactionStack({view:"Account",goBack:!1});const e=tn.parseUnits(t.sendTokenAmount.toString(),Number(t.decimals));try{Ne.state.address&&t.sendTokenAmount&&t.receiverAddress&&t.tokenAddress&&(await tn.writeContract({fromAddress:Ne.state.address,tokenAddress:st.getPlainAddress(t.tokenAddress),receiverAddress:t.receiverAddress,tokenAmount:e,method:"transfer",abi:U7e}),Ht.showSuccess("Transaction started"),this.resetSend())}catch{Ht.showError("Something went wrong")}},resetSend(){Cs.token=void 0,Cs.sendTokenAmount=void 0,Cs.receiverAddress=void 0,Cs.receiverProfileImageUrl=void 0,Cs.receiverProfileName=void 0,Cs.loading=!1}},Ll=Li({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),Ga={state:Ll,subscribe(t){return Bo(Ll,()=>t(Ll))},subscribeKey(t,e){return $a(Ll,t,e)},showTooltip({message:t,triggerRect:e,variant:n}){Ll.open=!0,Ll.message=t,Ll.triggerRect=e,Ll.variant=n},hide(){Ll.open=!1,Ll.message="",Ll.triggerRect={width:0,height:0,top:0,left:0}}},VV=2147483648,kRe={convertEVMChainIdToCoinType(t){if(t>=VV)throw new Error("Invalid chainId");return(VV|t)>>>0}},zc=Li({suggestions:[],loading:!1}),Wu={state:zc,subscribe(t){return Bo(zc,()=>t(zc))},subscribeKey(t,e){return $a(zc,t,e)},async resolveName(t){var e,n;try{return await wi.lookupEnsName(t)}catch(r){const i=r;throw new Error(((n=(e=i==null?void 0:i.reasons)==null?void 0:e[0])==null?void 0:n.description)||"Error resolving name")}},async isNameRegistered(t){try{return await wi.lookupEnsName(t),!0}catch{return!1}},async getSuggestions(t){try{zc.loading=!0,zc.suggestions=[];const e=await wi.getEnsNameSuggestions(t);return zc.suggestions=e.suggestions.map(n=>({...n,name:n.name.replace(Bi.WC_NAME_SUFFIX,"")}))||[],zc.suggestions}catch(e){const n=this.parseEnsApiError(e,"Error fetching name suggestions");throw new Error(n)}finally{zc.loading=!1}},async getNamesForAddress(t){try{return rt.state.caipNetwork?await wi.reverseLookupEnsName({address:t}):[]}catch(e){const n=this.parseEnsApiError(e,"Error fetching names for address");throw new Error(n)}},async registerName(t){const e=rt.state.caipNetwork;if(!e)throw new Error("Network not found");const n=Ne.state.address,r=Pt.getAuthConnector();if(!n||!r)throw new Error("Address or auth connector not found");zc.loading=!0;try{const i=JSON.stringify({name:`${t}${Bi.WC_NAME_SUFFIX}`,attributes:{},timestamp:Math.floor(Date.now()/1e3)});ke.pushTransactionStack({view:"RegisterAccountNameSuccess",goBack:!1,replace:!0,onCancel(){zc.loading=!1}});const s=await tn.signMessage(i),o=zl.caipNetworkIdToNumber(e.id);if(!o)throw new Error("Network not found");const a=kRe.convertEVMChainIdToCoinType(o);await wi.registerEnsName({coinType:a,address:n,signature:s,message:i}),Ne.setProfileName(`${t}${Bi.WC_NAME_SUFFIX}`),ke.replace("RegisterAccountNameSuccess")}catch(i){const s=this.parseEnsApiError(i,`Error registering name ${t}`);throw ke.replace("RegisterAccountName"),new Error(s)}finally{zc.loading=!1}},validateName(t){return/^[a-zA-Z0-9-]{4,}$/u.test(t)},parseEnsApiError(t,e){var r,i;const n=t;return((i=(r=n==null?void 0:n.reasons)==null?void 0:r[0])==null?void 0:i.description)||e}},kr={getWalletImage(t){if(t!=null&&t.image_url)return t==null?void 0:t.image_url;if(t!=null&&t.image_id)return Rs.state.walletImages[t.image_id]},getNetworkImage(t){if(t!=null&&t.imageUrl)return t==null?void 0:t.imageUrl;if(t!=null&&t.imageId)return Rs.state.networkImages[t.imageId]},getConnectorImage(t){if(t!=null&&t.imageUrl)return t.imageUrl;if(t!=null&&t.imageId)return Rs.state.connectorImages[t.imageId]}},PP={goBackOrCloseModal(){ke.state.history.length>1?ke.goBack():dn.close()},navigateAfterNetworkSwitch(){const{history:t}=ke.state,e=t.findIndex(n=>n==="Networks");e>=1?ke.goBackToIndex(e-1):dn.close()},navigateAfterPreferredAccountTypeSelect(){const{isSiweEnabled:t}=pt.state;t&&Qe.state.activeChain===Bi.CHAIN.EVM?ke.push("ConnectingSiwe"):ke.push("Account")}};/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const iE=globalThis,QB=iE.ShadowRoot&&(iE.ShadyCSS===void 0||iE.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ZB=Symbol(),qV=new WeakMap;let Kte=class{constructor(e,n,r){if(this._$cssResult$=!0,r!==ZB)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o;const n=this.t;if(QB&&e===void 0){const r=n!==void 0&&n.length===1;r&&(e=qV.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&qV.set(n,e))}return e}toString(){return this.cssText}};const Gc=t=>new Kte(typeof t=="string"?t:t+"",void 0,ZB),De=(t,...e)=>{const n=t.length===1?t[0]:e.reduce((r,i,s)=>r+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1],t[0]);return new Kte(n,t,ZB)},RRe=(t,e)=>{if(QB)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const r=document.createElement("style"),i=iE.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=n.cssText,t.appendChild(r)}},GV=QB?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const r of e.cssRules)n+=r.cssText;return Gc(n)})(t):t;/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const{is:NRe,defineProperty:PRe,getOwnPropertyDescriptor:ORe,getOwnPropertyNames:DRe,getOwnPropertySymbols:MRe,getPrototypeOf:BRe}=Object,a0=globalThis,KV=a0.trustedTypes,$Re=KV?KV.emptyScript:"",Sk=a0.reactiveElementPolyfillSupport,D3=(t,e)=>t,EC={toAttribute(t,e){switch(e){case Boolean:t=t?$Re:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=t!==null;break;case Number:n=t===null?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch{n=null}}return n}},JB=(t,e)=>!NRe(t,e),YV={attribute:!0,type:String,converter:EC,reflect:!1,hasChanged:JB};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),a0.litPropertyMetadata??(a0.litPropertyMetadata=new WeakMap);class zw extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,n=YV){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(e,n),!n.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(e,r,n);i!==void 0&&PRe(this.prototype,e,i)}}static getPropertyDescriptor(e,n,r){const{get:i,set:s}=ORe(this.prototype,e)??{get(){return this[n]},set(o){this[n]=o}};return{get(){return i==null?void 0:i.call(this)},set(o){const a=i==null?void 0:i.call(this);s.call(this,o),this.requestUpdate(e,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??YV}static _$Ei(){if(this.hasOwnProperty(D3("elementProperties")))return;const e=BRe(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(D3("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(D3("properties"))){const n=this.properties,r=[...DRe(n),...MRe(n)];for(const i of r)this.createProperty(i,n[i])}const e=this[Symbol.metadata];if(e!==null){const n=litPropertyMetadata.get(e);if(n!==void 0)for(const[r,i]of n)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[n,r]of this.elementProperties){const i=this._$Eu(n,r);i!==void 0&&this._$Eh.set(i,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const i of r)n.unshift(GV(i))}else e!==void 0&&n.push(GV(e));return n}static _$Eu(e,n){const r=n.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(n=>n(this))}addController(e){var n;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((n=e.hostConnected)==null||n.call(e))}removeController(e){var n;(n=this._$EO)==null||n.delete(e)}_$E_(){const e=new Map,n=this.constructor.elementProperties;for(const r of n.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return RRe(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(n=>{var r;return(r=n.hostConnected)==null?void 0:r.call(n)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(n=>{var r;return(r=n.hostDisconnected)==null?void 0:r.call(n)})}attributeChangedCallback(e,n,r){this._$AK(e,r)}_$EC(e,n){var s;const r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(i!==void 0&&r.reflect===!0){const o=(((s=r.converter)==null?void 0:s.toAttribute)!==void 0?r.converter:EC).toAttribute(n,r.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,n){var s;const r=this.constructor,i=r._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const o=r.getPropertyOptions(i),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)==null?void 0:s.fromAttribute)!==void 0?o.converter:EC;this._$Em=i,this[i]=a.fromAttribute(n,o.type),this._$Em=null}}requestUpdate(e,n,r){if(e!==void 0){if(r??(r=this.constructor.getPropertyOptions(e)),!(r.hasChanged??JB)(this[e],n))return;this.P(e,n,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,n,r){this._$AL.has(e)||this._$AL.set(e,n),r.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,o]of this._$Ep)this[s]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[s,o]of i)o.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],o)}let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),(r=this._$EO)==null||r.forEach(i=>{var s;return(s=i.hostUpdate)==null?void 0:s.call(i)}),this.update(n)):this._$EU()}catch(i){throw e=!1,this._$EU(),i}e&&this._$AE(n)}willUpdate(e){}_$AE(e){var n;(n=this._$EO)==null||n.forEach(r=>{var i;return(i=r.hostUpdated)==null?void 0:i.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EC(n,this[n]))),this._$EU()}updated(e){}firstUpdated(e){}}zw.elementStyles=[],zw.shadowRootOptions={mode:"open"},zw[D3("elementProperties")]=new Map,zw[D3("finalized")]=new Map,Sk==null||Sk({ReactiveElement:zw}),(a0.reactiveElementVersions??(a0.reactiveElementVersions=[])).push("2.0.4");/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const M3=globalThis,CC=M3.trustedTypes,QV=CC?CC.createPolicy("lit-html",{createHTML:t=>t}):void 0,Yte="$lit$",Pp=`lit$${Math.random().toFixed(9).slice(2)}$`,Qte="?"+Pp,jRe=`<${Qte}>`,Fg=document,Z5=()=>Fg.createComment(""),J5=t=>t===null||typeof t!="object"&&typeof t!="function",XB=Array.isArray,LRe=t=>XB(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",Tk=`[ 	
\f\r]`,H2=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ZV=/-->/g,JV=/>/g,km=RegExp(`>|${Tk}(?:([^\\s"'>=/]+)(${Tk}*=${Tk}*(?:[^ 	
\f\r"'\`<>=]|("|')|))|$)`,"g"),XV=/'/g,eq=/"/g,Zte=/^(?:script|style|textarea|title)$/i,Jte=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),K=Jte(1),Ze=Jte(2),zg=Symbol.for("lit-noChange"),Qi=Symbol.for("lit-nothing"),tq=new WeakMap,Km=Fg.createTreeWalker(Fg,129);function Xte(t,e){if(!XB(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return QV!==void 0?QV.createHTML(e):e}const URe=(t,e)=>{const n=t.length-1,r=[];let i,s=e===2?"<svg>":e===3?"<math>":"",o=H2;for(let a=0;a<n;a++){const c=t[a];let l,u,d=-1,h=0;for(;h<c.length&&(o.lastIndex=h,u=o.exec(c),u!==null);)h=o.lastIndex,o===H2?u[1]==="!--"?o=ZV:u[1]!==void 0?o=JV:u[2]!==void 0?(Zte.test(u[2])&&(i=RegExp("</"+u[2],"g")),o=km):u[3]!==void 0&&(o=km):o===km?u[0]===">"?(o=i??H2,d=-1):u[1]===void 0?d=-2:(d=o.lastIndex-u[2].length,l=u[1],o=u[3]===void 0?km:u[3]==='"'?eq:XV):o===eq||o===XV?o=km:o===ZV||o===JV?o=H2:(o=km,i=void 0);const g=o===km&&t[a+1].startsWith("/>")?" ":"";s+=o===H2?c+jRe:d>=0?(r.push(l),c.slice(0,d)+Yte+c.slice(d)+Pp+g):c+Pp+(d===-2?a:g)}return[Xte(t,s+(t[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};class X5{constructor({strings:e,_$litType$:n},r){let i;this.parts=[];let s=0,o=0;const a=e.length-1,c=this.parts,[l,u]=URe(e,n);if(this.el=X5.createElement(l,r),Km.currentNode=this.el.content,n===2||n===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(i=Km.nextNode())!==null&&c.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const d of i.getAttributeNames())if(d.endsWith(Yte)){const h=u[o++],g=i.getAttribute(d).split(Pp),w=/([.?@])?(.*)/.exec(h);c.push({type:1,index:s,name:w[2],strings:g,ctor:w[1]==="."?zRe:w[1]==="?"?HRe:w[1]==="@"?WRe:s9}),i.removeAttribute(d)}else d.startsWith(Pp)&&(c.push({type:6,index:s}),i.removeAttribute(d));if(Zte.test(i.tagName)){const d=i.textContent.split(Pp),h=d.length-1;if(h>0){i.textContent=CC?CC.emptyScript:"";for(let g=0;g<h;g++)i.append(d[g],Z5()),Km.nextNode(),c.push({type:2,index:++s});i.append(d[h],Z5())}}}else if(i.nodeType===8)if(i.data===Qte)c.push({type:2,index:s});else{let d=-1;for(;(d=i.data.indexOf(Pp,d+1))!==-1;)c.push({type:7,index:s}),d+=Pp.length-1}s++}}static createElement(e,n){const r=Fg.createElement("template");return r.innerHTML=e,r}}function _v(t,e,n=t,r){var o,a;if(e===zg)return e;let i=r!==void 0?(o=n.o)==null?void 0:o[r]:n.l;const s=J5(e)?void 0:e._$litDirective$;return(i==null?void 0:i.constructor)!==s&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),s===void 0?i=void 0:(i=new s(t),i._$AT(t,n,r)),r!==void 0?(n.o??(n.o=[]))[r]=i:n.l=i),i!==void 0&&(e=_v(t,i._$AS(t,e.values),i,r)),e}class FRe{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:n},parts:r}=this._$AD,i=((e==null?void 0:e.creationScope)??Fg).importNode(n,!0);Km.currentNode=i;let s=Km.nextNode(),o=0,a=0,c=r[0];for(;c!==void 0;){if(o===c.index){let l;c.type===2?l=new H6(s,s.nextSibling,this,e):c.type===1?l=new c.ctor(s,c.name,c.strings,this,e):c.type===6&&(l=new VRe(s,this,e)),this._$AV.push(l),c=r[++a]}o!==(c==null?void 0:c.index)&&(s=Km.nextNode(),o++)}return Km.currentNode=Fg,i}p(e){let n=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,n),n+=r.strings.length-2):r._$AI(e[n])),n++}}class H6{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this.v}constructor(e,n,r,i){this.type=2,this._$AH=Qi,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=r,this.options=i,this.v=(i==null?void 0:i.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=_v(this,e,n),J5(e)?e===Qi||e==null||e===""?(this._$AH!==Qi&&this._$AR(),this._$AH=Qi):e!==this._$AH&&e!==zg&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):LRe(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Qi&&J5(this._$AH)?this._$AA.nextSibling.data=e:this.T(Fg.createTextNode(e)),this._$AH=e}$(e){var s;const{values:n,_$litType$:r}=e,i=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=X5.createElement(Xte(r.h,r.h[0]),this.options)),r);if(((s=this._$AH)==null?void 0:s._$AD)===i)this._$AH.p(n);else{const o=new FRe(i,this),a=o.u(this.options);o.p(n),this.T(a),this._$AH=o}}_$AC(e){let n=tq.get(e.strings);return n===void 0&&tq.set(e.strings,n=new X5(e)),n}k(e){XB(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,i=0;for(const s of e)i===n.length?n.push(r=new H6(this.O(Z5()),this.O(Z5()),this,this.options)):r=n[i],r._$AI(s),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,n){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,n);e&&e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){var n;this._$AM===void 0&&(this.v=e,(n=this._$AP)==null||n.call(this,e))}}let s9=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,n,r,i,s){this.type=1,this._$AH=Qi,this._$AN=void 0,this.element=e,this.name=n,this._$AM=i,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Qi}_$AI(e,n=this,r,i){const s=this.strings;let o=!1;if(s===void 0)e=_v(this,e,n,0),o=!J5(e)||e!==this._$AH&&e!==zg,o&&(this._$AH=e);else{const a=e;let c,l;for(e=s[0],c=0;c<s.length-1;c++)l=_v(this,a[r+c],n,c),l===zg&&(l=this._$AH[c]),o||(o=!J5(l)||l!==this._$AH[c]),l===Qi?e=Qi:e!==Qi&&(e+=(l??"")+s[c+1]),this._$AH[c]=l}o&&!i&&this.j(e)}j(e){e===Qi?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}};class zRe extends s9{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Qi?void 0:e}}class HRe extends s9{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Qi)}}let WRe=class extends s9{constructor(e,n,r,i,s){super(e,n,r,i,s),this.type=5}_$AI(e,n=this){if((e=_v(this,e,n,0)??Qi)===zg)return;const r=this._$AH,i=e===Qi&&r!==Qi||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==Qi&&(r===Qi||i);i&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n;typeof this._$AH=="function"?this._$AH.call(((n=this.options)==null?void 0:n.host)??this.element,e):this._$AH.handleEvent(e)}};class VRe{constructor(e,n,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){_v(this,e)}}const Ik=M3.litHtmlPolyfillSupport;Ik==null||Ik(X5,H6),(M3.litHtmlVersions??(M3.litHtmlVersions=[])).push("3.2.0");const qRe=(t,e,n)=>{const r=(n==null?void 0:n.renderBefore)??e;let i=r._$litPart$;if(i===void 0){const s=(n==null?void 0:n.renderBefore)??null;r._$litPart$=i=new H6(e.insertBefore(Z5(),s),s,void 0,n??{})}return i._$AI(t),i};/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */let Te=class extends zw{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var n;const e=super.createRenderRoot();return(n=this.renderOptions).renderBefore??(n.renderBefore=e.firstChild),e}update(e){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.o=qRe(n,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this.o)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.o)==null||e.setConnected(!1)}render(){return zg}};var PK;Te._$litElement$=!0,Te.finalized=!0,(PK=globalThis.litElementHydrateSupport)==null||PK.call(globalThis,{LitElement:Te});const kk=globalThis.litElementPolyfillSupport;kk==null||kk({LitElement:Te});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.0");let B3,c0,l0;function ust(t,e){B3=document.createElement("style"),c0=document.createElement("style"),l0=document.createElement("style"),B3.textContent=Ny(t).core.cssText,c0.textContent=Ny(t).dark.cssText,l0.textContent=Ny(t).light.cssText,document.head.appendChild(B3),document.head.appendChild(c0),document.head.appendChild(l0),ene(e)}function ene(t){c0&&l0&&(t==="light"?(c0.removeAttribute("media"),l0.media="enabled"):(l0.removeAttribute("media"),c0.media="enabled"))}function GRe(t){B3&&c0&&l0&&(B3.textContent=Ny(t).core.cssText,c0.textContent=Ny(t).dark.cssText,l0.textContent=Ny(t).light.cssText)}function Ny(t){return{core:De`
      @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
      :root {
        --w3m-modal-width: 360px;
        --w3m-color-mix-strength: ${Gc(t!=null&&t["--w3m-color-mix-strength"]?`${t["--w3m-color-mix-strength"]}%`:"0%")};
        --w3m-font-family: ${Gc((t==null?void 0:t["--w3m-font-family"])||"Inter, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;")};
        --w3m-font-size-master: ${Gc((t==null?void 0:t["--w3m-font-size-master"])||"10px")};
        --w3m-border-radius-master: ${Gc((t==null?void 0:t["--w3m-border-radius-master"])||"4px")};
        --w3m-z-index: ${Gc((t==null?void 0:t["--w3m-z-index"])||999)};

        --wui-font-family: var(--w3m-font-family);

        --wui-font-size-mini: calc(var(--w3m-font-size-master) * 0.8);
        --wui-font-size-micro: var(--w3m-font-size-master);
        --wui-font-size-tiny: calc(var(--w3m-font-size-master) * 1.2);
        --wui-font-size-small: calc(var(--w3m-font-size-master) * 1.4);
        --wui-font-size-paragraph: calc(var(--w3m-font-size-master) * 1.6);
        --wui-font-size-medium: calc(var(--w3m-font-size-master) * 1.8);
        --wui-font-size-large: calc(var(--w3m-font-size-master) * 2);
        --wui-font-size-title-6: calc(var(--w3m-font-size-master) * 2.2);
        --wui-font-size-medium-title: calc(var(--w3m-font-size-master) * 2.4);
        --wui-font-size-2xl: calc(var(--w3m-font-size-master) * 4);

        --wui-border-radius-5xs: var(--w3m-border-radius-master);
        --wui-border-radius-4xs: calc(var(--w3m-border-radius-master) * 1.5);
        --wui-border-radius-3xs: calc(var(--w3m-border-radius-master) * 2);
        --wui-border-radius-xxs: calc(var(--w3m-border-radius-master) * 3);
        --wui-border-radius-xs: calc(var(--w3m-border-radius-master) * 4);
        --wui-border-radius-s: calc(var(--w3m-border-radius-master) * 5);
        --wui-border-radius-m: calc(var(--w3m-border-radius-master) * 7);
        --wui-border-radius-l: calc(var(--w3m-border-radius-master) * 9);
        --wui-border-radius-3xl: calc(var(--w3m-border-radius-master) * 20);

        --wui-font-weight-light: 400;
        --wui-font-weight-regular: 500;
        --wui-font-weight-medium: 600;
        --wui-font-weight-bold: 700;

        --wui-letter-spacing-2xl: -1.6px;
        --wui-letter-spacing-medium-title: -0.96px;
        --wui-letter-spacing-title-6: -0.88px;
        --wui-letter-spacing-large: -0.8px;
        --wui-letter-spacing-medium: -0.72px;
        --wui-letter-spacing-paragraph: -0.64px;
        --wui-letter-spacing-small: -0.56px;
        --wui-letter-spacing-tiny: -0.48px;
        --wui-letter-spacing-micro: -0.2px;
        --wui-letter-spacing-mini: -0.16px;

        --wui-spacing-0: 0px;
        --wui-spacing-4xs: 2px;
        --wui-spacing-3xs: 4px;
        --wui-spacing-xxs: 6px;
        --wui-spacing-2xs: 7px;
        --wui-spacing-xs: 8px;
        --wui-spacing-1xs: 10px;
        --wui-spacing-s: 12px;
        --wui-spacing-m: 14px;
        --wui-spacing-l: 16px;
        --wui-spacing-2l: 18px;
        --wui-spacing-xl: 20px;
        --wui-spacing-xxl: 24px;
        --wui-spacing-2xl: 32px;
        --wui-spacing-3xl: 40px;
        --wui-spacing-4xl: 90px;
        --wui-spacing-5xl: 95px;

        --wui-icon-box-size-xxs: 14px;
        --wui-icon-box-size-xs: 20px;
        --wui-icon-box-size-sm: 24px;
        --wui-icon-box-size-md: 32px;
        --wui-icon-box-size-lg: 40px;
        --wui-icon-box-size-2lg: 48px;
        --wui-icon-box-size-xl: 64px;

        --wui-icon-size-inherit: inherit;
        --wui-icon-size-xxs: 10px;
        --wui-icon-size-xs: 12px;
        --wui-icon-size-sm: 14px;
        --wui-icon-size-md: 16px;
        --wui-icon-size-mdl: 18px;
        --wui-icon-size-lg: 20px;
        --wui-icon-size-xl: 24px;
        --wui-icon-size-xxl: 28px;

        --wui-wallet-image-size-inherit: inherit;
        --wui-wallet-image-size-sm: 40px;
        --wui-wallet-image-size-md: 56px;
        --wui-wallet-image-size-lg: 80px;

        --wui-visual-size-size-inherit: inherit;
        --wui-visual-size-sm: 40px;
        --wui-visual-size-md: 55px;
        --wui-visual-size-lg: 80px;

        --wui-box-size-md: 100px;
        --wui-box-size-lg: 120px;

        --wui-ease-out-power-2: cubic-bezier(0, 0, 0.22, 1);
        --wui-ease-out-power-1: cubic-bezier(0, 0, 0.55, 1);

        --wui-ease-in-power-3: cubic-bezier(0.66, 0, 1, 1);
        --wui-ease-in-power-2: cubic-bezier(0.45, 0, 1, 1);
        --wui-ease-in-power-1: cubic-bezier(0.3, 0, 1, 1);

        --wui-ease-inout-power-1: cubic-bezier(0.45, 0, 0.55, 1);

        --wui-duration-lg: 200ms;
        --wui-duration-md: 125ms;
        --wui-duration-sm: 75ms;

        --wui-path-network-sm: path(
          'M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.61 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z'
        );

        --wui-path-network-md: path(
          'M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z'
        );

        --wui-path-network-lg: path(
          'M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z'
        );

        --wui-width-network-sm: 36px;
        --wui-width-network-md: 48px;
        --wui-width-network-lg: 86px;

        --wui-height-network-sm: 40px;
        --wui-height-network-md: 54px;
        --wui-height-network-lg: 96px;

        --wui-icon-size-network-xs: 12px;
        --wui-icon-size-network-sm: 16px;
        --wui-icon-size-network-md: 24px;
        --wui-icon-size-network-lg: 42px;

        --wui-color-inherit: inherit;

        --wui-color-inverse-100: #fff;
        --wui-color-inverse-000: #000;

        --wui-cover: rgba(20, 20, 20, 0.8);

        --wui-color-modal-bg: var(--wui-color-modal-bg-base);

        --wui-color-accent-100: var(--wui-color-accent-base-100);
        --wui-color-accent-090: var(--wui-color-accent-base-090);
        --wui-color-accent-080: var(--wui-color-accent-base-080);

        --wui-color-success-100: var(--wui-color-success-base-100);

        --wui-color-error-100: var(--wui-color-error-base-100);

        --wui-icon-box-bg-error-100: var(--wui-icon-box-bg-error-base-100);
        --wui-icon-box-bg-blue-100: var(--wui-icon-box-bg-blue-base-100);
        --wui-icon-box-bg-success-100: var(--wui-icon-box-bg-success-base-100);
        --wui-icon-box-bg-inverse-100: var(--wui-icon-box-bg-inverse-base-100);

        --wui-all-wallets-bg-100: var(--wui-all-wallets-bg-100);

        --wui-avatar-border: var(--wui-avatar-border-base);

        --wui-thumbnail-border: var(--wui-thumbnail-border-base);

        --wui-box-shadow-blue: var(--wui-color-accent-glass-020);
      }

      @supports (background: color-mix(in srgb, white 50%, black)) {
        :root {
          --wui-color-modal-bg: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-modal-bg-base)
          );

          --wui-box-shadow-blue: color-mix(in srgb, var(--wui-color-accent-100) 20%, transparent);

          --wui-color-accent-100: color-mix(
            in srgb,
            var(--wui-color-accent-base-100) 100%,
            transparent
          );
          --wui-color-accent-090: color-mix(
            in srgb,
            var(--wui-color-accent-base-100) 90%,
            transparent
          );
          --wui-color-accent-080: color-mix(
            in srgb,
            var(--wui-color-accent-base-100) 80%,
            transparent
          );
          --wui-color-accent-glass-090: color-mix(
            in srgb,
            var(--wui-color-accent-base-100) 90%,
            transparent
          );
          --wui-color-accent-glass-080: color-mix(
            in srgb,
            var(--wui-color-accent-base-100) 80%,
            transparent
          );
          --wui-color-accent-glass-020: color-mix(
            in srgb,
            var(--wui-color-accent-base-100) 20%,
            transparent
          );
          --wui-color-accent-glass-015: color-mix(
            in srgb,
            var(--wui-color-accent-base-100) 15%,
            transparent
          );
          --wui-color-accent-glass-010: color-mix(
            in srgb,
            var(--wui-color-accent-base-100) 10%,
            transparent
          );
          --wui-color-accent-glass-005: color-mix(
            in srgb,
            var(--wui-color-accent-base-100) 5%,
            transparent
          );
          --wui-color-accent-002: color-mix(
            in srgb,
            var(--wui-color-accent-base-100) 2%,
            transparent
          );

          --wui-color-fg-100: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-fg-100)
          );
          --wui-color-fg-125: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-fg-125)
          );
          --wui-color-fg-150: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-fg-150)
          );
          --wui-color-fg-175: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-fg-175)
          );
          --wui-color-fg-200: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-fg-200)
          );
          --wui-color-fg-225: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-fg-225)
          );
          --wui-color-fg-250: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-fg-250)
          );
          --wui-color-fg-275: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-fg-275)
          );
          --wui-color-fg-300: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-fg-300)
          );

          --wui-color-bg-100: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-bg-100)
          );
          --wui-color-bg-125: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-bg-125)
          );
          --wui-color-bg-150: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-bg-150)
          );
          --wui-color-bg-175: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-bg-175)
          );
          --wui-color-bg-200: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-bg-200)
          );
          --wui-color-bg-225: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-bg-225)
          );
          --wui-color-bg-250: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-bg-250)
          );
          --wui-color-bg-275: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-bg-275)
          );
          --wui-color-bg-300: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-bg-300)
          );

          --wui-color-success-100: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-success-base-100)
          );
          --wui-color-error-100: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-color-error-base-100)
          );

          --wui-icon-box-bg-error-100: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-icon-box-bg-error-base-100)
          );
          --wui-icon-box-bg-accent-100: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-icon-box-bg-blue-base-100)
          );
          --wui-icon-box-bg-success-100: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-icon-box-bg-success-base-100)
          );
          --wui-icon-box-bg-inverse-100: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-icon-box-bg-inverse-base-100)
          );

          --wui-all-wallets-bg-100: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-all-wallets-bg-100)
          );

          --wui-avatar-border: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-avatar-border-base)
          );

          --wui-thumbnail-border: color-mix(
            in srgb,
            var(--w3m-color-mix) var(--w3m-color-mix-strength),
            var(--wui-thumbnail-border-base)
          );
        }
      }
    `,light:De`
      :root {
        --w3m-color-mix: ${Gc((t==null?void 0:t["--w3m-color-mix"])||"#fff")};
        --w3m-accent: ${Gc(Wp(t,"dark")["--w3m-accent"])};
        --w3m-default: #fff;

        --wui-color-modal-bg-base: ${Gc(Wp(t,"dark")["--w3m-background"])};
        --wui-color-accent-base-100: var(--w3m-accent);

        --wui-color-blueberry-100: hsla(230, 100%, 67%, 1);
        --wui-color-blueberry-090: hsla(231, 76%, 61%, 1);
        --wui-color-blueberry-080: hsla(230, 59%, 55%, 1);
        --wui-color-blueberry-050: hsla(231, 100%, 70%, 0.1);

        --wui-color-fg-100: #e4e7e7;
        --wui-color-fg-125: #d0d5d5;
        --wui-color-fg-150: #a8b1b1;
        --wui-color-fg-175: #a8b0b0;
        --wui-color-fg-200: #949e9e;
        --wui-color-fg-225: #868f8f;
        --wui-color-fg-250: #788080;
        --wui-color-fg-275: #788181;
        --wui-color-fg-300: #6e7777;

        --wui-color-bg-100: #141414;
        --wui-color-bg-125: #191a1a;
        --wui-color-bg-150: #1e1f1f;
        --wui-color-bg-175: #222525;
        --wui-color-bg-200: #272a2a;
        --wui-color-bg-225: #2c3030;
        --wui-color-bg-250: #313535;
        --wui-color-bg-275: #363b3b;
        --wui-color-bg-300: #3b4040;

        --wui-color-success-base-100: #26d962;
        --wui-color-error-base-100: #f25a67;

        --wui-color-success-glass-001: rgba(38, 217, 98, 0.01);
        --wui-color-success-glass-002: rgba(38, 217, 98, 0.02);
        --wui-color-success-glass-005: rgba(38, 217, 98, 0.05);
        --wui-color-success-glass-010: rgba(38, 217, 98, 0.1);
        --wui-color-success-glass-015: rgba(38, 217, 98, 0.15);
        --wui-color-success-glass-020: rgba(38, 217, 98, 0.2);
        --wui-color-success-glass-025: rgba(38, 217, 98, 0.25);
        --wui-color-success-glass-030: rgba(38, 217, 98, 0.3);
        --wui-color-success-glass-060: rgba(38, 217, 98, 0.6);
        --wui-color-success-glass-080: rgba(38, 217, 98, 0.8);

        --wui-color-error-glass-001: rgba(242, 90, 103, 0.01);
        --wui-color-error-glass-002: rgba(242, 90, 103, 0.02);
        --wui-color-error-glass-005: rgba(242, 90, 103, 0.05);
        --wui-color-error-glass-010: rgba(242, 90, 103, 0.1);
        --wui-color-error-glass-015: rgba(242, 90, 103, 0.15);
        --wui-color-error-glass-020: rgba(242, 90, 103, 0.2);
        --wui-color-error-glass-025: rgba(242, 90, 103, 0.25);
        --wui-color-error-glass-030: rgba(242, 90, 103, 0.3);
        --wui-color-error-glass-060: rgba(242, 90, 103, 0.6);
        --wui-color-error-glass-080: rgba(242, 90, 103, 0.8);

        --wui-color-gray-glass-001: rgba(255, 255, 255, 0.01);
        --wui-color-gray-glass-002: rgba(255, 255, 255, 0.02);
        --wui-color-gray-glass-005: rgba(255, 255, 255, 0.05);
        --wui-color-gray-glass-010: rgba(255, 255, 255, 0.1);
        --wui-color-gray-glass-015: rgba(255, 255, 255, 0.15);
        --wui-color-gray-glass-020: rgba(255, 255, 255, 0.2);
        --wui-color-gray-glass-025: rgba(255, 255, 255, 0.25);
        --wui-color-gray-glass-030: rgba(255, 255, 255, 0.3);
        --wui-color-gray-glass-060: rgba(255, 255, 255, 0.6);
        --wui-color-gray-glass-080: rgba(255, 255, 255, 0.8);
        --wui-color-gray-glass-090: rgba(255, 255, 255, 0.9);

        --wui-icon-box-bg-error-base-100: #3c2426;
        --wui-icon-box-bg-blue-base-100: #20303f;
        --wui-icon-box-bg-success-base-100: #1f3a28;
        --wui-icon-box-bg-inverse-base-100: #243240;

        --wui-all-wallets-bg-100: #222b35;

        --wui-avatar-border-base: #252525;

        --wui-thumbnail-border-base: #252525;
      }
    `,dark:De`
      :root {
        --w3m-color-mix: ${Gc((t==null?void 0:t["--w3m-color-mix"])||"#000")};
        --w3m-accent: ${Gc(Wp(t,"light")["--w3m-accent"])};
        --w3m-default: #000;

        --wui-color-modal-bg-base: ${Gc(Wp(t,"light")["--w3m-background"])};
        --wui-color-accent-base-100: var(--w3m-accent);

        --wui-color-blueberry-100: hsla(231, 100%, 70%, 1);
        --wui-color-blueberry-090: hsla(231, 97%, 72%, 1);
        --wui-color-blueberry-080: hsla(231, 92%, 74%, 1);

        --wui-color-fg-100: #141414;
        --wui-color-fg-125: #2d3131;
        --wui-color-fg-150: #474d4d;
        --wui-color-fg-175: #636d6d;
        --wui-color-fg-200: #798686;
        --wui-color-fg-225: #828f8f;
        --wui-color-fg-250: #8b9797;
        --wui-color-fg-275: #95a0a0;
        --wui-color-fg-300: #9ea9a9;

        --wui-color-bg-100: #ffffff;
        --wui-color-bg-125: #f5fafa;
        --wui-color-bg-150: #f3f8f8;
        --wui-color-bg-175: #eef4f4;
        --wui-color-bg-200: #eaf1f1;
        --wui-color-bg-225: #e5eded;
        --wui-color-bg-250: #e1e9e9;
        --wui-color-bg-275: #dce7e7;
        --wui-color-bg-300: #d8e3e3;

        --wui-color-success-base-100: #26b562;
        --wui-color-error-base-100: #f05142;

        --wui-color-success-glass-001: rgba(38, 181, 98, 0.01);
        --wui-color-success-glass-002: rgba(38, 181, 98, 0.02);
        --wui-color-success-glass-005: rgba(38, 181, 98, 0.05);
        --wui-color-success-glass-010: rgba(38, 181, 98, 0.1);
        --wui-color-success-glass-015: rgba(38, 181, 98, 0.15);
        --wui-color-success-glass-020: rgba(38, 181, 98, 0.2);
        --wui-color-success-glass-025: rgba(38, 181, 98, 0.25);
        --wui-color-success-glass-030: rgba(38, 181, 98, 0.3);
        --wui-color-success-glass-060: rgba(38, 181, 98, 0.6);
        --wui-color-success-glass-080: rgba(38, 181, 98, 0.8);

        --wui-color-error-glass-001: rgba(240, 81, 66, 0.01);
        --wui-color-error-glass-002: rgba(240, 81, 66, 0.02);
        --wui-color-error-glass-005: rgba(240, 81, 66, 0.05);
        --wui-color-error-glass-010: rgba(240, 81, 66, 0.1);
        --wui-color-error-glass-015: rgba(240, 81, 66, 0.15);
        --wui-color-error-glass-020: rgba(240, 81, 66, 0.2);
        --wui-color-error-glass-025: rgba(240, 81, 66, 0.25);
        --wui-color-error-glass-030: rgba(240, 81, 66, 0.3);
        --wui-color-error-glass-060: rgba(240, 81, 66, 0.6);
        --wui-color-error-glass-080: rgba(240, 81, 66, 0.8);

        --wui-icon-box-bg-error-base-100: #f4dfdd;
        --wui-icon-box-bg-blue-base-100: #d9ecfb;
        --wui-icon-box-bg-success-base-100: #daf0e4;
        --wui-icon-box-bg-inverse-base-100: #dcecfc;

        --wui-all-wallets-bg-100: #e8f1fa;

        --wui-avatar-border-base: #f3f4f4;

        --wui-thumbnail-border-base: #eaefef;

        --wui-color-gray-glass-001: rgba(0, 0, 0, 0.01);
        --wui-color-gray-glass-002: rgba(0, 0, 0, 0.02);
        --wui-color-gray-glass-005: rgba(0, 0, 0, 0.05);
        --wui-color-gray-glass-010: rgba(0, 0, 0, 0.1);
        --wui-color-gray-glass-015: rgba(0, 0, 0, 0.15);
        --wui-color-gray-glass-020: rgba(0, 0, 0, 0.2);
        --wui-color-gray-glass-025: rgba(0, 0, 0, 0.25);
        --wui-color-gray-glass-030: rgba(0, 0, 0, 0.3);
        --wui-color-gray-glass-060: rgba(0, 0, 0, 0.6);
        --wui-color-gray-glass-080: rgba(0, 0, 0, 0.8);
        --wui-color-gray-glass-090: rgba(0, 0, 0, 0.9);
      }
    `}}const Et=De`
  *,
  *::after,
  *::before,
  :host {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-style: normal;
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--wui-font-family);
    backface-visibility: hidden;
  }
`,Sn=De`
  button,
  a {
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition:
      color var(--wui-duration-lg) var(--wui-ease-out-power-1),
      background-color var(--wui-duration-lg) var(--wui-ease-out-power-1),
      border var(--wui-duration-lg) var(--wui-ease-out-power-1),
      box-shadow var(--wui-duration-lg) var(--wui-ease-out-power-1);
    will-change: background-color, color, border, box-shadow;
    outline: none;
    border: none;
    column-gap: var(--wui-spacing-3xs);
    background-color: transparent;
    text-decoration: none;
  }

  button:disabled > wui-wallet-image,
  button:disabled > wui-all-wallets-image,
  button:disabled > wui-network-image,
  button:disabled > wui-image,
  button:disabled > wui-transaction-visual,
  button:disabled > wui-logo {
    filter: grayscale(1);
  }

  @media (hover: hover) and (pointer: fine) {
    button:hover:enabled {
      background-color: var(--wui-color-gray-glass-005);
    }

    button:active:enabled {
      background-color: var(--wui-color-gray-glass-010);
    }
  }

  button:disabled > wui-icon-box {
    opacity: 0.5;
  }

  input {
    border: none;
    outline: none;
    appearance: none;
  }
`,e$=De`
  .wui-color-inherit {
    color: var(--wui-color-inherit);
  }

  .wui-color-accent-100 {
    color: var(--wui-color-accent-100);
  }

  .wui-color-error-100 {
    color: var(--wui-color-error-100);
  }

  .wui-color-success-100 {
    color: var(--wui-color-success-100);
  }

  .wui-color-inverse-100 {
    color: var(--wui-color-inverse-100);
  }

  .wui-color-inverse-000 {
    color: var(--wui-color-inverse-000);
  }

  .wui-color-fg-100 {
    color: var(--wui-color-fg-100);
  }

  .wui-color-fg-200 {
    color: var(--wui-color-fg-200);
  }

  .wui-color-fg-300 {
    color: var(--wui-color-fg-300);
  }

  .wui-bg-color-inherit {
    background-color: var(--wui-color-inherit);
  }

  .wui-bg-color-blue-100 {
    background-color: var(--wui-color-accent-100);
  }

  .wui-bg-color-error-100 {
    background-color: var(--wui-color-error-100);
  }

  .wui-bg-color-success-100 {
    background-color: var(--wui-color-success-100);
  }

  .wui-bg-color-inverse-100 {
    background-color: var(--wui-color-inverse-100);
  }

  .wui-bg-color-inverse-000 {
    background-color: var(--wui-color-inverse-000);
  }

  .wui-bg-color-fg-100 {
    background-color: var(--wui-color-fg-100);
  }

  .wui-bg-color-fg-200 {
    background-color: var(--wui-color-fg-200);
  }

  .wui-bg-color-fg-300 {
    background-color: var(--wui-color-fg-300);
  }
`;function KRe(t,e){const{kind:n,elements:r}=e;return{kind:n,elements:r,finisher(i){customElements.get(t)||customElements.define(t,i)}}}function YRe(t,e){return customElements.get(t)||customElements.define(t,e),e}function Ce(t){return function(n){return typeof n=="function"?YRe(t,n):KRe(t,n)}}const QRe=De`
  :host {
    display: block;
    border-radius: clamp(0px, var(--wui-border-radius-l), 44px);
    box-shadow: 0 0 0 1px var(--wui-color-gray-glass-005);
    background-color: var(--wui-color-modal-bg);
    overflow: hidden;
  }
`;var ZRe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let OP=class extends Te{render(){return K`<slot></slot>`}};OP.styles=[Et,QRe];OP=ZRe([Ce("wui-card")],OP);/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const JRe={attribute:!0,type:String,converter:EC,reflect:!1,hasChanged:JB},XRe=(t=JRe,e,n)=>{const{kind:r,metadata:i}=n;let s=globalThis.litPropertyMetadata.get(i);if(s===void 0&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(n.name,t),r==="accessor"){const{name:o}=n;return{set(a){const c=e.get.call(this);e.set.call(this,a),this.requestUpdate(o,c,t)},init(a){return a!==void 0&&this.P(o,void 0,t),a}}}if(r==="setter"){const{name:o}=n;return function(a){const c=this[o];e.call(this,a),this.requestUpdate(o,c,t)}}throw Error("Unsupported decorator location: "+r)};function ne(t){return(e,n)=>typeof n=="object"?XRe(t,e,n):((r,i,s)=>{const o=i.hasOwnProperty(s);return i.constructor.createProperty(s,o?{...r,wrapped:!0}:r),o?Object.getOwnPropertyDescriptor(i,s):void 0})(t,e,n)}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function pe(t){return ne({...t,state:!0,attribute:!1})}const eNe=De`
  :host {
    display: flex;
    aspect-ratio: 1 / 1;
    color: var(--local-color);
    width: var(--local-width);
  }

  svg {
    width: inherit;
    height: inherit;
    object-fit: contain;
    object-position: center;
  }
`,tNe=Ze`<svg
  width="14"
  height="14"
  viewBox="0 0 14 14"
  fill="none"
  xmlns="http://www.w3.org/2000/svg"
>
  <path
    fill="currentColor"
    fill-rule="evenodd"
    clip-rule="evenodd"
    d="M7.0023 0.875C7.48571 0.875 7.8776 1.26675 7.8776 1.75V6.125H12.2541C12.7375 6.125 13.1294 6.51675 13.1294 7C13.1294 7.48325 12.7375 7.875 12.2541 7.875H7.8776V12.25C7.8776 12.7332 7.48571 13.125 7.0023 13.125C6.51889 13.125 6.12701 12.7332 6.12701 12.25V7.875H1.75054C1.26713 7.875 0.875244 7.48325 0.875244 7C0.875244 6.51675 1.26713 6.125 1.75054 6.125H6.12701V1.75C6.12701 1.26675 6.51889 0.875 7.0023 0.875Z"
    fill="#667dff"
  /></svg
>`,nNe=Ze`<svg fill="none" viewBox="0 0 24 24">
  <path
    style="fill: var(--wui-color-accent-100);"
    d="M10.2 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM10.2 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0Z"
  />
</svg>`,rNe=Ze`<svg
  fill="none"
  viewBox="0 0 21 20"
>
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M10.5 2.42908C6.31875 2.42908 2.92859 5.81989 2.92859 10.0034C2.92859 14.1869 6.31875 17.5777 10.5 17.5777C14.6813 17.5777 18.0714 14.1869 18.0714 10.0034C18.0714 5.81989 14.6813 2.42908 10.5 2.42908ZM0.928589 10.0034C0.928589 4.71596 5.21355 0.429077 10.5 0.429077C15.7865 0.429077 20.0714 4.71596 20.0714 10.0034C20.0714 15.2908 15.7865 19.5777 10.5 19.5777C5.21355 19.5777 0.928589 15.2908 0.928589 10.0034ZM10.5 5.75003C11.0523 5.75003 11.5 6.19774 11.5 6.75003L11.5 10.8343L12.7929 9.54137C13.1834 9.15085 13.8166 9.15085 14.2071 9.54137C14.5976 9.9319 14.5976 10.5651 14.2071 10.9556L11.2071 13.9556C10.8166 14.3461 10.1834 14.3461 9.79291 13.9556L6.79291 10.9556C6.40239 10.5651 6.40239 9.9319 6.79291 9.54137C7.18343 9.15085 7.8166 9.15085 8.20712 9.54137L9.50002 10.8343L9.50002 6.75003C9.50002 6.19774 9.94773 5.75003 10.5 5.75003Z"
    clip-rule="evenodd"
  /></svg
>`,iNe=Ze`
<svg width="36" height="36">
  <path
    d="M28.724 0H7.271A7.269 7.269 0 0 0 0 7.272v21.46A7.268 7.268 0 0 0 7.271 36H28.73A7.272 7.272 0 0 0 36 28.728V7.272A7.275 7.275 0 0 0 28.724 0Z"
    fill="url(#a)"
  />
  <path
    d="m17.845 8.271.729-1.26a1.64 1.64 0 1 1 2.843 1.638l-7.023 12.159h5.08c1.646 0 2.569 1.935 1.853 3.276H6.434a1.632 1.632 0 0 1-1.638-1.638c0-.909.73-1.638 1.638-1.638h4.176l5.345-9.265-1.67-2.898a1.642 1.642 0 0 1 2.844-1.638l.716 1.264Zm-6.317 17.5-1.575 2.732a1.64 1.64 0 1 1-2.844-1.638l1.17-2.025c1.323-.41 2.398-.095 3.249.931Zm13.56-4.954h4.262c.909 0 1.638.729 1.638 1.638 0 .909-.73 1.638-1.638 1.638h-2.367l1.597 2.772c.45.788.185 1.782-.602 2.241a1.642 1.642 0 0 1-2.241-.603c-2.69-4.666-4.711-8.159-6.052-10.485-1.372-2.367-.391-4.743.576-5.549 1.075 1.846 2.682 4.631 4.828 8.348Z"
    fill="#fff"
  />
  <defs>
    <linearGradient id="a" x1="18" y1="0" x2="18" y2="36" gradientUnits="userSpaceOnUse">
      <stop stop-color="#18BFFB" />
      <stop offset="1" stop-color="#2072F3" />
    </linearGradient>
  </defs>
</svg>`,sNe=Ze`<svg fill="none" viewBox="0 0 40 40">
  <g clip-path="url(#a)">
    <g clip-path="url(#b)">
      <circle cx="20" cy="19.89" r="20" fill="#000" />
      <g clip-path="url(#c)">
        <path
          fill="#fff"
          d="M28.77 23.3c-.69 1.99-2.75 5.52-4.87 5.56-1.4.03-1.86-.84-3.46-.84-1.61 0-2.12.81-3.45.86-2.25.1-5.72-5.1-5.72-9.62 0-4.15 2.9-6.2 5.42-6.25 1.36-.02 2.64.92 3.47.92.83 0 2.38-1.13 4.02-.97.68.03 2.6.28 3.84 2.08-3.27 2.14-2.76 6.61.75 8.25ZM24.2 7.88c-2.47.1-4.49 2.69-4.2 4.84 2.28.17 4.47-2.39 4.2-4.84Z"
        />
      </g>
    </g>
  </g>
  <defs>
    <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
    <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
    <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
  </defs>
</svg>`,oNe=Ze`<svg fill="none" viewBox="0 0 14 15">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M7 1.99a1 1 0 0 1 1 1v7.58l2.46-2.46a1 1 0 0 1 1.41 1.42L7.7 13.69a1 1 0 0 1-1.41 0L2.12 9.53A1 1 0 0 1 3.54 8.1L6 10.57V3a1 1 0 0 1 1-1Z"
    clip-rule="evenodd"
  />
</svg>`,aNe=Ze`<svg fill="none" viewBox="0 0 14 15">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M13 7.99a1 1 0 0 1-1 1H4.4l2.46 2.46a1 1 0 1 1-1.41 1.41L1.29 8.7a1 1 0 0 1 0-1.41L5.46 3.1a1 1 0 0 1 1.41 1.42L4.41 6.99H12a1 1 0 0 1 1 1Z"
    clip-rule="evenodd"
  />
</svg>`,cNe=Ze`<svg fill="none" viewBox="0 0 14 15">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M1 7.99a1 1 0 0 1 1-1h7.58L7.12 4.53A1 1 0 1 1 8.54 3.1l4.16 4.17a1 1 0 0 1 0 1.41l-4.16 4.17a1 1 0 1 1-1.42-1.41l2.46-2.46H2a1 1 0 0 1-1-1Z"
    clip-rule="evenodd"
  />
</svg>`,lNe=Ze`<svg fill="none" viewBox="0 0 14 15">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M7 13.99a1 1 0 0 1-1-1V5.4L3.54 7.86a1 1 0 0 1-1.42-1.41L6.3 2.28a1 1 0 0 1 1.41 0l4.17 4.17a1 1 0 1 1-1.41 1.41L8 5.4v7.59a1 1 0 0 1-1 1Z"
    clip-rule="evenodd"
  />
</svg>`,uNe=Ze`<svg
  xmlns="http://www.w3.org/2000/svg"
  width="12"
  height="13"
  viewBox="0 0 12 13"
  fill="none"
>
  <path
    fill-rule="evenodd"
    clip-rule="evenodd"
    d="M5.61391 1.57124C5.85142 1.42873 6.14813 1.42873 6.38564 1.57124L11.0793 4.38749C11.9179 4.89067 11.5612 6.17864 10.5832 6.17864H9.96398V10.0358H10.2854C10.6996 10.0358 11.0354 10.3716 11.0354 10.7858C11.0354 11.2 10.6996 11.5358 10.2854 11.5358H1.71416C1.29995 11.5358 0.964172 11.2 0.964172 10.7858C0.964172 10.3716 1.29995 10.0358 1.71416 10.0358H2.03558L2.03558 6.17864H1.41637C0.438389 6.17864 0.0816547 4.89066 0.920263 4.38749L5.61391 1.57124ZM3.53554 6.17864V10.0358H5.24979V6.17864H3.53554ZM6.74976 6.17864V10.0358H8.46401V6.17864H6.74976ZM8.64913 4.67864H3.35043L5.99978 3.089L8.64913 4.67864Z"
    fill="currentColor"
  /></svg
>`,dNe=Ze`<svg fill="none" viewBox="0 0 20 20">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M4 6.4a1 1 0 0 1-.46.89 6.98 6.98 0 0 0 .38 6.18A7 7 0 0 0 16.46 7.3a1 1 0 0 1-.47-.92 7 7 0 0 0-12 .03Zm-2.02-.5a9 9 0 1 1 16.03 8.2A9 9 0 0 1 1.98 5.9Z"
    clip-rule="evenodd"
  />
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M6.03 8.63c-1.46-.3-2.72-.75-3.6-1.35l-.02-.01-.14-.11a1 1 0 0 1 1.2-1.6l.1.08c.6.4 1.52.74 2.69 1 .16-.99.39-1.88.67-2.65.3-.79.68-1.5 1.15-2.02A2.58 2.58 0 0 1 9.99 1c.8 0 1.45.44 1.92.97.47.52.84 1.23 1.14 2.02.29.77.52 1.66.68 2.64a8 8 0 0 0 2.7-1l.26-.18h.48a1 1 0 0 1 .12 2c-.86.51-2.01.91-3.34 1.18a22.24 22.24 0 0 1-.03 3.19c1.45.29 2.7.73 3.58 1.31a1 1 0 0 1-1.1 1.68c-.6-.4-1.56-.76-2.75-1-.15.8-.36 1.55-.6 2.2-.3.79-.67 1.5-1.14 2.02-.47.53-1.12.97-1.92.97-.8 0-1.45-.44-1.91-.97a6.51 6.51 0 0 1-1.15-2.02c-.24-.65-.44-1.4-.6-2.2-1.18.24-2.13.6-2.73.99a1 1 0 1 1-1.1-1.67c.88-.58 2.12-1.03 3.57-1.31a22.03 22.03 0 0 1-.04-3.2Zm2.2-1.7c.15-.86.34-1.61.58-2.24.24-.65.51-1.12.76-1.4.25-.28.4-.29.42-.29.03 0 .17.01.42.3.25.27.52.74.77 1.4.23.62.43 1.37.57 2.22a19.96 19.96 0 0 1-3.52 0Zm-.18 4.6a20.1 20.1 0 0 1-.03-2.62 21.95 21.95 0 0 0 3.94 0 20.4 20.4 0 0 1-.03 2.63 21.97 21.97 0 0 0-3.88 0Zm.27 2c.13.66.3 1.26.49 1.78.24.65.51 1.12.76 1.4.25.28.4.29.42.29.03 0 .17-.01.42-.3.25-.27.52-.74.77-1.4.19-.5.36-1.1.49-1.78a20.03 20.03 0 0 0-3.35 0Z"
    clip-rule="evenodd"
  />
</svg>`,fNe=Ze`<svg
  xmlns="http://www.w3.org/2000/svg"
  width="12"
  height="13"
  viewBox="0 0 12 13"
  fill="none"
>
  <path
    fill-rule="evenodd"
    clip-rule="evenodd"
    d="M4.16072 2C4.17367 2 4.18665 2 4.19968 2L7.83857 2C8.36772 1.99998 8.82398 1.99996 9.19518 2.04018C9.5895 2.0829 9.97577 2.17811 10.3221 2.42971C10.5131 2.56849 10.6811 2.73647 10.8198 2.92749C11.0714 3.27379 11.1666 3.66007 11.2094 4.0544C11.2496 4.42561 11.2496 4.88188 11.2495 5.41105V7.58896C11.2496 8.11812 11.2496 8.57439 11.2094 8.94561C11.1666 9.33994 11.0714 9.72621 10.8198 10.0725C10.6811 10.2635 10.5131 10.4315 10.3221 10.5703C9.97577 10.8219 9.5895 10.9171 9.19518 10.9598C8.82398 11 8.36772 11 7.83856 11H4.16073C3.63157 11 3.17531 11 2.80411 10.9598C2.40979 10.9171 2.02352 10.8219 1.67722 10.5703C1.48621 10.4315 1.31824 10.2635 1.17946 10.0725C0.927858 9.72621 0.832652 9.33994 0.78993 8.94561C0.749713 8.5744 0.749733 8.11813 0.749757 7.58896L0.749758 5.45C0.749758 5.43697 0.749758 5.42399 0.749757 5.41104C0.749733 4.88188 0.749713 4.42561 0.78993 4.0544C0.832652 3.66007 0.927858 3.27379 1.17946 2.92749C1.31824 2.73647 1.48621 2.56849 1.67722 2.42971C2.02352 2.17811 2.40979 2.0829 2.80411 2.04018C3.17531 1.99996 3.63157 1.99998 4.16072 2ZM2.96567 3.53145C2.69897 3.56034 2.60687 3.60837 2.55888 3.64324C2.49521 3.6895 2.43922 3.74549 2.39296 3.80916C2.35809 3.85715 2.31007 3.94926 2.28117 4.21597C2.26629 4.35335 2.25844 4.51311 2.25431 4.70832H9.74498C9.74085 4.51311 9.733 4.35335 9.71812 4.21597C9.68922 3.94926 9.6412 3.85715 9.60633 3.80916C9.56007 3.74549 9.50408 3.6895 9.44041 3.64324C9.39242 3.60837 9.30031 3.56034 9.03362 3.53145C8.75288 3.50103 8.37876 3.5 7.79961 3.5H4.19968C3.62053 3.5 3.24641 3.50103 2.96567 3.53145ZM9.74956 6.20832H2.24973V7.55C2.24973 8.12917 2.25076 8.5033 2.28117 8.78404C2.31007 9.05074 2.35809 9.14285 2.39296 9.19084C2.43922 9.25451 2.49521 9.31051 2.55888 9.35677C2.60687 9.39163 2.69897 9.43966 2.96567 9.46856C3.24641 9.49897 3.62053 9.5 4.19968 9.5H7.79961C8.37876 9.5 8.75288 9.49897 9.03362 9.46856C9.30032 9.43966 9.39242 9.39163 9.44041 9.35677C9.50408 9.31051 9.56007 9.25451 9.60633 9.19084C9.6412 9.14285 9.68922 9.05075 9.71812 8.78404C9.74854 8.5033 9.74956 8.12917 9.74956 7.55V6.20832ZM6.74963 8C6.74963 7.58579 7.08541 7.25 7.49961 7.25H8.2496C8.6638 7.25 8.99958 7.58579 8.99958 8C8.99958 8.41422 8.6638 8.75 8.2496 8.75H7.49961C7.08541 8.75 6.74963 8.41422 6.74963 8Z"
    fill="currentColor"
  /></svg
>`,hNe=Ze`<svg fill="none" viewBox="0 0 14 14">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M12.9576 2.23383C13.3807 2.58873 13.4361 3.21947 13.0812 3.64263L6.37159 11.6426C6.19161 11.8572 5.92989 11.9865 5.65009 11.999C5.3703 12.0115 5.09808 11.9062 4.89965 11.7085L0.979321 7.80331C0.588042 7.41354 0.586817 6.78038 0.976585 6.3891C1.36635 5.99782 1.99952 5.99659 2.3908 6.38636L5.53928 9.52268L11.5488 2.35742C11.9037 1.93426 12.5344 1.87893 12.9576 2.23383Z"
    clip-rule="evenodd"
  />
</svg>`,pNe=Ze`<svg
  width="28"
  height="28"
  viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
  <path
    fill-rule="evenodd"
    clip-rule="evenodd"
    d="M25.5297 4.92733C26.1221 5.4242 26.1996 6.30724 25.7027 6.89966L12.2836 22.8997C12.0316 23.2001 11.6652 23.3811 11.2735 23.3986C10.8817 23.4161 10.5006 23.2686 10.2228 22.9919L2.38218 15.1815C1.83439 14.6358 1.83268 13.7494 2.37835 13.2016C2.92403 12.6538 3.81046 12.6521 4.35825 13.1978L11.1183 19.9317L23.5573 5.10036C24.0542 4.50794 24.9372 4.43047 25.5297 4.92733Z"
    fill="#26D962"/>
</svg>
`,mNe=Ze`<svg fill="none" viewBox="0 0 16 16">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M1.46 4.96a1 1 0 0 1 1.41 0L8 10.09l5.13-5.13a1 1 0 1 1 1.41 1.41l-5.83 5.84a1 1 0 0 1-1.42 0L1.46 6.37a1 1 0 0 1 0-1.41Z"
    clip-rule="evenodd"
  />
</svg>`,gNe=Ze`<svg fill="none" viewBox="0 0 16 16">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M11.04 1.46a1 1 0 0 1 0 1.41L5.91 8l5.13 5.13a1 1 0 1 1-1.41 1.41L3.79 8.71a1 1 0 0 1 0-1.42l5.84-5.83a1 1 0 0 1 1.41 0Z"
    clip-rule="evenodd"
  />
</svg>`,wNe=Ze`<svg fill="none" viewBox="0 0 16 16">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M4.96 14.54a1 1 0 0 1 0-1.41L10.09 8 4.96 2.87a1 1 0 0 1 1.41-1.41l5.84 5.83a1 1 0 0 1 0 1.42l-5.84 5.83a1 1 0 0 1-1.41 0Z"
    clip-rule="evenodd"
  />
</svg>`,yNe=Ze`<svg fill="none" viewBox="0 0 16 16">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M14.54 11.04a1 1 0 0 1-1.41 0L8 5.92l-5.13 5.12a1 1 0 1 1-1.41-1.41l5.83-5.84a1 1 0 0 1 1.42 0l5.83 5.84a1 1 0 0 1 0 1.41Z"
    clip-rule="evenodd"
  />
</svg>`,vNe=Ze`<svg width="36" height="36" fill="none">
  <path
    fill="#fff"
    fill-opacity=".05"
    d="M0 14.94c0-5.55 0-8.326 1.182-10.4a9 9 0 0 1 3.359-3.358C6.614 0 9.389 0 14.94 0h6.12c5.55 0 8.326 0 10.4 1.182a9 9 0 0 1 3.358 3.359C36 6.614 36 9.389 36 14.94v6.12c0 5.55 0 8.326-1.182 10.4a9 9 0 0 1-3.359 3.358C29.386 36 26.611 36 21.06 36h-6.12c-5.55 0-8.326 0-10.4-1.182a9 9 0 0 1-3.358-3.359C0 29.386 0 26.611 0 21.06v-6.12Z"
  />
  <path
    stroke="#fff"
    stroke-opacity=".05"
    d="M14.94.5h6.12c2.785 0 4.84 0 6.46.146 1.612.144 2.743.43 3.691.97a8.5 8.5 0 0 1 3.172 3.173c.541.948.826 2.08.971 3.692.145 1.62.146 3.675.146 6.459v6.12c0 2.785 0 4.84-.146 6.46-.145 1.612-.43 2.743-.97 3.691a8.5 8.5 0 0 1-3.173 3.172c-.948.541-2.08.826-3.692.971-1.62.145-3.674.146-6.459.146h-6.12c-2.784 0-4.84 0-6.46-.146-1.612-.145-2.743-.43-3.691-.97a8.5 8.5 0 0 1-3.172-3.173c-.541-.948-.827-2.08-.971-3.692C.5 25.9.5 23.845.5 21.06v-6.12c0-2.784 0-4.84.146-6.46.144-1.612.43-2.743.97-3.691A8.5 8.5 0 0 1 4.79 1.617C5.737 1.076 6.869.79 8.48.646 10.1.5 12.156.5 14.94.5Z"
  />
  <path
    fill="url(#a)"
    d="M17.998 10.8h12.469a14.397 14.397 0 0 0-24.938.001l6.234 10.798.006-.001a7.19 7.19 0 0 1 6.23-10.799Z"
  />
  <path
    fill="url(#b)"
    d="m24.237 21.598-6.234 10.798A14.397 14.397 0 0 0 30.47 10.798H18.002l-.002.006a7.191 7.191 0 0 1 6.237 10.794Z"
  />
  <path
    fill="url(#c)"
    d="M11.765 21.601 5.531 10.803A14.396 14.396 0 0 0 18.001 32.4l6.235-10.798-.004-.004a7.19 7.19 0 0 1-12.466.004Z"
  />
  <path fill="#fff" d="M18 25.2a7.2 7.2 0 1 0 0-14.4 7.2 7.2 0 0 0 0 14.4Z" />
  <path fill="#1A73E8" d="M18 23.7a5.7 5.7 0 1 0 0-11.4 5.7 5.7 0 0 0 0 11.4Z" />
  <defs>
    <linearGradient
      id="a"
      x1="6.294"
      x2="41.1"
      y1="5.995"
      y2="5.995"
      gradientUnits="userSpaceOnUse"
    >
      <stop stop-color="#D93025" />
      <stop offset="1" stop-color="#EA4335" />
    </linearGradient>
    <linearGradient
      id="b"
      x1="20.953"
      x2="37.194"
      y1="32.143"
      y2="2.701"
      gradientUnits="userSpaceOnUse"
    >
      <stop stop-color="#FCC934" />
      <stop offset="1" stop-color="#FBBC04" />
    </linearGradient>
    <linearGradient
      id="c"
      x1="25.873"
      x2="9.632"
      y1="31.2"
      y2="1.759"
      gradientUnits="userSpaceOnUse"
    >
      <stop stop-color="#1E8E3E" />
      <stop offset="1" stop-color="#34A853" />
    </linearGradient>
  </defs>
</svg>`,bNe=Ze`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
  <path 
    fill-rule="evenodd" 
    clip-rule="evenodd" 
    d="M7.00235 2C4.24 2 2.00067 4.23858 2.00067 7C2.00067 9.76142 4.24 12 7.00235 12C9.7647 12 12.004 9.76142 12.004 7C12.004 4.23858 9.7647 2 7.00235 2ZM0 7C0 3.13401 3.13506 0 7.00235 0C10.8696 0 14.0047 3.13401 14.0047 7C14.0047 10.866 10.8696 14 7.00235 14C3.13506 14 0 10.866 0 7ZM7.00235 3C7.55482 3 8.00269 3.44771 8.00269 4V6.58579L9.85327 8.43575C10.2439 8.82627 10.2439 9.45944 9.85327 9.84996C9.46262 10.2405 8.82924 10.2405 8.43858 9.84996L6.29501 7.70711C6.10741 7.51957 6.00201 7.26522 6.00201 7V4C6.00201 3.44771 6.44988 3 7.00235 3Z" 
    fill="currentColor"
  />
</svg>`,xNe=Ze`<svg fill="none" viewBox="0 0 16 16">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M2.54 2.54a1 1 0 0 1 1.42 0L8 6.6l4.04-4.05a1 1 0 1 1 1.42 1.42L9.4 8l4.05 4.04a1 1 0 0 1-1.42 1.42L8 9.4l-4.04 4.05a1 1 0 0 1-1.42-1.42L6.6 8 2.54 3.96a1 1 0 0 1 0-1.42Z"
    clip-rule="evenodd"
  />
</svg>`,_Ne=Ze`<svg fill="none" viewBox="0 0 20 20">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M10 3a7 7 0 0 0-6.85 8.44l8.29-8.3C10.97 3.06 10.49 3 10 3Zm3.49.93-9.56 9.56c.32.55.71 1.06 1.16 1.5L15 5.1a7.03 7.03 0 0 0-1.5-1.16Zm2.7 2.8-9.46 9.46a7 7 0 0 0 9.46-9.46ZM1.99 5.9A9 9 0 1 1 18 14.09 9 9 0 0 1 1.98 5.91Z"
    clip-rule="evenodd"
  />
</svg>`,ANe=Ze`<svg fill="none" viewBox="0 0 16 16">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm10.66-2.65a1 1 0 0 1 .23 1.06L9.83 9.24a1 1 0 0 1-.59.58l-2.83 1.06A1 1 0 0 1 5.13 9.6l1.06-2.82a1 1 0 0 1 .58-.59L9.6 5.12a1 1 0 0 1 1.06.23ZM7.9 7.89l-.13.35.35-.13.12-.35-.34.13Z"
    clip-rule="evenodd"
  />
</svg>`,ENe=Ze`<svg
  xmlns="http://www.w3.org/2000/svg"
  width="16"
  height="16"
  viewBox="0 0 16 16"
  fill="none"
>
  <path
    fill="currentColor"
    fill-rule="evenodd"
    clip-rule="evenodd"
    d="M9.21498 1.28565H10.5944C11.1458 1.28562 11.6246 1.2856 12.0182 1.32093C12.4353 1.35836 12.853 1.44155 13.2486 1.66724C13.7005 1.92498 14.0749 2.29935 14.3326 2.75122C14.5583 3.14689 14.6415 3.56456 14.6789 3.9817C14.7143 4.37531 14.7142 4.85403 14.7142 5.40545V6.78489C14.7142 7.33631 14.7143 7.81503 14.6789 8.20865C14.6415 8.62578 14.5583 9.04345 14.3326 9.43912C14.0749 9.89099 13.7005 10.2654 13.2486 10.5231C12.853 10.7488 12.4353 10.832 12.0182 10.8694C11.7003 10.8979 11.3269 10.9034 10.9045 10.9045C10.9034 11.3269 10.8979 11.7003 10.8694 12.0182C10.832 12.4353 10.7488 12.853 10.5231 13.2486C10.2654 13.7005 9.89099 14.0749 9.43912 14.3326C9.04345 14.5583 8.62578 14.6415 8.20865 14.6789C7.81503 14.7143 7.33631 14.7142 6.78489 14.7142H5.40545C4.85403 14.7142 4.37531 14.7143 3.9817 14.6789C3.56456 14.6415 3.14689 14.5583 2.75122 14.3326C2.29935 14.0749 1.92498 13.7005 1.66724 13.2486C1.44155 12.853 1.35836 12.4353 1.32093 12.0182C1.2856 11.6246 1.28562 11.1458 1.28565 10.5944V9.21498C1.28562 8.66356 1.2856 8.18484 1.32093 7.79122C1.35836 7.37409 1.44155 6.95642 1.66724 6.56074C1.92498 6.10887 2.29935 5.73451 2.75122 5.47677C3.14689 5.25108 3.56456 5.16789 3.9817 5.13045C4.2996 5.10192 4.67301 5.09645 5.09541 5.09541C5.09645 4.67302 5.10192 4.2996 5.13045 3.9817C5.16789 3.56456 5.25108 3.14689 5.47676 2.75122C5.73451 2.29935 6.10887 1.92498 6.56074 1.66724C6.95642 1.44155 7.37409 1.35836 7.79122 1.32093C8.18484 1.2856 8.66356 1.28562 9.21498 1.28565ZM5.09541 7.09552C4.68397 7.09667 4.39263 7.10161 4.16046 7.12245C3.88053 7.14757 3.78516 7.18949 3.74214 7.21403C3.60139 7.29431 3.48478 7.41091 3.4045 7.55166C3.37997 7.59468 3.33804 7.69005 3.31292 7.96999C3.28659 8.26345 3.28565 8.65147 3.28565 9.25708V10.5523C3.28565 11.1579 3.28659 11.5459 3.31292 11.8394C3.33804 12.1193 3.37997 12.2147 3.4045 12.2577C3.48478 12.3985 3.60139 12.5151 3.74214 12.5954C3.78516 12.6199 3.88053 12.6618 4.16046 12.6869C4.45393 12.7133 4.84195 12.7142 5.44755 12.7142H6.74279C7.3484 12.7142 7.73641 12.7133 8.02988 12.6869C8.30981 12.6618 8.40518 12.6199 8.44821 12.5954C8.58895 12.5151 8.70556 12.3985 8.78584 12.2577C8.81038 12.2147 8.8523 12.1193 8.87742 11.8394C8.89825 11.6072 8.90319 11.3159 8.90435 10.9045C8.48219 10.9034 8.10898 10.8979 7.79122 10.8694C7.37409 10.832 6.95641 10.7488 6.56074 10.5231C6.10887 10.2654 5.73451 9.89099 5.47676 9.43912C5.25108 9.04345 5.16789 8.62578 5.13045 8.20865C5.10194 7.89089 5.09645 7.51767 5.09541 7.09552ZM7.96999 3.31292C7.69005 3.33804 7.59468 3.37997 7.55166 3.4045C7.41091 3.48478 7.29431 3.60139 7.21403 3.74214C7.18949 3.78516 7.14757 3.88053 7.12245 4.16046C7.09611 4.45393 7.09517 4.84195 7.09517 5.44755V6.74279C7.09517 7.3484 7.09611 7.73641 7.12245 8.02988C7.14757 8.30981 7.18949 8.40518 7.21403 8.4482C7.29431 8.58895 7.41091 8.70556 7.55166 8.78584C7.59468 8.81038 7.69005 8.8523 7.96999 8.87742C8.26345 8.90376 8.65147 8.9047 9.25708 8.9047H10.5523C11.1579 8.9047 11.5459 8.90376 11.8394 8.87742C12.1193 8.8523 12.2147 8.81038 12.2577 8.78584C12.3985 8.70556 12.5151 8.58895 12.5954 8.4482C12.6199 8.40518 12.6618 8.30981 12.6869 8.02988C12.7133 7.73641 12.7142 7.3484 12.7142 6.74279V5.44755C12.7142 4.84195 12.7133 4.45393 12.6869 4.16046C12.6618 3.88053 12.6199 3.78516 12.5954 3.74214C12.5151 3.60139 12.3985 3.48478 12.2577 3.4045C12.2147 3.37997 12.1193 3.33804 11.8394 3.31292C11.5459 3.28659 11.1579 3.28565 10.5523 3.28565H9.25708C8.65147 3.28565 8.26345 3.28659 7.96999 3.31292Z"
    fill="#788181"
  /></svg
>`,CNe=Ze` <svg fill="none" viewBox="0 0 13 4">
  <path fill="currentColor" d="M.5 0h12L8.9 3.13a3.76 3.76 0 0 1-4.8 0L.5 0Z" />
</svg>`,SNe=Ze`<svg fill="none" viewBox="0 0 14 6">
  <path style="fill: var(--wui-color-bg-150);" d="M0 1h14L9.21 5.12a3.31 3.31 0 0 1-4.49 0L0 1Z" />
  <path
    style="stroke: var(--wui-color-inverse-100);"
    stroke-opacity=".05"
    d="M1.33 1.5h11.32L8.88 4.75l-.01.01a2.81 2.81 0 0 1-3.8 0l-.02-.01L1.33 1.5Z"
  />
  <path
    style="fill: var(--wui-color-bg-150);"
    d="M1.25.71h11.5L9.21 3.88a3.31 3.31 0 0 1-4.49 0L1.25.71Z"
  />
</svg> `,TNe=Ze`<svg fill="none" viewBox="0 0 20 20">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M13.66 2H6.34c-1.07 0-1.96 0-2.68.08-.74.08-1.42.25-2.01.68a4 4 0 0 0-.89.89c-.43.6-.6 1.27-.68 2.01C0 6.38 0 7.26 0 8.34v.89c0 1.07 0 1.96.08 2.68.08.74.25 1.42.68 2.01a4 4 0 0 0 .89.89c.6.43 1.27.6 2.01.68a27 27 0 0 0 2.68.08h7.32a27 27 0 0 0 2.68-.08 4.03 4.03 0 0 0 2.01-.68 4 4 0 0 0 .89-.89c.43-.6.6-1.27.68-2.01.08-.72.08-1.6.08-2.68v-.89c0-1.07 0-1.96-.08-2.68a4.04 4.04 0 0 0-.68-2.01 4 4 0 0 0-.89-.89c-.6-.43-1.27-.6-2.01-.68C15.62 2 14.74 2 13.66 2ZM2.82 4.38c.2-.14.48-.25 1.06-.31C4.48 4 5.25 4 6.4 4h7.2c1.15 0 1.93 0 2.52.07.58.06.86.17 1.06.31a2 2 0 0 1 .44.44c.14.2.25.48.31 1.06.07.6.07 1.37.07 2.52v.77c0 1.15 0 1.93-.07 2.52-.06.58-.17.86-.31 1.06a2 2 0 0 1-.44.44c-.2.14-.48.25-1.06.32-.6.06-1.37.06-2.52.06H6.4c-1.15 0-1.93 0-2.52-.06-.58-.07-.86-.18-1.06-.32a2 2 0 0 1-.44-.44c-.14-.2-.25-.48-.31-1.06C2 11.1 2 10.32 2 9.17V8.4c0-1.15 0-1.93.07-2.52.06-.58.17-.86.31-1.06a2 2 0 0 1 .44-.44Z"
    clip-rule="evenodd"
  />
  <path fill="currentColor" d="M6.14 17.57a1 1 0 1 0 0 2h7.72a1 1 0 1 0 0-2H6.14Z" />
</svg>`,INe=Ze`<svg fill="none" viewBox="0 0 16 16">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M6.07 1h.57a1 1 0 0 1 0 2h-.52c-.98 0-1.64 0-2.14.06-.48.05-.7.14-.84.24-.13.1-.25.22-.34.35-.1.14-.2.35-.25.83-.05.5-.05 1.16-.05 2.15v2.74c0 .99 0 1.65.05 2.15.05.48.14.7.25.83.1.14.2.25.34.35.14.1.36.2.84.25.5.05 1.16.05 2.14.05h.52a1 1 0 0 1 0 2h-.57c-.92 0-1.69 0-2.3-.07a3.6 3.6 0 0 1-1.8-.61c-.3-.22-.57-.49-.8-.8a3.6 3.6 0 0 1-.6-1.79C.5 11.11.5 10.35.5 9.43V6.58c0-.92 0-1.7.06-2.31a3.6 3.6 0 0 1 .62-1.8c.22-.3.48-.57.79-.79a3.6 3.6 0 0 1 1.8-.61C4.37 1 5.14 1 6.06 1ZM9.5 3a1 1 0 0 1 1.42 0l4.28 4.3a1 1 0 0 1 0 1.4L10.93 13a1 1 0 0 1-1.42-1.42L12.1 9H6.8a1 1 0 1 1 0-2h5.3L9.51 4.42a1 1 0 0 1 0-1.41Z"
    clip-rule="evenodd"
  />
</svg>`,kNe=Ze`<svg fill="none" viewBox="0 0 40 40">
  <g clip-path="url(#a)">
    <g clip-path="url(#b)">
      <circle cx="20" cy="19.89" r="20" fill="#5865F2" />
      <path
        fill="#fff"
        fill-rule="evenodd"
        d="M25.71 28.15C30.25 28 32 25.02 32 25.02c0-6.61-2.96-11.98-2.96-11.98-2.96-2.22-5.77-2.15-5.77-2.15l-.29.32c3.5 1.07 5.12 2.61 5.12 2.61a16.75 16.75 0 0 0-10.34-1.93l-.35.04a15.43 15.43 0 0 0-5.88 1.9s1.71-1.63 5.4-2.7l-.2-.24s-2.81-.07-5.77 2.15c0 0-2.96 5.37-2.96 11.98 0 0 1.73 2.98 6.27 3.13l1.37-1.7c-2.6-.79-3.6-2.43-3.6-2.43l.58.35.09.06.08.04.02.01.08.05a17.25 17.25 0 0 0 4.52 1.58 14.4 14.4 0 0 0 8.3-.86c.72-.27 1.52-.66 2.37-1.21 0 0-1.03 1.68-3.72 2.44.61.78 1.35 1.67 1.35 1.67Zm-9.55-9.6c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28.01-1.25-.93-2.28-2.1-2.28Zm7.5 0c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28 0-1.25-.93-2.28-2.1-2.28Z"
        clip-rule="evenodd"
      />
    </g>
  </g>
  <defs>
    <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
    <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
  </defs>
</svg>`,RNe=Ze`<svg fill="none" viewBox="0 0 16 16">
  <path
    fill="currentColor"
    d="M4.25 7a.63.63 0 0 0-.63.63v3.97c0 .28-.2.51-.47.54l-.75.07a.93.93 0 0 1-.9-.47A7.51 7.51 0 0 1 5.54.92a7.5 7.5 0 0 1 9.54 4.62c.12.35.06.72-.16 1-.74.97-1.68 1.78-2.6 2.44V4.44a.64.64 0 0 0-.63-.64h-1.06c-.35 0-.63.3-.63.64v5.5c0 .23-.12.42-.32.5l-.52.23V6.05c0-.36-.3-.64-.64-.64H7.45c-.35 0-.64.3-.64.64v4.97c0 .25-.17.46-.4.52a5.8 5.8 0 0 0-.45.11v-4c0-.36-.3-.65-.64-.65H4.25ZM14.07 12.4A7.49 7.49 0 0 1 3.6 14.08c4.09-.58 9.14-2.5 11.87-6.6v.03a7.56 7.56 0 0 1-1.41 4.91Z"
  />
</svg>`,NNe=Ze`<svg fill="none" viewBox="0 0 14 15">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M6.71 2.99a.57.57 0 0 0-.57.57 1 1 0 0 1-1 1c-.58 0-.96 0-1.24.03-.27.03-.37.07-.42.1a.97.97 0 0 0-.36.35c-.04.08-.09.21-.11.67a2.57 2.57 0 0 1 0 5.13c.02.45.07.6.11.66.09.15.21.28.36.36.07.04.21.1.67.12a2.57 2.57 0 0 1 5.12 0c.46-.03.6-.08.67-.12a.97.97 0 0 0 .36-.36c.03-.04.07-.14.1-.41.02-.29.03-.66.03-1.24a1 1 0 0 1 1-1 .57.57 0 0 0 0-1.15 1 1 0 0 1-1-1c0-.58 0-.95-.03-1.24a1.04 1.04 0 0 0-.1-.42.97.97 0 0 0-.36-.36 1.04 1.04 0 0 0-.42-.1c-.28-.02-.65-.02-1.24-.02a1 1 0 0 1-1-1 .57.57 0 0 0-.57-.57ZM5.15 13.98a1 1 0 0 0 .99-1v-.78a.57.57 0 0 1 1.14 0v.78a1 1 0 0 0 .99 1H8.36a66.26 66.26 0 0 0 .73 0 3.78 3.78 0 0 0 1.84-.38c.46-.26.85-.64 1.1-1.1.23-.4.32-.8.36-1.22.02-.2.03-.4.03-.63a2.57 2.57 0 0 0 0-4.75c0-.23-.01-.44-.03-.63a2.96 2.96 0 0 0-.35-1.22 2.97 2.97 0 0 0-1.1-1.1c-.4-.22-.8-.31-1.22-.35a8.7 8.7 0 0 0-.64-.04 2.57 2.57 0 0 0-4.74 0c-.23 0-.44.02-.63.04-.42.04-.83.13-1.22.35-.46.26-.84.64-1.1 1.1-.33.57-.37 1.2-.39 1.84a21.39 21.39 0 0 0 0 .72v.1a1 1 0 0 0 1 .99h.78a.57.57 0 0 1 0 1.15h-.77a1 1 0 0 0-1 .98v.1a63.87 63.87 0 0 0 0 .73c0 .64.05 1.27.38 1.83.26.47.64.85 1.1 1.11.56.32 1.2.37 1.84.38a20.93 20.93 0 0 0 .72 0h.1Z"
    clip-rule="evenodd"
  />
</svg>`,PNe=Ze`<svg fill="none" viewBox="0 0 14 15">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M3.74 3.99a1 1 0 0 1 1-1H11a1 1 0 0 1 1 1v6.26a1 1 0 0 1-2 0V6.4l-6.3 6.3a1 1 0 0 1-1.4-1.42l6.29-6.3H4.74a1 1 0 0 1-1-1Z"
    clip-rule="evenodd"
  />
</svg>`,ONe=Ze`<svg fill="none" viewBox="0 0 40 40">
  <g clip-path="url(#a)">
    <g clip-path="url(#b)">
      <circle cx="20" cy="19.89" r="20" fill="#1877F2" />
      <g clip-path="url(#c)">
        <path
          fill="#fff"
          d="M26 12.38h-2.89c-.92 0-1.61.38-1.61 1.34v1.66H26l-.36 4.5H21.5v12H17v-12h-3v-4.5h3V12.5c0-3.03 1.6-4.62 5.2-4.62H26v4.5Z"
        />
      </g>
    </g>
    <path
      fill="#1877F2"
      d="M40 20a20 20 0 1 0-23.13 19.76V25.78H11.8V20h5.07v-4.4c0-5.02 3-7.79 7.56-7.79 2.19 0 4.48.4 4.48.4v4.91h-2.53c-2.48 0-3.25 1.55-3.25 3.13V20h5.54l-.88 5.78h-4.66v13.98A20 20 0 0 0 40 20Z"
    />
    <path
      fill="#fff"
      d="m27.79 25.78.88-5.78h-5.55v-3.75c0-1.58.78-3.13 3.26-3.13h2.53V8.2s-2.3-.39-4.48-.39c-4.57 0-7.55 2.77-7.55 7.78V20H11.8v5.78h5.07v13.98a20.15 20.15 0 0 0 6.25 0V25.78h4.67Z"
    />
  </g>
  <defs>
    <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
    <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
    <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
  </defs>
</svg>`,DNe=Ze`<svg style="border-radius: 9999px; overflow: hidden;"  fill="none" viewBox="0 0 1000 1000">
  <rect width="1000" height="1000" rx="9999" ry="9999" fill="#855DCD"/>
  <path fill="#855DCD" d="M0 0h1000v1000H0V0Z" />
  <path
    fill="#fff"
    d="M320 248h354v504h-51.96V521.13h-.5c-5.76-63.8-59.31-113.81-124.54-113.81s-118.78 50-124.53 113.81h-.5V752H320V248Z"
  />
  <path
    fill="#fff"
    d="m225 320 21.16 71.46h17.9v289.09a16.29 16.29 0 0 0-16.28 16.24v19.49h-3.25a16.3 16.3 0 0 0-16.28 16.24V752h182.26v-19.48a16.22 16.22 0 0 0-16.28-16.24h-3.25v-19.5a16.22 16.22 0 0 0-16.28-16.23h-19.52V320H225Zm400.3 360.55a16.3 16.3 0 0 0-15.04 10.02 16.2 16.2 0 0 0-1.24 6.22v19.49h-3.25a16.29 16.29 0 0 0-16.27 16.24V752h182.24v-19.48a16.23 16.23 0 0 0-16.27-16.24h-3.25v-19.5a16.2 16.2 0 0 0-10.04-15 16.3 16.3 0 0 0-6.23-1.23v-289.1h17.9L775 320H644.82v360.55H625.3Z"
  />
</svg>`,MNe=Ze`<svg fill="none" viewBox="0 0 16 16">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M0 3a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H1a1 1 0 0 1-1-1Zm2.63 5.25a1 1 0 0 1 1-1h8.75a1 1 0 1 1 0 2H3.63a1 1 0 0 1-1-1Zm2.62 5.25a1 1 0 0 1 1-1h3.5a1 1 0 0 1 0 2h-3.5a1 1 0 0 1-1-1Z"
    clip-rule="evenodd"
  />
</svg>`,BNe=Ze`<svg fill="none" viewBox="0 0 40 40">
  <g clip-path="url(#a)">
    <g clip-path="url(#b)">
      <circle cx="20" cy="19.89" r="20" fill="#1B1F23" />
      <g clip-path="url(#c)">
        <path
          fill="#fff"
          d="M8 19.89a12 12 0 1 1 15.8 11.38c-.6.12-.8-.26-.8-.57v-3.3c0-1.12-.4-1.85-.82-2.22 2.67-.3 5.48-1.31 5.48-5.92 0-1.31-.47-2.38-1.24-3.22.13-.3.54-1.52-.12-3.18 0 0-1-.32-3.3 1.23a11.54 11.54 0 0 0-6 0c-2.3-1.55-3.3-1.23-3.3-1.23a4.32 4.32 0 0 0-.12 3.18 4.64 4.64 0 0 0-1.24 3.22c0 4.6 2.8 5.63 5.47 5.93-.34.3-.65.83-.76 1.6-.69.31-2.42.84-3.5-1 0 0-.63-1.15-1.83-1.23 0 0-1.18-.02-.09.73 0 0 .8.37 1.34 1.76 0 0 .7 2.14 4.03 1.41v2.24c0 .31-.2.68-.8.57A12 12 0 0 1 8 19.9Z"
        />
      </g>
    </g>
  </g>
  <defs>
    <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
    <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
    <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
  </defs>
</svg>`,$Ne=Ze`<svg fill="none" viewBox="0 0 40 40">
  <path
    fill="#4285F4"
    d="M32.74 20.3c0-.93-.08-1.81-.24-2.66H20.26v5.03h7a6 6 0 0 1-2.62 3.91v3.28h4.22c2.46-2.27 3.88-5.6 3.88-9.56Z"
  />
  <path
    fill="#34A853"
    d="M20.26 33a12.4 12.4 0 0 0 8.6-3.14l-4.22-3.28a7.74 7.74 0 0 1-4.38 1.26 7.76 7.76 0 0 1-7.28-5.36H8.65v3.36A12.99 12.99 0 0 0 20.26 33Z"
  />
  <path
    fill="#FBBC05"
    d="M12.98 22.47a7.79 7.79 0 0 1 0-4.94v-3.36H8.65a12.84 12.84 0 0 0 0 11.66l3.37-2.63.96-.73Z"
  />
  <path
    fill="#EA4335"
    d="M20.26 12.18a7.1 7.1 0 0 1 4.98 1.93l3.72-3.72A12.47 12.47 0 0 0 20.26 7c-5.08 0-9.47 2.92-11.6 7.17l4.32 3.36a7.76 7.76 0 0 1 7.28-5.35Z"
  />
</svg>`,jNe=Ze`<svg fill="none" viewBox="0 0 16 16">
  <path
    fill="currentColor"
    d="M8.51 5.66a.83.83 0 0 0-.57-.2.83.83 0 0 0-.52.28.8.8 0 0 0-.25.52 1 1 0 0 1-2 0c0-.75.34-1.43.81-1.91a2.75 2.75 0 0 1 4.78 1.92c0 1.24-.8 1.86-1.25 2.2l-.04.03c-.47.36-.5.43-.5.65a1 1 0 1 1-2 0c0-1.25.8-1.86 1.24-2.2l.04-.04c.47-.36.5-.43.5-.65 0-.3-.1-.49-.24-.6ZM9.12 11.87a1.13 1.13 0 1 1-2.25 0 1.13 1.13 0 0 1 2.25 0Z"
  />
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6a6 6 0 1 0 0 12A6 6 0 0 0 8 2Z"
    clip-rule="evenodd"
  />
</svg>`,LNe=Ze`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
  <path d="M4.98926 3.73932C4.2989 3.73932 3.73926 4.29896 3.73926 4.98932C3.73926 5.67968 4.2989 6.23932 4.98926 6.23932C5.67962 6.23932 6.23926 5.67968 6.23926 4.98932C6.23926 4.29896 5.67962 3.73932 4.98926 3.73932Z" fill="currentColor"/>
  <path fill-rule="evenodd" clip-rule="evenodd" d="M7.60497 0.500001H6.39504C5.41068 0.499977 4.59185 0.499958 3.93178 0.571471C3.24075 0.64634 2.60613 0.809093 2.04581 1.21619C1.72745 1.44749 1.44749 1.72745 1.21619 2.04581C0.809093 2.60613 0.64634 3.24075 0.571471 3.93178C0.499958 4.59185 0.499977 5.41065 0.500001 6.39501V7.57815C0.499998 8.37476 0.499995 9.05726 0.534869 9.62725C0.570123 10.2034 0.644114 10.7419 0.828442 11.2302C0.925651 11.4877 1.05235 11.7287 1.21619 11.9542C1.44749 12.2726 1.72745 12.5525 2.04581 12.7838C2.60613 13.1909 3.24075 13.3537 3.93178 13.4285C4.59185 13.5001 5.41066 13.5 6.39503 13.5H7.60496C8.58933 13.5 9.40815 13.5001 10.0682 13.4285C10.7593 13.3537 11.3939 13.1909 11.9542 12.7838C12.2726 12.5525 12.5525 12.2726 12.7838 11.9542C13.1909 11.3939 13.3537 10.7593 13.4285 10.0682C13.5 9.40816 13.5 8.58935 13.5 7.60497V6.39505C13.5 5.41068 13.5 4.59185 13.4285 3.93178C13.3537 3.24075 13.1909 2.60613 12.7838 2.04581C12.5525 1.72745 12.2726 1.44749 11.9542 1.21619C11.3939 0.809093 10.7593 0.64634 10.0682 0.571471C9.40816 0.499958 8.58933 0.499977 7.60497 0.500001ZM3.22138 2.83422C3.38394 2.71612 3.62634 2.61627 4.14721 2.55984C4.68679 2.50138 5.39655 2.5 6.45 2.5H7.55C8.60345 2.5 9.31322 2.50138 9.8528 2.55984C10.3737 2.61627 10.6161 2.71612 10.7786 2.83422C10.9272 2.94216 11.0578 3.07281 11.1658 3.22138C11.2839 3.38394 11.3837 3.62634 11.4402 4.14721C11.4986 4.68679 11.5 5.39655 11.5 6.45V6.49703C10.9674 6.11617 10.386 5.84936 9.74213 5.81948C8.40536 5.75745 7.3556 6.73051 6.40509 7.84229C6.33236 7.92737 6.27406 7.98735 6.22971 8.02911L6.1919 8.00514L6.17483 7.99427C6.09523 7.94353 5.98115 7.87083 5.85596 7.80302C5.56887 7.64752 5.18012 7.4921 4.68105 7.4921C4.66697 7.4921 4.6529 7.49239 4.63884 7.49299C3.79163 7.52878 3.09922 8.1106 2.62901 8.55472C2.58751 8.59392 2.54594 8.6339 2.50435 8.6745C2.50011 8.34653 2.5 7.97569 2.5 7.55V6.45C2.5 5.39655 2.50138 4.68679 2.55984 4.14721C2.61627 3.62634 2.71612 3.38394 2.83422 3.22138C2.94216 3.07281 3.07281 2.94216 3.22138 2.83422ZM10.3703 8.14825C10.6798 8.37526 11.043 8.71839 11.4832 9.20889C11.4744 9.44992 11.4608 9.662 11.4402 9.8528C11.3837 10.3737 11.2839 10.6161 11.1658 10.7786C11.0578 10.9272 10.9272 11.0578 10.7786 11.1658C10.6161 11.2839 10.3737 11.3837 9.8528 11.4402C9.31322 11.4986 8.60345 11.5 7.55 11.5H6.45C5.39655 11.5 4.68679 11.4986 4.14721 11.4402C3.62634 11.3837 3.38394 11.2839 3.22138 11.1658C3.15484 11.1174 3.0919 11.0645 3.03298 11.0075C3.10126 10.9356 3.16806 10.8649 3.23317 10.7959L3.29772 10.7276C3.55763 10.4525 3.78639 10.2126 4.00232 10.0087C4.22016 9.80294 4.39412 9.66364 4.53524 9.57742C4.63352 9.51738 4.69022 9.49897 4.71275 9.49345C4.76387 9.49804 4.81803 9.51537 4.90343 9.56162C4.96409 9.59447 5.02355 9.63225 5.11802 9.69238L5.12363 9.69595C5.20522 9.74789 5.32771 9.82587 5.46078 9.89278C5.76529 10.0459 6.21427 10.186 6.74977 10.0158C7.21485 9.86796 7.59367 9.52979 7.92525 9.14195C8.91377 7.98571 9.38267 7.80495 9.64941 7.81733C9.7858 7.82366 10.0101 7.884 10.3703 8.14825Z" fill="currentColor"/>
</svg>`,UNe=Ze`<svg fill="none" viewBox="0 0 14 15">
  <path
    fill="currentColor"
    d="M6 10.49a1 1 0 1 0 2 0v-2a1 1 0 0 0-2 0v2ZM7 4.49a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"
  />
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M7 14.99a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-7a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"
    clip-rule="evenodd"
  />
</svg>`,FNe=Ze`<svg fill="none" viewBox="0 0 16 16">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M4.83 1.34h6.34c.68 0 1.26 0 1.73.04.5.05.97.15 1.42.4.52.3.95.72 1.24 1.24.26.45.35.92.4 1.42.04.47.04 1.05.04 1.73v3.71c0 .69 0 1.26-.04 1.74-.05.5-.14.97-.4 1.41-.3.52-.72.95-1.24 1.25-.45.25-.92.35-1.42.4-.47.03-1.05.03-1.73.03H4.83c-.68 0-1.26 0-1.73-.04-.5-.04-.97-.14-1.42-.4-.52-.29-.95-.72-1.24-1.24a3.39 3.39 0 0 1-.4-1.41A20.9 20.9 0 0 1 0 9.88v-3.7c0-.7 0-1.27.04-1.74.05-.5.14-.97.4-1.42.3-.52.72-.95 1.24-1.24.45-.25.92-.35 1.42-.4.47-.04 1.05-.04 1.73-.04ZM3.28 3.38c-.36.03-.51.08-.6.14-.21.11-.39.29-.5.5a.8.8 0 0 0-.08.19l5.16 3.44c.45.3 1.03.3 1.48 0L13.9 4.2a.79.79 0 0 0-.08-.2c-.11-.2-.29-.38-.5-.5-.09-.05-.24-.1-.6-.13-.37-.04-.86-.04-1.6-.04H4.88c-.73 0-1.22 0-1.6.04ZM14 6.54 9.85 9.31a3.33 3.33 0 0 1-3.7 0L2 6.54v3.3c0 .74 0 1.22.03 1.6.04.36.1.5.15.6.11.2.29.38.5.5.09.05.24.1.6.14.37.03.86.03 1.6.03h6.25c.73 0 1.22 0 1.6-.03.35-.03.5-.09.6-.14.2-.12.38-.3.5-.5.05-.1.1-.24.14-.6.03-.38.03-.86.03-1.6v-3.3Z"
    clip-rule="evenodd"
  />
</svg>`,zNe=Ze`<svg fill="none" viewBox="0 0 20 20">
  <path fill="currentColor" d="M10.81 5.81a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z" />
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M3 4.75A4.75 4.75 0 0 1 7.75 0h4.5A4.75 4.75 0 0 1 17 4.75v10.5A4.75 4.75 0 0 1 12.25 20h-4.5A4.75 4.75 0 0 1 3 15.25V4.75ZM7.75 2A2.75 2.75 0 0 0 5 4.75v10.5A2.75 2.75 0 0 0 7.75 18h4.5A2.75 2.75 0 0 0 15 15.25V4.75A2.75 2.75 0 0 0 12.25 2h-4.5Z"
    clip-rule="evenodd"
  />
</svg>`,HNe=Ze`<svg fill="none" viewBox="0 0 41 40">
  <path
    style="fill: var(--wui-color-fg-100);"
    fill-opacity=".05"
    d="M.6 20a20 20 0 1 1 40 0 20 20 0 0 1-40 0Z"
  />
  <path
    fill="#949E9E"
    d="M15.6 20.31a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM23.1 20.31a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM28.1 22.81a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"
  />
</svg>`,WNe=Ze`<svg fill="none" viewBox="0 0 22 20">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M16.32 13.62a3.14 3.14 0 1 1-.99 1.72l-1.6-.93a3.83 3.83 0 0 1-3.71 1 3.66 3.66 0 0 1-1.74-1l-1.6.94a3.14 3.14 0 1 1-1-1.73l1.6-.94a3.7 3.7 0 0 1 0-2 3.81 3.81 0 0 1 1.8-2.33c.29-.17.6-.3.92-.38V6.1a3.14 3.14 0 1 1 2 0l-.01.02v1.85H12a3.82 3.82 0 0 1 2.33 1.8 3.7 3.7 0 0 1 .39 2.91l1.6.93ZM2.6 16.54a1.14 1.14 0 0 0 1.98-1.14 1.14 1.14 0 0 0-1.98 1.14ZM11 2.01a1.14 1.14 0 1 0 0 2.28 1.14 1.14 0 0 0 0-2.28Zm1.68 10.45c.08-.19.14-.38.16-.58v-.05l.02-.13v-.13a1.92 1.92 0 0 0-.24-.8l-.11-.15a1.89 1.89 0 0 0-.74-.6 1.86 1.86 0 0 0-.77-.17h-.19a1.97 1.97 0 0 0-.89.34 1.98 1.98 0 0 0-.61.74 1.99 1.99 0 0 0-.16.9v.05a1.87 1.87 0 0 0 .24.74l.1.15c.12.16.26.3.42.42l.16.1.13.07.04.02a1.84 1.84 0 0 0 .76.17h.17a2 2 0 0 0 .91-.35 1.78 1.78 0 0 0 .52-.58l.03-.05a.84.84 0 0 0 .05-.11Zm5.15 4.5a1.14 1.14 0 0 0 1.14-1.97 1.13 1.13 0 0 0-1.55.41c-.32.55-.13 1.25.41 1.56Z"
    clip-rule="evenodd"
  />
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M4.63 9.43a1.5 1.5 0 1 0 1.5-2.6 1.5 1.5 0 0 0-1.5 2.6Zm.32-1.55a.5.5 0 0 1 .68-.19.5.5 0 0 1 .18.68.5.5 0 0 1-.68.19.5.5 0 0 1-.18-.68ZM17.94 8.88a1.5 1.5 0 1 1-2.6-1.5 1.5 1.5 0 1 1 2.6 1.5ZM16.9 7.69a.5.5 0 0 0-.68.19.5.5 0 0 0 .18.68.5.5 0 0 0 .68-.19.5.5 0 0 0-.18-.68ZM9.75 17.75a1.5 1.5 0 1 1 2.6 1.5 1.5 1.5 0 1 1-2.6-1.5Zm1.05 1.18a.5.5 0 0 0 .68-.18.5.5 0 0 0-.18-.68.5.5 0 0 0-.68.18.5.5 0 0 0 .18.68Z"
    clip-rule="evenodd"
  />
</svg>`,VNe=Ze`<svg fill="none" viewBox="0 0 20 20">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M9.13 1h1.71c1.46 0 2.63 0 3.56.1.97.1 1.8.33 2.53.85a5 5 0 0 1 1.1 1.11c.53.73.75 1.56.86 2.53.1.93.1 2.1.1 3.55v1.72c0 1.45 0 2.62-.1 3.55-.1.97-.33 1.8-.86 2.53a5 5 0 0 1-1.1 1.1c-.73.53-1.56.75-2.53.86-.93.1-2.1.1-3.55.1H9.13c-1.45 0-2.62 0-3.56-.1-.96-.1-1.8-.33-2.52-.85a5 5 0 0 1-1.1-1.11 5.05 5.05 0 0 1-.86-2.53c-.1-.93-.1-2.1-.1-3.55V9.14c0-1.45 0-2.62.1-3.55.1-.97.33-1.8.85-2.53a5 5 0 0 1 1.1-1.1 5.05 5.05 0 0 1 2.53-.86C6.51 1 7.67 1 9.13 1ZM5.79 3.09a3.1 3.1 0 0 0-1.57.48 3 3 0 0 0-.66.67c-.24.32-.4.77-.48 1.56-.1.82-.1 1.88-.1 3.4v1.6c0 1.15 0 2.04.05 2.76l.41-.42c.5-.5.93-.92 1.32-1.24.41-.33.86-.6 1.43-.7a3 3 0 0 1 .94 0c.35.06.66.2.95.37a17.11 17.11 0 0 0 .8.45c.1-.08.2-.2.41-.4l.04-.03a27 27 0 0 1 1.95-1.84 4.03 4.03 0 0 1 1.91-.94 4 4 0 0 1 1.25 0c.73.11 1.33.46 1.91.94l.64.55V9.2c0-1.52 0-2.58-.1-3.4a3.1 3.1 0 0 0-.48-1.56 3 3 0 0 0-.66-.67 3.1 3.1 0 0 0-1.56-.48C13.37 3 12.3 3 10.79 3h-1.6c-1.52 0-2.59 0-3.4.09Zm11.18 10-.04-.05a26.24 26.24 0 0 0-1.83-1.74c-.45-.36-.73-.48-.97-.52a2 2 0 0 0-.63 0c-.24.04-.51.16-.97.52-.46.38-1.01.93-1.83 1.74l-.02.02c-.17.18-.34.34-.49.47a2.04 2.04 0 0 1-1.08.5 1.97 1.97 0 0 1-1.25-.27l-.79-.46-.02-.02a.65.65 0 0 0-.24-.1 1 1 0 0 0-.31 0c-.08.02-.21.06-.49.28-.3.24-.65.59-1.2 1.14l-.56.56-.65.66a3 3 0 0 0 .62.6c.33.24.77.4 1.57.49.81.09 1.88.09 3.4.09h1.6c1.52 0 2.58 0 3.4-.09a3.1 3.1 0 0 0 1.56-.48 3 3 0 0 0 .66-.67c.24-.32.4-.77.49-1.56l.07-1.12Zm-8.02-1.03ZM4.99 7a2 2 0 1 1 4 0 2 2 0 0 1-4 0Z"
    clip-rule="evenodd"
  />
</svg>`,qNe=Ze`<svg fill="none" viewBox="0 0 16 16">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M8 0a1 1 0 0 1 1 1v5.38a1 1 0 0 1-2 0V1a1 1 0 0 1 1-1ZM5.26 2.6a1 1 0 0 1-.28 1.39 5.46 5.46 0 1 0 6.04 0 1 1 0 1 1 1.1-1.67 7.46 7.46 0 1 1-8.25 0 1 1 0 0 1 1.4.28Z"
    clip-rule="evenodd"
  />
</svg>`,GNe=Ze` <svg
  width="36"
  height="36"
  fill="none"
>
  <path
    d="M0 8a8 8 0 0 1 8-8h20a8 8 0 0 1 8 8v20a8 8 0 0 1-8 8H8a8 8 0 0 1-8-8V8Z"
    fill="#fff"
    fill-opacity=".05"
  />
  <path
    d="m18.262 17.513-8.944 9.49v.01a2.417 2.417 0 0 0 3.56 1.452l.026-.017 10.061-5.803-4.703-5.132Z"
    fill="#EA4335"
  />
  <path
    d="m27.307 15.9-.008-.008-4.342-2.52-4.896 4.36 4.913 4.912 4.325-2.494a2.42 2.42 0 0 0 .008-4.25Z"
    fill="#FBBC04"
  />
  <path
    d="M9.318 8.997c-.05.202-.084.403-.084.622V26.39c0 .218.025.42.084.621l9.246-9.247-9.246-8.768Z"
    fill="#4285F4"
  />
  <path
    d="m18.33 18 4.627-4.628-10.053-5.828a2.427 2.427 0 0 0-3.586 1.444L18.329 18Z"
    fill="#34A853"
  />
  <path
    d="M8 .5h20A7.5 7.5 0 0 1 35.5 8v20a7.5 7.5 0 0 1-7.5 7.5H8A7.5 7.5 0 0 1 .5 28V8A7.5 7.5 0 0 1 8 .5Z"
    stroke="#fff"
    stroke-opacity=".05"
  />
</svg>`,KNe=Ze`<svg
  width="13"
  height="12"
  viewBox="0 0 13 12"
  fill="none"
>
  <path
    fill="currentColor"
    fill-rule="evenodd"
    clip-rule="evenodd"
    d="M0.794373 5.99982C0.794373 5.52643 1.17812 5.14268 1.6515 5.14268H5.643V1.15109C5.643 0.677701 6.02675 0.293946 6.50012 0.293945C6.9735 0.293946 7.35725 0.677701 7.35725 1.15109V5.14268H11.3488C11.8221 5.14268 12.2059 5.52643 12.2059 5.99982C12.2059 6.47321 11.8221 6.85696 11.3488 6.85696H7.35725V10.8486C7.35725 11.3219 6.9735 11.7057 6.50012 11.7057C6.02675 11.7057 5.643 11.3219 5.643 10.8486V6.85696H1.6515C1.17812 6.85696 0.794373 6.47321 0.794373 5.99982Z"
  /></svg
>`,YNe=Ze`<svg fill="none" viewBox="0 0 20 20">
  <path
    fill="currentColor"
    d="M3 6a3 3 0 0 1 3-3h1a1 1 0 1 0 0-2H6a5 5 0 0 0-5 5v1a1 1 0 0 0 2 0V6ZM13 1a1 1 0 1 0 0 2h1a3 3 0 0 1 3 3v1a1 1 0 1 0 2 0V6a5 5 0 0 0-5-5h-1ZM3 13a1 1 0 1 0-2 0v1a5 5 0 0 0 5 5h1a1 1 0 1 0 0-2H6a3 3 0 0 1-3-3v-1ZM19 13a1 1 0 1 0-2 0v1a3 3 0 0 1-3 3h-1a1 1 0 1 0 0 2h1.01a5 5 0 0 0 5-5v-1ZM5.3 6.36c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05A1.5 1.5 0 0 0 9.2 8.14c.06-.2.06-.43.06-.89s0-.7-.06-.89A1.5 1.5 0 0 0 8.14 5.3c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06ZM10.8 6.36c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05a1.5 1.5 0 0 0 1.06-1.06c.06-.2.06-.43.06-.89s0-.7-.06-.89a1.5 1.5 0 0 0-1.06-1.06c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06ZM5.26 12.75c0-.46 0-.7.05-.89a1.5 1.5 0 0 1 1.06-1.06c.19-.05.42-.05.89-.05.46 0 .7 0 .88.05.52.14.93.54 1.06 1.06.06.2.06.43.06.89s0 .7-.06.89a1.5 1.5 0 0 1-1.06 1.06c-.19.05-.42.05-.88.05-.47 0-.7 0-.9-.05a1.5 1.5 0 0 1-1.05-1.06c-.05-.2-.05-.43-.05-.89ZM10.8 11.86c-.04.2-.04.43-.04.89s0 .7.05.89c.14.52.54.92 1.06 1.06.19.05.42.05.89.05.46 0 .7 0 .88-.05a1.5 1.5 0 0 0 1.06-1.06c.06-.2.06-.43.06-.89s0-.7-.06-.89a1.5 1.5 0 0 0-1.06-1.06c-.19-.05-.42-.05-.88-.05-.47 0-.7 0-.9.05a1.5 1.5 0 0 0-1.05 1.06Z"
  />
</svg>`,QNe=Ze`<svg
  fill="none"
  viewBox="0 0 21 20"
>
  <path
    fill="currentColor"
    d="M8.8071 0.292893C9.19763 0.683417 9.19763 1.31658 8.8071 1.70711L6.91421 3.6H11.8404C14.3368 3.6 16.5533 5.1975 17.3427 7.56588L17.4487 7.88377C17.6233 8.40772 17.3402 8.97404 16.8162 9.14868C16.2923 9.32333 15.726 9.04017 15.5513 8.51623L15.4453 8.19834C14.9281 6.64664 13.476 5.6 11.8404 5.6H6.91421L8.8071 7.49289C9.19763 7.88342 9.19763 8.51658 8.8071 8.90711C8.41658 9.29763 7.78341 9.29763 7.39289 8.90711L3.79289 5.30711C3.40236 4.91658 3.40236 4.28342 3.79289 3.89289L7.39289 0.292893C7.78341 -0.0976311 8.41658 -0.0976311 8.8071 0.292893ZM4.18377 10.8513C4.70771 10.6767 5.27403 10.9598 5.44868 11.4838L5.55464 11.8017C6.07188 13.3534 7.52401 14.4 9.15964 14.4L14.0858 14.4L12.1929 12.5071C11.8024 12.1166 11.8024 11.4834 12.1929 11.0929C12.5834 10.7024 13.2166 10.7024 13.6071 11.0929L17.2071 14.6929C17.5976 15.0834 17.5976 15.7166 17.2071 16.1071L13.6071 19.7071C13.2166 20.0976 12.5834 20.0976 12.1929 19.7071C11.8024 19.3166 11.8024 18.6834 12.1929 18.2929L14.0858 16.4L9.15964 16.4C6.66314 16.4 4.44674 14.8025 3.65728 12.4341L3.55131 12.1162C3.37667 11.5923 3.65983 11.026 4.18377 10.8513Z"
  /></svg
>`,ZNe=Ze`<svg fill="none" viewBox="0 0 14 16">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M3.94 1.04a1 1 0 0 1 .7 1.23l-.48 1.68a5.85 5.85 0 0 1 8.53 4.32 5.86 5.86 0 0 1-11.4 2.56 1 1 0 0 1 1.9-.57 3.86 3.86 0 1 0 1.83-4.5l1.87.53a1 1 0 0 1-.55 1.92l-4.1-1.15a1 1 0 0 1-.69-1.23l1.16-4.1a1 1 0 0 1 1.23-.7Z"
    clip-rule="evenodd"
  />
</svg>`,JNe=Ze`<svg fill="none" viewBox="0 0 20 20">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M9.36 4.21a5.14 5.14 0 1 0 0 10.29 5.14 5.14 0 0 0 0-10.29ZM1.64 9.36a7.71 7.71 0 1 1 14 4.47l2.52 2.5a1.29 1.29 0 1 1-1.82 1.83l-2.51-2.51A7.71 7.71 0 0 1 1.65 9.36Z"
    clip-rule="evenodd"
  />
</svg>`,XNe=Ze`<svg fill="none" viewBox="0 0 21 20">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M14.3808 4.34812C13.72 4.47798 12.8501 4.7587 11.5748 5.17296L9.00869 6.00646C6.90631 6.68935 5.40679 7.17779 4.38121 7.63178C3.87166 7.85734 3.5351 8.05091 3.32022 8.22035C3.11183 8.38466 3.07011 8.48486 3.05969 8.51817C2.98058 8.77103 2.98009 9.04195 3.05831 9.29509C3.06861 9.32844 3.10998 9.42878 3.31777 9.59384C3.53205 9.76404 3.86792 9.95881 4.37667 10.1862C5.29287 10.5957 6.58844 11.0341 8.35529 11.6164L10.8876 8.59854C11.2426 8.17547 11.8733 8.12028 12.2964 8.47528C12.7195 8.83029 12.7746 9.46104 12.4196 9.88412L9.88738 12.9019C10.7676 14.5408 11.4244 15.7406 11.9867 16.5718C12.299 17.0333 12.5491 17.3303 12.7539 17.5117C12.9526 17.6877 13.0586 17.711 13.0932 17.7154C13.3561 17.7484 13.6228 17.7009 13.8581 17.5791C13.8891 17.563 13.9805 17.5046 14.1061 17.2708C14.2357 17.0298 14.3679 16.6647 14.5015 16.1237C14.7705 15.0349 14.9912 13.4733 15.2986 11.2843L15.6738 8.61249C15.8603 7.28456 15.9857 6.37917 15.9989 5.7059C16.012 5.03702 15.9047 4.8056 15.8145 4.69183C15.7044 4.55297 15.5673 4.43792 15.4114 4.35365C15.2837 4.28459 15.0372 4.2191 14.3808 4.34812ZM7.99373 13.603C6.11919 12.9864 4.6304 12.4902 3.5606 12.0121C2.98683 11.7557 2.4778 11.4808 2.07383 11.1599C1.66337 10.8339 1.31312 10.4217 1.14744 9.88551C0.949667 9.24541 0.950886 8.56035 1.15094 7.92096C1.31852 7.38534 1.67024 6.97442 2.08185 6.64985C2.48697 6.33041 2.99697 6.05734 3.57166 5.80295C4.70309 5.3021 6.30179 4.78283 8.32903 4.12437L11.0196 3.25042C12.2166 2.86159 13.2017 2.54158 13.9951 2.38566C14.8065 2.22618 15.6202 2.19289 16.3627 2.59437C16.7568 2.80747 17.1035 3.09839 17.3818 3.4495C17.9062 4.111 18.0147 4.91815 17.9985 5.74496C17.9827 6.55332 17.8386 7.57903 17.6636 8.82534L17.2701 11.6268C16.9737 13.7376 16.7399 15.4022 16.4432 16.6034C16.2924 17.2135 16.1121 17.7632 15.8678 18.2176C15.6197 18.6794 15.2761 19.0971 14.7777 19.3551C14.1827 19.6632 13.5083 19.7833 12.8436 19.6997C12.2867 19.6297 11.82 19.3563 11.4277 19.0087C11.0415 18.6666 10.6824 18.213 10.3302 17.6925C9.67361 16.722 8.92648 15.342 7.99373 13.603Z"
    clip-rule="evenodd"
  />
  <svg
    xmlns="http://www.w3.org/2000/svg"
    width="21"
    height="20"
    viewBox="0 0 21 20"
    fill="none"
  ></svg></svg
>`,ePe=Ze`<svg fill="none" viewBox="0 0 20 20">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M6.76.3a1 1 0 0 1 0 1.4L4.07 4.4h9a1 1 0 1 1 0 2h-9l2.69 2.68a1 1 0 1 1-1.42 1.42L.95 6.09a1 1 0 0 1 0-1.4l4.4-4.4a1 1 0 0 1 1.4 0Zm6.49 9.21a1 1 0 0 1 1.41 0l4.39 4.4a1 1 0 0 1 0 1.4l-4.39 4.4a1 1 0 0 1-1.41-1.42l2.68-2.68h-9a1 1 0 0 1 0-2h9l-2.68-2.68a1 1 0 0 1 0-1.42Z"
    clip-rule="evenodd"
  />
</svg>`,tPe=Ze`<svg width="10" height="10" viewBox="0 0 10 10">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M3.77986 0.566631C4.0589 0.845577 4.0589 1.29784 3.77986 1.57678L3.08261 2.2738H6.34184C6.73647 2.2738 7.05637 2.5936 7.05637 2.98808C7.05637 3.38257 6.73647 3.70237 6.34184 3.70237H3.08261L3.77986 4.39938C4.0589 4.67833 4.0589 5.13059 3.77986 5.40954C3.50082 5.68848 3.04841 5.68848 2.76937 5.40954L0.852346 3.49316C0.573306 3.21421 0.573306 2.76195 0.852346 2.48301L2.76937 0.566631C3.04841 0.287685 3.50082 0.287685 3.77986 0.566631ZM6.22 4.59102C6.49904 4.31208 6.95145 4.31208 7.23049 4.59102L9.14751 6.5074C9.42655 6.78634 9.42655 7.23861 9.14751 7.51755L7.23049 9.43393C6.95145 9.71287 6.49904 9.71287 6.22 9.43393C5.94096 9.15498 5.94096 8.70272 6.22 8.42377L6.91725 7.72676L3.65802 7.72676C3.26339 7.72676 2.94349 7.40696 2.94349 7.01247C2.94349 6.61798 3.26339 6.29819 3.65802 6.29819L6.91725 6.29819L6.22 5.60117C5.94096 5.32223 5.94096 4.86997 6.22 4.59102Z"
    clip-rule="evenodd"
  />
</svg>`,nPe=Ze`<svg
  width="14"
  height="14"
  viewBox="0 0 14 14"
  fill="none"
  xmlns="http://www.w3.org/2000/svg"
>
  <path
    fill-rule="evenodd"
    clip-rule="evenodd"
    d="M13.7306 3.24213C14.0725 3.58384 14.0725 4.13786 13.7306 4.47957L10.7418 7.46737C10.4 7.80908 9.84581 7.80908 9.50399 7.46737C9.16216 7.12567 9.16216 6.57165 9.50399 6.22994L10.9986 4.73585H5.34082C4.85741 4.73585 4.46553 4.3441 4.46553 3.86085C4.46553 3.3776 4.85741 2.98585 5.34082 2.98585L10.9986 2.98585L9.50399 1.49177C9.16216 1.15006 9.16216 0.596037 9.50399 0.254328C9.84581 -0.0873803 10.4 -0.0873803 10.7418 0.254328L13.7306 3.24213ZM9.52515 10.1352C9.52515 10.6185 9.13327 11.0102 8.64986 11.0102L2.9921 11.0102L4.48669 12.5043C4.82852 12.846 4.82852 13.4001 4.48669 13.7418C4.14487 14.0835 3.59066 14.0835 3.24884 13.7418L0.26003 10.754C0.0958806 10.5899 0.0036621 10.3673 0.00366211 10.1352C0.00366212 9.90318 0.0958806 9.68062 0.26003 9.51652L3.24884 6.52872C3.59066 6.18701 4.14487 6.18701 4.48669 6.52872C4.82851 6.87043 4.82851 7.42445 4.48669 7.76616L2.9921 9.26024L8.64986 9.26024C9.13327 9.26024 9.52515 9.65199 9.52515 10.1352Z"
    fill="currentColor"
  />
</svg>

`,rPe=Ze`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
  <path 
    fill="currentColor"
    fill-rule="evenodd" 
    clip-rule="evenodd" 
    d="M8.3071 0.292893C8.69763 0.683417 8.69763 1.31658 8.3071 1.70711L6.41421 3.6H11.3404C13.8368 3.6 16.0533 5.1975 16.8427 7.56588L16.9487 7.88377C17.1233 8.40772 16.8402 8.97404 16.3162 9.14868C15.7923 9.32333 15.226 9.04017 15.0513 8.51623L14.9453 8.19834C14.4281 6.64664 12.976 5.6 11.3404 5.6H6.41421L8.3071 7.49289C8.69763 7.88342 8.69763 8.51658 8.3071 8.90711C7.91658 9.29763 7.28341 9.29763 6.89289 8.90711L3.29289 5.30711C2.90236 4.91658 2.90236 4.28342 3.29289 3.89289L6.89289 0.292893C7.28341 -0.0976311 7.91658 -0.0976311 8.3071 0.292893ZM3.68377 10.8513C4.20771 10.6767 4.77403 10.9598 4.94868 11.4838L5.05464 11.8017C5.57188 13.3534 7.024 14.4 8.65964 14.4L13.5858 14.4L11.6929 12.5071C11.3024 12.1166 11.3024 11.4834 11.6929 11.0929C12.0834 10.7024 12.7166 10.7024 13.1071 11.0929L16.7071 14.6929C17.0976 15.0834 17.0976 15.7166 16.7071 16.1071L13.1071 19.7071C12.7166 20.0976 12.0834 20.0976 11.6929 19.7071C11.3024 19.3166 11.3024 18.6834 11.6929 18.2929L13.5858 16.4L8.65964 16.4C6.16314 16.4 3.94674 14.8025 3.15728 12.4341L3.05131 12.1162C2.87667 11.5923 3.15983 11.026 3.68377 10.8513Z" 
  />
</svg>`,iPe=Ze`<svg fill="none" viewBox="0 0 14 14">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M3.48 2.18a1 1 0 0 1 1.41 0l2.68 2.68a1 1 0 1 1-1.41 1.42l-.98-.98v4.56a1 1 0 0 1-2 0V5.3l-.97.98A1 1 0 0 1 .79 4.86l2.69-2.68Zm6.34 2.93a1 1 0 0 1 1 1v4.56l.97-.98a1 1 0 1 1 1.42 1.42l-2.69 2.68a1 1 0 0 1-1.41 0l-2.68-2.68a1 1 0 0 1 1.41-1.42l.98.98V6.1a1 1 0 0 1 1-1Z"
    clip-rule="evenodd"
  />
</svg>`,sPe=Ze`<svg width="32" height="32" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
  <g clip-path="url(#a)">
    <path fill="url(#b)" d="M0 0h32v32H0z"/>
    <path fill-rule="evenodd" clip-rule="evenodd" d="M7.034 15.252c4.975-2.167 8.293-3.596 9.953-4.287 4.74-1.971 5.725-2.314 6.366-2.325.142-.002.457.033.662.198.172.14.22.33.243.463.022.132.05.435.028.671-.257 2.7-1.368 9.248-1.933 12.27-.24 1.28-.71 1.708-1.167 1.75-.99.091-1.743-.655-2.703-1.284-1.502-.985-2.351-1.598-3.81-2.558-1.684-1.11-.592-1.721.368-2.718.252-.261 4.619-4.233 4.703-4.594.01-.045.02-.213-.08-.301-.1-.09-.246-.059-.353-.035-.15.034-2.55 1.62-7.198 4.758-.682.468-1.298.696-1.851.684-.61-.013-1.782-.344-2.653-.628-1.069-.347-1.918-.53-1.845-1.12.039-.308.462-.623 1.27-.944Z" fill="#fff"/>
  </g>
  <path d="M.5 16C.5 7.44 7.44.5 16 .5 24.56.5 31.5 7.44 31.5 16c0 8.56-6.94 15.5-15.5 15.5C7.44 31.5.5 24.56.5 16Z" stroke="#141414" stroke-opacity=".05"/>
  <defs>
    <linearGradient id="b" x1="1600" y1="0" x2="1600" y2="3176.27" gradientUnits="userSpaceOnUse">
      <stop stop-color="#2AABEE"/>
      <stop offset="1" stop-color="#229ED9"/>
    </linearGradient>
    <clipPath id="a">
      <path d="M0 16C0 7.163 7.163 0 16 0s16 7.163 16 16-7.163 16-16 16S0 24.837 0 16Z" fill="#fff"/>
    </clipPath>
  </defs>
</svg>`,oPe=Ze`<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg">
  <path d="M7 3.71875C6.0335 3.71875 5.25 2.93525 5.25 1.96875C5.25 1.00225 6.0335 0.21875 7 0.21875C7.9665 0.21875 8.75 1.00225 8.75 1.96875C8.75 2.93525 7.9665 3.71875 7 3.71875Z" fill="#949E9E"/>
  <path d="M7 8.96875C6.0335 8.96875 5.25 8.18525 5.25 7.21875C5.25 6.25225 6.0335 5.46875 7 5.46875C7.9665 5.46875 8.75 6.25225 8.75 7.21875C8.75 8.18525 7.9665 8.96875 7 8.96875Z" fill="#949E9E"/>
  <path d="M5.25 12.4688C5.25 13.4352 6.0335 14.2187 7 14.2187C7.9665 14.2187 8.75 13.4352 8.75 12.4688C8.75 11.5023 7.9665 10.7188 7 10.7188C6.0335 10.7188 5.25 11.5023 5.25 12.4688Z" fill="#949E9E"/>
</svg>`,aPe=Ze`<svg fill="none" viewBox="0 0 40 40">
  <g clip-path="url(#a)">
    <g clip-path="url(#b)">
      <circle cx="20" cy="19.89" r="20" fill="#5A3E85" />
      <g clip-path="url(#c)">
        <path
          fill="#fff"
          d="M18.22 25.7 20 23.91h3.34l2.1-2.1v-6.68H15.4v8.78h2.82v1.77Zm3.87-8.16h1.25v3.66H22.1v-3.66Zm-3.34 0H20v3.66h-1.25v-3.66ZM20 7.9a12 12 0 1 0 0 24 12 12 0 0 0 0-24Zm6.69 14.56-3.66 3.66h-2.72l-1.77 1.78h-1.88V26.1H13.3v-9.82l.94-2.4H26.7v8.56Z"
        />
      </g>
    </g>
  </g>
  <defs>
    <clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
    <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
    <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
  </defs>
</svg>`,cPe=Ze`<svg fill="none" viewBox="0 0 16 16">
  <path
    fill="currentColor"
    d="m14.36 4.74.01.42c0 4.34-3.3 9.34-9.34 9.34A9.3 9.3 0 0 1 0 13.03a6.6 6.6 0 0 0 4.86-1.36 3.29 3.29 0 0 1-3.07-2.28c.5.1 1 .07 1.48-.06A3.28 3.28 0 0 1 .64 6.11v-.04c.46.26.97.4 1.49.41A3.29 3.29 0 0 1 1.11 2.1a9.32 9.32 0 0 0 6.77 3.43 3.28 3.28 0 0 1 5.6-3 6.59 6.59 0 0 0 2.08-.8 3.3 3.3 0 0 1-1.45 1.82A6.53 6.53 0 0 0 16 3.04c-.44.66-1 1.23-1.64 1.7Z"
  />
</svg>`,lPe=Ze`<svg fill="none" viewBox="0 0 28 28">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M18.1 4.76c-.42-.73-1.33-1.01-2.09-.66l-1.42.66c-.37.18-.8.18-1.18 0l-1.4-.65a1.63 1.63 0 0 0-2.1.66l-.84 1.45c-.2.34-.53.59-.92.67l-1.7.35c-.83.17-1.39.94-1.3 1.78l.19 1.56c.04.39-.08.78-.33 1.07l-1.12 1.3c-.52.6-.52 1.5 0 2.11L5 16.38c.25.3.37.68.33 1.06l-.18 1.57c-.1.83.46 1.6 1.28 1.78l1.7.35c.4.08.73.32.93.66l.84 1.43a1.63 1.63 0 0 0 2.09.66l1.41-.66c.37-.17.8-.17 1.18 0l1.43.67c.76.35 1.66.07 2.08-.65l.86-1.45c.2-.34.54-.58.92-.66l1.68-.35A1.63 1.63 0 0 0 22.84 19l-.18-1.57a1.4 1.4 0 0 1 .33-1.06l1.12-1.32c.52-.6.52-1.5 0-2.11l-1.12-1.3a1.4 1.4 0 0 1-.33-1.07l.18-1.57c.1-.83-.46-1.6-1.28-1.77l-1.68-.35a1.4 1.4 0 0 1-.92-.66l-.86-1.47Zm-3.27-3.2a4.43 4.43 0 0 1 5.69 1.78l.54.93 1.07.22a4.43 4.43 0 0 1 3.5 4.84l-.11.96.7.83a4.43 4.43 0 0 1 .02 5.76l-.72.85.1.96a4.43 4.43 0 0 1-3.5 4.84l-1.06.22-.54.92a4.43 4.43 0 0 1-5.68 1.77l-.84-.4-.82.39a4.43 4.43 0 0 1-5.7-1.79l-.51-.89-1.09-.22a4.43 4.43 0 0 1-3.5-4.84l.1-.96-.72-.85a4.43 4.43 0 0 1 .01-5.76l.71-.83-.1-.95a4.43 4.43 0 0 1 3.5-4.84l1.08-.23.53-.9a4.43 4.43 0 0 1 5.7-1.8l.81.38.83-.39ZM18.2 9.4c.65.42.84 1.28.42 1.93l-4.4 6.87a1.4 1.4 0 0 1-2.26.14L9.5 15.39a1.4 1.4 0 0 1 2.15-1.8l1.23 1.48 3.38-5.26a1.4 1.4 0 0 1 1.93-.42Z"
    clip-rule="evenodd"
  />
</svg>`,uPe=Ze`<svg fill="none" viewBox="0 0 14 14">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="m4.1 12.43-.45-.78-.93-.2a1.65 1.65 0 0 1-1.31-1.8l.1-.86-.61-.71a1.65 1.65 0 0 1 0-2.16l.6-.7-.09-.85c-.1-.86.47-1.64 1.3-1.81l.94-.2.45-.78A1.65 1.65 0 0 1 6.23.9l.77.36.78-.36c.77-.36 1.69-.07 2.12.66l.47.8.91.2c.84.17 1.4.95 1.31 1.8l-.1.86.6.7c.54.62.54 1.54.01 2.16l-.6.71.09.86c.1.85-.47 1.63-1.3 1.8l-.92.2-.47.79a1.65 1.65 0 0 1-2.12.66L7 12.74l-.77.36c-.78.35-1.7.07-2.13-.67Zm5.74-6.9a1 1 0 1 0-1.68-1.07L6.32 7.3l-.55-.66a1 1 0 0 0-1.54 1.28l1.43 1.71a1 1 0 0 0 1.61-.1l2.57-4Z"
    clip-rule="evenodd"
  />
</svg>`,dPe=Ze`
  <svg fill="none" viewBox="0 0 48 44">
    <path
      style="fill: var(--wui-color-bg-300);"
      d="M4.56 8.64c-1.23 1.68-1.23 4.08-1.23 8.88v8.96c0 4.8 0 7.2 1.23 8.88.39.55.87 1.02 1.41 1.42C7.65 38 10.05 38 14.85 38h14.3c4.8 0 7.2 0 8.88-1.22a6.4 6.4 0 0 0 1.41-1.42c.83-1.14 1.1-2.6 1.19-4.92a6.4 6.4 0 0 0 5.16-4.65c.21-.81.21-1.8.21-3.79 0-1.98 0-2.98-.22-3.79a6.4 6.4 0 0 0-5.15-4.65c-.1-2.32-.36-3.78-1.19-4.92a6.4 6.4 0 0 0-1.41-1.42C36.35 6 33.95 6 29.15 6h-14.3c-4.8 0-7.2 0-8.88 1.22a6.4 6.4 0 0 0-1.41 1.42Z"
    />
    <path
      style="fill: var(--wui-color-fg-200);"
      fill-rule="evenodd"
      d="M2.27 11.33a6.4 6.4 0 0 1 6.4-6.4h26.66a6.4 6.4 0 0 1 6.4 6.4v1.7a6.4 6.4 0 0 1 5.34 6.3v5.34a6.4 6.4 0 0 1-5.34 6.3v1.7a6.4 6.4 0 0 1-6.4 6.4H8.67a6.4 6.4 0 0 1-6.4-6.4V11.33ZM39.6 31.07h-6.93a9.07 9.07 0 1 1 0-18.14h6.93v-1.6a4.27 4.27 0 0 0-4.27-4.26H8.67a4.27 4.27 0 0 0-4.27 4.26v21.34a4.27 4.27 0 0 0 4.27 4.26h26.66a4.27 4.27 0 0 0 4.27-4.26v-1.6Zm-6.93-16a6.93 6.93 0 0 0 0 13.86h8a4.27 4.27 0 0 0 4.26-4.26v-5.34a4.27 4.27 0 0 0-4.26-4.26h-8Z"
      clip-rule="evenodd"
    />
  </svg>
`,fPe=Ze`<svg fill="none" viewBox="0 0 20 20">
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M0 5.5c0-1.8 1.46-3.25 3.25-3.25H14.5c1.8 0 3.25 1.46 3.25 3.25v.28A3.25 3.25 0 0 1 20 8.88v2.24c0 1.45-.94 2.68-2.25 3.1v.28c0 1.8-1.46 3.25-3.25 3.25H3.25A3.25 3.25 0 0 1 0 14.5v-9Zm15.75 8.88h-2.38a4.38 4.38 0 0 1 0-8.76h2.38V5.5c0-.69-.56-1.25-1.25-1.25H3.25C2.56 4.25 2 4.81 2 5.5v9c0 .69.56 1.25 1.25 1.25H14.5c.69 0 1.25-.56 1.25-1.25v-.13Zm-2.38-6.76a2.37 2.37 0 1 0 0 4.75h3.38c.69 0 1.25-.55 1.25-1.24V8.87c0-.69-.56-1.24-1.25-1.24h-3.38Z"
    clip-rule="evenodd"
  />
</svg>`,hPe=Ze`<svg fill="none" viewBox="0 0 96 67">
  <path
    fill="currentColor"
    d="M25.32 18.8a32.56 32.56 0 0 1 45.36 0l1.5 1.47c.63.62.63 1.61 0 2.22l-5.15 5.05c-.31.3-.82.3-1.14 0l-2.07-2.03a22.71 22.71 0 0 0-31.64 0l-2.22 2.18c-.31.3-.82.3-1.14 0l-5.15-5.05a1.55 1.55 0 0 1 0-2.22l1.65-1.62Zm56.02 10.44 4.59 4.5c.63.6.63 1.6 0 2.21l-20.7 20.26c-.62.61-1.63.61-2.26 0L48.28 41.83a.4.4 0 0 0-.56 0L33.03 56.21c-.63.61-1.64.61-2.27 0L10.07 35.95a1.55 1.55 0 0 1 0-2.22l4.59-4.5a1.63 1.63 0 0 1 2.27 0L31.6 43.63a.4.4 0 0 0 .57 0l14.69-14.38a1.63 1.63 0 0 1 2.26 0l14.69 14.38a.4.4 0 0 0 .57 0l14.68-14.38a1.63 1.63 0 0 1 2.27 0Z"
  />
  <path
    stroke="#000"
    stroke-opacity=".1"
    d="M25.67 19.15a32.06 32.06 0 0 1 44.66 0l1.5 1.48c.43.42.43 1.09 0 1.5l-5.15 5.05a.31.31 0 0 1-.44 0l-2.07-2.03a23.21 23.21 0 0 0-32.34 0l-2.22 2.18a.31.31 0 0 1-.44 0l-5.15-5.05a1.05 1.05 0 0 1 0-1.5l1.65-1.63ZM81 29.6l4.6 4.5c.42.41.42 1.09 0 1.5l-20.7 20.26c-.43.43-1.14.43-1.57 0L48.63 41.47a.9.9 0 0 0-1.26 0L32.68 55.85c-.43.43-1.14.43-1.57 0L10.42 35.6a1.05 1.05 0 0 1 0-1.5l4.59-4.5a1.13 1.13 0 0 1 1.57 0l14.68 14.38a.9.9 0 0 0 1.27 0l-.35-.35.35.35L47.22 29.6a1.13 1.13 0 0 1 1.56 0l14.7 14.38a.9.9 0 0 0 1.26 0L79.42 29.6a1.13 1.13 0 0 1 1.57 0Z"
  />
</svg>`,pPe=Ze`<svg fill="none" viewBox="0 0 20 20">
  <path
    fill="currentColor"
    d="M11 6.67a1 1 0 1 0-2 0v2.66a1 1 0 0 0 2 0V6.67ZM10 14.5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z"
  />
  <path
    fill="currentColor"
    fill-rule="evenodd"
    d="M10 1a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm-7 9a7 7 0 1 1 14 0 7 7 0 0 1-14 0Z"
    clip-rule="evenodd"
  />
</svg>`,mPe=Ze`<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.00177 1.78569C3.8179 1.78569 2.85819 2.74508 2.85819 3.92855C2.85819 4.52287 3.09928 5.05956 3.49077 5.4485L3.5005 5.45817C3.64381 5.60054 3.76515 5.72108 3.85631 5.81845C3.93747 5.90512 4.05255 6.03218 4.12889 6.1805C4.16999 6.26034 4.19 6.30843 4.21768 6.39385C4.22145 6.40546 4.22499 6.41703 4.22833 6.42855H5.77521C5.77854 6.41703 5.78208 6.40547 5.78585 6.39385C5.81353 6.30843 5.83354 6.26034 5.87464 6.1805C5.95098 6.03218 6.06606 5.90512 6.14722 5.81845C6.23839 5.72108 6.35973 5.60053 6.50304 5.45816L6.51276 5.4485C6.90425 5.05956 7.14534 4.52287 7.14534 3.92855C7.14534 2.74508 6.18563 1.78569 5.00177 1.78569ZM5.71629 7.85712H4.28724C4.28724 8.21403 4.28876 8.40985 4.30703 8.54571C4.30727 8.54748 4.30751 8.54921 4.30774 8.55091C4.30944 8.55115 4.31118 8.55138 4.31295 8.55162C4.44884 8.56989 4.64474 8.5714 5.00177 8.5714C5.3588 8.5714 5.55469 8.56989 5.69059 8.55162C5.69236 8.55138 5.69409 8.55115 5.69579 8.55091C5.69603 8.54921 5.69627 8.54748 5.6965 8.54571C5.71477 8.40985 5.71629 8.21403 5.71629 7.85712ZM2.85819 7.14283C2.85819 6.9948 2.85796 6.91114 2.8548 6.85032C2.85461 6.84656 2.85441 6.84309 2.85421 6.83988C2.84393 6.8282 2.83047 6.81334 2.81301 6.79469C2.74172 6.71856 2.63908 6.61643 2.48342 6.46178C1.83307 5.81566 1.42914 4.91859 1.42914 3.92855C1.42914 1.9561 3.02866 0.357117 5.00177 0.357117C6.97487 0.357117 8.57439 1.9561 8.57439 3.92855C8.57439 4.91859 8.17047 5.81566 7.52012 6.46178C7.36445 6.61643 7.26182 6.71856 7.19053 6.79469C7.17306 6.81334 7.1596 6.8282 7.14932 6.83988C7.14912 6.84309 7.14892 6.84656 7.14873 6.85032C7.14557 6.91114 7.14534 6.9948 7.14534 7.14283V7.85712C7.14534 7.87009 7.14535 7.88304 7.14535 7.89598C7.14541 8.19889 7.14547 8.49326 7.11281 8.73606C7.076 9.00978 6.98631 9.32212 6.72678 9.58156C6.46726 9.841 6.15481 9.93065 5.881 9.96745C5.63813 10.0001 5.34365 10 5.04064 9.99998C5.0277 9.99998 5.01474 9.99998 5.00177 9.99998C4.98879 9.99998 4.97583 9.99998 4.96289 9.99998C4.65988 10 4.36541 10.0001 4.12253 9.96745C3.84872 9.93065 3.53628 9.841 3.27675 9.58156C3.01722 9.32212 2.92753 9.00978 2.89072 8.73606C2.85807 8.49326 2.85812 8.19889 2.85818 7.89598C2.85819 7.88304 2.85819 7.87008 2.85819 7.85712V7.14283ZM7.1243 6.86977C7.12366 6.87069 7.1233 6.87116 7.12327 6.87119C7.12323 6.87123 7.12356 6.87076 7.1243 6.86977ZM2.88027 6.8712C2.88025 6.87119 2.87988 6.8707 2.87921 6.86975C2.87995 6.87072 2.88028 6.8712 2.88027 6.8712Z" fill="#949E9E"/>
</svg>`,gPe=Ze`<svg
 xmlns="http://www.w3.org/2000/svg"
 width="28"
 height="28"
 viewBox="0 0 28 28"
 fill="none">
  <path
    fill="#949E9E"
    fill-rule="evenodd"
    d="M7.974 2.975h12.052c1.248 0 2.296 0 3.143.092.89.096 1.723.307 2.461.844a4.9 4.9 0 0 1 1.084 1.084c.537.738.748 1.57.844 2.461.092.847.092 1.895.092 3.143v6.802c0 1.248 0 2.296-.092 3.143-.096.89-.307 1.723-.844 2.461a4.9 4.9 0 0 1-1.084 1.084c-.738.537-1.57.748-2.461.844-.847.092-1.895.092-3.143.092H7.974c-1.247 0-2.296 0-3.143-.092-.89-.096-1.723-.307-2.461-.844a4.901 4.901 0 0 1-1.084-1.084c-.537-.738-.748-1.571-.844-2.461C.35 19.697.35 18.649.35 17.4v-6.802c0-1.248 0-2.296.092-3.143.096-.89.307-1.723.844-2.461A4.9 4.9 0 0 1 2.37 3.91c.738-.537 1.571-.748 2.461-.844.847-.092 1.895-.092 3.143-.092ZM5.133 5.85c-.652.071-.936.194-1.117.326a2.1 2.1 0 0 0-.465.465c-.132.181-.255.465-.325 1.117-.074.678-.076 1.573-.076 2.917v6.65c0 1.344.002 2.239.076 2.917.07.652.193.936.325 1.117a2.1 2.1 0 0 0 .465.465c.181.132.465.255 1.117.326.678.073 1.574.075 2.917.075h11.9c1.344 0 2.239-.002 2.917-.075.652-.071.936-.194 1.117-.326.179-.13.335-.286.465-.465.132-.181.255-.465.326-1.117.073-.678.075-1.573.075-2.917v-6.65c0-1.344-.002-2.239-.075-2.917-.071-.652-.194-.936-.326-1.117a2.1 2.1 0 0 0-.465-.465c-.181-.132-.465-.255-1.117-.326-.678-.073-1.573-.075-2.917-.075H8.05c-1.343 0-2.239.002-2.917.075Zm.467 7.275a3.15 3.15 0 1 1 6.3 0 3.15 3.15 0 0 1-6.3 0Zm8.75-1.75a1.4 1.4 0 0 1 1.4-1.4h3.5a1.4 1.4 0 0 1 0 2.8h-3.5a1.4 1.4 0 0 1-1.4-1.4Zm0 5.25a1.4 1.4 0 0 1 1.4-1.4H21a1.4 1.4 0 1 1 0 2.8h-5.25a1.4 1.4 0 0 1-1.4-1.4Z"
    clip-rule="evenodd"/>
</svg>`,nq=Ze`<svg fill="none" viewBox="0 0 41 40">
  <g clip-path="url(#a)">
    <path fill="#000" d="M.8 0h40v40H.8z" />
    <path
      fill="#fff"
      d="m22.63 18.46 7.14-8.3h-1.69l-6.2 7.2-4.96-7.2H11.2l7.5 10.9-7.5 8.71h1.7l6.55-7.61 5.23 7.61h5.72l-7.77-11.31Zm-9.13-7.03h2.6l11.98 17.13h-2.6L13.5 11.43Z"
    />
  </g>
  <defs>
    <clipPath id="a"><path fill="#fff" d="M.8 20a20 20 0 1 1 40 0 20 20 0 0 1-40 0Z" /></clipPath>
  </defs>
</svg>`;var o9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const wPe={add:tNe,allWallets:nNe,arrowBottomCircle:rNe,appStore:iNe,apple:sNe,arrowBottom:oNe,arrowLeft:aNe,arrowRight:cNe,arrowTop:lNe,bank:uNe,browser:dNe,card:fNe,checkmark:pNe,checkmarkBold:hNe,chevronBottom:mNe,chevronLeft:gNe,chevronRight:wNe,chevronTop:yNe,chromeStore:vNe,clock:bNe,close:xNe,compass:ANe,coinPlaceholder:_Ne,copy:ENe,cursor:CNe,cursorTransparent:SNe,desktop:TNe,disconnect:INe,discord:kNe,etherscan:RNe,extension:NNe,externalLink:PNe,facebook:ONe,farcaster:DNe,filters:MNe,github:BNe,google:$Ne,helpCircle:jNe,image:LNe,id:gPe,infoCircle:UNe,lightbulb:mPe,mail:FNe,mobile:zNe,more:HNe,networkPlaceholder:WNe,nftPlaceholder:VNe,off:qNe,playStore:GNe,plus:KNe,qrCode:YNe,recycleHorizontal:QNe,refresh:ZNe,search:JNe,send:XNe,swapHorizontal:ePe,swapHorizontalMedium:nPe,swapHorizontalBold:tPe,swapHorizontalRoundedBold:rPe,swapVertical:iPe,telegram:sPe,threeDots:oPe,twitch:aPe,twitter:nq,twitterIcon:cPe,verify:lPe,verifyFilled:uPe,wallet:fPe,walletConnect:hPe,walletPlaceholder:dPe,warningCircle:pPe,x:nq};let Av=class extends Te{constructor(){super(...arguments),this.size="md",this.name="copy",this.color="fg-300"}render(){return this.style.cssText=`
      --local-color: ${`var(--wui-color-${this.color});`}
      --local-width: ${`var(--wui-icon-size-${this.size});`}
    `,K`${wPe[this.name]}`}};Av.styles=[Et,e$,eNe];o9([ne()],Av.prototype,"size",void 0);o9([ne()],Av.prototype,"name",void 0);o9([ne()],Av.prototype,"color",void 0);Av=o9([Ce("wui-icon")],Av);const yPe=De`
  :host {
    display: block;
    width: var(--local-width);
    height: var(--local-height);
  }

  img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: inherit;
  }
`;var a9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Ev=class extends Te{constructor(){super(...arguments),this.src="./path/to/image.jpg",this.alt="Image",this.size=void 0}render(){return this.style.cssText=`
      --local-width: ${this.size?`var(--wui-icon-size-${this.size});`:"100%"};
      --local-height: ${this.size?`var(--wui-icon-size-${this.size});`:"100%"};
      `,K`<img src=${this.src} alt=${this.alt} @error=${this.handleImageError} />`}handleImageError(){this.dispatchEvent(new CustomEvent("onLoadError",{bubbles:!0,composed:!0}))}};Ev.styles=[Et,e$,yPe];a9([ne()],Ev.prototype,"src",void 0);a9([ne()],Ev.prototype,"alt",void 0);a9([ne()],Ev.prototype,"size",void 0);Ev=a9([Ce("wui-image")],Ev);const vPe=De`
  :host {
    display: block;
    width: var(--wui-box-size-lg);
    height: var(--wui-box-size-lg);
  }

  svg {
    width: var(--wui-box-size-lg);
    height: var(--wui-box-size-lg);
    fill: none;
    stroke: transparent;
    stroke-linecap: round;
  }

  use {
    stroke: var(--wui-color-accent-100);
    stroke-width: 2px;
    stroke-dasharray: 54, 118;
    stroke-dashoffset: 172;
    animation: dash 1s linear infinite;
  }

  @keyframes dash {
    to {
      stroke-dashoffset: 0px;
    }
  }
`;var bPe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let DP=class extends Te{render(){return K`
      <svg viewBox="0 0 54 59">
        <path
          id="wui-loader-path"
          d="M17.22 5.295c3.877-2.277 5.737-3.363 7.72-3.726a11.44 11.44 0 0 1 4.12 0c1.983.363 3.844 1.45 7.72 3.726l6.065 3.562c3.876 2.276 5.731 3.372 7.032 4.938a11.896 11.896 0 0 1 2.06 3.63c.683 1.928.688 4.11.688 8.663v7.124c0 4.553-.005 6.735-.688 8.664a11.896 11.896 0 0 1-2.06 3.63c-1.3 1.565-3.156 2.66-7.032 4.937l-6.065 3.563c-3.877 2.276-5.737 3.362-7.72 3.725a11.46 11.46 0 0 1-4.12 0c-1.983-.363-3.844-1.449-7.72-3.726l-6.065-3.562c-3.876-2.276-5.731-3.372-7.032-4.938a11.885 11.885 0 0 1-2.06-3.63c-.682-1.928-.688-4.11-.688-8.663v-7.124c0-4.553.006-6.735.688-8.664a11.885 11.885 0 0 1 2.06-3.63c1.3-1.565 3.156-2.66 7.032-4.937l6.065-3.562Z"
        />
        <use xlink:href="#wui-loader-path"></use>
      </svg>
    `}};DP.styles=[Et,vPe];DP=bPe([Ce("wui-loading-hexagon")],DP);const xPe=De`
  :host {
    display: flex;
  }

  :host([data-size='sm']) > svg {
    width: 12px;
    height: 12px;
  }

  :host([data-size='md']) > svg {
    width: 16px;
    height: 16px;
  }

  :host([data-size='lg']) > svg {
    width: 24px;
    height: 24px;
  }

  :host([data-size='xl']) > svg {
    width: 32px;
    height: 32px;
  }

  svg {
    animation: rotate 2s linear infinite;
  }

  circle {
    fill: none;
    stroke: var(--local-color);
    stroke-width: 4px;
    stroke-dasharray: 1, 124;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
  }

  :host([data-size='md']) > svg > circle {
    stroke-width: 6px;
  }

  :host([data-size='sm']) > svg > circle {
    stroke-width: 8px;
  }

  @keyframes rotate {
    100% {
      transform: rotate(360deg);
    }
  }

  @keyframes dash {
    0% {
      stroke-dasharray: 1, 124;
      stroke-dashoffset: 0;
    }

    50% {
      stroke-dasharray: 90, 124;
      stroke-dashoffset: -35;
    }

    100% {
      stroke-dashoffset: -125;
    }
  }
`;var t$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let ex=class extends Te{constructor(){super(...arguments),this.color="accent-100",this.size="lg"}render(){return this.style.cssText=`--local-color: ${this.color==="inherit"?"inherit":`var(--wui-color-${this.color})`}`,this.dataset.size=this.size,K`<svg viewBox="25 25 50 50">
      <circle r="20" cy="50" cx="50"></circle>
    </svg>`}};ex.styles=[Et,xPe];t$([ne()],ex.prototype,"color",void 0);t$([ne()],ex.prototype,"size",void 0);ex=t$([Ce("wui-loading-spinner")],ex);const _Pe=De`
  :host {
    display: block;
    width: var(--wui-box-size-md);
    height: var(--wui-box-size-md);
  }

  svg {
    width: var(--wui-box-size-md);
    height: var(--wui-box-size-md);
  }

  rect {
    fill: none;
    stroke: var(--wui-color-accent-100);
    stroke-width: 4px;
    stroke-linecap: round;
    animation: dash 1s linear infinite;
  }

  @keyframes dash {
    to {
      stroke-dashoffset: 0px;
    }
  }
`;var tne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let SC=class extends Te{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){const e=this.radius>50?50:this.radius,r=36-e,i=116+r,s=245+r,o=360+r*1.75;return K`
      <svg viewBox="0 0 110 110" width="110" height="110">
        <rect
          x="2"
          y="2"
          width="106"
          height="106"
          rx=${e}
          stroke-dasharray="${i} ${s}"
          stroke-dashoffset=${o}
        />
      </svg>
    `}};SC.styles=[Et,_Pe];tne([ne({type:Number})],SC.prototype,"radius",void 0);SC=tne([Ce("wui-loading-thumbnail")],SC);const APe=De`
  :host {
    display: block;
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
    background: linear-gradient(
      120deg,
      var(--wui-color-bg-200) 5%,
      var(--wui-color-bg-200) 48%,
      var(--wui-color-bg-300) 55%,
      var(--wui-color-bg-300) 60%,
      var(--wui-color-bg-300) calc(60% + 10px),
      var(--wui-color-bg-200) calc(60% + 12px),
      var(--wui-color-bg-200) 100%
    );
    background-size: 250%;
    animation: shimmer 3s linear infinite reverse;
  }

  :host([variant='light']) {
    background: linear-gradient(
      120deg,
      var(--wui-color-bg-150) 5%,
      var(--wui-color-bg-150) 48%,
      var(--wui-color-bg-200) 55%,
      var(--wui-color-bg-200) 60%,
      var(--wui-color-bg-200) calc(60% + 10px),
      var(--wui-color-bg-150) calc(60% + 12px),
      var(--wui-color-bg-150) 100%
    );
    background-size: 250%;
  }

  @keyframes shimmer {
    from {
      background-position: -250% 0;
    }
    to {
      background-position: 250% 0;
    }
  }
`;var W6=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Hg=class extends Te{constructor(){super(...arguments),this.width="",this.height="",this.borderRadius="m",this.variant="default"}render(){return this.style.cssText=`
      width: ${this.width};
      height: ${this.height};
      border-radius: ${`clamp(0px,var(--wui-border-radius-${this.borderRadius}), 40px)`};
    `,K`<slot></slot>`}};Hg.styles=[APe];W6([ne()],Hg.prototype,"width",void 0);W6([ne()],Hg.prototype,"height",void 0);W6([ne()],Hg.prototype,"borderRadius",void 0);W6([ne()],Hg.prototype,"variant",void 0);Hg=W6([Ce("wui-shimmer")],Hg);/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const nne={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},rne=t=>(...e)=>({_$litDirective$:t,values:e});class ine{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,r){this.t=e,this._$AM=n,this.i=r}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}}/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const sne=rne(class extends ine{constructor(t){var e;if(super(t),t.type!==nne.ATTRIBUTE||t.name!=="class"||((e=t.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(t,[e]){var r,i;if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(const s in e)e[s]&&!((r=this.nt)!=null&&r.has(s))&&this.st.add(s);return this.render(e)}const n=t.element.classList;for(const s of this.st)s in e||(n.remove(s),this.st.delete(s));for(const s in e){const o=!!e[s];o===this.st.has(s)||(i=this.nt)!=null&&i.has(s)||(o?(n.add(s),this.st.add(s)):(n.remove(s),this.st.delete(s)))}return zg}}),EPe=De`
  :host {
    display: inline-flex !important;
  }

  slot {
    width: 100%;
    display: inline-block;
    font-style: normal;
    font-family: var(--wui-font-family);
    font-feature-settings:
      'tnum' on,
      'lnum' on,
      'case' on;
    line-height: 130%;
    font-weight: var(--wui-font-weight-regular);
    overflow: inherit;
    text-overflow: inherit;
    text-align: var(--local-align);
    color: var(--local-color);
  }

  .wui-line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  .wui-line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .wui-font-medium-400 {
    font-size: var(--wui-font-size-medium);
    font-weight: var(--wui-font-weight-light);
    letter-spacing: var(--wui-letter-spacing-medium);
  }

  .wui-font-medium-600 {
    font-size: var(--wui-font-size-medium);
    letter-spacing: var(--wui-letter-spacing-medium);
  }

  .wui-font-title-600 {
    font-size: var(--wui-font-size-title);
    letter-spacing: var(--wui-letter-spacing-title);
  }

  .wui-font-title-6-600 {
    font-size: var(--wui-font-size-title-6);
    letter-spacing: var(--wui-letter-spacing-title-6);
  }

  .wui-font-mini-700 {
    font-size: var(--wui-font-size-mini);
    letter-spacing: var(--wui-letter-spacing-mini);
    text-transform: uppercase;
  }

  .wui-font-large-500,
  .wui-font-large-600,
  .wui-font-large-700 {
    font-size: var(--wui-font-size-large);
    letter-spacing: var(--wui-letter-spacing-large);
  }

  .wui-font-2xl-500,
  .wui-font-2xl-600,
  .wui-font-2xl-700 {
    font-size: var(--wui-font-size-2xl);
    letter-spacing: var(--wui-letter-spacing-2xl);
  }

  .wui-font-paragraph-400,
  .wui-font-paragraph-500,
  .wui-font-paragraph-600,
  .wui-font-paragraph-700 {
    font-size: var(--wui-font-size-paragraph);
    letter-spacing: var(--wui-letter-spacing-paragraph);
  }

  .wui-font-small-400,
  .wui-font-small-500,
  .wui-font-small-600 {
    font-size: var(--wui-font-size-small);
    letter-spacing: var(--wui-letter-spacing-small);
  }

  .wui-font-tiny-400,
  .wui-font-tiny-500,
  .wui-font-tiny-600 {
    font-size: var(--wui-font-size-tiny);
    letter-spacing: var(--wui-letter-spacing-tiny);
  }

  .wui-font-micro-700,
  .wui-font-micro-600 {
    font-size: var(--wui-font-size-micro);
    letter-spacing: var(--wui-letter-spacing-micro);
    text-transform: uppercase;
  }

  .wui-font-tiny-400,
  .wui-font-small-400,
  .wui-font-medium-400,
  .wui-font-paragraph-400 {
    font-weight: var(--wui-font-weight-light);
  }

  .wui-font-large-700,
  .wui-font-paragraph-700,
  .wui-font-micro-700,
  .wui-font-mini-700 {
    font-weight: var(--wui-font-weight-bold);
  }

  .wui-font-medium-600,
  .wui-font-medium-title-600,
  .wui-font-title-6-600,
  .wui-font-large-600,
  .wui-font-paragraph-600,
  .wui-font-small-600,
  .wui-font-tiny-600,
  .wui-font-micro-600 {
    font-weight: var(--wui-font-weight-medium);
  }

  :host([disabled]) {
    opacity: 0.4;
  }
`;var V6=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Wg=class extends Te{constructor(){super(...arguments),this.variant="paragraph-500",this.color="fg-300",this.align="left",this.lineClamp=void 0}render(){const e={[`wui-font-${this.variant}`]:!0,[`wui-color-${this.color}`]:!0,[`wui-line-clamp-${this.lineClamp}`]:!!this.lineClamp};return this.style.cssText=`
      --local-align: ${this.align};
      --local-color: var(--wui-color-${this.color});
    `,K`<slot class=${sne(e)}></slot>`}};Wg.styles=[Et,EPe];V6([ne()],Wg.prototype,"variant",void 0);V6([ne()],Wg.prototype,"color",void 0);V6([ne()],Wg.prototype,"align",void 0);V6([ne()],Wg.prototype,"lineClamp",void 0);Wg=V6([Ce("wui-text")],Wg);const CPe=Ze`<svg fill="none" viewBox="0 0 60 60">
  <rect width="60" height="60" fill="#1DC956" rx="30" />
  <circle cx="30" cy="30" r="3" fill="#fff" />
  <path
    fill="#2BEE6C"
    stroke="#fff"
    stroke-width="2"
    d="m45.32 17.9-.88-.42.88.42.02-.05c.1-.2.21-.44.26-.7l-.82-.15.82.16a2 2 0 0 0-.24-1.4c-.13-.23-.32-.42-.47-.57a8.42 8.42 0 0 1-.04-.04l-.04-.04a2.9 2.9 0 0 0-.56-.47l-.51.86.5-.86a2 2 0 0 0-1.4-.24c-.26.05-.5.16-.69.26l-.05.02-15.05 7.25-.1.05c-1.14.55-1.85.89-2.46 1.37a7 7 0 0 0-1.13 1.14c-.5.6-.83 1.32-1.38 2.45l-.05.11-7.25 15.05-.02.05c-.1.2-.21.43-.26.69a2 2 0 0 0 .24 1.4l.85-.5-.85.5c.13.23.32.42.47.57l.04.04.04.04c.15.15.34.34.56.47a2 2 0 0 0 1.41.24l-.2-.98.2.98c.25-.05.5-.17.69-.26l.05-.02-.42-.87.42.87 15.05-7.25.1-.05c1.14-.55 1.85-.89 2.46-1.38a7 7 0 0 0 1.13-1.13 12.87 12.87 0 0 0 1.43-2.56l7.25-15.05Z"
  />
  <path
    fill="#1DC956"
    d="M33.38 32.72 30.7 29.3 15.86 44.14l.2.2a1 1 0 0 0 1.14.2l15.1-7.27a3 3 0 0 0 1.08-4.55Z"
  />
  <path
    fill="#86F999"
    d="m26.62 27.28 2.67 3.43 14.85-14.85-.2-.2a1 1 0 0 0-1.14-.2l-15.1 7.27a3 3 0 0 0-1.08 4.55Z"
  />
  <circle cx="30" cy="30" r="3" fill="#fff" transform="rotate(45 30 30)" />
  <rect width="59" height="59" x=".5" y=".5" stroke="#062B2B" stroke-opacity=".1" rx="29.5" />
</svg> `,SPe=Ze`<svg viewBox="0 0 60 60" fill="none">
  <g clip-path="url(#clip0_7734_50402)">
    <path
      d="M0 24.9C0 15.6485 0 11.0228 1.97053 7.56812C3.3015 5.23468 5.23468 3.3015 7.56812 1.97053C11.0228 0 15.6485 0 24.9 0H35.1C44.3514 0 48.9772 0 52.4319 1.97053C54.7653 3.3015 56.6985 5.23468 58.0295 7.56812C60 11.0228 60 15.6485 60 24.9V35.1C60 44.3514 60 48.9772 58.0295 52.4319C56.6985 54.7653 54.7653 56.6985 52.4319 58.0295C48.9772 60 44.3514 60 35.1 60H24.9C15.6485 60 11.0228 60 7.56812 58.0295C5.23468 56.6985 3.3015 54.7653 1.97053 52.4319C0 48.9772 0 44.3514 0 35.1V24.9Z"
      fill="#EB8B47"
    />
    <path
      d="M0.5 24.9C0.5 20.2652 0.50047 16.8221 0.744315 14.105C0.987552 11.3946 1.46987 9.45504 2.40484 7.81585C3.69145 5.56019 5.56019 3.69145 7.81585 2.40484C9.45504 1.46987 11.3946 0.987552 14.105 0.744315C16.8221 0.50047 20.2652 0.5 24.9 0.5H35.1C39.7348 0.5 43.1779 0.50047 45.895 0.744315C48.6054 0.987552 50.545 1.46987 52.1841 2.40484C54.4398 3.69145 56.3086 5.56019 57.5952 7.81585C58.5301 9.45504 59.0124 11.3946 59.2557 14.105C59.4995 16.8221 59.5 20.2652 59.5 24.9V35.1C59.5 39.7348 59.4995 43.1779 59.2557 45.895C59.0124 48.6054 58.5301 50.545 57.5952 52.1841C56.3086 54.4398 54.4398 56.3086 52.1841 57.5952C50.545 58.5301 48.6054 59.0124 45.895 59.2557C43.1779 59.4995 39.7348 59.5 35.1 59.5H24.9C20.2652 59.5 16.8221 59.4995 14.105 59.2557C11.3946 59.0124 9.45504 58.5301 7.81585 57.5952C5.56019 56.3086 3.69145 54.4398 2.40484 52.1841C1.46987 50.545 0.987552 48.6054 0.744315 45.895C0.50047 43.1779 0.5 39.7348 0.5 35.1V24.9Z"
      stroke="#062B2B"
      stroke-opacity="0.1"
    />
    <path
      d="M19 52C24.5228 52 29 47.5228 29 42C29 36.4772 24.5228 32 19 32C13.4772 32 9 36.4772 9 42C9 47.5228 13.4772 52 19 52Z"
      fill="#FF974C"
      stroke="white"
      stroke-width="2"
    />
    <path
      fill-rule="evenodd"
      clip-rule="evenodd"
      d="M42.8437 8.3264C42.4507 7.70891 41.5493 7.70891 41.1564 8.32641L28.978 27.4638C28.5544 28.1295 29.0326 29.0007 29.8217 29.0007H54.1783C54.9674 29.0007 55.4456 28.1295 55.022 27.4638L42.8437 8.3264Z"
      fill="white"
    />
    <path
      fill-rule="evenodd"
      clip-rule="evenodd"
      d="M42.3348 11.6456C42.659 11.7608 42.9061 12.1492 43.4005 12.926L50.7332 24.4488C51.2952 25.332 51.5763 25.7737 51.5254 26.1382C51.4915 26.3808 51.3698 26.6026 51.1833 26.7614C50.9031 27 50.3796 27 49.3327 27H34.6673C33.6204 27 33.0969 27 32.8167 26.7614C32.6302 26.6026 32.5085 26.3808 32.4746 26.1382C32.4237 25.7737 32.7048 25.332 33.2669 24.4488L40.5995 12.926C41.0939 12.1492 41.341 11.7608 41.6652 11.6456C41.8818 11.5687 42.1182 11.5687 42.3348 11.6456ZM35.0001 26.999C38.8661 26.999 42.0001 23.865 42.0001 19.999C42.0001 23.865 45.1341 26.999 49.0001 26.999H35.0001Z"
      fill="#FF974C"
    />
    <path
      d="M10.1061 9.35712C9.9973 9.67775 9.99867 10.0388 9.99978 10.3323C9.99989 10.3611 10 10.3893 10 10.4167V25.5833C10 25.6107 9.99989 25.6389 9.99978 25.6677C9.99867 25.9612 9.9973 26.3222 10.1061 26.6429C10.306 27.2317 10.7683 27.694 11.3571 27.8939C11.6777 28.0027 12.0388 28.0013 12.3323 28.0002C12.3611 28.0001 12.3893 28 12.4167 28H19C24.5228 28 29 23.5228 29 18C29 12.4772 24.5228 8 19 8H12.4167C12.3893 8 12.3611 7.99989 12.3323 7.99978C12.0388 7.99867 11.6778 7.9973 11.3571 8.10614C10.7683 8.306 10.306 8.76834 10.1061 9.35712Z"
      fill="#FF974C"
      stroke="white"
      stroke-width="2"
    />
    <circle cx="19" cy="18" r="4" fill="#EB8B47" stroke="white" stroke-width="2" />
    <circle cx="19" cy="42" r="4" fill="#EB8B47" stroke="white" stroke-width="2" />
  </g>
  <defs>
    <clipPath id="clip0_7734_50402">
      <rect width="60" height="60" fill="white" />
    </clipPath>
  </defs>
</svg> `,TPe=Ze`<svg fill="none" viewBox="0 0 60 60">
  <g clip-path="url(#a)">
    <path
      fill="#1DC956"
      d="M0 25.01c0-9.25 0-13.88 1.97-17.33a15 15 0 0 1 5.6-5.6C11.02.11 15.65.11 24.9.11h10.2c9.25 0 13.88 0 17.33 1.97a15 15 0 0 1 5.6 5.6C60 11.13 60 15.76 60 25v10.2c0 9.25 0 13.88-1.97 17.33a15 15 0 0 1-5.6 5.6c-3.45 1.97-8.08 1.97-17.33 1.97H24.9c-9.25 0-13.88 0-17.33-1.97a15 15 0 0 1-5.6-5.6C0 49.1 0 44.46 0 35.21v-10.2Z"
    />
    <path
      fill="#2BEE6C"
      d="M16.1 60c-3.82-.18-6.4-.64-8.53-1.86a15 15 0 0 1-5.6-5.6C.55 50.06.16 46.97.04 41.98L4.2 40.6a4 4 0 0 0 2.48-2.39l4.65-12.4a2 2 0 0 1 2.5-1.2l2.53.84a2 2 0 0 0 2.43-1l2.96-5.94a2 2 0 0 1 3.7.32l3.78 12.58a2 2 0 0 0 3.03 1.09l3.34-2.23a2 2 0 0 0 .65-.7l5.3-9.72a2 2 0 0 1 1.42-1.01l4.14-.69a2 2 0 0 1 1.6.44l3.9 3.24a2 2 0 0 0 2.7-.12l4.62-4.63c.08 2.2.08 4.8.08 7.93v10.2c0 9.25 0 13.88-1.97 17.33a15 15 0 0 1-5.6 5.6c-2.13 1.22-4.7 1.68-8.54 1.86H16.11Z"
    />
    <path
      fill="#fff"
      d="m.07 43.03-.05-2.1 3.85-1.28a3 3 0 0 0 1.86-1.79l4.66-12.4a3 3 0 0 1 3.75-1.8l2.53.84a1 1 0 0 0 1.21-.5l2.97-5.94a3 3 0 0 1 5.56.48l3.77 12.58a1 1 0 0 0 1.51.55l3.34-2.23a1 1 0 0 0 .33-.35l5.3-9.71a3 3 0 0 1 2.14-1.53l4.13-.69a3 3 0 0 1 2.41.66l3.9 3.24a1 1 0 0 0 1.34-.06l5.28-5.28c.05.85.08 1.75.1 2.73L56 22.41a3 3 0 0 1-4.04.19l-3.9-3.25a1 1 0 0 0-.8-.21l-4.13.69a1 1 0 0 0-.72.5l-5.3 9.72a3 3 0 0 1-.97 1.05l-3.34 2.23a3 3 0 0 1-4.53-1.63l-3.78-12.58a1 1 0 0 0-1.85-.16l-2.97 5.94a3 3 0 0 1-3.63 1.5l-2.53-.84a1 1 0 0 0-1.25.6l-4.65 12.4a5 5 0 0 1-3.1 3L.07 43.02Z"
    />
    <path
      fill="#fff"
      fill-rule="evenodd"
      d="M49.5 19a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z"
      clip-rule="evenodd"
    />
    <path fill="#fff" d="M45 .28v59.66l-2 .1V.19c.7.02 1.37.05 2 .1Z" />
    <path fill="#2BEE6C" d="M47.5 19a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z" />
    <path
      stroke="#fff"
      stroke-opacity=".1"
      d="M.5 25.01c0-4.63 0-8.08.24-10.8.25-2.7.73-4.64 1.66-6.28a14.5 14.5 0 0 1 5.42-5.41C9.46 1.58 11.39 1.1 14.1.85A133 133 0 0 1 24.9.61h10.2c4.63 0 8.08 0 10.8.24 2.7.25 4.65.73 6.28 1.67a14.5 14.5 0 0 1 5.42 5.4c.93 1.65 1.41 3.58 1.66 6.3.24 2.71.24 6.16.24 10.79v10.2c0 4.64 0 8.08-.24 10.8-.25 2.7-.73 4.65-1.66 6.28a14.5 14.5 0 0 1-5.42 5.42c-1.63.93-3.57 1.41-6.28 1.66-2.72.24-6.17.24-10.8.24H24.9c-4.63 0-8.08 0-10.8-.24-2.7-.25-4.64-.73-6.28-1.66a14.5 14.5 0 0 1-5.42-5.42C1.47 50.66 1 48.72.74 46.01A133 133 0 0 1 .5 35.2v-10.2Z"
    />
  </g>
  <defs>
    <clipPath id="a"><path fill="#fff" d="M0 0h60v60H0z" /></clipPath>
  </defs>
</svg>`,IPe=Ze`<svg fill="none" viewBox="0 0 60 60">
  <g clip-path="url(#a)">
    <rect width="60" height="60" fill="#C653C6" rx="30" />
    <path
      fill="#E87DE8"
      d="M57.98.01v19.5a4.09 4.09 0 0 0-2.63 2.29L50.7 34.2a2 2 0 0 1-2.5 1.2l-2.53-.84a2 2 0 0 0-2.42 1l-2.97 5.94a2 2 0 0 1-3.7-.32L32.8 28.6a2 2 0 0 0-3.02-1.09l-3.35 2.23a2 2 0 0 0-.64.7l-5.3 9.72a2 2 0 0 1-1.43 1.01l-4.13.69a2 2 0 0 1-1.61-.44l-3.9-3.24a2 2 0 0 0-2.69.12L2.1 42.93.02 43V.01h57.96Z"
    />
    <path
      fill="#fff"
      d="m61.95 16.94.05 2.1-3.85 1.28a3 3 0 0 0-1.86 1.79l-4.65 12.4a3 3 0 0 1-3.76 1.8l-2.53-.84a1 1 0 0 0-1.2.5l-2.98 5.94a3 3 0 0 1-5.55-.48l-3.78-12.58a1 1 0 0 0-1.5-.55l-3.35 2.23a1 1 0 0 0-.32.35l-5.3 9.72a3 3 0 0 1-2.14 1.52l-4.14.69a3 3 0 0 1-2.41-.66l-3.9-3.24a1 1 0 0 0-1.34.06l-5.28 5.28c-.05-.84-.08-1.75-.1-2.73l3.97-3.96a3 3 0 0 1 4.04-.19l3.89 3.25a1 1 0 0 0 .8.21l4.14-.68a1 1 0 0 0 .71-.51l5.3-9.71a3 3 0 0 1 .97-1.06l3.34-2.23a3 3 0 0 1 4.54 1.63l3.77 12.58a1 1 0 0 0 1.86.16l2.96-5.93a3 3 0 0 1 3.64-1.5l2.52.83a1 1 0 0 0 1.25-.6l4.66-12.4a5 5 0 0 1 3.1-2.99l4.43-1.48Z"
    />
    <path
      fill="#fff"
      fill-rule="evenodd"
      d="M35.5 27a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z"
      clip-rule="evenodd"
    />
    <path fill="#fff" d="M31 0v60h-2V0h2Z" />
    <path fill="#E87DE8" d="M33.5 27a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z" />
  </g>
  <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="29.5" />
  <defs>
    <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="30" /></clipPath>
  </defs>
</svg> `,kPe=Ze`<svg fill="none" viewBox="0 0 60 60">
  <g clip-path="url(#a)">
    <rect width="60" height="60" fill="#987DE8" rx="30" />
    <path
      fill="#fff"
      fill-rule="evenodd"
      d="m15.48 28.37 11.97-19.3a3 3 0 0 1 5.1 0l11.97 19.3a6 6 0 0 1 .9 3.14v.03a6 6 0 0 1-1.16 3.56L33.23 50.2a4 4 0 0 1-6.46 0L15.73 35.1a6 6 0 0 1-1.15-3.54v-.03a6 6 0 0 1 .9-3.16Z"
      clip-rule="evenodd"
    />
    <path
      fill="#643CDD"
      d="M30.84 10.11a1 1 0 0 0-.84-.46V24.5l12.6 5.53a2 2 0 0 0-.28-1.4L30.84 10.11Z"
    />
    <path
      fill="#BDADEB"
      d="M30 9.65a1 1 0 0 0-.85.46L17.66 28.64a2 2 0 0 0-.26 1.39L30 24.5V9.65Z"
    />
    <path
      fill="#643CDD"
      d="M30 50.54a1 1 0 0 0 .8-.4l11.24-15.38c.3-.44-.2-1-.66-.73l-9.89 5.68a3 3 0 0 1-1.5.4v10.43Z"
    />
    <path
      fill="#BDADEB"
      d="m17.97 34.76 11.22 15.37c.2.28.5.41.8.41V40.11a3 3 0 0 1-1.49-.4l-9.88-5.68c-.47-.27-.97.3-.65.73Z"
    />
    <path
      fill="#401AB3"
      d="M42.6 30.03 30 24.5v13.14a3 3 0 0 0 1.5-.4l10.14-5.83a2 2 0 0 0 .95-1.38Z"
    />
    <path
      fill="#7C5AE2"
      d="M30 37.64V24.46l-12.6 5.57a2 2 0 0 0 .97 1.39l10.13 5.82a3 3 0 0 0 1.5.4Z"
    />
  </g>
  <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="29.5" />
  <defs>
    <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="30" /></clipPath>
  </defs>
</svg> `,RPe=Ze`<svg fill="none" viewBox="0 0 60 60">
  <rect width="60" height="60" fill="#1DC956" rx="3" />
  <path
    fill="#1FAD7E"
    stroke="#fff"
    stroke-width="2"
    d="m30.49 29.13-.49-.27-.49.27-12.77 7.1-.05.02c-.86.48-1.58.88-2.1 1.24-.54.37-1.04.81-1.28 1.45a3 3 0 0 0 0 2.12c.24.63.74 1.08 1.27 1.45.53.36 1.25.76 2.11 1.24l.05.03 6.33 3.51.17.1c2.33 1.3 3.72 2.06 5.22 2.32a9 9 0 0 0 3.08 0c1.5-.26 2.9-1.03 5.22-2.32l.18-.1 6.32-3.51.05-.03a26.9 26.9 0 0 0 2.1-1.24 3.21 3.21 0 0 0 1.28-1.45l-.94-.35.94.35a3 3 0 0 0 0-2.12l-.94.35.94-.35a3.21 3.21 0 0 0-1.27-1.45c-.53-.36-1.25-.76-2.11-1.24l-.05-.03-12.77-7.1Z"
  />
  <path
    fill="#2BEE6C"
    stroke="#fff"
    stroke-width="2"
    d="m30.49 19.13-.49-.27-.49.27-12.77 7.1-.05.02c-.86.48-1.58.88-2.1 1.24-.54.37-1.04.81-1.28 1.45a3 3 0 0 0 0 2.12c.24.63.74 1.08 1.27 1.45.53.36 1.25.76 2.11 1.24l.05.03 6.33 3.51.17.1c2.33 1.3 3.72 2.06 5.22 2.32a9 9 0 0 0 3.08 0c1.5-.26 2.9-1.03 5.22-2.32l.18-.1 6.32-3.51.05-.03a26.9 26.9 0 0 0 2.1-1.24 3.21 3.21 0 0 0 1.28-1.45l-.94-.35.94.35a3 3 0 0 0 0-2.12l-.94.35.94-.35a3.21 3.21 0 0 0-1.27-1.45c-.53-.36-1.25-.76-2.11-1.24l-.05-.03-12.77-7.1Z"
  />
  <path
    fill="#86F999"
    stroke="#fff"
    stroke-width="2"
    d="m46.69 21.06-.94-.35.94.35a3 3 0 0 0 0-2.12l-.94.35.94-.35a3.21 3.21 0 0 0-1.27-1.45c-.53-.36-1.25-.76-2.11-1.24l-.05-.03-6.32-3.51-.18-.1c-2.33-1.3-3.72-2.06-5.22-2.33a9 9 0 0 0-3.08 0c-1.5.27-2.9 1.04-5.22 2.33l-.17.1-6.33 3.51-.05.03c-.86.48-1.58.88-2.1 1.24-.54.37-1.04.81-1.28 1.45a3 3 0 0 0 0 2.12c.24.63.74 1.08 1.27 1.45.53.36 1.25.76 2.11 1.24l.05.03 6.33 3.51.17.1c2.33 1.3 3.72 2.06 5.22 2.32a9 9 0 0 0 3.08 0c1.5-.26 2.9-1.03 5.22-2.32l.18-.1 6.32-3.51.05-.03a26.9 26.9 0 0 0 2.1-1.24 3.21 3.21 0 0 0 1.28-1.45Z"
  />
  <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" />
</svg>`,NPe=Ze`<svg fill="none" viewBox="0 0 60 60">
  <rect width="60" height="60" fill="#C653C6" rx="3" />
  <path
    fill="#fff"
    d="M20.03 15.22C20 15.6 20 16.07 20 17v2.8c0 1.14 0 1.7-.2 2.12-.15.31-.3.5-.58.71-.37.28-1.06.42-2.43.7-.59.12-1.11.29-1.6.51a9 9 0 0 0-4.35 4.36C10 30 10 32.34 10 37c0 4.66 0 7 .84 8.8a9 9 0 0 0 4.36 4.36C17 51 19.34 51 24 51h12c4.66 0 7 0 8.8-.84a9 9 0 0 0 4.36-4.36C50 44 50 41.66 50 37c0-4.66 0-7-.84-8.8a9 9 0 0 0-4.36-4.36c-.48-.22-1-.39-1.6-.5-1.36-.29-2.05-.43-2.42-.7-.27-.22-.43-.4-.58-.72-.2-.42-.2-.98-.2-2.11V17c0-.93 0-1.4-.03-1.78a9 9 0 0 0-8.19-8.19C31.4 7 30.93 7 30 7s-1.4 0-1.78.03a9 9 0 0 0-8.19 8.19Z"
  />
  <path
    fill="#E87DE8"
    d="M22 17c0-.93 0-1.4.04-1.78a7 7 0 0 1 6.18-6.18C28.6 9 29.07 9 30 9s1.4 0 1.78.04a7 7 0 0 1 6.18 6.18c.04.39.04.85.04 1.78v4.5a1.5 1.5 0 0 1-3 0V17c0-.93 0-1.4-.08-1.78a4 4 0 0 0-3.14-3.14C31.39 12 30.93 12 30 12s-1.4 0-1.78.08a4 4 0 0 0-3.14 3.14c-.08.39-.08.85-.08 1.78v4.5a1.5 1.5 0 0 1-3 0V17Z"
  />
  <path
    fill="#E87DE8"
    fill-rule="evenodd"
    d="M12 36.62c0-4.32 0-6.48.92-8.09a7 7 0 0 1 2.61-2.61C17.14 25 19.3 25 23.62 25h6.86c.46 0 .7 0 .9.02 2.73.22 4.37 2.43 4.62 4.98.27-2.7 2.11-5 5.02-5A6.98 6.98 0 0 1 48 31.98v5.4c0 4.32 0 6.48-.92 8.09a7 7 0 0 1-2.61 2.61c-1.61.92-3.77.92-8.09.92h-5.86c-.46 0-.7 0-.9-.02-2.73-.22-4.37-2.43-4.62-4.98-.26 2.58-1.94 4.82-4.71 4.99l-.7.01c-.55 0-.82 0-1.05-.02a7 7 0 0 1-6.52-6.52c-.02-.23-.02-.5-.02-1.05v-4.79Zm21.24-.27a4 4 0 1 0-6.48 0 31.28 31.28 0 0 1 1.57 2.23c.17.4.17.81.17 1.24V42.5a1.5 1.5 0 0 0 3 0V39.82c0-.43 0-.85.17-1.24.09-.2.58-.87 1.57-2.23Z"
    clip-rule="evenodd"
  />
  <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" />
</svg>`,PPe=Ze`<svg fill="none" viewBox="0 0 60 60">
  <g clip-path="url(#a)">
    <path
      fill="#EB8B47"
      d="M0 24.9c0-9.25 0-13.88 1.97-17.33a15 15 0 0 1 5.6-5.6C11.02 0 15.65 0 24.9 0h10.2c9.25 0 13.88 0 17.33 1.97a15 15 0 0 1 5.6 5.6C60 11.02 60 15.65 60 24.9v10.2c0 9.25 0 13.88-1.97 17.33a15 15 0 0 1-5.6 5.6C48.98 60 44.35 60 35.1 60H24.9c-9.25 0-13.88 0-17.33-1.97a15 15 0 0 1-5.6-5.6C0 48.98 0 44.35 0 35.1V24.9Z"
    />
    <path
      stroke="#062B2B"
      stroke-opacity=".1"
      d="M.5 24.9c0-4.64 0-8.08.24-10.8.25-2.7.73-4.65 1.66-6.28A14.5 14.5 0 0 1 7.82 2.4C9.46 1.47 11.39 1 14.1.74A133 133 0 0 1 24.9.5h10.2c4.63 0 8.08 0 10.8.24 2.7.25 4.65.73 6.28 1.66a14.5 14.5 0 0 1 5.42 5.42c.93 1.63 1.41 3.57 1.66 6.28.24 2.72.24 6.16.24 10.8v10.2c0 4.63 0 8.08-.24 10.8-.25 2.7-.73 4.64-1.66 6.28a14.5 14.5 0 0 1-5.42 5.41c-1.63.94-3.57 1.42-6.28 1.67-2.72.24-6.17.24-10.8.24H24.9c-4.63 0-8.08 0-10.8-.24-2.7-.25-4.64-.73-6.28-1.67a14.5 14.5 0 0 1-5.42-5.4C1.47 50.53 1 48.6.74 45.88A133 133 0 0 1 .5 35.1V24.9Z"
    />
    <path
      fill="#FF974C"
      stroke="#fff"
      stroke-width="2"
      d="M39.2 29.2a13 13 0 1 0-18.4 0l1.3 1.28a12.82 12.82 0 0 1 2.1 2.39 6 6 0 0 1 .6 1.47c.2.76.2 1.56.2 3.17v11.24c0 1.08 0 1.61.13 2.12a4 4 0 0 0 .41.98c.26.45.64.83 1.4 1.6l.3.29c.65.65.98.98 1.36 1.09.26.07.54.07.8 0 .38-.11.7-.44 1.36-1.1l3.48-3.47c.65-.65.98-.98 1.09-1.36a1.5 1.5 0 0 0 0-.8c-.1-.38-.44-.7-1.1-1.36l-.47-.48c-.65-.65-.98-.98-1.09-1.36a1.5 1.5 0 0 1 0-.8c.1-.38.44-.7 1.1-1.36l.47-.48c.65-.65.98-.98 1.09-1.36a1.5 1.5 0 0 0 0-.8c-.1-.38-.44-.7-1.1-1.36l-.48-.5c-.65-.64-.98-.97-1.08-1.35a1.5 1.5 0 0 1 0-.79c.1-.38.42-.7 1.06-1.36l5.46-5.55Z"
    />
    <circle cx="30" cy="17" r="4" fill="#EB8B47" stroke="#fff" stroke-width="2" />
  </g>
  <defs>
    <clipPath id="a"><path fill="#fff" d="M0 0h60v60H0z" /></clipPath>
  </defs>
</svg> `,OPe=Ze`<svg fill="none" viewBox="0 0 60 60">
  <g clip-path="url(#a)">
    <rect width="60" height="60" fill="#00ACE6" rx="30" />
    <circle cx="64" cy="39" r="50" fill="#1AC6FF" stroke="#fff" stroke-width="2" />
    <circle cx="78" cy="30" r="50" fill="#4DD2FF" stroke="#fff" stroke-width="2" />
    <circle cx="72" cy="15" r="35" fill="#80DFFF" stroke="#fff" stroke-width="2" />
    <circle cx="34" cy="-17" r="45" stroke="#fff" stroke-width="2" />
    <circle cx="34" cy="-5" r="50" stroke="#fff" stroke-width="2" />
    <circle cx="30" cy="45" r="4" fill="#4DD2FF" stroke="#fff" stroke-width="2" />
    <circle cx="39.5" cy="27.5" r="4" fill="#80DFFF" stroke="#fff" stroke-width="2" />
    <circle cx="16" cy="24" r="4" fill="#19C6FF" stroke="#fff" stroke-width="2" />
  </g>
  <rect width="59" height="59" x=".5" y=".5" stroke="#062B2B" stroke-opacity=".1" rx="29.5" />
  <defs>
    <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="30" /></clipPath>
  </defs>
</svg>`,DPe=Ze`<svg fill="none" viewBox="0 0 60 60">
  <g clip-path="url(#a)">
    <rect width="60" height="60" fill="#C653C6" rx="3" />
    <path
      fill="#E87DE8"
      stroke="#fff"
      stroke-width="2"
      d="M52.1 47.34c0-4.24-1.44-9.55-5.9-12.4a2.86 2.86 0 0 0-1.6-3.89v-.82c0-1.19-.52-2.26-1.35-3a4.74 4.74 0 0 0-2.4-6.26v-5.5a11.31 11.31 0 1 0-22.63 0v2.15a3.34 3.34 0 0 0-1.18 5.05 4.74 4.74 0 0 0-.68 6.44A5.22 5.22 0 0 0 14 35.92c-3.06 4.13-6.1 8.3-6.1 15.64 0 2.67.37 4.86.74 6.39a20.3 20.3 0 0 0 .73 2.39l.02.04v.01l.92-.39-.92.4.26.6h38.26l.3-.49-.87-.51.86.5.02-.01.03-.07a16.32 16.32 0 0 0 .57-1.05c.36-.72.85-1.74 1.33-2.96a25.51 25.51 0 0 0 1.94-9.07Z"
    />
    <path
      fill="#fff"
      fill-rule="evenodd"
      d="M26.5 29.5c-3-.5-5.5-3-5.5-7v-7c0-.47 0-.7.03-.9a3 3 0 0 1 2.58-2.57c.2-.03.42-.03.89-.03 2 0 2.5-2.5 2.5-2.5s0 2.5 2.5 2.5c1.4 0 2.1 0 2.65.23a3 3 0 0 1 1.62 1.62c.23.55.23 1.25.23 2.65v6c0 4-3 7-6.5 7 1.35.23 4 0 6.5-2v9.53C34 38.5 31.5 40 28 40s-6-1.5-6-2.97L24 34l2.5 1.5v-6ZM26 47h4.5c2.5 0 3 4 3 5.5h-3l-1-1.5H26v-4Zm-6.25 5.5H24V57h-8c0-1 1-4.5 3.75-4.5Z"
      clip-rule="evenodd"
    />
  </g>
  <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" />
  <defs>
    <clipPath id="a"><rect width="60" height="60" fill="#fff" rx="3" /></clipPath>
  </defs>
</svg> `,MPe=Ze`<svg fill="none" viewBox="0 0 60 60">
  <rect width="60" height="60" fill="#794CFF" rx="3" />
  <path
    fill="#987DE8"
    stroke="#fff"
    stroke-width="2"
    d="M33 22.5v-1H16v5H8.5V36H13v-5h3v7.5h17V31h1v7.5h17v-17H34v5h-1v-4Z"
  />
  <path fill="#fff" d="M37.5 25h10v10h-10z" />
  <path fill="#4019B2" d="M42.5 25h5v10h-5z" />
  <path fill="#fff" d="M19.5 25h10v10h-10z" />
  <path fill="#4019B2" d="M24.5 25h5v10h-5z" />
  <path fill="#fff" d="M12 30.5h4V37h-4v-6.5Z" />
  <rect width="59" height="59" x=".5" y=".5" stroke="#fff" stroke-opacity=".1" rx="2.5" />
</svg>`,BPe=Ze`<svg
  viewBox="0 0 60 60"
  fill="none"
>
  <g clip-path="url(#1)">
    <rect width="60" height="60" rx="30" fill="#00ACE6" />
    <path
      d="M59 73C59 89.0163 46.0163 102 30 102C13.9837 102 1 89.0163 1 73C1 56.9837 12 44 30 44C48 44 59 56.9837 59 73Z"
      fill="#1AC6FF"
      stroke="white"
      stroke-width="2"
    />
    <path
      d="M18.6904 19.9015C19.6264 15.3286 23.3466 11.8445 27.9708 11.2096C29.3231 11.024 30.6751 11.0238 32.0289 11.2096C36.6532 11.8445 40.3733 15.3286 41.3094 19.9015C41.4868 20.7681 41.6309 21.6509 41.7492 22.5271C41.8811 23.5041 41.8811 24.4944 41.7492 25.4715C41.6309 26.3476 41.4868 27.2304 41.3094 28.097C40.3733 32.6699 36.6532 36.154 32.0289 36.7889C30.6772 36.9744 29.3216 36.9743 27.9708 36.7889C23.3466 36.154 19.6264 32.6699 18.6904 28.097C18.513 27.2304 18.3689 26.3476 18.2506 25.4715C18.1186 24.4944 18.1186 23.5041 18.2506 22.5271C18.3689 21.6509 18.513 20.7681 18.6904 19.9015Z"
      fill="#1AC6FF"
      stroke="white"
      stroke-width="2"
    />
    <circle cx="24.5" cy="23.5" r="1.5" fill="white" />
    <circle cx="35.5" cy="23.5" r="1.5" fill="white" />
    <path
      d="M31 20L28 28H32"
      stroke="white"
      stroke-width="2"
      stroke-linecap="round"
      stroke-linejoin="round"
    />
  </g>
  <rect x="0.5" y="0.5" width="59" height="59" rx="29.5" stroke="white" stroke-opacity="0.1" />
  <defs>
    <clipPath id="1">
      <rect width="60" height="60" rx="30" fill="white" />
    </clipPath>
  </defs>
</svg> `,$Pe=Ze`<svg viewBox="0 0 60 60" fill="none">
  <g clip-path="url(#1)">
    <path
      d="M0 24.9C0 15.6485 0 11.0228 1.97053 7.56812C3.3015 5.23468 5.23468 3.3015 7.56812 1.97053C11.0228 0 15.6485 0 24.9 0H35.1C44.3514 0 48.9772 0 52.4319 1.97053C54.7653 3.3015 56.6985 5.23468 58.0295 7.56812C60 11.0228 60 15.6485 60 24.9V35.1C60 44.3514 60 48.9772 58.0295 52.4319C56.6985 54.7653 54.7653 56.6985 52.4319 58.0295C48.9772 60 44.3514 60 35.1 60H24.9C15.6485 60 11.0228 60 7.56812 58.0295C5.23468 56.6985 3.3015 54.7653 1.97053 52.4319C0 48.9772 0 44.3514 0 35.1V24.9Z"
      fill="#794CFF"
    />
    <path
      d="M0.5 24.9C0.5 20.2652 0.50047 16.8221 0.744315 14.105C0.987552 11.3946 1.46987 9.45504 2.40484 7.81585C3.69145 5.56019 5.56019 3.69145 7.81585 2.40484C9.45504 1.46987 11.3946 0.987552 14.105 0.744315C16.8221 0.50047 20.2652 0.5 24.9 0.5H35.1C39.7348 0.5 43.1779 0.50047 45.895 0.744315C48.6054 0.987552 50.545 1.46987 52.1841 2.40484C54.4398 3.69145 56.3086 5.56019 57.5952 7.81585C58.5301 9.45504 59.0124 11.3946 59.2557 14.105C59.4995 16.8221 59.5 20.2652 59.5 24.9V35.1C59.5 39.7348 59.4995 43.1779 59.2557 45.895C59.0124 48.6054 58.5301 50.545 57.5952 52.1841C56.3086 54.4398 54.4398 56.3086 52.1841 57.5952C50.545 58.5301 48.6054 59.0124 45.895 59.2557C43.1779 59.4995 39.7348 59.5 35.1 59.5H24.9C20.2652 59.5 16.8221 59.4995 14.105 59.2557C11.3946 59.0124 9.45504 58.5301 7.81585 57.5952C5.56019 56.3086 3.69145 54.4398 2.40484 52.1841C1.46987 50.545 0.987552 48.6054 0.744315 45.895C0.50047 43.1779 0.5 39.7348 0.5 35.1V24.9Z"
      stroke="#062B2B"
      stroke-opacity="0.1"
    />
    <path
      d="M35.1403 31.5016C35.1193 30.9637 35.388 30.4558 35.8446 30.1707C36.1207 29.9982 36.4761 29.8473 36.7921 29.7685C37.3143 29.6382 37.8664 29.7977 38.2386 30.1864C38.8507 30.8257 39.3004 31.6836 39.8033 32.408C40.2796 33.0942 41.4695 33.2512 41.9687 32.5047C42.4839 31.7341 42.9405 30.8229 43.572 30.1399C43.9375 29.7447 44.4866 29.5756 45.0111 29.6967C45.3283 29.7701 45.6863 29.9147 45.9655 30.0823C46.4269 30.3595 46.7045 30.8626 46.6928 31.4008C46.6731 32.3083 46.3764 33.2571 46.2158 34.1473C46.061 35.0048 46.9045 35.8337 47.7592 35.664C48.6464 35.4878 49.5899 35.1747 50.497 35.1391C51.0348 35.1181 51.5427 35.3868 51.8279 35.8433C52.0004 36.1195 52.1513 36.4749 52.2301 36.7908C52.3604 37.3131 52.2009 37.8651 51.8121 38.2374C51.1729 38.8495 50.3151 39.2991 49.5908 39.8019C48.9046 40.2782 48.7473 41.4683 49.4939 41.9675C50.2644 42.4827 51.1757 42.9393 51.8587 43.5708C52.2539 43.9362 52.423 44.4854 52.3018 45.0099C52.2285 45.3271 52.0839 45.6851 51.9162 45.9642C51.6391 46.4257 51.1359 46.7032 50.5978 46.6916C49.6903 46.6719 48.7417 46.3753 47.8516 46.2146C46.9939 46.0598 46.1648 46.9035 46.3346 47.7583C46.5108 48.6454 46.8239 49.5888 46.8594 50.4958C46.8805 51.0336 46.6117 51.5415 46.1552 51.8267C45.879 51.9992 45.5236 52.15 45.2077 52.2289C44.6854 52.3592 44.1334 52.1997 43.7611 51.8109C43.1491 51.1718 42.6996 50.314 42.1968 49.5897C41.7203 48.9034 40.5301 48.7463 40.0309 49.493C39.5157 50.2634 39.0592 51.1746 38.4278 51.8574C38.0623 52.2527 37.5132 52.4218 36.9887 52.3006C36.6715 52.2273 36.3135 52.0826 36.0343 51.915C35.5729 51.6379 35.2953 51.1347 35.307 50.5966C35.3267 49.6891 35.6233 48.7405 35.7839 47.8505C35.9388 46.9928 35.0951 46.1636 34.2402 46.3334C33.3531 46.5096 32.4098 46.8227 31.5028 46.8582C30.9649 46.8793 30.457 46.6105 30.1719 46.154C29.9994 45.8778 29.8485 45.5224 29.7697 45.2065C29.6394 44.6842 29.7989 44.1322 30.1877 43.7599C30.8269 43.1479 31.6847 42.6982 32.4091 42.1954C33.0954 41.7189 33.2522 40.5289 32.5056 40.0297C31.7351 39.5145 30.824 39.058 30.1411 38.4265C29.7459 38.0611 29.5768 37.5119 29.698 36.9875C29.7713 36.6702 29.9159 36.3122 30.0836 36.0331C30.3607 35.5717 30.8638 35.2941 31.402 35.3058C32.3095 35.3255 33.2583 35.6221 34.1485 35.7828C35.006 35.9376 35.8349 35.094 35.6652 34.2393C35.489 33.3521 35.1759 32.4087 35.1403 31.5016Z"
      fill="#906EF7"
      stroke="white"
      stroke-width="2"
    />
    <path
      d="M20.7706 8.22357C20.9036 7.51411 21.5231 7 22.2449 7H23.7551C24.4769 7 25.0964 7.51411 25.2294 8.22357C25.5051 9.69403 25.4829 11.6321 27.1202 12.2606C27.3092 12.3331 27.4958 12.4105 27.6798 12.4926C29.2818 13.2072 30.6374 11.8199 31.8721 10.9752C32.4678 10.5676 33.2694 10.6421 33.7798 11.1525L34.8477 12.2204C35.3581 12.7308 35.4326 13.5323 35.025 14.128C34.1802 15.3627 32.7931 16.7183 33.5077 18.3202C33.5898 18.5043 33.6672 18.6909 33.7398 18.88C34.3683 20.5171 36.3061 20.4949 37.7764 20.7706C38.4859 20.9036 39 21.5231 39 22.2449V23.7551C39 24.4769 38.4859 25.0964 37.7764 25.2294C36.3061 25.5051 34.3685 25.483 33.7401 27.1201C33.6675 27.3093 33.59 27.4961 33.5079 27.6803C32.7934 29.282 34.1803 30.6374 35.025 31.8719C35.4326 32.4677 35.3581 33.2692 34.8477 33.7796L33.7798 34.8475C33.2694 35.3579 32.4678 35.4324 31.8721 35.0248C30.6376 34.1801 29.2823 32.7934 27.6806 33.508C27.4962 33.5903 27.3093 33.6678 27.12 33.7405C25.483 34.3688 25.5051 36.3062 25.2294 37.7764C25.0964 38.4859 24.4769 39 23.7551 39H22.2449C21.5231 39 20.9036 38.4859 20.7706 37.7764C20.4949 36.3062 20.517 34.3688 18.88 33.7405C18.6908 33.6678 18.5039 33.5903 18.3196 33.5081C16.7179 32.7936 15.3625 34.1804 14.1279 35.0251C13.5322 35.4327 12.7307 35.3582 12.2203 34.8478L11.1524 33.7799C10.642 33.2695 10.5675 32.4679 10.9751 31.8722C11.8198 30.6376 13.2067 29.2822 12.4922 27.6804C12.41 27.4962 12.3325 27.3093 12.2599 27.1201C11.6315 25.483 9.69392 25.5051 8.22357 25.2294C7.51411 25.0964 7 24.4769 7 23.7551V22.2449C7 21.5231 7.51411 20.9036 8.22357 20.7706C9.69394 20.4949 11.6317 20.5171 12.2602 18.88C12.3328 18.6909 12.4103 18.5042 12.4924 18.3201C13.207 16.7181 11.8198 15.3625 10.975 14.1278C10.5674 13.5321 10.6419 12.7305 11.1523 12.2201L12.2202 11.1522C12.7306 10.6418 13.5322 10.5673 14.1279 10.9749C15.3626 11.8197 16.7184 13.2071 18.3204 12.4925C18.5044 12.4105 18.6909 12.3331 18.8799 12.2606C20.5171 11.6321 20.4949 9.69403 20.7706 8.22357Z"
      fill="#906EF7"
      stroke="white"
      stroke-width="2"
    />
    <circle cx="23" cy="23" r="6" fill="#794CFF" stroke="white" stroke-width="2" />
    <circle cx="41" cy="41" r="4" fill="#794CFF" stroke="white" stroke-width="2" />
  </g>
  <defs>
    <clipPath id="1">
      <rect width="60" height="60" fill="white" />
    </clipPath>
  </defs>
</svg> `,jPe=Ze`<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none">
  <g clip-path="url(#clip0_187_29)">
    <path d="M1.18187e-05 15.8055C1.18187e-05 9.8015 -5.19442e-07 6.91338 1.69991e-08 0C4.5 3.72236e-05 9.62249 0 16.5 0L23.5 4.31399e-05C29.9349 4.31399e-05 35.5 0.000206332 40 3.73468e-05C40 2.77754 40 9.36708 40 15.8055V22.8364C40 29.2647 40 33.7962 40 40C31.5 40 29.8337 40 23.4 40H16.6C10.5092 40 6.50004 40 4.04289e-05 40C3.05176e-05 32.2453 1.18187e-05 29.6382 1.18187e-05 22.8364V15.8055Z" fill="#0052FF"/>
    <path d="M20.0236 26.5C16.4342 26.5 13.5236 23.5931 13.5236 20C13.5236 16.4069 16.4342 13.5 20.0236 13.5C23.2411 13.5 25.9134 15.8472 26.4261 18.9167H32.9731C32.4206 12.2433 26.8342 7 20.02 7C12.8411 7 7.02002 12.8211 7.02002 20C7.02002 27.1789 12.8411 33 20.02 33C26.8342 33 32.4206 27.7567 32.9731 21.0833H26.4225C25.9061 24.1528 23.2411 26.5 20.0236 26.5Z" fill="white"/>
  </g>
  <defs>
    <clipPath id="clip0_187_29">
      <rect width="40" height="40" fill="white"/>
    </clipPath>
  </defs>
</svg>`,LPe=Ze`
  <svg width="40" height="40" fill="none" xmlns="http://www.w3.org/2000/svg">
    <g clip-path="url(#a)">
      <path
        d="M0 16.6c0-6.168 0-9.251 1.314-11.555a10 10 0 0 1 3.731-3.731C7.35 0 10.432 0 16.6 0h6.8c6.168 0 9.252 0 11.555 1.314a10 10 0 0 1 3.731 3.731C40 7.35 40 10.432 40 16.6v6.8c0 6.168 0 9.252-1.314 11.555a10 10 0 0 1-3.731 3.731C32.652 40 29.568 40 23.4 40h-6.8c-6.168 0-9.251 0-11.555-1.314a10 10 0 0 1-3.731-3.731C0 32.652 0 29.568 0 23.4v-6.8Z"
        fill="#7D00FF"
      />
      <path
        d="M.5 16.6c0-3.093 0-5.38.162-7.182.161-1.795.48-3.061 1.086-4.125a9.5 9.5 0 0 1 3.545-3.545C6.357 1.141 7.623.823 9.418.662 11.221.5 13.508.5 16.6.5h6.8c3.093 0 5.38 0 7.182.162 1.795.161 3.062.48 4.125 1.086a9.5 9.5 0 0 1 3.545 3.545c.607 1.064.925 2.33 1.086 4.125.161 1.803.162 4.09.162 7.182v6.8c0 3.093 0 5.38-.162 7.182-.161 1.795-.48 3.062-1.086 4.125a9.5 9.5 0 0 1-3.545 3.545c-1.063.607-2.33.925-4.125 1.086-1.803.161-4.09.162-7.182.162h-6.8c-3.093 0-5.38 0-7.182-.162-1.795-.161-3.061-.48-4.125-1.086a9.5 9.5 0 0 1-3.545-3.545c-.607-1.063-.925-2.33-1.086-4.125C.5 28.779.5 26.492.5 23.4v-6.8Z"
        stroke="#fff"
        stroke-opacity=".05"
      />
      <path
        d="M28.306 15.381a3.69 3.69 0 1 0 0-7.381 3.69 3.69 0 0 0 0 7.381ZM16.987 32a8.991 8.991 0 1 1 .016-17.983A8.991 8.991 0 0 1 16.988 32Z"
        fill="#fff"
      />
    </g>
    <defs>
      <clipPath id="a"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
    </defs>
  </svg>
`,UPe=Ze`
  <svg width="40" height="40" fill="none" xmlns="http://www.w3.org/2000/svg">
    <g clip-path="url(#a)">
      <path
        d="M0 16.6c0-6.168 0-9.251 1.314-11.555a10 10 0 0 1 3.731-3.731C7.35 0 10.432 0 16.6 0h6.8c6.168 0 9.252 0 11.555 1.314a10 10 0 0 1 3.731 3.731C40 7.35 40 10.432 40 16.6v6.8c0 6.168 0 9.252-1.314 11.555a10 10 0 0 1-3.731 3.731C32.652 40 29.568 40 23.4 40h-6.8c-6.168 0-9.251 0-11.555-1.314a10 10 0 0 1-3.731-3.731C0 32.652 0 29.568 0 23.4v-6.8Z"
        fill="#635BFF"
      />
      <path
        d="M.5 16.6c0-3.093 0-5.38.162-7.182.161-1.795.48-3.061 1.086-4.125a9.5 9.5 0 0 1 3.545-3.545C6.357 1.141 7.623.823 9.418.662 11.221.5 13.508.5 16.6.5h6.8c3.093 0 5.38 0 7.182.162 1.795.161 3.062.48 4.125 1.086a9.5 9.5 0 0 1 3.545 3.545c.607 1.064.925 2.33 1.086 4.125.161 1.803.162 4.09.162 7.182v6.8c0 3.093 0 5.38-.162 7.182-.161 1.795-.48 3.062-1.086 4.125a9.5 9.5 0 0 1-3.545 3.545c-1.063.607-2.33.925-4.125 1.086-1.803.161-4.09.162-7.182.162h-6.8c-3.093 0-5.38 0-7.182-.162-1.795-.161-3.061-.48-4.125-1.086a9.5 9.5 0 0 1-3.545-3.545c-.607-1.063-.925-2.33-1.086-4.125C.5 28.779.5 26.492.5 23.4v-6.8Z"
        stroke="#fff"
        stroke-opacity=".05"
      />
      <path
        fill-rule="evenodd"
        clip-rule="evenodd"
        d="M18.299 15.147c0-1.028.844-1.424 2.242-1.424 2.004 0 4.536.607 6.54 1.688V9.213C24.892 8.343 22.73 8 20.541 8c-5.354 0-8.915 2.796-8.915 7.464 0 7.279 10.022 6.118 10.022 9.257 0 1.213-1.055 1.609-2.531 1.609-2.19 0-4.985-.897-7.2-2.11v6.277a18.283 18.283 0 0 0 7.2 1.503c5.485 0 9.257-2.716 9.257-7.437-.027-7.86-10.075-6.462-10.075-9.416Z"
        fill="#fff"
      />
    </g>
    <defs>
      <clipPath id="a"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
    </defs>
  </svg>
`,FPe=Ze`
  <svg width="40" height="40" fill="none" xmlns="http://www.w3.org/2000/svg">
    <g clip-path="url(#a)">
      <path
        d="M0 16.6c0-6.168 0-9.251 1.314-11.555a10 10 0 0 1 3.731-3.731C7.35 0 10.432 0 16.6 0h6.8c6.168 0 9.252 0 11.555 1.314a10 10 0 0 1 3.731 3.731C40 7.35 40 10.432 40 16.6v6.8c0 6.168 0 9.252-1.314 11.555a10 10 0 0 1-3.731 3.731C32.652 40 29.568 40 23.4 40h-6.8c-6.168 0-9.251 0-11.555-1.314a10 10 0 0 1-3.731-3.731C0 32.652 0 29.568 0 23.4v-6.8Z"
        fill="#fff"
      />
      <path
        d="M.5 16.6c0-3.093 0-5.38.162-7.182.161-1.795.48-3.061 1.086-4.125a9.5 9.5 0 0 1 3.545-3.545C6.357 1.141 7.623.823 9.418.662 11.221.5 13.508.5 16.6.5h6.8c3.093 0 5.38 0 7.182.162 1.795.161 3.062.48 4.125 1.086a9.5 9.5 0 0 1 3.545 3.545c.607 1.064.925 2.33 1.086 4.125.161 1.803.162 4.09.162 7.182v6.8c0 3.093 0 5.38-.162 7.182-.161 1.795-.48 3.062-1.086 4.125a9.5 9.5 0 0 1-3.545 3.545c-1.063.607-2.33.925-4.125 1.086-1.803.161-4.09.162-7.182.162h-6.8c-3.093 0-5.38 0-7.182-.162-1.795-.161-3.061-.48-4.125-1.086a9.5 9.5 0 0 1-3.545-3.545c-.607-1.063-.925-2.33-1.086-4.125C.5 28.779.5 26.492.5 23.4v-6.8Z"
        stroke="#fff"
        stroke-opacity=".05"
      />
      <path
        d="M18.606 12.642a.781.781 0 0 0-.771.66l-1.281 8.125a.78.78 0 0 1 .77-.66h3.755a7.668 7.668 0 0 0 7.57-6.49 6.26 6.26 0 0 0 .075-.843c-.96-.504-2.089-.792-3.325-.792h-6.793Z"
        fill="#001C64"
      />
      <path
        d="M28.724 13.434c-.006.282-.03.564-.075.843a7.668 7.668 0 0 1-7.57 6.491h-3.754a.78.78 0 0 0-.771.66l-1.916 12.15a.634.634 0 0 0 .626.734h4.075a.781.781 0 0 0 .77-.66l1.074-6.807a.781.781 0 0 1 .772-.66h2.4a7.668 7.668 0 0 0 7.57-6.491c.415-2.651-.92-5.064-3.201-6.26Z"
        fill="#0070E0"
      />
      <path
        d="M13.977 7.226a.78.78 0 0 0-.771.658l-3.198 20.277a.634.634 0 0 0 .626.733h4.742l1.178-7.467 1.281-8.125a.782.782 0 0 1 .771-.66H25.4c1.237 0 2.364.289 3.325.792.065-3.4-2.74-6.208-6.599-6.208h-8.148Z"
        fill="#003087"
      />
    </g>
    <defs>
      <clipPath id="a"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
    </defs>
  </svg>
`,zPe=Ze`<svg width="60" height="60" viewBox="0 0 60 60" fill="none">
<g clip-path="url(#clip0_13859_31161)">
  <path d="M0 24.8995C0 15.6481 0 11.0223 1.97053 7.56763C3.3015 5.2342 5.23468 3.30101 7.56812 1.97004C11.0228 -0.000488281 15.6485 -0.000488281 24.9 -0.000488281H35.1C44.3514 -0.000488281 48.9772 -0.000488281 52.4319 1.97004C54.7653 3.30101 56.6985 5.2342 58.0295 7.56763C60 11.0223 60 15.6481 60 24.8995V35.0995C60 44.351 60 48.9767 58.0295 52.4314C56.6985 54.7648 54.7653 56.698 52.4319 58.029C48.9772 59.9995 44.3514 59.9995 35.1 59.9995H24.9C15.6485 59.9995 11.0228 59.9995 7.56812 58.029C5.23468 56.698 3.3015 54.7648 1.97053 52.4314C0 48.9767 0 44.351 0 35.0995V24.8995Z" fill="#EB8B47"/>
  <path d="M0.5 24.8995C0.5 20.2647 0.50047 16.8216 0.744315 14.1045C0.987552 11.3941 1.46987 9.45455 2.40484 7.81536C3.69145 5.55971 5.56019 3.69096 7.81585 2.40435C9.45504 1.46938 11.3946 0.987064 14.105 0.743826C16.8221 0.499981 20.2652 0.499512 24.9 0.499512H35.1C39.7348 0.499512 43.1779 0.499981 45.895 0.743826C48.6054 0.987064 50.545 1.46938 52.1841 2.40435C54.4398 3.69096 56.3086 5.55971 57.5952 7.81536C58.5301 9.45455 59.0124 11.3941 59.2557 14.1045C59.4995 16.8216 59.5 20.2647 59.5 24.8995V35.0995C59.5 39.7343 59.4995 43.1774 59.2557 45.8945C59.0124 48.6049 58.5301 50.5445 57.5952 52.1837C56.3086 54.4393 54.4398 56.3081 52.1841 57.5947C50.545 58.5296 48.6054 59.012 45.895 59.2552C43.1779 59.499 39.7348 59.4995 35.1 59.4995H24.9C20.2652 59.4995 16.8221 59.499 14.105 59.2552C11.3946 59.012 9.45504 58.5296 7.81585 57.5947C5.56019 56.3081 3.69145 54.4393 2.40484 52.1837C1.46987 50.5445 0.987552 48.6049 0.744315 45.8945C0.50047 43.1774 0.5 39.7343 0.5 35.0995V24.8995Z" stroke="#141414" stroke-opacity="0.1"/>
  <path d="M13 26.0335C13 21.7838 13 19.659 14.0822 18.1694C14.4318 17.6883 14.8548 17.2653 15.3359 16.9157C16.8255 15.8335 18.9503 15.8335 23.2 15.8335H36.8C41.0497 15.8335 43.1745 15.8335 44.6641 16.9157C45.1452 17.2653 45.5682 17.6883 45.9178 18.1694C47 19.659 47 21.7838 47 26.0335V33.9668C47 38.2165 47 40.3414 45.9178 41.831C45.5682 42.312 45.1452 42.7351 44.6641 43.0846C43.1745 44.1668 41.0497 44.1668 36.8 44.1668H23.2C18.9503 44.1668 16.8255 44.1668 15.3359 43.0846C14.8548 42.7351 14.4318 42.312 14.0822 41.831C13 40.3414 13 38.2165 13 33.9668V26.0335Z" fill="#FF974C" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
  <path d="M39.5 36.667H36.6666" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
  <path d="M45.2 23.0645H14.8C14.0501 23.0645 13.6751 23.0645 13.4122 23.2554C13.3273 23.3171 13.2527 23.3918 13.191 23.4767C13 23.7395 13 24.1145 13 24.8645V27.2645C13 28.0144 13 28.3894 13.191 28.6522C13.2527 28.7371 13.3273 28.8118 13.4122 28.8735C13.6751 29.0645 14.0501 29.0645 14.8 29.0645H45.2C45.9499 29.0645 46.3249 29.0645 46.5878 28.8735C46.6727 28.8118 46.7473 28.7371 46.809 28.6522C47 28.3894 47 28.0144 47 27.2645V24.8645C47 24.1145 47 23.7395 46.809 23.4767C46.7473 23.3918 46.6727 23.3171 46.5878 23.2554C46.3249 23.0645 45.9499 23.0645 45.2 23.0645Z" fill="white" fill-opacity="0.4" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</g>
<defs>
  <clipPath id="clip0_13859_31161">
    <rect width="60" height="60" fill="white"/>
  </clipPath>
</defs>
</svg>`,HPe=Ze`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
  <rect width="64" height="64" rx="30" fill="#1DC956"/>
  <rect x="0.5" y="0.5" width="63" height="63" rx="29.5" stroke="#141414" stroke-opacity="0.1"/>
  <path d="M32.4053 19.8031C35.3901 19.8031 38.0431 20.8349 40.1619 22.8247L45.9656 17.0211C42.4465 13.7416 37.8773 11.7333 32.4053 11.7333C24.4829 11.7333 17.6475 16.2841 14.3127 22.9168L21.056 28.1493C22.6589 23.359 27.136 19.8031 32.4053 19.8031Z" fill="#1DC956" stroke="white" stroke-width="2" stroke-linejoin="round"/>
  <path d="M32.4053 52.2667C37.8773 52.2667 42.465 50.4611 45.8182 47.3658L39.2407 42.2623C37.4351 43.4783 35.1321 44.2153 32.4053 44.2153C27.136 44.2153 22.6589 40.6594 21.056 35.8691L14.3127 41.1016C17.6475 47.7159 24.4829 52.2667 32.4053 52.2667Z" fill="#2BEE6C"/>
  <path d="M21.056 35.8507L19.5636 36.993L14.3127 41.0832M39.2407 42.2623L45.8182 47.3658C42.465 50.4611 37.8773 52.2667 32.4053 52.2667C24.4829 52.2667 17.6475 47.7159 14.3127 41.1016L21.056 35.8691C22.6589 40.6594 27.136 44.2153 32.4053 44.2153C35.1321 44.2153 37.4351 43.4783 39.2407 42.2623Z" stroke="white" stroke-width="2" stroke-linejoin="round"/>
  <path d="M51.8613 32.4606C51.8613 31.0235 51.7323 29.6417 51.4928 28.3151H32.4053V36.1638H43.3124C42.8334 38.688 41.3963 40.8252 39.2407 42.2623L45.8181 47.3658C49.6503 43.8283 51.8613 38.6327 51.8613 32.4606Z" fill="#1FAD7E" stroke="white" stroke-width="2" stroke-linejoin="round"/>
  <path d="M21.056 35.8507C20.6507 34.6347 20.4111 33.345 20.4111 32C20.4111 30.655 20.6507 29.3653 21.056 28.1493L14.3127 22.9169C12.9309 25.6437 12.1387 28.7205 12.1387 32C12.1387 35.2795 12.9309 38.3564 14.3127 41.0831L19.5636 36.993L21.056 35.8507Z" fill="#86F999"/>
  <path d="M21.056 35.8691L14.3127 41.1016M21.056 35.8507C20.6507 34.6347 20.4111 33.345 20.4111 32C20.4111 30.655 20.6507 29.3653 21.056 28.1493L14.3127 22.9169C12.9309 25.6437 12.1387 28.7205 12.1387 32C12.1387 35.2795 12.9309 38.3564 14.3127 41.0831L19.5636 36.993L21.056 35.8507Z" stroke="white" stroke-width="2" stroke-linejoin="round"/>
</svg>
`,WPe=Ze`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
  <g clip-path="url(#clip0_241_31635)">
    <path d="M0 26.5595C0 16.6913 0 11.7572 2.1019 8.07217C3.5216 5.58317 5.58366 3.52111 8.07266 2.10141C11.7577 -0.000488281 16.6918 -0.000488281 26.56 -0.000488281H37.44C47.3082 -0.000488281 52.2423 -0.000488281 55.9273 2.10141C58.4163 3.52111 60.4784 5.58317 61.8981 8.07217C64 11.7572 64 16.6913 64 26.5595V37.4395C64 47.3077 64 52.2418 61.8981 55.9268C60.4784 58.4158 58.4163 60.4779 55.9273 61.8976C52.2423 63.9995 47.3082 63.9995 37.44 63.9995H26.56C16.6918 63.9995 11.7577 63.9995 8.07266 61.8976C5.58366 60.4779 3.5216 58.4158 2.1019 55.9268C0 52.2418 0 47.3077 0 37.4395V26.5595Z" fill="#EB8B47"/>
    <path d="M0.5 26.5595C0.5 21.6163 0.50047 17.942 0.760736 15.0418C1.02039 12.1485 1.53555 10.0742 2.53621 8.3199C3.91155 5.90869 5.90917 3.91106 8.32039 2.53572C10.0747 1.53506 12.1489 1.01991 15.0423 0.760247C17.9425 0.499981 21.6168 0.499512 26.56 0.499512H37.44C42.3832 0.499512 46.0575 0.499981 48.9577 0.760247C51.8511 1.01991 53.9253 1.53506 55.6796 2.53572C58.0908 3.91106 60.0885 5.90869 61.4638 8.3199C62.4645 10.0742 62.9796 12.1485 63.2393 15.0418C63.4995 17.942 63.5 21.6163 63.5 26.5595V37.4395C63.5 42.3827 63.4995 46.057 63.2393 48.9572C62.9796 51.8506 62.4645 53.9248 61.4638 55.6791C60.0885 58.0903 58.0908 60.088 55.6796 61.4633C53.9253 62.464 51.8511 62.9791 48.9577 63.2388C46.0575 63.499 42.3832 63.4995 37.44 63.4995H26.56C21.6168 63.4995 17.9425 63.499 15.0423 63.2388C12.1489 62.9791 10.0747 62.464 8.32039 61.4633C5.90917 60.088 3.91155 58.0903 2.53621 55.6791C1.53555 53.9248 1.02039 51.8506 0.760736 48.9572C0.50047 46.057 0.5 42.3827 0.5 37.4395V26.5595Z" stroke="#141414" stroke-opacity="0.1"/>
    <path d="M28.1042 49.2329L13.1024 51.2077L15.0772 36.2059L37.1015 14.1815C39.2441 12.039 40.3154 10.9677 41.5718 10.624C42.4205 10.3918 43.3159 10.3918 44.1645 10.624C45.421 10.9677 46.4922 12.039 48.6348 14.1815L50.1286 15.6753C52.2711 17.8179 53.3424 18.8891 53.6861 20.1456C53.9183 20.9942 53.9183 21.8896 53.6861 22.7383C53.3424 23.9947 52.2711 25.066 50.1286 27.2086L28.1042 49.2329Z" fill="#FF974C" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
    <path d="M38.5962 20.5376L22.4199 36.7139" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
    <path d="M43.7727 25.714L27.5964 41.8903" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
    <path d="M22.3703 36.7635C19.3258 39.808 16.0198 36.6395 16.2616 35.0324" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
    <path d="M27.5466 41.9399C24.5034 44.9831 28.155 48.7098 29.2738 48.0475" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
    <path d="M27.5468 41.9398C23.428 46.0586 18.2516 40.8822 22.3704 36.7634" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
    <path d="M15.8191 50.5214C15.4711 49.5823 14.728 48.8392 13.7889 48.4912" stroke="#E4E7E7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
    <path d="M49.2862 29.5805L34.7275 15.0219" stroke="#E4E7E7" stroke-width="2" stroke-linejoin="round"/>
  </g>
  <defs>
    <clipPath id="clip0_241_31635">
      <rect width="64" height="64" fill="white"/>
    </clipPath>
  </defs>
</svg>
`,VPe=Ze`<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
  <g clip-path="url(#clip0_241_31636)">
    <path d="M0 26.5595C0 16.6913 0 11.7572 2.1019 8.07217C3.5216 5.58318 5.58366 3.52111 8.07266 2.10141C11.7577 -0.000488281 16.6918 -0.000488281 26.56 -0.000488281H37.44C47.3082 -0.000488281 52.2423 -0.000488281 55.9273 2.10141C58.4163 3.52111 60.4784 5.58318 61.8981 8.07217C64 11.7572 64 16.6913 64 26.5595V37.4395C64 47.3077 64 52.2418 61.8981 55.9269C60.4784 58.4159 58.4163 60.4779 55.9273 61.8976C52.2423 63.9995 47.3082 63.9995 37.44 63.9995H26.56C16.6918 63.9995 11.7577 63.9995 8.07266 61.8976C5.58366 60.4779 3.5216 58.4159 2.1019 55.9269C0 52.2418 0 47.3077 0 37.4395V26.5595Z" fill="#794CFF"/>
    <path d="M0.5 26.5595C0.5 21.6163 0.50047 17.942 0.760736 15.0418C1.02039 12.1485 1.53555 10.0742 2.53621 8.3199C3.91155 5.90869 5.90917 3.91106 8.32039 2.53572C10.0747 1.53506 12.1489 1.01991 15.0423 0.760247C17.9425 0.499981 21.6168 0.499512 26.56 0.499512H37.44C42.3832 0.499512 46.0575 0.499981 48.9577 0.760247C51.8511 1.01991 53.9253 1.53506 55.6796 2.53572C58.0908 3.91106 60.0885 5.90869 61.4638 8.3199C62.4645 10.0742 62.9796 12.1485 63.2393 15.0418C63.4995 17.942 63.5 21.6163 63.5 26.5595V37.4395C63.5 42.3827 63.4995 46.057 63.2393 48.9572C62.9796 51.8506 62.4645 53.9248 61.4638 55.6791C60.0885 58.0903 58.0908 60.088 55.6796 61.4633C53.9253 62.464 51.8511 62.9791 48.9577 63.2388C46.0575 63.499 42.3832 63.4995 37.44 63.4995H26.56C21.6168 63.4995 17.9425 63.499 15.0423 63.2388C12.1489 62.9791 10.0747 62.464 8.32039 61.4633C5.90917 60.088 3.91155 58.0903 2.53621 55.6791C1.53555 53.9248 1.02039 51.8506 0.760736 48.9572C0.50047 46.057 0.5 42.3827 0.5 37.4395V26.5595Z" stroke="#141414" stroke-opacity="0.1"/>
    <path d="M40 39.4595C44.7824 36.693 48 31.5222 48 25.6C48 16.7634 40.8366 9.59998 32 9.59998C23.1634 9.59998 16 16.7634 16 25.6C16 31.5222 19.2176 36.693 24 39.4595V45.8144H40V39.4595Z" fill="#906EF7"/>
    <path d="M24 49.9689C24 51.8192 24 52.7444 24.3941 53.4353C24.6603 53.902 25.0469 54.2886 25.5136 54.5548C26.2046 54.9489 27.1297 54.9489 28.98 54.9489H35.02C36.8703 54.9489 37.7954 54.9489 38.4864 54.5548C38.9531 54.2886 39.3397 53.902 39.6059 53.4353C40 52.7444 40 51.8192 40 49.9689V45.8144H24V49.9689Z" fill="#906EF7"/>
    <path d="M24 45.8144V39.4595C19.2176 36.693 16 31.5222 16 25.6C16 16.7634 23.1634 9.59998 32 9.59998C40.8366 9.59998 48 16.7634 48 25.6C48 31.5222 44.7824 36.693 40 39.4595V45.8144M24 45.8144H40M24 45.8144V49.9689C24 51.8192 24 52.7444 24.3941 53.4353C24.6603 53.902 25.0469 54.2886 25.5136 54.5548C26.2046 54.9489 27.1297 54.9489 28.98 54.9489H35.02C36.8703 54.9489 37.7954 54.9489 38.4864 54.5548C38.9531 54.2886 39.3397 53.902 39.6059 53.4353C40 52.7444 40 51.8192 40 49.9689V45.8144" stroke="white" stroke-width="2" stroke-linejoin="round"/>
    <path d="M24 49.9689C24 51.8192 24 52.7444 24.3941 53.4353C24.6603 53.902 25.0469 54.2886 25.5136 54.5548C26.2046 54.9489 27.1297 54.9489 28.98 54.9489H35.02C36.8703 54.9489 37.7954 54.9489 38.4864 54.5548C38.9531 54.2886 39.3397 53.902 39.6059 53.4353C40 52.7444 40 51.8192 40 49.9689V45.8144H24V49.9689Z" fill="#643CDD" stroke="white" stroke-width="2" stroke-linejoin="round"/>
    <path d="M29.6735 26.9101V29.1109H34.0753V26.9101C34.0753 25.6945 35.0607 24.7092 36.2762 24.7092C37.4917 24.7092 38.4771 25.6945 38.4771 26.9101C38.4771 28.1256 37.4917 29.1109 36.2762 29.1109H34.0753H29.6735H27.4726C26.2571 29.1109 25.2717 28.1256 25.2717 26.9101C25.2717 25.6945 26.2571 24.7092 27.4726 24.7092C28.6881 24.7092 29.6735 25.6945 29.6735 26.9101Z" fill="#906EF7"/>
    <path d="M29.6735 45.3183V26.9101C29.6735 25.6945 28.6881 24.7092 27.4726 24.7092V24.7092C26.2571 24.7092 25.2717 25.6945 25.2717 26.9101V26.9101C25.2717 28.1256 26.2571 29.1109 27.4726 29.1109H36.2762C37.4917 29.1109 38.4771 28.1256 38.4771 26.9101V26.9101C38.4771 25.6945 37.4917 24.7092 36.2762 24.7092V24.7092C35.0607 24.7092 34.0753 25.6945 34.0753 26.9101V45.3183" stroke="white" stroke-width="2" stroke-linejoin="round"/>
  </g>
  <defs>
    <clipPath id="clip0_241_31636">
      <rect width="64" height="64" fill="white"/>
    </clipPath>
  </defs>
</svg>
`,qPe=De`
  :host {
    display: block;
    width: var(--local-size);
    height: var(--local-size);
  }

  :host svg {
    width: 100%;
    height: 100%;
  }
`;var n$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const GPe={browser:CPe,dao:SPe,defi:TPe,defiAlt:IPe,eth:kPe,layers:RPe,lock:NPe,login:PPe,network:OPe,nft:DPe,noun:MPe,profile:BPe,system:$Pe,coinbase:jPe,onrampCard:zPe,moonpay:LPe,stripe:UPe,paypal:FPe,google:HPe,pencil:WPe,lightbulb:VPe};let tx=class extends Te{constructor(){super(...arguments),this.name="browser",this.size="md"}render(){return this.style.cssText=`
       --local-size: var(--wui-visual-size-${this.size});
   `,K`${GPe[this.name]}`}};tx.styles=[Et,qPe];n$([ne()],tx.prototype,"name",void 0);n$([ne()],tx.prototype,"size",void 0);tx=n$([Ce("wui-visual")],tx);/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const gt=t=>t??Qi,qt={getSpacingStyles(t,e){if(Array.isArray(t))return t[e]?`var(--wui-spacing-${t[e]})`:void 0;if(typeof t=="string")return`var(--wui-spacing-${t})`},getFormattedDate(t){return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(t)},getHostName(t){try{return new URL(t).hostname}catch{return""}},getTruncateString({string:t,charsStart:e,charsEnd:n,truncate:r}){return t.length<=e+n?t:r==="end"?`${t.substring(0,e)}...`:r==="start"?`...${t.substring(t.length-n)}`:`${t.substring(0,Math.floor(e))}...${t.substring(t.length-Math.floor(n))}`},generateAvatarColors(t){const n=t.toLowerCase().replace(/^0x/iu,"").substring(0,6),r=this.hexToRgb(n),i=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),o=100-3*Number(i==null?void 0:i.replace("px","")),a=`${o}% ${o}% at 65% 40%`,c=[];for(let l=0;l<5;l+=1){const u=this.tintColor(r,.15*l);c.push(`rgb(${u[0]}, ${u[1]}, ${u[2]})`)}return`
    --local-color-1: ${c[0]};
    --local-color-2: ${c[1]};
    --local-color-3: ${c[2]};
    --local-color-4: ${c[3]};
    --local-color-5: ${c[4]};
    --local-radial-circle: ${a}
   `},hexToRgb(t){const e=parseInt(t,16),n=e>>16&255,r=e>>8&255,i=e&255;return[n,r,i]},tintColor(t,e){const[n,r,i]=t,s=Math.round(n+(255-n)*e),o=Math.round(r+(255-r)*e),a=Math.round(i+(255-i)*e);return[s,o,a]},isNumber(t){return{number:/^[0-9]+$/u}.number.test(t)},getColorTheme(t){return t||(typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":"dark")},splitBalance(t){const e=t.split(".");return e.length===2?[e[0],e[1]]:["0","00"]},roundNumber(t,e,n){return t.toString().length>=e?Number(t).toFixed(n):t},formatNumberToLocalString(t,e=2){return t===void 0?"0.00":typeof t=="number"?t.toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e}):parseFloat(t).toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e})}},KPe=De`
  :host {
    display: flex;
    width: inherit;
    height: inherit;
  }
`;var gc=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let jo=class extends Te{render(){return this.style.cssText=`
      flex-direction: ${this.flexDirection};
      flex-wrap: ${this.flexWrap};
      flex-basis: ${this.flexBasis};
      flex-grow: ${this.flexGrow};
      flex-shrink: ${this.flexShrink};
      align-items: ${this.alignItems};
      justify-content: ${this.justifyContent};
      column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};
      row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};
      gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};
      padding-top: ${this.padding&&qt.getSpacingStyles(this.padding,0)};
      padding-right: ${this.padding&&qt.getSpacingStyles(this.padding,1)};
      padding-bottom: ${this.padding&&qt.getSpacingStyles(this.padding,2)};
      padding-left: ${this.padding&&qt.getSpacingStyles(this.padding,3)};
      margin-top: ${this.margin&&qt.getSpacingStyles(this.margin,0)};
      margin-right: ${this.margin&&qt.getSpacingStyles(this.margin,1)};
      margin-bottom: ${this.margin&&qt.getSpacingStyles(this.margin,2)};
      margin-left: ${this.margin&&qt.getSpacingStyles(this.margin,3)};
    `,K`<slot></slot>`}};jo.styles=[Et,KPe];gc([ne()],jo.prototype,"flexDirection",void 0);gc([ne()],jo.prototype,"flexWrap",void 0);gc([ne()],jo.prototype,"flexBasis",void 0);gc([ne()],jo.prototype,"flexGrow",void 0);gc([ne()],jo.prototype,"flexShrink",void 0);gc([ne()],jo.prototype,"alignItems",void 0);gc([ne()],jo.prototype,"justifyContent",void 0);gc([ne()],jo.prototype,"columnGap",void 0);gc([ne()],jo.prototype,"rowGap",void 0);gc([ne()],jo.prototype,"gap",void 0);gc([ne()],jo.prototype,"padding",void 0);gc([ne()],jo.prototype,"margin",void 0);jo=gc([Ce("wui-flex")],jo);const YPe=De`
  :host {
    display: block;
    width: var(--local-width);
    height: var(--local-height);
    border-radius: var(--wui-border-radius-3xl);
    box-shadow: 0 0 0 8px var(--wui-color-gray-glass-005);
    overflow: hidden;
    position: relative;
  }

  :host([data-variant='generated']) {
    --mixed-local-color-1: var(--local-color-1);
    --mixed-local-color-2: var(--local-color-2);
    --mixed-local-color-3: var(--local-color-3);
    --mixed-local-color-4: var(--local-color-4);
    --mixed-local-color-5: var(--local-color-5);
  }

  @supports (background: color-mix(in srgb, white 50%, black)) {
    :host([data-variant='generated']) {
      --mixed-local-color-1: color-mix(
        in srgb,
        var(--w3m-color-mix) var(--w3m-color-mix-strength),
        var(--local-color-1)
      );
      --mixed-local-color-2: color-mix(
        in srgb,
        var(--w3m-color-mix) var(--w3m-color-mix-strength),
        var(--local-color-2)
      );
      --mixed-local-color-3: color-mix(
        in srgb,
        var(--w3m-color-mix) var(--w3m-color-mix-strength),
        var(--local-color-3)
      );
      --mixed-local-color-4: color-mix(
        in srgb,
        var(--w3m-color-mix) var(--w3m-color-mix-strength),
        var(--local-color-4)
      );
      --mixed-local-color-5: color-mix(
        in srgb,
        var(--w3m-color-mix) var(--w3m-color-mix-strength),
        var(--local-color-5)
      );
    }
  }

  :host([data-variant='generated']) {
    box-shadow: 0 0 0 8px var(--wui-color-gray-glass-005);
    background: radial-gradient(
      var(--local-radial-circle),
      #fff 0.52%,
      var(--mixed-local-color-5) 31.25%,
      var(--mixed-local-color-3) 51.56%,
      var(--mixed-local-color-2) 65.63%,
      var(--mixed-local-color-1) 82.29%,
      var(--mixed-local-color-4) 100%
    );
  }

  :host([data-variant='default']) {
    box-shadow: 0 0 0 8px var(--wui-color-gray-glass-005);
    background: radial-gradient(
      75.29% 75.29% at 64.96% 24.36%,
      #fff 0.52%,
      #f5ccfc 31.25%,
      #dba4f5 51.56%,
      #9a8ee8 65.63%,
      #6493da 82.29%,
      #6ebdea 100%
    );
  }
`;var q6=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Vg=class extends Te{constructor(){super(...arguments),this.imageSrc=void 0,this.alt=void 0,this.address=void 0,this.size="xl"}render(){return this.style.cssText=`
    --local-width: var(--wui-icon-box-size-${this.size});
    --local-height: var(--wui-icon-box-size-${this.size});
    `,K`${this.visualTemplate()}`}visualTemplate(){if(this.imageSrc)return this.dataset.variant="image",K`<wui-image src=${this.imageSrc} alt=${this.alt??"avatar"}></wui-image>`;if(this.address){this.dataset.variant="generated";const e=qt.generateAvatarColors(this.address);return this.style.cssText+=`
 ${e}`,null}return this.dataset.variant="default",null}};Vg.styles=[Et,YPe];q6([ne()],Vg.prototype,"imageSrc",void 0);q6([ne()],Vg.prototype,"alt",void 0);q6([ne()],Vg.prototype,"address",void 0);q6([ne()],Vg.prototype,"size",void 0);Vg=q6([Ce("wui-avatar")],Vg);const QPe=De`
  :host {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: var(--wui-color-gray-glass-020);
    border-radius: var(--local-border-radius);
    border: var(--local-border);
    box-sizing: content-box;
    width: var(--local-size);
    height: var(--local-size);
    min-height: var(--local-size);
    min-width: var(--local-size);
  }

  @supports (background: color-mix(in srgb, white 50%, black)) {
    :host {
      background-color: color-mix(in srgb, var(--local-bg-value) var(--local-bg-mix), transparent);
    }
  }
`;var Ph=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let du=class extends Te{constructor(){super(...arguments),this.size="md",this.backgroundColor="accent-100",this.iconColor="accent-100",this.background="transparent",this.border=!1,this.borderColor="wui-color-bg-125",this.icon="copy"}render(){const e=this.iconSize||this.size,n=this.size==="lg",r=this.size==="xl",i=n?"12%":"16%",s=n?"xxs":r?"s":"3xl",o=this.background==="gray",a=this.background==="opaque",c=this.backgroundColor==="accent-100"&&a||this.backgroundColor==="success-100"&&a||this.backgroundColor==="error-100"&&a||this.backgroundColor==="inverse-100"&&a;let l=`var(--wui-color-${this.backgroundColor})`;return c?l=`var(--wui-icon-box-bg-${this.backgroundColor})`:o&&(l=`var(--wui-color-gray-${this.backgroundColor})`),this.style.cssText=`
       --local-bg-value: ${l};
       --local-bg-mix: ${c||o?"100%":i};
       --local-border-radius: var(--wui-border-radius-${s});
       --local-size: var(--wui-icon-box-size-${this.size});
       --local-border: ${this.borderColor==="wui-color-bg-125"?"2px":"1px"} solid ${this.border?`var(--${this.borderColor})`:"transparent"}
   `,K` <wui-icon color=${this.iconColor} size=${e} name=${this.icon}></wui-icon> `}};du.styles=[Et,Sn,QPe];Ph([ne()],du.prototype,"size",void 0);Ph([ne()],du.prototype,"backgroundColor",void 0);Ph([ne()],du.prototype,"iconColor",void 0);Ph([ne()],du.prototype,"iconSize",void 0);Ph([ne()],du.prototype,"background",void 0);Ph([ne({type:Boolean})],du.prototype,"border",void 0);Ph([ne()],du.prototype,"borderColor",void 0);Ph([ne()],du.prototype,"icon",void 0);du=Ph([Ce("wui-icon-box")],du);const ZPe=De`
  :host {
    display: block;
  }

  button {
    border-radius: var(--wui-border-radius-3xl);
    background: var(--wui-color-gray-glass-002);
    display: flex;
    gap: var(--wui-spacing-xs);
    padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) var(--wui-spacing-3xs)
      var(--wui-spacing-xs);
    border: 1px solid var(--wui-color-gray-glass-005);
  }

  button:disabled {
    background: var(--wui-color-gray-glass-015);
  }

  button:disabled > wui-text {
    color: var(--wui-color-gray-glass-015);
  }

  button:disabled > wui-flex > wui-text {
    color: var(--wui-color-gray-glass-015);
  }

  button:disabled > wui-image,
  button:disabled > wui-flex > wui-avatar {
    filter: grayscale(1);
  }

  button:has(wui-image) {
    padding: var(--wui-spacing-3xs) var(--wui-spacing-3xs) var(--wui-spacing-3xs)
      var(--wui-spacing-xs);
  }

  wui-text {
    color: var(--wui-color-fg-100);
  }

  wui-flex > wui-text {
    color: var(--wui-color-fg-200);
  }

  wui-image,
  wui-icon-box {
    border-radius: var(--wui-border-radius-3xl);
    width: 24px;
    height: 24px;
    box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
  }

  wui-flex {
    border-radius: var(--wui-border-radius-3xl);
    border: 1px solid var(--wui-color-gray-glass-005);
    background: var(--wui-color-gray-glass-005);
    padding: 4px var(--wui-spacing-m) 4px var(--wui-spacing-xxs);
  }

  button.local-no-balance {
    border-radius: 0px;
    border: none;
    background: transparent;
  }

  wui-avatar {
    width: 20px;
    height: 20px;
    box-shadow: 0 0 0 2px var(--wui-color-accent-glass-010);
  }

  @media (max-width: 500px) {
    button {
      gap: 0px;
      padding: var(--wui-spacing-3xs) var(--wui-spacing-xs) !important;
      height: 32px;
    }
    wui-image,
    wui-icon-box,
    button > wui-text {
      visibility: hidden;
      width: 0px;
      height: 0px;
    }
    button {
      border-radius: 0px;
      border: none;
      background: transparent;
      padding: 0px;
    }
  }

  @media (hover: hover) and (pointer: fine) {
    button:hover:enabled > wui-flex > wui-text {
      color: var(--wui-color-fg-175);
    }

    button:active:enabled > wui-flex > wui-text {
      color: var(--wui-color-fg-175);
    }
  }
`;var Dd=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let wl=class extends Te{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.balance=void 0,this.isUnsupportedChain=void 0,this.disabled=!1,this.address="",this.profileName="",this.charsStart=4,this.charsEnd=6}render(){return K`
      <button
        ?disabled=${this.disabled}
        class=${gt(this.balance?void 0:"local-no-balance")}
      >
        ${this.balanceTemplate()}
        <wui-flex gap="xxs" alignItems="center">
          <wui-avatar
            .imageSrc=${this.avatarSrc}
            alt=${this.address}
            address=${this.address}
          ></wui-avatar>
          <wui-text variant="paragraph-600" color="inherit">
            ${this.address?qt.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?18:this.charsStart,charsEnd:this.profileName?0:this.charsEnd,truncate:this.profileName?"end":"middle"}):null}
          </wui-text>
        </wui-flex>
      </button>
    `}balanceTemplate(){if(this.isUnsupportedChain)return K` <wui-icon-box
          size="sm"
          iconColor="error-100"
          backgroundColor="error-100"
          icon="warningCircle"
        ></wui-icon-box>
        <wui-text variant="paragraph-600" color="inherit"> Switch Network</wui-text>`;if(this.balance){const e=this.networkSrc?K`<wui-image src=${this.networkSrc}></wui-image>`:K`
            <wui-icon-box
              size="sm"
              iconColor="fg-200"
              backgroundColor="fg-300"
              icon="networkPlaceholder"
            ></wui-icon-box>
          `;return K`
        ${e}
        <wui-text variant="paragraph-600" color="inherit"> ${this.balance}</wui-text>
      `}return null}};wl.styles=[Et,Sn,ZPe];Dd([ne()],wl.prototype,"networkSrc",void 0);Dd([ne()],wl.prototype,"avatarSrc",void 0);Dd([ne()],wl.prototype,"balance",void 0);Dd([ne({type:Boolean})],wl.prototype,"isUnsupportedChain",void 0);Dd([ne({type:Boolean})],wl.prototype,"disabled",void 0);Dd([ne()],wl.prototype,"address",void 0);Dd([ne()],wl.prototype,"profileName",void 0);Dd([ne()],wl.prototype,"charsStart",void 0);Dd([ne()],wl.prototype,"charsEnd",void 0);wl=Dd([Ce("wui-account-button")],wl);const JPe=De`
  :host {
    position: relative;
    background-color: var(--wui-color-gray-glass-002);
    display: flex;
    justify-content: center;
    align-items: center;
    width: var(--local-size);
    height: var(--local-size);
    border-radius: inherit;
    border-radius: var(--local-border-radius);
  }

  :host > wui-flex {
    overflow: hidden;
    border-radius: inherit;
    border-radius: var(--local-border-radius);
  }

  :host::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: inherit;
    border: 1px solid var(--wui-color-gray-glass-010);
    pointer-events: none;
  }

  :host([name='Extension'])::after {
    border: 1px solid var(--wui-color-accent-glass-010);
  }

  :host([data-wallet-icon='allWallets']) {
    background-color: var(--wui-all-wallets-bg-100);
  }

  :host([data-wallet-icon='allWallets'])::after {
    border: 1px solid var(--wui-color-accent-glass-010);
  }

  wui-icon[data-parent-size='inherit'] {
    width: 75%;
    height: 75%;
    align-items: center;
  }

  wui-icon[data-parent-size='sm'] {
    width: 18px;
    height: 18px;
  }

  wui-icon[data-parent-size='md'] {
    width: 24px;
    height: 24px;
  }

  wui-icon[data-parent-size='lg'] {
    width: 42px;
    height: 42px;
  }

  wui-icon[data-parent-size='full'] {
    width: 100%;
    height: 100%;
  }

  :host > wui-icon-box {
    position: absolute;
    overflow: hidden;
    right: -1px;
    bottom: -2px;
    z-index: 1;
    border: 2px solid var(--wui-color-bg-150, #1e1f1f);
    padding: 1px;
  }
`;var S1=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let ph=class extends Te{constructor(){super(...arguments),this.size="md",this.name="",this.installed=!1,this.badgeSize="xs"}render(){let e="xxs";return this.size==="lg"?e="m":this.size==="md"?e="xs":e="xxs",this.style.cssText=`
       --local-border-radius: var(--wui-border-radius-${e});
       --local-size: var(--wui-wallet-image-size-${this.size});
   `,this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),K`
      <wui-flex justifyContent="center" alignItems="center"> ${this.templateVisual()} </wui-flex>
    `}templateVisual(){return this.imageSrc?K`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:this.walletIcon?K`<wui-icon
        data-parent-size="md"
        size="md"
        color="inherit"
        name=${this.walletIcon}
      ></wui-icon>`:K`<wui-icon
      data-parent-size=${this.size}
      size="inherit"
      color="inherit"
      name="walletPlaceholder"
    ></wui-icon>`}};ph.styles=[Et,JPe];S1([ne()],ph.prototype,"size",void 0);S1([ne()],ph.prototype,"name",void 0);S1([ne()],ph.prototype,"imageSrc",void 0);S1([ne()],ph.prototype,"walletIcon",void 0);S1([ne({type:Boolean})],ph.prototype,"installed",void 0);S1([ne()],ph.prototype,"badgeSize",void 0);ph=S1([Ce("wui-wallet-image")],ph);const XPe=De`
  :host {
    position: relative;
    border-radius: var(--wui-border-radius-xxs);
    width: 40px;
    height: 40px;
    overflow: hidden;
    background: var(--wui-color-gray-glass-002);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--wui-spacing-4xs);
    padding: 3.75px !important;
  }

  :host::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: inherit;
    border: 1px solid var(--wui-color-gray-glass-010);
    pointer-events: none;
  }

  :host > wui-wallet-image {
    width: 14px;
    height: 14px;
    border-radius: var(--wui-border-radius-5xs);
  }

  :host > wui-flex {
    padding: 2px;
    position: fixed;
    overflow: hidden;
    left: 34px;
    bottom: 8px;
    background: var(--dark-background-150, #1e1f1f);
    border-radius: 50%;
    z-index: 2;
    display: flex;
  }
`;var one=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const Rk=4;let TC=class extends Te{constructor(){super(...arguments),this.walletImages=[]}render(){const e=this.walletImages.length<Rk;return K`${this.walletImages.slice(0,Rk).map(({src:n,walletName:r})=>K`
            <wui-wallet-image
              size="inherit"
              imageSrc=${n}
              name=${gt(r)}
            ></wui-wallet-image>
          `)}
      ${e?[...Array(Rk-this.walletImages.length)].map(()=>K` <wui-wallet-image size="inherit" name=""></wui-wallet-image>`):null}
      <wui-flex>
        <wui-icon-box
          size="xxs"
          iconSize="xxs"
          iconcolor="success-100"
          backgroundcolor="success-100"
          icon="checkmark"
          background="opaque"
        ></wui-icon-box>
      </wui-flex>`}};TC.styles=[Et,XPe];one([ne({type:Array})],TC.prototype,"walletImages",void 0);TC=one([Ce("wui-all-wallets-image")],TC);const eOe=De`
  :host {
    width: var(--local-width);
    position: relative;
  }

  button {
    border: none;
    border-radius: var(--local-border-radius);
    width: var(--local-width);
    white-space: nowrap;
  }

  /* -- Sizes --------------------------------------------------- */
  button[data-size='md'] {
    padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-l);
    height: 36px;
  }

  button[data-size='md'][data-icon-left='true'][data-icon-right='false'] {
    padding: 8.2px var(--wui-spacing-l) 9px var(--wui-spacing-s);
  }

  button[data-size='md'][data-icon-right='true'][data-icon-left='false'] {
    padding: 8.2px var(--wui-spacing-s) 9px var(--wui-spacing-l);
  }

  button[data-size='lg'] {
    padding: var(--wui-spacing-m) var(--wui-spacing-2l);
    height: 48px;
  }

  /* -- Variants --------------------------------------------------------- */
  button[data-variant='main'] {
    background-color: var(--wui-color-accent-100);
    color: var(--wui-color-inverse-100);
    border: none;
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
  }

  button[data-variant='inverse'] {
    background-color: var(--wui-color-inverse-100);
    color: var(--wui-color-inverse-000);
    border: none;
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
  }

  button[data-variant='accent'] {
    background-color: var(--wui-color-accent-glass-010);
    color: var(--wui-color-accent-100);
    border: none;
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
  }

  button[data-variant='accent-error'] {
    background: var(--wui-color-error-glass-015);
    color: var(--wui-color-error-100);
    border: none;
    box-shadow: inset 0 0 0 1px var(--wui-color-error-glass-010);
  }

  button[data-variant='accent-success'] {
    background: var(--wui-color-success-glass-015);
    color: var(--wui-color-success-100);
    border: none;
    box-shadow: inset 0 0 0 1px var(--wui-color-success-glass-010);
  }

  button[data-variant='neutral'] {
    background: transparent;
    color: var(--wui-color-fg-100);
    border: none;
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
  }

  /* -- Focus states --------------------------------------------------- */
  button[data-variant='main']:focus-visible:enabled {
    background-color: var(--wui-color-accent-090);
    box-shadow:
      inset 0 0 0 1px var(--wui-color-accent-100),
      0 0 0 4px var(--wui-color-accent-glass-020);
  }
  button[data-variant='inverse']:focus-visible:enabled {
    background-color: var(--wui-color-inverse-100);
    box-shadow:
      inset 0 0 0 1px var(--wui-color-gray-glass-010),
      0 0 0 4px var(--wui-color-accent-glass-020);
  }
  button[data-variant='accent']:focus-visible:enabled {
    background-color: var(--wui-color-accent-glass-010);
    box-shadow:
      inset 0 0 0 1px var(--wui-color-accent-100),
      0 0 0 4px var(--wui-color-accent-glass-020);
  }
  button[data-variant='accent-error']:focus-visible:enabled {
    background: var(--wui-color-error-glass-015);
    box-shadow:
      inset 0 0 0 1px var(--wui-color-error-100),
      0 0 0 4px var(--wui-color-error-glass-020);
  }
  button[data-variant='accent-success']:focus-visible:enabled {
    background: var(--wui-color-success-glass-015);
    box-shadow:
      inset 0 0 0 1px var(--wui-color-success-100),
      0 0 0 4px var(--wui-color-success-glass-020);
  }
  button[data-variant='neutral']:focus-visible:enabled {
    background: var(--wui-color-gray-glass-005);
    box-shadow:
      inset 0 0 0 1px var(--wui-color-gray-glass-010),
      0 0 0 4px var(--wui-color-gray-glass-002);
  }

  /* -- Hover & Active states ----------------------------------------------------------- */
  @media (hover: hover) and (pointer: fine) {
    button[data-variant='main']:hover:enabled {
      background-color: var(--wui-color-accent-090);
    }

    button[data-variant='main']:active:enabled {
      background-color: var(--wui-color-accent-080);
    }

    button[data-variant='accent']:hover:enabled {
      background-color: var(--wui-color-accent-glass-015);
    }

    button[data-variant='accent']:active:enabled {
      background-color: var(--wui-color-accent-glass-020);
    }

    button[data-variant='accent-error']:hover:enabled {
      background: var(--wui-color-error-glass-020);
      color: var(--wui-color-error-100);
    }

    button[data-variant='accent-error']:active:enabled {
      background: var(--wui-color-error-glass-030);
      color: var(--wui-color-error-100);
    }

    button[data-variant='accent-success']:hover:enabled {
      background: var(--wui-color-success-glass-020);
      color: var(--wui-color-success-100);
    }

    button[data-variant='accent-success']:active:enabled {
      background: var(--wui-color-success-glass-030);
      color: var(--wui-color-success-100);
    }

    button[data-variant='neutral']:hover:enabled {
      background: var(--wui-color-gray-glass-002);
    }

    button[data-variant='neutral']:active:enabled {
      background: var(--wui-color-gray-glass-005);
    }

    button[data-size='lg'][data-icon-left='true'][data-icon-right='false'] {
      padding-left: var(--wui-spacing-m);
    }

    button[data-size='lg'][data-icon-right='true'][data-icon-left='false'] {
      padding-right: var(--wui-spacing-m);
    }
  }

  /* -- Disabled state --------------------------------------------------- */
  button:disabled {
    background-color: var(--wui-color-gray-glass-002);
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
    color: var(--wui-color-gray-glass-020);
    cursor: not-allowed;
  }

  button > wui-text {
    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
    will-change: opacity;
    opacity: var(--local-opacity-100);
  }

  ::slotted(*) {
    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
    will-change: opacity;
    opacity: var(--local-opacity-100);
  }

  wui-loading-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: var(--local-opacity-000);
  }
`;var Md=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const rq={main:"inverse-100",inverse:"inverse-000",accent:"accent-100","accent-error":"error-100","accent-success":"success-100",neutral:"fg-100",disabled:"gray-glass-020"},tOe={lg:"paragraph-600",md:"small-600"},nOe={lg:"md",md:"md"};let yl=class extends Te{constructor(){super(...arguments),this.size="lg",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="main",this.hasIconLeft=!1,this.hasIconRight=!1,this.borderRadius="m"}render(){this.style.cssText=`
    --local-width: ${this.fullWidth?"100%":"auto"};
    --local-opacity-100: ${this.loading?0:1};
    --local-opacity-000: ${this.loading?1:0};
    --local-border-radius: var(--wui-border-radius-${this.borderRadius});
    `;const e=this.textVariant??tOe[this.size];return K`
      <button
        data-variant=${this.variant}
        data-icon-left=${this.hasIconLeft}
        data-icon-right=${this.hasIconRight}
        data-size=${this.size}
        ?disabled=${this.disabled}
        ontouchstart
      >
        ${this.loadingTemplate()}
        <slot name="iconLeft" @slotchange=${()=>this.handleSlotLeftChange()}></slot>
        <wui-text variant=${e} color="inherit">
          <slot></slot>
        </wui-text>
        <slot name="iconRight" @slotchange=${()=>this.handleSlotRightChange()}></slot>
      </button>
    `}handleSlotLeftChange(){this.hasIconLeft=!0}handleSlotRightChange(){this.hasIconRight=!0}loadingTemplate(){if(this.loading){const e=nOe[this.size],n=this.disabled?rq.disabled:rq[this.variant];return K`<wui-loading-spinner color=${n} size=${e}></wui-loading-spinner>`}return K``}};yl.styles=[Et,Sn,eOe];Md([ne()],yl.prototype,"size",void 0);Md([ne({type:Boolean})],yl.prototype,"disabled",void 0);Md([ne({type:Boolean})],yl.prototype,"fullWidth",void 0);Md([ne({type:Boolean})],yl.prototype,"loading",void 0);Md([ne()],yl.prototype,"variant",void 0);Md([ne({type:Boolean})],yl.prototype,"hasIconLeft",void 0);Md([ne({type:Boolean})],yl.prototype,"hasIconRight",void 0);Md([ne()],yl.prototype,"borderRadius",void 0);Md([ne()],yl.prototype,"textVariant",void 0);yl=Md([Ce("wui-button")],yl);const ane=Ze`<svg  viewBox="0 0 48 54" fill="none">
  <path
    d="M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z"
  />
</svg>`,rOe=De`
  :host {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 76px;
    row-gap: var(--wui-spacing-xs);
    padding: var(--wui-spacing-xs) 10px;
    background-color: var(--wui-color-gray-glass-002);
    border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);
    position: relative;
  }

  wui-shimmer[data-type='network'] {
    border: none;
    -webkit-clip-path: var(--wui-path-network);
    clip-path: var(--wui-path-network);
  }

  svg {
    position: absolute;
    width: 48px;
    height: 54px;
    z-index: 1;
  }

  svg > path {
    stroke: var(--wui-color-gray-glass-010);
    stroke-width: 1px;
  }
`;var cne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let IC=class extends Te{constructor(){super(...arguments),this.type="wallet"}render(){return K`
      ${this.shimmerTemplate()}
      <wui-shimmer width="56px" height="20px" borderRadius="xs"></wui-shimmer>
    `}shimmerTemplate(){return this.type==="network"?K` <wui-shimmer
          data-type=${this.type}
          width="48px"
          height="54px"
          borderRadius="xs"
        ></wui-shimmer>
        ${ane}`:K`<wui-shimmer width="56px" height="56px" borderRadius="xs"></wui-shimmer>`}};IC.styles=[Et,Sn,rOe];cne([ne()],IC.prototype,"type",void 0);IC=cne([Ce("wui-card-select-loader")],IC);const iOe=Ze`
  <svg fill="none" viewBox="0 0 36 40">
    <path
      d="M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.61 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z"
    />
  </svg>
`,sOe=Ze`<svg width="86" height="96" fill="none">
  <path
    d="M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z"
  />
</svg>`,oOe=De`
  :host {
    position: relative;
    border-radius: inherit;
    display: flex;
    justify-content: center;
    align-items: center;
    width: var(--local-width);
    height: var(--local-height);
  }

  svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    fill: var(--wui-color-gray-glass-002);
  }

  svg > path {
    stroke: var(--local-stroke);
  }

  wui-image {
    width: 100%;
    height: 100%;
    -webkit-clip-path: var(--local-path);
    clip-path: var(--local-path);
    background: var(--wui-color-gray-glass-002);
  }

  wui-icon {
    transform: translateY(-5%);
    width: var(--local-icon-size);
    height: var(--local-icon-size);
  }
`;var G6=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let qg=class extends Te{constructor(){super(...arguments),this.size="md",this.name="uknown",this.selected=!1}render(){const e={sm:iOe,md:ane,lg:sOe};return this.style.cssText=`
      --local-stroke: ${this.selected?"var(--wui-color-accent-100)":"var(--wui-color-gray-glass-010)"};
      --local-path: var(--wui-path-network-${this.size});
      --local-width:  var(--wui-width-network-${this.size});
      --local-height:  var(--wui-height-network-${this.size});
      --local-icon-size:  var(--wui-icon-size-network-${this.size});
    `,K`${this.templateVisual()} ${e[this.size]}`}templateVisual(){return this.imageSrc?K`<wui-image src=${this.imageSrc} alt=${this.name}></wui-image>`:K`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}};qg.styles=[Et,oOe];G6([ne()],qg.prototype,"size",void 0);G6([ne()],qg.prototype,"name",void 0);G6([ne()],qg.prototype,"imageSrc",void 0);G6([ne({type:Boolean})],qg.prototype,"selected",void 0);qg=G6([Ce("wui-network-image")],qg);const aOe=De`
  button {
    flex-direction: column;
    width: 76px;
    row-gap: var(--wui-spacing-xs);
    padding: var(--wui-spacing-xs) var(--wui-spacing-0);
    background-color: var(--wui-color-gray-glass-002);
    border-radius: clamp(0px, var(--wui-border-radius-xs), 20px);
  }

  button > wui-text {
    color: var(--wui-color-fg-100);
    max-width: var(--wui-icon-box-size-xl);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    justify-content: center;
  }

  button:disabled > wui-text {
    color: var(--wui-color-gray-glass-015);
  }

  [data-selected='true'] {
    background-color: var(--wui-color-accent-glass-020);
  }

  @media (hover: hover) and (pointer: fine) {
    [data-selected='true']:hover:enabled {
      background-color: var(--wui-color-accent-glass-015);
    }
  }

  [data-selected='true']:active:enabled {
    background-color: var(--wui-color-accent-glass-010);
  }
`;var T1=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let mh=class extends Te{constructor(){super(...arguments),this.name="Unknown",this.type="wallet",this.imageSrc=void 0,this.disabled=!1,this.selected=!1,this.installed=!1}render(){return K`
      <button data-selected=${gt(this.selected)} ?disabled=${this.disabled} ontouchstart>
        ${this.imageTemplate()}
        <wui-text variant="tiny-500" color=${this.selected?"accent-100":"inherit"}>
          ${this.name}
        </wui-text>
      </button>
    `}imageTemplate(){return this.type==="network"?K`
        <wui-network-image
          .selected=${this.selected}
          imageSrc=${gt(this.imageSrc)}
          name=${this.name}
        >
        </wui-network-image>
      `:K`
      <wui-wallet-image
        size="md"
        imageSrc=${gt(this.imageSrc)}
        name=${this.name}
        .installed=${this.installed}
        badgeSize="sm"
      >
      </wui-wallet-image>
    `}};mh.styles=[Et,Sn,aOe];T1([ne()],mh.prototype,"name",void 0);T1([ne()],mh.prototype,"type",void 0);T1([ne()],mh.prototype,"imageSrc",void 0);T1([ne({type:Boolean})],mh.prototype,"disabled",void 0);T1([ne({type:Boolean})],mh.prototype,"selected",void 0);T1([ne({type:Boolean})],mh.prototype,"installed",void 0);mh=T1([Ce("wui-card-select")],mh);const cOe=De`
  a {
    border: 1px solid var(--wui-color-gray-glass-010);
    border-radius: var(--wui-border-radius-3xl);
  }

  wui-image {
    border-radius: var(--wui-border-radius-3xl);
    overflow: hidden;
  }

  a.disabled > wui-icon,
  a.disabled > wui-image {
    filter: grayscale(1);
  }

  a[data-variant='fill'] {
    color: var(--wui-color-inverse-100);
    background-color: var(--wui-color-accent-100);
  }

  a[data-variant='shade'],
  a[data-variant='shadeSmall'] {
    background-color: transparent;
    background-color: var(--wui-color-gray-glass-010);
    color: var(--wui-color-fg-200);
  }

  a[data-variant='success'] {
    column-gap: var(--wui-spacing-xxs);
    border: 1px solid var(--wui-color-success-glass-010);
    background-color: var(--wui-color-success-glass-010);
    color: var(--wui-color-success-100);
  }

  a[data-variant='error'] {
    column-gap: var(--wui-spacing-xxs);
    border: 1px solid var(--wui-color-error-glass-010);
    background-color: var(--wui-color-error-glass-010);
    color: var(--wui-color-error-100);
  }

  a[data-variant='transparent'] {
    column-gap: var(--wui-spacing-xxs);
    background-color: transparent;
    color: var(--wui-color-fg-150);
  }

  a[data-variant='transparent'],
  a[data-variant='success'],
  a[data-variant='shadeSmall'],
  a[data-variant='error'] {
    padding: 7px var(--wui-spacing-s) 7px 10px;
  }

  a[data-variant='transparent']:has(wui-text:first-child),
  a[data-variant='success']:has(wui-text:first-child),
  a[data-variant='shadeSmall']:has(wui-text:first-child),
  a[data-variant='error']:has(wui-text:first-child) {
    padding: 7px var(--wui-spacing-s);
  }

  a[data-variant='fill'],
  a[data-variant='shade'] {
    column-gap: var(--wui-spacing-xs);
    padding: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-xxs)
      var(--wui-spacing-xs);
  }

  a[data-variant='fill']:has(wui-text:first-child),
  a[data-variant='shade']:has(wui-text:first-child) {
    padding: 9px var(--wui-spacing-m) 9px var(--wui-spacing-m);
  }

  a[data-variant='fill'] > wui-image,
  a[data-variant='shade'] > wui-image {
    width: 24px;
    height: 24px;
  }

  a[data-variant='fill'] > wui-image {
    box-shadow: inset 0 0 0 1px var(--wui-color-accent-090);
  }

  a[data-variant='shade'] > wui-image,
  a[data-variant='shadeSmall'] > wui-image {
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
  }

  a[data-variant='fill'] > wui-icon,
  a[data-variant='shade'] > wui-icon {
    width: 14px;
    height: 14px;
  }

  a[data-variant='transparent'] > wui-image,
  a[data-variant='success'] > wui-image,
  a[data-variant='shadeSmall'] > wui-image,
  a[data-variant='error'] > wui-image {
    width: 14px;
    height: 14px;
  }

  a[data-variant='transparent'] > wui-icon,
  a[data-variant='success'] > wui-icon,
  a[data-variant='shadeSmall'] > wui-icon,
  a[data-variant='error'] > wui-icon {
    width: 12px;
    height: 12px;
  }

  a[data-variant='fill']:focus-visible {
    background-color: var(--wui-color-accent-090);
  }

  a[data-variant='shade']:focus-visible,
  a[data-variant='shadeSmall']:focus-visible {
    background-color: var(--wui-color-gray-glass-015);
  }

  a[data-variant='transparent']:focus-visible {
    background-color: var(--wui-color-gray-glass-005);
  }

  a[data-variant='success']:focus-visible {
    background-color: var(--wui-color-success-glass-015);
  }

  a[data-variant='error']:focus-visible {
    background-color: var(--wui-color-error-glass-015);
  }

  a.disabled {
    color: var(--wui-color-gray-glass-015);
    background-color: var(--wui-color-gray-glass-015);
    pointer-events: none;
  }

  @media (hover: hover) and (pointer: fine) {
    a[data-variant='fill']:hover {
      background-color: var(--wui-color-accent-090);
    }

    a[data-variant='shade']:hover,
    a[data-variant='shadeSmall']:hover {
      background-color: var(--wui-color-gray-glass-015);
    }

    a[data-variant='transparent']:hover {
      background-color: var(--wui-color-gray-glass-005);
    }

    a[data-variant='success']:hover {
      background-color: var(--wui-color-success-glass-015);
    }

    a[data-variant='error']:hover {
      background-color: var(--wui-color-error-glass-015);
    }
  }

  a[data-variant='fill']:active {
    background-color: var(--wui-color-accent-080);
  }

  a[data-variant='shade']:active,
  a[data-variant='shadeSmall']:active {
    background-color: var(--wui-color-gray-glass-020);
  }

  a[data-variant='transparent']:active {
    background-color: var(--wui-color-gray-glass-010);
  }

  a[data-variant='success']:active {
    background-color: var(--wui-color-success-glass-020);
  }

  a[data-variant='error']:active {
    background-color: var(--wui-color-error-glass-020);
  }
`;var I1=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let gh=class extends Te{constructor(){super(...arguments),this.variant="fill",this.imageSrc=void 0,this.disabled=!1,this.icon="externalLink",this.href="",this.text=void 0}render(){const n=this.variant==="success"||this.variant==="transparent"||this.variant==="shadeSmall"?"small-600":"paragraph-600";return K`
      <a
        rel="noreferrer"
        target="_blank"
        href=${this.href}
        class=${this.disabled?"disabled":""}
        data-variant=${this.variant}
      >
        ${this.imageTemplate()}
        <wui-text variant=${n} color="inherit">
          ${this.title?this.title:qt.getHostName(this.href)}
        </wui-text>
        <wui-icon name=${this.icon} color="inherit" size="inherit"></wui-icon>
      </a>
    `}imageTemplate(){return this.imageSrc?K`<wui-image src=${this.imageSrc}></wui-image>`:null}};gh.styles=[Et,Sn,cOe];I1([ne()],gh.prototype,"variant",void 0);I1([ne()],gh.prototype,"imageSrc",void 0);I1([ne({type:Boolean})],gh.prototype,"disabled",void 0);I1([ne()],gh.prototype,"icon",void 0);I1([ne()],gh.prototype,"href",void 0);I1([ne()],gh.prototype,"text",void 0);gh=I1([Ce("wui-chip")],gh);const lOe=De`
  :host {
    position: relative;
    display: block;
  }

  button {
    background: var(--wui-color-accent-100);
    border: 1px solid var(--wui-color-gray-glass-010);
    border-radius: var(--wui-border-radius-m);
    gap: var(--wui-spacing-xs);
  }

  button.loading {
    background: var(--wui-color-gray-glass-010);
    border: 1px solid var(--wui-color-gray-glass-010);
    pointer-events: none;
  }

  button:disabled {
    background-color: var(--wui-color-gray-glass-015);
    border: 1px solid var(--wui-color-gray-glass-010);
  }

  button:disabled > wui-text {
    color: var(--wui-color-gray-glass-015);
  }

  @media (hover: hover) and (pointer: fine) {
    button:hover:enabled {
      background-color: var(--wui-color-accent-090);
    }

    button:active:enabled {
      background-color: var(--wui-color-accent-080);
    }
  }

  button:focus-visible {
    border: 1px solid var(--wui-color-gray-glass-010);
    background-color: var(--wui-color-accent-090);
    -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
    -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
    box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
  }

  button[data-size='sm'] {
    padding: 6.75px 10px 7.25px;
  }

  ::slotted(*) {
    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
    will-change: opacity;
    opacity: var(--local-opacity-100);
  }

  button > wui-text {
    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
    will-change: opacity;
    opacity: var(--local-opacity-100);
    color: var(--wui-color-inverse-100);
  }

  button[data-size='md'] {
    padding: 9px var(--wui-spacing-l) 9px var(--wui-spacing-l);
  }

  button[data-size='md'] + wui-text {
    padding-left: var(--wui-spacing-3xs);
  }

  @media (max-width: 500px) {
    button[data-size='md'] {
      height: 32px;
      padding: 5px 12px;
    }

    button[data-size='md'] > wui-text > slot {
      font-size: 14px !important;
    }
  }

  wui-loading-spinner {
    width: 14px;
    height: 14px;
  }

  wui-loading-spinner::slotted(svg) {
    width: 10px !important;
    height: 10px !important;
  }

  button[data-size='sm'] > wui-loading-spinner {
    width: 12px;
    height: 12px;
  }
`;var r$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let nx=class extends Te{constructor(){super(...arguments),this.size="md",this.loading=!1}render(){const e=this.size==="md"?"paragraph-600":"small-600";return K`
      <button data-size=${this.size} ?disabled=${this.loading} ontouchstart>
        ${this.loadingTemplate()}
        <wui-text variant=${e} color=${this.loading?"accent-100":"inherit"}>
          <slot></slot>
        </wui-text>
      </button>
    `}loadingTemplate(){return this.loading?K`<wui-loading-spinner size=${this.size} color="accent-100"></wui-loading-spinner>`:null}};nx.styles=[Et,Sn,lOe];r$([ne()],nx.prototype,"size",void 0);r$([ne({type:Boolean})],nx.prototype,"loading",void 0);nx=r$([Ce("wui-connect-button")],nx);const uOe=De`
  wui-flex {
    width: 100%;
    background-color: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-xs);
  }
`;var c9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Cv=class extends Te{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return K`
      <wui-flex
        justifyContent="space-between"
        alignItems="center"
        .padding=${["1xs","2l","1xs","2l"]}
      >
        <wui-text variant="paragraph-500" color="fg-200">${this.label}</wui-text>
        <wui-chip-button size="sm" variant="shade" text=${this.buttonLabel} icon="chevronRight">
        </wui-chip-button>
      </wui-flex>
    `}};Cv.styles=[Et,Sn,uOe];c9([ne({type:Boolean})],Cv.prototype,"disabled",void 0);c9([ne()],Cv.prototype,"label",void 0);c9([ne()],Cv.prototype,"buttonLabel",void 0);Cv=c9([Ce("wui-cta-button")],Cv);const dOe=De`
  :host {
    display: block;
    padding: var(--wui-spacing-l) var(--wui-spacing-m);
    background-color: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-xs);
    width: 100%;
  }
`;var fOe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let MP=class extends Te{render(){return K`
      <wui-flex gap="xl" flexDirection="column" justifyContent="space-between" alignItems="center">
        <slot></slot>
      </wui-flex>
    `}};MP.styles=[Et,Sn,dOe];MP=fOe([Ce("wui-details-group")],MP);const hOe=De`
  :host {
    display: flex;
    flex-direction: row;
    gap: var(--wui-spacing-l);
    width: 100%;
    border-radius: var(--wui-border-radius-xs);
  }
`;var lne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let kC=class extends Te{constructor(){super(...arguments),this.name=""}render(){return K`
      <wui-flex justifyContent="space-between" alignItems="center">
        <wui-text variant="paragraph-500" color="fg-200">${this.name}</wui-text>
        <wui-flex gap="xs" alignItems="center">
          <slot></slot>
        </wui-flex>
      </wui-flex>
    `}};kC.styles=[Et,Sn,hOe];lne([ne()],kC.prototype,"name",void 0);kC=lne([Ce("wui-details-group-item")],kC);const pOe=De`
  :host {
    z-index: calc(var(--w3m-z-index) + 1);
    width: 200px;
    padding: var(--wui-spacing-3xs);
    align-items: center;
    display: inherit;
    border-radius: var(--wui-border-radius-xs);
    border: 1px solid var(--wui-color-gray-glass-002);
    background: var(--wui-color-fg-base-125);
    /* Dark/Elevation/L */
    box-shadow:
      0px 8px 22px -6px rgba(0, 0, 0, 0.12),
      0px 14px 64px -4px rgba(0, 0, 0, 0.12);
  }
`;var i$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let rx=class extends Te{constructor(){super(...arguments),this.actions=[],this.isOpen=!1}render(){return this.isOpen?K`
      <wui-flex flexDirection="column" gap="4xs">
        ${this.actions.map(e=>K`
            <wui-list-item
              icon=${e.icon}
              iconSize="sm"
              variant="icon"
              @click=${e.onClick}
            >
              <wui-text variant="small-400" color="fg-100">${e.label}</wui-text>
            </wui-list-item>
          `)}
      </wui-flex>
    `:null}};rx.styles=[Et,Sn,pOe];i$([ne({type:Array})],rx.prototype,"actions",void 0);i$([ne({type:Boolean})],rx.prototype,"isOpen",void 0);rx=i$([Ce("wui-dropdown-menu")],rx);/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const mOe=t=>t.strings===void 0;/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const $3=(t,e)=>{var r;const n=t._$AN;if(n===void 0)return!1;for(const i of n)(r=i._$AO)==null||r.call(i,e,!1),$3(i,e);return!0},RC=t=>{let e,n;do{if((e=t._$AM)===void 0)break;n=e._$AN,n.delete(t),t=e}while((n==null?void 0:n.size)===0)},une=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(n===void 0)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),yOe(e)}};function gOe(t){this._$AN!==void 0?(RC(this),this._$AM=t,une(this)):this._$AM=t}function wOe(t,e=!1,n=0){const r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(e)if(Array.isArray(r))for(let s=n;s<r.length;s++)$3(r[s],!1),RC(r[s]);else r!=null&&($3(r,!1),RC(r));else $3(this,t)}const yOe=t=>{t.type==nne.CHILD&&(t._$AP??(t._$AP=wOe),t._$AQ??(t._$AQ=gOe))};class vOe extends ine{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,n,r){super._$AT(e,n,r),une(this),this.isConnected=e._$AU}_$AO(e,n=!0){var r,i;e!==this.isConnected&&(this.isConnected=e,e?(r=this.reconnected)==null||r.call(this):(i=this.disconnected)==null||i.call(this)),n&&($3(this,e),RC(this))}setValue(e){if(mOe(this.t))this.t._$AI(e,this);else{const n=[...this.t._$AH];n[this.i]=e,this.t._$AI(n,this,0)}}disconnected(){}reconnected(){}}/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const A0=()=>new bOe;class bOe{}const Nk=new WeakMap,E0=rne(class extends vOe{render(t){return Qi}update(t,[e]){var r;const n=e!==this.Y;return n&&this.Y!==void 0&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=e,this.ht=(r=t.options)==null?void 0:r.host,this.rt(this.ct=t.element)),Qi}rt(t){if(this.isConnected||(t=void 0),typeof this.Y=="function"){const e=this.ht??globalThis;let n=Nk.get(e);n===void 0&&(n=new WeakMap,Nk.set(e,n)),n.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),n.set(this.Y,t),t!==void 0&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){var t,e;return typeof this.Y=="function"?(t=Nk.get(this.ht??globalThis))==null?void 0:t.get(this.Y):(e=this.Y)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),xOe=De`
  :host {
    position: relative;
    width: 100%;
    display: inline-block;
    color: var(--wui-color-fg-275);
  }

  input {
    width: 100%;
    border-radius: var(--wui-border-radius-xs);
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
    background: var(--wui-color-gray-glass-002);
    font-size: var(--wui-font-size-paragraph);
    letter-spacing: var(--wui-letter-spacing-paragraph);
    color: var(--wui-color-fg-100);
    transition:
      background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
      border-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
      box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);
    will-change: background-color, border-color, box-shadow;
    caret-color: var(--wui-color-accent-100);
  }

  input:disabled {
    cursor: not-allowed;
    border: 1px solid var(--wui-color-gray-glass-010);
  }

  input:disabled::placeholder,
  input:disabled + wui-icon {
    color: var(--wui-color-fg-300);
  }

  input::placeholder {
    color: var(--wui-color-fg-275);
  }

  input:focus:enabled {
    background-color: var(--wui-color-gray-glass-005);
    -webkit-box-shadow:
      inset 0 0 0 1px var(--wui-color-accent-100),
      0px 0px 0px 4px var(--wui-box-shadow-blue);
    -moz-box-shadow:
      inset 0 0 0 1px var(--wui-color-accent-100),
      0px 0px 0px 4px var(--wui-box-shadow-blue);
    box-shadow:
      inset 0 0 0 1px var(--wui-color-accent-100),
      0px 0px 0px 4px var(--wui-box-shadow-blue);
  }

  input:hover:enabled {
    background-color: var(--wui-color-gray-glass-005);
  }

  wui-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
  }

  .wui-size-sm {
    padding: 9px var(--wui-spacing-m) 10px var(--wui-spacing-s);
  }

  wui-icon + .wui-size-sm {
    padding: 9px var(--wui-spacing-m) 10px 36px;
  }

  wui-icon[data-input='sm'] {
    left: var(--wui-spacing-s);
  }

  .wui-size-md {
    padding: 15px var(--wui-spacing-m) var(--wui-spacing-l) var(--wui-spacing-m);
  }

  wui-icon + .wui-size-md,
  wui-loading-spinner + .wui-size-md {
    padding: 10.5px var(--wui-spacing-3xl) 10.5px var(--wui-spacing-3xl);
  }

  wui-icon[data-input='md'] {
    left: var(--wui-spacing-l);
  }

  .wui-size-lg {
    padding: var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-s) var(--wui-spacing-l);
    letter-spacing: var(--wui-letter-spacing-medium-title);
    font-size: var(--wui-font-size-medium-title);
    font-weight: var(--wui-font-weight-light);
    line-height: 130%;
    color: var(--wui-color-fg-100);
    height: 64px;
  }

  .wui-padding-right-xs {
    padding-right: var(--wui-spacing-xs);
  }

  .wui-padding-right-s {
    padding-right: var(--wui-spacing-s);
  }

  .wui-padding-right-m {
    padding-right: var(--wui-spacing-m);
  }

  .wui-padding-right-l {
    padding-right: var(--wui-spacing-l);
  }

  .wui-padding-right-xl {
    padding-right: var(--wui-spacing-xl);
  }

  .wui-padding-right-2xl {
    padding-right: var(--wui-spacing-2xl);
  }

  .wui-padding-right-3xl {
    padding-right: var(--wui-spacing-3xl);
  }

  .wui-padding-right-4xl {
    padding-right: var(--wui-spacing-4xl);
  }

  .wui-padding-right-5xl {
    padding-right: var(--wui-spacing-5xl);
  }

  wui-icon + .wui-size-lg,
  wui-loading-spinner + .wui-size-lg {
    padding-left: 50px;
  }

  wui-icon[data-input='lg'] {
    left: var(--wui-spacing-l);
  }

  .wui-size-mdl {
    padding: 17.25px var(--wui-spacing-m) 17.25px var(--wui-spacing-m);
  }
  wui-icon + .wui-size-mdl,
  wui-loading-spinner + .wui-size-mdl {
    padding: 17.25px var(--wui-spacing-3xl) 17.25px 40px;
  }
  wui-icon[data-input='mdl'] {
    left: var(--wui-spacing-m);
  }

  input:placeholder-shown ~ ::slotted(wui-input-element),
  input:placeholder-shown ~ ::slotted(wui-icon) {
    opacity: 0;
    pointer-events: none;
  }

  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  input[type='number'] {
    -moz-appearance: textfield;
  }

  ::slotted(wui-input-element),
  ::slotted(wui-icon) {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  ::slotted(wui-input-element) {
    right: var(--wui-spacing-m);
  }

  ::slotted(wui-icon) {
    right: 0px;
  }
`;var Oh=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let fu=class extends Te{constructor(){super(...arguments),this.inputElementRef=A0(),this.size="md",this.disabled=!1,this.placeholder="",this.type="text",this.value=""}render(){const e=`wui-padding-right-${this.inputRightPadding}`,r={[`wui-size-${this.size}`]:!0,[e]:!!this.inputRightPadding};return K`${this.templateIcon()}
      <input
        ${E0(this.inputElementRef)}
        class=${sne(r)}
        type=${this.type}
        enterkeyhint=${gt(this.enterKeyHint)}
        ?disabled=${this.disabled}
        placeholder=${this.placeholder}
        @input=${this.dispatchInputChangeEvent.bind(this)}
        .value=${this.value||""}
      />
      <slot></slot>`}templateIcon(){return this.icon?K`<wui-icon
        data-input=${this.size}
        size=${this.size}
        color="inherit"
        name=${this.icon}
      ></wui-icon>`:null}dispatchInputChangeEvent(){var e;this.dispatchEvent(new CustomEvent("inputChange",{detail:(e=this.inputElementRef.value)==null?void 0:e.value,bubbles:!0,composed:!0}))}};fu.styles=[Et,Sn,xOe];Oh([ne()],fu.prototype,"size",void 0);Oh([ne()],fu.prototype,"icon",void 0);Oh([ne({type:Boolean})],fu.prototype,"disabled",void 0);Oh([ne()],fu.prototype,"placeholder",void 0);Oh([ne()],fu.prototype,"type",void 0);Oh([ne()],fu.prototype,"keyHint",void 0);Oh([ne()],fu.prototype,"value",void 0);Oh([ne()],fu.prototype,"inputRightPadding",void 0);fu=Oh([Ce("wui-input-text")],fu);const _Oe=De`
  :host {
    position: relative;
    display: inline-block;
  }

  wui-text {
    margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m);
  }
`;var l9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Sv=class extends Te{constructor(){super(...arguments),this.disabled=!1}render(){return K`
      <wui-input-text
        placeholder="Email"
        icon="mail"
        size="mdl"
        .disabled=${this.disabled}
        .value=${this.value}
        data-testid="wui-email-input"
      ></wui-input-text>
      ${this.templateError()}
    `}templateError(){return this.errorMessage?K`<wui-text variant="tiny-500" color="error-100">${this.errorMessage}</wui-text>`:null}};Sv.styles=[Et,_Oe];l9([ne()],Sv.prototype,"errorMessage",void 0);l9([ne({type:Boolean})],Sv.prototype,"disabled",void 0);l9([ne()],Sv.prototype,"value",void 0);Sv=l9([Ce("wui-email-input")],Sv);const AOe=De`
  :host {
    position: relative;
    width: 100%;
    display: inline-block;
    color: var(--wui-color-fg-275);
  }

  .error {
    margin: var(--wui-spacing-xxs) var(--wui-spacing-m) var(--wui-spacing-0) var(--wui-spacing-m);
  }

  .base-name {
    position: absolute;
    right: 45px;
    top: 15px;
    text-align: right;
  }
`;var K6=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Gg=class extends Te{constructor(){super(...arguments),this.disabled=!1,this.loading=!1}render(){return K`
      <wui-input-text
        value=${gt(this.value)}
        ?disabled=${this.disabled}
        .value=${this.value||""}
        data-testId="wui-ens-input"
        inputRightPadding="5xl"
      >
        ${this.baseNameTemplate()} ${this.errorTemplate()}${this.loadingTemplate()}
      </wui-input-text>
    `}baseNameTemplate(){return K`<wui-text variant="paragraph-400" color="fg-200" class="base-name">
      ${Bi.WC_NAME_SUFFIX}
    </wui-text>`}loadingTemplate(){return this.loading?K`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:null}errorTemplate(){return this.errorMessage?K`<wui-text variant="tiny-500" color="error-100" class="error"
        >${this.errorMessage}</wui-text
      >`:null}};Gg.styles=[Et,AOe];K6([ne()],Gg.prototype,"errorMessage",void 0);K6([ne({type:Boolean})],Gg.prototype,"disabled",void 0);K6([ne()],Gg.prototype,"value",void 0);K6([ne({type:Boolean})],Gg.prototype,"loading",void 0);Gg=K6([Ce("wui-ens-input")],Gg);const EOe=De`
  button {
    border-radius: var(--local-border-radius);
    color: var(--wui-color-fg-100);
    padding: var(--local-padding);
  }

  @media (max-width: 700px) {
    button {
      padding: var(--wui-spacing-s);
    }
  }

  button > wui-icon {
    pointer-events: none;
  }

  button:disabled > wui-icon {
    color: var(--wui-color-bg-300) !important;
  }

  button:disabled {
    background-color: transparent;
  }
`;var Y6=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Kg=class extends Te{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.icon="copy",this.iconColor="inherit"}render(){const e=this.size==="lg"?"--wui-border-radius-xs":"--wui-border-radius-xxs",n=this.size==="lg"?"--wui-spacing-1xs":"--wui-spacing-2xs";return this.style.cssText=`
    --local-border-radius: var(${e});
    --local-padding: var(${n});
`,K`
      <button ?disabled=${this.disabled} ontouchstart>
        <wui-icon color=${this.iconColor} size=${this.size} name=${this.icon}></wui-icon>
      </button>
    `}};Kg.styles=[Et,Sn,e$,EOe];Y6([ne()],Kg.prototype,"size",void 0);Y6([ne({type:Boolean})],Kg.prototype,"disabled",void 0);Y6([ne()],Kg.prototype,"icon",void 0);Y6([ne()],Kg.prototype,"iconColor",void 0);Kg=Y6([Ce("wui-icon-link")],Kg);const COe=De`
  button {
    background-color: var(--wui-color-fg-300);
    border-radius: var(--wui-border-radius-4xs);
    width: 16px;
    height: 16px;
  }

  button:disabled {
    background-color: var(--wui-color-bg-300);
  }

  wui-icon {
    color: var(--wui-color-bg-200) !important;
  }

  button:focus-visible {
    background-color: var(--wui-color-fg-250);
    border: 1px solid var(--wui-color-accent-100);
  }

  @media (hover: hover) and (pointer: fine) {
    button:hover:enabled {
      background-color: var(--wui-color-fg-250);
    }

    button:active:enabled {
      background-color: var(--wui-color-fg-225);
    }
  }
`;var dne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let NC=class extends Te{constructor(){super(...arguments),this.icon="copy"}render(){return K`
      <button>
        <wui-icon color="inherit" size="xxs" name=${this.icon}></wui-icon>
      </button>
    `}};NC.styles=[Et,Sn,COe];dne([ne()],NC.prototype,"icon",void 0);NC=dne([Ce("wui-input-element")],NC);const SOe=De`
  :host {
    position: relative;
    display: inline-block;
  }

  input {
    width: 50px;
    height: 50px;
    background: var(--wui-color-gray-glass-010);
    border-radius: var(--wui-border-radius-xs);
    border: 1px solid var(--wui-color-gray-glass-005);
    font-family: var(--wui-font-family);
    font-size: var(--wui-font-size-large);
    font-weight: var(--wui-font-weight-regular);
    letter-spacing: var(--wui-letter-spacing-large);
    text-align: center;
    color: var(--wui-color-fg-100);
    caret-color: var(--wui-color-accent-100);
    transition:
      background-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
      border-color var(--wui-ease-inout-power-1) var(--wui-duration-md),
      box-shadow var(--wui-ease-inout-power-1) var(--wui-duration-md);
    will-change: background-color, border-color, box-shadow;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    padding: 0px;
  }

  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  input[type='number'] {
    -moz-appearance: textfield;
  }

  input:disabled {
    cursor: not-allowed;
    border: 1px solid var(--wui-color-gray-glass-010);
    background: var(--wui-color-gray-glass-005);
  }

  input:focus:enabled {
    background-color: var(--wui-color-gray-glass-015);
    border: 1px solid var(--wui-color-accent-100);
    -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
    -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
    box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
  }

  @media (hover: hover) and (pointer: fine) {
    input:hover:enabled {
      background-color: var(--wui-color-gray-glass-015);
    }
  }
`;var s$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let ix=class extends Te{constructor(){super(...arguments),this.disabled=!1,this.value=""}render(){return K`<input
      type="number"
      maxlength="1"
      inputmode="numeric"
      autofocus
      ?disabled=${this.disabled}
      value=${this.value}
    /> `}};ix.styles=[Et,Sn,SOe];s$([ne({type:Boolean})],ix.prototype,"disabled",void 0);s$([ne({type:String})],ix.prototype,"value",void 0);ix=s$([Ce("wui-input-numeric")],ix);const TOe=De`
  button {
    padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);
    border-radius: var(--wui-border-radius-3xs);
    background-color: transparent;
    color: var(--wui-color-accent-100);
  }

  button:disabled {
    background-color: transparent;
    color: var(--wui-color-gray-glass-015);
  }

  button:hover {
    background-color: var(--wui-color-gray-glass-005);
  }
`;var o$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let sx=class extends Te{constructor(){super(...arguments),this.disabled=!1,this.color="inherit"}render(){return K`
      <button ?disabled=${this.disabled} ontouchstart>
        <slot name="iconLeft"></slot>
        <wui-text variant="small-600" color=${this.color}>
          <slot></slot>
        </wui-text>
        <slot name="iconRight"></slot>
      </button>
    `}};sx.styles=[Et,Sn,TOe];o$([ne({type:Boolean})],sx.prototype,"disabled",void 0);o$([ne()],sx.prototype,"color",void 0);sx=o$([Ce("wui-link")],sx);const IOe=De`
  button {
    column-gap: var(--wui-spacing-s);
    padding: 11px 18px 11px var(--wui-spacing-s);
    width: 100%;
    background-color: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-xs);
    color: var(--wui-color-fg-250);
    transition:
      color var(--wui-ease-out-power-1) var(--wui-duration-md),
      background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
    will-change: color, background-color;
  }

  button[data-iconvariant='square'],
  button[data-iconvariant='square-blue'] {
    padding: 6px 18px 6px 9px;
  }

  button > wui-flex {
    flex: 1;
  }

  button > wui-image {
    width: 32px;
    height: 32px;
    box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
    border-radius: var(--wui-border-radius-3xl);
  }

  button > wui-icon {
    width: 36px;
    height: 36px;
    transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
    will-change: opacity;
  }

  button > wui-icon-box[data-variant='blue'] {
    box-shadow: 0 0 0 2px var(--wui-color-accent-glass-005);
  }

  button > wui-icon-box[data-variant='overlay'] {
    box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
  }

  button > wui-icon-box[data-variant='square-blue'] {
    border-radius: var(--wui-border-radius-3xs);
    position: relative;
    border: none;
    width: 36px;
    height: 36px;
  }

  button > wui-icon-box[data-variant='square-blue']::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: inherit;
    border: 1px solid var(--wui-color-accent-glass-010);
    pointer-events: none;
  }

  button > wui-icon:last-child {
    width: 14px;
    height: 14px;
  }

  button:disabled {
    color: var(--wui-color-gray-glass-020);
  }

  button[data-loading='true'] > wui-icon {
    opacity: 0;
  }

  wui-loading-spinner {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
  }
`;var Bd=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let vl=class extends Te{constructor(){super(...arguments),this.variant="icon",this.disabled=!1,this.imageSrc=void 0,this.alt=void 0,this.chevron=!1,this.loading=!1}render(){return K`
      <button
        ?disabled=${this.loading?!0:!!this.disabled}
        data-loading=${this.loading}
        data-iconvariant=${gt(this.iconVariant)}
        ontouchstart
      >
        ${this.loadingTemplate()} ${this.visualTemplate()}
        <wui-flex gap="3xs">
          <slot></slot>
        </wui-flex>
        ${this.chevronTemplate()}
      </button>
    `}visualTemplate(){if(this.variant==="image"&&this.imageSrc)return K`<wui-image src=${this.imageSrc} alt=${this.alt??"list item"}></wui-image>`;if(this.iconVariant==="square"&&this.icon&&this.variant==="icon")return K`<wui-icon name=${this.icon}></wui-icon>`;if(this.variant==="icon"&&this.icon&&this.iconVariant){const e=["blue","square-blue"].includes(this.iconVariant)?"accent-100":"fg-200",n=this.iconVariant==="square-blue"?"mdl":"md",r=this.iconSize?this.iconSize:n;return K`
        <wui-icon-box
          data-variant=${this.iconVariant}
          icon=${this.icon}
          iconSize=${r}
          background="transparent"
          iconColor=${e}
          backgroundColor=${e}
          size=${n}
        ></wui-icon-box>
      `}return null}loadingTemplate(){return this.loading?K`<wui-loading-spinner color="fg-300"></wui-loading-spinner>`:K``}chevronTemplate(){return this.chevron?K`<wui-icon size="inherit" color="fg-200" name="chevronRight"></wui-icon>`:null}};vl.styles=[Et,Sn,IOe];Bd([ne()],vl.prototype,"icon",void 0);Bd([ne()],vl.prototype,"iconSize",void 0);Bd([ne()],vl.prototype,"variant",void 0);Bd([ne()],vl.prototype,"iconVariant",void 0);Bd([ne({type:Boolean})],vl.prototype,"disabled",void 0);Bd([ne()],vl.prototype,"imageSrc",void 0);Bd([ne()],vl.prototype,"alt",void 0);Bd([ne({type:Boolean})],vl.prototype,"chevron",void 0);Bd([ne({type:Boolean})],vl.prototype,"loading",void 0);vl=Bd([Ce("wui-list-item")],vl);var BP;(function(t){t.approve="approved",t.bought="bought",t.borrow="borrowed",t.burn="burnt",t.cancel="canceled",t.claim="claimed",t.deploy="deployed",t.deposit="deposited",t.execute="executed",t.mint="minted",t.receive="received",t.repay="repaid",t.send="sent",t.sell="sold",t.stake="staked",t.trade="swapped",t.unstake="unstaked",t.withdraw="withdrawn"})(BP||(BP={}));const kOe=De`
  :host > wui-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 40px;
    height: 40px;
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
    background-color: var(--wui-color-gray-glass-005);
  }

  :host > wui-flex wui-image {
    display: block;
  }

  :host > wui-flex,
  :host > wui-flex wui-image,
  .swap-images-container,
  .swap-images-container.nft,
  wui-image.nft {
    border-top-left-radius: var(--local-left-border-radius);
    border-top-right-radius: var(--local-right-border-radius);
    border-bottom-left-radius: var(--local-left-border-radius);
    border-bottom-right-radius: var(--local-right-border-radius);
  }

  wui-icon {
    width: 20px;
    height: 20px;
  }

  wui-icon-box {
    position: absolute;
    right: 0;
    bottom: 0;
    transform: translate(20%, 20%);
  }

  .swap-images-container {
    position: relative;
    width: 40px;
    height: 40px;
    overflow: hidden;
  }

  .swap-images-container wui-image:first-child {
    position: absolute;
    width: 40px;
    height: 40px;
    top: 0;
    left: 0%;
    clip-path: inset(0px calc(50% + 2px) 0px 0%);
  }

  .swap-images-container wui-image:last-child {
    clip-path: inset(0px 0px 0px calc(50% + 2px));
  }
`;var k1=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let wh=class extends Te{constructor(){super(...arguments),this.images=[],this.secondImage={type:void 0,url:""}}render(){const[e,n]=this.images,r=(e==null?void 0:e.type)==="NFT",i=n!=null&&n.url?n.type==="NFT":r,s=r?"var(--wui-border-radius-xxs)":"var(--wui-border-radius-s)",o=i?"var(--wui-border-radius-xxs)":"var(--wui-border-radius-s)";return this.style.cssText=`
    --local-left-border-radius: ${s};
    --local-right-border-radius: ${o};
    `,K`<wui-flex> ${this.templateVisual()} ${this.templateIcon()} </wui-flex>`}templateVisual(){const[e,n]=this.images,r=e==null?void 0:e.type;return this.images.length===2&&(e!=null&&e.url||n!=null&&n.url)?K`<div class="swap-images-container">
        ${e!=null&&e.url?K`<wui-image src=${e.url} alt="Transaction image"></wui-image>`:null}
        ${n!=null&&n.url?K`<wui-image src=${n.url} alt="Transaction image"></wui-image>`:null}
      </div>`:e!=null&&e.url?K`<wui-image src=${e.url} alt="Transaction image"></wui-image>`:r==="NFT"?K`<wui-icon size="inherit" color="fg-200" name="nftPlaceholder"></wui-icon>`:K`<wui-icon size="inherit" color="fg-200" name="coinPlaceholder"></wui-icon>`}templateIcon(){let e="accent-100",n;return n=this.getIcon(),this.status&&(e=this.getStatusColor()),n?K`
      <wui-icon-box
        size="xxs"
        iconColor=${e}
        backgroundColor=${e}
        background="opaque"
        icon=${n}
        ?border=${!0}
        borderColor="wui-color-bg-125"
      ></wui-icon-box>
    `:null}getDirectionIcon(){switch(this.direction){case"in":return"arrowBottom";case"out":return"arrowTop";default:return}}getIcon(){return this.onlyDirectionIcon?this.getDirectionIcon():this.type==="trade"?"swapHorizontalBold":this.type==="approve"?"checkmark":this.type==="cancel"?"close":this.getDirectionIcon()}getStatusColor(){switch(this.status){case"confirmed":return"success-100";case"failed":return"error-100";case"pending":return"inverse-100";default:return"accent-100"}}};wh.styles=[kOe];k1([ne()],wh.prototype,"type",void 0);k1([ne()],wh.prototype,"status",void 0);k1([ne()],wh.prototype,"direction",void 0);k1([ne({type:Boolean})],wh.prototype,"onlyDirectionIcon",void 0);k1([ne({type:Array})],wh.prototype,"images",void 0);k1([ne({type:Object})],wh.prototype,"secondImage",void 0);wh=k1([Ce("wui-transaction-visual")],wh);const ROe=De`
  :host > wui-flex:first-child {
    align-items: center;
    column-gap: var(--wui-spacing-s);
    padding: 6.5px var(--wui-spacing-xs) 6.5px var(--wui-spacing-xs);
    width: 100%;
  }

  :host > wui-flex:first-child wui-text:nth-child(1) {
    text-transform: capitalize;
  }

  wui-transaction-visual {
    width: 40px;
    height: 40px;
  }

  wui-flex {
    flex: 1;
  }

  :host wui-flex wui-flex {
    overflow: hidden;
  }

  :host .description-container wui-text span {
    word-break: break-all;
  }

  :host .description-container wui-text {
    overflow: hidden;
  }

  :host .description-separator-icon {
    margin: 0px 6px;
  }

  :host wui-text > span {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }
`;var bu=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let ic=class extends Te{constructor(){super(...arguments),this.type="approve",this.onlyDirectionIcon=!1,this.images=[],this.price=[],this.amount=[],this.symbol=[]}render(){return K`
      <wui-flex>
        <wui-transaction-visual
          .status=${this.status}
          direction=${gt(this.direction)}
          type=${this.type}
          onlyDirectionIcon=${gt(this.onlyDirectionIcon)}
          .images=${this.images}
        ></wui-transaction-visual>
        <wui-flex flexDirection="column" gap="3xs">
          <wui-text variant="paragraph-600" color="fg-100">
            ${BP[this.type]||this.type}
          </wui-text>
          <wui-flex class="description-container">
            ${this.templateDescription()} ${this.templateSecondDescription()}
          </wui-flex>
        </wui-flex>
        <wui-text variant="micro-700" color="fg-300"><span>${this.date}</span></wui-text>
      </wui-flex>
    `}templateDescription(){var n;const e=(n=this.descriptions)==null?void 0:n[0];return e?K`
          <wui-text variant="small-500" color="fg-200">
            <span>${e}</span>
          </wui-text>
        `:null}templateSecondDescription(){var n;const e=(n=this.descriptions)==null?void 0:n[1];return e?K`
          <wui-icon class="description-separator-icon" size="xxs" name="arrowRight"></wui-icon>
          <wui-text variant="small-400" color="fg-200">
            <span>${e}</span>
          </wui-text>
        `:null}};ic.styles=[Et,ROe];bu([ne()],ic.prototype,"type",void 0);bu([ne({type:Array})],ic.prototype,"descriptions",void 0);bu([ne()],ic.prototype,"date",void 0);bu([ne({type:Boolean})],ic.prototype,"onlyDirectionIcon",void 0);bu([ne()],ic.prototype,"status",void 0);bu([ne()],ic.prototype,"direction",void 0);bu([ne({type:Array})],ic.prototype,"images",void 0);bu([ne({type:Array})],ic.prototype,"price",void 0);bu([ne({type:Array})],ic.prototype,"amount",void 0);bu([ne({type:Array})],ic.prototype,"symbol",void 0);ic=bu([Ce("wui-transaction-list-item")],ic);const NOe=De`
  :host > wui-flex:first-child {
    column-gap: var(--wui-spacing-s);
    padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);
    width: 100%;
  }

  wui-flex {
    display: flex;
    flex: 1;
  }
`;var POe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let $P=class extends Te{render(){return K`
      <wui-flex alignItems="center">
        <wui-shimmer width="40px" height="40px"></wui-shimmer>
        <wui-flex flexDirection="column" gap="2xs">
          <wui-shimmer width="72px" height="16px" borderRadius="4xs"></wui-shimmer>
          <wui-shimmer width="148px" height="14px" borderRadius="4xs"></wui-shimmer>
        </wui-flex>
        <wui-shimmer width="24px" height="12px" borderRadius="5xs"></wui-shimmer>
      </wui-flex>
    `}};$P.styles=[Et,NOe];$P=POe([Ce("wui-transaction-list-item-loader")],$P);const OOe=De`
  :host {
    display: flex;
    justify-content: center;
    align-items: center;
    height: var(--wui-spacing-m);
    padding: 0 var(--wui-spacing-3xs) !important;
    border-radius: var(--wui-border-radius-5xs);
  }

  :host > wui-text {
    transform: translateY(5%);
  }

  :host([data-variant='main']) {
    background-color: var(--wui-color-accent-glass-015);
    color: var(--wui-color-accent-100);
  }

  :host([data-variant='shade']) {
    background-color: var(--wui-color-gray-glass-010);
    color: var(--wui-color-fg-200);
  }

  :host([data-variant='success']) {
    background-color: var(--wui-icon-box-bg-success-100);
    color: var(--wui-color-success-100);
  }

  :host([data-variant='error']) {
    background-color: var(--wui-icon-box-bg-error-100);
    color: var(--wui-color-error-100);
  }

  :host([data-size='lg']) {
    padding: 11px 5px !important;
  }

  :host([data-size='lg']) > wui-text {
    transform: translateY(2%);
  }
`;var a$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let ox=class extends Te{constructor(){super(...arguments),this.variant="main",this.size="lg"}render(){this.dataset.variant=this.variant,this.dataset.size=this.size;const e=this.size==="md"?"mini-700":"micro-700";return K`
      <wui-text data-variant=${this.variant} variant=${e} color="inherit">
        <slot></slot>
      </wui-text>
    `}};ox.styles=[Et,OOe];a$([ne()],ox.prototype,"variant",void 0);a$([ne()],ox.prototype,"size",void 0);ox=a$([Ce("wui-tag")],ox);const DOe=De`
  button {
    column-gap: var(--wui-spacing-s);
    padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);
    width: 100%;
    background-color: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-xs);
    color: var(--wui-color-fg-100);
  }

  button > wui-text:nth-child(2) {
    display: flex;
    flex: 1;
  }

  button:disabled {
    background-color: var(--wui-color-gray-glass-015);
    color: var(--wui-color-gray-glass-015);
  }

  button:disabled > wui-tag {
    background-color: var(--wui-color-gray-glass-010);
    color: var(--wui-color-fg-300);
  }

  wui-icon {
    color: var(--wui-color-fg-200) !important;
  }
`;var xu=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let sc=class extends Te{constructor(){super(...arguments),this.walletImages=[],this.imageSrc="",this.name="",this.installed=!1,this.disabled=!1,this.showAllWallets=!1}render(){return K`
      <button ?disabled=${this.disabled} ontouchstart>
        ${this.templateAllWallets()} ${this.templateWalletImage()}
        <wui-text variant="paragraph-500" color="inherit">${this.name}</wui-text>
        ${this.templateStatus()}
      </button>
    `}templateAllWallets(){return this.showAllWallets&&this.imageSrc?K` <wui-all-wallets-image .imageeSrc=${this.imageSrc}> </wui-all-wallets-image> `:this.showAllWallets&&this.walletIcon?K` <wui-wallet-image .walletIcon=${this.walletIcon} size="sm"> </wui-wallet-image> `:null}templateWalletImage(){return!this.showAllWallets&&this.imageSrc?K`<wui-wallet-image
        size="sm"
        imageSrc=${this.imageSrc}
        name=${this.name}
        .installed=${this.installed}
      ></wui-wallet-image>`:!this.showAllWallets&&!this.imageSrc?K`<wui-wallet-image size="sm" name=${this.name}></wui-wallet-image>`:null}templateStatus(){return this.tagLabel&&this.tagVariant?K`<wui-tag variant=${this.tagVariant}>${this.tagLabel}</wui-tag>`:this.icon?K`<wui-icon color="inherit" size="sm" name=${this.icon}></wui-icon>`:null}};sc.styles=[Et,Sn,DOe];xu([ne({type:Array})],sc.prototype,"walletImages",void 0);xu([ne()],sc.prototype,"imageSrc",void 0);xu([ne()],sc.prototype,"name",void 0);xu([ne()],sc.prototype,"tagLabel",void 0);xu([ne()],sc.prototype,"tagVariant",void 0);xu([ne()],sc.prototype,"icon",void 0);xu([ne()],sc.prototype,"walletIcon",void 0);xu([ne({type:Boolean})],sc.prototype,"installed",void 0);xu([ne({type:Boolean})],sc.prototype,"disabled",void 0);xu([ne({type:Boolean})],sc.prototype,"showAllWallets",void 0);sc=xu([Ce("wui-list-wallet")],sc);const MOe=De`
  :host {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--wui-border-radius-3xl);
    border: 1px solid var(--wui-color-gray-glass-005);
    overflow: hidden;
  }

  wui-icon {
    width: 100%;
    height: 100%;
  }
`;var fne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let PC=class extends Te{constructor(){super(...arguments),this.logo="google"}render(){return K`<wui-icon color="inherit" size="inherit" name=${this.logo}></wui-icon> `}};PC.styles=[Et,MOe];fne([ne()],PC.prototype,"logo",void 0);PC=fne([Ce("wui-logo")],PC);const BOe=De`
  :host {
    display: block;
    width: 100%;
  }

  button {
    width: 100%;
    height: 56px;
    background: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-xs);
  }
`;var c$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let ax=class extends Te{constructor(){super(...arguments),this.logo="google",this.disabled=!1}render(){return K`
      <button ?disabled=${this.disabled} ontouchstart>
        <wui-logo logo=${this.logo}></wui-logo>
      </button>
    `}};ax.styles=[Et,Sn,BOe];c$([ne()],ax.prototype,"logo",void 0);c$([ne({type:Boolean})],ax.prototype,"disabled",void 0);ax=c$([Ce("wui-logo-select")],ax);const $Oe=De`
  :host {
    display: block;
  }

  button {
    border-radius: var(--wui-border-radius-3xl);
    display: flex;
    gap: var(--wui-spacing-xs);
    padding: var(--wui-spacing-2xs) var(--wui-spacing-s) var(--wui-spacing-2xs)
      var(--wui-spacing-xs);
    border: 1px solid var(--wui-color-gray-glass-010);
    background-color: var(--wui-color-gray-glass-005);
    color: var(--wui-color-fg-100);
  }

  button:disabled {
    border: 1px solid var(--wui-color-gray-glass-005);
    background-color: var(--wui-color-gray-glass-015);
    color: var(--wui-color-gray-glass-015);
  }

  @media (hover: hover) and (pointer: fine) {
    button:hover:enabled {
      background-color: var(--wui-color-gray-glass-010);
    }

    button:active:enabled {
      background-color: var(--wui-color-gray-glass-015);
    }
  }

  wui-image,
  wui-icon-box {
    border-radius: var(--wui-border-radius-3xl);
    width: 24px;
    height: 24px;
    box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
  }
`;var u9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Tv=class extends Te{constructor(){super(...arguments),this.imageSrc=void 0,this.isUnsupportedChain=void 0,this.disabled=!1}render(){return K`
      <button ?disabled=${this.disabled}>
        ${this.visualTemplate()}
        <wui-text variant="paragraph-600" color="inherit">
          <slot></slot>
        </wui-text>
      </button>
    `}visualTemplate(){return this.isUnsupportedChain?K`
        <wui-icon-box
          size="sm"
          iconColor="error-100"
          backgroundColor="error-100"
          icon="warningCircle"
        ></wui-icon-box>
      `:this.imageSrc?K`<wui-image src=${this.imageSrc}></wui-image>`:K`
      <wui-icon-box
        size="sm"
        iconColor="inverse-100"
        backgroundColor="fg-100"
        icon="networkPlaceholder"
      ></wui-icon-box>
    `}};Tv.styles=[Et,Sn,$Oe];u9([ne()],Tv.prototype,"imageSrc",void 0);u9([ne({type:Boolean})],Tv.prototype,"isUnsupportedChain",void 0);u9([ne({type:Boolean})],Tv.prototype,"disabled",void 0);Tv=u9([Ce("wui-network-button")],Tv);const jOe=De`
  :host {
    position: relative;
    display: block;
  }
`;var d9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Iv=class extends Te{constructor(){super(...arguments),this.length=6,this.otp="",this.values=Array.from({length:this.length}).map(()=>""),this.numerics=[],this.shouldInputBeEnabled=e=>this.values.slice(0,e).every(r=>r!==""),this.handleKeyDown=(e,n)=>{const r=e.target,i=this.getInputElement(r),s=["ArrowLeft","ArrowRight","Shift","Delete"];if(!i)return;s.includes(e.key)&&e.preventDefault();const o=i.selectionStart;switch(e.key){case"ArrowLeft":o&&i.setSelectionRange(o+1,o+1),this.focusInputField("prev",n);break;case"ArrowRight":this.focusInputField("next",n);break;case"Shift":this.focusInputField("next",n);break;case"Delete":i.value===""?this.focusInputField("prev",n):this.updateInput(i,n,"");break;case"Backspace":i.value===""?this.focusInputField("prev",n):this.updateInput(i,n,"");break}},this.focusInputField=(e,n)=>{if(e==="next"){const r=n+1;if(!this.shouldInputBeEnabled(r))return;const i=this.numerics[r<this.length?r:n],s=i?this.getInputElement(i):void 0;s&&(s.disabled=!1,s.focus())}if(e==="prev"){const r=n-1,i=this.numerics[r>-1?r:n],s=i?this.getInputElement(i):void 0;s&&s.focus()}}}firstUpdated(){var n,r;this.otp&&(this.values=this.otp.split(""));const e=(n=this.shadowRoot)==null?void 0:n.querySelectorAll("wui-input-numeric");e&&(this.numerics=Array.from(e)),(r=this.numerics[0])==null||r.focus()}render(){return K`
      <wui-flex gap="xxs" data-testid="wui-otp-input">
        ${Array.from({length:this.length}).map((e,n)=>K`
            <wui-input-numeric
              @input=${r=>this.handleInput(r,n)}
              @click=${r=>this.selectInput(r)}
              @keydown=${r=>this.handleKeyDown(r,n)}
              .disabled=${!this.shouldInputBeEnabled(n)}
              .value=${this.values[n]||""}
            >
            </wui-input-numeric>
          `)}
      </wui-flex>
    `}updateInput(e,n,r){const i=this.numerics[n],s=e||(i?this.getInputElement(i):void 0);s&&(s.value=r,this.values=this.values.map((o,a)=>a===n?r:o))}selectInput(e){const n=e.target;if(n){const r=this.getInputElement(n);r==null||r.select()}}handleInput(e,n){const r=e.target,i=this.getInputElement(r);if(i){const s=i.value;e.inputType==="insertFromPaste"?this.handlePaste(i,s,n):qt.isNumber(s)&&e.data?(this.updateInput(i,n,e.data),this.focusInputField("next",n)):this.updateInput(i,n,"")}this.dispatchInputChangeEvent()}handlePaste(e,n,r){const i=n[0];if(i&&qt.isNumber(i)){this.updateInput(e,r,i);const o=n.substring(1);if(r+1<this.length&&o.length){const a=this.numerics[r+1],c=a?this.getInputElement(a):void 0;c&&this.handlePaste(c,o,r+1)}else this.focusInputField("next",r)}else this.updateInput(e,r,"")}getInputElement(e){var n;return(n=e.shadowRoot)!=null&&n.querySelector("input")?e.shadowRoot.querySelector("input"):null}dispatchInputChangeEvent(){const e=this.values.join("");this.dispatchEvent(new CustomEvent("inputChange",{detail:e,bubbles:!0,composed:!0}))}};Iv.styles=[Et,jOe];d9([ne({type:Number})],Iv.prototype,"length",void 0);d9([ne({type:String})],Iv.prototype,"otp",void 0);d9([pe()],Iv.prototype,"values",void 0);Iv=d9([Ce("wui-otp")],Iv);var Q6={},LOe=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},hne={},wc={};let l$;const UOe=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];wc.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};wc.getSymbolTotalCodewords=function(e){return UOe[e]};wc.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};wc.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');l$=e};wc.isKanjiModeEnabled=function(){return typeof l$<"u"};wc.toSJIS=function(e){return l$(e)};var f9={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},t.from=function(r,i){if(t.isValid(r))return r;try{return e(r)}catch{return i}}})(f9);function pne(){this.buffer=[],this.length=0}pne.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n<e;n++)this.putBit((t>>>e-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var FOe=pne;function Z6(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}Z6.prototype.set=function(t,e,n,r){const i=t*this.size+e;this.data[i]=n,r&&(this.reservedBit[i]=!0)};Z6.prototype.get=function(t,e){return this.data[t*this.size+e]};Z6.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};Z6.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var zOe=Z6,mne={};(function(t){const e=wc.getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];const i=Math.floor(r/7)+2,s=e(r),o=s===145?26:Math.ceil((s-13)/(2*i-2))*2,a=[s-7];for(let c=1;c<i-1;c++)a[c]=a[c-1]-o;return a.push(6),a.reverse()},t.getPositions=function(r){const i=[],s=t.getRowColCoords(r),o=s.length;for(let a=0;a<o;a++)for(let c=0;c<o;c++)a===0&&c===0||a===0&&c===o-1||a===o-1&&c===0||i.push([s[a],s[c]]);return i}})(mne);var gne={};const HOe=wc.getSymbolSize,iq=7;gne.getPositions=function(e){const n=HOe(e);return[[0,0],[n-iq,0],[0,n-iq]]};var wne={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},t.from=function(i){return t.isValid(i)?parseInt(i,10):void 0},t.getPenaltyN1=function(i){const s=i.size;let o=0,a=0,c=0,l=null,u=null;for(let d=0;d<s;d++){a=c=0,l=u=null;for(let h=0;h<s;h++){let g=i.get(d,h);g===l?a++:(a>=5&&(o+=e.N1+(a-5)),l=g,a=1),g=i.get(h,d),g===u?c++:(c>=5&&(o+=e.N1+(c-5)),u=g,c=1)}a>=5&&(o+=e.N1+(a-5)),c>=5&&(o+=e.N1+(c-5))}return o},t.getPenaltyN2=function(i){const s=i.size;let o=0;for(let a=0;a<s-1;a++)for(let c=0;c<s-1;c++){const l=i.get(a,c)+i.get(a,c+1)+i.get(a+1,c)+i.get(a+1,c+1);(l===4||l===0)&&o++}return o*e.N2},t.getPenaltyN3=function(i){const s=i.size;let o=0,a=0,c=0;for(let l=0;l<s;l++){a=c=0;for(let u=0;u<s;u++)a=a<<1&2047|i.get(l,u),u>=10&&(a===1488||a===93)&&o++,c=c<<1&2047|i.get(u,l),u>=10&&(c===1488||c===93)&&o++}return o*e.N3},t.getPenaltyN4=function(i){let s=0;const o=i.data.length;for(let c=0;c<o;c++)s+=i.data[c];return Math.abs(Math.ceil(s*100/o/5)-10)*e.N4};function n(r,i,s){switch(r){case t.Patterns.PATTERN000:return(i+s)%2===0;case t.Patterns.PATTERN001:return i%2===0;case t.Patterns.PATTERN010:return s%3===0;case t.Patterns.PATTERN011:return(i+s)%3===0;case t.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(s/3))%2===0;case t.Patterns.PATTERN101:return i*s%2+i*s%3===0;case t.Patterns.PATTERN110:return(i*s%2+i*s%3)%2===0;case t.Patterns.PATTERN111:return(i*s%3+(i+s)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}t.applyMask=function(i,s){const o=s.size;for(let a=0;a<o;a++)for(let c=0;c<o;c++)s.isReserved(c,a)||s.xor(c,a,n(i,c,a))},t.getBestMask=function(i,s){const o=Object.keys(t.Patterns).length;let a=0,c=1/0;for(let l=0;l<o;l++){s(l),t.applyMask(l,i);const u=t.getPenaltyN1(i)+t.getPenaltyN2(i)+t.getPenaltyN3(i)+t.getPenaltyN4(i);t.applyMask(l,i),u<c&&(c=u,a=l)}return a}})(wne);var h9={};const Vp=f9,fA=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],hA=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];h9.getBlocksCount=function(e,n){switch(n){case Vp.L:return fA[(e-1)*4+0];case Vp.M:return fA[(e-1)*4+1];case Vp.Q:return fA[(e-1)*4+2];case Vp.H:return fA[(e-1)*4+3];default:return}};h9.getTotalCodewordsCount=function(e,n){switch(n){case Vp.L:return hA[(e-1)*4+0];case Vp.M:return hA[(e-1)*4+1];case Vp.Q:return hA[(e-1)*4+2];case Vp.H:return hA[(e-1)*4+3];default:return}};var yne={},p9={};const j3=new Uint8Array(512),OC=new Uint8Array(256);(function(){let e=1;for(let n=0;n<255;n++)j3[n]=e,OC[e]=n,e<<=1,e&256&&(e^=285);for(let n=255;n<512;n++)j3[n]=j3[n-255]})();p9.log=function(e){if(e<1)throw new Error("log("+e+")");return OC[e]};p9.exp=function(e){return j3[e]};p9.mul=function(e,n){return e===0||n===0?0:j3[OC[e]+OC[n]]};(function(t){const e=p9;t.mul=function(r,i){const s=new Uint8Array(r.length+i.length-1);for(let o=0;o<r.length;o++)for(let a=0;a<i.length;a++)s[o+a]^=e.mul(r[o],i[a]);return s},t.mod=function(r,i){let s=new Uint8Array(r);for(;s.length-i.length>=0;){const o=s[0];for(let c=0;c<i.length;c++)s[c]^=e.mul(i[c],o);let a=0;for(;a<s.length&&s[a]===0;)a++;s=s.slice(a)}return s},t.generateECPolynomial=function(r){let i=new Uint8Array([1]);for(let s=0;s<r;s++)i=t.mul(i,new Uint8Array([1,e.exp(s)]));return i}})(yne);const vne=yne;function u$(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}u$.prototype.initialize=function(e){this.degree=e,this.genPoly=vne.generateECPolynomial(this.degree)};u$.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(e.length+this.degree);n.set(e);const r=vne.mod(n,this.genPoly),i=this.degree-r.length;if(i>0){const s=new Uint8Array(this.degree);return s.set(r,i),s}return r};var WOe=u$,bne={},H0={},d$={};d$.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var $d={};const xne="[0-9]+",VOe="[A-Z $%*+\\-./:]+";let cx="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";cx=cx.replace(/u/g,"\\u");const qOe="(?:(?![A-Z0-9 $%*+\\-./:]|"+cx+`)(?:.|[\r
]))+`;$d.KANJI=new RegExp(cx,"g");$d.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");$d.BYTE=new RegExp(qOe,"g");$d.NUMERIC=new RegExp(xne,"g");$d.ALPHANUMERIC=new RegExp(VOe,"g");const GOe=new RegExp("^"+cx+"$"),KOe=new RegExp("^"+xne+"$"),YOe=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");$d.testKanji=function(e){return GOe.test(e)};$d.testNumeric=function(e){return KOe.test(e)};$d.testAlphanumeric=function(e){return YOe.test(e)};(function(t){const e=d$,n=$d;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(s,o){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?s.ccBits[0]:o<27?s.ccBits[1]:s.ccBits[2]},t.getBestModeForData=function(s){return n.testNumeric(s)?t.NUMERIC:n.testAlphanumeric(s)?t.ALPHANUMERIC:n.testKanji(s)?t.KANJI:t.BYTE},t.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},t.isValid=function(s){return s&&s.bit&&s.ccBits};function r(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+i)}}t.from=function(s,o){if(t.isValid(s))return s;try{return r(s)}catch{return o}}})(H0);(function(t){const e=wc,n=h9,r=f9,i=H0,s=d$,o=7973,a=e.getBCHDigit(o);function c(h,g,w){for(let v=1;v<=40;v++)if(g<=t.getCapacity(v,w,h))return v}function l(h,g){return i.getCharCountIndicator(h,g)+4}function u(h,g){let w=0;return h.forEach(function(v){const _=l(v.mode,g);w+=_+v.getBitsLength()}),w}function d(h,g){for(let w=1;w<=40;w++)if(u(h,w)<=t.getCapacity(w,g,i.MIXED))return w}t.from=function(g,w){return s.isValid(g)?parseInt(g,10):w},t.getCapacity=function(g,w,v){if(!s.isValid(g))throw new Error("Invalid QR Code version");typeof v>"u"&&(v=i.BYTE);const _=e.getSymbolTotalCodewords(g),T=n.getTotalCodewordsCount(g,w),b=(_-T)*8;if(v===i.MIXED)return b;const k=b-l(v,g);switch(v){case i.NUMERIC:return Math.floor(k/10*3);case i.ALPHANUMERIC:return Math.floor(k/11*2);case i.KANJI:return Math.floor(k/13);case i.BYTE:default:return Math.floor(k/8)}},t.getBestVersionForData=function(g,w){let v;const _=r.from(w,r.M);if(Array.isArray(g)){if(g.length>1)return d(g,_);if(g.length===0)return 1;v=g[0]}else v=g;return c(v.mode,v.getLength(),_)},t.getEncodedBits=function(g){if(!s.isValid(g)||g<7)throw new Error("Invalid QR Code version");let w=g<<12;for(;e.getBCHDigit(w)-a>=0;)w^=o<<e.getBCHDigit(w)-a;return g<<12|w}})(bne);var _ne={};const jP=wc,Ane=1335,QOe=21522,sq=jP.getBCHDigit(Ane);_ne.getEncodedBits=function(e,n){const r=e.bit<<3|n;let i=r<<10;for(;jP.getBCHDigit(i)-sq>=0;)i^=Ane<<jP.getBCHDigit(i)-sq;return(r<<10|i)^QOe};var Ene={};const ZOe=H0;function kv(t){this.mode=ZOe.NUMERIC,this.data=t.toString()}kv.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};kv.prototype.getLength=function(){return this.data.length};kv.prototype.getBitsLength=function(){return kv.getBitsLength(this.data.length)};kv.prototype.write=function(e){let n,r,i;for(n=0;n+3<=this.data.length;n+=3)r=this.data.substr(n,3),i=parseInt(r,10),e.put(i,10);const s=this.data.length-n;s>0&&(r=this.data.substr(n),i=parseInt(r,10),e.put(i,s*3+1))};var JOe=kv;const XOe=H0,Pk=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Rv(t){this.mode=XOe.ALPHANUMERIC,this.data=t}Rv.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Rv.prototype.getLength=function(){return this.data.length};Rv.prototype.getBitsLength=function(){return Rv.getBitsLength(this.data.length)};Rv.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let r=Pk.indexOf(this.data[n])*45;r+=Pk.indexOf(this.data[n+1]),e.put(r,11)}this.data.length%2&&e.put(Pk.indexOf(this.data[n]),6)};var eDe=Rv,tDe=function(e){for(var n=[],r=e.length,i=0;i<r;i++){var s=e.charCodeAt(i);if(s>=55296&&s<=56319&&r>i+1){var o=e.charCodeAt(i+1);o>=56320&&o<=57343&&(s=(s-55296)*1024+o-56320+65536,i+=1)}if(s<128){n.push(s);continue}if(s<2048){n.push(s>>6|192),n.push(s&63|128);continue}if(s<55296||s>=57344&&s<65536){n.push(s>>12|224),n.push(s>>6&63|128),n.push(s&63|128);continue}if(s>=65536&&s<=1114111){n.push(s>>18|240),n.push(s>>12&63|128),n.push(s>>6&63|128),n.push(s&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer};const nDe=tDe,rDe=H0;function Nv(t){this.mode=rDe.BYTE,typeof t=="string"&&(t=nDe(t)),this.data=new Uint8Array(t)}Nv.getBitsLength=function(e){return e*8};Nv.prototype.getLength=function(){return this.data.length};Nv.prototype.getBitsLength=function(){return Nv.getBitsLength(this.data.length)};Nv.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)};var iDe=Nv;const sDe=H0,oDe=wc;function Pv(t){this.mode=sDe.KANJI,this.data=t}Pv.getBitsLength=function(e){return e*13};Pv.prototype.getLength=function(){return this.data.length};Pv.prototype.getBitsLength=function(){return Pv.getBitsLength(this.data.length)};Pv.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=oDe.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};var aDe=Pv,Cne={exports:{}};(function(t){var e={single_source_shortest_paths:function(n,r,i){var s={},o={};o[r]=0;var a=e.PriorityQueue.make();a.push(r,0);for(var c,l,u,d,h,g,w,v,_;!a.empty();){c=a.pop(),l=c.value,d=c.cost,h=n[l]||{};for(u in h)h.hasOwnProperty(u)&&(g=h[u],w=d+g,v=o[u],_=typeof o[u]>"u",(_||v>w)&&(o[u]=w,a.push(u,w),s[u]=l))}if(typeof i<"u"&&typeof o[i]>"u"){var T=["Could not find a path from ",r," to ",i,"."].join("");throw new Error(T)}return s},extract_shortest_path_from_predecessor_list:function(n,r){for(var i=[],s=r;s;)i.push(s),n[s],s=n[s];return i.reverse(),i},find_path:function(n,r,i){var s=e.single_source_shortest_paths(n,r,i);return e.extract_shortest_path_from_predecessor_list(s,i)},PriorityQueue:{make:function(n){var r=e.PriorityQueue,i={},s;n=n||{};for(s in r)r.hasOwnProperty(s)&&(i[s]=r[s]);return i.queue=[],i.sorter=n.sorter||r.default_sorter,i},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var i={value:n,cost:r};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(Cne);var cDe=Cne.exports;(function(t){const e=H0,n=JOe,r=eDe,i=iDe,s=aDe,o=$d,a=wc,c=cDe;function l(T){return unescape(encodeURIComponent(T)).length}function u(T,b,k){const D=[];let O;for(;(O=T.exec(k))!==null;)D.push({data:O[0],index:O.index,mode:b,length:O[0].length});return D}function d(T){const b=u(o.NUMERIC,e.NUMERIC,T),k=u(o.ALPHANUMERIC,e.ALPHANUMERIC,T);let D,O;return a.isKanjiModeEnabled()?(D=u(o.BYTE,e.BYTE,T),O=u(o.KANJI,e.KANJI,T)):(D=u(o.BYTE_KANJI,e.BYTE,T),O=[]),b.concat(k,D,O).sort(function(C,A){return C.index-A.index}).map(function(C){return{data:C.data,mode:C.mode,length:C.length}})}function h(T,b){switch(b){case e.NUMERIC:return n.getBitsLength(T);case e.ALPHANUMERIC:return r.getBitsLength(T);case e.KANJI:return s.getBitsLength(T);case e.BYTE:return i.getBitsLength(T)}}function g(T){return T.reduce(function(b,k){const D=b.length-1>=0?b[b.length-1]:null;return D&&D.mode===k.mode?(b[b.length-1].data+=k.data,b):(b.push(k),b)},[])}function w(T){const b=[];for(let k=0;k<T.length;k++){const D=T[k];switch(D.mode){case e.NUMERIC:b.push([D,{data:D.data,mode:e.ALPHANUMERIC,length:D.length},{data:D.data,mode:e.BYTE,length:D.length}]);break;case e.ALPHANUMERIC:b.push([D,{data:D.data,mode:e.BYTE,length:D.length}]);break;case e.KANJI:b.push([D,{data:D.data,mode:e.BYTE,length:l(D.data)}]);break;case e.BYTE:b.push([{data:D.data,mode:e.BYTE,length:l(D.data)}])}}return b}function v(T,b){const k={},D={start:{}};let O=["start"];for(let $=0;$<T.length;$++){const C=T[$],A=[];for(let H=0;H<C.length;H++){const V=C[H],Y=""+$+H;A.push(Y),k[Y]={node:V,lastCount:0},D[Y]={};for(let ee=0;ee<O.length;ee++){const x=O[ee];k[x]&&k[x].node.mode===V.mode?(D[x][Y]=h(k[x].lastCount+V.length,V.mode)-h(k[x].lastCount,V.mode),k[x].lastCount+=V.length):(k[x]&&(k[x].lastCount=V.length),D[x][Y]=h(V.length,V.mode)+4+e.getCharCountIndicator(V.mode,b))}}O=A}for(let $=0;$<O.length;$++)D[O[$]].end=0;return{map:D,table:k}}function _(T,b){let k;const D=e.getBestModeForData(T);if(k=e.from(b,D),k!==e.BYTE&&k.bit<D.bit)throw new Error('"'+T+'" cannot be encoded with mode '+e.toString(k)+`.
 Suggested mode is: `+e.toString(D));switch(k===e.KANJI&&!a.isKanjiModeEnabled()&&(k=e.BYTE),k){case e.NUMERIC:return new n(T);case e.ALPHANUMERIC:return new r(T);case e.KANJI:return new s(T);case e.BYTE:return new i(T)}}t.fromArray=function(b){return b.reduce(function(k,D){return typeof D=="string"?k.push(_(D,null)):D.data&&k.push(_(D.data,D.mode)),k},[])},t.fromString=function(b,k){const D=d(b,a.isKanjiModeEnabled()),O=w(D),$=v(O,k),C=c.find_path($.map,"start","end"),A=[];for(let H=1;H<C.length-1;H++)A.push($.table[C[H]].node);return t.fromArray(g(A))},t.rawSplit=function(b){return t.fromArray(d(b,a.isKanjiModeEnabled()))}})(Ene);const m9=wc,Ok=f9,lDe=FOe,uDe=zOe,dDe=mne,fDe=gne,LP=wne,UP=h9,hDe=WOe,DC=bne,pDe=_ne,mDe=H0,Dk=Ene;function gDe(t,e){const n=t.size,r=fDe.getPositions(e);for(let i=0;i<r.length;i++){const s=r[i][0],o=r[i][1];for(let a=-1;a<=7;a++)if(!(s+a<=-1||n<=s+a))for(let c=-1;c<=7;c++)o+c<=-1||n<=o+c||(a>=0&&a<=6&&(c===0||c===6)||c>=0&&c<=6&&(a===0||a===6)||a>=2&&a<=4&&c>=2&&c<=4?t.set(s+a,o+c,!0,!0):t.set(s+a,o+c,!1,!0))}}function wDe(t){const e=t.size;for(let n=8;n<e-8;n++){const r=n%2===0;t.set(n,6,r,!0),t.set(6,n,r,!0)}}function yDe(t,e){const n=dDe.getPositions(e);for(let r=0;r<n.length;r++){const i=n[r][0],s=n[r][1];for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++)o===-2||o===2||a===-2||a===2||o===0&&a===0?t.set(i+o,s+a,!0,!0):t.set(i+o,s+a,!1,!0)}}function vDe(t,e){const n=t.size,r=DC.getEncodedBits(e);let i,s,o;for(let a=0;a<18;a++)i=Math.floor(a/3),s=a%3+n-8-3,o=(r>>a&1)===1,t.set(i,s,o,!0),t.set(s,i,o,!0)}function Mk(t,e,n){const r=t.size,i=pDe.getEncodedBits(e,n);let s,o;for(s=0;s<15;s++)o=(i>>s&1)===1,s<6?t.set(s,8,o,!0):s<8?t.set(s+1,8,o,!0):t.set(r-15+s,8,o,!0),s<8?t.set(8,r-s-1,o,!0):s<9?t.set(8,15-s-1+1,o,!0):t.set(8,15-s-1,o,!0);t.set(r-8,8,1,!0)}function bDe(t,e){const n=t.size;let r=-1,i=n-1,s=7,o=0;for(let a=n-1;a>0;a-=2)for(a===6&&a--;;){for(let c=0;c<2;c++)if(!t.isReserved(i,a-c)){let l=!1;o<e.length&&(l=(e[o]>>>s&1)===1),t.set(i,a-c,l),s--,s===-1&&(o++,s=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function xDe(t,e,n){const r=new lDe;n.forEach(function(c){r.put(c.mode.bit,4),r.put(c.getLength(),mDe.getCharCountIndicator(c.mode,t)),c.write(r)});const i=m9.getSymbolTotalCodewords(t),s=UP.getTotalCodewordsCount(t,e),o=(i-s)*8;for(r.getLengthInBits()+4<=o&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const a=(o-r.getLengthInBits())/8;for(let c=0;c<a;c++)r.put(c%2?17:236,8);return _De(r,t,e)}function _De(t,e,n){const r=m9.getSymbolTotalCodewords(e),i=UP.getTotalCodewordsCount(e,n),s=r-i,o=UP.getBlocksCount(e,n),a=r%o,c=o-a,l=Math.floor(r/o),u=Math.floor(s/o),d=u+1,h=l-u,g=new hDe(h);let w=0;const v=new Array(o),_=new Array(o);let T=0;const b=new Uint8Array(t.buffer);for(let C=0;C<o;C++){const A=C<c?u:d;v[C]=b.slice(w,w+A),_[C]=g.encode(v[C]),w+=A,T=Math.max(T,A)}const k=new Uint8Array(r);let D=0,O,$;for(O=0;O<T;O++)for($=0;$<o;$++)O<v[$].length&&(k[D++]=v[$][O]);for(O=0;O<h;O++)for($=0;$<o;$++)k[D++]=_[$][O];return k}function ADe(t,e,n,r){let i;if(Array.isArray(t))i=Dk.fromArray(t);else if(typeof t=="string"){let l=e;if(!l){const u=Dk.rawSplit(t);l=DC.getBestVersionForData(u,n)}i=Dk.fromString(t,l||40)}else throw new Error("Invalid data");const s=DC.getBestVersionForData(i,n);if(!s)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=s;else if(e<s)throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+s+`.
`);const o=xDe(e,n,i),a=m9.getSymbolSize(e),c=new uDe(a);return gDe(c,e),wDe(c),yDe(c,e),Mk(c,n,0),e>=7&&vDe(c,e),bDe(c,o),isNaN(r)&&(r=LP.getBestMask(c,Mk.bind(null,c,n))),LP.applyMask(r,c),Mk(c,n,r),{modules:c,version:e,errorCorrectionLevel:n,maskPattern:r,segments:i}}hne.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let r=Ok.M,i,s;return typeof n<"u"&&(r=Ok.from(n.errorCorrectionLevel,Ok.M),i=DC.from(n.version),s=LP.from(n.maskPattern),n.toSJISFunc&&m9.setToSJISFunction(n.toSJISFunc)),ADe(e,i,r,s)};var Sne={},f$={};(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(s){return[s,s]}))),r.length===6&&r.push("F","F");const i=parseInt(r.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});const i=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,s=r.width&&r.width>=21?r.width:void 0,o=r.scale||4;return{width:s,scale:s?4:o,margin:i,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,i){return i.width&&i.width>=r+i.margin*2?i.width/(r+i.margin*2):i.scale},t.getImageWidth=function(r,i){const s=t.getScale(r,i);return Math.floor((r+i.margin*2)*s)},t.qrToImageData=function(r,i,s){const o=i.modules.size,a=i.modules.data,c=t.getScale(o,s),l=Math.floor((o+s.margin*2)*c),u=s.margin*c,d=[s.color.light,s.color.dark];for(let h=0;h<l;h++)for(let g=0;g<l;g++){let w=(h*l+g)*4,v=s.color.light;if(h>=u&&g>=u&&h<l-u&&g<l-u){const _=Math.floor((h-u)/c),T=Math.floor((g-u)/c);v=d[a[_*o+T]?1:0]}r[w++]=v.r,r[w++]=v.g,r[w++]=v.b,r[w]=v.a}}})(f$);(function(t){const e=f$;function n(i,s,o){i.clearRect(0,0,s.width,s.height),s.style||(s.style={}),s.height=o,s.width=o,s.style.height=o+"px",s.style.width=o+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(s,o,a){let c=a,l=o;typeof c>"u"&&(!o||!o.getContext)&&(c=o,o=void 0),o||(l=r()),c=e.getOptions(c);const u=e.getImageWidth(s.modules.size,c),d=l.getContext("2d"),h=d.createImageData(u,u);return e.qrToImageData(h.data,s,c),n(d,l,u),d.putImageData(h,0,0),l},t.renderToDataURL=function(s,o,a){let c=a;typeof c>"u"&&(!o||!o.getContext)&&(c=o,o=void 0),c||(c={});const l=t.render(s,o,c),u=c.type||"image/png",d=c.rendererOpts||{};return l.toDataURL(u,d.quality)}})(Sne);var Tne={};const EDe=f$;function oq(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function Bk(t,e,n){let r=t+e;return typeof n<"u"&&(r+=" "+n),r}function CDe(t,e,n){let r="",i=0,s=!1,o=0;for(let a=0;a<t.length;a++){const c=Math.floor(a%e),l=Math.floor(a/e);!c&&!s&&(s=!0),t[a]?(o++,a>0&&c>0&&t[a-1]||(r+=s?Bk("M",c+n,.5+l+n):Bk("m",i,0),i=0,s=!1),c+1<e&&t[a+1]||(r+=Bk("h",o),o=0)):i++}return r}Tne.render=function(e,n,r){const i=EDe.getOptions(n),s=e.modules.size,o=e.modules.data,a=s+i.margin*2,c=i.color.light.a?"<path "+oq(i.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",l="<path "+oq(i.color.dark,"stroke")+' d="'+CDe(o,s,i.margin)+'"/>',u='viewBox="0 0 '+a+" "+a+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(i.width?'width="'+i.width+'" height="'+i.width+'" ':"")+u+' shape-rendering="crispEdges">'+c+l+`</svg>
`;return typeof r=="function"&&r(null,h),h};const SDe=LOe,FP=hne,Ine=Sne,TDe=Tne;function h$(t,e,n,r,i){const s=[].slice.call(arguments,1),o=s.length,a=typeof s[o-1]=="function";if(!a&&!SDe())throw new Error("Callback required as last argument");if(a){if(o<2)throw new Error("Too few arguments provided");o===2?(i=n,n=e,e=r=void 0):o===3&&(e.getContext&&typeof i>"u"?(i=r,r=void 0):(i=r,r=n,n=e,e=void 0))}else{if(o<1)throw new Error("Too few arguments provided");return o===1?(n=e,e=r=void 0):o===2&&!e.getContext&&(r=n,n=e,e=void 0),new Promise(function(c,l){try{const u=FP.create(n,r);c(t(u,e,r))}catch(u){l(u)}})}try{const c=FP.create(n,r);i(null,t(c,e,r))}catch(c){i(c)}}Q6.create=FP.create;Q6.toCanvas=h$.bind(null,Ine.render);Q6.toDataURL=h$.bind(null,Ine.renderToDataURL);Q6.toString=h$.bind(null,function(t,e,n){return TDe.render(t,n)});const IDe=.1,aq=2.5,bf=7;function $k(t,e,n){return t===e?!1:(t-e<0?e-t:t-e)<=n+IDe}function kDe(t,e){const n=Array.prototype.slice.call(Q6.create(t,{errorCorrectionLevel:e}).modules.data,0),r=Math.sqrt(n.length);return n.reduce((i,s,o)=>(o%r===0?i.push([s]):i[i.length-1].push(s))&&i,[])}const RDe={generate(t,e,n){const r="#141414",i="transparent",o=[],a=kDe(t,"Q"),c=e/a.length,l=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];l.forEach(({x:v,y:_})=>{const T=(a.length-bf)*c*v,b=(a.length-bf)*c*_,k=.45;for(let D=0;D<l.length;D+=1){const O=c*(bf-D*2);o.push(Ze`
            <rect
              fill=${D===2?r:i}
              width=${D===0?O-5:O}
              rx= ${D===0?(O-5)*k:O*k}
              ry= ${D===0?(O-5)*k:O*k}
              stroke=${r}
              stroke-width=${D===0?5:0}
              height=${D===0?O-5:O}
              x= ${D===0?b+c*D+5/2:b+c*D}
              y= ${D===0?T+c*D+5/2:T+c*D}
            />
          `)}});const u=Math.floor((n+25)/c),d=a.length/2-u/2,h=a.length/2+u/2-1,g=[];a.forEach((v,_)=>{v.forEach((T,b)=>{if(a[_][b]&&!(_<bf&&b<bf||_>a.length-(bf+1)&&b<bf||_<bf&&b>a.length-(bf+1))&&!(_>d&&_<h&&b>d&&b<h)){const k=_*c+c/2,D=b*c+c/2;g.push([k,D])}})});const w={};return g.forEach(([v,_])=>{var T;w[v]?(T=w[v])==null||T.push(_):w[v]=[_]}),Object.entries(w).map(([v,_])=>{const T=_.filter(b=>_.every(k=>!$k(b,k,c)));return[Number(v),T]}).forEach(([v,_])=>{_.forEach(T=>{o.push(Ze`<circle cx=${v} cy=${T} fill=${r} r=${c/aq} />`)})}),Object.entries(w).filter(([v,_])=>_.length>1).map(([v,_])=>{const T=_.filter(b=>_.some(k=>$k(b,k,c)));return[Number(v),T]}).map(([v,_])=>{_.sort((b,k)=>b<k?-1:1);const T=[];for(const b of _){const k=T.find(D=>D.some(O=>$k(b,O,c)));k?k.push(b):T.push([b])}return[v,T.map(b=>[b[0],b[b.length-1]])]}).forEach(([v,_])=>{_.forEach(([T,b])=>{o.push(Ze`
              <line
                x1=${v}
                x2=${v}
                y1=${T}
                y2=${b}
                stroke=${r}
                stroke-width=${c/(aq/2)}
                stroke-linecap="round"
              />
            `)})}),o}},NDe=De`
  :host {
    position: relative;
    user-select: none;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    width: var(--local-size);
  }

  :host([data-theme='dark']) {
    border-radius: clamp(0px, var(--wui-border-radius-l), 40px);
    background-color: var(--wui-color-inverse-100);
    padding: var(--wui-spacing-l);
  }

  :host([data-theme='light']) {
    box-shadow: 0 0 0 1px var(--wui-color-bg-125);
    background-color: var(--wui-color-bg-125);
  }

  :host([data-clear='true']) > wui-icon {
    display: none;
  }

  svg:first-child,
  wui-image,
  wui-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateY(-50%) translateX(-50%);
  }

  wui-image {
    width: 25%;
    height: 25%;
    border-radius: var(--wui-border-radius-xs);
  }

  wui-icon {
    width: 100%;
    height: 100%;
    color: #3396ff !important;
    transform: translateY(-50%) translateX(-50%) scale(0.25);
  }
`;var W0=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let gd=class extends Te{constructor(){super(...arguments),this.uri="",this.size=0,this.theme="dark",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0,this.farcaster=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),this.style.cssText=`--local-size: ${this.size}px`,K`${this.templateVisual()} ${this.templateSvg()}`}templateSvg(){const e=this.theme==="light"?this.size:this.size-32;return Ze`
      <svg height=${e} width=${e}>
        ${RDe.generate(this.uri,e,this.arenaClear?0:e/4)}
      </svg>
    `}templateVisual(){return this.imageSrc?K`<wui-image src=${this.imageSrc} alt=${this.alt??"logo"}></wui-image>`:this.farcaster?K`<wui-icon
        class="farcaster"
        size="inherit"
        color="inherit"
        name="farcaster"
      ></wui-icon>`:K`<wui-icon size="inherit" color="inherit" name="walletConnect"></wui-icon>`}};gd.styles=[Et,NDe];W0([ne()],gd.prototype,"uri",void 0);W0([ne({type:Number})],gd.prototype,"size",void 0);W0([ne()],gd.prototype,"theme",void 0);W0([ne()],gd.prototype,"imageSrc",void 0);W0([ne()],gd.prototype,"alt",void 0);W0([ne({type:Boolean})],gd.prototype,"arenaClear",void 0);W0([ne({type:Boolean})],gd.prototype,"farcaster",void 0);gd=W0([Ce("wui-qr-code")],gd);const PDe=De`
  :host {
    position: relative;
    display: inline-block;
    width: 100%;
  }
`;var ODe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let zP=class extends Te{constructor(){super(...arguments),this.inputComponentRef=A0()}render(){return K`
      <wui-input-text
        ${E0(this.inputComponentRef)}
        placeholder="Search wallet"
        icon="search"
        type="search"
        enterKeyHint="search"
        size="sm"
      >
        <wui-input-element @click=${this.clearValue} icon="close"></wui-input-element>
      </wui-input-text>
    `}clearValue(){const e=this.inputComponentRef.value,n=e==null?void 0:e.inputElementRef.value;n&&(n.value="",n.focus(),n.dispatchEvent(new Event("input")))}};zP.styles=[Et,PDe];zP=ODe([Ce("wui-search-bar")],zP);const DDe=De`
  :host {
    display: flex;
    column-gap: var(--wui-spacing-xs);
    align-items: center;
    padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs);
    border-radius: var(--wui-border-radius-3xl);
    border: 1px solid var(--wui-color-gray-glass-005);
    box-sizing: border-box;
    max-height: 40px;
    background-color: var(--wui-color-bg-175);
    box-shadow:
      0px 14px 64px -4px rgba(0, 0, 0, 0.15),
      0px 8px 22px -6px rgba(0, 0, 0, 0.15);
  }

  :host wui-loading-spinner {
    margin-left: var(--wui-spacing-3xs);
  }
`;var Mb=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let C0=class extends Te{constructor(){super(...arguments),this.backgroundColor="accent-100",this.iconColor="accent-100",this.icon="checkmark",this.message="",this.loading=!1}render(){return K`
      ${this.loading?K`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:K`<wui-icon-box
            size="sm"
            iconSize="xs"
            iconColor=${this.iconColor}
            backgroundColor=${this.backgroundColor}
            icon=${this.icon}
            background="opaque"
          ></wui-icon-box>`}
      <wui-text variant="paragraph-500" color="fg-100">${this.message}</wui-text>
    `}};C0.styles=[Et,DDe];Mb([ne()],C0.prototype,"backgroundColor",void 0);Mb([ne()],C0.prototype,"iconColor",void 0);Mb([ne()],C0.prototype,"icon",void 0);Mb([ne()],C0.prototype,"message",void 0);Mb([ne()],C0.prototype,"loading",void 0);C0=Mb([Ce("wui-snackbar")],C0);const MDe=De`
  :host {
    display: inline-flex;
    background-color: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-3xl);
    padding: var(--wui-spacing-3xs);
    position: relative;
    height: 36px;
    min-height: 36px;
    overflow: hidden;
  }

  :host::before {
    content: '';
    position: absolute;
    pointer-events: none;
    top: 4px;
    left: 4px;
    display: block;
    width: var(--local-tab-width);
    height: 28px;
    border-radius: var(--wui-border-radius-3xl);
    background-color: var(--wui-color-gray-glass-002);
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
    transform: translateX(calc(var(--local-tab) * var(--local-tab-width)));
    transition: transform var(--wui-ease-out-power-1) var(--wui-duration-md);
    will-change: background-color, opacity;
  }

  :host([data-type='flex'])::before {
    left: 3px;
    transform: translateX(calc((var(--local-tab) * 34px) + (var(--local-tab) * 4px)));
  }

  :host([data-type='flex']) {
    display: flex;
    padding: 0px 0px 0px 12px;
    gap: 4px;
  }

  :host([data-type='flex']) > button > wui-text {
    position: absolute;
    left: 18px;
    opacity: 0;
  }

  button[data-active='true'] > wui-icon,
  button[data-active='true'] > wui-text {
    color: var(--wui-color-fg-100);
  }

  button[data-active='false'] > wui-icon,
  button[data-active='false'] > wui-text {
    color: var(--wui-color-fg-200);
  }

  button[data-active='true']:disabled,
  button[data-active='false']:disabled {
    background-color: transparent;
    opacity: 0.5;
    cursor: not-allowed;
  }

  button[data-active='true']:disabled > wui-text {
    color: var(--wui-color-fg-200);
  }

  button[data-active='false']:disabled > wui-text {
    color: var(--wui-color-fg-300);
  }

  button > wui-icon,
  button > wui-text {
    pointer-events: none;
    transition: color var(--wui-e ase-out-power-1) var(--wui-duration-md);
    will-change: color;
  }

  button {
    width: var(--local-tab-width);
    transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
    will-change: background-color;
  }

  :host([data-type='flex']) > button {
    width: 34px;
    position: relative;
    display: flex;
    justify-content: flex-start;
  }

  button:hover:enabled,
  button:active:enabled {
    background-color: transparent !important;
  }

  button:hover:enabled > wui-icon,
  button:active:enabled > wui-icon {
    transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg);
    color: var(--wui-color-fg-125);
  }

  button:hover:enabled > wui-text,
  button:active:enabled > wui-text {
    transition: all var(--wui-ease-out-power-1) var(--wui-duration-lg);
    color: var(--wui-color-fg-125);
  }

  button {
    border-radius: var(--wui-border-radius-3xl);
  }
`;var V0=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let wd=class extends Te{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.buttons=[],this.disabled=!1,this.localTabWidth="100px",this.activeTab=0,this.isDense=!1}render(){return this.isDense=this.tabs.length>3,this.style.cssText=`
      --local-tab: ${this.activeTab};
      --local-tab-width: ${this.localTabWidth};
    `,this.dataset.type=this.isDense?"flex":"block",this.tabs.map((e,n)=>{var i;const r=n===this.activeTab;return K`
        <button
          ?disabled=${this.disabled}
          @click=${()=>this.onTabClick(n)}
          data-active=${r}
          data-testid="tab-${(i=e.label)==null?void 0:i.toLowerCase()}"
        >
          ${this.iconTemplate(e)}
          <wui-text variant="small-600" color="inherit"> ${e.label} </wui-text>
        </button>
      `})}firstUpdated(){this.shadowRoot&&this.isDense&&(this.buttons=[...this.shadowRoot.querySelectorAll("button")],setTimeout(()=>{this.animateTabs(0,!0)},0))}iconTemplate(e){return e.icon?K`<wui-icon size="xs" color="inherit" name=${e.icon}></wui-icon>`:null}onTabClick(e){this.buttons&&this.animateTabs(e,!1),this.activeTab=e,this.onTabChange(e)}animateTabs(e,n){const r=this.buttons[this.activeTab],i=this.buttons[e],s=r==null?void 0:r.querySelector("wui-text"),o=i==null?void 0:i.querySelector("wui-text"),a=i==null?void 0:i.getBoundingClientRect(),c=o==null?void 0:o.getBoundingClientRect();r&&s&&!n&&e!==this.activeTab&&(s.animate([{opacity:0}],{duration:50,easing:"ease",fill:"forwards"}),r.animate([{width:"34px"}],{duration:500,easing:"ease",fill:"forwards"})),i&&a&&c&&o&&(e!==this.activeTab||n)&&(this.localTabWidth=`${Math.round(a.width+c.width)+6}px`,i.animate([{width:`${a.width+c.width}px`}],{duration:n?0:500,fill:"forwards",easing:"ease"}),o.animate([{opacity:1}],{duration:n?0:125,delay:n?0:200,fill:"forwards",easing:"ease"}))}};wd.styles=[Et,Sn,MDe];V0([ne({type:Array})],wd.prototype,"tabs",void 0);V0([ne()],wd.prototype,"onTabChange",void 0);V0([ne({type:Array})],wd.prototype,"buttons",void 0);V0([ne({type:Boolean})],wd.prototype,"disabled",void 0);V0([ne()],wd.prototype,"localTabWidth",void 0);V0([pe()],wd.prototype,"activeTab",void 0);V0([pe()],wd.prototype,"isDense",void 0);wd=V0([Ce("wui-tabs")],wd);const BDe=De`
  :host {
    display: block;
  }

  :host > button {
    gap: var(--wui-spacing-xxs);
    padding: var(--wui-spacing-xs);
    padding-right: var(--wui-spacing-1xs);
    height: 40px;
    border-radius: var(--wui-border-radius-l);
    background: var(--wui-color-gray-glass-002);
    border-width: 0px;
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
  }

  :host > button wui-image {
    width: 24px;
    height: 24px;
    border-radius: var(--wui-border-radius-s);
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
  }
`;var p$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let lx=class extends Te{constructor(){super(...arguments),this.text=""}render(){return K`
      <button ontouchstart>
        ${this.tokenTemplate()}
        <wui-text variant="paragraph-600" color="fg-100">${this.text}</wui-text>
      </button>
    `}tokenTemplate(){return this.imageSrc?K`<wui-image src=${this.imageSrc}></wui-image>`:K`
      <wui-icon-box
        size="sm"
        iconColor="fg-200"
        backgroundColor="fg-300"
        icon="networkPlaceholder"
      ></wui-icon-box>
    `}};lx.styles=[Et,Sn,BDe];p$([ne()],lx.prototype,"imageSrc",void 0);p$([ne()],lx.prototype,"text",void 0);lx=p$([Ce("wui-token-button")],lx);const $De=De`
  :host {
    display: block;
    padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s);
    border-radius: var(--wui-border-radius-xxs);

    color: var(--wui-color-bg-100);
    position: relative;
  }

  :host([data-variant='shade']) {
    background-color: var(--wui-color-bg-150);
    border: 1px solid var(--wui-color-gray-glass-005);
  }

  :host([data-variant='shade']) > wui-text {
    color: var(--wui-color-fg-150);
  }

  :host([data-variant='fill']) {
    background-color: var(--wui-color-fg-100);
    border: none;
  }

  wui-icon {
    position: absolute;
    width: 12px !important;
    height: 4px !important;
  }

  wui-icon[data-placement='top'] {
    bottom: 0px;
    left: 50%;
    transform: translate(-50%, 95%);
  }

  wui-icon[data-placement='bottom'] {
    top: 0;
    left: 50%;
    transform: translate(-50%, -95%) rotate(180deg);
  }

  wui-icon[data-placement='right'] {
    top: 50%;
    left: 0;
    transform: translate(-65%, -50%) rotate(90deg);
  }

  wui-icon[data-placement='left'] {
    top: 50%;
    right: 0%;
    transform: translate(65%, -50%) rotate(270deg);
  }
`;var g9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Ov=class extends Te{constructor(){super(...arguments),this.placement="top",this.variant="fill",this.message=""}render(){return this.dataset.variant=this.variant,K`<wui-icon
        data-placement=${this.placement}
        color="fg-100"
        size="inherit"
        name=${this.variant==="fill"?"cursor":"cursorTransparent"}
      ></wui-icon>
      <wui-text color="inherit" variant="small-500">${this.message}</wui-text>`}};Ov.styles=[Et,Sn,$De];g9([ne()],Ov.prototype,"placement",void 0);g9([ne()],Ov.prototype,"variant",void 0);g9([ne()],Ov.prototype,"message",void 0);Ov=g9([Ce("wui-tooltip")],Ov);const jDe=De`
  :host {
    height: 60px;
    min-height: 60px;
  }

  :host > wui-flex {
    cursor: pointer;
    height: 100%;
    display: flex;
    column-gap: var(--wui-spacing-s);
    padding: var(--wui-spacing-xs);
    padding-right: var(--wui-spacing-l);
    width: 100%;
    background-color: transparent;
    border-radius: var(--wui-border-radius-xs);
    color: var(--wui-color-fg-250);
    transition:
      background-color var(--wui-ease-out-power-1) var(--wui-duration-lg),
      opacity var(--wui-ease-out-power-1) var(--wui-duration-lg);
    will-change: background-color, opacity;
  }

  @media (hover: hover) and (pointer: fine) {
    :host > wui-flex:hover {
      background-color: var(--wui-color-gray-glass-002);
    }

    :host > wui-flex:active {
      background-color: var(--wui-color-gray-glass-005);
    }
  }

  :host([disabled]) > wui-flex {
    opacity: 0.6;
  }

  :host([disabled]) > wui-flex:hover {
    background-color: transparent;
  }

  :host > wui-flex > wui-flex {
    flex: 1;
  }

  :host > wui-flex > wui-image,
  :host > wui-flex > .token-item-image-placeholder {
    width: 40px;
    max-width: 40px;
    height: 40px;
    border-radius: var(--wui-border-radius-3xl);
    position: relative;
  }

  :host > wui-flex > .token-item-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  :host > wui-flex > wui-image::after,
  :host > wui-flex > .token-item-image-placeholder::after {
    position: absolute;
    content: '';
    inset: 0;
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
    border-radius: var(--wui-border-radius-l);
  }

  button > wui-icon-box[data-variant='square-blue'] {
    border-radius: var(--wui-border-radius-3xs);
    position: relative;
    border: none;
    width: 36px;
    height: 36px;
  }
`;var q0=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let yd=class extends Te{constructor(){super(),this.observer=new IntersectionObserver(()=>{}),this.imageSrc=void 0,this.name=void 0,this.symbol=void 0,this.price=void 0,this.amount=void 0,this.visible=!1,this.imageError=!1,this.observer=new IntersectionObserver(e=>{e.forEach(n=>{n.isIntersecting?this.visible=!0:this.visible=!1})},{threshold:.1})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){var n;if(!this.visible)return null;const e=this.amount&&this.price?(n=hr.multiply(this.price,this.amount))==null?void 0:n.toFixed(3):null;return K`
      <wui-flex alignItems="center">
        ${this.visualTemplate()}
        <wui-flex flexDirection="column" gap="3xs">
          <wui-flex justifyContent="space-between">
            <wui-text variant="paragraph-500" color="fg-100" lineClamp="1">${this.name}</wui-text>
            ${e?K`
                  <wui-text variant="paragraph-500" color="fg-100">
                    $${qt.formatNumberToLocalString(e,3)}
                  </wui-text>
                `:null}
          </wui-flex>
          <wui-flex justifyContent="space-between">
            <wui-text variant="small-400" color="fg-200" lineClamp="1">${this.symbol}</wui-text>
            ${this.amount?K`<wui-text variant="small-400" color="fg-200">
                  ${qt.formatNumberToLocalString(this.amount,4)}
                </wui-text>`:null}
          </wui-flex>
        </wui-flex>
      </wui-flex>
    `}visualTemplate(){return this.imageError?K`<wui-flex class="token-item-image-placeholder">
        <wui-icon name="image" color="inherit"></wui-icon>
      </wui-flex>`:this.imageSrc?K`<wui-image
        width="40"
        height="40"
        src=${this.imageSrc}
        @onLoadError=${this.imageLoadError}
      ></wui-image>`:null}imageLoadError(){this.imageError=!0}};yd.styles=[Et,Sn,jDe];q0([ne()],yd.prototype,"imageSrc",void 0);q0([ne()],yd.prototype,"name",void 0);q0([ne()],yd.prototype,"symbol",void 0);q0([ne()],yd.prototype,"price",void 0);q0([ne()],yd.prototype,"amount",void 0);q0([pe()],yd.prototype,"visible",void 0);q0([pe()],yd.prototype,"imageError",void 0);yd=q0([Ce("wui-token-list-item")],yd);const LDe=De`
  :host {
    display: flex;
    justify-content: center;
    align-items: center;
    width: var(--wui-icon-box-size-xl);
    height: var(--wui-icon-box-size-xl);
    box-shadow: 0 0 0 8px var(--wui-thumbnail-border);
    border-radius: var(--local-border-radius);
    overflow: hidden;
  }

  wui-icon {
    width: 32px;
    height: 32px;
  }
`;var w9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Dv=class extends Te{render(){return this.style.cssText=`--local-border-radius: ${this.borderRadiusFull?"1000px":"20px"};`,K`${this.templateVisual()}`}templateVisual(){return this.imageSrc?K`<wui-image src=${this.imageSrc} alt=${this.alt??""}></wui-image>`:K`<wui-icon
      data-parent-size="md"
      size="inherit"
      color="inherit"
      name="walletPlaceholder"
    ></wui-icon>`}};Dv.styles=[Et,LDe];w9([ne()],Dv.prototype,"imageSrc",void 0);w9([ne()],Dv.prototype,"alt",void 0);w9([ne({type:Boolean})],Dv.prototype,"borderRadiusFull",void 0);Dv=w9([Ce("wui-visual-thumbnail")],Dv);const UDe=De`
  :host {
    display: block;
  }

  button {
    width: 100%;
    display: block;
    padding-top: var(--wui-spacing-l);
    padding-bottom: var(--wui-spacing-l);
    padding-left: var(--wui-spacing-s);
    padding-right: var(--wui-spacing-2l);
    border-radius: var(--wui-border-radius-s);
    background-color: var(--wui-color-accent-glass-010);
  }

  button:hover {
    background-color: var(--wui-color-accent-glass-015) !important;
  }

  button:active {
    background-color: var(--wui-color-accent-glass-020) !important;
  }
`;var y9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Mv=class extends Te{constructor(){super(...arguments),this.label="",this.description="",this.icon="wallet"}render(){return K`
      <button>
        <wui-flex gap="m" alignItems="center" justifyContent="space-between">
          <wui-icon-box
            size="lg"
            iconcolor="accent-100"
            backgroundcolor="accent-100"
            icon=${this.icon}
            background="transparent"
          ></wui-icon-box>

          <wui-flex flexDirection="column" gap="3xs">
            <wui-text variant="paragraph-500" color="fg-100">${this.label}</wui-text>
            <wui-text variant="small-400" color="fg-200">${this.description}</wui-text>
          </wui-flex>

          <wui-icon size="md" color="fg-200" name="chevronRight"></wui-icon>
        </wui-flex>
      </button>
    `}};Mv.styles=[Et,Sn,UDe];y9([ne()],Mv.prototype,"label",void 0);y9([ne()],Mv.prototype,"description",void 0);y9([ne()],Mv.prototype,"icon",void 0);Mv=y9([Ce("wui-notice-card")],Mv);const FDe=De`
  button {
    height: auto;
    position: relative;
    flex-direction: column;
    gap: var(--wui-spacing-s);
    padding: 17px 18px 17px var(--wui-spacing-m);
    width: 100%;
    background-color: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-xs);
    color: var(--wui-color-fg-250);
  }

  .overflowedContent {
    width: 100%;
    overflow: hidden;
  }

  .overflowedContent[data-active='false']:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, var(--wui-color-bg-150), transparent);
    border-bottom-left-radius: var(--wui-border-radius-xs);
    border-bottom-right-radius: var(--wui-border-radius-xs);
  }

  .heightContent {
    max-height: 100px;
  }

  pre {
    text-align: left;
    white-space: pre-wrap;
    height: auto;
    overflow-x: auto;
    overflow-wrap: anywhere;
  }
`;var m$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const jk=100;let ux=class extends Te{constructor(){super(...arguments),this.textTitle="",this.overflowedContent="",this.toggled=!1,this.enableAccordion=!1,this.scrollElement=void 0,this.scrollHeightElement=0}updated(e){super.updated(e),(e.has("textTitle")||e.has("overflowedContent"))&&setTimeout(()=>{this.checkHeight()},1)}checkHeight(){this.updateComplete.then(()=>{var r,i;const e=(r=this.shadowRoot)==null?void 0:r.querySelector(".heightContent"),n=(i=this.shadowRoot)==null?void 0:i.querySelector(".textContent");if(e&&n){this.scrollElement=e;const s=n==null?void 0:n.scrollHeight;s&&s>jk&&(this.enableAccordion=!0,this.scrollHeightElement=s,this.requestUpdate())}})}render(){return K`
      <button ontouchstart @click=${()=>this.onClick()}>
        <wui-flex justifyContent="space-between" alignItems="center">
          <wui-text variant="paragraph-500" color="fg-100">${this.textTitle}</wui-text>
          ${this.chevronTemplate()}
        </wui-flex>
        <div
          data-active=${this.enableAccordion?!!this.toggled:!0}
          class="overflowedContent"
        >
          <div class="heightContent">
            <wui-text class="textContent" variant="paragraph-400" color="fg-200">
              <pre>${this.overflowedContent}</pre>
            </wui-text>
          </div>
        </div>
      </button>
    `}onClick(){var n;const e=(n=this.shadowRoot)==null?void 0:n.querySelector("wui-icon");this.enableAccordion&&(this.toggled=!this.toggled,this.requestUpdate(),this.scrollElement&&this.scrollElement.animate([{maxHeight:this.toggled?`${jk}px`:`${this.scrollHeightElement}px`},{maxHeight:this.toggled?`${this.scrollHeightElement}px`:`${jk}px`}],{duration:300,fill:"forwards",easing:"ease"}),e&&e.animate([{transform:this.toggled?"rotate(0deg)":"rotate(180deg)"},{transform:this.toggled?"rotate(180deg)":"rotate(0deg)"}],{duration:300,fill:"forwards",easing:"ease"}))}chevronTemplate(){return this.enableAccordion?K` <wui-icon color="fg-100" size="sm" name="chevronBottom"></wui-icon>`:null}};ux.styles=[Et,Sn,FDe];m$([ne()],ux.prototype,"textTitle",void 0);m$([ne()],ux.prototype,"overflowedContent",void 0);ux=m$([Ce("wui-list-accordion")],ux);const zDe=De`
  :host {
    display: flex;
    column-gap: var(--wui-spacing-s);
    padding: 17px 18px 17px var(--wui-spacing-m);
    width: 100%;
    background-color: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-xs);
    color: var(--wui-color-fg-250);
  }

  wui-image {
    width: var(--wui-icon-size-lg);
    height: var(--wui-icon-size-lg);
    border-radius: var(--wui-border-radius-3xl);
  }

  wui-icon {
    width: var(--wui-icon-size-lg);
    height: var(--wui-icon-size-lg);
  }
`;var v9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Bv=class extends Te{constructor(){super(...arguments),this.imageSrc=void 0,this.textTitle="",this.textValue=void 0}render(){return K`
      <wui-flex justifyContent="space-between" alignItems="center">
        <wui-text variant="paragraph-500" color=${this.textValue?"fg-200":"fg-100"}>
          ${this.textTitle}
        </wui-text>
        ${this.templateContent()}
      </wui-flex>
    `}templateContent(){return this.imageSrc?K`<wui-image src=${this.imageSrc} alt=${this.textTitle}></wui-image>`:this.textValue?K` <wui-text variant="paragraph-400" color="fg-100"> ${this.textValue} </wui-text>`:K`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}};Bv.styles=[Et,Sn,zDe];v9([ne()],Bv.prototype,"imageSrc",void 0);v9([ne()],Bv.prototype,"textTitle",void 0);v9([ne()],Bv.prototype,"textValue",void 0);Bv=v9([Ce("wui-list-content")],Bv);const HDe=De`
  button {
    column-gap: var(--wui-spacing-s);
    padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);
    width: 100%;
    background-color: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-xs);
    color: var(--wui-color-fg-100);
  }

  button > wui-text:nth-child(2) {
    display: flex;
    flex: 1;
  }

  button[data-transparent='true'] {
    pointer-events: none;
    background-color: transparent;
  }

  wui-icon {
    color: var(--wui-color-fg-200) !important;
  }

  button:disabled {
    background-color: var(--wui-color-gray-glass-015);
    color: var(--wui-color-gray-glass-015);
  }

  button:disabled > wui-tag {
    background-color: var(--wui-color-gray-glass-010);
    color: var(--wui-color-fg-300);
  }
`;var J6=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Yg=class extends Te{constructor(){super(...arguments),this.imageSrc="",this.name="",this.disabled=!1,this.transparent=!1}render(){return K`
      <button data-transparent=${this.transparent} ?disabled=${this.disabled} ontouchstart>
        ${this.templateNetworkImage()}
        <wui-text variant="paragraph-500" color="inherit">${this.name}</wui-text>
      </button>
    `}templateNetworkImage(){return this.imageSrc?K`<wui-network-image
        size="sm"
        imageSrc=${this.imageSrc}
        name=${this.name}
      ></wui-network-image>`:this.imageSrc?null:K`<wui-network-image size="sm" name=${this.name}></wui-network-image>`}};Yg.styles=[Et,Sn,HDe];J6([ne()],Yg.prototype,"imageSrc",void 0);J6([ne()],Yg.prototype,"name",void 0);J6([ne({type:Boolean})],Yg.prototype,"disabled",void 0);J6([ne({type:Boolean})],Yg.prototype,"transparent",void 0);Yg=J6([Ce("wui-list-network")],Yg);const WDe=De`
  :host {
    display: flex;
    flex-direction: column;
    gap: var(--wui-spacing-l);
    padding: 17px 18px 17px var(--wui-spacing-m);
    width: 100%;
    background-color: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-xs);
    color: var(--wui-color-fg-250);
  }

  wui-image {
    width: var(--wui-icon-size-lg);
    height: var(--wui-icon-size-lg);
    border-radius: var(--wui-border-radius-3xl);
  }

  wui-icon {
    width: var(--wui-icon-size-lg);
    height: var(--wui-icon-size-lg);
  }
`;var Bb=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let S0=class extends Te{constructor(){super(...arguments),this.amount="",this.networkCurreny="",this.networkImageUrl="",this.receiverAddress="",this.addressExplorerUrl=""}render(){return K`
      <wui-flex justifyContent="space-between" alignItems="center">
        <wui-text variant="paragraph-500" color="fg-200">Sending</wui-text>
        <wui-flex gap="xs" alignItems="center">
          <wui-text variant="paragraph-400" color="fg-100">
            ${this.amount} ${this.networkCurreny}
          </wui-text>
          ${this.templateNetworkVisual()}
        </wui-flex>
      </wui-flex>
      <wui-flex justifyContent="space-between" alignItems="center">
        <wui-text variant="paragraph-500" color="fg-200">To</wui-text>
        <wui-chip
          icon="externalLink"
          variant="shadeSmall"
          href=${this.addressExplorerUrl}
          title=${this.receiverAddress}
        ></wui-chip>
      </wui-flex>
    `}templateNetworkVisual(){return this.networkImageUrl?K`<wui-image src=${this.networkImageUrl} alt="Network Image"></wui-image>`:K`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}};S0.styles=[Et,Sn,WDe];Bb([ne()],S0.prototype,"amount",void 0);Bb([ne()],S0.prototype,"networkCurreny",void 0);Bb([ne()],S0.prototype,"networkImageUrl",void 0);Bb([ne()],S0.prototype,"receiverAddress",void 0);Bb([ne()],S0.prototype,"addressExplorerUrl",void 0);S0=Bb([Ce("wui-list-wallet-transaction")],S0);const VDe=De`
  button {
    display: flex;
    gap: var(--wui-spacing-3xs);
    align-items: center;
    padding: 6.25px var(--wui-spacing-xs) 7.25px var(--wui-spacing-s);
    background-color: var(--wui-color-gray-glass-090);
    border-radius: var(--wui-border-radius-3xl);
    border: 1px solid var(--wui-color-gray-glass-060);
    transition: background-color var(--wui-duration-md) var(--wui-ease-inout-power-1);
    will-change: background-color;
  }

  @media (hover: hover) and (pointer: fine) {
    button:hover:enabled {
      background-color: var(--wui-color-gray-glass-080);
    }

    button:active:enabled {
      background-color: var(--wui-color-gray-glass-060);
    }
  }
`;var kne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let MC=class extends Te{constructor(){super(...arguments),this.text=""}render(){return K`<button ontouchstart>
      <wui-text variant="small-600" color="bg-100">${this.text}</wui-text>
      <wui-icon color="bg-100" size="xs" name="arrowRight"></wui-icon>
    </button>`}};MC.styles=[Et,Sn,VDe];kne([ne()],MC.prototype,"text",void 0);MC=kne([Ce("wui-promo")],MC);const qDe=De`
  span {
    font-weight: 500;
    font-size: 40px;
    color: var(--wui-color-fg-100);
    line-height: 130%; /* 52px */
    letter-spacing: -1.6px;
    text-align: center;
  }

  .pennies {
    color: var(--wui-color-fg-200);
  }
`;var g$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let dx=class extends Te{constructor(){super(...arguments),this.dollars="0",this.pennies="00"}render(){return K`<span>$${this.dollars}<span class="pennies">.${this.pennies}</span></span>`}};dx.styles=[Et,qDe];g$([ne()],dx.prototype,"dollars",void 0);g$([ne()],dx.prototype,"pennies",void 0);dx=g$([Ce("wui-balance")],dx);const GDe=De`
  button {
    background-color: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-3xl);
    border: 1px solid var(--wui-color-gray-glass-002);
    padding: var(--wui-spacing-xs) var(--wui-spacing-s) var(--wui-spacing-xs) var(--wui-spacing-xs);
    position: relative;
  }

  wui-avatar {
    width: 32px;
    height: 32px;
    box-shadow: 0 0 0 0;
    outline: 3px solid var(--wui-color-gray-glass-005);
  }

  wui-icon-box,
  wui-image {
    width: 16px;
    height: 16px;
    border-radius: var(--wui-border-radius-3xl);
    position: absolute;
    left: 26px;
    top: 24px;
  }

  wui-image {
    outline: 2px solid var(--wui-color-bg-125);
  }

  wui-icon-box {
    outline: 2px solid var(--wui-color-bg-200);
    background-color: var(--wui-color-bg-250);
  }
`;var $b=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let T0=class extends Te{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.profileName="",this.address="",this.icon="chevronBottom"}render(){return K`<button ontouchstart data-testid="wui-profile-button">
      <wui-flex gap="xs" alignItems="center">
        <wui-avatar
          .imageSrc=${this.avatarSrc}
          alt=${this.address}
          address=${this.address}
        ></wui-avatar>
        ${this.networkImageTemplate()}
        <wui-flex gap="xs" alignItems="center">
          <wui-text variant="large-600" color="fg-100">
            ${qt.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?18:4,charsEnd:this.profileName?0:4,truncate:this.profileName?"end":"middle"})}
          </wui-text>
          <wui-icon size="sm" color="fg-200" name=${this.icon}></wui-icon>
        </wui-flex>
      </wui-flex>
    </button>`}networkImageTemplate(){return this.networkSrc?K`<wui-image src=${this.networkSrc}></wui-image>`:K`
      <wui-icon-box
        size="xxs"
        iconColor="fg-200"
        backgroundColor="bg-100"
        icon="networkPlaceholder"
      ></wui-icon-box>
    `}};T0.styles=[Et,Sn,GDe];$b([ne()],T0.prototype,"networkSrc",void 0);$b([ne()],T0.prototype,"avatarSrc",void 0);$b([ne()],T0.prototype,"profileName",void 0);$b([ne()],T0.prototype,"address",void 0);$b([ne()],T0.prototype,"icon",void 0);T0=$b([Ce("wui-profile-button")],T0);const KDe=De`
  button {
    background-color: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-3xl);
    border: 1px solid var(--wui-color-gray-glass-002);
    padding: var(--wui-spacing-xs) var(--wui-spacing-s) var(--wui-spacing-xs) var(--wui-spacing-xs);
    position: relative;
  }

  wui-avatar {
    width: 32px;
    height: 32px;
    box-shadow: 0 0 0 0;
    outline: 3px solid var(--wui-color-gray-glass-005);
  }

  wui-icon-box,
  wui-image {
    width: 16px;
    height: 16px;
    border-radius: var(--wui-border-radius-3xl);
    position: absolute;
    left: 26px;
    top: 24px;
  }

  wui-image {
    outline: 2px solid var(--wui-color-bg-125);
  }

  wui-icon-box {
    outline: 2px solid var(--wui-color-bg-200);
    background-color: var(--wui-color-bg-250);
  }
`;var R1=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let yh=class extends Te{constructor(){super(...arguments),this.avatarSrc=void 0,this.profileName="",this.address="",this.icon="mail",this.connectedConnector=er.getConnectedConnector(),this.shouldShowIcon=this.connectedConnector==="AUTH"}render(){return K`<button ontouchstart data-testid="wui-profile-button" @click=${this.handleClick}>
      <wui-flex gap="xs" alignItems="center">
        <wui-avatar
          .imageSrc=${this.avatarSrc}
          alt=${this.address}
          address=${this.address}
        ></wui-avatar>
        ${this.shouldShowIcon?this.getIconTemplate(this.icon):""}
        <wui-flex gap="xs" alignItems="center">
          <wui-text variant="large-600" color="fg-100">
            ${qt.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?18:4,charsEnd:this.profileName?0:4,truncate:this.profileName?"end":"middle"})}
          </wui-text>
          <wui-icon size="sm" color="fg-200" name="copy" id="copy-address"></wui-icon>
        </wui-flex>
      </wui-flex>
    </button>`}handleClick(e){var n,r;if(e.target instanceof HTMLElement&&e.target.id==="copy-address"){(n=this.onCopyClick)==null||n.call(this,e);return}(r=this.onProfileClick)==null||r.call(this,e)}getIconTemplate(e){return K`
      <wui-icon-box
        size="xxs"
        iconColor="fg-200"
        backgroundColor="bg-100"
        icon="${e||"networkPlaceholder"}"
      ></wui-icon-box>
    `}};yh.styles=[Et,Sn,KDe];R1([ne()],yh.prototype,"avatarSrc",void 0);R1([ne()],yh.prototype,"profileName",void 0);R1([ne()],yh.prototype,"address",void 0);R1([ne()],yh.prototype,"icon",void 0);R1([ne()],yh.prototype,"onProfileClick",void 0);R1([ne()],yh.prototype,"onCopyClick",void 0);yh=R1([Ce("wui-profile-button-v2")],yh);const YDe=De`
  button {
    border: none;
    border-radius: var(--wui-border-radius-3xl);
  }

  button[data-variant='main'] {
    background-color: var(--wui-color-accent-100);
    color: var(--wui-color-inverse-100);
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
  }

  button[data-variant='accent'] {
    background-color: var(--wui-color-accent-glass-010);
    color: var(--wui-color-accent-100);
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
  }

  button[data-variant='gray'] {
    background-color: transparent;
    color: var(--wui-color-fg-200);
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
  }

  button[data-variant='shade'] {
    background-color: transparent;
    color: var(--wui-color-accent-100);
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
  }

  button[data-size='sm'] {
    height: 32px;
    padding: 0 var(--wui-spacing-s);
  }

  button[data-size='md'] {
    height: 40px;
    padding: 0 var(--wui-spacing-l);
  }

  button[data-size='sm'] > wui-image {
    width: 16px;
    height: 16px;
  }

  button[data-size='md'] > wui-image {
    width: 24px;
    height: 24px;
  }

  button[data-size='sm'] > wui-icon {
    width: 12px;
    height: 12px;
  }

  button[data-size='md'] > wui-icon {
    width: 14px;
    height: 14px;
  }

  wui-image {
    border-radius: var(--wui-border-radius-3xl);
    overflow: hidden;
  }

  button.disabled > wui-icon,
  button.disabled > wui-image {
    filter: grayscale(1);
  }

  button[data-variant='main'] > wui-image {
    box-shadow: inset 0 0 0 1px var(--wui-color-accent-090);
  }

  button[data-variant='shade'] > wui-image,
  button[data-variant='gray'] > wui-image {
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
  }

  @media (hover: hover) and (pointer: fine) {
    button[data-variant='main']:focus-visible {
      background-color: var(--wui-color-accent-090);
    }

    button[data-variant='main']:hover:enabled {
      background-color: var(--wui-color-accent-090);
    }

    button[data-variant='main']:active:enabled {
      background-color: var(--wui-color-accent-080);
    }

    button[data-variant='accent']:hover:enabled {
      background-color: var(--wui-color-accent-glass-015);
    }

    button[data-variant='accent']:active:enabled {
      background-color: var(--wui-color-accent-glass-020);
    }

    button[data-variant='shade']:focus-visible,
    button[data-variant='gray']:focus-visible,
    button[data-variant='shade']:hover,
    button[data-variant='gray']:hover {
      background-color: var(--wui-color-gray-glass-002);
    }

    button[data-variant='gray']:active,
    button[data-variant='shade']:active {
      background-color: var(--wui-color-gray-glass-005);
    }
  }

  button.disabled {
    color: var(--wui-color-gray-glass-020);
    background-color: var(--wui-color-gray-glass-002);
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
    pointer-events: none;
  }
`;var N1=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let vh=class extends Te{constructor(){super(...arguments),this.variant="accent",this.imageSrc="",this.disabled=!1,this.icon="externalLink",this.size="md",this.text=""}render(){const e=this.size==="sm"?"small-600":"paragraph-600";return K`
      <button
        class=${this.disabled?"disabled":""}
        data-variant=${this.variant}
        data-size=${this.size}
      >
        ${this.imageSrc?K`<wui-image src=${this.imageSrc}></wui-image>`:null}
        <wui-text variant=${e} color="inherit"> ${this.text} </wui-text>
        <wui-icon name=${this.icon} color="inherit" size="inherit"></wui-icon>
      </button>
    `}};vh.styles=[Et,Sn,YDe];N1([ne()],vh.prototype,"variant",void 0);N1([ne()],vh.prototype,"imageSrc",void 0);N1([ne({type:Boolean})],vh.prototype,"disabled",void 0);N1([ne()],vh.prototype,"icon",void 0);N1([ne()],vh.prototype,"size",void 0);N1([ne()],vh.prototype,"text",void 0);vh=N1([Ce("wui-chip-button")],vh);const QDe=De`
  button {
    display: flex;
    gap: var(--wui-spacing-xl);
    width: 100%;
    background-color: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-xxs);
    padding: var(--wui-spacing-m) var(--wui-spacing-s);
  }

  wui-text {
    width: 100%;
  }

  wui-flex {
    width: auto;
  }

  .network-icon {
    width: var(--wui-spacing-2l);
    height: var(--wui-spacing-2l);
    border-radius: calc(var(--wui-spacing-2l) / 2);
    overflow: hidden;
    box-shadow:
      0 0 0 3px var(--wui-color-gray-glass-002),
      0 0 0 3px var(--wui-color-modal-bg);
  }
`;var w$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let fx=class extends Te{constructor(){super(...arguments),this.networkImages=[""],this.text=""}render(){return K`
      <button ontouchstart>
        <wui-text variant="small-400" color="fg-200">${this.text}</wui-text>
        <wui-flex gap="3xs" alignItems="center">
          ${this.networksTemplate()}
          <wui-icon name="chevronRight" size="sm" color="fg-200"></wui-icon>
        </wui-flex>
      </button>
    `}networksTemplate(){const e=this.networkImages.slice(0,5);return K` <wui-flex class="networks">
      ${e==null?void 0:e.map(n=>K` <wui-flex class="network-icon"> <wui-image src=${n}></wui-image> </wui-flex>`)}
    </wui-flex>`}};fx.styles=[Et,Sn,QDe];w$([ne({type:Array})],fx.prototype,"networkImages",void 0);w$([ne()],fx.prototype,"text",void 0);fx=w$([Ce("wui-compatible-network")],fx);const ZDe=De`
  wui-flex {
    width: 100%;
    background-color: var(--wui-color-gray-glass-005);
    border-radius: var(--wui-border-radius-s);
    padding: var(--wui-spacing-1xs) var(--wui-spacing-s) var(--wui-spacing-1xs)
      var(--wui-spacing-1xs);
  }
`;var y$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let hx=class extends Te{constructor(){super(...arguments),this.icon="externalLink",this.text=""}render(){return K`
      <wui-flex gap="1xs" alignItems="center">
        <wui-icon-box
          size="sm"
          iconcolor="fg-200"
          backgroundcolor="fg-200"
          icon=${this.icon}
          background="transparent"
        ></wui-icon-box>
        <wui-text variant="small-400" color="fg-200">${this.text}</wui-text>
      </wui-flex>
    `}};hx.styles=[Et,Sn,ZDe];y$([ne()],hx.prototype,"icon",void 0);y$([ne()],hx.prototype,"text",void 0);hx=y$([Ce("wui-banner")],hx);const JDe=De`
  wui-flex {
    width: 100%;
    background-color: var(--wui-color-gray-glass-005);
    border-radius: var(--wui-border-radius-m);
    padding: var(--wui-spacing-1xs) var(--wui-spacing-s) var(--wui-spacing-1xs)
      var(--wui-spacing-1xs);
  }
`;var b9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let $v=class extends Te{constructor(){super(...arguments),this.imageSrc="",this.text="",this.size=""}render(){return K`
      <wui-flex gap="1xs" alignItems="center">
        <wui-avatar size=${this.size} imageSrc=${this.imageSrc}></wui-avatar>
        <wui-text variant="small-400" color="fg-200">${this.text}</wui-text>
      </wui-flex>
    `}};$v.styles=[Et,Sn,JDe];b9([ne()],$v.prototype,"imageSrc",void 0);b9([ne()],$v.prototype,"text",void 0);b9([ne()],$v.prototype,"size",void 0);$v=b9([Ce("wui-banner-img")],$v);const XDe=De`
  button {
    padding: 6.5px var(--wui-spacing-l) 6.5px var(--wui-spacing-xs);
    display: flex;
    justify-content: space-between;
    width: 100%;
    border-radius: var(--wui-border-radius-xs);
    background-color: var(--wui-color-gray-glass-002);
  }

  button[data-clickable='false'] {
    pointer-events: none;
    background-color: transparent;
  }

  wui-image,
  wui-icon {
    width: var(--wui-spacing-3xl);
    height: var(--wui-spacing-3xl);
  }

  wui-image {
    border-radius: var(--wui-border-radius-3xl);
  }
`;var P1=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let bh=class extends Te{constructor(){super(...arguments),this.tokenName="",this.tokenImageUrl="",this.tokenValue=0,this.tokenAmount="0.0",this.tokenCurrency="",this.clickable=!1}render(){return K`
      <button data-clickable=${String(this.clickable)} ontouchstart>
        <wui-flex gap="s" alignItems="center">
          ${this.visualTemplate()}
          <wui-flex flexDirection="column" justifyContent="spaceBetween">
            <wui-text variant="paragraph-500" color="fg-100">${this.tokenName}</wui-text>
            <wui-text variant="small-400" color="fg-200">
              ${qt.formatNumberToLocalString(this.tokenAmount,4)} ${this.tokenCurrency}
            </wui-text>
          </wui-flex>
        </wui-flex>
        <wui-text variant="paragraph-500" color="fg-100">$${this.tokenValue.toFixed(2)}</wui-text>
      </button>
    `}visualTemplate(){return this.tokenName&&this.tokenImageUrl?K`<wui-image alt=${this.tokenName} src=${this.tokenImageUrl}></wui-image>`:K`<wui-icon name="coinPlaceholder" color="fg-100"></wui-icon>`}};bh.styles=[Et,Sn,XDe];P1([ne()],bh.prototype,"tokenName",void 0);P1([ne()],bh.prototype,"tokenImageUrl",void 0);P1([ne({type:Number})],bh.prototype,"tokenValue",void 0);P1([ne()],bh.prototype,"tokenAmount",void 0);P1([ne()],bh.prototype,"tokenCurrency",void 0);P1([ne({type:Boolean})],bh.prototype,"clickable",void 0);bh=P1([Ce("wui-list-token")],bh);const eMe=De`
  button {
    width: 100%;
    display: flex;
    gap: var(--wui-spacing-s);
    align-items: center;
    justify-content: flex-start;
    padding: var(--wui-spacing-s) var(--wui-spacing-m) var(--wui-spacing-s) var(--wui-spacing-s);
    background-color: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-xs);
  }

  wui-icon-box {
    width: var(--wui-spacing-2xl);
    height: var(--wui-spacing-2xl);
  }

  wui-flex {
    width: auto;
  }
`;var G0=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let vd=class extends Te{constructor(){super(...arguments),this.icon="card",this.text="",this.description="",this.tag=void 0,this.iconBackgroundColor="accent-100",this.iconColor="accent-100",this.disabled=!1}render(){return K`
      <button ontouchstart ?disabled=${this.disabled}>
        <wui-icon-box
          iconColor=${this.iconColor}
          backgroundColor=${this.iconBackgroundColor}
          size="inherit"
          icon=${this.icon}
          iconSize="md"
        ></wui-icon-box>
        <wui-flex flexDirection="column" justifyContent="spaceBetween">
          ${this.titleTemplate()}
          <wui-text variant="small-400" color="fg-200"> ${this.description}</wui-text></wui-flex
        >
      </button>
    `}titleTemplate(){return this.tag?K` <wui-flex alignItems="center" gap="xxs"
        ><wui-text variant="paragraph-500" color="fg-100">${this.text}</wui-text
        ><wui-tag tagType="main" size="md">${this.tag}</wui-tag>
      </wui-flex>`:K`<wui-text variant="paragraph-500" color="fg-100">${this.text}</wui-text>`}};vd.styles=[Et,Sn,eMe];G0([ne()],vd.prototype,"icon",void 0);G0([ne()],vd.prototype,"text",void 0);G0([ne()],vd.prototype,"description",void 0);G0([ne()],vd.prototype,"tag",void 0);G0([ne()],vd.prototype,"iconBackgroundColor",void 0);G0([ne()],vd.prototype,"iconColor",void 0);G0([ne({type:Boolean})],vd.prototype,"disabled",void 0);vd=G0([Ce("wui-list-description")],vd);const tMe=De`
  :host {
    position: relative;
    display: inline-block;
  }

  input {
    background: transparent;
    width: 100%;
    height: auto;
    font-family: var(--wui-font-family);
    color: var(--wui-color-fg-100);

    font-feature-settings: 'case' on;
    font-size: 32px;
    font-weight: var(--wui-font-weight-light);
    caret-color: var(--wui-color-accent-100);
    line-height: 130%;
    letter-spacing: -1.28px;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    padding: 0px;
  }

  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  input::placeholder {
    color: var(--wui-color-fg-275);
  }
`,nMe=/[.*+?^${}()|[\]\\]/gu,rMe=/[0-9,.]/u;var x9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let jv=class extends Te{constructor(){super(...arguments),this.inputElementRef=A0(),this.disabled=!1,this.value="",this.placeholder="0"}render(){var e;return(e=this.inputElementRef)!=null&&e.value&&this.value&&(this.inputElementRef.value.value=this.value),K`<input
      ${E0(this.inputElementRef)}
      type="text"
      inputmode="decimal"
      pattern="[0-9,.]*"
      placeholder=${this.placeholder}
      ?disabled=${this.disabled}
      autofocus
      value=${this.value??""}
      @input=${this.dispatchInputChangeEvent.bind(this)}
    /> `}dispatchInputChangeEvent(e){var r,i;const n=e.data;if(n&&((r=this.inputElementRef)!=null&&r.value))if(n===","){const s=this.inputElementRef.value.value.replace(",",".");this.inputElementRef.value.value=s,this.value=`${this.value}${s}`}else rMe.test(n)||(this.inputElementRef.value.value=this.value.replace(new RegExp(n.replace(nMe,"\\$&"),"gu"),""));this.dispatchEvent(new CustomEvent("inputChange",{detail:(i=this.inputElementRef.value)==null?void 0:i.value,bubbles:!0,composed:!0}))}};jv.styles=[Et,Sn,tMe];x9([ne({type:Boolean})],jv.prototype,"disabled",void 0);x9([ne({type:String})],jv.prototype,"value",void 0);x9([ne({type:String})],jv.prototype,"placeholder",void 0);jv=x9([Ce("wui-input-amount")],jv);const iMe=De`
  :host {
    display: flex;
    gap: var(--wui-spacing-xs);
    border-radius: var(--wui-border-radius-3xl);
    border: 1px solid var(--wui-color-gray-glass-002);
    background: var(--wui-color-gray-glass-002);
    padding: var(--wui-spacing-2xs) var(--wui-spacing-xs) var(--wui-spacing-2xs)
      var(--wui-spacing-s);
    align-items: center;
  }

  wui-avatar,
  wui-icon,
  wui-image {
    width: 32px;
    height: 32px;
    border: 1px solid var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-3xl);
    box-shadow: 0 0 0 2px var(--wui-color-gray-glass-002);
  }
`;var X6=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Qg=class extends Te{constructor(){super(...arguments),this.text="",this.address="",this.isAddress=!1}render(){return K`<wui-text variant="large-500" color="fg-100">${this.text}</wui-text>
      ${this.imageTemplate()}`}imageTemplate(){return this.isAddress?K`<wui-avatar address=${this.address} .imageSrc=${this.imageSrc}></wui-avatar>`:this.imageSrc?K`<wui-image src=${this.imageSrc}></wui-image>`:K`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`}};Qg.styles=[Et,Sn,iMe];X6([ne()],Qg.prototype,"text",void 0);X6([ne()],Qg.prototype,"address",void 0);X6([ne()],Qg.prototype,"imageSrc",void 0);X6([ne({type:Boolean})],Qg.prototype,"isAddress",void 0);Qg=X6([Ce("wui-preview-item")],Qg);const sMe=De`
  button {
    padding: 6.5px var(--wui-spacing-l) 6.5px var(--wui-spacing-xs);
    display: flex;
    justify-content: space-between;
    width: 100%;
    border-radius: var(--wui-border-radius-xs);
    background-color: var(--wui-color-gray-glass-002);
  }

  button[data-clickable='false'] {
    pointer-events: none;
    background-color: transparent;
  }

  wui-image {
    width: var(--wui-spacing-3xl);
    height: var(--wui-spacing-3xl);
    border-radius: var(--wui-border-radius-3xl);
  }

  wui-avatar {
    width: var(--wui-spacing-3xl);
    height: var(--wui-spacing-3xl);
    box-shadow: 0 0 0 0;
  }
  .address {
    color: var(--wui-color-fg-base-100);
  }
  .address-description {
    text-transform: capitalize;
    color: var(--wui-color-fg-base-200);
  }

  wui-icon-box {
    position: relative;
    right: 15px;
    top: 15px;
    border: 2px solid var(--wui-color-bg-150);
    background-color: var(--wui-color-bg-125);
  }
`;var e4=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Zg=class extends Te{constructor(){super(...arguments),this.accountAddress="",this.accountType="",this.connectedConnector=er.getConnectedConnector(),this.labels=Ne.state.addressLabels,this.caipNetwork=rt.state.caipNetwork,this.socialProvider=er.getConnectedSocialProvider(),this.balance=0,this.fetchingBalance=!0,this.shouldShowIcon=!1,this.selected=!1}connectedCallback(){var e;super.connectedCallback(),wi.getBalance(this.accountAddress,(e=this.caipNetwork)==null?void 0:e.id).then(n=>{let r=this.balance;n.balances.length>0&&(r=n.balances.reduce((i,s)=>i+((s==null?void 0:s.value)||0),0)),this.balance=r,this.fetchingBalance=!1,this.requestUpdate()})}render(){const e=this.getLabel();return this.shouldShowIcon=this.connectedConnector==="AUTH",K`
      <wui-flex
        flexDirection="row"
        justifyContent="space-between"
        .padding=${["0","0","s","1xs"]}
      >
        <wui-flex gap="md" alignItems="center">
          <wui-avatar address=${this.accountAddress}></wui-avatar>
          ${this.shouldShowIcon?K`<wui-icon-box
                size="sm"
                iconcolor="fg-200"
                backgroundcolor="fg-300"
                icon=${this.accountType===Fn.ACCOUNT_TYPES.EOA?this.socialProvider??"mail":"lightbulb"}
                background="fg-300"
              ></wui-icon-box>`:K`<wui-flex .padding="${["0","0","0","s"]}"></wui-flex>`}
          <wui-flex flexDirection="column">
            <wui-text class="address" variant="paragraph-500" color="fg-100"
              >${qt.getTruncateString({string:this.accountAddress,charsStart:4,charsEnd:6,truncate:"middle"})}</wui-text
            >
            <wui-text class="address-description" variant="small-400">${e}</wui-text></wui-flex
          >
        </wui-flex>
        <wui-flex gap="s" alignItems="center">
          ${this.fetchingBalance?K`<wui-loading-spinner size="sm" color="accent-100"></wui-loading-spinner>`:K` <wui-text variant="small-400">$${this.balance.toFixed(2)}</wui-text>`}
          <slot name="action"></slot>
        </wui-flex>
      </wui-flex>
    `}getLabel(){var n;let e=(n=this.labels)==null?void 0:n.get(this.accountAddress);return!e&&this.connectedConnector==="AUTH"?e=`${this.accountType==="eoa"?this.socialProvider??"Email":"Smart"} Account`:!e&&this.connectedConnector==="INJECTED"||this.connectedConnector==="ANNOUNCED"?e="Injected Account":e||(e="EOA"),e}};Zg.styles=[Et,Sn,sMe];e4([ne()],Zg.prototype,"accountAddress",void 0);e4([ne()],Zg.prototype,"accountType",void 0);e4([ne({type:Boolean})],Zg.prototype,"selected",void 0);e4([ne({type:Function})],Zg.prototype,"onSelect",void 0);Zg=e4([Ce("wui-list-account")],Zg);const oMe=De`
  :host {
    position: relative;
  }

  button {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 48px;
    width: 100%;
    background-color: var(--wui-color-accent-glass-010);
    border-radius: var(--wui-border-radius-xs);
    border: 1px solid var(--wui-color-accent-glass-010);
    transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
    will-change: background-color;
  }

  wui-tooltip {
    padding: 7px var(--wui-spacing-s) 8px var(--wui-spacing-s);
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translate(-50%, -100%);
    opacity: 0;
    display: none;
  }

  @media (hover: hover) and (pointer: fine) {
    button:hover:enabled {
      background-color: var(--wui-color-accent-glass-015);
    }

    button:active:enabled {
      background-color: var(--wui-color-accent-glass-020);
    }
  }
`;var v$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let px=class extends Te{constructor(){super(...arguments),this.text="",this.icon="card"}render(){return K`<button>
      <wui-icon color="accent-100" name=${this.icon} size="lg"></wui-icon>
    </button>`}};px.styles=[Et,Sn,oMe];v$([ne()],px.prototype,"text",void 0);v$([ne()],px.prototype,"icon",void 0);px=v$([Ce("wui-icon-button")],px);const aMe=De`
  button {
    column-gap: var(--wui-spacing-s);
    padding: 16.5px var(--wui-spacing-l) 16.5px var(--wui-spacing-xs);
    width: 100%;
    background-color: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-xs);
    color: var(--wui-color-fg-100);
    justify-content: center;
    align-items: center;
  }

  button:disabled {
    background-color: var(--wui-color-gray-glass-015);
    color: var(--wui-color-gray-glass-015);
  }
`;var b$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let mx=class extends Te{constructor(){super(...arguments),this.text="",this.disabled=!1}render(){return K`
      <button ?disabled=${this.disabled} ontouchstart>
        <wui-text align="center" variant="paragraph-500" color="inherit">${this.text}</wui-text>
      </button>
    `}};mx.styles=[Et,Sn,aMe];b$([ne()],mx.prototype,"text",void 0);b$([ne({type:Boolean})],mx.prototype,"disabled",void 0);mx=b$([Ce("wui-list-button")],mx);const cMe=De`
  button {
    column-gap: var(--wui-spacing-s);
    padding: 7px var(--wui-spacing-l) 7px var(--wui-spacing-xs);
    width: 100%;
    justify-content: flex-start;
    background-color: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-xs);
    color: var(--wui-color-fg-100);
  }

  wui-text {
    text-transform: capitalize;
  }

  wui-text[data-align='left'] {
    display: flex;
    flex: 1;
  }

  wui-text[data-align='center'] {
    display: flex;
    flex: 1;
    justify-content: center;
  }

  .invisible {
    opacity: 0;
    pointer-events: none;
  }

  button:disabled {
    background-color: var(--wui-color-gray-glass-015);
    color: var(--wui-color-gray-glass-015);
  }
`;var t4=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Jg=class extends Te{constructor(){super(...arguments),this.logo="google",this.name="Continue with google",this.align="left",this.disabled=!1}render(){return K`
      <button ?disabled=${this.disabled} ontouchstart>
        <wui-logo logo=${this.logo}></wui-logo>
        <wui-text
          data-align=${this.align}
          variant="paragraph-500"
          color="inherit"
          align=${this.align}
          >${this.name}</wui-text
        >
        ${this.templatePlacement()}
      </button>
    `}templatePlacement(){return this.align==="center"?K` <wui-logo class="invisible" logo=${this.logo}></wui-logo>`:null}};Jg.styles=[Et,Sn,cMe];t4([ne()],Jg.prototype,"logo",void 0);t4([ne()],Jg.prototype,"name",void 0);t4([ne()],Jg.prototype,"align",void 0);t4([ne({type:Boolean})],Jg.prototype,"disabled",void 0);Jg=t4([Ce("wui-list-social")],Jg);const lMe=De`
  :host {
    display: grid;
    width: inherit;
    height: inherit;
  }
`;var Al=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Oa=class extends Te{render(){return this.style.cssText=`
      grid-template-rows: ${this.gridTemplateRows};
      grid-template-columns: ${this.gridTemplateColumns};
      justify-items: ${this.justifyItems};
      align-items: ${this.alignItems};
      justify-content: ${this.justifyContent};
      align-content: ${this.alignContent};
      column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`};
      row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`};
      gap: ${this.gap&&`var(--wui-spacing-${this.gap})`};
      padding-top: ${this.padding&&qt.getSpacingStyles(this.padding,0)};
      padding-right: ${this.padding&&qt.getSpacingStyles(this.padding,1)};
      padding-bottom: ${this.padding&&qt.getSpacingStyles(this.padding,2)};
      padding-left: ${this.padding&&qt.getSpacingStyles(this.padding,3)};
      margin-top: ${this.margin&&qt.getSpacingStyles(this.margin,0)};
      margin-right: ${this.margin&&qt.getSpacingStyles(this.margin,1)};
      margin-bottom: ${this.margin&&qt.getSpacingStyles(this.margin,2)};
      margin-left: ${this.margin&&qt.getSpacingStyles(this.margin,3)};
    `,K`<slot></slot>`}};Oa.styles=[Et,lMe];Al([ne()],Oa.prototype,"gridTemplateRows",void 0);Al([ne()],Oa.prototype,"gridTemplateColumns",void 0);Al([ne()],Oa.prototype,"justifyItems",void 0);Al([ne()],Oa.prototype,"alignItems",void 0);Al([ne()],Oa.prototype,"justifyContent",void 0);Al([ne()],Oa.prototype,"alignContent",void 0);Al([ne()],Oa.prototype,"columnGap",void 0);Al([ne()],Oa.prototype,"rowGap",void 0);Al([ne()],Oa.prototype,"gap",void 0);Al([ne()],Oa.prototype,"padding",void 0);Al([ne()],Oa.prototype,"margin",void 0);Oa=Al([Ce("wui-grid")],Oa);const uMe=De`
  :host {
    position: relative;
    display: flex;
    width: 100%;
    height: 1px;
    background-color: var(--wui-color-gray-glass-005);
    justify-content: center;
    align-items: center;
  }

  :host > wui-text {
    position: absolute;
    padding: 0px 10px;
    background-color: var(--wui-color-modal-bg);
  }
`;var Rne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let BC=class extends Te{constructor(){super(...arguments),this.text=""}render(){return K`${this.template()}`}template(){return this.text?K`<wui-text variant="small-500" color="fg-200">${this.text}</wui-text>`:null}};BC.styles=[Et,uMe];Rne([ne()],BC.prototype,"text",void 0);BC=Rne([Ce("wui-separator")],BC);const pA={interpolate(t,e,n){if(t.length!==2||e.length!==2)throw new Error("inputRange and outputRange must be an array of length 2");const r=t[0]||0,i=t[1]||0,s=e[0]||0,o=e[1]||0;return n<r?s:n>i?o:(o-s)/(i-r)*(n-r)+s}},dMe=3,fMe=["receive","deposit","borrow","claim"],hMe=["withdraw","repay","burn"],Ym={getMonthName(t){const e=new Date;return e.setMonth(t),e.toLocaleString("en-US",{month:"long"})},getTransactionGroupTitle(t,e){const n=qB.getYear(),r=this.getMonthName(e);return t===n?r:`${r} ${t}`},getTransactionImages(t){const[e,n]=t,r=!!e&&(t==null?void 0:t.every(o=>!!o.nft_info)),i=(t==null?void 0:t.length)>1;return(t==null?void 0:t.length)===2&&!r?[this.getTransactionImage(e),this.getTransactionImage(n)]:i?t.map(o=>this.getTransactionImage(o)):[this.getTransactionImage(e)]},getTransactionImage(t){return{type:Ym.getTransactionTransferTokenType(t),url:Ym.getTransactionImageURL(t)}},getTransactionImageURL(t){var i,s,o,a,c;let e;const n=!!(t!=null&&t.nft_info),r=!!(t!=null&&t.fungible_info);return t&&n?e=(o=(s=(i=t==null?void 0:t.nft_info)==null?void 0:i.content)==null?void 0:s.preview)==null?void 0:o.url:t&&r&&(e=(c=(a=t==null?void 0:t.fungible_info)==null?void 0:a.icon)==null?void 0:c.url),e},getTransactionTransferTokenType(t){if(t!=null&&t.fungible_info)return"FUNGIBLE";if(t!=null&&t.nft_info)return"NFT"},getTransactionDescriptions(t){var d,h,g;const e=(d=t==null?void 0:t.metadata)==null?void 0:d.operationType,n=t==null?void 0:t.transfers,r=((h=t==null?void 0:t.transfers)==null?void 0:h.length)>0,i=((g=t==null?void 0:t.transfers)==null?void 0:g.length)>1,s=r&&(n==null?void 0:n.every(w=>!!(w!=null&&w.fungible_info))),[o,a]=n;let c=this.getTransferDescription(o),l=this.getTransferDescription(a);if(!r)return(e==="send"||e==="receive")&&s?(c=qt.getTruncateString({string:t==null?void 0:t.metadata.sentFrom,charsStart:4,charsEnd:6,truncate:"middle"}),l=qt.getTruncateString({string:t==null?void 0:t.metadata.sentTo,charsStart:4,charsEnd:6,truncate:"middle"}),[c,l]):[t.metadata.status];if(i)return n.map(w=>this.getTransferDescription(w));let u="";return fMe.includes(e)?u="+":hMe.includes(e)&&(u="-"),c=u.concat(c),[c]},getTransferDescription(t){var n;let e="";return t&&(t!=null&&t.nft_info?e=((n=t==null?void 0:t.nft_info)==null?void 0:n.name)||"-":t!=null&&t.fungible_info&&(e=this.getFungibleTransferDescription(t)||"-")),e},getFungibleTransferDescription(t){var r;return t?[this.getQuantityFixedValue(t==null?void 0:t.quantity.numeric),(r=t==null?void 0:t.fungible_info)==null?void 0:r.symbol].join(" ").trim():null},getQuantityFixedValue(t){return t?parseFloat(t).toFixed(dMe):null}};var El=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let oc=class extends Te{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.balance="show",this.charsStart=4,this.charsEnd=6,this.address=Ne.state.address,this.balanceVal=Ne.state.balance,this.balanceSymbol=Ne.state.balanceSymbol,this.profileName=Ne.state.profileName,this.profileImage=Ne.state.profileImage,this.network=rt.state.caipNetwork,this.isUnsupportedChain=rt.state.isUnsupportedChain,this.unsubscribe.push(Ne.subscribe(e=>{e.isConnected?(this.address=e.address,this.balanceVal=e.balance,this.profileName=e.profileName,this.profileImage=e.profileImage,this.balanceSymbol=e.balanceSymbol):(this.address="",this.balanceVal="",this.profileName="",this.profileImage="",this.balanceSymbol="")}),rt.subscribeKey("caipNetwork",e=>{this.network=e}),rt.subscribeKey("isUnsupportedChain",e=>{this.isUnsupportedChain=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=kr.getNetworkImage(this.network),n=this.balance==="show";return K`
      <wui-account-button
        .disabled=${!!this.disabled}
        .isUnsupportedChain=${this.isUnsupportedChain}
        address=${gt(this.address)}
        profileName=${gt(this.profileName)}
        networkSrc=${gt(e)}
        avatarSrc=${gt(this.profileImage)}
        balance=${n?st.formatBalance(this.balanceVal,this.balanceSymbol):""}
        @click=${this.onClick.bind(this)}
        data-testid="account-button"
        .charsStart=${this.charsStart}
        .charsEnd=${this.charsEnd}
      >
      </wui-account-button>
    `}onClick(){this.isUnsupportedChain?dn.open({view:"UnsupportedChain"}):dn.open()}};El([ne({type:Boolean})],oc.prototype,"disabled",void 0);El([ne()],oc.prototype,"balance",void 0);El([ne()],oc.prototype,"charsStart",void 0);El([ne()],oc.prototype,"charsEnd",void 0);El([pe()],oc.prototype,"address",void 0);El([pe()],oc.prototype,"balanceVal",void 0);El([pe()],oc.prototype,"balanceSymbol",void 0);El([pe()],oc.prototype,"profileName",void 0);El([pe()],oc.prototype,"profileImage",void 0);El([pe()],oc.prototype,"network",void 0);El([pe()],oc.prototype,"isUnsupportedChain",void 0);oc=El([Ce("w3m-account-button")],oc);const pMe=De`
  :host {
    display: block;
    width: max-content;
  }
`;var jd=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let bl=class extends Te{constructor(){super(...arguments),this.unsubscribe=[],this.disabled=!1,this.balance=void 0,this.size=void 0,this.label=void 0,this.loadingLabel=void 0,this.charsStart=4,this.charsEnd=6,this.isAccount=Ne.state.isConnected,this.isLoading=dn.state.loading}firstUpdated(){this.unsubscribe.push(Ne.subscribeKey("isConnected",e=>{this.isAccount=e}),dn.subscribeKey("loading",e=>{this.isLoading=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return this.isAccount&&!this.isLoading?K`
          <w3m-account-button
            .disabled=${!!this.disabled}
            balance=${gt(this.balance)}
            .charsStart=${gt(this.charsStart)}
            .charsEnd=${gt(this.charsEnd)}
          >
          </w3m-account-button>
        `:K`
          <w3m-connect-button
            size=${gt(this.size)}
            label=${gt(this.label)}
            loadingLabel=${gt(this.loadingLabel)}
          ></w3m-connect-button>
        `}};bl.styles=pMe;jd([ne({type:Boolean})],bl.prototype,"disabled",void 0);jd([ne()],bl.prototype,"balance",void 0);jd([ne()],bl.prototype,"size",void 0);jd([ne()],bl.prototype,"label",void 0);jd([ne()],bl.prototype,"loadingLabel",void 0);jd([ne()],bl.prototype,"charsStart",void 0);jd([ne()],bl.prototype,"charsEnd",void 0);jd([pe()],bl.prototype,"isAccount",void 0);jd([pe()],bl.prototype,"isLoading",void 0);bl=jd([Ce("w3m-button")],bl);var jb=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Xg=class extends Te{constructor(){super(),this.unsubscribe=[],this.size="md",this.label="Connect Wallet",this.loadingLabel="Connecting...",this.open=dn.state.open,this.loading=dn.state.loading,this.unsubscribe.push(dn.subscribe(e=>{this.open=e.open,this.loading=e.loading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.loading||this.open;return K`
      <wui-connect-button
        size=${gt(this.size)}
        .loading=${e}
        @click=${this.onClick.bind(this)}
        data-testid="connect-button"
      >
        ${e?this.loadingLabel:this.label}
      </wui-connect-button>
    `}onClick(){this.open?dn.close():this.loading||dn.open()}};jb([ne()],Xg.prototype,"size",void 0);jb([ne()],Xg.prototype,"label",void 0);jb([ne()],Xg.prototype,"loadingLabel",void 0);jb([pe()],Xg.prototype,"open",void 0);jb([pe()],Xg.prototype,"loading",void 0);Xg=jb([Ce("w3m-connect-button")],Xg);const mMe=De`
  :host {
    display: block;
    width: max-content;
  }
`;var O1=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let xh=class extends Te{constructor(){super(...arguments),this.unsubscribe=[],this.disabled=!1,this.network=rt.state.caipNetwork,this.connected=Ne.state.isConnected,this.loading=dn.state.loading,this.isUnsupportedChain=rt.state.isUnsupportedChain}firstUpdated(){this.unsubscribe.push(rt.subscribeKey("caipNetwork",e=>this.network=e),Ne.subscribeKey("isConnected",e=>this.connected=e),dn.subscribeKey("loading",e=>this.loading=e),rt.subscribeKey("isUnsupportedChain",e=>this.isUnsupportedChain=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return K`
      <wui-network-button
        data-testid="w3m-network-button"
        .disabled=${!!(this.disabled||this.loading)}
        .isUnsupportedChain=${this.isUnsupportedChain}
        imageSrc=${gt(kr.getNetworkImage(this.network))}
        @click=${this.onClick.bind(this)}
      >
        ${this.getLabel()}
        <slot></slot>
      </wui-network-button>
    `}getLabel(){return this.label?this.label:this.isUnsupportedChain?"Switch Network":this.network?this.network.name:this.connected?"Unknown Network":"Select Network"}onClick(){this.loading||(wt.sendEvent({type:"track",event:"CLICK_NETWORKS"}),dn.open({view:"Networks"}))}};xh.styles=mMe;O1([ne({type:Boolean})],xh.prototype,"disabled",void 0);O1([ne({type:String})],xh.prototype,"label",void 0);O1([pe()],xh.prototype,"network",void 0);O1([pe()],xh.prototype,"connected",void 0);O1([pe()],xh.prototype,"loading",void 0);O1([pe()],xh.prototype,"isUnsupportedChain",void 0);xh=O1([Ce("w3m-network-button")],xh);const gMe=De`
  :host {
    display: block;
    will-change: transform, opacity;
  }
`;var Nne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let $C=class extends Te{constructor(){super(),this.resizeObserver=void 0,this.prevHeight="0px",this.prevHistoryLength=1,this.unsubscribe=[],this.view=ke.state.view,this.unsubscribe.push(ke.subscribeKey("view",e=>this.onViewChange(e)))}firstUpdated(){this.resizeObserver=new ResizeObserver(async([e])=>{const n=`${e==null?void 0:e.contentRect.height}px`;this.prevHeight!=="0px"&&(await this.animate([{height:this.prevHeight},{height:n}],{duration:150,easing:"ease",fill:"forwards"}).finished,this.style.height="auto"),this.prevHeight=n}),this.resizeObserver.observe(this.getWrapper())}disconnectedCallback(){var e;(e=this.resizeObserver)==null||e.unobserve(this.getWrapper()),this.unsubscribe.forEach(n=>n())}render(){return K`<div>${this.viewTemplate()}</div>`}viewTemplate(){switch(this.view){case"AccountSettings":return K`<w3m-account-settings-view></w3m-account-settings-view>`;case"Account":return K`<w3m-account-view></w3m-account-view>`;case"AllWallets":return K`<w3m-all-wallets-view></w3m-all-wallets-view>`;case"ApproveTransaction":return K`<w3m-approve-transaction-view></w3m-approve-transaction-view>`;case"BuyInProgress":return K`<w3m-buy-in-progress-view></w3m-buy-in-progress-view>`;case"ChooseAccountName":return K`<w3m-choose-account-name-view></w3m-choose-account-name-view>`;case"Connect":return K`<w3m-connect-view></w3m-connect-view>`;case"ConnectingWalletConnect":return K`<w3m-connecting-wc-view></w3m-connecting-wc-view>`;case"ConnectingExternal":return K`<w3m-connecting-external-view></w3m-connecting-external-view>`;case"ConnectingSiwe":return K`<w3m-connecting-siwe-view></w3m-connecting-siwe-view>`;case"ConnectWallets":return K`<w3m-connect-wallets-view></w3m-connect-wallets-view>`;case"ConnectSocials":return K`<w3m-connect-socials-view></w3m-connect-socials-view>`;case"ConnectingSocial":return K`<w3m-connecting-social-view></w3m-connecting-social-view>`;case"Downloads":return K`<w3m-downloads-view></w3m-downloads-view>`;case"EmailVerifyOtp":return K`<w3m-email-verify-otp-view></w3m-email-verify-otp-view>`;case"EmailVerifyDevice":return K`<w3m-email-verify-device-view></w3m-email-verify-device-view>`;case"GetWallet":return K`<w3m-get-wallet-view></w3m-get-wallet-view>`;case"Networks":return K`<w3m-networks-view></w3m-networks-view>`;case"SwitchNetwork":return K`<w3m-network-switch-view></w3m-network-switch-view>`;case"Profile":return K`<w3m-profile-view></w3m-profile-view>`;case"SelectAddresses":return K`<w3m-select-addresses-view></w3m-select-addresses-view>`;case"SwitchAddress":return K`<w3m-switch-address-view></w3m-switch-address-view>`;case"Transactions":return K`<w3m-transactions-view></w3m-transactions-view>`;case"OnRampProviders":return K`<w3m-onramp-providers-view></w3m-onramp-providers-view>`;case"OnRampActivity":return K`<w3m-onramp-activity-view></w3m-onramp-activity-view>`;case"OnRampTokenSelect":return K`<w3m-onramp-token-select-view></w3m-onramp-token-select-view>`;case"OnRampFiatSelect":return K`<w3m-onramp-fiat-select-view></w3m-onramp-fiat-select-view>`;case"UpgradeEmailWallet":return K`<w3m-upgrade-wallet-view></w3m-upgrade-wallet-view>`;case"UpgradeToSmartAccount":return K`<w3m-upgrade-to-smart-account-view></w3m-upgrade-to-smart-account-view>`;case"UpdateEmailWallet":return K`<w3m-update-email-wallet-view></w3m-update-email-wallet-view>`;case"UpdateEmailPrimaryOtp":return K`<w3m-update-email-primary-otp-view></w3m-update-email-primary-otp-view>`;case"UpdateEmailSecondaryOtp":return K`<w3m-update-email-secondary-otp-view></w3m-update-email-secondary-otp-view>`;case"UnsupportedChain":return K`<w3m-unsupported-chain-view></w3m-unsupported-chain-view>`;case"Swap":return K`<w3m-swap-view></w3m-swap-view>`;case"SwapSelectToken":return K`<w3m-swap-select-token-view></w3m-swap-select-token-view>`;case"SwapPreview":return K`<w3m-swap-preview-view></w3m-swap-preview-view>`;case"WalletSend":return K`<w3m-wallet-send-view></w3m-wallet-send-view>`;case"WalletSendSelectToken":return K`<w3m-wallet-send-select-token-view></w3m-wallet-send-select-token-view>`;case"WalletSendPreview":return K`<w3m-wallet-send-preview-view></w3m-wallet-send-preview-view>`;case"WhatIsABuy":return K`<w3m-what-is-a-buy-view></w3m-what-is-a-buy-view>`;case"WalletReceive":return K`<w3m-wallet-receive-view></w3m-wallet-receive-view>`;case"WalletCompatibleNetworks":return K`<w3m-wallet-compatible-networks-view></w3m-wallet-compatible-networks-view>`;case"WhatIsAWallet":return K`<w3m-what-is-a-wallet-view></w3m-what-is-a-wallet-view>`;case"WhatIsANetwork":return K`<w3m-what-is-a-network-view></w3m-what-is-a-network-view>`;case"ConnectingFarcaster":return K`<w3m-connecting-farcaster-view></w3m-connecting-farcaster-view>`;default:return K`<w3m-connect-view></w3m-connect-view>`}}async onViewChange(e){Ga.hide();const{history:n}=ke.state;let r=-10,i=10;n.length<this.prevHistoryLength&&(r=10,i=-10),this.prevHistoryLength=n.length,await this.animate([{opacity:1,transform:"translateX(0px)"},{opacity:0,transform:`translateX(${r}px)`}],{duration:150,easing:"ease",fill:"forwards"}).finished,this.view=e,await this.animate([{opacity:0,transform:`translateX(${i}px)`},{opacity:1,transform:"translateX(0px)"}],{duration:150,easing:"ease",fill:"forwards",delay:50}).finished}getWrapper(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("div")}};$C.styles=gMe;Nne([pe()],$C.prototype,"view",void 0);$C=Nne([Ce("w3m-router")],$C);const wMe=De`
  :host > wui-flex {
    width: 100%;
    max-width: 360px;
  }

  :host > wui-flex > wui-flex {
    border-radius: var(--wui-border-radius-l);
    width: 100%;
  }

  .amounts-container {
    width: 100%;
  }
`;var K0=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const yMe={USD:"$",EUR:"€",GBP:"£"},vMe=[100,250,500,1e3];let bd=class extends Te{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.connected=Ne.state.isConnected,this.loading=dn.state.loading,this.paymentCurrency=Tr.state.paymentCurrency,this.paymentAmount=Tr.state.paymentAmount,this.purchaseAmount=Tr.state.purchaseAmount,this.quoteLoading=Tr.state.quotesLoading,this.unsubscribe.push(Ne.subscribeKey("isConnected",e=>{this.connected=e}),dn.subscribeKey("loading",e=>{this.loading=e}),Tr.subscribe(e=>{this.paymentCurrency=e.paymentCurrency,this.paymentAmount=e.paymentAmount,this.purchaseAmount=e.purchaseAmount,this.quoteLoading=e.quotesLoading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return K`
      <wui-flex flexDirection="column" justifyContent="center" alignItems="center">
        <wui-flex flexDirection="column" alignItems="center" gap="xs">
          <w3m-onramp-input
            type="Fiat"
            @inputChange=${this.onPaymentAmountChange.bind(this)}
            .value=${this.paymentAmount||0}
          ></w3m-onramp-input>
          <w3m-onramp-input
            type="Token"
            .value=${this.purchaseAmount||0}
            .loading=${this.quoteLoading}
          ></w3m-onramp-input>
          <wui-flex justifyContent="space-evenly" class="amounts-container" gap="xs">
            ${vMe.map(e=>{var n;return K`<wui-button
                  variant=${this.paymentAmount===e?"accent":"neutral"}
                  size="md"
                  textVariant="paragraph-600"
                  fullWidth
                  @click=${()=>this.selectPresetAmount(e)}
                  >${`${yMe[((n=this.paymentCurrency)==null?void 0:n.id)||"USD"]} ${e}`}</wui-button
                >`})}
          </wui-flex>
          ${this.templateButton()}
        </wui-flex>
      </wui-flex>
    `}templateButton(){return this.connected?K`<wui-button
          @click=${this.getQuotes.bind(this)}
          variant="main"
          fullWidth
          size="lg"
          borderRadius="xs"
        >
          Get quotes
        </wui-button>`:K`<wui-button
          @click=${this.openModal.bind(this)}
          variant="accent"
          fullWidth
          size="lg"
          borderRadius="xs"
        >
          Connect wallet
        </wui-button>`}getQuotes(){this.loading||dn.open({view:"OnRampProviders"})}openModal(){dn.open({view:"Connect"})}async onPaymentAmountChange(e){Tr.setPaymentAmount(Number(e.detail)),await Tr.getQuote()}async selectPresetAmount(e){Tr.setPaymentAmount(e),await Tr.getQuote()}};bd.styles=wMe;K0([ne({type:Boolean})],bd.prototype,"disabled",void 0);K0([pe()],bd.prototype,"connected",void 0);K0([pe()],bd.prototype,"loading",void 0);K0([pe()],bd.prototype,"paymentCurrency",void 0);K0([pe()],bd.prototype,"paymentAmount",void 0);K0([pe()],bd.prototype,"purchaseAmount",void 0);K0([pe()],bd.prototype,"quoteLoading",void 0);bd=K0([Ce("w3m-onramp-widget")],bd);var Ld=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let hu=class extends Te{constructor(){super(),this.usubscribe=[],this.networkImages=Rs.state.networkImages,this.address=Ne.state.address,this.profileImage=Ne.state.profileImage,this.profileName=Ne.state.profileName,this.network=rt.state.caipNetwork,this.preferredAccountType=Ne.state.preferredAccountType,this.disconnecting=!1,this.loading=!1,this.switched=!1,this.text="",this.usubscribe.push(Ne.subscribe(e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.preferredAccountType=e.preferredAccountType):dn.close()}),Ne.subscribeKey("preferredAccountType",e=>this.preferredAccountType=e),rt.subscribeKey("caipNetwork",e=>{e!=null&&e.id&&(this.network=e)}))}disconnectedCallback(){this.usubscribe.forEach(e=>e())}render(){var r,i,s;if(!this.address)throw new Error("w3m-account-settings-view: No account provided");const e=this.networkImages[((r=this.network)==null?void 0:r.imageId)??""],n=(i=this.profileName)==null?void 0:i.split(".")[0];return K`
      <wui-flex
        flexDirection="column"
        alignItems="center"
        gap="l"
        .padding=${["0","xl","m","xl"]}
      >
        <wui-avatar
          alt=${this.address}
          address=${this.address}
          imageSrc=${gt(this.profileImage)}
          size="2lg"
        ></wui-avatar>
        <wui-flex flexDirection="column" alignItems="center">
          <wui-flex gap="3xs" alignItems="center" justifyContent="center">
            <wui-text variant="title-6-600" color="fg-100" data-testid="account-settings-address">
              ${n?qt.getTruncateString({string:n,charsStart:20,charsEnd:0,truncate:"end"}):qt.getTruncateString({string:this.address,charsStart:4,charsEnd:6,truncate:"middle"})}
            </wui-text>
            <wui-icon-link
              size="md"
              icon="copy"
              iconColor="fg-200"
              @click=${this.onCopyAddress}
            ></wui-icon-link>
          </wui-flex>
        </wui-flex>
      </wui-flex>
      <wui-flex flexDirection="column" gap="m">
        <wui-flex flexDirection="column" gap="xs" .padding=${["0","l","m","l"]}>
          ${this.authCardTemplate()}
          <w3m-account-auth-button></w3m-account-auth-button>
          <wui-list-item
            .variant=${e?"image":"icon"}
            iconVariant="overlay"
            icon="networkPlaceholder"
            imageSrc=${gt(e)}
            ?chevron=${this.isAllowedNetworkSwitch()}
            @click=${this.onNetworks.bind(this)}
            data-testid="account-switch-network-button"
          >
            <wui-text variant="paragraph-500" color="fg-100">
              ${((s=this.network)==null?void 0:s.name)??"Unknown"}
            </wui-text>
          </wui-list-item>
          ${this.togglePreferredAccountBtnTemplate()} ${this.chooseNameButtonTemplate()}
          <wui-list-item
            variant="icon"
            iconVariant="overlay"
            icon="disconnect"
            ?chevron=${!1}
            .loading=${this.disconnecting}
            @click=${this.onDisconnect.bind(this)}
            data-testid="disconnect-button"
          >
            <wui-text variant="paragraph-500" color="fg-200">Disconnect</wui-text>
          </wui-list-item>
        </wui-flex>
      </wui-flex>
    `}chooseNameButtonTemplate(){const e=er.getConnectedConnector();return!Pt.getAuthConnector()||e!=="AUTH"||this.profileName?null:K`
      <wui-list-item
        variant="icon"
        iconVariant="overlay"
        icon="id"
        iconSize="sm"
        ?chevron=${!0}
        @click=${this.onChooseName.bind(this)}
        data-testid="account-choose-name-button"
      >
        <wui-text variant="paragraph-500" color="fg-100">Choose account name </wui-text>
      </wui-list-item>
    `}authCardTemplate(){const e=er.getConnectedConnector(),n=Pt.getAuthConnector(),{origin:r}=location;return!n||e!=="AUTH"||r.includes(os.SECURE_SITE)?null:K`
      <wui-notice-card
        @click=${this.onGoToUpgradeView.bind(this)}
        label="Upgrade your wallet"
        description="Transition to a self-custodial wallet"
        icon="wallet"
        data-testid="w3m-wallet-upgrade-card"
      ></wui-notice-card>
    `}isAllowedNetworkSwitch(){const e=rt.getRequestedCaipNetworks(),n=e?e.length>1:!1,r=e==null?void 0:e.find(({id:i})=>{var s;return i===((s=this.network)==null?void 0:s.id)});return n||!r}onCopyAddress(){try{this.profileName?(st.copyToClopboard(this.profileName),Ht.showSuccess("Name copied")):this.address&&(st.copyToClopboard(this.address),Ht.showSuccess("Address copied"))}catch{Ht.showError("Failed to copy")}}togglePreferredAccountBtnTemplate(){const e=rt.checkIfSmartAccountEnabled(),n=er.getConnectedConnector();return!Pt.getAuthConnector()||n!=="AUTH"||!e?null:(this.switched||(this.text=this.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT?"Switch to your EOA":"Switch to your smart account"),K`
      <wui-list-item
        variant="icon"
        iconVariant="overlay"
        icon="swapHorizontalBold"
        iconSize="sm"
        ?chevron=${!0}
        ?loading=${this.loading}
        @click=${this.changePreferredAccountType.bind(this)}
        data-testid="account-toggle-preferred-account-type"
      >
        <wui-text variant="paragraph-500" color="fg-100">${this.text}</wui-text>
      </wui-list-item>
    `)}onChooseName(){ke.push("ChooseAccountName")}async changePreferredAccountType(){const e=rt.checkIfSmartAccountEnabled(),n=this.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT||!e?Fn.ACCOUNT_TYPES.EOA:Fn.ACCOUNT_TYPES.SMART_ACCOUNT;Pt.getAuthConnector()&&(this.loading=!0,await tn.setPreferredAccountType(n),this.text=n===Fn.ACCOUNT_TYPES.SMART_ACCOUNT?"Switch to your EOA":"Switch to your smart account",this.switched=!0,Ir.resetSend(),this.loading=!1,this.requestUpdate())}onNetworks(){this.isAllowedNetworkSwitch()&&ke.push("Networks")}async onDisconnect(){try{this.disconnecting=!0,await tn.disconnect(),wt.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),dn.close()}catch{wt.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),Ht.showError("Failed to disconnect")}finally{this.disconnecting=!1}}onGoToUpgradeView(){wt.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),ke.push("UpgradeEmailWallet")}};Ld([pe()],hu.prototype,"address",void 0);Ld([pe()],hu.prototype,"profileImage",void 0);Ld([pe()],hu.prototype,"profileName",void 0);Ld([pe()],hu.prototype,"network",void 0);Ld([pe()],hu.prototype,"preferredAccountType",void 0);Ld([pe()],hu.prototype,"disconnecting",void 0);Ld([pe()],hu.prototype,"loading",void 0);Ld([pe()],hu.prototype,"switched",void 0);Ld([pe()],hu.prototype,"text",void 0);hu=Ld([Ce("w3m-account-settings-view")],hu);var bMe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let cq=class extends Te{render(){const e=er.getConnectedConnector(),n=Pt.getAuthConnector();return K`
      ${n!=null&&n.walletFeatures&&e==="AUTH"?this.walletFeaturesTemplate():this.defaultTemplate()}
    `}walletFeaturesTemplate(){return K`<w3m-account-wallet-features-widget></w3m-account-wallet-features-widget>`}defaultTemplate(){return K`<w3m-account-default-widget></w3m-account-default-widget>`}};cq=bMe([Ce("w3m-account-view")],cq);var Pne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let HP=class extends Te{constructor(){super(...arguments),this.search="",this.onDebouncedSearch=st.debounce(e=>{this.search=e})}render(){const e=this.search.length>=2;return K`
      <wui-flex .padding=${["0","s","s","s"]} gap="s">
        <wui-search-bar @inputChange=${this.onInputChange.bind(this)}></wui-search-bar>
        ${this.qrButtonTemplate()}
      </wui-flex>
      ${e?K`<w3m-all-wallets-search query=${this.search}></w3m-all-wallets-search>`:K`<w3m-all-wallets-list></w3m-all-wallets-list>`}
    `}onInputChange(e){this.onDebouncedSearch(e.detail)}qrButtonTemplate(){return st.isMobile()?K`
        <wui-icon-box
          size="lg"
          iconSize="xl"
          iconColor="accent-100"
          backgroundColor="accent-100"
          icon="qrCode"
          background="transparent"
          border
          borderColor="wui-accent-glass-010"
          @click=${this.onWalletConnectQr.bind(this)}
        ></wui-icon-box>
      `:null}onWalletConnectQr(){ke.push("ConnectingWalletConnect")}};Pne([pe()],HP.prototype,"search",void 0);HP=Pne([Ce("w3m-all-wallets-view")],HP);const xMe=De`
  @keyframes shake {
    0% {
      transform: translateX(0);
    }
    25% {
      transform: translateX(3px);
    }
    50% {
      transform: translateX(-3px);
    }
    75% {
      transform: translateX(3px);
    }
    100% {
      transform: translateX(0);
    }
  }

  wui-flex:first-child:not(:only-child) {
    position: relative;
  }

  wui-loading-thumbnail {
    position: absolute;
  }

  wui-visual {
    width: var(--wui-wallet-image-size-lg);
    height: var(--wui-wallet-image-size-lg);
    border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs));
    position: relative;
    overflow: hidden;
  }

  wui-visual::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    border-radius: calc(var(--wui-border-radius-5xs) * 9 - var(--wui-border-radius-xxs));
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
  }

  wui-icon-box {
    position: absolute;
    right: calc(var(--wui-spacing-3xs) * -1);
    bottom: calc(var(--wui-spacing-3xs) * -1);
    opacity: 0;
    transform: scale(0.5);
    transition:
      opacity var(--wui-ease-out-power-2) var(--wui-duration-lg),
      transform var(--wui-ease-out-power-2) var(--wui-duration-lg);
    will-change: opacity, transform;
  }

  wui-text[align='center'] {
    width: 100%;
    padding: 0px var(--wui-spacing-l);
  }

  [data-error='true'] wui-icon-box {
    opacity: 1;
    transform: scale(1);
  }

  [data-error='true'] > wui-flex:first-child {
    animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  }

  [data-retry='false'] wui-link {
    display: none;
  }

  [data-retry='true'] wui-link {
    display: block;
    opacity: 1;
  }

  wui-link {
    padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);
  }
`;var _u=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let ac=class extends Te{constructor(){super(),this.unsubscribe=[],this.selectedOnRampProvider=Tr.state.selectedProvider,this.uri=tn.state.wcUri,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.error=!1,this.startTime=null,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(Tr.subscribeKey("selectedProvider",e=>{this.selectedOnRampProvider=e})),this.watchTransactions()}disconnectedCallback(){this.intervalId&&clearInterval(this.intervalId)}render(){var r,i;let e="Continue in external window";this.error?e="Buy failed":this.selectedOnRampProvider&&(e=`Buy in ${(r=this.selectedOnRampProvider)==null?void 0:r.label}`);const n=this.error?"Buy can be declined from your side or due to and error on the provider app":"We’ll notify you once your Buy is processed";return K`
      <wui-flex
        data-error=${gt(this.error)}
        data-retry=${this.showRetry}
        flexDirection="column"
        alignItems="center"
        .padding=${["3xl","xl","xl","xl"]}
        gap="xl"
      >
        <wui-flex justifyContent="center" alignItems="center">
          <wui-visual
            name=${gt((i=this.selectedOnRampProvider)==null?void 0:i.name)}
            size="lg"
            class="provider-image"
          >
          </wui-visual>

          ${this.error?null:this.loaderTemplate()}

          <wui-icon-box
            backgroundColor="error-100"
            background="opaque"
            iconColor="error-100"
            icon="close"
            size="sm"
            border
            borderColor="wui-color-bg-125"
          ></wui-icon-box>
        </wui-flex>

        <wui-flex flexDirection="column" alignItems="center" gap="xs">
          <wui-text variant="paragraph-500" color=${this.error?"error-100":"fg-100"}>
            ${e}
          </wui-text>
          <wui-text align="center" variant="small-500" color="fg-200">${n}</wui-text>
        </wui-flex>

        ${this.error?this.tryAgainTemplate():null}
      </wui-flex>

      <wui-flex .padding=${["0","xl","xl","xl"]} justifyContent="center">
        <wui-link @click=${this.onCopyUri} color="fg-200">
          <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
          Copy link
        </wui-link>
      </wui-flex>
    `}watchTransactions(){if(this.selectedOnRampProvider)switch(this.selectedOnRampProvider.name){case"coinbase":this.startTime=Date.now(),this.initializeCoinbaseTransactions();break}}async initializeCoinbaseTransactions(){await this.watchCoinbaseTransactions(),this.intervalId=setInterval(()=>this.watchCoinbaseTransactions(),4e3)}async watchCoinbaseTransactions(){try{const e=Ne.state.address,n=pt.state.projectId;if(!e)throw new Error("No address found");(await wi.fetchTransactions({account:e,onramp:"coinbase",projectId:n})).data.filter(s=>new Date(s.metadata.minedAt)>new Date(this.startTime)||s.metadata.status==="ONRAMP_TRANSACTION_STATUS_IN_PROGRESS").length?(clearInterval(this.intervalId),ke.replace("OnRampActivity")):this.startTime&&Date.now()-this.startTime>=18e4&&(clearInterval(this.intervalId),this.error=!0)}catch(e){Ht.showError(e)}}onTryAgain(){this.selectedOnRampProvider&&(this.error=!1,st.openHref(this.selectedOnRampProvider.url,"popupWindow","width=600,height=800,scrollbars=yes"))}tryAgainTemplate(){var e;return(e=this.selectedOnRampProvider)!=null&&e.url?K`<wui-button size="md" variant="accent" @click=${this.onTryAgain.bind(this)}>
      <wui-icon color="inherit" slot="iconLeft" name="refresh"></wui-icon>
      Try again
    </wui-button>`:null}loaderTemplate(){const e=Oi.state.themeVariables["--w3m-border-radius-master"],n=e?parseInt(e.replace("px",""),10):4;return K`<wui-loading-thumbnail radius=${n*9}></wui-loading-thumbnail>`}onCopyUri(){var e;if(!((e=this.selectedOnRampProvider)!=null&&e.url)){Ht.showError("No link found"),ke.goBack();return}try{st.copyToClopboard(this.selectedOnRampProvider.url),Ht.showSuccess("Link copied")}catch{Ht.showError("Failed to copy")}}};ac.styles=xMe;_u([pe()],ac.prototype,"intervalId",void 0);_u([pe()],ac.prototype,"selectedOnRampProvider",void 0);_u([pe()],ac.prototype,"uri",void 0);_u([pe()],ac.prototype,"ready",void 0);_u([pe()],ac.prototype,"showRetry",void 0);_u([pe()],ac.prototype,"buffering",void 0);_u([pe()],ac.prototype,"error",void 0);_u([pe()],ac.prototype,"startTime",void 0);_u([ne({type:Boolean})],ac.prototype,"isMobile",void 0);_u([ne()],ac.prototype,"onRetry",void 0);ac=_u([Ce("w3m-buy-in-progress-view")],ac);const _Me=De`
  :host > wui-flex {
    max-height: clamp(360px, 540px, 80vh);
    scrollbar-width: none;
    overflow-y: scroll;
    overflow-x: hidden;
  }

  :host > wui-flex::-webkit-scrollbar {
    display: none;
  }

  .all-wallets {
    flex-flow: column;
  }
`;var One=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let jC=class extends Te{constructor(){super(),this.unsubscribe=[],this.connectors=Pt.state.connectors,this.unsubscribe.push(Pt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return K`
      <wui-flex flexDirection="column" .padding=${["3xs","s","s","s"]}>
        <w3m-email-login-widget></w3m-email-login-widget>
        <w3m-social-login-widget></w3m-social-login-widget>
        ${this.walletListTemplate()}
      </wui-flex>
      <w3m-legal-footer></w3m-legal-footer>
    `}walletListTemplate(){const e=this.connectors.find(n=>n.type==="AUTH");return e!=null&&e.socials?e!=null&&e.showWallets?K`
          <wui-flex flexDirection="column" gap="xs" .margin=${["xs","0","0","0"]}>
            <w3m-connector-list></w3m-connector-list>
            <wui-flex class="all-wallets">
              <w3m-all-wallets-widget></w3m-all-wallets-widget>
            </wui-flex>
          </wui-flex>
        `:K`<wui-list-button
        @click=${this.onContinueWalletClick.bind(this)}
        text="Continue with a wallet"
      ></wui-list-button>`:K`<w3m-wallet-login-list></w3m-wallet-login-list>`}onContinueWalletClick(){ke.push("ConnectWallets")}};jC.styles=_Me;One([pe()],jC.prototype,"connectors",void 0);jC=One([Ce("w3m-connect-view")],jC);const cn={WALLET_CONNECT_CONNECTOR_ID:"walletConnect",INJECTED_CONNECTOR_ID:"injected",WALLET_STANDARD_CONNECTOR_ID:"announced",COINBASE_CONNECTOR_ID:"coinbaseWallet",COINBASE_SDK_CONNECTOR_ID:"coinbaseWalletSDK",SAFE_CONNECTOR_ID:"safe",LEDGER_CONNECTOR_ID:"ledger",EIP6963_CONNECTOR_ID:"eip6963",AUTH_CONNECTOR_ID:"w3mAuth",EIP155:"eip155",ADD_CHAIN_METHOD:"wallet_addEthereumChain",EIP6963_ANNOUNCE_EVENT:"eip6963:announceProvider",EIP6963_REQUEST_EVENT:"eip6963:requestProvider",CONNECTOR_RDNS_MAP:{coinbaseWallet:"com.coinbase.wallet",coinbaseWalletSDK:"com.coinbase.wallet"},VERSION:"5.0.11"},Bf={ConnectorExplorerIds:{[cn.COINBASE_CONNECTOR_ID]:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",[cn.COINBASE_SDK_CONNECTOR_ID]:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",[cn.SAFE_CONNECTOR_ID]:"225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f",[cn.LEDGER_CONNECTOR_ID]:"19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927"},EIP155NetworkImageIds:{1:"ba0ba0cd-17c6-4806-ad93-f9d174f17900",42161:"3bff954d-5cb0-47a0-9a23-d20192e74600",43114:"30c46e53-e989-45fb-4549-be3bd4eb3b00",56:"93564157-2e8e-4ce7-81df-b264dbee9b00",250:"06b26297-fe0c-4733-5d6b-ffa5498aac00",10:"ab9c186a-c52f-464b-2906-ca59d760a400",137:"41d04d42-da3b-4453-8506-668cc0727900",100:"02b53f6a-e3d4-479e-1cb4-21178987d100",9001:"f926ff41-260d-4028-635e-91913fc28e00",324:"b310f07f-4ef7-49f3-7073-2a0a39685800",314:"5a73b3dd-af74-424e-cae0-0de859ee9400",4689:"34e68754-e536-40da-c153-6ef2e7188a00",1088:"3897a66d-40b9-4833-162f-a2c90531c900",1284:"161038da-44ae-4ec7-1208-0ea569454b00",1285:"f1d73bb6-5450-4e18-38f7-fb6484264a00",7777777:"845c60df-d429-4991-e687-91ae45791600",42220:"ab781bbc-ccc6-418d-d32d-789b15da1f00",8453:"7289c336-3981-4081-c5f4-efc26ac64a00",1313161554:"3ff73439-a619-4894-9262-4470c773a100",2020:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",2021:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00","5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":"a1b58899-f671-4276-6a5e-56ca5bd59700","4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z":"a1b58899-f671-4276-6a5e-56ca5bd59700",EtWTRABZaYq6iMfeYKouRu166VU2xqa1:"a1b58899-f671-4276-6a5e-56ca5bd59700"},ConnectorImageIds:{[cn.COINBASE_CONNECTOR_ID]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[cn.COINBASE_SDK_CONNECTOR_ID]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[cn.SAFE_CONNECTOR_ID]:"461db637-8616-43ce-035a-d89b8a1d5800",[cn.LEDGER_CONNECTOR_ID]:"54a1aa77-d202-4f8d-0fb2-5d2bb6db0300",[cn.WALLET_CONNECT_CONNECTOR_ID]:"ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400",[cn.INJECTED_CONNECTOR_ID]:"07ba87ed-43aa-4adf-4540-9e6a2b9cae00"},ConnectorNamesMap:{[cn.INJECTED_CONNECTOR_ID]:"Browser Wallet",[cn.WALLET_CONNECT_CONNECTOR_ID]:"WalletConnect",[cn.COINBASE_CONNECTOR_ID]:"Coinbase",[cn.COINBASE_SDK_CONNECTOR_ID]:"Coinbase",[cn.LEDGER_CONNECTOR_ID]:"Ledger",[cn.SAFE_CONNECTOR_ID]:"Safe"},ConnectorTypesMap:{[cn.INJECTED_CONNECTOR_ID]:"INJECTED",[cn.WALLET_CONNECT_CONNECTOR_ID]:"WALLET_CONNECT",[cn.EIP6963_CONNECTOR_ID]:"ANNOUNCED",[cn.AUTH_CONNECTOR_ID]:"AUTH"},WalletConnectRpcChainIds:[1,5,11155111,10,420,42161,421613,137,80001,42220,1313161554,1313161555,56,97,43114,43113,100,8453,84531,7777777,999,324,280]},AMe={getCaipTokens(t){if(!t)return;const e={};return Object.entries(t).forEach(([n,r])=>{e[`${cn.EIP155}:${n}`]=r}),e}};var LC;(function(t){t.Google="google",t.Github="github",t.Apple="apple",t.Facebook="facebook",t.X="x",t.Discord="discord",t.Farcaster="farcaster"})(LC||(LC={}));const EMe=De`
  @keyframes shake {
    0% {
      transform: translateX(0);
    }
    25% {
      transform: translateX(3px);
    }
    50% {
      transform: translateX(-3px);
    }
    75% {
      transform: translateX(3px);
    }
    100% {
      transform: translateX(0);
    }
  }

  wui-flex:first-child:not(:only-child) {
    position: relative;
  }

  wui-loading-thumbnail {
    position: absolute;
  }

  wui-icon-box {
    position: absolute;
    right: calc(var(--wui-spacing-3xs) * -1);
    bottom: calc(var(--wui-spacing-3xs) * -1);
    opacity: 0;
    transform: scale(0.5);
    transition-property: opacity, transform;
    transition-duration: var(--wui-duration-lg);
    transition-timing-function: var(--wui-ease-out-power-2);
    will-change: opacity, transform;
  }

  wui-text[align='center'] {
    width: 100%;
    padding: 0px var(--wui-spacing-l);
  }

  [data-error='true'] wui-icon-box {
    opacity: 1;
    transform: scale(1);
  }

  [data-error='true'] > wui-flex:first-child {
    animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  }

  [data-retry='false'] wui-link {
    display: none;
  }

  [data-retry='true'] wui-link {
    display: block;
    opacity: 1;
  }
`;var D1=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};class ja extends Te{constructor(){var e,n,r,i;super(),this.wallet=(e=ke.state.data)==null?void 0:e.wallet,this.connector=(n=ke.state.data)==null?void 0:n.connector,this.timeout=void 0,this.secondaryBtnLabel="Try again",this.secondaryBtnIcon="refresh",this.secondaryLabel="Accept connection request in the wallet",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=kr.getWalletImage(this.wallet)??kr.getConnectorImage(this.connector),this.name=((r=this.wallet)==null?void 0:r.name)??((i=this.connector)==null?void 0:i.name)??"Wallet",this.isRetrying=!1,this.uri=tn.state.wcUri,this.error=tn.state.wcError,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(tn.subscribeKey("wcUri",s=>{var o;this.uri=s,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,(o=this.onConnect)==null||o.call(this))}),tn.subscribeKey("wcError",s=>this.error=s),tn.subscribeKey("buffering",s=>this.buffering=s))}firstUpdated(){var e;(e=this.onAutoConnect)==null||e.call(this),this.showRetry=!this.onAutoConnect}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),clearTimeout(this.timeout)}render(){var r;(r=this.onRender)==null||r.call(this),this.onShowRetry();const e=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel;let n=`Continue in ${this.name}`;return this.buffering&&(n="Connecting..."),this.error&&(n="Connection declined"),K`
      <wui-flex
        data-error=${gt(this.error)}
        data-retry=${this.showRetry}
        flexDirection="column"
        alignItems="center"
        .padding=${["3xl","xl","xl","xl"]}
        gap="xl"
      >
        <wui-flex justifyContent="center" alignItems="center">
          <wui-wallet-image size="lg" imageSrc=${gt(this.imageSrc)}></wui-wallet-image>

          ${this.error?null:this.loaderTemplate()}

          <wui-icon-box
            backgroundColor="error-100"
            background="opaque"
            iconColor="error-100"
            icon="close"
            size="sm"
            border
            borderColor="wui-color-bg-125"
          ></wui-icon-box>
        </wui-flex>

        <wui-flex flexDirection="column" alignItems="center" gap="xs">
          <wui-text variant="paragraph-500" color=${this.error?"error-100":"fg-100"}>
            ${n}
          </wui-text>
          <wui-text align="center" variant="small-500" color="fg-200">${e}</wui-text>
        </wui-flex>

        <wui-button
          variant="accent"
          size="md"
          ?disabled=${!this.error&&this.buffering}
          @click=${this.onTryAgain.bind(this)}
        >
          <wui-icon color="inherit" slot="iconLeft" name=${this.secondaryBtnIcon}></wui-icon>
          ${this.secondaryBtnLabel}
        </wui-button>
      </wui-flex>

      ${this.isWalletConnect?K`
            <wui-flex .padding=${["0","xl","xl","xl"]} justifyContent="center">
              <wui-link @click=${this.onCopyUri} color="fg-200">
                <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
                Copy link
              </wui-link>
            </wui-flex>
          `:null}

      <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
    `}onShowRetry(){var e;if(this.error&&!this.showRetry){this.showRetry=!0;const n=(e=this.shadowRoot)==null?void 0:e.querySelector("wui-button");n==null||n.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}onTryAgain(){var e,n;this.buffering||(tn.setWcError(!1),this.onRetry?(this.isRetrying=!0,(e=this.onRetry)==null||e.call(this)):(n=this.onConnect)==null||n.call(this))}loaderTemplate(){const e=Oi.state.themeVariables["--w3m-border-radius-master"],n=e?parseInt(e.replace("px",""),10):4;return K`<wui-loading-thumbnail radius=${n*9}></wui-loading-thumbnail>`}onCopyUri(){try{this.uri&&(st.copyToClopboard(this.uri),Ht.showSuccess("Link copied"))}catch{Ht.showError("Failed to copy")}}}ja.styles=EMe;D1([pe()],ja.prototype,"uri",void 0);D1([pe()],ja.prototype,"error",void 0);D1([pe()],ja.prototype,"ready",void 0);D1([pe()],ja.prototype,"showRetry",void 0);D1([pe()],ja.prototype,"buffering",void 0);D1([ne({type:Boolean})],ja.prototype,"isMobile",void 0);D1([ne()],ja.prototype,"onRetry",void 0);var CMe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let lq=class extends ja{constructor(){if(super(),!this.connector)throw new Error("w3m-connecting-view: No connector provided");wt.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.connector.name??"Unknown",platform:"browser"}}),this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),this.isWalletConnect=!1}async onConnectProxy(){try{this.error=!1,this.connector&&(this.connector.imageUrl&&er.setConnectedWalletImageUrl(this.connector.imageUrl),(this.connector.id!==cn.COINBASE_SDK_CONNECTOR_ID||!this.error)&&(await tn.connectExternal(this.connector),pt.state.isSiweEnabled?ke.push("ConnectingSiwe"):dn.close(),wt.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:this.connector.name||"Unknown"}})))}catch(e){wt.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(e==null?void 0:e.message)??"Unknown"}}),this.error=!0}}};lq=CMe([Ce("w3m-connecting-external-view")],lq);var x$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let UC=class extends Te{constructor(){var e;super(),this.interval=void 0,this.lastRetry=Date.now(),this.wallet=(e=ke.state.data)==null?void 0:e.wallet,this.platform=void 0,this.platforms=[],this.initializeConnection(),this.interval=setInterval(this.initializeConnection.bind(this),os.TEN_SEC_MS)}disconnectedCallback(){clearTimeout(this.interval)}render(){return this.wallet?(this.determinePlatforms(),K`
      ${this.headerTemplate()}
      <div>${this.platformTemplate()}</div>
    `):K`<w3m-connecting-wc-qrcode></w3m-connecting-wc-qrcode>`}async initializeConnection(e=!1){try{const{wcPairingExpiry:n}=tn.state;if(e||st.isPairingExpired(n)){if(this.wallet){const r=kr.getWalletImage(this.wallet);r&&er.setConnectedWalletImageUrl(r)}else{const i=Pt.state.connectors.find(o=>o.type==="WALLET_CONNECT"),s=kr.getConnectorImage(i);s&&er.setConnectedWalletImageUrl(s)}if(await tn.connectWalletConnect(),this.finalizeConnection(),er.getConnectedConnector()==="AUTH"&&pt.state.hasMultipleAddresses)ke.push("SelectAddresses");else if(pt.state.isSiweEnabled){const{SIWEController:r}=await Sa(async()=>{const{SIWEController:i}=await import("./index-Dgmma2CZ.js");return{SIWEController:i}},[]);r.state.status==="success"?dn.close():ke.push("ConnectingSiwe")}else dn.close()}}catch(n){wt.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(n==null?void 0:n.message)??"Unknown"}}),tn.setWcError(!0),st.isAllowedRetry(this.lastRetry)&&(Ht.showError("Declined"),this.lastRetry=Date.now(),this.initializeConnection(!0))}}finalizeConnection(){var r;const{wcLinking:e,recentWallet:n}=tn.state;e&&er.setWalletConnectDeepLink(e),n&&er.setWeb3ModalRecent(n),wt.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:e?"mobile":"qrcode",name:((r=this.wallet)==null?void 0:r.name)||"Unknown"}})}determinePlatforms(){if(!this.wallet)throw new Error("w3m-connecting-wc-view:determinePlatforms No wallet");if(this.platform)return;const{mobile_link:e,desktop_link:n,webapp_link:r,injected:i,rdns:s}=this.wallet,o=i==null?void 0:i.map(({injected_id:w})=>w).filter(Boolean),a=s?[s]:o??[],c=pt.state.isUniversalProvider?!1:a.length,l=e,u=r,d=tn.checkInstalled(a),h=c&&d,g=n&&!st.isMobile();h&&this.platforms.push("browser"),l&&this.platforms.push(st.isMobile()?"mobile":"qrcode"),u&&this.platforms.push("web"),g&&this.platforms.push("desktop"),!h&&c&&this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return K`<w3m-connecting-wc-browser></w3m-connecting-wc-browser>`;case"desktop":return K`
          <w3m-connecting-wc-desktop .onRetry=${()=>this.initializeConnection(!0)}>
          </w3m-connecting-wc-desktop>
        `;case"web":return K`
          <w3m-connecting-wc-web .onRetry=${()=>this.initializeConnection(!0)}>
          </w3m-connecting-wc-web>
        `;case"mobile":return K`
          <w3m-connecting-wc-mobile isMobile .onRetry=${()=>this.initializeConnection(!0)}>
          </w3m-connecting-wc-mobile>
        `;case"qrcode":return K`<w3m-connecting-wc-qrcode></w3m-connecting-wc-qrcode>`;default:return K`<w3m-connecting-wc-unsupported></w3m-connecting-wc-unsupported>`}}headerTemplate(){return this.platforms.length>1?K`
      <w3m-connecting-header
        .platforms=${this.platforms}
        .onSelectPlatfrom=${this.onSelectPlatform.bind(this)}
      >
      </w3m-connecting-header>
    `:null}async onSelectPlatform(e){var r;const n=(r=this.shadowRoot)==null?void 0:r.querySelector("div");n&&(await n.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=e,n.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}};x$([pe()],UC.prototype,"platform",void 0);x$([pe()],UC.prototype,"platforms",void 0);UC=x$([Ce("w3m-connecting-wc-view")],UC);const SMe=De`
  .continue-button-container {
    width: 100%;
  }
`;var Dne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let FC=class extends Te{constructor(){super(...arguments),this.loading=!1}render(){return K`
      <wui-flex
        flexDirection="column"
        alignItems="center"
        gap="xxl"
        .padding=${["0","0","l","0"]}
      >
        ${this.onboardingTemplate()} ${this.buttonsTemplate()}
        <wui-link
          @click=${()=>{st.openHref(GB.URLS.FAQ,"_blank")}}
        >
          Learn more about names
          <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon>
        </wui-link>
      </wui-flex>
    `}onboardingTemplate(){return K` <wui-flex
      flexDirection="column"
      gap="xxl"
      alignItems="center"
      .padding=${["0","xxl","0","xxl"]}
    >
      <wui-flex gap="s" alignItems="center" justifyContent="center">
        <wui-icon-box
          icon="id"
          size="xl"
          iconSize="xxl"
          iconColor="fg-200"
          backgroundColor="fg-200"
        ></wui-icon-box>
      </wui-flex>
      <wui-flex flexDirection="column" alignItems="center" gap="s">
        <wui-text align="center" variant="medium-600" color="fg-100">
          Choose your account name
        </wui-text>
        <wui-text align="center" variant="paragraph-400" color="fg-100">
          Finally say goodbye to 0x addresses, name your account to make it easier to exchange
          assets
        </wui-text>
      </wui-flex>
    </wui-flex>`}buttonsTemplate(){return K`<wui-flex
      .padding=${["0","2l","0","2l"]}
      gap="s"
      class="continue-button-container"
    >
      <wui-button
        fullWidth
        .loading=${this.loading}
        size="lg"
        borderRadius="xs"
        @click=${this.handleContinue.bind(this)}
        >Choose name
      </wui-button>
    </wui-flex>`}handleContinue(){ke.push("RegisterAccountName"),wt.sendEvent({type:"track",event:"OPEN_ENS_FLOW",properties:{isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT}})}};FC.styles=SMe;Dne([pe()],FC.prototype,"loading",void 0);FC=Dne([Ce("w3m-choose-account-name-view")],FC);var TMe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let uq=class extends Te{constructor(){var e;super(...arguments),this.wallet=(e=ke.state.data)==null?void 0:e.wallet}render(){if(!this.wallet)throw new Error("w3m-downloads-view");return K`
      <wui-flex gap="xs" flexDirection="column" .padding=${["s","s","l","s"]}>
        ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()}
        ${this.homepageTemplate()}
      </wui-flex>
    `}chromeTemplate(){var e;return(e=this.wallet)!=null&&e.chrome_store?K`<wui-list-item
      variant="icon"
      icon="chromeStore"
      iconVariant="square"
      @click=${this.onChromeStore.bind(this)}
      chevron
    >
      <wui-text variant="paragraph-500" color="fg-100">Chrome Extension</wui-text>
    </wui-list-item>`:null}iosTemplate(){var e;return(e=this.wallet)!=null&&e.app_store?K`<wui-list-item
      variant="icon"
      icon="appStore"
      iconVariant="square"
      @click=${this.onAppStore.bind(this)}
      chevron
    >
      <wui-text variant="paragraph-500" color="fg-100">iOS App</wui-text>
    </wui-list-item>`:null}androidTemplate(){var e;return(e=this.wallet)!=null&&e.play_store?K`<wui-list-item
      variant="icon"
      icon="playStore"
      iconVariant="square"
      @click=${this.onPlayStore.bind(this)}
      chevron
    >
      <wui-text variant="paragraph-500" color="fg-100">Android App</wui-text>
    </wui-list-item>`:null}homepageTemplate(){var e;return(e=this.wallet)!=null&&e.homepage?K`
      <wui-list-item
        variant="icon"
        icon="browser"
        iconVariant="square-blue"
        @click=${this.onHomePage.bind(this)}
        chevron
      >
        <wui-text variant="paragraph-500" color="fg-100">Website</wui-text>
      </wui-list-item>
    `:null}onChromeStore(){var e;(e=this.wallet)!=null&&e.chrome_store&&st.openHref(this.wallet.chrome_store,"_blank")}onAppStore(){var e;(e=this.wallet)!=null&&e.app_store&&st.openHref(this.wallet.app_store,"_blank")}onPlayStore(){var e;(e=this.wallet)!=null&&e.play_store&&st.openHref(this.wallet.play_store,"_blank")}onHomePage(){var e;(e=this.wallet)!=null&&e.homepage&&st.openHref(this.wallet.homepage,"_blank")}};uq=TMe([Ce("w3m-downloads-view")],uq);var IMe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const kMe="https://walletconnect.com/explorer";let dq=class extends Te{render(){return K`
      <wui-flex flexDirection="column" .padding=${["0","s","s","s"]} gap="xs">
        ${this.recommendedWalletsTemplate()}
        <wui-list-wallet
          name="Explore all"
          showAllWallets
          walletIcon="allWallets"
          icon="externalLink"
          @click=${()=>{st.openHref("https://walletconnect.com/explorer?type=wallet","_blank")}}
        ></wui-list-wallet>
      </wui-flex>
    `}recommendedWalletsTemplate(){const{recommended:e,featured:n}=Qt.state,{customWallets:r}=pt.state;return[...n,...r??[],...e].slice(0,4).map(s=>K`
        <wui-list-wallet
          name=${s.name??"Unknown"}
          tagVariant="main"
          imageSrc=${gt(kr.getWalletImage(s))}
          @click=${()=>{st.openHref(s.homepage??kMe,"_blank")}}
        ></wui-list-wallet>
      `)}};dq=IMe([Ce("w3m-get-wallet-view")],dq);const RMe=De`
  wui-flex {
    width: 100%;
  }

  .suggestion {
    background: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-xs);
  }

  .suggestion:hover {
    background-color: var(--wui-color-gray-glass-005);
    cursor: pointer;
  }

  .suggested-name {
    max-width: 75%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  form {
    width: 100%;
  }

  wui-icon-link {
    position: absolute;
    right: 20px;
    transform: translateY(11px);
  }
`;var Y0=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let xd=class extends Te{constructor(){super(),this.formRef=A0(),this.usubscribe=[],this.name="",this.error="",this.loading=Wu.state.loading,this.suggestions=Wu.state.suggestions,this.registered=!1,this.profileName=Ne.state.profileName,this.onDebouncedNameInputChange=st.debounce(e=>{Wu.validateName(e)?(this.error="",this.name=e,Wu.getSuggestions(e),Wu.isNameRegistered(e).then(n=>{this.registered=n})):e.length<4?this.error="Name must be at least 4 characters long":this.error="Can only contain letters, numbers and - characters"}),this.usubscribe.push(Wu.subscribe(e=>{this.suggestions=e.suggestions,this.loading=e.loading}),Ne.subscribeKey("profileName",e=>{this.profileName=e,e&&(this.error="You already own a name")}))}firstUpdated(){var e;(e=this.formRef.value)==null||e.addEventListener("keydown",this.onEnterKey.bind(this))}disconnectedCallback(){var e;super.disconnectedCallback(),this.usubscribe.forEach(n=>n()),(e=this.formRef.value)==null||e.removeEventListener("keydown",this.onEnterKey.bind(this))}render(){return K`
      <wui-flex
        flexDirection="column"
        alignItems="center"
        gap="m"
        .padding=${["0","s","m","s"]}
      >
        <form ${E0(this.formRef)} @submit=${this.onSubmitName.bind(this)}>
          <wui-ens-input
            @inputChange=${this.onNameInputChange.bind(this)}
            .errorMessage=${this.error}
            .value=${this.name}
          >
          </wui-ens-input>
          ${this.submitButtonTemplate()}
          <input type="submit" hidden />
        </form>
        ${this.templateSuggestions()}
      </wui-flex>
    `}submitButtonTemplate(){return this.isAllowedToSubmit()?K`
          <wui-icon-link
            size="sm"
            icon="chevronRight"
            iconcolor="accent-100"
            @click=${this.onSubmitName.bind(this)}
          >
          </wui-icon-link>
        `:null}onSelectSuggestion(e){return()=>{this.name=e,this.registered=!1,this.requestUpdate()}}onNameInputChange(e){this.onDebouncedNameInputChange(e.detail)}nameSuggestionTagTemplate(){return this.loading?K`<wui-loading-spinner size="lg" color="fg-100"></wui-loading-spinner>`:this.registered?K`<wui-tag variant="shade" size="lg">Registered</wui-tag>`:K`<wui-tag variant="success" size="lg">Available</wui-tag>`}templateSuggestions(){if(!this.name||this.name.length<4||this.error)return null;const e=this.registered?this.suggestions.filter(n=>n.name!==this.name):[];return K`<wui-flex flexDirection="column" gap="xxs" alignItems="center">
      <wui-flex
        .padding=${["m","m","m","m"]}
        justifyContent="space-between"
        class="suggestion"
      >
        <wui-text color="fg-100" variant="paragraph-400" class="suggested-name">
          ${this.name}</wui-text
        >${this.nameSuggestionTagTemplate()}
      </wui-flex>
      ${e.map(n=>this.availableNameTemplate(n.name))}
    </wui-flex>`}availableNameTemplate(e){return K` <wui-flex
      .padding=${["m","m","m","m"]}
      justifyContent="space-between"
      class="suggestion"
      @click=${this.onSelectSuggestion(e)}
    >
      <wui-text color="fg-100" variant="paragraph-400" class="suggested-name">
        ${e}
      </wui-text>
      <wui-tag variant="success" size="lg">Available</wui-tag>
    </wui-flex>`}isAllowedToSubmit(){return!this.loading&&!this.registered&&!this.error&&!this.profileName&&Wu.validateName(this.name)}async onSubmitName(){try{if(!this.isAllowedToSubmit())return;wt.sendEvent({type:"track",event:"REGISTER_NAME_INITIATED",properties:{isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:this.name}}),await Wu.registerName(this.name),wt.sendEvent({type:"track",event:"REGISTER_NAME_SUCCESS",properties:{isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:this.name}})}catch(e){Ht.showError(e.message),wt.sendEvent({type:"track",event:"REGISTER_NAME_ERROR",properties:{isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:this.name,error:(e==null?void 0:e.message)||"Unknown error"}})}}onEnterKey(e){e.key==="Enter"&&this.isAllowedToSubmit()&&this.onSubmitName()}};xd.styles=RMe;Y0([ne()],xd.prototype,"errorMessage",void 0);Y0([pe()],xd.prototype,"name",void 0);Y0([pe()],xd.prototype,"error",void 0);Y0([pe()],xd.prototype,"loading",void 0);Y0([pe()],xd.prototype,"suggestions",void 0);Y0([pe()],xd.prototype,"registered",void 0);Y0([pe()],xd.prototype,"profileName",void 0);xd=Y0([Ce("w3m-register-account-name-view")],xd);const NMe=De`
  .continue-button-container {
    width: 100%;
  }
`;var PMe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let WP=class extends Te{render(){return K`
      <wui-flex
        flexDirection="column"
        alignItems="center"
        gap="xxl"
        .padding=${["0","0","l","0"]}
      >
        ${this.onboardingTemplate()} ${this.buttonsTemplate()}
        <wui-link
          @click=${()=>{st.openHref(GB.URLS.FAQ,"_blank")}}
        >
          Learn more
          <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon>
        </wui-link>
      </wui-flex>
    `}onboardingTemplate(){return K` <wui-flex
      flexDirection="column"
      gap="xxl"
      alignItems="center"
      .padding=${["0","xxl","0","xxl"]}
    >
      <wui-flex gap="s" alignItems="center" justifyContent="center">
        <wui-icon-box
          size="xl"
          iconcolor="success-100"
          backgroundcolor="success-100"
          icon="checkmark"
          background="opaque"
        ></wui-icon-box>
      </wui-flex>
      <wui-flex flexDirection="column" alignItems="center" gap="s">
        <wui-text align="center" variant="medium-600" color="fg-100">
          Account name chosen successfully
        </wui-text>
        <wui-text align="center" variant="paragraph-400" color="fg-100">
          You can now fund your account and trade crypto
        </wui-text>
      </wui-flex>
    </wui-flex>`}buttonsTemplate(){return K`<wui-flex
      .padding=${["0","2l","0","2l"]}
      gap="s"
      class="continue-button-container"
    >
      <wui-button fullWidth size="lg" borderRadius="xs" @click=${this.redirectToAccount.bind(this)}
        >Let's Go!
      </wui-button>
    </wui-flex>`}redirectToAccount(){ke.replace("Account")}};WP.styles=NMe;WP=PMe([Ce("w3m-register-account-name-success-view")],WP);const OMe=De`
  @keyframes shake {
    0% {
      transform: translateX(0);
    }
    25% {
      transform: translateX(3px);
    }
    50% {
      transform: translateX(-3px);
    }
    75% {
      transform: translateX(3px);
    }
    100% {
      transform: translateX(0);
    }
  }

  wui-flex:first-child:not(:only-child) {
    position: relative;
  }

  wui-loading-hexagon {
    position: absolute;
  }

  wui-icon-box {
    position: absolute;
    right: 4px;
    bottom: 0;
    opacity: 0;
    transform: scale(0.5);
    z-index: 1;
  }

  wui-button {
    display: none;
  }

  [data-error='true'] wui-icon-box {
    opacity: 1;
    transform: scale(1);
  }

  [data-error='true'] > wui-flex:first-child {
    animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  }

  wui-button[data-retry='true'] {
    display: block;
    opacity: 1;
  }
`,_$={onNetworkChange:async()=>{var t,e;if(pt.state.isSiweEnabled){const{SIWEController:n}=await Sa(async()=>{const{SIWEController:r}=await import("./index-Dgmma2CZ.js");return{SIWEController:r}},[]);(e=(t=n.state._client)==null?void 0:t.options)!=null&&e.signOutOnNetworkChange?await n.signOut():PP.navigateAfterNetworkSwitch()}else PP.navigateAfterNetworkSwitch()}};var A$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let gx=class extends Te{constructor(){var e;super(),this.network=(e=ke.state.data)==null?void 0:e.network,this.unsubscribe=[],this.showRetry=!1,this.error=!1}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){this.onSwitchNetwork()}render(){if(!this.network)throw new Error("w3m-network-switch-view: No network provided");this.onShowRetry();const e=this.getLabel(),n=this.getSubLabel();return K`
      <wui-flex
        data-error=${this.error}
        flexDirection="column"
        alignItems="center"
        .padding=${["3xl","xl","3xl","xl"]}
        gap="xl"
      >
        <wui-flex justifyContent="center" alignItems="center">
          <wui-network-image
            size="lg"
            imageSrc=${gt(kr.getNetworkImage(this.network))}
          ></wui-network-image>

          ${this.error?null:K`<wui-loading-hexagon></wui-loading-hexagon>`}

          <wui-icon-box
            backgroundColor="error-100"
            background="opaque"
            iconColor="error-100"
            icon="close"
            size="sm"
            ?border=${!0}
            borderColor="wui-color-bg-125"
          ></wui-icon-box>
        </wui-flex>

        <wui-flex flexDirection="column" alignItems="center" gap="xs">
          <wui-text align="center" variant="paragraph-500" color="fg-100">${e}</wui-text>
          <wui-text align="center" variant="small-500" color="fg-200">${n}</wui-text>
        </wui-flex>

        <wui-button
          data-retry=${this.showRetry}
          variant="accent"
          size="md"
          .disabled=${!this.error}
          @click=${this.onSwitchNetwork.bind(this)}
        >
          <wui-icon color="inherit" slot="iconLeft" name="refresh"></wui-icon>
          Try again
        </wui-button>
      </wui-flex>
    `}getSubLabel(){const e=er.getConnectedConnector();return Pt.getAuthConnector()&&e==="AUTH"?"":this.error?"Switch can be declined if chain is not supported by a wallet or previous request is still active":"Accept connection request in your wallet"}getLabel(){var r;const e=er.getConnectedConnector();return Pt.getAuthConnector()&&e==="AUTH"?`Switching to ${((r=this.network)==null?void 0:r.name)??"Unknown"} network...`:this.error?"Switch declined":"Approve in wallet"}onShowRetry(){var e;if(this.error&&!this.showRetry){this.showRetry=!0;const n=(e=this.shadowRoot)==null?void 0:e.querySelector("wui-button");n==null||n.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}async onSwitchNetwork(){try{this.error=!1,this.network&&(await rt.switchActiveNetwork(this.network),await _$.onNetworkChange())}catch{this.error=!0}}};gx.styles=OMe;A$([pe()],gx.prototype,"showRetry",void 0);A$([pe()],gx.prototype,"error",void 0);gx=A$([Ce("w3m-network-switch-view")],gx);const DMe=De`
  :host > wui-grid {
    max-height: 360px;
    overflow: auto;
  }

  wui-grid::-webkit-scrollbar {
    display: none;
  }
`;var E$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let wx=class extends Te{constructor(){super(),this.unsubscribe=[],this.caipNetwork=rt.state.caipNetwork,this.requestedCaipNetworks=rt.getRequestedCaipNetworks(),this.unsubscribe.push(rt.subscribeKey("caipNetwork",e=>this.caipNetwork=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return K`
      <wui-grid padding="s" gridTemplateColumns="repeat(4, 1fr)" rowGap="l" columnGap="xs">
        ${this.networksTemplate()}
      </wui-grid>

      <wui-separator></wui-separator>

      <wui-flex padding="s" flexDirection="column" gap="m" alignItems="center">
        <wui-text variant="small-400" color="fg-300" align="center">
          Your connected wallet may not support some of the networks available for this dApp
        </wui-text>
        <wui-link @click=${this.onNetworkHelp.bind(this)}>
          <wui-icon size="xs" color="accent-100" slot="iconLeft" name="helpCircle"></wui-icon>
          What is a network
        </wui-link>
      </wui-flex>
    `}onNetworkHelp(){wt.sendEvent({type:"track",event:"CLICK_NETWORK_HELP"}),ke.push("WhatIsANetwork")}networksTemplate(){const e=rt.getRequestedCaipNetworks(),n=rt.state.approvedCaipNetworkIds,r=rt.state.supportsAllNetworks,i=st.sortRequestedNetworks(n,e);return i==null?void 0:i.map(s=>{var o;return K`
        <wui-card-select
          .selected=${((o=this.caipNetwork)==null?void 0:o.id)===s.id}
          imageSrc=${gt(kr.getNetworkImage(s))}
          type="network"
          name=${s.name??s.id}
          @click=${()=>this.onSwitchNetwork(s)}
          .disabled=${!r&&!(n!=null&&n.includes(s.id))}
          data-testid=${`w3m-network-switch-${s.name??s.id}`}
        ></wui-card-select>
      `})}async onSwitchNetwork(e){const n=Ne.state.isConnected,r=rt.state.approvedCaipNetworkIds,i=rt.state.supportsAllNetworks,s=rt.state.caipNetwork,o=ke.state.data;n&&(s==null?void 0:s.id)!==e.id?r!=null&&r.includes(e.id)?(await rt.switchActiveNetwork(e),await _$.onNetworkChange()):i&&ke.push("SwitchNetwork",{...o,network:e}):n||(rt.setCaipNetwork(e),ke.push("Connect"))}};wx.styles=DMe;E$([pe()],wx.prototype,"caipNetwork",void 0);E$([pe()],wx.prototype,"requestedCaipNetworks",void 0);wx=E$([Ce("w3m-networks-view")],wx);const MMe=De`
  :host > wui-flex {
    height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    padding: var(--wui-spacing-m);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  :host > wui-flex::-webkit-scrollbar {
    display: none;
  }

  :host > wui-flex > wui-flex {
    width: 100%;
  }

  wui-transaction-list-item-loader {
    width: 100%;
  }
`;var n4=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const BMe=7;let e1=class extends Te{constructor(){super(),this.unsubscribe=[],this.selectedOnRampProvider=Tr.state.selectedProvider,this.loading=!1,this.coinbaseTransactions=lo.state.coinbaseTransactions,this.tokenImages=Rs.state.tokenImages,this.unsubscribe.push(Tr.subscribeKey("selectedProvider",e=>{this.selectedOnRampProvider=e}),Rs.subscribeKey("tokenImages",e=>this.tokenImages=e),()=>{clearTimeout(this.refetchTimeout)},lo.subscribe(e=>{this.coinbaseTransactions={...e.coinbaseTransactions}})),lo.clearCursor(),this.fetchTransactions()}render(){return K`
      <wui-flex flexDirection="column" .padding=${["0","s","s","s"]} gap="xs">
        ${this.loading?this.templateLoading():this.templateTransactionsByYear()}
      </wui-flex>
    `}templateTransactions(e){return e==null?void 0:e.map(n=>{var a,c,l;const r=qB.formatDate((a=n==null?void 0:n.metadata)==null?void 0:a.minedAt),i=n.transfers[0],s=i==null?void 0:i.fungible_info;if(!s)return null;const o=((c=s==null?void 0:s.icon)==null?void 0:c.url)||((l=this.tokenImages)==null?void 0:l[s.symbol||""]);return K`
        <w3m-onramp-activity-item
          label="Bought"
          .completed=${n.metadata.status==="ONRAMP_TRANSACTION_STATUS_SUCCESS"}
          .inProgress=${n.metadata.status==="ONRAMP_TRANSACTION_STATUS_IN_PROGRESS"}
          .failed=${n.metadata.status==="ONRAMP_TRANSACTION_STATUS_FAILED"}
          purchaseCurrency=${gt(s.symbol)}
          purchaseValue=${i.quantity.numeric}
          date=${r}
          icon=${gt(o)}
          symbol=${gt(s.symbol)}
        ></w3m-onramp-activity-item>
      `})}templateTransactionsByYear(){return Object.keys(this.coinbaseTransactions).sort().reverse().map(n=>{const r=parseInt(n,10);return new Array(12).fill(null).map((s,o)=>o).reverse().map(s=>{var c;const o=Ym.getTransactionGroupTitle(r,s),a=(c=this.coinbaseTransactions[r])==null?void 0:c[s];return a?K`
          <wui-flex flexDirection="column">
            <wui-flex
              alignItems="center"
              flexDirection="row"
              .padding=${["xs","s","s","s"]}
            >
              <wui-text variant="paragraph-500" color="fg-200">${o}</wui-text>
            </wui-flex>
            <wui-flex flexDirection="column" gap="xs">
              ${this.templateTransactions(a)}
            </wui-flex>
          </wui-flex>
        `:null})})}async fetchTransactions(){await this.fetchCoinbaseTransactions()}async fetchCoinbaseTransactions(){const e=Ne.state.address,n=pt.state.projectId;if(!e)throw new Error("No address found");if(!n)throw new Error("No projectId found");this.loading=!0,await lo.fetchTransactions(e,"coinbase"),this.loading=!1,this.refetchLoadingTransactions()}refetchLoadingTransactions(){var i;const e=new Date;if((((i=this.coinbaseTransactions[e.getFullYear()])==null?void 0:i[e.getMonth()])||[]).filter(s=>s.metadata.status==="ONRAMP_TRANSACTION_STATUS_IN_PROGRESS").length===0){clearTimeout(this.refetchTimeout);return}this.refetchTimeout=setTimeout(async()=>{const s=Ne.state.address;await lo.fetchTransactions(s,"coinbase"),this.refetchLoadingTransactions()},3e3)}templateLoading(){return Array(BMe).fill(K` <wui-transaction-list-item-loader></wui-transaction-list-item-loader> `).map(e=>e)}};e1.styles=MMe;n4([pe()],e1.prototype,"selectedOnRampProvider",void 0);n4([pe()],e1.prototype,"loading",void 0);n4([pe()],e1.prototype,"coinbaseTransactions",void 0);n4([pe()],e1.prototype,"tokenImages",void 0);e1=n4([Ce("w3m-onramp-activity-view")],e1);const $Me=De`
  :host > wui-grid {
    max-height: 360px;
    overflow: auto;
  }

  wui-grid::-webkit-scrollbar {
    display: none;
  }
`;var _9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Lv=class extends Te{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=Tr.state.paymentCurrency,this.currencies=Tr.state.paymentCurrencies,this.currencyImages=Rs.state.currencyImages,this.unsubscribe.push(Tr.subscribe(e=>{this.selectedCurrency=e.paymentCurrency,this.currencies=e.paymentCurrencies}),Rs.subscribeKey("currencyImages",e=>this.currencyImages=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return K`
      <wui-flex flexDirection="column" .padding=${["0","s","s","s"]} gap="xs">
        ${this.currenciesTemplate()}
      </wui-flex>
      <w3m-legal-footer></w3m-legal-footer>
    `}currenciesTemplate(){return this.currencies.map(e=>{var n;return K`
        <wui-list-item
          imageSrc=${gt((n=this.currencyImages)==null?void 0:n[e.id])}
          @click=${()=>this.selectCurrency(e)}
          variant="image"
        >
          <wui-text variant="paragraph-500" color="fg-100">${e.id}</wui-text>
        </wui-list-item>
      `})}selectCurrency(e){e&&(Tr.setPaymentCurrency(e),dn.close())}};Lv.styles=$Me;_9([pe()],Lv.prototype,"selectedCurrency",void 0);_9([pe()],Lv.prototype,"currencies",void 0);_9([pe()],Lv.prototype,"currencyImages",void 0);Lv=_9([Ce("w3m-onramp-fiat-select-view")],Lv);var Mne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let VP=class extends Te{constructor(){super(),this.unsubscribe=[],this.providers=Tr.state.providers,this.unsubscribe.push(Tr.subscribeKey("providers",e=>{this.providers=e}))}firstUpdated(){const e=this.providers.map(async n=>n.name==="coinbase"?await this.getCoinbaseOnRampURL():Promise.resolve(n==null?void 0:n.url));Promise.all(e).then(n=>{this.providers=this.providers.map((r,i)=>({...r,url:n[i]||""}))})}render(){return K`
      <wui-flex flexDirection="column" .padding=${["0","s","s","s"]} gap="xs">
        ${this.onRampProvidersTemplate()}
      </wui-flex>
      <w3m-onramp-providers-footer></w3m-onramp-providers-footer>
    `}onRampProvidersTemplate(){return this.providers.map(e=>K`
        <w3m-onramp-provider-item
          label=${e.label}
          name=${e.name}
          feeRange=${e.feeRange}
          @click=${()=>{this.onClickProvider(e)}}
          ?disabled=${!e.url}
        ></w3m-onramp-provider-item>
      `)}onClickProvider(e){Tr.setSelectedProvider(e),ke.push("BuyInProgress"),st.openHref(e.url,"popupWindow","width=600,height=800,scrollbars=yes"),wt.sendEvent({type:"track",event:"SELECT_BUY_PROVIDER",properties:{provider:e.name,isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT}})}async getCoinbaseOnRampURL(){const e=Ne.state.address,n=rt.state.caipNetwork;if(!e)throw new Error("No address found");if(!(n!=null&&n.name))throw new Error("No network found");const r=os.WC_COINBASE_PAY_SDK_CHAIN_NAME_MAP[n.name]??os.WC_COINBASE_PAY_SDK_FALLBACK_CHAIN,i=Tr.state.purchaseCurrency,s=i?[i.symbol]:Tr.state.purchaseCurrencies.map(o=>o.symbol);return await wi.generateOnRampURL({defaultNetwork:r,destinationWallets:[{address:e,blockchains:os.WC_COINBASE_PAY_SDK_CHAINS,assets:s}],partnerUserId:e,purchaseAmount:Tr.state.purchaseAmount})}};Mne([pe()],VP.prototype,"providers",void 0);VP=Mne([Ce("w3m-onramp-providers-view")],VP);const jMe=De`
  :host > wui-grid {
    max-height: 360px;
    overflow: auto;
  }

  wui-grid::-webkit-scrollbar {
    display: none;
  }
`;var A9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Uv=class extends Te{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=Tr.state.purchaseCurrencies,this.tokens=Tr.state.purchaseCurrencies,this.tokenImages=Rs.state.tokenImages,this.unsubscribe.push(Tr.subscribe(e=>{this.selectedCurrency=e.purchaseCurrencies,this.tokens=e.purchaseCurrencies}),Rs.subscribeKey("tokenImages",e=>this.tokenImages=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return K`
      <wui-flex flexDirection="column" .padding=${["0","s","s","s"]} gap="xs">
        ${this.currenciesTemplate()}
      </wui-flex>
      <w3m-legal-footer></w3m-legal-footer>
    `}currenciesTemplate(){return this.tokens.map(e=>{var n;return K`
        <wui-list-item
          imageSrc=${gt((n=this.tokenImages)==null?void 0:n[e.symbol])}
          @click=${()=>this.selectToken(e)}
          variant="image"
        >
          <wui-flex gap="3xs" alignItems="center">
            <wui-text variant="paragraph-500" color="fg-100">${e.name}</wui-text>
            <wui-text variant="small-400" color="fg-200">${e.symbol}</wui-text>
          </wui-flex>
        </wui-list-item>
      `})}selectToken(e){e&&(Tr.setPurchaseCurrency(e),dn.close())}};Uv.styles=jMe;A9([pe()],Uv.prototype,"selectedCurrency",void 0);A9([pe()],Uv.prototype,"tokens",void 0);A9([pe()],Uv.prototype,"tokenImages",void 0);Uv=A9([Ce("w3m-onramp-token-select-view")],Uv);const LMe=De`
  :host > wui-flex:first-child {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
  }

  :host > wui-flex:first-child::-webkit-scrollbar {
    display: none;
  }

  wui-loading-hexagon {
    position: absolute;
  }

  .action-button {
    width: 100%;
    border-radius: var(--wui-border-radius-xs);
  }

  .action-button:disabled {
    border-color: 1px solid var(--wui-color-gray-glass-005);
  }

  .swap-inputs-container {
    position: relative;
  }

  .replace-tokens-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    gap: var(--wui-spacing-1xs);
    border-radius: var(--wui-border-radius-xs);
    background-color: var(--wui-color-modal-bg-base);
    padding: var(--wui-spacing-xxs);
  }

  .replace-tokens-button-container > button {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 40px;
    padding: var(--wui-spacing-xs);
    border: none;
    border-radius: var(--wui-border-radius-xxs);
    background: var(--wui-color-gray-glass-002);
    transition: background-color var(--wui-duration-md) var(--wui-ease-out-power-1);
    will-change: background-color;
    z-index: 20;
  }

  .replace-tokens-button-container > button:hover {
    background: var(--wui-color-gray-glass-005);
  }

  .details-container > wui-flex {
    background: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-xxs);
    width: 100%;
  }

  .details-container > wui-flex > button {
    border: none;
    background: none;
    padding: var(--wui-spacing-s);
    border-radius: var(--wui-border-radius-xxs);
    transition: background 0.2s linear;
  }

  .details-container > wui-flex > button:hover {
    background: var(--wui-color-gray-glass-002);
  }

  .details-content-container {
    padding: var(--wui-spacing-1xs);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .details-content-container > wui-flex {
    width: 100%;
  }

  .details-row {
    width: 100%;
    padding: var(--wui-spacing-s) var(--wui-spacing-xl);
    border-radius: var(--wui-border-radius-xxs);
    background: var(--wui-color-gray-glass-002);
  }
`;var Xs=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let ms=class extends Te{constructor(){var e;super(),this.unsubscribe=[],this.detailsOpen=!1,this.caipNetworkId=(e=rt.state.caipNetwork)==null?void 0:e.id,this.initialized=mt.state.initialized,this.loadingQuote=mt.state.loadingQuote,this.loadingPrices=mt.state.loadingPrices,this.loadingTransaction=mt.state.loadingTransaction,this.sourceToken=mt.state.sourceToken,this.sourceTokenAmount=mt.state.sourceTokenAmount,this.sourceTokenPriceInUSD=mt.state.sourceTokenPriceInUSD,this.toToken=mt.state.toToken,this.toTokenAmount=mt.state.toTokenAmount,this.toTokenPriceInUSD=mt.state.toTokenPriceInUSD,this.inputError=mt.state.inputError,this.gasPriceInUSD=mt.state.gasPriceInUSD,this.fetchError=mt.state.fetchError,this.onDebouncedGetSwapCalldata=st.debounce(async()=>{await mt.swapTokens()},200),rt.subscribeKey("caipNetwork",n=>{this.caipNetworkId!==(n==null?void 0:n.id)&&(this.caipNetworkId=n==null?void 0:n.id,mt.resetState(),mt.initializeState())}),this.unsubscribe.push(dn.subscribeKey("open",n=>{n||mt.resetState()}),ke.subscribeKey("view",n=>{n.includes("Swap")||mt.resetValues()}),mt.subscribe(n=>{this.initialized=n.initialized,this.loadingQuote=n.loadingQuote,this.loadingPrices=n.loadingPrices,this.loadingTransaction=n.loadingTransaction,this.sourceToken=n.sourceToken,this.sourceTokenAmount=n.sourceTokenAmount,this.sourceTokenPriceInUSD=n.sourceTokenPriceInUSD,this.toToken=n.toToken,this.toTokenAmount=n.toTokenAmount,this.toTokenPriceInUSD=n.toTokenPriceInUSD,this.inputError=n.inputError,this.gasPriceInUSD=n.gasPriceInUSD,this.fetchError=n.fetchError}))}firstUpdated(){mt.initializeState(),this.watchTokensAndValues()}disconnectedCallback(){this.unsubscribe.forEach(e=>e==null?void 0:e()),clearInterval(this.interval)}render(){return K`
      <wui-flex flexDirection="column" .padding=${["0","l","l","l"]} gap="s">
        ${this.initialized?this.templateSwap():this.templateLoading()}
      </wui-flex>
    `}watchTokensAndValues(){this.interval=setInterval(()=>{mt.getNetworkTokenPrice(),mt.getMyTokensWithBalance(),mt.swapTokens()},1e4)}templateSwap(){return K`
      <wui-flex flexDirection="column" gap="s">
        <wui-flex flexDirection="column" alignItems="center" gap="xs" class="swap-inputs-container">
          ${this.templateTokenInput("sourceToken",this.sourceToken)}
          ${this.templateTokenInput("toToken",this.toToken)} ${this.templateReplaceTokensButton()}
        </wui-flex>
        ${this.templateDetails()} ${this.templateActionButton()}
      </wui-flex>
    `}actionButtonLabel(){return this.fetchError?"Swap":!this.sourceToken||!this.toToken?"Select token":this.sourceTokenAmount?this.inputError?this.inputError:"Review swap":"Enter amount"}templateReplaceTokensButton(){return K`
      <wui-flex class="replace-tokens-button-container">
        <button @click=${this.onSwitchTokens.bind(this)}>
          <wui-icon name="recycleHorizontal" color="fg-250" size="lg"></wui-icon>
        </button>
      </wui-flex>
    `}templateLoading(){return K`
      <wui-flex flexDirection="column" gap="l">
        <wui-flex flexDirection="column" alignItems="center" gap="xs" class="swap-inputs-container">
          <w3m-swap-input-skeleton target="sourceToken"></w3m-swap-input-skeleton>
          <w3m-swap-input-skeleton target="toToken"></w3m-swap-input-skeleton>
          ${this.templateReplaceTokensButton()}
        </wui-flex>
        ${this.templateActionButton()}
      </wui-flex>
    `}templateTokenInput(e,n){var a,c;const r=(a=mt.state.myTokensWithBalance)==null?void 0:a.find(l=>(l==null?void 0:l.address)===(n==null?void 0:n.address)),i=e==="toToken"?this.toTokenAmount:this.sourceTokenAmount,s=e==="toToken"?this.toTokenPriceInUSD:this.sourceTokenPriceInUSD;let o=parseFloat(i)*s;return e==="toToken"&&(o-=this.gasPriceInUSD||0),K`<w3m-swap-input
      .value=${e==="toToken"?this.toTokenAmount:this.sourceTokenAmount}
      ?disabled=${this.loadingQuote&&e==="toToken"}
      .onSetAmount=${this.handleChangeAmount.bind(this)}
      target=${e}
      .token=${n}
      .balance=${(c=r==null?void 0:r.quantity)==null?void 0:c.numeric}
      .price=${r==null?void 0:r.price}
      .marketValue=${o}
      .onSetMaxValue=${this.onSetMaxValue.bind(this)}
    ></w3m-swap-input>`}onSetMaxValue(e,n){const r=e==="sourceToken"?this.sourceToken:this.toToken,i=(r==null?void 0:r.address)===os.NATIVE_TOKEN_ADDRESS;let s="0";if(!n){s="0",this.handleChangeAmount(e,s);return}if(!this.gasPriceInUSD){s=n,this.handleChangeAmount(e,s);return}const o=hr.bigNumber(this.gasPriceInUSD.toFixed(5)).dividedBy(this.sourceTokenPriceInUSD),a=i?hr.bigNumber(n).minus(o):hr.bigNumber(n);this.handleChangeAmount(e,a.isGreaterThan(0)?a.toFixed(20):"0")}templateDetails(){return!this.sourceToken||!this.toToken||this.inputError?null:K`<w3m-swap-details .detailsOpen=${this.detailsOpen}></w3m-swap-details>`}handleChangeAmount(e,n){mt.clearError(),e==="sourceToken"?mt.setSourceTokenAmount(n):mt.setToTokenAmount(n),this.onDebouncedGetSwapCalldata()}templateActionButton(){const e=!this.toToken||!this.sourceToken,n=!this.sourceTokenAmount,r=this.loadingQuote||this.loadingPrices||this.loadingTransaction,i=r||e||n||this.inputError;return K` <wui-flex gap="xs">
      <wui-button
        data-testid="swap-action-button"
        class="action-button"
        fullWidth
        size="lg"
        borderRadius="xs"
        variant=${e?"neutral":"main"}
        .loading=${r}
        .disabled=${i}
        @click=${this.onSwapPreview.bind(this)}
      >
        ${this.actionButtonLabel()}
      </wui-button>
    </wui-flex>`}onSwitchTokens(){mt.switchTokens()}onSwapPreview(){var e,n;if(this.fetchError){mt.swapTokens();return}wt.sendEvent({type:"track",event:"INITIATE_SWAP",properties:{network:this.caipNetworkId||"",swapFromToken:((e=this.sourceToken)==null?void 0:e.symbol)||"",swapToToken:((n=this.toToken)==null?void 0:n.symbol)||"",swapFromAmount:this.sourceTokenAmount||"",swapToAmount:this.toTokenAmount||"",isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT}}),ke.push("SwapPreview")}};ms.styles=LMe;Xs([pe()],ms.prototype,"interval",void 0);Xs([pe()],ms.prototype,"detailsOpen",void 0);Xs([pe()],ms.prototype,"caipNetworkId",void 0);Xs([pe()],ms.prototype,"initialized",void 0);Xs([pe()],ms.prototype,"loadingQuote",void 0);Xs([pe()],ms.prototype,"loadingPrices",void 0);Xs([pe()],ms.prototype,"loadingTransaction",void 0);Xs([pe()],ms.prototype,"sourceToken",void 0);Xs([pe()],ms.prototype,"sourceTokenAmount",void 0);Xs([pe()],ms.prototype,"sourceTokenPriceInUSD",void 0);Xs([pe()],ms.prototype,"toToken",void 0);Xs([pe()],ms.prototype,"toTokenAmount",void 0);Xs([pe()],ms.prototype,"toTokenPriceInUSD",void 0);Xs([pe()],ms.prototype,"inputError",void 0);Xs([pe()],ms.prototype,"gasPriceInUSD",void 0);Xs([pe()],ms.prototype,"fetchError",void 0);ms=Xs([Ce("w3m-swap-view")],ms);const UMe=De`
  :host > wui-flex:first-child {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
  }

  :host > wui-flex:first-child::-webkit-scrollbar {
    display: none;
  }

  .preview-container,
  .details-container {
    width: 100%;
  }

  .token-image {
    width: 24px;
    height: 24px;
    box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
    border-radius: 12px;
  }

  wui-loading-hexagon {
    position: absolute;
  }

  .token-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--wui-spacing-xxs);
    padding: var(--wui-spacing-xs);
    height: 40px;
    border: none;
    border-radius: 80px;
    background: var(--wui-color-gray-glass-002);
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
    cursor: pointer;
    transition: background 0.2s linear;
  }

  .token-item:hover {
    background: var(--wui-color-gray-glass-005);
  }

  .preview-token-details-container {
    width: 100%;
  }

  .details-row {
    width: 100%;
    padding: var(--wui-spacing-s) var(--wui-spacing-xl);
    border-radius: var(--wui-border-radius-xxs);
    background: var(--wui-color-gray-glass-002);
  }

  .action-buttons-container {
    width: 100%;
    gap: var(--wui-spacing-xs);
  }

  .action-buttons-container > button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    height: 48px;
    border-radius: var(--wui-border-radius-xs);
    border: none;
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
  }

  .action-buttons-container > button:disabled {
    opacity: 0.8;
    cursor: not-allowed;
  }

  .action-button > wui-loading-spinner {
    display: inline-block;
  }

  .cancel-button:hover,
  .action-button:hover {
    cursor: pointer;
  }

  .action-buttons-container > wui-button.cancel-button {
    flex: 2;
  }

  .action-buttons-container > wui-button.action-button {
    flex: 4;
  }

  .action-buttons-container > button.action-button > wui-text {
    color: white;
  }

  .details-container > wui-flex {
    background: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-xxs);
    width: 100%;
  }

  .details-container > wui-flex > button {
    border: none;
    background: none;
    padding: var(--wui-spacing-s);
    border-radius: var(--wui-border-radius-xxs);
    transition: background 0.2s linear;
  }

  .details-container > wui-flex > button:hover {
    background: var(--wui-color-gray-glass-002);
  }

  .details-content-container {
    padding: var(--wui-spacing-1xs);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .details-content-container > wui-flex {
    width: 100%;
  }

  .details-row {
    width: 100%;
    padding: var(--wui-spacing-s) var(--wui-spacing-xl);
    border-radius: var(--wui-border-radius-xxs);
    background: var(--wui-color-gray-glass-002);
  }
`;var gs=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Xi=class extends Te{constructor(){super(),this.unsubscribe=[],this.detailsOpen=!0,this.approvalTransaction=mt.state.approvalTransaction,this.swapTransaction=mt.state.swapTransaction,this.sourceToken=mt.state.sourceToken,this.sourceTokenAmount=mt.state.sourceTokenAmount??"",this.sourceTokenPriceInUSD=mt.state.sourceTokenPriceInUSD,this.toToken=mt.state.toToken,this.toTokenAmount=mt.state.toTokenAmount??"",this.toTokenPriceInUSD=mt.state.toTokenPriceInUSD,this.caipNetwork=rt.state.caipNetwork,this.balanceSymbol=Ne.state.balanceSymbol,this.gasPriceInUSD=mt.state.gasPriceInUSD,this.inputError=mt.state.inputError,this.loadingQuote=mt.state.loadingQuote,this.loadingApprovalTransaction=mt.state.loadingApprovalTransaction,this.loadingBuildTransaction=mt.state.loadingBuildTransaction,this.loadingTransaction=mt.state.loadingTransaction,this.unsubscribe.push(Ne.subscribeKey("balanceSymbol",e=>{this.balanceSymbol!==e&&ke.goBack()}),rt.subscribeKey("caipNetwork",e=>{this.caipNetwork!==e&&(this.caipNetwork=e)}),mt.subscribe(e=>{this.approvalTransaction=e.approvalTransaction,this.swapTransaction=e.swapTransaction,this.sourceToken=e.sourceToken,this.gasPriceInUSD=e.gasPriceInUSD,this.toToken=e.toToken,this.gasPriceInUSD=e.gasPriceInUSD,this.toTokenPriceInUSD=e.toTokenPriceInUSD,this.sourceTokenAmount=e.sourceTokenAmount??"",this.toTokenAmount=e.toTokenAmount??"",this.inputError=e.inputError,e.inputError&&ke.goBack(),this.loadingQuote=e.loadingQuote,this.loadingApprovalTransaction=e.loadingApprovalTransaction,this.loadingBuildTransaction=e.loadingBuildTransaction,this.loadingTransaction=e.loadingTransaction}))}firstUpdated(){mt.getTransaction(),this.refreshTransaction()}disconnectedCallback(){this.unsubscribe.forEach(e=>e==null?void 0:e()),clearInterval(this.interval)}render(){return K`
      <wui-flex flexDirection="column" .padding=${["0","l","l","l"]} gap="s">
        ${this.templateSwap()}
      </wui-flex>
    `}refreshTransaction(){this.interval=setInterval(()=>{mt.getApprovalLoadingState()||mt.getTransaction()},1e4)}templateSwap(){var c,l,u,d;const e=`${qt.formatNumberToLocalString(parseFloat(this.sourceTokenAmount))} ${(c=this.sourceToken)==null?void 0:c.symbol}`,n=`${qt.formatNumberToLocalString(parseFloat(this.toTokenAmount))} ${(l=this.toToken)==null?void 0:l.symbol}`,r=parseFloat(this.sourceTokenAmount)*this.sourceTokenPriceInUSD,i=parseFloat(this.toTokenAmount)*this.toTokenPriceInUSD-(this.gasPriceInUSD||0),s=qt.formatNumberToLocalString(r),o=qt.formatNumberToLocalString(i),a=this.loadingQuote||this.loadingBuildTransaction||this.loadingTransaction||this.loadingApprovalTransaction;return K`
      <wui-flex flexDirection="column" alignItems="center" gap="l">
        <wui-flex class="preview-container" flexDirection="column" alignItems="flex-start" gap="l">
          <wui-flex
            class="preview-token-details-container"
            alignItems="center"
            justifyContent="space-between"
            gap="l"
          >
            <wui-flex flexDirection="column" alignItems="flex-start" gap="4xs">
              <wui-text variant="small-400" color="fg-150">Send</wui-text>
              <wui-text variant="paragraph-400" color="fg-100">$${s}</wui-text>
            </wui-flex>
            <wui-token-button
              flexDirection="row-reverse"
              text=${e}
              imageSrc=${(u=this.sourceToken)==null?void 0:u.logoUri}
            >
            </wui-token-button>
          </wui-flex>
          <wui-icon name="recycleHorizontal" color="fg-200" size="md"></wui-icon>
          <wui-flex
            class="preview-token-details-container"
            alignItems="center"
            justifyContent="space-between"
            gap="l"
          >
            <wui-flex flexDirection="column" alignItems="flex-start" gap="4xs">
              <wui-text variant="small-400" color="fg-150">Receive</wui-text>
              <wui-text variant="paragraph-400" color="fg-100">$${o}</wui-text>
            </wui-flex>
            <wui-token-button
              flexDirection="row-reverse"
              text=${n}
              imageSrc=${(d=this.toToken)==null?void 0:d.logoUri}
            >
            </wui-token-button>
          </wui-flex>
        </wui-flex>

        ${this.templateDetails()}

        <wui-flex flexDirection="row" alignItems="center" justifyContent="center" gap="xs">
          <wui-icon size="sm" color="fg-200" name="infoCircle"></wui-icon>
          <wui-text variant="small-400" color="fg-200">Review transaction carefully</wui-text>
        </wui-flex>

        <wui-flex
          class="action-buttons-container"
          flexDirection="row"
          alignItems="center"
          justifyContent="space-between"
          gap="xs"
        >
          <wui-button
            class="cancel-button"
            fullWidth
            size="lg"
            borderRadius="xs"
            variant="neutral"
            @click=${this.onCancelTransaction.bind(this)}
          >
            <wui-text variant="paragraph-600" color="fg-200">Cancel</wui-text>
          </wui-button>
          <wui-button
            class="action-button"
            fullWidth
            size="lg"
            borderRadius="xs"
            variant="main"
            ?loading=${a}
            ?disabled=${a}
            @click=${this.onSendTransaction.bind(this)}
          >
            <wui-text variant="paragraph-600" color="inverse-100">
              ${this.actionButtonLabel()}
            </wui-text>
          </wui-button>
        </wui-flex>
      </wui-flex>
    `}templateDetails(){return!this.sourceToken||!this.toToken||this.inputError?null:K`<w3m-swap-details .detailsOpen=${this.detailsOpen}></w3m-swap-details>`}actionButtonLabel(){return this.loadingApprovalTransaction?"Approving...":this.approvalTransaction?"Approve":"Swap"}onCancelTransaction(){ke.goBack()}onSendTransaction(){this.approvalTransaction?mt.sendTransactionForApproval(this.approvalTransaction):mt.sendTransactionForSwap(this.swapTransaction)}};Xi.styles=UMe;gs([pe()],Xi.prototype,"interval",void 0);gs([pe()],Xi.prototype,"detailsOpen",void 0);gs([pe()],Xi.prototype,"approvalTransaction",void 0);gs([pe()],Xi.prototype,"swapTransaction",void 0);gs([pe()],Xi.prototype,"sourceToken",void 0);gs([pe()],Xi.prototype,"sourceTokenAmount",void 0);gs([pe()],Xi.prototype,"sourceTokenPriceInUSD",void 0);gs([pe()],Xi.prototype,"toToken",void 0);gs([pe()],Xi.prototype,"toTokenAmount",void 0);gs([pe()],Xi.prototype,"toTokenPriceInUSD",void 0);gs([pe()],Xi.prototype,"caipNetwork",void 0);gs([pe()],Xi.prototype,"balanceSymbol",void 0);gs([pe()],Xi.prototype,"gasPriceInUSD",void 0);gs([pe()],Xi.prototype,"inputError",void 0);gs([pe()],Xi.prototype,"loadingQuote",void 0);gs([pe()],Xi.prototype,"loadingApprovalTransaction",void 0);gs([pe()],Xi.prototype,"loadingBuildTransaction",void 0);gs([pe()],Xi.prototype,"loadingTransaction",void 0);Xi=gs([Ce("w3m-swap-preview-view")],Xi);const FMe=De`
  :host {
    --tokens-scroll--top-opacity: 0;
    --tokens-scroll--bottom-opacity: 1;
    --suggested-tokens-scroll--left-opacity: 0;
    --suggested-tokens-scroll--right-opacity: 1;
  }

  :host > wui-flex:first-child {
    overflow-y: hidden;
    overflow-x: hidden;
    scrollbar-width: none;
    scrollbar-height: none;
  }

  :host > wui-flex:first-child::-webkit-scrollbar {
    display: none;
  }

  wui-loading-hexagon {
    position: absolute;
  }

  .suggested-tokens-container {
    overflow-x: auto;
    mask-image: linear-gradient(
      to right,
      rgba(0, 0, 0, calc(1 - var(--suggested-tokens-scroll--left-opacity))) 0px,
      rgba(200, 200, 200, calc(1 - var(--suggested-tokens-scroll--left-opacity))) 1px,
      black 50px,
      black 90px,
      black calc(100% - 90px),
      black calc(100% - 50px),
      rgba(155, 155, 155, calc(1 - var(--suggested-tokens-scroll--right-opacity))) calc(100% - 1px),
      rgba(0, 0, 0, calc(1 - var(--suggested-tokens-scroll--right-opacity))) 100%
    );
  }

  .suggested-tokens-container::-webkit-scrollbar {
    display: none;
  }

  .tokens-container {
    border-top: 1px solid var(--wui-color-gray-glass-005);
    height: 100%;
    max-height: 390px;
  }

  .tokens {
    width: 100%;
    overflow-y: auto;
    mask-image: linear-gradient(
      to bottom,
      rgba(0, 0, 0, calc(1 - var(--tokens-scroll--top-opacity))) 0px,
      rgba(200, 200, 200, calc(1 - var(--tokens-scroll--top-opacity))) 1px,
      black 50px,
      black 90px,
      black calc(100% - 90px),
      black calc(100% - 50px),
      rgba(155, 155, 155, calc(1 - var(--tokens-scroll--bottom-opacity))) calc(100% - 1px),
      rgba(0, 0, 0, calc(1 - var(--tokens-scroll--bottom-opacity))) 100%
    );
  }

  .network-search-input,
  .select-network-button {
    height: 40px;
  }

  .select-network-button {
    border: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--wui-spacing-xs);
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
    background-color: transparent;
    border-radius: var(--wui-border-radius-xxs);
    padding: var(--wui-spacing-xs);
    align-items: center;
    transition: background-color 0.2s linear;
  }

  .select-network-button:hover {
    background-color: var(--wui-color-gray-glass-002);
  }

  .select-network-button > wui-image {
    width: 26px;
    height: 26px;
    border-radius: var(--wui-border-radius-xs);
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-010);
  }
`;var Dh=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let pu=class extends Te{constructor(){var e;super(),this.unsubscribe=[],this.targetToken=(e=ke.state.data)==null?void 0:e.target,this.sourceToken=mt.state.sourceToken,this.sourceTokenAmount=mt.state.sourceTokenAmount,this.toToken=mt.state.toToken,this.myTokensWithBalance=mt.state.myTokensWithBalance,this.popularTokens=mt.state.popularTokens,this.searchValue="",this.unsubscribe.push(mt.subscribe(n=>{this.sourceToken=n.sourceToken,this.toToken=n.toToken,this.myTokensWithBalance=n.myTokensWithBalance}))}updated(){var r,i;const e=(r=this.renderRoot)==null?void 0:r.querySelector(".suggested-tokens-container");e==null||e.addEventListener("scroll",this.handleSuggestedTokensScroll.bind(this));const n=(i=this.renderRoot)==null?void 0:i.querySelector(".tokens");n==null||n.addEventListener("scroll",this.handleTokenListScroll.bind(this))}disconnectedCallback(){var r,i;super.disconnectedCallback();const e=(r=this.renderRoot)==null?void 0:r.querySelector(".suggested-tokens-container"),n=(i=this.renderRoot)==null?void 0:i.querySelector(".tokens");e==null||e.removeEventListener("scroll",this.handleSuggestedTokensScroll.bind(this)),n==null||n.removeEventListener("scroll",this.handleTokenListScroll.bind(this)),clearInterval(this.interval)}render(){return K`
      <wui-flex flexDirection="column" gap="s">
        ${this.templateSearchInput()} ${this.templateSuggestedTokens()} ${this.templateTokens()}
      </wui-flex>
    `}onSelectToken(e){this.targetToken==="sourceToken"?mt.setSourceToken(e):(mt.setToToken(e),this.sourceToken&&this.sourceTokenAmount&&mt.swapTokens()),ke.goBack()}templateSearchInput(){return K`
      <wui-flex .padding=${["3xs","s","0","s"]} gap="xs">
        <wui-input-text
          data-testid="swap-select-token-search-input"
          class="network-search-input"
          size="sm"
          placeholder="Search token"
          icon="search"
          .value=${this.searchValue}
          @inputChange=${this.onSearchInputChange.bind(this)}
        ></wui-input-text>
      </wui-flex>
    `}templateTokens(){const e=this.myTokensWithBalance?Object.values(this.myTokensWithBalance):[],n=this.popularTokens?this.popularTokens:[],r=this.filterTokensWithText(e,this.searchValue),i=this.filterTokensWithText(n,this.searchValue);return K`
      <wui-flex class="tokens-container">
        <wui-flex class="tokens" .padding=${["0","s","s","s"]} flexDirection="column">
          ${(r==null?void 0:r.length)>0?K`
                <wui-flex justifyContent="flex-start" padding="s">
                  <wui-text variant="paragraph-500" color="fg-200">Your tokens</wui-text>
                </wui-flex>
                ${r.map(s=>{var a,c,l;const o=s.symbol===((a=this.sourceToken)==null?void 0:a.symbol)||s.symbol===((c=this.toToken)==null?void 0:c.symbol);return K`
                    <wui-token-list-item
                      data-testid="swap-select-token-item-${s.symbol}"
                      name=${s.name}
                      ?disabled=${o}
                      symbol=${s.symbol}
                      price=${s==null?void 0:s.price}
                      amount=${(l=s==null?void 0:s.quantity)==null?void 0:l.numeric}
                      imageSrc=${s.logoUri}
                      @click=${()=>{o||this.onSelectToken(s)}}
                    >
                    </wui-token-list-item>
                  `})}
              `:null}

          <wui-flex justifyContent="flex-start" padding="s">
            <wui-text variant="paragraph-500" color="fg-200">Tokens</wui-text>
          </wui-flex>
          ${(i==null?void 0:i.length)>0?i.map(s=>K`
                  <wui-token-list-item
                    data-testid="swap-select-token-item-${s.symbol}"
                    name=${s.name}
                    symbol=${s.symbol}
                    imageSrc=${s.logoUri}
                    @click=${()=>this.onSelectToken(s)}
                  >
                  </wui-token-list-item>
                `):null}
        </wui-flex>
      </wui-flex>
    `}templateSuggestedTokens(){const e=mt.state.suggestedTokens?mt.state.suggestedTokens.slice(0,8):null;return e?K`
      <wui-flex class="suggested-tokens-container" .padding=${["0","s","0","s"]} gap="xs">
        ${e.map(n=>K`
            <wui-token-button
              text=${n.symbol}
              imageSrc=${n.logoUri}
              @click=${()=>this.onSelectToken(n)}
            >
            </wui-token-button>
          `)}
      </wui-flex>
    `:null}onSearchInputChange(e){this.searchValue=e.detail}handleSuggestedTokensScroll(){var n;const e=(n=this.renderRoot)==null?void 0:n.querySelector(".suggested-tokens-container");e&&(e.style.setProperty("--suggested-tokens-scroll--left-opacity",pA.interpolate([0,100],[0,1],e.scrollLeft).toString()),e.style.setProperty("--suggested-tokens-scroll--right-opacity",pA.interpolate([0,100],[0,1],e.scrollWidth-e.scrollLeft-e.offsetWidth).toString()))}handleTokenListScroll(){var n;const e=(n=this.renderRoot)==null?void 0:n.querySelector(".tokens");e&&(e.style.setProperty("--tokens-scroll--top-opacity",pA.interpolate([0,100],[0,1],e.scrollTop).toString()),e.style.setProperty("--tokens-scroll--bottom-opacity",pA.interpolate([0,100],[0,1],e.scrollHeight-e.scrollTop-e.offsetHeight).toString()))}filterTokensWithText(e,n){return e.filter(r=>`${r.symbol} ${r.name} ${r.address}`.toLowerCase().includes(n.toLowerCase()))}};pu.styles=FMe;Dh([pe()],pu.prototype,"interval",void 0);Dh([pe()],pu.prototype,"targetToken",void 0);Dh([pe()],pu.prototype,"sourceToken",void 0);Dh([pe()],pu.prototype,"sourceTokenAmount",void 0);Dh([pe()],pu.prototype,"toToken",void 0);Dh([pe()],pu.prototype,"myTokensWithBalance",void 0);Dh([pe()],pu.prototype,"popularTokens",void 0);Dh([pe()],pu.prototype,"searchValue",void 0);pu=Dh([Ce("w3m-swap-select-token-view")],pu);const zMe=De`
  :host > wui-flex:first-child {
    height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
  }

  :host > wui-flex:first-child::-webkit-scrollbar {
    display: none;
  }
`;var HMe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let qP=class extends Te{render(){return K`
      <wui-flex flexDirection="column" .padding=${["0","m","m","m"]} gap="s">
        <w3m-activity-list page="activity"></w3m-activity-list>
      </wui-flex>
    `}};qP.styles=zMe;qP=HMe([Ce("w3m-transactions-view")],qP);var WMe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const VMe=[{images:["network","layers","system"],title:"The system’s nuts and bolts",text:"A network is what brings the blockchain to life, as this technical infrastructure allows apps to access the ledger and smart contract services."},{images:["noun","defiAlt","dao"],title:"Designed for different uses",text:"Each network is designed differently, and may therefore suit certain apps and experiences."}];let fq=class extends Te{render(){return K`
      <wui-flex
        flexDirection="column"
        .padding=${["xxl","xl","xl","xl"]}
        alignItems="center"
        gap="xl"
      >
        <w3m-help-widget .data=${VMe}></w3m-help-widget>
        <wui-button
          variant="main"
          size="md"
          @click=${()=>{st.openHref("https://ethereum.org/en/developers/docs/networks/","_blank")}}
        >
          Learn more
          <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon>
        </wui-button>
      </wui-flex>
    `}};fq=WMe([Ce("w3m-what-is-a-network-view")],fq);var qMe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const GMe=[{images:["login","profile","lock"],title:"One login for all of web3",text:"Log in to any app by connecting your wallet. Say goodbye to countless passwords!"},{images:["defi","nft","eth"],title:"A home for your digital assets",text:"A wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs."},{images:["browser","noun","dao"],title:"Your gateway to a new web",text:"With your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more."}];let hq=class extends Te{render(){return K`
      <wui-flex
        flexDirection="column"
        .padding=${["xxl","xl","xl","xl"]}
        alignItems="center"
        gap="xl"
      >
        <w3m-help-widget .data=${GMe}></w3m-help-widget>
        <wui-button variant="main" size="md" @click=${this.onGetWallet.bind(this)}>
          <wui-icon color="inherit" slot="iconLeft" name="wallet"></wui-icon>
          Get a wallet
        </wui-button>
      </wui-flex>
    `}onGetWallet(){wt.sendEvent({type:"track",event:"CLICK_GET_WALLET"}),ke.push("GetWallet")}};hq=qMe([Ce("w3m-what-is-a-wallet-view")],hq);var KMe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let pq=class extends Te{render(){return K`
      <wui-flex
        flexDirection="column"
        .padding=${["xxl","3xl","xl","3xl"]}
        alignItems="center"
        gap="xl"
      >
        <wui-visual name="onrampCard"></wui-visual>
        <wui-flex flexDirection="column" gap="xs" alignItems="center">
          <wui-text align="center" variant="paragraph-500" color="fg-100">
            Quickly and easily buy digital assets!
          </wui-text>
          <wui-text align="center" variant="small-400" color="fg-200">
            Simply select your preferred onramp provider and add digital assets to your account
            using your credit card or bank transfer
          </wui-text>
        </wui-flex>
        <wui-button @click=${ke.goBack}>
          <wui-icon size="sm" color="inherit" name="add" slot="iconLeft"></wui-icon>
          Buy
        </wui-button>
      </wui-flex>
    `}};pq=KMe([Ce("w3m-what-is-a-buy-view")],pq);const YMe=De`
  wui-loading-spinner {
    margin: 9px auto;
  }

  .email-display,
  .email-display wui-text {
    max-width: 100%;
  }
`;var E9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const QMe=6;let _h=class extends Te{firstUpdated(){this.startOTPTimeout()}disconnectedCallback(){clearTimeout(this.OTPTimeout)}constructor(){var e;super(),this.loading=!1,this.timeoutTimeLeft=fo.getTimeToNextEmailLogin(),this.error="",this.otp="",this.email=(e=ke.state.data)==null?void 0:e.email,this.authConnector=Pt.getAuthConnector()}render(){if(!this.email)throw new Error("w3m-email-otp-widget: No email provided");const e=!!this.timeoutTimeLeft,n=this.getFooterLabels(e);return K`
      <wui-flex
        flexDirection="column"
        alignItems="center"
        .padding=${["l","0","l","0"]}
        gap="l"
      >
        <wui-flex
          class="email-display"
          flexDirection="column"
          alignItems="center"
          .padding=${["0","xl","0","xl"]}
        >
          <wui-text variant="paragraph-400" color="fg-100" align="center">
            Enter the code we sent to
          </wui-text>
          <wui-text variant="paragraph-500" color="fg-100" lineClamp="1" align="center">
            ${this.email}
          </wui-text>
        </wui-flex>

        <wui-text variant="small-400" color="fg-200">The code expires in 20 minutes</wui-text>

        ${this.loading?K`<wui-loading-spinner size="xl" color="accent-100"></wui-loading-spinner>`:K` <wui-flex flexDirection="column" alignItems="center" gap="xs">
              <wui-otp
                dissabled
                length="6"
                @inputChange=${this.onOtpInputChange.bind(this)}
                .otp=${this.otp}
              ></wui-otp>
              ${this.error?K`
                    <wui-text variant="small-400" align="center" color="error-100">
                      ${this.error}. Try Again
                    </wui-text>
                  `:null}
            </wui-flex>`}

        <wui-flex alignItems="center" gap="xs">
          <wui-text variant="small-400" color="fg-200">${n.title}</wui-text>
          <wui-link @click=${this.onResendCode.bind(this)} .disabled=${e}>
            ${n.action}
          </wui-link>
        </wui-flex>
      </wui-flex>
    `}startOTPTimeout(){this.timeoutTimeLeft=fo.getTimeToNextEmailLogin(),this.OTPTimeout=setInterval(()=>{this.timeoutTimeLeft>0?this.timeoutTimeLeft=fo.getTimeToNextEmailLogin():clearInterval(this.OTPTimeout)},1e3)}async onOtpInputChange(e){var n;try{this.loading||(this.otp=e.detail,this.authConnector&&this.otp.length===QMe&&(this.loading=!0,await((n=this.onOtpSubmit)==null?void 0:n.call(this,this.otp))))}catch(r){this.error=st.parseError(r),this.loading=!1}}async onResendCode(){try{if(this.onOtpResend){if(!this.loading&&!this.timeoutTimeLeft){if(this.error="",this.otp="",!Pt.getAuthConnector()||!this.email)throw new Error("w3m-email-otp-widget: Unable to resend email");this.loading=!0,await this.onOtpResend(this.email),this.startOTPTimeout(),Ht.showSuccess("Code email resent")}}else this.onStartOver&&this.onStartOver()}catch(e){Ht.showError(e)}finally{this.loading=!1}}getFooterLabels(e){return this.onStartOver?{title:"Something wrong?",action:`Try again ${e?`in ${this.timeoutTimeLeft}s`:""}`}:{title:"Didn't receive it?",action:`Resend ${e?`in ${this.timeoutTimeLeft}s`:"Code"}`}}};_h.styles=YMe;E9([pe()],_h.prototype,"loading",void 0);E9([pe()],_h.prototype,"timeoutTimeLeft",void 0);E9([pe()],_h.prototype,"error",void 0);_h=E9([Ce("w3m-email-otp-widget")],_h);var Bne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let GP=class extends _h{constructor(){super(),this.unsubscribe=[],this.smartAccountDeployed=Ne.state.smartAccountDeployed,this.onOtpSubmit=async e=>{try{if(this.authConnector){const n=rt.checkIfSmartAccountEnabled();await this.authConnector.provider.connectOtp({otp:e}),wt.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),await tn.connectExternal(this.authConnector),wt.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"email",name:this.authConnector.name||"Unknown"}}),Ne.state.allAccounts.length>1?ke.push("SelectAddresses"):n&&!this.smartAccountDeployed?ke.push("UpgradeToSmartAccount"):dn.close()}}catch(n){throw wt.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),n}},this.onOtpResend=async e=>{this.authConnector&&(await this.authConnector.provider.connectEmail({email:e}),wt.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}))},this.unsubscribe.push(Ne.subscribeKey("smartAccountDeployed",e=>{this.smartAccountDeployed=e}))}};Bne([pe()],GP.prototype,"smartAccountDeployed",void 0);GP=Bne([Ce("w3m-email-verify-otp-view")],GP);const ZMe=De`
  wui-icon-box {
    height: var(--wui-icon-box-size-xl);
    width: var(--wui-icon-box-size-xl);
  }
`;var $ne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let zC=class extends Te{constructor(){var e;super(),this.email=(e=ke.state.data)==null?void 0:e.email,this.authConnector=Pt.getAuthConnector(),this.loading=!1,this.listenForDeviceApproval()}render(){if(!this.email)throw new Error("w3m-email-verify-device-view: No email provided");if(!this.authConnector)throw new Error("w3m-email-verify-device-view: No auth connector provided");return K`
      <wui-flex
        flexDirection="column"
        alignItems="center"
        .padding=${["xxl","s","xxl","s"]}
        gap="l"
      >
        <wui-icon-box
          size="xl"
          iconcolor="accent-100"
          backgroundcolor="accent-100"
          icon="verify"
          background="opaque"
        ></wui-icon-box>

        <wui-flex flexDirection="column" alignItems="center" gap="s">
          <wui-flex flexDirection="column" alignItems="center">
            <wui-text variant="paragraph-400" color="fg-100">
              Approve the login link we sent to
            </wui-text>
            <wui-text variant="paragraph-400" color="fg-100"><b>${this.email}</b></wui-text>
          </wui-flex>

          <wui-text variant="small-400" color="fg-200" align="center">
            The code expires in 20 minutes
          </wui-text>

          <wui-flex alignItems="center" id="w3m-resend-section" gap="xs">
            <wui-text variant="small-400" color="fg-100" align="center">
              Didn't receive it?
            </wui-text>
            <wui-link @click=${this.onResendCode.bind(this)} .disabled=${this.loading}>
              Resend email
            </wui-link>
          </wui-flex>
        </wui-flex>
      </wui-flex>
    `}async listenForDeviceApproval(){if(this.authConnector)try{await this.authConnector.provider.connectDevice(),wt.sendEvent({type:"track",event:"DEVICE_REGISTERED_FOR_EMAIL"}),wt.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),ke.replace("EmailVerifyOtp",{email:this.email})}catch{ke.goBack()}}async onResendCode(){try{if(!this.loading){if(!this.authConnector||!this.email)throw new Error("w3m-email-login-widget: Unable to resend email");this.loading=!0,await this.authConnector.provider.connectEmail({email:this.email}),this.listenForDeviceApproval(),Ht.showSuccess("Code email resent")}}catch(e){Ht.showError(e)}finally{this.loading=!1}}};zC.styles=ZMe;$ne([pe()],zC.prototype,"loading",void 0);zC=$ne([Ce("w3m-email-verify-device-view")],zC);const JMe=De`
  div {
    width: 100%;
    height: 400px;
  }

  [data-ready='false'] {
    transform: scale(1.05);
  }

  @media (max-width: 430px) {
    [data-ready='false'] {
      transform: translateY(-50px);
    }
  }
`;var jne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const mq=400,gq=360,XMe=64;let HC=class extends Te{constructor(){super(),this.bodyObserver=void 0,this.unsubscribe=[],this.iframe=document.getElementById("w3m-iframe"),this.ready=!1,this.unsubscribe.push(dn.subscribeKey("open",e=>{e||(this.onHideIframe(),ke.popTransactionStack())}))}disconnectedCallback(){var e;this.onHideIframe(),this.unsubscribe.forEach(n=>n()),(e=this.bodyObserver)==null||e.unobserve(window.document.body)}async firstUpdated(){await this.syncTheme(),this.iframe.style.display="block",this.bodyObserver=new ResizeObserver(e=>{var i,s;const n=(i=e==null?void 0:e[0])==null?void 0:i.contentBoxSize,r=(s=n==null?void 0:n[0])==null?void 0:s.inlineSize;this.iframe.style.height=`${mq}px`,r&&r<=430?(this.iframe.style.width="100%",this.iframe.style.left="0px",this.iframe.style.bottom="0px",this.iframe.style.top="unset"):(this.iframe.style.width=`${gq}px`,this.iframe.style.left=`calc(50% - ${gq/2}px)`,this.iframe.style.top=`calc(50% - ${mq/2}px + ${XMe/2}px)`,this.iframe.style.bottom="unset"),this.ready=!0}),this.bodyObserver.observe(window.document.body)}render(){return this.ready&&this.onShowIframe(),K`<div data-ready=${this.ready}></div>`}onShowIframe(){const e=window.innerWidth<=430;this.iframe.animate([{opacity:0,transform:e?"translateY(50px)":"scale(.95)"},{opacity:1,transform:e?"translateY(0)":"scale(1)"}],{duration:200,easing:"ease",fill:"forwards"})}async onHideIframe(){this.iframe.style.display="none",await this.iframe.animate([{opacity:1},{opacity:0}],{duration:200,easing:"ease",fill:"forwards"}).finished}async syncTheme(){const e=Pt.getAuthConnector();if(e){const n=Oi.getSnapshot().themeMode,r=Oi.getSnapshot().themeVariables;await e.provider.syncTheme({themeVariables:r,w3mThemeVariables:Wp(r,n)})}}};HC.styles=JMe;jne([pe()],HC.prototype,"ready",void 0);HC=jne([Ce("w3m-approve-transaction-view")],HC);var eBe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let wq=class extends Te{render(){return K`
      <wui-flex flexDirection="column" alignItems="center" gap="xl" padding="xl">
        <wui-text variant="paragraph-400" color="fg-100">Follow the instructions on</wui-text>
        <wui-chip
          icon="externalLink"
          variant="fill"
          href=${os.SECURE_SITE_DASHBOARD}
          imageSrc=${os.SECURE_SITE_FAVICON}
          data-testid="w3m-secure-website-button"
        >
        </wui-chip>
        <wui-text variant="small-400" color="fg-200">
          You will have to reconnect for security reasons
        </wui-text>
      </wui-flex>
    `}};wq=eBe([Ce("w3m-upgrade-wallet-view")],wq);var C$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let WC=class extends Te{constructor(){super(...arguments),this.authConnector=Pt.getAuthConnector(),this.loading=!1,this.setPreferSmartAccount=async()=>{if(this.authConnector)try{this.loading=!0,await tn.setPreferredAccountType(Fn.ACCOUNT_TYPES.SMART_ACCOUNT),this.loading=!1,PP.navigateAfterPreferredAccountTypeSelect()}catch{Ht.showError("Error upgrading to smart account")}}}render(){return K`
      <wui-flex
        flexDirection="column"
        alignItems="center"
        gap="xxl"
        .padding=${["0","0","l","0"]}
      >
        ${this.onboardingTemplate()} ${this.buttonsTemplate()}
        <wui-link
          @click=${()=>{st.openHref(GB.URLS.FAQ,"_blank")}}
        >
          Learn more
          <wui-icon color="inherit" slot="iconRight" name="externalLink"></wui-icon>
        </wui-link>
      </wui-flex>
    `}onboardingTemplate(){return K` <wui-flex
      flexDirection="column"
      gap="xxl"
      alignItems="center"
      .padding=${["0","xxl","0","xxl"]}
    >
      <wui-flex gap="s" alignItems="center" justifyContent="center">
        <wui-visual name="google"></wui-visual>
        <wui-visual name="pencil"></wui-visual>
        <wui-visual name="lightbulb"></wui-visual>
      </wui-flex>
      <wui-flex flexDirection="column" alignItems="center" gap="s">
        <wui-text align="center" variant="medium-600" color="fg-100">
          Discover Smart Accounts
        </wui-text>
        <wui-text align="center" variant="paragraph-400" color="fg-100">
          Access advanced features such as username, social login, improved security and a smoother
          user experience!
        </wui-text>
      </wui-flex>
    </wui-flex>`}buttonsTemplate(){return K`<wui-flex .padding=${["0","2l","0","2l"]} gap="s">
      <wui-button
        variant="accent"
        @click=${this.redirectToAccount.bind(this)}
        size="lg"
        borderRadius="xs"
      >
        Do it later
      </wui-button>
      <wui-button
        .loading=${this.loading}
        size="lg"
        borderRadius="xs"
        @click=${this.setPreferSmartAccount.bind(this)}
        >Continue
      </wui-button>
    </wui-flex>`}redirectToAccount(){ke.push("Account")}};C$([pe()],WC.prototype,"authConnector",void 0);C$([pe()],WC.prototype,"loading",void 0);WC=C$([Ce("w3m-upgrade-to-smart-account-view")],WC);const tBe=De`
  wui-email-input {
    width: 100%;
  }

  form {
    width: 100%;
    display: block;
    position: relative;
  }
`;var S$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let yx=class extends Te{constructor(){var e;super(...arguments),this.formRef=A0(),this.initialEmail=((e=ke.state.data)==null?void 0:e.email)??"",this.email="",this.loading=!1}firstUpdated(){var e;(e=this.formRef.value)==null||e.addEventListener("keydown",n=>{n.key==="Enter"&&this.onSubmitEmail(n)})}render(){const e=!this.loading&&this.email.length>3&&this.email!==this.initialEmail;return K`
      <wui-flex flexDirection="column" padding="m" gap="m">
        <form ${E0(this.formRef)} @submit=${this.onSubmitEmail.bind(this)}>
          <wui-email-input
            value=${this.initialEmail}
            .disabled=${this.loading}
            @inputChange=${this.onEmailInputChange.bind(this)}
          >
          </wui-email-input>
          <input type="submit" hidden />
        </form>

        <wui-flex gap="s">
          <wui-button size="md" variant="neutral" fullWidth @click=${ke.goBack}>
            Cancel
          </wui-button>

          <wui-button
            size="md"
            variant="main"
            fullWidth
            @click=${this.onSubmitEmail.bind(this)}
            .disabled=${!e}
            .loading=${this.loading}
          >
            Save
          </wui-button>
        </wui-flex>
      </wui-flex>
    `}onEmailInputChange(e){this.email=e.detail}async onSubmitEmail(e){try{if(this.loading)return;this.loading=!0,e.preventDefault();const n=Pt.getAuthConnector();if(!n)throw new Error("w3m-update-email-wallet: Auth connector not found");const r=await n.provider.updateEmail({email:this.email});wt.sendEvent({type:"track",event:"EMAIL_EDIT"}),r.action==="VERIFY_SECONDARY_OTP"?ke.push("UpdateEmailSecondaryOtp",{email:this.initialEmail,newEmail:this.email}):ke.push("UpdateEmailPrimaryOtp",{email:this.initialEmail,newEmail:this.email})}catch(n){Ht.showError(n),this.loading=!1}}};yx.styles=tBe;S$([pe()],yx.prototype,"email",void 0);S$([pe()],yx.prototype,"loading",void 0);yx=S$([Ce("w3m-update-email-wallet-view")],yx);var nBe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let yq=class extends _h{constructor(){var e;super(),this.email=(e=ke.state.data)==null?void 0:e.email,this.onOtpSubmit=async n=>{try{this.authConnector&&(await this.authConnector.provider.updateEmailPrimaryOtp({otp:n}),wt.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),ke.replace("UpdateEmailSecondaryOtp",ke.state.data))}catch(r){throw wt.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),r}},this.onStartOver=()=>{ke.replace("UpdateEmailWallet",ke.state.data)}}};yq=nBe([Ce("w3m-update-email-primary-otp-view")],yq);var rBe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let vq=class extends _h{constructor(){var e;super(),this.email=(e=ke.state.data)==null?void 0:e.newEmail,this.onOtpSubmit=async n=>{try{this.authConnector&&(await this.authConnector.provider.updateEmailSecondaryOtp({otp:n}),wt.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),ke.reset("Account"))}catch(r){throw wt.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL"}),r}},this.onStartOver=()=>{ke.replace("UpdateEmailWallet",ke.state.data)}}};vq=rBe([Ce("w3m-update-email-secondary-otp-view")],vq);const iBe=De`
  :host > wui-flex {
    max-height: clamp(360px, 540px, 80vh);
    overflow: scroll;
    scrollbar-width: none;
  }

  :host > wui-flex::-webkit-scrollbar {
    display: none;
  }
`;var Lne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let VC=class extends Te{constructor(){var e;super(...arguments),this.swapUnsupportedChain=(e=ke.state.data)==null?void 0:e.swapUnsupportedChain,this.disconecting=!1}render(){return K`
      <wui-flex class="container" flexDirection="column" gap="0">
        <wui-flex
          class="container"
          flexDirection="column"
          .padding=${["m","xl","xs","xl"]}
          alignItems="center"
          gap="xl"
        >
          ${this.descriptionTemplate()}
        </wui-flex>

        <wui-flex flexDirection="column" padding="s" gap="xs">
          ${this.networksTemplate()}
        </wui-flex>

        <wui-separator text="or"></wui-separator>
        <wui-flex flexDirection="column" padding="s" gap="xs">
          <wui-list-item
            variant="icon"
            iconVariant="overlay"
            icon="disconnect"
            ?chevron=${!1}
            .loading=${this.disconecting}
            @click=${this.onDisconnect.bind(this)}
            data-testid="disconnect-button"
          >
            <wui-text variant="paragraph-500" color="fg-200">Disconnect</wui-text>
          </wui-list-item>
        </wui-flex>
      </wui-flex>
    `}descriptionTemplate(){return this.swapUnsupportedChain?K`
        <wui-text variant="small-400" color="fg-200" align="center">
          The swap feature doesn’t support your current network. Switch to an available option to
          continue.
        </wui-text>
      `:K`
      <wui-text variant="small-400" color="fg-200" align="center">
        This app doesn’t support your current network. Switch to an available option to continue.
      </wui-text>
    `}networksTemplate(){const e=rt.getRequestedCaipNetworks(),n=rt.state.approvedCaipNetworkIds,r=st.sortRequestedNetworks(n,e);return(this.swapUnsupportedChain?r.filter(s=>os.SWAP_SUPPORTED_NETWORKS.includes(s.id)):r).map(s=>K`
        <wui-list-network
          imageSrc=${gt(kr.getNetworkImage(s))}
          name=${s.name??"Unknown"}
          @click=${()=>this.onSwitchNetwork(s)}
        >
        </wui-list-network>
      `)}async onDisconnect(){try{this.disconecting=!0,await tn.disconnect(),wt.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),dn.close()}catch{wt.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),Ht.showError("Failed to disconnect")}finally{this.disconecting=!1}}async onSwitchNetwork(e){const n=Ne.state.isConnected,r=rt.state.approvedCaipNetworkIds,i=rt.state.supportsAllNetworks,s=rt.state.caipNetwork,o=ke.state.data;n&&(s==null?void 0:s.id)!==e.id?r!=null&&r.includes(e.id)?(await rt.switchActiveNetwork(e),await _$.onNetworkChange()):i&&ke.push("SwitchNetwork",{...o,network:e}):n||(rt.setCaipNetwork(e),ke.push("Connect"))}};VC.styles=iBe;Lne([pe()],VC.prototype,"disconecting",void 0);VC=Lne([Ce("w3m-unsupported-chain-view")],VC);const sBe=De`
  wui-compatible-network {
    margin-top: var(--wui-spacing-l);
  }
`;var r4=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let t1=class extends Te{constructor(){super(),this.unsubscribe=[],this.address=Ne.state.address,this.profileName=Ne.state.profileName,this.network=rt.state.caipNetwork,this.preferredAccountType=Ne.state.preferredAccountType,this.unsubscribe.push(Ne.subscribe(e=>{e.address?(this.address=e.address,this.profileName=e.profileName,this.preferredAccountType=e.preferredAccountType):Ht.showError("Account not found")}),rt.subscribeKey("caipNetwork",e=>{e!=null&&e.id&&(this.network=e)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!this.address)throw new Error("w3m-wallet-receive-view: No account provided");const e=kr.getNetworkImage(this.network);return K` <wui-flex
      flexDirection="column"
      .padding=${["0","l","l","l"]}
      alignItems="center"
    >
      <wui-chip-button
        data-testid="receive-address-copy-button"
        @click=${this.onCopyClick.bind(this)}
        text=${qt.getTruncateString({string:this.profileName||this.address||"",charsStart:this.profileName?18:4,charsEnd:this.profileName?0:4,truncate:this.profileName?"end":"middle"})}
        icon="copy"
        size="sm"
        imageSrc=${e||""}
        variant="gray"
      ></wui-chip-button>
      <wui-flex
        flexDirection="column"
        .padding=${["l","0","0","0"]}
        alignItems="center"
        gap="s"
      >
        <wui-qr-code
          size=${232}
          theme=${Oi.state.themeMode}
          uri=${this.address}
          ?arenaClear=${!0}
          data-testid="wui-qr-code"
        ></wui-qr-code>
        <wui-text variant="paragraph-500" color="fg-100" align="center">
          Copy your address or scan this QR code
        </wui-text>
      </wui-flex>
      ${this.networkTemplate()}
    </wui-flex>`}networkTemplate(){var o;const e=rt.getRequestedCaipNetworks(),n=rt.checkIfSmartAccountEnabled(),r=rt.state.caipNetwork;if(this.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT&&n)return r?K`<wui-compatible-network
        @click=${this.onReceiveClick.bind(this)}
        text="Only receive assets on this network"
        .networkImages=${[kr.getNetworkImage(r)??""]}
      ></wui-compatible-network>`:null;const s=((o=e==null?void 0:e.filter(a=>a==null?void 0:a.imageId))==null?void 0:o.slice(0,5)).map(kr.getNetworkImage).filter(Boolean);return K`<wui-compatible-network
      @click=${this.onReceiveClick.bind(this)}
      text="Only receive assets on these networks"
      .networkImages=${s}
    ></wui-compatible-network>`}onReceiveClick(){ke.push("WalletCompatibleNetworks")}onCopyClick(){try{this.address&&(st.copyToClopboard(this.address),Ht.showSuccess("Address copied"))}catch{Ht.showError("Failed to copy")}}};t1.styles=sBe;r4([pe()],t1.prototype,"address",void 0);r4([pe()],t1.prototype,"profileName",void 0);r4([pe()],t1.prototype,"network",void 0);r4([pe()],t1.prototype,"preferredAccountType",void 0);t1=r4([Ce("w3m-wallet-receive-view")],t1);const oBe=De`
  :host > wui-flex {
    max-height: clamp(360px, 540px, 80vh);
    overflow: scroll;
    scrollbar-width: none;
  }

  :host > wui-flex::-webkit-scrollbar {
    display: none;
  }
`;var Une=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let qC=class extends Te{constructor(){super(),this.unsubscribe=[],this.preferredAccountType=Ne.state.preferredAccountType,this.unsubscribe.push(Ne.subscribeKey("preferredAccountType",e=>{this.preferredAccountType=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return K` <wui-flex
      flexDirection="column"
      .padding=${["xs","s","m","s"]}
      gap="xs"
    >
      <wui-banner
        icon="warningCircle"
        text="You can only receive assets on these networks"
      ></wui-banner>
      ${this.networkTemplate()}
    </wui-flex>`}networkTemplate(){const e=rt.getRequestedCaipNetworks(),n=rt.state.approvedCaipNetworkIds,r=rt.state.caipNetwork,i=rt.checkIfSmartAccountEnabled();let s=st.sortRequestedNetworks(n,e);if(i&&this.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT){if(!r)return null;s=[r]}return s.map(o=>K`
        <wui-list-network
          imageSrc=${gt(kr.getNetworkImage(o))}
          name=${o.name??"Unknown"}
          ?transparent=${!0}
        >
        </wui-list-network>
      `)}};qC.styles=oBe;Une([pe()],qC.prototype,"preferredAccountType",void 0);qC=Une([Ce("w3m-wallet-compatible-networks-view")],qC);const aBe=De`
  :host {
    display: block;
  }

  wui-flex {
    position: relative;
  }

  wui-icon-box {
    width: 40px;
    height: 40px;
    border-radius: var(--wui-border-radius-xs) !important;
    border: 5px solid var(--wui-color-bg-125);
    background: var(--wui-color-bg-175);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
  }

  wui-button {
    --local-border-radius: var(--wui-border-radius-xs) !important;
  }

  .inputContainer {
    height: fit-content;
  }
`;var Q0=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let _d=class extends Te{constructor(){super(),this.unsubscribe=[],this.token=Ir.state.token,this.sendTokenAmount=Ir.state.sendTokenAmount,this.receiverAddress=Ir.state.receiverAddress,this.receiverProfileName=Ir.state.receiverProfileName,this.loading=Ir.state.loading,this.gasPriceInUSD=Ir.state.gasPriceInUSD,this.message="Preview Send",this.fetchNetworkPrice(),this.unsubscribe.push(Ir.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.gasPriceInUSD=e.gasPriceInUSD,this.receiverProfileName=e.receiverProfileName,this.loading=e.loading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return this.getMessage(),K` <wui-flex flexDirection="column" .padding=${["0","l","l","l"]}>
      <wui-flex class="inputContainer" gap="xs" flexDirection="column">
        <w3m-input-token
          .token=${this.token}
          .sendTokenAmount=${this.sendTokenAmount}
          .gasPriceInUSD=${this.gasPriceInUSD}
        ></w3m-input-token>
        <wui-icon-box
          size="inherit"
          backgroundColor="fg-300"
          iconSize="lg"
          iconColor="fg-250"
          background="opaque"
          icon="arrowBottom"
        ></wui-icon-box>
        <w3m-input-address
          .value=${this.receiverProfileName?this.receiverProfileName:this.receiverAddress}
        ></w3m-input-address>
      </wui-flex>
      <wui-flex .margin=${["l","0","0","0"]}>
        <wui-button
          @click=${this.onButtonClick.bind(this)}
          ?disabled=${!this.message.startsWith("Preview Send")}
          size="lg"
          variant="main"
          ?loading=${this.loading}
          fullWidth
        >
          ${this.message}
        </wui-button>
      </wui-flex>
    </wui-flex>`}async fetchNetworkPrice(){await mt.getNetworkTokenPrice();const e=await mt.getInitialGasPrice();e!=null&&e.gasPrice&&(e!=null&&e.gasPriceInUSD)&&(Ir.setGasPrice(e.gasPrice),Ir.setGasPriceInUsd(e.gasPriceInUSD))}onButtonClick(){ke.push("WalletSendPreview")}getMessage(){var e;this.message="Preview Send",this.receiverAddress&&!st.isAddress(this.receiverAddress)&&(this.message="Invalid Address"),this.receiverAddress||(this.message="Add Address"),this.sendTokenAmount&&this.token&&this.sendTokenAmount>Number(this.token.quantity.numeric)&&(this.message="Insufficient Funds"),this.sendTokenAmount||(this.message="Add Amount"),this.sendTokenAmount&&((e=this.token)!=null&&e.price)&&(this.sendTokenAmount*this.token.price||(this.message="Incorrect Value")),this.token||(this.message="Select Token")}};_d.styles=aBe;Q0([pe()],_d.prototype,"token",void 0);Q0([pe()],_d.prototype,"sendTokenAmount",void 0);Q0([pe()],_d.prototype,"receiverAddress",void 0);Q0([pe()],_d.prototype,"receiverProfileName",void 0);Q0([pe()],_d.prototype,"loading",void 0);Q0([pe()],_d.prototype,"gasPriceInUSD",void 0);Q0([pe()],_d.prototype,"message",void 0);_d=Q0([Ce("w3m-wallet-send-view")],_d);const cBe=De`
  .contentContainer {
    height: 440px;
    overflow: scroll;
    scrollbar-width: none;
  }

  .contentContainer::-webkit-scrollbar {
    display: none;
  }

  wui-icon-box {
    width: 40px;
    height: 40px;
    border-radius: var(--wui-border-radius-xxs);
  }
`;var i4=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let n1=class extends Te{constructor(){super(),this.unsubscribe=[],this.tokenBalance=Ne.state.tokenBalance,this.search="",this.onDebouncedSearch=st.debounce(e=>{this.search=e}),this.unsubscribe.push(Ne.subscribe(e=>{this.tokenBalance=e.tokenBalance}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return K`
      <wui-flex flexDirection="column">
        ${this.templateSearchInput()} <wui-separator></wui-separator> ${this.templateTokens()}
      </wui-flex>
    `}templateSearchInput(){return K`
      <wui-flex gap="xs" padding="s">
        <wui-input-text
          @inputChange=${this.onInputChange.bind(this)}
          class="network-search-input"
          size="sm"
          placeholder="Search token"
          icon="search"
        ></wui-input-text>
      </wui-flex>
    `}templateTokens(){var e,n;return this.tokens=(e=this.tokenBalance)==null?void 0:e.filter(r=>{var i;return r.chainId===((i=rt.state.caipNetwork)==null?void 0:i.id)}),this.search?this.filteredTokens=(n=this.tokenBalance)==null?void 0:n.filter(r=>r.name.toLowerCase().includes(this.search.toLowerCase())):this.filteredTokens=this.tokens,K`
      <wui-flex
        class="contentContainer"
        flexDirection="column"
        .padding=${["0","s","0","s"]}
      >
        <wui-flex justifyContent="flex-start" .padding=${["m","s","s","s"]}>
          <wui-text variant="paragraph-500" color="fg-200">Your tokens</wui-text>
        </wui-flex>
        <wui-flex flexDirection="column" gap="xs">
          ${this.filteredTokens&&this.filteredTokens.length>0?this.filteredTokens.map(r=>K`<wui-list-token
                    @click=${this.handleTokenClick.bind(this,r)}
                    ?clickable=${!0}
                    tokenName=${r.name}
                    tokenImageUrl=${r.iconUrl}
                    tokenAmount=${r.quantity.numeric}
                    tokenValue=${r.value}
                    tokenCurrency=${r.symbol}
                  ></wui-list-token>`):K`<wui-flex
                .padding=${["4xl","0","0","0"]}
                alignItems="center"
                flexDirection="column"
                gap="l"
              >
                <wui-icon-box
                  icon="coinPlaceholder"
                  size="inherit"
                  iconColor="fg-200"
                  backgroundColor="fg-200"
                  iconSize="lg"
                ></wui-icon-box>
                <wui-flex
                  class="textContent"
                  gap="xs"
                  flexDirection="column"
                  justifyContent="center"
                  flexDirection="column"
                >
                  <wui-text variant="paragraph-500" align="center" color="fg-100"
                    >No tokens found</wui-text
                  >
                  <wui-text variant="small-400" align="center" color="fg-200"
                    >Your tokens will appear here</wui-text
                  >
                </wui-flex>
                <wui-link @click=${this.onBuyClick.bind(this)}>Buy</wui-link>
              </wui-flex>`}
        </wui-flex>
      </wui-flex>
    `}onBuyClick(){ke.push("OnRampProviders")}onInputChange(e){this.onDebouncedSearch(e.detail)}handleTokenClick(e){Ir.setToken(e),Ir.setTokenAmount(void 0),ke.goBack()}};n1.styles=cBe;i4([pe()],n1.prototype,"tokenBalance",void 0);i4([pe()],n1.prototype,"tokens",void 0);i4([pe()],n1.prototype,"filteredTokens",void 0);i4([pe()],n1.prototype,"search",void 0);n1=i4([Ce("w3m-wallet-send-select-token-view")],n1);const lBe=De`
  wui-avatar,
  wui-image {
    display: ruby;
    width: 32px;
    height: 32px;
    border-radius: var(--wui-border-radius-3xl);
  }

  .sendButton {
    width: 70%;
    --local-width: 100% !important;
    --local-border-radius: var(--wui-border-radius-xs) !important;
  }

  .cancelButton {
    width: 30%;
    --local-width: 100% !important;
    --local-border-radius: var(--wui-border-radius-xs) !important;
  }
`;var Z0=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Ad=class extends Te{constructor(){super(),this.unsubscribe=[],this.token=Ir.state.token,this.sendTokenAmount=Ir.state.sendTokenAmount,this.receiverAddress=Ir.state.receiverAddress,this.receiverProfileName=Ir.state.receiverProfileName,this.receiverProfileImageUrl=Ir.state.receiverProfileImageUrl,this.gasPriceInUSD=Ir.state.gasPriceInUSD,this.caipNetwork=rt.state.caipNetwork,this.unsubscribe.push(Ir.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.gasPriceInUSD=e.gasPriceInUSD,this.receiverProfileName=e.receiverProfileName,this.receiverProfileImageUrl=e.receiverProfileImageUrl}),rt.subscribeKey("caipNetwork",e=>this.caipNetwork=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){var e,n;return K` <wui-flex flexDirection="column" .padding=${["0","l","l","l"]}>
      <wui-flex gap="xs" flexDirection="column" .padding=${["0","xs","0","xs"]}>
        <wui-flex alignItems="center" justifyContent="space-between">
          <wui-flex flexDirection="column" gap="4xs">
            <wui-text variant="small-400" color="fg-150">Send</wui-text>
            ${this.sendValueTemplate()}
          </wui-flex>
          <wui-preview-item
            text="${this.sendTokenAmount?qt.roundNumber(this.sendTokenAmount,6,5):"unknown"} ${(e=this.token)==null?void 0:e.symbol}"
            .imageSrc=${(n=this.token)==null?void 0:n.iconUrl}
          ></wui-preview-item>
        </wui-flex>
        <wui-flex>
          <wui-icon color="fg-200" size="md" name="arrowBottom"></wui-icon>
        </wui-flex>
        <wui-flex alignItems="center" justifyContent="space-between">
          <wui-text variant="small-400" color="fg-150">To</wui-text>
          <wui-preview-item
            text="${this.receiverProfileName?qt.getTruncateString({string:this.receiverProfileName,charsStart:20,charsEnd:0,truncate:"end"}):qt.getTruncateString({string:this.receiverAddress?this.receiverAddress:"",charsStart:4,charsEnd:4,truncate:"middle"})}"
            address=${this.receiverAddress??""}
            .imageSrc=${this.receiverProfileImageUrl??void 0}
            .isAddress=${!0}
          ></wui-preview-item>
        </wui-flex>
      </wui-flex>
      <wui-flex flexDirection="column" .padding=${["xxl","0","0","0"]}>
        <w3m-wallet-send-details
          .caipNetwork=${this.caipNetwork}
          .receiverAddress=${this.receiverAddress}
          .networkFee=${this.gasPriceInUSD}
        ></w3m-wallet-send-details>
        <wui-flex justifyContent="center" gap="xxs" .padding=${["s","0","0","0"]}>
          <wui-icon size="sm" color="fg-200" name="warningCircle"></wui-icon>
          <wui-text variant="small-400" color="fg-200">Review transaction carefully</wui-text>
        </wui-flex>
        <wui-flex justifyContent="center" gap="s" .padding=${["l","0","0","0"]}>
          <wui-button
            class="cancelButton"
            @click=${this.onCancelClick.bind(this)}
            size="lg"
            variant="neutral"
          >
            Cancel
          </wui-button>
          <wui-button
            class="sendButton"
            @click=${this.onSendClick.bind(this)}
            size="lg"
            variant="main"
          >
            Send
          </wui-button>
        </wui-flex>
      </wui-flex></wui-flex
    >`}sendValueTemplate(){if(this.token&&this.sendTokenAmount){const n=this.token.price*this.sendTokenAmount;return K`<wui-text variant="paragraph-400" color="fg-100"
        >$${n.toFixed(2)}</wui-text
      >`}return null}onSendClick(){Ir.sendToken()}onCancelClick(){ke.goBack()}};Ad.styles=lBe;Z0([pe()],Ad.prototype,"token",void 0);Z0([pe()],Ad.prototype,"sendTokenAmount",void 0);Z0([pe()],Ad.prototype,"receiverAddress",void 0);Z0([pe()],Ad.prototype,"receiverProfileName",void 0);Z0([pe()],Ad.prototype,"receiverProfileImageUrl",void 0);Z0([pe()],Ad.prototype,"gasPriceInUSD",void 0);Z0([pe()],Ad.prototype,"caipNetwork",void 0);Ad=Z0([Ce("w3m-wallet-send-preview-view")],Ad);const uBe=De`
  wui-flex {
    max-height: clamp(360px, 540px, 80vh);
    overflow: scroll;
    scrollbar-width: none;
  }
  wui-flex::-webkit-scrollbar {
    display: none;
  }
`;var dBe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let KP=class extends Te{render(){return K`
      <wui-flex flexDirection="column" padding="s" gap="xs">
        <w3m-wallet-login-list></w3m-wallet-login-list>
      </wui-flex>
      <w3m-legal-footer></w3m-legal-footer>
    `}};KP.styles=uBe;KP=dBe([Ce("w3m-connect-wallets-view")],KP);const fBe=De`
  wui-flex {
    max-height: clamp(360px, 540px, 80vh);
    overflow: scroll;
    scrollbar-width: none;
  }
  wui-flex::-webkit-scrollbar {
    display: none;
  }
`;var hBe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let YP=class extends Te{render(){return K`
      <wui-flex flexDirection="column" padding="s" gap="xs">
        <w3m-social-login-list></w3m-social-login-list>
      </wui-flex>
      <w3m-legal-footer></w3m-legal-footer>
    `}};YP.styles=fBe;YP=hBe([Ce("w3m-connect-socials-view")],YP);const pBe=De`
  wui-logo {
    width: 80px;
    height: 80px;
    border-radius: var(--wui-border-radius-m);
  }
  @keyframes shake {
    0% {
      transform: translateX(0);
    }
    25% {
      transform: translateX(3px);
    }
    50% {
      transform: translateX(-3px);
    }
    75% {
      transform: translateX(3px);
    }
    100% {
      transform: translateX(0);
    }
  }
  wui-flex:first-child:not(:only-child) {
    position: relative;
  }
  wui-loading-thumbnail {
    position: absolute;
  }
  wui-icon-box {
    position: absolute;
    right: calc(var(--wui-spacing-3xs) * -1);
    bottom: calc(var(--wui-spacing-3xs) * -1);
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--wui-ease-out-power-2) var(--wui-duration-lg);
  }
  wui-text[align='center'] {
    width: 100%;
    padding: 0px var(--wui-spacing-l);
  }
  [data-error='true'] wui-icon-box {
    opacity: 1;
    transform: scale(1);
  }
  [data-error='true'] > wui-flex:first-child {
    animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  }
  .capitalize {
    text-transform: capitalize;
  }
`;var mBe={};const Fne={ACCOUNT_TABS:[{label:"Tokens"},{label:"NFTs"},{label:"Activity"}],SECURE_SITE_ORIGIN:mBe.NEXT_PUBLIC_SECURE_SITE_ORIGIN||"https://secure.walletconnect.org"};var Lb=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let I0=class extends Te{constructor(){super(),this.unsubscribe=[],this.socialProvider=Ne.state.socialProvider,this.socialWindow=Ne.state.socialWindow,this.error=!1,this.connecting=!1,this.message="Connect in the provider window",this.authConnector=Pt.getAuthConnector(),this.handleSocialConnection=async e=>{var n;if((n=e.data)!=null&&n.resultUri)if(e.origin===Fne.SECURE_SITE_ORIGIN){window.removeEventListener("message",this.handleSocialConnection,!1);try{if(this.authConnector&&!this.connecting){this.socialWindow&&(this.socialWindow.close(),Ne.setSocialWindow(void 0,Qe.state.activeChain)),this.connecting=!0,this.updateMessage();const r=e.data.resultUri;await this.authConnector.provider.connectSocial(r),this.socialProvider&&(er.setConnectedSocialProvider(this.socialProvider),await tn.connectExternal(this.authConnector),wt.sendEvent({type:"track",event:"SOCIAL_LOGIN_SUCCESS",properties:{provider:this.socialProvider}}))}}catch{this.error=!0,this.updateMessage(),this.socialProvider&&wt.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:this.socialProvider}})}}else ke.goBack(),Ht.showError("Untrusted Origin"),this.socialProvider&&wt.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:this.socialProvider}})},this.unsubscribe.push(Ne.subscribe(e=>{e.socialProvider&&(this.socialProvider=e.socialProvider),e.socialWindow&&(this.socialWindow=e.socialWindow),e.address&&dn.state.open&&dn.close()})),this.authConnector&&this.connectSocial()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),window.removeEventListener("message",this.handleSocialConnection,!1)}render(){return K`
      <wui-flex
        data-error=${gt(this.error)}
        flexDirection="column"
        alignItems="center"
        .padding=${["3xl","xl","xl","xl"]}
        gap="xl"
      >
        <wui-flex justifyContent="center" alignItems="center">
          <wui-logo logo=${gt(this.socialProvider)}></wui-logo>
          ${this.error?null:this.loaderTemplate()}
          <wui-icon-box
            backgroundColor="error-100"
            background="opaque"
            iconColor="error-100"
            icon="close"
            size="sm"
            border
            borderColor="wui-color-bg-125"
          ></wui-icon-box>
        </wui-flex>
        <wui-flex flexDirection="column" alignItems="center" gap="xs">
          <wui-text align="center" variant="paragraph-500" color="fg-100"
            >Log in with
            <span class="capitalize">${this.socialProvider??"Social"}</span></wui-text
          >
          <wui-text align="center" variant="small-400" color=${this.error?"error-100":"fg-200"}
            >${this.message}</wui-text
          ></wui-flex
        >
      </wui-flex>
    `}loaderTemplate(){const e=Oi.state.themeVariables["--w3m-border-radius-master"],n=e?parseInt(e.replace("px",""),10):4;return K`<wui-loading-thumbnail radius=${n*9}></wui-loading-thumbnail>`}connectSocial(){const e=setInterval(()=>{var n;(n=this.socialWindow)!=null&&n.closed&&(!this.connecting&&ke.state.view==="ConnectingSocial"&&ke.goBack(),clearInterval(e))},1e3);window.addEventListener("message",this.handleSocialConnection,!1)}updateMessage(){this.error?this.message="Something went wrong":this.connecting?this.message="Retrieving user data":this.message="Connect in the provider window"}};I0.styles=pBe;Lb([pe()],I0.prototype,"socialProvider",void 0);Lb([pe()],I0.prototype,"socialWindow",void 0);Lb([pe()],I0.prototype,"error",void 0);Lb([pe()],I0.prototype,"connecting",void 0);Lb([pe()],I0.prototype,"message",void 0);I0=Lb([Ce("w3m-connecting-social-view")],I0);const gBe=De`
  wui-flex {
    width: 100%;
  }

  wui-icon-link {
    margin-right: calc(var(--wui-icon-box-size-md) * -1);
  }

  .account-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .account-links wui-flex {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    background: red;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 10px;
    flex: 1 0 0;

    border-radius: var(--XS, 16px);
    border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));
    background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));
    transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
    will-change: background-color;
  }

  .account-links wui-flex:hover {
    background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15));
  }

  .account-links wui-flex wui-icon {
    width: var(--S, 20px);
    height: var(--S, 20px);
  }

  .account-links wui-flex wui-icon svg path {
    stroke: #47a1ff;
  }

  .account-settings-button {
    padding: calc(var(--wui-spacing-m) - 1px) var(--wui-spacing-2l);
    height: 40px;
    border-radius: var(--wui-border-radius-xxs);
    border: 1px solid var(--wui-color-gray-glass-002);
    background: var(--wui-color-gray-glass-002);
    cursor: pointer;
  }

  .account-settings-button:hover {
    background: var(--wui-color-gray-glass-005);
  }
`;var s4=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let r1=class extends Te{constructor(){super(),this.usubscribe=[],this.address=Ne.state.address,this.profileImage=Ne.state.profileImage,this.profileName=Ne.state.profileName,this.accounts=Ne.state.allAccounts,this.usubscribe.push(Ne.subscribeKey("address",e=>{e?this.address=e:dn.close()})),this.usubscribe.push(Ne.subscribeKey("profileImage",e=>{this.profileImage=e})),this.usubscribe.push(Ne.subscribeKey("profileName",e=>{this.profileName=e}))}disconnectedCallback(){this.usubscribe.forEach(e=>e())}render(){var n;if(!this.address)throw new Error("w3m-profile-view: No account provided");const e=(n=this.profileName)==null?void 0:n.split(".")[0];return K`
      <wui-flex flexDirection="column" gap="l" .padding=${["0","xl","m","xl"]}>
        <wui-flex flexDirection="column" alignItems="center" gap="l">
          <wui-avatar
            alt=${this.address}
            address=${this.address}
            imageSrc=${gt(this.profileImage)}
            size="2lg"
          ></wui-avatar>
          <wui-flex flexDirection="column" alignItems="center">
            <wui-flex gap="3xs" alignItems="center" justifyContent="center">
              <wui-text variant="title-6-600" color="fg-100" data-testid="account-settings-address">
                ${e?qt.getTruncateString({string:e,charsStart:20,charsEnd:0,truncate:"end"}):qt.getTruncateString({string:this.address,charsStart:4,charsEnd:6,truncate:"middle"})}
              </wui-text>
              <wui-icon-link
                size="md"
                icon="copy"
                iconColor="fg-200"
                @click=${this.onCopyAddress}
              ></wui-icon-link>
            </wui-flex>
          </wui-flex>
        </wui-flex>
        <wui-flex
          data-testid="account-settings-button"
          justifyContent="center"
          alignItems="center"
          class="account-settings-button"
          @click=${()=>ke.push("AccountSettings")}
        >
          <wui-text variant="paragraph-500" color="fg-100">Account Settings</wui-text>
        </wui-flex>
        ${this.accountsTemplate()}
      </wui-flex>
    `}accountsTemplate(){return K`<wui-flex flexDirection="column">
      <wui-flex .padding=${["3xs","m","s","s"]}>
        <wui-text color="fg-200" variant="paragraph-400">Your accounts</wui-text>
      </wui-flex>
      <wui-flex flexDirection="column" gap="xxs">
        ${this.accounts.map(e=>this.accountTemplate(e))}
      </wui-flex>
    </wui-flex>`}async onSwitchAccount(e){Ne.setShouldUpdateToAddress(e.address);const n=Pt.getAuthConnector();n&&(await n.provider.setPreferredAccount(e.type),await n.provider.connect())}accountTemplate(e){return K`<wui-list-account accountAddress=${e.address} accountType=${e.type}>
      ${e.address===this.address?"":K`<wui-button
            slot="action"
            textVariant="small-600"
            size="sm"
            variant="accent"
            @click=${()=>this.onSwitchAccount(e)}
            >Switch</wui-button
          >`}
    </wui-list-account>`}onCopyAddress(){try{this.profileName?(st.copyToClopboard(this.profileName),Ht.showSuccess("Name copied")):this.address&&(st.copyToClopboard(this.address),Ht.showSuccess("Address copied"))}catch{Ht.showError("Failed to copy")}}};r1.styles=gBe;s4([pe()],r1.prototype,"address",void 0);s4([pe()],r1.prototype,"profileImage",void 0);s4([pe()],r1.prototype,"profileName",void 0);s4([pe()],r1.prototype,"accounts",void 0);r1=s4([Ce("w3m-profile-view")],r1);const wBe=De`
  input[type='checkbox'] {
    all: revert;
    width: var(--wui-spacing-xl);
    height: var(--wui-spacing-xl);
    accent-color: var(--wui-color-accent-100);
  }
`;var Ub=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let k0=class extends Te{constructor(){super(),this.metadata=pt.state.metadata,this.allAccounts=Ne.state.allAccounts,this.selectedAccounts=Ne.state.allAccounts,this.selectAll=!0,this.approved=!1,this.isApproving=!1,this.getAddressTemplate=e=>{const n=this.selectedAccounts.some(r=>r.address===e.address);return K`<wui-list-account accountAddress="${e.address}" accountType="${e.type}">
      <input
        id="${e.address}"
        slot="action"
        type="checkbox"
        .checked="${n}"
        @change="${this.handleClick(e)}"
      />
    </wui-list-account>`},this.onSelectAll=e=>{const n=e.target.checked;this.selectAll=this.selectedAccounts.length===this.allAccounts.length,this.allAccounts.forEach(r=>{this.onSelect(r,n)})},this.onSelect=(e,n)=>{n?this.selectedAccounts.push(e):this.selectedAccounts=this.selectedAccounts.filter(r=>r.address!==e.address),this.selectedAccounts.length>0&&(this.selectAll=this.selectedAccounts.length===this.allAccounts.length)},Ne.subscribeKey("allAccounts",e=>{this.allAccounts=e})}render(){var e,n;return K`
    <wui-flex justifyContent="center" .padding=${["xl","0","xl","0"]}>
      <wui-banner-img imageSrc="${gt((e=this.metadata)==null?void 0:e.icons[0])}" text="${gt((n=this.metadata)==null?void 0:n.url)}" size="sm"></wui-banner>
    </wui-flex>
    <wui-flex .padding=${["0","xl","0","xl"]} flexDirection="row" justifyContent="space-between">
        <wui-text variant="paragraph-400" color="fg-200">Select all</wui-text>
        <input type="checkbox" .checked=${this.selectAll}  @click=${this.onSelectAll.bind(this)} />
    </wui-flex>
      <wui-flex flexDirection="column" .padding=${["l","xl","xl","xl"]}>
        ${this.allAccounts.map(r=>this.getAddressTemplate(r))}
      </wui-flex>
      <wui-flex .padding=${["l","xl","xl","xl"]} gap="s" justifyContent="space-between">
        <wui-button
          size="md"
          ?fullwidth=${!0}
          variant="neutral"
          @click=${this.onCancel.bind(this)}
          data-testid="w3m-connecting-siwe-cancel"
        >
          Cancel
        </wui-button>
        <wui-button
          size="md"
          ?fullwidth=${!0}
          variant="main"
          .disabled=${this.selectedAccounts.length===0}
          @click=${this.onContinue.bind(this)}
          ?loading=${this.isApproving}
        >
          ${this.isApproving?"Signing...":"Continue"}
        </wui-button>
      </wui-flex>
    `}handleClick(e){return n=>{var i;const r=n.target;(i=this.onSelect)==null||i.call(this,{...e},r==null?void 0:r.checked)}}onContinue(){var e;this.selectedAccounts.length>0?(this.isApproving=!0,Ne.setAllAccounts(this.selectedAccounts),Ne.setShouldUpdateToAddress(((e=this.selectedAccounts[0])==null?void 0:e.address)??""),this.approved=!0,this.isApproving=!1,dn.close()):this.onCancel()}async onCancel(){const{isConnected:e}=Ne.state;e?(await tn.disconnect(),dn.close()):ke.push("Connect")}disconnectedCallback(){super.disconnectedCallback(),this.approved||this.onCancel()}};k0.styles=wBe;Ub([pe()],k0.prototype,"allAccounts",void 0);Ub([pe()],k0.prototype,"selectedAccounts",void 0);Ub([pe()],k0.prototype,"selectAll",void 0);Ub([pe()],k0.prototype,"approved",void 0);Ub([pe()],k0.prototype,"isApproving",void 0);k0=Ub([Ce("w3m-select-addresses-view")],k0);const yBe=De`
  wui-avatar {
    width: var(--wui-spacing-3xl);
    height: var(--wui-spacing-3xl);
    box-shadow: 0 0 0 0;
  }

  wui-icon-box {
    position: relative;
    right: 15px;
    top: 15px;
    border: 2px solid var(--wui-color-bg-150);
    background-color: var(--wui-color-bg-125);
  }
`;var T$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let vx=class extends Te{constructor(){super(),this.metadata=pt.state.metadata,this.allAccounts=Ne.state.allAccounts||[],this.balances={},this.labels=Ne.state.addressLabels,this.currentAddress=Ne.state.address||"",this.connectedConnector=er.getConnectedConnector(),this.shouldShowIcon=this.connectedConnector==="AUTH",this.caipNetwork=rt.state.caipNetwork,Ne.subscribeKey("allAccounts",e=>{this.allAccounts=e})}connectedCallback(){super.connectedCallback(),this.allAccounts.forEach(e=>{var n;wi.getBalance(e.address,(n=this.caipNetwork)==null?void 0:n.id).then(r=>{let i=this.balances[e.address]||0;r.balances.length>0&&(i=r.balances.reduce((s,o)=>s+((o==null?void 0:o.value)||0),0)),this.balances[e.address]=i,this.requestUpdate()})})}getAddressIcon(e){return e==="smartAccount"?"lightbulb":"mail"}render(){var e,n;return K`
      <wui-flex justifyContent="center" .padding=${["xl","0","xl","0"]}>
        <wui-banner-img
          imageSrc=${gt((e=this.metadata)==null?void 0:e.icons[0])}
          text=${gt((n=this.metadata)==null?void 0:n.url)}
          size="sm"
        ></wui-banner-img>
      </wui-flex>
      <wui-flex flexDirection="column" gap="xxl" .padding=${["l","xl","xl","xl"]}>
        ${this.allAccounts.map(r=>this.getAddressTemplate(r))}
      </wui-flex>
    `}getAddressTemplate(e){var r,i,s,o;const n=(r=this.labels)==null?void 0:r.get(e.address);return K`
      <wui-flex
        flexDirection="row"
        justifyContent="space-between"
        data-testid="switch-address-item"
      >
        <wui-flex alignItems="center">
          <wui-avatar address=${e.address}></wui-avatar>
          ${this.shouldShowIcon?K`<wui-icon-box
                size="sm"
                iconcolor="fg-200"
                backgroundcolor="glass-002"
                background="gray"
                icon="${this.getAddressIcon(e.type)}"
                ?border=${!0}
              ></wui-icon-box>`:K`<wui-flex .padding="${["0","0","0","s"]}"></wui-flex>`}
          <wui-flex flexDirection="column">
            <wui-text class="address" variant="paragraph-500" color="fg-100"
              >${n||qt.getTruncateString({string:e.address,charsStart:4,charsEnd:6,truncate:"middle"})}</wui-text
            >
            <wui-text class="address-description" variant="small-400">
              ${typeof this.balances[e.address]=="number"?`$${(i=this.balances[e.address])==null?void 0:i.toFixed(2)}`:K`<wui-loading-spinner size="sm" color="accent-100"></wui-loading-spinner>`}
            </wui-text>
          </wui-flex>
        </wui-flex>
        <wui-flex gap="s" alignItems="center">
          ${((s=e.address)==null?void 0:s.toLowerCase())===((o=this.currentAddress)==null?void 0:o.toLowerCase())?"":K`
                <wui-button
                  textVariant="small-600"
                  size="md"
                  variant="accent"
                  @click=${()=>this.onSwitchAddress(e.address)}
                  >Switch to</wui-button
                >
              `}
        </wui-flex>
      </wui-flex>
    `}onSwitchAddress(e){Ne.setShouldUpdateToAddress(e),dn.close()}};vx.styles=yBe;T$([pe()],vx.prototype,"allAccounts",void 0);T$([pe()],vx.prototype,"balances",void 0);vx=T$([Ce("w3m-switch-address-view")],vx);const vBe=De`
  @keyframes fadein {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  wui-shimmer {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important;
  }

  wui-qr-code {
    opacity: 0;
    animation-duration: 200ms;
    animation-timing-function: ease;
    animation-name: fadein;
    animation-fill-mode: forwards;
  }

  wui-logo {
    width: 80px;
    height: 80px;
    border-radius: var(--wui-border-radius-m);
  }

  wui-flex:first-child:not(:only-child) {
    position: relative;
  }
  wui-loading-thumbnail {
    position: absolute;
  }
  wui-icon-box {
    position: absolute;
    right: calc(var(--wui-spacing-3xs) * -1);
    bottom: calc(var(--wui-spacing-3xs) * -1);
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--wui-ease-out-power-2) var(--wui-duration-lg);
  }
`;var o4=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let i1=class extends Te{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.socialProvider=Ne.state.socialProvider,this.uri=Ne.state.farcasterUrl,this.ready=!1,this.loading=!1,this.authConnector=Pt.getAuthConnector(),this.forceUpdate=()=>{this.requestUpdate()},this.unsubscribe.push(Ne.subscribeKey("farcasterUrl",e=>{e&&(this.uri=e,this.connectFarcaster())}),Ne.subscribeKey("socialProvider",e=>{e&&(this.socialProvider=e)})),window.addEventListener("resize",this.forceUpdate)}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.timeout),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),K`${this.platformTemplate()}`}platformTemplate(){return st.isMobile()?K`${this.mobileTemplate()}`:K`${this.desktopTemplate()}`}desktopTemplate(){return this.loading?K`${this.loadingTemplate()}`:K`${this.qrTemplate()}`}qrTemplate(){return K` <wui-flex
      flexDirection="column"
      alignItems="center"
      .padding=${["0","xl","xl","xl"]}
      gap="xl"
    >
      <wui-shimmer borderRadius="l" width="100%"> ${this.qrCodeTemplate()} </wui-shimmer>

      <wui-text variant="paragraph-500" color="fg-100">
        Scan this QR Code with your phone
      </wui-text>
      ${this.copyTemplate()}
    </wui-flex>`}loadingTemplate(){return K`
      <wui-flex
        flexDirection="column"
        alignItems="center"
        .padding=${["xl","xl","xl","xl"]}
        gap="xl"
      >
        <wui-flex justifyContent="center" alignItems="center">
          <wui-logo logo="farcaster"></wui-logo>
          ${this.loaderTemplate()}
          <wui-icon-box
            backgroundColor="error-100"
            background="opaque"
            iconColor="error-100"
            icon="close"
            size="sm"
            border
            borderColor="wui-color-bg-125"
          ></wui-icon-box>
        </wui-flex>
        <wui-flex flexDirection="column" alignItems="center" gap="xs">
          <wui-text align="center" variant="paragraph-500" color="fg-100">
            Loading user data
          </wui-text>
          <wui-text align="center" variant="small-400" color="fg-200">
            Please wait a moment while we load your data.
          </wui-text>
        </wui-flex>
      </wui-flex>
    `}mobileTemplate(){return K` <wui-flex
      flexDirection="column"
      alignItems="center"
      .padding=${["3xl","xl","xl","xl"]}
      gap="xl"
    >
      <wui-flex justifyContent="center" alignItems="center">
        <wui-logo logo="farcaster"></wui-logo>
        ${this.loaderTemplate()}
        <wui-icon-box
          backgroundColor="error-100"
          background="opaque"
          iconColor="error-100"
          icon="close"
          size="sm"
          border
          borderColor="wui-color-bg-125"
        ></wui-icon-box>
      </wui-flex>
      <wui-flex flexDirection="column" alignItems="center" gap="xs">
        <wui-text align="center" variant="paragraph-500" color="fg-100"
          >Continue in Farcaster</span></wui-text
        >
        <wui-text align="center" variant="small-400" color="fg-200"
          >Accept connection request in the app</wui-text
        ></wui-flex
      >
      ${this.mobileLinkTemplate()}
    </wui-flex>`}loaderTemplate(){const e=Oi.state.themeVariables["--w3m-border-radius-master"],n=e?parseInt(e.replace("px",""),10):4;return K`<wui-loading-thumbnail radius=${n*9}></wui-loading-thumbnail>`}async connectFarcaster(){var e;if(this.authConnector)try{await((e=this.authConnector)==null?void 0:e.provider.connectFarcaster()),this.socialProvider&&er.setConnectedSocialProvider(this.socialProvider),this.loading=!0,await tn.connectExternal(this.authConnector),this.loading=!1,dn.close()}catch(n){ke.goBack(),Ht.showError(n)}}mobileLinkTemplate(){return K`<wui-button
      size="md"
      ?loading=${this.loading}
      ?disabled=${!this.uri||this.loading}
      @click=${()=>{this.uri&&st.openHref(this.uri,"_blank")}}
    >
      Open farcaster</wui-button
    >`}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout(()=>{this.ready=!0},0))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;const e=this.getBoundingClientRect().width-40;return K` <wui-qr-code
      size=${e}
      theme=${Oi.state.themeMode}
      uri=${this.uri}
      ?farcaster=${!0}
      data-testid="wui-qr-code"
    ></wui-qr-code>`}copyTemplate(){const e=!this.uri||!this.ready;return K`<wui-link
      .disabled=${e}
      @click=${this.onCopyUri}
      color="fg-200"
      data-testid="copy-wc2-uri"
    >
      <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
      Copy link
    </wui-link>`}onCopyUri(){try{this.uri&&(st.copyToClopboard(this.uri),Ht.showSuccess("Link copied"))}catch{Ht.showError("Failed to copy")}}};i1.styles=vBe;o4([pe()],i1.prototype,"socialProvider",void 0);o4([pe()],i1.prototype,"uri",void 0);o4([pe()],i1.prototype,"ready",void 0);o4([pe()],i1.prototype,"loading",void 0);i1=o4([Ce("w3m-connecting-farcaster-view")],i1);const bBe=De`
  wui-grid {
    max-height: clamp(360px, 400px, 80vh);
    overflow: scroll;
    scrollbar-width: none;
    grid-auto-rows: min-content;
    grid-template-columns: repeat(auto-fill, 76px);
  }

  @media (max-width: 435px) {
    wui-grid {
      grid-template-columns: repeat(auto-fill, 77px);
    }
  }

  wui-grid[data-scroll='false'] {
    overflow: hidden;
  }

  wui-grid::-webkit-scrollbar {
    display: none;
  }

  wui-loading-spinner {
    padding-top: var(--wui-spacing-l);
    padding-bottom: var(--wui-spacing-l);
    justify-content: center;
    grid-column: 1 / span 4;
  }
`;function zne(t){const{connectors:e}=Pt.state,n=e.filter(s=>s.type==="ANNOUNCED").reduce((s,o)=>{var a;return(a=o.info)!=null&&a.rdns&&(s[o.info.rdns]=!0),s},{});return t.map(s=>({...s,installed:!!s.rdns&&!!n[s.rdns??""]})).sort((s,o)=>Number(o.installed)-Number(s.installed))}var a4=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const bq="local-paginator";let s1=class extends Te{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.initial=!Qt.state.wallets.length,this.wallets=Qt.state.wallets,this.recommended=Qt.state.recommended,this.featured=Qt.state.featured,this.unsubscribe.push(Qt.subscribeKey("wallets",e=>this.wallets=e),Qt.subscribeKey("recommended",e=>this.recommended=e),Qt.subscribeKey("featured",e=>this.featured=e))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){var e;this.unsubscribe.forEach(n=>n()),(e=this.paginationObserver)==null||e.disconnect()}render(){return K`
      <wui-grid
        data-scroll=${!this.initial}
        .padding=${["0","s","s","s"]}
        columnGap="xxs"
        rowGap="l"
        justifyContent="space-between"
      >
        ${this.initial?this.shimmerTemplate(16):this.walletsTemplate()}
        ${this.paginationLoaderTemplate()}
      </wui-grid>
    `}async initialFetch(){var n;const e=(n=this.shadowRoot)==null?void 0:n.querySelector("wui-grid");this.initial&&e&&(await Qt.fetchWallets({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.initial=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(e,n){return[...Array(e)].map(()=>K`
        <wui-card-select-loader type="wallet" id=${gt(n)}></wui-card-select-loader>
      `)}walletsTemplate(){const e=[...this.featured,...this.recommended,...this.wallets];return zne(e).map(r=>K`
        <wui-card-select
          imageSrc=${gt(kr.getWalletImage(r))}
          type="wallet"
          name=${r.name}
          @click=${()=>this.onConnectWallet(r)}
          .installed=${r.installed}
        ></wui-card-select>
      `)}paginationLoaderTemplate(){const{wallets:e,recommended:n,featured:r,count:i}=Qt.state,s=window.innerWidth<352?3:4,o=e.length+n.length;let c=Math.ceil(o/s)*s-o+s;return c-=e.length?r.length%s:0,i===0&&r.length>0?null:i===0||[...r,...e,...n].length<i?this.shimmerTemplate(c,bq):null}createPaginationObserver(){var n;const e=(n=this.shadowRoot)==null?void 0:n.querySelector(`#${bq}`);e&&(this.paginationObserver=new IntersectionObserver(([r])=>{if(r!=null&&r.isIntersecting&&!this.initial){const{page:i,count:s,wallets:o}=Qt.state;o.length<s&&Qt.fetchWallets({page:i+1})}}),this.paginationObserver.observe(e))}onConnectWallet(e){const n=Pt.getConnector(e.id,e.rdns);n?ke.push("ConnectingExternal",{connector:n}):ke.push("ConnectingWalletConnect",{wallet:e})}};s1.styles=bBe;a4([pe()],s1.prototype,"initial",void 0);a4([pe()],s1.prototype,"wallets",void 0);a4([pe()],s1.prototype,"recommended",void 0);a4([pe()],s1.prototype,"featured",void 0);s1=a4([Ce("w3m-all-wallets-list")],s1);const xBe=De`
  wui-grid,
  wui-loading-spinner,
  wui-flex {
    height: 360px;
  }

  wui-grid {
    overflow: scroll;
    scrollbar-width: none;
    grid-auto-rows: min-content;
  }

  wui-grid[data-scroll='false'] {
    overflow: hidden;
  }

  wui-grid::-webkit-scrollbar {
    display: none;
  }

  wui-loading-spinner {
    justify-content: center;
    align-items: center;
  }
`;var I$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let bx=class extends Te{constructor(){super(...arguments),this.prevQuery="",this.loading=!0,this.query=""}render(){return this.onSearch(),this.loading?K`<wui-loading-spinner color="accent-100"></wui-loading-spinner>`:this.walletsTemplate()}async onSearch(){this.query.trim()!==this.prevQuery.trim()&&(this.prevQuery=this.query,this.loading=!0,await Qt.searchWallet({search:this.query}),this.loading=!1)}walletsTemplate(){const{search:e}=Qt.state,n=zne(e);return e.length?K`
      <wui-grid
        .padding=${["0","s","s","s"]}
        gridTemplateColumns="repeat(4, 1fr)"
        rowGap="l"
        columnGap="xs"
      >
        ${n.map(r=>K`
            <wui-card-select
              imageSrc=${gt(kr.getWalletImage(r))}
              type="wallet"
              name=${r.name}
              @click=${()=>this.onConnectWallet(r)}
              .installed=${r.installed}
            ></wui-card-select>
          `)}
      </wui-grid>
    `:K`
        <wui-flex justifyContent="center" alignItems="center" gap="s" flexDirection="column">
          <wui-icon-box
            size="lg"
            iconColor="fg-200"
            backgroundColor="fg-300"
            icon="wallet"
            background="transparent"
          ></wui-icon-box>
          <wui-text color="fg-200" variant="paragraph-500">No Wallet found</wui-text>
        </wui-flex>
      `}onConnectWallet(e){const n=Pt.getConnector(e.id,e.rdns);n?ke.push("ConnectingExternal",{connector:n}):ke.push("ConnectingWalletConnect",{wallet:e})}};bx.styles=xBe;I$([pe()],bx.prototype,"loading",void 0);I$([ne()],bx.prototype,"query",void 0);bx=I$([Ce("w3m-all-wallets-search")],bx);var C9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let xx=class extends Te{constructor(){super(),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0,this.buffering=!1,this.unsubscribe.push(tn.subscribeKey("buffering",e=>this.buffering=e))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.generateTabs();return K`
      <wui-flex justifyContent="center" .padding=${["0","0","l","0"]}>
        <wui-tabs
          ?disabled=${this.buffering}
          .tabs=${e}
          .onTabChange=${this.onTabChange.bind(this)}
        ></wui-tabs>
      </wui-flex>
    `}generateTabs(){const e=this.platforms.map(n=>n==="browser"?{label:"Browser",icon:"extension",platform:"browser"}:n==="mobile"?{label:"Mobile",icon:"mobile",platform:"mobile"}:n==="qrcode"?{label:"Mobile",icon:"mobile",platform:"qrcode"}:n==="web"?{label:"Webapp",icon:"browser",platform:"web"}:n==="desktop"?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"});return this.platformTabs=e.map(({platform:n})=>n),e}onTabChange(e){var r;const n=this.platformTabs[e];n&&((r=this.onSelectPlatfrom)==null||r.call(this,n))}};C9([ne({type:Array})],xx.prototype,"platforms",void 0);C9([ne()],xx.prototype,"onSelectPlatfrom",void 0);C9([pe()],xx.prototype,"buffering",void 0);xx=C9([Ce("w3m-connecting-header")],xx);var _Be=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let xq=class extends ja{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),wt.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}async onConnectProxy(){var e;try{this.error=!1;const{connectors:n}=Pt.state,r=n.find(s=>{var o,a;return s.type==="ANNOUNCED"&&((o=s.info)==null?void 0:o.rdns)===((a=this.wallet)==null?void 0:a.rdns)}),i=n.find(s=>s.type==="INJECTED");r?await tn.connectExternal(r):i&&await tn.connectExternal(i),dn.close(),wt.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:((e=this.wallet)==null?void 0:e.name)||"Unknown"}})}catch(n){wt.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(n==null?void 0:n.message)??"Unknown"}}),this.error=!0}}};xq=_Be([Ce("w3m-connecting-wc-browser")],xq);var ABe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let _q=class extends ja{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),wt.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop"}})}onRenderProxy(){var e;!this.ready&&this.uri&&(this.ready=!0,(e=this.onConnect)==null||e.call(this))}onConnectProxy(){var e;if((e=this.wallet)!=null&&e.desktop_link&&this.uri)try{this.error=!1;const{desktop_link:n,name:r}=this.wallet,{redirect:i,href:s}=st.formatNativeUrl(n,this.uri);tn.setWcLinking({name:r,href:s}),tn.setRecentWallet(this.wallet),st.openHref(i,"_blank")}catch{this.error=!0}}};_q=ABe([Ce("w3m-connecting-wc-desktop")],_q);var EBe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Aq=class extends ja{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-mobile: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),document.addEventListener("visibilitychange",this.onBuffering.bind(this)),wt.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile"}})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("visibilitychange",this.onBuffering.bind(this))}onRenderProxy(){var e;!this.ready&&this.uri&&(this.ready=!0,(e=this.onConnect)==null||e.call(this))}onConnectProxy(){var e;if((e=this.wallet)!=null&&e.mobile_link&&this.uri)try{this.error=!1;const{mobile_link:n,name:r}=this.wallet,{redirect:i,href:s}=st.formatNativeUrl(n,this.uri);tn.setWcLinking({name:r,href:s}),tn.setRecentWallet(this.wallet),st.openHref(i,"_self")}catch{this.error=!0}}onBuffering(){const e=st.isIos();(document==null?void 0:document.visibilityState)==="visible"&&!this.error&&e&&(tn.setBuffering(!0),setTimeout(()=>{tn.setBuffering(!1)},5e3))}};Aq=EBe([Ce("w3m-connecting-wc-mobile")],Aq);const CBe=De`
  @keyframes fadein {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  wui-shimmer {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important;
  }

  wui-qr-code {
    opacity: 0;
    animation-duration: 200ms;
    animation-timing-function: ease;
    animation-name: fadein;
    animation-fill-mode: forwards;
  }
`;var SBe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let QP=class extends ja{constructor(){var e;super(),this.forceUpdate=()=>{this.requestUpdate()},window.addEventListener("resize",this.forceUpdate),wt.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:((e=this.wallet)==null?void 0:e.name)??"WalletConnect",platform:"qrcode"}})}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.forceUpdate)}render(){return this.onRenderProxy(),K`
      <wui-flex
        flexDirection="column"
        alignItems="center"
        .padding=${["0","xl","xl","xl"]}
        gap="xl"
      >
        <wui-shimmer borderRadius="l" width="100%"> ${this.qrCodeTemplate()} </wui-shimmer>

        <wui-text variant="paragraph-500" color="fg-100">
          Scan this QR Code with your phone
        </wui-text>
        ${this.copyTemplate()}
      </wui-flex>

      <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
    `}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout(()=>{this.ready=!0},0))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;const e=this.getBoundingClientRect().width-40,n=this.wallet?this.wallet.name:void 0;return tn.setWcLinking(void 0),tn.setRecentWallet(this.wallet),K` <wui-qr-code
      size=${e}
      theme=${Oi.state.themeMode}
      uri=${this.uri}
      imageSrc=${gt(kr.getWalletImage(this.wallet))}
      alt=${gt(n)}
      data-testid="wui-qr-code"
    ></wui-qr-code>`}copyTemplate(){const e=!this.uri||!this.ready;return K`<wui-link
      .disabled=${e}
      @click=${this.onCopyUri}
      color="fg-200"
      data-testid="copy-wc2-uri"
    >
      <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
      Copy link
    </wui-link>`}};QP.styles=CBe;QP=SBe([Ce("w3m-connecting-wc-qrcode")],QP);var TBe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Eq=class extends Te{constructor(){var e;if(super(),this.wallet=(e=ke.state.data)==null?void 0:e.wallet,!this.wallet)throw new Error("w3m-connecting-wc-unsupported: No wallet provided");wt.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser"}})}render(){return K`
      <wui-flex
        flexDirection="column"
        alignItems="center"
        .padding=${["3xl","xl","xl","xl"]}
        gap="xl"
      >
        <wui-wallet-image
          size="lg"
          imageSrc=${gt(kr.getWalletImage(this.wallet))}
        ></wui-wallet-image>

        <wui-text variant="paragraph-500" color="fg-100">Not Detected</wui-text>
      </wui-flex>

      <w3m-mobile-download-links .wallet=${this.wallet}></w3m-mobile-download-links>
    `}};Eq=TBe([Ce("w3m-connecting-wc-unsupported")],Eq);var IBe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Cq=class extends ja{constructor(){if(super(),!this.wallet)throw new Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel="Open and continue in a new browser tab",this.secondaryBtnIcon="externalLink",wt.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web"}})}onConnectProxy(){var e;if((e=this.wallet)!=null&&e.webapp_link&&this.uri)try{this.error=!1;const{webapp_link:n,name:r}=this.wallet,{redirect:i,href:s}=st.formatUniversalUrl(n,this.uri);tn.setWcLinking({name:r,href:s}),tn.setRecentWallet(this.wallet),st.openHref(i,"_blank")}catch{this.error=!0}}};Cq=IBe([Ce("w3m-connecting-wc-web")],Cq);const kBe=De`
  :host {
    width: 100%;
  }

  .details-container > wui-flex {
    background: var(--wui-color-gray-glass-002);
    border-radius: var(--wui-border-radius-xxs);
    width: 100%;
  }

  .details-container > wui-flex > button {
    border: none;
    background: none;
    padding: var(--wui-spacing-s);
    border-radius: var(--wui-border-radius-xxs);
    cursor: pointer;
  }

  .details-content-container {
    padding: var(--wui-spacing-1xs);
    padding-top: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .details-content-container > wui-flex {
    width: 100%;
  }

  .details-row {
    width: 100%;
    padding: var(--wui-spacing-s);
    padding-left: var(--wui-spacing-s);
    padding-right: var(--wui-spacing-1xs);
    border-radius: calc(var(--wui-border-radius-5xs) + var(--wui-border-radius-4xs));
    background: var(--wui-color-gray-glass-002);
  }

  .details-row-title {
    white-space: nowrap;
  }

  .details-row.provider-free-row {
    padding-right: var(--wui-spacing-xs);
  }
`;var yc=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const RBe=os.CONVERT_SLIPPAGE_TOLERANCE;let Lo=class extends Te{constructor(){var e;super(),this.unsubscribe=[],this.networkName=(e=rt.state.caipNetwork)==null?void 0:e.name,this.detailsOpen=!1,this.sourceToken=mt.state.sourceToken,this.toToken=mt.state.toToken,this.toTokenAmount=mt.state.toTokenAmount,this.sourceTokenPriceInUSD=mt.state.sourceTokenPriceInUSD,this.toTokenPriceInUSD=mt.state.toTokenPriceInUSD,this.gasPriceInUSD=mt.state.gasPriceInUSD,this.priceImpact=mt.state.priceImpact,this.maxSlippage=mt.state.maxSlippage,this.networkTokenSymbol=mt.state.networkTokenSymbol,this.inputError=mt.state.inputError,this.unsubscribe.push(mt.subscribe(n=>{this.sourceToken=n.sourceToken,this.toToken=n.toToken,this.toTokenAmount=n.toTokenAmount,this.gasPriceInUSD=n.gasPriceInUSD,this.priceImpact=n.priceImpact,this.maxSlippage=n.maxSlippage,this.sourceTokenPriceInUSD=n.sourceTokenPriceInUSD,this.toTokenPriceInUSD=n.toTokenPriceInUSD,this.inputError=n.inputError}))}render(){const e=this.toTokenAmount&&this.maxSlippage?hr.bigNumber(this.toTokenAmount).minus(this.maxSlippage).toString():null;if(!this.sourceToken||!this.toToken||this.inputError)return null;const n=this.sourceTokenPriceInUSD&&this.toTokenPriceInUSD?1/this.toTokenPriceInUSD*this.sourceTokenPriceInUSD:0;return K`
      <wui-flex flexDirection="column" alignItems="center" gap="1xs" class="details-container">
        <wui-flex flexDirection="column">
          <button @click=${this.toggleDetails.bind(this)}>
            <wui-flex justifyContent="space-between" .padding=${["0","xs","0","xs"]}>
              <wui-flex justifyContent="flex-start" flexGrow="1" gap="xs">
                <wui-text variant="small-400" color="fg-100">
                  1 ${this.sourceToken.symbol} =
                  ${qt.formatNumberToLocalString(n,3)}
                  ${this.toToken.symbol}
                </wui-text>
                <wui-text variant="small-400" color="fg-200">
                  $${qt.formatNumberToLocalString(this.sourceTokenPriceInUSD)}
                </wui-text>
              </wui-flex>
              <wui-icon name="chevronBottom"></wui-icon>
            </wui-flex>
          </button>
          ${this.detailsOpen?K`
                <wui-flex flexDirection="column" gap="xs" class="details-content-container">
                  <wui-flex flexDirection="column" gap="xs">
                    <wui-flex
                      justifyContent="space-between"
                      alignItems="center"
                      class="details-row"
                    >
                      <wui-flex alignItems="center" gap="xs">
                        <wui-text class="details-row-title" variant="small-400" color="fg-150">
                          Network cost
                        </wui-text>
                        <w3m-tooltip-trigger
                          text=${`Network cost is paid in ${this.networkTokenSymbol} on the ${this.networkName} network in order to execute transaction.`}
                        >
                          <wui-icon size="xs" color="fg-250" name="infoCircle"></wui-icon>
                        </w3m-tooltip-trigger>
                      </wui-flex>
                      <wui-text variant="small-400" color="fg-100">
                        $${qt.formatNumberToLocalString(this.gasPriceInUSD,3)}
                      </wui-text>
                    </wui-flex>
                  </wui-flex>
                  ${this.priceImpact?K` <wui-flex flexDirection="column" gap="xs">
                        <wui-flex
                          justifyContent="space-between"
                          alignItems="center"
                          class="details-row"
                        >
                          <wui-flex alignItems="center" gap="xs">
                            <wui-text class="details-row-title" variant="small-400" color="fg-150">
                              Price impact
                            </wui-text>
                            <w3m-tooltip-trigger
                              text="Price impact reflects the change in market price due to your trade"
                            >
                              <wui-icon size="xs" color="fg-250" name="infoCircle"></wui-icon>
                            </w3m-tooltip-trigger>
                          </wui-flex>
                          <wui-flex>
                            <wui-text variant="small-400" color="fg-200">
                              ${qt.formatNumberToLocalString(this.priceImpact,3)}%
                            </wui-text>
                          </wui-flex>
                        </wui-flex>
                      </wui-flex>`:null}
                  ${this.maxSlippage&&this.sourceToken.symbol?K`<wui-flex flexDirection="column" gap="xs">
                        <wui-flex
                          justifyContent="space-between"
                          alignItems="center"
                          class="details-row"
                        >
                          <wui-flex alignItems="center" gap="xs">
                            <wui-text class="details-row-title" variant="small-400" color="fg-150">
                              Max. slippage
                            </wui-text>
                            <w3m-tooltip-trigger
                              text=${`Max slippage sets the minimum amount you must receive for the transaction to proceed. ${e?`Transaction will be reversed if you receive less than ${qt.formatNumberToLocalString(e,6)} ${this.toToken.symbol} due to price changes.`:""}`}
                            >
                              <wui-icon size="xs" color="fg-250" name="infoCircle"></wui-icon>
                            </w3m-tooltip-trigger>
                          </wui-flex>
                          <wui-flex>
                            <wui-text variant="small-400" color="fg-200">
                              ${qt.formatNumberToLocalString(this.maxSlippage,6)}
                              ${this.toToken.symbol} ${RBe}%
                            </wui-text>
                          </wui-flex>
                        </wui-flex>
                      </wui-flex>`:null}
                  <wui-flex flexDirection="column" gap="xs">
                    <wui-flex
                      justifyContent="space-between"
                      alignItems="center"
                      class="details-row provider-free-row"
                    >
                      <wui-flex alignItems="center" gap="xs">
                        <wui-text class="details-row-title" variant="small-400" color="fg-150">
                          Provider fee
                        </wui-text>
                      </wui-flex>
                      <wui-flex>
                        <wui-text variant="small-400" color="fg-200">0.85%</wui-text>
                      </wui-flex>
                    </wui-flex>
                  </wui-flex>
                </wui-flex>
              `:null}
        </wui-flex>
      </wui-flex>
    `}toggleDetails(){this.detailsOpen=!this.detailsOpen}};Lo.styles=[kBe];yc([pe()],Lo.prototype,"networkName",void 0);yc([ne()],Lo.prototype,"detailsOpen",void 0);yc([pe()],Lo.prototype,"sourceToken",void 0);yc([pe()],Lo.prototype,"toToken",void 0);yc([pe()],Lo.prototype,"toTokenAmount",void 0);yc([pe()],Lo.prototype,"sourceTokenPriceInUSD",void 0);yc([pe()],Lo.prototype,"toTokenPriceInUSD",void 0);yc([pe()],Lo.prototype,"gasPriceInUSD",void 0);yc([pe()],Lo.prototype,"priceImpact",void 0);yc([pe()],Lo.prototype,"maxSlippage",void 0);yc([pe()],Lo.prototype,"networkTokenSymbol",void 0);yc([pe()],Lo.prototype,"inputError",void 0);Lo=yc([Ce("w3m-swap-details")],Lo);const NBe=De`
  :host > wui-flex {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--wui-border-radius-s);
    background-color: var(--wui-color-gray-glass-002);
    padding: var(--wui-spacing-xl);
    padding-right: var(--wui-spacing-s);
    width: 100%;
    height: 100px;
    box-sizing: border-box;
    box-shadow: inset 0px 0px 0px 1px var(--wui-color-gray-glass-002);
    position: relative;
    transition: box-shadow var(--wui-ease-out-power-1) var(--wui-duration-lg);
    will-change: background-color;
  }

  :host wui-flex.focus {
    box-shadow: inset 0px 0px 0px 1px var(--wui-color-gray-glass-005);
  }

  :host > wui-flex .swap-input,
  :host > wui-flex .swap-token-button {
    z-index: 10;
  }

  :host > wui-flex .swap-input {
    -webkit-mask-image: linear-gradient(
      270deg,
      transparent 0px,
      transparent 8px,
      black 24px,
      black 25px,
      black 32px,
      black 100%
    );
    mask-image: linear-gradient(
      270deg,
      transparent 0px,
      transparent 8px,
      black 24px,
      black 25px,
      black 32px,
      black 100%
    );
  }

  :host > wui-flex .swap-input input {
    background: none;
    border: none;
    height: 42px;
    width: 100%;
    font-size: 32px;
    font-style: normal;
    font-weight: 400;
    line-height: 130%;
    letter-spacing: -1.28px;
    outline: none;
    caret-color: var(--wui-color-accent-100);
    color: var(--wui-color-fg-100);
    padding: 0px;
  }

  :host > wui-flex .swap-input input:focus-visible {
    outline: none;
  }

  :host > wui-flex .swap-input input::-webkit-outer-spin-button,
  :host > wui-flex .swap-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  .max-value-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: var(--wui-color-gray-glass-020);
    padding-left: 0px;
  }

  .market-value {
    min-height: 18px;
  }
`;var Au=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const PBe=5e-5;let cc=class extends Te{constructor(){super(...arguments),this.focused=!1,this.price=0,this.target="sourceToken",this.onSetAmount=null,this.onSetMaxValue=null}render(){const e=this.marketValue||"0",n=hr.bigNumber(e).isGreaterThan("0");return K`
      <wui-flex class="${this.focused?"focus":""}" justifyContent="space-between">
        <wui-flex
          flex="1"
          flexDirection="column"
          alignItems="flex-start"
          justifyContent="center"
          class="swap-input"
        >
          <input
            data-testid="swap-input-${this.target}"
            @focusin=${()=>this.onFocusChange(!0)}
            @focusout=${()=>this.onFocusChange(!1)}
            ?disabled=${this.disabled}
            .value=${this.value}
            @input=${this.dispatchInputChangeEvent}
            @keydown=${this.handleKeydown}
            placeholder="0"
            type="text"
            inputmode="decimal"
          />
          <wui-text class="market-value" variant="small-400" color="fg-200">
            ${n?`$${qt.formatNumberToLocalString(this.marketValue,3)}`:null}
          </wui-text>
        </wui-flex>
        ${this.templateTokenSelectButton()}
      </wui-flex>
    `}handleKeydown(e){return L7e.numericInputKeyDown(e,this.value,n=>{var r;return(r=this.onSetAmount)==null?void 0:r.call(this,this.target,n)})}dispatchInputChangeEvent(e){if(!this.onSetAmount)return;const n=e.target.value.replace(/[^0-9.]/gu,"");n===","||n==="."?this.onSetAmount(this.target,"0."):n.endsWith(",")?this.onSetAmount(this.target,n.replace(",",".")):this.onSetAmount(this.target,n)}setMaxValueToInput(){var e;(e=this.onSetMaxValue)==null||e.call(this,this.target,this.balance)}templateTokenSelectButton(){return this.token?K`
      <wui-flex
        class="swap-token-button"
        flexDirection="column"
        alignItems="flex-end"
        justifyContent="center"
        gap="xxs"
      >
        <wui-token-button
          data-testid="swap-input-token-${this.target}"
          text=${this.token.symbol}
          imageSrc=${this.token.logoUri}
          @click=${this.onSelectToken.bind(this)}
        >
        </wui-token-button>
        <wui-flex alignItems="center" gap="xxs"> ${this.tokenBalanceTemplate()} </wui-flex>
      </wui-flex>
    `:K` <wui-button
        data-testid="swap-select-token-button-${this.target}"
        class="swap-token-button"
        size="md"
        variant="accent"
        @click=${this.onSelectToken.bind(this)}
      >
        Select token
      </wui-button>`}tokenBalanceTemplate(){const e=hr.multiply(this.balance,this.price),n=e?e==null?void 0:e.isGreaterThan(PBe):!1;return K`
      ${n?K`<wui-text variant="small-400" color="fg-200">
            ${qt.formatNumberToLocalString(this.balance,3)}
          </wui-text>`:null}
      ${this.target==="sourceToken"?this.tokenActionButtonTemplate(n):null}
    `}tokenActionButtonTemplate(e){return e?K` <button class="max-value-button" @click=${this.setMaxValueToInput.bind(this)}>
        <wui-text color="accent-100" variant="small-600">Max</wui-text>
      </button>`:K` <button class="max-value-button" @click=${this.onBuyToken.bind(this)}>
      <wui-text color="accent-100" variant="small-600">Buy</wui-text>
    </button>`}onFocusChange(e){this.focused=e}onSelectToken(){wt.sendEvent({type:"track",event:"CLICK_SELECT_TOKEN_TO_SWAP"}),ke.push("SwapSelectToken",{target:this.target})}onBuyToken(){ke.push("OnRampProviders")}};cc.styles=[NBe];Au([ne()],cc.prototype,"focused",void 0);Au([ne()],cc.prototype,"balance",void 0);Au([ne()],cc.prototype,"value",void 0);Au([ne()],cc.prototype,"price",void 0);Au([ne()],cc.prototype,"marketValue",void 0);Au([ne()],cc.prototype,"disabled",void 0);Au([ne()],cc.prototype,"target",void 0);Au([ne()],cc.prototype,"token",void 0);Au([ne()],cc.prototype,"onSetAmount",void 0);Au([ne()],cc.prototype,"onSetMaxValue",void 0);cc=Au([Ce("w3m-swap-input")],cc);const OBe=De`
  :host {
    width: 100%;
  }

  :host > wui-flex {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--wui-border-radius-s);
    padding: var(--wui-spacing-xl);
    padding-right: var(--wui-spacing-s);
    background-color: var(--wui-color-gray-glass-002);
    box-shadow: inset 0px 0px 0px 1px var(--wui-color-gray-glass-002);
    width: 100%;
    height: 100px;
    box-sizing: border-box;
    position: relative;
  }

  wui-shimmer.market-value {
    opacity: 0;
  }

  :host > wui-flex > svg.input_mask {
    position: absolute;
    inset: 0;
    z-index: 5;
  }

  :host wui-flex .input_mask__border,
  :host wui-flex .input_mask__background {
    transition: fill var(--wui-duration-md) var(--wui-ease-out-power-1);
    will-change: fill;
  }

  :host wui-flex .input_mask__border {
    fill: var(--wui-color-gray-glass-020);
  }

  :host wui-flex .input_mask__background {
    fill: var(--wui-color-gray-glass-002);
  }
`;var Hne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let GC=class extends Te{constructor(){super(...arguments),this.target="sourceToken"}render(){return K`
      <wui-flex class justifyContent="space-between">
        <wui-flex
          flex="1"
          flexDirection="column"
          alignItems="flex-start"
          justifyContent="center"
          class="swap-input"
          gap="xxs"
        >
          <wui-shimmer width="80px" height="40px" borderRadius="xxs" variant="light"></wui-shimmer>
        </wui-flex>
        ${this.templateTokenSelectButton()}
      </wui-flex>
    `}templateTokenSelectButton(){return K`
      <wui-flex
        class="swap-token-button"
        flexDirection="column"
        alignItems="flex-end"
        justifyContent="center"
        gap="xxs"
      >
        <wui-shimmer width="80px" height="40px" borderRadius="3xl" variant="light"></wui-shimmer>
      </wui-flex>
    `}};GC.styles=[OBe];Hne([ne()],GC.prototype,"target",void 0);GC=Hne([Ce("w3m-swap-input-skeleton")],GC);const DBe=De`
  :host {
    height: 64px;
  }

  wui-text {
    text-transform: capitalize;
  }

  wui-icon-link[data-hidden='true'] {
    opacity: 0 !important;
    pointer-events: none;
  }
`;var S9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const MBe=["Swap","SwapSelectToken","SwapPreview"];function Sq(){var o,a,c,l,u,d,h;const t=(a=(o=ke.state.data)==null?void 0:o.connector)==null?void 0:a.name,e=(l=(c=ke.state.data)==null?void 0:c.wallet)==null?void 0:l.name,n=(d=(u=ke.state.data)==null?void 0:u.network)==null?void 0:d.name,r=e??t,i=Pt.getConnectors();return{Connect:`Connect ${i.length===1&&((h=i[0])==null?void 0:h.id)==="w3m-email"?"Email":""} Wallet`,ChooseAccountName:void 0,Account:void 0,AccountSettings:void 0,AllWallets:"All Wallets",ApproveTransaction:"Approve Transaction",BuyInProgress:"Buy",ConnectingExternal:r??"Connect Wallet",ConnectingWalletConnect:r??"WalletConnect",ConnectingSiwe:"Sign In",Convert:"Convert",ConvertSelectToken:"Select token",ConvertPreview:"Preview convert",Downloads:r?`Get ${r}`:"Downloads",EmailVerifyOtp:"Confirm Email",EmailVerifyDevice:"Register Device",GetWallet:"Get a wallet",Networks:"Choose Network",OnRampProviders:"Choose Provider",OnRampActivity:"Activity",OnRampTokenSelect:"Select Token",OnRampFiatSelect:"Select Currency",Profile:void 0,SelectAddresses:"Select accounts",SwitchNetwork:n??"Switch Network",SwitchAddress:"Switch Address",Transactions:"Activity",UnsupportedChain:"Switch Network",UpgradeEmailWallet:"Upgrade your Wallet",UpgradeToSmartAccount:void 0,UpdateEmailWallet:"Edit Email",UpdateEmailPrimaryOtp:"Confirm Current Email",UpdateEmailSecondaryOtp:"Confirm New Email",WhatIsABuy:"What is Buy?",RegisterAccountName:"Choose name",RegisterAccountNameSuccess:"",WalletReceive:"Receive",WalletCompatibleNetworks:"Compatible Networks",Swap:"Swap",SwapSelectToken:"Select token",SwapPreview:"Preview swap",WalletSend:"Send",WalletSendPreview:"Review send",WalletSendSelectToken:"Select Token",WhatIsANetwork:"What is a network?",WhatIsAWallet:"What is a wallet?",ConnectWallets:"Connect wallet",ConnectSocials:"All socials",ConnectingSocial:Ne.state.socialProvider?Ne.state.socialProvider:"Connect Social",ConnectingFarcaster:"Farcaster"}}let Fv=class extends Te{constructor(){super(),this.unsubscribe=[],this.heading=Sq()[ke.state.view],this.buffering=!1,this.showBack=!1,this.unsubscribe.push(ke.subscribeKey("view",e=>{this.onViewChange(e),this.onHistoryChange()}),tn.subscribeKey("buffering",e=>this.buffering=e))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){return K`
      <wui-flex .padding=${this.getPadding()} justifyContent="space-between" alignItems="center">
        ${this.dynamicButtonTemplate()} ${this.titleTemplate()}
        <wui-icon-link
          ?disabled=${this.buffering}
          icon="close"
          @click=${this.onClose.bind(this)}
          data-testid="w3m-header-close"
        ></wui-icon-link>
      </wui-flex>
    `}onWalletHelp(){wt.sendEvent({type:"track",event:"CLICK_WALLET_HELP"}),ke.push("WhatIsAWallet")}async onClose(){if(pt.state.isSiweEnabled){const{SIWEController:e}=await Sa(async()=>{const{SIWEController:n}=await import("./index-Dgmma2CZ.js");return{SIWEController:n}},[]);e.state.status!=="success"&&await tn.disconnect()}dn.close()}titleTemplate(){const e=MBe.includes(ke.state.view);return K`
      <wui-flex class="w3m-header-title" alignItems="center" gap="xs">
        <wui-text variant="paragraph-700" color="fg-100">${this.heading}</wui-text>
        ${e?K`<wui-tag variant="main">Beta</wui-tag>`:null}
      </wui-flex>
    `}dynamicButtonTemplate(){const{view:e}=ke.state,n=e==="Connect",o=e==="ApproveTransaction"||e==="UpgradeToSmartAccount"||e==="ConnectingSiwe";return this.showBack&&!o?K`<wui-icon-link
        id="dynamic"
        icon="chevronLeft"
        ?disabled=${this.buffering}
        @click=${this.onGoBack.bind(this)}
      ></wui-icon-link>`:K`<wui-icon-link
      data-hidden=${!n}
      id="dynamic"
      icon="helpCircle"
      @click=${this.onWalletHelp.bind(this)}
    ></wui-icon-link>`}getPadding(){return this.heading?["l","2l","l","2l"]:["l","2l","0","2l"]}async onViewChange(e){var r;const n=(r=this.shadowRoot)==null?void 0:r.querySelector("wui-flex.w3m-header-title");if(n){const i=Sq()[e];await n.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.heading=i,n.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})}}async onHistoryChange(){var r;const{history:e}=ke.state,n=(r=this.shadowRoot)==null?void 0:r.querySelector("#dynamic");e.length>1&&!this.showBack&&n?(await n.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!0,n.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})):e.length<=1&&this.showBack&&n&&(await n.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!1,n.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}onGoBack(){ke.goBack()}};Fv.styles=[DBe];S9([pe()],Fv.prototype,"heading",void 0);S9([pe()],Fv.prototype,"buffering",void 0);S9([pe()],Fv.prototype,"showBack",void 0);Fv=S9([Ce("w3m-header")],Fv);var Wne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let ZP=class extends Te{constructor(){super(...arguments),this.data=[]}render(){return K`
      <wui-flex flexDirection="column" alignItems="center" gap="l">
        ${this.data.map(e=>K`
            <wui-flex flexDirection="column" alignItems="center" gap="xl">
              <wui-flex flexDirection="row" justifyContent="center" gap="1xs">
                ${e.images.map(n=>K`<wui-visual name=${n}></wui-visual>`)}
              </wui-flex>
            </wui-flex>
            <wui-flex flexDirection="column" alignItems="center" gap="xxs">
              <wui-text variant="paragraph-500" color="fg-100" align="center">
                ${e.title}
              </wui-text>
              <wui-text variant="small-500" color="fg-200" align="center">${e.text}</wui-text>
            </wui-flex>
          `)}
      </wui-flex>
    `}};Wne([ne({type:Array})],ZP.prototype,"data",void 0);ZP=Wne([Ce("w3m-help-widget")],ZP);const BBe=De`
  :host {
    width: 100%;
  }

  :host > wui-flex {
    width: 100%;
    padding: var(--wui-spacing-s);
    border-radius: var(--wui-border-radius-xs);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--wui-spacing-s);
  }

  :host > wui-flex:hover {
    background-color: var(--wui-color-gray-glass-002);
  }

  .purchase-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: var(--wui-icon-box-size-lg);
    height: var(--wui-icon-box-size-lg);
  }

  .purchase-image-container wui-image {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: calc(var(--wui-icon-box-size-lg) / 2);
  }

  .purchase-image-container wui-image::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    border-radius: calc(var(--wui-icon-box-size-lg) / 2);
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
  }

  .purchase-image-container wui-icon-box {
    position: absolute;
    right: 0;
    bottom: 0;
    transform: translate(20%, 20%);
  }
`;var vc=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Uo=class extends Te{constructor(){super(...arguments),this.disabled=!1,this.color="inherit",this.label="Bought",this.purchaseValue="",this.purchaseCurrency="",this.date="",this.completed=!1,this.inProgress=!1,this.failed=!1,this.onClick=null,this.symbol=""}firstUpdated(){this.icon||this.fetchTokenImage()}render(){return K`
      <wui-flex>
        ${this.imageTemplate()}
        <wui-flex flexDirection="column" gap="4xs" flexGrow="1">
          <wui-flex gap="xxs" alignItems="center" justifyContent="flex-start">
            ${this.statusIconTemplate()}
            <wui-text variant="paragraph-500" color="fg-100"> ${this.label}</wui-text>
          </wui-flex>
          <wui-text variant="small-400" color="fg-200">
            + ${this.purchaseValue} ${this.purchaseCurrency}
          </wui-text>
        </wui-flex>
        ${this.inProgress?K`<wui-loading-spinner color="fg-200" size="md"></wui-loading-spinner>`:K`<wui-text variant="micro-700" color="fg-300"><span>${this.date}</span></wui-text>`}
      </wui-flex>
    `}async fetchTokenImage(){await Qt._fetchTokenImage(this.purchaseCurrency)}statusIconTemplate(){return this.inProgress?null:this.completed?this.boughtIconTemplate():this.errorIconTemplate()}errorIconTemplate(){return K`<wui-icon-box
      size="xxs"
      iconColor="error-100"
      backgroundColor="error-100"
      background="opaque"
      icon="close"
      borderColor="wui-color-bg-125"
    ></wui-icon-box>`}imageTemplate(){const e=this.icon||`https://avatar.vercel.sh/andrew.svg?size=50&text=${this.symbol}`;return K`<wui-flex class="purchase-image-container">
      <wui-image src=${e}></wui-image>
    </wui-flex>`}boughtIconTemplate(){return K`<wui-icon-box
      size="xxs"
      iconColor="success-100"
      backgroundColor="success-100"
      background="opaque"
      icon="arrowBottom"
      borderColor="wui-color-bg-125"
    ></wui-icon-box>`}};Uo.styles=[BBe];vc([ne({type:Boolean})],Uo.prototype,"disabled",void 0);vc([ne()],Uo.prototype,"color",void 0);vc([ne()],Uo.prototype,"label",void 0);vc([ne()],Uo.prototype,"purchaseValue",void 0);vc([ne()],Uo.prototype,"purchaseCurrency",void 0);vc([ne()],Uo.prototype,"date",void 0);vc([ne({type:Boolean})],Uo.prototype,"completed",void 0);vc([ne({type:Boolean})],Uo.prototype,"inProgress",void 0);vc([ne({type:Boolean})],Uo.prototype,"failed",void 0);vc([ne()],Uo.prototype,"onClick",void 0);vc([ne()],Uo.prototype,"symbol",void 0);vc([ne()],Uo.prototype,"icon",void 0);Uo=vc([Ce("w3m-onramp-activity-item")],Uo);const $Be=De`
  :host {
    width: 100%;
  }

  wui-loading-spinner {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
  }

  .currency-container {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: var(--wui-spacing-1xs);
    height: 40px;
    padding: var(--wui-spacing-xs) var(--wui-spacing-1xs) var(--wui-spacing-xs)
      var(--wui-spacing-xs);
    min-width: 95px;
    border-radius: var(--FULL, 1000px);
    border: 1px solid var(--wui-color-gray-glass-002);
    background: var(--wui-color-gray-glass-002);
    cursor: pointer;
  }

  .currency-container > wui-image {
    height: 24px;
    width: 24px;
    border-radius: 50%;
  }
`;var M1=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Ah=class extends Te{constructor(){var e;super(),this.unsubscribe=[],this.type="Token",this.value=0,this.currencies=[],this.selectedCurrency=(e=this.currencies)==null?void 0:e[0],this.currencyImages=Rs.state.currencyImages,this.tokenImages=Rs.state.tokenImages,this.unsubscribe.push(Tr.subscribeKey("purchaseCurrency",n=>{!n||this.type==="Fiat"||(this.selectedCurrency=this.formatPurchaseCurrency(n))}),Tr.subscribeKey("paymentCurrency",n=>{!n||this.type==="Token"||(this.selectedCurrency=this.formatPaymentCurrency(n))}),Tr.subscribe(n=>{this.type==="Fiat"?this.currencies=n.purchaseCurrencies.map(this.formatPurchaseCurrency):this.currencies=n.paymentCurrencies.map(this.formatPaymentCurrency)}),Rs.subscribe(n=>{this.currencyImages={...n.currencyImages},this.tokenImages={...n.tokenImages}}))}firstUpdated(){Tr.getAvailableCurrencies()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){var r;const e=((r=this.selectedCurrency)==null?void 0:r.symbol)||"",n=this.currencyImages[e]||this.tokenImages[e];return K`<wui-input-text type="number" size="lg" value=${this.value}>
      ${this.selectedCurrency?K` <wui-flex
            class="currency-container"
            justifyContent="space-between"
            alignItems="center"
            gap="xxs"
            @click=${()=>dn.open({view:`OnRamp${this.type}Select`})}
          >
            <wui-image src=${gt(n)}></wui-image>
            <wui-text color="fg-100">${this.selectedCurrency.symbol}</wui-text>
          </wui-flex>`:K`<wui-loading-spinner></wui-loading-spinner>`}
    </wui-input-text>`}formatPaymentCurrency(e){return{name:e.id,symbol:e.id}}formatPurchaseCurrency(e){return{name:e.name,symbol:e.symbol}}};Ah.styles=$Be;M1([ne({type:String})],Ah.prototype,"type",void 0);M1([ne({type:Number})],Ah.prototype,"value",void 0);M1([pe()],Ah.prototype,"currencies",void 0);M1([pe()],Ah.prototype,"selectedCurrency",void 0);M1([pe()],Ah.prototype,"currencyImages",void 0);M1([pe()],Ah.prototype,"tokenImages",void 0);Ah=M1([Ce("w3m-onramp-input")],Ah);const jBe=De`
  button {
    padding: var(--wui-spacing-s);
    border-radius: var(--wui-border-radius-xs);
    border: none;
    outline: none;
    background-color: var(--wui-color-gray-glass-002);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--wui-spacing-s);
    transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-md);
    will-change: background-color;
  }

  button:hover {
    background-color: var(--wui-color-gray-glass-005);
  }

  .provider-image {
    width: var(--wui-spacing-3xl);
    min-width: var(--wui-spacing-3xl);
    height: var(--wui-spacing-3xl);
    border-radius: calc(var(--wui-border-radius-xs) - calc(var(--wui-spacing-s) / 2));
    position: relative;
    overflow: hidden;
  }

  .provider-image::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    border-radius: calc(var(--wui-border-radius-xs) - calc(var(--wui-spacing-s) / 2));
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
  }

  .network-icon {
    width: var(--wui-spacing-m);
    height: var(--wui-spacing-m);
    border-radius: calc(var(--wui-spacing-m) / 2);
    overflow: hidden;
    box-shadow:
      0 0 0 3px var(--wui-color-gray-glass-002),
      0 0 0 3px var(--wui-color-modal-bg);
    transition: box-shadow var(--wui-ease-out-power-1) var(--wui-duration-md);
    will-change: box-shadow;
  }

  button:hover .network-icon {
    box-shadow:
      0 0 0 3px var(--wui-color-gray-glass-005),
      0 0 0 3px var(--wui-color-modal-bg);
  }
`;var J0=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Ed=class extends Te{constructor(){super(...arguments),this.disabled=!1,this.color="inherit",this.label="",this.feeRange="",this.loading=!1,this.onClick=null}render(){return K`
      <button ?disabled=${this.disabled} ontouchstart>
        <wui-visual name=${gt(this.name)} class="provider-image"></wui-visual>
        <wui-flex flexDirection="column" gap="4xs">
          <wui-text variant="paragraph-500" color="fg-100">${this.label}</wui-text>
          <wui-flex alignItems="center" justifyContent="flex-start" gap="l">
            <wui-text variant="tiny-500" color="fg-100">
              <wui-text variant="tiny-400" color="fg-200">Fees</wui-text>
              ${this.feeRange}
            </wui-text>
            <wui-flex gap="xxs">
              <wui-icon name="bank" size="xs" color="fg-150"></wui-icon>
              <wui-icon name="card" size="xs" color="fg-150"></wui-icon>
            </wui-flex>
            ${this.networksTemplate()}
          </wui-flex>
        </wui-flex>
        ${this.loading?K`<wui-loading-spinner color="fg-200" size="md"></wui-loading-spinner>`:K`<wui-icon name="chevronRight" color="fg-200" size="sm"></wui-icon>`}
      </button>
    `}networksTemplate(){var r;const e=rt.getRequestedCaipNetworks(),n=(r=e==null?void 0:e.filter(i=>i==null?void 0:i.imageId))==null?void 0:r.slice(0,5);return K`
      <wui-flex class="networks">
        ${n==null?void 0:n.map(i=>K`
            <wui-flex class="network-icon">
              <wui-image src=${gt(kr.getNetworkImage(i))}></wui-image>
            </wui-flex>
          `)}
      </wui-flex>
    `}};Ed.styles=[jBe];J0([ne({type:Boolean})],Ed.prototype,"disabled",void 0);J0([ne()],Ed.prototype,"color",void 0);J0([ne()],Ed.prototype,"name",void 0);J0([ne()],Ed.prototype,"label",void 0);J0([ne()],Ed.prototype,"feeRange",void 0);J0([ne({type:Boolean})],Ed.prototype,"loading",void 0);J0([ne()],Ed.prototype,"onClick",void 0);Ed=J0([Ce("w3m-onramp-provider-item")],Ed);const LBe=De`
  wui-flex {
    background-color: var(--wui-color-gray-glass-005);
  }

  a {
    text-decoration: none;
    color: var(--wui-color-fg-175);
    font-weight: 500;
  }
`;var UBe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let JP=class extends Te{render(){const{termsConditionsUrl:e,privacyPolicyUrl:n}=pt.state;return!e&&!n?null:K`
      <wui-flex .padding=${["m","s","s","s"]} justifyContent="center">
        <wui-text color="fg-250" variant="small-400" align="center">
          By connecting your wallet, you agree to our <br />
          ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()}
        </wui-text>
      </wui-flex>
    `}andTemplate(){const{termsConditionsUrl:e,privacyPolicyUrl:n}=pt.state;return e&&n?"and":""}termsTemplate(){const{termsConditionsUrl:e}=pt.state;return e?K`<a href=${e}>Terms of Service</a>`:null}privacyTemplate(){const{privacyPolicyUrl:e}=pt.state;return e?K`<a href=${e}>Privacy Policy</a>`:null}};JP.styles=[LBe];JP=UBe([Ce("w3m-legal-footer")],JP);const FBe=De`
  :host {
    display: block;
    padding: 0 var(--wui-spacing-xl) var(--wui-spacing-xl);
  }
`;var Vne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let KC=class extends Te{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;const{name:e,app_store:n,play_store:r,chrome_store:i,homepage:s}=this.wallet,o=st.isMobile(),a=st.isIos(),c=st.isAndroid(),l=[n,r,s,i].filter(Boolean).length>1,u=qt.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return l&&!o?K`
        <wui-cta-button
          label=${`Don't have ${u}?`}
          buttonLabel="Get"
          @click=${()=>ke.push("Downloads",{wallet:this.wallet})}
        ></wui-cta-button>
      `:!l&&s?K`
        <wui-cta-button
          label=${`Don't have ${u}?`}
          buttonLabel="Get"
          @click=${this.onHomePage.bind(this)}
        ></wui-cta-button>
      `:n&&a?K`
        <wui-cta-button
          label=${`Don't have ${u}?`}
          buttonLabel="Get"
          @click=${this.onAppStore.bind(this)}
        ></wui-cta-button>
      `:r&&c?K`
        <wui-cta-button
          label=${`Don't have ${u}?`}
          buttonLabel="Get"
          @click=${this.onPlayStore.bind(this)}
        ></wui-cta-button>
      `:(this.style.display="none",null)}onAppStore(){var e;(e=this.wallet)!=null&&e.app_store&&st.openHref(this.wallet.app_store,"_blank")}onPlayStore(){var e;(e=this.wallet)!=null&&e.play_store&&st.openHref(this.wallet.play_store,"_blank")}onHomePage(){var e;(e=this.wallet)!=null&&e.homepage&&st.openHref(this.wallet.homepage,"_blank")}};KC.styles=[FBe];Vne([ne({type:Object})],KC.prototype,"wallet",void 0);KC=Vne([Ce("w3m-mobile-download-links")],KC);const zBe=De`
  wui-flex {
    border-top: 1px solid var(--wui-color-gray-glass-005);
  }

  a {
    text-decoration: none;
    color: var(--wui-color-fg-175);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--wui-spacing-3xs);
  }
`;var HBe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let XP=class extends Te{render(){const{termsConditionsUrl:e,privacyPolicyUrl:n}=pt.state;return!e&&!n?null:K`
      <wui-flex
        .padding=${["m","s","s","s"]}
        flexDirection="column"
        alignItems="center"
        justifyContent="center"
        gap="s"
      >
        <wui-text color="fg-250" variant="small-400" align="center">
          We work with the best providers to give you the lowest fees and best support. More options
          coming soon!
        </wui-text>

        ${this.howDoesItWorkTemplate()}
      </wui-flex>
    `}howDoesItWorkTemplate(){return K` <wui-link @click=${this.onWhatIsBuy.bind(this)}>
      <wui-icon size="xs" color="accent-100" slot="iconLeft" name="helpCircle"></wui-icon>
      How does it work?
    </wui-link>`}onWhatIsBuy(){wt.sendEvent({type:"track",event:"SELECT_WHAT_IS_A_BUY",properties:{isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT}}),ke.push("WhatIsABuy")}};XP.styles=[zBe];XP=HBe([Ce("w3m-onramp-providers-footer")],XP);const WBe=De`
  :host {
    display: block;
    position: absolute;
    opacity: 0;
    pointer-events: none;
    top: 11px;
    left: 50%;
    width: max-content;
  }
`;var qne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const VBe={loading:void 0,success:{backgroundColor:"success-100",iconColor:"success-100",icon:"checkmark"},error:{backgroundColor:"error-100",iconColor:"error-100",icon:"close"}};let YC=class extends Te{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=Ht.state.open,this.unsubscribe.push(Ht.subscribeKey("open",e=>{this.open=e,this.onOpen()}))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach(e=>e())}render(){const{message:e,variant:n}=Ht.state,r=VBe[n];return K`
      <wui-snackbar
        message=${e}
        backgroundColor=${r==null?void 0:r.backgroundColor}
        iconColor=${r==null?void 0:r.iconColor}
        icon=${r==null?void 0:r.icon}
        .loading=${n==="loading"}
      ></wui-snackbar>
    `}onOpen(){clearTimeout(this.timeout),this.open?(this.animate([{opacity:0,transform:"translateX(-50%) scale(0.85)"},{opacity:1,transform:"translateX(-50%) scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.timeout=setTimeout(()=>Ht.hide(),2500)):this.animate([{opacity:1,transform:"translateX(-50%) scale(1)"},{opacity:0,transform:"translateX(-50%) scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"})}};YC.styles=WBe;qne([pe()],YC.prototype,"open",void 0);YC=qne([Ce("w3m-snackbar")],YC);const qBe=De`
  wui-separator {
    margin: var(--wui-spacing-s) calc(var(--wui-spacing-s) * -1);
    width: calc(100% + var(--wui-spacing-s) * 2);
  }

  wui-email-input {
    width: 100%;
  }

  form {
    width: 100%;
    display: block;
    position: relative;
  }

  wui-icon-link,
  wui-loading-spinner {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  wui-icon-link {
    right: var(--wui-spacing-xs);
  }

  wui-loading-spinner {
    right: var(--wui-spacing-m);
  }
`;var c4=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let o1=class extends Te{constructor(){super(),this.unsubscribe=[],this.formRef=A0(),this.connectors=Pt.state.connectors,this.email="",this.loading=!1,this.error="",this.unsubscribe.push(Pt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){var e;(e=this.formRef.value)==null||e.addEventListener("keydown",n=>{n.key==="Enter"&&this.onSubmitEmail(n)})}render(){const e=this.connectors.find(r=>r.type==="AUTH"),n=this.connectors.length>1;return e!=null&&e.email?K`
      <form ${E0(this.formRef)} @submit=${this.onSubmitEmail.bind(this)}>
        <wui-email-input
          @focus=${this.onFocusEvent.bind(this)}
          .disabled=${this.loading}
          @inputChange=${this.onEmailInputChange.bind(this)}
          .errorMessage=${this.error}
        >
        </wui-email-input>

        ${this.submitButtonTemplate()}${this.loadingTemplate()}
        <input type="submit" hidden />
      </form>

      ${e.socials||!n?null:K`<wui-flex .padding=${["xxs","0","0","0"]}>
            <wui-separator text="or"></wui-separator>
          </wui-flex>`}
    `:null}submitButtonTemplate(){return!this.loading&&this.email.length>3?K`
          <wui-icon-link
            size="sm"
            icon="chevronRight"
            iconcolor="accent-100"
            @click=${this.onSubmitEmail.bind(this)}
          >
          </wui-icon-link>
        `:null}loadingTemplate(){return this.loading?K`<wui-loading-spinner size="md" color="accent-100"></wui-loading-spinner>`:null}onEmailInputChange(e){this.email=e.detail.trim(),this.error=""}async onSubmitEmail(e){try{if(this.loading)return;this.loading=!0,e.preventDefault();const n=Pt.getAuthConnector();if(!n)throw new Error("w3m-email-login-widget: Auth connector not found");const{action:r}=await n.provider.connectEmail({email:this.email});wt.sendEvent({type:"track",event:"EMAIL_SUBMITTED"}),r==="VERIFY_OTP"?(wt.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),ke.push("EmailVerifyOtp",{email:this.email})):r==="VERIFY_DEVICE"&&ke.push("EmailVerifyDevice",{email:this.email})}catch(n){const r=st.parseError(n);r!=null&&r.includes("Invalid email")?this.error="Invalid email. Try again.":Ht.showError(n)}finally{this.loading=!1}}onFocusEvent(){wt.sendEvent({type:"track",event:"EMAIL_LOGIN_SELECTED"})}};o1.styles=qBe;c4([pe()],o1.prototype,"connectors",void 0);c4([pe()],o1.prototype,"email",void 0);c4([pe()],o1.prototype,"loading",void 0);c4([pe()],o1.prototype,"error",void 0);o1=c4([Ce("w3m-email-login-widget")],o1);const GBe=De`
  wui-flex {
    width: 100%;
  }

  :host > wui-flex:first-child {
    transform: translateY(calc(var(--wui-spacing-xxs) * -1));
  }

  wui-icon-link {
    margin-right: calc(var(--wui-icon-box-size-md) * -1);
  }

  wui-notice-card {
    margin-bottom: var(--wui-spacing-3xs);
  }

  wui-list-item > wui-text {
    flex: 1;
  }

  w3m-transactions-view {
    max-height: 200px;
  }

  .tab-content-container {
    height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
  }

  .tab-content-container::-webkit-scrollbar {
    display: none;
  }

  .account-button {
    width: auto;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--wui-spacing-s);
    height: 48px;
    padding: var(--wui-spacing-xs);
    padding-right: var(--wui-spacing-s);
    box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-002);
    background-color: var(--wui-color-gray-glass-002);
    border-radius: 24px;
    transition: background-color 0.2s linear;
  }

  .account-button:hover {
    background-color: var(--wui-color-gray-glass-005);
  }

  .avatar-container {
    position: relative;
  }

  wui-avatar.avatar {
    width: 32px;
    height: 32px;
    box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
  }

  wui-avatar.network-avatar {
    width: 16px;
    height: 16px;
    position: absolute;
    left: 100%;
    top: 100%;
    transform: translate(-75%, -75%);
    box-shadow: 0 0 0 2px var(--wui-color-gray-glass-005);
  }

  .account-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .account-links wui-flex {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    background: red;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 10px;
    flex: 1 0 0;
    border-radius: var(--XS, 16px);
    border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));
    background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1));
    transition:
      background-color var(--wui-ease-out-power-1) var(--wui-duration-md),
      opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
    will-change: background-color, opacity;
  }

  .account-links wui-flex:hover {
    background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15));
  }

  .account-links wui-flex wui-icon {
    width: var(--S, 20px);
    height: var(--S, 20px);
  }

  .account-links wui-flex wui-icon svg path {
    stroke: #667dff;
  }
`;var X0=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Cd=class extends Te{constructor(){super(),this.unsubscribe=[],this.address=Ne.state.address,this.profileImage=Ne.state.profileImage,this.profileName=Ne.state.profileName,this.network=rt.state.caipNetwork,this.disconnecting=!1,this.balance=Ne.state.balance,this.balanceSymbol=Ne.state.balanceSymbol,this.unsubscribe.push(Ne.subscribe(e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.balance=e.balance,this.balanceSymbol=e.balanceSymbol):this.disconnecting||Ht.showError("Account not found")}),rt.subscribeKey("caipNetwork",e=>{e!=null&&e.id&&(this.network=e)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){var n;if(!this.address)throw new Error("w3m-account-view: No account provided");const e=kr.getNetworkImage(this.network);return K`<wui-flex
        flexDirection="column"
        .padding=${["0","xl","m","xl"]}
        alignItems="center"
        gap="l"
      >
        ${Qe.state.activeChain===Bi.CHAIN.EVM?this.multiAccountTemplate():this.singleAccountTemplate()}
        <wui-flex flexDirection="column" alignItems="center">
          <wui-text variant="paragraph-500" color="fg-200"
            >${st.formatBalance(this.balance,this.balanceSymbol)}</wui-text
          >
        </wui-flex>
        ${this.explorerBtnTemplate()}
      </wui-flex>

      <wui-flex flexDirection="column" gap="xs" .padding=${["0","s","s","s"]}>
        ${this.authCardTemplate()} <w3m-account-auth-button></w3m-account-auth-button>

        <wui-list-item
          .variant=${e?"image":"icon"}
          iconVariant="overlay"
          icon="networkPlaceholder"
          imageSrc=${gt(e)}
          ?chevron=${this.isAllowedNetworkSwitch()}
          @click=${this.onNetworks.bind(this)}
          data-testid="w3m-account-select-network"
        >
          <wui-text variant="paragraph-500" color="fg-100">
            ${((n=this.network)==null?void 0:n.name)??"Unknown"}
          </wui-text>
        </wui-list-item>
        ${this.onrampTemplate()} ${this.swapsTemplate()} ${this.activityTemplate()}
        <wui-list-item
          variant="icon"
          iconVariant="overlay"
          icon="disconnect"
          ?chevron=${!1}
          .loading=${this.disconnecting}
          @click=${this.onDisconnect.bind(this)}
          data-testid="disconnect-button"
        >
          <wui-text variant="paragraph-500" color="fg-200">Disconnect</wui-text>
        </wui-list-item>
      </wui-flex>`}onrampTemplate(){const{enableOnramp:e}=pt.state,n=Qe.state.activeChain===Bi.CHAIN.SOLANA;return!e||n?null:K`
      <wui-list-item
        data-testid="w3m-account-default-onramp-button"
        iconVariant="blue"
        icon="card"
        ?chevron=${!0}
        @click=${this.handleClickPay.bind(this)}
      >
        <wui-text variant="paragraph-500" color="fg-100">Buy crypto</wui-text>
      </wui-list-item>
    `}activityTemplate(){const e=Qe.state.activeChain===Bi.CHAIN.SOLANA;return K` <wui-list-item
      iconVariant="blue"
      icon="clock"
      iconSize="sm"
      ?chevron=${!e}
      ?disabled=${e}
      @click=${this.onTransactions.bind(this)}
    >
      <wui-text variant="paragraph-500" color="fg-100" ?disabled=${e}> Activity </wui-text>
      ${e?K`<wui-tag variant="main">Coming soon</wui-tag>`:""}
    </wui-list-item>`}swapsTemplate(){const{enableSwaps:e}=pt.state;return e?K`
      <wui-list-item
        iconVariant="blue"
        icon="recycleHorizontal"
        ?chevron=${!0}
        @click=${this.handleClickSwap.bind(this)}
      >
        <wui-text variant="paragraph-500" color="fg-100">Swap</wui-text>
      </wui-list-item>
    `:null}authCardTemplate(){const e=er.getConnectedConnector(),n=Pt.getAuthConnector(),{origin:r}=location;return!n||e!=="AUTH"||r.includes(os.SECURE_SITE)?null:K`
      <wui-notice-card
        @click=${this.onGoToUpgradeView.bind(this)}
        label="Upgrade your wallet"
        description="Transition to a self-custodial wallet"
        icon="wallet"
        data-testid="w3m-wallet-upgrade-card"
      ></wui-notice-card>
    `}handleSwitchAccountsView(){ke.push("SwitchAddress")}handleClickPay(){ke.push("OnRampProviders")}handleClickSwap(){ke.push("Swap")}explorerBtnTemplate(){return Ne.state.addressExplorerUrl?K`
      <wui-button size="md" variant="neutral" @click=${this.onExplorer.bind(this)}>
        <wui-icon size="sm" color="inherit" slot="iconLeft" name="compass"></wui-icon>
        Block Explorer
        <wui-icon size="sm" color="inherit" slot="iconRight" name="externalLink"></wui-icon>
      </wui-button>
    `:null}singleAccountTemplate(){return K`
      <wui-avatar
        alt=${gt(this.address)}
        address=${gt(this.address)}
        imageSrc=${gt(this.profileImage===null?void 0:this.profileImage)}
      ></wui-avatar>
      <wui-flex flexDirection="column" alignItems="center">
        <wui-flex gap="3xs" alignItems="center" justifyContent="center">
          <wui-text variant="large-600" color="fg-100">
            ${this.profileName?qt.getTruncateString({string:this.profileName,charsStart:20,charsEnd:0,truncate:"end"}):qt.getTruncateString({string:this.address?this.address:"",charsStart:4,charsEnd:4,truncate:"middle"})}
          </wui-text>
          <wui-icon-link
            size="md"
            icon="copy"
            iconColor="fg-200"
            @click=${this.onCopyAddress}
          ></wui-icon-link> </wui-flex
      ></wui-flex>
    `}multiAccountTemplate(){var r;if(!this.address)throw new Error("w3m-account-view: No account provided");const e=(r=Ne.state.allAccounts)==null?void 0:r.find(i=>i.address===this.address),n=Ne.state.addressLabels.get(this.address);return K`
      <wui-profile-button-v2
        .onProfileClick=${this.handleSwitchAccountsView.bind(this)}
        address=${gt(this.address)}
        icon="${(e==null?void 0:e.type)===Fn.ACCOUNT_TYPES.SMART_ACCOUNT&&Qe.state.activeChain===Bi.CHAIN.EVM?"lightbulb":"mail"}"
        avatarSrc=${gt(this.profileImage?this.profileImage:void 0)}
        profileName=${gt(n||this.profileName)}
        .onCopyClick=${this.onCopyAddress.bind(this)}
      ></wui-profile-button-v2>
    `}isAllowedNetworkSwitch(){const e=rt.getRequestedCaipNetworks(),n=e?e.length>1:!1,r=e==null?void 0:e.find(({id:i})=>{var s;return i===((s=this.network)==null?void 0:s.id)});return n||!r}onCopyAddress(){try{this.address&&(st.copyToClopboard(this.address),Ht.showSuccess("Address copied"))}catch{Ht.showError("Failed to copy")}}onNetworks(){this.isAllowedNetworkSwitch()&&(wt.sendEvent({type:"track",event:"CLICK_NETWORKS"}),ke.push("Networks"))}onTransactions(){wt.sendEvent({type:"track",event:"CLICK_TRANSACTIONS",properties:{isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT}}),ke.push("Transactions")}async onDisconnect(){try{this.disconnecting=!0,await tn.disconnect(),wt.sendEvent({type:"track",event:"DISCONNECT_SUCCESS"}),dn.close()}catch{wt.sendEvent({type:"track",event:"DISCONNECT_ERROR"}),Ht.showError("Failed to disconnect")}finally{this.disconnecting=!1}}onExplorer(){const e=Ne.state.addressExplorerUrl;e&&st.openHref(e,"_blank")}onGoToUpgradeView(){wt.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),ke.push("UpgradeEmailWallet")}};Cd.styles=GBe;X0([pe()],Cd.prototype,"address",void 0);X0([pe()],Cd.prototype,"profileImage",void 0);X0([pe()],Cd.prototype,"profileName",void 0);X0([pe()],Cd.prototype,"network",void 0);X0([pe()],Cd.prototype,"disconnecting",void 0);X0([pe()],Cd.prototype,"balance",void 0);X0([pe()],Cd.prototype,"balanceSymbol",void 0);Cd=X0([Ce("w3m-account-default-widget")],Cd);const KBe=De`
  wui-flex {
    width: 100%;
  }

  wui-promo {
    position: absolute;
    top: -32px;
  }

  wui-profile-button {
    margin-top: calc(-1 * var(--wui-spacing-2l));
  }

  wui-promo + wui-profile-button {
    margin-top: var(--wui-spacing-2l);
  }

  wui-tabs {
    width: 100%;
  }

  .contentContainer {
    height: 280px;
  }

  .contentContainer > wui-icon-box {
    width: 40px;
    height: 40px;
    border-radius: var(--wui-border-radius-xxs);
  }

  .contentContainer > .textContent {
    width: 65%;
  }
`;var Ud=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const YBe=3,QBe=48,ZBe=430;let xl=class extends Te{constructor(){super(),this.unsubscribe=[],this.address=Ne.state.address,this.profileImage=Ne.state.profileImage,this.profileName=Ne.state.profileName,this.smartAccountDeployed=Ne.state.smartAccountDeployed,this.network=rt.state.caipNetwork,this.currentTab=Ne.state.currentTab,this.tokenBalance=Ne.state.tokenBalance,this.preferredAccountType=Ne.state.preferredAccountType,this.unsubscribe.push(Ne.subscribe(e=>{e.address?(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName,this.currentTab=e.currentTab,this.tokenBalance=e.tokenBalance,this.smartAccountDeployed=e.smartAccountDeployed,this.preferredAccountType=e.preferredAccountType):dn.close()}),rt.subscribeKey("caipNetwork",e=>{this.network=e})),this.watchSwapValues()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),clearInterval(this.watchTokenBalance)}firstUpdated(){Ne.fetchTokenBalance()}render(){if(!this.address)throw new Error("w3m-account-view: No account provided");const e=kr.getNetworkImage(this.network);return K`<wui-flex
      flexDirection="column"
      .padding=${["0","xl","m","xl"]}
      alignItems="center"
      gap="m"
    >
      ${this.network&&K`<wui-network-icon .network=${this.network}></wui-network-icon>`}
      ${this.activateAccountTemplate()}
      <wui-profile-button
        @click=${this.onProfileButtonClick.bind(this)}
        address=${gt(this.address)}
        networkSrc=${gt(e)}
        icon="chevronBottom"
        avatarSrc=${gt(this.profileImage?this.profileImage:void 0)}
        profileName=${this.profileName}
        data-testid="w3m-profile-button"
      ></wui-profile-button>
      ${this.tokenBalanceTemplate()}
      <wui-flex gap="s">
        <w3m-tooltip-trigger text="Buy">
          <wui-icon-button
            data-testid="wallet-features-onramp-button"
            @click=${this.onBuyClick.bind(this)}
            icon="card"
          ></wui-icon-button>
        </w3m-tooltip-trigger>
        ${this.swapsTemplate()}
        <w3m-tooltip-trigger text="Receive">
          <wui-icon-button
            data-testid="wallet-features-receive-button"
            @click=${this.onReceiveClick.bind(this)}
            icon="arrowBottomCircle"
          >
          </wui-icon-button>
        </w3m-tooltip-trigger>
        <w3m-tooltip-trigger text="Send">
          <wui-icon-button
            data-testid="wallet-features-send-button"
            @click=${this.onSendClick.bind(this)}
            icon="send"
          ></wui-icon-button>
        </w3m-tooltip-trigger>
      </wui-flex>

      <wui-tabs
        .onTabChange=${this.onTabChange.bind(this)}
        .activeTab=${this.currentTab}
        localTabWidth=${st.isMobile()&&window.innerWidth<ZBe?`${(window.innerWidth-QBe)/YBe}px`:"104px"}
        .tabs=${Fne.ACCOUNT_TABS}
      ></wui-tabs>
      ${this.listContentTemplate()}
    </wui-flex>`}swapsTemplate(){const{enableSwaps:e}=pt.state;return e?K`
      <w3m-tooltip-trigger text="Swap">
        <wui-icon-button
          data-testid="wallet-features-swap-button"
          @click=${this.onSwapClick.bind(this)}
          icon="recycleHorizontal"
        >
        </wui-icon-button>
      </w3m-tooltip-trigger>
    `:null}watchSwapValues(){this.watchTokenBalance=setInterval(()=>Ne.fetchTokenBalance(),1e4)}listContentTemplate(){return this.currentTab===0?K`<w3m-account-tokens-widget></w3m-account-tokens-widget>`:this.currentTab===1?K`<w3m-account-nfts-widget></w3m-account-nfts-widget>`:this.currentTab===2?K`<w3m-account-activity-widget></w3m-account-activity-widget>`:K`<w3m-account-tokens-widget></w3m-account-tokens-widget>`}tokenBalanceTemplate(){var e;if(this.tokenBalance&&((e=this.tokenBalance)==null?void 0:e.length)>=0){const n=st.calculateBalance(this.tokenBalance),{dollars:r="0",pennies:i="00"}=st.formatTokenBalance(n);return K`<wui-balance dollars=${r} pennies=${i}></wui-balance>`}return K`<wui-balance dollars="0" pennies="00"></wui-balance>`}activateAccountTemplate(){return!rt.checkIfSmartAccountEnabled()||this.preferredAccountType!==Fn.ACCOUNT_TYPES.EOA||this.smartAccountDeployed?null:K` <wui-promo
      text=${"Activate your account"}
      @click=${this.onUpdateToSmartAccount.bind(this)}
      data-testid="activate-smart-account-promo"
    ></wui-promo>`}onTabChange(e){Ne.setCurrentTab(e)}onProfileButtonClick(){ke.push("Profile")}onBuyClick(){ke.push("OnRampProviders")}onSwapClick(){var e,n,r;(e=this.network)!=null&&e.id&&!os.SWAP_SUPPORTED_NETWORKS.includes((n=this.network)==null?void 0:n.id)?ke.push("UnsupportedChain",{swapUnsupportedChain:!0}):(wt.sendEvent({type:"track",event:"OPEN_SWAP",properties:{network:((r=this.network)==null?void 0:r.id)||"",isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT}}),ke.push("Swap"))}onReceiveClick(){ke.push("WalletReceive")}onSendClick(){var e;wt.sendEvent({type:"track",event:"OPEN_SEND",properties:{network:((e=this.network)==null?void 0:e.id)||"",isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT}}),ke.push("WalletSend")}onUpdateToSmartAccount(){ke.push("UpgradeToSmartAccount")}};xl.styles=KBe;Ud([pe()],xl.prototype,"watchTokenBalance",void 0);Ud([pe()],xl.prototype,"address",void 0);Ud([pe()],xl.prototype,"profileImage",void 0);Ud([pe()],xl.prototype,"profileName",void 0);Ud([pe()],xl.prototype,"smartAccountDeployed",void 0);Ud([pe()],xl.prototype,"network",void 0);Ud([pe()],xl.prototype,"currentTab",void 0);Ud([pe()],xl.prototype,"tokenBalance",void 0);Ud([pe()],xl.prototype,"preferredAccountType",void 0);xl=Ud([Ce("w3m-account-wallet-features-widget")],xl);const JBe=De`
  :host {
    width: 100%;
    max-height: 280px;
    overflow: scroll;
    scrollbar-width: none;
  }

  :host::-webkit-scrollbar {
    display: none;
  }
`;var XBe=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let eO=class extends Te{render(){return K`<w3m-activity-list page="account"></w3m-activity-list>`}};eO.styles=JBe;eO=XBe([Ce("w3m-account-activity-widget")],eO);const e$e=De`
  .contentContainer {
    height: 280px;
  }

  .contentContainer > wui-icon-box {
    width: 40px;
    height: 40px;
    border-radius: var(--wui-border-radius-xxs);
  }

  .contentContainer > .textContent {
    width: 65%;
  }
`;var t$e=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let tO=class extends Te{render(){return K`${this.nftTemplate()}`}nftTemplate(){return K` <wui-flex
      class="contentContainer"
      alignItems="center"
      justifyContent="center"
      flexDirection="column"
      gap="l"
    >
      <wui-icon-box
        icon="wallet"
        size="inherit"
        iconColor="fg-200"
        backgroundColor="fg-200"
        iconSize="lg"
      ></wui-icon-box>
      <wui-flex
        class="textContent"
        gap="xs"
        flexDirection="column"
        justifyContent="center"
        flexDirection="column"
      >
        <wui-text variant="paragraph-500" align="center" color="fg-100">Coming soon</wui-text>
        <wui-text variant="small-400" align="center" color="fg-200"
          >Stay tuned for our upcoming NFT feature</wui-text
        >
      </wui-flex>
      <wui-link @click=${this.onReceiveClick.bind(this)}>Receive funds</wui-link>
    </wui-flex>`}onReceiveClick(){ke.push("WalletReceive")}};tO.styles=e$e;tO=t$e([Ce("w3m-account-nfts-widget")],tO);const n$e=De`
  :host {
    width: 100%;
  }

  wui-flex {
    width: 100%;
  }

  .contentContainer {
    max-height: 280px;
    overflow: scroll;
    scrollbar-width: none;
  }

  .contentContainer::-webkit-scrollbar {
    display: none;
  }
`;var Gne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let QC=class extends Te{constructor(){super(),this.unsubscribe=[],this.tokenBalance=Ne.state.tokenBalance,this.unsubscribe.push(Ne.subscribe(e=>{this.tokenBalance=e.tokenBalance}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return K`${this.tokenTemplate()}`}tokenTemplate(){var e;return this.tokenBalance&&((e=this.tokenBalance)==null?void 0:e.length)>0?K`<wui-flex class="contentContainer" flexDirection="column" gap="xs">
        ${this.tokenItemTemplate()}
      </wui-flex>`:K` <wui-flex flexDirection="column" gap="xs"
      ><wui-list-description
        @click=${this.onBuyClick.bind(this)}
        text="Buy Crypto"
        description="Easy with card or bank account"
        icon="card"
        iconColor="success-100"
        iconBackgroundColor="success-100"
        tag="popular"
      ></wui-list-description
      ><wui-list-description
        @click=${this.onReceiveClick.bind(this)}
        text="Receive funds"
        description="Transfer tokens on your wallet"
        icon="arrowBottomCircle"
        iconColor="fg-200"
        iconBackgroundColor="fg-200"
      ></wui-list-description
    ></wui-flex>`}tokenItemTemplate(){var e;return(e=this.tokenBalance)==null?void 0:e.map(n=>K`<wui-list-token
          tokenName=${n.name}
          tokenImageUrl=${n.iconUrl}
          tokenAmount=${n.quantity.numeric}
          tokenValue=${n.value}
          tokenCurrency=${n.symbol}
        ></wui-list-token>`)}onReceiveClick(){ke.push("WalletReceive")}onBuyClick(){wt.sendEvent({type:"track",event:"SELECT_BUY_CRYPTO",properties:{isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT}}),ke.push("OnRampProviders")}};QC.styles=n$e;Gne([pe()],QC.prototype,"tokenBalance",void 0);QC=Gne([Ce("w3m-account-tokens-widget")],QC);const r$e=De`
  :host {
    min-height: 100%;
  }

  .contentContainer {
    height: 280px;
  }

  .contentContainer > wui-icon-box {
    width: 40px;
    height: 40px;
    border-radius: var(--wui-border-radius-xxs);
  }

  .contentContainer > .textContent {
    width: 65%;
  }

  .emptyContainer {
    height: 100%;
  }
`;var em=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const mA="last-transaction",i$e=7;let Sd=class extends Te{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.page="activity",this.isSolana=Qe.state.activeChain===Bi.CHAIN.SOLANA,this.address=Ne.state.address,this.transactionsByYear=lo.state.transactionsByYear,this.loading=lo.state.loading,this.empty=lo.state.empty,this.next=lo.state.next,lo.clearCursor(),this.unsubscribe.push(Qe.subscribeKey("activeChain",e=>{this.isSolana=e===Bi.CHAIN.SOLANA}),Ne.subscribe(e=>{e.isConnected&&this.address!==e.address&&(this.address=e.address,lo.resetTransactions(),lo.fetchTransactions(e.address))}),lo.subscribe(e=>{this.transactionsByYear=e.transactionsByYear,this.loading=e.loading,this.empty=e.empty,this.next=e.next}))}firstUpdated(){if(this.isSolana){this.loading=!1,this.empty=!0;return}lo.fetchTransactions(this.address),this.createPaginationObserver()}updated(){this.setPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return K` ${this.empty?null:this.templateTransactionsByYear()}
    ${this.loading?this.templateLoading():null}
    ${!this.loading&&this.empty?this.templateEmpty():null}`}templateTransactionsByYear(){const e=Object.keys(this.transactionsByYear).sort().reverse();return e.map((n,r)=>{const i=r===e.length-1,s=parseInt(n,10);return new Array(12).fill(null).map((a,c)=>c).reverse().map(a=>{var u;const c=Ym.getTransactionGroupTitle(s,a),l=(u=this.transactionsByYear[s])==null?void 0:u[a];return l?K`
          <wui-flex flexDirection="column">
            <wui-flex
              alignItems="center"
              flexDirection="row"
              .padding=${["xs","s","s","s"]}
            >
              <wui-text variant="paragraph-500" color="fg-200">${c}</wui-text>
            </wui-flex>
            <wui-flex flexDirection="column" gap="xs">
              ${this.templateTransactions(l,i)}
            </wui-flex>
          </wui-flex>
        `:null})})}templateRenderTransaction(e,n){const{date:r,descriptions:i,direction:s,isAllNFT:o,images:a,status:c,transfers:l,type:u}=this.getTransactionListItemProps(e),d=(l==null?void 0:l.length)>1;return(l==null?void 0:l.length)===2&&!o?K`
        <wui-transaction-list-item
          date=${r}
          .direction=${s}
          id=${n&&this.next?mA:""}
          status=${c}
          type=${u}
          .images=${a}
          .descriptions=${i}
        ></wui-transaction-list-item>
      `:d?l.map((g,w)=>{const v=Ym.getTransferDescription(g),_=n&&w===l.length-1;return K` <wui-transaction-list-item
          date=${r}
          direction=${g.direction}
          id=${_&&this.next?mA:""}
          status=${c}
          type=${u}
          .onlyDirectionIcon=${!0}
          .images=${[a[w]]}
          .descriptions=${[v]}
        ></wui-transaction-list-item>`}):K`
      <wui-transaction-list-item
        date=${r}
        .direction=${s}
        id=${n&&this.next?mA:""}
        status=${c}
        type=${u}
        .images=${a}
        .descriptions=${i}
      ></wui-transaction-list-item>
    `}templateTransactions(e,n){return e.map((r,i)=>{const s=n&&i===e.length-1;return K`${this.templateRenderTransaction(r,s)}`})}emptyStateActivity(){const e=K`
      <wui-text align="center" variant="paragraph-500" color="fg-100"
        >Transaction history is coming soon!</wui-text
      >
    `,n=K` <wui-text align="center" variant="paragraph-500" color="fg-100"
        >No Transactions yet</wui-text
      >
      <wui-text align="center" variant="small-500" color="fg-200"
        >Start trading on dApps <br />
        to grow your wallet!</wui-text
      >`;return K`<wui-flex
      class="emptyContainer"
      flexGrow="1"
      flexDirection="column"
      justifyContent="center"
      alignItems="center"
      .padding=${["3xl","xl","3xl","xl"]}
      gap="xl"
    >
      <wui-icon-box
        backgroundColor="gray-glass-005"
        background="gray"
        iconColor="fg-200"
        icon="wallet"
        size="lg"
        ?border=${!0}
        borderColor="wui-color-bg-125"
      ></wui-icon-box>
      <wui-flex flexDirection="column" alignItems="center" gap="xs">
        ${this.isSolana?e:n}
      </wui-flex>
    </wui-flex>`}emptyStateAccount(){const e=K`
      <wui-text variant="paragraph-500" align="center" color="fg-100"
        >Transaction history is coming soon!</wui-text
      >
    `,n=K` <wui-text variant="paragraph-500" align="center" color="fg-100"
        >No activity yet</wui-text
      >
      <wui-text variant="small-400" align="center" color="fg-200"
        >Your next transactions will appear here</wui-text
      >`;return K`<wui-flex
      class="contentContainer"
      alignItems="center"
      justifyContent="center"
      flexDirection="column"
      gap="l"
    >
      <wui-icon-box
        icon="swapHorizontal"
        size="inherit"
        iconColor="fg-200"
        backgroundColor="fg-200"
        iconSize="lg"
      ></wui-icon-box>
      <wui-flex
        class="textContent"
        gap="xs"
        flexDirection="column"
        justifyContent="center"
        flexDirection="column"
      >
        ${this.isSolana?e:n}
      </wui-flex>
      <wui-link @click=${this.onReceiveClick.bind(this)}>Trade</wui-link>
    </wui-flex>`}templateEmpty(){return this.page==="account"?K`${this.emptyStateAccount()}`:K`${this.emptyStateActivity()}`}templateLoading(){return this.page==="activity"?Array(i$e).fill(K` <wui-transaction-list-item-loader></wui-transaction-list-item-loader> `).map(e=>e):null}onReceiveClick(){ke.push("WalletReceive")}createPaginationObserver(){const{projectId:e}=pt.state;this.paginationObserver=new IntersectionObserver(([n])=>{n!=null&&n.isIntersecting&&!this.loading&&(lo.fetchTransactions(this.address),wt.sendEvent({type:"track",event:"LOAD_MORE_TRANSACTIONS",properties:{address:this.address,projectId:e,cursor:this.next,isSmartAccount:Ne.state.preferredAccountType===Fn.ACCOUNT_TYPES.SMART_ACCOUNT}}))},{}),this.setPaginationObserver()}setPaginationObserver(){var n,r,i;(n=this.paginationObserver)==null||n.disconnect();const e=(r=this.shadowRoot)==null?void 0:r.querySelector(`#${mA}`);e&&((i=this.paginationObserver)==null||i.observe(e))}getTransactionListItemProps(e){var c,l,u,d,h;const n=qB.formatDate((c=e==null?void 0:e.metadata)==null?void 0:c.minedAt),r=Ym.getTransactionDescriptions(e),i=e==null?void 0:e.transfers,s=(l=e==null?void 0:e.transfers)==null?void 0:l[0],o=!!s&&((u=e==null?void 0:e.transfers)==null?void 0:u.every(g=>!!g.nft_info)),a=Ym.getTransactionImages(i);return{date:n,direction:s==null?void 0:s.direction,descriptions:r,isAllNFT:o,images:a,status:(d=e.metadata)==null?void 0:d.status,transfers:i,type:(h=e.metadata)==null?void 0:h.operationType}}};Sd.styles=r$e;em([ne()],Sd.prototype,"page",void 0);em([pe()],Sd.prototype,"isSolana",void 0);em([pe()],Sd.prototype,"address",void 0);em([pe()],Sd.prototype,"transactionsByYear",void 0);em([pe()],Sd.prototype,"loading",void 0);em([pe()],Sd.prototype,"empty",void 0);em([pe()],Sd.prototype,"next",void 0);Sd=em([Ce("w3m-activity-list")],Sd);const s$e=De`
  :host {
    width: 100%;
    height: 100px;
    border-radius: var(--wui-border-radius-s);
    border: 1px solid var(--wui-color-gray-glass-002);
    background-color: var(--wui-color-gray-glass-002);
    transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg);
    will-change: background-color;
  }

  :host(:hover) {
    background-color: var(--wui-color-gray-glass-005);
  }

  wui-flex {
    width: 100%;
    height: fit-content;
  }

  wui-button {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }

  wui-input-amount {
    mask-image: linear-gradient(
      270deg,
      transparent 0px,
      transparent 8px,
      black 24px,
      black 25px,
      black 32px,
      black 100%
    );
  }

  .totalValue {
    width: 100%;
  }
`;var T9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let zv=class extends Te{render(){return K` <wui-flex
      flexDirection="column"
      gap="4xs"
      .padding=${["xl","s","l","l"]}
    >
      <wui-flex alignItems="center">
        <wui-input-amount
          @inputChange=${this.onInputChange.bind(this)}
          ?disabled=${!this.token&&!0}
          .value=${this.sendTokenAmount?String(this.sendTokenAmount):""}
        ></wui-input-amount>
        ${this.buttonTemplate()}
      </wui-flex>
      <wui-flex alignItems="center" justifyContent="space-between">
        ${this.sendValueTemplate()}
        <wui-flex alignItems="center" gap="4xs" justifyContent="flex-end">
          ${this.maxAmountTemplate()} ${this.actionTemplate()}
        </wui-flex>
      </wui-flex>
    </wui-flex>`}buttonTemplate(){return this.token?K`<wui-token-button
        text=${this.token.symbol}
        imageSrc=${this.token.iconUrl}
        @click=${this.handleSelectButtonClick.bind(this)}
      >
      </wui-token-button>`:K`<wui-button
      size="md"
      variant="accent"
      @click=${this.handleSelectButtonClick.bind(this)}
      >Select token</wui-button
    >`}handleSelectButtonClick(){ke.push("WalletSendSelectToken")}sendValueTemplate(){if(this.token&&this.sendTokenAmount){const n=this.token.price*this.sendTokenAmount;return K`<wui-text class="totalValue" variant="small-400" color="fg-200"
        >${n?`$${qt.formatNumberToLocalString(n,2)}`:"Incorrect value"}</wui-text
      >`}return null}maxAmountTemplate(){return this.token?this.sendTokenAmount&&this.sendTokenAmount>Number(this.token.quantity.numeric)?K` <wui-text variant="small-400" color="error-100">
          ${qt.roundNumber(Number(this.token.quantity.numeric),6,5)}
        </wui-text>`:K` <wui-text variant="small-400" color="fg-200">
        ${qt.roundNumber(Number(this.token.quantity.numeric),6,5)}
      </wui-text>`:null}actionTemplate(){return this.token?this.sendTokenAmount&&this.sendTokenAmount>Number(this.token.quantity.numeric)?K`<wui-link @click=${this.onBuyClick.bind(this)}>Buy</wui-link>`:K`<wui-link @click=${this.onMaxClick.bind(this)}>Max</wui-link>`:null}onInputChange(e){Ir.setTokenAmount(e.detail)}onMaxClick(){if(this.token&&this.gasPriceInUSD){const e=hr.bigNumber(this.gasPriceInUSD.toFixed(5)).dividedBy(this.token.price),r=this.token.address===void 0?hr.bigNumber(this.token.quantity.numeric).minus(e):hr.bigNumber(this.token.quantity.numeric);Ir.setTokenAmount(Number(r.toFixed(20)))}}onBuyClick(){ke.push("OnRampProviders")}};zv.styles=s$e;T9([ne({type:Object})],zv.prototype,"token",void 0);T9([ne({type:Number})],zv.prototype,"sendTokenAmount",void 0);T9([ne({type:Number})],zv.prototype,"gasPriceInUSD",void 0);zv=T9([Ce("w3m-input-token")],zv);const o$e=De`
  :host {
    width: 100%;
    height: 100px;
    border-radius: var(--wui-border-radius-s);
    border: 1px solid var(--wui-color-gray-glass-002);
    background-color: var(--wui-color-gray-glass-002);
    transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg);
    will-change: background-color;
    position: relative;
  }

  :host(:hover) {
    background-color: var(--wui-color-gray-glass-005);
  }

  wui-flex {
    width: 100%;
    height: fit-content;
  }

  wui-button {
    display: ruby;
    color: var(--wui-color-fg-100);
    margin: 0 var(--wui-spacing-xs);
  }

  .instruction {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .paste {
    display: inline-flex;
  }

  textarea {
    background: transparent;
    width: 100%;
    font-family: var(--w3m-font-family);
    font-size: var(--wui-font-size-medium);
    font-style: normal;
    font-weight: var(--wui-font-weight-light);
    line-height: 130%;
    letter-spacing: var(--wui-letter-spacing-medium);
    color: var(--wui-color-fg-100);
    caret-color: var(--wui-color-accent-100);
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    padding: 0px;
    border: none;
    outline: none;
    appearance: none;
    resize: none;
    overflow: hidden;
  }
`;var I9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Hv=class extends Te{constructor(){super(...arguments),this.inputElementRef=A0(),this.instructionElementRef=A0(),this.instructionHidden=!!this.value,this.pasting=!1,this.onDebouncedSearch=st.debounce(async e=>{const n=await tn.getEnsAddress(e);if(Ir.setLoading(!1),n){Ir.setReceiverProfileName(e),Ir.setReceiverAddress(n);const r=await tn.getEnsAvatar(e);r&&Ir.setReceiverProfileImageUrl(r)}else Ir.setReceiverAddress(e),Ir.setReceiverProfileName(void 0),Ir.setReceiverProfileImageUrl(void 0)})}firstUpdated(){this.value&&(this.instructionHidden=!0),this.checkHidden()}render(){return K` <wui-flex
      @click=${this.onBoxClick.bind(this)}
      flexDirection="column"
      justifyContent="center"
      gap="4xs"
      .padding=${["2xl","l","xl","l"]}
    >
      <wui-text
        ${E0(this.instructionElementRef)}
        class="instruction"
        color="fg-300"
        variant="medium-400"
      >
        Type or
        <wui-button
          class="paste"
          size="md"
          variant="neutral"
          iconLeft="copy"
          @click=${this.onPasteClick.bind(this)}
        >
          <wui-icon size="sm" color="inherit" slot="iconLeft" name="copy"></wui-icon>
          Paste
        </wui-button>
        address
      </wui-text>
      <textarea
        spellcheck="false"
        ?disabled=${!this.instructionHidden}
        ${E0(this.inputElementRef)}
        @input=${this.onInputChange.bind(this)}
        @blur=${this.onBlur.bind(this)}
        .value=${this.value??""}
        autocomplete="off"
      >
${this.value??""}</textarea
      >
    </wui-flex>`}async focusInput(){var e;this.instructionElementRef.value&&(this.instructionHidden=!0,await this.toggleInstructionFocus(!1),this.instructionElementRef.value.style.pointerEvents="none",(e=this.inputElementRef.value)==null||e.focus(),this.inputElementRef.value&&(this.inputElementRef.value.selectionStart=this.inputElementRef.value.selectionEnd=this.inputElementRef.value.value.length))}async focusInstruction(){var e;this.instructionElementRef.value&&(this.instructionHidden=!1,await this.toggleInstructionFocus(!0),this.instructionElementRef.value.style.pointerEvents="auto",(e=this.inputElementRef.value)==null||e.blur())}async toggleInstructionFocus(e){this.instructionElementRef.value&&await this.instructionElementRef.value.animate([{opacity:e?0:1},{opacity:e?1:0}],{duration:100,easing:"ease",fill:"forwards"}).finished}onBoxClick(){!this.value&&!this.instructionHidden&&this.focusInput()}onBlur(){!this.value&&this.instructionHidden&&!this.pasting&&this.focusInstruction()}checkHidden(){this.instructionHidden&&this.focusInput()}async onPasteClick(){this.pasting=!0;const e=await navigator.clipboard.readText();Ir.setReceiverAddress(e),this.focusInput()}onInputChange(e){this.pasting=!1;const n=e.target;n.value&&!this.instructionHidden&&this.focusInput(),Ir.setLoading(!0),this.onDebouncedSearch(n.value)}};Hv.styles=o$e;I9([ne()],Hv.prototype,"value",void 0);I9([pe()],Hv.prototype,"instructionHidden",void 0);I9([pe()],Hv.prototype,"pasting",void 0);Hv=I9([Ce("w3m-input-address")],Hv);const a$e=De`
  :host {
    display: flex;
    width: auto;
    flex-direction: column;
    gap: var(--wui-border-radius-1xs);
    border-radius: var(--wui-border-radius-s);
    background: var(--wui-color-gray-glass-002);
    padding: var(--wui-spacing-s) var(--wui-spacing-1xs) var(--wui-spacing-1xs)
      var(--wui-spacing-1xs);
  }

  wui-text {
    padding: 0 var(--wui-spacing-1xs);
  }

  wui-flex {
    margin-top: var(--wui-spacing-1xs);
  }

  .network {
    cursor: pointer;
    transition: background-color var(--wui-ease-out-power-1) var(--wui-duration-lg);
    will-change: background-color;
  }

  .network:focus-visible {
    border: 1px solid var(--wui-color-accent-100);
    background-color: var(--wui-color-gray-glass-005);
    -webkit-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
    -moz-box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
    box-shadow: 0px 0px 0px 4px var(--wui-box-shadow-blue);
  }

  .network:hover {
    background-color: var(--wui-color-gray-glass-005);
  }

  .network:active {
    background-color: var(--wui-color-gray-glass-010);
  }
`;var k9=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Wv=class extends Te{render(){return K` <wui-text variant="small-400" color="fg-200">Details</wui-text>
      <wui-flex flexDirection="column" gap="xxs">
        <wui-list-content textTitle="Network cost" textValue="$${gt(qt.formatNumberToLocalString(this.networkFee,2))}"></wui-list-content></wui-list-content>
        <wui-list-content
          textTitle="Address"
          textValue=${qt.getTruncateString({string:this.receiverAddress??"",charsStart:4,charsEnd:4,truncate:"middle"})}
        >
        </wui-list-content>
        ${this.networkTemplate()}
      </wui-flex>`}networkTemplate(){var e;return(e=this.caipNetwork)!=null&&e.name?K` <wui-list-content
        @click=${()=>this.onNetworkClick(this.caipNetwork)}
        class="network"
        textTitle="Network"
        imageSrc=${gt(kr.getNetworkImage(this.caipNetwork))}
      ></wui-list-content>`:null}onNetworkClick(e){e&&ke.push("Networks",{network:e})}};Wv.styles=a$e;k9([ne()],Wv.prototype,"receiverAddress",void 0);k9([ne({type:Object})],Wv.prototype,"caipNetwork",void 0);k9([ne({type:Number})],Wv.prototype,"networkFee",void 0);Wv=k9([Ce("w3m-wallet-send-details")],Wv);const c$e=De`
  :host {
    pointer-events: none;
  }

  :host > wui-flex {
    display: var(--w3m-tooltip-display);
    opacity: var(--w3m-tooltip-opacity);
    padding: 9px var(--wui-spacing-s) 10px var(--wui-spacing-s);
    border-radius: var(--wui-border-radius-xxs);
    color: var(--wui-color-bg-100);
    position: fixed;
    top: var(--w3m-tooltip-top);
    left: var(--w3m-tooltip-left);
    transform: translate(calc(-50% + var(--w3m-tooltip-parent-width)), calc(-100% - 8px));
    max-width: calc(var(--w3m-modal-width) - var(--wui-spacing-xl));
    transition: opacity 0.2s var(--wui-ease-out-power-2);
    will-change: opacity;
  }

  :host([data-variant='shade']) > wui-flex {
    background-color: var(--wui-color-bg-150);
    border: 1px solid var(--wui-color-gray-glass-005);
  }

  :host([data-variant='shade']) > wui-flex > wui-text {
    color: var(--wui-color-fg-150);
  }

  :host([data-variant='fill']) > wui-flex {
    background-color: var(--wui-color-fg-100);
    border: none;
  }

  wui-icon {
    position: absolute;
    width: 12px !important;
    height: 4px !important;
    color: var(--wui-color-bg-150);
  }

  wui-icon[data-placement='top'] {
    bottom: 0px;
    left: 50%;
    transform: translate(-50%, 95%);
  }

  wui-icon[data-placement='bottom'] {
    top: 0;
    left: 50%;
    transform: translate(-50%, -95%) rotate(180deg);
  }

  wui-icon[data-placement='right'] {
    top: 50%;
    left: 0;
    transform: translate(-65%, -50%) rotate(90deg);
  }

  wui-icon[data-placement='left'] {
    top: 50%;
    right: 0%;
    transform: translate(65%, -50%) rotate(270deg);
  }
`;var l4=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let a1=class extends Te{constructor(){super(),this.unsubscribe=[],this.open=Ga.state.open,this.message=Ga.state.message,this.triggerRect=Ga.state.triggerRect,this.variant=Ga.state.variant,this.unsubscribe.push(Ga.subscribe(e=>{this.open=e.open,this.message=e.message,this.triggerRect=e.triggerRect,this.variant=e.variant}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){this.dataset.variant=this.variant;const e=this.triggerRect.top,n=this.triggerRect.left;return this.style.cssText=`
    --w3m-tooltip-top: ${e}px;
    --w3m-tooltip-left: ${n}px;
    --w3m-tooltip-parent-width: ${this.triggerRect.width/2}px;
    --w3m-tooltip-display: ${this.open?"flex":"none"};
    --w3m-tooltip-opacity: ${this.open?1:0};
    `,K`<wui-flex>
      <wui-icon data-placement="top" color="fg-100" size="inherit" name="cursor"></wui-icon>
      <wui-text color="inherit" variant="small-500">${this.message}</wui-text>
    </wui-flex>`}};a1.styles=[c$e];l4([pe()],a1.prototype,"open",void 0);l4([pe()],a1.prototype,"message",void 0);l4([pe()],a1.prototype,"triggerRect",void 0);l4([pe()],a1.prototype,"variant",void 0);a1=l4([Ce("w3m-tooltip")],a1);const l$e=De`
  :host {
    width: 100%;
    display: block;
  }
`;var k$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let _x=class extends Te{constructor(){super(),this.unsubscribe=[],this.text="",this.open=Ga.state.open,this.unsubscribe.push(ke.subscribeKey("view",()=>{Ga.hide()}),dn.subscribeKey("open",e=>{e||Ga.hide()}),Ga.subscribeKey("open",e=>{this.open=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),Ga.hide()}render(){return K`
      <div
        @pointermove=${this.onMouseEnter.bind(this)}
        @pointerleave=${this.onMouseLeave.bind(this)}
      >
        ${this.renderChildren()}
      </div>
    `}renderChildren(){return K`<slot></slot> `}onMouseEnter(){const e=this.getBoundingClientRect();this.open||Ga.showTooltip({message:this.text,triggerRect:{width:e.width,height:e.height,left:e.left,top:e.top},variant:"shade"})}onMouseLeave(e){this.contains(e.relatedTarget)||Ga.hide()}};_x.styles=[l$e];k$([ne()],_x.prototype,"text",void 0);k$([pe()],_x.prototype,"open",void 0);_x=k$([Ce("w3m-tooltip-trigger")],_x);const u$e=De`
  :host > wui-flex:first-child {
    margin-top: var(--wui-spacing-s);
  }
  wui-separator {
    margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-m)
      calc(var(--wui-spacing-m) * -1);
    width: calc(100% + var(--wui-spacing-s) * 2);
  }
`;var Kne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const Tq=2,Iq=6;let ZC=class extends Te{constructor(){super(),this.unsubscribe=[],this.connectors=Pt.state.connectors,this.connector=this.connectors.find(e=>e.type==="AUTH"),this.unsubscribe.push(Pt.subscribeKey("connectors",e=>{this.connectors=e,this.connector=this.connectors.find(n=>n.type==="AUTH")}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){var e;return(e=this.connector)!=null&&e.socials?K`
      <wui-flex
        class="container"
        flexDirection="column"
        gap="xs"
        .padding=${["0","0","xs","0"]}
      >
        ${this.topViewTemplate()}${this.bottomViewTemplate()}
      </wui-flex>
      ${this.separatorTemplate()}
    `:null}topViewTemplate(){var e,n,r;return(e=this.connector)!=null&&e.socials?this.connector.socials.length===2?K` <wui-flex gap="xs">
        ${this.connector.socials.slice(0,Tq).map(i=>K`<wui-logo-select
              data-testid=${`social-selector-${i}`}
              @click=${()=>{this.onSocialClick(i)}}
              logo=${i}
            ></wui-logo-select>`)}
      </wui-flex>`:K` <wui-list-social
      data-testid=${`social-selector-${(r=(n=this.connector)==null?void 0:n.socials)==null?void 0:r[0]}`}
      @click=${()=>{var i,s;this.onSocialClick((s=(i=this.connector)==null?void 0:i.socials)==null?void 0:s[0])}}
      logo=${gt(this.connector.socials[0])}
      align="center"
      name=${`Continue with ${this.connector.socials[0]}`}
    ></wui-list-social>`:null}bottomViewTemplate(){var e,n,r;return!((e=this.connector)!=null&&e.socials)||((n=this.connector)==null?void 0:n.socials.length)<=Tq?null:((r=this.connector)==null?void 0:r.socials.length)>Iq?K`<wui-flex gap="xs">
        ${this.connector.socials.slice(1,Iq-1).map(i=>K`<wui-logo-select
              data-testid=${`social-selector-${i}`}
              @click=${()=>{this.onSocialClick(i)}}
              logo=${i}
            ></wui-logo-select>`)}
        <wui-logo-select logo="more" @click=${this.onMoreSocialsClick.bind(this)}></wui-logo-select>
      </wui-flex>`:K`<wui-flex gap="xs">
      ${this.connector.socials.slice(1,this.connector.socials.length).map(i=>K`<wui-logo-select
            data-testid=${`social-selector-${i}`}
            @click=${()=>{this.onSocialClick(i)}}
            logo=${i}
          ></wui-logo-select>`)}
    </wui-flex>`}separatorTemplate(){return this.connectors.find(n=>n.type==="WALLET_CONNECT")?K`<wui-separator text="or"></wui-separator>`:null}onMoreSocialsClick(){ke.push("ConnectSocials")}async onSocialClick(e){var n,r;if(e&&(Ne.setSocialProvider(e,Qe.state.activeChain),wt.sendEvent({type:"track",event:"SOCIAL_LOGIN_STARTED",properties:{provider:e}})),e===LC.Farcaster){ke.push("ConnectingFarcaster");const i=Pt.getAuthConnector();if(i&&!Ne.state.farcasterUrl)try{const{url:s}=await i.provider.getFarcasterUri();Ne.setFarcasterUrl(s)}catch(s){ke.goBack(),Ht.showError(s)}}else{ke.push("ConnectingSocial");const i=Pt.getAuthConnector();this.popupWindow=st.returnOpenHref("","popupWindow","width=600,height=800,scrollbars=yes");try{if(i&&e){const{uri:s}=await i.provider.getSocialRedirectUri({provider:e});if(this.popupWindow&&s)Ne.setSocialWindow(this.popupWindow,Qe.state.activeChain),this.popupWindow.location.href=s;else throw(n=this.popupWindow)==null||n.close(),new Error("Something went wrong")}}catch{(r=this.popupWindow)==null||r.close(),Ht.showError("Something went wrong")}}}};ZC.styles=u$e;Kne([pe()],ZC.prototype,"connectors",void 0);ZC=Kne([Ce("w3m-social-login-widget")],ZC);var d$e=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let kq=class extends Te{render(){return K`
      <wui-flex flexDirection="column" gap="xs">
        <w3m-connector-list></w3m-connector-list>
        <w3m-all-wallets-widget></w3m-all-wallets-widget>
      </wui-flex>
    `}};kq=d$e([Ce("w3m-wallet-login-list")],kq);const f$e=De`
  :host {
    margin-top: var(--wui-spacing-3xs);
  }
  wui-separator {
    margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-xs)
      calc(var(--wui-spacing-m) * -1);
    width: calc(100% + var(--wui-spacing-s) * 2);
  }
`;var Yne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let JC=class extends Te{constructor(){super(),this.unsubscribe=[],this.connectors=Pt.state.connectors,this.connector=this.connectors.find(e=>e.type==="AUTH"),this.unsubscribe.push(Pt.subscribeKey("connectors",e=>{this.connectors=e,this.connector=this.connectors.find(n=>n.type==="AUTH")}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){var e;return(e=this.connector)!=null&&e.socials?K` <wui-flex flexDirection="column" gap="xs">
      ${this.connector.socials.map(n=>K`<wui-list-social
            @click=${()=>{this.onSocialClick(n)}}
            name=${n}
            logo=${n}
          ></wui-list-social>`)}
    </wui-flex>`:null}async onSocialClick(e){var n,r;if(e&&(Ne.setSocialProvider(e,Qe.state.activeChain),wt.sendEvent({type:"track",event:"SOCIAL_LOGIN_STARTED",properties:{provider:e}})),e===LC.Farcaster){ke.push("ConnectingFarcaster");const i=Pt.getAuthConnector();if(i&&!Ne.state.farcasterUrl)try{const{url:s}=await i.provider.getFarcasterUri();Ne.setFarcasterUrl(s)}catch(s){ke.goBack(),Ht.showError(s)}}else{ke.push("ConnectingSocial");const i=Pt.getAuthConnector();this.popupWindow=st.returnOpenHref("","popupWindow","width=600,height=800,scrollbars=yes");try{if(i&&e){const{uri:s}=await i.provider.getSocialRedirectUri({provider:e});if(this.popupWindow&&s)Ne.setSocialWindow(this.popupWindow,Qe.state.activeChain),this.popupWindow.location.href=s;else throw(n=this.popupWindow)==null||n.close(),new Error("Something went wrong")}}catch{(r=this.popupWindow)==null||r.close(),Ht.showError("Something went wrong")}}}};JC.styles=f$e;Yne([pe()],JC.prototype,"connectors",void 0);JC=Yne([Ce("w3m-social-login-list")],JC);var Qne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let nO=class extends Te{constructor(){super(),this.unsubscribe=[],this.connectors=Pt.state.connectors,this.unsubscribe.push(Pt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.connectors.filter(n=>n.type==="ANNOUNCED");return e!=null&&e.length?K`
      <wui-flex flexDirection="column" gap="xs">
        ${e.map(n=>{var r,i;return(r=n.info)!=null&&r.rdns&&Qt.state.excludedRDNS&&Qt.state.excludedRDNS.includes((i=n==null?void 0:n.info)==null?void 0:i.rdns)?null:K`
            <wui-list-wallet
              imageSrc=${gt(kr.getConnectorImage(n))}
              name=${n.name??"Unknown"}
              @click=${()=>this.onConnector(n)}
              tagVariant="success"
              tagLabel="installed"
              data-testid=${`wallet-selector-${n.id}`}
              .installed=${!0}
            >
            </wui-list-wallet>
          `})}
      </wui-flex>
    `:(this.style.cssText="display: none",null)}onConnector(e){e.type==="WALLET_CONNECT"?st.isMobile()?ke.push("AllWallets"):ke.push("ConnectingWalletConnect"):ke.push("ConnectingExternal",{connector:e})}};Qne([pe()],nO.prototype,"connectors",void 0);nO=Qne([Ce("w3m-connect-announced-widget")],nO);var Zne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let rO=class extends Te{constructor(){super(),this.unsubscribe=[],this.connectors=Pt.state.connectors,this.unsubscribe.push(Pt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const{customWallets:e}=pt.state;if(!(e!=null&&e.length))return this.style.cssText="display: none",null;const n=this.filterOutDuplicateWallets(e);return K`<wui-flex flexDirection="column" gap="xs">
      ${n.map(r=>K`
          <wui-list-wallet
            imageSrc=${gt(kr.getWalletImage(r))}
            name=${r.name??"Unknown"}
            @click=${()=>this.onConnectWallet(r)}
            data-testid=${`wallet-selector-${r.id}`}
          >
          </wui-list-wallet>
        `)}
    </wui-flex>`}filterOutDuplicateWallets(e){const n=er.getRecentWallets(),r=this.connectors.map(a=>{var c;return(c=a.info)==null?void 0:c.rdns}).filter(Boolean),i=n.map(a=>a.rdns).filter(Boolean),s=r.concat(i);if(s.includes("io.metamask.mobile")&&st.isMobile()){const a=s.indexOf("io.metamask.mobile");s[a]="io.metamask"}return e.filter(a=>!s.includes(String(a==null?void 0:a.rdns)))}onConnectWallet(e){ke.push("ConnectingWalletConnect",{wallet:e})}};Zne([pe()],rO.prototype,"connectors",void 0);rO=Zne([Ce("w3m-connect-custom-widget")],rO);const XC={filterOutDuplicatesByRDNS(t){const e=pt.state.enableEIP6963?Pt.state.connectors:[],n=er.getRecentWallets(),r=e.map(a=>{var c;return(c=a.info)==null?void 0:c.rdns}).filter(Boolean),i=n.map(a=>a.rdns).filter(Boolean),s=r.concat(i);if(s.includes("io.metamask.mobile")&&st.isMobile()){const a=s.indexOf("io.metamask.mobile");s[a]="io.metamask"}return t.filter(a=>!s.includes(String(a==null?void 0:a.rdns)))},filterOutDuplicatesByIds(t){const e=Pt.state.connectors,n=er.getRecentWallets(),r=e.map(a=>a.explorerId),i=n.map(a=>a.id),s=r.concat(i);return t.filter(a=>!s.includes(a==null?void 0:a.id))},filterOutDuplicateWallets(t){const e=this.filterOutDuplicatesByRDNS(t);return this.filterOutDuplicatesByIds(e)}};var h$e=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Rq=class extends Te{constructor(){super(...arguments),this.unsubscribe=[]}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const{featured:e}=Qt.state;if(!e.length)return this.style.cssText="display: none",null;const n=XC.filterOutDuplicateWallets(e);return K`
      <wui-flex flexDirection="column" gap="xs">
        ${n.map(r=>K`
            <wui-list-wallet
              imageSrc=${gt(kr.getWalletImage(r))}
              name=${r.name??"Unknown"}
              @click=${()=>this.onConnectWallet(r)}
            >
            </wui-list-wallet>
          `)}
      </wui-flex>
    `}onConnectWallet(e){const n=Pt.getConnector(e.id,e.rdns);n?ke.push("ConnectingExternal",{connector:n}):ke.push("ConnectingWalletConnect",{wallet:e})}};Rq=h$e([Ce("w3m-connect-featured-widget")],Rq);var Jne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let iO=class extends Te{constructor(){super(),this.unsubscribe=[],this.connectors=Pt.state.connectors,this.unsubscribe.push(Pt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){var n;const e=this.connectors.filter(r=>r.type==="INJECTED");return!(e!=null&&e.length)||e.length===1&&((n=e[0])==null?void 0:n.name)==="Browser Wallet"&&!st.isMobile()?(this.style.cssText="display: none",null):K`
      <wui-flex flexDirection="column" gap="xs">
        ${e.map(r=>{var i,s;return!st.isMobile()&&r.name==="Browser Wallet"?null:tn.checkInstalled()?(i=r.info)!=null&&i.rdns&&Qt.state.excludedRDNS&&Qt.state.excludedRDNS.includes((s=r==null?void 0:r.info)==null?void 0:s.rdns)?null:K`
            <wui-list-wallet
              imageSrc=${gt(kr.getConnectorImage(r))}
              .installed=${!0}
              name=${r.name??"Unknown"}
              tagVariant="success"
              tagLabel="installed"
              data-testid=${`wallet-selector-${r.id}`}
              @click=${()=>this.onConnector(r)}
            >
            </wui-list-wallet>
          `:(this.style.cssText="display: none",null)})}
      </wui-flex>
    `}onConnector(e){ke.push("ConnectingExternal",{connector:e})}};Jne([pe()],iO.prototype,"connectors",void 0);iO=Jne([Ce("w3m-connect-injected-widget")],iO);var Xne=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let sO=class extends Te{constructor(){super(),this.unsubscribe=[],this.connectors=Pt.state.connectors,this.unsubscribe.push(Pt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.connectors.find(n=>n.id==="coinbaseWalletSDK");return e?K`
      <wui-flex flexDirection="column" gap="xs">
        <wui-list-wallet
          imageSrc=${gt(kr.getConnectorImage(e))}
          .installed=${!0}
          name=${gt(e.name)}
          data-testid=${`wallet-selector-${e.id}`}
          @click=${()=>this.onConnector(e)}
        >
        </wui-list-wallet>
      </wui-flex>
    `:(this.style.cssText="display: none",null)}async onCoinbaseConnector(e){try{tn.setWcError(!1),e.imageUrl&&er.setConnectedWalletImageUrl(e.imageUrl),await tn.connectExternal(e),pt.state.isSiweEnabled?ke.push("ConnectingSiwe"):dn.close(),wt.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:"browser",name:e.name||"Unknown"}})}catch(n){wt.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:(n==null?void 0:n.message)??"Unknown"}}),tn.setWcError(!0)}}onConnector(e){ke.push("ConnectingExternal",{connector:e}),e.id===cn.COINBASE_SDK_CONNECTOR_ID&&this.onCoinbaseConnector(e)}};Xne([pe()],sO.prototype,"connectors",void 0);sO=Xne([Ce("w3m-connect-coinbase-widget")],sO);var ere=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let oO=class extends Te{constructor(){super(),this.unsubscribe=[],this.connectors=Pt.state.connectors,this.unsubscribe.push(Pt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const n=this.connectors.filter(r=>r.type==="EXTERNAL").filter(r=>r.id!=="coinbaseWalletSDK");return n!=null&&n.length?K`
      <wui-flex flexDirection="column" gap="xs">
        ${n.map(r=>K`
            <wui-list-wallet
              imageSrc=${gt(kr.getConnectorImage(r))}
              .installed=${!0}
              name=${r.name??"Unknown"}
              data-testid=${`wallet-selector-external-${r.id}`}
              @click=${()=>this.onConnector(r)}
            >
            </wui-list-wallet>
          `)}
      </wui-flex>
    `:(this.style.cssText="display: none",null)}onConnector(e){ke.push("ConnectingExternal",{connector:e})}};ere([pe()],oO.prototype,"connectors",void 0);oO=ere([Ce("w3m-connect-external-widget")],oO);var p$e=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Nq=class extends Te{render(){const e=er.getRecentWallets();return e!=null&&e.length?K`
      <wui-flex flexDirection="column" gap="xs">
        ${e.map(n=>K`
            <wui-list-wallet
              imageSrc=${gt(kr.getWalletImage(n))}
              name=${n.name??"Unknown"}
              @click=${()=>this.onConnectWallet(n)}
              tagLabel="recent"
              tagVariant="shade"
            >
            </wui-list-wallet>
          `)}
      </wui-flex>
    `:(this.style.cssText="display: none",null)}onConnectWallet(e){ke.push("ConnectingWalletConnect",{wallet:e})}};Nq=p$e([Ce("w3m-connect-recent-widget")],Nq);var tre=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let aO=class extends Te{constructor(){super(),this.unsubscribe=[],this.connectors=Pt.state.connectors,this.unsubscribe.push(Pt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!this.connectors.find(h=>h.type==="WALLET_CONNECT"))return null;const{recommended:n}=Qt.state,{customWallets:r,featuredWalletIds:i}=pt.state,{connectors:s}=Pt.state,o=er.getRecentWallets(),c=s.filter(h=>h.type==="INJECTED"||h.type==="ANNOUNCED").filter(h=>h.name!=="Browser Wallet");if(i||r||!n.length)return this.style.cssText="display: none",null;const l=c.length+o.length,u=Math.max(0,2-l),d=XC.filterOutDuplicateWallets(n).slice(0,u);return d.length?K`
      <wui-flex flexDirection="column" gap="xs">
        ${d.map(h=>K`
            <wui-list-wallet
              imageSrc=${gt(kr.getWalletImage(h))}
              name=${(h==null?void 0:h.name)??"Unknown"}
              @click=${()=>this.onConnectWallet(h)}
            >
            </wui-list-wallet>
          `)}
      </wui-flex>
    `:(this.style.cssText="display: none",null)}onConnectWallet(e){const n=Pt.getConnector(e.id,e.rdns);n?ke.push("ConnectingExternal",{connector:n}):ke.push("ConnectingWalletConnect",{wallet:e})}};tre([pe()],aO.prototype,"connectors",void 0);aO=tre([Ce("w3m-connect-recommended-widget")],aO);var nre=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let cO=class extends Te{constructor(){super(),this.unsubscribe=[],this.connectors=Pt.state.connectors,this.unsubscribe.push(Pt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(st.isMobile())return this.style.cssText="display: none",null;const e=this.connectors.find(n=>n.type==="WALLET_CONNECT");return e?K`
      <wui-list-wallet
        imageSrc=${gt(kr.getConnectorImage(e))}
        name=${e.name??"Unknown"}
        @click=${()=>this.onConnector(e)}
        tagLabel="qr code"
        tagVariant="main"
        data-testid="wallet-selector-walletconnect"
      >
      </wui-list-wallet>
    `:(this.style.cssText="display: none",null)}onConnector(e){e.type==="WALLET_CONNECT"?st.isMobile()?ke.push("AllWallets"):ke.push("ConnectingWalletConnect"):ke.push("ConnectingExternal",{connector:e})}};nre([pe()],cO.prototype,"connectors",void 0);cO=nre([Ce("w3m-connect-walletconnect-widget")],cO);const m$e=De`
  :host {
    margin-top: var(--wui-spacing-3xs);
  }
  wui-separator {
    margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-xs)
      calc(var(--wui-spacing-m) * -1);
    width: calc(100% + var(--wui-spacing-s) * 2);
  }
`;var rre=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let e8=class extends Te{constructor(){super(),this.unsubscribe=[],this.connectors=Pt.state.connectors,this.unsubscribe.push(Pt.subscribeKey("connectors",e=>this.connectors=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const{custom:e,recent:n,announced:r,coinbase:i,injected:s,recommended:o,featured:a,external:c}=this.getConnectorsByType();return K`
      <wui-flex flexDirection="column" gap="xs">
        <w3m-connect-walletconnect-widget></w3m-connect-walletconnect-widget>
        ${n.length?K`<w3m-connect-recent-widget></w3m-connect-recent-widget>`:null}
        ${r.length?K`<w3m-connect-announced-widget></w3m-connect-announced-widget>`:null}
        ${s.length?K`<w3m-connect-injected-widget></w3m-connect-injected-widget>`:null}
        ${a.length?K`<w3m-connect-featured-widget></w3m-connect-featured-widget>`:null}
        ${e!=null&&e.length?K`<w3m-connect-custom-widget></w3m-connect-custom-widget>`:null}
        ${i?K`<w3m-connect-coinbase-widget></w3m-connect-coinbase-widget>`:null}
        ${c.length?K`<w3m-connect-external-widget></w3m-connect-external-widget>`:null}
        ${o.length?K`<w3m-connect-recommended-widget></w3m-connect-recommended-widget>`:null}
      </wui-flex>
    `}getConnectorsByType(){const{featured:e,recommended:n}=Qt.state,{customWallets:r}=pt.state,i=er.getRecentWallets(),s=XC.filterOutDuplicateWallets(n),o=XC.filterOutDuplicateWallets(e),a=this.connectors.filter(g=>g.type==="ANNOUNCED"),c=this.connectors.filter(g=>g.type==="INJECTED"),l=this.connectors.filter(g=>g.type==="EXTERNAL"),u=this.connectors.find(g=>g.id===cn.COINBASE_SDK_CONNECTOR_ID),h=Qe.state.activeChain===Bi.CHAIN.EVM?pt.state.enableEIP6963:!0;return{custom:r,recent:i,coinbase:u,external:l,announced:h?a:[],injected:h?c:[],recommended:s,featured:o}}};e8.styles=m$e;rre([pe()],e8.prototype,"connectors",void 0);e8=rre([Ce("w3m-connector-list")],e8);var R$=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let t8=class extends Te{constructor(){super(),this.unsubscribe=[],this.connectors=Pt.state.connectors,this.count=Qt.state.count,this.unsubscribe.push(Pt.subscribeKey("connectors",e=>this.connectors=e),Qt.subscribeKey("count",e=>this.count=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){const e=this.connectors.find(a=>a.type==="WALLET_CONNECT"),{allWallets:n}=pt.state;if(!e||n==="HIDE"||n==="ONLY_MOBILE"&&!st.isMobile())return null;const r=Qt.state.featured.length,i=this.count+r,s=i<10?i:Math.floor(i/10)*10,o=s<i?`${s}+`:`${s}`;return K`
      <wui-list-wallet
        name="All Wallets"
        walletIcon="allWallets"
        showAllWallets
        @click=${this.onAllWallets.bind(this)}
        tagLabel=${o}
        tagVariant="shade"
        data-testid="all-wallets"
      ></wui-list-wallet>
    `}onAllWallets(){wt.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),ke.push("AllWallets")}};R$([pe()],t8.prototype,"connectors",void 0);R$([pe()],t8.prototype,"count",void 0);t8=R$([Ce("w3m-all-wallets-widget")],t8);var g$e=function(t,e,n,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};let Pq=class extends Te{constructor(){super(...arguments),this.socialProvider=er.getConnectedSocialProvider(),this.socialUsername=er.getConnectedSocialUsername()}render(){const e=er.getConnectedConnector(),n=Pt.getAuthConnector();if(!n||e!=="AUTH")return this.style.cssText="display: none",null;const r=n.provider.getEmail()??"";return K`
      <wui-list-item
        variant="icon"
        iconVariant="overlay"
        icon=${this.socialProvider??"mail"}
        iconSize=${this.socialProvider?"xxl":"sm"}
        data-testid="w3m-account-email-update"
        ?chevron=${!this.socialProvider}
        @click=${()=>{this.onGoToUpdateEmail(r,this.socialProvider)}}
      >
        <wui-text variant="paragraph-500" color="fg-100">${this.getAuthName(r)}</wui-text>
      </wui-list-item>
    `}onGoToUpdateEmail(e,n){n||ke.push("UpdateEmailWallet",{email:e})}getAuthName(e){return this.socialUsername?this.socialProvider==="discord"&&this.socialUsername.endsWith("0")?this.socialUsername.slice(0,-1):this.socialUsername:e.length>30?`${e.slice(0,-3)}...`:e}};Pq=g$e([Ce("w3m-account-auth-button")],Pq);let Oq=!1;class w$e{constructor(e){this.initPromise=void 0,this.setIsConnected=(n,r)=>{Ne.setIsConnected(n,r)},this.getIsConnectedState=()=>Ne.state.isConnected,this.setAllAccounts=(n=[])=>{Ne.setAllAccounts(n),pt.setHasMultipleAddresses((n==null?void 0:n.length)>1)},this.addAddressLabel=(n,r)=>{Ne.addAddressLabel(n,r)},this.removeAddressLabel=n=>{Ne.removeAddressLabel(n)},this.getCaipAddress=()=>Ne.state.caipAddress,this.setCaipAddress=(n,r)=>{Ne.setCaipAddress(n,r)},this.setBalance=(n,r,i)=>{Ne.setBalance(n,r,i)},this.setProfileName=(n,r)=>{Ne.setProfileName(n,r)},this.setProfileImage=(n,r)=>{Ne.setProfileImage(n,r)},this.resetAccount=n=>{Ne.resetAccount(n)},this.setCaipNetwork=n=>{rt.setCaipNetwork(n)},this.getCaipNetwork=()=>rt.state.caipNetwork,this.setRequestedCaipNetworks=(n,r)=>{rt.setRequestedCaipNetworks(n,r)},this.getApprovedCaipNetworkIds=()=>rt.getApprovedCaipNetworkIds(),this.setApprovedCaipNetworksData=()=>rt.setApprovedCaipNetworksData(),this.resetNetwork=()=>{rt.resetNetwork()},this.setConnectors=n=>{Pt.setConnectors(n)},this.addConnector=n=>{Pt.addConnector(n)},this.getConnectors=()=>Pt.getConnectors(),this.resetWcConnection=()=>{tn.resetWcConnection()},this.fetchIdentity=n=>wi.fetchIdentity(n),this.setAddressExplorerUrl=(n,r)=>{Ne.setAddressExplorerUrl(n,r)},this.setSmartAccountDeployed=(n,r)=>{Ne.setSmartAccountDeployed(n,r)},this.setConnectedWalletInfo=(n,r)=>{Ne.setConnectedWalletInfo(n,r)},this.setSmartAccountEnabledNetworks=(n,r)=>{rt.setSmartAccountEnabledNetworks(n,r)},this.setPreferredAccountType=(n,r)=>{Ne.setPreferredAccountType(n,r)},this.getWalletConnectName=n=>Wu.getNamesForAddress(n),this.resolveWalletConnectName=async n=>{var o;const r=n.replace(Bi.WC_NAME_SUFFIX,""),i=await Wu.resolveName(r);return((o=(Object.values(i==null?void 0:i.addresses)||[])[0])==null?void 0:o.address)||!1},this.setEIP6963Enabled=n=>{pt.setEIP6963Enabled(n)},this.setClientId=n=>{wi.setClientId(n)},this.initControllers(e),this.initOrContinue()}async open(e){await this.initOrContinue(),dn.open(e)}async close(){await this.initOrContinue(),dn.close()}setLoading(e){dn.setLoading(e)}getThemeMode(){return Oi.state.themeMode}getThemeVariables(){return Oi.state.themeVariables}setThemeMode(e){Oi.setThemeMode(e),ene(Oi.state.themeMode)}setThemeVariables(e){Oi.setThemeVariables(e),GRe(Oi.state.themeVariables)}subscribeTheme(e){return Oi.subscribe(e)}getWalletInfo(){return Ne.state.connectedWalletInfo}subscribeWalletInfo(e){return Ne.subscribeKey("connectedWalletInfo",e)}subscribeShouldUpdateToAddress(e){Ne.subscribeKey("shouldUpdateToAddress",e)}subscribeCaipNetworkChange(e){rt.subscribeKey("caipNetwork",e)}getState(){return Xf.state}subscribeState(e){return Xf.subscribe(e)}showErrorMessage(e){Ht.showError(e)}showSuccessMessage(e){Ht.showSuccess(e)}getEvent(){return{...wt.state}}subscribeEvents(e){return wt.subscribe(e)}replace(e){ke.replace(e)}redirect(e){ke.push(e)}popTransactionStack(e){ke.popTransactionStack(e)}isOpen(){return dn.state.open}isTransactionStackEmpty(){return ke.state.transactionStack.length===0}isTransactionShouldReplaceView(){var e;return(e=ke.state.transactionStack[ke.state.transactionStack.length-1])==null?void 0:e.replace}async initControllers(e){if(Qe.initialize([{networkControllerClient:e.networkControllerClient,connectionControllerClient:e.connectionControllerClient,chain:e.chain}]),rt.setDefaultCaipNetwork(e.defaultChain,e.chain),pt.setProjectId(e.projectId),pt.setAllWallets(e.allWallets),pt.setIncludeWalletIds(e.includeWalletIds),pt.setExcludeWalletIds(e.excludeWalletIds),pt.setFeaturedWalletIds(e.featuredWalletIds),pt.setTokens(e.tokens),pt.setTermsConditionsUrl(e.termsConditionsUrl),pt.setPrivacyPolicyUrl(e.privacyPolicyUrl),pt.setEnableAnalytics(e.enableAnalytics),pt.setCustomWallets(e.customWallets),pt.setIsUniversalProvider(e.isUniversalProvider),pt.setSdkVersion(e._sdkVersion),pt.setOnrampEnabled(e.enableOnramp!==!1),pt.setEnableSwaps(e.chain===Bi.CHAIN.EVM&&e.enableSwaps!==!1),e.metadata&&pt.setMetadata(e.metadata),e.themeMode&&Oi.setThemeMode(e.themeMode),e.themeVariables&&Oi.setThemeVariables(e.themeVariables),e.disableAppend&&pt.setDisableAppend(!!e.disableAppend),e.allowUnsupportedChain&&rt.setAllowUnsupportedChain(e.allowUnsupportedChain),e.siweControllerClient){const{SIWEController:n}=await Sa(async()=>{const{SIWEController:r}=await import("./index-Dgmma2CZ.js");return{SIWEController:r}},[]);n.setSIWEClient(e.siweControllerClient)}}async initOrContinue(){return!this.initPromise&&!Oq&&st.isClient()&&(Oq=!0,this.initPromise=new Promise(async e=>{await Promise.all([Sa(()=>import("./index-kgTnxVbG.js"),[]),Sa(()=>import("./w3m-modal-C9mYk8C7.js"),[])]);const n=document.createElement("w3m-modal");pt.state.disableAppend||document.body.insertAdjacentElement("beforeend",n),e()})),this.initPromise}}function y$e(t){if(t)return{id:`${cn.EIP155}:${t.id}`,name:t.name,imageId:Bf.EIP155NetworkImageIds[t.id]}}async function v$e(t){var s,o,a,c;if(!t)throw new Error("networkControllerClient:getApprovedCaipNetworks - connector is undefined");const e=await(t==null?void 0:t.getProvider()),n=(o=(s=e==null?void 0:e.signer)==null?void 0:s.session)==null?void 0:o.namespaces,r=(a=n==null?void 0:n[cn.EIP155])==null?void 0:a.methods,i=qye(((c=n==null?void 0:n[cn.EIP155])==null?void 0:c.accounts)||[]);return{supportsAllNetworks:!!(r!=null&&r.includes(cn.ADD_CHAIN_METHOD)),approvedCaipNetworkIds:i}}function b$e(){return{supportsAllNetworks:!1,approvedCaipNetworkIds:Bf.WalletConnectRpcChainIds.map(t=>`${cn.EIP155}:${t}`)}}function x$e({chain:t,projectId:e}){var i,s;const n=st.getBlockchainApiUrl(),r=(s=(i=t.rpcUrls[0])==null?void 0:i.http)==null?void 0:s[0];return Bf.WalletConnectRpcChainIds.includes(t.id)?bTe([XA(`${n}/v1/?chainId=${cn.EIP155}:${t.id}&projectId=${e}`,{fetchOptions:{headers:{"Content-Type":"text/plain"}}}),XA(r)]):XA(r)}var _$e="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 Dq=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),Mq=4;function A$e(t){let e=0;function n(){return t[e++]<<8|t[e++]}let r=n(),i=1,s=[0,1];for(let O=1;O<r;O++)s.push(i+=n());let o=n(),a=e;e+=o;let c=0,l=0;function u(){return c==0&&(l=l<<8|t[e++],c=8),l>>--c&1}const d=31,h=2**d,g=h>>>1,w=g>>1,v=h-1;let _=0;for(let O=0;O<d;O++)_=_<<1|u();let T=[],b=0,k=h;for(;;){let O=Math.floor(((_-b+1)*i-1)/k),$=0,C=r;for(;C-$>1;){let V=$+C>>>1;O<s[V]?C=V:$=V}if($==0)break;T.push($);let A=b+Math.floor(k*s[$]/i),H=b+Math.floor(k*s[$+1]/i)-1;for(;!((A^H)&g);)_=_<<1&v|u(),A=A<<1&v,H=H<<1&v|1;for(;A&~H&w;)_=_&g|_<<1&v>>>1|u(),A=A<<1^g,H=(H^g)<<1|g|1;b=A,k=1+H-A}let D=r-4;return T.map(O=>{switch(O-D){case 3:return D+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return D+256+(t[a++]<<8|t[a++]);case 1:return D+t[a++];default:return O-1}})}function E$e(t){let e=0;return()=>t[e++]}function ire(t){return E$e(A$e(C$e(t)))}function C$e(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,s)=>e[i.charCodeAt(0)]=s);let n=t.length,r=new Uint8Array(6*n>>3);for(let i=0,s=0,o=0,a=0;i<n;i++)a=a<<6|e[t.charCodeAt(i)],o+=6,o>=8&&(r[s++]=a>>(o-=8));return r}function S$e(t){return t&1?~t>>1:t>>1}function T$e(t,e){let n=Array(t);for(let r=0,i=0;r<t;r++)n[r]=i+=S$e(e());return n}function Ax(t,e=0){let n=[];for(;;){let r=t(),i=t();if(!i)break;e+=r;for(let s=0;s<i;s++)n.push(e+s);e+=i+1}return n}function sre(t){return Ex(()=>{let e=Ax(t);if(e.length)return e})}function ore(t){let e=[];for(;;){let n=t();if(n==0)break;e.push(I$e(n,t))}for(;;){let n=t()-1;if(n<0)break;e.push(k$e(n,t))}return e.flat()}function Ex(t){let e=[];for(;;){let n=t(e.length);if(!n)break;e.push(n)}return e}function are(t,e,n){let r=Array(t).fill().map(()=>[]);for(let i=0;i<e;i++)T$e(t,n).forEach((s,o)=>r[o].push(s));return r}function I$e(t,e){let n=1+e(),r=e(),i=Ex(e);return are(i.length,1+t,e).flatMap((o,a)=>{let[c,...l]=o;return Array(i[a]).fill().map((u,d)=>{let h=d*r;return[c+d*n,l.map(g=>g+h)]})})}function k$e(t,e){let n=1+e();return are(n,1+t,e).map(i=>[i[0],i.slice(1)])}function R$e(t){let e=[],n=Ax(t);return i(r([]),[]),e;function r(s){let o=t(),a=Ex(()=>{let c=Ax(t).map(l=>n[l]);if(c.length)return r(c)});return{S:o,B:a,Q:s}}function i({S:s,B:o},a,c){if(!(s&4&&c===a[a.length-1])){s&2&&(c=a[a.length-1]),s&1&&e.push(a);for(let l of o)for(let u of l.Q)i(l,[...a,u],c)}}}function N$e(t){return t.toString(16).toUpperCase().padStart(2,"0")}function cre(t){return`{${N$e(t)}}`}function P$e(t){let e=[];for(let n=0,r=t.length;n<r;){let i=t.codePointAt(n);n+=i<65536?1:2,e.push(i)}return e}function Vv(t){let n=t.length;if(n<4096)return String.fromCodePoint(...t);let r=[];for(let i=0;i<n;)r.push(String.fromCodePoint(...t.slice(i,i+=4096)));return r.join("")}function O$e(t,e){let n=t.length,r=n-e.length;for(let i=0;r==0&&i<n;i++)r=t[i]-e[i];return r}var D$e="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 Cx=44032,n8=4352,r8=4449,i8=4519,lre=19,ure=21,qv=28,s8=ure*qv,M$e=lre*s8,B$e=Cx+M$e,$$e=n8+lre,j$e=r8+ure,L$e=i8+qv;function l3(t){return t>>24&255}function dre(t){return t&16777215}let lO,Bq,uO,sE;function U$e(){let t=ire(D$e);lO=new Map(sre(t).flatMap((e,n)=>e.map(r=>[r,n+1<<24]))),Bq=new Set(Ax(t)),uO=new Map,sE=new Map;for(let[e,n]of ore(t)){if(!Bq.has(e)&&n.length==2){let[r,i]=n,s=sE.get(r);s||(s=new Map,sE.set(r,s)),s.set(i,e)}uO.set(e,n.reverse())}}function fre(t){return t>=Cx&&t<B$e}function F$e(t,e){if(t>=n8&&t<$$e&&e>=r8&&e<j$e)return Cx+(t-n8)*s8+(e-r8)*qv;if(fre(t)&&e>i8&&e<L$e&&(t-Cx)%qv==0)return t+(e-i8);{let n=sE.get(t);return n&&(n=n.get(e),n)?n:-1}}function hre(t){lO||U$e();let e=[],n=[],r=!1;function i(s){let o=lO.get(s);o&&(r=!0,s|=o),e.push(s)}for(let s of t)for(;;){if(s<128)e.push(s);else if(fre(s)){let o=s-Cx,a=o/s8|0,c=o%s8/qv|0,l=o%qv;i(n8+a),i(r8+c),l>0&&i(i8+l)}else{let o=uO.get(s);o?n.push(...o):i(s)}if(!n.length)break;s=n.pop()}if(r&&e.length>1){let s=l3(e[0]);for(let o=1;o<e.length;o++){let a=l3(e[o]);if(a==0||s<=a){s=a;continue}let c=o-1;for(;;){let l=e[c+1];if(e[c+1]=e[c],e[c]=l,!c||(s=l3(e[--c]),s<=a))break}s=l3(e[o])}}return e}function z$e(t){let e=[],n=[],r=-1,i=0;for(let s of t){let o=l3(s),a=dre(s);if(r==-1)o==0?r=a:e.push(a);else if(i>0&&i>=o)o==0?(e.push(r,...n),n.length=0,r=a):n.push(a),i=o;else{let c=F$e(r,a);c>=0?r=c:i==0&&o==0?(e.push(r),r=a):(n.push(a),i=o)}}return r>=0&&e.push(r,...n),e}function pre(t){return hre(t).map(dre)}function H$e(t){return z$e(hre(t))}const $q=45,mre=".",gre=65039,wre=1,fy=t=>Array.from(t);function Sx(t,e){return t.P.has(e)||t.Q.has(e)}let W$e=class extends Array{get is_emoji(){return!0}},dO,yre,Qm,fO,vre,Py,Lk,Hw,bre,jq,hO;function N$(){if(dO)return;let t=ire(_$e);const e=()=>Ax(t),n=()=>new Set(e());dO=new Map(ore(t)),yre=n(),Qm=e(),fO=new Set(e().map(u=>Qm[u])),Qm=new Set(Qm),vre=n(),n();let r=sre(t),i=t();const s=()=>new Set(e().flatMap(u=>r[u]).concat(e()));Py=Ex(u=>{let d=Ex(t).map(h=>h+96);if(d.length){let h=u>=i;d[0]-=32,d=Vv(d),h&&(d=`Restricted[${d}]`);let g=s(),w=s(),v=!t();return{N:d,P:g,Q:w,M:v,R:h}}}),Lk=n(),Hw=new Map;let o=e().concat(fy(Lk)).sort((u,d)=>u-d);o.forEach((u,d)=>{let h=t(),g=o[d]=h?o[d-h]:{V:[],M:new Map};g.V.push(u),Lk.has(u)||Hw.set(u,g)});for(let{V:u,M:d}of new Set(Hw.values())){let h=[];for(let w of u){let v=Py.filter(T=>Sx(T,w)),_=h.find(({G:T})=>v.some(b=>T.has(b)));_||(_={G:new Set,V:[]},h.push(_)),_.V.push(w),v.forEach(T=>_.G.add(T))}let g=h.flatMap(w=>fy(w.G));for(let{G:w,V:v}of h){let _=new Set(g.filter(T=>!w.has(T)));for(let T of v)d.set(T,_)}}let a=new Set,c=new Set;const l=u=>a.has(u)?c.add(u):a.add(u);for(let u of Py){for(let d of u.P)l(d);for(let d of u.Q)l(d)}for(let u of a)!Hw.has(u)&&!c.has(u)&&Hw.set(u,wre);bre=new Set(fy(a).concat(fy(pre(a)))),jq=R$e(t).map(u=>W$e.from(u)).sort(O$e),hO=new Map;for(let u of jq){let d=[hO];for(let h of u){let g=d.map(w=>{let v=w.get(h);return v||(v=new Map,w.set(h,v)),v});h===gre?d.push(...g):d=g}for(let h of d)h.V=u}}function P$(t){return(xre(t)?"":`${O$(R9([t]))} `)+cre(t)}function O$(t){return`"${t}"‎`}function V$e(t){if(t.length>=4&&t[2]==$q&&t[3]==$q)throw new Error(`invalid label extension: "${Vv(t.slice(0,4))}"`)}function q$e(t){for(let n=t.lastIndexOf(95);n>0;)if(t[--n]!==95)throw new Error("underscore allowed only at start")}function G$e(t){let e=t[0],n=Dq.get(e);if(n)throw L3(`leading ${n}`);let r=t.length,i=-1;for(let s=1;s<r;s++){e=t[s];let o=Dq.get(e);if(o){if(i==s)throw L3(`${n} + ${o}`);i=s+1,n=o}}if(i==r)throw L3(`trailing ${n}`)}function R9(t,e=cre){let n=[];K$e(t[0])&&n.push("◌");let r=0,i=t.length;for(let s=0;s<i;s++){let o=t[s];xre(o)&&(n.push(Vv(t.slice(r,s))),n.push(e(o)),r=s+1)}return n.push(Vv(t.slice(r,i))),n.join("")}function K$e(t){return N$(),Qm.has(t)}function xre(t){return N$(),vre.has(t)}function Y$e(t){return X$e(Q$e(t,H$e,nje))}function Q$e(t,e,n){if(!t)return[];N$();let r=0;return t.split(mre).map(i=>{let s=P$e(i),o={input:s,offset:r};r+=s.length+1;try{let a=o.tokens=tje(s,e,n),c=a.length,l;if(!c)throw new Error("empty label");let u=o.output=a.flat();if(q$e(u),!(o.emoji=c>1||a[0].is_emoji)&&u.every(h=>h<128))V$e(u),l="ASCII";else{let h=a.flatMap(g=>g.is_emoji?[]:g);if(!h.length)l="Emoji";else{if(Qm.has(u[0]))throw L3("leading combining mark");for(let v=1;v<c;v++){let _=a[v];if(!_.is_emoji&&Qm.has(_[0]))throw L3(`emoji + combining mark: "${Vv(a[v-1])} + ${R9([_[0]])}"`)}G$e(u);let g=fy(new Set(h)),[w]=J$e(g);eje(w,h),Z$e(w,g),l=w.N}}o.type=l}catch(a){o.error=a}return o})}function Z$e(t,e){let n,r=[];for(let i of e){let s=Hw.get(i);if(s===wre)return;if(s){let o=s.M.get(i);if(n=n?n.filter(a=>o.has(a)):fy(o),!n.length)return}else r.push(i)}if(n){for(let i of n)if(r.every(s=>Sx(i,s)))throw new Error(`whole-script confusable: ${t.N}/${i.N}`)}}function J$e(t){let e=Py;for(let n of t){let r=e.filter(i=>Sx(i,n));if(!r.length)throw Py.some(i=>Sx(i,n))?Are(e[0],n):_re(n);if(e=r,r.length==1)break}return e}function X$e(t){return t.map(({input:e,error:n,output:r})=>{if(n){let i=n.message;throw new Error(t.length==1?i:`Invalid label ${O$(R9(e))}: ${i}`)}return Vv(r)}).join(mre)}function _re(t){return new Error(`disallowed character: ${P$(t)}`)}function Are(t,e){let n=P$(e),r=Py.find(i=>i.P.has(e));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${t.N} + ${n}`)}function L3(t){return new Error(`illegal placement: ${t}`)}function eje(t,e){for(let n of e)if(!Sx(t,n))throw Are(t,n);if(t.M){let n=pre(e);for(let r=1,i=n.length;r<i;r++)if(fO.has(n[r])){let s=r+1;for(let o;s<i&&fO.has(o=n[s]);s++)for(let a=r;a<s;a++)if(n[a]==o)throw new Error(`duplicate non-spacing marks: ${P$(o)}`);if(s-r>Mq)throw new Error(`excessive non-spacing marks: ${O$(R9(n.slice(r-1,s)))} (${s-r}/${Mq})`);r=s}}}function tje(t,e,n){let r=[],i=[];for(t=t.slice().reverse();t.length;){let s=rje(t);if(s)i.length&&(r.push(e(i)),i=[]),r.push(n(s));else{let o=t.pop();if(bre.has(o))i.push(o);else{let a=dO.get(o);if(a)i.push(...a);else if(!yre.has(o))throw _re(o)}}}return i.length&&r.push(e(i)),r}function nje(t){return t.filter(e=>e!=gre)}function rje(t,e){let n=hO,r,i=t.length;for(;i&&(n=n.get(t[--i]),!!n);){let{V:s}=n;s&&(r=s,t.length=i)}return r}function Lq(t){return Y$e(t)}class ije extends w$e{constructor(e){const{wagmiConfig:n,siweConfig:r,defaultChain:i,tokens:s,_sdkVersion:o,...a}=e;if(!n)throw new Error("web3modal:constructor - wagmiConfig is undefined");if(!a.projectId)throw new Error("web3modal:constructor - projectId is undefined");const c={switchCaipNetwork:async u=>{const d=zl.caipNetworkIdToNumber(u==null?void 0:u.id);d&&await GTe(this.wagmiConfig,{chainId:d})},getApprovedCaipNetworksData:async()=>new Promise(u=>{var g,w;const h=new Map(n.state.connections).get(n.state.current||"");if(((g=h==null?void 0:h.connector)==null?void 0:g.id)===cn.AUTH_CONNECTOR_ID)u(b$e());else if(((w=h==null?void 0:h.connector)==null?void 0:w.id)===cn.WALLET_CONNECT_CONNECTOR_ID){const v=n.connectors.find(_=>_.id===cn.WALLET_CONNECT_CONNECTOR_ID);u(v$e(v))}u({approvedCaipNetworkIds:void 0,supportsAllNetworks:!0})})},l={connectWalletConnect:async u=>{var _,T,b,k,D,O,$,C;const d=n.connectors.find(A=>A.id===cn.WALLET_CONNECT_CONNECTOR_ID);if(!d)throw new Error("connectionControllerClient:getWalletConnectUri - connector is undefined");const h=await d.getProvider();h.on("display_uri",A=>{u(A)});const g=await((k=(b=(T=(_=h.signer)==null?void 0:_.client)==null?void 0:T.core)==null?void 0:b.crypto)==null?void 0:k.getClientId());g&&this.setClientId(g);const w=zl.caipNetworkIdToNumber((D=this.getCaipNetwork())==null?void 0:D.id),v=await((O=r==null?void 0:r.getMessageParams)==null?void 0:O.call(r));if(($=r==null?void 0:r.options)!=null&&$.enabled&&typeof(h==null?void 0:h.authenticate)=="function"&&v&&Object.keys(v||{}).length>0){const{SIWEController:A,getDidChainId:H,getDidAddress:V}=await Sa(async()=>{const{SIWEController:E,getDidChainId:y,getDidAddress:I}=await import("./index-Dgmma2CZ.js");return{SIWEController:E,getDidChainId:y,getDidAddress:I}},[]);await d.setRequestedChainsIds(v.chains);let Y=v.chains;w&&(Y=[w,...v.chains.filter(E=>E!==w)]);const ee=await h.authenticate({nonce:await r.getNonce(),methods:[...tB],...v,chains:Y}),x=(C=ee==null?void 0:ee.auths)==null?void 0:C[0];if(x){const{p:E,s:y}=x,I=H(E.iss)||"",B=V(E.iss);B&&I&&A.setSession({address:B,chainId:parseInt(I,10)});try{const M=h.signer.client.formatAuthMessage({request:E,iss:E.iss});await A.verifyMessage({message:M,signature:y.s,cacao:x})}catch(M){throw console.error("Error verifying message",M),await h.disconnect().catch(console.error),await A.signOut().catch(console.error),M}}this.wagmiConfig.state.current=""}await xV(this.wagmiConfig,{connector:d,chainId:w})},connectExternal:async({id:u,provider:d,info:h})=>{var v,_;const g=n.connectors.find(T=>T.id===u);if(!g)throw new Error("connectionControllerClient:connectExternal - connector is undefined");this.setClientId(null),d&&h&&g.id===cn.EIP6963_CONNECTOR_ID&&((v=g.setEip6963Wallet)==null||v.call(g,{provider:d,info:h}));const w=zl.caipNetworkIdToNumber((_=this.getCaipNetwork())==null?void 0:_.id);await xV(this.wagmiConfig,{connector:g,chainId:w})},reconnectExternal:async({id:u})=>{const d=n.connectors.find(h=>h.id===u);if(!d)throw new Error("connectionControllerClient:connectExternal - connector is undefined");await mte(this.wagmiConfig,{connectors:[d]})},checkInstalled:u=>{const d=this.getConnectors().find(h=>h.type==="INJECTED");return u?d&&window!=null&&window.ethereum?u.some(h=>{var g;return!!((g=window.ethereum)!=null&&g[String(h)])}):!1:!!window.ethereum},disconnect:async()=>{var u;if(await RTe(this.wagmiConfig),this.setClientId(null),(u=r==null?void 0:r.options)!=null&&u.signOutOnDisconnect){const{SIWEController:d}=await Sa(async()=>{const{SIWEController:h}=await import("./index-Dgmma2CZ.js");return{SIWEController:h}},[]);await d.signOut()}},signMessage:async u=>HTe(this.wagmiConfig,{message:u}),estimateGas:async u=>{try{return await NTe(this.wagmiConfig,{account:u.address,to:u.to,data:u.data,type:"legacy"})}catch{return 0n}},sendTransaction:async u=>{const{chainId:d}=Db(this.wagmiConfig),h={account:u.address,to:u.to,value:u.value,gas:u.gas,gasPrice:u.gasPrice,data:u.data,chainId:d,type:"legacy"};await FTe(this.wagmiConfig,h);const g=await zTe(this.wagmiConfig,h);return await JTe(this.wagmiConfig,{hash:g,timeout:25e3}),g},writeContract:async u=>{var g;const d=zl.caipNetworkIdToNumber((g=this.getCaipNetwork())==null?void 0:g.id);return await XTe(n,{chainId:d,address:u.tokenAddress,abi:u.abi,functionName:u.method,args:[u.receiverAddress,u.tokenAmount]})},getEnsAddress:async u=>{var d;try{const h=zl.caipNetworkIdToNumber((d=this.getCaipNetwork())==null?void 0:d.id);let g=!1,w=!1;return u!=null&&u.endsWith(Bi.WC_NAME_SUFFIX)&&(w=await this.resolveWalletConnectName(u)),h===mk.id&&(g=await jTe(this.wagmiConfig,{name:Lq(u),chainId:h})),g||w||!1}catch{return!1}},getEnsAvatar:async u=>{var g;const d=zl.caipNetworkIdToNumber((g=this.getCaipNetwork())==null?void 0:g.id);return d!==mk.id?!1:await CV(this.wagmiConfig,{name:Lq(u),chainId:d})||!1},parseUnits:A9e,formatUnits:N6};super({chain:Bi.CHAIN.EVM,networkControllerClient:c,connectionControllerClient:l,siweControllerClient:r,defaultChain:y$e(i),tokens:AMe.getCaipTokens(s),_sdkVersion:o??`html-wagmi-${cn.VERSION}`,...a}),this.hasSyncedConnectedAccount=!1,this.options=void 0,this.chain=Bi.CHAIN.EVM,this.options=e,this.wagmiConfig=n,this.syncRequestedNetworks([...n.chains]),this.syncConnectors([...n.connectors]),this.initAuthConnectorListeners([...n.connectors]),QTe(this.wagmiConfig,{onChange:u=>this.syncConnectors(u)}),gte(this.wagmiConfig,{onChange:u=>this.syncAccount({...u})}),this.setEIP6963Enabled(a.enableEIP6963!==!1),this.subscribeShouldUpdateToAddress(u=>{var d;if(u){const g=(d=$Te(this.wagmiConfig)[0])==null?void 0:d.connector;g&&VTe(this.wagmiConfig,{connector:g}).then(w=>this.syncAccount({address:u,isConnected:!0,addresses:w.accounts,connector:g,chainId:w.chainId}))}})}getState(){const e=super.getState();return{...e,selectedNetworkId:zl.caipNetworkIdToNumber(e.selectedNetworkId)}}subscribeState(e){return super.subscribeState(n=>e({...n,selectedNetworkId:zl.caipNetworkIdToNumber(n.selectedNetworkId)}))}syncRequestedNetworks(e){const n=e==null?void 0:e.map(r=>{var i,s;return{id:`${cn.EIP155}:${r.id}`,name:r.name,imageId:Bf.EIP155NetworkImageIds[r.id],imageUrl:(s=(i=this.options)==null?void 0:i.chainImages)==null?void 0:s[r.id]}});this.setRequestedCaipNetworks(n??[])}async syncAccount({address:e,isConnected:n,isDisconnected:r,chainId:i,connector:s,addresses:o}){const a=`${cn.EIP155}:${i}:${e}`;this.getCaipAddress()!==a&&(n&&e&&i?(this.resetAccount(),this.syncNetwork(e,i,n),this.setIsConnected(n),this.setCaipAddress(a),await Promise.all([this.syncProfile(e,i),this.syncBalance(e,i),this.setApprovedCaipNetworksData()]),s&&this.syncConnectedWalletInfo(s),!((s==null?void 0:s.id)===cn.AUTH_CONNECTOR_ID)&&(o!=null&&o.length)&&this.setAllAccounts(o.map(l=>({address:l,type:"eoa"}))),this.hasSyncedConnectedAccount=!0):r&&this.hasSyncedConnectedAccount&&(this.resetAccount(),this.resetWcConnection(),this.resetNetwork(),this.setAllAccounts([]),this.hasSyncedConnectedAccount=!1))}async syncNetwork(e,n,r){var s,o,a,c;const i=this.wagmiConfig.chains.find(l=>l.id===n);if(i||n){const l=(i==null?void 0:i.name)??(n==null?void 0:n.toString()),u=Number((i==null?void 0:i.id)??n),d=`${cn.EIP155}:${u}`;if(this.setCaipNetwork({id:d,name:l,imageId:Bf.EIP155NetworkImageIds[u],imageUrl:(o=(s=this.options)==null?void 0:s.chainImages)==null?void 0:o[u],chain:this.chain}),r&&e&&n){const h=`${cn.EIP155}:${u}:${e}`;if(this.setCaipAddress(h),(c=(a=i==null?void 0:i.blockExplorers)==null?void 0:a.default)!=null&&c.url){const g=`${i.blockExplorers.default.url}/address/${e}`;this.setAddressExplorerUrl(g)}else this.setAddressExplorerUrl(void 0);this.hasSyncedConnectedAccount&&await this.syncBalance(e,n)}}}async syncWalletConnectName(e){try{const n=await this.getWalletConnectName(e);if(n[0]){const r=n[0];this.setProfileName(r.name)}else this.setProfileName(null)}catch{this.setProfileName(null)}}async syncProfile(e,n){try{const{name:r,avatar:i}=await this.fetchIdentity({address:e});this.setProfileName(r),this.setProfileImage(i),r||await this.syncWalletConnectName(e)}catch{if(n===mk.id){const r=await LTe(this.wagmiConfig,{address:e,chainId:n});if(r){this.setProfileName(r);const i=await CV(this.wagmiConfig,{name:r,chainId:n});i&&this.setProfileImage(i)}else await this.syncWalletConnectName(e),this.setProfileImage(null)}else await this.syncWalletConnectName(e),this.setProfileImage(null)}}async syncBalance(e,n){var i,s,o;const r=this.wagmiConfig.chains.find(a=>a.id===n);if(r){const a=await pte(this.wagmiConfig,{address:e,chainId:r.id,token:(o=(s=(i=this.options)==null?void 0:i.tokens)==null?void 0:s[r.id])==null?void 0:o.address});this.setBalance(a.formatted,a.symbol);return}this.setBalance(void 0,void 0)}async syncConnectedWalletInfo(e){var n;if(!e)throw Error("syncConnectedWalletInfo - connector is undefined");if(e.id===cn.WALLET_CONNECT_CONNECTOR_ID&&e.getProvider){const r=await e.getProvider();r.session&&this.setConnectedWalletInfo({...r.session.peer.metadata,name:r.session.peer.metadata.name,icon:(n=r.session.peer.metadata.icons)==null?void 0:n[0]},this.chain)}else this.setConnectedWalletInfo({name:e.name,icon:e.icon},this.chain)}syncConnectors(e){const n=new Set,r=e.filter(a=>!n.has(a.id)&&n.add(a.id)),i=[],s=cn.COINBASE_SDK_CONNECTOR_ID,o=r.find(a=>a.id===s);r.forEach(({id:a,name:c,type:l,icon:u})=>{var g,w;o&&a===cn.CONNECTOR_RDNS_MAP[cn.COINBASE_CONNECTOR_ID]||cn.AUTH_CONNECTOR_ID===a||i.push({id:a,explorerId:Bf.ConnectorExplorerIds[a],imageUrl:((w=(g=this.options)==null?void 0:g.connectorImages)==null?void 0:w[a])??u,name:Bf.ConnectorNamesMap[a]??c,imageId:Bf.ConnectorImageIds[a],type:Bf.ConnectorTypesMap[l]??"EXTERNAL",info:{rdns:a},chain:this.chain})}),this.setConnectors(i),this.syncAuthConnector(r)}async syncAuthConnector(e){const n=e.find(({id:r})=>r===cn.AUTH_CONNECTOR_ID);if(n){const r=await n.getProvider();this.addConnector({id:cn.AUTH_CONNECTOR_ID,type:"AUTH",name:"Auth",provider:r,email:n.email,socials:n.socials,showWallets:n.showWallets,chain:this.chain,walletFeatures:n.walletFeatures})}}async initAuthConnectorListeners(e){const n=e.find(({id:r})=>r===cn.AUTH_CONNECTOR_ID);n&&(await this.listenAuthConnector(n),await this.listenModal(n))}async listenAuthConnector(e){if(typeof window<"u"&&e){super.setLoading(!0);const n=await e.getProvider(),r=n.getLoginEmailUsed();super.setLoading(r),r&&this.setIsConnected(!1),n.onRpcRequest(i=>{if(fo.checkIfRequestExists(i)){if(!fo.checkIfRequestIsAllowed(i))if(super.isOpen()){if(super.isTransactionStackEmpty())return;super.isTransactionShouldReplaceView()?super.replace("ApproveTransaction"):super.redirect("ApproveTransaction")}else super.open({view:"ApproveTransaction"})}else super.open(),console.error(Fn.RPC_METHOD_NOT_ALLOWED_MESSAGE,{method:i.method}),setTimeout(()=>{this.showErrorMessage(Fn.RPC_METHOD_NOT_ALLOWED_UI_MESSAGE)},300),n.rejectRpcRequest()}),n.onRpcResponse(i=>{switch(fo.getResponseType(i)){case Ye.RPC_RESPONSE_TYPE_ERROR:{super.isOpen()&&(super.isTransactionStackEmpty()?super.close():super.popTransactionStack(!0));break}case Ye.RPC_RESPONSE_TYPE_TX:{super.isTransactionStackEmpty()?super.close():super.popTransactionStack();break}}}),n.onNotConnected(()=>{this.getIsConnectedState()||(this.setIsConnected(!1),super.setLoading(!1))}),n.onIsConnected(i=>{this.setIsConnected(!0),this.setSmartAccountDeployed(!!i.smartAccountDeployed,this.chain),this.setPreferredAccountType(i.preferredAccountType,this.chain),super.setLoading(!1),this.setAllAccounts(i.accounts||[{address:i.address,type:i.preferredAccountType||"eoa"}])}),n.onGetSmartAccountEnabledNetworks(i=>{this.setSmartAccountEnabledNetworks(i)}),n.onSetPreferredAccount(({address:i,type:s})=>{var o;i&&(this.setPreferredAccountType(s,this.chain),this.syncAccount({address:i,isConnected:!0,chainId:zl.caipNetworkIdToNumber((o=this.getCaipNetwork())==null?void 0:o.id),connector:e}))})}}async listenModal(e){const n=await e.getProvider();this.subscribeState(r=>{r.open||n.rejectRpcRequest()})}}let gA;function sje(t){return gA||(gA=new ije({...t,_sdkVersion:`react-wagmi-${cn.VERSION}`}),Uge(gA)),gA}function oje(t){const{children:e,config:n,initialState:r,reconnectOnMount:i=!0}=t,{onMount:s}=_7e(n,{initialState:r,reconnectOnMount:i});n._internal.ssr||s();const o=ce.useRef(!0);return ce.useEffect(()=>{if(o.current&&n._internal.ssr)return s(),()=>{o.current=!1}},[]),e}const Ere=ce.createContext(void 0);function aje(t){const{children:e,config:n}=t,r={value:n};return ce.createElement(oje,t,ce.createElement(Ere.Provider,r,e))}const cje="2.12.5",lje=()=>`wagmi@${cje}`;let uje=class extends z0{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiError"})}get docsBaseUrl(){return"https://wagmi.sh/react"}get version(){return lje()}};class dje extends uje{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}function tm(t={}){const e=t.config??ce.useContext(Ere);if(!e)throw new dje;return e}var Cre={exports:{}},Sre={};/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var N9=ce,fje=eIe;function hje(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var pje=typeof Object.is=="function"?Object.is:hje,mje=fje.useSyncExternalStore,gje=N9.useRef,wje=N9.useEffect,yje=N9.useMemo,vje=N9.useDebugValue;Sre.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var s=gje(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=yje(function(){function c(g){if(!l){if(l=!0,u=g,g=r(g),i!==void 0&&o.hasValue){var w=o.value;if(i(w,g))return d=w}return d=g}if(w=d,pje(u,g))return w;var v=r(g);return i!==void 0&&i(w,v)?w:(u=g,d=v)}var l=!1,u,d,h=n===void 0?null:n;return[function(){return c(e())},h===null?void 0:function(){return c(h())}]},[e,n,r,i]);var a=mje(t,s[0],s[1]);return wje(function(){o.hasValue=!0,o.value=a},[a]),vje(a),a};Cre.exports=Sre;var Tre=Cre.exports;const Uk=t=>typeof t=="object"&&!Array.isArray(t);function bje(t,e,n=e,r=M5){const i=ce.useRef([]),s=Tre.useSyncExternalStoreWithSelector(t,e,n,o=>o,(o,a)=>{if(Uk(o)&&Uk(a)&&i.current.length){for(const c of i.current)if(!r(o[c],a[c]))return!1;return!0}return r(o,a)});if(Uk(s)){const o={...s};let a={};for(const[c,l]of Object.entries(o))a={...a,[c]:{configurable:!1,enumerable:!0,get:()=>(i.current.includes(c)||i.current.push(c),l)}};return Object.defineProperties(o,a),o}return s}function B1(t={}){const e=tm(t);return bje(n=>gte(e,{onChange:n}),()=>Db(e))}var u4=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Gv=typeof window>"u"||"Deno"in globalThis;function tl(){}function xje(t,e){return typeof t=="function"?t(e):t}function pO(t){return typeof t=="number"&&t>=0&&t!==1/0}function Ire(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Oy(t,e){return typeof t=="function"?t(e):t}function Zl(t,e){return typeof t=="function"?t(e):t}function Uq(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==D$(o,e.options))return!1}else if(!Ix(e.queryKey,o))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||s&&!s(e))}function Fq(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(Tx(e.options.mutationKey)!==Tx(s))return!1}else if(!Ix(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function D$(t,e){return((e==null?void 0:e.queryKeyHashFn)||Tx)(t)}function Tx(t){return JSON.stringify(t,(e,n)=>gO(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ix(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!Ix(t[n],e[n])):!1}function kre(t,e){if(t===e)return t;const n=zq(t)&&zq(e);if(n||gO(t)&&gO(e)){const r=n?t:Object.keys(t),i=r.length,s=n?e:Object.keys(e),o=s.length,a=n?[]:{};let c=0;for(let l=0;l<o;l++){const u=n?l:s[l];(!n&&r.includes(u)||n)&&t[u]===void 0&&e[u]===void 0?(a[u]=void 0,c++):(a[u]=kre(t[u],e[u]),a[u]===t[u]&&t[u]!==void 0&&c++)}return i===o&&c===i?t:a}return e}function mO(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function zq(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function gO(t){if(!Hq(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!Hq(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Hq(t){return Object.prototype.toString.call(t)==="[object Object]"}function _je(t){return new Promise(e=>{setTimeout(e,t)})}function wO(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?kre(t,e):e}function Aje(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function Eje(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Rre=Symbol();function Nre(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Rre?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var sg,Dp,zy,OK,Cje=(OK=class extends u4{constructor(){super();En(this,sg);En(this,Dp);En(this,zy);zt(this,zy,e=>{if(!Gv&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Ae(this,Dp)||this.setEventListener(Ae(this,zy))}onUnsubscribe(){var e;this.hasListeners()||((e=Ae(this,Dp))==null||e.call(this),zt(this,Dp,void 0))}setEventListener(e){var n;zt(this,zy,e),(n=Ae(this,Dp))==null||n.call(this),zt(this,Dp,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){Ae(this,sg)!==e&&(zt(this,sg,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof Ae(this,sg)=="boolean"?Ae(this,sg):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},sg=new WeakMap,Dp=new WeakMap,zy=new WeakMap,OK),M$=new Cje,Hy,Mp,Wy,DK,Sje=(DK=class extends u4{constructor(){super();En(this,Hy,!0);En(this,Mp);En(this,Wy);zt(this,Wy,e=>{if(!Gv&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){Ae(this,Mp)||this.setEventListener(Ae(this,Wy))}onUnsubscribe(){var e;this.hasListeners()||((e=Ae(this,Mp))==null||e.call(this),zt(this,Mp,void 0))}setEventListener(e){var n;zt(this,Wy,e),(n=Ae(this,Mp))==null||n.call(this),zt(this,Mp,e(this.setOnline.bind(this)))}setOnline(e){Ae(this,Hy)!==e&&(zt(this,Hy,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return Ae(this,Hy)}},Hy=new WeakMap,Mp=new WeakMap,Wy=new WeakMap,DK),o8=new Sje;function Tje(t){return Math.min(1e3*2**t,3e4)}function Pre(t){return(t??"online")==="online"?o8.isOnline():!0}var Ore=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Fk(t){return t instanceof Ore}function Dre(t){let e=!1,n=0,r=!1,i,s,o;const a=new Promise((T,b)=>{s=T,o=b}),c=T=>{var b;r||(w(new Ore(T)),(b=t.abort)==null||b.call(t))},l=()=>{e=!0},u=()=>{e=!1},d=()=>M$.isFocused()&&(t.networkMode==="always"||o8.isOnline())&&t.canRun(),h=()=>Pre(t.networkMode)&&t.canRun(),g=T=>{var b;r||(r=!0,(b=t.onSuccess)==null||b.call(t,T),i==null||i(),s(T))},w=T=>{var b;r||(r=!0,(b=t.onError)==null||b.call(t,T),i==null||i(),o(T))},v=()=>new Promise(T=>{var b;i=k=>{(r||d())&&T(k)},(b=t.onPause)==null||b.call(t)}).then(()=>{var T;i=void 0,r||(T=t.onContinue)==null||T.call(t)}),_=()=>{if(r)return;let T;const b=n===0?t.initialPromise:void 0;try{T=b??t.fn()}catch(k){T=Promise.reject(k)}Promise.resolve(T).then(g).catch(k=>{var A;if(r)return;const D=t.retry??(Gv?0:3),O=t.retryDelay??Tje,$=typeof O=="function"?O(n,k):O,C=D===!0||typeof D=="number"&&n<D||typeof D=="function"&&D(n,k);if(e||!C){w(k);return}n++,(A=t.onFail)==null||A.call(t,n,k),_je($).then(()=>d()?void 0:v()).then(()=>{e?w(k):_()})})};return{promise:a,cancel:c,continue:()=>(i==null||i(),a),cancelRetry:l,continueRetry:u,canStart:h,start:()=>(h()?_():v().then(_),a)}}function Ije(){let t=[],e=0,n=h=>{h()},r=h=>{h()},i=h=>setTimeout(h,0);const s=h=>{i=h},o=h=>{let g;e++;try{g=h()}finally{e--,e||l()}return g},a=h=>{e?t.push(h):i(()=>{n(h)})},c=h=>(...g)=>{a(()=>{h(...g)})},l=()=>{const h=t;t=[],h.length&&i(()=>{r(()=>{h.forEach(g=>{n(g)})})})};return{batch:o,batchCalls:c,schedule:a,setNotifyFunction:h=>{n=h},setBatchNotifyFunction:h=>{r=h},setScheduler:s}}var Ws=Ije(),og,MK,Mre=(MK=class{constructor(){En(this,og)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pO(this.gcTime)&&zt(this,og,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Gv?1/0:5*60*1e3))}clearGcTimeout(){Ae(this,og)&&(clearTimeout(Ae(this,og)),zt(this,og,void 0))}},og=new WeakMap,MK),Vy,qy,Jc,co,o6,ag,Gl,If,BK,kje=(BK=class extends Mre{constructor(e){super();En(this,Gl);En(this,Vy);En(this,qy);En(this,Jc);En(this,co);En(this,o6);En(this,ag);zt(this,ag,!1),zt(this,o6,e.defaultOptions),this.setOptions(e.options),this.observers=[],zt(this,Jc,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,zt(this,Vy,Rje(this.options)),this.state=e.state??Ae(this,Vy),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=Ae(this,co))==null?void 0:e.promise}setOptions(e){this.options={...Ae(this,o6),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Ae(this,Jc).remove(this)}setData(e,n){const r=wO(this.state.data,e,this.options);return lr(this,Gl,If).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){lr(this,Gl,If).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,i;const n=(r=Ae(this,co))==null?void 0:r.promise;return(i=Ae(this,co))==null||i.cancel(e),n?n.then(tl).catch(tl):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Ae(this,Vy))}isActive(){return this.observers.some(e=>Zl(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!Ire(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=Ae(this,co))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=Ae(this,co))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),Ae(this,Jc).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(Ae(this,co)&&(Ae(this,ag)?Ae(this,co).cancel({revert:!0}):Ae(this,co).cancelRetry()),this.scheduleGc()),Ae(this,Jc).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||lr(this,Gl,If).call(this,{type:"invalidate"})}fetch(e,n){var c,l,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(Ae(this,co))return Ae(this,co).continueRetry(),Ae(this,co).promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(h=>h.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(zt(this,ag,!0),r.signal)})},s=()=>{const d=Nre(this.options,n),h={queryKey:this.queryKey,meta:this.meta};return i(h),zt(this,ag,!1),this.options.persister?this.options.persister(d,h,this):d(h)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(o),(c=this.options.behavior)==null||c.onFetch(o,this),zt(this,qy,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=o.fetchOptions)==null?void 0:l.meta))&&lr(this,Gl,If).call(this,{type:"fetch",meta:(u=o.fetchOptions)==null?void 0:u.meta});const a=d=>{var h,g,w,v;Fk(d)&&d.silent||lr(this,Gl,If).call(this,{type:"error",error:d}),Fk(d)||((g=(h=Ae(this,Jc).config).onError)==null||g.call(h,d,this),(v=(w=Ae(this,Jc).config).onSettled)==null||v.call(w,this.state.data,d,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return zt(this,co,Dre({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var h,g,w,v;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}this.setData(d),(g=(h=Ae(this,Jc).config).onSuccess)==null||g.call(h,d,this),(v=(w=Ae(this,Jc).config).onSettled)==null||v.call(w,d,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:a,onFail:(d,h)=>{lr(this,Gl,If).call(this,{type:"failed",failureCount:d,error:h})},onPause:()=>{lr(this,Gl,If).call(this,{type:"pause"})},onContinue:()=>{lr(this,Gl,If).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),Ae(this,co).start()}},Vy=new WeakMap,qy=new WeakMap,Jc=new WeakMap,co=new WeakMap,o6=new WeakMap,ag=new WeakMap,Gl=new WeakSet,If=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Bre(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return Fk(i)&&i.revert&&Ae(this,qy)?{...Ae(this,qy),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),Ws.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),Ae(this,Jc).notify({query:this,type:"updated",action:e})})},BK);function Bre(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Pre(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Rje(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var qu,$K,Nje=($K=class extends u4{constructor(e={}){super();En(this,qu);this.config=e,zt(this,qu,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??D$(i,n);let o=this.get(s);return o||(o=new kje({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){Ae(this,qu).has(e.queryHash)||(Ae(this,qu).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=Ae(this,qu).get(e.queryHash);n&&(e.destroy(),n===e&&Ae(this,qu).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ws.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return Ae(this,qu).get(e)}getAll(){return[...Ae(this,qu).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Uq(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>Uq(e,r)):n}notify(e){Ws.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Ws.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ws.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},qu=new WeakMap,$K),Gu,So,cg,Ku,yp,jK,Pje=(jK=class extends Mre{constructor(e){super();En(this,Ku);En(this,Gu);En(this,So);En(this,cg);this.mutationId=e.mutationId,zt(this,So,e.mutationCache),zt(this,Gu,[]),this.state=e.state||Oje(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){Ae(this,Gu).includes(e)||(Ae(this,Gu).push(e),this.clearGcTimeout(),Ae(this,So).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){zt(this,Gu,Ae(this,Gu).filter(n=>n!==e)),this.scheduleGc(),Ae(this,So).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){Ae(this,Gu).length||(this.state.status==="pending"?this.scheduleGc():Ae(this,So).remove(this))}continue(){var e;return((e=Ae(this,cg))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,s,o,a,c,l,u,d,h,g,w,v,_,T,b,k,D,O,$,C;zt(this,cg,Dre({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(A,H)=>{lr(this,Ku,yp).call(this,{type:"failed",failureCount:A,error:H})},onPause:()=>{lr(this,Ku,yp).call(this,{type:"pause"})},onContinue:()=>{lr(this,Ku,yp).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Ae(this,So).canRun(this)}));const n=this.state.status==="pending",r=!Ae(this,cg).canStart();try{if(!n){lr(this,Ku,yp).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=Ae(this,So).config).onMutate)==null?void 0:s.call(i,e,this));const H=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e));H!==this.state.context&&lr(this,Ku,yp).call(this,{type:"pending",context:H,variables:e,isPaused:r})}const A=await Ae(this,cg).start();return await((l=(c=Ae(this,So).config).onSuccess)==null?void 0:l.call(c,A,e,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,A,e,this.state.context)),await((g=(h=Ae(this,So).config).onSettled)==null?void 0:g.call(h,A,null,this.state.variables,this.state.context,this)),await((v=(w=this.options).onSettled)==null?void 0:v.call(w,A,null,e,this.state.context)),lr(this,Ku,yp).call(this,{type:"success",data:A}),A}catch(A){try{throw await((T=(_=Ae(this,So).config).onError)==null?void 0:T.call(_,A,e,this.state.context,this)),await((k=(b=this.options).onError)==null?void 0:k.call(b,A,e,this.state.context)),await((O=(D=Ae(this,So).config).onSettled)==null?void 0:O.call(D,void 0,A,this.state.variables,this.state.context,this)),await((C=($=this.options).onSettled)==null?void 0:C.call($,void 0,A,e,this.state.context)),A}finally{lr(this,Ku,yp).call(this,{type:"error",error:A})}}finally{Ae(this,So).runNext(this)}}},Gu=new WeakMap,So=new WeakMap,cg=new WeakMap,Ku=new WeakSet,yp=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ws.batch(()=>{Ae(this,Gu).forEach(r=>{r.onMutationUpdate(e)}),Ae(this,So).notify({mutation:this,type:"updated",action:e})})},jK);function Oje(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Va,a6,LK,Dje=(LK=class extends u4{constructor(e={}){super();En(this,Va);En(this,a6);this.config=e,zt(this,Va,new Map),zt(this,a6,Date.now())}build(e,n,r){const i=new Pje({mutationCache:this,mutationId:++A_(this,a6)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){const n=wA(e),r=Ae(this,Va).get(n)??[];r.push(e),Ae(this,Va).set(n,r),this.notify({type:"added",mutation:e})}remove(e){var r;const n=wA(e);if(Ae(this,Va).has(n)){const i=(r=Ae(this,Va).get(n))==null?void 0:r.filter(s=>s!==e);i&&(i.length===0?Ae(this,Va).delete(n):Ae(this,Va).set(n,i))}this.notify({type:"removed",mutation:e})}canRun(e){var r;const n=(r=Ae(this,Va).get(wA(e)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===e}runNext(e){var r;const n=(r=Ae(this,Va).get(wA(e)))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Ws.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...Ae(this,Va).values()].flat()}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Fq(n,r))}findAll(e={}){return this.getAll().filter(n=>Fq(e,n))}notify(e){Ws.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Ws.batch(()=>Promise.all(e.map(n=>n.continue().catch(tl))))}},Va=new WeakMap,a6=new WeakMap,LK);function wA(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function Mje(t){return{onFetch:(e,n)=>{const r=async()=>{var w,v,_,T,b;const i=e.options,s=(_=(v=(w=e.fetchOptions)==null?void 0:w.meta)==null?void 0:v.fetchMore)==null?void 0:_.direction,o=((T=e.state.data)==null?void 0:T.pages)||[],a=((b=e.state.data)==null?void 0:b.pageParams)||[],c={pages:[],pageParams:[]};let l=!1;const u=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>(e.signal.aborted?l=!0:e.signal.addEventListener("abort",()=>{l=!0}),e.signal)})},d=Nre(e.options,e.fetchOptions),h=async(k,D,O)=>{if(l)return Promise.reject();if(D==null&&k.pages.length)return Promise.resolve(k);const $={queryKey:e.queryKey,pageParam:D,direction:O?"backward":"forward",meta:e.options.meta};u($);const C=await d($),{maxPages:A}=e.options,H=O?Eje:Aje;return{pages:H(k.pages,C,A),pageParams:H(k.pageParams,D,A)}};let g;if(s&&o.length){const k=s==="backward",D=k?Bje:Wq,O={pages:o,pageParams:a},$=D(i,O);g=await h(O,$,k)}else{g=await h(c,a[0]??i.initialPageParam);const k=t??o.length;for(let D=1;D<k;D++){const O=Wq(i,g);if(O==null)break;g=await h(g,O)}}return g};e.options.persister?e.fetchFn=()=>{var i,s;return(s=(i=e.options).persister)==null?void 0:s.call(i,r,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=r}}}function Wq(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function Bje(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var Ni,Bp,$p,Gy,Ky,jp,Yy,Qy,UK,$je=(UK=class{constructor(t={}){En(this,Ni);En(this,Bp);En(this,$p);En(this,Gy);En(this,Ky);En(this,jp);En(this,Yy);En(this,Qy);zt(this,Ni,t.queryCache||new Nje),zt(this,Bp,t.mutationCache||new Dje),zt(this,$p,t.defaultOptions||{}),zt(this,Gy,new Map),zt(this,Ky,new Map),zt(this,jp,0)}mount(){A_(this,jp)._++,Ae(this,jp)===1&&(zt(this,Yy,M$.subscribe(async t=>{t&&(await this.resumePausedMutations(),Ae(this,Ni).onFocus())})),zt(this,Qy,o8.subscribe(async t=>{t&&(await this.resumePausedMutations(),Ae(this,Ni).onOnline())})))}unmount(){var t,e;A_(this,jp)._--,Ae(this,jp)===0&&((t=Ae(this,Yy))==null||t.call(this),zt(this,Yy,void 0),(e=Ae(this,Qy))==null||e.call(this),zt(this,Qy,void 0))}isFetching(t){return Ae(this,Ni).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return Ae(this,Bp).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=Ae(this,Ni).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(e===void 0)return this.fetchQuery(t);{const n=this.defaultQueryOptions(t),r=Ae(this,Ni).build(this,n);return t.revalidateIfStale&&r.isStaleByTime(Oy(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(e)}}getQueriesData(t){return Ae(this,Ni).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=Ae(this,Ni).get(r.queryHash),s=i==null?void 0:i.state.data,o=xje(e,s);if(o!==void 0)return Ae(this,Ni).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return Ws.batch(()=>Ae(this,Ni).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=Ae(this,Ni).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=Ae(this,Ni);Ws.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=Ae(this,Ni),r={type:"active",...t};return Ws.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(t={},e={}){const n={revert:!0,...e},r=Ws.batch(()=>Ae(this,Ni).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(tl).catch(tl)}invalidateQueries(t={},e={}){return Ws.batch(()=>{if(Ae(this,Ni).findAll(t).forEach(r=>{r.invalidate()}),t.refetchType==="none")return Promise.resolve();const n={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(n,e)})}refetchQueries(t={},e){const n={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},r=Ws.batch(()=>Ae(this,Ni).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(tl)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(tl)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=Ae(this,Ni).build(this,e);return n.isStaleByTime(Oy(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(tl).catch(tl)}fetchInfiniteQuery(t){return t.behavior=Mje(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(tl).catch(tl)}resumePausedMutations(){return o8.isOnline()?Ae(this,Bp).resumePausedMutations():Promise.resolve()}getQueryCache(){return Ae(this,Ni)}getMutationCache(){return Ae(this,Bp)}getDefaultOptions(){return Ae(this,$p)}setDefaultOptions(t){zt(this,$p,t)}setQueryDefaults(t,e){Ae(this,Gy).set(Tx(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...Ae(this,Gy).values()];let n={};return e.forEach(r=>{Ix(t,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(t,e){Ae(this,Ky).set(Tx(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...Ae(this,Ky).values()];let n={};return e.forEach(r=>{Ix(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...Ae(this,$p).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=D$(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===Rre&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...Ae(this,$p).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){Ae(this,Ni).clear(),Ae(this,Bp).clear()}},Ni=new WeakMap,Bp=new WeakMap,$p=new WeakMap,Gy=new WeakMap,Ky=new WeakMap,jp=new WeakMap,Yy=new WeakMap,Qy=new WeakMap,UK),la,ur,c6,To,lg,Zy,Yu,l6,Jy,Xy,ug,dg,Lp,ev,Dr,u3,yO,vO,bO,xO,_O,AO,EO,$re,FK,jje=(FK=class extends u4{constructor(e,n){super();En(this,Dr);En(this,la);En(this,ur);En(this,c6);En(this,To);En(this,lg);En(this,Zy);En(this,Yu);En(this,l6);En(this,Jy);En(this,Xy);En(this,ug);En(this,dg);En(this,Lp);En(this,ev,new Set);this.options=n,zt(this,la,e),zt(this,Yu,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Ae(this,ur).addObserver(this),Vq(Ae(this,ur),this.options)?lr(this,Dr,u3).call(this):this.updateResult(),lr(this,Dr,xO).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return CO(Ae(this,ur),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return CO(Ae(this,ur),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,lr(this,Dr,_O).call(this),lr(this,Dr,AO).call(this),Ae(this,ur).removeObserver(this)}setOptions(e,n){const r=this.options,i=Ae(this,ur);if(this.options=Ae(this,la).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Zl(this.options.enabled,Ae(this,ur))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");lr(this,Dr,EO).call(this),Ae(this,ur).setOptions(this.options),r._defaulted&&!mO(this.options,r)&&Ae(this,la).getQueryCache().notify({type:"observerOptionsUpdated",query:Ae(this,ur),observer:this});const s=this.hasListeners();s&&qq(Ae(this,ur),i,this.options,r)&&lr(this,Dr,u3).call(this),this.updateResult(n),s&&(Ae(this,ur)!==i||Zl(this.options.enabled,Ae(this,ur))!==Zl(r.enabled,Ae(this,ur))||Oy(this.options.staleTime,Ae(this,ur))!==Oy(r.staleTime,Ae(this,ur)))&&lr(this,Dr,yO).call(this);const o=lr(this,Dr,vO).call(this);s&&(Ae(this,ur)!==i||Zl(this.options.enabled,Ae(this,ur))!==Zl(r.enabled,Ae(this,ur))||o!==Ae(this,Lp))&&lr(this,Dr,bO).call(this,o)}getOptimisticResult(e){const n=Ae(this,la).getQueryCache().build(Ae(this,la),e),r=this.createResult(n,e);return Uje(this,r)&&(zt(this,To,r),zt(this,Zy,this.options),zt(this,lg,Ae(this,ur).state)),r}getCurrentResult(){return Ae(this,To)}trackResult(e,n){const r={};return Object.keys(e).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),e[i])})}),r}trackProp(e){Ae(this,ev).add(e)}getCurrentQuery(){return Ae(this,ur)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=Ae(this,la).defaultQueryOptions(e),r=Ae(this,la).getQueryCache().build(Ae(this,la),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(e){return lr(this,Dr,u3).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),Ae(this,To)))}createResult(e,n){var C;const r=Ae(this,ur),i=this.options,s=Ae(this,To),o=Ae(this,lg),a=Ae(this,Zy),l=e!==r?e.state:Ae(this,c6),{state:u}=e;let d={...u},h=!1,g;if(n._optimisticResults){const A=this.hasListeners(),H=!A&&Vq(e,n),V=A&&qq(e,r,n,i);(H||V)&&(d={...d,...Bre(u.data,e.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:w,errorUpdatedAt:v,status:_}=d;if(n.select&&d.data!==void 0)if(s&&d.data===(o==null?void 0:o.data)&&n.select===Ae(this,l6))g=Ae(this,Jy);else try{zt(this,l6,n.select),g=n.select(d.data),g=wO(s==null?void 0:s.data,g,n),zt(this,Jy,g),zt(this,Yu,null)}catch(A){zt(this,Yu,A)}else g=d.data;if(n.placeholderData!==void 0&&g===void 0&&_==="pending"){let A;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))A=s.data;else if(A=typeof n.placeholderData=="function"?n.placeholderData((C=Ae(this,Xy))==null?void 0:C.state.data,Ae(this,Xy)):n.placeholderData,n.select&&A!==void 0)try{A=n.select(A),zt(this,Yu,null)}catch(H){zt(this,Yu,H)}A!==void 0&&(_="success",g=wO(s==null?void 0:s.data,A,n),h=!0)}Ae(this,Yu)&&(w=Ae(this,Yu),g=Ae(this,Jy),v=Date.now(),_="error");const T=d.fetchStatus==="fetching",b=_==="pending",k=_==="error",D=b&&T,O=g!==void 0;return{status:_,fetchStatus:d.fetchStatus,isPending:b,isSuccess:_==="success",isError:k,isInitialLoading:D,isLoading:D,data:g,dataUpdatedAt:d.dataUpdatedAt,error:w,errorUpdatedAt:v,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:T,isRefetching:T&&!b,isLoadingError:k&&!O,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:k&&O,isStale:B$(e,n),refetch:this.refetch}}updateResult(e){const n=Ae(this,To),r=this.createResult(Ae(this,ur),this.options);if(zt(this,lg,Ae(this,ur).state),zt(this,Zy,this.options),Ae(this,lg).data!==void 0&&zt(this,Xy,Ae(this,ur)),mO(r,n))return;zt(this,To,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!Ae(this,ev).size)return!0;const c=new Set(a??Ae(this,ev));return this.options.throwOnError&&c.add("error"),Object.keys(Ae(this,To)).some(l=>{const u=l;return Ae(this,To)[u]!==n[u]&&c.has(u)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),lr(this,Dr,$re).call(this,{...i,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&lr(this,Dr,xO).call(this)}},la=new WeakMap,ur=new WeakMap,c6=new WeakMap,To=new WeakMap,lg=new WeakMap,Zy=new WeakMap,Yu=new WeakMap,l6=new WeakMap,Jy=new WeakMap,Xy=new WeakMap,ug=new WeakMap,dg=new WeakMap,Lp=new WeakMap,ev=new WeakMap,Dr=new WeakSet,u3=function(e){lr(this,Dr,EO).call(this);let n=Ae(this,ur).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(tl)),n},yO=function(){lr(this,Dr,_O).call(this);const e=Oy(this.options.staleTime,Ae(this,ur));if(Gv||Ae(this,To).isStale||!pO(e))return;const r=Ire(Ae(this,To).dataUpdatedAt,e)+1;zt(this,ug,setTimeout(()=>{Ae(this,To).isStale||this.updateResult()},r))},vO=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Ae(this,ur)):this.options.refetchInterval)??!1},bO=function(e){lr(this,Dr,AO).call(this),zt(this,Lp,e),!(Gv||Zl(this.options.enabled,Ae(this,ur))===!1||!pO(Ae(this,Lp))||Ae(this,Lp)===0)&&zt(this,dg,setInterval(()=>{(this.options.refetchIntervalInBackground||M$.isFocused())&&lr(this,Dr,u3).call(this)},Ae(this,Lp)))},xO=function(){lr(this,Dr,yO).call(this),lr(this,Dr,bO).call(this,lr(this,Dr,vO).call(this))},_O=function(){Ae(this,ug)&&(clearTimeout(Ae(this,ug)),zt(this,ug,void 0))},AO=function(){Ae(this,dg)&&(clearInterval(Ae(this,dg)),zt(this,dg,void 0))},EO=function(){const e=Ae(this,la).getQueryCache().build(Ae(this,la),this.options);if(e===Ae(this,ur))return;const n=Ae(this,ur);zt(this,ur,e),zt(this,c6,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},$re=function(e){Ws.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(Ae(this,To))}),Ae(this,la).getQueryCache().notify({query:Ae(this,ur),type:"observerResultsUpdated"})})},FK);function Lje(t,e){return Zl(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Vq(t,e){return Lje(t,e)||t.state.data!==void 0&&CO(t,e,e.refetchOnMount)}function CO(t,e,n){if(Zl(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&B$(t,e)}return!1}function qq(t,e,n,r){return(t!==e||Zl(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&B$(t,n)}function B$(t,e){return Zl(e.enabled,t)!==!1&&t.isStaleByTime(Oy(e.staleTime,t))}function Uje(t,e){return!mO(t.getCurrentResult(),e)}function Fje(t){return JSON.stringify(t,(e,n)=>zje(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):typeof n=="bigint"?n.toString():n)}function zje(t){if(!Gq(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!Gq(n)||!n.hasOwnProperty("isPrototypeOf"))}function Gq(t){return Object.prototype.toString.call(t)==="[object Object]"}function $$(t){const{_defaulted:e,behavior:n,gcTime:r,initialData:i,initialDataUpdatedAt:s,maxPages:o,meta:a,networkMode:c,queryFn:l,queryHash:u,queryKey:d,queryKeyHashFn:h,retry:g,retryDelay:w,structuralSharing:v,getPreviousPageParam:_,getNextPageParam:T,initialPageParam:b,_optimisticResults:k,enabled:D,notifyOnChangeProps:O,placeholderData:$,refetchInterval:C,refetchIntervalInBackground:A,refetchOnMount:H,refetchOnReconnect:V,refetchOnWindowFocus:Y,retryOnMount:ee,select:x,staleTime:E,suspense:y,throwOnError:I,config:B,connector:M,query:W,...z}=t;return z}function Hje(t,e={}){return{async queryFn({queryKey:n}){const{address:r,scopeKey:i,...s}=n[1];if(!r)throw new Error("address is required");return await pte(t,{...s,address:r})??null},queryKey:Wje(e)}}function Wje(t={}){return["balance",$$(t)]}function Vje(t,e={}){return{gcTime:0,async queryFn({queryKey:n}){const{scopeKey:r,...i}=n[1];return await MTe(t,i)??null},queryKey:qje(e)}}function qje(t={}){return["blockNumber",$$(t)]}function Gje(t,e={}){return{gcTime:0,async queryFn({queryKey:n}){const{connector:r}=e,{connectorUid:i,scopeKey:s,...o}=n[1];return UTe(t,{...o,connector:r})},queryKey:Kje(e)}}function Kje(t={}){const{connector:e,...n}=t;return["walletClient",{...$$(n),connectorUid:e==null?void 0:e.uid}]}var jre=ce.createContext(void 0),j$=t=>{const e=ce.useContext(jre);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Yje=({client:t,children:e})=>(ce.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),m.jsx(jre.Provider,{value:t,children:e})),Lre=ce.createContext(!1),Qje=()=>ce.useContext(Lre);Lre.Provider;function Zje(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Jje=ce.createContext(Zje()),Xje=()=>ce.useContext(Jje);function eLe(t,e){return typeof t=="function"?t(...e):!!t}var tLe=(t,e)=>{(t.suspense||t.throwOnError)&&(e.isReset()||(t.retryOnMount=!1))},nLe=t=>{ce.useEffect(()=>{t.clearReset()},[t])},rLe=({result:t,errorResetBoundary:e,throwOnError:n,query:r})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&eLe(n,[t.error,r]),iLe=t=>{t.suspense&&(typeof t.staleTime!="number"&&(t.staleTime=1e3),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3)))},sLe=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,oLe=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function aLe(t,e,n){var l,u,d,h;const r=j$(),i=Qje(),s=Xje(),o=r.defaultQueryOptions(t);(u=(l=r.getDefaultOptions().queries)==null?void 0:l._experimental_beforeQuery)==null||u.call(l,o),o._optimisticResults=i?"isRestoring":"optimistic",iLe(o),tLe(o,s),nLe(s);const[a]=ce.useState(()=>new e(r,o)),c=a.getOptimisticResult(o);if(ce.useSyncExternalStore(ce.useCallback(g=>{const w=i?()=>{}:a.subscribe(Ws.batchCalls(g));return a.updateResult(),w},[a,i]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),ce.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),sLe(o,c))throw oLe(o,a,s);if(rLe({result:c,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;return(h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_afterQuery)==null||h.call(d,o,c),o.notifyOnChangeProps?c:a.trackResult(c)}function cLe(t,e){return aLe(t,jje)}function L$(t){const e=cLe({...t,queryKeyHashFn:Fje});return e.queryKey=t.queryKey,e}function P9(t={}){const e=tm(t);return ce.useSyncExternalStore(n=>YTe(e,{onChange:n}),()=>EV(e),()=>EV(e))}function a8(t={}){const{address:e,query:n={}}=t,r=tm(t),i=P9({config:r}),s=Hje(r,{...t,chainId:t.chainId??i}),o=!!(e&&(n.enabled??!0));return L$({...n,...s,enabled:o})}function lLe(t={}){const{enabled:e=!0,onBlockNumber:n,config:r,...i}=t,s=tm(t),o=P9({config:s}),a=t.chainId??o;ce.useEffect(()=>{if(e&&n)return KTe(s,{...i,chainId:a,onBlockNumber:n})},[a,s,e,n,i.onError,i.emitMissed,i.emitOnBegin,i.poll,i.pollingInterval,i.syncConnectedChain])}function uLe(t={}){const{query:e={},watch:n}=t,r=tm(t),i=j$(),s=P9({config:r}),o=t.chainId??s,a=Vje(r,{...t,chainId:o});return lLe({config:t.config,chainId:t.chainId,...typeof n=="object"?n:{},enabled:!!((e.enabled??!0)&&(typeof n=="object"?n.enabled:n)),onBlockNumber(c){i.setQueryData(a.queryKey,c)}}),L$({...e,...a})}function O9(t={}){const e=tm(t);return Tre.useSyncExternalStoreWithSelector(n=>ZTe(e,{onChange:n}),()=>vP(e,t),()=>vP(e,t),n=>n,(n,r)=>(n==null?void 0:n.uid)===(r==null?void 0:r.uid))}function Ure(t={}){const{query:e={},...n}=t,r=tm(n),i=j$(),{address:s,connector:o,status:a}=B1({config:r}),c=P9({config:r}),{queryKey:l,...u}=Gje(r,{...t,chainId:t.chainId??c,connector:t.connector??o}),d=!!(a!=="disconnected"&&(e.enabled??!0)),h=ce.useRef(s);return ce.useEffect(()=>{const g=h.current;!s&&g?(i.removeQueries({queryKey:l}),h.current=void 0):s!==g&&(i.invalidateQueries({queryKey:l}),h.current=s)},[s,i]),L$({...e,...u,queryKey:l,enabled:d,staleTime:Number.POSITIVE_INFINITY})}function U$(){const{address:t,isConnecting:e,isDisconnected:n}=B1(),{open:r,close:i}=Fge();return m.jsx(m.Fragment,{children:m.jsx("header",{children:m.jsx("nav",{className:"navbar p-0",children:m.jsxs("div",{className:"main_menu",children:[m.jsx(pr,{to:"/",children:m.jsx("img",{src:"/assets/img/logo.svg"})}),m.jsx("div",{children:t?m.jsx("w3m-button",{balance:"show"}):m.jsx("button",{onClick:r,className:"btn wallet_btn",children:"Connect Wallet"})})]})})})})}const dLe="/assets/wolf_pfp-D1DIPqMM.jpg",fLe=()=>m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:5,height:5,viewBox:"0 0 5 5",fill:"none",children:m.jsx("circle",{cx:"2.5",cy:"2.5",r:"2.5",fill:"#FF7D34"})}),Fre=()=>m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"{24}",height:"{26}",viewBox:"0 0 24 26",fill:"none",children:[m.jsx("path",{d:"M14.504 12.5H22.504C22.504 12.5 23.004 12.5 23.004 13V15C23.004 15 23.004 15.5 22.504 15.5H14.504C14.504 15.5 14.004 15.5 14.004 15V13C14.004 13 14.004 12.5 14.504 12.5Z",stroke:"#E5E5E5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),m.jsx("path",{d:"M13.504 15.5H21.504C21.504 15.5 22.004 15.5 22.004 16V18C22.004 18 22.004 18.5 21.504 18.5H13.504C13.504 18.5 13.004 18.5 13.004 18V16C13.004 16 13.004 15.5 13.504 15.5Z",stroke:"#E5E5E5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),m.jsx("path",{d:"M14.504 18.5H22.504C22.504 18.5 23.004 18.5 23.004 19V21C23.004 21 23.004 21.5 22.504 21.5H14.504C14.504 21.5 14.004 21.5 14.004 21V19C14.004 19 14.004 18.5 14.504 18.5Z",stroke:"#E5E5E5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),m.jsx("path",{d:"M13.504 21.5H21.504C21.504 21.5 22.004 21.5 22.004 22V24C22.004 24 22.004 24.5 21.504 24.5H13.504C13.504 24.5 13.004 24.5 13.004 24V22C13.004 22 13.004 21.5 13.504 21.5Z",stroke:"#E5E5E5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),m.jsx("path",{d:"M1.504 18.5H9.504C9.504 18.5 10.004 18.5 10.004 19V21C10.004 21 10.004 21.5 9.504 21.5H1.504C1.504 21.5 1.004 21.5 1.004 21V19C1.004 19 1.004 18.5 1.504 18.5Z",stroke:"#E5E5E5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),m.jsx("path",{d:"M2.504 21.5H10.504C10.504 21.5 11.004 21.5 11.004 22V24C11.004 24 11.004 24.5 10.504 24.5H2.504C2.504 24.5 2.004 24.5 2.004 24V22C2.004 22 2.004 21.5 2.504 21.5Z",stroke:"#E5E5E5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),m.jsx("path",{d:"M1.5 14.5L9.871 6.133C10.0448 5.95971 10.2763 5.85641 10.5214 5.84276C10.7665 5.82912 11.008 5.90608 11.2 6.059L14.779 8.922C14.9759 9.07876 15.2246 9.15553 15.4756 9.137C15.7265 9.11846 15.9613 9.00598 16.133 8.822L23 1.5",stroke:"#E5E5E5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),m.jsx("path",{d:"M16.004 1.5H23.004V8",stroke:"#E5E5E5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),zre=()=>m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:26,height:25,viewBox:"0 0 26 25",fill:"none",children:[m.jsx("path",{d:"M24.5 18C24.5 19.1867 24.1481 20.3467 23.4888 21.3334C22.8295 22.3201 21.8925 23.0892 20.7961 23.5433C19.6997 23.9974 18.4933 24.1162 17.3295 23.8847C16.1656 23.6532 15.0965 23.0818 14.2574 22.2426C13.4182 21.4035 12.8468 20.3344 12.6153 19.1705C12.3838 18.0067 12.5026 16.8003 12.9567 15.7039C13.4109 14.6075 14.1799 13.6705 15.1666 13.0112C16.1533 12.3519 17.3133 12 18.5 12",stroke:"#E5E5E5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),m.jsx("path",{d:"M24.5 13.5L19.03 18.969C18.9604 19.0387 18.8778 19.0939 18.7869 19.1316C18.6959 19.1693 18.5984 19.1888 18.5 19.1888C18.4016 19.1888 18.3041 19.1693 18.2131 19.1316C18.1222 19.0939 18.0396 19.0387 17.97 18.969L16.25 17.25",stroke:"#E5E5E5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),m.jsx("path",{d:"M4.25 5.25101C4.25 6.37818 4.69777 7.45918 5.4948 8.25621C6.29183 9.05324 7.37283 9.50101 8.5 9.50101C9.62717 9.50101 10.7082 9.05324 11.5052 8.25621C12.3022 7.45918 12.75 6.37818 12.75 5.25101C12.75 4.12384 12.3022 3.04283 11.5052 2.2458C10.7082 1.44877 9.62717 1.00101 8.5 1.00101C7.37283 1.00101 6.29183 1.44877 5.4948 2.2458C4.69777 3.04283 4.25 4.12384 4.25 5.25101Z",stroke:"#E5E5E5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),m.jsx("path",{d:"M9.5 18H1.5C1.49995 16.7431 1.83832 15.5094 2.47957 14.4284C3.12082 13.3474 4.04131 12.459 5.14436 11.8565C6.24742 11.2539 7.49236 10.9595 8.74846 11.0041C10.0046 11.0487 11.2255 11.4307 12.283 12.11",stroke:"#E5E5E5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Hre=()=>m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",children:[m.jsxs("g",{clipPath:"url(#clip0_205_6963)",children:[m.jsx("path",{d:"M13.5 8.5H11.358C10.9405 8.50015 10.5352 8.64124 10.2078 8.90042C9.88047 9.1596 9.65018 9.5217 9.55426 9.92807C9.45833 10.3344 9.50239 10.7613 9.6793 11.1395C9.85621 11.5177 10.1556 11.8251 10.529 12.012L12.479 12.988C12.8524 13.1749 13.1518 13.4823 13.3287 13.8605C13.5056 14.2387 13.5497 14.6656 13.4537 15.0719C13.3578 15.4783 13.1275 15.8404 12.8002 16.0996C12.4728 16.3588 12.0675 16.4998 11.65 16.5H9.5",stroke:"#E5E5E5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),m.jsx("path",{d:"M11.504 8.5V7",stroke:"#E5E5E5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),m.jsx("path",{d:"M11.504 18V16.5",stroke:"#E5E5E5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),m.jsx("path",{d:"M23.5 12C23.4988 11.1987 23.257 10.4163 22.8059 9.75413C22.3548 9.09192 21.7152 8.58045 20.97 8.286C21.2915 7.55112 21.3839 6.73638 21.2351 5.94818C21.0864 5.15998 20.7034 4.43495 20.1362 3.86777C19.5691 3.30059 18.844 2.91762 18.0558 2.76888C17.2676 2.62014 16.4529 2.71253 15.718 3.034C15.4254 2.28728 14.9145 1.64611 14.2519 1.19415C13.5894 0.742194 12.806 0.500443 12.004 0.500443C11.202 0.500443 10.4186 0.742194 9.75608 1.19415C9.09355 1.64611 8.58263 2.28728 8.29001 3.034C7.55513 2.71253 6.74039 2.62014 5.95219 2.76888C5.16399 2.91762 4.43896 3.30059 3.87178 3.86777C3.3046 4.43495 2.92163 5.15998 2.77289 5.94818C2.62415 6.73638 2.71654 7.55112 3.03801 8.286C2.29129 8.57862 1.65012 9.08954 1.19816 9.75207C0.746207 10.4146 0.504456 11.198 0.504456 12C0.504456 12.802 0.746207 13.5854 1.19816 14.2479C1.65012 14.9105 2.29129 15.4214 3.03801 15.714C2.71654 16.4489 2.62415 17.2636 2.77289 18.0518C2.92163 18.84 3.3046 19.565 3.87178 20.1322C4.43896 20.6994 5.16399 21.0824 5.95219 21.2311C6.74039 21.3799 7.55513 21.2875 8.29001 20.966C8.58263 21.7127 9.09355 22.3539 9.75608 22.8058C10.4186 23.2578 11.202 23.4995 12.004 23.4995C12.806 23.4995 13.5894 23.2578 14.2519 22.8058C14.9145 22.3539 15.4254 21.7127 15.718 20.966C16.4529 21.2875 17.2676 21.3799 18.0558 21.2311C18.844 21.0824 19.5691 20.6994 20.1362 20.1322C20.7034 19.565 21.0864 18.84 21.2351 18.0518C21.3839 17.2636 21.2915 16.4489 20.97 15.714C21.7152 15.4195 22.3548 14.9081 22.8059 14.2459C23.257 13.5837 23.4988 12.8012 23.5 12Z",stroke:"#E5E5E5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),m.jsx("defs",{children:m.jsx("clipPath",{id:"clip0_205_6963",children:m.jsx("rect",{width:24,height:24,fill:"white"})})})]}),vg=()=>m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:8,height:11,viewBox:"0 0 8 11",fill:"none",children:m.jsx("path",{d:"M7 10.4165L2 5.9165L7 1.4165",stroke:"#E5E5E5",strokeWidth:"1.5"})}),nl=()=>m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:8,height:11,viewBox:"0 0 8 11",fill:"none",children:m.jsx("path",{d:"M1 10.4165L6 5.9165L1 1.4165",stroke:"#E5E5E5",strokeWidth:"1.5"})}),D9=()=>m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:10,viewBox:"0 0 8 8",fill:"none",children:m.jsx("path",{d:"M7 1L4 4M1 7L4 4M4 4L7 7M4 4L1 1",stroke:"#E5E5E5",strokeWidth:"1.5"})}),hLe=()=>m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:21,height:2,viewBox:"0 0 21 2",fill:"none",children:m.jsx("path",{d:"M0.616577 1.41638H20.9438",stroke:"#737373"})}),pLe=()=>m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:22,height:9,viewBox:"0 0 22 9",fill:"none",children:m.jsx("path",{d:"M21.6246 4.76994C21.8199 4.57467 21.8199 4.25809 21.6246 4.06283L18.4426 0.880848C18.2474 0.685586 17.9308 0.685586 17.7355 0.880848C17.5403 1.07611 17.5403 1.39269 17.7355 1.58795L20.5639 4.41638L17.7355 7.24481C17.5403 7.44007 17.5403 7.75665 17.7355 7.95192C17.9308 8.14718 18.2474 8.14718 18.4426 7.95192L21.6246 4.76994ZM0.943848 4.91638H21.2711V3.91638H0.943848V4.91638Z",fill:"#737373"})}),mLe=()=>m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:15,height:9,viewBox:"0 0 15 9",fill:"none",children:m.jsx("path",{d:"M14.6289 4.76994C14.8241 4.57467 14.8241 4.25809 14.6289 4.06283L11.4469 0.880848C11.2516 0.685586 10.935 0.685586 10.7398 0.880848C10.5445 1.07611 10.5445 1.39269 10.7398 1.58795L13.5682 4.41638L10.7398 7.24481C10.5445 7.44007 10.5445 7.75665 10.7398 7.95192C10.935 8.14718 11.2516 8.14718 11.4469 7.95192L14.6289 4.76994ZM0.620728 4.91638H14.2753V3.91638H0.620728V4.91638Z",fill:"#53EAA1"})}),gLe=()=>m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:7,viewBox:"0 0 10 7",fill:"none",children:m.jsx("path",{d:"M9 1L5 5L1 1",stroke:"#152024",strokeWidth:"1.5"})}),d3=()=>m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:11,height:12,viewBox:"0 0 11 12",fill:"none",children:[m.jsx("rect",{x:"3.80005",y:"3.5",width:"6.7",height:8,fill:"#152024",stroke:"#737373"}),m.jsx("rect",{x:"0.5",y:"0.5",width:"6.7",height:8,fill:"#152024",stroke:"#737373"})]});var Wre={exports:{}};/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)e.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(Wre);var wLe=Wre.exports;const Fr=Qs(wLe);function yLe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.includes(r))continue;n[r]=t[r]}return n}function SO(t,e){return SO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},SO(t,e)}function vLe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,SO(t,e)}const bLe=["xxl","xl","lg","md","sm","xs"],xLe="xs",M9=ce.createContext({prefixes:{},breakpoints:bLe,minBreakpoint:xLe});function ji(t,e){const{prefixes:n}=ce.useContext(M9);return t||n[e]||e}function _Le(){const{breakpoints:t}=ce.useContext(M9);return t}function ALe(){const{minBreakpoint:t}=ce.useContext(M9);return t}function ELe(){const{dir:t}=ce.useContext(M9);return t==="rtl"}function B9(t){return t&&t.ownerDocument||document}function CLe(t){var e=B9(t);return e&&e.defaultView||window}function SLe(t,e){return CLe(t).getComputedStyle(t,e)}var TLe=/([A-Z])/g;function ILe(t){return t.replace(TLe,"-$1").toLowerCase()}var kLe=/^ms-/;function yA(t){return ILe(t).replace(kLe,"-ms-")}var RLe=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function NLe(t){return!!(t&&RLe.test(t))}function bg(t,e){var n="",r="";if(typeof e=="string")return t.style.getPropertyValue(yA(e))||SLe(t).getPropertyValue(yA(e));Object.keys(e).forEach(function(i){var s=e[i];!s&&s!==0?t.style.removeProperty(yA(i)):NLe(i)?r+=i+"("+s+") ":n+=yA(i)+": "+s+";"}),r&&(n+="transform: "+r+";"),t.style.cssText+=";"+n}var Vre={exports:{}},PLe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",OLe=PLe,DLe=OLe;function qre(){}function Gre(){}Gre.resetWarningCache=qre;var MLe=function(){function t(r,i,s,o,a,c){if(c!==DLe){var l=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 l.name="Invariant Violation",l}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Gre,resetWarningCache:qre};return n.PropTypes=n,n};Vre.exports=MLe();var BLe=Vre.exports;const th=Qs(BLe),Kq={disabled:!1},Kre=Up.createContext(null);var $Le=function(e){return e.scrollTop},f3="unmounted",Mm="exited",Sp="entering",Lm="entered",TO="exiting",Mh=function(t){vLe(e,t);function e(r,i){var s;s=t.call(this,r,i)||this;var o=i,a=o&&!o.isMounting?r.enter:r.appear,c;return s.appearStatus=null,r.in?a?(c=Mm,s.appearStatus=Sp):c=Lm:r.unmountOnExit||r.mountOnEnter?c=f3:c=Mm,s.state={status:c},s.nextCallback=null,s}e.getDerivedStateFromProps=function(i,s){var o=i.in;return o&&s.status===f3?{status:Mm}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var s=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==Sp&&o!==Lm&&(s=Sp):(o===Sp||o===Lm)&&(s=TO)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,s,o,a;return s=o=a=i,i!=null&&typeof i!="number"&&(s=i.exit,o=i.enter,a=i.appear!==void 0?i.appear:o),{exit:s,enter:o,appear:a}},n.updateStatus=function(i,s){if(i===void 0&&(i=!1),s!==null)if(this.cancelNextCallback(),s===Sp){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:ly.findDOMNode(this);o&&$Le(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Mm&&this.setState({status:f3})},n.performEnter=function(i){var s=this,o=this.props.enter,a=this.context?this.context.isMounting:i,c=this.props.nodeRef?[a]:[ly.findDOMNode(this),a],l=c[0],u=c[1],d=this.getTimeouts(),h=a?d.appear:d.enter;if(!i&&!o||Kq.disabled){this.safeSetState({status:Lm},function(){s.props.onEntered(l)});return}this.props.onEnter(l,u),this.safeSetState({status:Sp},function(){s.props.onEntering(l,u),s.onTransitionEnd(h,function(){s.safeSetState({status:Lm},function(){s.props.onEntered(l,u)})})})},n.performExit=function(){var i=this,s=this.props.exit,o=this.getTimeouts(),a=this.props.nodeRef?void 0:ly.findDOMNode(this);if(!s||Kq.disabled){this.safeSetState({status:Mm},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:TO},function(){i.props.onExiting(a),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:Mm},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,s){s=this.setNextCallback(s),this.setState(i,s)},n.setNextCallback=function(i){var s=this,o=!0;return this.nextCallback=function(a){o&&(o=!1,s.nextCallback=null,i(a))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,s){this.setNextCallback(s);var o=this.props.nodeRef?this.props.nodeRef.current:ly.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!o||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],l=c[0],u=c[1];this.props.addEndListener(l,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===f3)return null;var s=this.props,o=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var a=yLe(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Up.createElement(Kre.Provider,{value:null},typeof o=="function"?o(i,a):Up.cloneElement(Up.Children.only(o),a))},e}(Up.Component);Mh.contextType=Kre;Mh.propTypes={};function Iw(){}Mh.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Iw,onEntering:Iw,onEntered:Iw,onExit:Iw,onExiting:Iw,onExited:Iw};Mh.UNMOUNTED=f3;Mh.EXITED=Mm;Mh.ENTERING=Sp;Mh.ENTERED=Lm;Mh.EXITING=TO;const Fb=!!(typeof window<"u"&&window.document&&window.document.createElement);var IO=!1,kO=!1;try{var zk={get passive(){return IO=!0},get once(){return kO=IO=!0}};Fb&&(window.addEventListener("test",zk,zk),window.removeEventListener("test",zk,!0))}catch{}function Yre(t,e,n,r){if(r&&typeof r!="boolean"&&!kO){var i=r.once,s=r.capture,o=n;!kO&&i&&(o=n.__once||function a(c){this.removeEventListener(e,a,s),n.call(this,c)},n.__once=o),t.addEventListener(e,o,IO?r:s)}t.addEventListener(e,n,r)}function RO(t,e,n,r){var i=r&&typeof r!="boolean"?r.capture:r;t.removeEventListener(e,n,i),n.__once&&t.removeEventListener(e,n.__once,i)}function c8(t,e,n,r){return Yre(t,e,n,r),function(){RO(t,e,n,r)}}function jLe(t,e,n,r){if(r===void 0&&(r=!0),t){var i=document.createEvent("HTMLEvents");i.initEvent(e,n,r),t.dispatchEvent(i)}}function LLe(t){var e=bg(t,"transitionDuration")||"",n=e.indexOf("ms")===-1?1e3:1;return parseFloat(e)*n}function ULe(t,e,n){n===void 0&&(n=5);var r=!1,i=setTimeout(function(){r||jLe(t,"transitionend",!0)},e+n),s=c8(t,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(i),s()}}function Qre(t,e,n,r){n==null&&(n=LLe(t)||0);var i=ULe(t,n,r),s=c8(t,"transitionend",e);return function(){i(),s()}}function Yq(t,e){const n=bg(t,e)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function FLe(t,e){const n=Yq(t,"transitionDuration"),r=Yq(t,"transitionDelay"),i=Qre(t,s=>{s.target===t&&(i(),e(s))},n+r)}function zLe(t){t.offsetHeight}const Qq=t=>!t||typeof t=="function"?t:e=>{t.current=e};function HLe(t,e){const n=Qq(t),r=Qq(e);return i=>{n&&n(i),r&&r(i)}}function d4(t,e){return ce.useMemo(()=>HLe(t,e),[t,e])}function WLe(t){return t&&"setState"in t?ly.findDOMNode(t):t??null}const VLe=Up.forwardRef(({onEnter:t,onEntering:e,onEntered:n,onExit:r,onExiting:i,onExited:s,addEndListener:o,children:a,childRef:c,...l},u)=>{const d=ce.useRef(null),h=d4(d,c),g=$=>{h(WLe($))},w=$=>C=>{$&&d.current&&$(d.current,C)},v=ce.useCallback(w(t),[t]),_=ce.useCallback(w(e),[e]),T=ce.useCallback(w(n),[n]),b=ce.useCallback(w(r),[r]),k=ce.useCallback(w(i),[i]),D=ce.useCallback(w(s),[s]),O=ce.useCallback(w(o),[o]);return m.jsx(Mh,{ref:u,...l,onEnter:v,onEntered:T,onEntering:_,onExit:b,onExited:D,onExiting:k,addEndListener:O,nodeRef:d,children:typeof a=="function"?($,C)=>a($,{...C,ref:g}):Up.cloneElement(a,{ref:g})})});function qLe(t){const e=ce.useRef(t);return ce.useEffect(()=>{e.current=t},[t]),e}function td(t){const e=qLe(t);return ce.useCallback(function(...n){return e.current&&e.current(...n)},[e])}const GLe=t=>ce.forwardRef((e,n)=>m.jsx("div",{...e,ref:n,className:Fr(e.className,t)}));function KLe(){return ce.useState(null)}function YLe(){const t=ce.useRef(!0),e=ce.useRef(()=>t.current);return ce.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),e.current}function QLe(t){const e=ce.useRef(null);return ce.useEffect(()=>{e.current=t}),e.current}const ZLe=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",JLe=typeof document<"u",Zq=JLe||ZLe?ce.useLayoutEffect:ce.useEffect,XLe=["as","disabled"];function eUe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function tUe(t){return!t||t.trim()==="#"}function Zre({tagName:t,disabled:e,href:n,target:r,rel:i,role:s,onClick:o,tabIndex:a=0,type:c}){t||(n!=null||r!=null||i!=null?t="a":t="button");const l={tagName:t};if(t==="button")return[{type:c||"button",disabled:e},l];const u=h=>{if((e||t==="a"&&tUe(n))&&h.preventDefault(),e){h.stopPropagation();return}o==null||o(h)},d=h=>{h.key===" "&&(h.preventDefault(),u(h))};return t==="a"&&(n||(n="#"),e&&(n=void 0)),[{role:s??"button",disabled:void 0,tabIndex:e?void 0:a,href:n,target:t==="a"?r:void 0,"aria-disabled":e||void 0,rel:t==="a"?i:void 0,onClick:u,onKeyDown:d},l]}const nUe=ce.forwardRef((t,e)=>{let{as:n,disabled:r}=t,i=eUe(t,XLe);const[s,{tagName:o}]=Zre(Object.assign({tagName:n,disabled:r},i));return m.jsx(o,Object.assign({},i,s,{ref:e}))});nUe.displayName="Button";const rUe={[Sp]:"show",[Lm]:"show"},F$=ce.forwardRef(({className:t,children:e,transitionClasses:n={},onEnter:r,...i},s)=>{const o={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},a=ce.useCallback((c,l)=>{zLe(c),r==null||r(c,l)},[r]);return m.jsx(VLe,{ref:s,addEndListener:FLe,...o,onEnter:a,childRef:e.ref,children:(c,l)=>ce.cloneElement(e,{...l,className:Fr("fade",t,e.props.className,rUe[c],n[c])})})});F$.displayName="Fade";const iUe={"aria-label":th.string,onClick:th.func,variant:th.oneOf(["white"])},z$=ce.forwardRef(({className:t,variant:e,"aria-label":n="Close",...r},i)=>m.jsx("button",{ref:i,type:"button",className:Fr("btn-close",e&&`btn-close-${e}`,t),"aria-label":n,...r}));z$.displayName="CloseButton";z$.propTypes=iUe;const f4=ce.forwardRef(({as:t,bsPrefix:e,variant:n="primary",size:r,active:i=!1,disabled:s=!1,className:o,...a},c)=>{const l=ji(e,"btn"),[u,{tagName:d}]=Zre({tagName:t,disabled:s,...a}),h=d;return m.jsx(h,{...u,...a,ref:c,disabled:s,className:Fr(o,l,i&&"active",n&&`${l}-${n}`,r&&`${l}-${r}`,a.href&&s&&"disabled")})});f4.displayName="Button";function sUe(t){const e=ce.useRef(t);return e.current=t,e}function Jre(t){const e=sUe(t);ce.useEffect(()=>()=>e.current(),[])}function oUe(t,e){return ce.Children.toArray(t).some(n=>ce.isValidElement(n)&&n.type===e)}function aUe({as:t,bsPrefix:e,className:n,...r}){e=ji(e,"col");const i=_Le(),s=ALe(),o=[],a=[];return i.forEach(c=>{const l=r[c];delete r[c];let u,d,h;typeof l=="object"&&l!=null?{span:u,offset:d,order:h}=l:u=l;const g=c!==s?`-${c}`:"";u&&o.push(u===!0?`${e}${g}`:`${e}${g}-${u}`),h!=null&&a.push(`order${g}-${h}`),d!=null&&a.push(`offset${g}-${d}`)}),[{...r,className:Fr(n,...o,...a)},{as:t,bsPrefix:e,spans:o}]}const Xre=ce.forwardRef((t,e)=>{const[{className:n,...r},{as:i="div",bsPrefix:s,spans:o}]=aUe(t);return m.jsx(i,{...r,ref:e,className:Fr(n,!o.length&&s)})});Xre.displayName="Col";var cUe=Function.prototype.bind.call(Function.prototype.call,[].slice);function kw(t,e){return cUe(t.querySelectorAll(e))}function Jq(t,e){if(t.contains)return t.contains(e);if(t.compareDocumentPosition)return t===e||!!(t.compareDocumentPosition(e)&16)}const lUe="data-rr-ui-";function uUe(t){return`${lUe}${t}`}const eie=ce.createContext(Fb?window:void 0);eie.Provider;function H$(){return ce.useContext(eie)}const tie=ce.createContext(null);tie.displayName="InputGroupContext";const dUe={type:th.string,tooltip:th.bool,as:th.elementType},$9=ce.forwardRef(({as:t="div",className:e,type:n="valid",tooltip:r=!1,...i},s)=>m.jsx(t,{...i,ref:s,className:Fr(e,`${n}-${r?"tooltip":"feedback"}`)}));$9.displayName="Feedback";$9.propTypes=dUe;const Eh=ce.createContext({}),h4=ce.forwardRef(({id:t,bsPrefix:e,className:n,type:r="checkbox",isValid:i=!1,isInvalid:s=!1,as:o="input",...a},c)=>{const{controlId:l}=ce.useContext(Eh);return e=ji(e,"form-check-input"),m.jsx(o,{...a,ref:c,type:r,id:t||l,className:Fr(n,e,i&&"is-valid",s&&"is-invalid")})});h4.displayName="FormCheckInput";const l8=ce.forwardRef(({bsPrefix:t,className:e,htmlFor:n,...r},i)=>{const{controlId:s}=ce.useContext(Eh);return t=ji(t,"form-check-label"),m.jsx("label",{...r,ref:i,htmlFor:n||s,className:Fr(e,t)})});l8.displayName="FormCheckLabel";const nie=ce.forwardRef(({id:t,bsPrefix:e,bsSwitchPrefix:n,inline:r=!1,reverse:i=!1,disabled:s=!1,isValid:o=!1,isInvalid:a=!1,feedbackTooltip:c=!1,feedback:l,feedbackType:u,className:d,style:h,title:g="",type:w="checkbox",label:v,children:_,as:T="input",...b},k)=>{e=ji(e,"form-check"),n=ji(n,"form-switch");const{controlId:D}=ce.useContext(Eh),O=ce.useMemo(()=>({controlId:t||D}),[D,t]),$=!_&&v!=null&&v!==!1||oUe(_,l8),C=m.jsx(h4,{...b,type:w==="switch"?"checkbox":w,ref:k,isValid:o,isInvalid:a,disabled:s,as:T});return m.jsx(Eh.Provider,{value:O,children:m.jsx("div",{style:h,className:Fr(d,$&&e,r&&`${e}-inline`,i&&`${e}-reverse`,w==="switch"&&n),children:_||m.jsxs(m.Fragment,{children:[C,$&&m.jsx(l8,{title:g,children:v}),l&&m.jsx($9,{type:u,tooltip:c,children:l})]})})})});nie.displayName="FormCheck";const u8=Object.assign(nie,{Input:h4,Label:l8}),rie=ce.forwardRef(({bsPrefix:t,type:e,size:n,htmlSize:r,id:i,className:s,isValid:o=!1,isInvalid:a=!1,plaintext:c,readOnly:l,as:u="input",...d},h)=>{const{controlId:g}=ce.useContext(Eh);return t=ji(t,"form-control"),m.jsx(u,{...d,type:e,size:r,ref:h,readOnly:l,id:i||g,className:Fr(s,c?`${t}-plaintext`:t,n&&`${t}-${n}`,e==="color"&&`${t}-color`,o&&"is-valid",a&&"is-invalid")})});rie.displayName="FormControl";const fUe=Object.assign(rie,{Feedback:$9}),iie=ce.forwardRef(({className:t,bsPrefix:e,as:n="div",...r},i)=>(e=ji(e,"form-floating"),m.jsx(n,{ref:i,className:Fr(t,e),...r})));iie.displayName="FormFloating";const W$=ce.forwardRef(({controlId:t,as:e="div",...n},r)=>{const i=ce.useMemo(()=>({controlId:t}),[t]);return m.jsx(Eh.Provider,{value:i,children:m.jsx(e,{...n,ref:r})})});W$.displayName="FormGroup";const sie=ce.forwardRef(({as:t="label",bsPrefix:e,column:n=!1,visuallyHidden:r=!1,className:i,htmlFor:s,...o},a)=>{const{controlId:c}=ce.useContext(Eh);e=ji(e,"form-label");let l="col-form-label";typeof n=="string"&&(l=`${l} ${l}-${n}`);const u=Fr(i,e,r&&"visually-hidden",n&&l);return s=s||c,n?m.jsx(Xre,{ref:a,as:"label",className:u,htmlFor:s,...o}):m.jsx(t,{ref:a,className:u,htmlFor:s,...o})});sie.displayName="FormLabel";const oie=ce.forwardRef(({bsPrefix:t,className:e,id:n,...r},i)=>{const{controlId:s}=ce.useContext(Eh);return t=ji(t,"form-range"),m.jsx("input",{...r,type:"range",ref:i,className:Fr(e,t),id:n||s})});oie.displayName="FormRange";const aie=ce.forwardRef(({bsPrefix:t,size:e,htmlSize:n,className:r,isValid:i=!1,isInvalid:s=!1,id:o,...a},c)=>{const{controlId:l}=ce.useContext(Eh);return t=ji(t,"form-select"),m.jsx("select",{...a,size:n,ref:c,className:Fr(r,t,e&&`${t}-${e}`,i&&"is-valid",s&&"is-invalid"),id:o||l})});aie.displayName="FormSelect";const cie=ce.forwardRef(({bsPrefix:t,className:e,as:n="small",muted:r,...i},s)=>(t=ji(t,"form-text"),m.jsx(n,{...i,ref:s,className:Fr(e,t,r&&"text-muted")})));cie.displayName="FormText";const lie=ce.forwardRef((t,e)=>m.jsx(u8,{...t,ref:e,type:"switch"}));lie.displayName="Switch";const hUe=Object.assign(lie,{Input:u8.Input,Label:u8.Label}),uie=ce.forwardRef(({bsPrefix:t,className:e,children:n,controlId:r,label:i,...s},o)=>(t=ji(t,"form-floating"),m.jsxs(W$,{ref:o,className:Fr(e,t),controlId:r,...s,children:[n,m.jsx("label",{htmlFor:r,children:i})]})));uie.displayName="FloatingLabel";const pUe={_ref:th.any,validated:th.bool,as:th.elementType},V$=ce.forwardRef(({className:t,validated:e,as:n="form",...r},i)=>m.jsx(n,{...r,ref:i,className:Fr(t,e&&"was-validated")}));V$.displayName="Form";V$.propTypes=pUe;const Ww=Object.assign(V$,{Group:W$,Control:fUe,Floating:iie,Check:u8,Switch:hUe,Label:sie,Text:cie,Range:oie,Select:aie,FloatingLabel:uie}),j9=ce.forwardRef(({className:t,bsPrefix:e,as:n="span",...r},i)=>(e=ji(e,"input-group-text"),m.jsx(n,{ref:i,className:Fr(t,e),...r})));j9.displayName="InputGroupText";const mUe=t=>m.jsx(j9,{children:m.jsx(h4,{type:"checkbox",...t})}),gUe=t=>m.jsx(j9,{children:m.jsx(h4,{type:"radio",...t})}),die=ce.forwardRef(({bsPrefix:t,size:e,hasValidation:n,className:r,as:i="div",...s},o)=>{t=ji(t,"input-group");const a=ce.useMemo(()=>({}),[]);return m.jsx(tie.Provider,{value:a,children:m.jsx(i,{ref:o,...s,className:Fr(r,t,e&&`${t}-${e}`,n&&"has-validation")})})});die.displayName="InputGroup";const Vw=Object.assign(die,{Text:j9,Radio:gUe,Checkbox:mUe});var vA;function Xq(t){if((!vA&&vA!==0||t)&&Fb){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),vA=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return vA}function Hk(t){t===void 0&&(t=B9());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function wUe(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const eG=uUe("modal-open");class q${constructor({ownerDocument:e,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return wUe(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",i=this.getElement();e.style={overflow:i.style.overflow,[r]:i.style[r]},e.scrollBarWidth&&(n[r]=`${parseInt(bg(i,r)||"0",10)+e.scrollBarWidth}px`),i.setAttribute(eG,""),bg(i,n)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const n=this.getElement();n.removeAttribute(eG),Object.assign(n.style,e.style)}add(e){let n=this.modals.indexOf(e);return n!==-1||(n=this.modals.length,this.modals.push(e),this.setModalAttributes(e),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(e){const n=this.modals.indexOf(e);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}const Wk=(t,e)=>Fb?t==null?(e||B9()).body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),t&&("nodeType"in t||t.getBoundingClientRect)?t:null):null;function yUe(t,e){const n=H$(),[r,i]=ce.useState(()=>Wk(t,n==null?void 0:n.document));if(!r){const s=Wk(t);s&&i(s)}return ce.useEffect(()=>{},[e,r]),ce.useEffect(()=>{const s=Wk(t);s!==r&&i(s)},[t,r]),r}function vUe({children:t,in:e,onExited:n,mountOnEnter:r,unmountOnExit:i}){const s=ce.useRef(null),o=ce.useRef(e),a=td(n);ce.useEffect(()=>{e?o.current=!0:a(s.current)},[e,a]);const c=d4(s,t.ref),l=ce.cloneElement(t,{ref:c});return e?l:i||!o.current&&r?null:l}function bUe(t){return t.code==="Escape"||t.keyCode===27}function xUe(){const t=ce.version.split(".");return{major:+t[0],minor:+t[1],patch:+t[2]}}const _Ue=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function AUe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function EUe(t){let{onEnter:e,onEntering:n,onEntered:r,onExit:i,onExiting:s,onExited:o,addEndListener:a,children:c}=t,l=AUe(t,_Ue);const{major:u}=xUe(),d=u>=19?c.props.ref:c.ref,h=ce.useRef(null),g=d4(h,typeof c=="function"?null:d),w=$=>C=>{$&&h.current&&$(h.current,C)},v=ce.useCallback(w(e),[e]),_=ce.useCallback(w(n),[n]),T=ce.useCallback(w(r),[r]),b=ce.useCallback(w(i),[i]),k=ce.useCallback(w(s),[s]),D=ce.useCallback(w(o),[o]),O=ce.useCallback(w(a),[a]);return Object.assign({},l,{nodeRef:h},e&&{onEnter:v},n&&{onEntering:_},r&&{onEntered:T},i&&{onExit:b},s&&{onExiting:k},o&&{onExited:D},a&&{addEndListener:O},{children:typeof c=="function"?($,C)=>c($,Object.assign({},C,{ref:g})):ce.cloneElement(c,{ref:g})})}const CUe=["component"];function SUe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}const TUe=ce.forwardRef((t,e)=>{let{component:n}=t,r=SUe(t,CUe);const i=EUe(r);return m.jsx(n,Object.assign({ref:e},i))});function IUe({in:t,onTransition:e}){const n=ce.useRef(null),r=ce.useRef(!0),i=td(e);return Zq(()=>{if(!n.current)return;let s=!1;return i({in:t,element:n.current,initial:r.current,isStale:()=>s}),()=>{s=!0}},[t,i]),Zq(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function kUe({children:t,in:e,onExited:n,onEntered:r,transition:i}){const[s,o]=ce.useState(!e);e&&s&&o(!1);const a=IUe({in:!!e,onTransition:l=>{const u=()=>{l.isStale()||(l.in?r==null||r(l.element,l.initial):(o(!0),n==null||n(l.element)))};Promise.resolve(i(l)).then(u,d=>{throw l.in||o(!0),d})}}),c=d4(a,t.ref);return s&&!e?null:ce.cloneElement(t,{ref:c})}function tG(t,e,n){return t?m.jsx(TUe,Object.assign({},n,{component:t})):e?m.jsx(kUe,Object.assign({},n,{transition:e})):m.jsx(vUe,Object.assign({},n))}const RUe=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function NUe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}let Vk;function PUe(t){return Vk||(Vk=new q$({ownerDocument:t==null?void 0:t.document})),Vk}function OUe(t){const e=H$(),n=t||PUe(e),r=ce.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:ce.useCallback(i=>{r.current.dialog=i},[]),setBackdropRef:ce.useCallback(i=>{r.current.backdrop=i},[])})}const fie=ce.forwardRef((t,e)=>{let{show:n=!1,role:r="dialog",className:i,style:s,children:o,backdrop:a=!0,keyboard:c=!0,onBackdropClick:l,onEscapeKeyDown:u,transition:d,runTransition:h,backdropTransition:g,runBackdropTransition:w,autoFocus:v=!0,enforceFocus:_=!0,restoreFocus:T=!0,restoreFocusOptions:b,renderDialog:k,renderBackdrop:D=Ue=>m.jsx("div",Object.assign({},Ue)),manager:O,container:$,onShow:C,onHide:A=()=>{},onExit:H,onExited:V,onExiting:Y,onEnter:ee,onEntering:x,onEntered:E}=t,y=NUe(t,RUe);const I=H$(),B=yUe($),M=OUe(O),W=YLe(),z=QLe(n),[P,Z]=ce.useState(!n),he=ce.useRef(null);ce.useImperativeHandle(e,()=>M,[M]),Fb&&!z&&n&&(he.current=Hk(I==null?void 0:I.document)),n&&P&&Z(!1);const ve=td(()=>{if(M.add(),L.current=c8(document,"keydown",ae),se.current=c8(document,"focus",()=>setTimeout(ge),!0),C&&C(),v){var Ue,lt;const je=Hk((Ue=(lt=M.dialog)==null?void 0:lt.ownerDocument)!=null?Ue:I==null?void 0:I.document);M.dialog&&je&&!Jq(M.dialog,je)&&(he.current=je,M.dialog.focus())}}),j=td(()=>{if(M.remove(),L.current==null||L.current(),se.current==null||se.current(),T){var Ue;(Ue=he.current)==null||Ue.focus==null||Ue.focus(b),he.current=null}});ce.useEffect(()=>{!n||!B||ve()},[n,B,ve]),ce.useEffect(()=>{P&&j()},[P,j]),Jre(()=>{j()});const ge=td(()=>{if(!_||!W()||!M.isTopModal())return;const Ue=Hk(I==null?void 0:I.document);M.dialog&&Ue&&!Jq(M.dialog,Ue)&&M.dialog.focus()}),te=td(Ue=>{Ue.target===Ue.currentTarget&&(l==null||l(Ue),a===!0&&A())}),ae=td(Ue=>{c&&bUe(Ue)&&M.isTopModal()&&(u==null||u(Ue),Ue.defaultPrevented||A())}),se=ce.useRef(),L=ce.useRef(),re=(...Ue)=>{Z(!0),V==null||V(...Ue)};if(!B)return null;const be=Object.assign({role:r,ref:M.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},y,{style:s,className:i,tabIndex:-1});let Se=k?k(be):m.jsx("div",Object.assign({},be,{children:ce.cloneElement(o,{role:"document"})}));Se=tG(d,h,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:H,onExiting:Y,onExited:re,onEnter:ee,onEntering:x,onEntered:E,children:Se});let Ie=null;return a&&(Ie=D({ref:M.setBackdropRef,onClick:te}),Ie=tG(g,w,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:Ie})),m.jsx(m.Fragment,{children:ly.createPortal(m.jsxs(m.Fragment,{children:[Ie,Se]}),B)})});fie.displayName="Modal";const DUe=Object.assign(fie,{Manager:q$});function MUe(t,e){return t.classList?t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function BUe(t,e){t.classList?t.classList.add(e):MUe(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function nG(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function $Ue(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=nG(t.className,e):t.setAttribute("class",nG(t.className&&t.className.baseVal||"",e))}const Rw={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class jUe extends q${adjustAndStore(e,n,r){const i=n.style[e];n.dataset[e]=i,bg(n,{[e]:`${parseFloat(bg(n,e))+r}px`})}restore(e,n){const r=n.dataset[e];r!==void 0&&(delete n.dataset[e],bg(n,{[e]:r}))}setContainerStyle(e){super.setContainerStyle(e);const n=this.getElement();if(BUe(n,"modal-open"),!e.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";kw(n,Rw.FIXED_CONTENT).forEach(s=>this.adjustAndStore(r,s,e.scrollBarWidth)),kw(n,Rw.STICKY_CONTENT).forEach(s=>this.adjustAndStore(i,s,-e.scrollBarWidth)),kw(n,Rw.NAVBAR_TOGGLER).forEach(s=>this.adjustAndStore(i,s,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const n=this.getElement();$Ue(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";kw(n,Rw.FIXED_CONTENT).forEach(s=>this.restore(r,s)),kw(n,Rw.STICKY_CONTENT).forEach(s=>this.restore(i,s)),kw(n,Rw.NAVBAR_TOGGLER).forEach(s=>this.restore(i,s))}}let qk;function LUe(t){return qk||(qk=new jUe(t)),qk}const hie=ce.forwardRef(({className:t,bsPrefix:e,as:n="div",...r},i)=>(e=ji(e,"modal-body"),m.jsx(n,{ref:i,className:Fr(t,e),...r})));hie.displayName="ModalBody";const pie=ce.createContext({onHide(){}}),G$=ce.forwardRef(({bsPrefix:t,className:e,contentClassName:n,centered:r,size:i,fullscreen:s,children:o,scrollable:a,...c},l)=>{t=ji(t,"modal");const u=`${t}-dialog`,d=typeof s=="string"?`${t}-fullscreen-${s}`:`${t}-fullscreen`;return m.jsx("div",{...c,ref:l,className:Fr(u,e,i&&`${t}-${i}`,r&&`${u}-centered`,a&&`${u}-scrollable`,s&&d),children:m.jsx("div",{className:Fr(`${t}-content`,n),children:o})})});G$.displayName="ModalDialog";const mie=ce.forwardRef(({className:t,bsPrefix:e,as:n="div",...r},i)=>(e=ji(e,"modal-footer"),m.jsx(n,{ref:i,className:Fr(t,e),...r})));mie.displayName="ModalFooter";const UUe=ce.forwardRef(({closeLabel:t="Close",closeVariant:e,closeButton:n=!1,onHide:r,children:i,...s},o)=>{const a=ce.useContext(pie),c=td(()=>{a==null||a.onHide(),r==null||r()});return m.jsxs("div",{ref:o,...s,children:[i,n&&m.jsx(z$,{"aria-label":t,variant:e,onClick:c})]})}),gie=ce.forwardRef(({bsPrefix:t,className:e,closeLabel:n="Close",closeButton:r=!1,...i},s)=>(t=ji(t,"modal-header"),m.jsx(UUe,{ref:s,...i,className:Fr(e,t),closeLabel:n,closeButton:r})));gie.displayName="ModalHeader";const FUe=GLe("h4"),wie=ce.forwardRef(({className:t,bsPrefix:e,as:n=FUe,...r},i)=>(e=ji(e,"modal-title"),m.jsx(n,{ref:i,className:Fr(t,e),...r})));wie.displayName="ModalTitle";function zUe(t){return m.jsx(F$,{...t,timeout:null})}function HUe(t){return m.jsx(F$,{...t,timeout:null})}const yie=ce.forwardRef(({bsPrefix:t,className:e,style:n,dialogClassName:r,contentClassName:i,children:s,dialogAs:o=G$,"data-bs-theme":a,"aria-labelledby":c,"aria-describedby":l,"aria-label":u,show:d=!1,animation:h=!0,backdrop:g=!0,keyboard:w=!0,onEscapeKeyDown:v,onShow:_,onHide:T,container:b,autoFocus:k=!0,enforceFocus:D=!0,restoreFocus:O=!0,restoreFocusOptions:$,onEntered:C,onExit:A,onExiting:H,onEnter:V,onEntering:Y,onExited:ee,backdropClassName:x,manager:E,...y},I)=>{const[B,M]=ce.useState({}),[W,z]=ce.useState(!1),P=ce.useRef(!1),Z=ce.useRef(!1),he=ce.useRef(null),[ve,j]=KLe(),ge=d4(I,j),te=td(T),ae=ELe();t=ji(t,"modal");const se=ce.useMemo(()=>({onHide:te}),[te]);function L(){return E||LUe({isRTL:ae})}function re(qe){if(!Fb)return;const X=L().getScrollbarWidth()>0,U=qe.scrollHeight>B9(qe).documentElement.clientHeight;M({paddingRight:X&&!U?Xq():void 0,paddingLeft:!X&&U?Xq():void 0})}const be=td(()=>{ve&&re(ve.dialog)});Jre(()=>{RO(window,"resize",be),he.current==null||he.current()});const Se=()=>{P.current=!0},Ie=qe=>{P.current&&ve&&qe.target===ve.dialog&&(Z.current=!0),P.current=!1},Ue=()=>{z(!0),he.current=Qre(ve.dialog,()=>{z(!1)})},lt=qe=>{qe.target===qe.currentTarget&&Ue()},je=qe=>{if(g==="static"){lt(qe);return}if(Z.current||qe.target!==qe.currentTarget){Z.current=!1;return}T==null||T()},Vt=qe=>{w?v==null||v(qe):(qe.preventDefault(),g==="static"&&Ue())},vt=(qe,X)=>{qe&&re(qe),V==null||V(qe,X)},ut=qe=>{he.current==null||he.current(),A==null||A(qe)},ft=(qe,X)=>{Y==null||Y(qe,X),Yre(window,"resize",be)},He=qe=>{qe&&(qe.style.display=""),ee==null||ee(qe),RO(window,"resize",be)},ct=ce.useCallback(qe=>m.jsx("div",{...qe,className:Fr(`${t}-backdrop`,x,!h&&"show")}),[h,x,t]),Gt={...n,...B};Gt.display="block";const ot=qe=>m.jsx("div",{role:"dialog",...qe,style:Gt,className:Fr(e,t,W&&`${t}-static`,!h&&"show"),onClick:g?je:void 0,onMouseUp:Ie,"data-bs-theme":a,"aria-label":u,"aria-labelledby":c,"aria-describedby":l,children:m.jsx(o,{...y,onMouseDown:Se,className:r,contentClassName:i,children:s})});return m.jsx(pie.Provider,{value:se,children:m.jsx(DUe,{show:d,ref:ge,backdrop:g,container:b,keyboard:!0,autoFocus:k,enforceFocus:D,restoreFocus:O,restoreFocusOptions:$,onEscapeKeyDown:Vt,onShow:_,onHide:T,onEnter:vt,onEntering:ft,onEntered:C,onExit:ut,onExiting:H,onExited:He,manager:L(),transition:h?zUe:void 0,backdropTransition:h?HUe:void 0,renderBackdrop:ct,renderDialog:ot})})});yie.displayName="Modal";const ho=Object.assign(yie,{Body:hie,Header:gie,Title:wie,Footer:mie,Dialog:G$,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),L9=ce.forwardRef(({bsPrefix:t,variant:e,animation:n="border",size:r,as:i="div",className:s,...o},a)=>{t=ji(t,"spinner");const c=`${t}-${n}`;return m.jsx(i,{ref:a,...o,className:Fr(s,c,r&&`${c}-${r}`,e&&`text-${e}`)})});L9.displayName="Spinner";const Zm=t=>t&&typeof t=="string"?`${t==null?void 0:t.substring(0,6)}...${t==null?void 0:t.substring((t==null?void 0:t.length)-6)}`:"-";function WUe(t){const e=t-1,n=e%4===0?4:e%4;let r;switch(n){case 1:r="newmoon";break;case 2:r="firstquater";break;case 3:r="fullmoon";break;case 0:r="lastquater";break;default:r="newmoon"}return r}const VUe=t=>{window.open(`https://explorer.lycanchain.com/address/${t}`,"_blank","noopener,noreferrer")},qUe=t=>{window.open(`https://explorer.lycanchain.com/tx/${t}`,"_blank","noopener,noreferrer")},h3=t=>{navigator.clipboard.writeText(t).then(()=>{console.log("copied : ",t)}).catch(e=>{})};function rG(t){try{return new URL(t),!0}catch{return!1}}function GUe(t){return t.startsWith("0x")&&(t=t.slice(2)),parseInt(t,16)}function KUe(t){const e=Math.floor(t/86400);t%=24*3600;const n=Math.floor(t/3600);t%=3600;const r=Math.floor(t/60);t%=60;const i=s=>String(s).padStart(2,"0");return`${i(e)} D : ${i(n)} H : ${i(r)} M : ${i(t)} S`}const NO=[{constant:!1,inputs:[{name:"_amount",type:"uint256"},{name:"_miningAddress",type:"address"},{name:"_name",type:"string"},{name:"_description",type:"string"}],name:"addPool",outputs:[{name:"",type:"uint256"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[{name:"_poolId",type:"uint256"}],name:"addUnremovableValidator",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_poolStakingAddress",type:"address"}],name:"claimOrderedWithdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_stakingEpochs",type:"uint256[]"},{name:"_poolStakingAddress",type:"address"}],name:"claimReward",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_unremovablePoolId",type:"uint256"}],name:"clearUnremovableValidator",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"incrementStakingEpoch",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_validatorSetContract",type:"address"},{name:"_governanceContract",type:"address"},{name:"_initialIds",type:"uint256[]"},{name:"_delegatorMinStake",type:"uint256"},{name:"_candidateMinStake",type:"uint256"},{name:"_stakingEpochDuration",type:"uint256"},{name:"_stakingEpochStartBlock",type:"uint256"},{name:"_stakeWithdrawDisallowPeriod",type:"uint256"}],name:"initialize",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_totalAmount",type:"uint256"}],name:"initialStake",outputs:[{name:"",type:"uint256"}],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[{name:"_totalAmount",type:"uint256"}],name:"initialValidatorStake",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_fromPoolStakingAddress",type:"address"},{name:"_toPoolStakingAddress",type:"address"},{name:"_amount",type:"uint256"}],name:"moveStake",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_poolStakingAddress",type:"address"},{name:"_amount",type:"int256"}],name:"orderWithdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"removeMyPool",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_poolId",type:"uint256"}],name:"removePool",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"removePools",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_minStake",type:"uint256"}],name:"setCandidateMinStake",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_minStake",type:"uint256"}],name:"setDelegatorMinStake",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_blockNumber",type:"uint256"}],name:"setStakingEpochStartBlock",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_toPoolStakingAddress",type:"address"},{name:"_amount",type:"uint256"}],name:"stake",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[{name:"_fromPoolStakingAddress",type:"address"},{name:"_amount",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_dest",type:"address"}],name:"withdrawPortis",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"fromPoolStakingAddress",type:"address"},{indexed:!0,name:"staker",type:"address"},{indexed:!0,name:"stakingEpoch",type:"uint256"},{indexed:!1,name:"nativeCoinsAmount",type:"uint256"},{indexed:!1,name:"fromPoolId",type:"uint256"}],name:"ClaimedReward",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"poolStakingAddress",type:"address"},{indexed:!0,name:"poolMiningAddress",type:"address"},{indexed:!1,name:"poolId",type:"uint256"}],name:"AddedPool",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"fromPoolStakingAddress",type:"address"},{indexed:!0,name:"staker",type:"address"},{indexed:!0,name:"stakingEpoch",type:"uint256"},{indexed:!1,name:"amount",type:"uint256"},{indexed:!1,name:"fromPoolId",type:"uint256"}],name:"ClaimedOrderedWithdrawal",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"fromPoolStakingAddress",type:"address"},{indexed:!0,name:"toPoolStakingAddress",type:"address"},{indexed:!0,name:"staker",type:"address"},{indexed:!0,name:"stakingEpoch",type:"uint256"},{indexed:!1,name:"amount",type:"uint256"},{indexed:!1,name:"fromPoolId",type:"uint256"},{indexed:!1,name:"toPoolId",type:"uint256"}],name:"MovedStake",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"fromPoolStakingAddress",type:"address"},{indexed:!0,name:"staker",type:"address"},{indexed:!0,name:"stakingEpoch",type:"uint256"},{indexed:!1,name:"amount",type:"int256"},{indexed:!1,name:"fromPoolId",type:"uint256"}],name:"OrderedWithdrawal",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"toPoolStakingAddress",type:"address"},{indexed:!0,name:"staker",type:"address"},{indexed:!0,name:"stakingEpoch",type:"uint256"},{indexed:!1,name:"amount",type:"uint256"},{indexed:!1,name:"toPoolId",type:"uint256"}],name:"PlacedStake",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"fromPoolStakingAddress",type:"address"},{indexed:!0,name:"staker",type:"address"},{indexed:!0,name:"stakingEpoch",type:"uint256"},{indexed:!1,name:"amount",type:"uint256"},{indexed:!1,name:"fromPoolId",type:"uint256"}],name:"WithdrewStake",type:"event"},{constant:!0,inputs:[],name:"areStakeAndWithdrawAllowed",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"candidateMinStake",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"delegatorMinStake",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"},{name:"",type:"address"},{name:"",type:"uint256"}],name:"delegatorStakeSnapshot",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_delegator",type:"address"},{name:"_offset",type:"uint256"},{name:"_length",type:"uint256"}],name:"getDelegatorPools",outputs:[{name:"result",type:"uint256[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_delegator",type:"address"}],name:"getDelegatorPoolsLength",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getPools",outputs:[{name:"",type:"uint256[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getPoolsInactive",outputs:[{name:"",type:"uint256[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getPoolsLikelihood",outputs:[{name:"likelihoods",type:"uint256[]"},{name:"sum",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getPoolsToBeElected",outputs:[{name:"",type:"uint256[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getPoolsToBeRemoved",outputs:[{name:"",type:"uint256[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_stakingEpochs",type:"uint256[]"},{name:"_poolStakingAddress",type:"address"},{name:"_staker",type:"address"}],name:"getRewardAmount",outputs:[{name:"rewardSum",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"governanceContract",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"isInitialized",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_poolId",type:"uint256"}],name:"isPoolActive",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"lastChangeBlock",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"MAX_CANDIDATES",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_poolStakingAddress",type:"address"},{name:"_staker",type:"address"}],name:"maxWithdrawAllowed",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_poolStakingAddress",type:"address"},{name:"_staker",type:"address"}],name:"maxWithdrawOrderAllowed",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"},{name:"",type:"address"}],name:"orderedWithdrawAmount",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"orderedWithdrawAmountTotal",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"},{name:"",type:"address"}],name:"orderWithdrawEpoch",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"},{name:"",type:"address"}],name:"poolDelegatorInactiveIndex",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"},{name:"",type:"address"}],name:"poolDelegatorIndex",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_poolId",type:"uint256"}],name:"poolDelegators",outputs:[{name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_poolId",type:"uint256"}],name:"poolDelegatorsInactive",outputs:[{name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"poolInactiveIndex",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"poolIndex",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"poolToBeElectedIndex",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"poolToBeRemovedIndex",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"},{name:"",type:"address"},{name:"",type:"uint256"}],name:"rewardWasTaken",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"},{name:"",type:"address"}],name:"stakeAmount",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_poolId",type:"uint256"},{name:"_delegatorOrZero",type:"address"}],name:"stakeAmountByCurrentEpoch",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"stakeAmountTotal",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"},{name:"",type:"address"}],name:"stakeFirstEpoch",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"},{name:"",type:"address"}],name:"stakeLastEpoch",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"stakeWithdrawDisallowPeriod",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"stakingEpoch",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"stakingEpochDuration",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"stakingEpochEndBlock",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"stakingEpochStartBlock",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"validatorSetContract",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"}],iG=[{constant:!1,inputs:[{name:"_miningAddress",type:"address"},{name:"_stakingAddress",type:"address"},{name:"_name",type:"string"},{name:"_description",type:"string"}],name:"addPool",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_poolId",type:"uint256"}],name:"addUnremovableValidator",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_poolIds",type:"uint256[]"}],name:"addUnremovableValidators",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_name",type:"string"},{name:"_description",type:"string"}],name:"changeMetadata",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_newMiningAddress",type:"address"}],name:"changeMiningAddress",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_newStakingAddress",type:"address"}],name:"changeStakingAddress",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_unremovablePoolId",type:"uint256"}],name:"clearUnremovableValidator",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"emitInitiateChange",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"finalizeChange",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_blockRewardContract",type:"address"},{name:"_governanceContract",type:"address"},{name:"_randomContract",type:"address"},{name:"_stakingContract",type:"address"},{name:"_initialMiningAddresses",type:"address[]"},{name:"_initialStakingAddresses",type:"address[]"},{name:"_firstValidatorIsUnremovable",type:"bool"}],name:"initialize",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"initUnremovableValidators",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"newValidatorSet",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_miningAddresses",type:"address[]"}],name:"removeMaliciousValidators",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_poolId",type:"uint256"},{name:"_banUntilBlock",type:"uint256"},{name:"_reason",type:"bytes32"}],name:"removeValidator",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"_maliciousMiningAddress",type:"address"},{name:"_blockNumber",type:"uint256"},{name:"",type:"bytes"}],name:"reportMalicious",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"poolId",type:"uint256"},{indexed:!0,name:"oldMiningAddress",type:"address"},{indexed:!0,name:"newMiningAddress",type:"address"}],name:"ChangedMiningAddress",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"poolId",type:"uint256"},{indexed:!0,name:"oldStakingAddress",type:"address"},{indexed:!0,name:"newStakingAddress",type:"address"}],name:"ChangedStakingAddress",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"parentHash",type:"bytes32"},{indexed:!1,name:"newSet",type:"address[]"}],name:"InitiateChange",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"reportingValidator",type:"address"},{indexed:!1,name:"maliciousValidator",type:"address"},{indexed:!0,name:"blockNumber",type:"uint256"},{indexed:!0,name:"reportingPoolId",type:"uint256"},{indexed:!0,name:"maliciousPoolId",type:"uint256"}],name:"ReportedMalicious",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"poolId",type:"uint256"},{indexed:!1,name:"name",type:"string"},{indexed:!1,name:"description",type:"string"}],name:"SetPoolMetadata",type:"event"},{constant:!0,inputs:[{name:"_miningAddress",type:"address"}],name:"areDelegatorsBanned",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_poolId",type:"uint256"}],name:"areIdDelegatorsBanned",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_miningAddress",type:"address"}],name:"banCounter",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_miningAddress",type:"address"}],name:"bannedDelegatorsUntil",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_miningAddress",type:"address"}],name:"bannedUntil",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_miningAddress",type:"address"}],name:"banReason",outputs:[{name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"blockRewardContract",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"changeRequestCount",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"emitInitiateChangeCallable",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getPendingValidators",outputs:[{name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getPendingValidatorsIds",outputs:[{name:"",type:"uint256[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getValidators",outputs:[{name:"",type:"address[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getValidatorsIds",outputs:[{name:"",type:"uint256[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"governanceContract",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"hasEverBeenMiningAddress",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"hasEverBeenStakingAddress",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"idByMiningAddress",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"idByStakingAddress",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"initiateChangeAllowed",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"isInitialized",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_miningAddress",type:"address"},{name:"_reportingValidator",type:"bool"}],name:"isReportValidatorValid",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"isUnremovableValidator",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_miningAddress",type:"address"}],name:"isValidator",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_miningAddress",type:"address"}],name:"isValidatorBanned",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"isValidatorById",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_poolId",type:"uint256"}],name:"isValidatorIdBanned",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_poolId",type:"uint256"}],name:"isValidatorOrPending",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"lastChangeBlock",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"lastPoolId",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"MAX_VALIDATORS",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"miningAddressById",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"miningAddressChangeRequest",outputs:[{name:"poolId",type:"uint256"},{name:"newMiningAddress",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"miningByStakingAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"poolDescription",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"poolName",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"randomContract",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_reportingMiningAddress",type:"address"},{name:"_maliciousMiningAddress",type:"address"},{name:"_blockNumber",type:"uint256"}],name:"reportMaliciousCallable",outputs:[{name:"callable",type:"bool"},{name:"removeReportingValidator",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_reportingMiningAddress",type:"address"},{name:"_maliciousMiningAddress",type:"address"},{name:"_blockNumber",type:"uint256"}],name:"shouldValidatorReport",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"uint256"}],name:"stakingAddressById",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"stakingByMiningAddress",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"stakingContract",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"unremovableValidator",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"unremovableValidators",outputs:[{name:"",type:"uint256[]"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_miningAddress",type:"address"}],name:"validatorCounter",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"validatorSetApplyBlock",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"validatorsToBeFinalized",outputs:[{name:"miningAddresses",type:"address[]"},{name:"forNewEpoch",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"validatorsToBeFinalizedIds",outputs:[{name:"",type:"uint256[]"}],payable:!1,stateMutability:"view",type:"function"}],YUe="0x2543a1BbE1dcb3192Dc00ed046f3d1146f805915",sG="0x3A1A1a46d2Ae1F50edEe56fEfE7385F9c71960fA",hy=6,QUe=6;var ul;(function(t){t.NUMBER="NUMBER_NUMBER",t.HEX="NUMBER_HEX",t.STR="NUMBER_STR",t.BIGINT="NUMBER_BIGINT"})(ul||(ul={}));var Ch;(function(t){t.HEX="BYTES_HEX",t.UINT8ARRAY="BYTES_UINT8ARRAY"})(Ch||(Ch={}));const Ia={number:ul.BIGINT,bytes:Ch.HEX},_n={number:ul.HEX,bytes:Ch.HEX};var Ff;(function(t){t.EARLIEST="earliest",t.LATEST="latest",t.PENDING="pending",t.SAFE="safe",t.FINALIZED="finalized"})(Ff||(Ff={}));var U3;(function(t){t.chainstart="chainstart",t.frontier="frontier",t.homestead="homestead",t.dao="dao",t.tangerineWhistle="tangerineWhistle",t.spuriousDragon="spuriousDragon",t.byzantium="byzantium",t.constantinople="constantinople",t.petersburg="petersburg",t.istanbul="istanbul",t.muirGlacier="muirGlacier",t.berlin="berlin",t.london="london",t.altair="altair",t.arrowGlacier="arrowGlacier",t.grayGlacier="grayGlacier",t.bellatrix="bellatrix",t.merge="merge",t.capella="capella",t.shanghai="shanghai"})(U3||(U3={}));const K$=Object.getPrototypeOf(Uint8Array);var oG=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};const aG=Symbol.for("web3/base-provider");class p4{static isWeb3Provider(e){return e instanceof p4||!!(e&&e[aG])}get[aG](){return!0}send(e,n){this.request(e).then(r=>{n(null,r)}).catch(r=>{n(r)})}sendAsync(e){return oG(this,void 0,void 0,function*(){return this.request(e)})}asEIP1193Provider(){const e=Object.create(this),n=e.request;return e.request=function(i){return oG(this,void 0,void 0,function*(){return(yield n(i)).result})},e.asEIP1193Provider=void 0,e}}class ZUe extends Array{constructor(e){super(),this._accountProvider=e}}const JUe=100,XUe=101,eFe=201,tFe=202,nFe=203,rFe=204,iFe=205,sFe=206,oFe=207,aFe=208,cFe=300,lFe=301,uFe=310,dFe=311,fFe=400,hFe=402,pFe=405,mFe=407,gFe=408,wFe=410,yFe=411,vFe=412,bFe=413,xFe=414,_Fe=415,AFe=416,EFe=417,CFe=418,SFe=419,TFe=420,IFe=421,kFe=422,RFe=423,NFe=424,PFe=425,OFe=426,DFe=427,MFe=428,BFe=429,$Fe=430,jFe=431,LFe=432,UFe=433,FFe=434,zFe=435,HFe=436,WFe=437,VFe=438,qFe=439,GFe=440,KFe=441,YFe=500,QFe=503,ZFe=505,JFe=506,XFe=507,eze=600,tze=602,nze=603,rze=604,ize=701,sze=702,oze=703,aze=704,cze=705,lze=706,uze=707,dze=709,fze=801,hze=802,pze=4001,mze=4100,gze=4200,wze=4900,yze=4901,vze=902,bze=903,xze=1001,_ze=1002,Aze=1003,Eze=1004,Cze=1005,Sze=1006,Tze=1008,Ize=1009,kze=1010,Rze=1011,Nze=1012,Pze=1014,Oze=1015,Dze=1100,vie=1101,Mze=1200,d8=-32700,f8=-32600,h8=-32601,p8=-32602,m8=-32603,g8=-32e3,w8=-32001,y8=-32002,v8=-32003,b8=-32004,x8=-32005,_8=-32006;class bn extends Error{constructor(e,n){super(e),Array.isArray(n)?this.cause=new F3(n):this.cause=n,this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(new.target.constructor):this.stack=new Error().stack}get innerError(){return this.cause instanceof F3?this.cause.errors:this.cause}set innerError(e){Array.isArray(e)?this.cause=new F3(e):this.cause=e}static convertToString(e,n=!1){if(e==null)return"undefined";const r=JSON.stringify(e,(i,s)=>typeof s=="bigint"?s.toString():s);return n&&["bigint","string"].includes(typeof e)?r.replace(/['\\"]+/g,""):r}toJSON(){return{name:this.name,code:this.code,message:this.message,cause:this.cause,innerError:this.cause}}}class F3 extends bn{constructor(e){super(`Multiple errors occurred: [${e.map(n=>n.message).join("], [")}]`),this.code=aFe,this.errors=e}}class qn extends bn{constructor(e,n){super(`Invalid value given "${bn.convertToString(e,!0)}". Error: ${n}.`),this.name=this.constructor.name}}class cG extends bn{constructor(){super("Private key must be 32 bytes."),this.code=ize}}class Bze extends bn{constructor(){super("Invalid Private Key, Not a valid string or uint8Array"),this.code=sze}}class $ze extends bn{constructor(e){super(`"${e}"`),this.code=hze}}class bie extends bn{constructor(){super("Invalid key derivation function"),this.code=oze}}class jze extends bn{constructor(){super("Key derivation failed - possibly wrong password"),this.code=aze}}class Lze extends bn{constructor(){super("Unsupported key store version"),this.code=cze}}class Uze extends bn{constructor(){super("Password cannot be empty"),this.code=lze}}class Fze extends bn{constructor(){super("Initialization vector must be 16 bytes"),this.code=uze}}class zze extends bn{constructor(){super("c > 1000, pbkdf2 is less secure with less iterations"),this.code=dze}}class m4 extends bn{constructor(e,n){super(e),this.code=YFe,n&&(this.errorCode=n.code,this.errorReason=n.reason)}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{errorCode:this.errorCode,errorReason:this.errorReason})}}class PO extends m4{constructor(e){super("Connection not open",e),this.code=QFe}}class Hze extends m4{constructor(e){super(`Maximum number of reconnect attempts reached! (${e})`),this.code=ZFe}}class Wze extends m4{constructor(){super("CONNECTION ERROR: Provider started to reconnect before the response got received!"),this.code=JFe}}class Vze extends m4{constructor(e){super(`Request already sent with following id: ${e}`),this.code=XFe}}class Ro extends bn{constructor(e,n){super(e),this.code=cFe,this.receipt=n}}class lG extends bn{constructor(e,n){super(`The resolver at ${e} does not implement requested method: "${n}".`),this.address=e,this.name=n,this.code=lFe}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{address:this.address,name:this.name})}}class U9 extends Ro{constructor(e){if(super(e.message||"Error"),this.name="name"in e&&e.name||this.constructor.name,this.stack="stack"in e&&e.stack||void 0,this.code=e.code,typeof e.data=="object"){let n;e.data&&"originalError"in e.data?n=e.data.originalError:n=e.data,this.data=n.data,this.cause=new U9(n)}else this.data=e.data}setDecodedProperties(e,n,r){this.errorName=e,this.errorSignature=n,this.errorArgs=r}toJSON(){let e=Object.assign(Object.assign({},super.toJSON()),{data:this.data});return this.errorName&&(e=Object.assign(Object.assign({},e),{errorName:this.errorName,errorSignature:this.errorSignature,errorArgs:this.errorArgs})),e}}class xg extends Ro{constructor(e){super("Error happened while trying to execute a function inside a smart contract"),this.code=uFe,this.cause=new U9(e)}}class qze extends qn{constructor(e){var n,r;super(`data: ${(n=e.data)!==null&&n!==void 0?n:"undefined"}, input: ${(r=e.input)!==null&&r!==void 0?r:"undefined"}`,`You can't have "data" and "input" as properties of a contract at the same time, please use either "data" or "input" instead.`),this.code=dFe}}class Gze extends bn{constructor(e){super(`ENS is not supported on network ${e}`),this.code=vze}}class Kze extends bn{constructor(){super("Network not synced"),this.code=bze}}class uG extends bn{constructor(e){super(`Invalid parameters passed. "${typeof e<"u"?e:""}"`),this.hint=e,this.code=oFe}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{hint:this.hint})}}class OO extends bn{constructor(){super(...arguments),this.code=eFe}}class xf extends bn{constructor(){super("The method you're trying to call is not implemented."),this.code=tFe}}class xie extends bn{constructor(){super(...arguments),this.code=nFe}}class Yze extends bn{constructor(){super(...arguments),this.code=rFe}}class sr extends bn{constructor(e,n){super(e),this.code=iFe,this.props=n??{}}}class Qze extends bn{constructor(e){super(`A plugin with the namespace: ${e} has already been registered.`),this.code=sFe}}class oE extends bn{constructor(){super(...arguments),this.code=eze}}class DO extends bn{constructor(e){super(`Client URL "${e}" is invalid.`),this.code=tze}}class Pf extends bn{constructor(){super(...arguments),this.code=nze}}class Zze extends bn{constructor(){super(...arguments),this.code=rze}}class Jze extends qn{constructor(){super(...arguments),this.code=fze}}class Y$ extends bn{constructor(e,n){super(e),this.receipt=n,this.code=fFe}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{receipt:this.receipt})}}class A8 extends bn{constructor(e,n,r,i){super(`Transaction has been reverted by the EVM${r===void 0?"":`:
 ${bn.convertToString(r)}`}`),this.reason=e,this.signature=n,this.receipt=r,this.data=i,this.code=hFe}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reason:this.reason,signature:this.signature,receipt:this.receipt,data:this.data})}}class _ie extends A8{constructor(e,n,r,i,s,o,a){super(e),this.reason=e,this.customErrorName=n,this.customErrorDecodedSignature=r,this.customErrorArguments=i,this.signature=s,this.receipt=o,this.data=a,this.code=VFe}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reason:this.reason,customErrorName:this.customErrorName,customErrorDecodedSignature:this.customErrorDecodedSignature,customErrorArguments:this.customErrorArguments,signature:this.signature,receipt:this.receipt,data:this.data})}}class Aie extends Y${constructor(e){super(`Transaction has been reverted by the EVM${e===void 0?"":`:
 ${bn.convertToString(e)}`}`,e),this.code=pFe}}class Xze extends Y${constructor(){super("Raw transaction undefined"),this.code=mFe}}class dG extends Y${constructor(){super("Transaction not found"),this.code=$Fe}}class eHe extends qn{constructor(e){super(e,"invalid transaction with invalid sender"),this.code=gFe}}class tHe extends qn{constructor(e){super(e,"invalid transaction with invalid receiver"),this.code=WFe}}class nHe extends qn{constructor(){super("MissingCustomChainError","If tx.common is provided it must have tx.common.customChain"),this.code=wFe}}class rHe extends qn{constructor(){super("MissingCustomChainIdError","If tx.common is provided it must have tx.common.customChain and tx.common.customChain.chainId"),this.code=yFe}}class iHe extends qn{constructor(e){super(JSON.stringify(e),"Chain Id doesnt match in tx.chainId tx.common.customChain.chainId"),this.code=vFe}}class sHe extends qn{constructor(e){super(JSON.stringify(e),"Chain doesnt match in tx.chain tx.common.basechain"),this.code=zFe}}class oHe extends qn{constructor(e){super(JSON.stringify(e),"hardfork doesnt match in tx.hardfork tx.common.hardfork"),this.code=HFe}}class aHe extends qn{constructor(){super("CommonOrChainAndHardforkError","Please provide the common object or the chain and hardfork property but not all together."),this.code=bFe}}class cHe extends qn{constructor(e){var n,r;super("MissingChainOrHardforkError",`When specifying chain and hardfork, both values must be defined. Received "chain": ${(n=e.chain)!==null&&n!==void 0?n:"undefined"}, "hardfork": ${(r=e.hardfork)!==null&&r!==void 0?r:"undefined"}`),this.code=xFe}}class lHe extends bn{constructor(){super('Missing properties in transaction, either define "gas" and "gasPrice" for type 0 transactions or "gas", "maxPriorityFeePerGas" and "maxFeePerGas" for type 2 transactions'),this.code=GFe}}class uHe extends qn{constructor(e){var n,r,i,s;super(`gas: ${(n=e.gas)!==null&&n!==void 0?n:"undefined"}, gasPrice: ${(r=e.gasPrice)!==null&&r!==void 0?r:"undefined"}, maxPriorityFeePerGas: ${(i=e.maxPriorityFeePerGas)!==null&&i!==void 0?i:"undefined"}, maxFeePerGas: ${(s=e.maxFeePerGas)!==null&&s!==void 0?s:"undefined"}`,'"gas" is missing'),this.code=_Fe,this.cause=new lHe}}class dHe extends bn{constructor(){super('Missing properties in transaction, either define "gas" and "gasPrice" for type 0 transactions or "gas", "maxPriorityFeePerGas" and "maxFeePerGas" for type 2 transactions, not both'),this.code=KFe}}class fHe extends qn{constructor(e){var n,r,i,s;super(`gas: ${(n=e.gas)!==null&&n!==void 0?n:"undefined"}, gasPrice: ${(r=e.gasPrice)!==null&&r!==void 0?r:"undefined"}, maxPriorityFeePerGas: ${(i=e.maxPriorityFeePerGas)!==null&&i!==void 0?i:"undefined"}, maxFeePerGas: ${(s=e.maxFeePerGas)!==null&&s!==void 0?s:"undefined"}`,"transaction must specify legacy or fee market gas properties, not both"),this.code=FFe,this.cause=new dHe}}class hHe extends qn{constructor(e){var n,r;super(`gas: ${(n=e.gas)!==null&&n!==void 0?n:"undefined"}, gasPrice: ${(r=e.gasPrice)!==null&&r!==void 0?r:"undefined"}`,"Gas or gasPrice is lower than 0"),this.code=AFe}}class pHe extends qn{constructor(e){var n,r;super(`maxPriorityFeePerGas: ${(n=e.maxPriorityFeePerGas)!==null&&n!==void 0?n:"undefined"}, maxFeePerGas: ${(r=e.maxFeePerGas)!==null&&r!==void 0?r:"undefined"}`,"maxPriorityFeePerGas or maxFeePerGas is lower than 0"),this.code=EFe}}class mHe extends qn{constructor(e){super(e,"eip-1559 transactions don't support gasPrice"),this.code=CFe}}class Eie extends qn{constructor(e){var n,r;super(`maxPriorityFeePerGas: ${(n=e.maxPriorityFeePerGas)!==null&&n!==void 0?n:"undefined"}, maxFeePerGas: ${(r=e.maxFeePerGas)!==null&&r!==void 0?r:"undefined"}`,"pre-eip-1559 transaction don't support maxFeePerGas/maxPriorityFeePerGas"),this.code=SFe}}class gHe extends qn{constructor(e){super(e,"invalid transaction object"),this.code=TFe}}class wHe extends qn{constructor(e){var n,r;super(`nonce: ${(n=e.nonce)!==null&&n!==void 0?n:"undefined"}, chainId: ${(r=e.chainId)!==null&&r!==void 0?r:"undefined"}`,"Nonce or chainId is lower than 0"),this.code=IFe}}class yHe extends qn{constructor(){super("UnableToPopulateNonceError","unable to populate nonce, no from address available"),this.code=kFe}}class vHe extends qn{constructor(){super("Eip1559NotSupportedError","Network doesn't support eip-1559"),this.code=RFe}}class fG extends qn{constructor(e){super(e,"unsupported transaction type"),this.code=NFe}}class Cie extends qn{constructor(e){var n,r;super(`data: ${(n=e.data)!==null&&n!==void 0?n:"undefined"}, input: ${(r=e.input)!==null&&r!==void 0?r:"undefined"}`,`You can't have "data" and "input" as properties of transactions at the same time, please use either "data" or "input" instead.`),this.code=PFe}}class bHe extends bn{constructor(e){super(`The connected Ethereum Node did not respond within ${e.numberOfSeconds} seconds, please make sure your transaction was properly sent and you are connected to a healthy Node. Be aware that transaction might still be pending or mined!
	Transaction Hash: ${e.transactionHash?e.transactionHash.toString():"not available"}`),this.code=jFe}}function Sie(t){return`Please make sure your transaction was properly sent and there are no previous pending transaction for the same account. However, be aware that it might still be mined!
	Transaction Hash: ${t?t.toString():"not available"}`}class Tie extends bn{constructor(e){super(`Transaction was not mined within ${e.numberOfSeconds} seconds. ${Sie(e.transactionHash)}`),this.code=OFe}}class Iie extends bn{constructor(e){super(`Transaction started at ${e.starterBlockNumber} but was not mined within ${e.numberOfBlocks} blocks. ${Sie(e.transactionHash)}`),this.code=LFe}}class xHe extends qn{constructor(e){var n,r;super(`receipt: ${JSON.stringify(e.receipt)}, blockHash: ${(n=e.blockHash)===null||n===void 0?void 0:n.toString()}, transactionHash: ${(r=e.transactionHash)===null||r===void 0?void 0:r.toString()}`,"Receipt missing or blockHash null"),this.code=DFe}}class _He extends qn{constructor(e){super(`receipt: ${JSON.stringify(e.receipt)}`,"Receipt missing block number"),this.code=MFe}}class MO extends bn{constructor(e){super(`Invalid signature. "${e}"`),this.code=UFe}}class hG extends qn{constructor(){super("LocalWalletNotAvailableError","Attempted to index account in local wallet, but no wallet is available"),this.code=BFe}}class AHe extends bn{constructor(e,n){const r=[];e.forEach(i=>r.push(i.keyword)),super(`The following properties are invalid for the transaction type ${n}: ${r.join(", ")}`),this.code=qFe}}class Dy extends qn{constructor(e){super(e,"can not parse as byte data"),this.code=_ze}}class Q$ extends qn{constructor(e){super(e,"can not parse as number data"),this.code=Aze}}class Z$ extends qn{constructor(e){super(e,"invalid ethereum address"),this.code=Cze}}class EHe extends qn{constructor(e){super(e,"not a valid string"),this.code=xze}}class kie extends qn{constructor(e){super(e,"invalid unit"),this.code=Eze}}class Rie extends qn{constructor(e){super(e,"not a valid unit. Must be a positive integer"),this.code=Oze}}class CHe extends qn{constructor(e){super(e,"can not be converted to hex"),this.code=Sze}}class Nie extends qn{constructor(e){super(e,"value greater than the nibble width"),this.code=Pze}}class J$ extends qn{constructor(e){super(e,"not a valid boolean."),this.code=Tze}}class SHe extends qn{constructor(e){super(e,"not a valid unsigned integer."),this.code=Ize}}class pG extends qn{constructor(e){super(e,"invalid size given."),this.code=kze}}class mG extends qn{constructor(e){super(e,"value is larger than size."),this.code=Rze}}class THe extends qn{constructor(e){super(e,"invalid string given"),this.code=Nze}}const IHe=t=>!Array.isArray(t)&&t.jsonrpc==="2.0"&&!!t&&(t.result===void 0||t.result===null)&&"error"in t&&(typeof t.id=="number"||typeof t.id=="string"),gG=t=>IHe(t)?t.error.message:"";class zf extends bn{constructor(e,n,r){var i;super(n??`Returned error: ${Array.isArray(e)?e.map(o=>gG(o)).join(","):gG(e)}`),this.code=JUe,n||(this.data=Array.isArray(e)?e.map(o=>{var a;return(a=o.error)===null||a===void 0?void 0:a.data}):(i=e==null?void 0:e.error)===null||i===void 0?void 0:i.data),this.request=r;let s;"error"in e?s=e.error:e instanceof Array&&(s=e.filter(o=>o.error).map(o=>o.error)),Array.isArray(s)&&s.length>0?this.cause=new F3(s):this.cause=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{data:this.data,request:this.request})}}class F9 extends zf{constructor(e,n){super(e,void 0,n),this.code=XUe;let r;"error"in e?r=e.error:e instanceof Array&&(r=e.map(i=>i.error)),Array.isArray(r)?this.cause=new F3(r):this.cause=r}}class wG extends bn{constructor(e,n){super(`Web3Config hardfork doesnt match in defaultHardfork ${e} and common.hardfork ${n}`),this.code=vie}}class yG extends bn{constructor(e,n){super(`Web3Config chain doesnt match in defaultHardfork ${e} and common.hardfork ${n}`),this.code=vie}}const Pie="An Rpc error has occured with a code of *code*",po={[d8]:{message:"Parse error",description:"Invalid JSON"},[f8]:{message:"Invalid request",description:"JSON is not a valid request object	"},[h8]:{message:"Method not found",description:"Method does not exist	"},[p8]:{message:"Invalid params",description:"Invalid method parameters"},[m8]:{message:"Internal error",description:"Internal JSON-RPC error"},[g8]:{message:"Invalid input",description:"Missing or invalid parameters"},[w8]:{message:"Resource not found",description:"Requested resource not found"},[y8]:{message:"Resource unavailable",description:"Requested resource not available"},[v8]:{message:"Transaction rejected",description:"Transaction creation failed"},[b8]:{message:"Method not supported",description:"Method is not implemented"},[x8]:{message:"Limit exceeded",description:"Request exceeds defined limit"},[_8]:{message:"JSON-RPC version not supported",description:"Version of JSON-RPC protocol is not supported"},[pze]:{name:"User Rejected Request",message:"The user rejected the request."},[mze]:{name:"Unauthorized",message:"The requested method and/or account has not been authorized by the user."},[gze]:{name:"Unsupported Method",message:"The Provider does not support the requested method."},[wze]:{name:"Disconnected",message:"The Provider is disconnected from all chains."},[yze]:{name:"Chain Disconnected",message:"The Provider is not connected to the requested chain."},"0-999":{name:"",message:"Not used."},1e3:{name:"Normal Closure",message:"The connection successfully completed the purpose for which it was created."},1001:{name:"Going Away",message:"The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection."},1002:{name:"Protocol error",message:"The endpoint is terminating the connection due to a protocol error."},1003:{name:"Unsupported Data",message:"The connection is being terminated because the endpoint received data of a type it cannot accept. (For example, a text-only endpoint received binary data.)"},1004:{name:"Reserved",message:"Reserved. A meaning might be defined in the future."},1005:{name:"No Status Rcvd",message:"Reserved. Indicates that no status code was provided even though one was expected."},1006:{name:"Abnormal Closure",message:"Reserved. Indicates that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected."},1007:{name:"Invalid frame payload data",message:"The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message)."},1008:{name:"Policy Violation",message:"The endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable."},1009:{name:"Message Too Big",message:"The endpoint is terminating the connection because a data frame was received that is too large."},1010:{name:"Mandatory Ext.",message:"The client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't."},1011:{name:"Internal Error",message:"The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request."},1012:{name:"Service Restart",message:"The server is terminating the connection because it is restarting."},1013:{name:"Try Again Later",message:"The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients."},1014:{name:"Bad Gateway",message:"The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code."},1015:{name:"TLS handshake",message:"Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified)."},"1016-2999":{name:"",message:"For definition by future revisions of the WebSocket Protocol specification, and for definition by extension specifications."},"3000-3999":{name:"",message:"For use by libraries, frameworks, and applications. These status codes are registered directly with IANA. The interpretation of these codes is undefined by the WebSocket protocol."},"4000-4999":{name:"",message:"For private use, and thus can't be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by the WebSocket protocol."}};class bc extends bn{constructor(e,n){super(n??Pie.replace("*code*",e.error.code.toString())),this.code=e.error.code,this.id=e.id,this.jsonrpc=e.jsonrpc,this.jsonRpcError=e.error}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{error:this.jsonRpcError,id:this.id,jsonRpc:this.jsonrpc})}}class kHe extends bn{constructor(e,n){var r,i,s,o;if(!e)super();else if(!((r=po[e])===null||r===void 0)&&r.message)super(po[e].message);else{const a=Object.keys(po).find(c=>typeof c=="string"&&e>=parseInt(c.split("-")[0],10)&&e<=parseInt(c.split("-")[1],10));super((s=(i=po[a??""])===null||i===void 0?void 0:i.message)!==null&&s!==void 0?s:Pie.replace("*code*",(o=e==null?void 0:e.toString())!==null&&o!==void 0?o:'""'))}this.code=e,this.data=n}}class RHe extends bc{constructor(e){super(e,po[d8].message),this.code=d8}}class NHe extends bc{constructor(e){super(e,po[f8].message),this.code=f8}}class PHe extends bc{constructor(e){super(e,po[h8].message),this.code=h8}}class OHe extends bc{constructor(e){super(e,po[p8].message),this.code=p8}}class DHe extends bc{constructor(e){super(e,po[m8].message),this.code=m8}}class MHe extends bc{constructor(e){super(e,po[g8].message),this.code=g8}}class BHe extends bc{constructor(e){super(e,po[b8].message),this.code=b8}}class $He extends bc{constructor(e){super(e,po[y8].message),this.code=y8}}class jHe extends bc{constructor(e){super(e,po[w8].message),this.code=w8}}class LHe extends bc{constructor(e){super(e,po[_8].message),this.code=_8}}class UHe extends bc{constructor(e){super(e,po[v8].message),this.code=v8}}class FHe extends bc{constructor(e){super(e,po[x8].message),this.code=x8}}const Fo=new Map;Fo.set(d8,{error:RHe});Fo.set(f8,{error:NHe});Fo.set(h8,{error:PHe});Fo.set(p8,{error:OHe});Fo.set(m8,{error:DHe});Fo.set(g8,{error:MHe});Fo.set(b8,{error:BHe});Fo.set(y8,{error:$He});Fo.set(v8,{error:UHe});Fo.set(w8,{error:jHe});Fo.set(_8,{error:LHe});Fo.set(x8,{error:FHe});class zHe extends bn{constructor(e){super(`Format for the type ${e} is unsupported`),this.type=e,this.code=Mze}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type})}}const E8=RX.bytes;function Oie(t){if(!(t instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof t}`);return new TextDecoder().decode(t)}function HHe(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function WHe(t){return e=>(RX.bytes(e),t(e))}(()=>{const t=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0,e=typeof module<"u"&&typeof module.require=="function"&&module.require.bind(module);return{node:e&&!t?e("crypto"):void 0,web:t}})();const No=(()=>{const t=WHe(KN);return t.create=KN.create,t})();var gr;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const s={};for(const o of i)s[o]=o;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),o={};for(const a of s)o[a]=i[a];return t.objectValues(o)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&s.push(o);return s},t.find=(i,s)=>{for(const o of i)if(s(o))return o},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}t.joinValues=r,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(gr||(gr={}));var BO;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(BO||(BO={}));const Nt=gr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Op=t=>{switch(typeof t){case"undefined":return Nt.undefined;case"string":return Nt.string;case"number":return isNaN(t)?Nt.nan:Nt.number;case"boolean":return Nt.boolean;case"function":return Nt.function;case"bigint":return Nt.bigint;case"symbol":return Nt.symbol;case"object":return Array.isArray(t)?Nt.array:t===null?Nt.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Nt.promise:typeof Map<"u"&&t instanceof Map?Nt.map:typeof Set<"u"&&t instanceof Set?Nt.set:typeof Date<"u"&&t instanceof Date?Nt.date:Nt.object;default:return Nt.unknown}},Xe=gr.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),VHe=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class ec extends Error{constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(s){return s.message},r={_errors:[]},i=s=>{for(const o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,c=0;for(;c<o.path.length;){const l=o.path[c];c===o.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(n(o))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return i(this),r}static assert(e){if(!(e instanceof ec))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,gr.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}ec.create=t=>new ec(t);const Kv=(t,e)=>{let n;switch(t.code){case Xe.invalid_type:t.received===Nt.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case Xe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,gr.jsonStringifyReplacer)}`;break;case Xe.unrecognized_keys:n=`Unrecognized key(s) in object: ${gr.joinValues(t.keys,", ")}`;break;case Xe.invalid_union:n="Invalid input";break;case Xe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${gr.joinValues(t.options)}`;break;case Xe.invalid_enum_value:n=`Invalid enum value. Expected ${gr.joinValues(t.options)}, received '${t.received}'`;break;case Xe.invalid_arguments:n="Invalid function arguments";break;case Xe.invalid_return_type:n="Invalid function return type";break;case Xe.invalid_date:n="Invalid date";break;case Xe.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:gr.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case Xe.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case Xe.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case Xe.custom:n="Invalid input";break;case Xe.invalid_intersection_types:n="Intersection results could not be merged";break;case Xe.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case Xe.not_finite:n="Number must be finite";break;default:n=e.defaultError,gr.assertNever(t)}return{message:n}};let Die=Kv;function qHe(t){Die=t}function C8(){return Die}const S8=t=>{const{data:e,path:n,errorMaps:r,issueData:i}=t,s=[...n,...i.path||[]],o={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let a="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)a=l(o,{data:e,defaultError:a}).message;return{...i,path:s,message:a}},GHe=[];function _t(t,e){const n=C8(),r=S8({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Kv?void 0:Kv].filter(i=>!!i)});t.common.issues.push(r)}class wo{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const i of n){if(i.status==="aborted")return vn;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const i of n){const s=await i.key,o=await i.value;r.push({key:s,value:o})}return wo.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const i of n){const{key:s,value:o}=i;if(s.status==="aborted"||o.status==="aborted")return vn;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[s.value]=o.value)}return{status:e.value,value:r}}}const vn=Object.freeze({status:"aborted"}),py=t=>({status:"dirty",value:t}),zo=t=>({status:"valid",value:t}),$O=t=>t.status==="aborted",jO=t=>t.status==="dirty",kx=t=>t.status==="valid",Rx=t=>typeof Promise<"u"&&t instanceof Promise;function T8(t,e,n,r){if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Mie(t,e,n,r,i){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 e.set(t,n),n}var Zt;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(Zt||(Zt={}));var p3,m3;class Td{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const vG=(t,e)=>{if(kx(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new ec(t.common.issues);return this._error=n,this._error}}};function On(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,a)=>{var c,l;const{message:u}=t;return o.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(c=u??r)!==null&&c!==void 0?c:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(l=u??n)!==null&&l!==void 0?l:a.defaultError}},description:i}}class Wn{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Op(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Op(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new wo,ctx:{common:e.parent.common,data:e.data,parsedType:Op(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Rx(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Op(e)},s=this._parseSync({data:e,path:i.path,parent:i});return vG(i,s)}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Op(e)},i=this._parse({data:e,path:r.path,parent:r}),s=await(Rx(i)?i:Promise.resolve(i));return vG(r,s)}refine(e,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const o=e(i),a=()=>s.addIssue({code:Xe.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,i)=>e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new mu({schema:this,typeName:wn.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return fd.create(this,this._def)}nullable(){return O0.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return su.create(this,this._def)}promise(){return Qv.create(this,this._def)}or(e){return Dx.create([this,e],this._def)}and(e){return Mx.create(this,e,this._def)}transform(e){return new mu({...On(this._def),schema:this,typeName:wn.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Ux({...On(this._def),innerType:this,defaultValue:n,typeName:wn.ZodDefault})}brand(){return new X$({typeName:wn.ZodBranded,type:this,...On(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Fx({...On(this._def),innerType:this,catchValue:n,typeName:wn.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return g4.create(this,e)}readonly(){return zx.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const KHe=/^c[^\s-]{8,}$/i,YHe=/^[0-9a-z]+$/,QHe=/^[0-9A-HJKMNP-TV-Z]{26}$/,ZHe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,JHe=/^[a-z0-9_-]{21}$/i,XHe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,eWe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,tWe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Gk;const nWe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,rWe=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,iWe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Bie="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",sWe=new RegExp(`^${Bie}$`);function $ie(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function oWe(t){return new RegExp(`^${$ie(t)}$`)}function jie(t){let e=`${Bie}T${$ie(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function aWe(t,e){return!!((e==="v4"||!e)&&nWe.test(t)||(e==="v6"||!e)&&rWe.test(t))}class eu extends Wn{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Nt.string){const s=this._getOrReturnCtx(e);return _t(s,{code:Xe.invalid_type,expected:Nt.string,received:s.parsedType}),vn}const r=new wo;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),_t(i,{code:Xe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),_t(i,{code:Xe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const o=e.data.length>s.value,a=e.data.length<s.value;(o||a)&&(i=this._getOrReturnCtx(e,i),o?_t(i,{code:Xe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&_t(i,{code:Xe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")eWe.test(e.data)||(i=this._getOrReturnCtx(e,i),_t(i,{validation:"email",code:Xe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Gk||(Gk=new RegExp(tWe,"u")),Gk.test(e.data)||(i=this._getOrReturnCtx(e,i),_t(i,{validation:"emoji",code:Xe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")ZHe.test(e.data)||(i=this._getOrReturnCtx(e,i),_t(i,{validation:"uuid",code:Xe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")JHe.test(e.data)||(i=this._getOrReturnCtx(e,i),_t(i,{validation:"nanoid",code:Xe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")KHe.test(e.data)||(i=this._getOrReturnCtx(e,i),_t(i,{validation:"cuid",code:Xe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")YHe.test(e.data)||(i=this._getOrReturnCtx(e,i),_t(i,{validation:"cuid2",code:Xe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")QHe.test(e.data)||(i=this._getOrReturnCtx(e,i),_t(i,{validation:"ulid",code:Xe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),_t(i,{validation:"url",code:Xe.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),_t(i,{validation:"regex",code:Xe.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),_t(i,{code:Xe.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),_t(i,{code:Xe.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),_t(i,{code:Xe.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?jie(s).test(e.data)||(i=this._getOrReturnCtx(e,i),_t(i,{code:Xe.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?sWe.test(e.data)||(i=this._getOrReturnCtx(e,i),_t(i,{code:Xe.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?oWe(s).test(e.data)||(i=this._getOrReturnCtx(e,i),_t(i,{code:Xe.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?XHe.test(e.data)||(i=this._getOrReturnCtx(e,i),_t(i,{validation:"duration",code:Xe.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?aWe(e.data,s.version)||(i=this._getOrReturnCtx(e,i),_t(i,{validation:"ip",code:Xe.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?iWe.test(e.data)||(i=this._getOrReturnCtx(e,i),_t(i,{validation:"base64",code:Xe.invalid_string,message:s.message}),r.dirty()):gr.assertNever(s);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),{validation:n,code:Xe.invalid_string,...Zt.errToObj(r)})}_addCheck(e){return new eu({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Zt.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Zt.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Zt.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Zt.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Zt.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Zt.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Zt.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Zt.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Zt.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Zt.errToObj(e)})}datetime(e){var n,r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(r=e==null?void 0:e.local)!==null&&r!==void 0?r:!1,...Zt.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...Zt.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...Zt.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...Zt.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...Zt.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...Zt.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...Zt.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...Zt.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...Zt.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...Zt.errToObj(n)})}nonempty(e){return this.min(1,Zt.errToObj(e))}trim(){return new eu({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new eu({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new eu({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}eu.create=t=>{var e;return new eu({checks:[],typeName:wn.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...On(t)})};function cWe(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,s=parseInt(t.toFixed(i).replace(".","")),o=parseInt(e.toFixed(i).replace(".",""));return s%o/Math.pow(10,i)}class R0 extends Wn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Nt.number){const s=this._getOrReturnCtx(e);return _t(s,{code:Xe.invalid_type,expected:Nt.number,received:s.parsedType}),vn}let r;const i=new wo;for(const s of this._def.checks)s.kind==="int"?gr.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),_t(r,{code:Xe.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),_t(r,{code:Xe.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),_t(r,{code:Xe.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?cWe(e.data,s.value)!==0&&(r=this._getOrReturnCtx(e,r),_t(r,{code:Xe.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),_t(r,{code:Xe.not_finite,message:s.message}),i.dirty()):gr.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Zt.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Zt.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Zt.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Zt.toString(n))}setLimit(e,n,r,i){return new R0({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Zt.toString(i)}]})}_addCheck(e){return new R0({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Zt.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Zt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Zt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Zt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Zt.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Zt.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:Zt.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Zt.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Zt.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&gr.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}R0.create=t=>new R0({checks:[],typeName:wn.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...On(t)});class N0 extends Wn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==Nt.bigint){const s=this._getOrReturnCtx(e);return _t(s,{code:Xe.invalid_type,expected:Nt.bigint,received:s.parsedType}),vn}let r;const i=new wo;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),_t(r,{code:Xe.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),_t(r,{code:Xe.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),_t(r,{code:Xe.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):gr.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,Zt.toString(n))}gt(e,n){return this.setLimit("min",e,!1,Zt.toString(n))}lte(e,n){return this.setLimit("max",e,!0,Zt.toString(n))}lt(e,n){return this.setLimit("max",e,!1,Zt.toString(n))}setLimit(e,n,r,i){return new N0({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Zt.toString(i)}]})}_addCheck(e){return new N0({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Zt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Zt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Zt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Zt.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:Zt.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}N0.create=t=>{var e;return new N0({checks:[],typeName:wn.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...On(t)})};class Nx extends Wn{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Nt.boolean){const r=this._getOrReturnCtx(e);return _t(r,{code:Xe.invalid_type,expected:Nt.boolean,received:r.parsedType}),vn}return zo(e.data)}}Nx.create=t=>new Nx({typeName:wn.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...On(t)});class c1 extends Wn{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Nt.date){const s=this._getOrReturnCtx(e);return _t(s,{code:Xe.invalid_type,expected:Nt.date,received:s.parsedType}),vn}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return _t(s,{code:Xe.invalid_date}),vn}const r=new wo;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),_t(i,{code:Xe.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),_t(i,{code:Xe.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):gr.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new c1({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:Zt.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:Zt.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}c1.create=t=>new c1({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:wn.ZodDate,...On(t)});class I8 extends Wn{_parse(e){if(this._getType(e)!==Nt.symbol){const r=this._getOrReturnCtx(e);return _t(r,{code:Xe.invalid_type,expected:Nt.symbol,received:r.parsedType}),vn}return zo(e.data)}}I8.create=t=>new I8({typeName:wn.ZodSymbol,...On(t)});class Px extends Wn{_parse(e){if(this._getType(e)!==Nt.undefined){const r=this._getOrReturnCtx(e);return _t(r,{code:Xe.invalid_type,expected:Nt.undefined,received:r.parsedType}),vn}return zo(e.data)}}Px.create=t=>new Px({typeName:wn.ZodUndefined,...On(t)});class Ox extends Wn{_parse(e){if(this._getType(e)!==Nt.null){const r=this._getOrReturnCtx(e);return _t(r,{code:Xe.invalid_type,expected:Nt.null,received:r.parsedType}),vn}return zo(e.data)}}Ox.create=t=>new Ox({typeName:wn.ZodNull,...On(t)});class Yv extends Wn{constructor(){super(...arguments),this._any=!0}_parse(e){return zo(e.data)}}Yv.create=t=>new Yv({typeName:wn.ZodAny,...On(t)});class _g extends Wn{constructor(){super(...arguments),this._unknown=!0}_parse(e){return zo(e.data)}}_g.create=t=>new _g({typeName:wn.ZodUnknown,...On(t)});class Sh extends Wn{_parse(e){const n=this._getOrReturnCtx(e);return _t(n,{code:Xe.invalid_type,expected:Nt.never,received:n.parsedType}),vn}}Sh.create=t=>new Sh({typeName:wn.ZodNever,...On(t)});class k8 extends Wn{_parse(e){if(this._getType(e)!==Nt.undefined){const r=this._getOrReturnCtx(e);return _t(r,{code:Xe.invalid_type,expected:Nt.void,received:r.parsedType}),vn}return zo(e.data)}}k8.create=t=>new k8({typeName:wn.ZodVoid,...On(t)});class su extends Wn{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==Nt.array)return _t(n,{code:Xe.invalid_type,expected:Nt.array,received:n.parsedType}),vn;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,a=n.data.length<i.exactLength.value;(o||a)&&(_t(n,{code:o?Xe.too_big:Xe.too_small,minimum:a?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(_t(n,{code:Xe.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(_t(n,{code:Xe.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>i.type._parseAsync(new Td(n,o,n.path,a)))).then(o=>wo.mergeArray(r,o));const s=[...n.data].map((o,a)=>i.type._parseSync(new Td(n,o,n.path,a)));return wo.mergeArray(r,s)}get element(){return this._def.type}min(e,n){return new su({...this._def,minLength:{value:e,message:Zt.toString(n)}})}max(e,n){return new su({...this._def,maxLength:{value:e,message:Zt.toString(n)}})}length(e,n){return new su({...this._def,exactLength:{value:e,message:Zt.toString(n)}})}nonempty(e){return this.min(1,e)}}su.create=(t,e)=>new su({type:t,minLength:null,maxLength:null,exactLength:null,typeName:wn.ZodArray,...On(e)});function qw(t){if(t instanceof _i){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=fd.create(qw(r))}return new _i({...t._def,shape:()=>e})}else return t instanceof su?new su({...t._def,type:qw(t.element)}):t instanceof fd?fd.create(qw(t.unwrap())):t instanceof O0?O0.create(qw(t.unwrap())):t instanceof Id?Id.create(t.items.map(e=>qw(e))):t}class _i extends Wn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=gr.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==Nt.object){const l=this._getOrReturnCtx(e);return _t(l,{code:Xe.invalid_type,expected:Nt.object,received:l.parsedType}),vn}const{status:r,ctx:i}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Sh&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||a.push(l);const c=[];for(const l of o){const u=s[l],d=i.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Td(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Sh){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of a)c.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(l==="strict")a.length>0&&(_t(i,{code:Xe.unrecognized_keys,keys:a}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of a){const d=i.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Td(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,h=await u.value;l.push({key:d,value:h,alwaysSet:u.alwaysSet})}return l}).then(l=>wo.mergeObjectSync(r,l)):wo.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(e){return Zt.errToObj,new _i({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var i,s,o,a;const c=(o=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=Zt.errToObj(e).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}strip(){return new _i({...this._def,unknownKeys:"strip"})}passthrough(){return new _i({...this._def,unknownKeys:"passthrough"})}extend(e){return new _i({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new _i({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:wn.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new _i({...this._def,catchall:e})}pick(e){const n={};return gr.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new _i({...this._def,shape:()=>n})}omit(e){const n={};return gr.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new _i({...this._def,shape:()=>n})}deepPartial(){return qw(this)}partial(e){const n={};return gr.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}),new _i({...this._def,shape:()=>n})}required(e){const n={};return gr.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof fd;)s=s._def.innerType;n[r]=s}}),new _i({...this._def,shape:()=>n})}keyof(){return Lie(gr.objectKeys(this.shape))}}_i.create=(t,e)=>new _i({shape:()=>t,unknownKeys:"strip",catchall:Sh.create(),typeName:wn.ZodObject,...On(e)});_i.strictCreate=(t,e)=>new _i({shape:()=>t,unknownKeys:"strict",catchall:Sh.create(),typeName:wn.ZodObject,...On(e)});_i.lazycreate=(t,e)=>new _i({shape:t,unknownKeys:"strip",catchall:Sh.create(),typeName:wn.ZodObject,...On(e)});class Dx extends Wn{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function i(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(a=>new ec(a.ctx.common.issues));return _t(n,{code:Xe.invalid_union,unionErrors:o}),vn}if(n.common.async)return Promise.all(r.map(async s=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let s;const o=[];for(const c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(c=>new ec(c));return _t(n,{code:Xe.invalid_union,unionErrors:a}),vn}}get options(){return this._def.options}}Dx.create=(t,e)=>new Dx({options:t,typeName:wn.ZodUnion,...On(e)});const kf=t=>t instanceof $x?kf(t.schema):t instanceof mu?kf(t.innerType()):t instanceof jx?[t.value]:t instanceof P0?t.options:t instanceof Lx?gr.objectValues(t.enum):t instanceof Ux?kf(t._def.innerType):t instanceof Px?[void 0]:t instanceof Ox?[null]:t instanceof fd?[void 0,...kf(t.unwrap())]:t instanceof O0?[null,...kf(t.unwrap())]:t instanceof X$||t instanceof zx?kf(t.unwrap()):t instanceof Fx?kf(t._def.innerType):[];class z9 extends Wn{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Nt.object)return _t(n,{code:Xe.invalid_type,expected:Nt.object,received:n.parsedType}),vn;const r=this.discriminator,i=n.data[r],s=this.optionsMap.get(i);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(_t(n,{code:Xe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),vn)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const i=new Map;for(const s of n){const o=kf(s.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of o){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,s)}}return new z9({typeName:wn.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...On(r)})}}function LO(t,e){const n=Op(t),r=Op(e);if(t===e)return{valid:!0,data:t};if(n===Nt.object&&r===Nt.object){const i=gr.objectKeys(e),s=gr.objectKeys(t).filter(a=>i.indexOf(a)!==-1),o={...t,...e};for(const a of s){const c=LO(t[a],e[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(n===Nt.array&&r===Nt.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const o=t[s],a=e[s],c=LO(o,a);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===Nt.date&&r===Nt.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Mx extends Wn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=(s,o)=>{if($O(s)||$O(o))return vn;const a=LO(s.value,o.value);return a.valid?((jO(s)||jO(o))&&n.dirty(),{status:n.value,value:a.data}):(_t(r,{code:Xe.invalid_intersection_types}),vn)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,o])=>i(s,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Mx.create=(t,e,n)=>new Mx({left:t,right:e,typeName:wn.ZodIntersection,...On(n)});class Id extends Wn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Nt.array)return _t(r,{code:Xe.invalid_type,expected:Nt.array,received:r.parsedType}),vn;if(r.data.length<this._def.items.length)return _t(r,{code:Xe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),vn;!this._def.rest&&r.data.length>this._def.items.length&&(_t(r,{code:Xe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((o,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new Td(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(s).then(o=>wo.mergeArray(n,o)):wo.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new Id({...this._def,rest:e})}}Id.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Id({items:t,typeName:wn.ZodTuple,rest:null,...On(e)})};class Bx extends Wn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Nt.object)return _t(r,{code:Xe.invalid_type,expected:Nt.object,received:r.parsedType}),vn;const i=[],s=this._def.keyType,o=this._def.valueType;for(const a in r.data)i.push({key:s._parse(new Td(r,a,r.path,a)),value:o._parse(new Td(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?wo.mergeObjectAsync(n,i):wo.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof Wn?new Bx({keyType:e,valueType:n,typeName:wn.ZodRecord,...On(r)}):new Bx({keyType:eu.create(),valueType:e,typeName:wn.ZodRecord,...On(n)})}}class R8 extends Wn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Nt.map)return _t(r,{code:Xe.invalid_type,expected:Nt.map,received:r.parsedType}),vn;const i=this._def.keyType,s=this._def.valueType,o=[...r.data.entries()].map(([a,c],l)=>({key:i._parse(new Td(r,a,r.path,[l,"key"])),value:s._parse(new Td(r,c,r.path,[l,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const c of o){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return vn;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(l.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const c of o){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return vn;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(l.value,u.value)}return{status:n.value,value:a}}}}R8.create=(t,e,n)=>new R8({valueType:e,keyType:t,typeName:wn.ZodMap,...On(n)});class l1 extends Wn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Nt.set)return _t(r,{code:Xe.invalid_type,expected:Nt.set,received:r.parsedType}),vn;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(_t(r,{code:Xe.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(_t(r,{code:Xe.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function o(c){const l=new Set;for(const u of c){if(u.status==="aborted")return vn;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const a=[...r.data.values()].map((c,l)=>s._parse(new Td(r,c,r.path,l)));return r.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(e,n){return new l1({...this._def,minSize:{value:e,message:Zt.toString(n)}})}max(e,n){return new l1({...this._def,maxSize:{value:e,message:Zt.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}l1.create=(t,e)=>new l1({valueType:t,minSize:null,maxSize:null,typeName:wn.ZodSet,...On(e)});class My extends Wn{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Nt.function)return _t(n,{code:Xe.invalid_type,expected:Nt.function,received:n.parsedType}),vn;function r(a,c){return S8({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,C8(),Kv].filter(l=>!!l),issueData:{code:Xe.invalid_arguments,argumentsError:c}})}function i(a,c){return S8({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,C8(),Kv].filter(l=>!!l),issueData:{code:Xe.invalid_return_type,returnTypeError:c}})}const s={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Qv){const a=this;return zo(async function(...c){const l=new ec([]),u=await a._def.args.parseAsync(c,s).catch(g=>{throw l.addIssue(r(c,g)),l}),d=await Reflect.apply(o,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(g=>{throw l.addIssue(i(d,g)),l})})}else{const a=this;return zo(function(...c){const l=a._def.args.safeParse(c,s);if(!l.success)throw new ec([r(c,l.error)]);const u=Reflect.apply(o,this,l.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new ec([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new My({...this._def,args:Id.create(e).rest(_g.create())})}returns(e){return new My({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new My({args:e||Id.create([]).rest(_g.create()),returns:n||_g.create(),typeName:wn.ZodFunction,...On(r)})}}class $x extends Wn{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}$x.create=(t,e)=>new $x({getter:t,typeName:wn.ZodLazy,...On(e)});class jx extends Wn{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return _t(n,{received:n.data,code:Xe.invalid_literal,expected:this._def.value}),vn}return{status:"valid",value:e.data}}get value(){return this._def.value}}jx.create=(t,e)=>new jx({value:t,typeName:wn.ZodLiteral,...On(e)});function Lie(t,e){return new P0({values:t,typeName:wn.ZodEnum,...On(e)})}class P0 extends Wn{constructor(){super(...arguments),p3.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return _t(n,{expected:gr.joinValues(r),received:n.parsedType,code:Xe.invalid_type}),vn}if(T8(this,p3)||Mie(this,p3,new Set(this._def.values)),!T8(this,p3).has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return _t(n,{received:n.data,code:Xe.invalid_enum_value,options:r}),vn}return zo(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return P0.create(e,{...this._def,...n})}exclude(e,n=this._def){return P0.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}p3=new WeakMap;P0.create=Lie;class Lx extends Wn{constructor(){super(...arguments),m3.set(this,void 0)}_parse(e){const n=gr.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==Nt.string&&r.parsedType!==Nt.number){const i=gr.objectValues(n);return _t(r,{expected:gr.joinValues(i),received:r.parsedType,code:Xe.invalid_type}),vn}if(T8(this,m3)||Mie(this,m3,new Set(gr.getValidEnumValues(this._def.values))),!T8(this,m3).has(e.data)){const i=gr.objectValues(n);return _t(r,{received:r.data,code:Xe.invalid_enum_value,options:i}),vn}return zo(e.data)}get enum(){return this._def.values}}m3=new WeakMap;Lx.create=(t,e)=>new Lx({values:t,typeName:wn.ZodNativeEnum,...On(e)});class Qv extends Wn{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Nt.promise&&n.common.async===!1)return _t(n,{code:Xe.invalid_type,expected:Nt.promise,received:n.parsedType}),vn;const r=n.parsedType===Nt.promise?n.data:Promise.resolve(n.data);return zo(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Qv.create=(t,e)=>new Qv({type:t,typeName:wn.ZodPromise,...On(e)});class mu extends Wn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===wn.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:o=>{_t(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const o=i.transform(r.data,s);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return vn;const c=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return c.status==="aborted"?vn:c.status==="dirty"||n.value==="dirty"?py(c.value):c});{if(n.value==="aborted")return vn;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?vn:a.status==="dirty"||n.value==="dirty"?py(a.value):a}}if(i.type==="refinement"){const o=a=>{const c=i.refinement(a,s);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?vn:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?vn:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!kx(o))return o;const a=i.transform(o.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>kx(o)?Promise.resolve(i.transform(o.value,s)).then(a=>({status:n.value,value:a})):o);gr.assertNever(i)}}mu.create=(t,e,n)=>new mu({schema:t,typeName:wn.ZodEffects,effect:e,...On(n)});mu.createWithPreprocess=(t,e,n)=>new mu({schema:e,effect:{type:"preprocess",transform:t},typeName:wn.ZodEffects,...On(n)});class fd extends Wn{_parse(e){return this._getType(e)===Nt.undefined?zo(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}fd.create=(t,e)=>new fd({innerType:t,typeName:wn.ZodOptional,...On(e)});class O0 extends Wn{_parse(e){return this._getType(e)===Nt.null?zo(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}O0.create=(t,e)=>new O0({innerType:t,typeName:wn.ZodNullable,...On(e)});class Ux extends Wn{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===Nt.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ux.create=(t,e)=>new Ux({innerType:t,typeName:wn.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...On(e)});class Fx extends Wn{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Rx(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new ec(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ec(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Fx.create=(t,e)=>new Fx({innerType:t,typeName:wn.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...On(e)});class N8 extends Wn{_parse(e){if(this._getType(e)!==Nt.nan){const r=this._getOrReturnCtx(e);return _t(r,{code:Xe.invalid_type,expected:Nt.nan,received:r.parsedType}),vn}return{status:"valid",value:e.data}}}N8.create=t=>new N8({typeName:wn.ZodNaN,...On(t)});const lWe=Symbol("zod_brand");class X$ extends Wn{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class g4 extends Wn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?vn:s.status==="dirty"?(n.dirty(),py(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?vn:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new g4({in:e,out:n,typeName:wn.ZodPipeline})}}class zx extends Wn{_parse(e){const n=this._def.innerType._parse(e),r=i=>(kx(i)&&(i.value=Object.freeze(i.value)),i);return Rx(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}zx.create=(t,e)=>new zx({innerType:t,typeName:wn.ZodReadonly,...On(e)});function Uie(t,e={},n){return t?Yv.create().superRefine((r,i)=>{var s,o;if(!t(r)){const a=typeof e=="function"?e(r):typeof e=="string"?{message:e}:e,c=(o=(s=a.fatal)!==null&&s!==void 0?s:n)!==null&&o!==void 0?o:!0,l=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...l,fatal:c})}}):Yv.create()}const uWe={object:_i.lazycreate};var wn;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(wn||(wn={}));const dWe=(t,e={message:`Input not instance of ${t.name}`})=>Uie(n=>n instanceof t,e),Fie=eu.create,zie=R0.create,fWe=N8.create,hWe=N0.create,Hie=Nx.create,pWe=c1.create,mWe=I8.create,gWe=Px.create,wWe=Ox.create,yWe=Yv.create,vWe=_g.create,bWe=Sh.create,xWe=k8.create,_We=su.create,AWe=_i.create,EWe=_i.strictCreate,CWe=Dx.create,SWe=z9.create,TWe=Mx.create,IWe=Id.create,kWe=Bx.create,RWe=R8.create,NWe=l1.create,PWe=My.create,OWe=$x.create,DWe=jx.create,MWe=P0.create,BWe=Lx.create,$We=Qv.create,bG=mu.create,jWe=fd.create,LWe=O0.create,UWe=mu.createWithPreprocess,FWe=g4.create,zWe=()=>Fie().optional(),HWe=()=>zie().optional(),WWe=()=>Hie().optional(),VWe={string:t=>eu.create({...t,coerce:!0}),number:t=>R0.create({...t,coerce:!0}),boolean:t=>Nx.create({...t,coerce:!0}),bigint:t=>N0.create({...t,coerce:!0}),date:t=>c1.create({...t,coerce:!0})},qWe=vn;var ju=Object.freeze({__proto__:null,defaultErrorMap:Kv,setErrorMap:qHe,getErrorMap:C8,makeIssue:S8,EMPTY_PATH:GHe,addIssueToContext:_t,ParseStatus:wo,INVALID:vn,DIRTY:py,OK:zo,isAborted:$O,isDirty:jO,isValid:kx,isAsync:Rx,get util(){return gr},get objectUtil(){return BO},ZodParsedType:Nt,getParsedType:Op,ZodType:Wn,datetimeRegex:jie,ZodString:eu,ZodNumber:R0,ZodBigInt:N0,ZodBoolean:Nx,ZodDate:c1,ZodSymbol:I8,ZodUndefined:Px,ZodNull:Ox,ZodAny:Yv,ZodUnknown:_g,ZodNever:Sh,ZodVoid:k8,ZodArray:su,ZodObject:_i,ZodUnion:Dx,ZodDiscriminatedUnion:z9,ZodIntersection:Mx,ZodTuple:Id,ZodRecord:Bx,ZodMap:R8,ZodSet:l1,ZodFunction:My,ZodLazy:$x,ZodLiteral:jx,ZodEnum:P0,ZodNativeEnum:Lx,ZodPromise:Qv,ZodEffects:mu,ZodTransformer:mu,ZodOptional:fd,ZodNullable:O0,ZodDefault:Ux,ZodCatch:Fx,ZodNaN:N8,BRAND:lWe,ZodBranded:X$,ZodPipeline:g4,ZodReadonly:zx,custom:Uie,Schema:Wn,ZodSchema:Wn,late:uWe,get ZodFirstPartyTypeKind(){return wn},coerce:VWe,any:yWe,array:_We,bigint:hWe,boolean:Hie,date:pWe,discriminatedUnion:SWe,effect:bG,enum:MWe,function:PWe,instanceof:dWe,intersection:TWe,lazy:OWe,literal:DWe,map:RWe,nan:fWe,nativeEnum:BWe,never:bWe,null:wWe,nullable:LWe,number:zie,object:AWe,oboolean:WWe,onumber:HWe,optional:jWe,ostring:zWe,pipeline:FWe,preprocess:UWe,promise:$We,record:kWe,set:NWe,strictObject:EWe,string:Fie,symbol:mWe,transformer:bG,tuple:IWe,undefined:gWe,union:CWe,unknown:vWe,void:xWe,NEVER:qWe,ZodIssueCode:Xe,quotelessJson:VHe,ZodError:ec});const GWe=t=>t.message?t.message:"unspecified error";class Zv extends bn{constructor(e){super(),this.code=Dze,this.errors=e,super.message=`Web3 validator found ${e.length} error[s]:
${this._compileErrors().join(`
`)}`}_compileErrors(){return this.errors.map(GWe)}}const KWe=["bool","int","uint","bytes","string","address","tuple"],Wie=t=>typeof t=="object"&&"type"in t&&"name"in t,ej=t=>typeof t=="string",Rr=t=>typeof t=="string"&&/^((-)?0x[0-9a-f]+|(0x))$/i.test(t);function Vie(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/))}const P8=t=>typeof t=="number"||typeof t=="bigint"||typeof t=="string"&&/^((-0x|0x|-)?[0-9a-f]+|(0x))$/i.test(t);function tj(t){if(typeof t!="string")throw new Error(`[isHexPrefixed] input must be type 'string', received type ${typeof t}`);return t.startsWith("0x")}const nj=function(t){for(const[e,n]of Object.entries(t))if(n!==void 0&&n.length>0&&n[0]===0)throw new Error(`${e} cannot have leading zeroes, received: ${n.toString()}`)},YWe=["hex","number","blockNumber","blockNumberOrTag","filter","bloom"],$1=t=>{let e=t.replace(/ /,""),n,r=!1,i=[];if(t.includes("[")&&(e=e.slice(0,e.indexOf("[")),i=[...t.matchAll(/(?:\[(\d*)\])/g)].map(s=>parseInt(s[1],10)).map(s=>Number.isNaN(s)?-1:s),r=i.length>0),KWe.includes(e))return{baseType:e,isArray:r,baseTypeSize:n,arraySizes:i};if(e.startsWith("int"))n=parseInt(e.substring(3),10),e="int";else if(e.startsWith("uint"))n=parseInt(t.substring(4),10),e="uint";else if(e.startsWith("bytes"))n=parseInt(e.substring(5),10),e="bytes";else return{baseType:void 0,isArray:!1,baseTypeSize:void 0,arraySizes:i};return{baseType:e,isArray:r,baseTypeSize:n,arraySizes:i}},Kk=(t,e={})=>{if(Object.keys(e).includes("type"))throw new Zv([{keyword:"eth",message:'Either "eth" or "type" can be presented in schema',params:{eth:t},instancePath:"",schemaPath:""}]);const{baseType:r,baseTypeSize:i}=$1(t);if(!r&&!YWe.includes(t))throw new Zv([{keyword:"eth",message:`Eth data type "${t}" is not valid`,params:{eth:t},instancePath:"",schemaPath:""}]);if(r){if(r==="tuple")throw new Error('"tuple" type is not implemented directly.');return{format:`${r}${i??""}`,required:!0}}return t?{format:t,required:!0}:{}},O8=(t,e="/0")=>{const n={type:"array",items:[],maxItems:t.length,minItems:t.length};for(const[r,i]of t.entries()){let s,o,a=[];Wie(i)?(s=i.type,o=i.name||`${e}/${r}`,a=i.components):typeof i=="string"?(s=i,o=`${e}/${r}`):Array.isArray(i)&&(i[0]&&typeof i[0]=="string"&&i[0].startsWith("tuple")&&!Array.isArray(i[0])&&i[1]&&Array.isArray(i[1])?(s=i[0],o=`${e}/${r}`,a=i[1]):(s="tuple",o=`${e}/${r}`,a=i));const{baseType:c,isArray:l,arraySizes:u}=$1(s);let d,h=n;for(let g=u.length-1;g>0;g-=1)d={type:"array",$id:o,items:[],maxItems:u[g],minItems:u[g]},u[g]<0&&(delete d.maxItems,delete d.minItems),Array.isArray(h.items)?h.items.length===0?h.items=[d]:h.items.push(d):h.items=[h.items,d],h=d;if(c==="tuple"&&!l){const g=O8(a,o);g.$id=o,h.items.push(g)}else if(c==="tuple"&&l){const g=u[0],w=Object.assign({type:"array",$id:o,items:O8(a,o)},g>=0&&{minItems:g,maxItems:g});h.items.push(w)}else if(l){const g=u[0],w=Object.assign({type:"array",$id:o,items:Kk(s)},g>=0&&{minItems:g,maxItems:g});h.items.push(w)}else Array.isArray(h.items)?h.items.push(Object.assign({$id:o},Kk(s))):h.items.push(Object.assign({$id:o},Kk(s)));h=n}return n},rj=t=>O8(t),ij=(t,e)=>e===1?t:ij(t[0],e-1),z3=(t,e,n)=>{const r=[];for(const[i,s]of t.entries()){let o,a,c=[];Wie(s)?(o=s.type,a=s.name,c=s.components):typeof s=="string"?o=s:Array.isArray(s)&&(s[1]&&Array.isArray(s[1])?(o=s[0],c=s[1]):(o="tuple",c=s));const{baseType:l,isArray:u,arraySizes:d}=$1(o),h=Array.isArray(e)?e[i]:e[a];if(l==="tuple"&&!u)r.push(z3(c,h,n));else if(l==="tuple"&&u){const g=[];for(const w of h)if(d.length>1){const v=ij(w,d.length-1),_=[];for(const T of v)_.push(z3(c,T,n));g.push(_)}else g.push(z3(c,w,n));r.push(g)}else r.push(h)}return n=n??[],n.push(...r),n},qie=t=>{if(t>=48&&t<=57)return t-48;if(t>=65&&t<=70)return t-55;if(t>=97&&t<=102)return t-87;throw new Error(`Invalid code point: ${t}`)},H9=t=>{if(!Rr(t))throw new Error("Invalid hex string");const[e,n]=t.startsWith("-")?[!0,t.slice(1)]:[!1,t],r=BigInt(n);return r>Number.MAX_SAFE_INTEGER?e?-r:r:r<Number.MIN_SAFE_INTEGER?r:e?-1*Number(r):Number(r)},W9=t=>{if((typeof t=="number"||typeof t=="bigint")&&t<0)return`-0x${t.toString(16).slice(1)}`;if((typeof t=="number"||typeof t=="bigint")&&t>=0)return`0x${t.toString(16)}`;if(typeof t=="string"&&Rr(t)){const[e,n]=t.startsWith("-")?[!0,t.slice(1)]:[!1,t],r=n.split(/^(-)?0(x|X)/).slice(-1)[0];return`${e?"-":""}0x${r.replace(/^0+/,"").toLowerCase()}`}if(typeof t=="string"&&!Rr(t))return W9(BigInt(t));throw new Q$(t)},D8=(t,e,n="0")=>{if(typeof t=="string"&&!Rr(t))return t.padStart(e,n);const r=typeof t=="string"&&Rr(t)?t:W9(t),[i,s]=r.startsWith("-")?["-0x",r.slice(3)]:["0x",r.slice(2)];return`${i}${s.padStart(e,n)}`};function Bh(t){let e="0x";for(const n of t){const r=n.toString(16);e+=r.length===1?`0${r}`:r}return e}const _f={zero:48,nine:57,A:65,F:70,a:97,f:102};function xG(t){if(t>=_f.zero&&t<=_f.nine)return t-_f.zero;if(t>=_f.A&&t<=_f.F)return t-(_f.A-10);if(t>=_f.a&&t<=_f.f)return t-(_f.a-10)}function j1(t){let e=0;if(t.startsWith("0")&&(t[1]==="x"||t[1]==="X")&&(e=2),t.length%2!==0)throw new Dy(`hex string has odd length: ${t}`);const n=(t.length-e)/2,r=new Uint8Array(n);for(let i=0,s=e;i<n;i+=1){const o=xG(t.charCodeAt(s++)),a=xG(t.charCodeAt(s++));if(o===void 0||a===void 0)throw new Dy(`Invalid byte sequence ("${t[s-2]}${t[s-1]}" in "${t}").`);r[i]=o*16+a}return r}function V9(t){var e;return!(t instanceof Uint8Array)&&((e=t==null?void 0:t.constructor)===null||e===void 0?void 0:e.name)==="Uint8Array"?Uint8Array.from(t):t}const Gie=Object.freeze(Object.defineProperty({__proto__:null,abiSchemaToJsonSchema:O8,codePointToInt:qie,ensureIfUint8Array:V9,ethAbiToJsonSchema:rj,fetchArrayElement:ij,hexToNumber:H9,hexToUint8Array:j1,numberToHex:W9,padLeft:D8,parseBaseType:$1,transformJsonDataToAbiFormat:z3,uint8ArrayToHexString:Bh},Symbol.toStringTag,{value:"Module"})),UO=t=>{var e,n;return t instanceof Uint8Array||((e=t==null?void 0:t.constructor)===null||e===void 0?void 0:e.name)==="Uint8Array"||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="Buffer"},nm=(t,e={abiType:"bytes"})=>{if(typeof t!="string"&&!Array.isArray(t)&&!UO(t)||typeof t=="string"&&Rr(t)&&t.startsWith("-")||typeof t=="string"&&!Rr(t))return!1;let n;if(typeof t=="string"){if(t.length%2!==0)return!1;n=j1(t)}else if(Array.isArray(t)){if(t.some(r=>r<0||r>255||!Number.isInteger(r)))return!1;n=new Uint8Array(t)}else n=t;if(e!=null&&e.abiType){const{baseTypeSize:r}=$1(e.abiType);return r?n.length===r:!0}return e!=null&&e.size?n.length===(e==null?void 0:e.size):!0},Kie=t=>{if(!/^(0x)?[0-9a-f]{40}$/i.test(t))return!1;const e=t.slice(2),n=dv(e.toLowerCase()),r=Bh(No(V9(n))).slice(2);for(let i=0;i<40;i+=1)if(parseInt(r[i],16)>7&&e[i].toUpperCase()!==e[i]||parseInt(r[i],16)<=7&&e[i].toLowerCase()!==e[i])return!1;return!0},lc=(t,e=!0)=>{if(typeof t!="string"&&!UO(t))return!1;let n;return UO(t)?n=Bh(t):typeof t=="string"&&!Rr(t)?n=t.toLowerCase().startsWith("0x")?t:`0x${t}`:n=t,/^(0x)?[0-9a-f]{40}$/i.test(n)?/^(0x|0X)?[0-9a-f]{40}$/.test(n)||/^(0x|0X)?[0-9A-F]{40}$/.test(n)?!0:e?Kie(n):!0:!1},u1=(t,e)=>{if(e===BigInt(0))return BigInt(1);let n=t;for(let r=1;r<e;r+=1)n*=t;return n},Th=(t,e={abiType:"uint"})=>{if(!["number","string","bigint"].includes(typeof t)||typeof t=="string"&&t.length===0)return!1;let n;if(e!=null&&e.abiType){const{baseTypeSize:i}=$1(e.abiType);i&&(n=i)}else e.bitSize&&(n=e.bitSize);const r=u1(BigInt(2),BigInt(n??256))-BigInt(1);try{const i=typeof t=="string"&&Rr(t)?BigInt(H9(t)):BigInt(t);return i>=0&&i<=r}catch{return!1}},Hx=(t,e={abiType:"int"})=>{if(!["number","string","bigint"].includes(typeof t)||typeof t=="number"&&t>Number.MAX_SAFE_INTEGER)return!1;let n;if(e!=null&&e.abiType){const{baseTypeSize:s,baseType:o}=$1(e.abiType);if(o!=="int")return!1;s&&(n=s)}else e.bitSize&&(n=e.bitSize);const r=u1(BigInt(2),BigInt((n??256)-1)),i=BigInt(-1)*u1(BigInt(2),BigInt((n??256)-1));try{const s=typeof t=="string"&&Rr(t)?BigInt(H9(t)):BigInt(t);return s>=i&&s<=r}catch{return!1}},Yie=t=>!!(Hx(t)||typeof t=="string"&&/[0-9.]/.test(t)&&t.indexOf(".")===t.lastIndexOf(".")||typeof t=="number"),Qie=t=>Th(t),Bs=t=>Object.values(Ff).includes(t),FO=t=>Bs(t)||Qie(t),zb=t=>typeof t!="string"||!/^(0x)?[0-9a-f]{512}$/i.test(t)?!1:!!(/^(0x)?[0-9a-f]{512}$/.test(t)||/^(0x)?[0-9A-F]{512}$/.test(t)),q9=(t,e)=>{if(typeof e=="string"&&!Rr(e)||!zb(t))return!1;const n=typeof e=="string"?j1(e):e,r=Bh(No(n)).slice(2);for(let i=0;i<12;i+=4){const s=(parseInt(r.slice(i,i+2),16)<<8)+parseInt(r.slice(i+2,i+4),16)&2047,o=qie(t.charCodeAt(t.length-1-Math.floor(s/4))),a=1<<s%4;if((o&a)!==a)return!1}return!0},QWe=(t,e)=>{if(!zb(t)||!lc(e))return!1;const n=D8(e,64);return q9(t,n)},ZWe=(t,e)=>!zb(t)||!lc(e)?!1:q9(t,e),JWe=t=>["number","string","boolean"].includes(typeof t)?typeof t=="boolean"?!0:typeof t=="string"&&!Rr(t)?t==="1"||t==="0":typeof t=="string"&&Rr(t)?t==="0x1"||t==="0x0":t===1||t===0:!1,$e=t=>t==null,Jv=t=>typeof t=="object"&&!$e(t)&&!Array.isArray(t)&&!(t instanceof K$),M8=t=>typeof t!="string"||!/^(0x)?[0-9a-f]{64}$/i.test(t)?!1:!!(/^(0x)?[0-9a-f]{64}$/.test(t)||/^(0x)?[0-9A-F]{64}$/.test(t)),XWe=(t,e)=>!zb(t)||!M8(e)?!1:q9(t,e),eVe=t=>{const e=["fromBlock","toBlock","address","topics","blockHash"];if($e(t)||typeof t!="object"||!Object.keys(t).every(n=>e.includes(n))||!$e(t.fromBlock)&&!FO(t.fromBlock)||!$e(t.toBlock)&&!FO(t.toBlock))return!1;if(!$e(t.address)){if(Array.isArray(t.address)){if(!t.address.every(n=>lc(n)))return!1}else if(!lc(t.address))return!1}return!(!$e(t.topics)&&!t.topics.every(n=>$e(n)?!0:Array.isArray(n)?n.every(r=>M8(r)):!!M8(n)))},d1={address:t=>lc(t),bloom:t=>zb(t),blockNumber:t=>Qie(t),blockTag:t=>Bs(t),blockNumberOrTag:t=>FO(t),bool:t=>JWe(t),bytes:t=>nm(t),filter:t=>eVe(t),hex:t=>Rr(t),uint:t=>Th(t),int:t=>Hx(t),number:t=>Yie(t),string:t=>ej(t)};for(let t=8;t<=256;t+=8)d1[`int${t}`]=e=>Hx(e,{bitSize:t}),d1[`uint${t}`]=e=>Th(e,{bitSize:t});for(let t=1;t<=32;t+=1)d1[`bytes${t}`]=e=>nm(e,{size:t});d1.bytes256=d1.bytes;const g3=t=>{if((!(t!=null&&t.type)||(t==null?void 0:t.type)==="object")&&(t!=null&&t.properties)){const e={};for(const n of Object.keys(t.properties)){const r=g3(t.properties[n]);r&&(e[n]=r)}return Array.isArray(t.required)?ju.object(e).partial().required(t.required.reduce((n,r)=>Object.assign(Object.assign({},n),{[r]:!0}),{})):ju.object(e).partial()}if((t==null?void 0:t.type)==="array"&&(t!=null&&t.items)){if(Array.isArray(t.items)&&t.items.length>1&&t.maxItems!==void 0&&new Set(t.items.map(r=>r.$id)).size===t.items.length){const r=[];for(const i of t.items){const s=g3(i);s&&r.push(s)}return ju.tuple(r)}const e=Array.isArray(t.items)?t.items[0]:t.items;let n=ju.array(g3(e));return n=t.minItems!==void 0?n.min(t.minItems):n,n=t.maxItems!==void 0?n.max(t.maxItems):n,n}if(t.oneOf&&Array.isArray(t.oneOf))return ju.union(t.oneOf.map(e=>g3(e)));if(t!=null&&t.format){if(!d1[t.format])throw new zHe(t.format);return ju.any().refine(d1[t.format],e=>({params:{value:e,format:t.format}}))}return t!=null&&t.type&&(t==null?void 0:t.type)!=="object"&&typeof ju[String(t.type)]=="function"?ju[String(t.type)]():ju.object({data:ju.any()}).partial()};class my{static factory(){return my.validatorInstance||(my.validatorInstance=new my),my.validatorInstance}validate(e,n,r){var i,s;const a=g3(e).safeParse(n);if(!a.success){const c=this.convertErrors((s=(i=a.error)===null||i===void 0?void 0:i.issues)!==null&&s!==void 0?s:[]);if(c){if(r!=null&&r.silent)return c;throw new Zv(c)}}}convertErrors(e){if(e&&Array.isArray(e)&&e.length>0)return e.map(n=>{var r;let i,s,o,a;a=n.path.join("/");const c=String(n.path[n.path.length-1]),l=n.path.join("/");if(n.code===Xe.too_big)s="maxItems",a=`${l}/maxItems`,o={limit:n.maximum},i=`must NOT have more than ${n.maximum} items`;else if(n.code===Xe.too_small)s="minItems",a=`${l}/minItems`,o={limit:n.minimum},i=`must NOT have fewer than ${n.minimum} items`;else if(n.code===Xe.custom){const{value:u,format:d}=(r=n.params)!==null&&r!==void 0?r:{};typeof u>"u"?i=`value at "/${a}" is required`:i=`value "${typeof u=="object"?JSON.stringify(u):u}" at "/${a}" must pass "${d}" validation`,o={value:u}}return{keyword:s??c,instancePath:l?`/${l}`:"",schemaPath:a?`#${a}`:"#",params:o??{value:n.message},message:i??n.message}})}}class tVe{constructor(){this._validator=my.factory()}validateJSONSchema(e,n,r){return this._validator.validate(e,n,r)}validate(e,n,r={silent:!1}){var i,s;const o=rj(e);if(!(Array.isArray(o.items)&&((i=o.items)===null||i===void 0?void 0:i.length)===0&&n.length===0)){if(Array.isArray(o.items)&&((s=o.items)===null||s===void 0?void 0:s.length)===0&&n.length!==0)throw new Zv([{instancePath:"/0",schemaPath:"/",keyword:"required",message:"empty schema against data can not be validated",params:n}]);return this._validator.validate(o,n,r)}}}const yn=new tVe;function rm(t){var e,n;return t instanceof Uint8Array||((e=t==null?void 0:t.constructor)===null||e===void 0?void 0:e.name)==="Uint8Array"||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="Buffer"}function Ho(...t){const e=t.reduce((i,s)=>i+s.length,0),n=new Uint8Array(e);let r=0;for(const i of t)n.set(i,r),r+=i.length;return n}function G9(t,e){if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let n=0;n<t.byteLength;n+=1)if(t[n]!==e[n])return!1;return!0}const K9={noether:BigInt(0),wei:BigInt(1),kwei:BigInt(1e3),Kwei:BigInt(1e3),babbage:BigInt(1e3),femtoether:BigInt(1e3),mwei:BigInt(1e6),Mwei:BigInt(1e6),lovelace:BigInt(1e6),picoether:BigInt(1e6),gwei:BigInt(1e9),Gwei:BigInt(1e9),shannon:BigInt(1e9),nanoether:BigInt(1e9),nano:BigInt(1e9),szabo:BigInt(1e12),microether:BigInt(1e12),micro:BigInt(1e12),finney:BigInt(1e15),milliether:BigInt(1e15),milli:BigInt(1e15),ether:BigInt("1000000000000000000"),kether:BigInt("1000000000000000000000"),grand:BigInt("1000000000000000000000"),mether:BigInt("1000000000000000000000000"),gether:BigInt("1000000000000000000000000000"),tether:BigInt("1000000000000000000000000000000")},zO="Warning: Using type `number` with values that are large or contain many decimals may cause loss of precision, it is recommended to use type `string` or `BigInt` when using conversion methods",kd=t=>{if(yn.validate(["bytes"],[t]),rm(t))return t;if(Array.isArray(t))return new Uint8Array(t);if(typeof t=="string")return j1(t);throw new Dy(t)},{uint8ArrayToHexString:nVe}=Gie,Kn=t=>nVe(kd(t)),ri=t=>typeof t=="string"&&t.slice(0,2).toLowerCase()!=="0x"?kd(`0x${t}`):kd(t),w4=t=>(yn.validate(["hex"],[t]),H9(t)),rVe=w4,ba=(t,e)=>{typeof t!="bigint"&&yn.validate(["int"],[t]);let n=W9(t);return e&&(!n.startsWith("-")&&n.length%2===1?n="0x0".concat(n.slice(2)):n.length%2===0&&n.startsWith("-")&&(n="-0x0".concat(n.slice(3)))),n},iVe=ba,sVe=t=>w4(t).toString(),gu=t=>{yn.validate(["string"],[t]);let e=t.replace(/^(?:\u0000)/,"");return e=e.replace(/(?:\u0000)$/,""),Kn(new TextEncoder().encode(e))},Zie=gu,oVe=gu,Y9=t=>Oie(ri(t)),aVe=t=>typeof t=="string"?Y9(t):(yn.validate(["bytes"],[t]),Oie(t)),sj=dv,cVe=Y9,Jie=t=>{yn.validate(["string"],[t]);let e="";for(let n=0;n<t.length;n+=1){const r=t.charCodeAt(n).toString(16);e+=r.length%2!==0?`0${r}`:r}return`0x${e}`},lVe=Jie,Xie=t=>new TextDecoder("ascii").decode(ri(t)),uVe=Xie,Ih=(t,e)=>{if(typeof t=="string"&&lc(t))return e?"address":`0x${t.toLowerCase().replace(/^0x/i,"")}`;if(typeof t=="boolean")return e?"bool":t?"0x01":"0x00";if(typeof t=="number")return e?t<0?"int256":"uint256":ba(t);if(typeof t=="bigint")return e?"bigint":ba(t);if(rm(t))return e?"bytes":Kn(t);if(typeof t=="object"&&t)return e?"string":gu(JSON.stringify(t));if(typeof t=="string"){if(t.startsWith("-0x")||t.startsWith("-0X"))return e?"int256":ba(t);if(Rr(t))return e?"bytes":t;if(P8(t)&&!Hx(t)&&!Th(t))return e?"bytes":`0x${t}`;if(P8(t)&&!Hx(t)&&Th(t))return e?"uint":ba(t);if(!Number.isFinite(t))return e?"string":gu(t)}throw new CHe(t)},xa=t=>{if(typeof t=="number")return t>1e20?(console.warn(zO),BigInt(t)):t;if(typeof t=="bigint")return t>=Number.MIN_SAFE_INTEGER&&t<=Number.MAX_SAFE_INTEGER?Number(t):t;if(typeof t=="string"&&Rr(t))return w4(t);try{return xa(BigInt(t))}catch{throw new Q$(t)}},Jm=t=>{if(typeof t=="number")return BigInt(t);if(typeof t=="bigint")return t;if(typeof t=="string"&&P8(t))return t.startsWith("-")?-BigInt(t.substring(1)):BigInt(t);throw new Q$(t)},dVe=(t,e)=>{let n;if(typeof e=="string"){if(n=K9[e],!n)throw new kie(e)}else{if(e<0||!Number.isInteger(e))throw new Rie(e);n=u1(BigInt(10),BigInt(e))}const r=String(xa(t)),i=n.toString().length-1;if(i<=0)return r.toString();const s=r.padStart(i,"0"),o=s.slice(0,-i),a=s.slice(-i).replace(/\.?0+$/,"");return o===""?`0.${a}`:a===""?o:`${o}.${a}`.slice(0,o.length+i+1)},fVe=(t,e)=>{yn.validate(["number"],[t]);let n;if(typeof e=="string"){if(n=K9[e],!n)throw new kie(e)}else{if(e<0||!Number.isInteger(e))throw new Rie(e);n=u1(BigInt(10),BigInt(e))}let r=t;typeof r=="number"&&(r<1e-15&&console.warn(zO),r>1e20?(console.warn(zO),r=BigInt(r)):r=r.toLocaleString("fullwide",{useGrouping:!1,maximumFractionDigits:20}));const[i,s]=String(typeof r=="string"&&!Rr(r)?r:xa(r)).split(".").concat(""),a=BigInt(`${i}${s}`)*n,c=s.length;return c===0?a.toString():a.toString().slice(0,-c)},Fd=t=>{if(!lc(t,!1))throw new Z$(t);const e=t.toLowerCase().replace(/^0x/i,""),n=Bh(No(V9(sj(e))));if($e(n)||n==="0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470")return"";let r="0x";const i=n.replace(/^0x/i,"");for(let s=0;s<e.length;s+=1)parseInt(i[s],16)>7?r+=e[s].toUpperCase():r+=e[s];return r},ese=t=>{if(typeof t=="boolean")return t;if(typeof t=="number"&&(t===0||t===1)||typeof t=="bigint"&&(t===BigInt(0)||t===BigInt(1)))return!!t;if(typeof t=="string"&&!Rr(t)&&(t==="1"||t==="0"||t==="false"||t==="true"))return t==="true"?!0:t==="false"?!1:!!Number(t);if(typeof t=="string"&&Rr(t)&&(t==="0x1"||t==="0x0"))return!!xa(t);throw new J$(t)};class oj extends VB{constructor(){super(...arguments),this.maxListeners=Number.MAX_SAFE_INTEGER}setMaxListeners(e){return this.maxListeners=e,this}getMaxListeners(){return this.maxListeners}}const hVe=Rr,pVe=P8,mVe=Kie,gVe=lc,wVe=zb,yVe=q9,vVe=QWe,bVe=ZWe,xVe=M8,_Ve=XWe,AVe=(t,e)=>{const n=typeof t=="string"&&Bs(t),r=typeof e=="string"&&Bs(e);if(t===e||(t==="earliest"||t===0)&&(e==="earliest"||e===0))return 0;if(t==="earliest"&&e>0)return-1;if(e==="earliest"&&t>0)return 1;if(n&&r){const o={[Ff.EARLIEST]:1,[Ff.FINALIZED]:2,[Ff.SAFE]:3,[Ff.LATEST]:4,[Ff.PENDING]:5};return o[t]<o[e]?-1:1}if(n&&!r||!n&&r)throw new THe("Cannot compare blocktag with provided non-blocktag input.");const i=BigInt(t),s=BigInt(e);return i<s?-1:i===s?0:1},qp=t=>typeof t=="object"&&!$e(t)&&Object.keys(t).length!==0&&["input","data","from","gas","gasPrice","gasLimit","address","jsonInterface","syncWithContext","dataInputFill"].some(e=>e in t),mn=$e,_G=t=>typeof t=="object"&&!$e(t)&&!Array.isArray(t)&&!(t instanceof K$),im=(t,...e)=>{if(!_G(t))return t;const n=Object.assign({},t);for(const r of e)for(const i in r)_G(r[i])?(n[i]||(n[i]={}),n[i]=im(n[i],r[i])):!$e(r[i])&&Object.hasOwnProperty.call(r,i)&&(Array.isArray(r[i])||r[i]instanceof K$?n[i]=r[i].slice(0):n[i]=r[i]);return n},Xv=(t,e,n="0")=>typeof t=="string"?Rr(t)?D8(t,e,n):t.padStart(e,n):(yn.validate(["int"],[t]),D8(t,e,n)),tse=(t,e,n="0")=>{if(typeof t=="string"&&!Rr(t))return t.padEnd(e,n);yn.validate(["int"],[t]);const r=typeof t=="string"&&Rr(t)?t:ba(t),i=r.startsWith("-")?3:2;return r.padEnd(e+i,n)},nse=tse,Wx=Xv,rse=(t,e=64)=>{yn.validate(["int"],[t]);const n=xa(t);if(n>=0)return Xv(Ih(n),e);const r=u1(BigInt(2),BigInt(e*4));if(-n>=r)throw new Nie(`value: ${t}, nibbleWidth: ${e}`);const s=BigInt(n)+r;return Xv(ba(s),e)},EVe=(t,e=64)=>{yn.validate(["int"],[t]);const n=xa(t);if(n<0)return n;const r=Math.ceil(Math.log(Number(n))/Math.log(2));if(r>e*4)throw new Nie(`value: "${t}", nibbleWidth: "${e}"`);if(e*4!==r)return n;const i=u1(BigInt(2),BigInt(e)*BigInt(4));return xa(BigInt(n)-i)},{parseBaseType:CVe}=Gie,$f=t=>typeof t=="object"&&!$e(t)&&"number"in t&&"bytes"in t,SVe=(t,e,n=[])=>{let r=Object.assign({},t),i;for(const s of e){if(r.oneOf&&i){const o=i,a=n.find(([c])=>c===o);a&&a[0]===i&&(r=r.oneOf[a[1]])}if(!r.properties&&!r.items)return;r.properties?r=r.properties[s]:r.items&&r.items.properties?r=r.items.properties[s]:r.items&&Jv(r.items)?r=r.items:r.items&&Array.isArray(r.items)&&(r=r.items[parseInt(s,10)]),r&&s&&(i=s)}return r},Vx=(t,e,n)=>{try{const{baseType:r,baseTypeSize:i}=CVe(e);if(r==="int"||r==="uint")switch(n.number){case ul.NUMBER:return Number(Jm(t));case ul.HEX:return ba(Jm(t));case ul.STR:return Jm(t).toString();case ul.BIGINT:return Jm(t);default:throw new OO(`Invalid format: ${String(n.number)}`)}if(r==="bytes"){let s;switch(i?typeof t=="string"?s=Xv(t,i*2):rm(t)&&(s=Ho(new Uint8Array(i-t.length),t)):s=t,n.bytes){case Ch.HEX:return Kn(kd(s));case Ch.UINT8ARRAY:return kd(s);default:throw new OO(`Invalid format: ${String(n.bytes)}`)}}}catch{return t}return t},AG=({value:t,schemaProp:e,schema:n,object:r,key:i,dataPath:s,format:o,oneOfPath:a=[]})=>{var c,l;if(Array.isArray(t)){let u=e;if((e==null?void 0:e.oneOf)!==void 0&&e.oneOf.forEach((d,h)=>{var g,w;!Array.isArray(e==null?void 0:e.items)&&(typeof t[0]=="object"&&((g=d==null?void 0:d.items)===null||g===void 0?void 0:g.type)==="object"||typeof t[0]=="string"&&((w=d==null?void 0:d.items)===null||w===void 0?void 0:w.type)!=="object")&&(u=d,a.push([i,h]))}),$e(u==null?void 0:u.items))return delete r[i],s.pop(),!0;if(Jv(u.items)&&!$e(u.items.format)){for(let d=0;d<t.length;d+=1)r[i][d]=Vx(t[d],(c=u==null?void 0:u.items)===null||c===void 0?void 0:c.format,o);return s.pop(),!0}if(!Array.isArray(u==null?void 0:u.items)&&((l=u==null?void 0:u.items)===null||l===void 0?void 0:l.type)==="object"){for(const d of t)Q9(d,n,s,o,a);return s.pop(),!0}if(Array.isArray(u==null?void 0:u.items)){for(let d=0;d<t.length;d+=1)r[i][d]=Vx(t[d],u.items[d].format,o);return s.pop(),!0}}return!1},Q9=(t,e,n,r,i=[])=>{var s;if(!Jv(t)&&!Array.isArray(t))return Vx(t,e==null?void 0:e.format,r);const o=t;if(Array.isArray(o)&&(e==null?void 0:e.type)==="array"&&((s=e==null?void 0:e.items)===null||s===void 0?void 0:s.type)==="object")AG({value:o,schemaProp:e,schema:e,object:o,key:"",dataPath:n,format:r,oneOfPath:i});else for(const[a,c]of Object.entries(o)){n.push(a);const l=SVe(e,n,i);if($e(l)){delete o[a],n.pop();continue}if(Jv(c)){Q9(c,e,n,r,i),n.pop();continue}AG({value:c,schemaProp:l,schema:e,object:o,key:a,dataPath:n,format:r,oneOfPath:i})||(o[a]=Vx(c,l.format,r),n.pop())}return o},et=(t,e,n=Ia)=>{let r;Jv(e)?r=im({},e):Array.isArray(e)?r=[...e]:r=e;const i=Jv(t)?t:rj(t);if(!i.properties&&!i.items&&!i.format)throw new OO("Invalid json schema for formatting");return Q9(r,i,[],n)},ise="0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",eb=t=>{let e;return typeof t=="bigint"||typeof t=="number"?e=dv(t.toString()):Array.isArray(t)?e=new Uint8Array(t):typeof t=="string"&&!Rr(t)?e=dv(t):e=kd(t),Kn(No(V9(e)))},y4=t=>{let e;typeof t=="string"?t.startsWith("0x")&&Rr(t)?e=ri(t):e=dv(t):e=t;const n=eb(e);return n===ise?void 0:n},uc=t=>{const e=y4(t);return $e(e)?ise:e},TVe=t=>{if(Array.isArray(t))throw new Error("Autodetection of array types is not supported.");let e,n;if(typeof t=="object"&&("t"in t||"type"in t)&&("v"in t||"value"in t))e="t"in t?t.t:t.type,n="v"in t?t.v:t.value,e=e.toLowerCase()==="bigint"?"int":e;else{if(typeof t=="bigint")return["int",t];e=Ih(t,!0),n=Ih(t),!e.startsWith("int")&&!e.startsWith("uint")&&(e="bytes")}return(e.startsWith("int")||e.startsWith("uint"))&&typeof n=="string"&&!/^(-)?0x/i.test(n)&&(n=Jm(n)),[e,n]},IVe=t=>t.startsWith("int[")?`int256${t.slice(3)}`:t==="int"?"int256":t.startsWith("uint[")?`uint256'${t.slice(4)}`:t==="uint"?"uint256":t,Yk=(t,e)=>{const n=/^(\d+).*$/.exec(t.slice(e));return n?parseInt(n[1],10):0},EG=t=>t.toString(2).length,CG=(t,e)=>{const n=e.toString();if(t==="string"){if(typeof e=="string")return gu(e);throw new EHe(e)}if(t==="bool"||t==="boolean"){if(typeof e=="boolean")return e?"01":"00";throw new J$(e)}if(t==="address"){if(!lc(n))throw new Z$(n);return n}const r=IVe(t);if(t.startsWith("uint")){const i=Yk(r,4);if(i%8||i<8||i>256)throw new pG(n);const s=xa(n);if(EG(s)>i)throw new mG(n);if(s<BigInt(0))throw new SHe(n);return i?Wx(s.toString(16),i/8*2):s.toString(16)}if(t.startsWith("int")){const i=Yk(r,3);if(i%8||i<8||i>256)throw new pG(t);const s=xa(n);if(EG(s)>i)throw new mG(n);return s<BigInt(0)?rse(s.toString(),i/8*2):i?Wx(s.toString(16),i/4):s.toString(16)}if(r==="bytes"){if(n.replace(/^0x/i,"").length%2!==0)throw new Dy(n);return n}if(t.startsWith("bytes")){if(n.replace(/^0x/i,"").length%2!==0)throw new Dy(n);const i=Yk(t,5);if(!i||i<1||i>64||i<n.replace(/^0x/i,"").length/2)throw new Dy(n);return nse(n,i*2)}return""},sse=t=>{const[e,n]=TVe(t);return Array.isArray(n)?n.map(s=>CG(e,s).replace("0x","")).join(""):CG(e,n).replace("0x","")},aj=(...t)=>`0x${t.map(sse).join("").toLowerCase()}`,kVe=(...t)=>y4(aj(...t)),RVe=(...t)=>uc(aj(...t)),NVe=t=>y4(`0x${(typeof t=="number"?t.toString():t).padStart(64,"0")}`);function PVe(t){return oB(t)}const qx=t=>PVe(t),OVe=t=>Kn(qx(t));var Z9=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};function ose(t){return(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function ase(t,e,n){return Z9(this,void 0,void 0,function*(){let r;const i=yield Promise.race([t instanceof Promise?t:t(),new Promise((s,o)=>{r=setTimeout(()=>n?o(n):s(void 0),e)})]);if(r&&clearTimeout(r),i instanceof Error)throw i;return i})}function cj(t,e){let n;return[new Promise((i,s)=>{n=setInterval(function o(){return Z9(this,void 0,void 0,function*(){try{const a=yield ase(t,e);$e(a)||(clearInterval(n),i(a))}catch(a){clearInterval(n),s(a)}}),o}(),e)}),n]}function DVe(t,e){return Z9(this,void 0,void 0,function*(){return cj(t,e)[0]})}function lj(t,e){let n;const r=new Promise((i,s)=>{n=setTimeout(()=>{s(e)},t)});return[n,r]}function cse(t,e){let n;const r=new Promise((i,s)=>{n=setInterval(()=>{Z9(this,void 0,void 0,function*(){const o=yield t();o&&(clearInterval(n),s(o))})},e)});return[n,r]}const uj=()=>{const t=qx(16);t[6]=t[6]&15|64,t[8]=t[8]&63|128;const e=Kn(t);return[e.substring(2,10),e.substring(10,14),e.substring(14,18),e.substring(18,22),e.substring(22,34)].join("-")},dj=t=>{const e=t.error.code;return Fo.has(e)||e>=-32099&&e<=-32e3},u0=t=>!Array.isArray(t)&&!!t&&t.jsonrpc==="2.0"&&"result"in t&&$e(t.error)&&(typeof t.id=="number"||typeof t.id=="string"),d0=t=>!Array.isArray(t)&&t.jsonrpc==="2.0"&&!!t&&$e(t.result)&&"error"in t&&(typeof t.id=="number"||typeof t.id=="string"),J9=t=>!Array.isArray(t)&&!!t&&t.jsonrpc==="2.0"&&!$e(t.params)&&!$e(t.method),lse=t=>!Array.isArray(t)&&!!t&&t.jsonrpc==="2.0"&&"id"in t&&"result"in t,B8=t=>u0(t)||d0(t),fj=t=>Array.isArray(t)?t.every(B8):B8(t),Gx=t=>Array.isArray(t)&&t.length>0&&fj(t);let aE;const use=t=>{aE=t},f1=t=>{var e,n,r,i;return typeof aE<"u"&&(aE+=1),{jsonrpc:(e=t.jsonrpc)!==null&&e!==void 0?e:"2.0",id:(r=(n=t.id)!==null&&n!==void 0?n:aE)!==null&&r!==void 0?r:uj(),method:t.method,params:(i=t.params)!==null&&i!==void 0?i:void 0}},hj=t=>t.map(e=>f1(e)),Vu=t=>Array.isArray(t)&&t.length>0,MVe=Object.freeze(Object.defineProperty({__proto__:null,isBatchRequest:Vu,isBatchResponse:Gx,isResponseRpcError:dj,isResponseWithError:d0,isResponseWithNotification:J9,isResponseWithResult:u0,isSubscriptionResult:lse,isValidResponse:fj,setRequestIdStart:use,toBatchPayload:hj,toPayload:f1,validateResponse:B8},Symbol.toStringTag,{value:"Module"}));var Qk=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})},dse;class $8{constructor({timeout:e,eagerStart:n,timeoutMessage:r}={timeout:0,eagerStart:!1,timeoutMessage:"DeferredPromise timed out"}){this[dse]="Promise",this._state="pending",this._promise=new Promise((i,s)=>{this._resolve=i,this._reject=s}),this._timeoutMessage=r,this._timeoutInterval=e,n&&this.startTimer()}get state(){return this._state}then(e,n){return Qk(this,void 0,void 0,function*(){return this._promise.then(e,n)})}catch(e){return Qk(this,void 0,void 0,function*(){return this._promise.catch(e)})}finally(e){return Qk(this,void 0,void 0,function*(){return this._promise.finally(e)})}resolve(e){this._resolve(e),this._state="fulfilled",this._clearTimeout()}reject(e){this._reject(e),this._state="rejected",this._clearTimeout()}startTimer(){this._timeoutInterval&&this._timeoutInterval>0&&(this._timeoutId=setTimeout(this._checkTimeout.bind(this),this._timeoutInterval))}_checkTimeout(){this._state==="pending"&&this._timeoutId&&this.reject(new xie(this._timeoutMessage))}_clearTimeout(){this._timeoutId&&clearTimeout(this._timeoutId)}}dse=Symbol.toStringTag;class fse{constructor(e,n){this.eventEmitter=e,this.autoReconnect=n,this.chunkTimeout=1e3*15}clearQueues(){typeof this._clearQueues=="function"&&this._clearQueues()}onError(e){this._clearQueues=e}parseResponse(e){const n=[];return e.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach(i=>{let s=i;this.lastChunk&&(s=this.lastChunk+s);let o;try{o=JSON.parse(s)}catch{this.lastChunk=s,this.lastChunkTimeout&&clearTimeout(this.lastChunkTimeout),this.lastChunkTimeout=setTimeout(()=>{this.autoReconnect||(this.clearQueues(),this.eventEmitter.emit("error",new F9({id:1,jsonrpc:"2.0",error:{code:2,message:"Chunk timeout"}})))},this.chunkTimeout);return}clearTimeout(this.lastChunkTimeout),this.lastChunk=void 0,o&&n.push(o)}),n}}var SG=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};class pj extends p4{constructor(){super(...arguments),this._eventEmitter=new VB,this._chainId="",this._accounts=[]}_getChainId(){var e;return SG(this,void 0,void 0,function*(){const n=yield this.request(f1({method:"eth_chainId",params:[]}));return(e=n==null?void 0:n.result)!==null&&e!==void 0?e:""})}_getAccounts(){var e;return SG(this,void 0,void 0,function*(){const n=yield this.request(f1({method:"eth_accounts",params:[]}));return(e=n==null?void 0:n.result)!==null&&e!==void 0?e:[]})}_onConnect(){Promise.all([this._getChainId().then(e=>{e!==this._chainId&&(this._chainId=e,this._eventEmitter.emit("chainChanged",this._chainId))}).catch(e=>{console.error(e)}),this._getAccounts().then(e=>{this._accounts.length===e.length&&e.every(n=>e.includes(n))||(this._accounts=e,this._onAccountsChanged())}).catch(e=>{console.error(e)})]).then(()=>this._eventEmitter.emit("connect",{chainId:this._chainId})).catch(e=>{console.error(e)})}_onDisconnect(e,n){this._eventEmitter.emit("disconnect",new kHe(e,n))}_onAccountsChanged(){this._eventEmitter.emit("accountsChanged",this._accounts)}}var Zk=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};const BVe={autoReconnect:!0,delay:5e3,maxAttempts:5},$Ve=1e3;class hse extends pj{constructor(e,n,r){if(super(),this._connectionStatus="connecting",this._onMessageHandler=this._onMessage.bind(this),this._onOpenHandler=this._onConnect.bind(this),this._onCloseHandler=this._onCloseEvent.bind(this),this._onErrorHandler=this._onError.bind(this),!this._validateProviderPath(e))throw new DO(e);this._socketPath=e,this._socketOptions=n,this._reconnectOptions=Object.assign(Object.assign({},BVe),r??{}),this._pendingRequestsQueue=new Map,this._sentRequestsQueue=new Map,this._init(),this.connect(),this.chunkResponseParser=new fse(this._eventEmitter,this._reconnectOptions.autoReconnect),this.chunkResponseParser.onError(()=>{this._clearQueues()}),this.isReconnecting=!1}get SocketConnection(){return this._socketConnection}_init(){this._reconnectAttempts=0}connect(){try{this._openSocketConnection(),this._connectionStatus="connecting",this._addSocketListeners()}catch(e){if(this.isReconnecting)setImmediate(()=>{this._reconnect()});else throw this._connectionStatus="disconnected",e&&e.message?new m4(`Error while connecting to ${this._socketPath}. Reason: ${e.message}`):new DO(this._socketPath)}}_validateProviderPath(e){return!!e}getPendingRequestQueueSize(){return this._pendingRequestsQueue.size}getSentRequestsQueueSize(){return this._sentRequestsQueue.size}supportsSubscriptions(){return!0}on(e,n){this._eventEmitter.on(e,n)}once(e,n){this._eventEmitter.once(e,n)}removeListener(e,n){this._eventEmitter.removeListener(e,n)}_onDisconnect(e,n){this._connectionStatus="disconnected",super._onDisconnect(e,n)}disconnect(e,n){const r=e??$Ve;this._removeSocketListeners(),this.getStatus()!=="disconnected"&&this._closeSocketConnection(r,n),this._onDisconnect(r,n)}safeDisconnect(e,n,r=!1,i=1e3){return Zk(this,void 0,void 0,function*(){let s=0;yield Zk(this,void 0,void 0,function*(){return new Promise(a=>{const c=setInterval(()=>{r&&s>=5&&this.clearQueues(),this.getPendingRequestQueueSize()===0&&this.getSentRequestsQueueSize()===0&&(clearInterval(c),a(!0)),s+=1},i)})}),this.disconnect(e,n)})}removeAllListeners(e){this._eventEmitter.removeAllListeners(e)}_onError(e){this.isReconnecting?this._reconnect():this._eventEmitter.emit("error",e)}reset(){this._sentRequestsQueue.clear(),this._pendingRequestsQueue.clear(),this._init(),this._removeSocketListeners(),this._addSocketListeners()}_reconnect(){this.isReconnecting||(this.isReconnecting=!0,this._sentRequestsQueue.size>0&&this._sentRequestsQueue.forEach((e,n)=>{e.deferredPromise.reject(new Wze),this._sentRequestsQueue.delete(n)}),this._reconnectAttempts<this._reconnectOptions.maxAttempts?(this._reconnectAttempts+=1,setTimeout(()=>{this._removeSocketListeners(),this.connect(),this.isReconnecting=!1},this._reconnectOptions.delay)):(this.isReconnecting=!1,this._clearQueues(),this._removeSocketListeners(),this._eventEmitter.emit("error",new Hze(this._reconnectOptions.maxAttempts))))}request(e){return Zk(this,void 0,void 0,function*(){if(mn(this._socketConnection))throw new Error("Connection is undefined");this.getStatus()==="disconnected"&&this.connect();const n=Vu(e)?e[0].id:e.id;if(!n)throw new Zze("Request Id not defined");if(this._sentRequestsQueue.has(n))throw new Vze(n);const r=new $8;r.catch(s=>{this._eventEmitter.emit("error",s)});const i={payload:e,deferredPromise:r};if(this.getStatus()==="connecting")return this._pendingRequestsQueue.set(n,i),i.deferredPromise;this._sentRequestsQueue.set(n,i);try{this._sendToSocket(i.payload)}catch(s){this._sentRequestsQueue.delete(n),this._eventEmitter.emit("error",s)}return r})}_onConnect(){this._connectionStatus="connected",this._reconnectAttempts=0,super._onConnect(),this._sendPendingRequests()}_sendPendingRequests(){for(const[e,n]of this._pendingRequestsQueue.entries())try{this._sendToSocket(n.payload),this._pendingRequestsQueue.delete(e),this._sentRequestsQueue.set(e,n)}catch(r){this._pendingRequestsQueue.delete(e),this._eventEmitter.emit("error",r)}}_onMessage(e){const n=this._parseResponses(e);if(!(mn(n)||n.length===0))for(const r of n){if(J9(r)&&r.method.endsWith("_subscription")){this._eventEmitter.emit("message",r);return}const i=Gx(r)?r[0].id:r.id,s=this._sentRequestsQueue.get(i);if(!s)return;(Gx(r)||u0(r)||d0(r))&&(this._eventEmitter.emit("message",r),s.deferredPromise.resolve(r)),this._sentRequestsQueue.delete(i)}}clearQueues(e){this._clearQueues(e)}_clearQueues(e){this._pendingRequestsQueue.size>0&&this._pendingRequestsQueue.forEach((n,r)=>{n.deferredPromise.reject(new PO(e)),this._pendingRequestsQueue.delete(r)}),this._sentRequestsQueue.size>0&&this._sentRequestsQueue.forEach((n,r)=>{n.deferredPromise.reject(new PO(e)),this._sentRequestsQueue.delete(r)}),this._removeSocketListeners()}}const pse=Object.freeze(Object.defineProperty({__proto__:null,ChunkResponseParser:fse,Eip1193Provider:pj,EventEmitter:oj,SocketProvider:hse,Web3DeferredPromise:$8,asciiToHex:Jie,bytesToHex:Kn,bytesToUint8Array:kd,checkAddressCheckSum:mVe,compareBlockNumbers:AVe,convert:Q9,convertScalarValue:Vx,encodePacked:aj,ethUnitMap:K9,format:et,fromAscii:lVe,fromDecimal:iVe,fromTwosComplement:EVe,fromUtf8:Zie,fromWei:dVe,getStorageSlotNumForLongString:NVe,hexToAscii:Xie,hexToBytes:ri,hexToNumber:w4,hexToNumberString:sVe,hexToString:cVe,hexToUtf8:Y9,isAddress:gVe,isBatchRequest:Vu,isBatchResponse:Gx,isBloom:wVe,isContractAddressInBloom:bVe,isContractInitOptions:qp,isDataFormat:$f,isHex:pVe,isHexStrict:hVe,isInBloom:yVe,isNullish:mn,isPromise:ose,isResponseRpcError:dj,isResponseWithError:d0,isResponseWithNotification:J9,isResponseWithResult:u0,isSubscriptionResult:lse,isTopic:xVe,isTopicInBloom:_Ve,isUint8Array:rm,isUserEthereumAddressInBloom:vVe,isValidResponse:fj,jsonRpc:MVe,keccak256:eb,keccak256Wrapper:eb,leftPad:Wx,mergeDeep:im,numberToHex:ba,padLeft:Xv,padRight:tse,pollTillDefined:DVe,pollTillDefinedAndReturnIntervalId:cj,processSolidityEncodePackedArgs:sse,randomBytes:qx,randomHex:OVe,rejectIfConditionAtInterval:cse,rejectIfTimeout:lj,rightPad:nse,setRequestIdStart:use,sha3:y4,sha3Raw:uc,soliditySha3:kVe,soliditySha3Raw:RVe,stringToHex:oVe,toAscii:uVe,toBatchPayload:hj,toBigInt:Jm,toBool:ese,toChecksumAddress:Fd,toDecimal:rVe,toHex:Ih,toNumber:xa,toPayload:f1,toTwosComplement:rse,toUtf8:aVe,toWei:fVe,uint8ArrayConcat:Ho,uint8ArrayEquals:G9,utf8ToBytes:sj,utf8ToHex:gu,uuidV4:uj,validateResponse:B8,waitWithTimeout:ase},Symbol.toStringTag,{value:"Module"}));class X9{constructor(){this._emitter=new oj}on(e,n){this._emitter.on(e,n)}once(e,n){this._emitter.once(e,n)}off(e,n){this._emitter.off(e,n)}emit(e,n){this._emitter.emit(e,n)}listenerCount(e){return this._emitter.listenerCount(e)}listeners(e){return this._emitter.listeners(e)}eventNames(){return this._emitter.eventNames()}removeAllListeners(){return this._emitter.removeAllListeners()}setMaxListenerWarningThreshold(e){this._emitter.setMaxListeners(e)}getMaxListeners(){return this._emitter.getMaxListeners()}}var h1;(function(t){t.CONFIG_CHANGE="CONFIG_CHANGE"})(h1||(h1={}));class jVe extends X9{constructor(e){super(),this.config={handleRevert:!1,defaultAccount:void 0,defaultBlock:"latest",transactionBlockTimeout:50,transactionConfirmationBlocks:24,transactionPollingInterval:1e3,transactionPollingTimeout:750*1e3,transactionReceiptPollingInterval:void 0,transactionSendTimeout:750*1e3,transactionConfirmationPollingInterval:void 0,blockHeaderTimeout:10,maxListenersWarningThreshold:100,contractDataInputFill:"data",defaultNetworkId:void 0,defaultChain:"mainnet",defaultHardfork:"london",defaultCommon:void 0,defaultTransactionType:"0x2",defaultMaxPriorityFeePerGas:Ih(25e8),enableExperimentalFeatures:{useSubscriptionWhenCheckingBlockTimeout:!1,useRpcCallSpecification:!1},transactionBuilder:void 0,transactionTypeParser:void 0,defaultReturnFormat:Ia},this.setConfig(e??{})}setConfig(e){const n=Object.keys(e);for(const r of n)this._triggerConfigChange(r,e[r]);Object.assign(this.config,e)}get handleRevert(){return this.config.handleRevert}set handleRevert(e){this._triggerConfigChange("handleRevert",e),this.config.handleRevert=e}get contractDataInputFill(){return this.config.contractDataInputFill}set contractDataInputFill(e){this._triggerConfigChange("contractDataInputFill",e),this.config.contractDataInputFill=e}get defaultAccount(){return this.config.defaultAccount}set defaultAccount(e){this._triggerConfigChange("defaultAccount",e),this.config.defaultAccount=e}get defaultBlock(){return this.config.defaultBlock}set defaultBlock(e){this._triggerConfigChange("defaultBlock",e),this.config.defaultBlock=e}get transactionSendTimeout(){return this.config.transactionSendTimeout}set transactionSendTimeout(e){this._triggerConfigChange("transactionSendTimeout",e),this.config.transactionSendTimeout=e}get transactionBlockTimeout(){return this.config.transactionBlockTimeout}set transactionBlockTimeout(e){this._triggerConfigChange("transactionBlockTimeout",e),this.config.transactionBlockTimeout=e}get transactionConfirmationBlocks(){return this.config.transactionConfirmationBlocks}set transactionConfirmationBlocks(e){this._triggerConfigChange("transactionConfirmationBlocks",e),this.config.transactionConfirmationBlocks=e}get transactionPollingInterval(){return this.config.transactionPollingInterval}set transactionPollingInterval(e){this._triggerConfigChange("transactionPollingInterval",e),this.config.transactionPollingInterval=e,this.transactionReceiptPollingInterval=e,this.transactionConfirmationPollingInterval=e}get transactionPollingTimeout(){return this.config.transactionPollingTimeout}set transactionPollingTimeout(e){this._triggerConfigChange("transactionPollingTimeout",e),this.config.transactionPollingTimeout=e}get transactionReceiptPollingInterval(){return this.config.transactionReceiptPollingInterval}set transactionReceiptPollingInterval(e){this._triggerConfigChange("transactionReceiptPollingInterval",e),this.config.transactionReceiptPollingInterval=e}get transactionConfirmationPollingInterval(){return this.config.transactionConfirmationPollingInterval}set transactionConfirmationPollingInterval(e){this._triggerConfigChange("transactionConfirmationPollingInterval",e),this.config.transactionConfirmationPollingInterval=e}get blockHeaderTimeout(){return this.config.blockHeaderTimeout}set blockHeaderTimeout(e){this._triggerConfigChange("blockHeaderTimeout",e),this.config.blockHeaderTimeout=e}get enableExperimentalFeatures(){return this.config.enableExperimentalFeatures}set enableExperimentalFeatures(e){this._triggerConfigChange("enableExperimentalFeatures",e),this.config.enableExperimentalFeatures=e}get maxListenersWarningThreshold(){return this.config.maxListenersWarningThreshold}set maxListenersWarningThreshold(e){this._triggerConfigChange("maxListenersWarningThreshold",e),this.setMaxListenerWarningThreshold(e),this.config.maxListenersWarningThreshold=e}get defaultReturnFormat(){return this.config.defaultReturnFormat}set defaultReturnFormat(e){this._triggerConfigChange("defaultReturnFormat",e),this.config.defaultReturnFormat=e}get defaultNetworkId(){return this.config.defaultNetworkId}set defaultNetworkId(e){this._triggerConfigChange("defaultNetworkId",e),this.config.defaultNetworkId=e}get defaultChain(){return this.config.defaultChain}set defaultChain(e){if(!mn(this.config.defaultCommon)&&!mn(this.config.defaultCommon.baseChain)&&e!==this.config.defaultCommon.baseChain)throw new yG(this.config.defaultChain,e);this._triggerConfigChange("defaultChain",e),this.config.defaultChain=e}get defaultHardfork(){return this.config.defaultHardfork}set defaultHardfork(e){if(!mn(this.config.defaultCommon)&&!mn(this.config.defaultCommon.hardfork)&&e!==this.config.defaultCommon.hardfork)throw new wG(this.config.defaultCommon.hardfork,e);this._triggerConfigChange("defaultHardfork",e),this.config.defaultHardfork=e}get defaultCommon(){return this.config.defaultCommon}set defaultCommon(e){if(!mn(this.config.defaultHardfork)&&!mn(e)&&!mn(e.hardfork)&&this.config.defaultHardfork!==e.hardfork)throw new wG(this.config.defaultHardfork,e.hardfork);if(!mn(this.config.defaultChain)&&!mn(e)&&!mn(e.baseChain)&&this.config.defaultChain!==e.baseChain)throw new yG(this.config.defaultChain,e.baseChain);this._triggerConfigChange("defaultCommon",e),this.config.defaultCommon=e}get defaultTransactionType(){return this.config.defaultTransactionType}set defaultTransactionType(e){this._triggerConfigChange("defaultTransactionType",e),this.config.defaultTransactionType=e}get defaultMaxPriorityFeePerGas(){return this.config.defaultMaxPriorityFeePerGas}set defaultMaxPriorityFeePerGas(e){this._triggerConfigChange("defaultMaxPriorityFeePerGas",e),this.config.defaultMaxPriorityFeePerGas=e}get transactionBuilder(){return this.config.transactionBuilder}set transactionBuilder(e){this._triggerConfigChange("transactionBuilder",e),this.config.transactionBuilder=e}get transactionTypeParser(){return this.config.transactionTypeParser}set transactionTypeParser(e){this._triggerConfigChange("transactionTypeParser",e),this.config.transactionTypeParser=e}_triggerConfigChange(e,n){this.emit(h1.CONFIG_CHANGE,{name:e,oldValue:this.config[e],newValue:n})}}var HO={exports:{}};(function(t,e){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Hr<"u"&&Hr,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var a=typeof s<"u"&&s||typeof self<"u"&&self||typeof a<"u"&&a,c={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 l(y){return y&&DataView.prototype.isPrototypeOf(y)}if(c.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(y){return y&&u.indexOf(Object.prototype.toString.call(y))>-1};function h(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(y)||y==="")throw new TypeError('Invalid character in header field name: "'+y+'"');return y.toLowerCase()}function g(y){return typeof y!="string"&&(y=String(y)),y}function w(y){var I={next:function(){var B=y.shift();return{done:B===void 0,value:B}}};return c.iterable&&(I[Symbol.iterator]=function(){return I}),I}function v(y){this.map={},y instanceof v?y.forEach(function(I,B){this.append(B,I)},this):Array.isArray(y)?y.forEach(function(I){this.append(I[0],I[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(I){this.append(I,y[I])},this)}v.prototype.append=function(y,I){y=h(y),I=g(I);var B=this.map[y];this.map[y]=B?B+", "+I:I},v.prototype.delete=function(y){delete this.map[h(y)]},v.prototype.get=function(y){return y=h(y),this.has(y)?this.map[y]:null},v.prototype.has=function(y){return this.map.hasOwnProperty(h(y))},v.prototype.set=function(y,I){this.map[h(y)]=g(I)},v.prototype.forEach=function(y,I){for(var B in this.map)this.map.hasOwnProperty(B)&&y.call(I,this.map[B],B,this)},v.prototype.keys=function(){var y=[];return this.forEach(function(I,B){y.push(B)}),w(y)},v.prototype.values=function(){var y=[];return this.forEach(function(I){y.push(I)}),w(y)},v.prototype.entries=function(){var y=[];return this.forEach(function(I,B){y.push([B,I])}),w(y)},c.iterable&&(v.prototype[Symbol.iterator]=v.prototype.entries);function _(y){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}function T(y){return new Promise(function(I,B){y.onload=function(){I(y.result)},y.onerror=function(){B(y.error)}})}function b(y){var I=new FileReader,B=T(I);return I.readAsArrayBuffer(y),B}function k(y){var I=new FileReader,B=T(I);return I.readAsText(y),B}function D(y){for(var I=new Uint8Array(y),B=new Array(I.length),M=0;M<I.length;M++)B[M]=String.fromCharCode(I[M]);return B.join("")}function O(y){if(y.slice)return y.slice(0);var I=new Uint8Array(y.byteLength);return I.set(new Uint8Array(y)),I.buffer}function $(){return this.bodyUsed=!1,this._initBody=function(y){this.bodyUsed=this.bodyUsed,this._bodyInit=y,y?typeof y=="string"?this._bodyText=y:c.blob&&Blob.prototype.isPrototypeOf(y)?this._bodyBlob=y:c.formData&&FormData.prototype.isPrototypeOf(y)?this._bodyFormData=y:c.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this._bodyText=y.toString():c.arrayBuffer&&c.blob&&l(y)?(this._bodyArrayBuffer=O(y.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||d(y))?this._bodyArrayBuffer=O(y):this._bodyText=y=Object.prototype.toString.call(y):this._bodyText="",this.headers.get("content-type")||(typeof y=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):c.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},c.blob&&(this.blob=function(){var y=_(this);if(y)return y;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(){if(this._bodyArrayBuffer){var y=_(this);return y||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(b)}),this.text=function(){var y=_(this);if(y)return y;if(this._bodyBlob)return k(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(D(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},c.formData&&(this.formData=function(){return this.text().then(V)}),this.json=function(){return this.text().then(JSON.parse)},this}var C=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function A(y){var I=y.toUpperCase();return C.indexOf(I)>-1?I:y}function H(y,I){if(!(this instanceof H))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');I=I||{};var B=I.body;if(y instanceof H){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,I.headers||(this.headers=new v(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!B&&y._bodyInit!=null&&(B=y._bodyInit,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=I.credentials||this.credentials||"same-origin",(I.headers||!this.headers)&&(this.headers=new v(I.headers)),this.method=A(I.method||this.method||"GET"),this.mode=I.mode||this.mode||null,this.signal=I.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&B)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(B),(this.method==="GET"||this.method==="HEAD")&&(I.cache==="no-store"||I.cache==="no-cache")){var M=/([?&])_=[^&]*/;if(M.test(this.url))this.url=this.url.replace(M,"$1_="+new Date().getTime());else{var W=/\?/;this.url+=(W.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}H.prototype.clone=function(){return new H(this,{body:this._bodyInit})};function V(y){var I=new FormData;return y.trim().split("&").forEach(function(B){if(B){var M=B.split("="),W=M.shift().replace(/\+/g," "),z=M.join("=").replace(/\+/g," ");I.append(decodeURIComponent(W),decodeURIComponent(z))}}),I}function Y(y){var I=new v,B=y.replace(/\r?\n[\t ]+/g," ");return B.split("\r").map(function(M){return M.indexOf(`
`)===0?M.substr(1,M.length):M}).forEach(function(M){var W=M.split(":"),z=W.shift().trim();if(z){var P=W.join(":").trim();I.append(z,P)}}),I}$.call(H.prototype);function ee(y,I){if(!(this instanceof ee))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');I||(I={}),this.type="default",this.status=I.status===void 0?200:I.status,this.ok=this.status>=200&&this.status<300,this.statusText=I.statusText===void 0?"":""+I.statusText,this.headers=new v(I.headers),this.url=I.url||"",this._initBody(y)}$.call(ee.prototype),ee.prototype.clone=function(){return new ee(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new v(this.headers),url:this.url})},ee.error=function(){var y=new ee(null,{status:0,statusText:""});return y.type="error",y};var x=[301,302,303,307,308];ee.redirect=function(y,I){if(x.indexOf(I)===-1)throw new RangeError("Invalid status code");return new ee(null,{status:I,headers:{location:y}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(I,B){this.message=I,this.name=B;var M=Error(I);this.stack=M.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function E(y,I){return new Promise(function(B,M){var W=new H(y,I);if(W.signal&&W.signal.aborted)return M(new o.DOMException("Aborted","AbortError"));var z=new XMLHttpRequest;function P(){z.abort()}z.onload=function(){var he={status:z.status,statusText:z.statusText,headers:Y(z.getAllResponseHeaders()||"")};he.url="responseURL"in z?z.responseURL:he.headers.get("X-Request-URL");var ve="response"in z?z.response:z.responseText;setTimeout(function(){B(new ee(ve,he))},0)},z.onerror=function(){setTimeout(function(){M(new TypeError("Network request failed"))},0)},z.ontimeout=function(){setTimeout(function(){M(new TypeError("Network request failed"))},0)},z.onabort=function(){setTimeout(function(){M(new o.DOMException("Aborted","AbortError"))},0)};function Z(he){try{return he===""&&a.location.href?a.location.href:he}catch{return he}}z.open(W.method,Z(W.url),!0),W.credentials==="include"?z.withCredentials=!0:W.credentials==="omit"&&(z.withCredentials=!1),"responseType"in z&&(c.blob?z.responseType="blob":c.arrayBuffer&&W.headers.get("Content-Type")&&W.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(z.responseType="arraybuffer")),I&&typeof I.headers=="object"&&!(I.headers instanceof v)?Object.getOwnPropertyNames(I.headers).forEach(function(he){z.setRequestHeader(he,g(I.headers[he]))}):W.headers.forEach(function(he,ve){z.setRequestHeader(ve,he)}),W.signal&&(W.signal.addEventListener("abort",P),z.onreadystatechange=function(){z.readyState===4&&W.signal.removeEventListener("abort",P)}),z.send(typeof W._bodyInit>"u"?null:W._bodyInit)})}return E.polyfill=!0,a.fetch||(a.fetch=E,a.Headers=v,a.Request=H,a.Response=ee),o.Headers=v,o.Request=H,o.Response=ee,o.fetch=E,o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=n.fetch?n:r;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})(HO,HO.exports);var LVe=HO.exports;const UVe=Qs(LVe);var FVe=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};class eT extends p4{constructor(e,n){if(super(),!eT.validateClientUrl(e))throw new DO(e);this.clientUrl=e,this.httpProviderOptions=n}static validateClientUrl(e){return typeof e=="string"?/^http(s)?:\/\//i.test(e):!1}getStatus(){throw new xf}supportsSubscriptions(){return!1}request(e,n){var r;return FVe(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},(r=this.httpProviderOptions)===null||r===void 0?void 0:r.providerOptions),n),s=yield UVe(this.clientUrl,Object.assign(Object.assign({},i),{method:"POST",headers:Object.assign(Object.assign({},i.headers),{"Content-Type":"application/json"}),body:JSON.stringify(e)}));if(!s.ok)throw new zf(yield s.json());return yield s.json()})}on(){throw new xf}removeListener(){throw new xf}once(){throw new xf}removeAllListeners(){throw new xf}connect(){throw new xf}disconnect(){throw new xf}reset(){throw new xf}reconnect(){throw new xf}}var Gw=null;typeof WebSocket<"u"?Gw=WebSocket:typeof MozWebSocket<"u"?Gw=MozWebSocket:typeof global<"u"?Gw=global.WebSocket||global.MozWebSocket:typeof window<"u"?Gw=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(Gw=self.WebSocket||self.MozWebSocket);const zVe=Gw;class mse extends hse{constructor(e,n,r){super(e,n,r)}_validateProviderPath(e){return typeof e=="string"?/^ws(s)?:\/\//i.test(e):!1}getStatus(){if(this._socketConnection&&!mn(this._socketConnection))switch(this._socketConnection.readyState){case this._socketConnection.CONNECTING:return"connecting";case this._socketConnection.OPEN:return"connected";default:return"disconnected"}return"disconnected"}_openSocketConnection(){this._socketConnection=new zVe(this._socketPath,void 0,this._socketOptions&&Object.keys(this._socketOptions).length===0?void 0:this._socketOptions)}_closeSocketConnection(e,n){var r;(r=this._socketConnection)===null||r===void 0||r.close(e,n)}_sendToSocket(e){var n;if(this.getStatus()==="disconnected")throw new PO;(n=this._socketConnection)===null||n===void 0||n.send(JSON.stringify(e))}_parseResponses(e){return this.chunkResponseParser.parseResponse(e.data)}_addSocketListeners(){var e,n,r,i;(e=this._socketConnection)===null||e===void 0||e.addEventListener("open",this._onOpenHandler),(n=this._socketConnection)===null||n===void 0||n.addEventListener("message",this._onMessageHandler),(r=this._socketConnection)===null||r===void 0||r.addEventListener("close",s=>this._onCloseHandler(s)),(i=this._socketConnection)===null||i===void 0||i.addEventListener("error",this._onErrorHandler)}_removeSocketListeners(){var e,n,r;(e=this._socketConnection)===null||e===void 0||e.removeEventListener("message",this._onMessageHandler),(n=this._socketConnection)===null||n===void 0||n.removeEventListener("open",this._onOpenHandler),(r=this._socketConnection)===null||r===void 0||r.removeEventListener("close",this._onCloseHandler)}_onCloseEvent(e){var n;if(this._reconnectOptions.autoReconnect&&(![1e3,1001].includes(e.code)||!e.wasClean)){this._reconnect();return}this._clearQueues(e),this._removeSocketListeners(),this._onDisconnect(e.code,e.reason),(n=this._socketConnection)===null||n===void 0||n.removeEventListener("error",this._onErrorHandler)}}const gse=t=>p4.isWeb3Provider(t),wse=t=>typeof t!="string"&&"request"in t&&t.request.constructor.name==="Function",yse=t=>typeof t!="string"&&"request"in t&&t.request.constructor.name==="AsyncFunction",vse=t=>typeof t!="string"&&"send"in t,bse=t=>typeof t!="string"&&"sendAsync"in t,j8=t=>t&&(gse(t)||yse(t)||wse(t)||bse(t)||vse(t)),HVe=t=>t&&"supportsSubscriptions"in t?t.supportsSubscriptions():!!(t&&typeof t!="string"&&"on"in t);var Jk=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})},tb;(function(t){t.PROVIDER_CHANGED="PROVIDER_CHANGED",t.BEFORE_PROVIDER_CHANGE="BEFORE_PROVIDER_CHANGE"})(tb||(tb={}));const TG={HttpProvider:eT,WebsocketProvider:mse};class Ag extends X9{constructor(e,n,r){super(),mn(e)||this.setProvider(e),this.useRpcCallSpecification=n,mn(r)||(this.middleware=r)}static get providers(){return TG}get provider(){return this._provider}get providers(){return TG}setProvider(e){let n;if(e&&typeof e=="string"&&this.providers)if(/^http(s)?:\/\//i.test(e))n=new this.providers.HttpProvider(e);else if(/^ws(s)?:\/\//i.test(e))n=new this.providers.WebsocketProvider(e);else throw new oE(`Can't autodetect provider for "${e}"`);else mn(e)?n=void 0:n=e;return this.emit(tb.BEFORE_PROVIDER_CHANGE,this._provider),this._provider=n,this.emit(tb.PROVIDER_CHANGED,this._provider),!0}setMiddleware(e){this.middleware=e}send(e){return Jk(this,void 0,void 0,function*(){const n=Object.assign({},e);let r=yield this._sendRequest(n);if(mn(this.middleware)||(r=yield this.middleware.processResponse(r)),u0(r))return r.result;throw new zf(r)})}sendBatch(e){return Jk(this,void 0,void 0,function*(){return yield this._sendRequest(e)})}_sendRequest(e){return Jk(this,void 0,void 0,function*(){const{provider:n}=this;if(mn(n))throw new oE("Provider not available. Use `.setProvider` or `.provider=` to initialize the provider.");let r=Vu(e)?hj(e):f1(e);if(mn(this.middleware)||(r=yield this.middleware.processRequest(r)),gse(n)){let i;try{i=yield n.request(r)}catch(s){i=s}return this._processJsonRpcResponse(r,i,{legacy:!1,error:!1})}if(yse(n))return n.request(r).then(i=>this._processJsonRpcResponse(r,i,{legacy:!0,error:!1})).catch(i=>this._processJsonRpcResponse(r,i,{legacy:!0,error:!0}));if(wse(n))return new Promise((i,s)=>{const o=l=>{s(this._processJsonRpcResponse(r,l,{legacy:!0,error:!0}))},a=l=>i(this._processJsonRpcResponse(r,l,{legacy:!0,error:!1})),c=n.request(r,(l,u)=>l?o(l):a(u));ose(c)&&c.then(a).catch(u=>{try{const d=this._processJsonRpcResponse(r,u,{legacy:!0,error:!0});s(d)}catch(d){s(d)}})});if(vse(n))return new Promise((i,s)=>{n.send(r,(o,a)=>{if(o)return s(this._processJsonRpcResponse(r,o,{legacy:!0,error:!0}));if(mn(a))throw new zf({},'Got a "nullish" response from provider.');return i(this._processJsonRpcResponse(r,a,{legacy:!0,error:!1}))})});if(bse(n))return n.sendAsync(r).then(i=>this._processJsonRpcResponse(r,i,{legacy:!0,error:!1})).catch(i=>this._processJsonRpcResponse(r,i,{legacy:!0,error:!0}));throw new oE("Provider does not have a request or send method to use.")})}_processJsonRpcResponse(e,n,{legacy:r,error:i}){if(mn(n))return this._buildResponse(e,null,i);if(d0(n)){if(this.useRpcCallSpecification&&dj(n)){const s=n;if(Fo.get(s.error.code)){const o=Fo.get(s.error.code).error;throw new o(s)}else throw new bc(s)}else if(!Ag._isReverted(n))throw new F9(n,e)}if(u0(n))return n;if(n instanceof Error)throw Ag._isReverted(n),n;if(!r&&Vu(e)&&Gx(n)||r&&!i&&Vu(e))return n;if(r&&i&&Vu(e))throw n;if(r&&!d0(n)&&!u0(n))return this._buildResponse(e,n,i);throw Vu(e)&&!Array.isArray(n)?new zf(n,"Got normal response for a batch request."):!Vu(e)&&Array.isArray(n)?new zf(n,"Got batch response for a normal request."):new zf(n,"Invalid response")}static _isReverted(e){let n;if(d0(e)?n=e.error:e instanceof Error&&(n=e),n!=null&&n.message.includes("revert"))throw new xg(n);return!1}_buildResponse(e,n,r){const i={jsonrpc:"2.0",id:Vu(e)?e[0].id:"id"in e?e.id:null};return r?Object.assign(Object.assign({},i),{error:n}):Object.assign(Object.assign({},i),{result:n})}}var W2=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};class WO{constructor(e,n,r=!1){this.requestManager=e,this.registeredSubscriptions=n,this.tolerateUnlinkedSubscription=r,this._subscriptions=new Map,this.requestManager.on(tb.BEFORE_PROVIDER_CHANGE,()=>W2(this,void 0,void 0,function*(){yield this.unsubscribe()})),this.requestManager.on(tb.PROVIDER_CHANGED,()=>{this.clear(),this.listenToProviderEvents()}),this.listenToProviderEvents()}listenToProviderEvents(){const e=this.requestManager.provider;!this.requestManager.provider||typeof(e==null?void 0:e.supportsSubscriptions)=="function"&&!(e!=null&&e.supportsSubscriptions())||typeof this.requestManager.provider.on=="function"&&(typeof this.requestManager.provider.request=="function"?this.requestManager.provider.on("message",n=>this.messageListener(n)):e.on("data",n=>this.messageListener(n)))}messageListener(e){var n,r,i;if(!e)throw new Pf("Should not call messageListener with no data. Type was");const s=((n=e.params)===null||n===void 0?void 0:n.subscription)||((r=e.data)===null||r===void 0?void 0:r.subscription)||((i=e.id)===null||i===void 0?void 0:i.toString(16));if(s){const o=this._subscriptions.get(s);o==null||o.processSubscriptionData(e)}}subscribe(e,n,r=Ia){return W2(this,void 0,void 0,function*(){const i=this.registeredSubscriptions[e];if(!i)throw new Pf("Invalid subscription type");const s=new i(n??void 0,{subscriptionManager:this,returnFormat:r});return yield this.addSubscription(s),s})}get subscriptions(){return this._subscriptions}addSubscription(e){return W2(this,void 0,void 0,function*(){if(!this.requestManager.provider)throw new oE("Provider not available");if(!this.supportsSubscriptions())throw new Pf("The current provider does not support subscriptions");if(e.id&&this._subscriptions.has(e.id))throw new Pf(`Subscription with id "${e.id}" already exists`);if(yield e.sendSubscriptionRequest(),mn(e.id))throw new Pf("Subscription is not subscribed yet.");return this._subscriptions.set(e.id,e),e.id})}removeSubscription(e){return W2(this,void 0,void 0,function*(){const{id:n}=e;if(mn(n))throw new Pf("Subscription is not subscribed yet. Or, had already been unsubscribed but not through the Subscription Manager.");if(!this._subscriptions.has(n)&&!this.tolerateUnlinkedSubscription)throw new Pf(`Subscription with id "${n.toString()}" does not exists`);return yield e.sendUnsubscribeRequest(),this._subscriptions.delete(n),n})}unsubscribe(e){return W2(this,void 0,void 0,function*(){const n=[];for(const[r,i]of this.subscriptions.entries())(!e||typeof e=="function"&&e({id:r,sub:i}))&&n.push(this.removeSubscription(i));return Promise.all(n)})}clear(){this._subscriptions.clear()}supportsSubscriptions(){return mn(this.requestManager.provider)?!1:HVe(this.requestManager.provider)}}var V2=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};class v4 extends X9{constructor(e,n){var r;super(),this.args=e;const{requestManager:i}=n,{subscriptionManager:s}=n;i?this._subscriptionManager=new WO(i,{},!0):this._subscriptionManager=s,this._returnFormat=(r=n==null?void 0:n.returnFormat)!==null&&r!==void 0?r:Ia}get id(){return this._id}get lastBlock(){return this._lastBlock}subscribe(){return V2(this,void 0,void 0,function*(){return this._subscriptionManager.addSubscription(this)})}processSubscriptionData(e){var n,r;e!=null&&e.data?this._processSubscriptionResult((r=(n=e==null?void 0:e.data)===null||n===void 0?void 0:n.result)!==null&&r!==void 0?r:e==null?void 0:e.data):e&&J9(e)&&this._processSubscriptionResult(e==null?void 0:e.params.result)}sendSubscriptionRequest(){return V2(this,void 0,void 0,function*(){return this._id=yield this._subscriptionManager.requestManager.send({method:"eth_subscribe",params:this._buildSubscriptionParams()}),this.emit("connected",this._id),this._id})}get returnFormat(){return this._returnFormat}get subscriptionManager(){return this._subscriptionManager}resubscribe(){return V2(this,void 0,void 0,function*(){yield this.unsubscribe(),yield this.subscribe()})}unsubscribe(){return V2(this,void 0,void 0,function*(){this.id&&(yield this._subscriptionManager.removeSubscription(this))})}sendUnsubscribeRequest(){return V2(this,void 0,void 0,function*(){yield this._subscriptionManager.requestManager.send({method:"eth_unsubscribe",params:[this.id]}),this._id=void 0})}formatSubscriptionResult(e){return e}_processSubscriptionResult(e){this.emit("data",this.formatSubscriptionResult(e))}_processSubscriptionError(e){this.emit("error",e)}_buildSubscriptionParams(){throw new Error("Implement in the child class")}}var Nw=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};class L8 extends ZUe{constructor(){super(...arguments),this._addressMap=new Map,this._defaultKeyName="web3js_wallet"}static getStorage(){let e;try{e=window.localStorage;const n="__storage_test__";return e.setItem(n,n),e.removeItem(n),e}catch(n){return n&&(n.code===22||n.code===1014||n.name==="QuotaExceededError"||n.name==="NS_ERROR_DOM_QUOTA_REACHED")&&!$e(e)&&e.length!==0?e:void 0}}create(e){for(let n=0;n<e;n+=1)this.add(this._accountProvider.create());return this}add(e){var n;if(typeof e=="string")return this.add(this._accountProvider.privateKeyToAccount(e));let r=this.length;return this.get(e.address)&&(console.warn(`Account ${e.address.toLowerCase()} already exists.`),r=(n=this._addressMap.get(e.address.toLowerCase()))!==null&&n!==void 0?n:r),this._addressMap.set(e.address.toLowerCase(),r),this[r]=e,this}get(e){if(typeof e=="string"){const n=this._addressMap.get(e.toLowerCase());return $e(n)?void 0:this[n]}return this[e]}remove(e){if(typeof e=="string"){const n=this._addressMap.get(e.toLowerCase());return $e(n)?!1:(this._addressMap.delete(e.toLowerCase()),this.splice(n,1),!0)}return this[e]?(this.splice(e,1),!0):!1}clear(){return this._addressMap.clear(),this.length=0,this}encrypt(e,n){return Nw(this,void 0,void 0,function*(){return Promise.all(this.map(r=>Nw(this,void 0,void 0,function*(){return r.encrypt(e,n)})))})}decrypt(e,n,r){return Nw(this,void 0,void 0,function*(){const i=yield Promise.all(e.map(s=>Nw(this,void 0,void 0,function*(){return this._accountProvider.decrypt(s,n,r)})));for(const s of i)this.add(s);return this})}save(e,n){return Nw(this,void 0,void 0,function*(){const r=L8.getStorage();if(!r)throw new Error("Local storage not available.");return r.setItem(n??this._defaultKeyName,JSON.stringify(yield this.encrypt(e))),!0})}load(e,n){return Nw(this,void 0,void 0,function*(){const r=L8.getStorage();if(!r)throw new Error("Local storage not available.");const i=r.getItem(n??this._defaultKeyName);return i&&(yield this.decrypt(JSON.parse(i)||[],e)),this})}}const id={web:KA};function xse(t,e,n){if(!n.startsWith("aes-"))throw new Error(`AES submodule doesn't support mode ${n}`);if(e.length!==16)throw new Error("AES: wrong IV length");if(n.startsWith("aes-128")&&t.length!==16||n.startsWith("aes-256")&&t.length!==32)throw new Error("AES: wrong key length")}async function _se(t,e,n){if(!id.web)throw new Error("Browser crypto not available.");let r;if(["aes-128-cbc","aes-256-cbc"].includes(t)&&(r="cbc"),["aes-128-ctr","aes-256-ctr"].includes(t)&&(r="ctr"),!r)throw new Error("AES: unsupported mode");return[await id.web.subtle.importKey("raw",e,{name:`AES-${r.toUpperCase()}`,length:e.length*8},!0,["encrypt","decrypt"]),{name:`aes-${r}`,iv:n,counter:n,length:128}]}async function mj(t,e,n,r="aes-128-ctr",i=!0){if(xse(e,n,r),id.web){const[s,o]=await _se(r,e,n),a=await id.web.subtle.encrypt(o,s,t);let c=new Uint8Array(a);return!i&&o.name==="aes-cbc"&&!(t.length%16)&&(c=c.slice(0,-16)),c}else if(id.node){const s=id.node.createCipheriv(r,e,n);return s.setAutoPadding(i),b5(s.update(t),s.final())}else throw new Error("The environment doesn't have AES module")}async function WVe(t,e,n,r){const i=t.slice(-16);for(let o=0;o<16;o++)i[o]^=n[o]^16;return(await mj(i,e,n,r)).slice(0,16)}async function VVe(t,e,n,r="aes-128-ctr",i=!0){if(xse(e,n,r),id.web){const[s,o]=await _se(r,e,n);if(!i&&o.name==="aes-cbc"){const l=await WVe(t,e,n,r);t=b5(t,l)}const a=await id.web.subtle.decrypt(o,s,t),c=new Uint8Array(a);if(o.name==="aes-cbc"){const l=await mj(c,e,n,r);if(!HHe(l,t))throw new Error("AES: wrong padding")}return c}else if(id.node){const s=id.node.createDecipheriv(r,e,n);return s.setAutoPadding(i),b5(s.update(t),s.final())}else throw new Error("The environment doesn't have AES module")}function qVe(t,e,n,r){rB(t);const i=NX({dkLen:32,asyncTick:10},r),{c:s,dkLen:o,asyncTick:a}=i;if(pa(s),pa(o),pa(a),s<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=fv(e),l=fv(n),u=new Uint8Array(o),d=t9.create(t,c),h=d._cloneInto().update(l);return{c:s,dkLen:o,asyncTick:a,DK:u,PRF:d,PRFSalt:h}}function GVe(t,e,n,r,i){return t.destroy(),e.destroy(),r&&r.destroy(),i.fill(0),n}function gj(t,e,n,r){const{c:i,dkLen:s,DK:o,PRF:a,PRFSalt:c}=qVe(t,e,n,r);let l;const u=new Uint8Array(4),d=QA(u),h=new Uint8Array(a.outputLen);for(let g=1,w=0;w<s;g++,w+=a.outputLen){const v=o.subarray(w,w+a.outputLen);d.setInt32(0,g,!1),(l=c._cloneInto(l)).update(u).digestInto(h),v.set(h.subarray(0,v.length));for(let _=1;_<i;_++){a._cloneInto(l).update(h).digestInto(h);for(let T=0;T<v.length;T++)v[T]^=h[T]}}return GVe(a,c,o,l,h)}function Ase(t,e,n,r,i){if(!["sha256","sha512"].includes(i))throw new Error("Only sha256 and sha512 are supported");return E8(t),E8(e),gj(Ib,t,e,{c:n,dkLen:r})}function IG(t,e,n,r,i,s){let o=t[e++]^n[r++],a=t[e++]^n[r++],c=t[e++]^n[r++],l=t[e++]^n[r++],u=t[e++]^n[r++],d=t[e++]^n[r++],h=t[e++]^n[r++],g=t[e++]^n[r++],w=t[e++]^n[r++],v=t[e++]^n[r++],_=t[e++]^n[r++],T=t[e++]^n[r++],b=t[e++]^n[r++],k=t[e++]^n[r++],D=t[e++]^n[r++],O=t[e++]^n[r++],$=o,C=a,A=c,H=l,V=u,Y=d,ee=h,x=g,E=w,y=v,I=_,B=T,M=b,W=k,z=D,P=O;for(let Z=0;Z<8;Z+=2)V^=xr($+M|0,7),E^=xr(V+$|0,9),M^=xr(E+V|0,13),$^=xr(M+E|0,18),y^=xr(Y+C|0,7),W^=xr(y+Y|0,9),C^=xr(W+y|0,13),Y^=xr(C+W|0,18),z^=xr(I+ee|0,7),A^=xr(z+I|0,9),ee^=xr(A+z|0,13),I^=xr(ee+A|0,18),H^=xr(P+B|0,7),x^=xr(H+P|0,9),B^=xr(x+H|0,13),P^=xr(B+x|0,18),C^=xr($+H|0,7),A^=xr(C+$|0,9),H^=xr(A+C|0,13),$^=xr(H+A|0,18),ee^=xr(Y+V|0,7),x^=xr(ee+Y|0,9),V^=xr(x+ee|0,13),Y^=xr(V+x|0,18),B^=xr(I+y|0,7),E^=xr(B+I|0,9),y^=xr(E+B|0,13),I^=xr(y+E|0,18),M^=xr(P+z|0,7),W^=xr(M+P|0,9),z^=xr(W+M|0,13),P^=xr(z+W|0,18);i[s++]=o+$|0,i[s++]=a+C|0,i[s++]=c+A|0,i[s++]=l+H|0,i[s++]=u+V|0,i[s++]=d+Y|0,i[s++]=h+ee|0,i[s++]=g+x|0,i[s++]=w+E|0,i[s++]=v+y|0,i[s++]=_+I|0,i[s++]=T+B|0,i[s++]=b+M|0,i[s++]=k+W|0,i[s++]=D+z|0,i[s++]=O+P|0}function Xk(t,e,n,r,i){let s=r+0,o=r+16*i;for(let a=0;a<16;a++)n[o+a]=t[e+(2*i-1)*16+a];for(let a=0;a<i;a++,s+=16,e+=16)IG(n,o,t,e,n,s),a>0&&(o+=16),IG(n,s,t,e+=16,n,o)}function KVe(t,e,n){const r=NX({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:i,r:s,p:o,dkLen:a,asyncTick:c,maxmem:l,onProgress:u}=r;if(pa(i),pa(s),pa(o),pa(a),pa(c),pa(l),u!==void 0&&typeof u!="function")throw new Error("progressCb should be function");const d=128*s,h=d/4;if(i<=1||i&i-1||i>=2**(d/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(o<0||o>(2**32-1)*32/d)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(a<0||a>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const g=d*(i+o);if(g>l)throw new Error(`Scrypt: parameters too large, ${g} (128 * r * (N + p)) > ${l} (maxmem)`);const w=gj(Ib,t,e,{c:1,dkLen:d*o}),v=YA(w),_=YA(new Uint8Array(d*i)),T=YA(new Uint8Array(d));let b=()=>{};if(u){const k=2*i*o,D=Math.max(Math.floor(k/1e4),1);let O=0;b=()=>{O++,u&&(!(O%D)||O===k)&&u(O/k)}}return{N:i,r:s,p:o,dkLen:a,blockSize32:h,V:_,B32:v,B:w,tmp:T,blockMixCb:b,asyncTick:c}}function YVe(t,e,n,r,i){const s=gj(Ib,t,n,{c:1,dkLen:e});return n.fill(0),r.fill(0),i.fill(0),s}function QVe(t,e,n){const{N:r,r:i,p:s,dkLen:o,blockSize32:a,V:c,B32:l,B:u,tmp:d,blockMixCb:h}=KVe(t,e,n);sC||oC(l);for(let g=0;g<s;g++){const w=a*g;for(let v=0;v<a;v++)c[v]=l[w+v];for(let v=0,_=0;v<r-1;v++)Xk(c,_,c,_+=a,i),h();Xk(c,(r-1)*a,l,w,i),h();for(let v=0;v<r;v++){const _=l[w+a-16]%r;for(let T=0;T<a;T++)d[T]=l[w+T]^c[_*a+T];Xk(d,0,l,w,i),h()}}return sC||oC(l),YVe(t,o,u,c,d)}function Ese(t,e,n,r,i,s,o){return E8(t),E8(e),QVe(t,e,{N:n,r:i,p:r,dkLen:s,onProgress:o})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Cse=BigInt(0),tT=BigInt(1),ZVe=BigInt(2);function p1(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function b4(t){if(!p1(t))throw new Error("Uint8Array expected")}const JVe=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function nb(t){b4(t);let e="";for(let n=0;n<t.length;n++)e+=JVe[t[n]];return e}function Sse(t){const e=t.toString(16);return e.length&1?`0${e}`:e}function wj(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}const Af={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function kG(t){if(t>=Af._0&&t<=Af._9)return t-Af._0;if(t>=Af._A&&t<=Af._F)return t-(Af._A-10);if(t>=Af._a&&t<=Af._f)return t-(Af._a-10)}function rb(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length,n=e/2;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(n);for(let i=0,s=0;i<n;i++,s+=2){const o=kG(t.charCodeAt(s)),a=kG(t.charCodeAt(s+1));if(o===void 0||a===void 0){const c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}r[i]=o*16+a}return r}function Eg(t){return wj(nb(t))}function yj(t){return b4(t),wj(nb(Uint8Array.from(t).reverse()))}function ib(t,e){return rb(t.toString(16).padStart(e*2,"0"))}function vj(t,e){return ib(t,e).reverse()}function XVe(t){return rb(Sse(t))}function ql(t,e,n){let r;if(typeof e=="string")try{r=rb(e)}catch(s){throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${s}`)}else if(p1(e))r=Uint8Array.from(e);else throw new Error(`${t} must be hex string or Uint8Array`);const i=r.length;if(typeof n=="number"&&i!==n)throw new Error(`${t} expected ${n} bytes, got ${i}`);return r}function Kx(...t){let e=0;for(let r=0;r<t.length;r++){const i=t[r];b4(i),e+=i.length}const n=new Uint8Array(e);for(let r=0,i=0;r<t.length;r++){const s=t[r];n.set(s,i),i+=s.length}return n}function eqe(t,e){if(t.length!==e.length)return!1;let n=0;for(let r=0;r<t.length;r++)n|=t[r]^e[r];return n===0}function tqe(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function nqe(t){let e;for(e=0;t>Cse;t>>=tT,e+=1);return e}function rqe(t,e){return t>>BigInt(e)&tT}function iqe(t,e,n){return t|(n?tT:Cse)<<BigInt(e)}const bj=t=>(ZVe<<BigInt(t-1))-tT,eR=t=>new Uint8Array(t),RG=t=>Uint8Array.from(t);function Tse(t,e,n){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 n!="function")throw new Error("hmacFn must be a function");let r=eR(t),i=eR(t),s=0;const o=()=>{r.fill(1),i.fill(0),s=0},a=(...d)=>n(i,r,...d),c=(d=eR())=>{i=a(RG([0]),d),r=a(),d.length!==0&&(i=a(RG([1]),d),r=a())},l=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let d=0;const h=[];for(;d<e;){r=a();const g=r.slice();h.push(g),d+=r.length}return Kx(...h)};return(d,h)=>{o(),c(d);let g;for(;!(g=h(l()));)c();return o(),g}}const sqe={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"||p1(t),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 x4(t,e,n={}){const r=(i,s,o)=>{const a=sqe[s];if(typeof a!="function")throw new Error(`Invalid validator "${s}", expected function`);const c=t[i];if(!(o&&c===void 0)&&!a(c,t))throw new Error(`Invalid param ${String(i)}=${c} (${typeof c}), expected ${s}`)};for(const[i,s]of Object.entries(e))r(i,s,!1);for(const[i,s]of Object.entries(n))r(i,s,!0);return t}const oqe=Object.freeze(Object.defineProperty({__proto__:null,abytes:b4,bitGet:rqe,bitLen:nqe,bitMask:bj,bitSet:iqe,bytesToHex:nb,bytesToNumberBE:Eg,bytesToNumberLE:yj,concatBytes:Kx,createHmacDrbg:Tse,ensureBytes:ql,equalBytes:eqe,hexToBytes:rb,hexToNumber:wj,isBytes:p1,numberToBytesBE:ib,numberToBytesLE:vj,numberToHexUnpadded:Sse,numberToVarBytesBE:XVe,utf8ToBytes:tqe,validateObject:x4},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Os=BigInt(0),Zi=BigInt(1),Um=BigInt(2),aqe=BigInt(3),VO=BigInt(4),NG=BigInt(5),PG=BigInt(8);BigInt(9);BigInt(16);function fa(t,e){const n=t%e;return n>=Os?n:e+n}function cqe(t,e,n){if(n<=Os||e<Os)throw new Error("Expected power/modulo > 0");if(n===Zi)return Os;let r=Zi;for(;e>Os;)e&Zi&&(r=r*t%n),t=t*t%n,e>>=Zi;return r}function Hc(t,e,n){let r=t;for(;e-- >Os;)r*=r,r%=n;return r}function qO(t,e){if(t===Os||e<=Os)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let n=fa(t,e),r=e,i=Os,s=Zi;for(;n!==Os;){const a=r/n,c=r%n,l=i-s*a;r=n,n=c,i=s,s=l}if(r!==Zi)throw new Error("invert: does not exist");return fa(i,e)}function lqe(t){const e=(t-Zi)/Um;let n,r,i;for(n=t-Zi,r=0;n%Um===Os;n/=Um,r++);for(i=Um;i<t&&cqe(i,e,t)!==t-Zi;i++);if(r===1){const o=(t+Zi)/VO;return function(c,l){const u=c.pow(l,o);if(!c.eql(c.sqr(u),l))throw new Error("Cannot find square root");return u}}const s=(n+Zi)/Um;return function(a,c){if(a.pow(c,e)===a.neg(a.ONE))throw new Error("Cannot find square root");let l=r,u=a.pow(a.mul(a.ONE,i),n),d=a.pow(c,s),h=a.pow(c,n);for(;!a.eql(h,a.ONE);){if(a.eql(h,a.ZERO))return a.ZERO;let g=1;for(let v=a.sqr(h);g<l&&!a.eql(v,a.ONE);g++)v=a.sqr(v);const w=a.pow(u,Zi<<BigInt(l-g-1));u=a.sqr(w),d=a.mul(d,w),h=a.mul(h,u),l=g}return d}}function uqe(t){if(t%VO===aqe){const e=(t+Zi)/VO;return function(r,i){const s=r.pow(i,e);if(!r.eql(r.sqr(s),i))throw new Error("Cannot find square root");return s}}if(t%PG===NG){const e=(t-NG)/PG;return function(r,i){const s=r.mul(i,Um),o=r.pow(s,e),a=r.mul(i,o),c=r.mul(r.mul(a,Um),o),l=r.mul(a,r.sub(c,r.ONE));if(!r.eql(r.sqr(l),i))throw new Error("Cannot find square root");return l}}return lqe(t)}const dqe=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function fqe(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=dqe.reduce((r,i)=>(r[i]="function",r),e);return x4(t,n)}function hqe(t,e,n){if(n<Os)throw new Error("Expected power > 0");if(n===Os)return t.ONE;if(n===Zi)return e;let r=t.ONE,i=e;for(;n>Os;)n&Zi&&(r=t.mul(r,i)),i=t.sqr(i),n>>=Zi;return r}function pqe(t,e){const n=new Array(e.length),r=e.reduce((s,o,a)=>t.is0(o)?s:(n[a]=s,t.mul(s,o)),t.ONE),i=t.inv(r);return e.reduceRight((s,o,a)=>t.is0(o)?s:(n[a]=t.mul(s,n[a]),t.mul(s,o)),i),n}function Ise(t,e){const n=e!==void 0?e:t.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function mqe(t,e,n=!1,r={}){if(t<=Os)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:i,nByteLength:s}=Ise(t,e);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=uqe(t),a=Object.freeze({ORDER:t,BITS:i,BYTES:s,MASK:bj(i),ZERO:Os,ONE:Zi,create:c=>fa(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return Os<=c&&c<t},is0:c=>c===Os,isOdd:c=>(c&Zi)===Zi,neg:c=>fa(-c,t),eql:(c,l)=>c===l,sqr:c=>fa(c*c,t),add:(c,l)=>fa(c+l,t),sub:(c,l)=>fa(c-l,t),mul:(c,l)=>fa(c*l,t),pow:(c,l)=>hqe(a,c,l),div:(c,l)=>fa(c*qO(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>qO(c,t),sqrt:r.sqrt||(c=>o(a,c)),invertBatch:c=>pqe(a,c),cmov:(c,l,u)=>u?l:c,toBytes:c=>n?vj(c,s):ib(c,s),fromBytes:c=>{if(c.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${c.length}`);return n?yj(c):Eg(c)}});return Object.freeze(a)}function kse(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 Rse(t){const e=kse(t);return e+Math.ceil(e/2)}function gqe(t,e,n=!1){const r=t.length,i=kse(e),s=Rse(e);if(r<16||r<s||r>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${r}`);const o=n?Eg(t):yj(t),a=fa(o,e-Zi)+Zi;return n?vj(a,i):ib(a,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const wqe=BigInt(0),tR=BigInt(1);function yqe(t,e){const n=(i,s)=>{const o=s.negate();return i?o:s},r=i=>{const s=Math.ceil(e/i)+1,o=2**(i-1);return{windows:s,windowSize:o}};return{constTimeNegate:n,unsafeLadder(i,s){let o=t.ZERO,a=i;for(;s>wqe;)s&tR&&(o=o.add(a)),a=a.double(),s>>=tR;return o},precomputeWindow(i,s){const{windows:o,windowSize:a}=r(s),c=[];let l=i,u=l;for(let d=0;d<o;d++){u=l,c.push(u);for(let h=1;h<a;h++)u=u.add(l),c.push(u);l=u.double()}return c},wNAF(i,s,o){const{windows:a,windowSize:c}=r(i);let l=t.ZERO,u=t.BASE;const d=BigInt(2**i-1),h=2**i,g=BigInt(i);for(let w=0;w<a;w++){const v=w*c;let _=Number(o&d);o>>=g,_>c&&(_-=h,o+=tR);const T=v,b=v+Math.abs(_)-1,k=w%2!==0,D=_<0;_===0?u=u.add(n(k,s[T])):l=l.add(n(D,s[b]))}return{p:l,f:u}},wNAFCached(i,s,o,a){const c=i._WINDOW_SIZE||1;let l=s.get(i);return l||(l=this.precomputeWindow(i,c),c!==1&&s.set(i,a(l))),this.wNAF(c,l,o)}}}function Nse(t){return fqe(t.Fp),x4(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Ise(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function vqe(t){const e=Nse(t);x4(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a:i}=e;if(n){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:bqe,hexToBytes:xqe}=oqe,Xm={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=Xm;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const n=t[1],r=t.subarray(2,n+2);if(!n||r.length!==n)throw new e("Invalid signature integer: wrong length");if(r[0]&128)throw new e("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:bqe(r),l:t.subarray(n+2)}},toSig(t){const{Err:e}=Xm,n=typeof t=="string"?xqe(t):t;b4(n);let r=n.length;if(r<2||n[0]!=48)throw new e("Invalid signature tag");if(n[1]!==r-2)throw new e("Invalid signature: incorrect length");const{d:i,l:s}=Xm._parseInt(n.subarray(2)),{d:o,l:a}=Xm._parseInt(s);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s:o}},hexFromSig(t){const e=l=>Number.parseInt(l[0],16)&8?"00"+l:l,n=l=>{const u=l.toString(16);return u.length&1?`0${u}`:u},r=e(n(t.s)),i=e(n(t.r)),s=r.length/2,o=i.length/2,a=n(s),c=n(o);return`30${n(o+s+4)}02${c}${i}02${a}${r}`}},Hf=BigInt(0),rl=BigInt(1);BigInt(2);const OG=BigInt(3);BigInt(4);function _qe(t){const e=vqe(t),{Fp:n}=e,r=e.toBytes||((w,v,_)=>{const T=v.toAffine();return Kx(Uint8Array.from([4]),n.toBytes(T.x),n.toBytes(T.y))}),i=e.fromBytes||(w=>{const v=w.subarray(1),_=n.fromBytes(v.subarray(0,n.BYTES)),T=n.fromBytes(v.subarray(n.BYTES,2*n.BYTES));return{x:_,y:T}});function s(w){const{a:v,b:_}=e,T=n.sqr(w),b=n.mul(T,w);return n.add(n.add(b,n.mul(w,v)),_)}if(!n.eql(n.sqr(e.Gy),s(e.Gx)))throw new Error("bad generator point: equation left != right");function o(w){return typeof w=="bigint"&&Hf<w&&w<e.n}function a(w){if(!o(w))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(w){const{allowedPrivateKeyLengths:v,nByteLength:_,wrapPrivateKey:T,n:b}=e;if(v&&typeof w!="bigint"){if(p1(w)&&(w=nb(w)),typeof w!="string"||!v.includes(w.length))throw new Error("Invalid key");w=w.padStart(_*2,"0")}let k;try{k=typeof w=="bigint"?w:Eg(ql("private key",w,_))}catch{throw new Error(`private key must be ${_} bytes, hex or bigint, not ${typeof w}`)}return T&&(k=fa(k,b)),a(k),k}const l=new Map;function u(w){if(!(w instanceof d))throw new Error("ProjectivePoint expected")}class d{constructor(v,_,T){if(this.px=v,this.py=_,this.pz=T,v==null||!n.isValid(v))throw new Error("x required");if(_==null||!n.isValid(_))throw new Error("y required");if(T==null||!n.isValid(T))throw new Error("z required")}static fromAffine(v){const{x:_,y:T}=v||{};if(!v||!n.isValid(_)||!n.isValid(T))throw new Error("invalid affine point");if(v instanceof d)throw new Error("projective point not allowed");const b=k=>n.eql(k,n.ZERO);return b(_)&&b(T)?d.ZERO:new d(_,T,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(v){const _=n.invertBatch(v.map(T=>T.pz));return v.map((T,b)=>T.toAffine(_[b])).map(d.fromAffine)}static fromHex(v){const _=d.fromAffine(i(ql("pointHex",v)));return _.assertValidity(),_}static fromPrivateKey(v){return d.BASE.multiply(c(v))}_setWindowSize(v){this._WINDOW_SIZE=v,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:v,y:_}=this.toAffine();if(!n.isValid(v)||!n.isValid(_))throw new Error("bad point: x or y not FE");const T=n.sqr(_),b=s(v);if(!n.eql(T,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(n.isOdd)return!n.isOdd(v);throw new Error("Field doesn't support isOdd")}equals(v){u(v);const{px:_,py:T,pz:b}=this,{px:k,py:D,pz:O}=v,$=n.eql(n.mul(_,O),n.mul(k,b)),C=n.eql(n.mul(T,O),n.mul(D,b));return $&&C}negate(){return new d(this.px,n.neg(this.py),this.pz)}double(){const{a:v,b:_}=e,T=n.mul(_,OG),{px:b,py:k,pz:D}=this;let O=n.ZERO,$=n.ZERO,C=n.ZERO,A=n.mul(b,b),H=n.mul(k,k),V=n.mul(D,D),Y=n.mul(b,k);return Y=n.add(Y,Y),C=n.mul(b,D),C=n.add(C,C),O=n.mul(v,C),$=n.mul(T,V),$=n.add(O,$),O=n.sub(H,$),$=n.add(H,$),$=n.mul(O,$),O=n.mul(Y,O),C=n.mul(T,C),V=n.mul(v,V),Y=n.sub(A,V),Y=n.mul(v,Y),Y=n.add(Y,C),C=n.add(A,A),A=n.add(C,A),A=n.add(A,V),A=n.mul(A,Y),$=n.add($,A),V=n.mul(k,D),V=n.add(V,V),A=n.mul(V,Y),O=n.sub(O,A),C=n.mul(V,H),C=n.add(C,C),C=n.add(C,C),new d(O,$,C)}add(v){u(v);const{px:_,py:T,pz:b}=this,{px:k,py:D,pz:O}=v;let $=n.ZERO,C=n.ZERO,A=n.ZERO;const H=e.a,V=n.mul(e.b,OG);let Y=n.mul(_,k),ee=n.mul(T,D),x=n.mul(b,O),E=n.add(_,T),y=n.add(k,D);E=n.mul(E,y),y=n.add(Y,ee),E=n.sub(E,y),y=n.add(_,b);let I=n.add(k,O);return y=n.mul(y,I),I=n.add(Y,x),y=n.sub(y,I),I=n.add(T,b),$=n.add(D,O),I=n.mul(I,$),$=n.add(ee,x),I=n.sub(I,$),A=n.mul(H,y),$=n.mul(V,x),A=n.add($,A),$=n.sub(ee,A),A=n.add(ee,A),C=n.mul($,A),ee=n.add(Y,Y),ee=n.add(ee,Y),x=n.mul(H,x),y=n.mul(V,y),ee=n.add(ee,x),x=n.sub(Y,x),x=n.mul(H,x),y=n.add(y,x),Y=n.mul(ee,y),C=n.add(C,Y),Y=n.mul(I,y),$=n.mul(E,$),$=n.sub($,Y),Y=n.mul(E,ee),A=n.mul(I,A),A=n.add(A,Y),new d($,C,A)}subtract(v){return this.add(v.negate())}is0(){return this.equals(d.ZERO)}wNAF(v){return g.wNAFCached(this,l,v,_=>{const T=n.invertBatch(_.map(b=>b.pz));return _.map((b,k)=>b.toAffine(T[k])).map(d.fromAffine)})}multiplyUnsafe(v){const _=d.ZERO;if(v===Hf)return _;if(a(v),v===rl)return this;const{endo:T}=e;if(!T)return g.unsafeLadder(this,v);let{k1neg:b,k1:k,k2neg:D,k2:O}=T.splitScalar(v),$=_,C=_,A=this;for(;k>Hf||O>Hf;)k&rl&&($=$.add(A)),O&rl&&(C=C.add(A)),A=A.double(),k>>=rl,O>>=rl;return b&&($=$.negate()),D&&(C=C.negate()),C=new d(n.mul(C.px,T.beta),C.py,C.pz),$.add(C)}multiply(v){a(v);let _=v,T,b;const{endo:k}=e;if(k){const{k1neg:D,k1:O,k2neg:$,k2:C}=k.splitScalar(_);let{p:A,f:H}=this.wNAF(O),{p:V,f:Y}=this.wNAF(C);A=g.constTimeNegate(D,A),V=g.constTimeNegate($,V),V=new d(n.mul(V.px,k.beta),V.py,V.pz),T=A.add(V),b=H.add(Y)}else{const{p:D,f:O}=this.wNAF(_);T=D,b=O}return d.normalizeZ([T,b])[0]}multiplyAndAddUnsafe(v,_,T){const b=d.BASE,k=(O,$)=>$===Hf||$===rl||!O.equals(b)?O.multiplyUnsafe($):O.multiply($),D=k(this,_).add(k(v,T));return D.is0()?void 0:D}toAffine(v){const{px:_,py:T,pz:b}=this,k=this.is0();v==null&&(v=k?n.ONE:n.inv(b));const D=n.mul(_,v),O=n.mul(T,v),$=n.mul(b,v);if(k)return{x:n.ZERO,y:n.ZERO};if(!n.eql($,n.ONE))throw new Error("invZ was invalid");return{x:D,y:O}}isTorsionFree(){const{h:v,isTorsionFree:_}=e;if(v===rl)return!0;if(_)return _(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:v,clearCofactor:_}=e;return v===rl?this:_?_(d,this):this.multiplyUnsafe(e.h)}toRawBytes(v=!0){return this.assertValidity(),r(d,this,v)}toHex(v=!0){return nb(this.toRawBytes(v))}}d.BASE=new d(e.Gx,e.Gy,n.ONE),d.ZERO=new d(n.ZERO,n.ONE,n.ZERO);const h=e.nBitLength,g=yqe(d,e.endo?Math.ceil(h/2):h);return{CURVE:e,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:o}}function Aqe(t){const e=Nse(t);return x4(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function Eqe(t){const e=Aqe(t),{Fp:n,n:r}=e,i=n.BYTES+1,s=2*n.BYTES+1;function o(y){return Hf<y&&y<n.ORDER}function a(y){return fa(y,r)}function c(y){return qO(y,r)}const{ProjectivePoint:l,normPrivateKeyToScalar:u,weierstrassEquation:d,isWithinCurveOrder:h}=_qe({...e,toBytes(y,I,B){const M=I.toAffine(),W=n.toBytes(M.x),z=Kx;return B?z(Uint8Array.from([I.hasEvenY()?2:3]),W):z(Uint8Array.from([4]),W,n.toBytes(M.y))},fromBytes(y){const I=y.length,B=y[0],M=y.subarray(1);if(I===i&&(B===2||B===3)){const W=Eg(M);if(!o(W))throw new Error("Point is not on curve");const z=d(W);let P;try{P=n.sqrt(z)}catch(ve){const j=ve instanceof Error?": "+ve.message:"";throw new Error("Point is not on curve"+j)}const Z=(P&rl)===rl;return(B&1)===1!==Z&&(P=n.neg(P)),{x:W,y:P}}else if(I===s&&B===4){const W=n.fromBytes(M.subarray(0,n.BYTES)),z=n.fromBytes(M.subarray(n.BYTES,2*n.BYTES));return{x:W,y:z}}else throw new Error(`Point of length ${I} was invalid. Expected ${i} compressed bytes or ${s} uncompressed bytes`)}}),g=y=>nb(ib(y,e.nByteLength));function w(y){const I=r>>rl;return y>I}function v(y){return w(y)?a(-y):y}const _=(y,I,B)=>Eg(y.slice(I,B));class T{constructor(I,B,M){this.r=I,this.s=B,this.recovery=M,this.assertValidity()}static fromCompact(I){const B=e.nByteLength;return I=ql("compactSignature",I,B*2),new T(_(I,0,B),_(I,B,2*B))}static fromDER(I){const{r:B,s:M}=Xm.toSig(ql("DER",I));return new T(B,M)}assertValidity(){if(!h(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!h(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(I){return new T(this.r,this.s,I)}recoverPublicKey(I){const{r:B,s:M,recovery:W}=this,z=C(ql("msgHash",I));if(W==null||![0,1,2,3].includes(W))throw new Error("recovery id invalid");const P=W===2||W===3?B+e.n:B;if(P>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const Z=W&1?"03":"02",he=l.fromHex(Z+g(P)),ve=c(P),j=a(-z*ve),ge=a(M*ve),te=l.BASE.multiplyAndAddUnsafe(he,j,ge);if(!te)throw new Error("point at infinify");return te.assertValidity(),te}hasHighS(){return w(this.s)}normalizeS(){return this.hasHighS()?new T(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return rb(this.toDERHex())}toDERHex(){return Xm.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return rb(this.toCompactHex())}toCompactHex(){return g(this.r)+g(this.s)}}const b={isValidPrivateKey(y){try{return u(y),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const y=Rse(e.n);return gqe(e.randomBytes(y),e.n)},precompute(y=8,I=l.BASE){return I._setWindowSize(y),I.multiply(BigInt(3)),I}};function k(y,I=!0){return l.fromPrivateKey(y).toRawBytes(I)}function D(y){const I=p1(y),B=typeof y=="string",M=(I||B)&&y.length;return I?M===i||M===s:B?M===2*i||M===2*s:y instanceof l}function O(y,I,B=!0){if(D(y))throw new Error("first arg must be private key");if(!D(I))throw new Error("second arg must be public key");return l.fromHex(I).multiply(u(y)).toRawBytes(B)}const $=e.bits2int||function(y){const I=Eg(y),B=y.length*8-e.nBitLength;return B>0?I>>BigInt(B):I},C=e.bits2int_modN||function(y){return a($(y))},A=bj(e.nBitLength);function H(y){if(typeof y!="bigint")throw new Error("bigint expected");if(!(Hf<=y&&y<A))throw new Error(`bigint expected < 2^${e.nBitLength}`);return ib(y,e.nByteLength)}function V(y,I,B=Y){if(["recovered","canonical"].some(se=>se in B))throw new Error("sign() legacy options not supported");const{hash:M,randomBytes:W}=e;let{lowS:z,prehash:P,extraEntropy:Z}=B;z==null&&(z=!0),y=ql("msgHash",y),P&&(y=ql("prehashed msgHash",M(y)));const he=C(y),ve=u(I),j=[H(ve),H(he)];if(Z!=null&&Z!==!1){const se=Z===!0?W(n.BYTES):Z;j.push(ql("extraEntropy",se))}const ge=Kx(...j),te=he;function ae(se){const L=$(se);if(!h(L))return;const re=c(L),be=l.BASE.multiply(L).toAffine(),Se=a(be.x);if(Se===Hf)return;const Ie=a(re*a(te+Se*ve));if(Ie===Hf)return;let Ue=(be.x===Se?0:2)|Number(be.y&rl),lt=Ie;return z&&w(Ie)&&(lt=v(Ie),Ue^=1),new T(Se,lt,Ue)}return{seed:ge,k2sig:ae}}const Y={lowS:e.lowS,prehash:!1},ee={lowS:e.lowS,prehash:!1};function x(y,I,B=Y){const{seed:M,k2sig:W}=V(y,I,B),z=e;return Tse(z.hash.outputLen,z.nByteLength,z.hmac)(M,W)}l.BASE._setWindowSize(8);function E(y,I,B,M=ee){var be;const W=y;if(I=ql("msgHash",I),B=ql("publicKey",B),"strict"in M)throw new Error("options.strict was renamed to lowS");const{lowS:z,prehash:P}=M;let Z,he;try{if(typeof W=="string"||p1(W))try{Z=T.fromDER(W)}catch(Se){if(!(Se instanceof Xm.Err))throw Se;Z=T.fromCompact(W)}else if(typeof W=="object"&&typeof W.r=="bigint"&&typeof W.s=="bigint"){const{r:Se,s:Ie}=W;Z=new T(Se,Ie)}else throw new Error("PARSE");he=l.fromHex(B)}catch(Se){if(Se.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(z&&Z.hasHighS())return!1;P&&(I=e.hash(I));const{r:ve,s:j}=Z,ge=C(I),te=c(j),ae=a(ge*te),se=a(ve*te),L=(be=l.BASE.multiplyAndAddUnsafe(he,ae,se))==null?void 0:be.toAffine();return L?a(L.x)===ve:!1}return{CURVE:e,getPublicKey:k,getSharedSecret:O,sign:x,verify:E,ProjectivePoint:l,Signature:T,utils:b}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Cqe(t){return{hash:t,hmac:(e,...n)=>t9(t,e,b5(...n)),randomBytes:oB}}function Sqe(t,e){const n=r=>Eqe({...t,...Cqe(r)});return Object.freeze({...n(e),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Pse=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),DG=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Tqe=BigInt(1),GO=BigInt(2),MG=(t,e)=>(t+e/GO)/e;function Iqe(t){const e=Pse,n=BigInt(3),r=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=t*t*t%e,u=l*l*t%e,d=Hc(u,n,e)*u%e,h=Hc(d,n,e)*u%e,g=Hc(h,GO,e)*l%e,w=Hc(g,i,e)*g%e,v=Hc(w,s,e)*w%e,_=Hc(v,a,e)*v%e,T=Hc(_,c,e)*_%e,b=Hc(T,a,e)*v%e,k=Hc(b,n,e)*u%e,D=Hc(k,o,e)*w%e,O=Hc(D,r,e)*l%e,$=Hc(O,GO,e);if(!KO.eql(KO.sqr($),t))throw new Error("Cannot find square root");return $}const KO=mqe(Pse,void 0,void 0,{sqrt:Iqe}),xj=Sqe({a:BigInt(0),b:BigInt(7),Fp:KO,n:DG,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=DG,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-Tqe*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=n,o=BigInt("0x100000000000000000000000000000000"),a=MG(s*t,e),c=MG(-r*t,e);let l=fa(t-a*n-c*i,e),u=fa(-a*r-c*s,e);const d=l>o,h=u>o;if(d&&(l=e-l),h&&(u=e-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:d,k1:l,k2neg:h,k2:u}}}},Ib);BigInt(0);xj.ProjectivePoint;const kqe=Object.freeze(Object.defineProperty({__proto__:null,secp256k1:xj},Symbol.toStringTag,{value:"Module"}));var nR;const $h=(nR=xj)!==null&&nR!==void 0?nR:kqe,BG=BigInt("0xffffffffffffffff"),Yx=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Rqe=$h.CURVE.n,Nqe=Rqe/BigInt(2),Pqe={type:"object",required:["crypto","id","version","address"],properties:{crypto:{type:"object",required:["cipher","ciphertext","cipherparams","kdf","kdfparams","mac"],properties:{cipher:{type:"string"},ciphertext:{type:"string"},cipherparams:{type:"object"},kdf:{type:"string"},kdfparams:{type:"object"},salt:{type:"string"},mac:{type:"string"}}},id:{type:"string"},version:{type:"number"},address:{type:"string"}}};var U8;(function(t){t[t.Mainnet=1]="Mainnet",t[t.Goerli=5]="Goerli",t[t.Sepolia=11155111]="Sepolia"})(U8||(U8={}));var ei;(function(t){t.Chainstart="chainstart",t.Homestead="homestead",t.Dao="dao",t.TangerineWhistle="tangerineWhistle",t.SpuriousDragon="spuriousDragon",t.Byzantium="byzantium",t.Constantinople="constantinople",t.Petersburg="petersburg",t.Istanbul="istanbul",t.MuirGlacier="muirGlacier",t.Berlin="berlin",t.London="london",t.ArrowGlacier="arrowGlacier",t.GrayGlacier="grayGlacier",t.MergeForkIdTransition="mergeForkIdTransition",t.Merge="merge",t.Shanghai="shanghai",t.ShardingForkDev="shardingFork"})(ei||(ei={}));var $G;(function(t){t.ProofOfStake="pos",t.ProofOfWork="pow",t.ProofOfAuthority="poa"})($G||($G={}));var jG;(function(t){t.Ethash="ethash",t.Clique="clique",t.Casper="casper"})(jG||(jG={}));var ao;(function(t){t.PolygonMainnet="polygon-mainnet",t.PolygonMumbai="polygon-mumbai",t.ArbitrumRinkebyTestnet="arbitrum-rinkeby-testnet",t.ArbitrumOne="arbitrum-one",t.xDaiChain="x-dai-chain",t.OptimisticKovan="optimistic-kovan",t.OptimisticEthereum="optimistic-ethereum"})(ao||(ao={}));var al;(function(t){t[t.Number=0]="Number",t[t.BigInt=1]="BigInt",t[t.Uint8Array=2]="Uint8Array",t[t.PrefixedHexString=3]="PrefixedHexString"})(al||(al={}));const Ose=t=>{if(typeof t!="string")throw new Error(`[stripHexPrefix] input must be type 'string', received ${typeof t}`);return tj(t)?t.slice(2):t};function Oqe(t){return!t||t==="0x0"?"0x0000000000000000":tj(t)?`0x${Ose(t).padStart(16,"0")}`:`0x${t.padStart(16,"0")}`}const Dse=function(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Received an invalid integer type: ${t}`);return`0x${t.toString(16)}`};function Dqe(t,e=!0){var n,r;const{name:i,config:s,difficulty:o,mixHash:a,gasLimit:c,coinbase:l,baseFeePerGas:u}=t;let{extraData:d,timestamp:h,nonce:g}=t;const w=Number(h),{chainId:v}=s;if(d===""&&(d="0x"),tj(h)||(h=Dse(parseInt(h))),g.length!==18&&(g=Oqe(g)),s.eip155Block!==s.eip158Block)throw new Error("EIP155 block number must equal EIP 158 block number since both are part of SpuriousDragon hardfork and the client only supports activating the full hardfork");const _={name:i,chainId:v,networkId:v,genesis:{timestamp:h,gasLimit:parseInt(c),difficulty:parseInt(o),nonce:g,extraData:d,mixHash:a,coinbase:l,baseFeePerGas:u},hardfork:void 0,hardforks:[],bootstrapNodes:[],consensus:s.clique!==void 0?{type:"poa",algorithm:"clique",clique:{period:(n=s.clique.period)!==null&&n!==void 0?n:s.clique.blockperiodseconds,epoch:(r=s.clique.epoch)!==null&&r!==void 0?r:s.clique.epochlength}}:{type:"pow",algorithm:"ethash",ethash:{}}},T={[ei.Homestead]:{name:"homesteadBlock"},[ei.Dao]:{name:"daoForkBlock"},[ei.TangerineWhistle]:{name:"eip150Block"},[ei.SpuriousDragon]:{name:"eip155Block"},[ei.Byzantium]:{name:"byzantiumBlock"},[ei.Constantinople]:{name:"constantinopleBlock"},[ei.Petersburg]:{name:"petersburgBlock"},[ei.Istanbul]:{name:"istanbulBlock"},[ei.MuirGlacier]:{name:"muirGlacierBlock"},[ei.Berlin]:{name:"berlinBlock"},[ei.London]:{name:"londonBlock"},[ei.MergeForkIdTransition]:{name:"mergeForkBlock",postMerge:e},[ei.Shanghai]:{name:"shanghaiTime",postMerge:!0,isTimestamp:!0},[ei.ShardingForkDev]:{name:"shardingForkTime",postMerge:!0,isTimestamp:!0}},b=Object.keys(T).reduce((O,$)=>(O[T[$].name]=$,O),{}),k=Object.keys(s).filter(O=>b[O]!==void 0&&s[O]!==void 0&&s[O]!==null);if(_.hardforks=k.map(O=>({name:b[O],block:T[b[O]].isTimestamp===!0||typeof s[O]!="number"?null:s[O],timestamp:T[b[O]].isTimestamp===!0&&typeof s[O]=="number"?s[O]:void 0})).filter(O=>O.block!==null||O.timestamp!==void 0),_.hardforks.sort((O,$)=>{var C,A;return((C=O.block)!==null&&C!==void 0?C:1/0)-((A=$.block)!==null&&A!==void 0?A:1/0)}),_.hardforks.sort((O,$)=>{var C,A;return((C=O.timestamp)!==null&&C!==void 0?C:w)-((A=$.timestamp)!==null&&A!==void 0?A:w)}),s.terminalTotalDifficulty!==void 0){const O={name:ei.Merge,ttd:s.terminalTotalDifficulty,block:null},$=_.hardforks.findIndex(C=>{var A;return((A=T[C.name])===null||A===void 0?void 0:A.postMerge)===!0});$!==-1?_.hardforks.splice($,0,O):_.hardforks.push(O)}const D=_.hardforks.length>0?_.hardforks.slice(-1)[0]:void 0;return _.hardfork=D==null?void 0:D.name,_.hardforks.unshift({name:ei.Chainstart,block:0}),_}function Mqe(t,e,n){try{if(["config","difficulty","gasLimit","alloc"].some(r=>!(r in t)))throw new Error("Invalid format, expected geth genesis fields missing");return e!==void 0&&(t.name=e),Dqe(t,n)}catch(r){throw new Error(`Error parsing parameters file: ${r.message}`)}}function Mse(t){let e=t;if(typeof e!="string")throw new Error(`[padToEven] value must be type 'string', received ${typeof e}`);return e.length%2&&(e=`0${e}`),e}const Bqe=function(t){const e=Dse(t);return ri(`0x${Mse(e.slice(2))}`)},pi=function(t){var e;if(t==null)return new Uint8Array;if(t instanceof Uint8Array)return t;if(((e=t==null?void 0:t.constructor)===null||e===void 0?void 0:e.name)==="Uint8Array"||Array.isArray(t))return Uint8Array.from(t);if(typeof t=="string"){if(!Vie(t))throw new Error(`Cannot convert string to Uint8Array. only supports 0x-prefixed hex strings and this string was given: ${t}`);return ri(Mse(Ose(t)))}if(typeof t=="number")return pi(ba(t));if(typeof t=="bigint"){if(t<BigInt(0))throw new Error(`Cannot convert negative bigint to Uint8Array. Given: ${t}`);let n=t.toString(16);return n.length%2&&(n=`0${n}`),pi(`0x${n}`)}if(t.toArray)return Uint8Array.from(t.toArray());throw new Error("invalid type")};function Yr(t){const e=Kn(t);return BigInt(e==="0x"?0:e)}function $qe(t){return pi(`0x${t.toString(16)}`)}const Bse=function(t){return new Uint8Array(t).fill(0)},jqe=function(t,e,n){const r=Bse(e);return t.length<e?(r.set(t,e-t.length),r):t.subarray(-e)};function _j(t){if(!rm(t)){const e=`This method only supports Uint8Array but input was: ${t}`;throw new Error(e)}}const LG=function(t,e){return _j(t),jqe(t,e)};function Lqe(t){let e=t[0];for(;t.length>0&&e.toString()==="0";)t=t.slice(1),e=t[0];return t}const F8=function(t){return _j(t),Lqe(t)},mi=t=>`0x${t.toString(16)}`;function mr(t){return F8($qe(t))}function Uqe(t,e){return t===BigInt(0)||t===BigInt(1)?t:e===void 0?t-BigInt(27):t-(e*BigInt(2)+BigInt(35))}function Fqe(t){return t===BigInt(0)||t===BigInt(1)}const Aj=function(t,e,n,r,i){const s=Uqe(e,i);if(!Fqe(s))throw new Error("Invalid signature v value");return new $h.Signature(Yr(n),Yr(r)).addRecoveryBit(Number(s)).recoverPublicKey(t).toRawBytes(!1).slice(1)};function Pw(t,e){if(t===null)return null;if(t===void 0)return;if(typeof t=="string"&&!Vie(t))throw new Error(`A string must be provided with a 0x-prefix, given: ${t}`);if(typeof t=="number"&&!Number.isSafeInteger(t))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const n=pi(t);switch(e){case al.Uint8Array:return n;case al.BigInt:return Yr(n);case al.Number:{const r=Yr(n);if(r>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(r)}case al.PrefixedHexString:return Kn(n);default:throw new Error("unknown outputType")}}var qf={};Object.defineProperty(qf,"__esModule",{value:!0});var Ka=qf.RLP=qf.utils=qf.decode=qf.encode=void 0;function Ej(t){if(Array.isArray(t)){const n=[];let r=0;for(let i=0;i<t.length;i++){const s=Ej(t[i]);n.push(s),r+=s.length}return QO(FG(r,192),...n)}const e=zse(t);return e.length===1&&e[0]<128?e:QO(FG(e.length,128),e)}qf.encode=Ej;function Ow(t,e,n){if(n>t.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return t.slice(e,n)}function UG(t){if(t[0]===0)throw new Error("invalid RLP: extra zeros");return Lse(jse(t))}function FG(t,e){if(t<56)return Uint8Array.from([t+e]);const n=ZO(t),r=n.length/2,i=ZO(e+55+r);return Uint8Array.from(z8(i+n))}function $se(t,e=!1){if(typeof t>"u"||t===null||t.length===0)return Uint8Array.from([]);const n=zse(t),r=YO(n);if(e)return r;if(r.remainder.length!==0)throw new Error("invalid RLP: remainder must be zero");return r.data}qf.decode=$se;function YO(t){let e,n,r,i,s;const o=[],a=t[0];if(a<=127)return{data:t.slice(0,1),remainder:t.slice(1)};if(a<=183){if(e=a-127,a===128?r=Uint8Array.from([]):r=Ow(t,1,e),e===2&&r[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:r,remainder:t.slice(e)}}else if(a<=191){if(n=a-182,t.length-1<n)throw new Error("invalid RLP: not enough bytes for string length");if(e=UG(Ow(t,1,n)),e<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return r=Ow(t,n,e+n),{data:r,remainder:t.slice(e+n)}}else if(a<=247){for(e=a-191,i=Ow(t,1,e);i.length;)s=YO(i),o.push(s.data),i=s.remainder;return{data:o,remainder:t.slice(e)}}else{if(n=a-246,e=UG(Ow(t,1,n)),e<56)throw new Error("invalid RLP: encoded list too short");const c=n+e;if(c>t.length)throw new Error("invalid RLP: total length is larger than the data");for(i=Ow(t,n,c);i.length;)s=YO(i),o.push(s.data),i=s.remainder;return{data:o,remainder:t.slice(c)}}}const zqe=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function jse(t){let e="";for(let n=0;n<t.length;n++)e+=zqe[t[n]];return e}function Lse(t){const e=Number.parseInt(t,16);if(Number.isNaN(e))throw new Error("Invalid byte sequence");return e}function z8(t){if(typeof t!="string")throw new TypeError("hexToBytes: expected string, got "+typeof t);if(t.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const e=new Uint8Array(t.length/2);for(let n=0;n<e.length;n++){const r=n*2;e[n]=Lse(t.slice(r,r+2))}return e}function QO(...t){if(t.length===1)return t[0];const e=t.reduce((r,i)=>r+i.length,0),n=new Uint8Array(e);for(let r=0,i=0;r<t.length;r++){const s=t[r];n.set(s,i),i+=s.length}return n}function Use(t){return new TextEncoder().encode(t)}function ZO(t){if(t<0)throw new Error("Invalid integer as argument, must be unsigned!");const e=t.toString(16);return e.length%2?`0${e}`:e}function Hqe(t){return t.length%2?`0${t}`:t}function Fse(t){return t.length>=2&&t[0]==="0"&&t[1]==="x"}function Wqe(t){return typeof t!="string"?t:Fse(t)?t.slice(2):t}function zse(t){if(t instanceof Uint8Array)return t;if(typeof t=="string")return Fse(t)?z8(Hqe(Wqe(t))):Use(t);if(typeof t=="number"||typeof t=="bigint")return t?z8(ZO(t)):Uint8Array.from([]);if(t==null)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof t)}qf.utils={bytesToHex:jse,concatBytes:QO,hexToBytes:z8,utf8ToBytes:Use};Ka=qf.RLP={encode:Ej,decode:$se};var Hse={};/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */(function(t){(function(e){e(typeof DO_NOT_EXPORT_CRC>"u"?t:{})})(function(e){e.version="1.2.2";function n(){for(var A=0,H=new Array(256),V=0;V!=256;++V)A=V,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,A=A&1?-306674912^A>>>1:A>>>1,H[V]=A;return typeof Int32Array<"u"?new Int32Array(H):H}var r=n();function i(A){var H=0,V=0,Y=0,ee=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(Y=0;Y!=256;++Y)ee[Y]=A[Y];for(Y=0;Y!=256;++Y)for(V=A[Y],H=256+Y;H<4096;H+=256)V=ee[H]=V>>>8^A[V&255];var x=[];for(Y=1;Y!=16;++Y)x[Y-1]=typeof Int32Array<"u"?ee.subarray(Y*256,Y*256+256):ee.slice(Y*256,Y*256+256);return x}var s=i(r),o=s[0],a=s[1],c=s[2],l=s[3],u=s[4],d=s[5],h=s[6],g=s[7],w=s[8],v=s[9],_=s[10],T=s[11],b=s[12],k=s[13],D=s[14];function O(A,H){for(var V=H^-1,Y=0,ee=A.length;Y<ee;)V=V>>>8^r[(V^A.charCodeAt(Y++))&255];return~V}function $(A,H){for(var V=H^-1,Y=A.length-15,ee=0;ee<Y;)V=D[A[ee++]^V&255]^k[A[ee++]^V>>8&255]^b[A[ee++]^V>>16&255]^T[A[ee++]^V>>>24]^_[A[ee++]]^v[A[ee++]]^w[A[ee++]]^g[A[ee++]]^h[A[ee++]]^d[A[ee++]]^u[A[ee++]]^l[A[ee++]]^c[A[ee++]]^a[A[ee++]]^o[A[ee++]]^r[A[ee++]];for(Y+=15;ee<Y;)V=V>>>8^r[(V^A[ee++])&255];return~V}function C(A,H){for(var V=H^-1,Y=0,ee=A.length,x=0,E=0;Y<ee;)x=A.charCodeAt(Y++),x<128?V=V>>>8^r[(V^x)&255]:x<2048?(V=V>>>8^r[(V^(192|x>>6&31))&255],V=V>>>8^r[(V^(128|x&63))&255]):x>=55296&&x<57344?(x=(x&1023)+64,E=A.charCodeAt(Y++)&1023,V=V>>>8^r[(V^(240|x>>8&7))&255],V=V>>>8^r[(V^(128|x>>2&63))&255],V=V>>>8^r[(V^(128|E>>6&15|(x&3)<<4))&255],V=V>>>8^r[(V^(128|E&63))&255]):(V=V>>>8^r[(V^(224|x>>12&15))&255],V=V>>>8^r[(V^(128|x>>6&63))&255],V=V>>>8^r[(V^(128|x&63))&255]);return~V}e.table=r,e.bstr=O,e.buf=$,e.str=C})})(Hse);const Vqe=Qs(Hse),qqe={name:"goerli",chainId:5,networkId:5,defaultHardfork:"merge",consensus:{type:"poa",algorithm:"clique",clique:{period:15,epoch:3e4}},comment:"Cross-client PoA test network",url:"https://github.com/goerli/testnet",genesis:{timestamp:"0x5c51a607",gasLimit:10485760,difficulty:1,nonce:"0x0000000000000000",extraData:"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},hardforks:[{name:"chainstart",block:0,forkHash:"0xa3f5ab08"},{name:"homestead",block:0,forkHash:"0xa3f5ab08"},{name:"tangerineWhistle",block:0,forkHash:"0xa3f5ab08"},{name:"spuriousDragon",block:0,forkHash:"0xa3f5ab08"},{name:"byzantium",block:0,forkHash:"0xa3f5ab08"},{name:"constantinople",block:0,forkHash:"0xa3f5ab08"},{name:"petersburg",block:0,forkHash:"0xa3f5ab08"},{name:"istanbul",block:1561651,forkHash:"0xc25efa5c"},{name:"berlin",block:4460644,forkHash:"0x757a1c47"},{name:"london",block:5062605,forkHash:"0xb8c6299d"},{"//_comment":"The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://goerli.etherscan.io/block/7382818",name:"merge",ttd:"10790000",block:7382819,forkHash:"0xb8c6299d"},{name:"mergeForkIdTransition",block:null,forkHash:null},{name:"shanghai",block:null,forkHash:null}],bootstrapNodes:[],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net"]},Gqe={name:"mainnet",chainId:1,networkId:1,defaultHardfork:"merge",consensus:{type:"pow",algorithm:"ethash",ethash:{}},comment:"The Ethereum main chain",url:"https://ethstats.net/",genesis:{gasLimit:5e3,difficulty:17179869184,nonce:"0x0000000000000042",extraData:"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa"},hardforks:[{name:"chainstart",block:0,forkHash:"0xfc64ec04"},{name:"homestead",block:115e4,forkHash:"0x97c2c34c"},{name:"dao",block:192e4,forkHash:"0x91d1f948"},{name:"tangerineWhistle",block:2463e3,forkHash:"0x7a64da13"},{name:"spuriousDragon",block:2675e3,forkHash:"0x3edd5b10"},{name:"byzantium",block:437e4,forkHash:"0xa00bc324"},{name:"constantinople",block:728e4,forkHash:"0x668db0af"},{name:"petersburg",block:728e4,forkHash:"0x668db0af"},{name:"istanbul",block:9069e3,forkHash:"0x879d6e30"},{name:"muirGlacier",block:92e5,forkHash:"0xe029e991"},{name:"berlin",block:12244e3,forkHash:"0x0eb440f6"},{name:"london",block:12965e3,forkHash:"0xb715077d"},{name:"arrowGlacier",block:13773e3,forkHash:"0x20c327fc"},{name:"grayGlacier",block:1505e4,forkHash:"0xf0afd0e3"},{"//_comment":"The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://etherscan.io/block/15537393",name:"merge",ttd:"58750000000000000000000",block:15537394,forkHash:"0xf0afd0e3"},{name:"mergeForkIdTransition",block:null,forkHash:null},{name:"shanghai",block:null,forkHash:null}],bootstrapNodes:[],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"]},Kqe={name:"sepolia",chainId:11155111,networkId:11155111,defaultHardfork:"merge",consensus:{type:"pow",algorithm:"ethash",ethash:{}},comment:"PoW test network to replace Ropsten",url:"https://github.com/ethereum/go-ethereum/pull/23730",genesis:{timestamp:"0x6159af19",gasLimit:3e7,difficulty:131072,nonce:"0x0000000000000000",extraData:"0x5365706f6c69612c20417468656e732c204174746963612c2047726565636521"},hardforks:[{name:"chainstart",block:0,forkHash:"0xfe3366e7"},{name:"homestead",block:0,forkHash:"0xfe3366e7"},{name:"tangerineWhistle",block:0,forkHash:"0xfe3366e7"},{name:"spuriousDragon",block:0,forkHash:"0xfe3366e7"},{name:"byzantium",block:0,forkHash:"0xfe3366e7"},{name:"constantinople",block:0,forkHash:"0xfe3366e7"},{name:"petersburg",block:0,forkHash:"0xfe3366e7"},{name:"istanbul",block:0,forkHash:"0xfe3366e7"},{name:"muirGlacier",block:0,forkHash:"0xfe3366e7"},{name:"berlin",block:0,forkHash:"0xfe3366e7"},{name:"london",block:0,forkHash:"0xfe3366e7"},{"//_comment":"The forkHash will remain same as mergeForkIdTransition is post merge, terminal block: https://sepolia.etherscan.io/block/1450408",name:"merge",ttd:"17000000000000000",block:1450409,forkHash:"0xfe3366e7"},{name:"mergeForkIdTransition",block:1735371,forkHash:"0xb96cbd13"},{name:"shanghai",block:null,timestamp:"1677557088",forkHash:"0xf7f9bc08"}],bootstrapNodes:[],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.sepolia.ethdisco.net"]},Yqe={name:"EIP-1153",number:1153,comment:"Transient Storage",url:"https://eips.ethereum.org/EIPS/eip-1153",status:"Review",minimumHardfork:"chainstart",requiredEIPs:[],gasConfig:{},gasPrices:{tstore:{v:100,d:"Base fee of the TSTORE opcode"},tload:{v:100,d:"Base fee of the TLOAD opcode"}},vm:{},pow:{}},Qqe={name:"EIP-1559",number:1559,comment:"Fee market change for ETH 1.0 chain",url:"https://eips.ethereum.org/EIPS/eip-1559",status:"Final",minimumHardfork:"berlin",requiredEIPs:[2930],gasConfig:{baseFeeMaxChangeDenominator:{v:8,d:"Maximum base fee change denominator"},elasticityMultiplier:{v:2,d:"Maximum block gas target elasticity"},initialBaseFee:{v:1e9,d:"Initial base fee on first EIP1559 block"}},gasPrices:{},vm:{},pow:{}},Zqe={name:"EIP-2315",number:2315,comment:"Simple subroutines for the EVM",url:"https://eips.ethereum.org/EIPS/eip-2315",status:"Draft",minimumHardfork:"istanbul",gasConfig:{},gasPrices:{beginsub:{v:2,d:"Base fee of the BEGINSUB opcode"},returnsub:{v:5,d:"Base fee of the RETURNSUB opcode"},jumpsub:{v:10,d:"Base fee of the JUMPSUB opcode"}},vm:{},pow:{}},Jqe={name:"EIP-2537",number:2537,comment:"BLS12-381 precompiles",url:"https://eips.ethereum.org/EIPS/eip-2537",status:"Draft",minimumHardfork:"chainstart",gasConfig:{},gasPrices:{Bls12381G1AddGas:{v:600,d:"Gas cost of a single BLS12-381 G1 addition precompile-call"},Bls12381G1MulGas:{v:12e3,d:"Gas cost of a single BLS12-381 G1 multiplication precompile-call"},Bls12381G2AddGas:{v:4500,d:"Gas cost of a single BLS12-381 G2 addition precompile-call"},Bls12381G2MulGas:{v:55e3,d:"Gas cost of a single BLS12-381 G2 multiplication precompile-call"},Bls12381PairingBaseGas:{v:115e3,d:"Base gas cost of BLS12-381 pairing check"},Bls12381PairingPerPairGas:{v:23e3,d:"Per-pair gas cost of BLS12-381 pairing check"},Bls12381MapG1Gas:{v:5500,d:"Gas cost of BLS12-381 map field element to G1"},Bls12381MapG2Gas:{v:11e4,d:"Gas cost of BLS12-381 map field element to G2"},Bls12381MultiExpGasDiscount:{v:[[1,1200],[2,888],[3,764],[4,641],[5,594],[6,547],[7,500],[8,453],[9,438],[10,423],[11,408],[12,394],[13,379],[14,364],[15,349],[16,334],[17,330],[18,326],[19,322],[20,318],[21,314],[22,310],[23,306],[24,302],[25,298],[26,294],[27,289],[28,285],[29,281],[30,277],[31,273],[32,269],[33,268],[34,266],[35,265],[36,263],[37,262],[38,260],[39,259],[40,257],[41,256],[42,254],[43,253],[44,251],[45,250],[46,248],[47,247],[48,245],[49,244],[50,242],[51,241],[52,239],[53,238],[54,236],[55,235],[56,233],[57,232],[58,231],[59,229],[60,228],[61,226],[62,225],[63,223],[64,222],[65,221],[66,220],[67,219],[68,219],[69,218],[70,217],[71,216],[72,216],[73,215],[74,214],[75,213],[76,213],[77,212],[78,211],[79,211],[80,210],[81,209],[82,208],[83,208],[84,207],[85,206],[86,205],[87,205],[88,204],[89,203],[90,202],[91,202],[92,201],[93,200],[94,199],[95,199],[96,198],[97,197],[98,196],[99,196],[100,195],[101,194],[102,193],[103,193],[104,192],[105,191],[106,191],[107,190],[108,189],[109,188],[110,188],[111,187],[112,186],[113,185],[114,185],[115,184],[116,183],[117,182],[118,182],[119,181],[120,180],[121,179],[122,179],[123,178],[124,177],[125,176],[126,176],[127,175],[128,174]],d:"Discount gas costs of calls to the MultiExp precompiles with `k` (point, scalar) pair"}},vm:{},pow:{}},Xqe={name:"EIP-2565",number:2565,comment:"ModExp gas cost",url:"https://eips.ethereum.org/EIPS/eip-2565",status:"Final",minimumHardfork:"byzantium",gasConfig:{},gasPrices:{modexpGquaddivisor:{v:3,d:"Gquaddivisor from modexp precompile for gas calculation"}},vm:{},pow:{}},eGe={name:"EIP-2718",comment:"Typed Transaction Envelope",url:"https://eips.ethereum.org/EIPS/eip-2718",status:"Final",minimumHardfork:"chainstart",gasConfig:{},gasPrices:{},vm:{},pow:{}},tGe={name:"EIP-2929",comment:"Gas cost increases for state access opcodes",url:"https://eips.ethereum.org/EIPS/eip-2929",status:"Final",minimumHardfork:"chainstart",gasConfig:{},gasPrices:{coldsload:{v:2100,d:"Gas cost of the first read of storage from a given location (per transaction)"},coldaccountaccess:{v:2600,d:"Gas cost of the first read of a given address (per transaction)"},warmstorageread:{v:100,d:"Gas cost of reading storage locations which have already loaded 'cold'"},sstoreCleanGasEIP2200:{v:2900,d:"Once per SSTORE operation from clean non-zero to something else"},sstoreNoopGasEIP2200:{v:100,d:"Once per SSTORE operation if the value doesn't change"},sstoreDirtyGasEIP2200:{v:100,d:"Once per SSTORE operation if a dirty value is changed"},sstoreInitRefundEIP2200:{v:19900,d:"Once per SSTORE operation for resetting to the original zero value"},sstoreCleanRefundEIP2200:{v:4900,d:"Once per SSTORE operation for resetting to the original non-zero value"},call:{v:0,d:"Base fee of the CALL opcode"},callcode:{v:0,d:"Base fee of the CALLCODE opcode"},delegatecall:{v:0,d:"Base fee of the DELEGATECALL opcode"},staticcall:{v:0,d:"Base fee of the STATICCALL opcode"},balance:{v:0,d:"Base fee of the BALANCE opcode"},extcodesize:{v:0,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:0,d:"Base fee of the EXTCODECOPY opcode"},extcodehash:{v:0,d:"Base fee of the EXTCODEHASH opcode"},sload:{v:0,d:"Base fee of the SLOAD opcode"},sstore:{v:0,d:"Base fee of the SSTORE opcode"}},vm:{},pow:{}},nGe={name:"EIP-2930",comment:"Optional access lists",url:"https://eips.ethereum.org/EIPS/eip-2930",status:"Final",minimumHardfork:"istanbul",requiredEIPs:[2718,2929],gasConfig:{},gasPrices:{accessListStorageKeyCost:{v:1900,d:"Gas cost per storage key in an Access List transaction"},accessListAddressCost:{v:2400,d:"Gas cost per storage key in an Access List transaction"}},vm:{},pow:{}},rGe={name:"EIP-3198",number:3198,comment:"BASEFEE opcode",url:"https://eips.ethereum.org/EIPS/eip-3198",status:"Final",minimumHardfork:"london",gasConfig:{},gasPrices:{basefee:{v:2,d:"Gas cost of the BASEFEE opcode"}},vm:{},pow:{}},iGe={name:"EIP-3529",comment:"Reduction in refunds",url:"https://eips.ethereum.org/EIPS/eip-3529",status:"Final",minimumHardfork:"berlin",requiredEIPs:[2929],gasConfig:{maxRefundQuotient:{v:5,d:"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},gasPrices:{selfdestructRefund:{v:0,d:"Refunded following a selfdestruct operation"},sstoreClearRefundEIP2200:{v:4800,d:"Once per SSTORE operation for clearing an originally existing storage slot"}},vm:{},pow:{}},sGe={name:"EIP-3540",number:3540,comment:"EVM Object Format (EOF) v1",url:"https://eips.ethereum.org/EIPS/eip-3540",status:"Review",minimumHardfork:"london",requiredEIPs:[3541],gasConfig:{},gasPrices:{},vm:{},pow:{}},oGe={name:"EIP-3541",comment:"Reject new contracts starting with the 0xEF byte",url:"https://eips.ethereum.org/EIPS/eip-3541",status:"Final",minimumHardfork:"berlin",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{}},aGe={name:"EIP-3554",comment:"Reduction in refunds",url:"Difficulty Bomb Delay to December 1st 2021",status:"Final",minimumHardfork:"muirGlacier",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{difficultyBombDelay:{v:95e5,d:"the amount of blocks to delay the difficulty bomb with"}}},cGe={name:"EIP-3607",number:3607,comment:"Reject transactions from senders with deployed code",url:"https://eips.ethereum.org/EIPS/eip-3607",status:"Final",minimumHardfork:"chainstart",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{}},lGe={name:"EIP-3651",number:3198,comment:"Warm COINBASE",url:"https://eips.ethereum.org/EIPS/eip-3651",status:"Review",minimumHardfork:"london",requiredEIPs:[2929],gasConfig:{},gasPrices:{},vm:{},pow:{}},uGe={name:"EIP-3670",number:3670,comment:"EOF - Code Validation",url:"https://eips.ethereum.org/EIPS/eip-3670",status:"Review",minimumHardfork:"london",requiredEIPs:[3540],gasConfig:{},gasPrices:{},vm:{},pow:{}},dGe={name:"EIP-3675",number:3675,comment:"Upgrade consensus to Proof-of-Stake",url:"https://eips.ethereum.org/EIPS/eip-3675",status:"Final",minimumHardfork:"london",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{}},fGe={name:"EIP-3855",number:3855,comment:"PUSH0 instruction",url:"https://eips.ethereum.org/EIPS/eip-3855",status:"Review",minimumHardfork:"chainstart",requiredEIPs:[],gasConfig:{},gasPrices:{push0:{v:2,d:"Base fee of the PUSH0 opcode"}},vm:{},pow:{}},hGe={name:"EIP-3860",number:3860,comment:"Limit and meter initcode",url:"https://eips.ethereum.org/EIPS/eip-3860",status:"Review",minimumHardfork:"spuriousDragon",requiredEIPs:[],gasConfig:{},gasPrices:{initCodeWordCost:{v:2,d:"Gas to pay for each word (32 bytes) of initcode when creating a contract"}},vm:{maxInitCodeSize:{v:49152,d:"Maximum length of initialization code when creating a contract"}},pow:{}},pGe={name:"EIP-4345",number:4345,comment:"Difficulty Bomb Delay to June 2022",url:"https://eips.ethereum.org/EIPS/eip-4345",status:"Final",minimumHardfork:"london",gasConfig:{},gasPrices:{},vm:{},pow:{difficultyBombDelay:{v:107e5,d:"the amount of blocks to delay the difficulty bomb with"}}},mGe={name:"EIP-4399",number:4399,comment:"Supplant DIFFICULTY opcode with PREVRANDAO",url:"https://eips.ethereum.org/EIPS/eip-4399",status:"Review",minimumHardfork:"london",requiredEIPs:[],gasConfig:{},gasPrices:{},vm:{},pow:{}},gGe={name:"EIP-5133",number:5133,comment:"Delaying Difficulty Bomb to mid-September 2022",url:"https://eips.ethereum.org/EIPS/eip-5133",status:"Draft",minimumHardfork:"grayGlacier",gasConfig:{},gasPrices:{},vm:{},pow:{difficultyBombDelay:{v:114e5,d:"the amount of blocks to delay the difficulty bomb with"}}},Dw={1153:Yqe,1559:Qqe,2315:Zqe,2537:Jqe,2565:Xqe,2718:eGe,2929:tGe,2930:nGe,3198:rGe,3529:iGe,3540:sGe,3541:oGe,3554:aGe,3607:cGe,3651:lGe,3670:uGe,3675:dGe,3855:fGe,3860:hGe,4345:pGe,4399:mGe,5133:gGe},wGe={name:"chainstart",comment:"Start of the Ethereum main chain",url:"",status:"",gasConfig:{minGasLimit:{v:5e3,d:"Minimum the gas limit may ever be"},gasLimitBoundDivisor:{v:1024,d:"The bound divisor of the gas limit, used in update calculations"},maxRefundQuotient:{v:2,d:"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},gasPrices:{base:{v:2,d:"Gas base cost, used e.g. for ChainID opcode (Istanbul)"},tierStep:{v:[0,2,3,5,8,10,20],d:"Once per operation, for a selection of them"},exp:{v:10,d:"Base fee of the EXP opcode"},expByte:{v:10,d:"Times ceil(log256(exponent)) for the EXP instruction"},sha3:{v:30,d:"Base fee of the SHA3 opcode"},sha3Word:{v:6,d:"Once per word of the SHA3 operation's data"},sload:{v:50,d:"Base fee of the SLOAD opcode"},sstoreSet:{v:2e4,d:"Once per SSTORE operation if the zeroness changes from zero"},sstoreReset:{v:5e3,d:"Once per SSTORE operation if the zeroness does not change from zero"},sstoreRefund:{v:15e3,d:"Once per SSTORE operation if the zeroness changes to zero"},jumpdest:{v:1,d:"Base fee of the JUMPDEST opcode"},log:{v:375,d:"Base fee of the LOG opcode"},logData:{v:8,d:"Per byte in a LOG* operation's data"},logTopic:{v:375,d:"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas"},create:{v:32e3,d:"Base fee of the CREATE opcode"},call:{v:40,d:"Base fee of the CALL opcode"},callStipend:{v:2300,d:"Free gas given at beginning of call"},callValueTransfer:{v:9e3,d:"Paid for CALL when the value transfor is non-zero"},callNewAccount:{v:25e3,d:"Paid for CALL when the destination address didn't exist prior"},selfdestructRefund:{v:24e3,d:"Refunded following a selfdestruct operation"},memory:{v:3,d:"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL"},quadCoeffDiv:{v:512,d:"Divisor for the quadratic particle of the memory cost equation"},createData:{v:200,d:""},tx:{v:21e3,d:"Per transaction. NOTE: Not payable on data of calls between transactions"},txCreation:{v:32e3,d:"The cost of creating a contract via tx"},txDataZero:{v:4,d:"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions"},txDataNonZero:{v:68,d:"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},copy:{v:3,d:"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added"},ecRecover:{v:3e3,d:""},sha256:{v:60,d:""},sha256Word:{v:12,d:""},ripemd160:{v:600,d:""},ripemd160Word:{v:120,d:""},identity:{v:15,d:""},identityWord:{v:3,d:""},stop:{v:0,d:"Base fee of the STOP opcode"},add:{v:3,d:"Base fee of the ADD opcode"},mul:{v:5,d:"Base fee of the MUL opcode"},sub:{v:3,d:"Base fee of the SUB opcode"},div:{v:5,d:"Base fee of the DIV opcode"},sdiv:{v:5,d:"Base fee of the SDIV opcode"},mod:{v:5,d:"Base fee of the MOD opcode"},smod:{v:5,d:"Base fee of the SMOD opcode"},addmod:{v:8,d:"Base fee of the ADDMOD opcode"},mulmod:{v:8,d:"Base fee of the MULMOD opcode"},signextend:{v:5,d:"Base fee of the SIGNEXTEND opcode"},lt:{v:3,d:"Base fee of the LT opcode"},gt:{v:3,d:"Base fee of the GT opcode"},slt:{v:3,d:"Base fee of the SLT opcode"},sgt:{v:3,d:"Base fee of the SGT opcode"},eq:{v:3,d:"Base fee of the EQ opcode"},iszero:{v:3,d:"Base fee of the ISZERO opcode"},and:{v:3,d:"Base fee of the AND opcode"},or:{v:3,d:"Base fee of the OR opcode"},xor:{v:3,d:"Base fee of the XOR opcode"},not:{v:3,d:"Base fee of the NOT opcode"},byte:{v:3,d:"Base fee of the BYTE opcode"},address:{v:2,d:"Base fee of the ADDRESS opcode"},balance:{v:20,d:"Base fee of the BALANCE opcode"},origin:{v:2,d:"Base fee of the ORIGIN opcode"},caller:{v:2,d:"Base fee of the CALLER opcode"},callvalue:{v:2,d:"Base fee of the CALLVALUE opcode"},calldataload:{v:3,d:"Base fee of the CALLDATALOAD opcode"},calldatasize:{v:2,d:"Base fee of the CALLDATASIZE opcode"},calldatacopy:{v:3,d:"Base fee of the CALLDATACOPY opcode"},codesize:{v:2,d:"Base fee of the CODESIZE opcode"},codecopy:{v:3,d:"Base fee of the CODECOPY opcode"},gasprice:{v:2,d:"Base fee of the GASPRICE opcode"},extcodesize:{v:20,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:20,d:"Base fee of the EXTCODECOPY opcode"},blockhash:{v:20,d:"Base fee of the BLOCKHASH opcode"},coinbase:{v:2,d:"Base fee of the COINBASE opcode"},timestamp:{v:2,d:"Base fee of the TIMESTAMP opcode"},number:{v:2,d:"Base fee of the NUMBER opcode"},difficulty:{v:2,d:"Base fee of the DIFFICULTY opcode"},gaslimit:{v:2,d:"Base fee of the GASLIMIT opcode"},pop:{v:2,d:"Base fee of the POP opcode"},mload:{v:3,d:"Base fee of the MLOAD opcode"},mstore:{v:3,d:"Base fee of the MSTORE opcode"},mstore8:{v:3,d:"Base fee of the MSTORE8 opcode"},sstore:{v:0,d:"Base fee of the SSTORE opcode"},jump:{v:8,d:"Base fee of the JUMP opcode"},jumpi:{v:10,d:"Base fee of the JUMPI opcode"},pc:{v:2,d:"Base fee of the PC opcode"},msize:{v:2,d:"Base fee of the MSIZE opcode"},gas:{v:2,d:"Base fee of the GAS opcode"},push:{v:3,d:"Base fee of the PUSH opcode"},dup:{v:3,d:"Base fee of the DUP opcode"},swap:{v:3,d:"Base fee of the SWAP opcode"},callcode:{v:40,d:"Base fee of the CALLCODE opcode"},return:{v:0,d:"Base fee of the RETURN opcode"},invalid:{v:0,d:"Base fee of the INVALID opcode"},selfdestruct:{v:0,d:"Base fee of the SELFDESTRUCT opcode"}},vm:{stackLimit:{v:1024,d:"Maximum size of VM stack allowed"},callCreateDepth:{v:1024,d:"Maximum depth of call/create stack"},maxExtraDataSize:{v:32,d:"Maximum size extra data may be after Genesis"}},pow:{minimumDifficulty:{v:131072,d:"The minimum that the difficulty may ever be"},difficultyBoundDivisor:{v:2048,d:"The bound divisor of the difficulty, used in the update calculations"},durationLimit:{v:13,d:"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not"},epochDuration:{v:3e4,d:"Duration between proof-of-work epochs"},timebombPeriod:{v:1e5,d:"Exponential difficulty timebomb period"},minerReward:{v:"5000000000000000000",d:"the amount a miner get rewarded for mining a block"},difficultyBombDelay:{v:0,d:"the amount of blocks to delay the difficulty bomb with"}}},yGe={name:"dao",comment:"DAO rescue hardfork",url:"https://eips.ethereum.org/EIPS/eip-779",status:"Final",gasConfig:{},gasPrices:{},vm:{},pow:{}},vGe={name:"homestead",comment:"Homestead hardfork with protocol and network changes",url:"https://eips.ethereum.org/EIPS/eip-606",status:"Final",gasConfig:{},gasPrices:{delegatecall:{v:40,d:"Base fee of the DELEGATECALL opcode"}},vm:{},pow:{}},bGe={name:"tangerineWhistle",comment:"Hardfork with gas cost changes for IO-heavy operations",url:"https://eips.ethereum.org/EIPS/eip-608",status:"Final",gasConfig:{},gasPrices:{sload:{v:200,d:"Once per SLOAD operation"},call:{v:700,d:"Once per CALL operation & message call transaction"},extcodesize:{v:700,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:700,d:"Base fee of the EXTCODECOPY opcode"},balance:{v:400,d:"Base fee of the BALANCE opcode"},delegatecall:{v:700,d:"Base fee of the DELEGATECALL opcode"},callcode:{v:700,d:"Base fee of the CALLCODE opcode"},selfdestruct:{v:5e3,d:"Base fee of the SELFDESTRUCT opcode"}},vm:{},pow:{}},xGe={name:"spuriousDragon",comment:"HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit",url:"https://eips.ethereum.org/EIPS/eip-607",status:"Final",gasConfig:{},gasPrices:{expByte:{v:50,d:"Times ceil(log256(exponent)) for the EXP instruction"}},vm:{maxCodeSize:{v:24576,d:"Maximum length of contract code"}},pow:{}},_Ge={name:"byzantium",comment:"Hardfork with new precompiles, instructions and other protocol changes",url:"https://eips.ethereum.org/EIPS/eip-609",status:"Final",gasConfig:{},gasPrices:{modexpGquaddivisor:{v:20,d:"Gquaddivisor from modexp precompile for gas calculation"},ecAdd:{v:500,d:"Gas costs for curve addition precompile"},ecMul:{v:4e4,d:"Gas costs for curve multiplication precompile"},ecPairing:{v:1e5,d:"Base gas costs for curve pairing precompile"},ecPairingWord:{v:8e4,d:"Gas costs regarding curve pairing precompile input length"},revert:{v:0,d:"Base fee of the REVERT opcode"},staticcall:{v:700,d:"Base fee of the STATICCALL opcode"},returndatasize:{v:2,d:"Base fee of the RETURNDATASIZE opcode"},returndatacopy:{v:3,d:"Base fee of the RETURNDATACOPY opcode"}},vm:{},pow:{minerReward:{v:"3000000000000000000",d:"the amount a miner get rewarded for mining a block"},difficultyBombDelay:{v:3e6,d:"the amount of blocks to delay the difficulty bomb with"}}},AGe={name:"constantinople",comment:"Postponed hardfork including EIP-1283 (SSTORE gas metering changes)",url:"https://eips.ethereum.org/EIPS/eip-1013",status:"Final",gasConfig:{},gasPrices:{netSstoreNoopGas:{v:200,d:"Once per SSTORE operation if the value doesn't change"},netSstoreInitGas:{v:2e4,d:"Once per SSTORE operation from clean zero"},netSstoreCleanGas:{v:5e3,d:"Once per SSTORE operation from clean non-zero"},netSstoreDirtyGas:{v:200,d:"Once per SSTORE operation from dirty"},netSstoreClearRefund:{v:15e3,d:"Once per SSTORE operation for clearing an originally existing storage slot"},netSstoreResetRefund:{v:4800,d:"Once per SSTORE operation for resetting to the original non-zero value"},netSstoreResetClearRefund:{v:19800,d:"Once per SSTORE operation for resetting to the original zero value"},shl:{v:3,d:"Base fee of the SHL opcode"},shr:{v:3,d:"Base fee of the SHR opcode"},sar:{v:3,d:"Base fee of the SAR opcode"},extcodehash:{v:400,d:"Base fee of the EXTCODEHASH opcode"},create2:{v:32e3,d:"Base fee of the CREATE2 opcode"}},vm:{},pow:{minerReward:{v:"2000000000000000000",d:"The amount a miner gets rewarded for mining a block"},difficultyBombDelay:{v:5e6,d:"the amount of blocks to delay the difficulty bomb with"}}},EGe={name:"petersburg",comment:"Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople",url:"https://eips.ethereum.org/EIPS/eip-1716",status:"Final",gasConfig:{},gasPrices:{netSstoreNoopGas:{v:null,d:"Removed along EIP-1283"},netSstoreInitGas:{v:null,d:"Removed along EIP-1283"},netSstoreCleanGas:{v:null,d:"Removed along EIP-1283"},netSstoreDirtyGas:{v:null,d:"Removed along EIP-1283"},netSstoreClearRefund:{v:null,d:"Removed along EIP-1283"},netSstoreResetRefund:{v:null,d:"Removed along EIP-1283"},netSstoreResetClearRefund:{v:null,d:"Removed along EIP-1283"}},vm:{},pow:{}},CGe={name:"istanbul",comment:"HF targeted for December 2019 following the Constantinople/Petersburg HF",url:"https://eips.ethereum.org/EIPS/eip-1679",status:"Final",gasConfig:{},gasPrices:{blake2Round:{v:1,d:"Gas cost per round for the Blake2 F precompile"},ecAdd:{v:150,d:"Gas costs for curve addition precompile"},ecMul:{v:6e3,d:"Gas costs for curve multiplication precompile"},ecPairing:{v:45e3,d:"Base gas costs for curve pairing precompile"},ecPairingWord:{v:34e3,d:"Gas costs regarding curve pairing precompile input length"},txDataNonZero:{v:16,d:"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},sstoreSentryGasEIP2200:{v:2300,d:"Minimum gas required to be present for an SSTORE call, not consumed"},sstoreNoopGasEIP2200:{v:800,d:"Once per SSTORE operation if the value doesn't change"},sstoreDirtyGasEIP2200:{v:800,d:"Once per SSTORE operation if a dirty value is changed"},sstoreInitGasEIP2200:{v:2e4,d:"Once per SSTORE operation from clean zero to non-zero"},sstoreInitRefundEIP2200:{v:19200,d:"Once per SSTORE operation for resetting to the original zero value"},sstoreCleanGasEIP2200:{v:5e3,d:"Once per SSTORE operation from clean non-zero to something else"},sstoreCleanRefundEIP2200:{v:4200,d:"Once per SSTORE operation for resetting to the original non-zero value"},sstoreClearRefundEIP2200:{v:15e3,d:"Once per SSTORE operation for clearing an originally existing storage slot"},balance:{v:700,d:"Base fee of the BALANCE opcode"},extcodehash:{v:700,d:"Base fee of the EXTCODEHASH opcode"},chainid:{v:2,d:"Base fee of the CHAINID opcode"},selfbalance:{v:5,d:"Base fee of the SELFBALANCE opcode"},sload:{v:800,d:"Base fee of the SLOAD opcode"}},vm:{},pow:{}},SGe={name:"muirGlacier",comment:"HF to delay the difficulty bomb",url:"https://eips.ethereum.org/EIPS/eip-2384",status:"Final",gasConfig:{},gasPrices:{},vm:{},pow:{difficultyBombDelay:{v:9e6,d:"the amount of blocks to delay the difficulty bomb with"}}},TGe={name:"berlin",comment:"HF targeted for July 2020 following the Muir Glacier HF",url:"https://eips.ethereum.org/EIPS/eip-2070",status:"Final",eips:[2565,2929,2718,2930]},IGe={name:"london",comment:"HF targeted for July 2021 following the Berlin fork",url:"https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md",status:"Final",eips:[1559,3198,3529,3541]},kGe={name:"shanghai",comment:"Next feature hardfork after the merge hardfork having withdrawals, warm coinbase, push0, limit/meter initcode",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md",status:"Final",eips:[3651,3855,3860,4895]},RGe={name:"arrowGlacier",comment:"HF to delay the difficulty bomb",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md",status:"Final",eips:[4345],gasConfig:{},gasPrices:{},vm:{},pow:{}},NGe={name:"grayGlacier",comment:"Delaying the difficulty bomb to Mid September 2022",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/gray-glacier.md",status:"Draft",eips:[5133],gasConfig:{},gasPrices:{},vm:{},pow:{}},PGe={name:"mergeForkIdTransition",comment:"Pre-merge hardfork to fork off non-upgraded clients",url:"https://eips.ethereum.org/EIPS/eip-3675",status:"Draft",eips:[]},OGe={name:"merge",comment:"Hardfork to upgrade the consensus mechanism to Proof-of-Stake",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/merge.md",status:"Final",consensus:{type:"pos",algorithm:"casper",casper:{}},eips:[3675,4399]},DGe={chainstart:wGe,homestead:vGe,dao:yGe,tangerineWhistle:bGe,spuriousDragon:xGe,byzantium:_Ge,constantinople:AGe,petersburg:EGe,istanbul:CGe,muirGlacier:SGe,berlin:TGe,london:IGe,shanghai:kGe,arrowGlacier:RGe,grayGlacier:NGe,mergeForkIdTransition:PGe,merge:OGe},{buf:MGe}=Vqe;class us extends oj{constructor(e){var n,r;super(),this._eips=[],this._customChains=(n=e.customChains)!==null&&n!==void 0?n:[],this._chainParams=this.setChain(e.chain),this.DEFAULT_HARDFORK=(r=this._chainParams.defaultHardfork)!==null&&r!==void 0?r:ei.Merge,this.HARDFORK_CHANGES=this.hardforks().map(i=>[i.name,DGe[i.name]]),this._hardfork=this.DEFAULT_HARDFORK,e.hardfork!==void 0&&this.setHardfork(e.hardfork),e.eips&&this.setEIPs(e.eips)}static custom(e,n={}){var r;const i=(r=n.baseChain)!==null&&r!==void 0?r:"mainnet",s=Object.assign({},us._getChainParams(i));if(s.name="custom-chain",typeof e!="string")return new us(Object.assign({chain:Object.assign(Object.assign({},s),e)},n));if(e===ao.PolygonMainnet)return us.custom({name:ao.PolygonMainnet,chainId:137,networkId:137},n);if(e===ao.PolygonMumbai)return us.custom({name:ao.PolygonMumbai,chainId:80001,networkId:80001},n);if(e===ao.ArbitrumRinkebyTestnet)return us.custom({name:ao.ArbitrumRinkebyTestnet,chainId:421611,networkId:421611},n);if(e===ao.ArbitrumOne)return us.custom({name:ao.ArbitrumOne,chainId:42161,networkId:42161},n);if(e===ao.xDaiChain)return us.custom({name:ao.xDaiChain,chainId:100,networkId:100},n);if(e===ao.OptimisticKovan)return us.custom({name:ao.OptimisticKovan,chainId:69,networkId:69},Object.assign({hardfork:ei.Berlin},n));if(e===ao.OptimisticEthereum)return us.custom({name:ao.OptimisticEthereum,chainId:10,networkId:10},Object.assign({hardfork:ei.Berlin},n));throw new Error(`Custom chain ${e} not supported`)}static fromGethGenesis(e,{chain:n,eips:r,genesisHash:i,hardfork:s,mergeForkIdPostMerge:o}){var a;const c=Mqe(e,n,o),l=new us({chain:(a=c.name)!==null&&a!==void 0?a:"custom",customChains:[c],eips:r,hardfork:s??c.hardfork});return i!==void 0&&l.setForkHashes(i),l}static isSupportedChainId(e){return!!this._getInitializedChains().names[e.toString()]}static _getChainParams(e,n){let r=e;const i=this._getInitializedChains(n);if(typeof r=="number"||typeof r=="bigint"){if(r=r.toString(),i.names[r]){const s=i.names[r];return i[s]}throw new Error(`Chain with ID ${r} not supported`)}if(i[r]!==void 0)return i[r];throw new Error(`Chain with name ${r} not supported`)}setChain(e){if(typeof e=="number"||typeof e=="bigint"||typeof e=="string")this._chainParams=us._getChainParams(e,this._customChains);else if(typeof e=="object"){if(this._customChains.length>0)throw new Error("Chain must be a string, number, or bigint when initialized with customChains passed in");const n=["networkId","genesis","hardforks","bootstrapNodes"];for(const r of n)if(!(r in e))throw new Error(`Missing required chain parameter: ${r}`);this._chainParams=e}else throw new Error("Wrong input format");for(const n of this.hardforks())if(n.block===void 0)throw new Error("Hardfork cannot have undefined block number");return this._chainParams}setHardfork(e){let n=!1;for(const r of this.HARDFORK_CHANGES)r[0]===e&&(this._hardfork!==e&&(this._hardfork=e,this.emit("hardforkChanged",e)),n=!0);if(!n)throw new Error(`Hardfork with name ${e} not supported`)}getHardforkByBlockNumber(e,n,r){const i=Pw(e,al.BigInt),s=Pw(n,al.BigInt),o=Pw(r,al.Number),a=this.hardforks().filter(g=>g.block!==null||g.ttd!==null&&g.ttd!==void 0||g.timestamp!==void 0),c=a.findIndex(g=>g.ttd!==null&&g.ttd!==void 0);if(a.slice(c+1).findIndex(g=>g.ttd!==null&&g.ttd!==void 0)>=0)throw Error("More than one merge hardforks found with ttd specified");let u=a.findIndex(g=>g.block!==null&&g.block>i||o!==void 0&&Number(g.timestamp)>o);if(u===-1)u=a.length;else if(u===0)throw Error("Must have at least one hardfork at block 0");if(o===void 0){const g=a.slice(0,u).reverse().findIndex(w=>w.block!==null||w.ttd!==void 0);u-=g}if(u-=1,a[u].block===null&&a[u].timestamp===void 0)(s==null||BigInt(a[u].ttd)>s)&&(u-=1);else if(c>=0&&s!==void 0&&s!==null){if(u>=c&&BigInt(a[c].ttd)>s)throw Error("Maximum HF determined by total difficulty is lower than the block number HF");if(u<c&&BigInt(a[c].ttd)<=s)throw Error("HF determined by block number is lower than the minimum total difficulty HF")}const d=u;for(;u<a.length-1&&!(a[u].block!==a[u+1].block||a[u].timestamp!==a[u+1].timestamp);u+=1);if(o){if(a.slice(0,d).reduce((v,_)=>{var T;return Math.max(Number((T=_.timestamp)!==null&&T!==void 0?T:"0"),v)},0)>o)throw Error("Maximum HF determined by timestamp is lower than the block number/ttd HF");if(a.slice(u+1).reduce((v,_)=>{var T;return Math.min(Number((T=_.timestamp)!==null&&T!==void 0?T:o),v)},o)<o)throw Error("Maximum HF determined by block number/ttd is lower than timestamp HF")}return a[u].name}setHardforkByBlockNumber(e,n,r){const i=this.getHardforkByBlockNumber(e,n,r);return this.setHardfork(i),i}_getHardfork(e){const n=this.hardforks();for(const r of n)if(r.name===e)return r;return null}setEIPs(e=[]){for(const n of e){if(!(n in Dw))throw new Error(`${n} not supported`);const r=this.gteHardfork(Dw[n].minimumHardfork);if(!r)throw new Error(`${n} cannot be activated on hardfork ${this.hardfork()}, minimumHardfork: ${r}`);if(Dw[n].requiredEIPs!==void 0){for(const i of Dw[n].requiredEIPs)if(!(e.includes(i)||this.isActivatedEIP(i)))throw new Error(`${n} requires EIP ${i}, but is not included in the EIP list`)}}this._eips=e}param(e,n){let r;for(const i of this._eips)if(r=this.paramByEIP(e,n,i),r!==void 0)return r;return this.paramByHardfork(e,n,this._hardfork)}paramByHardfork(e,n,r){let i=null;for(const s of this.HARDFORK_CHANGES){if("eips"in s[1]){const o=s[1].eips;for(const a of o){const c=this.paramByEIP(e,n,a);i=typeof c=="bigint"?c:i}}else{if(s[1][e]===void 0)throw new Error(`Topic ${e} not defined`);s[1][e][n]!==void 0&&(i=s[1][e][n].v)}if(s[0]===r)break}return BigInt(i??0)}paramByEIP(e,n,r){if(!(r in Dw))throw new Error(`${r} not supported`);const i=Dw[r];if(!(e in i))throw new Error(`Topic ${e} not defined`);if(i[e][n]===void 0)return;const s=i[e][n].v;return BigInt(s)}paramByBlock(e,n,r,i,s){const o=this.getHardforkByBlockNumber(r,i,s);return this.paramByHardfork(e,n,o)}isActivatedEIP(e){if(this.eips().includes(e))return!0;for(const n of this.HARDFORK_CHANGES){const r=n[1];if(this.gteHardfork(r.name)&&"eips"in r&&r.eips.includes(e))return!0}return!1}hardforkIsActiveOnBlock(e,n){const r=Pw(n,al.BigInt),i=e??this._hardfork,s=this.hardforkBlock(i);return typeof s=="bigint"&&s!==BigInt(0)&&r>=s}activeOnBlock(e){return this.hardforkIsActiveOnBlock(null,e)}hardforkGteHardfork(e,n){const r=e??this._hardfork,i=this.hardforks();let s=-1,o=-1,a=0;for(const c of i)c.name===r&&(s=a),c.name===n&&(o=a),a+=1;return s>=o&&o!==-1}gteHardfork(e){return this.hardforkGteHardfork(null,e)}hardforkBlock(e){var n;const r=e??this._hardfork,i=(n=this._getHardfork(r))===null||n===void 0?void 0:n.block;return i==null?null:BigInt(i)}hardforkTimestamp(e){var n;const r=e??this._hardfork,i=(n=this._getHardfork(r))===null||n===void 0?void 0:n.timestamp;return i==null?null:BigInt(i)}eipBlock(e){for(const n of this.HARDFORK_CHANGES){const r=n[1];if("eips"in r&&r.eips.includes(e))return this.hardforkBlock(typeof n[0]=="number"?String(n[0]):n[0])}return null}hardforkTTD(e){var n;const r=e??this._hardfork,i=(n=this._getHardfork(r))===null||n===void 0?void 0:n.ttd;return i==null?null:BigInt(i)}isHardforkBlock(e,n){const r=Pw(e,al.BigInt),i=n??this._hardfork,s=this.hardforkBlock(i);return typeof s=="bigint"&&s!==BigInt(0)?s===r:!1}nextHardforkBlockOrTimestamp(e){var n,r;const i=e??this._hardfork,s=this.hardforks();let o=s.findIndex(u=>u.name===i);if(i===ei.Merge&&(o-=1),o<0)return null;let a=(n=s[o].timestamp)!==null&&n!==void 0?n:s[o].block;a=a!=null?Number(a):null;const c=s.slice(o+1).find(u=>{var d;let h=(d=u.timestamp)!==null&&d!==void 0?d:u.block;return h=h!=null?Number(h):null,u.name!==ei.Merge&&h!==null&&h!==void 0&&h!==a});if(c===void 0)return null;const l=(r=c.timestamp)!==null&&r!==void 0?r:c.block;return l==null?null:BigInt(l)}nextHardforkBlock(e){const n=e??this._hardfork;let r=this.hardforkBlock(n);if(r===null&&n===ei.Merge){const s=this.hardforks(),o=s.findIndex(a=>a.ttd!==null&&a.ttd!==void 0);if(o<0)throw Error("Merge hardfork should have been found");r=this.hardforkBlock(s[o-1].name)}return r===null?null:this.hardforks().reduce((s,o)=>{const a=BigInt(o.block===null||o.ttd!==void 0&&o.ttd!==null?0:o.block);return a>r&&s===null?a:s},null)}isNextHardforkBlock(e,n){const r=Pw(e,al.BigInt),i=n??this._hardfork,s=this.nextHardforkBlock(i);return s===null?!1:s===r}_calcForkHash(e,n){let r=new Uint8Array,i=0;for(const a of this.hardforks()){const{block:c,timestamp:l,name:u}=a;let d=l??c;if(d=d!==null?Number(d):null,typeof d=="number"&&d!==0&&d!==i&&u!==ei.Merge){const h=ri(d.toString(16).padStart(16,"0"));r=Ho(r,h),i=d}if(a.name===e)break}const s=Ho(n,r);return Kn(Bqe(MGe(s)>>>0))}forkHash(e,n){const r=e??this._hardfork,i=this._getHardfork(r);if(i===null||(i==null?void 0:i.block)===null&&(i==null?void 0:i.timestamp)===void 0&&(i==null?void 0:i.ttd)===void 0){const s="No fork hash calculation possible for future hardfork";throw new Error(s)}if((i==null?void 0:i.forkHash)!==null&&(i==null?void 0:i.forkHash)!==void 0)return i.forkHash;if(!n)throw new Error("genesisHash required for forkHash calculation");return this._calcForkHash(r,n)}hardforkForForkHash(e){const n=this.hardforks().filter(r=>r.forkHash===e);return n.length>=1?n[n.length-1]:null}setForkHashes(e){var n;for(const r of this.hardforks()){const i=(n=r.timestamp)!==null&&n!==void 0?n:r.block;(r.forkHash===null||r.forkHash===void 0)&&(i!=null||typeof r.ttd<"u")&&(r.forkHash=this.forkHash(r.name,e))}}genesis(){return this._chainParams.genesis}hardforks(){return this._chainParams.hardforks}bootstrapNodes(){return this._chainParams.bootstrapNodes}dnsNetworks(){return this._chainParams.dnsNetworks}hardfork(){return this._hardfork}chainId(){return BigInt(this._chainParams.chainId)}chainName(){return this._chainParams.name}networkId(){return BigInt(this._chainParams.networkId)}eips(){return this._eips}consensusType(){const e=this.hardfork();let n;for(const r of this.HARDFORK_CHANGES)if("consensus"in r[1]&&(n=r[1].consensus.type),r[0]===e)break;return n??this._chainParams.consensus.type}consensusAlgorithm(){const e=this.hardfork();let n;for(const r of this.HARDFORK_CHANGES)if("consensus"in r[1]&&(n=r[1].consensus.algorithm),r[0]===e)break;return n??this._chainParams.consensus.algorithm}consensusConfig(){var e;const n=this.hardfork();let r;for(const i of this.HARDFORK_CHANGES)if("consensus"in i[1]&&(r=i[1].consensus[i[1].consensus.algorithm]),i[0]===n)break;return(e=r??this._chainParams.consensus[this.consensusAlgorithm()])!==null&&e!==void 0?e:{}}copy(){const e=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return e.removeAllListeners(),e}static _getInitializedChains(e){const n={};for(const[i,s]of Object.entries(U8))n[s]=i.toLowerCase();const r={mainnet:Gqe,goerli:qqe,sepolia:Kqe};if(e)for(const i of e){const{name:s}=i;n[i.chainId.toString()]=s,r[s]=i}return r.names=n,r}}var nd;(function(t){t[t.EIP155ReplayProtection=155]="EIP155ReplayProtection",t[t.EIP1559FeeMarket=1559]="EIP1559FeeMarket",t[t.EIP2718TypedTransaction=2718]="EIP2718TypedTransaction",t[t.EIP2930AccessLists=2930]="EIP2930AccessLists"})(nd||(nd={}));function BGe(t){if(t.length===0)return!0;const e=t[0];return!!Array.isArray(e)}function $Ge(t){return!BGe(t)}class By{constructor(e){if(e.length!==20)throw new Error("Invalid address length");this.buf=e}static zero(){return new By(Bse(20))}equals(e){return G9(this.buf,e.buf)}isZero(){return this.equals(By.zero())}toString(){return Kn(this.buf)}toArray(){return this.buf}static publicToAddress(e,n=!1){let r=e;if(_j(r),n&&r.length!==64&&(r=$h.ProjectivePoint.fromHex(r).toRawBytes(!1).slice(1)),r.length!==64)throw new Error("Expected pubKey to be of length 64");return No(r).slice(-20)}}const jGe=(t,e)=>{const n=t.param("vm","maxInitCodeSize");if(n&&BigInt(e)>n)throw new Error(`the initcode size of this transaction is too large: it is ${e} while the max is ${t.param("vm","maxInitCodeSize")}`)},Wse=t=>{let e,n;if($Ge(t)){e=t;const r=[];for(let i=0;i<t.length;i+=1){const s=t[i],o=pi(s.address),a=[];for(let c=0;c<s.storageKeys.length;c+=1)a.push(pi(s.storageKeys[c]));r.push([o,a])}n=r}else{n=t??[];const r=[];for(let i=0;i<n.length;i+=1){const s=n[i],o=Kn(s[0]),a=[];for(let l=0;l<s[1].length;l+=1)a.push(Kn(s[1][l]));const c={address:o,storageKeys:a};r.push(c)}e=r}return{AccessListJSON:e,accessList:n}},Vse=t=>{for(let e=0;e<t.length;e+=1){const n=t[e],r=n[0],i=n[1];if(n[2]!==void 0)throw new Error("Access list item cannot have 3 elements. It can only have an address, and an array of storage slots.");if(r.length!==20)throw new Error("Invalid EIP-2930 transaction: address length should be 20 bytes");for(let s=0;s<i.length;s+=1)if(i[s].length!==32)throw new Error("Invalid EIP-2930 transaction: storage slot length should be 32 bytes")}},qse=t=>{const e=[];for(let n=0;n<t.length;n+=1){const r=t[n],i={address:Kn(LG(r[0],20)),storageKeys:[]},s=r&&r[1];for(let o=0;o<s.length;o+=1){const a=s[o];i.storageKeys.push(Kn(LG(a,32)))}e.push(i)}return e},Gse=(t,e)=>{const n=e.param("gasPrices","accessListStorageKeyCost"),r=e.param("gasPrices","accessListAddressCost");let i=0;for(let o=0;o<t.length;o+=1){const c=t[o][1];i+=c.length}return t.length*Number(r)+i*Number(n)};class sb{constructor(e,n){var r,i;this.cache={hash:void 0,dataFee:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=U8.Mainnet,this.DEFAULT_HARDFORK=ei.Merge;const{nonce:s,gasLimit:o,to:a,value:c,data:l,v:u,r:d,s:h,type:g}=e;this._type=Number(Yr(pi(g))),this.txOptions=n;const w=pi(a===""?"0x":a),v=pi(u===""?"0x":u),_=pi(d===""?"0x":d),T=pi(h===""?"0x":h);this.nonce=Yr(pi(s===""?"0x":s)),this.gasLimit=Yr(pi(o===""?"0x":o)),this.to=w.length>0?new By(w):void 0,this.value=Yr(pi(c===""?"0x":c)),this.data=pi(l===""?"0x":l),this.v=v.length>0?Yr(v):void 0,this.r=_.length>0?Yr(_):void 0,this.s=T.length>0?Yr(T):void 0,this._validateCannotExceedMaxInteger({value:this.value,r:this.r,s:this.s}),this._validateCannotExceedMaxInteger({gasLimit:this.gasLimit},64),this._validateCannotExceedMaxInteger({nonce:this.nonce},64,!0);const b=this.to===void 0||this.to===null,k=(r=n.allowUnlimitedInitCodeSize)!==null&&r!==void 0?r:!1,D=(i=n.common)!==null&&i!==void 0?i:this._getCommon();b&&D.isActivatedEIP(3860)&&!k&&jGe(D,this.data.length)}get type(){return this._type}supports(e){return this.activeCapabilities.includes(e)}validate(e=!1){const n=[];return this.getBaseFee()>this.gasLimit&&n.push(`gasLimit is too low. given ${this.gasLimit}, need at least ${this.getBaseFee()}`),this.isSigned()&&!this.verifySignature()&&n.push("Invalid Signature"),e?n:n.length===0}_validateYParity(){const{v:e}=this;if(e!==void 0&&e!==BigInt(0)&&e!==BigInt(1)){const n=this._errorMsg("The y-parity of the transaction should either be 0 or 1");throw new Error(n)}}_validateHighS(){const{s:e}=this;if(this.common.gteHardfork("homestead")&&e!==void 0&&e>Nqe){const n=this._errorMsg("Invalid Signature: s-values greater than secp256k1n/2 are considered invalid");throw new Error(n)}}getBaseFee(){const e=this.common.param("gasPrices","tx");let n=this.getDataFee();if(e&&(n+=e),this.common.gteHardfork("homestead")&&this.toCreationAddress()){const r=this.common.param("gasPrices","txCreation");r&&(n+=r)}return n}getDataFee(){const e=this.common.param("gasPrices","txDataZero"),n=this.common.param("gasPrices","txDataNonZero");let r=BigInt(0);for(let i=0;i<this.data.length;i+=1)this.data[i]===0?r+=e:r+=n;if((this.to===void 0||this.to===null)&&this.common.isActivatedEIP(3860)){const i=BigInt(Math.ceil(this.data.length/32)),s=this.common.param("gasPrices","initCodeWordCost")*i;r+=s}return r}toCreationAddress(){return this.to===void 0||this.to.buf.length===0}isSigned(){const{v:e,r:n,s:r}=this;return!(e===void 0||n===void 0||r===void 0)}verifySignature(){try{const e=this.getSenderPublicKey();return F8(e).length!==0}catch{return!1}}getSenderAddress(){return new By(By.publicToAddress(this.getSenderPublicKey()))}sign(e){if(e.length!==32){const c=this._errorMsg("Private key must be 32 bytes in length.");throw new Error(c)}let n=!1;this.type===0&&this.common.gteHardfork("spuriousDragon")&&!this.supports(nd.EIP155ReplayProtection)&&(this.activeCapabilities.push(nd.EIP155ReplayProtection),n=!0);const r=this.getMessageToSign(!0),{v:i,r:s,s:o}=this._ecsign(r,e),a=this._processSignature(i,s,o);if(n){const c=this.activeCapabilities.indexOf(nd.EIP155ReplayProtection);c>-1&&this.activeCapabilities.splice(c,1)}return a}_getCommon(e,n){var r,i,s,o;if(n!==void 0){const a=Yr(pi(n));if(e){if(e.chainId()!==a){const c=this._errorMsg("The chain ID does not match the chain ID of Common");throw new Error(c)}return e.copy()}return us.isSupportedChainId(a)?new us({chain:a,hardfork:this.DEFAULT_HARDFORK}):us.custom({name:"custom-chain",networkId:a,chainId:a},{baseChain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})}if(e!=null&&e.copy&&typeof(e==null?void 0:e.copy)=="function")return e.copy();if(e){const a=typeof e.hardfork=="function"?e.hardfork():e.hardfork;return us.custom({name:"custom-chain",networkId:e.networkId?e.networkId():(i=BigInt((r=e.customChain)===null||r===void 0?void 0:r.networkId))!==null&&i!==void 0?i:void 0,chainId:e.chainId?e.chainId():(o=BigInt((s=e.customChain)===null||s===void 0?void 0:s.chainId))!==null&&o!==void 0?o:void 0},{baseChain:this.DEFAULT_CHAIN,hardfork:a||this.DEFAULT_HARDFORK})}return new us({chain:this.DEFAULT_CHAIN,hardfork:this.DEFAULT_HARDFORK})}_validateCannotExceedMaxInteger(e,n=256,r=!1){for(const[i,s]of Object.entries(e))switch(n){case 64:if(r){if(s!==void 0&&s>=BG){const o=this._errorMsg(`${i} cannot equal or exceed MAX_UINT64 (2^64-1), given ${s}`);throw new Error(o)}}else if(s!==void 0&&s>BG){const o=this._errorMsg(`${i} cannot exceed MAX_UINT64 (2^64-1), given ${s}`);throw new Error(o)}break;case 256:if(r){if(s!==void 0&&s>=Yx){const o=this._errorMsg(`${i} cannot equal or exceed MAX_INTEGER (2^256-1), given ${s}`);throw new Error(o)}}else if(s!==void 0&&s>Yx){const o=this._errorMsg(`${i} cannot exceed MAX_INTEGER (2^256-1), given ${s}`);throw new Error(o)}break;default:{const o=this._errorMsg("unimplemented bits value");throw new Error(o)}}}static _validateNotArray(e){const n=["nonce","gasPrice","gasLimit","to","value","data","v","r","s","type","baseFee","maxFeePerGas","chainId"];for(const[r,i]of Object.entries(e))if(n.includes(r)&&Array.isArray(i))throw new Error(`${r} cannot be an array`)}_getSharedErrorPostfix(){let e="";try{e=this.isSigned()?Kn(this.hash()):"not available (unsigned)"}catch{e="error"}let n="";try{n=this.isSigned().toString()}catch{e="error"}let r="";try{r=this.common.hardfork()}catch{r="error"}let i=`tx type=${this.type} hash=${e} nonce=${this.nonce} value=${this.value} `;return i+=`signed=${n} hf=${r}`,i}_ecsign(e,n,r){const i=$h.sign(e,n),s=i.toCompactRawBytes(),o=s.subarray(0,32),a=s.subarray(32,64),c=r===void 0?BigInt(i.recovery+27):BigInt(i.recovery+35)+BigInt(r)*BigInt(2);return{r:o,s:a,v:c}}static fromSerializedTx(e,n={}){}static fromTxData(e,n={}){}}const JO=2,rR=ri(JO.toString(16).padStart(2,"0"));class eg extends sb{constructor(e,n={}){var r;super(Object.assign(Object.assign({},e),{type:JO}),n),this.DEFAULT_HARDFORK="london";const{chainId:i,accessList:s,maxFeePerGas:o,maxPriorityFeePerGas:a}=e;if(this.common=this._getCommon(n.common,i),this.chainId=this.common.chainId(),!this.common.isActivatedEIP(1559))throw new Error("EIP-1559 not enabled on Common");this.activeCapabilities=this.activeCapabilities.concat([1559,2718,2930]);const c=Wse(s??[]);if(this.accessList=c.accessList,this.AccessListJSON=c.AccessListJSON,Vse(this.accessList),this.maxFeePerGas=Yr(pi(o===""?"0x":o)),this.maxPriorityFeePerGas=Yr(pi(a===""?"0x":a)),this._validateCannotExceedMaxInteger({maxFeePerGas:this.maxFeePerGas,maxPriorityFeePerGas:this.maxPriorityFeePerGas}),sb._validateNotArray(e),this.gasLimit*this.maxFeePerGas>Yx){const u=this._errorMsg("gasLimit * maxFeePerGas cannot exceed MAX_INTEGER (2^256-1)");throw new Error(u)}if(this.maxFeePerGas<this.maxPriorityFeePerGas){const u=this._errorMsg("maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)");throw new Error(u)}this._validateYParity(),this._validateHighS(),((r=n==null?void 0:n.freeze)!==null&&r!==void 0?r:!0)&&Object.freeze(this)}static fromTxData(e,n={}){return new eg(e,n)}static fromSerializedTx(e,n={}){if(!G9(e.subarray(0,1),rR))throw new Error(`Invalid serialized tx input: not an EIP-1559 transaction (wrong tx type, expected: ${JO}, received: ${Kn(e.subarray(0,1))}`);const r=Ka.decode(e.subarray(1));if(!Array.isArray(r))throw new Error("Invalid serialized tx input: must be array");return eg.fromValuesArray(r,n)}static fromValuesArray(e,n={}){if(e.length!==9&&e.length!==12)throw new Error("Invalid EIP-1559 transaction. Only expecting 9 values (for unsigned tx) or 12 values (for signed tx).");const[r,i,s,o,a,c,l,u,d,h,g,w]=e;return this._validateNotArray({chainId:r,v:h}),nj({nonce:i,maxPriorityFeePerGas:s,maxFeePerGas:o,gasLimit:a,value:l,v:h,r:g,s:w}),new eg({chainId:Yr(r),nonce:i,maxPriorityFeePerGas:s,maxFeePerGas:o,gasLimit:a,to:c,value:l,data:u,accessList:d??[],v:h!==void 0?Yr(h):void 0,r:g,s:w},n)}getDataFee(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;let e=super.getDataFee();return e+=BigInt(Gse(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:e,hardfork:this.common.hardfork()}),e}getUpfrontCost(e=BigInt(0)){const n=this.maxPriorityFeePerGas,r=this.maxFeePerGas-e,s=(n<r?n:r)+e;return this.gasLimit*s+this.value}raw(){return[mr(this.chainId),mr(this.nonce),mr(this.maxPriorityFeePerGas),mr(this.maxFeePerGas),mr(this.gasLimit),this.to!==void 0?this.to.buf:Uint8Array.from([]),mr(this.value),this.data,this.accessList,this.v!==void 0?mr(this.v):Uint8Array.from([]),this.r!==void 0?mr(this.r):Uint8Array.from([]),this.s!==void 0?mr(this.s):Uint8Array.from([])]}serialize(){const e=this.raw();return Ho(rR,Ka.encode(e))}getMessageToSign(e=!0){const n=this.raw().slice(0,9),r=Ho(rR,Ka.encode(n));return e?No(r):r}hash(){if(!this.isSigned()){const e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=No(this.serialize())),this.cache.hash):No(this.serialize())}getMessageToVerifySignature(){return this.getMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){const s=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(s)}const e=this.getMessageToVerifySignature(),{v:n,r,s:i}=this;this._validateHighS();try{return Aj(e,n+BigInt(27),mr(r),mr(i))}catch{const o=this._errorMsg("Invalid Signature");throw new Error(o)}}_processSignature(e,n,r){const i=Object.assign(Object.assign({},this.txOptions),{common:this.common});return eg.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:e-BigInt(27),r:Yr(n),s:Yr(r)},i)}toJSON(){const e=qse(this.accessList);return{chainId:mi(this.chainId),nonce:mi(this.nonce),maxPriorityFeePerGas:mi(this.maxPriorityFeePerGas),maxFeePerGas:mi(this.maxFeePerGas),gasLimit:mi(this.gasLimit),to:this.to!==void 0?this.to.toString():void 0,value:mi(this.value),data:Kn(this.data),accessList:e,v:this.v!==void 0?mi(this.v):void 0,r:this.r!==void 0?mi(this.r):void 0,s:this.s!==void 0?mi(this.s):void 0}}errorStr(){let e=this._getSharedErrorPostfix();return e+=` maxFeePerGas=${this.maxFeePerGas} maxPriorityFeePerGas=${this.maxPriorityFeePerGas}`,e}_errorMsg(e){return`${e} (${this.errorStr()})`}}const XO=1,iR=ri(XO.toString(16).padStart(2,"0"));class tg extends sb{constructor(e,n={}){var r;super(Object.assign(Object.assign({},e),{type:XO}),n),this.DEFAULT_HARDFORK="berlin";const{chainId:i,accessList:s,gasPrice:o}=e;if(this.common=this._getCommon(n.common,i),this.chainId=this.common.chainId(),!this.common.isActivatedEIP(2930))throw new Error("EIP-2930 not enabled on Common");this.activeCapabilities=this.activeCapabilities.concat([2718,2930]);const a=Wse(s??[]);if(this.accessList=a.accessList,this.AccessListJSON=a.AccessListJSON,Vse(this.accessList),this.gasPrice=Yr(pi(o===""?"0x":o)),this._validateCannotExceedMaxInteger({gasPrice:this.gasPrice}),sb._validateNotArray(e),this.gasPrice*this.gasLimit>Yx){const l=this._errorMsg("gasLimit * gasPrice cannot exceed MAX_INTEGER");throw new Error(l)}this._validateYParity(),this._validateHighS(),((r=n==null?void 0:n.freeze)!==null&&r!==void 0?r:!0)&&Object.freeze(this)}static fromTxData(e,n={}){return new tg(e,n)}static fromSerializedTx(e,n={}){if(!G9(e.subarray(0,1),iR))throw new Error(`Invalid serialized tx input: not an EIP-2930 transaction (wrong tx type, expected: ${XO}, received: ${Kn(e.subarray(0,1))}`);const r=Ka.decode(Uint8Array.from(e.subarray(1)));if(!Array.isArray(r))throw new Error("Invalid serialized tx input: must be array");return tg.fromValuesArray(r,n)}static fromValuesArray(e,n={}){if(e.length!==8&&e.length!==11)throw new Error("Invalid EIP-2930 transaction. Only expecting 8 values (for unsigned tx) or 11 values (for signed tx).");const[r,i,s,o,a,c,l,u,d,h,g]=e;this._validateNotArray({chainId:r,v:d}),nj({nonce:i,gasPrice:s,gasLimit:o,value:c,v:d,r:h,s:g});const w=[];return new tg({chainId:Yr(r),nonce:i,gasPrice:s,gasLimit:o,to:a,value:c,data:l,accessList:u??w,v:d!==void 0?Yr(d):void 0,r:h,s:g},n)}getDataFee(){if(this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork())return this.cache.dataFee.value;let e=super.getDataFee();return e+=BigInt(Gse(this.accessList,this.common)),Object.isFrozen(this)&&(this.cache.dataFee={value:e,hardfork:this.common.hardfork()}),e}getUpfrontCost(){return this.gasLimit*this.gasPrice+this.value}raw(){return[mr(this.chainId),mr(this.nonce),mr(this.gasPrice),mr(this.gasLimit),this.to!==void 0?this.to.buf:Uint8Array.from([]),mr(this.value),this.data,this.accessList,this.v!==void 0?mr(this.v):Uint8Array.from([]),this.r!==void 0?mr(this.r):Uint8Array.from([]),this.s!==void 0?mr(this.s):Uint8Array.from([])]}serialize(){const e=this.raw();return Ho(iR,Ka.encode(e))}getMessageToSign(e=!0){const n=this.raw().slice(0,8),r=Ho(iR,Ka.encode(n));return e?No(r):r}hash(){if(!this.isSigned()){const e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=No(this.serialize())),this.cache.hash):No(this.serialize())}getMessageToVerifySignature(){return this.getMessageToSign()}getSenderPublicKey(){if(!this.isSigned()){const s=this._errorMsg("Cannot call this method if transaction is not signed");throw new Error(s)}const e=this.getMessageToVerifySignature(),{v:n,r,s:i}=this;this._validateHighS();try{return Aj(e,n+BigInt(27),mr(r),mr(i))}catch{const o=this._errorMsg("Invalid Signature");throw new Error(o)}}_processSignature(e,n,r){const i=Object.assign(Object.assign({},this.txOptions),{common:this.common});return tg.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:e-BigInt(27),r:Yr(n),s:Yr(r)},i)}toJSON(){const e=qse(this.accessList);return{chainId:mi(this.chainId),nonce:mi(this.nonce),gasPrice:mi(this.gasPrice),gasLimit:mi(this.gasLimit),to:this.to!==void 0?this.to.toString():void 0,value:mi(this.value),data:Kn(this.data),accessList:e,v:this.v!==void 0?mi(this.v):void 0,r:this.r!==void 0?mi(this.r):void 0,s:this.s!==void 0?mi(this.s):void 0}}errorStr(){var e,n;let r=this._getSharedErrorPostfix();return r+=` gasPrice=${this.gasPrice} accessListCount=${(n=(e=this.accessList)===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0}`,r}_errorMsg(e){return`${e} (${this.errorStr()})`}}const LGe=0;function zG(t,e){const n=Number(t),r=Number(e)*2;return n===r+35||n===r+36}class Gp extends sb{constructor(e,n={}){var r;if(super(Object.assign(Object.assign({},e),{type:LGe}),n),this.common=this._validateTxV(this.v,n.common),this.gasPrice=Yr(pi(e.gasPrice===""?"0x":e.gasPrice)),this.gasPrice*this.gasLimit>Yx){const s=this._errorMsg("gas limit * gasPrice cannot exceed MAX_INTEGER (2^256-1)");throw new Error(s)}this._validateCannotExceedMaxInteger({gasPrice:this.gasPrice}),sb._validateNotArray(e),this.common.gteHardfork("spuriousDragon")&&(this.isSigned()?zG(this.v,this.common.chainId())&&this.activeCapabilities.push(nd.EIP155ReplayProtection):this.activeCapabilities.push(nd.EIP155ReplayProtection)),((r=n==null?void 0:n.freeze)!==null&&r!==void 0?r:!0)&&Object.freeze(this)}static fromTxData(e,n={}){return new Gp(e,n)}static fromSerializedTx(e,n={}){const r=Ka.decode(e);if(!Array.isArray(r))throw new Error("Invalid serialized tx input. Must be array");return this.fromValuesArray(r,n)}static fromValuesArray(e,n={}){if(e.length!==6&&e.length!==9)throw new Error("Invalid transaction. Only expecting 6 values (for unsigned tx) or 9 values (for signed tx).");const[r,i,s,o,a,c,l,u,d]=e;return nj({nonce:r,gasPrice:i,gasLimit:s,value:a,v:l,r:u,s:d}),new Gp({nonce:r,gasPrice:i,gasLimit:s,to:o,value:a,data:c,v:l,r:u,s:d},n)}raw(){return[mr(this.nonce),mr(this.gasPrice),mr(this.gasLimit),this.to!==void 0?this.to.buf:Uint8Array.from([]),mr(this.value),this.data,this.v!==void 0?mr(this.v):Uint8Array.from([]),this.r!==void 0?mr(this.r):Uint8Array.from([]),this.s!==void 0?mr(this.s):Uint8Array.from([])]}serialize(){return Ka.encode(this.raw())}_getMessageToSign(){const e=[mr(this.nonce),mr(this.gasPrice),mr(this.gasLimit),this.to!==void 0?this.to.buf:Uint8Array.from([]),mr(this.value),this.data];return this.supports(nd.EIP155ReplayProtection)&&(e.push(pi(this.common.chainId())),e.push(F8(pi(0))),e.push(F8(pi(0)))),e}getMessageToSign(e=!0){const n=this._getMessageToSign();return e?No(Ka.encode(n)):n}getDataFee(){return this.cache.dataFee&&this.cache.dataFee.hardfork===this.common.hardfork()?this.cache.dataFee.value:(Object.isFrozen(this)&&(this.cache.dataFee={value:super.getDataFee(),hardfork:this.common.hardfork()}),super.getDataFee())}getUpfrontCost(){return this.gasLimit*this.gasPrice+this.value}hash(){if(!this.isSigned()){const e=this._errorMsg("Cannot call hash method if transaction is not signed");throw new Error(e)}return Object.isFrozen(this)?(this.cache.hash||(this.cache.hash=No(Ka.encode(this.raw()))),this.cache.hash):No(Ka.encode(this.raw()))}getMessageToVerifySignature(){if(!this.isSigned()){const n=this._errorMsg("This transaction is not signed");throw new Error(n)}const e=this._getMessageToSign();return No(Ka.encode(e))}getSenderPublicKey(){const e=this.getMessageToVerifySignature(),{v:n,r,s:i}=this;this._validateHighS();try{return Aj(e,n,mr(r),mr(i),this.supports(nd.EIP155ReplayProtection)?this.common.chainId():void 0)}catch{const o=this._errorMsg("Invalid Signature");throw new Error(o)}}_processSignature(e,n,r){let i=e;this.supports(nd.EIP155ReplayProtection)&&(i+=this.common.chainId()*BigInt(2)+BigInt(8));const s=Object.assign(Object.assign({},this.txOptions),{common:this.common});return Gp.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:i,r:Yr(n),s:Yr(r)},s)}toJSON(){return{nonce:mi(this.nonce),gasPrice:mi(this.gasPrice),gasLimit:mi(this.gasLimit),to:this.to!==void 0?this.to.toString():void 0,value:mi(this.value),data:Kn(this.data),v:this.v!==void 0?mi(this.v):void 0,r:this.r!==void 0?mi(this.r):void 0,s:this.s!==void 0?mi(this.s):void 0}}_validateTxV(e,n){let r;const i=e!==void 0?Number(e):void 0;if(i!==void 0&&i<37&&i!==27&&i!==28)throw new Error(`Legacy txs need either v = 27/28 or v >= 37 (EIP-155 replay protection), got v = ${i}`);if(i!==void 0&&i!==0&&(!n||n.gteHardfork("spuriousDragon"))&&i!==27&&i!==28)if(n){if(!zG(BigInt(i),n.chainId()))throw new Error(`Incompatible EIP155-based V ${i} and chain id ${n.chainId()}. See the Common parameter of the Transaction constructor to set the chain id.`)}else{let s;(i-35)%2===0?s=35:s=36,r=BigInt(i-s)/BigInt(2)}return this._getCommon(n,r)}errorStr(){let e=this._getSharedErrorPostfix();return e+=` gasPrice=${this.gasPrice}`,e}_errorMsg(e){return`${e} (${this.errorStr()})`}}const sR=new Map;class m1{constructor(){}static typeToInt(e){return Number(Yr(pi(e)))}static registerTransactionType(e,n){const r=m1.typeToInt(e);sR.set(r,n)}static fromTxData(e,n={}){if(!("type"in e)||e.type===void 0)return Gp.fromTxData(e,n);const r=m1.typeToInt(e.type);if(r===0)return Gp.fromTxData(e,n);if(r===1)return tg.fromTxData(e,n);if(r===2)return eg.fromTxData(e,n);const i=sR.get(r);if(i!=null&&i.fromTxData)return i.fromTxData(e,n);throw new Error(`Tx instantiation with type ${r} not supported`)}static fromSerializedData(e,n={}){if(e[0]<=127)switch(e[0]){case 1:return tg.fromSerializedTx(e,n);case 2:return eg.fromSerializedTx(e,n);default:{const r=sR.get(Number(e[0]));if(r!=null&&r.fromSerializedTx)return r.fromSerializedTx(e,n);throw new Error(`TypedTransaction with ID ${e[0]} unknown`)}}else return Gp.fromSerializedTx(e,n)}static fromBlockBodyData(e,n={}){if(rm(e))return this.fromSerializedData(e,n);if(Array.isArray(e))return Gp.fromValuesArray(e,n);throw new Error("Cannot decode transaction: unknown type input")}}var nT=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};const Hb=(t,e)=>{let n;if(!e&&typeof t=="string"&&Rr(t)&&t.length!==66)throw new cG;try{n=rm(t)?t:kd(t)}catch{throw new Bze}if(!e&&n.byteLength!==32)throw new cG;return n},Cj=t=>{const e=Rr(t)?t:gu(t),n=ri(e),r=ri(Zie(`Ethereum Signed Message:
${n.byteLength}`)),i=Ho(r,n);return uc(i)},Kse=(t,e)=>{const n=Hb(e),r=Cj(t),i=$h.sign(r.substring(2),n),s=i.toCompactRawBytes(),o=i.r.toString(16).padStart(64,"0"),a=i.s.toString(16).padStart(64,"0"),c=i.recovery+27;return{message:t,messageHash:r,v:ba(c),r:`0x${o}`,s:`0x${a}`,signature:`${Kn(s)}${c.toString(16)}`}},UGe=(t,e)=>nT(void 0,void 0,void 0,function*(){const n=t.sign(ri(e));if($e(n.v)||$e(n.r)||$e(n.s))throw new MO("Signer Error");const r=n.validate(!0);if(r.length>0){let o="Signer Error ";for(const a of r)o+=`${o} ${a}.`;throw new MO(o)}const i=Kn(n.serialize()),s=uc(i);return{messageHash:Kn(n.getMessageToSign(!0)),v:`0x${n.v.toString(16)}`,r:`0x${n.r.toString(16).padStart(64,"0")}`,s:`0x${n.s.toString(16).padStart(64,"0")}`,rawTransaction:i,transactionHash:Kn(s)}}),FGe=t=>{if($e(t))throw new Xze;const e=m1.fromSerializedData(ri(t));return Fd(e.getSenderAddress().toString())},eD=(t,e,n,r,i)=>{if(typeof t=="object"){const d=`${t.r}${t.s.slice(2)}${t.v.slice(2)}`;return eD(t.messageHash,d,n)}if(typeof e=="string"&&typeof n=="string"&&!$e(r)){const d=`${n}${r.slice(2)}${e.slice(2)}`;return eD(t,d,i)}if($e(e))throw new $ze("signature string undefined");const s=130,o=n?t:Cj(t);let a=parseInt(e.substring(s),16);a>26&&(a-=27);const c=$h.Signature.fromCompact(e.slice(2,s)).addRecoveryBit(a).recoverPublicKey(o.replace("0x","")).toRawBytes(!1),l=uc(c.subarray(1));return Fd(`0x${l.slice(-40)}`)},rT=t=>{const e=Hb(t),n=$h.getPublicKey(e,!1),i=uc(n.slice(1)).slice(-40);return Fd(`0x${i}`)},zGe=(t,e)=>{const n=Hb(t);return`0x${Kn($h.getPublicKey(n,e)).slice(4)}`},Yse=(t,e,n)=>nT(void 0,void 0,void 0,function*(){var r,i,s,o,a,c,l;const u=Hb(t);let d;if(n!=null&&n.salt?d=typeof n.salt=="string"?ri(n.salt):n.salt:d=qx(32),!(ej(e)||rm(e)))throw new Uze;const h=typeof e=="string"?ri(gu(e)):e;let g;if(n!=null&&n.iv){if(g=typeof n.iv=="string"?ri(n.iv):n.iv,g.length!==16)throw new Fze}else g=qx(16);const w=(r=n==null?void 0:n.kdf)!==null&&r!==void 0?r:"scrypt";let v,_;if(w==="pbkdf2"){if(_={dklen:(i=n==null?void 0:n.dklen)!==null&&i!==void 0?i:32,salt:Kn(d).replace("0x",""),c:(s=n==null?void 0:n.c)!==null&&s!==void 0?s:262144,prf:"hmac-sha256"},_.c<1e3)throw new zze;v=Ase(h,d,_.c,_.dklen,"sha256")}else if(w==="scrypt")_={n:(o=n==null?void 0:n.n)!==null&&o!==void 0?o:8192,r:(a=n==null?void 0:n.r)!==null&&a!==void 0?a:8,p:(c=n==null?void 0:n.p)!==null&&c!==void 0?c:1,dklen:(l=n==null?void 0:n.dklen)!==null&&l!==void 0?l:32,salt:Kn(d).replace("0x","")},v=Ese(h,d,_.n,_.p,_.r,_.dklen);else throw new bie;const T=yield mj(u,v.slice(0,16),g,"aes-128-ctr"),b=Kn(T).slice(2),k=uc(Ho(v.slice(16,32),T)).replace("0x","");return{version:3,id:uj(),address:rT(u).toLowerCase().replace("0x",""),crypto:{ciphertext:b,cipherparams:{iv:Kn(g).replace("0x","")},cipher:"aes-128-ctr",kdf:w,kdfparams:_,mac:k}}}),Sj=(t,e)=>{const n=Hb(t,e);return{address:rT(n),privateKey:Kn(n),signTransaction:r=>{throw new MO("Do not have network access to sign the transaction")},sign:r=>Kse(typeof r=="string"?r:JSON.stringify(r),n),encrypt:(r,i)=>nT(void 0,void 0,void 0,function*(){return Yse(n,r,i)})}},HGe=()=>{const t=$h.utils.randomPrivateKey();return Sj(`${Kn(t)}`)},WGe=(t,e,n)=>nT(void 0,void 0,void 0,function*(){const r=typeof t=="object"?t:JSON.parse(n?t.toLowerCase():t);if(yn.validateJSONSchema(Pqe,r),r.version!==3)throw new Lze;const i=typeof e=="string"?ri(gu(e)):e;yn.validate(["bytes"],[i]);let s;if(r.crypto.kdf==="scrypt"){const l=r.crypto.kdfparams,u=typeof l.salt=="string"?ri(l.salt):l.salt;s=Ese(i,u,l.n,l.p,l.r,l.dklen)}else if(r.crypto.kdf==="pbkdf2"){const l=r.crypto.kdfparams,u=typeof l.salt=="string"?ri(l.salt):l.salt;s=Ase(i,u,l.c,l.dklen,"sha256")}else throw new bie;const o=ri(r.crypto.ciphertext);if(uc(Ho(s.slice(16,32),o)).replace("0x","")!==r.crypto.mac)throw new jze;const c=yield VVe(ri(r.crypto.ciphertext),s.slice(0,16),ri(r.crypto.cipherparams.iv));return Sj(c)});var HG=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};const VGe=1e3;class qGe{constructor(e){this._requestManager=e,this._requests=new Map}get requests(){return[...this._requests.values()].map(e=>e.payload)}add(e){const n=f1(e),r=new $8;return this._requests.set(n.id,{payload:n,promise:r}),r}execute(e){var n;return HG(this,void 0,void 0,function*(){if(this.requests.length===0)return Promise.resolve([]);const r=new $8({timeout:(n=e==null?void 0:e.timeout)!==null&&n!==void 0?n:VGe,eagerStart:!0,timeoutMessage:"Batch request timeout"});return this._processBatchRequest(r).catch(i=>r.reject(i)),r.catch(i=>{i instanceof xie&&this._abortAllRequests("Batch request timeout"),r.reject(i)}),r})}_processBatchRequest(e){var n,r;return HG(this,void 0,void 0,function*(){const i=yield this._requestManager.sendBatch([...this._requests.values()].map(a=>a.payload));if(i.length!==this._requests.size)throw this._abortAllRequests("Invalid batch response"),new zf(i,`Batch request size mismatch the results size. Requests: ${this._requests.size}, Responses: ${i.length}`);const s=this.requests.map(a=>a.id).map(Number).sort((a,c)=>a-c),o=i.map(a=>a.id).map(Number).sort((a,c)=>a-c);if(JSON.stringify(s)!==JSON.stringify(o))throw this._abortAllRequests("Invalid batch response"),new zf(i,`Batch request mismatch the results. Requests: [${s.join()}], Responses: [${o.join()}]`);for(const a of i)u0(a)?(n=this._requests.get(a.id))===null||n===void 0||n.promise.resolve(a.result):d0(a)&&((r=this._requests.get(a.id))===null||r===void 0||r.promise.reject(a.error));e.resolve(i)})}_abortAllRequests(e){for(const{promise:n}of this._requests.values())n.reject(new Yze(e))}}var GGe=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};class _a extends jVe{constructor(e){var n;if(super(),this.providers=Ag.providers,mn(e)||typeof e=="string"&&e.trim()!==""||j8(e)){this._requestManager=new Ag(e),this._subscriptionManager=new WO(this._requestManager,{});return}const{config:r,provider:i,requestManager:s,subscriptionManager:o,registeredSubscriptions:a,accountProvider:c,wallet:l,requestManagerMiddleware:u}=e;this.setConfig(r??{}),this._requestManager=s??new Ag(i,(n=r==null?void 0:r.enableExperimentalFeatures)===null||n===void 0?void 0:n.useSubscriptionWhenCheckingBlockTimeout,u),o?this._subscriptionManager=o:this._subscriptionManager=new WO(this.requestManager,a??{}),c&&(this._accountProvider=c),l&&(this._wallet=l)}get requestManager(){return this._requestManager}get subscriptionManager(){return this._subscriptionManager}get wallet(){return this._wallet}get accountProvider(){return this._accountProvider}static fromContextObject(...e){return new this(...e.reverse())}getContextObject(){var e;return{config:this.config,provider:this.provider,requestManager:this.requestManager,subscriptionManager:this.subscriptionManager,registeredSubscriptions:(e=this.subscriptionManager)===null||e===void 0?void 0:e.registeredSubscriptions,providers:this.providers,wallet:this.wallet,accountProvider:this.accountProvider}}use(e,...n){const r=new e(...n,this.getContextObject());return this.on(h1.CONFIG_CHANGE,i=>{r.setConfig({[i.name]:i.newValue})}),this[e.name]=r,r}link(e){this.setConfig(e.config),this._requestManager=e.requestManager,this.provider=e.provider,this._subscriptionManager=e.subscriptionManager,this._wallet=e.wallet,this._accountProvider=e._accountProvider,e.on(h1.CONFIG_CHANGE,n=>{this.setConfig({[n.name]:n.newValue})})}registerPlugin(e){if(this[e.pluginNamespace]!==void 0)throw new Qze(e.pluginNamespace);const n={[e.pluginNamespace]:e};n[e.pluginNamespace].link(this),Object.assign(this,n)}get provider(){return this.currentProvider}set provider(e){this.requestManager.setProvider(e)}get currentProvider(){return this.requestManager.provider}set currentProvider(e){this.requestManager.setProvider(e)}get givenProvider(){return _a.givenProvider}setProvider(e){return this.provider=e,!0}setRequestManagerMiddleware(e){this.requestManager.setMiddleware(e)}get BatchRequest(){return qGe.bind(void 0,this._requestManager)}extend(e){var n;return e.property&&!this[e.property]&&(this[e.property]={}),(n=e.methods)===null||n===void 0||n.forEach(r=>{const i=(...s)=>GGe(this,void 0,void 0,function*(){return this.requestManager.send({method:r.call,params:s})});e.property?this[e.property][r.name]=i:this[r.name]=i}),this}}_a.providers=Ag.providers;class rs{constructor(e){if(this.toAddress=()=>{if(this.isDirect()){const n=this._iban.slice(4),r=rs._parseInt(n,36),i=Wx(r,40);return Fd(i)}throw new Error("Iban is indirect and cannot be converted. Must be length of 34 or 35")},rs.isIndirect(e)||rs.isDirect(e))this._iban=e;else throw new Error("Invalid IBAN was provided")}static isDirect(e){return e.length===34||e.length===35}isDirect(){return rs.isDirect(this._iban)}static isIndirect(e){return e.length===20}isIndirect(){return rs.isIndirect(this._iban)}static isValid(e){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(e)&&rs._mod9710(rs._iso13616Prepare(e))===1}isValid(){return rs.isValid(this._iban)}static fromBban(e){const n="XE",i=`0${(98-this._mod9710(this._iso13616Prepare(`${n}00${e}`))).toString()}`.slice(-2);return new rs(`${n}${i}${e}`)}static createIndirect(e){return rs.fromBban(`ETH${e.institution}${e.identifier}`)}static fromAddress(e){if(!lc(e))throw new Z$(e);const r=BigInt(w4(e)).toString(36),i=Wx(r,15);return rs.fromBban(i.toUpperCase())}static toIban(e){return rs.fromAddress(e).toString()}client(){return this.isIndirect()?this._iban.slice(11):""}checksum(){return this._iban.slice(2,4)}institution(){return this.isIndirect()?this._iban.slice(7,11):""}toString(){return this._iban}}rs._iso13616Prepare=t=>{const r=t.toUpperCase();return`${r.slice(4)}${r.slice(0,4)}`.split("").map(s=>{const o=s.charCodeAt(0);return o>=65&&o<=90?o-65+10:s}).join("")};rs._parseInt=(t,e)=>[...t].reduce((n,r)=>BigInt(parseInt(r,e))+BigInt(e)*n,BigInt(0));rs._mod9710=t=>{let e=t,n;for(;e.length>2;)n=e.slice(0,9),e=`${(parseInt(n,10)%97).toString()}${e.slice(n.length)}`;return parseInt(e,10)%97};rs.toAddress=t=>new rs(t).toAddress();var oR=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})},Qse;class Zse extends X9{constructor(e){super(),this[Qse]="Promise",this._promise=new Promise(e)}then(e,n){return oR(this,void 0,void 0,function*(){return this._promise.then(e,n)})}catch(e){return oR(this,void 0,void 0,function*(){return this._promise.catch(e)})}finally(e){return oR(this,void 0,void 0,function*(){return this._promise.finally(e)})}on(e,n){return super.on(e,n),this}once(e,n){return super.once(e,n),this}}Qse=Symbol.toStringTag;(function(t,e){if(t.setImmediate)return;var n=1,r={},i=!1,s=t.document,o;function a(b){typeof b!="function"&&(b=new Function(""+b));for(var k=new Array(arguments.length-1),D=0;D<k.length;D++)k[D]=arguments[D+1];var O={callback:b,args:k};return r[n]=O,o(n),n++}function c(b){delete r[b]}function l(b){var k=b.callback,D=b.args;switch(D.length){case 0:k();break;case 1:k(D[0]);break;case 2:k(D[0],D[1]);break;case 3:k(D[0],D[1],D[2]);break;default:k.apply(e,D);break}}function u(b){if(i)setTimeout(u,0,b);else{var k=r[b];if(k){i=!0;try{l(k)}finally{c(b),i=!1}}}}function d(){o=function(b){process.nextTick(function(){u(b)})}}function h(){if(t.postMessage&&!t.importScripts){var b=!0,k=t.onmessage;return t.onmessage=function(){b=!1},t.postMessage("","*"),t.onmessage=k,b}}function g(){var b="setImmediate$"+Math.random()+"$",k=function(D){D.source===t&&typeof D.data=="string"&&D.data.indexOf(b)===0&&u(+D.data.slice(b.length))};t.addEventListener?t.addEventListener("message",k,!1):t.attachEvent("onmessage",k),o=function(D){t.postMessage(b+D,"*")}}function w(){var b=new MessageChannel;b.port1.onmessage=function(k){var D=k.data;u(D)},o=function(k){b.port2.postMessage(k)}}function v(){var b=s.documentElement;o=function(k){var D=s.createElement("script");D.onreadystatechange=function(){u(k),D.onreadystatechange=null,b.removeChild(D),D=null},b.appendChild(D)}}function _(){o=function(b){setTimeout(u,0,b)}}var T=Object.getPrototypeOf&&Object.getPrototypeOf(t);T=T&&T.setTimeout?T:t,{}.toString.call(t.process)==="[object process]"?d():h()?g():t.MessageChannel?w():s&&"onreadystatechange"in s.createElement("script")?v():_(),T.setImmediate=a,T.clearImmediate=c})(typeof self>"u"?Hr:self);var Mn=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};function KGe(t){return Mn(this,void 0,void 0,function*(){return t.send({method:"eth_protocolVersion",params:[]})})}function Jse(t){return Mn(this,void 0,void 0,function*(){return t.send({method:"eth_syncing",params:[]})})}function YGe(t){return Mn(this,void 0,void 0,function*(){return t.send({method:"eth_coinbase",params:[]})})}function QGe(t){return Mn(this,void 0,void 0,function*(){return t.send({method:"eth_mining",params:[]})})}function ZGe(t){return Mn(this,void 0,void 0,function*(){return t.send({method:"eth_hashrate",params:[]})})}function JGe(t){return Mn(this,void 0,void 0,function*(){return t.send({method:"eth_gasPrice",params:[]})})}function XGe(t){return Mn(this,void 0,void 0,function*(){return t.send({method:"eth_maxPriorityFeePerGas",params:[]})})}function eKe(t){return Mn(this,void 0,void 0,function*(){return t.send({method:"eth_accounts",params:[]})})}function tKe(t){return Mn(this,void 0,void 0,function*(){return t.send({method:"eth_blockNumber",params:[]})})}function nKe(t,e,n){return Mn(this,void 0,void 0,function*(){return yn.validate(["address","blockNumberOrTag"],[e,n]),t.send({method:"eth_getBalance",params:[e,n]})})}function rKe(t,e,n,r){return Mn(this,void 0,void 0,function*(){return yn.validate(["address","hex","blockNumberOrTag"],[e,n,r]),t.send({method:"eth_getStorageAt",params:[e,n,r]})})}function iKe(t,e,n){return Mn(this,void 0,void 0,function*(){return yn.validate(["address","blockNumberOrTag"],[e,n]),t.send({method:"eth_getTransactionCount",params:[e,n]})})}function sKe(t,e){return Mn(this,void 0,void 0,function*(){return yn.validate(["bytes32"],[e]),t.send({method:"eth_getBlockTransactionCountByHash",params:[e]})})}function oKe(t,e){return Mn(this,void 0,void 0,function*(){return yn.validate(["blockNumberOrTag"],[e]),t.send({method:"eth_getBlockTransactionCountByNumber",params:[e]})})}function aKe(t,e){return Mn(this,void 0,void 0,function*(){return yn.validate(["bytes32"],[e]),t.send({method:"eth_getUncleCountByBlockHash",params:[e]})})}function cKe(t,e){return Mn(this,void 0,void 0,function*(){return yn.validate(["blockNumberOrTag"],[e]),t.send({method:"eth_getUncleCountByBlockNumber",params:[e]})})}function lKe(t,e,n){return Mn(this,void 0,void 0,function*(){return yn.validate(["address","blockNumberOrTag"],[e,n]),t.send({method:"eth_getCode",params:[e,n]})})}function uKe(t,e,n){return Mn(this,void 0,void 0,function*(){return yn.validate(["address","hex"],[e,n]),t.send({method:"eth_sign",params:[e,n]})})}function dKe(t,e){return Mn(this,void 0,void 0,function*(){return t.send({method:"eth_signTransaction",params:[e]})})}function fKe(t,e){return Mn(this,void 0,void 0,function*(){return t.send({method:"eth_sendTransaction",params:[e]})})}function Xse(t,e){return Mn(this,void 0,void 0,function*(){return yn.validate(["hex"],[e]),t.send({method:"eth_sendRawTransaction",params:[e]})})}function hKe(t,e,n){return Mn(this,void 0,void 0,function*(){return yn.validate(["blockNumberOrTag"],[n]),t.send({method:"eth_call",params:[e,n]})})}function pKe(t,e,n){return Mn(this,void 0,void 0,function*(){return yn.validate(["blockNumberOrTag"],[n]),t.send({method:"eth_estimateGas",params:[e,n]})})}function mKe(t,e,n){return Mn(this,void 0,void 0,function*(){return yn.validate(["bytes32","bool"],[e,n]),t.send({method:"eth_getBlockByHash",params:[e,n]})})}function eoe(t,e,n){return Mn(this,void 0,void 0,function*(){return yn.validate(["blockNumberOrTag","bool"],[e,n]),t.send({method:"eth_getBlockByNumber",params:[e,n]})})}function gKe(t,e){return Mn(this,void 0,void 0,function*(){return yn.validate(["bytes32"],[e]),t.send({method:"eth_getTransactionByHash",params:[e]})})}function wKe(t,e,n){return Mn(this,void 0,void 0,function*(){return yn.validate(["bytes32","hex"],[e,n]),t.send({method:"eth_getTransactionByBlockHashAndIndex",params:[e,n]})})}function yKe(t,e,n){return Mn(this,void 0,void 0,function*(){return yn.validate(["blockNumberOrTag","hex"],[e,n]),t.send({method:"eth_getTransactionByBlockNumberAndIndex",params:[e,n]})})}function vKe(t,e){return Mn(this,void 0,void 0,function*(){return yn.validate(["bytes32"],[e]),t.send({method:"eth_getTransactionReceipt",params:[e]})})}function bKe(t,e,n){return Mn(this,void 0,void 0,function*(){return yn.validate(["bytes32","hex"],[e,n]),t.send({method:"eth_getUncleByBlockHashAndIndex",params:[e,n]})})}function xKe(t,e,n){return Mn(this,void 0,void 0,function*(){return yn.validate(["blockNumberOrTag","hex"],[e,n]),t.send({method:"eth_getUncleByBlockNumberAndIndex",params:[e,n]})})}function _Ke(t,e){return Mn(this,void 0,void 0,function*(){return yn.validate(["filter"],[e]),t.send({method:"eth_getLogs",params:[e]})})}function AKe(t){return Mn(this,void 0,void 0,function*(){return t.send({method:"eth_getWork",params:[]})})}function EKe(t,e,n,r){return Mn(this,void 0,void 0,function*(){return yn.validate(["bytes8","bytes32","bytes32"],[e,n,r]),t.send({method:"eth_submitWork",params:[e,n,r]})})}function CKe(t,e,n,r){return Mn(this,void 0,void 0,function*(){yn.validate(["hex","blockNumberOrTag"],[e,n]);for(const i of r)yn.validate(["number"],[i]);return t.send({method:"eth_feeHistory",params:[e,n,r]})})}function SKe(t){return Mn(this,void 0,void 0,function*(){return t.send({method:"eth_pendingTransactions",params:[]})})}function TKe(t){return Mn(this,void 0,void 0,function*(){return t.send({method:"eth_requestAccounts",params:[]})})}function IKe(t){return Mn(this,void 0,void 0,function*(){return t.send({method:"eth_chainId",params:[]})})}function kKe(t,e,n,r){return Mn(this,void 0,void 0,function*(){return yn.validate(["address","bytes32[]","blockNumberOrTag"],[e,n,r]),t.send({method:"eth_getProof",params:[e,n,r]})})}function RKe(t){return Mn(this,void 0,void 0,function*(){return t.send({method:"web3_clientVersion",params:[]})})}function NKe(t,e,n){return Mn(this,void 0,void 0,function*(){return yn.validate(["blockNumberOrTag"],[n]),t.send({method:"eth_createAccessList",params:[e,n]})})}function PKe(t,e,n,r=!1){return Mn(this,void 0,void 0,function*(){return yn.validate(["address"],[e]),t.send({method:`eth_signTypedData${r?"":"_v4"}`,params:[e,n]})})}var Tj=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};function OKe(t){return Tj(this,void 0,void 0,function*(){return t.send({method:"net_version",params:[]})})}function DKe(t){return Tj(this,void 0,void 0,function*(){return t.send({method:"net_peerCount",params:[]})})}function MKe(t){return Tj(this,void 0,void 0,function*(){return t.send({method:"net_listening",params:[]})})}var jh=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};const BKe=t=>jh(void 0,void 0,void 0,function*(){return t.send({method:"personal_listAccounts",params:[]})}),$Ke=(t,e)=>jh(void 0,void 0,void 0,function*(){return t.send({method:"personal_newAccount",params:[e]})}),jKe=(t,e,n,r)=>jh(void 0,void 0,void 0,function*(){return t.send({method:"personal_unlockAccount",params:[e,n,r]})}),LKe=(t,e)=>jh(void 0,void 0,void 0,function*(){return t.send({method:"personal_lockAccount",params:[e]})}),UKe=(t,e,n)=>jh(void 0,void 0,void 0,function*(){return t.send({method:"personal_importRawKey",params:[e,n]})}),FKe=(t,e,n)=>jh(void 0,void 0,void 0,function*(){return t.send({method:"personal_sendTransaction",params:[e,n]})}),zKe=(t,e,n)=>jh(void 0,void 0,void 0,function*(){return t.send({method:"personal_signTransaction",params:[e,n]})}),HKe=(t,e,n,r)=>jh(void 0,void 0,void 0,function*(){return t.send({method:"personal_sign",params:[e,n,r]})}),WKe=(t,e,n)=>jh(void 0,void 0,void 0,function*(){return t.send({method:"personal_ecRecover",params:[e,n]})}),WG={type:"object",properties:{accessList:{type:"null"},maxFeePerGas:{type:"null"},maxPriorityFeePerGas:{type:"null"}}},VG={type:"object",properties:{maxFeePerGas:{type:"null"},maxPriorityFeePerGas:{type:"null"}}},qG={type:"object",properties:{gasPrice:{type:"null"}}},bA=(t,e,n)=>{try{yn.validateJSONSchema(t,e)}catch(r){throw r instanceof Zv?new AHe(r.errors,n):r}},VKe=t=>{var e,n;const r=t;if(!$e(r.type)){let s;switch(r.type){case"0x0":s=WG;break;case"0x1":s=VG;break;case"0x2":s=qG;break;default:return et({format:"uint"},r.type,_n)}return bA(s,r,r.type),et({format:"uint"},r.type,_n)}if(!$e(r.maxFeePerGas)||!$e(r.maxPriorityFeePerGas))return bA(qG,r,"0x2"),"0x2";if(!$e(r.accessList))return bA(VG,r,"0x1"),"0x1";const i=(e=r.hardfork)!==null&&e!==void 0?e:(n=r.common)===null||n===void 0?void 0:n.hardfork;if(!$e(i)){const s=Object.keys(U3).indexOf(i);if(s>=Object.keys(U3).indexOf("london"))return $e(r.gasPrice)?"0x2":"0x0";if(s===Object.keys(U3).indexOf("berlin"))return"0x0"}if(!$e(r.gasPrice))return bA(WG,r,"0x0"),"0x0"},qKe=(t,e)=>{var n;return((n=e==null?void 0:e.transactionTypeParser)!==null&&n!==void 0?n:VKe)(t)},GKe=t=>t[0]>127?"0x0":Ih(t[0]),KKe={type:"object",properties:{address:{format:"address"},storageKeys:{type:"array",items:{format:"bytes32"}}}},Ij={type:"array",items:Object.assign({},KKe)},YKe={type:"object",properties:{accessList:Object.assign({},Ij),gasUsed:{type:"string"}}},GG={type:"string",enum:["goerli","kovan","mainnet","rinkeby","ropsten","sepolia"]},KG={type:"string",enum:["arrowGlacier","berlin","byzantium","chainstart","constantinople","dao","homestead","istanbul","london","merge","muirGlacier","petersburg","shanghai","spuriousDragon","tangerineWhistle"]},QKe={type:"object",properties:{name:{format:"string"},networkId:{format:"uint"},chainId:{format:"uint"}}},toe={type:"object",properties:{from:{format:"address"},to:{oneOf:[{format:"address"},{type:"null"}]},value:{format:"uint"},gas:{format:"uint"},gasPrice:{format:"uint"},effectiveGasPrice:{format:"uint"},type:{format:"uint"},maxFeePerGas:{format:"uint"},maxPriorityFeePerGas:{format:"uint"},accessList:Object.assign({},Ij),data:{format:"bytes"},input:{format:"bytes"},nonce:{format:"uint"},chain:Object.assign({},GG),hardfork:Object.assign({},KG),chainId:{format:"uint"},networkId:{format:"uint"},common:{type:"object",properties:{customChain:Object.assign({},QKe),baseChain:Object.assign({},GG),hardfork:Object.assign({},KG)}},gasLimit:{format:"uint"},v:{format:"uint"},r:{format:"bytes32"},s:{format:"bytes32"}}},tD={type:"object",properties:Object.assign(Object.assign({},toe.properties),{blockHash:{format:"bytes32"},blockNumber:{format:"uint"},hash:{format:"bytes32"},transactionIndex:{format:"uint"},from:{format:"address"},to:{oneOf:[{format:"address"},{type:"null"}]},value:{format:"uint"},gas:{format:"uint"},gasPrice:{format:"uint"},effectiveGasPrice:{format:"uint"},type:{format:"uint"},maxFeePerGas:{format:"uint"},maxPriorityFeePerGas:{format:"uint"},accessList:Object.assign({},Ij),data:{format:"bytes"},input:{format:"bytes"},nonce:{format:"uint"},gasLimit:{format:"uint"},v:{format:"uint"},r:{format:"bytes32"},s:{format:"bytes32"}})},noe={type:"object",properties:{index:{format:"uint"},validatorIndex:{format:"uint"},address:{format:"address"},amount:{format:"uint"}}},H8={type:"object",properties:{baseFeePerGas:{format:"uint"},blobGasUsed:{format:"uint"},difficulty:{format:"uint"},excessBlobGas:{format:"uint"},extraData:{format:"bytes"},gasLimit:{format:"uint"},gasUsed:{format:"uint"},hash:{format:"bytes32"},logsBloom:{format:"bytes256"},miner:{format:"bytes"},mixHash:{format:"bytes32"},nonce:{format:"uint"},number:{format:"uint"},parentBeaconBlockRoot:{format:"bytes32"},parentHash:{format:"bytes32"},receiptsRoot:{format:"bytes32"},sha3Uncles:{format:"bytes32"},size:{format:"uint"},stateRoot:{format:"bytes32"},timestamp:{format:"uint"},totalDifficulty:{format:"uint"},transactions:{oneOf:[{type:"array",items:Object.assign({},tD)},{type:"array",items:{format:"bytes32"}}]},transactionsRoot:{format:"bytes32"},uncles:{type:"array",items:{format:"bytes32"}},withdrawals:{type:"array",items:Object.assign({},noe)},withdrawalsRoot:{format:"bytes32"}}},ZKe={type:"object",properties:{author:{format:"bytes32"},excessDataGas:{format:"uint"},baseFeePerGas:{format:"uint"},blobGasUsed:{format:"uint"},difficulty:{format:"uint"},excessBlobGas:{format:"uint"},extraData:{format:"bytes"},gasLimit:{format:"uint"},gasUsed:{format:"uint"},hash:{format:"bytes32"},logsBloom:{format:"bytes256"},miner:{format:"bytes"},mixHash:{format:"bytes32"},nonce:{format:"uint"},number:{format:"uint"},parentBeaconBlockRoot:{format:"bytes32"},parentHash:{format:"bytes32"},receiptsRoot:{format:"bytes32"},sha3Uncles:{format:"bytes32"},size:{format:"uint"},stateRoot:{format:"bytes32"},timestamp:{format:"uint"},totalDifficulty:{format:"uint"},transactions:{type:"array",items:{format:"bytes32"}},transactionsRoot:{format:"bytes32"},uncles:{type:"array",items:{format:"bytes32"}},withdrawals:{type:"array",items:Object.assign({},noe)},withdrawalsRoot:{format:"bytes32"}}},iT={type:"object",properties:{removed:{format:"bool"},logIndex:{format:"uint"},transactionIndex:{format:"uint"},transactionHash:{format:"bytes32"},blockHash:{format:"bytes32"},blockNumber:{format:"uint"},address:{format:"address"},data:{format:"bytes"},topics:{type:"array",items:{format:"bytes32"}}}},JKe={type:"object",properties:{startingBlock:{format:"string"},currentBlock:{format:"string"},highestBlock:{format:"string"},knownStates:{format:"string"},pulledStates:{format:"string"}}},Wb={type:"object",properties:{transactionHash:{format:"bytes32"},transactionIndex:{format:"uint"},blockHash:{format:"bytes32"},blockNumber:{format:"uint"},from:{format:"address"},to:{format:"address"},cumulativeGasUsed:{format:"uint"},gasUsed:{format:"uint"},effectiveGasPrice:{format:"uint"},contractAddress:{format:"address"},logs:{type:"array",items:Object.assign({},iT)},logsBloom:{format:"bytes"},root:{format:"bytes"},status:{format:"uint"},type:{format:"uint"}}},XKe={type:"object",properties:{messageHash:{format:"bytes"},r:{format:"bytes32"},s:{format:"bytes32"},v:{format:"bytes"},message:{format:"bytes"},signature:{format:"bytes"}}},eYe={type:"object",properties:{oldestBlock:{format:"uint"},baseFeePerGas:{type:"array",items:{format:"uint"}},reward:{type:"array",items:{type:"array",items:{format:"uint"}}},gasUsedRatio:{type:"array",items:{type:"number"}}}},tYe={type:"object",properties:{key:{format:"bytes32"},value:{format:"uint"},proof:{type:"array",items:{format:"bytes32"}}}},nYe={type:"object",properties:{balance:{format:"uint"},codeHash:{format:"bytes32"},nonce:{format:"uint"},storageHash:{format:"bytes32"},accountProof:{type:"array",items:{format:"bytes32"}},storageProof:{type:"array",items:Object.assign({},tYe)}}};function Da(t,e=Ia,n={transactionSchema:tD,fillInputAndData:!1}){var r,i;let s=im({},t);if($e(t==null?void 0:t.common)||(s.common=Object.assign({},t.common),$e((r=t.common)===null||r===void 0?void 0:r.customChain)||(s.common.customChain=Object.assign({},t.common.customChain))),s=et((i=n.transactionSchema)!==null&&i!==void 0?i:tD,s,e),!$e(s.data)&&!$e(s.input)&&Ih(s.data)!==Ih(s.input))throw new Cie({data:Kn(s.data),input:Kn(s.input)});return n.fillInputAndData&&($e(s.data)?$e(s.input)||(s.data=s.input):s.input=s.data),$e(s.gasLimit)||(s.gas=s.gasLimit,delete s.gasLimit),s}function rYe(t,e,n={fillInputAndData:!1}){return{raw:et({format:"bytes"},t,e),tx:Da(Object.assign(Object.assign({},m1.fromSerializedData(ri(t)).toJSON()),{hash:Kn(eb(ri(t))),type:GKe(ri(t))}),e,{fillInputAndData:n.fillInputAndData})}}var kj=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};function Rj(t,e){return kj(this,void 0,void 0,function*(){const n=yield OKe(t.requestManager);return et({format:"uint"},n,e)})}function iYe(t,e){return kj(this,void 0,void 0,function*(){const n=yield DKe(t.requestManager);return et({format:"uint"},n,e)})}const sYe=t=>kj(void 0,void 0,void 0,function*(){return MKe(t.requestManager)});var aR=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};class roe extends _a{getId(e=this.defaultReturnFormat){return aR(this,void 0,void 0,function*(){return Rj(this,e)})}getPeerCount(e=this.defaultReturnFormat){return aR(this,void 0,void 0,function*(){return iYe(this,e)})}isListening(){return aR(this,void 0,void 0,function*(){return sYe(this)})}}const ob="ALLEVENTS",nD={name:ob,signature:"",type:"event",inputs:[]},sT={bytes:Ch.HEX,number:ul.NUMBER};var ioe=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};function oYe(t,e,n){var r,i,s,o;return ioe(this,void 0,void 0,function*(){const a=yield Ooe(e,e.defaultBlock,!1,_n);if($e(a.baseFeePerGas))throw new vHe;let c;if($e(t.gasPrice)&&BigInt(a.baseFeePerGas)===BigInt(0)&&(c=yield Lj(e,n)),!$e(t.gasPrice)||!$e(c)){const l=et({format:"uint"},(r=t.gasPrice)!==null&&r!==void 0?r:c,n);return{maxPriorityFeePerGas:l,maxFeePerGas:l}}return{maxPriorityFeePerGas:et({format:"uint"},(i=t.maxPriorityFeePerGas)!==null&&i!==void 0?i:e.defaultMaxPriorityFeePerGas,n),maxFeePerGas:et({format:"uint"},(s=t.maxFeePerGas)!==null&&s!==void 0?s:BigInt(a.baseFeePerGas)*BigInt(2)+BigInt((o=t.maxPriorityFeePerGas)!==null&&o!==void 0?o:e.defaultMaxPriorityFeePerGas),n)}})}function soe(t,e,n){return ioe(this,void 0,void 0,function*(){const r=ooe(t,e);if(!$e(r)){if(r.startsWith("-"))throw new fG(r);if(Number(r)<0||Number(r)>127)throw new fG(r);if($e(t.gasPrice)&&(r==="0x0"||r==="0x1"))return{gasPrice:yield Lj(e,n),maxPriorityFeePerGas:void 0,maxFeePerGas:void 0};if(r==="0x2")return Object.assign({gasPrice:void 0},yield oYe(t,e,n))}})}var Nj=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};const rD=(t,e,n,r)=>{if(n!==void 0&&t in n&&n[t]!==void 0){if(typeof n[t]=="string"&&lc(n[t]))return n[t];if(!Rr(n[t])&&Yie(n[t])){if(e.wallet){const i=e.wallet.get(et({format:"uint"},n[t],sT));if(!$e(i))return i.address;throw new hG}throw new hG}else throw t==="from"?new eHe(n.from):new tHe(n.to)}if(t==="from"){if(!$e(r))return rT(r);if(!$e(e.defaultAccount))return e.defaultAccount}},aYe=(t,e,n=t.defaultReturnFormat)=>Nj(void 0,void 0,void 0,function*(){if($e(e))throw new yHe;return Moe(t,e,t.defaultBlock,n)}),ooe=(t,e)=>{const n=qKe(t,e);if(!$e(n))return n;if(!$e(e.defaultTransactionType))return et({format:"uint"},e.defaultTransactionType,_n)};function cYe(t){var e,n;return Nj(this,void 0,void 0,function*(){let r=et(toe,t.transaction,t.web3Context.defaultReturnFormat);if($e(r.from)&&(r.from=rD("from",t.web3Context,void 0,t.privateKey)),$e(r.nonce)&&(r.nonce=yield aYe(t.web3Context,r.from,_n)),$e(r.value)&&(r.value="0x0"),$e(r.data))$e(r.input)?r.input="0x":r.input.startsWith("0x")||(r.input=`0x${r.input}`);else{if(!$e(r.input)&&r.data!==r.input)throw new Cie({data:Kn(r.data),input:Kn(r.input)});r.data.startsWith("0x")||(r.data=`0x${r.data}`)}if($e(r.common)){if(t.web3Context.defaultCommon){const i=t.web3Context.defaultCommon,s=i.customChain.chainId,o=i.customChain.networkId,a=i.customChain.name;r.common=Object.assign(Object.assign({},i),{customChain:{chainId:s,networkId:o,name:a}})}$e(r.chain)&&(r.chain=t.web3Context.defaultChain),$e(r.hardfork)&&(r.hardfork=t.web3Context.defaultHardfork)}if($e(r.chainId)&&$e((e=r.common)===null||e===void 0?void 0:e.customChain.chainId)&&(r.chainId=yield $oe(t.web3Context,_n)),$e(r.networkId)&&(r.networkId=(n=t.web3Context.defaultNetworkId)!==null&&n!==void 0?n:yield Rj(t.web3Context,_n)),$e(r.gasLimit)&&!$e(r.gas)&&(r.gasLimit=r.gas),r.type=ooe(r,t.web3Context),$e(r.accessList)&&(r.type==="0x1"||r.type==="0x2")&&(r.accessList=[]),t.fillGasPrice&&(r=Object.assign(Object.assign({},r),yield soe(r,t.web3Context,_n))),$e(r.gas)&&$e(r.gasLimit)&&t.fillGasLimit){const i=yield zj(t.web3Context,r,"latest",_n);r=Object.assign(Object.assign({},r),{gas:et({format:"uint"},i,_n)})}return r})}const lYe=t=>Nj(void 0,void 0,void 0,function*(){var e;return((e=t.web3Context.transactionBuilder)!==null&&e!==void 0?e:cYe)(Object.assign(Object.assign({},t),{transaction:t.transaction}))});var Pj=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};function iD(t,e,n){const r=t.transactionPollingInterval,[i,s]=cse(()=>Pj(this,void 0,void 0,function*(){let a;try{a=yield Uj(t,sT)}catch(l){console.warn("An error happen while trying to get the block number",l);return}const c=a-e;if(c>=t.transactionBlockTimeout)return new Iie({starterBlockNumber:e,numberOfBlocks:c,transactionHash:n})}),r);return[s,{clean:()=>{clearInterval(i)}}]}function uYe(t,e,n){var r;return Pj(this,void 0,void 0,function*(){let i=!0,s,o;function a(l,u){u&&console.warn("error happened at subscription. So revert to polling...",u),o.clean(),i=!1;const[d,h]=iD(t,e,n);o.clean=h.clean,d.catch(g=>l(g))}try{s=yield(r=t.subscriptionManager)===null||r===void 0?void 0:r.subscribe("newHeads"),o={clean:()=>{var l;s.id&&((l=t.subscriptionManager)===null||l===void 0||l.removeSubscription(s).then(()=>{}).catch(()=>{}))}}}catch{return iD(t,e,n)}return[new Promise((l,u)=>{try{s.on("data",d=>{if(i=!1,!(d!=null&&d.number))return;const h=Number(BigInt(d.number)-BigInt(e));h>=t.transactionBlockTimeout&&u(new Iie({starterBlockNumber:e,numberOfBlocks:h,transactionHash:n}))}),s.on("error",d=>{a(u,d)})}catch(d){a(u,d)}setTimeout(()=>{i&&a(u)},t.blockHeaderTimeout*1e3)}),o]})}function aoe(t,e){var n,r;return Pj(this,void 0,void 0,function*(){const{provider:i}=t.requestManager;let s;const o=yield Uj(t,sT);return!((r=(n=i).supportsSubscriptions)===null||r===void 0)&&r.call(n)&&t.enableExperimentalFeatures.useSubscriptionWhenCheckingBlockTimeout?s=yield uYe(t,o,e):s=iD(t,o,e),s})}var dYe=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};function sD(t,e,n){return dYe(this,void 0,void 0,function*(){const[r,i]=lj(t.transactionSendTimeout,new bHe({numberOfSeconds:t.transactionSendTimeout/1e3,transactionHash:n})),[s,o]=yield aoe(t,n);try{return yield Promise.race([e(),i,s])}finally{clearTimeout(r),o.clean()}})}var YG=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};function coe(t,e,n,r){var i;return YG(this,void 0,void 0,function*(){const s=(i=t.transactionReceiptPollingInterval)!==null&&i!==void 0?i:t.transactionPollingInterval,[o,a]=cj(()=>YG(this,void 0,void 0,function*(){try{return(r??Doe)(t,e,n)}catch(h){console.warn("An error happen while trying to get the transaction receipt",h);return}}),s),[c,l]=lj(t.transactionPollingTimeout,new Tie({numberOfSeconds:t.transactionPollingTimeout/1e3,transactionHash:e})),[u,d]=yield aoe(t,e);try{return yield Promise.race([o,l,u])}finally{c&&clearTimeout(c),a&&clearInterval(a),d.clean()}})}var fYe=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};const cE=({web3Context:t,transactionReceipt:e,transactionPromiEvent:n,customTransactionReceiptSchema:r,returnFormat:i})=>{var s;let o=1;const a=setInterval(()=>{fYe(void 0,void 0,void 0,function*(){if(o>=t.transactionConfirmationBlocks){clearInterval(a);return}const c=yield eoe(t.requestManager,ba(BigInt(e.blockNumber)+BigInt(o)),!1);c!=null&&c.hash&&(o+=1,n.emit("confirmation",{confirmations:et({format:"uint"},o,i),receipt:et(r??Wb,e,i),latestBlockHash:et({format:"bytes32"},c.hash,i)}))})},(s=t.transactionReceiptPollingInterval)!==null&&s!==void 0?s:t.transactionPollingInterval)};var QG=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};const hYe=({web3Context:t,transactionReceipt:e,transactionPromiEvent:n,customTransactionReceiptSchema:r,returnFormat:i})=>{let s=!0,o;setImmediate(()=>{var a;(a=t.subscriptionManager)===null||a===void 0||a.subscribe("newHeads").then(c=>{c.on("data",l=>QG(void 0,void 0,void 0,function*(){var u;if(s=!1,!(l!=null&&l.number)||o===(l==null?void 0:l.parentHash))return;o=l==null?void 0:l.parentHash;const d=BigInt(l.number)-BigInt(e.blockNumber)+BigInt(1);n.emit("confirmation",{confirmations:et({format:"uint"},d,i),receipt:et(r??Wb,e,i),latestBlockHash:et({format:"bytes32"},l.parentHash,i)}),d>=t.transactionConfirmationBlocks&&(yield(u=t.subscriptionManager)===null||u===void 0?void 0:u.removeSubscription(c))})),c.on("error",()=>QG(void 0,void 0,void 0,function*(){var l;yield(l=t.subscriptionManager)===null||l===void 0?void 0:l.removeSubscription(c),s=!1,cE({web3Context:t,transactionReceipt:e,transactionPromiEvent:n,customTransactionReceiptSchema:r,returnFormat:i})}))}).catch(()=>{s=!1,cE({web3Context:t,transactionReceipt:e,customTransactionReceiptSchema:r,transactionPromiEvent:n,returnFormat:i})})}),setTimeout(()=>{s&&cE({web3Context:t,transactionReceipt:e,transactionPromiEvent:n,returnFormat:i})},t.blockHeaderTimeout*1e3)};function pYe(t,e,n,r,i,s){if($e(n)||$e(n.blockHash))throw new xHe({receipt:n,blockHash:et({format:"bytes32"},n==null?void 0:n.blockHash,i),transactionHash:et({format:"bytes32"},r,i)});if(!n.blockNumber)throw new _He({receipt:n});e.emit("confirmation",{confirmations:et({format:"uint"},1,i),receipt:et(s??Wb,n,i),latestBlockHash:et({format:"bytes32"},n.blockHash,i)});const o=t.requestManager.provider;o&&"supportsSubscriptions"in o&&o.supportsSubscriptions()?hYe({web3Context:t,transactionReceipt:n,transactionPromiEvent:e,customTransactionReceiptSchema:s,returnFormat:i}):cE({web3Context:t,transactionReceipt:n,transactionPromiEvent:e,customTransactionReceiptSchema:s,returnFormat:i})}const oT=t=>!mn(t)&&typeof t=="object"&&!mn(t.type)&&t.type==="error",Oj=t=>!mn(t)&&typeof t=="object"&&!mn(t.type)&&t.type==="event",aT=t=>!mn(t)&&typeof t=="object"&&!mn(t.type)&&t.type==="function",mYe=t=>!mn(t)&&typeof t=="object"&&!mn(t.type)&&t.type==="constructor",gYe=t=>typeof t=="object"&&typeof t.components>"u"&&typeof t.name>"u",loe=t=>t.includes("[]")?{type:"tuple[]",name:t.slice(0,-2)}:{type:"tuple",name:t},uoe=t=>{const e=[];for(const n of Object.keys(t)){const r=t[n];typeof r=="object"?e.push(Object.assign(Object.assign({},loe(n)),{components:uoe(r)})):e.push({name:n,type:t[n]})}return e},oD=(t,e)=>{const n=[];return e.forEach(r=>{if(typeof r.components=="object"){if(!r.type.startsWith("tuple"))throw new sr(`Invalid value given "${r.type}". Error: components found but type is not tuple.`);const i=r.type.indexOf("["),s=i>=0?r.type.substring(i):"",o=oD(t,r.components);Array.isArray(o)&&t?n.push(`tuple(${o.join(",")})${s}`):n.push(`(${o.join(",")})${s}`)}else n.push(r.type)}),n},Gf=t=>{var e,n,r,i;return oT(t)||Oj(t)||aT(t)?!((e=t.name)===null||e===void 0)&&e.includes("(")?t.name:`${(n=t.name)!==null&&n!==void 0?n:""}(${oD(!1,(r=t.inputs)!==null&&r!==void 0?r:[]).join(",")})`:`(${oD(!1,(i=t.inputs)!==null&&i!==void 0?i:[]).join(",")})`},wYe=t=>{if(typeof t!="string"&&!oT(t))throw new sr("Invalid parameter value in encodeErrorSignature");let e;return t&&(typeof t=="function"||typeof t=="object")?e=Gf(t):e=t,uc(e)},Dj=t=>{if(typeof t!="string"&&!Oj(t))throw new sr("Invalid parameter value in encodeEventSignature");let e;return t&&(typeof t=="function"||typeof t=="object")?e=Gf(t):e=t,uc(e)};function Mj(t,e){const n=t.exec(e);return n==null?void 0:n.groups}var doe=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,foe=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,hoe=/^\(.+?\).*?$/,yYe=Object.defineProperty,vYe=(t,e,n)=>e in t?yYe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,q2=(t,e,n)=>(vYe(t,typeof e!="symbol"?e+"":e,n),n),bYe="abitype",xYe="0.7.1",wa=class extends Error{constructor(t,e={}){var s;const n=e.cause instanceof wa?e.cause.details:(s=e.cause)!=null&&s.message?e.cause.message:e.details,r=e.cause instanceof wa&&e.cause.docsPath||e.docsPath,i=[t||"An error occurred.","",...e.metaMessages?[...e.metaMessages,""]:[],...r?[`Docs: https://abitype.dev${r}`]:[],...n?[`Details: ${n}`]:[],`Version: ${bYe}@${xYe}`].join(`
`);super(i),q2(this,"details"),q2(this,"docsPath"),q2(this,"metaMessages"),q2(this,"shortMessage"),q2(this,"name","AbiTypeError"),e.cause&&(this.cause=e.cause),this.details=n,this.docsPath=r,this.metaMessages=e.metaMessages,this.shortMessage=t}},poe=/^struct (?<name>[a-zA-Z0-9_]+) \{(?<properties>.*?)\}$/;function moe(t){return poe.test(t)}function _Ye(t){return Mj(poe,t)}var ZG=new Set(["memory","indexed","storage","calldata"]),AYe=new Set(["calldata","memory","storage"]);function EYe(t,e){return e?`${e}:${t}`:t}var cR=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]),CYe=/^(?<type>[a-zA-Z0-9_]+?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z0-9_]+))?$/,SYe=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z0-9_]+))?$/,TYe=/^u?int$/;function W8(t,e){var d,h;const n=EYe(t,e==null?void 0:e.type);if(cR.has(n))return cR.get(n);const r=hoe.test(t),i=Mj(r?SYe:CYe,t);if(!i)throw new wa("Invalid ABI parameter.",{details:t});if(i.name&&kYe(i.name))throw new wa("Invalid ABI parameter.",{details:t,metaMessages:[`"${i.name}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]});const s=i.name?{name:i.name}:{},o=i.modifier==="indexed"?{indexed:!0}:{},a=(e==null?void 0:e.structs)??{};let c,l={};if(r){c="tuple";const g=Kw(i.type),w=[],v=g.length;for(let _=0;_<v;_++)w.push(W8(g[_],{structs:a}));l={components:w}}else if(i.type in a)c="tuple",l={components:a[i.type]};else if(TYe.test(i.type))c=`${i.type}256`;else if(c=i.type,(e==null?void 0:e.type)!=="struct"&&!goe(c))throw new wa("Unknown type.",{metaMessages:[`Type "${c}" is not a valid ABI type.`]});if(i.modifier){if(!((h=(d=e==null?void 0:e.modifiers)==null?void 0:d.has)!=null&&h.call(d,i.modifier)))throw new wa("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${i.modifier}" not allowed${e!=null&&e.type?` in "${e.type}" type`:""}.`]});if(AYe.has(i.modifier)&&!RYe(c,!!i.array))throw new wa("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${i.modifier}" not allowed${e!=null&&e.type?` in "${e.type}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${i.modifier}" was given.`]})}const u={type:`${c}${i.array??""}`,...s,...o,...l};return cR.set(n,u),u}function Kw(t,e=[],n="",r=0){if(t===""){if(n==="")return e;if(r!==0)throw new wa("Unbalanced parentheses.",{metaMessages:[`"${n.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`});return[...e,n.trim()]}const i=t.length;for(let s=0;s<i;s++){const o=t[s],a=t.slice(s+1);switch(o){case",":return r===0?Kw(a,[...e,n.trim()]):Kw(a,e,`${n}${o}`,r);case"(":return Kw(a,e,`${n}${o}`,r+1);case")":return Kw(a,e,`${n}${o}`,r-1);default:return Kw(a,e,`${n}${o}`,r)}}return[]}function goe(t){return t==="address"||t==="bool"||t==="function"||t==="string"||doe.test(t)||foe.test(t)}var IYe=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function kYe(t){return t==="address"||t==="bool"||t==="function"||t==="string"||t==="tuple"||doe.test(t)||foe.test(t)||IYe.test(t)}function RYe(t,e){return e||t==="bytes"||t==="string"||t==="tuple"}function NYe(t){const e={},n=t.length;for(let o=0;o<n;o++){const a=t[o];if(!moe(a))continue;const c=_Ye(a);if(!c)throw new wa("Invalid struct signature.",{details:a});const l=c.properties.split(";"),u=[],d=l.length;for(let h=0;h<d;h++){const w=l[h].trim();if(!w)continue;const v=W8(w,{type:"struct"});u.push(v)}if(!u.length)throw new wa("Invalid struct signature.",{details:a,metaMessages:["No properties exist."]});e[c.name]=u}const r={},i=Object.entries(e),s=i.length;for(let o=0;o<s;o++){const[a,c]=i[o];r[a]=woe(c,e)}return r}var PYe=/^(?<type>[a-zA-Z0-9_]+?)(?<array>(?:\[\d*?\])+?)?$/;function woe(t,e,n=new Set){const r=[],i=t.length;for(let s=0;s<i;s++){const o=t[s];if(hoe.test(o.type))r.push(o);else{const c=Mj(PYe,o.type);if(!(c!=null&&c.type))throw new wa("Invalid ABI parameter.",{details:JSON.stringify(o,null,2),metaMessages:["ABI parameter type is invalid."]});const{array:l,type:u}=c;if(u in e){if(n.has(u))throw new wa("Circular reference detected.",{metaMessages:[`Struct "${u}" is a circular reference.`]});r.push({...o,type:`tuple${l??""}`,components:woe(e[u]??[],e,new Set([...n,u]))})}else if(goe(u))r.push(o);else throw new wa("Unknown type.",{metaMessages:[`Type "${u}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]})}}return r}function OYe(t){let e;if(typeof t=="string")e=W8(t,{modifiers:ZG});else{const n=NYe(t),r=t.length;for(let i=0;i<r;i++){const s=t[i];if(!moe(s)){e=W8(s,{modifiers:ZG,structs:n});break}}}if(!e)throw new wa("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(t,null,2)})`,docsPath:"/api/human.html#parseabiparameter-1"});return e}const Mi=32;function aD(t=0){var e;if(((e=globalThis.Buffer)===null||e===void 0?void 0:e.alloc)!==void 0){const n=globalThis.Buffer.alloc(t);return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}return new Uint8Array(t)}function yoe(t){var e,n;return Object.assign(Object.assign({},t),{name:(e=t.name)!==null&&e!==void 0?e:"",components:(n=t.components)===null||n===void 0?void 0:n.map(r=>yoe(r))})}function DYe(t){return!mn(t)&&typeof t=="object"&&!mn(t.type)&&typeof t.type=="string"}function voe(t){return t.map(e=>{var n;if(DYe(e))return e;if(typeof e=="string")return yoe(OYe(e.replace(/tuple/,"")));if(gYe(e)){const r=Object.keys(e)[0],i=loe(r);return i.name=(n=i.name)!==null&&n!==void 0?n:"",Object.assign(Object.assign({},i),{components:uoe(e[r])})}throw new sr("Invalid abi")})}function Bj(t){const e=t.type.lastIndexOf("["),n=t.type.substring(0,e),r=t.type.substring(e);let i=-1;if(r!=="[]"&&(i=Number(r.slice(1,-1)),isNaN(i)))throw new sr("Invalid fixed array size",{size:r});return{param:{type:n,name:"",components:t.components},size:i}}function V8(t){var e,n;return t.type==="string"||t.type==="bytes"||t.type.endsWith("[]")?!0:t.type==="tuple"?(n=(e=t.components)===null||e===void 0?void 0:e.some(V8))!==null&&n!==void 0?n:!1:t.type.endsWith("]")?V8(Bj(t).param):!1}const boe=20,xoe=Mi-boe;function MYe(t,e){if(typeof e!="string")throw new sr("address type expects string as input type",{value:e,name:t.name,type:t.type});let n=e.toLowerCase();if(n.startsWith("0x")||(n=`0x${n}`),!lc(n))throw new sr("provided input is not valid address",{value:e,name:t.name,type:t.type});const r=j1(n),i=aD(Mi);return i.set(r,xoe),{dynamic:!1,encoded:i}}function BYe(t,e){const n=e.subarray(xoe,Mi);if(n.length!==boe)throw new sr("Invalid decoding input, not enough bytes to decode address",{bytes:e});const r=Bh(n);return{result:Fd(r),encoded:e.subarray(Mi),consumed:Mi}}const D0=new Map;let xA=BigInt(256);for(let t=8;t<=256;t+=8)D0.set(`uint${t}`,{min:BigInt(0),max:xA-BigInt(1)}),D0.set(`int${t}`,{min:-xA/BigInt(2),max:xA/BigInt(2)-BigInt(1)}),xA*=BigInt(256);D0.set("int",D0.get("int256"));D0.set("uint",D0.get("uint256"));const _oe=BigInt(1)<<BigInt(256);function $Ye(t,e=Mi){let n;return t<0?n=(_oe+t).toString(16):n=t.toString(16),n=Xv(n,e*2),j1(n)}function jYe(t,e){const n=Bh(t),r=BigInt(n);return r<=e?r:r-_oe}function _4(t,e){let n;try{n=Jm(e)}catch{throw new sr("provided input is not number value",{type:t.type,value:e,name:t.name})}const r=D0.get(t.type);if(!r)throw new sr("provided abi contains invalid number datatype",{type:t.type});if(n<r.min)throw new sr("provided input is less then minimum for given type",{type:t.type,value:e,name:t.name,minimum:r.min.toString()});if(n>r.max)throw new sr("provided input is greater then maximum for given type",{type:t.type,value:e,name:t.name,maximum:r.max.toString()});return{dynamic:!1,encoded:$Ye(n)}}function ab(t,e){if(e.length<Mi)throw new sr("Not enough bytes left to decode",{param:t,bytesLeft:e.length});const n=e.subarray(0,Mi),r=D0.get(t.type);if(!r)throw new sr("provided abi contains invalid number datatype",{type:t.type});const i=jYe(n,r.max);if(i<r.min)throw new sr("decoded value is less then minimum for given type",{type:t.type,value:i,name:t.name,minimum:r.min.toString()});if(i>r.max)throw new sr("decoded value is greater then maximum for given type",{type:t.type,value:i,name:t.name,maximum:r.max.toString()});return{result:i,encoded:e.subarray(Mi),consumed:Mi}}function LYe(t,e){let n;try{n=ese(e)}catch(r){if(r instanceof J$)throw new sr("provided input is not valid boolean value",{type:t.type,value:e,name:t.name})}return _4({type:"uint8",name:""},Number(n))}function UYe(t,e){const n=ab({type:"uint8",name:""},e);if(n.result>1||n.result<0)throw new sr("Invalid boolean value encoded",{boolBytes:e.subarray(0,Mi),numberResult:n});return{result:n.result===BigInt(1),encoded:n.encoded,consumed:Mi}}const FYe=32;function Aoe(t,e){if(typeof e=="string"&&e.length%2!==0&&(e+="0"),!nm(e))throw new sr("provided input is not valid bytes value",{type:t.type,value:e,name:t.name});const n=kd(e),[,r]=t.type.split("bytes");if(r){if(Number(r)>FYe||Number(r)<1)throw new sr("invalid bytes type. Static byte type can have between 1 and 32 bytes",{type:t.type});if(Number(r)<n.length)throw new sr("provided input size is different than type size",{type:t.type,value:e,name:t.name});const o=aD(Mi);return o.set(n),{dynamic:!1,encoded:o}}const i=Math.ceil(n.length/Mi),s=aD(Mi+i*Mi);return s.set(_4({type:"uint32",name:""},n.length).encoded),s.set(n,Mi),{dynamic:!0,encoded:s}}function Eoe(t,e){const[,n]=t.type.split("bytes");let r=Number(n),i=e,s=1,o=0;if(!r){const a=ab({type:"uint32",name:""},i);r=Number(a.result),o+=a.consumed,i=a.encoded,s=Math.ceil(r/Mi)}if(r>e.length)throw new sr("there is not enough data to decode",{type:t.type,encoded:e,size:r});return{result:Kn(i.subarray(0,r)),encoded:i.subarray(s*Mi),consumed:o+s*Mi}}function zYe(t,e){if(typeof e!="string")throw new sr("invalid input, should be string",{input:e});const n=sj(e);return Aoe({type:"bytes",name:""},n)}function HYe(t,e){const n=Eoe({type:"bytes",name:""},e);return{result:Y9(n.result),encoded:n.encoded,consumed:n.consumed}}function Coe(t){let e=0,n=0;const r=[],i=[];for(const s of t)s.dynamic?e+=Mi:e+=s.encoded.length;for(const s of t)s.dynamic?(r.push(_4({type:"uint256",name:""},e+n)),i.push(s),n+=s.encoded.length):r.push(s);return Ho(...r.map(s=>s.encoded),...i.map(s=>s.encoded))}function WYe(t,e){if(!Array.isArray(e))throw new sr("Expected value to be array",{abi:t,values:e});const{size:n,param:r}=Bj(t),i=e.map(a=>cD(r,a)),s=n===-1,o=i.length>0&&i[0].dynamic;if(!s&&e.length!==n)throw new sr("Given arguments count doesn't match array length",{arrayLength:n,argumentsLength:e.length});if(s||o){const a=Coe(i);if(s){const c=_4({type:"uint256",name:""},i.length).encoded;return{dynamic:!0,encoded:i.length>0?Ho(c,a):c}}return{dynamic:!0,encoded:a}}return{dynamic:!1,encoded:Ho(...i.map(a=>a.encoded))}}function VYe(t,e){let{size:n,param:r}=Bj(t);const i=n===-1;let s=0;const o=[];let a=e;if(i){const l=ab({type:"uint32",name:""},e);n=Number(l.result),s=l.consumed,a=l.encoded}if(V8(r)){for(let l=0;l<n;l+=1){const u=ab({type:"uint32",name:""},a.subarray(l*Mi));s+=u.consumed;const d=q8(r,a.subarray(Number(u.result)));s+=d.consumed,o.push(d.result)}return{result:o,encoded:a.subarray(s),consumed:s}}for(let l=0;l<n;l+=1){const u=q8(r,e.subarray(s));s+=u.consumed,o.push(u.result)}return{result:o,encoded:e.subarray(s),consumed:s}}function cD(t,e){if(t.type==="string")return zYe(t,e);if(t.type==="bool")return LYe(t,e);if(t.type==="address")return MYe(t,e);if(t.type==="tuple")return $j(t,e);if(t.type.endsWith("]"))return WYe(t,e);if(t.type.startsWith("bytes"))return Aoe(t,e);if(t.type.startsWith("uint")||t.type.startsWith("int"))return _4(t,e);throw new sr("Unsupported",{param:t,value:e})}function q8(t,e){if(t.type==="string")return HYe(t,e);if(t.type==="bool")return UYe(t,e);if(t.type==="address")return BYe(t,e);if(t.type==="tuple")return Soe(t,e);if(t.type.endsWith("]"))return VYe(t,e);if(t.type.startsWith("bytes"))return Eoe(t,e);if(t.type.startsWith("uint")||t.type.startsWith("int"))return ab(t,e);throw new sr("Unsupported",{param:t,bytes:e})}function $j(t,e){var n,r,i;let s=!1;if(!Array.isArray(e)&&typeof e!="object")throw new sr("param must be either Array or Object",{param:t,input:e});const o=e,a=[];for(let c=0;c<((r=(n=t.components)===null||n===void 0?void 0:n.length)!==null&&r!==void 0?r:0);c+=1){const l=t.components[c];let u;if(Array.isArray(o)){if(c>=o.length)throw new sr("input param length missmatch",{param:t,input:e});u=cD(l,o[c])}else{const d=o[(i=l.name)!==null&&i!==void 0?i:""];if(d==null)throw new sr("missing input defined in abi",{param:t,input:e,paramName:l.name});u=cD(l,d)}u.dynamic&&(s=!0),a.push(u)}return s?{dynamic:!0,encoded:Coe(a)}:{dynamic:!1,encoded:Ho(...a.map(c=>c.encoded))}}function Soe(t,e){const n={__length__:0};let r=0;if(!t.components)return{result:n,encoded:e,consumed:r};let i=0;for(const[s,o]of t.components.entries()){let a;if(V8(o)){const c=ab({type:"uint32",name:""},e.subarray(r));a=q8(o,e.subarray(Number(c.result))),r+=c.consumed,i+=a.consumed}else a=q8(o,e.subarray(r)),r+=a.consumed;n.__length__+=1,n[s]=a.result,o.name&&o.name!==""&&(n[o.name]=a.result)}return{encoded:e.subarray(r+i),result:n,consumed:r+i}}function qYe(t,e,n){const r=voe(t),i=j1(e);return Soe({type:"tuple",name:"",components:r},i).result}function Toe(t){const e=[];return t.forEach(n=>{if(Array.isArray(n)){const r=Toe(n);e.push({type:"tuple",components:r,name:""})}else e.push({type:Ih(n,!0)})}),e}function cT(t,e){if((t==null?void 0:t.length)!==e.length)throw new sr("Invalid number of values received for given ABI",{expected:t==null?void 0:t.length,received:e.length});const n=voe(t);return Bh($j({type:"tuple",name:"",components:n},e).encoded)}function GYe(t){try{const e=Toe(t);return Bh($j({type:"tuple",name:"",components:e},t).encoded)}catch{throw new sr("Could not infer types from given params",{params:t})}}const lD=(t,e)=>cT([t],[e]),Ioe=(t,e,n)=>{try{if(t.length>0&&(!e||e==="0x"||e==="0X"))throw new sr("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 qYe(t,`0x${e.replace(/0x/i,"")}`,n)}catch(r){throw new sr(`Parameter decoding error: ${r.message}`,{internalErr:r})}},A4=(t,e)=>Ioe(t,e,!1),koe=(t,e)=>A4([t],e)[0],Qx=t=>{if(typeof t!="string"&&!aT(t))throw new sr("Invalid parameter value in encodeFunctionSignature");let e;return t&&(typeof t=="function"||typeof t=="object")?e=Gf(t):e=t,uc(e).slice(0,10)},KYe=(t,e)=>{var n;if(!aT(t))throw new sr("Invalid parameter value in encodeFunctionCall");return`${Qx(t)}${cT((n=t.inputs)!==null&&n!==void 0?n:[],e??[]).replace("0x","")}`},YYe=["bool","string","int","uint","address","fixed","ufixed"],QYe=(t,e)=>t==="string"?e:koe(t,e),Roe=(t,e,n)=>{const r=Array.isArray(n)?n:[n],i={},s={};for(const[h,g]of t.entries())g.indexed?i[h]=g:s[h]=g;const o=e?Ioe(Object.values(s),e,!0):{__length__:0},a=r.length-Object.keys(i).length,c=Object.values(i).map((h,g)=>YYe.some(w=>h.type.startsWith(w))?QYe(h.type,r[g+a]):r[g+a]),l={__length__:0};let u=0,d=0;for(const[h,g]of t.entries())l[h]=g.type==="string"?"":void 0,i[h]&&(l[h]=c[u],u+=1),s[h]&&(l[h]=o[String(d)],d+=1),g.name&&(l[g.name]=l[h]),l.__length__+=1;return l},lE=(t,e)=>{if(e!=null&&e.data){let n,r,i;try{const s=e.data.slice(0,10),o=t.find(a=>wYe(a).startsWith(s));o!=null&&o.inputs&&(n=o.name,r=Gf(o),i=A4([...o.inputs],e.data.substring(10)))}catch(s){console.error(s)}n&&e.setDecodedProperties(n,r,i)}};var ZYe=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};const JYe=(t,e)=>{var n,r,i,s,o;if(t instanceof xg&&t.cause instanceof U9){if(e!==void 0){const a=e.filter(c=>oT(c));return lE(a,t.cause),{reason:t.cause.message,signature:(n=t.cause.data)===null||n===void 0?void 0:n.slice(0,10),data:(r=t.cause.data)===null||r===void 0?void 0:r.substring(10),customErrorName:t.cause.errorName,customErrorDecodedSignature:t.cause.errorSignature,customErrorArguments:t.cause.errorArgs}}return{reason:t.cause.message,signature:(i=t.cause.data)===null||i===void 0?void 0:i.slice(0,10),data:(s=t.cause.data)===null||s===void 0?void 0:s.substring(10)}}if(t instanceof F9&&!Array.isArray((o=t.cause)===null||o===void 0?void 0:o.errors)&&t.cause!==void 0)return t.cause.message;throw t};function Noe(t,e,n,r=t.defaultReturnFormat){return ZYe(this,void 0,void 0,function*(){try{yield Fj(t,e,t.defaultBlock,r);return}catch(i){return JYe(i,n)}})}var XYe=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};function lR(t,e,n,r,i,s){return XYe(this,void 0,void 0,function*(){let o=s;o===void 0&&t.handleRevert&&e!==void 0&&(o=yield Noe(t,e,i));let a;if(o===void 0)a=new Aie(n);else if(typeof o=="string")a=new A8(o,void 0,n);else if(o.customErrorName!==void 0&&o.customErrorDecodedSignature!==void 0&&o.customErrorArguments!==void 0){const c=o;a=new _ie(c.reason,c.customErrorName,c.customErrorDecodedSignature,c.customErrorArguments,c.signature,n,c.data)}else a=new A8(o.reason,o.signature,n,o.data);return a})}const jj=(t,e,n,r=Ia)=>{var i,s,o,a,c;let l=Object.assign({},t);const u=et(iT,e,r);if([ob,"allEvents"].includes(l.name)){const h=n.find(g=>g.signature===e.topics[0]);h?l=h:l={anonymous:!0}}if(l.inputs=(s=(i=l.inputs)!==null&&i!==void 0?i:t.inputs)!==null&&s!==void 0?s:[],!l.anonymous){let h=0;((o=l.inputs)!==null&&o!==void 0?o:[]).forEach(g=>{g.indexed&&(h+=1)}),h>0&&(e!=null&&e.topics)&&(e==null?void 0:e.topics.length)!==h+1&&(l=Object.assign(Object.assign({},l),{anonymous:!0,inputs:[]}))}const d=l.anonymous?e.topics:((a=e.topics)!==null&&a!==void 0?a:[]).slice(1);return Object.assign(Object.assign({},u),{returnValues:Roe([...(c=l.inputs)!==null&&c!==void 0?c:[]],e.data,d),event:l.name,signature:l.anonymous||!e.topics||e.topics.length===0||!e.topics[0]?void 0:e.topics[0],raw:{data:e.data,topics:e.topics}})};var Rm=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};class Poe{constructor({options:e,web3Context:n,promiEvent:r,returnFormat:i}){this.options={checkRevertBeforeSending:!0},this.options=e,this.web3Context=n,this.promiEvent=r,this.returnFormat=i}getReceiptWithEvents(e){var n,r;const i=Object.assign({},e??{});if(!((n=this.options)===null||n===void 0)&&n.contractAbi&&i.logs&&i.logs.length>0){i.events={};for(const s of i.logs){const o=jj(nD,s,(r=this.options)===null||r===void 0?void 0:r.contractAbi,this.returnFormat);o.event&&(i.events[o.event]=o)}}return i}checkRevertBeforeSending(e){return Rm(this,void 0,void 0,function*(){if(this.options.checkRevertBeforeSending!==!1){let n=e;$e(e.data)&&$e(e.input)&&$e(e.gas)&&(n=Object.assign(Object.assign({},e),{gas:21e3}));const r=yield Noe(this.web3Context,n,this.options.contractAbi);if(r!==void 0)throw yield lR(this.web3Context,e,void 0,void 0,this.options.contractAbi,r)}})}emitSending(e){this.promiEvent.listenerCount("sending")>0&&this.promiEvent.emit("sending",e)}populateGasPrice({transactionFormatted:e,transaction:n}){var r;return Rm(this,void 0,void 0,function*(){let i=e;return!(!((r=this.options)===null||r===void 0)&&r.ignoreGasPricing)&&$e(e.gasPrice)&&($e(n.maxPriorityFeePerGas)||$e(n.maxFeePerGas))&&(i=Object.assign(Object.assign({},e),yield soe(e,this.web3Context,_n))),i})}signAndSend({wallet:e,tx:n}){return Rm(this,void 0,void 0,function*(){if(e){const r=yield e.signTransaction(n);return sD(this.web3Context,()=>Rm(this,void 0,void 0,function*(){return Xse(this.web3Context.requestManager,r.rawTransaction)}),r.transactionHash)}return sD(this.web3Context,()=>Rm(this,void 0,void 0,function*(){return fKe(this.web3Context.requestManager,n)}))})}emitSent(e){this.promiEvent.listenerCount("sent")>0&&this.promiEvent.emit("sent",e)}emitTransactionHash(e){this.promiEvent.listenerCount("transactionHash")>0&&this.promiEvent.emit("transactionHash",e)}emitReceipt(e){this.promiEvent.listenerCount("receipt")>0&&this.promiEvent.emit("receipt",e)}handleError({error:e,tx:n}){var r;return Rm(this,void 0,void 0,function*(){let i=e;return i instanceof xg&&this.web3Context.handleRevert&&(i=yield lR(this.web3Context,n,void 0,void 0,(r=this.options)===null||r===void 0?void 0:r.contractAbi)),(i instanceof F9||i instanceof xg||i instanceof _ie||i instanceof Aie||i instanceof A8||i instanceof Tie)&&this.promiEvent.listenerCount("error")>0&&this.promiEvent.emit("error",i),i})}emitConfirmation({receipt:e,transactionHash:n,customTransactionReceiptSchema:r}){this.promiEvent.listenerCount("confirmation")>0&&pYe(this.web3Context,this.promiEvent,e,n,this.returnFormat,r)}handleResolve({receipt:e,tx:n}){var r,i,s;return Rm(this,void 0,void 0,function*(){if(!((r=this.options)===null||r===void 0)&&r.transactionResolver)return(i=this.options)===null||i===void 0?void 0:i.transactionResolver(e);if(e.status===BigInt(0)){const o=yield lR(this.web3Context,n,e,void 0,(s=this.options)===null||s===void 0?void 0:s.contractAbi);throw this.promiEvent.listenerCount("error")>0&&this.promiEvent.emit("error",o),o}else return e})}}var Mr=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})},eQe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const tQe=t=>Mr(void 0,void 0,void 0,function*(){return Jse(t.requestManager)});function nQe(t,e){return Mr(this,void 0,void 0,function*(){const n=yield ZGe(t.requestManager);return et({format:"uint"},n,e??t.defaultReturnFormat)})}function Lj(t,e){return Mr(this,void 0,void 0,function*(){const n=yield JGe(t.requestManager);return et({format:"uint"},n,e??t.defaultReturnFormat)})}function rQe(t,e){return Mr(this,void 0,void 0,function*(){const n=yield XGe(t.requestManager);return et({format:"uint"},n,e??t.defaultReturnFormat)})}function Uj(t,e){return Mr(this,void 0,void 0,function*(){const n=yield tKe(t.requestManager);return et({format:"uint"},n,e??t.defaultReturnFormat)})}function iQe(t,e,n=t.defaultBlock,r){return Mr(this,void 0,void 0,function*(){const i=Bs(n)?n:et({format:"uint"},n,_n),s=yield nKe(t.requestManager,e,i);return et({format:"uint"},s,r??t.defaultReturnFormat)})}function sQe(t,e,n,r=t.defaultBlock,i){return Mr(this,void 0,void 0,function*(){const s=et({format:"uint"},n,_n),o=Bs(r)?r:et({format:"uint"},r,_n),a=yield rKe(t.requestManager,e,s,o);return et({format:"bytes"},a,i??t.defaultReturnFormat)})}function oQe(t,e,n=t.defaultBlock,r){return Mr(this,void 0,void 0,function*(){const i=Bs(n)?n:et({format:"uint"},n,_n),s=yield lKe(t.requestManager,e,i);return et({format:"bytes"},s,r??t.defaultReturnFormat)})}function Ooe(t,e=t.defaultBlock,n=!1,r){var i;return Mr(this,void 0,void 0,function*(){let s;if(nm(e)){const a=et({format:"bytes32"},e,_n);s=yield mKe(t.requestManager,a,n)}else{const a=Bs(e)?e:et({format:"uint"},e,_n);s=yield eoe(t.requestManager,a,n)}const o=et(H8,s,r??t.defaultReturnFormat);return $e(o)?o:Object.assign(Object.assign({},o),{transactions:(i=o.transactions)!==null&&i!==void 0?i:[]})})}function aQe(t,e=t.defaultBlock,n){return Mr(this,void 0,void 0,function*(){let r;if(nm(e)){const i=et({format:"bytes32"},e,_n);r=yield sKe(t.requestManager,i)}else{const i=Bs(e)?e:et({format:"uint"},e,_n);r=yield oKe(t.requestManager,i)}return et({format:"uint"},r,n??t.defaultReturnFormat)})}function cQe(t,e=t.defaultBlock,n){return Mr(this,void 0,void 0,function*(){let r;if(nm(e)){const i=et({format:"bytes32"},e,_n);r=yield aKe(t.requestManager,i)}else{const i=Bs(e)?e:et({format:"uint"},e,_n);r=yield cKe(t.requestManager,i)}return et({format:"uint"},r,n??t.defaultReturnFormat)})}function lQe(t,e=t.defaultBlock,n,r){return Mr(this,void 0,void 0,function*(){const i=et({format:"uint"},n,_n);let s;if(nm(e)){const o=et({format:"bytes32"},e,_n);s=yield bKe(t.requestManager,o,i)}else{const o=Bs(e)?e:et({format:"uint"},e,_n);s=yield xKe(t.requestManager,o,i)}return et(H8,s,r??t.defaultReturnFormat)})}function uQe(t,e,n=t.defaultReturnFormat){return Mr(this,void 0,void 0,function*(){const r=et({format:"bytes32"},e,Ia),i=yield gKe(t.requestManager,r);return $e(i)?i:Da(i,n,{fillInputAndData:!0})})}function dQe(t,e){return Mr(this,void 0,void 0,function*(){return(yield SKe(t.requestManager)).map(r=>Da(r,e??t.defaultReturnFormat,{fillInputAndData:!0}))})}function fQe(t,e=t.defaultBlock,n,r){return Mr(this,void 0,void 0,function*(){const i=et({format:"uint"},n,_n);let s;if(nm(e)){const o=et({format:"bytes32"},e,_n);s=yield wKe(t.requestManager,o,i)}else{const o=Bs(e)?e:et({format:"uint"},e,_n);s=yield yKe(t.requestManager,o,i)}return $e(s)?s:Da(s,r??t.defaultReturnFormat,{fillInputAndData:!0})})}function Doe(t,e,n){return Mr(this,void 0,void 0,function*(){const r=et({format:"bytes32"},e,Ia);let i;try{i=yield vKe(t.requestManager,r)}catch(s){if(typeof s=="object"&&!$e(s)&&"message"in s&&s.message==="transaction indexing is in progress")console.warn("Transaction indexing is in progress.");else throw s}return $e(i)?i:et(Wb,i,n??t.defaultReturnFormat)})}function Moe(t,e,n=t.defaultBlock,r){return Mr(this,void 0,void 0,function*(){const i=Bs(n)?n:et({format:"uint"},n,_n),s=yield iKe(t.requestManager,e,i);return et({format:"uint"},s,r??t.defaultReturnFormat)})}function w3(t,e,n,r={checkRevertBeforeSending:!0},i){const s=new Zse((o,a)=>{setImmediate(()=>{Mr(this,void 0,void 0,function*(){const c=new Poe({web3Context:t,promiEvent:s,options:r,returnFormat:n});let l=Object.assign({},e);$e(i)||(l=yield i.processTransaction(l));let u=Da(Object.assign(Object.assign({},l),{from:rD("from",t,l),to:rD("to",t,l)}),_n);try{u=yield c.populateGasPrice({transaction:l,transactionFormatted:u}),yield c.checkRevertBeforeSending(u),c.emitSending(u);let d;t.wallet&&!$e(u.from)&&(d=t.wallet.get(u.from));const h=yield c.signAndSend({wallet:d,tx:u}),g=et({format:"bytes32"},h,n??t.defaultReturnFormat);c.emitSent(u),c.emitTransactionHash(g);const w=yield coe(t,h,n??t.defaultReturnFormat),v=c.getReceiptWithEvents(et(Wb,w,n??t.defaultReturnFormat));c.emitReceipt(v),o(yield c.handleResolve({receipt:v,tx:u})),c.emitConfirmation({receipt:v,transactionHash:h})}catch(d){a(yield c.handleError({error:d,tx:u}))}})})});return s}function hQe(t,e,n,r={checkRevertBeforeSending:!0}){const i=new Zse((s,o)=>{setImmediate(()=>{Mr(this,void 0,void 0,function*(){const a=new Poe({web3Context:t,promiEvent:i,options:r,returnFormat:n}),c=et({format:"bytes"},e,_n),l=m1.fromSerializedData(kd(ri(c))),u=Object.assign(Object.assign({},l.toJSON()),{from:l.getSenderAddress().toString()});try{const{v:d,r:h,s:g}=u,w=eQe(u,["v","r","s"]);yield a.checkRevertBeforeSending(w),a.emitSending(c);const v=yield sD(t,()=>Mr(this,void 0,void 0,function*(){return Xse(t.requestManager,c)}));a.emitSent(c);const _=et({format:"bytes32"},v,n??t.defaultReturnFormat);a.emitTransactionHash(_);const T=yield coe(t,v,n??t.defaultReturnFormat),b=a.getReceiptWithEvents(et(Wb,T,n??t.defaultReturnFormat));a.emitReceipt(b),s(yield a.handleResolve({receipt:b,tx:u})),a.emitConfirmation({receipt:b,transactionHash:v})}catch(d){o(yield a.handleError({error:d,tx:u}))}})})});return i}function pQe(t,e,n,r=t.defaultReturnFormat){var i;return Mr(this,void 0,void 0,function*(){const s=et({format:"bytes"},e,Ia);if(!((i=t.wallet)===null||i===void 0)&&i.get(n)){const c=t.wallet.get(n).sign(s);return et(XKe,c,r)}if(typeof n=="number")throw new Jze(e,'RPC method "eth_sign" does not support index signatures');const o=yield uKe(t.requestManager,n,s);return et({format:"bytes"},o,r)})}function mQe(t,e,n=t.defaultReturnFormat){return Mr(this,void 0,void 0,function*(){const r=yield dKe(t.requestManager,Da(e,_n));return ej(r)?rYe(r,n,{fillInputAndData:!0}):{raw:et({format:"bytes"},r.raw,n),tx:Da(r.tx,n,{fillInputAndData:!0})}})}function Fj(t,e,n=t.defaultBlock,r=t.defaultReturnFormat){return Mr(this,void 0,void 0,function*(){const i=Bs(n)?n:et({format:"uint"},n,_n),s=yield hKe(t.requestManager,Da(e,_n),i);return et({format:"bytes"},s,r)})}function zj(t,e,n=t.defaultBlock,r){return Mr(this,void 0,void 0,function*(){const i=Da(e,_n),s=Bs(n)?n:et({format:"uint"},n,_n),o=yield pKe(t.requestManager,i,s);return et({format:"uint"},o,r??t.defaultReturnFormat)})}function Boe(t,e,n){return Mr(this,void 0,void 0,function*(){let{toBlock:r,fromBlock:i}=e;$e(r)||(typeof r=="number"||typeof r=="bigint")&&(r=ba(r)),$e(i)||(typeof i=="number"||typeof i=="bigint")&&(i=ba(i));const s=Object.assign(Object.assign({},e),{fromBlock:i,toBlock:r});return(yield _Ke(t.requestManager,s)).map(c=>typeof c=="string"?c:et(iT,c,n??t.defaultReturnFormat))})}function $oe(t,e){return Mr(this,void 0,void 0,function*(){const n=yield IKe(t.requestManager);return et({format:"uint"},n,e??t.defaultReturnFormat)})}function gQe(t,e,n,r=t.defaultBlock,i){return Mr(this,void 0,void 0,function*(){const s=n.map(c=>et({format:"bytes"},c,_n)),o=Bs(r)?r:et({format:"uint"},r,_n),a=yield kKe(t.requestManager,e,s,o);return et(nYe,a,i??t.defaultReturnFormat)})}function wQe(t,e,n=t.defaultBlock,r,i){return Mr(this,void 0,void 0,function*(){const s=et({format:"uint"},e,_n),o=Bs(n)?n:et({format:"uint"},n,_n),a=et({type:"array",items:{format:"uint"}},r,sT),c=yield CKe(t.requestManager,s,o,a);return et(eYe,c,i??t.defaultReturnFormat)})}function joe(t,e,n=t.defaultBlock,r){return Mr(this,void 0,void 0,function*(){const i=Bs(n)?n:et({format:"uint"},n,_n),s=yield NKe(t.requestManager,Da(e,_n),i);return et(YKe,s,r??t.defaultReturnFormat)})}function yQe(t,e,n,r,i){return Mr(this,void 0,void 0,function*(){const s=yield PKe(t.requestManager,e,n,r);return et({format:"bytes"},s,i??t.defaultReturnFormat)})}let Loe=class extends v4{_buildSubscriptionParams(){return["logs",this.args]}formatSubscriptionResult(e){return et(iT,e,super.returnFormat)}};class JG extends v4{_buildSubscriptionParams(){return["newPendingTransactions"]}formatSubscriptionResult(e){return et({format:"string"},e,super.returnFormat)}}class G8 extends v4{_buildSubscriptionParams(){return["newHeads"]}formatSubscriptionResult(e){return et(ZKe,e,super.returnFormat)}}class Uoe extends v4{_buildSubscriptionParams(){return["syncing"]}_processSubscriptionResult(e){if(typeof e=="boolean")this.emit("changed",e);else{const n=Object.fromEntries(Object.entries(e.status).map(([r,i])=>[r.charAt(0).toLowerCase()+r.substring(1),i]));this.emit("changed",e.syncing),this.emit("data",et(JKe,n,super.returnFormat))}}}var Gn=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};const uD={logs:Loe,newPendingTransactions:JG,newHeads:G8,syncing:Uoe,pendingTransactions:JG,newBlockHeaders:G8};class lT extends _a{constructor(e){if(typeof e=="string"||j8(e)){super({provider:e,registeredSubscriptions:uD});return}if(e.registeredSubscriptions){super(e);return}super(Object.assign(Object.assign({},e),{registeredSubscriptions:uD})),this.getFeeData=this.calculateFeeData}setTransactionMiddleware(e){this.transactionMiddleware=e}getTransactionMiddleware(){return this.transactionMiddleware}getProtocolVersion(){return Gn(this,void 0,void 0,function*(){return KGe(this.requestManager)})}isSyncing(){return Gn(this,void 0,void 0,function*(){return Jse(this.requestManager)})}getCoinbase(){return Gn(this,void 0,void 0,function*(){return YGe(this.requestManager)})}isMining(){return Gn(this,void 0,void 0,function*(){return QGe(this.requestManager)})}getHashrate(e){var n;return e===void 0&&(e=(n=this.defaultReturnFormat)!==null&&n!==void 0?n:Ia),Gn(this,void 0,void 0,function*(){return this.getHashRate(e)})}getHashRate(e=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return nQe(this,e)})}getGasPrice(e=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return Lj(this,e)})}getMaxPriorityFeePerGas(e=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return rQe(this,e)})}calculateFeeData(e=BigInt(2),n=K9.Gwei){var r;return Gn(this,void 0,void 0,function*(){const i=yield this.getBlock(void 0,!1),s=(r=i==null?void 0:i.baseFeePerGas)!==null&&r!==void 0?r:void 0;let o;try{o=yield this.getGasPrice()}catch{}let a;try{a=yield this.getMaxPriorityFeePerGas()}catch{}let c;return s&&(a=a??n,c=s*e+a),{gasPrice:o,maxFeePerGas:c,maxPriorityFeePerGas:a,baseFeePerGas:s}})}getAccounts(){var e;return Gn(this,void 0,void 0,function*(){return((e=yield eKe(this.requestManager))!==null&&e!==void 0?e:[]).map(r=>Fd(r))})}getBlockNumber(e=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return Uj(this,e)})}getBalance(e,n=this.defaultBlock,r=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return iQe(this,e,n,r)})}getStorageAt(e,n,r=this.defaultBlock,i=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return sQe(this,e,n,r,i)})}getCode(e,n=this.defaultBlock,r=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return oQe(this,e,n,r)})}getBlock(e=this.defaultBlock,n=!1,r=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return Ooe(this,e,n,r)})}getBlockTransactionCount(e=this.defaultBlock,n=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return aQe(this,e,n)})}getBlockUncleCount(e=this.defaultBlock,n=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return cQe(this,e,n)})}getUncle(e=this.defaultBlock,n,r=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return lQe(this,e,n,r)})}getTransaction(e,n=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){const r=yield uQe(this,e,n);if(!r)throw new dG;return r})}getPendingTransactions(e=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return dQe(this,e)})}getTransactionFromBlock(e=this.defaultBlock,n,r=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return fQe(this,e,n,r)})}getTransactionReceipt(e,n=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){const r=yield Doe(this,e,n);if(!r)throw new dG;return r})}getTransactionCount(e,n=this.defaultBlock,r=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return Moe(this,e,n,r)})}sendTransaction(e,n=this.defaultReturnFormat,r){return w3(this,e,n,r,this.transactionMiddleware)}sendSignedTransaction(e,n=this.defaultReturnFormat,r){return hQe(this,e,n,r)}sign(e,n,r=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return pQe(this,e,n,r)})}signTransaction(e,n=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return mQe(this,e,n)})}call(e,n=this.defaultBlock,r=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return Fj(this,e,n,r)})}estimateGas(e,n=this.defaultBlock,r=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return zj(this,e,n,r)})}getPastLogs(e,n=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return Boe(this,e,n)})}getWork(){return Gn(this,void 0,void 0,function*(){return AKe(this.requestManager)})}submitWork(e,n,r){return Gn(this,void 0,void 0,function*(){return EKe(this.requestManager,e,n,r)})}requestAccounts(){return Gn(this,void 0,void 0,function*(){return TKe(this.requestManager)})}getChainId(e=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return $oe(this,e)})}getNodeInfo(){return Gn(this,void 0,void 0,function*(){return RKe(this.requestManager)})}getProof(e,n,r=this.defaultBlock,i=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return gQe(this,e,n,r,i)})}getFeeHistory(e,n=this.defaultBlock,r,i=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return wQe(this,e,n,r,i)})}createAccessList(e,n=this.defaultBlock,r=this.defaultReturnFormat){return Gn(this,void 0,void 0,function*(){return joe(this,e,n,r)})}signTypedData(e,n,r,i){var s;return r===void 0&&(r=!1),i===void 0&&(i=(s=this.defaultReturnFormat)!==null&&s!==void 0?s:Ia),Gn(this,void 0,void 0,function*(){return yQe(this,e,n,r,i)})}subscribe(e,n,r){var i,s;return r===void 0&&(r=(i=this.defaultReturnFormat)!==null&&i!==void 0?i:Ia),Gn(this,void 0,void 0,function*(){const o=yield(s=this.subscriptionManager)===null||s===void 0?void 0:s.subscribe(e,n,r);return o instanceof Loe&&e==="logs"&&typeof n=="object"&&!mn(n.fromBlock)&&Number.isFinite(Number(n.fromBlock))&&setImmediate(()=>{this.getPastLogs(n).then(a=>{for(const c of a)o._processSubscriptionResult(c)}).catch(a=>{o._processSubscriptionError(a)})}),o})}static shouldClearSubscription({sub:e}){return!(e instanceof Uoe)}clearSubscriptions(e=!1){var n;return(n=this.subscriptionManager)===null||n===void 0?void 0:n.unsubscribe(e?lT.shouldClearSubscription:void 0)}}const vQe=t=>{if(!$e(t.common)){if($e(t.common.customChain))throw new nHe;if($e(t.common.customChain.chainId))throw new rHe;if(!$e(t.chainId)&&t.chainId!==t.common.customChain.chainId)throw new iHe({txChainId:t.chainId,customChainId:t.common.customChain.chainId})}},bQe=t=>{if(!$e(t.common)&&!$e(t.chain)&&!$e(t.hardfork))throw new aHe;if(!$e(t.chain)&&$e(t.hardfork)||!$e(t.hardfork)&&$e(t.chain))throw new cHe({chain:t.chain,hardfork:t.hardfork})},xQe=t=>{if(!$e(t.common)&&!$e(t.common.baseChain)&&!$e(t.chain)&&t.chain!==t.common.baseChain)throw new sHe({txChain:t.chain,baseChain:t.common.baseChain})},_Qe=t=>{if(!$e(t.common)&&!$e(t.common.hardfork)&&!$e(t.hardfork)&&t.hardfork!==t.common.hardfork)throw new oHe({txHardfork:t.hardfork,commonHardfork:t.common.hardfork})},XG=t=>{if($e(t.gas)||!Th(t.gas)||$e(t.gasPrice)||!Th(t.gasPrice))throw new hHe({gas:t.gas,gasPrice:t.gasPrice});if(!$e(t.maxFeePerGas)||!$e(t.maxPriorityFeePerGas))throw new Eie({maxFeePerGas:t.maxFeePerGas,maxPriorityFeePerGas:t.maxPriorityFeePerGas})},eK=t=>{if(!$e(t.gasPrice)&&t.type==="0x2")throw new mHe(t.gasPrice);if(t.type==="0x0"||t.type==="0x1")throw new Eie({maxFeePerGas:t.maxFeePerGas,maxPriorityFeePerGas:t.maxPriorityFeePerGas});if($e(t.maxFeePerGas)||!Th(t.maxFeePerGas)||$e(t.maxPriorityFeePerGas)||!Th(t.maxPriorityFeePerGas))throw new pHe({maxPriorityFeePerGas:t.maxPriorityFeePerGas,maxFeePerGas:t.maxFeePerGas})},AQe=t=>{const e=!$e(t.gas)||!$e(t.gasLimit),n=e&&!$e(t.gasPrice),r=e&&!$e(t.maxPriorityFeePerGas)&&!$e(t.maxFeePerGas);if(!n&&!r)throw new uHe({gas:t.gas,gasPrice:t.gasPrice,maxPriorityFeePerGas:t.maxPriorityFeePerGas,maxFeePerGas:t.maxFeePerGas});if(n&&r)throw new fHe({gas:t.gas,gasPrice:t.gasPrice,maxPriorityFeePerGas:t.maxPriorityFeePerGas,maxFeePerGas:t.maxFeePerGas});(n?XG:eK)(t),(!$e(t.type)&&t.type>"0x1"?eK:XG)(t)},EQe=(t,e)=>{if(!$e(e)){e(t);return}if(typeof t!="object"||$e(t))throw new gHe(t);vQe(t),bQe(t),xQe(t),_Qe(t);const n=Da(t,_n);if(AQe(n),$e(n.nonce)||$e(n.chainId)||n.nonce.startsWith("-")||n.chainId.startsWith("-"))throw new wHe({nonce:t.nonce,chainId:t.chainId})};var CQe=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};const SQe=t=>{var e,n;return{nonce:t.nonce,gasPrice:t.gasPrice,gasLimit:(e=t.gasLimit)!==null&&e!==void 0?e:t.gas,to:t.to,value:t.value,data:(n=t.data)!==null&&n!==void 0?n:t.input,type:t.type,chainId:t.chainId,accessList:t.accessList,maxPriorityFeePerGas:t.maxPriorityFeePerGas,maxFeePerGas:t.maxFeePerGas}},TQe=(t,e)=>{var n,r,i,s,o,a,c,l,u,d,h,g,w,v,_,T,b,k;const D=!$e(t.chain)&&!$e(t.hardfork)||!$e(t.common);let O;if(!D)e.defaultCommon?(O=Object.assign({},e.defaultCommon),$e(O.hardfork)&&(O.hardfork=(n=t.hardfork)!==null&&n!==void 0?n:e.defaultHardfork),$e(O.baseChain)&&(O.baseChain=e.defaultChain)):O=us.custom({name:"custom-network",chainId:xa(t.chainId),networkId:$e(t.networkId)?void 0:xa(t.networkId),defaultHardfork:(r=t.hardfork)!==null&&r!==void 0?r:e.defaultHardfork},{baseChain:e.defaultChain});else{const $=(a=(o=(s=(i=t==null?void 0:t.common)===null||i===void 0?void 0:i.customChain)===null||s===void 0?void 0:s.name)!==null&&o!==void 0?o:t.chain)!==null&&a!==void 0?a:"custom-network",C=xa((u=(l=(c=t==null?void 0:t.common)===null||c===void 0?void 0:c.customChain)===null||l===void 0?void 0:l.chainId)!==null&&u!==void 0?u:t==null?void 0:t.chainId),A=xa((g=(h=(d=t==null?void 0:t.common)===null||d===void 0?void 0:d.customChain)===null||h===void 0?void 0:h.networkId)!==null&&g!==void 0?g:t==null?void 0:t.networkId),H=(_=(v=(w=t==null?void 0:t.common)===null||w===void 0?void 0:w.hardfork)!==null&&v!==void 0?v:t==null?void 0:t.hardfork)!==null&&_!==void 0?_:e.defaultHardfork,V=(k=(b=(T=t.common)===null||T===void 0?void 0:T.baseChain)!==null&&b!==void 0?b:t.chain)!==null&&k!==void 0?k:e.defaultChain;C&&A&&$&&(O=us.custom({name:$,chainId:C,networkId:A,defaultHardfork:H},{baseChain:V}))}return{common:O}},IQe=(t,e,n,r=!1,i=!0)=>CQe(void 0,void 0,void 0,function*(){const s=yield lYe({transaction:t,web3Context:e,privateKey:n,fillGasPrice:r,fillGasLimit:i}),o=Da(s,_n);return EQe(o),m1.fromTxData(SQe(o),TQe(o,e))}),tK=({address:t},e,n)=>{var r,i;const s=n==null?void 0:n.topics,o=(r=n==null?void 0:n.filter)!==null&&r!==void 0?r:{},a={};if(mn(n==null?void 0:n.fromBlock)||(a.fromBlock=et(H8.properties.number,n==null?void 0:n.fromBlock,{number:ul.HEX,bytes:Ch.HEX})),mn(n==null?void 0:n.toBlock)||(a.toBlock=et(H8.properties.number,n==null?void 0:n.toBlock,{number:ul.HEX,bytes:Ch.HEX})),s&&Array.isArray(s))a.topics=[...s];else if(a.topics=[],e&&!e.anonymous&&![ob,"allEvents"].includes(e.name)&&a.topics.push((i=e.signature)!==null&&i!==void 0?i:Dj(Gf(e))),![ob,"allEvents"].includes(e.name)&&e.inputs)for(const c of e.inputs){if(!c.indexed)continue;const l=o[c.name];if(!l){a.topics.push(null);continue}Array.isArray(l)?a.topics.push(l.map(u=>lD(c.type,u))):c.type==="string"?a.topics.push(eb(l)):a.topics.push(lD(c.type,l))}return a.topics.length||delete a.topics,t&&(a.address=t.toLowerCase()),a},H3=(t,e,n)=>{const r=Array.isArray(t.inputs)?t.inputs.length:0;if(t.inputs&&r!==e.length)throw new Ro(`The number of arguments is not matching the methods required number. You need to pass ${r} arguments.`);let i;if(t.inputs?i=cT(Array.isArray(t.inputs)?t.inputs:[],e).replace("0x",""):i=GYe(e).replace("0x",""),mYe(t)){if(!n)throw new Ro("The contract has no contract data option set. This is necessary to append the constructor parameters.");return n.startsWith("0x")?`${n}${i}`:`0x${n}${i}`}return`${Qx(t)}${i}`},uR=(t,e,n=!0)=>{const r=n&&e&&e.length>=10&&e.startsWith("0x")?e.slice(10):e;if(!t.inputs)throw new Ro("No inputs found in the ABI");return A4([...t.inputs],r)},kQe=(t,e)=>{if(t.type==="constructor")return e;if(!e)return null;const n=e.length>=2?e.slice(2):e;if(!t.outputs)return null;const r=A4([...t.outputs],n);return r.__length__===1?r[0]:r};class Foe extends v4{constructor(e,n){super(e,n),this.address=e.address,this.topics=e.topics,this.abi=e.abi,this.jsonInterface=e.jsonInterface}_buildSubscriptionParams(){return["logs",{address:this.address,topics:this.topics}]}formatSubscriptionResult(e){return jj(this.abi,e,this.jsonInterface,super.returnFormat)}}Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));const uT=(t,e,n,r)=>{var i,s;const o={};return(!mn(t.data)||r==="both")&&(o.data=H3(e,n,(i=t.data)!==null&&i!==void 0?i:t.input)),(!mn(t.input)||r==="both")&&(o.input=H3(e,n,(s=t.input)!==null&&s!==void 0?s:t.data)),mn(o.input)&&mn(o.data)&&(o[r]=H3(e,n)),{data:o.data,input:o.input}},dR=({abi:t,params:e,options:n,contractOptions:r})=>{var i,s,o;if(!((o=(s=(i=n==null?void 0:n.input)!==null&&i!==void 0?i:n==null?void 0:n.data)!==null&&s!==void 0?s:r.input)!==null&&o!==void 0?o:r.data)&&!(n!=null&&n.to)&&!r.address)throw new Ro("Contract address not specified");if(!(n!=null&&n.from)&&!r.from)throw new Ro('Contract "from" address not specified');let c=im({to:r.address,gas:r.gas,gasPrice:r.gasPrice,from:r.from,input:r.input,maxPriorityFeePerGas:r.maxPriorityFeePerGas,maxFeePerGas:r.maxFeePerGas,data:r.data},n);const l=uT(c,t,e,n==null?void 0:n.dataInputFill);return c=Object.assign(Object.assign({},c),{data:l.data,input:l.input}),c},RQe=({abi:t,params:e,options:n,contractOptions:r})=>{if(!(n!=null&&n.to)&&!r.address)throw new Ro("Contract address not specified");let i=im({to:r.address,gas:r.gas,gasPrice:r.gasPrice,from:r.from,input:r.input,maxPriorityFeePerGas:r.maxPriorityFeePerGas,maxFeePerGas:r.maxFeePerGas,data:r.data},n);const s=uT(i,t,e,n==null?void 0:n.dataInputFill);return i=Object.assign(Object.assign({},i),{data:s.data,input:s.input}),i},NQe=({abi:t,params:e,options:n,contractOptions:r})=>{let i=im({to:r.address,gas:r.gas,gasPrice:r.gasPrice,from:r.from,input:r.input,data:r.data},n);const s=uT(i,t,e,n==null?void 0:n.dataInputFill);return i=Object.assign(Object.assign({},i),{data:s.data,input:s.input}),i},nK=t=>typeof t=="object"&&!mn(t)&&Object.keys(t).length!==0&&!qp(t),PQe=({abi:t,params:e,options:n,contractOptions:r})=>{if(!(n!=null&&n.to)&&!r.address)throw new Ro("Contract address not specified");if(!(n!=null&&n.from)&&!r.from)throw new Ro('Contract "from" address not specified');let i=im({to:r.address,gas:r.gas,gasPrice:r.gasPrice,from:r.from,input:r.input,maxPriorityFeePerGas:r.maxPriorityFeePerGas,maxFeePerGas:r.maxFeePerGas,data:r.data},n);const s=uT(i,t,e,n==null?void 0:n.dataInputFill);return i=Object.assign(Object.assign({},i),{data:s.data,input:s.input}),i};var mp=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};const OQe={logs:Foe,newHeads:G8,newBlockHeaders:G8};class Cg extends _a{constructor(e,n,r,i,s){var o,a,c;const l=qp(n)?n:qp(r)?r:void 0;let u;nK(n)?u=n:nK(r)?u=r:u=i;let d;if(typeof n=="object"&&"provider"in n?d=n.provider:typeof r=="object"&&"provider"in r?d=r.provider:typeof i=="object"&&"provider"in i?d=i.provider:d=Cg.givenProvider,super(Object.assign(Object.assign({},u),{provider:d,registeredSubscriptions:OQe})),this.syncWithContext=!1,this._functions={},u!=null&&u.wallet&&(this._wallet=u.wallet),u!=null&&u.accountProvider&&(this._accountProvider=u.accountProvider),!$e(l)&&!$e(l.data)&&!$e(l.input)&&this.config.contractDataInputFill!=="both")throw new qze({data:l.data,input:l.input});this._overloadedMethodAbis=new Map;const h=$f(i)?i:$f(r)?r:s??this.defaultReturnFormat,g=typeof n=="string"?n:void 0;this.config.contractDataInputFill=(o=l==null?void 0:l.dataInputFill)!==null&&o!==void 0?o:this.config.contractDataInputFill,this._parseAndSetJsonInterface(e,h),this.defaultReturnFormat!==h&&(this.defaultReturnFormat=h),$e(g)||this._parseAndSetAddress(g,h),this.options={address:g,jsonInterface:this._jsonInterface,gas:(a=l==null?void 0:l.gas)!==null&&a!==void 0?a:l==null?void 0:l.gasLimit,gasPrice:l==null?void 0:l.gasPrice,from:l==null?void 0:l.from,input:l==null?void 0:l.input,data:l==null?void 0:l.data},this.syncWithContext=(c=l==null?void 0:l.syncWithContext)!==null&&c!==void 0?c:!1,u instanceof _a&&this.subscribeToContextEvents(u),Object.defineProperty(this.options,"address",{set:w=>this._parseAndSetAddress(w,h),get:()=>this._address}),Object.defineProperty(this.options,"jsonInterface",{set:w=>this._parseAndSetJsonInterface(w,h),get:()=>this._jsonInterface}),u instanceof _a&&u.on(h1.CONFIG_CHANGE,w=>{this.setConfig({[w.name]:w.newValue})})}setTransactionMiddleware(e){this.transactionMiddleware=e}getTransactionMiddleware(){return this.transactionMiddleware}get events(){return this._events}get methods(){return this._methods}clone(){let e;return this.options.address?e=new Cg([...this._jsonInterface,...this._errorsInterface],this.options.address,{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this.config.contractDataInputFill},this.getContextObject()):e=new Cg([...this._jsonInterface,...this._errorsInterface],{gas:this.options.gas,gasPrice:this.options.gasPrice,from:this.options.from,input:this.options.input,data:this.options.data,provider:this.currentProvider,syncWithContext:this.syncWithContext,dataInputFill:this.config.contractDataInputFill},this.getContextObject()),this.context&&e.subscribeToContextEvents(this.context),e}deploy(e){var n,r,i;let s=this._jsonInterface.find(d=>d.type==="constructor");s||(s={type:"constructor",stateMutability:""});const o=et({format:"bytes"},(n=e==null?void 0:e.input)!==null&&n!==void 0?n:this.options.input,Ia),a=et({format:"bytes"},(r=e==null?void 0:e.data)!==null&&r!==void 0?r:this.options.data,Ia);if((!o||o.trim()==="0x")&&(!a||a.trim()==="0x"))throw new Ro("contract creation without any data provided.");const c=(i=e==null?void 0:e.arguments)!==null&&i!==void 0?i:[],l=Object.assign(Object.assign({},this.options),{input:o,data:a}),u=o??a;return{arguments:c,send:d=>{const h=Object.assign({},d);return this._contractMethodDeploySend(s,c,h,l)},estimateGas:(d,h=this.defaultReturnFormat)=>mp(this,void 0,void 0,function*(){const g=Object.assign({},d);return this._contractMethodEstimateGas({abi:s,params:c,returnFormat:h,options:g,contractOptions:l})}),encodeABI:()=>H3(s,c,et({format:"bytes"},u,this.defaultReturnFormat)),decodeData:d=>Object.assign(Object.assign({},uR(s,d.replace(u,""),!1)),{__method__:s.type})}}getPastEvents(e,n,r){var i;return mp(this,void 0,void 0,function*(){const s=typeof e=="string"?e:ob,o=typeof e!="string"&&!$f(e)?e:$f(n)?{}:n,a=$f(e)?e:$f(n)?n:r??this.defaultReturnFormat,c=s==="allEvents"||s===ob?nD:this._jsonInterface.find(T=>"name"in T&&T.name===s);if(!c)throw new Ro(`Event ${s} not found.`);const{fromBlock:l,toBlock:u,topics:d,address:h}=tK(this.options,c,o??{}),g=yield Boe(this,{fromBlock:l,toBlock:u,topics:d,address:h},a),w=g?g.map(T=>typeof T=="string"?T:jj(c,T,this._jsonInterface,a)):[],v=(i=o==null?void 0:o.filter)!==null&&i!==void 0?i:{},_=Object.keys(v);return _.length>0?w.filter(T=>typeof T=="string"?!0:_.every(b=>{var k;if(Array.isArray(v[b]))return v[b].some(O=>String(T.returnValues[b]).toUpperCase()===String(O).toUpperCase());const D=(k=c.inputs)===null||k===void 0?void 0:k.filter(O=>O.name===b)[0];return D!=null&&D.indexed&&D.type==="string"&&eb(v[b])===String(T.returnValues[b])?!0:String(T.returnValues[b]).toUpperCase()===String(v[b]).toUpperCase()})):w})}_parseAndSetAddress(e,n=this.defaultReturnFormat){this._address=e&&Fd(et({format:"address"},e,n))}decodeMethodData(e){const n=e.slice(0,10),i=this._jsonInterface.filter(s=>s.type!=="error").find(s=>n===Qx(Gf(s)));if(!i)throw new Ro(`The ABI for the provided method signature ${n} was not found.`);return Object.assign(Object.assign({},uR(i,e)),{__method__:Gf(i)})}_parseAndSetJsonInterface(e,n=this.defaultReturnFormat){var r,i,s,o,a;this._functions={},this._methods={},this._events={};let c=[];const l=e.filter(d=>d.type!=="error"),u=e.filter(d=>oT(d));for(const d of l){const h=Object.assign(Object.assign({},d),{signature:""});if(aT(h)){const g=Gf(h),w=Qx(g);h.methodNameWithInputs=g,h.signature=w,h.constant=(i=(r=h.stateMutability==="view")!==null&&r!==void 0?r:h.stateMutability==="pure")!==null&&i!==void 0?i:h.constant,h.payable=(s=h.stateMutability==="payable")!==null&&s!==void 0?s:h.payable,this._overloadedMethodAbis.set(h.name,[...(o=this._overloadedMethodAbis.get(h.name))!==null&&o!==void 0?o:[],h]);const v=(a=this._overloadedMethodAbis.get(h.name))!==null&&a!==void 0?a:[],_=this._createContractMethod(v,u),T=this._createContractMethod(v,u,!0);this._functions[g]={signature:w,method:T},this._methods[h.name]=_,this._methods[g]=T,this._methods[w]=T}else if(Oj(h)){const g=Gf(h),w=Dj(g),v=this._createContractEvent(h,n);h.signature=w,(!(g in this._events)||h.name==="bound")&&(this._events[g]=v),this._events[h.name]=v,this._events[w]=v}c=[...c,h]}this._events.allEvents=this._createContractEvent(nD,n),this._jsonInterface=[...c],this._errorsInterface=u}_getAbiParams(e,n){var r;try{return z3((r=e.inputs)!==null&&r!==void 0?r:[],n)}catch(i){throw new Ro(`Invalid parameters for method ${e.name}: ${i.message}`)}}_createContractMethod(e,n,r=!1){const i=e[e.length-1];return(...s)=>{var o,a,c;let l;const u=(a=r?(o=this._overloadedMethodAbis.get(i.name))===null||o===void 0?void 0:o.filter(v=>v.signature===i.signature):this._overloadedMethodAbis.get(i.name))!==null&&a!==void 0?a:[];let d=u[0];const h=n,g=u.filter(v=>{var _;return((_=v.inputs)!==null&&_!==void 0?_:[]).length===s.length});if(u.length===1||g.length===0)l=this._getAbiParams(d,s),yn.validate((c=i.inputs)!==null&&c!==void 0?c:[],l);else{const v=[],_=[];for(const T of g)try{l=this._getAbiParams(T,s),yn.validate(T.inputs,l),_.push(T)}catch(b){v.push(b)}if(_.length===1?[d]=_:_.length>1&&([d]=_,console.warn(`Multiple methods found that is compatible with the given inputs.
	Found ${_.length} compatible methods: ${JSON.stringify(_.map(T=>`${T.methodNameWithInputs} (signature: ${T.signature})`))} 
	The first one will be used: ${d.methodNameWithInputs}`)),v.length===g.length)throw new Zv(v)}const w={arguments:l,call:(v,_)=>mp(this,void 0,void 0,function*(){return this._contractMethodCall(d,l,h,v,_)}),send:v=>this._contractMethodSend(d,l,h,v),populateTransaction:(v,_)=>{var T,b;let k=_??this.options;k=Object.assign(Object.assign({},k),{input:void 0,from:(b=(T=k==null?void 0:k.from)!==null&&T!==void 0?T:this.defaultAccount)!==null&&b!==void 0?b:void 0});const D=dR({abi:i,params:s,options:Object.assign(Object.assign({},v),{dataInputFill:this.config.contractDataInputFill}),contractOptions:k});return D.dataInputFill&&delete D.dataInputFill,D},estimateGas:(v,_=this.defaultReturnFormat)=>mp(this,void 0,void 0,function*(){return this._contractMethodEstimateGas({abi:d,params:l,returnFormat:_,options:v})}),encodeABI:()=>H3(d,l),decodeData:v=>uR(d,v),createAccessList:(v,_)=>mp(this,void 0,void 0,function*(){return this._contractMethodCreateAccessList(d,l,h,v,_)})};return d.stateMutability==="payable",w}}_contractMethodCall(e,n,r,i,s){var o;return mp(this,void 0,void 0,function*(){const a=RQe({abi:e,params:n,options:Object.assign(Object.assign({},i),{dataInputFill:this.config.contractDataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:(o=this.options.from)!==null&&o!==void 0?o:this.config.defaultAccount})});try{const c=yield Fj(this,a,s,this.defaultReturnFormat);return kQe(e,c)}catch(c){throw c instanceof xg&&lE(r,c.cause),c}})}_contractMethodCreateAccessList(e,n,r,i,s){var o;return mp(this,void 0,void 0,function*(){const a=PQe({abi:e,params:n,options:Object.assign(Object.assign({},i),{dataInputFill:this.config.contractDataInputFill}),contractOptions:Object.assign(Object.assign({},this.options),{from:(o=this.options.from)!==null&&o!==void 0?o:this.config.defaultAccount})});try{return joe(this,a,s,this.defaultReturnFormat)}catch(c){throw c instanceof xg&&lE(r,c.cause),c}})}_contractMethodSend(e,n,r,i,s){var o,a;let c=s??this.options;c=Object.assign(Object.assign({},c),{input:void 0,from:(a=(o=c.from)!==null&&o!==void 0?o:this.defaultAccount)!==null&&a!==void 0?a:void 0});const l=dR({abi:e,params:n,options:Object.assign(Object.assign({},i),{dataInputFill:this.config.contractDataInputFill}),contractOptions:c}),u=$e(this.transactionMiddleware)?w3(this,l,this.defaultReturnFormat,{checkRevertBeforeSending:!1,contractAbi:this._jsonInterface}):w3(this,l,this.defaultReturnFormat,{checkRevertBeforeSending:!1,contractAbi:this._jsonInterface},this.transactionMiddleware);return u.on("error",d=>{d instanceof xg&&lE(r,d.cause)}),u}_contractMethodDeploySend(e,n,r,i){var s,o;let a=i??this.options;a=Object.assign(Object.assign({},a),{from:(o=(s=a.from)!==null&&s!==void 0?s:this.defaultAccount)!==null&&o!==void 0?o:void 0});const c=dR({abi:e,params:n,options:Object.assign(Object.assign({},r),{dataInputFill:this.contractDataInputFill}),contractOptions:a}),l={transactionResolver:u=>{if(u.status===BigInt(0))throw new Ro("code couldn't be stored",u);const d=this.clone();return d.options.address=u.contractAddress,d},contractAbi:this._jsonInterface,checkRevertBeforeSending:!1};return $e(this.transactionMiddleware)?w3(this,c,this.defaultReturnFormat,l):w3(this,c,this.defaultReturnFormat,l,this.transactionMiddleware)}_contractMethodEstimateGas({abi:e,params:n,returnFormat:r,options:i,contractOptions:s}){return mp(this,void 0,void 0,function*(){const o=NQe({abi:e,params:n,options:Object.assign(Object.assign({},i),{dataInputFill:this.config.contractDataInputFill}),contractOptions:s??this.options});return zj(this,o,Ff.LATEST,r??this.defaultReturnFormat)})}_createContractEvent(e,n=this.defaultReturnFormat){return(...r)=>{var i;const{topics:s,fromBlock:o}=tK(this.options,e,r[0]),a=new Foe({address:this.options.address,topics:s,abi:e,jsonInterface:this._jsonInterface},{subscriptionManager:this.subscriptionManager,returnFormat:n});return $e(o)||this.getPastEvents(e.name,{fromBlock:o,topics:s},n).then(c=>{c&&c.forEach(l=>a.emit("data",l))}).catch(c=>{a.emit("error",new Pf("Failed to get past events.",c))}),(i=this.subscriptionManager)===null||i===void 0||i.addSubscription(a).catch(c=>{a.emit("error",new Pf("Failed to subscribe.",c))}),a}}subscribeToContextEvents(e){const n=this;this.context=e,n.syncWithContext&&e.on(h1.CONFIG_CHANGE,r=>{n.setConfig({[r.name]:r.newValue})})}}const rK={addr:"0x3b3b57de",name:"0x691f3431",abi:"0x2203ab56",pubkey:"0xc8690233",text:"0x59d1d43c",contenthash:"0xbc1c58d1"},Mw={setAddr:"addr",addr:"addr",setPubkey:"pubkey",pubkey:"pubkey",setContenthash:"contenthash",contenthash:"contenthash",text:"text",name:"name"},K8={main:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",goerli:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},DQe={"0x1":"main","0x5":"goerli"},MQe=[{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"label",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"recordExists",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"resolver",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"ttl",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"}],BQe=[{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"address",name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"coinType",type:"uint256"},{indexed:!1,internalType:"bytes",name:"newAddress",type:"bytes"}],name:"AddressChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"hash",type:"bytes"}],name:"ContenthashChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"},{indexed:!1,internalType:"uint16",name:"resource",type:"uint16"},{indexed:!1,internalType:"bytes",name:"record",type:"bytes"}],name:"DNSRecordChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"name",type:"bytes"},{indexed:!1,internalType:"uint16",name:"resource",type:"uint16"}],name:"DNSRecordDeleted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"}],name:"DNSZoneCleared",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"lastzonehash",type:"bytes"},{indexed:!1,internalType:"bytes",name:"zonehash",type:"bytes"}],name:"DNSZonehashChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"bytes4",name:"interfaceID",type:"bytes4"},{indexed:!1,internalType:"address",name:"implementer",type:"address"}],name:"InterfaceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"string",name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"x",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"node",type:"bytes32"},{indexed:!0,internalType:"string",name:"indexedKey",type:"string"},{indexed:!1,internalType:"string",name:"key",type:"string"}],name:"TextChanged",type:"event"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address payable",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"uint256",name:"coinType",type:"uint256"}],name:"addr",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"contenthash",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"name",type:"bytes32"},{internalType:"uint16",name:"resource",type:"uint16"}],name:"dnsRecord",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes32",name:"name",type:"bytes32"}],name:"hasDNSRecords",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"interfaceImplementer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"pubkey",outputs:[{internalType:"bytes32",name:"x",type:"bytes32"},{internalType:"bytes32",name:"y",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"string",name:"key",type:"string"}],name:"text",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"}],name:"zonehash",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"node",type:"bytes32"},{internalType:"address",name:"a",type:"address"}],name:"setAddr",outputs:[],stateMutability:"nonpayable",type:"function"}];var $Qe="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 iK=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),sK=4;function jQe(t){let e=0;function n(){return t[e++]<<8|t[e++]}let r=n(),i=1,s=[0,1];for(let O=1;O<r;O++)s.push(i+=n());let o=n(),a=e;e+=o;let c=0,l=0;function u(){return c==0&&(l=l<<8|t[e++],c=8),l>>--c&1}const d=31,h=2**d,g=h>>>1,w=g>>1,v=h-1;let _=0;for(let O=0;O<d;O++)_=_<<1|u();let T=[],b=0,k=h;for(;;){let O=Math.floor(((_-b+1)*i-1)/k),$=0,C=r;for(;C-$>1;){let V=$+C>>>1;O<s[V]?C=V:$=V}if($==0)break;T.push($);let A=b+Math.floor(k*s[$]/i),H=b+Math.floor(k*s[$+1]/i)-1;for(;!((A^H)&g);)_=_<<1&v|u(),A=A<<1&v,H=H<<1&v|1;for(;A&~H&w;)_=_&g|_<<1&v>>>1|u(),A=A<<1^g,H=(H^g)<<1|g|1;b=A,k=1+H-A}let D=r-4;return T.map(O=>{switch(O-D){case 3:return D+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return D+256+(t[a++]<<8|t[a++]);case 1:return D+t[a++];default:return O-1}})}function LQe(t){let e=0;return()=>t[e++]}function zoe(t){return LQe(jQe(UQe(t)))}function UQe(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,s)=>e[i.charCodeAt(0)]=s);let n=t.length,r=new Uint8Array(6*n>>3);for(let i=0,s=0,o=0,a=0;i<n;i++)a=a<<6|e[t.charCodeAt(i)],o+=6,o>=8&&(r[s++]=a>>(o-=8));return r}function FQe(t){return t&1?~t>>1:t>>1}function zQe(t,e){let n=Array(t);for(let r=0,i=0;r<t;r++)n[r]=i+=FQe(e());return n}function Zx(t,e=0){let n=[];for(;;){let r=t(),i=t();if(!i)break;e+=r;for(let s=0;s<i;s++)n.push(e+s);e+=i+1}return n}function Hoe(t){return Jx(()=>{let e=Zx(t);if(e.length)return e})}function Woe(t){let e=[];for(;;){let n=t();if(n==0)break;e.push(HQe(n,t))}for(;;){let n=t()-1;if(n<0)break;e.push(WQe(n,t))}return e.flat()}function Jx(t){let e=[];for(;;){let n=t(e.length);if(!n)break;e.push(n)}return e}function Voe(t,e,n){let r=Array(t).fill().map(()=>[]);for(let i=0;i<e;i++)zQe(t,n).forEach((s,o)=>r[o].push(s));return r}function HQe(t,e){let n=1+e(),r=e(),i=Jx(e);return Voe(i.length,1+t,e).flatMap((o,a)=>{let[c,...l]=o;return Array(i[a]).fill().map((u,d)=>{let h=d*r;return[c+d*n,l.map(g=>g+h)]})})}function WQe(t,e){let n=1+e();return Voe(n,1+t,e).map(i=>[i[0],i.slice(1)])}function VQe(t){let e=[],n=Zx(t);return i(r([]),[]),e;function r(s){let o=t(),a=Jx(()=>{let c=Zx(t).map(l=>n[l]);if(c.length)return r(c)});return{S:o,B:a,Q:s}}function i({S:s,B:o},a,c){if(!(s&4&&c===a[a.length-1])){s&2&&(c=a[a.length-1]),s&1&&e.push(a);for(let l of o)for(let u of l.Q)i(l,[...a,u],c)}}}function qQe(t){return t.toString(16).toUpperCase().padStart(2,"0")}function qoe(t){return`{${qQe(t)}}`}function GQe(t){let e=[];for(let n=0,r=t.length;n<r;){let i=t.codePointAt(n);n+=i<65536?1:2,e.push(i)}return e}function cb(t){let n=t.length;if(n<4096)return String.fromCodePoint(...t);let r=[];for(let i=0;i<n;)r.push(String.fromCodePoint(...t.slice(i,i+=4096)));return r.join("")}function KQe(t,e){let n=t.length,r=n-e.length;for(let i=0;r==0&&i<n;i++)r=t[i]-e[i];return r}var YQe="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 Xx=44032,Y8=4352,Q8=4449,Z8=4519,Goe=19,Koe=21,lb=28,J8=Koe*lb,QQe=Goe*J8,ZQe=Xx+QQe,JQe=Y8+Goe,XQe=Q8+Koe,eZe=Z8+lb;function y3(t){return t>>24&255}function Yoe(t){return t&16777215}let dD,oK,fD,uE;function tZe(){let t=zoe(YQe);dD=new Map(Hoe(t).flatMap((e,n)=>e.map(r=>[r,n+1<<24]))),oK=new Set(Zx(t)),fD=new Map,uE=new Map;for(let[e,n]of Woe(t)){if(!oK.has(e)&&n.length==2){let[r,i]=n,s=uE.get(r);s||(s=new Map,uE.set(r,s)),s.set(i,e)}fD.set(e,n.reverse())}}function Qoe(t){return t>=Xx&&t<ZQe}function nZe(t,e){if(t>=Y8&&t<JQe&&e>=Q8&&e<XQe)return Xx+(t-Y8)*J8+(e-Q8)*lb;if(Qoe(t)&&e>Z8&&e<eZe&&(t-Xx)%lb==0)return t+(e-Z8);{let n=uE.get(t);return n&&(n=n.get(e),n)?n:-1}}function Zoe(t){dD||tZe();let e=[],n=[],r=!1;function i(s){let o=dD.get(s);o&&(r=!0,s|=o),e.push(s)}for(let s of t)for(;;){if(s<128)e.push(s);else if(Qoe(s)){let o=s-Xx,a=o/J8|0,c=o%J8/lb|0,l=o%lb;i(Y8+a),i(Q8+c),l>0&&i(Z8+l)}else{let o=fD.get(s);o?n.push(...o):i(s)}if(!n.length)break;s=n.pop()}if(r&&e.length>1){let s=y3(e[0]);for(let o=1;o<e.length;o++){let a=y3(e[o]);if(a==0||s<=a){s=a;continue}let c=o-1;for(;;){let l=e[c+1];if(e[c+1]=e[c],e[c]=l,!c||(s=y3(e[--c]),s<=a))break}s=y3(e[o])}}return e}function rZe(t){let e=[],n=[],r=-1,i=0;for(let s of t){let o=y3(s),a=Yoe(s);if(r==-1)o==0?r=a:e.push(a);else if(i>0&&i>=o)o==0?(e.push(r,...n),n.length=0,r=a):n.push(a),i=o;else{let c=nZe(r,a);c>=0?r=c:i==0&&o==0?(e.push(r),r=a):(n.push(a),i=o)}}return r>=0&&e.push(r,...n),e}function Joe(t){return Zoe(t).map(Yoe)}function iZe(t){return rZe(Zoe(t))}const aK=45,Xoe=".",eae=65039,tae=1,X8=t=>Array.from(t);function e6(t,e){return t.P.has(e)||t.Q.has(e)}class sZe extends Array{get is_emoji(){return!0}}let hD,nae,ng,pD,rae,$y,fR,Yw,Bm,cK,mD;function Hj(){if(hD)return;let t=zoe($Qe);const e=()=>Zx(t),n=()=>new Set(e()),r=(u,d)=>d.forEach(h=>u.add(h));hD=new Map(Woe(t)),nae=n(),ng=e(),pD=new Set(e().map(u=>ng[u])),ng=new Set(ng),rae=n(),n();let i=Hoe(t),s=t();const o=()=>{let u=new Set;return e().forEach(d=>r(u,i[d])),r(u,e()),u};$y=Jx(u=>{let d=Jx(t).map(h=>h+96);if(d.length){let h=u>=s;d[0]-=32,d=cb(d),h&&(d=`Restricted[${d}]`);let g=o(),w=o(),v=!t();return{N:d,P:g,Q:w,M:v,R:h}}}),fR=n(),Yw=new Map;let a=e().concat(X8(fR)).sort((u,d)=>u-d);a.forEach((u,d)=>{let h=t(),g=a[d]=h?a[d-h]:{V:[],M:new Map};g.V.push(u),fR.has(u)||Yw.set(u,g)});for(let{V:u,M:d}of new Set(Yw.values())){let h=[];for(let w of u){let v=$y.filter(T=>e6(T,w)),_=h.find(({G:T})=>v.some(b=>T.has(b)));_||(_={G:new Set,V:[]},h.push(_)),_.V.push(w),r(_.G,v)}let g=h.flatMap(w=>X8(w.G));for(let{G:w,V:v}of h){let _=new Set(g.filter(T=>!w.has(T)));for(let T of v)d.set(T,_)}}Bm=new Set;let c=new Set;const l=u=>Bm.has(u)?c.add(u):Bm.add(u);for(let u of $y){for(let d of u.P)l(d);for(let d of u.Q)l(d)}for(let u of Bm)!Yw.has(u)&&!c.has(u)&&Yw.set(u,tae);r(Bm,Joe(Bm)),cK=VQe(t).map(u=>sZe.from(u)).sort(KQe),mD=new Map;for(let u of cK){let d=[mD];for(let h of u){let g=d.map(w=>{let v=w.get(h);return v||(v=new Map,w.set(h,v)),v});h===eae?d.push(...g):d=g}for(let h of d)h.V=u}}function Wj(t){return(iae(t)?"":`${Vj(dT([t]))} `)+qoe(t)}function Vj(t){return`"${t}"‎`}function oZe(t){if(t.length>=4&&t[2]==aK&&t[3]==aK)throw new Error(`invalid label extension: "${cb(t.slice(0,4))}"`)}function aZe(t){for(let n=t.lastIndexOf(95);n>0;)if(t[--n]!==95)throw new Error("underscore allowed only at start")}function cZe(t){let e=t[0],n=iK.get(e);if(n)throw W3(`leading ${n}`);let r=t.length,i=-1;for(let s=1;s<r;s++){e=t[s];let o=iK.get(e);if(o){if(i==s)throw W3(`${n} + ${o}`);i=s+1,n=o}}if(i==r)throw W3(`trailing ${n}`)}function dT(t,e=1/0,n=qoe){let r=[];lZe(t[0])&&r.push("◌"),t.length>e&&(e>>=1,t=[...t.slice(0,e),8230,...t.slice(-e)]);let i=0,s=t.length;for(let o=0;o<s;o++){let a=t[o];iae(a)&&(r.push(cb(t.slice(i,o))),r.push(n(a)),i=o+1)}return r.push(cb(t.slice(i,s))),r.join("")}function lZe(t){return Hj(),ng.has(t)}function iae(t){return Hj(),rae.has(t)}function uZe(t){return pZe(dZe(t,iZe,wZe))}function dZe(t,e,n){if(!t)return[];Hj();let r=0;return t.split(Xoe).map(i=>{let s=GQe(i),o={input:s,offset:r};r+=s.length+1;try{let a=o.tokens=gZe(s,e,n),c=a.length,l;if(!c)throw new Error("empty label");let u=o.output=a.flat();if(aZe(u),!(o.emoji=c>1||a[0].is_emoji)&&u.every(h=>h<128))oZe(u),l="ASCII";else{let h=a.flatMap(g=>g.is_emoji?[]:g);if(!h.length)l="Emoji";else{if(ng.has(u[0]))throw W3("leading combining mark");for(let v=1;v<c;v++){let _=a[v];if(!_.is_emoji&&ng.has(_[0]))throw W3(`emoji + combining mark: "${cb(a[v-1])} + ${dT([_[0]])}"`)}cZe(u);let g=X8(new Set(h)),[w]=hZe(g);mZe(w,h),fZe(w,g),l=w.N}}o.type=l}catch(a){o.error=a}return o})}function fZe(t,e){let n,r=[];for(let i of e){let s=Yw.get(i);if(s===tae)return;if(s){let o=s.M.get(i);if(n=n?n.filter(a=>o.has(a)):X8(o),!n.length)return}else r.push(i)}if(n){for(let i of n)if(r.every(s=>e6(i,s)))throw new Error(`whole-script confusable: ${t.N}/${i.N}`)}}function hZe(t){let e=$y;for(let n of t){let r=e.filter(i=>e6(i,n));if(!r.length)throw $y.some(i=>e6(i,n))?oae(e[0],n):sae(n);if(e=r,r.length==1)break}return e}function pZe(t){return t.map(({input:e,error:n,output:r})=>{if(n){let i=n.message;throw new Error(t.length==1?i:`Invalid label ${Vj(dT(e,63))}: ${i}`)}return cb(r)}).join(Xoe)}function sae(t){return new Error(`disallowed character: ${Wj(t)}`)}function oae(t,e){let n=Wj(e),r=$y.find(i=>i.P.has(e));return r&&(n=`${r.N} ${n}`),new Error(`illegal mixture: ${t.N} + ${n}`)}function W3(t){return new Error(`illegal placement: ${t}`)}function mZe(t,e){for(let n of e)if(!e6(t,n))throw oae(t,n);if(t.M){let n=Joe(e);for(let r=1,i=n.length;r<i;r++)if(pD.has(n[r])){let s=r+1;for(let o;s<i&&pD.has(o=n[s]);s++)for(let a=r;a<s;a++)if(n[a]==o)throw new Error(`duplicate non-spacing marks: ${Wj(o)}`);if(s-r>sK)throw new Error(`excessive non-spacing marks: ${Vj(dT(n.slice(r-1,s)))} (${s-r}/${sK})`);r=s}}}function gZe(t,e,n){let r=[],i=[];for(t=t.slice().reverse();t.length;){let s=yZe(t);if(s)i.length&&(r.push(e(i)),i=[]),r.push(n(s));else{let o=t.pop();if(Bm.has(o))i.push(o);else{let a=hD.get(o);if(a)i.push(...a);else if(!nae.has(o))throw sae(o)}}}return i.length&&r.push(e(i)),r}function wZe(t){return t.filter(e=>e!=eae)}function yZe(t,e){let n=mD,r,i=t.length;for(;i&&(n=n.get(t[--i]),!!n);){let{V:s}=n;s&&(r=s,t.length=i)}return r}const vZe=t=>uZe(t),Ju=t=>{let e="";for(let n=0;n<32;n+=1)e+="00";if(t){const r=vZe(t).split(".");for(let i=r.length-1;i>=0;i-=1){const s=uc(r[i]).slice(2);e=uc(`0x${e}${s}`).slice(2)}}return`0x${e}`};var _A=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};class bZe{constructor(e,n){this.contract=new Cg(MQe,n??K8.main,e),this.context=e}getOwner(e){return _A(this,void 0,void 0,function*(){try{return this.contract.methods.owner(Ju(e)).call()}catch{throw new Error}})}getTTL(e){return _A(this,void 0,void 0,function*(){try{return this.contract.methods.ttl(Ju(e)).call()}catch{throw new Error}})}recordExists(e){return _A(this,void 0,void 0,function*(){try{return this.contract.methods.recordExists(Ju(e)).call()}catch{throw new Error}})}getResolver(e){return _A(this,void 0,void 0,function*(){try{return this.contract.methods.resolver(Ju(e)).call().then(n=>{if(typeof n=="string")return new Cg(BQe,n,this.context);throw new Error})}catch{throw new Error}})}get events(){return this.contract.events}}var Ef=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};class xZe{constructor(e){this.registry=e}getResolverContractAdapter(e){return Ef(this,void 0,void 0,function*(){return this.registry.getResolver(e)})}checkInterfaceSupport(e,n){var r,i;return Ef(this,void 0,void 0,function*(){if(mn(rK[n]))throw new lG((r=e.options.address)!==null&&r!==void 0?r:"",n);if(!(yield e.methods.supportsInterface(rK[n]).call()))throw new lG((i=e.options.address)!==null&&i!==void 0?i:"",n)})}supportsInterface(e,n){var r;return Ef(this,void 0,void 0,function*(){const i=yield this.getResolverContractAdapter(e);let s=n;if(!Rr(s)){if(s=(r=y4(n))!==null&&r!==void 0?r:"",n==="")throw new Error("Invalid interface Id");s=s.slice(0,10)}return i.methods.supportsInterface(s).call()})}getAddress(e,n=60){return Ef(this,void 0,void 0,function*(){const r=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(r,Mw.addr),r.methods.addr(Ju(e),n).call()})}getPubkey(e){return Ef(this,void 0,void 0,function*(){const n=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(n,Mw.pubkey),n.methods.pubkey(Ju(e)).call()})}getContenthash(e){return Ef(this,void 0,void 0,function*(){const n=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(n,Mw.contenthash),n.methods.contenthash(Ju(e)).call()})}setAddress(e,n,r){return Ef(this,void 0,void 0,function*(){const i=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(i,Mw.setAddr),i.methods.setAddr(Ju(e),n).send(r)})}getText(e,n){return Ef(this,void 0,void 0,function*(){const r=yield this.getResolverContractAdapter(e);return yield this.checkInterfaceSupport(r,Mw.text),r.methods.text(Ju(e),n).call()})}getName(e,n=!0){return Ef(this,void 0,void 0,function*(){const r=`${e.toLowerCase().substring(2)}.addr.reverse`,i=yield this.getResolverContractAdapter(r);return n&&(yield this.checkInterfaceSupport(i,Mw.name)),i.methods.name(Ju(r)).call()})}}var Wc=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};class aae extends _a{constructor(e,n){super(n??""),this.registryAddress=e??K8.main,this._registry=new bZe(this.getContextObject(),e),this._resolver=new xZe(this._registry)}getResolver(e){return Wc(this,void 0,void 0,function*(){return this._registry.getResolver(e)})}recordExists(e){return Wc(this,void 0,void 0,function*(){return this._registry.recordExists(e)})}getTTL(e){return Wc(this,void 0,void 0,function*(){return this._registry.getTTL(e)})}getOwner(e){return Wc(this,void 0,void 0,function*(){return this._registry.getOwner(e)})}getAddress(e,n=60){return Wc(this,void 0,void 0,function*(){return this._resolver.getAddress(e,n)})}getText(e,n){return Wc(this,void 0,void 0,function*(){return lc(e)?this._resolver.getText(yield this._resolver.getName(e,!1),n):this._resolver.getText(e,n)})}getName(e,n=!0){return Wc(this,void 0,void 0,function*(){return this._resolver.getName(e,n)})}getPubkey(e){return Wc(this,void 0,void 0,function*(){return this._resolver.getPubkey(e)})}getContenthash(e){return Wc(this,void 0,void 0,function*(){return this._resolver.getContenthash(e)})}checkNetwork(){return Wc(this,void 0,void 0,function*(){const e=Date.now()/1e3;if(!this._lastSyncCheck||e-this._lastSyncCheck>3600){const i=yield tQe(this);if(!(typeof i=="boolean"&&!i))throw new Kze;this._lastSyncCheck=e}if(this._detectedAddress)return this._detectedAddress;const n=yield Rj(this,Object.assign(Object.assign({},this.defaultReturnFormat),{number:ul.HEX})),r=K8[DQe[n]];if(typeof r>"u")throw new Gze(n);return this._detectedAddress=r,this._detectedAddress})}supportsInterface(e,n){return Wc(this,void 0,void 0,function*(){return this._resolver.supportsInterface(e,n)})}get events(){return this._registry.events}setAddress(e,n,r){return Wc(this,void 0,void 0,function*(){return this._resolver.setAddress(e,n,r)})}}var Lh=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};const _Ze=t=>Lh(void 0,void 0,void 0,function*(){return(yield BKe(t)).map(Fd)}),AZe=(t,e)=>Lh(void 0,void 0,void 0,function*(){yn.validate(["string"],[e]);const n=yield $Ke(t,e);return Fd(n)}),EZe=(t,e,n,r)=>Lh(void 0,void 0,void 0,function*(){return yn.validate(["address","string","uint"],[e,n,r]),jKe(t,e,n,r)}),CZe=(t,e)=>Lh(void 0,void 0,void 0,function*(){return yn.validate(["address"],[e]),LKe(t,e)}),SZe=(t,e,n)=>Lh(void 0,void 0,void 0,function*(){return yn.validate(["string","string"],[e,n]),UKe(t,e,n)}),TZe=(t,e,n)=>Lh(void 0,void 0,void 0,function*(){const r=Da(e,_n);return FKe(t,r,n)}),IZe=(t,e,n)=>Lh(void 0,void 0,void 0,function*(){const r=Da(e,_n);return zKe(t,r,n)}),kZe=(t,e,n,r)=>Lh(void 0,void 0,void 0,function*(){yn.validate(["string","address","string"],[e,n,r]);const i=Rr(e)?e:gu(e);return HKe(t,i,n,r)}),RZe=(t,e,n)=>Lh(void 0,void 0,void 0,function*(){yn.validate(["string","string"],[e,n]);const r=Rr(e)?e:gu(e);return WKe(t,r,n)});var Cf=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};class cae extends _a{getAccounts(){return Cf(this,void 0,void 0,function*(){return _Ze(this.requestManager)})}newAccount(e){return Cf(this,void 0,void 0,function*(){return AZe(this.requestManager,e)})}unlockAccount(e,n,r){return Cf(this,void 0,void 0,function*(){return EZe(this.requestManager,e,n,r)})}lockAccount(e){return Cf(this,void 0,void 0,function*(){return CZe(this.requestManager,e)})}importRawKey(e,n){return Cf(this,void 0,void 0,function*(){return SZe(this.requestManager,e,n)})}sendTransaction(e,n){return Cf(this,void 0,void 0,function*(){return TZe(this.requestManager,e,n)})}signTransaction(e,n){return Cf(this,void 0,void 0,function*(){return IZe(this.requestManager,e,n)})}sign(e,n,r){return Cf(this,void 0,void 0,function*(){return kZe(this.requestManager,e,n,r)})}ecRecover(e,n){return Cf(this,void 0,void 0,function*(){return RZe(this.requestManager,e,n)})}}var jy;(function(t){t.HTTPS="https",t.WebSocket="wss"})(jy||(jy={}));var Yc;(function(t){t.ETH_MAINNET="eth_mainnet",t.ETH_GOERLI="eth_goerli",t.ETH_SEPOLIA="eth_sepolia",t.ETH_HOLESKY="eth_holesky",t.POLYGON_MAINNET="polygon_mainnet",t.POLYGON_MUMBAI="polygon_mumbai",t.POLYGON_AMONY="polygon_amony",t.ARBITRUM_MAINNET="arbitrum_mainnet",t.ARBITRUM_SEPOLIA="arbitrum_sepolia",t.BASE_MAINNET="base_mainnet",t.BASE_SEPOLIA="base_sepolia",t.OPTIMISM_MAINNET="optimism_mainnet",t.OPTIMISM_SEPOLIA="optimism_sepolia",t.BNB_MAINNET="bnb_mainnet",t.BNB_TESTNET="bnb_testnet"})(Yc||(Yc={}));const NZe=1300;class PZe extends bn{constructor(){super("Too many requests, Quicknode has reached its rate limit."),this.code=NZe}}var OZe=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};class DZe extends pj{constructor(e,n,r,i){super(),this.transport=n,n===jy.HTTPS?this.provider=new eT(this.getRPCURL(e,n,r,i)):n===jy.WebSocket&&(this.provider=new mse(this.getRPCURL(e,n,r,i)))}request(e,n){return OZe(this,void 0,void 0,function*(){if(this.transport===jy.HTTPS){const r=yield this.provider.request(e,n);if(typeof r=="object"&&!$e(r)&&"error"in r&&!$e(r.error)&&"code"in r.error&&r.error.code===429)throw new PZe;return r}return this.provider.request(e)})}getStatus(){return this.provider.getStatus()}supportsSubscriptions(){return this.provider.supportsSubscriptions()}once(e,n){var r;!((r=this.provider)===null||r===void 0)&&r.once&&this.provider.once(e,n)}removeAllListeners(e){var n;!((n=this.provider)===null||n===void 0)&&n.removeAllListeners&&this.provider.removeAllListeners(e)}connect(){var e;!((e=this.provider)===null||e===void 0)&&e.connect&&this.provider.connect()}disconnect(e,n){var r;!((r=this.provider)===null||r===void 0)&&r.disconnect&&this.provider.disconnect(e,n)}reset(){var e;!((e=this.provider)===null||e===void 0)&&e.reset&&this.provider.reset()}on(e,n){this.provider&&this.provider.on(e,n)}removeListener(e,n){this.provider&&this.provider.removeListener(e,n)}}const Ss=t=>t!==void 0&&t.trim().length>0;class MZe extends DZe{constructor(e=Yc.ETH_MAINNET,n=jy.HTTPS,r="",i=""){super(e,n,r,i)}getRPCURL(e,n,r,i){let s="",o="";switch(e){case Yc.ETH_MAINNET:s=Ss(i)?i:"powerful-holy-bush.quiknode.pro",o=Ss(r)?r:"3240624a343867035925ff7561eb60dfdba2a668";break;case Yc.ETH_SEPOLIA:s=Ss(i)?i:"dimensional-fabled-glitter.ethereum-sepolia.quiknode.pro",o=Ss(r)?r:"382a3b5a4b938f2d6e8686c19af4b22921fde2cd";break;case Yc.ETH_HOLESKY:s=Ss(i)?i:"yolo-morning-card.ethereum-holesky.quiknode.pro",o=Ss(r)?r:"481ebe70638c4dcf176af617a16d02ab866b9af9";break;case Yc.ARBITRUM_MAINNET:s=Ss(i)?i:"autumn-divine-dinghy.arbitrum-mainnet.quiknode.pro",o=Ss(r)?r:"a5d7bfbf60b5ae9ce3628e53d69ef50d529e9a8c";break;case Yc.ARBITRUM_SEPOLIA:s=Ss(i)?i:"few-patient-pond.arbitrum-sepolia.quiknode.pro",o=Ss(r)?r:"3be985450970628c860b959c65cd2642dcafe53c";break;case Yc.BNB_MAINNET:s=Ss(i)?i:"purple-empty-reel.bsc.quiknode.pro",o=Ss(r)?r:"ebf6c532961e21f092ff2facce1ec4c89c540158";break;case Yc.BNB_TESTNET:s=Ss(i)?i:"floral-rough-scion.bsc-testnet.quiknode.pro",o=Ss(r)?r:"5b297e5acff5f81f4c37ebf6f235f7299b6f9d28";break;case Yc.POLYGON_MAINNET:s=Ss(i)?i:"small-chaotic-moon.matic.quiknode.pro",o=Ss(r)?r:"847569f8a017e84d985e10d0f44365d965a951f1";break;case Yc.POLYGON_AMONY:s=Ss(i)?i:"prettiest-side-shape.matic-amoy.quiknode.pro",o=Ss(r)?r:"79a9476eea661d4f82de614db1d8a895b14b881c";break;default:throw new Error("Network info not avalible.")}return`${n}://${s}/${o}`}}const BZe=new MZe,$Ze={encodeEventSignature:Dj,encodeFunctionCall:KYe,encodeFunctionSignature:Qx,encodeParameter:lD,encodeParameters:cT,decodeParameter:koe,decodeParameters:A4,decodeLog:Roe};var G2=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})};const jZe=t=>{const e=(o,a)=>G2(void 0,void 0,void 0,function*(){const c=yield IQe(o,t),l=et({format:"bytes"},a,_n);return UGe(c,l)}),n=o=>{const a=Sj(o);return Object.assign(Object.assign({},a),{signTransaction:c=>G2(void 0,void 0,void 0,function*(){return e(c,a.privateKey)})})},r=(o,a,c)=>G2(void 0,void 0,void 0,function*(){var l;const u=yield WGe(o,a,(l=c==null?void 0:c.nonStrict)!==null&&l!==void 0?l:!0);return Object.assign(Object.assign({},u),{signTransaction:d=>G2(void 0,void 0,void 0,function*(){return e(d,u.privateKey)})})}),i=()=>{const o=HGe();return Object.assign(Object.assign({},o),{signTransaction:a=>G2(void 0,void 0,void 0,function*(){return e(a,o.privateKey)})})},s=new L8({create:i,privateKeyToAccount:n,decrypt:r});return{signTransaction:e,create:i,privateKeyToAccount:n,decrypt:r,recoverTransaction:FGe,hashMessage:Cj,sign:Kse,recover:eD,encrypt:Yse,wallet:s,privateKeyToAddress:rT,parseAndValidatePrivateKey:Hb,privateKeyToPublicKey:zGe}},LZe={version:"4.11.1"};var UZe=function(t,e,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{l(r.next(u))}catch(d){o(d)}}function c(u){try{l(r.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})},eS;(function(t){t.eip6963announceProvider="eip6963:announceProvider",t.eip6963requestProvider="eip6963:requestProvider"})(eS||(eS={}));const hR=new Map,lae="web3:providersMapUpdated",FZe=()=>UZe(void 0,void 0,void 0,function*(){return new Promise((t,e)=>{typeof window>"u"&&e(new Error("window object not available, EIP-6963 is intended to be used within a browser")),window.addEventListener(eS.eip6963announceProvider,n=>{hR.set(n.detail.info.uuid,n.detail);const r=new CustomEvent(lae,{detail:hR});window.dispatchEvent(r),t(hR)}),window.dispatchEvent(new Event(eS.eip6963requestProvider))})}),zZe=t=>{if(typeof window>"u")throw new Error("window object not available, EIP-6963 is intended to be used within a browser");window.addEventListener(lae,t)};class Eu extends _a{constructor(e=BZe){var n;(mn(e)||typeof e=="string"&&e.trim()===""||typeof e!="string"&&!j8(e)&&!e.provider)&&console.warn("NOTE: web3.js is running without provider. You need to pass a provider in order to interact with the network!");let r={};typeof e=="string"||j8(e)?r.provider=e:e?r=e:r={},r.registeredSubscriptions=Object.assign(Object.assign({},uD),(n=r.registeredSubscriptions)!==null&&n!==void 0?n:{}),super(r);const i=jZe(this);this._wallet=i.wallet,this._accountProvider=i,this.utils=pse;const s=this;class o extends Cg{constructor(l,u,d,h,g){if(qp(u)&&qp(d))throw new uG("Should not provide options at both 2nd and 3rd parameters");let w,v={},_,T;if(!mn(u)&&typeof u!="object"&&typeof u!="string")throw new uG;if(typeof u=="string"&&(w=u),qp(u)?v=u:qp(d)?v=d:v={},u instanceof _a?_=u:d instanceof _a?_=d:h instanceof _a?_=h:_=s.getContextObject(),g?T=g:$f(d)?T=d:$f(h)&&(T=h),super(l,w,v,_,T),super.subscribeToContextEvents(s),!mn(a)){const b=a.getTransactionMiddleware();mn(b)||super.setTransactionMiddleware(b)}}}const a=s.use(lT);this.eth=Object.assign(a,{ens:s.use(aae,K8.main),Iban:rs,net:s.use(roe),personal:s.use(cae),Contract:o,abi:$Ze,accounts:i})}}Eu.version=LZe.version;Eu.utils=pse;Eu.requestEIP6963Providers=FZe;Eu.onNewProviderDiscovered=zZe;Eu.modules={Web3Eth:lT,Iban:rs,Net:roe,ENS:aae,Personal:cae};//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var uae;function bt(){return uae.apply(null,arguments)}function HZe(t){uae=t}function wu(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function Sg(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function Ar(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function qj(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;var e;for(e in t)if(Ar(t,e))return!1;return!0}function ca(t){return t===void 0}function kh(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function E4(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function dae(t,e){var n=[],r,i=t.length;for(r=0;r<i;++r)n.push(e(t[r],r));return n}function Kp(t,e){for(var n in e)Ar(e,n)&&(t[n]=e[n]);return Ar(e,"toString")&&(t.toString=e.toString),Ar(e,"valueOf")&&(t.valueOf=e.valueOf),t}function zd(t,e,n,r){return Dae(t,e,n,r,!0).utc()}function WZe(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Un(t){return t._pf==null&&(t._pf=WZe()),t._pf}var gD;Array.prototype.some?gD=Array.prototype.some:gD=function(t){var e=Object(this),n=e.length>>>0,r;for(r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};function Gj(t){var e=null,n=!1,r=t._d&&!isNaN(t._d.getTime());if(r&&(e=Un(t),n=gD.call(e.parsedDateParts,function(i){return i!=null}),r=e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n),t._strict&&(r=r&&e.charsLeftOver===0&&e.unusedTokens.length===0&&e.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(t))t._isValid=r;else return r;return t._isValid}function fT(t){var e=zd(NaN);return t!=null?Kp(Un(e),t):Un(e).userInvalidated=!0,e}var lK=bt.momentProperties=[],pR=!1;function Kj(t,e){var n,r,i,s=lK.length;if(ca(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),ca(e._i)||(t._i=e._i),ca(e._f)||(t._f=e._f),ca(e._l)||(t._l=e._l),ca(e._strict)||(t._strict=e._strict),ca(e._tzm)||(t._tzm=e._tzm),ca(e._isUTC)||(t._isUTC=e._isUTC),ca(e._offset)||(t._offset=e._offset),ca(e._pf)||(t._pf=Un(e)),ca(e._locale)||(t._locale=e._locale),s>0)for(n=0;n<s;n++)r=lK[n],i=e[r],ca(i)||(t[r]=i);return t}function C4(t){Kj(this,t),this._d=new Date(t._d!=null?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),pR===!1&&(pR=!0,bt.updateOffset(this),pR=!1)}function yu(t){return t instanceof C4||t!=null&&t._isAMomentObject!=null}function fae(t){bt.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+t)}function Cl(t,e){var n=!0;return Kp(function(){if(bt.deprecationHandler!=null&&bt.deprecationHandler(null,t),n){var r=[],i,s,o,a=arguments.length;for(s=0;s<a;s++){if(i="",typeof arguments[s]=="object"){i+=`
[`+s+"] ";for(o in arguments[0])Ar(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[s];r.push(i)}fae(t+`
Arguments: `+Array.prototype.slice.call(r).join("")+`
`+new Error().stack),n=!1}return e.apply(this,arguments)},e)}var uK={};function hae(t,e){bt.deprecationHandler!=null&&bt.deprecationHandler(t,e),uK[t]||(fae(e),uK[t]=!0)}bt.suppressDeprecationWarnings=!1;bt.deprecationHandler=null;function Hd(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function VZe(t){var e,n;for(n in t)Ar(t,n)&&(e=t[n],Hd(e)?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function wD(t,e){var n=Kp({},t),r;for(r in e)Ar(e,r)&&(Sg(t[r])&&Sg(e[r])?(n[r]={},Kp(n[r],t[r]),Kp(n[r],e[r])):e[r]!=null?n[r]=e[r]:delete n[r]);for(r in t)Ar(t,r)&&!Ar(e,r)&&Sg(t[r])&&(n[r]=Kp({},n[r]));return n}function Yj(t){t!=null&&this.set(t)}var yD;Object.keys?yD=Object.keys:yD=function(t){var e,n=[];for(e in t)Ar(t,e)&&n.push(e);return n};var qZe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function GZe(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return Hd(r)?r.call(e,n):r}function Rd(t,e,n){var r=""+Math.abs(t),i=e-r.length,s=t>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Qj=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,AA=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,mR={},Ly={};function en(t,e,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),t&&(Ly[t]=i),e&&(Ly[e[0]]=function(){return Rd(i.apply(this,arguments),e[1],e[2])}),n&&(Ly[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function KZe(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function YZe(t){var e=t.match(Qj),n,r;for(n=0,r=e.length;n<r;n++)Ly[e[n]]?e[n]=Ly[e[n]]:e[n]=KZe(e[n]);return function(i){var s="",o;for(o=0;o<r;o++)s+=Hd(e[o])?e[o].call(i,t):e[o];return s}}function dE(t,e){return t.isValid()?(e=pae(e,t.localeData()),mR[e]=mR[e]||YZe(e),mR[e](t)):t.localeData().invalidDate()}function pae(t,e){var n=5;function r(i){return e.longDateFormat(i)||i}for(AA.lastIndex=0;n>=0&&AA.test(t);)t=t.replace(AA,r),AA.lastIndex=0,n-=1;return t}var QZe={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ZZe(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(Qj).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[t])}var JZe="Invalid date";function XZe(){return this._invalidDate}var eJe="%d",tJe=/\d{1,2}/;function nJe(t){return this._ordinal.replace("%d",t)}var rJe={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function iJe(t,e,n,r){var i=this._relativeTime[n];return Hd(i)?i(t,e,n,r):i.replace(/%d/i,t)}function sJe(t,e){var n=this._relativeTime[t>0?"future":"past"];return Hd(n)?n(e):n.replace(/%s/i,e)}var dK={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Sl(t){return typeof t=="string"?dK[t]||dK[t.toLowerCase()]:void 0}function Zj(t){var e={},n,r;for(r in t)Ar(t,r)&&(n=Sl(r),n&&(e[n]=t[r]));return e}var oJe={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function aJe(t){var e=[],n;for(n in t)Ar(t,n)&&e.push({unit:n,priority:oJe[n]});return e.sort(function(r,i){return r.priority-i.priority}),e}var mae=/\d/,xc=/\d\d/,gae=/\d{3}/,Jj=/\d{4}/,hT=/[+-]?\d{6}/,ui=/\d\d?/,wae=/\d\d\d\d?/,yae=/\d\d\d\d\d\d?/,pT=/\d{1,3}/,Xj=/\d{1,4}/,mT=/[+-]?\d{1,6}/,Vb=/\d+/,gT=/[+-]?\d+/,cJe=/Z|[+-]\d\d:?\d\d/gi,wT=/Z|[+-]\d\d(?::?\d\d)?/gi,lJe=/[+-]?\d+(\.\d{1,3})?/,S4=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,qb=/^[1-9]\d?/,eL=/^([1-9]\d|\d)/,tS;tS={};function Mt(t,e,n){tS[t]=Hd(e)?e:function(r,i){return r&&n?n:e}}function uJe(t,e){return Ar(tS,t)?tS[t](e._strict,e._locale):new RegExp(dJe(t))}function dJe(t){return nh(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,n,r,i,s){return n||r||i||s}))}function nh(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function cl(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function ir(t){var e=+t,n=0;return e!==0&&isFinite(e)&&(n=cl(e)),n}var vD={};function Vr(t,e){var n,r=e,i;for(typeof t=="string"&&(t=[t]),kh(e)&&(r=function(s,o){o[e]=ir(s)}),i=t.length,n=0;n<i;n++)vD[t[n]]=r}function T4(t,e){Vr(t,function(n,r,i,s){i._w=i._w||{},e(n,i._w,i,s)})}function fJe(t,e,n){e!=null&&Ar(vD,t)&&vD[t](e,n._a,n,t)}function yT(t){return t%4===0&&t%100!==0||t%400===0}var mo=0,Kf=1,rd=2,hs=3,tu=4,Yf=5,rg=6,hJe=7,pJe=8;en("Y",0,0,function(){var t=this.year();return t<=9999?Rd(t,4):"+"+t});en(0,["YY",2],0,function(){return this.year()%100});en(0,["YYYY",4],0,"year");en(0,["YYYYY",5],0,"year");en(0,["YYYYYY",6,!0],0,"year");Mt("Y",gT);Mt("YY",ui,xc);Mt("YYYY",Xj,Jj);Mt("YYYYY",mT,hT);Mt("YYYYYY",mT,hT);Vr(["YYYYY","YYYYYY"],mo);Vr("YYYY",function(t,e){e[mo]=t.length===2?bt.parseTwoDigitYear(t):ir(t)});Vr("YY",function(t,e){e[mo]=bt.parseTwoDigitYear(t)});Vr("Y",function(t,e){e[mo]=parseInt(t,10)});function V3(t){return yT(t)?366:365}bt.parseTwoDigitYear=function(t){return ir(t)+(ir(t)>68?1900:2e3)};var vae=Gb("FullYear",!0);function mJe(){return yT(this.year())}function Gb(t,e){return function(n){return n!=null?(bae(this,t,n),bt.updateOffset(this,e),this):t6(this,t)}}function t6(t,e){if(!t.isValid())return NaN;var n=t._d,r=t._isUTC;switch(e){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function bae(t,e,n){var r,i,s,o,a;if(!(!t.isValid()||isNaN(n))){switch(r=t._d,i=t._isUTC,e){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,o=t.month(),a=t.date(),a=a===29&&o===1&&!yT(s)?28:a,i?r.setUTCFullYear(s,o,a):r.setFullYear(s,o,a)}}function gJe(t){return t=Sl(t),Hd(this[t])?this[t]():this}function wJe(t,e){if(typeof t=="object"){t=Zj(t);var n=aJe(t),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](t[n[r].unit])}else if(t=Sl(t),Hd(this[t]))return this[t](e);return this}function yJe(t,e){return(t%e+e)%e}var Vi;Array.prototype.indexOf?Vi=Array.prototype.indexOf:Vi=function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};function tL(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=yJe(e,12);return t+=(e-n)/12,n===1?yT(t)?29:28:31-n%7%2}en("M",["MM",2],"Mo",function(){return this.month()+1});en("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)});en("MMMM",0,0,function(t){return this.localeData().months(this,t)});Mt("M",ui,qb);Mt("MM",ui,xc);Mt("MMM",function(t,e){return e.monthsShortRegex(t)});Mt("MMMM",function(t,e){return e.monthsRegex(t)});Vr(["M","MM"],function(t,e){e[Kf]=ir(t)-1});Vr(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);i!=null?e[Kf]=i:Un(n).invalidMonth=t});var vJe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),xae="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),_ae=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,bJe=S4,xJe=S4;function _Je(t,e){return t?wu(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||_ae).test(e)?"format":"standalone"][t.month()]:wu(this._months)?this._months:this._months.standalone}function AJe(t,e){return t?wu(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[_ae.test(e)?"format":"standalone"][t.month()]:wu(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function EJe(t,e,n){var r,i,s,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=zd([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?e==="MMM"?(i=Vi.call(this._shortMonthsParse,o),i!==-1?i:null):(i=Vi.call(this._longMonthsParse,o),i!==-1?i:null):e==="MMM"?(i=Vi.call(this._shortMonthsParse,o),i!==-1?i:(i=Vi.call(this._longMonthsParse,o),i!==-1?i:null)):(i=Vi.call(this._longMonthsParse,o),i!==-1?i:(i=Vi.call(this._shortMonthsParse,o),i!==-1?i:null))}function CJe(t,e,n){var r,i,s;if(this._monthsParseExact)return EJe.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=zd([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&e==="MMMM"&&this._longMonthsParse[r].test(t))return r;if(n&&e==="MMM"&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function Aae(t,e){if(!t.isValid())return t;if(typeof e=="string"){if(/^\d+$/.test(e))e=ir(e);else if(e=t.localeData().monthsParse(e),!kh(e))return t}var n=e,r=t.date();return r=r<29?r:Math.min(r,tL(t.year(),n)),t._isUTC?t._d.setUTCMonth(n,r):t._d.setMonth(n,r),t}function Eae(t){return t!=null?(Aae(this,t),bt.updateOffset(this,!0),this):t6(this,"Month")}function SJe(){return tL(this.year(),this.month())}function TJe(t){return this._monthsParseExact?(Ar(this,"_monthsRegex")||Cae.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(Ar(this,"_monthsShortRegex")||(this._monthsShortRegex=bJe),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function IJe(t){return this._monthsParseExact?(Ar(this,"_monthsRegex")||Cae.call(this),t?this._monthsStrictRegex:this._monthsRegex):(Ar(this,"_monthsRegex")||(this._monthsRegex=xJe),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function Cae(){function t(c,l){return l.length-c.length}var e=[],n=[],r=[],i,s,o,a;for(i=0;i<12;i++)s=zd([2e3,i]),o=nh(this.monthsShort(s,"")),a=nh(this.months(s,"")),e.push(o),n.push(a),r.push(a),r.push(o);e.sort(t),n.sort(t),r.sort(t),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function kJe(t,e,n,r,i,s,o){var a;return t<100&&t>=0?(a=new Date(t+400,e,n,r,i,s,o),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,n,r,i,s,o),a}function n6(t){var e,n;return t<100&&t>=0?(n=Array.prototype.slice.call(arguments),n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function nS(t,e,n){var r=7+e-n,i=(7+n6(t,0,r).getUTCDay()-e)%7;return-i+r-1}function Sae(t,e,n,r,i){var s=(7+n-r)%7,o=nS(t,r,i),a=1+7*(e-1)+s+o,c,l;return a<=0?(c=t-1,l=V3(c)+a):a>V3(t)?(c=t+1,l=a-V3(t)):(c=t,l=a),{year:c,dayOfYear:l}}function r6(t,e,n){var r=nS(t.year(),e,n),i=Math.floor((t.dayOfYear()-r-1)/7)+1,s,o;return i<1?(o=t.year()-1,s=i+rh(o,e,n)):i>rh(t.year(),e,n)?(s=i-rh(t.year(),e,n),o=t.year()+1):(o=t.year(),s=i),{week:s,year:o}}function rh(t,e,n){var r=nS(t,e,n),i=nS(t+1,e,n);return(V3(t)-r+i)/7}en("w",["ww",2],"wo","week");en("W",["WW",2],"Wo","isoWeek");Mt("w",ui,qb);Mt("ww",ui,xc);Mt("W",ui,qb);Mt("WW",ui,xc);T4(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=ir(t)});function RJe(t){return r6(t,this._week.dow,this._week.doy).week}var NJe={dow:0,doy:6};function PJe(){return this._week.dow}function OJe(){return this._week.doy}function DJe(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function MJe(t){var e=r6(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}en("d",0,"do","day");en("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)});en("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)});en("dddd",0,0,function(t){return this.localeData().weekdays(this,t)});en("e",0,0,"weekday");en("E",0,0,"isoWeekday");Mt("d",ui);Mt("e",ui);Mt("E",ui);Mt("dd",function(t,e){return e.weekdaysMinRegex(t)});Mt("ddd",function(t,e){return e.weekdaysShortRegex(t)});Mt("dddd",function(t,e){return e.weekdaysRegex(t)});T4(["dd","ddd","dddd"],function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);i!=null?e.d=i:Un(n).invalidWeekday=t});T4(["d","e","E"],function(t,e,n,r){e[r]=ir(t)});function BJe(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function $Je(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function nL(t,e){return t.slice(e,7).concat(t.slice(0,e))}var jJe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Tae="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),LJe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),UJe=S4,FJe=S4,zJe=S4;function HJe(t,e){var n=wu(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?nL(n,this._week.dow):t?n[t.day()]:n}function WJe(t){return t===!0?nL(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function VJe(t){return t===!0?nL(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function qJe(t,e,n){var r,i,s,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=zd([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?e==="dddd"?(i=Vi.call(this._weekdaysParse,o),i!==-1?i:null):e==="ddd"?(i=Vi.call(this._shortWeekdaysParse,o),i!==-1?i:null):(i=Vi.call(this._minWeekdaysParse,o),i!==-1?i:null):e==="dddd"?(i=Vi.call(this._weekdaysParse,o),i!==-1||(i=Vi.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=Vi.call(this._minWeekdaysParse,o),i!==-1?i:null)):e==="ddd"?(i=Vi.call(this._shortWeekdaysParse,o),i!==-1||(i=Vi.call(this._weekdaysParse,o),i!==-1)?i:(i=Vi.call(this._minWeekdaysParse,o),i!==-1?i:null)):(i=Vi.call(this._minWeekdaysParse,o),i!==-1||(i=Vi.call(this._weekdaysParse,o),i!==-1)?i:(i=Vi.call(this._shortWeekdaysParse,o),i!==-1?i:null))}function GJe(t,e,n){var r,i,s;if(this._weekdaysParseExact)return qJe.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=zd([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&e==="dddd"&&this._fullWeekdaysParse[r].test(t))return r;if(n&&e==="ddd"&&this._shortWeekdaysParse[r].test(t))return r;if(n&&e==="dd"&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function KJe(t){if(!this.isValid())return t!=null?this:NaN;var e=t6(this,"Day");return t!=null?(t=BJe(t,this.localeData()),this.add(t-e,"d")):e}function YJe(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function QJe(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=$Je(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function ZJe(t){return this._weekdaysParseExact?(Ar(this,"_weekdaysRegex")||rL.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(Ar(this,"_weekdaysRegex")||(this._weekdaysRegex=UJe),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function JJe(t){return this._weekdaysParseExact?(Ar(this,"_weekdaysRegex")||rL.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ar(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=FJe),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function XJe(t){return this._weekdaysParseExact?(Ar(this,"_weekdaysRegex")||rL.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ar(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=zJe),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function rL(){function t(u,d){return d.length-u.length}var e=[],n=[],r=[],i=[],s,o,a,c,l;for(s=0;s<7;s++)o=zd([2e3,1]).day(s),a=nh(this.weekdaysMin(o,"")),c=nh(this.weekdaysShort(o,"")),l=nh(this.weekdays(o,"")),e.push(a),n.push(c),r.push(l),i.push(a),i.push(c),i.push(l);e.sort(t),n.sort(t),r.sort(t),i.sort(t),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function iL(){return this.hours()%12||12}function eXe(){return this.hours()||24}en("H",["HH",2],0,"hour");en("h",["hh",2],0,iL);en("k",["kk",2],0,eXe);en("hmm",0,0,function(){return""+iL.apply(this)+Rd(this.minutes(),2)});en("hmmss",0,0,function(){return""+iL.apply(this)+Rd(this.minutes(),2)+Rd(this.seconds(),2)});en("Hmm",0,0,function(){return""+this.hours()+Rd(this.minutes(),2)});en("Hmmss",0,0,function(){return""+this.hours()+Rd(this.minutes(),2)+Rd(this.seconds(),2)});function Iae(t,e){en(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}Iae("a",!0);Iae("A",!1);function kae(t,e){return e._meridiemParse}Mt("a",kae);Mt("A",kae);Mt("H",ui,eL);Mt("h",ui,qb);Mt("k",ui,qb);Mt("HH",ui,xc);Mt("hh",ui,xc);Mt("kk",ui,xc);Mt("hmm",wae);Mt("hmmss",yae);Mt("Hmm",wae);Mt("Hmmss",yae);Vr(["H","HH"],hs);Vr(["k","kk"],function(t,e,n){var r=ir(t);e[hs]=r===24?0:r});Vr(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t});Vr(["h","hh"],function(t,e,n){e[hs]=ir(t),Un(n).bigHour=!0});Vr("hmm",function(t,e,n){var r=t.length-2;e[hs]=ir(t.substr(0,r)),e[tu]=ir(t.substr(r)),Un(n).bigHour=!0});Vr("hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[hs]=ir(t.substr(0,r)),e[tu]=ir(t.substr(r,2)),e[Yf]=ir(t.substr(i)),Un(n).bigHour=!0});Vr("Hmm",function(t,e,n){var r=t.length-2;e[hs]=ir(t.substr(0,r)),e[tu]=ir(t.substr(r))});Vr("Hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[hs]=ir(t.substr(0,r)),e[tu]=ir(t.substr(r,2)),e[Yf]=ir(t.substr(i))});function tXe(t){return(t+"").toLowerCase().charAt(0)==="p"}var nXe=/[ap]\.?m?\.?/i,rXe=Gb("Hours",!0);function iXe(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var Rae={calendar:qZe,longDateFormat:QZe,invalidDate:JZe,ordinal:eJe,dayOfMonthOrdinalParse:tJe,relativeTime:rJe,months:vJe,monthsShort:xae,week:NJe,weekdays:jJe,weekdaysMin:LJe,weekdaysShort:Tae,meridiemParse:nXe},hi={},K2={},i6;function sXe(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function fK(t){return t&&t.toLowerCase().replace("_","-")}function oXe(t){for(var e=0,n,r,i,s;e<t.length;){for(s=fK(t[e]).split("-"),n=s.length,r=fK(t[e+1]),r=r?r.split("-"):null;n>0;){if(i=vT(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&sXe(s,r)>=n-1)break;n--}e++}return i6}function aXe(t){return!!(t&&t.match("^[^/\\\\]*$"))}function vT(t){var e=null,n;if(hi[t]===void 0&&typeof module<"u"&&module&&module.exports&&aXe(t))try{e=i6._abbr,n=require,n("./locale/"+t),f0(e)}catch{hi[t]=null}return hi[t]}function f0(t,e){var n;return t&&(ca(e)?n=Uh(t):n=sL(t,e),n?i6=n:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),i6._abbr}function sL(t,e){if(e!==null){var n,r=Rae;if(e.abbr=t,hi[t]!=null)hae("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=hi[t]._config;else if(e.parentLocale!=null)if(hi[e.parentLocale]!=null)r=hi[e.parentLocale]._config;else if(n=vT(e.parentLocale),n!=null)r=n._config;else return K2[e.parentLocale]||(K2[e.parentLocale]=[]),K2[e.parentLocale].push({name:t,config:e}),null;return hi[t]=new Yj(wD(r,e)),K2[t]&&K2[t].forEach(function(i){sL(i.name,i.config)}),f0(t),hi[t]}else return delete hi[t],null}function cXe(t,e){if(e!=null){var n,r,i=Rae;hi[t]!=null&&hi[t].parentLocale!=null?hi[t].set(wD(hi[t]._config,e)):(r=vT(t),r!=null&&(i=r._config),e=wD(i,e),r==null&&(e.abbr=t),n=new Yj(e),n.parentLocale=hi[t],hi[t]=n),f0(t)}else hi[t]!=null&&(hi[t].parentLocale!=null?(hi[t]=hi[t].parentLocale,t===f0()&&f0(t)):hi[t]!=null&&delete hi[t]);return hi[t]}function Uh(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return i6;if(!wu(t)){if(e=vT(t),e)return e;t=[t]}return oXe(t)}function lXe(){return yD(hi)}function oL(t){var e,n=t._a;return n&&Un(t).overflow===-2&&(e=n[Kf]<0||n[Kf]>11?Kf:n[rd]<1||n[rd]>tL(n[mo],n[Kf])?rd:n[hs]<0||n[hs]>24||n[hs]===24&&(n[tu]!==0||n[Yf]!==0||n[rg]!==0)?hs:n[tu]<0||n[tu]>59?tu:n[Yf]<0||n[Yf]>59?Yf:n[rg]<0||n[rg]>999?rg:-1,Un(t)._overflowDayOfYear&&(e<mo||e>rd)&&(e=rd),Un(t)._overflowWeeks&&e===-1&&(e=hJe),Un(t)._overflowWeekday&&e===-1&&(e=pJe),Un(t).overflow=e),t}var uXe=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dXe=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,fXe=/Z|[+-]\d\d(?::?\d\d)?/,EA=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],gR=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],hXe=/^\/?Date\((-?\d+)/i,pXe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,mXe={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Nae(t){var e,n,r=t._i,i=uXe.exec(r)||dXe.exec(r),s,o,a,c,l=EA.length,u=gR.length;if(i){for(Un(t).iso=!0,e=0,n=l;e<n;e++)if(EA[e][1].exec(i[1])){o=EA[e][0],s=EA[e][2]!==!1;break}if(o==null){t._isValid=!1;return}if(i[3]){for(e=0,n=u;e<n;e++)if(gR[e][1].exec(i[3])){a=(i[2]||" ")+gR[e][0];break}if(a==null){t._isValid=!1;return}}if(!s&&a!=null){t._isValid=!1;return}if(i[4])if(fXe.exec(i[4]))c="Z";else{t._isValid=!1;return}t._f=o+(a||"")+(c||""),cL(t)}else t._isValid=!1}function gXe(t,e,n,r,i,s){var o=[wXe(t),xae.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return s&&o.push(parseInt(s,10)),o}function wXe(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function yXe(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function vXe(t,e,n){if(t){var r=Tae.indexOf(t),i=new Date(e[0],e[1],e[2]).getDay();if(r!==i)return Un(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function bXe(t,e,n){if(t)return mXe[t];if(e)return 0;var r=parseInt(n,10),i=r%100,s=(r-i)/100;return s*60+i}function Pae(t){var e=pXe.exec(yXe(t._i)),n;if(e){if(n=gXe(e[4],e[3],e[2],e[5],e[6],e[7]),!vXe(e[1],n,t))return;t._a=n,t._tzm=bXe(e[8],e[9],e[10]),t._d=n6.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),Un(t).rfc2822=!0}else t._isValid=!1}function xXe(t){var e=hXe.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}if(Nae(t),t._isValid===!1)delete t._isValid;else return;if(Pae(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:bt.createFromInputFallback(t)}bt.createFromInputFallback=Cl("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function Qw(t,e,n){return t??e??n}function _Xe(t){var e=new Date(bt.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function aL(t){var e,n,r=[],i,s,o;if(!t._d){for(i=_Xe(t),t._w&&t._a[rd]==null&&t._a[Kf]==null&&AXe(t),t._dayOfYear!=null&&(o=Qw(t._a[mo],i[mo]),(t._dayOfYear>V3(o)||t._dayOfYear===0)&&(Un(t)._overflowDayOfYear=!0),n=n6(o,0,t._dayOfYear),t._a[Kf]=n.getUTCMonth(),t._a[rd]=n.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=r[e]=i[e];for(;e<7;e++)t._a[e]=r[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[hs]===24&&t._a[tu]===0&&t._a[Yf]===0&&t._a[rg]===0&&(t._nextDay=!0,t._a[hs]=0),t._d=(t._useUTC?n6:kJe).apply(null,r),s=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[hs]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==s&&(Un(t).weekdayMismatch=!0)}}function AXe(t){var e,n,r,i,s,o,a,c,l;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(s=1,o=4,n=Qw(e.GG,t._a[mo],r6(li(),1,4).year),r=Qw(e.W,1),i=Qw(e.E,1),(i<1||i>7)&&(c=!0)):(s=t._locale._week.dow,o=t._locale._week.doy,l=r6(li(),s,o),n=Qw(e.gg,t._a[mo],l.year),r=Qw(e.w,l.week),e.d!=null?(i=e.d,(i<0||i>6)&&(c=!0)):e.e!=null?(i=e.e+s,(e.e<0||e.e>6)&&(c=!0)):i=s),r<1||r>rh(n,s,o)?Un(t)._overflowWeeks=!0:c!=null?Un(t)._overflowWeekday=!0:(a=Sae(n,r,i,s,o),t._a[mo]=a.year,t._dayOfYear=a.dayOfYear)}bt.ISO_8601=function(){};bt.RFC_2822=function(){};function cL(t){if(t._f===bt.ISO_8601){Nae(t);return}if(t._f===bt.RFC_2822){Pae(t);return}t._a=[],Un(t).empty=!0;var e=""+t._i,n,r,i,s,o,a=e.length,c=0,l,u;for(i=pae(t._f,t._locale).match(Qj)||[],u=i.length,n=0;n<u;n++)s=i[n],r=(e.match(uJe(s,t))||[])[0],r&&(o=e.substr(0,e.indexOf(r)),o.length>0&&Un(t).unusedInput.push(o),e=e.slice(e.indexOf(r)+r.length),c+=r.length),Ly[s]?(r?Un(t).empty=!1:Un(t).unusedTokens.push(s),fJe(s,r,t)):t._strict&&!r&&Un(t).unusedTokens.push(s);Un(t).charsLeftOver=a-c,e.length>0&&Un(t).unusedInput.push(e),t._a[hs]<=12&&Un(t).bigHour===!0&&t._a[hs]>0&&(Un(t).bigHour=void 0),Un(t).parsedDateParts=t._a.slice(0),Un(t).meridiem=t._meridiem,t._a[hs]=EXe(t._locale,t._a[hs],t._meridiem),l=Un(t).era,l!==null&&(t._a[mo]=t._locale.erasConvertYear(l,t._a[mo])),aL(t),oL(t)}function EXe(t,e,n){var r;return n==null?e:t.meridiemHour!=null?t.meridiemHour(e,n):(t.isPM!=null&&(r=t.isPM(n),r&&e<12&&(e+=12),!r&&e===12&&(e=0)),e)}function CXe(t){var e,n,r,i,s,o,a=!1,c=t._f.length;if(c===0){Un(t).invalidFormat=!0,t._d=new Date(NaN);return}for(i=0;i<c;i++)s=0,o=!1,e=Kj({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[i],cL(e),Gj(e)&&(o=!0),s+=Un(e).charsLeftOver,s+=Un(e).unusedTokens.length*10,Un(e).score=s,a?s<r&&(r=s,n=e):(r==null||s<r||o)&&(r=s,n=e,o&&(a=!0));Kp(t,n||e)}function SXe(t){if(!t._d){var e=Zj(t._i),n=e.day===void 0?e.date:e.day;t._a=dae([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(r){return r&&parseInt(r,10)}),aL(t)}}function TXe(t){var e=new C4(oL(Oae(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Oae(t){var e=t._i,n=t._f;return t._locale=t._locale||Uh(t._l),e===null||n===void 0&&e===""?fT({nullInput:!0}):(typeof e=="string"&&(t._i=e=t._locale.preparse(e)),yu(e)?new C4(oL(e)):(E4(e)?t._d=e:wu(n)?CXe(t):n?cL(t):IXe(t),Gj(t)||(t._d=null),t))}function IXe(t){var e=t._i;ca(e)?t._d=new Date(bt.now()):E4(e)?t._d=new Date(e.valueOf()):typeof e=="string"?xXe(t):wu(e)?(t._a=dae(e.slice(0),function(n){return parseInt(n,10)}),aL(t)):Sg(e)?SXe(t):kh(e)?t._d=new Date(e):bt.createFromInputFallback(t)}function Dae(t,e,n,r,i){var s={};return(e===!0||e===!1)&&(r=e,e=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(Sg(t)&&qj(t)||wu(t)&&t.length===0)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=t,s._f=e,s._strict=r,TXe(s)}function li(t,e,n,r){return Dae(t,e,n,r,!1)}var kXe=Cl("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=li.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:fT()}),RXe=Cl("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=li.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:fT()});function Mae(t,e){var n,r;if(e.length===1&&wu(e[0])&&(e=e[0]),!e.length)return li();for(n=e[0],r=1;r<e.length;++r)(!e[r].isValid()||e[r][t](n))&&(n=e[r]);return n}function NXe(){var t=[].slice.call(arguments,0);return Mae("isBefore",t)}function PXe(){var t=[].slice.call(arguments,0);return Mae("isAfter",t)}var OXe=function(){return Date.now?Date.now():+new Date},Y2=["year","quarter","month","week","day","hour","minute","second","millisecond"];function DXe(t){var e,n=!1,r,i=Y2.length;for(e in t)if(Ar(t,e)&&!(Vi.call(Y2,e)!==-1&&(t[e]==null||!isNaN(t[e]))))return!1;for(r=0;r<i;++r)if(t[Y2[r]]){if(n)return!1;parseFloat(t[Y2[r]])!==ir(t[Y2[r]])&&(n=!0)}return!0}function MXe(){return this._isValid}function BXe(){return Cu(NaN)}function bT(t){var e=Zj(t),n=e.year||0,r=e.quarter||0,i=e.month||0,s=e.week||e.isoWeek||0,o=e.day||0,a=e.hour||0,c=e.minute||0,l=e.second||0,u=e.millisecond||0;this._isValid=DXe(e),this._milliseconds=+u+l*1e3+c*6e4+a*1e3*60*60,this._days=+o+s*7,this._months=+i+r*3+n*12,this._data={},this._locale=Uh(),this._bubble()}function fE(t){return t instanceof bT}function bD(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function $Xe(t,e,n){var r=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),s=0,o;for(o=0;o<r;o++)ir(t[o])!==ir(e[o])&&s++;return s+i}function Bae(t,e){en(t,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Rd(~~(n/60),2)+e+Rd(~~n%60,2)})}Bae("Z",":");Bae("ZZ","");Mt("Z",wT);Mt("ZZ",wT);Vr(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=lL(wT,t)});var jXe=/([\+\-]|\d\d)/gi;function lL(t,e){var n=(e||"").match(t),r,i,s;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(jXe)||["-",0,0],s=+(i[1]*60)+ir(i[2]),s===0?0:i[0]==="+"?s:-s)}function uL(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(yu(t)||E4(t)?t.valueOf():li(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),bt.updateOffset(n,!1),n):li(t).local()}function xD(t){return-Math.round(t._d.getTimezoneOffset())}bt.updateOffset=function(){};function LXe(t,e,n){var r=this._offset||0,i;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=lL(wT,t),t===null)return this}else Math.abs(t)<16&&!n&&(t=t*60);return!this._isUTC&&e&&(i=xD(this)),this._offset=t,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==t&&(!e||this._changeInProgress?Lae(this,Cu(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,bt.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:xD(this)}function UXe(t,e){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function FXe(t){return this.utcOffset(0,t)}function zXe(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(xD(this),"m")),this}function HXe(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=lL(cJe,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function WXe(t){return this.isValid()?(t=t?li(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function VXe(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function qXe(){if(!ca(this._isDSTShifted))return this._isDSTShifted;var t={},e;return Kj(t,this),t=Oae(t),t._a?(e=t._isUTC?zd(t._a):li(t._a),this._isDSTShifted=this.isValid()&&$Xe(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function GXe(){return this.isValid()?!this._isUTC:!1}function KXe(){return this.isValid()?this._isUTC:!1}function $ae(){return this.isValid()?this._isUTC&&this._offset===0:!1}var YXe=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,QXe=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Cu(t,e){var n=t,r=null,i,s,o;return fE(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:kh(t)||!isNaN(+t)?(n={},e?n[e]=+t:n.milliseconds=+t):(r=YXe.exec(t))?(i=r[1]==="-"?-1:1,n={y:0,d:ir(r[rd])*i,h:ir(r[hs])*i,m:ir(r[tu])*i,s:ir(r[Yf])*i,ms:ir(bD(r[rg]*1e3))*i}):(r=QXe.exec(t))?(i=r[1]==="-"?-1:1,n={y:Nm(r[2],i),M:Nm(r[3],i),w:Nm(r[4],i),d:Nm(r[5],i),h:Nm(r[6],i),m:Nm(r[7],i),s:Nm(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=ZXe(li(n.from),li(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),s=new bT(n),fE(t)&&Ar(t,"_locale")&&(s._locale=t._locale),fE(t)&&Ar(t,"_isValid")&&(s._isValid=t._isValid),s}Cu.fn=bT.prototype;Cu.invalid=BXe;function Nm(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function hK(t,e){var n={};return n.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function ZXe(t,e){var n;return t.isValid()&&e.isValid()?(e=uL(e,t),t.isBefore(e)?n=hK(t,e):(n=hK(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function jae(t,e){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(hae(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=Cu(n,r),Lae(this,i,t),this}}function Lae(t,e,n,r){var i=e._milliseconds,s=bD(e._days),o=bD(e._months);t.isValid()&&(r=r??!0,o&&Aae(t,t6(t,"Month")+o*n),s&&bae(t,"Date",t6(t,"Date")+s*n),i&&t._d.setTime(t._d.valueOf()+i*n),r&&bt.updateOffset(t,s||o))}var JXe=jae(1,"add"),XXe=jae(-1,"subtract");function Uae(t){return typeof t=="string"||t instanceof String}function eet(t){return yu(t)||E4(t)||Uae(t)||kh(t)||net(t)||tet(t)||t===null||t===void 0}function tet(t){var e=Sg(t)&&!qj(t),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,o=r.length;for(i=0;i<o;i+=1)s=r[i],n=n||Ar(t,s);return e&&n}function net(t){var e=wu(t),n=!1;return e&&(n=t.filter(function(r){return!kh(r)&&Uae(t)}).length===0),e&&n}function ret(t){var e=Sg(t)&&!qj(t),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,s;for(i=0;i<r.length;i+=1)s=r[i],n=n||Ar(t,s);return e&&n}function iet(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function set(t,e){arguments.length===1&&(arguments[0]?eet(arguments[0])?(t=arguments[0],e=void 0):ret(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||li(),r=uL(n,this).startOf("day"),i=bt.calendarFormat(this,r)||"sameElse",s=e&&(Hd(e[i])?e[i].call(this,n):e[i]);return this.format(s||this.localeData().calendar(i,this,li(n)))}function oet(){return new C4(this)}function aet(t,e){var n=yu(t)?t:li(t);return this.isValid()&&n.isValid()?(e=Sl(e)||"millisecond",e==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf()):!1}function cet(t,e){var n=yu(t)?t:li(t);return this.isValid()&&n.isValid()?(e=Sl(e)||"millisecond",e==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf()):!1}function uet(t,e,n,r){var i=yu(t)?t:li(t),s=yu(e)?e:li(e);return this.isValid()&&i.isValid()&&s.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(s,n):!this.isAfter(s,n))):!1}function det(t,e){var n=yu(t)?t:li(t),r;return this.isValid()&&n.isValid()?(e=Sl(e)||"millisecond",e==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(e).valueOf()<=r&&r<=this.clone().endOf(e).valueOf())):!1}function fet(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function het(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function pet(t,e,n){var r,i,s;if(!this.isValid())return NaN;if(r=uL(t,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,e=Sl(e),e){case"year":s=hE(this,r)/12;break;case"month":s=hE(this,r);break;case"quarter":s=hE(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:cl(s)}function hE(t,e){if(t.date()<e.date())return-hE(e,t);var n=(e.year()-t.year())*12+(e.month()-t.month()),r=t.clone().add(n,"months"),i,s;return e-r<0?(i=t.clone().add(n-1,"months"),s=(e-r)/(r-i)):(i=t.clone().add(n+1,"months"),s=(e-r)/(i-r)),-(n+s)||0}bt.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";bt.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function met(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function get(t){if(!this.isValid())return null;var e=t!==!0,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?dE(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Hd(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",dE(n,"Z")):dE(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function wet(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",n,r,i,s;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=e+'[")]',this.format(n+r+i+s)}function yet(t){t||(t=this.isUtc()?bt.defaultFormatUtc:bt.defaultFormat);var e=dE(this,t);return this.localeData().postformat(e)}function vet(t,e){return this.isValid()&&(yu(t)&&t.isValid()||li(t).isValid())?Cu({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function bet(t){return this.from(li(),t)}function xet(t,e){return this.isValid()&&(yu(t)&&t.isValid()||li(t).isValid())?Cu({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function _et(t){return this.to(li(),t)}function Fae(t){var e;return t===void 0?this._locale._abbr:(e=Uh(t),e!=null&&(this._locale=e),this)}var zae=Cl("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function Hae(){return this._locale}var rS=1e3,Uy=60*rS,iS=60*Uy,Wae=(365*400+97)*24*iS;function Fy(t,e){return(t%e+e)%e}function Vae(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-Wae:new Date(t,e,n).valueOf()}function qae(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-Wae:Date.UTC(t,e,n)}function Aet(t){var e,n;if(t=Sl(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?qae:Vae,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Fy(e+(this._isUTC?0:this.utcOffset()*Uy),iS);break;case"minute":e=this._d.valueOf(),e-=Fy(e,Uy);break;case"second":e=this._d.valueOf(),e-=Fy(e,rS);break}return this._d.setTime(e),bt.updateOffset(this,!0),this}function Eet(t){var e,n;if(t=Sl(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?qae:Vae,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=iS-Fy(e+(this._isUTC?0:this.utcOffset()*Uy),iS)-1;break;case"minute":e=this._d.valueOf(),e+=Uy-Fy(e,Uy)-1;break;case"second":e=this._d.valueOf(),e+=rS-Fy(e,rS)-1;break}return this._d.setTime(e),bt.updateOffset(this,!0),this}function Cet(){return this._d.valueOf()-(this._offset||0)*6e4}function Tet(){return Math.floor(this.valueOf()/1e3)}function Iet(){return new Date(this.valueOf())}function ket(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Ret(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Net(){return this.isValid()?this.toISOString():null}function Pet(){return Gj(this)}function Oet(){return Kp({},Un(this))}function Det(){return Un(this).overflow}function Met(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}en("N",0,0,"eraAbbr");en("NN",0,0,"eraAbbr");en("NNN",0,0,"eraAbbr");en("NNNN",0,0,"eraName");en("NNNNN",0,0,"eraNarrow");en("y",["y",1],"yo","eraYear");en("y",["yy",2],0,"eraYear");en("y",["yyy",3],0,"eraYear");en("y",["yyyy",4],0,"eraYear");Mt("N",dL);Mt("NN",dL);Mt("NNN",dL);Mt("NNNN",qet);Mt("NNNNN",Get);Vr(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?Un(n).era=i:Un(n).invalidEra=t});Mt("y",Vb);Mt("yy",Vb);Mt("yyy",Vb);Mt("yyyy",Vb);Mt("yo",Ket);Vr(["y","yy","yyy","yyyy"],mo);Vr(["yo"],function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[mo]=n._locale.eraYearOrdinalParse(t,i):e[mo]=parseInt(t,10)});function Bet(t,e){var n,r,i,s=this._eras||Uh("en")._eras;for(n=0,r=s.length;n<r;++n){switch(typeof s[n].since){case"string":i=bt(s[n].since).startOf("day"),s[n].since=i.valueOf();break}switch(typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":i=bt(s[n].until).startOf("day").valueOf(),s[n].until=i.valueOf();break}}return s}function $et(t,e,n){var r,i,s=this.eras(),o,a,c;for(t=t.toUpperCase(),r=0,i=s.length;r<i;++r)if(o=s[r].name.toUpperCase(),a=s[r].abbr.toUpperCase(),c=s[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(a===t)return s[r];break;case"NNNN":if(o===t)return s[r];break;case"NNNNN":if(c===t)return s[r];break}else if([o,a,c].indexOf(t)>=0)return s[r]}function jet(t,e){var n=t.since<=t.until?1:-1;return e===void 0?bt(t.since).year():bt(t.since).year()+(e-t.offset)*n}function Let(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].name;return""}function Uet(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].narrow;return""}function Fet(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].abbr;return""}function zet(){var t,e,n,r,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=i[t].since<=i[t].until?1:-1,r=this.clone().startOf("day").valueOf(),i[t].since<=r&&r<=i[t].until||i[t].until<=r&&r<=i[t].since)return(this.year()-bt(i[t].since).year())*n+i[t].offset;return this.year()}function Het(t){return Ar(this,"_erasNameRegex")||fL.call(this),t?this._erasNameRegex:this._erasRegex}function Wet(t){return Ar(this,"_erasAbbrRegex")||fL.call(this),t?this._erasAbbrRegex:this._erasRegex}function Vet(t){return Ar(this,"_erasNarrowRegex")||fL.call(this),t?this._erasNarrowRegex:this._erasRegex}function dL(t,e){return e.erasAbbrRegex(t)}function qet(t,e){return e.erasNameRegex(t)}function Get(t,e){return e.erasNarrowRegex(t)}function Ket(t,e){return e._eraYearOrdinalRegex||Vb}function fL(){var t=[],e=[],n=[],r=[],i,s,o,a,c,l=this.eras();for(i=0,s=l.length;i<s;++i)o=nh(l[i].name),a=nh(l[i].abbr),c=nh(l[i].narrow),e.push(o),t.push(a),n.push(c),r.push(o),r.push(a),r.push(c);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}en(0,["gg",2],0,function(){return this.weekYear()%100});en(0,["GG",2],0,function(){return this.isoWeekYear()%100});function xT(t,e){en(0,[t,t.length],0,e)}xT("gggg","weekYear");xT("ggggg","weekYear");xT("GGGG","isoWeekYear");xT("GGGGG","isoWeekYear");Mt("G",gT);Mt("g",gT);Mt("GG",ui,xc);Mt("gg",ui,xc);Mt("GGGG",Xj,Jj);Mt("gggg",Xj,Jj);Mt("GGGGG",mT,hT);Mt("ggggg",mT,hT);T4(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=ir(t)});T4(["gg","GG"],function(t,e,n,r){e[r]=bt.parseTwoDigitYear(t)});function Yet(t){return Gae.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Qet(t){return Gae.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Zet(){return rh(this.year(),1,4)}function Jet(){return rh(this.isoWeekYear(),1,4)}function Xet(){var t=this.localeData()._week;return rh(this.year(),t.dow,t.doy)}function ett(){var t=this.localeData()._week;return rh(this.weekYear(),t.dow,t.doy)}function Gae(t,e,n,r,i){var s;return t==null?r6(this,r,i).year:(s=rh(t,r,i),e>s&&(e=s),ttt.call(this,t,e,n,r,i))}function ttt(t,e,n,r,i){var s=Sae(t,e,n,r,i),o=n6(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}en("Q",0,"Qo","quarter");Mt("Q",mae);Vr("Q",function(t,e){e[Kf]=(ir(t)-1)*3});function ntt(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}en("D",["DD",2],"Do","date");Mt("D",ui,qb);Mt("DD",ui,xc);Mt("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient});Vr(["D","DD"],rd);Vr("Do",function(t,e){e[rd]=ir(t.match(ui)[0])});var Kae=Gb("Date",!0);en("DDD",["DDDD",3],"DDDo","dayOfYear");Mt("DDD",pT);Mt("DDDD",gae);Vr(["DDD","DDDD"],function(t,e,n){n._dayOfYear=ir(t)});function rtt(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}en("m",["mm",2],0,"minute");Mt("m",ui,eL);Mt("mm",ui,xc);Vr(["m","mm"],tu);var itt=Gb("Minutes",!1);en("s",["ss",2],0,"second");Mt("s",ui,eL);Mt("ss",ui,xc);Vr(["s","ss"],Yf);var stt=Gb("Seconds",!1);en("S",0,0,function(){return~~(this.millisecond()/100)});en(0,["SS",2],0,function(){return~~(this.millisecond()/10)});en(0,["SSS",3],0,"millisecond");en(0,["SSSS",4],0,function(){return this.millisecond()*10});en(0,["SSSSS",5],0,function(){return this.millisecond()*100});en(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});en(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});en(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});en(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Mt("S",pT,mae);Mt("SS",pT,xc);Mt("SSS",pT,gae);var Yp,Yae;for(Yp="SSSS";Yp.length<=9;Yp+="S")Mt(Yp,Vb);function ott(t,e){e[rg]=ir(("0."+t)*1e3)}for(Yp="S";Yp.length<=9;Yp+="S")Vr(Yp,ott);Yae=Gb("Milliseconds",!1);en("z",0,0,"zoneAbbr");en("zz",0,0,"zoneName");function att(){return this._isUTC?"UTC":""}function ctt(){return this._isUTC?"Coordinated Universal Time":""}var it=C4.prototype;it.add=JXe;it.calendar=set;it.clone=oet;it.diff=pet;it.endOf=Eet;it.format=yet;it.from=vet;it.fromNow=bet;it.to=xet;it.toNow=_et;it.get=gJe;it.invalidAt=Det;it.isAfter=aet;it.isBefore=cet;it.isBetween=uet;it.isSame=det;it.isSameOrAfter=fet;it.isSameOrBefore=het;it.isValid=Pet;it.lang=zae;it.locale=Fae;it.localeData=Hae;it.max=RXe;it.min=kXe;it.parsingFlags=Oet;it.set=wJe;it.startOf=Aet;it.subtract=XXe;it.toArray=ket;it.toObject=Ret;it.toDate=Iet;it.toISOString=get;it.inspect=wet;typeof Symbol<"u"&&Symbol.for!=null&&(it[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});it.toJSON=Net;it.toString=met;it.unix=Tet;it.valueOf=Cet;it.creationData=Met;it.eraName=Let;it.eraNarrow=Uet;it.eraAbbr=Fet;it.eraYear=zet;it.year=vae;it.isLeapYear=mJe;it.weekYear=Yet;it.isoWeekYear=Qet;it.quarter=it.quarters=ntt;it.month=Eae;it.daysInMonth=SJe;it.week=it.weeks=DJe;it.isoWeek=it.isoWeeks=MJe;it.weeksInYear=Xet;it.weeksInWeekYear=ett;it.isoWeeksInYear=Zet;it.isoWeeksInISOWeekYear=Jet;it.date=Kae;it.day=it.days=KJe;it.weekday=YJe;it.isoWeekday=QJe;it.dayOfYear=rtt;it.hour=it.hours=rXe;it.minute=it.minutes=itt;it.second=it.seconds=stt;it.millisecond=it.milliseconds=Yae;it.utcOffset=LXe;it.utc=FXe;it.local=zXe;it.parseZone=HXe;it.hasAlignedHourOffset=WXe;it.isDST=VXe;it.isLocal=GXe;it.isUtcOffset=KXe;it.isUtc=$ae;it.isUTC=$ae;it.zoneAbbr=att;it.zoneName=ctt;it.dates=Cl("dates accessor is deprecated. Use date instead.",Kae);it.months=Cl("months accessor is deprecated. Use month instead",Eae);it.years=Cl("years accessor is deprecated. Use year instead",vae);it.zone=Cl("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",UXe);it.isDSTShifted=Cl("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",qXe);function ltt(t){return li(t*1e3)}function utt(){return li.apply(null,arguments).parseZone()}function Qae(t){return t}var Er=Yj.prototype;Er.calendar=GZe;Er.longDateFormat=ZZe;Er.invalidDate=XZe;Er.ordinal=nJe;Er.preparse=Qae;Er.postformat=Qae;Er.relativeTime=iJe;Er.pastFuture=sJe;Er.set=VZe;Er.eras=Bet;Er.erasParse=$et;Er.erasConvertYear=jet;Er.erasAbbrRegex=Wet;Er.erasNameRegex=Het;Er.erasNarrowRegex=Vet;Er.months=_Je;Er.monthsShort=AJe;Er.monthsParse=CJe;Er.monthsRegex=IJe;Er.monthsShortRegex=TJe;Er.week=RJe;Er.firstDayOfYear=OJe;Er.firstDayOfWeek=PJe;Er.weekdays=HJe;Er.weekdaysMin=VJe;Er.weekdaysShort=WJe;Er.weekdaysParse=GJe;Er.weekdaysRegex=ZJe;Er.weekdaysShortRegex=JJe;Er.weekdaysMinRegex=XJe;Er.isPM=tXe;Er.meridiem=iXe;function sS(t,e,n,r){var i=Uh(),s=zd().set(r,e);return i[n](s,t)}function Zae(t,e,n){if(kh(t)&&(e=t,t=void 0),t=t||"",e!=null)return sS(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=sS(t,r,n,"month");return i}function hL(t,e,n,r){typeof t=="boolean"?(kh(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,kh(e)&&(n=e,e=void 0),e=e||"");var i=Uh(),s=t?i._week.dow:0,o,a=[];if(n!=null)return sS(e,(n+s)%7,r,"day");for(o=0;o<7;o++)a[o]=sS(e,(o+s)%7,r,"day");return a}function dtt(t,e){return Zae(t,e,"months")}function ftt(t,e){return Zae(t,e,"monthsShort")}function htt(t,e,n){return hL(t,e,n,"weekdays")}function ptt(t,e,n){return hL(t,e,n,"weekdaysShort")}function mtt(t,e,n){return hL(t,e,n,"weekdaysMin")}f0("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=ir(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+n}});bt.lang=Cl("moment.lang is deprecated. Use moment.locale instead.",f0);bt.langData=Cl("moment.langData is deprecated. Use moment.localeData instead.",Uh);var Sf=Math.abs;function gtt(){var t=this._data;return this._milliseconds=Sf(this._milliseconds),this._days=Sf(this._days),this._months=Sf(this._months),t.milliseconds=Sf(t.milliseconds),t.seconds=Sf(t.seconds),t.minutes=Sf(t.minutes),t.hours=Sf(t.hours),t.months=Sf(t.months),t.years=Sf(t.years),this}function Jae(t,e,n,r){var i=Cu(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function wtt(t,e){return Jae(this,t,e,1)}function ytt(t,e){return Jae(this,t,e,-1)}function pK(t){return t<0?Math.floor(t):Math.ceil(t)}function vtt(){var t=this._milliseconds,e=this._days,n=this._months,r=this._data,i,s,o,a,c;return t>=0&&e>=0&&n>=0||t<=0&&e<=0&&n<=0||(t+=pK(_D(n)+e)*864e5,e=0,n=0),r.milliseconds=t%1e3,i=cl(t/1e3),r.seconds=i%60,s=cl(i/60),r.minutes=s%60,o=cl(s/60),r.hours=o%24,e+=cl(o/24),c=cl(Xae(e)),n+=c,e-=pK(_D(c)),a=cl(n/12),n%=12,r.days=e,r.months=n,r.years=a,this}function Xae(t){return t*4800/146097}function _D(t){return t*146097/4800}function btt(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if(t=Sl(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+r/864e5,n=this._months+Xae(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(_D(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return e*24+r/36e5;case"minute":return e*1440+r/6e4;case"second":return e*86400+r/1e3;case"millisecond":return Math.floor(e*864e5)+r;default:throw new Error("Unknown unit "+t)}}function Fh(t){return function(){return this.as(t)}}var ece=Fh("ms"),xtt=Fh("s"),_tt=Fh("m"),Att=Fh("h"),Ett=Fh("d"),Ctt=Fh("w"),Stt=Fh("M"),Ttt=Fh("Q"),Itt=Fh("y"),ktt=ece;function Rtt(){return Cu(this)}function Ntt(t){return t=Sl(t),this.isValid()?this[t+"s"]():NaN}function L1(t){return function(){return this.isValid()?this._data[t]:NaN}}var Ptt=L1("milliseconds"),Ott=L1("seconds"),Dtt=L1("minutes"),Mtt=L1("hours"),Btt=L1("days"),$tt=L1("months"),jtt=L1("years");function Ltt(){return cl(this.days()/7)}var Of=Math.round,gy={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Utt(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function Ftt(t,e,n,r){var i=Cu(t).abs(),s=Of(i.as("s")),o=Of(i.as("m")),a=Of(i.as("h")),c=Of(i.as("d")),l=Of(i.as("M")),u=Of(i.as("w")),d=Of(i.as("y")),h=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||o<=1&&["m"]||o<n.m&&["mm",o]||a<=1&&["h"]||a<n.h&&["hh",a]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(h=h||u<=1&&["w"]||u<n.w&&["ww",u]),h=h||l<=1&&["M"]||l<n.M&&["MM",l]||d<=1&&["y"]||["yy",d],h[2]=e,h[3]=+t>0,h[4]=r,Utt.apply(null,h)}function ztt(t){return t===void 0?Of:typeof t=="function"?(Of=t,!0):!1}function Htt(t,e){return gy[t]===void 0?!1:e===void 0?gy[t]:(gy[t]=e,t==="s"&&(gy.ss=e-1),!0)}function Wtt(t,e){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=gy,i,s;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(n=t),typeof e=="object"&&(r=Object.assign({},gy,e),e.s!=null&&e.ss==null&&(r.ss=e.s-1)),i=this.localeData(),s=Ftt(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var wR=Math.abs;function Bw(t){return(t>0)-(t<0)||+t}function _T(){if(!this.isValid())return this.localeData().invalidDate();var t=wR(this._milliseconds)/1e3,e=wR(this._days),n=wR(this._months),r,i,s,o,a=this.asSeconds(),c,l,u,d;return a?(r=cl(t/60),i=cl(r/60),t%=60,r%=60,s=cl(n/12),n%=12,o=t?t.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",l=Bw(this._months)!==Bw(a)?"-":"",u=Bw(this._days)!==Bw(a)?"-":"",d=Bw(this._milliseconds)!==Bw(a)?"-":"",c+"P"+(s?l+s+"Y":"")+(n?l+n+"M":"")+(e?u+e+"D":"")+(i||r||t?"T":"")+(i?d+i+"H":"")+(r?d+r+"M":"")+(t?d+o+"S":"")):"P0D"}var wr=bT.prototype;wr.isValid=MXe;wr.abs=gtt;wr.add=wtt;wr.subtract=ytt;wr.as=btt;wr.asMilliseconds=ece;wr.asSeconds=xtt;wr.asMinutes=_tt;wr.asHours=Att;wr.asDays=Ett;wr.asWeeks=Ctt;wr.asMonths=Stt;wr.asQuarters=Ttt;wr.asYears=Itt;wr.valueOf=ktt;wr._bubble=vtt;wr.clone=Rtt;wr.get=Ntt;wr.milliseconds=Ptt;wr.seconds=Ott;wr.minutes=Dtt;wr.hours=Mtt;wr.days=Btt;wr.weeks=Ltt;wr.months=$tt;wr.years=jtt;wr.humanize=Wtt;wr.toISOString=_T;wr.toString=_T;wr.toJSON=_T;wr.locale=Fae;wr.localeData=Hae;wr.toIsoString=Cl("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",_T);wr.lang=zae;en("X",0,0,"unix");en("x",0,0,"valueOf");Mt("x",gT);Mt("X",lJe);Vr("X",function(t,e,n){n._d=new Date(parseFloat(t)*1e3)});Vr("x",function(t,e,n){n._d=new Date(ir(t))});//! moment.js
bt.version="2.30.1";HZe(li);bt.fn=it;bt.min=NXe;bt.max=PXe;bt.now=OXe;bt.utc=zd;bt.unix=ltt;bt.months=dtt;bt.isDate=E4;bt.locale=f0;bt.invalid=fT;bt.duration=Cu;bt.isMoment=yu;bt.weekdays=htt;bt.parseZone=utt;bt.localeData=Uh;bt.isDuration=fE;bt.monthsShort=ftt;bt.weekdaysMin=mtt;bt.defineLocale=sL;bt.updateLocale=cXe;bt.locales=lXe;bt.weekdaysShort=ptt;bt.normalizeUnits=Sl;bt.relativeTimeRounding=ztt;bt.relativeTimeThreshold=Htt;bt.calendarFormat=iet;bt.prototype=it;bt.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Vtt(t,e){let n=[];for(let r=t;r<=e;r++)n.push(r);return n.map(String)}const ni=t=>{if(t)return Number(Eu.utils.fromWei(t,"ether")).toFixed(QUe)},qtt={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_CHAIN_ID:"721",VITE_CHAIN_NAME:"Lycan",VITE_CONFIRMATIONS:"6;",VITE_CONTRACT_ADDRESS:"0x3A1A1a46d2Ae1F50edEe56fEfE7385F9c71960fA",VITE_CONTRACT_ADDRESS_BETA:"0x2543a1BbE1dcb3192Dc00ed046f3d1146f805915",VITE_DECIMALS:"18;",VITE_EXPLORER_SUBDOMAIN:"explorer",VITE_FIX_DECIMALS:"6;",VITE_ROOT_URL:'"http://18.117.41.254:8545";',VITE_RPC:"https://rpc.lycanchain.com",VITE_SYMBOL:"LYC",VITE_VALIDATOR_CONTRACT_ADDRESS:"0x094096D94a0639491e5E91E5039ff24AF5e2D783"},Gtt=qtt,Ktt={id:4321,name:"Lycan BETA",network:"Lycan BETA",nativeCurrency:{decimals:18,name:"Beta Lycan",symbol:"bLYC"},rpcUrls:{public:{http:["https://rpc-beta.lycanchain.com"]},default:{http:["https://rpc-beta.lycanchain.com"]}},blockExplorers:{default:"https://explorer-beta.lycanchain.com"},testnet:!0,contracts:{stakingaura:"0x3A1A1a46d2Ae1F50edEe56fEfE7385F9c71960fA",validatoraura:"0x094096D94a0639491e5E91E5039ff24AF5e2D783"}},pL={id:721,name:"Lycan",network:"Lycan",nativeCurrency:{decimals:18,name:"Lycan",symbol:"LYC"},rpcUrls:{public:{http:["https://rpc.lycanchain.com"]},default:{http:["https://rpc.lycanchain.com"]}},blockExplorers:{default:"https://explorer.lycanchain.com"},testnet:!1,contracts:{stakingaura:"0x3A1A1a46d2Ae1F50edEe56fEfE7385F9c71960fA",validatoraura:"0x094096D94a0639491e5E91E5039ff24AF5e2D783"}},Za=Gtt.VITE_IS_TESTNET?Ktt:pL;AT.type="coinbaseWallet";function AT(t={}){return t.version==="3"||t.headlessMode?Qtt(t):Ytt(t)}function Ytt(t){let e,n,r,i,s;return o=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",supportsSimulation:!0,type:AT.type,async connect({chainId:a}={}){try{const c=await this.getProvider(),l=(await c.request({method:"eth_requestAccounts"})).map(d=>qs(d));r||(r=this.onAccountsChanged.bind(this),c.on("accountsChanged",r)),i||(i=this.onChainChanged.bind(this),c.on("chainChanged",i)),s||(s=this.onDisconnect.bind(this),c.on("disconnect",s));let u=await this.getChainId();if(a&&u!==a){const d=await this.switchChain({chainId:a}).catch(h=>{if(h.code===ai.code)throw h;return{id:u}});u=(d==null?void 0:d.id)??u}return{accounts:l,chainId:u}}catch(c){throw/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(c.message)?new ai(c):c}},async disconnect(){var c;const a=await this.getProvider();r&&(a.removeListener("accountsChanged",r),r=void 0),i&&(a.removeListener("chainChanged",i),i=void 0),s&&(a.removeListener("disconnect",s),s=void 0),a.disconnect(),(c=a.close)==null||c.call(a)},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(c=>qs(c))},async getChainId(){const c=await(await this.getProvider()).request({method:"eth_chainId"});return Number(c)},async getProvider(){if(!n){const a=await(async()=>{const{default:c}=await Sa(async()=>{const{default:l}=await import("./index-BOiKSJmR.js").then(u=>u.i);return{default:l}},__vite__mapDeps([0,1]));return typeof c!="function"&&typeof c.default=="function"?c.default:c})();e=new a({...t,appChainIds:o.chains.map(c=>c.id)}),n=e.makeWeb3Provider({...t,options:t.preference??"all"})}return n},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:a,chainId:c}){var d,h,g,w;const l=o.chains.find(v=>v.id===c);if(!l)throw new Na(new jg);const u=await this.getProvider();try{return await u.request({method:"wallet_switchEthereumChain",params:[{chainId:Jt(l.id)}]}),l}catch(v){if(v.code===4902)try{let _;a!=null&&a.blockExplorerUrls?_=a.blockExplorerUrls:_=(d=l.blockExplorers)!=null&&d.default.url?[(h=l.blockExplorers)==null?void 0:h.default.url]:[];let T;(g=a==null?void 0:a.rpcUrls)!=null&&g.length?T=a.rpcUrls:T=[((w=l.rpcUrls.default)==null?void 0:w.http[0])??""];const b={blockExplorerUrls:_,chainId:Jt(c),chainName:(a==null?void 0:a.chainName)??l.name,iconUrls:a==null?void 0:a.iconUrls,nativeCurrency:(a==null?void 0:a.nativeCurrency)??l.nativeCurrency,rpcUrls:T};return await u.request({method:"wallet_addEthereumChain",params:[b]}),l}catch(_){throw new ai(_)}throw new Na(v)}},onAccountsChanged(a){a.length===0?this.onDisconnect():o.emitter.emit("change",{accounts:a.map(c=>qs(c))})},onChainChanged(a){const c=Number(a);o.emitter.emit("change",{chainId:c})},async onDisconnect(a){o.emitter.emit("disconnect");const c=await this.getProvider();r&&(c.removeListener("accountsChanged",r),r=void 0),i&&(c.removeListener("chainChanged",i),i=void 0),s&&(c.removeListener("disconnect",s),s=void 0)}})}function Qtt(t){let n,r,i,s,o;return a=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",supportsSimulation:!0,type:AT.type,async connect({chainId:c}={}){try{const l=await this.getProvider(),u=(await l.request({method:"eth_requestAccounts"})).map(h=>qs(h));i||(i=this.onAccountsChanged.bind(this),l.on("accountsChanged",i)),s||(s=this.onChainChanged.bind(this),l.on("chainChanged",s)),o||(o=this.onDisconnect.bind(this),l.on("disconnect",o));let d=await this.getChainId();if(c&&d!==c){const h=await this.switchChain({chainId:c}).catch(g=>{if(g.code===ai.code)throw g;return{id:d}});d=(h==null?void 0:h.id)??d}return{accounts:u,chainId:d}}catch(l){throw/(user closed modal|accounts received is empty|user denied account)/i.test(l.message)?new ai(l):l}},async disconnect(){const c=await this.getProvider();i&&(c.removeListener("accountsChanged",i),i=void 0),s&&(c.removeListener("chainChanged",s),s=void 0),o&&(c.removeListener("disconnect",o),o=void 0),c.disconnect(),c.close()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(l=>qs(l))},async getChainId(){const l=await(await this.getProvider()).request({method:"eth_chainId"});return Number(l)},async getProvider(){var c;if(!r){const l=await(async()=>{const{default:w}=await Sa(async()=>{const{default:v}=await import("./index-H_NM4OoF.js").then(_=>_.i);return{default:v}},__vite__mapDeps([2,1]));return typeof w!="function"&&typeof w.default=="function"?w.default:w})();n=new l({...t,reloadOnDisconnect:!1});const u=(c=n.walletExtension)==null?void 0:c.getChainId(),d=a.chains.find(w=>t.chainId?w.id===t.chainId:w.id===u)||a.chains[0],h=t.chainId||(d==null?void 0:d.id),g=t.jsonRpcUrl||(d==null?void 0:d.rpcUrls.default.http[0]);r=n.makeWeb3Provider(g,h)}return r},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:c,chainId:l}){var h,g,w,v;const u=a.chains.find(_=>_.id===l);if(!u)throw new Na(new jg);const d=await this.getProvider();try{return await d.request({method:"wallet_switchEthereumChain",params:[{chainId:Jt(u.id)}]}),u}catch(_){if(_.code===4902)try{let T;c!=null&&c.blockExplorerUrls?T=c.blockExplorerUrls:T=(h=u.blockExplorers)!=null&&h.default.url?[(g=u.blockExplorers)==null?void 0:g.default.url]:[];let b;(w=c==null?void 0:c.rpcUrls)!=null&&w.length?b=c.rpcUrls:b=[((v=u.rpcUrls.default)==null?void 0:v.http[0])??""];const k={blockExplorerUrls:T,chainId:Jt(l),chainName:(c==null?void 0:c.chainName)??u.name,iconUrls:c==null?void 0:c.iconUrls,nativeCurrency:(c==null?void 0:c.nativeCurrency)??u.nativeCurrency,rpcUrls:b};return await d.request({method:"wallet_addEthereumChain",params:[k]}),u}catch(T){throw new ai(T)}throw new Na(_)}},onAccountsChanged(c){c.length===0?this.onDisconnect():a.emitter.emit("change",{accounts:c.map(l=>qs(l))})},onChainChanged(c){const l=Number(c);a.emitter.emit("change",{chainId:l})},async onDisconnect(c){a.emitter.emit("disconnect");const l=await this.getProvider();i&&(l.removeListener("accountsChanged",i),i=void 0),s&&(l.removeListener("chainChanged",s),s=void 0),o&&(l.removeListener("disconnect",o),o=void 0)}})}mL.type="walletConnect";function mL(t){const e=t.isNewChainsStale??!0;let n,r;const i="eip155";let s,o,a,c,l,u;return d=>({id:"walletConnect",name:"WalletConnect",type:mL.type,async setup(){const h=await this.getProvider().catch(()=>null);h&&(a||(a=this.onConnect.bind(this),h.on("connect",a)),l||(l=this.onSessionDelete.bind(this),h.on("session_delete",l)))},async connect({chainId:h,...g}={}){var w,v;try{const _=await this.getProvider();if(!_)throw new Ep;c||(c=this.onDisplayUri,_.on("display_uri",c));let T=h;if(!T){const O=await((w=d.storage)==null?void 0:w.getItem("state"))??{};d.chains.some(C=>C.id===O.chainId)?T=O.chainId:T=(v=d.chains[0])==null?void 0:v.id}if(!T)throw new Error("No chains found on connector.");const b=await this.isChainsStale();if(_.session&&b&&await _.disconnect(),!_.session||b){const O=d.chains.filter($=>$.id!==T).map($=>$.id);await _.connect({optionalChains:[T,...O],..."pairingTopic"in g?{pairingTopic:g.pairingTopic}:{}}),this.setRequestedChainsIds(d.chains.map($=>$.id))}const k=(await _.enable()).map(O=>qs(O)),D=await this.getChainId();return c&&(_.removeListener("display_uri",c),c=void 0),a&&(_.removeListener("connect",a),a=void 0),s||(s=this.onAccountsChanged.bind(this),_.on("accountsChanged",s)),o||(o=this.onChainChanged.bind(this),_.on("chainChanged",o)),u||(u=this.onDisconnect.bind(this),_.on("disconnect",u)),l||(l=this.onSessionDelete.bind(this),_.on("session_delete",l)),{accounts:k,chainId:D}}catch(_){throw/(user rejected|connection request reset)/i.test(_==null?void 0:_.message)?new ai(_):_}},async disconnect(){const h=await this.getProvider();try{await(h==null?void 0:h.disconnect())}catch(g){if(!/No matching key/i.test(g.message))throw g}finally{o&&(h==null||h.removeListener("chainChanged",o),o=void 0),u&&(h==null||h.removeListener("disconnect",u),u=void 0),a||(a=this.onConnect.bind(this),h==null||h.on("connect",a)),s&&(h==null||h.removeListener("accountsChanged",s),s=void 0),l&&(h==null||h.removeListener("session_delete",l),l=void 0),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(g=>qs(g))},async getProvider({chainId:h}={}){var w;async function g(){const v=d.chains.map(T=>T.id);if(!v.length)return;const{EthereumProvider:_}=await Sa(async()=>{const{EthereumProvider:T}=await Promise.resolve().then(()=>lEe);return{EthereumProvider:T}},void 0);return await _.init({...t,disableProviderPing:!0,optionalChains:v,projectId:t.projectId,rpcMap:Object.fromEntries(d.chains.map(T=>{const[b]=A7e({chain:T,transports:d.transports});return[T.id,b]})),showQrModal:t.showQrModal??!0})}return n||(r||(r=g()),n=await r,n==null||n.events.setMaxListeners(Number.POSITIVE_INFINITY)),h&&await((w=this.switchChain)==null?void 0:w.call(this,{chainId:h})),n},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{const[h,g]=await Promise.all([this.getAccounts(),this.getProvider()]);return h.length?await this.isChainsStale()&&g.session?(await g.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:h,chainId:g}){var _,T,b;const w=await this.getProvider();if(!w)throw new Ep;const v=d.chains.find(k=>k.id===g);if(!v)throw new Na(new jg);try{await Promise.all([new Promise(D=>{const O=({chainId:$})=>{$===g&&(d.emitter.off("change",O),D())};d.emitter.on("change",O)}),w.request({method:"wallet_switchEthereumChain",params:[{chainId:Jt(g)}]})]);const k=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...k,g]),v}catch(k){const D=k;if(/(user rejected)/i.test(D.message))throw new ai(D);try{let O;h!=null&&h.blockExplorerUrls?O=h.blockExplorerUrls:O=(_=v.blockExplorers)!=null&&_.default.url?[(T=v.blockExplorers)==null?void 0:T.default.url]:[];let $;(b=h==null?void 0:h.rpcUrls)!=null&&b.length?$=h.rpcUrls:$=[...v.rpcUrls.default.http];const C={blockExplorerUrls:O,chainId:Jt(g),chainName:(h==null?void 0:h.chainName)??v.name,iconUrls:h==null?void 0:h.iconUrls,nativeCurrency:(h==null?void 0:h.nativeCurrency)??v.nativeCurrency,rpcUrls:$};await w.request({method:"wallet_addEthereumChain",params:[C]});const A=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...A,g]),v}catch(O){throw new ai(O)}}},onAccountsChanged(h){h.length===0?this.onDisconnect():d.emitter.emit("change",{accounts:h.map(g=>qs(g))})},onChainChanged(h){const g=Number(h);d.emitter.emit("change",{chainId:g})},async onConnect(h){const g=Number(h.chainId),w=await this.getAccounts();d.emitter.emit("connect",{accounts:w,chainId:g})},async onDisconnect(h){this.setRequestedChainsIds([]),d.emitter.emit("disconnect");const g=await this.getProvider();s&&(g.removeListener("accountsChanged",s),s=void 0),o&&(g.removeListener("chainChanged",o),o=void 0),u&&(g.removeListener("disconnect",u),u=void 0),l&&(g.removeListener("session_delete",l),l=void 0),a||(a=this.onConnect.bind(this),g.on("connect",a))},onDisplayUri(h){d.emitter.emit("message",{type:"display_uri",data:h})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){var g,w,v;return n?((v=(w=(g=n.session)==null?void 0:g.namespaces[i])==null?void 0:w.accounts)==null?void 0:v.map(_=>Number.parseInt(_.split(":")[1]||"")))??[]:[]},async getRequestedChainsIds(){var h;return await((h=d.storage)==null?void 0:h.getItem(this.requestedChainsStorageKey))??[]},async isChainsStale(){if(!e)return!1;const h=d.chains.map(v=>v.id),g=this.getNamespaceChainsIds();if(g.length&&!g.some(v=>h.includes(v)))return!1;const w=await this.getRequestedChainsIds();return!h.every(v=>w.includes(v))},async setRequestedChainsIds(h){var g;await((g=d.storage)==null?void 0:g.setItem(this.requestedChainsStorageKey,h))},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}function Ztt(t){return e=>({id:cn.AUTH_CONNECTOR_ID,name:"Web3Modal Auth",type:"w3mAuth",socials:t.socials,email:t.email,showWallets:t.showWallets,walletFeatures:t.walletFeatures,async connect(n={}){const r=await this.getProvider(),{address:i,chainId:s}=await r.connect({chainId:n.chainId});return await r.getSmartAccountEnabledNetworks(),{accounts:[i],account:i,chainId:s,chain:{id:s,unsuported:!1}}},async disconnect(){await(await this.getProvider()).disconnect()},async getAccounts(){const n=await this.getProvider(),{address:r}=await n.connect();return e.emitter.emit("change",{accounts:[r]}),[r]},async getProvider(){return this.provider||(this.provider=new SRe(t.options.projectId)),Promise.resolve(this.provider)},async getChainId(){const n=await this.getProvider(),{chainId:r}=await n.getChainId();return r},async isAuthorized(){const n=await this.getProvider(),{isConnected:r}=await n.isConnected();return r},async switchChain({chainId:n}){try{const r=e.chains.find(s=>s.id===n);if(!r)throw new Na(new Error("chain not found on connector."));return await(await this.getProvider()).switchNetwork(n),e.emitter.emit("change",{chainId:Number(n)}),r}catch(r){throw r instanceof Error?new Na(r):r}},onAccountsChanged(n){n.length===0?this.onDisconnect():e.emitter.emit("change",{accounts:n.map(qs)})},onChainChanged(n){const r=Number(n);e.emitter.emit("change",{chainId:r})},async onConnect(n){const r=Number(n.chainId),i=await this.getAccounts();e.emitter.emit("connect",{accounts:i,chainId:r})},async onDisconnect(n){await(await this.getProvider()).disconnect()}})}function Jtt({projectId:t,chains:e,metadata:n,enableCoinbase:r,enableInjected:i,auth:s={},enableWalletConnect:o,enableEIP6963:a,...c}){const l=(c==null?void 0:c.connectors)??[],u=e.map(w=>[w.id,x$e({chain:w,projectId:t})]),d=Object.fromEntries(u),h={email:!0,showWallets:!0,walletFeatures:!0};o!==!1&&l.push(mL({projectId:t,metadata:n,showQrModal:!1})),i!==!1&&l.push(n9({shimDisconnect:!0})),r!==!1&&l.push(AT({version:"4",appName:(n==null?void 0:n.name)??"Unknown",appLogoUrl:(n==null?void 0:n.icons[0])??"Unknown",preference:c.coinbasePreference||"all"}));const g={...h,...s};return(g.email||g.socials)&&l.push(Ztt({chains:[...e],options:{projectId:t},socials:g.socials,email:g.email,showWallets:g.showWallets,walletFeatures:g.walletFeatures})),x7e({chains:e,multiInjectedProviderDiscovery:a!==!1,transports:d,...c,connectors:l})}const Xtt="05bf1a3bdce78ac897ccc68fafd1c7af",ent={name:"lycan-staking",description:"staking",url:"https://web3modal.com",icons:["https://avatars.githubusercontent.com/u/37784886"]},tnt=[pL],nnt=["c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96","622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0"],tce=Jtt({chains:tnt,projectId:Xtt,metadata:ent,myWallets:nnt,enableWalletConnect:!0,autoConnect:!0});new Eu(Za.rpcUrls.default);function nce(){return kTe({chain:pL,transport:XA()})}function sm(){const{data:t}=Ure(),e=nce();return ce.useMemo(()=>{if(!Za.contracts.stakingaura||!NO)return null;try{return ute({address:Za.contracts.stakingaura,abi:NO,client:{public:e,wallet:t}})}catch(n){return console.error("Failed to get contract",n),null}},[t])}function ET(){const{data:t}=Ure(),e=nce();return ce.useMemo(()=>{if(!Za.contracts.validatoraura||!iG)return null;try{return ute({address:Za.contracts.validatoraura,abi:iG,client:{public:e,wallet:t}})}catch(n){return console.error("Failed to get contract",n),null}},[t])}const rce=()=>{const t=sm(),[e,n]=ce.useState(!1);return ce.useEffect(()=>{t.read.areStakeAndWithdrawAllowed().then(r=>{n(r)}).catch(r=>{console.error(r)})},[]),e},rnt=(t,e)=>{const[n,r]=ce.useState(null),i=new Eu(Za.rpcUrls.default);return new i.eth.Contract(NO,YUe),ce.useEffect(()=>{},[n]),n},CT=()=>{const t=sm(),[e,n]=ce.useState(""),[r,i]=ce.useState(""),s=uLe().data;ce.useEffect(()=>{t.read.stakingEpoch().then(a=>{a&&(n(a),console.log("getPhase : ",WUe(parseInt(a))))}).catch(a=>{console.error("useStaking pools error: ",a)})},[t]);const o=async()=>{try{const a=await t.read.stakingEpochEndBlock();console.log({block:s});const c=(parseInt(a.toString())-parseInt(s.toString()))*3,l=bt.duration(c,"seconds").humanize(),u=bt.utc(c*1e3).format("DD[D] : HH[H] : mm[M] : ss[S]"),d=KUe(c);console.log("formate time ",d),i(d)}catch(a){console.log("next epoch error : ",a)}};return ce.useEffect(()=>{o();const a=setInterval(o,3e3);return()=>clearInterval(a)},[r,s]),{currentEpoch:e,nextEpoch:r}};var ice={exports:{}};/*!
* sweetalert2 v11.12.4
* Released under the MIT License.
*/(function(t,e){(function(n,r){t.exports=r()})(Hr,function(){function n(N,R){(R==null||R>N.length)&&(R=N.length);for(var F=0,Q=Array(R);F<R;F++)Q[F]=N[F];return Q}function r(N){if(Array.isArray(N))return N}function i(N){if(Array.isArray(N))return n(N)}function s(N,R,F){if(typeof N=="function"?N===R:N.has(R))return arguments.length<3?R:F;throw new TypeError("Private element is not present on this object")}function o(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}function a(N,R,F){return R=b(R),H(N,D()?Reflect.construct(R,F||[],b(N).constructor):R.apply(N,F))}function c(N,R){if(R.has(N))throw new TypeError("Cannot initialize the same private elements twice on an object")}function l(N,R){if(!(N instanceof R))throw new TypeError("Cannot call a class as a function")}function u(N,R){return N.get(s(N,R))}function d(N,R,F){c(N,R),R.set(N,F)}function h(N,R,F){return N.set(s(N,R),F),F}function g(N,R,F){if(D())return Reflect.construct.apply(null,arguments);var Q=[null];Q.push.apply(Q,R);var le=new(N.bind.apply(N,Q));return le}function w(N,R){for(var F=0;F<R.length;F++){var Q=R[F];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(N,I(Q.key),Q)}}function v(N,R,F){return R&&w(N.prototype,R),Object.defineProperty(N,"prototype",{writable:!1}),N}function _(N,R){var F=typeof Symbol<"u"&&N[Symbol.iterator]||N["@@iterator"];if(!F){if(Array.isArray(N)||(F=M(N))||R){F&&(N=F);var Q=0,le=function(){};return{s:le,n:function(){return Q>=N.length?{done:!0}:{done:!1,value:N[Q++]}},e:function(on){throw on},f:le}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Be,ht=!0,Tn=!1;return{s:function(){F=F.call(N)},n:function(){var on=F.next();return ht=on.done,on},e:function(on){Tn=!0,Be=on},f:function(){try{ht||F.return==null||F.return()}finally{if(Tn)throw Be}}}}function T(){return T=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(N,R,F){var Q=ee(N,R);if(Q){var le=Object.getOwnPropertyDescriptor(Q,R);return le.get?le.get.call(arguments.length<3?N:F):le.value}},T.apply(null,arguments)}function b(N){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(R){return R.__proto__||Object.getPrototypeOf(R)},b(N)}function k(N,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(R&&R.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),Object.defineProperty(N,"prototype",{writable:!1}),R&&V(N,R)}function D(){try{var N=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(D=function(){return!!N})()}function O(N){if(typeof Symbol<"u"&&N[Symbol.iterator]!=null||N["@@iterator"]!=null)return Array.from(N)}function $(N,R){var F=N==null?null:typeof Symbol<"u"&&N[Symbol.iterator]||N["@@iterator"];if(F!=null){var Q,le,Be,ht,Tn=[],on=!0,di=!1;try{if(Be=(F=F.call(N)).next,R!==0)for(;!(on=(Q=Be.call(F)).done)&&(Tn.push(Q.value),Tn.length!==R);on=!0);}catch(wm){di=!0,le=wm}finally{try{if(!on&&F.return!=null&&(ht=F.return(),Object(ht)!==ht))return}finally{if(di)throw le}}return Tn}}function C(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H(N,R){if(R&&(typeof R=="object"||typeof R=="function"))return R;if(R!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o(N)}function V(N,R){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(F,Q){return F.__proto__=Q,F},V(N,R)}function Y(N,R){return r(N)||$(N,R)||M(N,R)||C()}function ee(N,R){for(;!{}.hasOwnProperty.call(N,R)&&(N=b(N))!==null;);return N}function x(N,R,F,Q){var le=T(b(N.prototype),R,F);return function(Be){return le.apply(F,Be)}}function E(N){return i(N)||O(N)||M(N)||A()}function y(N,R){if(typeof N!="object"||!N)return N;var F=N[Symbol.toPrimitive];if(F!==void 0){var Q=F.call(N,R);if(typeof Q!="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(N)}function I(N){var R=y(N,"string");return typeof R=="symbol"?R:R+""}function B(N){"@babel/helpers - typeof";return B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},B(N)}function M(N,R){if(N){if(typeof N=="string")return n(N,R);var F={}.toString.call(N).slice(8,-1);return F==="Object"&&N.constructor&&(F=N.constructor.name),F==="Map"||F==="Set"?Array.from(N):F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F)?n(N,R):void 0}}var W=100,z={},P=function(){z.previousActiveElement instanceof HTMLElement?(z.previousActiveElement.focus(),z.previousActiveElement=null):document.body&&document.body.focus()},Z=function(R){return new Promise(function(F){if(!R)return F();var Q=window.scrollX,le=window.scrollY;z.restoreFocusTimeout=setTimeout(function(){P(),F()},W),window.scrollTo(Q,le)})},he="swal2-",ve=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"],j=ve.reduce(function(N,R){return N[R]=he+R,N},{}),ge=["success","warning","info","question","error"],te=ge.reduce(function(N,R){return N[R]=he+R,N},{}),ae="SweetAlert2:",se=function(R){return R.charAt(0).toUpperCase()+R.slice(1)},L=function(R){console.warn("".concat(ae," ").concat(B(R)==="object"?R.join(" "):R))},re=function(R){console.error("".concat(ae," ").concat(R))},be=[],Se=function(R){be.includes(R)||(be.push(R),L(R))},Ie=function(R){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;Se('"'.concat(R,'" is deprecated and will be removed in the next major release.').concat(F?' Use "'.concat(F,'" instead.'):""))},Ue=function(R){return typeof R=="function"?R():R},lt=function(R){return R&&typeof R.toPromise=="function"},je=function(R){return lt(R)?R.toPromise():Promise.resolve(R)},Vt=function(R){return R&&Promise.resolve(R)===R},vt=function(){return document.body.querySelector(".".concat(j.container))},ut=function(R){var F=vt();return F?F.querySelector(R):null},ft=function(R){return ut(".".concat(R))},He=function(){return ft(j.popup)},ct=function(){return ft(j.icon)},Gt=function(){return ft(j["icon-content"])},ot=function(){return ft(j.title)},qe=function(){return ft(j["html-container"])},X=function(){return ft(j.image)},U=function(){return ft(j["progress-steps"])},G=function(){return ft(j["validation-message"])},ie=function(){return ut(".".concat(j.actions," .").concat(j.confirm))},fe=function(){return ut(".".concat(j.actions," .").concat(j.cancel))},we=function(){return ut(".".concat(j.actions," .").concat(j.deny))},Re=function(){return ft(j["input-label"])},Ge=function(){return ut(".".concat(j.loader))},nt=function(){return ft(j.actions)},nn=function(){return ft(j.footer)},Ct=function(){return ft(j["timer-progress-bar"])},St=function(){return ft(j.close)},qr=`
  a[href],
  area[href],
  input:not([disabled]),
  select:not([disabled]),
  textarea:not([disabled]),
  button:not([disabled]),
  iframe,
  object,
  embed,
  [tabindex="0"],
  [contenteditable],
  audio[controls],
  video[controls],
  summary
`,Bn=function(){var R=He();if(!R)return[];var F=R.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),Q=Array.from(F).sort(function(ht,Tn){var on=parseInt(ht.getAttribute("tabindex")||"0"),di=parseInt(Tn.getAttribute("tabindex")||"0");return on>di?1:on<di?-1:0}),le=R.querySelectorAll(qr),Be=Array.from(le).filter(function(ht){return ht.getAttribute("tabindex")!=="-1"});return E(new Set(Q.concat(Be))).filter(function(ht){return Zr(ht)})},$n=function(){return It(document.body,j.shown)&&!It(document.body,j["toast-shown"])&&!It(document.body,j["no-backdrop"])},Si=function(){var R=He();return R?It(R,j.toast):!1},sn=function(){var R=He();return R?R.hasAttribute("data-loading"):!1},Pe=function(R,F){if(R.textContent="",F){var Q=new DOMParser,le=Q.parseFromString(F,"text/html"),Be=le.querySelector("head");Be&&Array.from(Be.childNodes).forEach(function(Tn){R.appendChild(Tn)});var ht=le.querySelector("body");ht&&Array.from(ht.childNodes).forEach(function(Tn){Tn instanceof HTMLVideoElement||Tn instanceof HTMLAudioElement?R.appendChild(Tn.cloneNode(!0)):R.appendChild(Tn)})}},It=function(R,F){if(!F)return!1;for(var Q=F.split(/\s+/),le=0;le<Q.length;le++)if(!R.classList.contains(Q[le]))return!1;return!0},$t=function(R,F){Array.from(R.classList).forEach(function(Q){!Object.values(j).includes(Q)&&!Object.values(te).includes(Q)&&!Object.values(F.showClass||{}).includes(Q)&&R.classList.remove(Q)})},jt=function(R,F,Q){if($t(R,F),!!F.customClass){var le=F.customClass[Q];if(le){if(typeof le!="string"&&!le.forEach){L("Invalid type of customClass.".concat(Q,'! Expected string or iterable object, got "').concat(B(le),'"'));return}Lt(R,le)}}},Yn=function(R,F){if(!F)return null;switch(F){case"select":case"textarea":case"file":return R.querySelector(".".concat(j.popup," > .").concat(j[F]));case"checkbox":return R.querySelector(".".concat(j.popup," > .").concat(j.checkbox," input"));case"radio":return R.querySelector(".".concat(j.popup," > .").concat(j.radio," input:checked"))||R.querySelector(".".concat(j.popup," > .").concat(j.radio," input:first-child"));case"range":return R.querySelector(".".concat(j.popup," > .").concat(j.range," input"));default:return R.querySelector(".".concat(j.popup," > .").concat(j.input))}},fn=function(R){if(R.focus(),R.type!=="file"){var F=R.value;R.value="",R.value=F}},hn=function(R,F,Q){!R||!F||(typeof F=="string"&&(F=F.split(/\s+/).filter(Boolean)),F.forEach(function(le){Array.isArray(R)?R.forEach(function(Be){Q?Be.classList.add(le):Be.classList.remove(le)}):Q?R.classList.add(le):R.classList.remove(le)}))},Lt=function(R,F){hn(R,F,!0)},Kt=function(R,F){hn(R,F,!1)},Yt=function(R,F){for(var Q=Array.from(R.children),le=0;le<Q.length;le++){var Be=Q[le];if(Be instanceof HTMLElement&&It(Be,F))return Be}},Qn=function(R,F,Q){Q==="".concat(parseInt(Q))&&(Q=parseInt(Q)),Q||parseInt(Q)===0?R.style.setProperty(F,typeof Q=="number"?"".concat(Q,"px"):Q):R.style.removeProperty(F)},Ot=function(R){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"flex";R&&(R.style.display=F)},kt=function(R){R&&(R.style.display="none")},vr=function(R){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"block";R&&new MutationObserver(function(){ar(R,R.innerHTML,F)}).observe(R,{childList:!0,subtree:!0})},pn=function(R,F,Q,le){var Be=R.querySelector(F);Be&&Be.style.setProperty(Q,le)},ar=function(R,F){var Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"flex";F?Ot(R,Q):kt(R)},Zr=function(R){return!!(R&&(R.offsetWidth||R.offsetHeight||R.getClientRects().length))},Cr=function(){return!Zr(ie())&&!Zr(we())&&!Zr(fe())},jn=function(R){return R.scrollHeight>R.clientHeight},yo=function(R){var F=window.getComputedStyle(R),Q=parseFloat(F.getPropertyValue("animation-duration")||"0"),le=parseFloat(F.getPropertyValue("transition-duration")||"0");return Q>0||le>0},eo=function(R){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Q=Ct();Q&&Zr(Q)&&(F&&(Q.style.transition="none",Q.style.width="100%"),setTimeout(function(){Q.style.transition="width ".concat(R/1e3,"s linear"),Q.style.width="0%"},10))},Go=function(){var R=Ct();if(R){var F=parseInt(window.getComputedStyle(R).width);R.style.removeProperty("transition"),R.style.width="100%";var Q=parseInt(window.getComputedStyle(R).width),le=F/Q*100;R.style.width="".concat(le,"%")}},vo=function(){return typeof window>"u"||typeof document>"u"},Ko=`
 <div aria-labelledby="`.concat(j.title,'" aria-describedby="').concat(j["html-container"],'" class="').concat(j.popup,`" tabindex="-1">
   <button type="button" class="`).concat(j.close,`"></button>
   <ul class="`).concat(j["progress-steps"],`"></ul>
   <div class="`).concat(j.icon,`"></div>
   <img class="`).concat(j.image,`" />
   <h2 class="`).concat(j.title,'" id="').concat(j.title,`"></h2>
   <div class="`).concat(j["html-container"],'" id="').concat(j["html-container"],`"></div>
   <input class="`).concat(j.input,'" id="').concat(j.input,`" />
   <input type="file" class="`).concat(j.file,`" />
   <div class="`).concat(j.range,`">
     <input type="range" />
     <output></output>
   </div>
   <select class="`).concat(j.select,'" id="').concat(j.select,`"></select>
   <div class="`).concat(j.radio,`"></div>
   <label class="`).concat(j.checkbox,`">
     <input type="checkbox" id="`).concat(j.checkbox,`" />
     <span class="`).concat(j.label,`"></span>
   </label>
   <textarea class="`).concat(j.textarea,'" id="').concat(j.textarea,`"></textarea>
   <div class="`).concat(j["validation-message"],'" id="').concat(j["validation-message"],`"></div>
   <div class="`).concat(j.actions,`">
     <div class="`).concat(j.loader,`"></div>
     <button type="button" class="`).concat(j.confirm,`"></button>
     <button type="button" class="`).concat(j.deny,`"></button>
     <button type="button" class="`).concat(j.cancel,`"></button>
   </div>
   <div class="`).concat(j.footer,`"></div>
   <div class="`).concat(j["timer-progress-bar-container"],`">
     <div class="`).concat(j["timer-progress-bar"],`"></div>
   </div>
 </div>
`).replace(/(^|\n)\s*/g,""),es=function(){var R=vt();return R?(R.remove(),Kt([document.documentElement,document.body],[j["no-backdrop"],j["toast-shown"],j["has-column"]]),!0):!1},ws=function(){z.currentInstance.resetValidationMessage()},Wd=function(){var R=He(),F=Yt(R,j.input),Q=Yt(R,j.file),le=R.querySelector(".".concat(j.range," input")),Be=R.querySelector(".".concat(j.range," output")),ht=Yt(R,j.select),Tn=R.querySelector(".".concat(j.checkbox," input")),on=Yt(R,j.textarea);F.oninput=ws,Q.onchange=ws,ht.onchange=ws,Tn.onchange=ws,on.oninput=ws,le.oninput=function(){ws(),Be.value=le.value},le.onchange=function(){ws(),Be.value=le.value}},_c=function(R){return typeof R=="string"?document.querySelector(R):R},Vd=function(R){var F=He();F.setAttribute("role",R.toast?"alert":"dialog"),F.setAttribute("aria-live",R.toast?"polite":"assertive"),R.toast||F.setAttribute("aria-modal","true")},qd=function(R){window.getComputedStyle(R).direction==="rtl"&&Lt(vt(),j.rtl)},Ac=function(R){var F=es();if(vo()){re("SweetAlert2 requires document to initialize");return}var Q=document.createElement("div");Q.className=j.container,F&&Lt(Q,j["no-transition"]),Pe(Q,Ko);var le=_c(R.target);le.appendChild(Q),Vd(R),qd(le),Wd()},Ec=function(R,F){R instanceof HTMLElement?F.appendChild(R):B(R)==="object"?Tu(R,F):R&&Pe(F,R)},Tu=function(R,F){R.jquery?$s(F,R):Pe(F,R.toString())},$s=function(R,F){if(R.textContent="",0 in F)for(var Q=0;Q in F;Q++)R.appendChild(F[Q].cloneNode(!0));else R.appendChild(F.cloneNode(!0))},bo=function(){if(vo())return!1;var N=document.createElement("div");return typeof N.style.webkitAnimation<"u"?"webkitAnimationEnd":typeof N.style.animation<"u"?"animationend":!1}(),Gd=function(R,F){var Q=nt(),le=Ge();!Q||!le||(!F.showConfirmButton&&!F.showDenyButton&&!F.showCancelButton?kt(Q):Ot(Q),jt(Q,F,"actions"),Kd(Q,le,F),Pe(le,F.loaderHtml||""),jt(le,F,"loader"))};function Kd(N,R,F){var Q=ie(),le=we(),Be=fe();!Q||!le||!Be||(zh(Q,"confirm",F),zh(le,"deny",F),zh(Be,"cancel",F),Yd(Q,le,Be,F),F.reverseButtons&&(F.toast?(N.insertBefore(Be,Q),N.insertBefore(le,Q)):(N.insertBefore(Be,R),N.insertBefore(le,R),N.insertBefore(Q,R))))}function Yd(N,R,F,Q){if(!Q.buttonsStyling){Kt([N,R,F],j.styled);return}Lt([N,R,F],j.styled),Q.confirmButtonColor&&(N.style.backgroundColor=Q.confirmButtonColor,Lt(N,j["default-outline"])),Q.denyButtonColor&&(R.style.backgroundColor=Q.denyButtonColor,Lt(R,j["default-outline"])),Q.cancelButtonColor&&(F.style.backgroundColor=Q.cancelButtonColor,Lt(F,j["default-outline"]))}function zh(N,R,F){var Q=se(R);ar(N,F["show".concat(Q,"Button")],"inline-block"),Pe(N,F["".concat(R,"ButtonText")]||""),N.setAttribute("aria-label",F["".concat(R,"ButtonAriaLabel")]||""),N.className=j[R],jt(N,F,"".concat(R,"Button"))}var U1=function(R,F){var Q=St();Q&&(Pe(Q,F.closeButtonHtml||""),jt(Q,F,"closeButton"),ar(Q,F.showCloseButton),Q.setAttribute("aria-label",F.closeButtonAriaLabel||""))},Qd=function(R,F){var Q=vt();Q&&(om(Q,F.backdrop),Zd(Q,F.position),am(Q,F.grow),jt(Q,F,"container"))};function om(N,R){typeof R=="string"?N.style.background=R:R||Lt([document.documentElement,document.body],j["no-backdrop"])}function Zd(N,R){R&&(R in j?Lt(N,j[R]):(L('The "position" parameter is not valid, defaulting to "center"'),Lt(N,j.center)))}function am(N,R){R&&Lt(N,j["grow-".concat(R)])}var dr={innerParams:new WeakMap,domCache:new WeakMap},F1=["input","file","range","select","radio","checkbox","textarea"],Qb=function(R,F){var Q=He();if(Q){var le=dr.innerParams.get(R),Be=!le||F.input!==le.input;F1.forEach(function(ht){var Tn=Yt(Q,j[ht]);Tn&&(Hh(ht,F.inputAttributes),Tn.className=j[ht],Be&&kt(Tn))}),F.input&&(Be&&z1(F),Zb(F))}},z1=function(R){if(R.input){if(!Jr[R.input]){re("Unexpected type of input! Expected ".concat(Object.keys(Jr).join(" | "),', got "').concat(R.input,'"'));return}var F=Tl(R.input);if(F){var Q=Jr[R.input](F,R);Ot(F),R.inputAutoFocus&&setTimeout(function(){fn(Q)})}}},H1=function(R){for(var F=0;F<R.attributes.length;F++){var Q=R.attributes[F].name;["id","type","value","style"].includes(Q)||R.removeAttribute(Q)}},Hh=function(R,F){var Q=He();if(Q){var le=Yn(Q,R);if(le){H1(le);for(var Be in F)le.setAttribute(Be,F[Be])}}},Zb=function(R){if(R.input){var F=Tl(R.input);F&&jt(F,R,"input")}},Wh=function(R,F){!R.placeholder&&F.inputPlaceholder&&(R.placeholder=F.inputPlaceholder)},Cc=function(R,F,Q){if(Q.inputLabel){var le=document.createElement("label"),Be=j["input-label"];le.setAttribute("for",R.id),le.className=Be,B(Q.customClass)==="object"&&Lt(le,Q.customClass.inputLabel),le.innerText=Q.inputLabel,F.insertAdjacentElement("beforebegin",le)}},Tl=function(R){var F=He();if(F)return Yt(F,j[R]||j.input)},ys=function(R,F){["string","number"].includes(B(F))?R.value="".concat(F):Vt(F)||L('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(B(F),'"'))},Jr={};Jr.text=Jr.email=Jr.password=Jr.number=Jr.tel=Jr.url=Jr.search=Jr.date=Jr["datetime-local"]=Jr.time=Jr.week=Jr.month=function(N,R){return ys(N,R.inputValue),Cc(N,N,R),Wh(N,R),N.type=R.input,N},Jr.file=function(N,R){return Cc(N,N,R),Wh(N,R),N},Jr.range=function(N,R){var F=N.querySelector("input"),Q=N.querySelector("output");return ys(F,R.inputValue),F.type=R.input,ys(Q,R.inputValue),Cc(F,N,R),N},Jr.select=function(N,R){if(N.textContent="",R.inputPlaceholder){var F=document.createElement("option");Pe(F,R.inputPlaceholder),F.value="",F.disabled=!0,F.selected=!0,N.appendChild(F)}return Cc(N,N,R),N},Jr.radio=function(N){return N.textContent="",N},Jr.checkbox=function(N,R){var F=Yn(He(),"checkbox");F.value="1",F.checked=!!R.inputValue;var Q=N.querySelector("span");return Pe(Q,R.inputPlaceholder),F},Jr.textarea=function(N,R){ys(N,R.inputValue),Wh(N,R),Cc(N,N,R);var F=function(le){return parseInt(window.getComputedStyle(le).marginLeft)+parseInt(window.getComputedStyle(le).marginRight)};return setTimeout(function(){if("MutationObserver"in window){var Q=parseInt(window.getComputedStyle(He()).width),le=function(){if(document.body.contains(N)){var ht=N.offsetWidth+F(N);ht>Q?He().style.width="".concat(ht,"px"):Qn(He(),"width",R.width)}};new MutationObserver(le).observe(N,{attributes:!0,attributeFilter:["style"]})}}),N};var W1=function(R,F){var Q=qe();Q&&(vr(Q),jt(Q,F,"htmlContainer"),F.html?(Ec(F.html,Q),Ot(Q,"block")):F.text?(Q.textContent=F.text,Ot(Q,"block")):kt(Q),Qb(R,F))},Sc=function(R,F){var Q=nn();Q&&(vr(Q),ar(Q,F.footer,"block"),F.footer&&Ec(F.footer,Q),jt(Q,F,"footer"))},V1=function(R,F){var Q=dr.innerParams.get(R),le=ct();if(le){if(Q&&F.icon===Q.icon){Tc(le,F),cm(le,F);return}if(!F.icon&&!F.iconHtml){kt(le);return}if(F.icon&&Object.keys(te).indexOf(F.icon)===-1){re('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(F.icon,'"')),kt(le);return}Ot(le),Tc(le,F),cm(le,F),Lt(le,F.showClass&&F.showClass.icon)}},cm=function(R,F){for(var Q=0,le=Object.entries(te);Q<le.length;Q++){var Be=Y(le[Q],2),ht=Be[0],Tn=Be[1];F.icon!==ht&&Kt(R,Tn)}Lt(R,F.icon&&te[F.icon]),K1(R,F),q1(),jt(R,F,"icon")},q1=function(){var R=He();if(R)for(var F=window.getComputedStyle(R).getPropertyValue("background-color"),Q=R.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),le=0;le<Q.length;le++)Q[le].style.backgroundColor=F},G1=`
  <div class="swal2-success-circular-line-left"></div>
  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
  <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
  <div class="swal2-success-circular-line-right"></div>
`,Jb=`
  <span class="swal2-x-mark">
    <span class="swal2-x-mark-line-left"></span>
    <span class="swal2-x-mark-line-right"></span>
  </span>
`,Tc=function(R,F){if(!(!F.icon&&!F.iconHtml)){var Q=R.innerHTML,le="";if(F.iconHtml)le=lm(F.iconHtml);else if(F.icon==="success")le=G1,Q=Q.replace(/ style=".*?"/g,"");else if(F.icon==="error")le=Jb;else if(F.icon){var Be={question:"?",warning:"!",info:"i"};le=lm(Be[F.icon])}Q.trim()!==le.trim()&&Pe(R,le)}},K1=function(R,F){if(F.iconColor){R.style.color=F.iconColor,R.style.borderColor=F.iconColor;for(var Q=0,le=[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"];Q<le.length;Q++){var Be=le[Q];pn(R,Be,"background-color",F.iconColor)}pn(R,".swal2-success-ring","border-color",F.iconColor)}},lm=function(R){return'<div class="'.concat(j["icon-content"],'">').concat(R,"</div>")},Vh=function(R,F){var Q=X();if(Q){if(!F.imageUrl){kt(Q);return}Ot(Q,""),Q.setAttribute("src",F.imageUrl),Q.setAttribute("alt",F.imageAlt||""),Qn(Q,"width",F.imageWidth),Qn(Q,"height",F.imageHeight),Q.className=j.image,jt(Q,F,"image")}},Xb=function(R,F){var Q=vt(),le=He();if(!(!Q||!le)){if(F.toast){Qn(Q,"width",F.width),le.style.width="100%";var Be=Ge();Be&&le.insertBefore(Be,ct())}else Qn(le,"width",F.width);Qn(le,"padding",F.padding),F.color&&(le.style.color=F.color),F.background&&(le.style.background=F.background),kt(G()),um(le,F)}},um=function(R,F){var Q=F.showClass||{};R.className="".concat(j.popup," ").concat(Zr(R)?Q.popup:""),F.toast?(Lt([document.documentElement,document.body],j["toast-shown"]),Lt(R,j.toast)):Lt(R,j.modal),jt(R,F,"popup"),typeof F.customClass=="string"&&Lt(R,F.customClass),F.icon&&Lt(R,j["icon-".concat(F.icon)])},e2=function(R,F){var Q=U();if(Q){var le=F.progressSteps,Be=F.currentProgressStep;if(!le||le.length===0||Be===void 0){kt(Q);return}Ot(Q),Q.textContent="",Be>=le.length&&L("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),le.forEach(function(ht,Tn){var on=qh(ht);if(Q.appendChild(on),Tn===Be&&Lt(on,j["active-progress-step"]),Tn!==le.length-1){var di=Y1(F);Q.appendChild(di)}})}},qh=function(R){var F=document.createElement("li");return Lt(F,j["progress-step"]),Pe(F,R),F},Y1=function(R){var F=document.createElement("li");return Lt(F,j["progress-step-line"]),R.progressStepsDistance&&Qn(F,"width",R.progressStepsDistance),F},Q1=function(R,F){var Q=ot();Q&&(vr(Q),ar(Q,F.title||F.titleText,"block"),F.title&&Ec(F.title,Q),F.titleText&&(Q.innerText=F.titleText),jt(Q,F,"title"))},Iu=function(R,F){Xb(R,F),Qd(R,F),e2(R,F),V1(R,F),Vh(R,F),Q1(R,F),U1(R,F),W1(R,F),Gd(R,F),Sc(R,F);var Q=He();typeof F.didRender=="function"&&Q&&F.didRender(Q)},Z1=function(){return Zr(He())},J1=function(){var R;return(R=ie())===null||R===void 0?void 0:R.click()},Br=function(){var R;return(R=we())===null||R===void 0?void 0:R.click()},Nr=function(){var R;return(R=fe())===null||R===void 0?void 0:R.click()},de=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),xe=function(R){R.keydownTarget&&R.keydownHandlerAdded&&(R.keydownTarget.removeEventListener("keydown",R.keydownHandler,{capture:R.keydownListenerCapture}),R.keydownHandlerAdded=!1)},Ve=function(R,F,Q){xe(R),F.toast||(R.keydownHandler=function(le){return Gr(F,le,Q)},R.keydownTarget=F.keydownListenerCapture?window:He(),R.keydownListenerCapture=F.keydownListenerCapture,R.keydownTarget.addEventListener("keydown",R.keydownHandler,{capture:R.keydownListenerCapture}),R.keydownHandlerAdded=!0)},xt=function(R,F){var Q,le=Bn();if(le.length){R=R+F,R===le.length?R=0:R===-1&&(R=le.length-1),le[R].focus();return}(Q=He())===null||Q===void 0||Q.focus()},Pr=["ArrowRight","ArrowDown"],An=["ArrowLeft","ArrowUp"],Gr=function(R,F,Q){R&&(F.isComposing||F.keyCode===229||(R.stopKeydownPropagation&&F.stopPropagation(),F.key==="Enter"?Ti(F,R):F.key==="Tab"?Zn(F):[].concat(Pr,An).includes(F.key)?$r(F.key):F.key==="Escape"&&yi(F,R,Q)))},Ti=function(R,F){if(Ue(F.allowEnterKey)){var Q=Yn(He(),F.input);if(R.target&&Q&&R.target instanceof HTMLElement&&R.target.outerHTML===Q.outerHTML){if(["textarea","file"].includes(F.input))return;J1(),R.preventDefault()}}},Zn=function(R){for(var F=R.target,Q=Bn(),le=-1,Be=0;Be<Q.length;Be++)if(F===Q[Be]){le=Be;break}R.shiftKey?xt(le,-1):xt(le,1),R.stopPropagation(),R.preventDefault()},$r=function(R){var F=nt(),Q=ie(),le=we(),Be=fe();if(!(!F||!Q||!le||!Be)){var ht=[Q,le,Be];if(!(document.activeElement instanceof HTMLElement&&!ht.includes(document.activeElement))){var Tn=Pr.includes(R)?"nextElementSibling":"previousElementSibling",on=document.activeElement;if(on){for(var di=0;di<F.children.length;di++){if(on=on[Tn],!on)return;if(on instanceof HTMLButtonElement&&Zr(on))break}on instanceof HTMLButtonElement&&on.focus()}}}},yi=function(R,F,Q){Ue(F.allowEscapeKey)&&(R.preventDefault(),Q(de.esc))},Ui={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},Ii=function(){var R=vt(),F=Array.from(document.body.children);F.forEach(function(Q){Q.contains(R)||(Q.hasAttribute("aria-hidden")&&Q.setAttribute("data-previous-aria-hidden",Q.getAttribute("aria-hidden")||""),Q.setAttribute("aria-hidden","true"))})},zr=function(){var R=Array.from(document.body.children);R.forEach(function(F){F.hasAttribute("data-previous-aria-hidden")?(F.setAttribute("aria-hidden",F.getAttribute("data-previous-aria-hidden")||""),F.removeAttribute("data-previous-aria-hidden")):F.removeAttribute("aria-hidden")})},vs=typeof window<"u"&&!!window.GestureEvent,La=function(){if(vs&&!It(document.body,j.iosfix)){var R=document.body.scrollTop;document.body.style.top="".concat(R*-1,"px"),Lt(document.body,j.iosfix),Yo()}},Yo=function(){var R=vt();if(R){var F;R.ontouchstart=function(Q){F=Ic(Q)},R.ontouchmove=function(Q){F&&(Q.preventDefault(),Q.stopPropagation())}}},Ic=function(R){var F=R.target,Q=vt(),le=qe();return!Q||!le||dm(R)||Jd(R)?!1:F===Q||!jn(Q)&&F instanceof HTMLElement&&F.tagName!=="INPUT"&&F.tagName!=="TEXTAREA"&&!(jn(le)&&le.contains(F))},dm=function(R){return R.touches&&R.touches.length&&R.touches[0].touchType==="stylus"},Jd=function(R){return R.touches&&R.touches.length>1},ts=function(){if(It(document.body,j.iosfix)){var R=parseInt(document.body.style.top,10);Kt(document.body,j.iosfix),document.body.style.top="",document.body.scrollTop=R*-1}},NT=function(){var R=document.createElement("div");R.className=j["scrollbar-measure"],document.body.appendChild(R);var F=R.getBoundingClientRect().width-R.clientWidth;return document.body.removeChild(R),F},as=null,PT=function(R){as===null&&(document.body.scrollHeight>window.innerHeight||R==="scroll")&&(as=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(as+NT(),"px"))},R4=function(){as!==null&&(document.body.style.paddingRight="".concat(as,"px"),as=null)};function Il(N,R,F,Q){Si()?N4(N,Q):(Z(F).then(function(){return N4(N,Q)}),xe(z)),vs?(R.setAttribute("style","display:none !important"),R.removeAttribute("class"),R.innerHTML=""):R.remove(),$n()&&(R4(),ts(),zr()),X1()}function X1(){Kt([document.documentElement,document.body],[j.shown,j["height-auto"],j["no-backdrop"],j["toast-shown"]])}function kc(N){N=OT(N);var R=Ui.swalPromiseResolve.get(this),F=Xr(this);this.isAwaitingPromise?N.isDismissed||(Xd(this),R(N)):F&&R(N)}var Xr=function(R){var F=He();if(!F)return!1;var Q=dr.innerParams.get(R);if(!Q||It(F,Q.hideClass.popup))return!1;Kt(F,Q.showClass.popup),Lt(F,Q.hideClass.popup);var le=vt();return Kt(le,Q.showClass.backdrop),Lt(le,Q.hideClass.backdrop),t2(R,F,Q),!0};function kl(N){var R=Ui.swalPromiseReject.get(this);Xd(this),R&&R(N)}var Xd=function(R){R.isAwaitingPromise&&(delete R.isAwaitingPromise,dr.innerParams.get(R)||R._destroy())},OT=function(R){return typeof R>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},R)},t2=function(R,F,Q){var le=vt(),Be=bo&&yo(F);typeof Q.willClose=="function"&&Q.willClose(F),Be?DT(R,F,le,Q.returnFocus,Q.didClose):Il(R,le,Q.returnFocus,Q.didClose)},DT=function(R,F,Q,le,Be){bo&&(z.swalCloseEventFinishedCallback=Il.bind(null,R,Q,le,Be),F.addEventListener(bo,function(ht){ht.target===F&&(z.swalCloseEventFinishedCallback(),delete z.swalCloseEventFinishedCallback)}))},N4=function(R,F){setTimeout(function(){typeof F=="function"&&F.bind(R.params)(),R._destroy&&R._destroy()})},Gh=function(R){var F=He();if(F||new gm,F=He(),!!F){var Q=Ge();Si()?kt(ct()):P4(F,R),Ot(Q),F.setAttribute("data-loading","true"),F.setAttribute("aria-busy","true"),F.focus()}},P4=function(R,F){var Q=nt(),le=Ge();!Q||!le||(!F&&Zr(ie())&&(F=ie()),Ot(Q),F&&(kt(F),le.setAttribute("data-button-to-replace",F.className),Q.insertBefore(le,F)),Lt([R,Q],j.loading))},ew=function(R,F){F.input==="select"||F.input==="radio"?n2(R,F):["text","email","number","tel","textarea"].some(function(Q){return Q===F.input})&&(lt(F.inputValue)||Vt(F.inputValue))&&(Gh(ie()),r2(R,F))},Kh=function(R,F){var Q=R.getInput();if(!Q)return null;switch(F.input){case"checkbox":return MT(Q);case"radio":return O4(Q);case"file":return D4(Q);default:return F.inputAutoTrim?Q.value.trim():Q.value}},MT=function(R){return R.checked?1:0},O4=function(R){return R.checked?R.value:null},D4=function(R){return R.files&&R.files.length?R.getAttribute("multiple")!==null?R.files:R.files[0]:null},n2=function(R,F){var Q=He();if(Q){var le=function(ht){F.input==="select"?M4(Q,Yh(ht),F):F.input==="radio"&&BT(Q,Yh(ht),F)};lt(F.inputOptions)||Vt(F.inputOptions)?(Gh(ie()),je(F.inputOptions).then(function(Be){R.hideLoading(),le(Be)})):B(F.inputOptions)==="object"?le(F.inputOptions):re("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(B(F.inputOptions)))}},r2=function(R,F){var Q=R.getInput();Q&&(kt(Q),je(F.inputValue).then(function(le){Q.value=F.input==="number"?"".concat(parseFloat(le)||0):"".concat(le),Ot(Q),Q.focus(),R.hideLoading()}).catch(function(le){re("Error in inputValue promise: ".concat(le)),Q.value="",Ot(Q),Q.focus(),R.hideLoading()}))};function M4(N,R,F){var Q=Yt(N,j.select);if(Q){var le=function(ht,Tn,on){var di=document.createElement("option");di.value=on,Pe(di,Tn),di.selected=tw(on,F.inputValue),ht.appendChild(di)};R.forEach(function(Be){var ht=Be[0],Tn=Be[1];if(Array.isArray(Tn)){var on=document.createElement("optgroup");on.label=ht,on.disabled=!1,Q.appendChild(on),Tn.forEach(function(di){return le(on,di[1],di[0])})}else le(Q,Tn,ht)}),Q.focus()}}function BT(N,R,F){var Q=Yt(N,j.radio);if(Q){R.forEach(function(Be){var ht=Be[0],Tn=Be[1],on=document.createElement("input"),di=document.createElement("label");on.type="radio",on.name=j.radio,on.value=ht,tw(ht,F.inputValue)&&(on.checked=!0);var wm=document.createElement("span");Pe(wm,Tn),wm.className=j.label,di.appendChild(on),di.appendChild(wm),Q.appendChild(di)});var le=Q.querySelectorAll("input");le.length&&le[0].focus()}}var Yh=function(R){var F=[];return R instanceof Map?R.forEach(function(Q,le){var Be=Q;B(Be)==="object"&&(Be=Yh(Be)),F.push([le,Be])}):Object.keys(R).forEach(function(Q){var le=R[Q];B(le)==="object"&&(le=Yh(le)),F.push([Q,le])}),F},tw=function(R,F){return!!F&&F.toString()===R.toString()},nw=void 0,B4=function(R){var F=dr.innerParams.get(R);R.disableButtons(),F.input?Qh(R,"confirm"):s2(R,!0)},xo=function(R){var F=dr.innerParams.get(R);R.disableButtons(),F.returnInputValueOnDeny?Qh(R,"deny"):rw(R,!1)},i2=function(R,F){R.disableButtons(),F(de.cancel)},Qh=function(R,F){var Q=dr.innerParams.get(R);if(!Q.input){re('The "input" parameter is needed to be set when using returnInputValueOn'.concat(se(F)));return}var le=R.getInput(),Be=Kh(R,Q);Q.inputValidator?$4(R,Be,F):le&&!le.checkValidity()?(R.enableButtons(),R.showValidationMessage(Q.validationMessage||le.validationMessage)):F==="deny"?rw(R,Be):s2(R,Be)},$4=function(R,F,Q){var le=dr.innerParams.get(R);R.disableInput();var Be=Promise.resolve().then(function(){return je(le.inputValidator(F,le.validationMessage))});Be.then(function(ht){R.enableButtons(),R.enableInput(),ht?R.showValidationMessage(ht):Q==="deny"?rw(R,F):s2(R,F)})},rw=function(R,F){var Q=dr.innerParams.get(R||nw);if(Q.showLoaderOnDeny&&Gh(we()),Q.preDeny){R.isAwaitingPromise=!0;var le=Promise.resolve().then(function(){return je(Q.preDeny(F,Q.validationMessage))});le.then(function(Be){Be===!1?(R.hideLoading(),Xd(R)):R.close({isDenied:!0,value:typeof Be>"u"?F:Be})}).catch(function(Be){return L4(R||nw,Be)})}else R.close({isDenied:!0,value:F})},j4=function(R,F){R.close({isConfirmed:!0,value:F})},L4=function(R,F){R.rejectPromise(F)},s2=function(R,F){var Q=dr.innerParams.get(R||nw);if(Q.showLoaderOnConfirm&&Gh(),Q.preConfirm){R.resetValidationMessage(),R.isAwaitingPromise=!0;var le=Promise.resolve().then(function(){return je(Q.preConfirm(F,Q.validationMessage))});le.then(function(Be){Zr(G())||Be===!1?(R.hideLoading(),Xd(R)):j4(R,typeof Be>"u"?F:Be)}).catch(function(Be){return L4(R||nw,Be)})}else j4(R,F)};function iw(){var N=dr.innerParams.get(this);if(N){var R=dr.domCache.get(this);kt(R.loader),Si()?N.icon&&Ot(ct()):$T(R),Kt([R.popup,R.actions],j.loading),R.popup.removeAttribute("aria-busy"),R.popup.removeAttribute("data-loading"),R.confirmButton.disabled=!1,R.denyButton.disabled=!1,R.cancelButton.disabled=!1}}var $T=function(R){var F=R.popup.getElementsByClassName(R.loader.getAttribute("data-button-to-replace"));F.length?Ot(F[0],"inline-block"):Cr()&&kt(R.actions)};function ef(){var N=dr.innerParams.get(this),R=dr.domCache.get(this);return R?Yn(R.popup,N.input):null}function U4(N,R,F){var Q=dr.domCache.get(N);R.forEach(function(le){Q[le].disabled=F})}function F4(N,R){var F=He();if(!(!F||!N))if(N.type==="radio")for(var Q=F.querySelectorAll('[name="'.concat(j.radio,'"]')),le=0;le<Q.length;le++)Q[le].disabled=R;else N.disabled=R}function sw(){U4(this,["confirmButton","denyButton","cancelButton"],!1)}function o2(){U4(this,["confirmButton","denyButton","cancelButton"],!0)}function Rl(){F4(this.getInput(),!1)}function fm(){F4(this.getInput(),!0)}function z4(N){var R=dr.domCache.get(this),F=dr.innerParams.get(this);Pe(R.validationMessage,N),R.validationMessage.className=j["validation-message"],F.customClass&&F.customClass.validationMessage&&Lt(R.validationMessage,F.customClass.validationMessage),Ot(R.validationMessage);var Q=this.getInput();Q&&(Q.setAttribute("aria-invalid","true"),Q.setAttribute("aria-describedby",j["validation-message"]),fn(Q),Lt(Q,j.inputerror))}function H4(){var N=dr.domCache.get(this);N.validationMessage&&kt(N.validationMessage);var R=this.getInput();R&&(R.removeAttribute("aria-invalid"),R.removeAttribute("aria-describedby"),Kt(R,j.inputerror))}var Zh={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},Jh=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],Ua={allowEnterKey:void 0},W4=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],V4=function(R){return Object.prototype.hasOwnProperty.call(Zh,R)},q4=function(R){return Jh.indexOf(R)!==-1},G4=function(R){return Ua[R]},jT=function(R){V4(R)||L('Unknown parameter "'.concat(R,'"'))},LT=function(R){W4.includes(R)&&L('The parameter "'.concat(R,'" is incompatible with toasts'))},Xh=function(R){var F=G4(R);F&&Ie(R,F)},_e=function(R){R.backdrop===!1&&R.allowOutsideClick&&L('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(var F in R)jT(F),R.toast&&LT(F),Xh(F)};function Fe(N){var R=He(),F=dr.innerParams.get(this);if(!R||It(R,F.hideClass.popup)){L("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");return}var Q=Me(N),le=Object.assign({},F,Q);Iu(this,le),dr.innerParams.set(this,le),Object.defineProperties(this,{params:{value:Object.assign({},this.params,N),writable:!1,enumerable:!0}})}var Me=function(R){var F={};return Object.keys(R).forEach(function(Q){q4(Q)?F[Q]=R[Q]:L("Invalid parameter to update: ".concat(Q))}),F};function Tt(){var N=dr.domCache.get(this),R=dr.innerParams.get(this);if(!R){fr(this);return}N.popup&&z.swalCloseEventFinishedCallback&&(z.swalCloseEventFinishedCallback(),delete z.swalCloseEventFinishedCallback),typeof R.didDestroy=="function"&&R.didDestroy(),xn(this)}var xn=function(R){fr(R),delete R.params,delete z.keydownHandler,delete z.keydownTarget,delete z.currentInstance},fr=function(R){R.isAwaitingPromise?(vi(dr,R),R.isAwaitingPromise=!0):(vi(Ui,R),vi(dr,R),delete R.isAwaitingPromise,delete R.disableButtons,delete R.enableButtons,delete R.getInput,delete R.disableInput,delete R.enableInput,delete R.hideLoading,delete R.disableLoading,delete R.showValidationMessage,delete R.resetValidationMessage,delete R.close,delete R.closePopup,delete R.closeModal,delete R.closeToast,delete R.rejectPromise,delete R.update,delete R._destroy)},vi=function(R,F){for(var Q in R)R[Q].delete(F)},jr=Object.freeze({__proto__:null,_destroy:Tt,close:kc,closeModal:kc,closePopup:kc,closeToast:kc,disableButtons:o2,disableInput:fm,disableLoading:iw,enableButtons:sw,enableInput:Rl,getInput:ef,handleAwaitingPromise:Xd,hideLoading:iw,rejectPromise:kl,resetValidationMessage:H4,showValidationMessage:z4,update:Fe}),a2=function(R,F,Q){R.toast?UT(R,F,Q):(FT(F),ep(F),ow(R,F,Q))},UT=function(R,F,Q){F.popup.onclick=function(){R&&(Qo(R)||R.timer||R.input)||Q(de.close)}},Qo=function(R){return!!(R.showConfirmButton||R.showDenyButton||R.showCancelButton||R.showCloseButton)},tf=!1,FT=function(R){R.popup.onmousedown=function(){R.container.onmouseup=function(F){R.container.onmouseup=function(){},F.target===R.container&&(tf=!0)}}},ep=function(R){R.container.onmousedown=function(F){F.target===R.container&&F.preventDefault(),R.popup.onmouseup=function(Q){R.popup.onmouseup=function(){},(Q.target===R.popup||Q.target instanceof HTMLElement&&R.popup.contains(Q.target))&&(tf=!0)}}},ow=function(R,F,Q){F.container.onclick=function(le){if(tf){tf=!1;return}le.target===F.container&&Ue(R.allowOutsideClick)&&Q(de.backdrop)}},aw=function(R){return B(R)==="object"&&R.jquery},br=function(R){return R instanceof Element||aw(R)},zT=function(R){var F={};return B(R[0])==="object"&&!br(R[0])?Object.assign(F,R[0]):["title","html","icon"].forEach(function(Q,le){var Be=R[le];typeof Be=="string"||br(Be)?F[Q]=Be:Be!==void 0&&re("Unexpected type of ".concat(Q,'! Expected "string" or "Element", got ').concat(B(Be)))}),F};function K4(){for(var N=arguments.length,R=new Array(N),F=0;F<N;F++)R[F]=arguments[F];return g(this,R)}function cw(N){var R=function(F){function Q(){return l(this,Q),a(this,Q,arguments)}return k(Q,F),v(Q,[{key:"_main",value:function(Be,ht){return x(Q,"_main",this)([Be,Object.assign({},N,ht)])}}])}(this);return R}var HT=function(){return z.timeout&&z.timeout.getTimerLeft()},Y4=function(){if(z.timeout)return Go(),z.timeout.stop()},Q4=function(){if(z.timeout){var R=z.timeout.start();return eo(R),R}},lw=function(){var R=z.timeout;return R&&(R.running?Y4():Q4())},ku=function(R){if(z.timeout){var F=z.timeout.increase(R);return eo(F,!0),F}},uw=function(){return!!(z.timeout&&z.timeout.isRunning())},c2=!1,tp={};function Z4(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";tp[N]=this,c2||(document.body.addEventListener("click",J4),c2=!0)}var J4=function(R){for(var F=R.target;F&&F!==document;F=F.parentNode)for(var Q in tp){var le=F.getAttribute(Q);if(le){tp[Q].fire({template:le});return}}},dw=Object.freeze({__proto__:null,argsToParams:zT,bindClickHandler:Z4,clickCancel:Nr,clickConfirm:J1,clickDeny:Br,enableLoading:Gh,fire:K4,getActions:nt,getCancelButton:fe,getCloseButton:St,getConfirmButton:ie,getContainer:vt,getDenyButton:we,getFocusableElements:Bn,getFooter:nn,getHtmlContainer:qe,getIcon:ct,getIconContent:Gt,getImage:X,getInputLabel:Re,getLoader:Ge,getPopup:He,getProgressSteps:U,getTimerLeft:HT,getTimerProgressBar:Ct,getTitle:ot,getValidationMessage:G,increaseTimer:ku,isDeprecatedParameter:G4,isLoading:sn,isTimerRunning:uw,isUpdatableParameter:q4,isValidParameter:V4,isVisible:Z1,mixin:cw,resumeTimer:Q4,showLoading:Gh,stopTimer:Y4,toggleTimer:lw}),X4=function(){function N(R,F){l(this,N),this.callback=R,this.remaining=F,this.running=!1,this.start()}return v(N,[{key:"start",value:function(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}},{key:"stop",value:function(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}},{key:"increase",value:function(F){var Q=this.running;return Q&&this.stop(),this.remaining+=F,Q&&this.start(),this.remaining}},{key:"getTimerLeft",value:function(){return this.running&&(this.stop(),this.start()),this.remaining}},{key:"isRunning",value:function(){return this.running}}])}(),np=["swal-title","swal-html","swal-footer"],nf=function(R){var F=typeof R.template=="string"?document.querySelector(R.template):R.template;if(!F)return{};var Q=F.content;GT(Q);var le=Object.assign(fw(Q),WT(Q),VT(Q),qT(Q),hw(Q),pw(Q),l2(Q,np));return le},fw=function(R){var F={},Q=Array.from(R.querySelectorAll("swal-param"));return Q.forEach(function(le){Ru(le,["name","value"]);var Be=le.getAttribute("name"),ht=le.getAttribute("value");!Be||!ht||(typeof Zh[Be]=="boolean"?F[Be]=ht!=="false":B(Zh[Be])==="object"?F[Be]=JSON.parse(ht):F[Be]=ht)}),F},WT=function(R){var F={},Q=Array.from(R.querySelectorAll("swal-function-param"));return Q.forEach(function(le){var Be=le.getAttribute("name"),ht=le.getAttribute("value");!Be||!ht||(F[Be]=new Function("return ".concat(ht))())}),F},VT=function(R){var F={},Q=Array.from(R.querySelectorAll("swal-button"));return Q.forEach(function(le){Ru(le,["type","color","aria-label"]);var Be=le.getAttribute("type");!Be||!["confirm","cancel","deny"].includes(Be)||(F["".concat(Be,"ButtonText")]=le.innerHTML,F["show".concat(se(Be),"Button")]=!0,le.hasAttribute("color")&&(F["".concat(Be,"ButtonColor")]=le.getAttribute("color")),le.hasAttribute("aria-label")&&(F["".concat(Be,"ButtonAriaLabel")]=le.getAttribute("aria-label")))}),F},qT=function(R){var F={},Q=R.querySelector("swal-image");return Q&&(Ru(Q,["src","width","height","alt"]),Q.hasAttribute("src")&&(F.imageUrl=Q.getAttribute("src")||void 0),Q.hasAttribute("width")&&(F.imageWidth=Q.getAttribute("width")||void 0),Q.hasAttribute("height")&&(F.imageHeight=Q.getAttribute("height")||void 0),Q.hasAttribute("alt")&&(F.imageAlt=Q.getAttribute("alt")||void 0)),F},hw=function(R){var F={},Q=R.querySelector("swal-icon");return Q&&(Ru(Q,["type","color"]),Q.hasAttribute("type")&&(F.icon=Q.getAttribute("type")),Q.hasAttribute("color")&&(F.iconColor=Q.getAttribute("color")),F.iconHtml=Q.innerHTML),F},pw=function(R){var F={},Q=R.querySelector("swal-input");Q&&(Ru(Q,["type","label","placeholder","value"]),F.input=Q.getAttribute("type")||"text",Q.hasAttribute("label")&&(F.inputLabel=Q.getAttribute("label")),Q.hasAttribute("placeholder")&&(F.inputPlaceholder=Q.getAttribute("placeholder")),Q.hasAttribute("value")&&(F.inputValue=Q.getAttribute("value")));var le=Array.from(R.querySelectorAll("swal-input-option"));return le.length&&(F.inputOptions={},le.forEach(function(Be){Ru(Be,["value"]);var ht=Be.getAttribute("value");if(ht){var Tn=Be.innerHTML;F.inputOptions[ht]=Tn}})),F},l2=function(R,F){var Q={};for(var le in F){var Be=F[le],ht=R.querySelector(Be);ht&&(Ru(ht,[]),Q[Be.replace(/^swal-/,"")]=ht.innerHTML.trim())}return Q},GT=function(R){var F=np.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(R.children).forEach(function(Q){var le=Q.tagName.toLowerCase();F.includes(le)||L("Unrecognized element <".concat(le,">"))})},Ru=function(R,F){Array.from(R.attributes).forEach(function(Q){F.indexOf(Q.name)===-1&&L(['Unrecognized attribute "'.concat(Q.name,'" on <').concat(R.tagName.toLowerCase(),">."),"".concat(F.length?"Allowed attributes are: ".concat(F.join(", ")):"To set the value, use HTML within the element.")])})},e_=10,KT=function(R){var F=vt(),Q=He();typeof R.willOpen=="function"&&R.willOpen(Q);var le=window.getComputedStyle(document.body),Be=le.overflowY;QT(F,Q,R),setTimeout(function(){bs(F,Q)},e_),$n()&&(YT(F,R.scrollbarPadding,Be),Ii()),!Si()&&!z.previousActiveElement&&(z.previousActiveElement=document.activeElement),typeof R.didOpen=="function"&&setTimeout(function(){return R.didOpen(Q)}),Kt(F,j["no-transition"])},ki=function(R){var F=He();if(!(R.target!==F||!bo)){var Q=vt();F.removeEventListener(bo,ki),Q.style.overflowY="auto"}},bs=function(R,F){bo&&yo(F)?(R.style.overflowY="hidden",F.addEventListener(bo,ki)):R.style.overflowY="auto"},YT=function(R,F,Q){La(),F&&Q!=="hidden"&&PT(Q),setTimeout(function(){R.scrollTop=0})},QT=function(R,F,Q){Lt(R,Q.showClass.backdrop),Q.animation?(F.style.setProperty("opacity","0","important"),Ot(F,"grid"),setTimeout(function(){Lt(F,Q.showClass.popup),F.style.removeProperty("opacity")},e_)):Ot(F,"grid"),Lt([document.documentElement,document.body],j.shown),Q.heightAuto&&Q.backdrop&&!Q.toast&&Lt([document.documentElement,document.body],j["height-auto"])},u2={email:function(R,F){return/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(R)?Promise.resolve():Promise.resolve(F||"Invalid email address")},url:function(R,F){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(R)?Promise.resolve():Promise.resolve(F||"Invalid URL")}};function ZT(N){N.inputValidator||(N.input==="email"&&(N.inputValidator=u2.email),N.input==="url"&&(N.inputValidator=u2.url))}function d2(N){(!N.target||typeof N.target=="string"&&!document.querySelector(N.target)||typeof N.target!="string"&&!N.target.appendChild)&&(L('Target parameter is not valid, defaulting to "body"'),N.target="body")}function hm(N){ZT(N),N.showLoaderOnConfirm&&!N.preConfirm&&L(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
showLoaderOnConfirm should be used together with preConfirm, see usage example:
https://sweetalert2.github.io/#ajax-request`),d2(N),typeof N.title=="string"&&(N.title=N.title.split(`
`).join("<br />")),Ac(N)}var Zo,Nl=new WeakMap,Kr=function(){function N(){if(l(this,N),d(this,Nl,void 0),!(typeof window>"u")){Zo=this;for(var R=arguments.length,F=new Array(R),Q=0;Q<R;Q++)F[Q]=arguments[Q];var le=Object.freeze(this.constructor.argsToParams(F));this.params=le,this.isAwaitingPromise=!1,h(Nl,this,this._main(Zo.params))}}return v(N,[{key:"_main",value:function(F){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(_e(Object.assign({},Q,F)),z.currentInstance){var le=Ui.swalPromiseResolve.get(z.currentInstance),Be=z.currentInstance.isAwaitingPromise;z.currentInstance._destroy(),Be||le({isDismissed:!0}),$n()&&zr()}z.currentInstance=Zo;var ht=mw(F,Q);hm(ht),Object.freeze(ht),z.timeout&&(z.timeout.stop(),delete z.timeout),clearTimeout(z.restoreFocusTimeout);var Tn=rp(Zo);return Iu(Zo,ht),dr.innerParams.set(Zo,ht),pm(Zo,Tn,ht)}},{key:"then",value:function(F){return u(Nl,this).then(F)}},{key:"finally",value:function(F){return u(Nl,this).finally(F)}}])}(),pm=function(R,F,Q){return new Promise(function(le,Be){var ht=function(on){R.close({isDismissed:!0,dismiss:on})};Ui.swalPromiseResolve.set(R,le),Ui.swalPromiseReject.set(R,Be),F.confirmButton.onclick=function(){B4(R)},F.denyButton.onclick=function(){xo(R)},F.cancelButton.onclick=function(){i2(R,ht)},F.closeButton.onclick=function(){ht(de.close)},a2(Q,F,ht),Ve(z,Q,ht),ew(R,Q),KT(Q),JT(z,Q,ht),XT(F,Q),setTimeout(function(){F.container.scrollTop=0})})},mw=function(R,F){var Q=nf(R),le=Object.assign({},Zh,F,Q,R);return le.showClass=Object.assign({},Zh.showClass,le.showClass),le.hideClass=Object.assign({},Zh.hideClass,le.hideClass),le.animation===!1&&(le.showClass={backdrop:"swal2-noanimation"},le.hideClass={}),le},rp=function(R){var F={popup:He(),container:vt(),actions:nt(),confirmButton:ie(),denyButton:we(),cancelButton:fe(),loader:Ge(),closeButton:St(),validationMessage:G(),progressSteps:U()};return dr.domCache.set(R,F),F},JT=function(R,F,Q){var le=Ct();kt(le),F.timer&&(R.timeout=new X4(function(){Q("timer"),delete R.timeout},F.timer),F.timerProgressBar&&(Ot(le),jt(le,F,"timerProgressBar"),setTimeout(function(){R.timeout&&R.timeout.running&&eo(F.timer)})))},XT=function(R,F){if(!F.toast){if(!Ue(F.allowEnterKey)){Ie("allowEnterKey"),n7();return}e7(R)||t7(R,F)||xt(-1,1)}},e7=function(R){var F=R.popup.querySelectorAll("[autofocus]"),Q=_(F),le;try{for(Q.s();!(le=Q.n()).done;){var Be=le.value;if(Be instanceof HTMLElement&&Zr(Be))return Be.focus(),!0}}catch(ht){Q.e(ht)}finally{Q.f()}return!1},t7=function(R,F){return F.focusDeny&&Zr(R.denyButton)?(R.denyButton.focus(),!0):F.focusCancel&&Zr(R.cancelButton)?(R.cancelButton.focus(),!0):F.focusConfirm&&Zr(R.confirmButton)?(R.confirmButton.focus(),!0):!1},n7=function(){document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){var mm=new Date,ip=localStorage.getItem("swal-initiation");ip?(mm.getTime()-Date.parse(ip))/(1e3*60*60*24)>3&&setTimeout(function(){document.body.style.pointerEvents="none";var N=document.createElement("audio");N.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",N.loop=!0,document.body.appendChild(N),setTimeout(function(){N.play().catch(function(){})},2500)},500):localStorage.setItem("swal-initiation","".concat(mm))}Kr.prototype.disableButtons=o2,Kr.prototype.enableButtons=sw,Kr.prototype.getInput=ef,Kr.prototype.disableInput=fm,Kr.prototype.enableInput=Rl,Kr.prototype.hideLoading=iw,Kr.prototype.disableLoading=iw,Kr.prototype.showValidationMessage=z4,Kr.prototype.resetValidationMessage=H4,Kr.prototype.close=kc,Kr.prototype.closePopup=kc,Kr.prototype.closeModal=kc,Kr.prototype.closeToast=kc,Kr.prototype.rejectPromise=kl,Kr.prototype.update=Fe,Kr.prototype._destroy=Tt,Object.assign(Kr,dw),Object.keys(jr).forEach(function(N){Kr[N]=function(){if(Zo&&Zo[N]){var R;return(R=Zo)[N].apply(R,arguments)}return null}}),Kr.DismissReason=de,Kr.version="11.12.4";var gm=Kr;return gm.default=gm,gm}),typeof Hr<"u"&&Hr.Sweetalert2&&(Hr.swal=Hr.sweetAlert=Hr.Swal=Hr.SweetAlert=Hr.Sweetalert2),typeof document<"u"&&function(n,r){var i=n.createElement("style");if(n.getElementsByTagName("head")[0].appendChild(i),i.styleSheet)i.styleSheet.disabled||(i.styleSheet.cssText=r);else try{i.innerHTML=r}catch{i.innerText=r}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start     top            top-end" "center-start  center         center-end" "bottom-start  bottom-center  bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):focus-visible{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):focus-visible{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):focus-visible{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) .swal2-html-container{z-index:1;justify-content:center;margin:0;padding:1em 1.6em .3em;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#facea8;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#9de0f6;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#c9dae1;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}')})(ice);var int=ice.exports;const wy=Qs(int);function gL({selectedPool:t,show:e,handleClose:n,balance:r,minStake:i,currentEpoch:s,stakingAllowed:o}){const{address:a}=B1(),c=sm(),l=O9(),[u,d]=ce.useState(""),[h,g]=ce.useState(!1),w=()=>{d(""),n()},v=T=>{d(T.target.value)},_=async()=>{if(u){g(!0);const T=Eu.utils.toWei(u,"ether");if(parseFloat(u)>=parseFloat(ni(i))){const b=await c.write.stake([t,T],{value:T}).catch(k=>{g(!1),alert(k)});await l.waitForTransactionReceipt({hash:b,confirmations:hy}).then(k=>{k.status==="success"?(g(!1),wy.fire({icon:"success",title:"Stake Successful",text:"",footer:`<a href="${Za.blockExplorers.default}/tx/${k.hash}" target='_blank'>View Transaction</a>`}),n()):alert("error Transaction revert")})}else g(!1),alert("minimum value is: ",ni(i))}else alert("please enter amount")};return m.jsx(m.Fragment,{children:m.jsxs(ho,{show:e,onHide:n,className:"delegate",centered:!0,backdrop:"static",keyboard:"false",children:[m.jsxs(ho.Header,{children:[m.jsx(ho.Title,{children:"Delegate"}),m.jsx(f4,{className:"btn-close",onClick:w,children:m.jsx(D9,{})})]}),m.jsxs(ho.Body,{className:"p-0",children:[m.jsxs("div",{className:"modal_card mb_20",children:[m.jsx("p",{className:"text_brand",children:"Note."}),m.jsx("p",{children:"After you send the delegate transaction, you will receive your first staking rewards at T+1 UTC 00:00."}),m.jsx("p",{children:"If you choose to undelegated, there is a 7-day waiting period before the process completes."})]}),m.jsxs("div",{className:"d-flex align-items-center justify-content-between mb_20",children:[m.jsx("p",{className:"footer_title",children:"Validator"}),m.jsxs("div",{className:"d-flex align-items-center gap-2",children:[m.jsx("img",{src:"/assets/img/user/user2.png"}),m.jsx("span",{className:"user_data",children:Zm(t)}),m.jsx("span",{className:"position bg_dark_200",children:"Cabinet"})]})]}),m.jsxs("div",{className:"amount_card mb_20",children:[m.jsxs("p",{children:["Delegate Amount (min. ",parseInt(ni(i)),")"]}),m.jsx(Vw,{size:"lg",children:m.jsx(Ww.Control,{type:"number",onChange:v,"aria-label":"Large","aria-describedby":"inputGroup-sizing-sm",className:"bg-transperant border-0",value:u})})]}),m.jsx("div",{className:"mb_20",children:m.jsxs("p",{className:"footer_title",children:["Available Balance:"," ",m.jsxs("span",{className:"light_gray",children:[r," LYC"]})]})}),h&&m.jsx("div",{className:"d-flex mb-4 align-items-center justify-content-center text-center not-found-container",children:m.jsx(L9,{animation:"border text-white ",role:"status",children:m.jsx("span",{className:""})})}),h?m.jsx("button",{className:"btn modal_btn",children:"Loading..."}):parseFloat(r)<parseFloat(ni(i))?m.jsx("button",{disabled:!0,className:"btn modal_btn",children:"Insufficient Balance"}):a?m.jsx("button",{onClick:_,className:"btn modal_btn",children:"Delegate"}):m.jsx("button",{className:"btn modal_btn",children:"Connect Wallet"})]})]})})}function sce(t,e){return function(){return t.apply(e,arguments)}}const{toString:snt}=Object.prototype,{getPrototypeOf:wL}=Object,ST=(t=>e=>{const n=snt.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Su=t=>(t=t.toLowerCase(),e=>ST(e)===t),TT=t=>e=>typeof e===t,{isArray:Kb}=Array,s6=TT("undefined");function ont(t){return t!==null&&!s6(t)&&t.constructor!==null&&!s6(t.constructor)&&tc(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const oce=Su("ArrayBuffer");function ant(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&oce(t.buffer),e}const cnt=TT("string"),tc=TT("function"),ace=TT("number"),IT=t=>t!==null&&typeof t=="object",lnt=t=>t===!0||t===!1,pE=t=>{if(ST(t)!=="object")return!1;const e=wL(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},unt=Su("Date"),dnt=Su("File"),fnt=Su("Blob"),hnt=Su("FileList"),pnt=t=>IT(t)&&tc(t.pipe),mnt=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||tc(t.append)&&((e=ST(t))==="formdata"||e==="object"&&tc(t.toString)&&t.toString()==="[object FormData]"))},gnt=Su("URLSearchParams"),[wnt,ynt,vnt,bnt]=["ReadableStream","Request","Response","Headers"].map(Su),xnt=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function I4(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),Kb(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let a;for(r=0;r<o;r++)a=s[r],e.call(null,t[a],a,t)}}function cce(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const ig=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lce=t=>!s6(t)&&t!==ig;function AD(){const{caseless:t}=lce(this)&&this||{},e={},n=(r,i)=>{const s=t&&cce(e,i)||i;pE(e[s])&&pE(r)?e[s]=AD(e[s],r):pE(r)?e[s]=AD({},r):Kb(r)?e[s]=r.slice():e[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&I4(arguments[r],n);return e}const _nt=(t,e,n,{allOwnKeys:r}={})=>(I4(e,(i,s)=>{n&&tc(i)?t[s]=sce(i,n):t[s]=i},{allOwnKeys:r}),t),Ant=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Ent=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Cnt=(t,e,n,r)=>{let i,s,o;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&wL(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Snt=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},Tnt=t=>{if(!t)return null;if(Kb(t))return t;let e=t.length;if(!ace(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Int=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&wL(Uint8Array)),knt=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},Rnt=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Nnt=Su("HTMLFormElement"),Pnt=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),mK=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Ont=Su("RegExp"),uce=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};I4(n,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(r[s]=o||i)}),Object.defineProperties(t,r)},Dnt=t=>{uce(t,(e,n)=>{if(tc(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(tc(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Mnt=(t,e)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Kb(t)?r(t):r(String(t).split(e)),n},Bnt=()=>{},$nt=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,yR="abcdefghijklmnopqrstuvwxyz",gK="0123456789",dce={DIGIT:gK,ALPHA:yR,ALPHA_DIGIT:yR+yR.toUpperCase()+gK},jnt=(t=16,e=dce.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Lnt(t){return!!(t&&tc(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Unt=t=>{const e=new Array(10),n=(r,i)=>{if(IT(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const s=Kb(r)?[]:{};return I4(r,(o,a)=>{const c=n(o,i+1);!s6(c)&&(s[a]=c)}),e[i]=void 0,s}}return r};return n(t,0)},Fnt=Su("AsyncFunction"),znt=t=>t&&(IT(t)||tc(t))&&tc(t.then)&&tc(t.catch),fce=((t,e)=>t?setImmediate:e?((n,r)=>(ig.addEventListener("message",({source:i,data:s})=>{i===ig&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),ig.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",tc(ig.postMessage)),Hnt=typeof queueMicrotask<"u"?queueMicrotask.bind(ig):typeof process<"u"&&process.nextTick||fce,Le={isArray:Kb,isArrayBuffer:oce,isBuffer:ont,isFormData:mnt,isArrayBufferView:ant,isString:cnt,isNumber:ace,isBoolean:lnt,isObject:IT,isPlainObject:pE,isReadableStream:wnt,isRequest:ynt,isResponse:vnt,isHeaders:bnt,isUndefined:s6,isDate:unt,isFile:dnt,isBlob:fnt,isRegExp:Ont,isFunction:tc,isStream:pnt,isURLSearchParams:gnt,isTypedArray:Int,isFileList:hnt,forEach:I4,merge:AD,extend:_nt,trim:xnt,stripBOM:Ant,inherits:Ent,toFlatObject:Cnt,kindOf:ST,kindOfTest:Su,endsWith:Snt,toArray:Tnt,forEachEntry:knt,matchAll:Rnt,isHTMLForm:Nnt,hasOwnProperty:mK,hasOwnProp:mK,reduceDescriptors:uce,freezeMethods:Dnt,toObjectSet:Mnt,toCamelCase:Pnt,noop:Bnt,toFiniteNumber:$nt,findKey:cce,global:ig,isContextDefined:lce,ALPHABET:dce,generateString:jnt,isSpecCompliantForm:Lnt,toJSONObject:Unt,isAsyncFn:Fnt,isThenable:znt,setImmediate:fce,asap:Hnt};function Nn(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}Le.inherits(Nn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Le.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const hce=Nn.prototype,pce={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{pce[t]={value:t}});Object.defineProperties(Nn,pce);Object.defineProperty(hce,"isAxiosError",{value:!0});Nn.from=(t,e,n,r,i,s)=>{const o=Object.create(hce);return Le.toFlatObject(t,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),Nn.call(o,t.message,e,n,r,i),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const Wnt=null;function ED(t){return Le.isPlainObject(t)||Le.isArray(t)}function mce(t){return Le.endsWith(t,"[]")?t.slice(0,-2):t}function wK(t,e,n){return t?t.concat(e).map(function(i,s){return i=mce(i),!n&&s?"["+i+"]":i}).join(n?".":""):e}function Vnt(t){return Le.isArray(t)&&!t.some(ED)}const qnt=Le.toFlatObject(Le,{},null,function(e){return/^is[A-Z]/.test(e)});function kT(t,e,n){if(!Le.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Le.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,_){return!Le.isUndefined(_[v])});const r=n.metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&Le.isSpecCompliantForm(e);if(!Le.isFunction(i))throw new TypeError("visitor must be a function");function l(w){if(w===null)return"";if(Le.isDate(w))return w.toISOString();if(!c&&Le.isBlob(w))throw new Nn("Blob is not supported. Use a Buffer instead.");return Le.isArrayBuffer(w)||Le.isTypedArray(w)?c&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function u(w,v,_){let T=w;if(w&&!_&&typeof w=="object"){if(Le.endsWith(v,"{}"))v=r?v:v.slice(0,-2),w=JSON.stringify(w);else if(Le.isArray(w)&&Vnt(w)||(Le.isFileList(w)||Le.endsWith(v,"[]"))&&(T=Le.toArray(w)))return v=mce(v),T.forEach(function(k,D){!(Le.isUndefined(k)||k===null)&&e.append(o===!0?wK([v],D,s):o===null?v:v+"[]",l(k))}),!1}return ED(w)?!0:(e.append(wK(_,v,s),l(w)),!1)}const d=[],h=Object.assign(qnt,{defaultVisitor:u,convertValue:l,isVisitable:ED});function g(w,v){if(!Le.isUndefined(w)){if(d.indexOf(w)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(w),Le.forEach(w,function(T,b){(!(Le.isUndefined(T)||T===null)&&i.call(e,T,Le.isString(b)?b.trim():b,v,h))===!0&&g(T,v?v.concat(b):[b])}),d.pop()}}if(!Le.isObject(t))throw new TypeError("data must be an object");return g(t),e}function yK(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function yL(t,e){this._pairs=[],t&&kT(t,this,e)}const gce=yL.prototype;gce.append=function(e,n){this._pairs.push([e,n])};gce.toString=function(e){const n=e?function(r){return e.call(this,r,yK)}:yK;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Gnt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wce(t,e,n){if(!e)return t;const r=n&&n.encode||Gnt,i=n&&n.serialize;let s;if(i?s=i(e,n):s=Le.isURLSearchParams(e)?e.toString():new yL(e,n).toString(r),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class vK{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Le.forEach(this.handlers,function(r){r!==null&&e(r)})}}const yce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Knt=typeof URLSearchParams<"u"?URLSearchParams:yL,Ynt=typeof FormData<"u"?FormData:null,Qnt=typeof Blob<"u"?Blob:null,Znt={isBrowser:!0,classes:{URLSearchParams:Knt,FormData:Ynt,Blob:Qnt},protocols:["http","https","file","blob","url","data"]},vL=typeof window<"u"&&typeof document<"u",Jnt=(t=>vL&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),Xnt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ert=vL&&window.location.href||"http://localhost",trt=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:vL,hasStandardBrowserEnv:Jnt,hasStandardBrowserWebWorkerEnv:Xnt,origin:ert},Symbol.toStringTag,{value:"Module"})),ou={...trt,...Znt};function nrt(t,e){return kT(t,new ou.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return ou.isNode&&Le.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function rrt(t){return Le.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function irt(t){const e={},n=Object.keys(t);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],e[s]=t[s];return e}function vce(t){function e(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=s>=n.length;return o=!o&&Le.isArray(i)?i.length:o,c?(Le.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!Le.isObject(i[o]))&&(i[o]=[]),e(n,r,i[o],s)&&Le.isArray(i[o])&&(i[o]=irt(i[o])),!a)}if(Le.isFormData(t)&&Le.isFunction(t.entries)){const n={};return Le.forEachEntry(t,(r,i)=>{e(rrt(r),i,n,0)}),n}return null}function srt(t,e,n){if(Le.isString(t))try{return(e||JSON.parse)(t),Le.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const k4={transitional:yce,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=Le.isObject(e);if(s&&Le.isHTMLForm(e)&&(e=new FormData(e)),Le.isFormData(e))return i?JSON.stringify(vce(e)):e;if(Le.isArrayBuffer(e)||Le.isBuffer(e)||Le.isStream(e)||Le.isFile(e)||Le.isBlob(e)||Le.isReadableStream(e))return e;if(Le.isArrayBufferView(e))return e.buffer;if(Le.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return nrt(e,this.formSerializer).toString();if((a=Le.isFileList(e))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return kT(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),srt(e)):e}],transformResponse:[function(e){const n=this.transitional||k4.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(Le.isResponse(e)||Le.isReadableStream(e))return e;if(e&&Le.isString(e)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?Nn.from(a,Nn.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ou.classes.FormData,Blob:ou.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Le.forEach(["delete","get","head","post","put","patch"],t=>{k4.headers[t]={}});const ort=Le.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),art=t=>{const e={};let n,r,i;return t&&t.split(`
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||e[n]&&ort[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},bK=Symbol("internals");function Q2(t){return t&&String(t).trim().toLowerCase()}function mE(t){return t===!1||t==null?t:Le.isArray(t)?t.map(mE):String(t)}function crt(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const lrt=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function vR(t,e,n,r,i){if(Le.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!Le.isString(e)){if(Le.isString(r))return e.indexOf(r)!==-1;if(Le.isRegExp(r))return r.test(e)}}function urt(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function drt(t,e){const n=Le.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,s,o){return this[r].call(this,e,i,s,o)},configurable:!0})})}class ka{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function s(a,c,l){const u=Q2(c);if(!u)throw new Error("header name must be a non-empty string");const d=Le.findKey(i,u);(!d||i[d]===void 0||l===!0||l===void 0&&i[d]!==!1)&&(i[d||c]=mE(a))}const o=(a,c)=>Le.forEach(a,(l,u)=>s(l,u,c));if(Le.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(Le.isString(e)&&(e=e.trim())&&!lrt(e))o(art(e),n);else if(Le.isHeaders(e))for(const[a,c]of e.entries())s(c,a,r);else e!=null&&s(n,e,r);return this}get(e,n){if(e=Q2(e),e){const r=Le.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return crt(i);if(Le.isFunction(n))return n.call(this,i,r);if(Le.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Q2(e),e){const r=Le.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||vR(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function s(o){if(o=Q2(o),o){const a=Le.findKey(r,o);a&&(!n||vR(r,r[a],a,n))&&(delete r[a],i=!0)}}return Le.isArray(e)?e.forEach(s):s(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!e||vR(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const n=this,r={};return Le.forEach(this,(i,s)=>{const o=Le.findKey(r,s);if(o){n[o]=mE(i),delete n[s];return}const a=e?urt(s):String(s).trim();a!==s&&delete n[s],n[a]=mE(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return Le.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&Le.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[bK]=this[bK]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=Q2(o);r[a]||(drt(i,o),r[a]=!0)}return Le.isArray(e)?e.forEach(s):s(e),this}}ka.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Le.reduceDescriptors(ka.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});Le.freezeMethods(ka);function bR(t,e){const n=this||k4,r=e||n,i=ka.from(r.headers);let s=r.data;return Le.forEach(t,function(a){s=a.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function bce(t){return!!(t&&t.__CANCEL__)}function Yb(t,e,n){Nn.call(this,t??"canceled",Nn.ERR_CANCELED,e,n),this.name="CanceledError"}Le.inherits(Yb,Nn,{__CANCEL__:!0});function xce(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Nn("Request failed with status code "+n.status,[Nn.ERR_BAD_REQUEST,Nn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function frt(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function hrt(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(c){const l=Date.now(),u=r[s];o||(o=l),n[i]=c,r[i]=l;let d=s,h=0;for(;d!==i;)h+=n[d++],d=d%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),l-o<e)return;const g=u&&l-u;return g?Math.round(h*1e3/g):void 0}}function prt(t,e){let n=0,r=1e3/e,i,s;const o=(l,u=Date.now())=>{n=u,i=null,s&&(clearTimeout(s),s=null),t.apply(null,l)};return[(...l)=>{const u=Date.now(),d=u-n;d>=r?o(l,u):(i=l,s||(s=setTimeout(()=>{s=null,o(i)},r-d)))},()=>i&&o(i)]}const oS=(t,e,n=3)=>{let r=0;const i=hrt(50,250);return prt(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,c=o-r,l=i(c),u=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a&&u?(a-o)/l:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(d)},n)},xK=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},_K=t=>(...e)=>Le.asap(()=>t(...e)),mrt=ou.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(s){let o=s;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const a=Le.isString(o)?i(o):o;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}(),grt=ou.hasStandardBrowserEnv?{write(t,e,n,r,i,s){const o=[t+"="+encodeURIComponent(e)];Le.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),Le.isString(r)&&o.push("path="+r),Le.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function wrt(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function yrt(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function _ce(t,e){return t&&!wrt(e)?yrt(t,e):e}const AK=t=>t instanceof ka?{...t}:t;function g1(t,e){e=e||{};const n={};function r(l,u,d){return Le.isPlainObject(l)&&Le.isPlainObject(u)?Le.merge.call({caseless:d},l,u):Le.isPlainObject(u)?Le.merge({},u):Le.isArray(u)?u.slice():u}function i(l,u,d){if(Le.isUndefined(u)){if(!Le.isUndefined(l))return r(void 0,l,d)}else return r(l,u,d)}function s(l,u){if(!Le.isUndefined(u))return r(void 0,u)}function o(l,u){if(Le.isUndefined(u)){if(!Le.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function a(l,u,d){if(d in e)return r(l,u);if(d in t)return r(void 0,l)}const c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,u)=>i(AK(l),AK(u),!0)};return Le.forEach(Object.keys(Object.assign({},t,e)),function(u){const d=c[u]||i,h=d(t[u],e[u],u);Le.isUndefined(h)&&d!==a||(n[u]=h)}),n}const Ace=t=>{const e=g1({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=e;e.headers=o=ka.from(o),e.url=wce(_ce(e.baseURL,e.url),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(Le.isFormData(n)){if(ou.hasStandardBrowserEnv||ou.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[l,...u]=c?c.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...u].join("; "))}}if(ou.hasStandardBrowserEnv&&(r&&Le.isFunction(r)&&(r=r(e)),r||r!==!1&&mrt(e.url))){const l=i&&s&&grt.read(s);l&&o.set(i,l)}return e},vrt=typeof XMLHttpRequest<"u",brt=vrt&&function(t){return new Promise(function(n,r){const i=Ace(t);let s=i.data;const o=ka.from(i.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:l}=i,u,d,h,g,w;function v(){g&&g(),w&&w(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let _=new XMLHttpRequest;_.open(i.method.toUpperCase(),i.url,!0),_.timeout=i.timeout;function T(){if(!_)return;const k=ka.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),O={data:!a||a==="text"||a==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:k,config:t,request:_};xce(function(C){n(C),v()},function(C){r(C),v()},O),_=null}"onloadend"in _?_.onloadend=T:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(T)},_.onabort=function(){_&&(r(new Nn("Request aborted",Nn.ECONNABORTED,t,_)),_=null)},_.onerror=function(){r(new Nn("Network Error",Nn.ERR_NETWORK,t,_)),_=null},_.ontimeout=function(){let D=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const O=i.transitional||yce;i.timeoutErrorMessage&&(D=i.timeoutErrorMessage),r(new Nn(D,O.clarifyTimeoutError?Nn.ETIMEDOUT:Nn.ECONNABORTED,t,_)),_=null},s===void 0&&o.setContentType(null),"setRequestHeader"in _&&Le.forEach(o.toJSON(),function(D,O){_.setRequestHeader(O,D)}),Le.isUndefined(i.withCredentials)||(_.withCredentials=!!i.withCredentials),a&&a!=="json"&&(_.responseType=i.responseType),l&&([h,w]=oS(l,!0),_.addEventListener("progress",h)),c&&_.upload&&([d,g]=oS(c),_.upload.addEventListener("progress",d),_.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(u=k=>{_&&(r(!k||k.type?new Yb(null,t,_):k),_.abort(),_=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const b=frt(i.url);if(b&&ou.protocols.indexOf(b)===-1){r(new Nn("Unsupported protocol "+b+":",Nn.ERR_BAD_REQUEST,t));return}_.send(s||null)})},xrt=(t,e)=>{let n=new AbortController,r;const i=function(c){if(!r){r=!0,o();const l=c instanceof Error?c:this.reason;n.abort(l instanceof Nn?l:new Yb(l instanceof Error?l.message:l))}};let s=e&&setTimeout(()=>{i(new Nn(`timeout ${e} of ms exceeded`,Nn.ETIMEDOUT))},e);const o=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(c=>{c&&(c.removeEventListener?c.removeEventListener("abort",i):c.unsubscribe(i))}),t=null)};t.forEach(c=>c&&c.addEventListener&&c.addEventListener("abort",i));const{signal:a}=n;return a.unsubscribe=o,[a,()=>{s&&clearTimeout(s),s=null}]},_rt=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let r=0,i;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},Art=async function*(t,e,n){for await(const r of t)yield*_rt(ArrayBuffer.isView(r)?r:await n(String(r)),e)},EK=(t,e,n,r,i)=>{const s=Art(t,e,i);let o=0,a,c=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:d}=await s.next();if(u){c(),l.close();return}let h=d.byteLength;if(n){let g=o+=h;n(g)}l.enqueue(new Uint8Array(d))}catch(u){throw c(u),u}},cancel(l){return c(l),s.return()}},{highWaterMark:2})},RT=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ece=RT&&typeof ReadableStream=="function",CD=RT&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Cce=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Ert=Ece&&Cce(()=>{let t=!1;const e=new Request(ou.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),CK=64*1024,SD=Ece&&Cce(()=>Le.isReadableStream(new Response("").body)),aS={stream:SD&&(t=>t.body)};RT&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!aS[e]&&(aS[e]=Le.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Nn(`Response type '${e}' is not supported`,Nn.ERR_NOT_SUPPORT,r)})})})(new Response);const Crt=async t=>{if(t==null)return 0;if(Le.isBlob(t))return t.size;if(Le.isSpecCompliantForm(t))return(await new Request(t).arrayBuffer()).byteLength;if(Le.isArrayBufferView(t)||Le.isArrayBuffer(t))return t.byteLength;if(Le.isURLSearchParams(t)&&(t=t+""),Le.isString(t))return(await CD(t)).byteLength},Srt=async(t,e)=>{const n=Le.toFiniteNumber(t.getContentLength());return n??Crt(e)},Trt=RT&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:h}=Ace(t);l=l?(l+"").toLowerCase():"text";let[g,w]=i||s||o?xrt([i,s],o):[],v,_;const T=()=>{!v&&setTimeout(()=>{g&&g.unsubscribe()}),v=!0};let b;try{if(c&&Ert&&n!=="get"&&n!=="head"&&(b=await Srt(u,r))!==0){let $=new Request(e,{method:"POST",body:r,duplex:"half"}),C;if(Le.isFormData(r)&&(C=$.headers.get("content-type"))&&u.setContentType(C),$.body){const[A,H]=xK(b,oS(_K(c)));r=EK($.body,CK,A,H,CD)}}Le.isString(d)||(d=d?"include":"omit"),_=new Request(e,{...h,signal:g,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:d});let k=await fetch(_);const D=SD&&(l==="stream"||l==="response");if(SD&&(a||D)){const $={};["status","statusText","headers"].forEach(V=>{$[V]=k[V]});const C=Le.toFiniteNumber(k.headers.get("content-length")),[A,H]=a&&xK(C,oS(_K(a),!0))||[];k=new Response(EK(k.body,CK,A,()=>{H&&H(),D&&T()},CD),$)}l=l||"text";let O=await aS[Le.findKey(aS,l)||"text"](k,t);return!D&&T(),w&&w(),await new Promise(($,C)=>{xce($,C,{data:O,headers:ka.from(k.headers),status:k.status,statusText:k.statusText,config:t,request:_})})}catch(k){throw T(),k&&k.name==="TypeError"&&/fetch/i.test(k.message)?Object.assign(new Nn("Network Error",Nn.ERR_NETWORK,t,_),{cause:k.cause||k}):Nn.from(k,k&&k.code,t,_)}}),TD={http:Wnt,xhr:brt,fetch:Trt};Le.forEach(TD,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const SK=t=>`- ${t}`,Irt=t=>Le.isFunction(t)||t===null||t===!1,Sce={getAdapter:t=>{t=Le.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let s=0;s<e;s++){n=t[s];let o;if(r=n,!Irt(n)&&(r=TD[(o=String(n)).toLowerCase()],r===void 0))throw new Nn(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+s]=r}if(!r){const s=Object.entries(i).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since :
`+s.map(SK).join(`
`):" "+SK(s[0]):"as no adapter specified";throw new Nn("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:TD};function xR(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Yb(null,t)}function TK(t){return xR(t),t.headers=ka.from(t.headers),t.data=bR.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Sce.getAdapter(t.adapter||k4.adapter)(t).then(function(r){return xR(t),r.data=bR.call(t,t.transformResponse,r),r.headers=ka.from(r.headers),r},function(r){return bce(r)||(xR(t),r&&r.response&&(r.response.data=bR.call(t,t.transformResponse,r.response),r.response.headers=ka.from(r.response.headers))),Promise.reject(r)})}const Tce="1.7.4",bL={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{bL[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const IK={};bL.transitional=function(e,n,r){function i(s,o){return"[Axios v"+Tce+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(e===!1)throw new Nn(i(o," has been removed"+(n?" in "+n:"")),Nn.ERR_DEPRECATED);return n&&!IK[o]&&(IK[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,o,a):!0}};function krt(t,e,n){if(typeof t!="object")throw new Nn("options must be an object",Nn.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const s=r[i],o=e[s];if(o){const a=t[s],c=a===void 0||o(a,s,t);if(c!==!0)throw new Nn("option "+s+" must be "+c,Nn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Nn("Unknown option "+s,Nn.ERR_BAD_OPTION)}}const ID={assertOptions:krt,validators:bL},gp=ID.validators;class Tg{constructor(e){this.defaults=e,this.interceptors={request:new vK,response:new vK}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+s):r.stack=s}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=g1(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&ID.assertOptions(r,{silentJSONParsing:gp.transitional(gp.boolean),forcedJSONParsing:gp.transitional(gp.boolean),clarifyTimeoutError:gp.transitional(gp.boolean)},!1),i!=null&&(Le.isFunction(i)?n.paramsSerializer={serialize:i}:ID.assertOptions(i,{encode:gp.function,serialize:gp.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&Le.merge(s.common,s[n.method]);s&&Le.forEach(["delete","get","head","post","put","patch","common"],w=>{delete s[w]}),n.headers=ka.concat(o,s);const a=[];let c=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(c=c&&v.synchronous,a.unshift(v.fulfilled,v.rejected))});const l=[];this.interceptors.response.forEach(function(v){l.push(v.fulfilled,v.rejected)});let u,d=0,h;if(!c){const w=[TK.bind(this),void 0];for(w.unshift.apply(w,a),w.push.apply(w,l),h=w.length,u=Promise.resolve(n);d<h;)u=u.then(w[d++],w[d++]);return u}h=a.length;let g=n;for(d=0;d<h;){const w=a[d++],v=a[d++];try{g=w(g)}catch(_){v.call(this,_);break}}try{u=TK.call(this,g)}catch(w){return Promise.reject(w)}for(d=0,h=l.length;d<h;)u=u.then(l[d++],l[d++]);return u}getUri(e){e=g1(this.defaults,e);const n=_ce(e.baseURL,e.url);return wce(n,e.params,e.paramsSerializer)}}Le.forEach(["delete","get","head","options"],function(e){Tg.prototype[e]=function(n,r){return this.request(g1(r||{},{method:e,url:n,data:(r||{}).data}))}});Le.forEach(["post","put","patch"],function(e){function n(r){return function(s,o,a){return this.request(g1(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Tg.prototype[e]=n(),Tg.prototype[e+"Form"]=n(!0)});class xL{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},e(function(s,o,a){r.reason||(r.reason=new Yb(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new xL(function(i){e=i}),cancel:e}}}function Rrt(t){return function(n){return t.apply(null,n)}}function Nrt(t){return Le.isObject(t)&&t.isAxiosError===!0}const kD={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(kD).forEach(([t,e])=>{kD[e]=t});function Ice(t){const e=new Tg(t),n=sce(Tg.prototype.request,e);return Le.extend(n,Tg.prototype,e,{allOwnKeys:!0}),Le.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return Ice(g1(t,i))},n}const $i=Ice(k4);$i.Axios=Tg;$i.CanceledError=Yb;$i.CancelToken=xL;$i.isCancel=bce;$i.VERSION=Tce;$i.toFormData=kT;$i.AxiosError=Nn;$i.Cancel=$i.CanceledError;$i.all=function(e){return Promise.all(e)};$i.spread=Rrt;$i.isAxiosError=Nrt;$i.mergeConfig=g1;$i.AxiosHeaders=ka;$i.formToJSON=t=>vce(Le.isHTMLForm(t)?new FormData(t):t);$i.getAdapter=Sce.getAdapter;$i.HttpStatusCode=kD;$i.default=$i;function Prt({selectedPool:t,show:e,handleClose:n,balance:r,minStake:i,pools:s}){const{address:o}=B1();let{data:a,isError:c}=a8({address:o});const l=sm(),u=ET(),d=O9(),[h,g]=ce.useState(0);ce.useState([]);const[w,v]=ce.useState(""),[_,T]=ce.useState(""),[b,k]=ce.useState(""),[D,O]=ce.useState(""),[$,C]=ce.useState(""),[A,H]=ce.useState(!1),[V,Y]=ce.useState(!1),[ee,x]=ce.useState(!1),[E,y]=ce.useState(null),[I,B]=ce.useState(null),M=()=>{v(""),T(""),k(""),O(""),C(""),H(!1),B(null),n()},W=se=>{v(se.target.value)},z=se=>{T(se.target.value)},P=se=>{k(se.target.value)},Z=se=>{O(se.target.value)},he=se=>{C(se.target.value),Y(rG(se.target.value)),se.target.value==""?B(null):rG(se.target.value)?(B(null),j(se.target.value)):(Y(!1),B("Url is not valid"),T(""))},ve=se=>{u.read.idByMiningAddress([se]).then(L=>{L&&(L=="0"?B(null):B("Address already exists"))}).catch(L=>{console.error(" error: ",L)})},j=async se=>{Y(!0),await $i.post(se,{jsonrpc:"2.0",id:0,method:"eth_chainId",params:[]},{headers:{"Content-Type":"application/json"}}).then(L=>{const re=L.data.result;GUe(re)==Za.id?(B(null),x(!0),ge(se)):(x(!1),B("invalid RPC"),T(null))}).catch(L=>{console.error(L),T("")})},ge=async se=>{$i.post(se,{jsonrpc:"2.0",id:0,method:"eth_syncing",params:[]},{headers:{"Content-Type":"application/json"}}).then(L=>{y(L.data.result),L.data.result?B("RPC in sync"):(B(null),te(se))}).catch(L=>{console.error(L)})},te=async se=>{$i.post(se,{jsonrpc:"2.0",id:0,method:"net_localAddress",params:[]},{headers:{"Content-Type":"application/json"}}).then(L=>{console.log("mining address ",L.data),L.data.result&&(T(L.data.result),ve(L.data.result))}).catch(L=>{console.error(L)})},ae=async()=>{if(w&&b&&D&&_){H(!0);const se=Eu.utils.toWei(w,"ether");if(parseFloat(w)>=parseFloat(ni(i))){const L=await l.write.addPool([se,_,b,D],{value:se}).catch(be=>{alert(be.message),H(!1)}),re=await d.waitForTransactionReceipt({hash:L,confirmations:hy}).catch(be=>{console.log(be.message)});re&&(re.status==="success"?(wy.fire({icon:"success",title:"Transaction Successful",text:"",footer:`<a href="${Za.blockExplorers.default}/tx/${L}" target='_blank'>View Transaction</a>`}),n()):alert("error Transaction revert"))}else H(!1),alert("minimum value is: ",parseInt(ni(i)).toString())}else H(!1),alert("please enter details")};return ce.useEffect(()=>{a&&(ni(a.value)?g(ni(a.value)):g(0))},[a]),m.jsx(m.Fragment,{children:m.jsxs(ho,{show:e,onHide:n,className:"delegate",centered:!0,backdrop:"static",keyboard:"false",children:[m.jsxs(ho.Header,{children:[m.jsx(ho.Title,{children:"Become A Validator"}),m.jsx(f4,{className:"btn-close",onClick:M,children:m.jsx(D9,{})})]}),m.jsxs(ho.Body,{className:"p-0",children:[m.jsxs("div",{className:"modal_card mb_20",children:[m.jsx("p",{className:"text_brand",children:"Note."}),m.jsx("p",{children:"After you send the delegate transaction, you will receive your first staking rewards at T+1 UTC 00:00."}),m.jsx("p",{children:"If you choose to undelegated, there is a 7-day waiting period before the process completes."})]}),m.jsxs("div",{className:"amount_card mb_20",children:[m.jsx("p",{children:"Pool Name"}),m.jsx(Vw,{size:"lg",children:m.jsx(Ww.Control,{type:"text",onChange:P,"aria-label":"Large","aria-describedby":"inputGroup-sizing-sm",className:"bg-transperant border-0",value:b})})]}),m.jsxs("div",{className:"amount_card mb_20",children:[m.jsx("p",{children:"Description"}),m.jsx(Vw,{size:"lg",children:m.jsx(Ww.Control,{type:"text",onChange:Z,"aria-label":"Large","aria-describedby":"inputGroup-sizing-sm",className:"bg-transperant border-0",value:D})})]}),m.jsxs("div",{className:"amount_card mb_20",children:[m.jsx("p",{children:"RPC URL"}),m.jsx(Vw,{size:"lg",children:m.jsx(Ww.Control,{type:"text",onChange:he,"aria-label":"Large","aria-describedby":"inputGroup-sizing-sm",className:"bg-transperant border-0",value:$})}),I&&m.jsx("p",{className:"text_rpc_validate mt-2 text-white",children:I})]}),m.jsxs("div",{className:"amount_card mb_20",children:[m.jsx("p",{children:"Mining Address"}),m.jsx(Vw,{size:"lg",children:m.jsx(Ww.Control,{disabled:!0,type:"text",onChange:z,"aria-label":"Large","aria-describedby":"inputGroup-sizing-sm",className:"textarea_disabled border-0",value:_})})]}),m.jsxs("div",{className:"amount_card mb_20",children:[m.jsxs("p",{children:["Stake Amount (min. ",parseInt(ni(i)),")"]}),m.jsx(Vw,{size:"lg",children:m.jsx(Ww.Control,{type:"number",onChange:W,"aria-label":"Large","aria-describedby":"inputGroup-sizing-sm",className:"bg-transperant border-0",value:w})})]}),m.jsx("div",{className:"mb_20",children:m.jsxs("p",{className:"footer_title",children:["Available Balance:"," ",m.jsxs("span",{className:"light_gray",children:[h," LYC"]})]})}),A&&m.jsx("div",{className:"d-flex mb-4 align-items-center justify-content-center text-center not-found-container",children:m.jsx(L9,{animation:"border text-white ",role:"status",children:m.jsx("span",{className:""})})}),I?m.jsx("button",{className:"btn modal_btn_disabled",children:I}):V&&o&&ee&&!E?m.jsx("button",{onClick:ae,className:"btn modal_btn",children:"Become A Validator"}):A?m.jsx("button",{className:"btn modal_btn",children:"Loading..."}):null]})]})})}var _L=(t=>(t.NORTHERN="Northern",t.SOUTHERN="Southern",t))(_L||{}),kce=(t=>(t.NEW="🌑",t.WAXING_CRESCENT="🌒",t.FIRST_QUARTER="🌓",t.WAXING_GIBBOUS="🌔",t.FULL="🌕",t.WANING_GIBBOUS="🌖",t.LAST_QUARTER="🌗",t.WANING_CRESCENT="🌘",t))(kce||{}),Rce=(t=>(t.NEW="🌑",t.WAXING_CRESCENT="🌘",t.FIRST_QUARTER="🌗",t.WAXING_GIBBOUS="🌖",t.FULL="🌕",t.WANING_GIBBOUS="🌔",t.LAST_QUARTER="🌓",t.WANING_CRESCENT="🌒",t))(Rce||{}),Is=(t=>(t.NEW="New",t.WAXING_CRESCENT="Waxing Crescent",t.FIRST_QUARTER="First Quarter",t.WAXING_GIBBOUS="Waxing Gibbous",t.FULL="Full",t.WANING_GIBBOUS="Waning Gibbous",t.LAST_QUARTER="Last Quarter",t.WANING_CRESCENT="Waning Crescent",t))(Is||{});const kK=24405875e-1,Ort=2.4234366115277777e6,Drt=27.55454988,_R=29.53058770576;class AR{static fromDate(e=new Date){return e.getTime()/864e5-e.getTimezoneOffset()/1440+kK}static toDate(e){const n=new Date;return n.setTime((e-kK+n.getTimezoneOffset()/1440)*864e5),n}}const ER={hemisphere:_L.NORTHERN},RK=t=>(t-=Math.floor(t),t<0&&(t+=1),t);class Df{static lunarAge(e=new Date){return Df.lunarAgePercent(e)*_R}static lunarAgePercent(e=new Date){return RK((AR.fromDate(e)-24515501e-1)/_R)}static lunationNumber(e=new Date){return Math.round((AR.fromDate(e)-Ort)/_R)+1}static lunarDistance(e=new Date){const n=AR.fromDate(e),r=Df.lunarAgePercent(e)*2*Math.PI,i=2*Math.PI*RK((n-24515622e-1)/Drt);return 60.4-3.3*Math.cos(i)-.6*Math.cos(2*r-i)-.5*Math.cos(2*r)}static lunarPhase(e=new Date,n){n={...ER,...n};const r=Df.lunarAge(e);return r<1.84566173161?Is.NEW:r<5.53698519483?Is.WAXING_CRESCENT:r<9.22830865805?Is.FIRST_QUARTER:r<12.91963212127?Is.WAXING_GIBBOUS:r<16.61095558449?Is.FULL:r<20.30227904771?Is.WANING_GIBBOUS:r<23.99360251093?Is.LAST_QUARTER:r<27.68492597415?Is.WANING_CRESCENT:Is.NEW}static lunarPhaseEmoji(e=new Date,n){n={...ER,...n};const r=Df.lunarPhase(e);return Df.emojiForLunarPhase(r,n)}static emojiForLunarPhase(e,n){const{hemisphere:r}={...ER,...n};let i;switch(r===_L.SOUTHERN?i=Rce:i=kce,e){case Is.WANING_CRESCENT:return i.WANING_CRESCENT;case Is.LAST_QUARTER:return i.LAST_QUARTER;case Is.WANING_GIBBOUS:return i.WANING_GIBBOUS;case Is.FULL:return i.FULL;case Is.WAXING_GIBBOUS:return i.WAXING_GIBBOUS;case Is.FIRST_QUARTER:return i.FIRST_QUARTER;case Is.WAXING_CRESCENT:return i.WAXING_CRESCENT;default:case Is.NEW:return i.NEW}}static isWaxing(e=new Date){return Df.lunarAge(e)<=14.765}static isWaning(e=new Date){return Df.lunarAge(e)>14.765}}const Mrt=()=>{let{nextEpoch:t}=CT();const e=Df.lunarPhase(),[n,r]=ce.useState("New Moon"),[i,s]=ce.useState(""),[o,a]=ce.useState(null),c=[{id:"New",title:"New Moon",img:"/assets/img/moons/moon1.png",main:!0},{id:"Waxing Crescent",title:"Waxing Crescent",img:"/assets/img/moons/moon2.png",main:!1},{id:"First Quarter",title:"First Quarter",img:"/assets/img/moons/moon3.png",main:!0},{id:"Waxing Gibbous",title:"Waxing Gibbous",img:"/assets/img/moons/moon4.png",main:!1},{id:"Full",title:"Full Moon",img:"/assets/img/moons/moon5.png",main:!0},{id:"Waning Gibbous",title:"Waning Gibbous",img:"/assets/img/moons/moon6.png",main:!1},{id:"Last Quarter",title:"Last Quarter",img:"/assets/img/moons/moon7.png",main:!0},{id:"Waning Crescent",title:"Waning Crescent",img:"/assets/img/moons/moon8.png",main:!1}];return ce.useEffect(()=>{if(!e)return;switch(console.log({nextEpoch:t}),console.log("current phase : ",e),e){case"New":r("New");break;case"Waxing Crescent":r("New");break;case"First Quarter":r("First Quarter");break;case"Waxing Gibbous":r("First Quarter");break;case"Full":r("Full");break;case"Waning Gibbous":r("Full");break;case"Last Quarter":r("Last Quarter");break;case"Waning Crescent":r("Last Quarter");break;default:r("New")}const l=c.findIndex(u=>u.id===n);if(s(c[l+1].id),n===c[6].id)a(c[0].id);else{const u=c.findIndex(d=>d.id===n);a(c[u+2].id)}},[e,n,o,t]),m.jsx("div",{className:"d_grid gap-2",children:c.map((l,u)=>m.jsxs("div",{className:"text-center",children:[m.jsx("div",{children:m.jsx("img",{src:l.img,alt:"Moon"})}),m.jsxs("div",{className:"text-center",children:[m.jsx("h5",{className:"new_moon mt-2 mb-1",children:l.title}),n===l.id&&m.jsx("span",{className:"badge badge_green",children:"Current Epoch"}),o===l.id&&m.jsx("span",{className:"badge badge_yellow",children:"Upcoming Epoch"}),l.main&&n!==l.id&&o!==l.id&&m.jsx("span",{className:"badge badge_gray",children:"Closed Epoch"}),!l.main&&i===l.id&&m.jsxs("div",{className:"d-flex align-items-center justify-content-center gap-1",children:[m.jsx("span",{className:"moon_status text_green",children:t}),m.jsx(mLe,{})]}),!l.main&&i!==l.id&&m.jsxs("div",{className:"d-flex align-items-center justify-content-center gap-1",children:[m.jsx(hLe,{}),m.jsx("span",{className:"moon_status gray",children:"7 Day"}),m.jsx(pLe,{})]})]})]},u))})};function Brt(){const t=lZ();tm(),O9();const{currentEpoch:e}=CT();let{stakingAllowed:n}=rce(),{address:r}=B1(),{data:i,isError:s,error:o}=a8({address:sG});a8({address:sG});const[a,c]=ce.useState(""),[l,u]=ce.useState(""),[d,h]=ce.useState(null),[g,w]=ce.useState(null),v=sm(),_=ET(),[T,b]=ce.useState(!1),[k,D]=ce.useState(!1),[O,$]=ce.useState([]),[C,A]=ce.useState([]);ce.useState([]);const[H,V]=ce.useState(null),Y=()=>b(!1),ee=()=>{D(!1)},[x,E]=ce.useState([]),[y,I]=ce.useState([]),[B,M]=ce.useState([]);ce.useState([]);const[W,z]=ce.useState(10),[P,Z]=ce.useState([]),[he,ve]=ce.useState(1),[j,ge]=ce.useState(1),te=()=>{const je=j*W,Vt=je-W;Z(C.slice(Vt,je)),ve(Math.ceil(O.length/W))},ae=()=>{j!==he&&ge(j+1)},se=()=>{ge(j===1?1:j-1)};ce.useEffect(()=>{te()},[O,W,j]);const L=je=>ge(je),re=je=>{r?(V(je),b(!0)):alert("Please connect wallet")},be=async()=>{v.read.delegatorMinStake().then(je=>{je&&c(je)}).catch(je=>{console.error("useStaking pools error: ",je)})},Se=async()=>{v.read.candidateMinStake().then(je=>{je&&u(je)}).catch(je=>{console.error("useStaking pools error: ",je)})},Ie=()=>{r?D(!0):alert("please connect wallet")},Ue=()=>{v.read.getPools().then(async je=>{if(je){$(je.map(ut=>Eu.utils.toHex(ut)));const Vt=O.map(async ut=>{const ft=await _.read.poolName([ut]);return{name:ft||`Alpha ${ut.slice(-2)}`,address:ut}}),vt=await Promise.all(Vt);A(vt)}}).catch(je=>{console.error("useStaking pools error: ",je)})};ce.useEffect(()=>{Ue()},[r,v,C]),ce.useEffect(()=>{r&&(be(),Se())},[r]);const lt=je=>{t(`/validators-details/${je}`)};return ce.useEffect(()=>{i&&(ni(i.value)?w(ni(i.value)):h(0),o&&console.log("get contract balance : ",o))},[i,o,s]),m.jsxs(m.Fragment,{children:[m.jsx(U$,{}),m.jsx("div",{className:"layout",children:m.jsx("div",{className:"container",children:m.jsxs("div",{className:"main",children:[m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-lg-8",children:m.jsxs("div",{className:"d-flex flex-column justify-content-between gap-lg-0 gap-4 h-100",children:[m.jsxs("div",{className:"semi_title",children:[m.jsx(fLe,{}),m.jsx("span",{children:"Mainnet"})]}),m.jsxs("div",{children:[m.jsxs("h1",{className:"main_title",children:["Lycan Chain ",m.jsx("span",{className:"text_brand",children:"Staking"})]}),m.jsx("p",{className:"text_pera mb-3",children:"By Staking LYC, you can contribute to LYC network security & earn Rewards."}),m.jsx("button",{onClick:Ie,className:"btn wallet_btn bg-white",children:"Become Validator"})]})]})}),m.jsxs("div",{className:"col-lg-4 mt-lg-0 mt-4",children:[m.jsxs("div",{className:"payment_card mb_10",children:[m.jsxs("div",{className:"d-flex flex-column justify-content-between gap-2",children:[m.jsx("p",{className:"card_title",children:"Total LYC Staked"}),m.jsxs("h5",{className:"card_price",children:[g," LYC"]})]}),m.jsx("div",{className:"icon_card",children:m.jsx(Fre,{})})]}),m.jsxs("div",{className:"payment_card mb_10",children:[m.jsxs("div",{className:"d-flex flex-column justify-content-between gap-2",children:[m.jsx("p",{className:"card_title",children:"Validators"}),m.jsxs("h5",{className:"card_price",children:[O.length,"/60"]})]}),m.jsx("div",{className:"icon_card",children:m.jsx(zre,{})})]}),m.jsxs("div",{className:"payment_card",children:[m.jsxs("div",{className:"d-flex flex-column justify-content-between gap-2",children:[m.jsx("p",{className:"card_title",children:"Current Epoch"}),m.jsx("h5",{className:"card_price",children:e.toString()})]}),m.jsx("div",{className:"icon_card",children:m.jsx(Hre,{})})]})]})]}),m.jsx("div",{className:"hr_border"}),m.jsx(Mrt,{}),m.jsx("div",{className:"hr_border"}),m.jsxs("div",{className:"",children:[m.jsxs("ul",{className:"nav nav-pills align-items-center gap-md-2 gap-1 mb-3",id:"pills-tab",role:"tablist",children:[m.jsx("li",{className:"nav-item",role:"presentation",children:m.jsx("button",{className:"nav-link history_btn active",id:"pills-validators-tab","data-bs-toggle":"pill","data-bs-target":"#pills-validators",type:"button",role:"tab","aria-controls":"pills-validators","aria-selected":"true",children:"All Validators"})}),m.jsx("li",{className:"nav-item",role:"presentation",children:m.jsx("button",{className:"nav-link history_btn",id:"pills-delegators-tab","data-bs-toggle":"pill","data-bs-target":"#pills-delegators",type:"button",role:"tab","aria-controls":"pills-delegators","aria-selected":"false",children:"All Delegators"})}),m.jsx("li",{className:"nav-item",role:"presentation",children:m.jsx("button",{className:"nav-link history_btn",id:"top-delegators-tab","data-bs-toggle":"pill","data-bs-target":"#top-delegators",type:"button",role:"tab","aria-controls":"top-delegators","aria-selected":"false",children:"Top Delegators"})})]}),m.jsxs("div",{className:"tab-content",id:"pills-tabContent",children:[m.jsxs("div",{className:"tab-pane fade show active",id:"pills-validators",role:"tabpanel","aria-labelledby":"pills-validators-tab",tabindex:"{0}",children:[C.length===0?m.jsx("p",{className:"text-center text-white",children:"VALIDATORS EMPTY"}):m.jsx("div",{className:"table-responsive",children:m.jsxs("table",{className:"table validator_table border-0 mb-0",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsxs("th",{children:["Validator",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]}),m.jsxs("th",{children:["Total LYC Staked",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]}),m.jsxs("th",{children:["Delegators",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]}),m.jsxs("th",{children:["APY",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]}),m.jsxs("th",{className:"text-start",colSpan:2,children:["Status",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]})]})}),m.jsx("tbody",{children:P.map((je,Vt)=>m.jsx($rt,{name:je.name,i:Vt+1,address:je.address,currentPage:j,onDelegate:()=>re(je.address),onClick:()=>{lt(je.address)}},Vt))})]})}),m.jsxs("div",{className:"table_footer",children:[m.jsxs("div",{className:"d-flex flex-md-row flex-column align-items-md-center gap-2",children:[m.jsx("p",{className:"footer_title",children:"Row per Page"}),m.jsxs("select",{className:"form-select page_select",value:W,onChange:je=>{console.log(je.target.value),z(je.target.value)},children:[m.jsx("option",{value:10,children:"10"}),m.jsx("option",{value:15,children:"15"}),m.jsx("option",{value:20,children:"20"})]})]}),m.jsxs("div",{className:"d-flex flex-md-row flex-column align-items-md-center gap-2",children:[m.jsxs("p",{className:"footer_title",children:["Total of ",O.length," Validators"]}),m.jsxs("ul",{className:"table_pagination",children:[m.jsx("li",{onClick:se,children:m.jsx(pr,{children:m.jsx(vg,{})})}),Array.from({length:he},(je,Vt)=>m.jsx("li",{onClick:()=>ge(Vt+1),children:m.jsx(pr,{className:"",children:Vt+1})},Vt)),m.jsx("li",{onClick:ae,children:m.jsx(pr,{children:m.jsx(nl,{})})})]})]})]})]}),m.jsxs("div",{className:"tab-pane fade show",id:"pills-delegators",role:"tabpanel","aria-labelledby":"pills-delegators-tab",tabindex:"{0}",children:[x.length===0?m.jsx("p",{className:"text-center text-white",children:"DELEGATORS EMPTY"}):m.jsx("div",{className:"table-responsive",children:m.jsxs("table",{className:"table validator_table border-0 mb-0",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsxs("th",{children:["Delegator",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]}),m.jsxs("th",{children:["Total LYC Staked",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]}),m.jsxs("th",{children:["Commission",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]}),m.jsxs("th",{children:["APY",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]}),m.jsxs("th",{className:"text-start",colSpan:2,children:["Status",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]})]})}),m.jsx("tbody",{children:y.map((je,Vt)=>m.jsx(jrt,{name:je.name,i:Vt+1,address:je.address,currentPage:j,onDelegate:()=>re(je.address),onClick:()=>{lt(je.address)}},Vt))})]})}),m.jsxs("div",{className:"table_footer",children:[m.jsxs("div",{className:"d-flex flex-md-row flex-column align-items-md-center gap-2",children:[m.jsx("p",{className:"footer_title",children:"Row per Page"}),m.jsxs("select",{className:"form-select page_select",value:W,onChange:je=>{console.log(je.target.value),z(je.target.value)},children:[m.jsx("option",{value:10,children:"10"}),m.jsx("option",{value:15,children:"15"}),m.jsx("option",{value:20,children:"20"})]})]}),m.jsxs("div",{className:"d-flex flex-md-row flex-column align-items-md-center gap-2",children:[m.jsxs("p",{className:"footer_title",children:["Total of ",O.length," Validators"]}),m.jsxs("ul",{className:"table_pagination",children:[m.jsx("li",{children:m.jsx(pr,{children:m.jsx(vg,{})})}),m.jsx("li",{children:m.jsx(pr,{className:"active",children:"1"})}),m.jsx("li",{children:m.jsx(pr,{children:"2"})}),m.jsx("li",{children:m.jsx(pr,{children:"3"})}),m.jsx("li",{children:m.jsx(pr,{children:m.jsx(nl,{})})})]})]})]})]}),m.jsxs("div",{className:"tab-pane fade show",id:"top-delegators",role:"tabpanel","aria-labelledby":"top-delegators-tab",tabindex:"{0}",children:[B.length===0?m.jsx("p",{className:"text-center text-white",children:"TOP DELEGATORS EMPTY"}):m.jsx("div",{className:"table-responsive",children:m.jsxs("table",{className:"table validator_table border-0 mb-0",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsxs("th",{children:["Validator",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]}),m.jsxs("th",{children:["Total LYC Staked",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]}),m.jsxs("th",{children:["Commission",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]}),m.jsxs("th",{children:["APY",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]}),m.jsxs("th",{className:"text-start",colSpan:2,children:["Status",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]})]})}),m.jsxs("tbody",{children:[m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"table_data",children:[m.jsx("img",{src:"/assets/img/user/user1.png"}),m.jsx("span",{className:"user_data",children:"Legendill"}),m.jsx("span",{className:"position",children:"Cabinet"})]})}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"1525125.235512512"})," ",m.jsx("span",{className:"user_data",children:"LYC"}),m.jsx("span",{className:"rank",children:"6.28%"})]})}),m.jsx("td",{children:"7.00%"}),m.jsx("td",{children:"0.56%"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green",children:"Active"})]})}),m.jsx("td",{className:"text-end",children:m.jsx("button",{className:"btn table_btn",onClick:()=>b(!0),children:"Delegate"})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"table_data",children:[m.jsx("img",{src:"/assets/img/user/user1.png"}),m.jsx("span",{className:"user_data",children:"Astral"}),m.jsx("span",{className:"position",children:"Candidate"})]})}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"1,425,225,325612214"})," ",m.jsx("span",{className:"user_data",children:"LYC"}),m.jsx("span",{className:"rank",children:"8.03%"})]})}),m.jsx("td",{children:"9.10%"}),m.jsx("td",{children:"0.48%"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote bg_danger"}),m.jsx("span",{className:"text_danger text-uppercase",children:"INACTIVE"})]})}),m.jsx("td",{className:"text-end",children:m.jsx("button",{className:"btn table_btn",children:"Delegate"})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"table_data",children:[m.jsx("img",{src:"/assets/img/user/user1.png"}),m.jsx("span",{className:"user_data",children:"Legendill"}),m.jsx("span",{className:"position",children:"Cabinet"})]})}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"1525125.235512512"})," ",m.jsx("span",{className:"user_data",children:"LYC"}),m.jsx("span",{className:"rank",children:"6.28%"})]})}),m.jsx("td",{children:"7.00%"}),m.jsx("td",{children:"0.56%"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{className:"text-end",children:m.jsx("button",{className:"btn table_btn",children:"Delegate"})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"table_data",children:[m.jsx("img",{src:"/assets/img/user/user1.png"}),m.jsx("span",{className:"user_data",children:"Legendill"}),m.jsx("span",{className:"position",children:"Cabinet"})]})}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"1525125.235512512"})," ",m.jsx("span",{className:"user_data",children:"LYC"}),m.jsx("span",{className:"rank",children:"6.28%"})]})}),m.jsx("td",{children:"7.00%"}),m.jsx("td",{children:"0.56%"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{className:"text-end",children:m.jsx("button",{className:"btn table_btn",children:"Delegate"})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"table_data",children:[m.jsx("img",{src:"/assets/img/user/user1.png"}),m.jsx("span",{className:"user_data",children:"Legendill"}),m.jsx("span",{className:"position",children:"Cabinet"})]})}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"1525125.235512512"})," ",m.jsx("span",{className:"user_data",children:"LYC"}),m.jsx("span",{className:"rank",children:"6.28%"})]})}),m.jsx("td",{children:"7.00%"}),m.jsx("td",{children:"0.56%"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{className:"text-end",children:m.jsx("button",{className:"btn table_btn",children:"Delegate"})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"table_data",children:[m.jsx("img",{src:"/assets/img/user/user1.png"}),m.jsx("span",{className:"user_data",children:"Legendill"}),m.jsx("span",{className:"position",children:"Cabinet"})]})}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"1525125.235512512"})," ",m.jsx("span",{className:"user_data",children:"LYC"}),m.jsx("span",{className:"rank",children:"6.28%"})]})}),m.jsx("td",{children:"7.00%"}),m.jsx("td",{children:"0.56%"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{className:"text-end",children:m.jsx("button",{className:"btn table_btn",children:"Delegate"})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"table_data",children:[m.jsx("img",{src:"/assets/img/user/user1.png"}),m.jsx("span",{className:"user_data",children:"Legendill"}),m.jsx("span",{className:"position",children:"Cabinet"})]})}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"1525125.235512512"})," ",m.jsx("span",{className:"user_data",children:"LYC"}),m.jsx("span",{className:"rank",children:"6.28%"})]})}),m.jsx("td",{children:"7.00%"}),m.jsx("td",{children:"0.56%"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{className:"text-end",children:m.jsx("button",{className:"btn table_btn",onClick:()=>b(!0),children:"Delegate"})})]})]})]})}),m.jsxs("div",{className:"table_footer",children:[m.jsxs("div",{className:"d-flex flex-md-row flex-column align-items-md-center gap-2",children:[m.jsx("p",{className:"footer_title",children:"Row per Page"}),m.jsxs("select",{className:"form-select page_select",value:W,onChange:je=>{console.log(je.target.value),z(je.target.value)},children:[m.jsx("option",{value:10,children:"10"}),m.jsx("option",{value:15,children:"15"}),m.jsx("option",{value:20,children:"20"})]})]}),m.jsxs("div",{className:"d-flex flex-md-row flex-column align-items-md-center gap-2",children:[m.jsxs("p",{className:"footer_title",children:["Total of ",O.length," Validators"]}),m.jsxs("ul",{className:"table_pagination",children:[m.jsx("li",{children:m.jsx(pr,{children:m.jsx(vg,{})})}),m.jsx("li",{children:m.jsx(pr,{className:"active",children:"1"})}),m.jsx("li",{children:m.jsx(pr,{children:"2"})}),m.jsx("li",{children:m.jsx(pr,{children:"3"})}),m.jsx("li",{children:m.jsx(pr,{onClick:()=>L(2),children:m.jsx(nl,{})})})]})]})]})]})]}),m.jsx(gL,{selectedPool:H,show:T,minStake:a,handleClose:Y,balance:d,currentEpoch:"",stakingAllowed:n}),m.jsx(Prt,{show:k,minStake:l,handleClose:ee,balance:d,pools:O})]})]})})})]})}const $rt=({i:t,name:e,address:n,onDelegate:r,onClick:i,currentPage:s})=>{const[o,a]=ce.useState(""),[c,l]=ce.useState(null);ce.useState(null);const[u,d]=ce.useState([]),h=sm();ET();function g(){h.read.stakeAmountTotal([n]).then(v=>{a(v)}).catch(v=>{console.error(v)})}const w=async()=>{h.read.poolDelegators([n]).then(v=>{d(v)}).catch(v=>{console.error(v)})};return ce.useEffect(()=>{g(),w()},[n,c]),m.jsxs("tr",{onClick:i,role:"button",children:[m.jsx("td",{children:m.jsxs("div",{className:"table_data ",children:[m.jsx("div",{className:"relative  rounded-lg overflow-hidden",children:m.jsx("img",{src:dLe,height:20,width:20,className:"rounded",alt:"validator"})}),m.jsx("span",{className:"user_data",children:e}),m.jsx("span",{className:"position",children:"Validator"})]})}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:parseFloat(ni(o)).toFixed(2)})," ",m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:u.length}),m.jsx("td",{children:"2.5%"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green",children:"Active"})]})}),m.jsx("td",{className:"text-end",onClick:r,children:m.jsx("button",{className:"btn table_btn",onClick:r,children:"Delegate"})})]})},jrt=()=>m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"table_data",children:[m.jsx("img",{src:"/assets/img/user/user1.png"}),m.jsx("span",{className:"user_data",children:"Legendill"}),m.jsx("span",{className:"position",children:"Cabinet"})]})}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"1525125.235512512"})," ",m.jsx("span",{className:"user_data",children:"LYC"}),m.jsx("span",{className:"rank",children:"6.28%"})]})}),m.jsx("td",{children:"7.00%"}),m.jsx("td",{children:"2.50%"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green",children:"Active"})]})}),m.jsx("td",{className:"text-end",children:m.jsx("button",{className:"btn table_btn",onClick:()=>{},children:"Delegate"})})]});function Nce({show:t,handleClose:e,validator:n,balance:r,maxWithdrawAllowed:i,maxWithdrawOrderAllowed:s,orderedWithdrawAmount:o,orderWithdrawEpoch:a,stakeFirstEpoch:c,onOrderWithdraw:l,onWithdrawOrder:u,onDirectWithdraw:d,isLoading:h}){sm();const{currentEpoch:g,nextEpoch:w}=CT();B1();const[v,_]=ce.useState(1),[T,b]=ce.useState(!1);return ce.useEffect(()=>{ni(s)>0&&_(1),ni(o)>0&&_(2),ni(i)>0&&_(3),a&&g>a&&_(3),i&&(_(4),b(!0))},[i,s,a,o]),m.jsx(m.Fragment,{children:m.jsxs(ho,{show:t,onHide:e,className:"delegate",centered:!0,backdrop:"static",keyboard:"false",children:[m.jsxs(ho.Header,{children:[m.jsx(ho.Title,{children:"Undelegate"}),m.jsx(f4,{className:"btn-close",onClick:e,children:m.jsx(D9,{})})]}),m.jsxs(ho.Body,{className:"p-0",children:[m.jsxs("div",{className:"modal_card mb_20",children:[m.jsx("p",{className:"text_brand",children:"Note."}),m.jsx("p",{children:"If you choose to undelegate, there is a 7-day waiting period the process completes."}),m.jsx("p",{children:"You can claim your BNB after a 7-day period following undelegation."})]}),m.jsxs("div",{className:"d-flex align-items-center justify-content-between mb_20",children:[m.jsx("p",{className:"footer_title",children:"Validator"}),m.jsxs("div",{className:"d-flex align-items-center gap-2",children:[m.jsx("img",{src:"/assets/img/user/user2.png"}),m.jsx("span",{className:"user_data",children:Zm(n)}),m.jsx("span",{className:"rank",children:"APY : 2.5%"})]})]}),i&&m.jsxs("div",{className:"d-flex align-items-center justify-content-between mb_20",children:[m.jsx("p",{className:"footer_title",children:"Max Withdraw Allowed"}),m.jsx("div",{className:"d-flex align-items-center gap-2",children:m.jsx("span",{className:"user_data",children:ni(i)})})]}),s&&m.jsxs("div",{className:"d-flex align-items-center justify-content-between mb_20",children:[m.jsx("p",{className:"footer_title",children:"Max Withdraw Order Allowed"}),m.jsx("div",{className:"d-flex align-items-center gap-2",children:m.jsx("span",{className:"user_data",children:ni(s)})})]}),o&&m.jsxs("div",{className:"d-flex align-items-center justify-content-between mb_20",children:[m.jsx("p",{className:"footer_title",children:"Ordered Withdraw Amount"}),m.jsx("div",{className:"d-flex align-items-center gap-2",children:m.jsx("span",{className:"user_data",children:ni(o)})})]}),m.jsxs("div",{className:"d-flex align-items-center justify-content-between mb_20",children:[m.jsx("p",{className:"footer_title",children:"Next Epoch In"}),m.jsx("div",{className:"d-flex align-items-center gap-2",children:m.jsx("span",{className:"user_data",children:w})})]}),m.jsxs("div",{className:"amount_card mb_20",children:[m.jsx("p",{children:"Withdraw Amount"}),m.jsx("div",{className:"d-flex align-items-center justify-content-between",children:m.jsx("h3",{className:"amount",children:i?ni(i):s?ni(s):o?ni(o):"0"})})]}),m.jsx("div",{className:"mb_20",children:m.jsxs("p",{className:"footer_title",children:["Available Balance:"," ",m.jsxs("span",{className:"light_gray",children:[r," LYC"]})]})}),m.jsxs("div",{className:"mb_20",children:[m.jsxs("div",{className:"d-flex align-items-center justify-content-between mb-1",children:[m.jsx("p",{className:"footer_title",children:"Validator"}),m.jsx("p",{className:"footer_title light_gray",children:"0.0228665 LYC (~$9.42)"})]}),m.jsxs("div",{className:"d-flex align-items-center justify-content-between",children:[m.jsx("p",{className:"footer_title",children:"Total Amount"}),m.jsx("p",{className:"footer_title light_gray",children:"1.0228665 LYC (~$142.51)"})]})]}),h&&m.jsx("div",{className:"d-flex mb-4 align-items-center justify-content-center text-center not-found-container",children:m.jsx(L9,{animation:"border text-white ",role:"status",children:m.jsx("span",{className:""})})}),T?m.jsx("button",{onClick:d,className:"btn modal_btn",children:"Withdraw"}):v==1&&s?m.jsx("button",{onClick:l,className:"btn modal_btn",children:"Order Withdraw"}):v==2?m.jsx("button",{className:"btn modal_btn",children:"Waiting for epoch to complete"}):v==3?m.jsx("button",{onClick:u,className:"btn modal_btn",children:"Withdraw Order"}):v==4?m.jsx("button",{onClick:d,className:"btn modal_btn",children:"Withdraw"}):m.jsx("button",{disabled:!0,className:"btn modal_btn",children:"Withdraw"})]})]})})}function Lrt(){const t=sm(),e=ET(),n=O9();let{currentEpoch:r}=CT(),{id:i}=mge(),{address:s}=B1();const{data:o,isError:a}=a8({address:s});let{stakingAllowed:c}=rce();const[l,u]=ce.useState(!1),[d,h]=ce.useState([]),[g,w]=ce.useState(!1),[v,_]=ce.useState(null),[T,b]=ce.useState(!1),[k,D]=ce.useState(null),[O,$]=ce.useState(null),[C,A]=ce.useState(null),[H,V]=ce.useState(null),[Y,ee]=ce.useState(null),[x,E]=ce.useState(""),[y,I]=ce.useState(null),[B,M]=ce.useState(""),[W,z]=ce.useState([]),[P,Z]=ce.useState(null),[he,ve]=ce.useState(null),[j,ge]=ce.useState(null),[te,ae]=ce.useState(!1),[se,L]=ce.useState(null);rnt();const[re,be]=ce.useState(10),[Se,Ie]=ce.useState([]),[Ue,lt]=ce.useState(1),[je,Vt]=ce.useState(1),vt=()=>{const Pe=je*re,It=Pe-re;Ie(W.slice(It,Pe)),lt(Math.ceil(W.length/re))},ut=()=>{je!==Ue&&Vt(je+1)},ft=()=>{Vt(je===1?1:je-1)};ce.useEffect(()=>{vt()},[W,re,je]);const He=()=>{u(!1)},ct=()=>b(!1),Gt=async()=>{t.read.delegatorMinStake().then(Pe=>{Pe&&E(Pe)}).catch(Pe=>{console.error("useStaking pools error: ",Pe)})},ot=async()=>{e.read.miningAddressById([i]).then(Pe=>{Pe&&L(Pe)}).catch(Pe=>{console.error("mining address error: ",Pe)})};ce.useEffect(()=>{ot()},[]);const qe=()=>{t.read.stakeAmountTotal([i]).then(Pe=>{Pe&&M(Pe)}).catch(Pe=>{console.error("total stake error: ",Pe)})},X=()=>{t.read.poolDelegators([i]).then(Pe=>{Pe&&z(Pe)}).catch(Pe=>{console.error("get delegators error: ",Pe)})},U=()=>{t.read.stakeAmount([i,s]).then(Pe=>{Pe&&Z(Pe)}).catch(Pe=>{console.error("total stake error: ",Pe)})},G=()=>{t.read.stakeFirstEpoch([i,s]).then(Pe=>{Pe&&ve(Pe)}).catch(Pe=>{console.error("total stake error: ",Pe)})},ie=()=>{t.read.maxWithdrawOrderAllowed([i,s]).then(Pe=>{Pe&&A(Pe)}).catch(Pe=>{console.error("total stake error: ",Pe)})},fe=()=>{t.read.orderedWithdrawAmount([i,s]).then(Pe=>{Pe&&V(Pe)}).catch(Pe=>{console.error("ordered withdraw amount: ",Pe)})},we=()=>{t.read.maxWithdrawAllowed([i,s]).then(Pe=>{Pe&&ee(Pe)}).catch(Pe=>{console.error("ordered withdraw amount: ",Pe)})},Re=()=>{t.read.orderWithdrawEpoch([i,s]).then(Pe=>{Pe&&I(Pe)}).catch(Pe=>{console.error("order withdraw epoch error: ",Pe)})},Ge=async()=>{w(!0);const Pe=await t.write.orderWithdraw([i,C.toString()],{value:0}).catch($t=>{w(!1),console.log($t)});(await n.waitForTransactionReceipt({hash:Pe,confirmations:hy})).status==="success"?(w(!1),wy.fire({icon:"success",title:"Order Successful",text:"",footer:`<a href="${Za.blockExplorers.default}/tx/${Pe}" target='_blank'>View Transaction</a>`}),ct()):(w(!1),alert("error Transaction revert"))},nt=async()=>{w(!0);const Pe=await t.write.claimOrderedWithdraw([i],{value:0}).catch($t=>{w(!1),console.log($t)}),It=await n.waitForTransactionReceipt({hash:Pe,confirmations:hy}).then($t=>{It.status==="success"?(w(!1),wy.fire({icon:"success",title:"Withdraw Successful",text:"",footer:`<a href="${Za.blockExplorers.default}/tx/${Pe}" target='_blank'>View Transaction</a>`}),ct()):(w(!1),alert("error Transaction revert"))}).catch($t=>{w(!1),console.log($t)})},nn=async()=>{w(!0);const Pe=await t.write.withdraw([i,Y.toString()],{value:0}).catch(It=>{w(!1),console.log(It)});n.waitForTransactionReceipt({hash:Pe,confirmations:hy}).then(It=>{It.status==="success"?(w(!1),wy.fire({icon:"success",title:"Withdraw Successful",text:"",footer:`<a href="${Za.blockExplorers.default}/tx/${Pe}" target='_blank'>View Transaction</a>`}),ct()):(w(!1),alert("error Transaction revert"))}).catch(It=>{w(!1),console.log(It)})},Ct=async Pe=>{await t.read.getRewardAmount([Pe,i,s]).then(It=>{It?ge(It):console.log("reward amount no value")}).catch(It=>{console.error("reward amount error: ",It)})},St=async Pe=>{Pe&&await t.read.getRewardAmount([i,s,Pe.toString()]).then(It=>{It?ae(It):console.log("reward was taken no value")}).catch(It=>{console.error("reward was taken error: ",It)})},qr=async Pe=>{w(!0);const It=await t.write.claimReward([Pe,i],{value:0}).catch($t=>{w(!1),console.log($t)});n.waitForTransactionReceipt({hash:It,confirmations:hy}).then($t=>{$t.status==="success"?(wy.fire({icon:"success",title:"Claim Successful",text:"",footer:`<a href="${Za.blockExplorers.default}/tx/${It}" target='_blank'>View Transaction</a>`}),ct()):alert("error Transaction revert")}).catch($t=>{w(!1),console.log($t)})},Bn=async()=>{if(he)if(he>0){const Pe=Vtt(parseInt(he.toString()),parseInt(r.toString()));Pe.pop(),h(Pe),Ct(Pe),St(r)}else alert("No Reward Available")};ce.useEffect(()=>{Bn()},[he,s]);const $n=async()=>{await e.read.poolName([i]).then(Pe=>{Pe?(D(Pe),console.log("poolName : ",Pe)):console.log("pool name no value")}).catch(Pe=>{console.error("pool name error: ",Pe)}),await e.read.poolDescription([i]).then(Pe=>{Pe?$(Pe):console.log("pool desc no value")}).catch(Pe=>{console.error("pool desc error: ",Pe)})};ce.useEffect(()=>{i&&s&&($n(),qe(),X(),U(),G(),ie(),fe(),we(),Re(),Gt()),$n()},[l,T]);const Si=()=>{s?u(!0):alert("Please connect wallet")},sn=()=>{s?b(!0):alert("Please connect wallet")};return ce.useEffect(()=>{o&&(ni(o.value)?_(ni(o.value)):_(0))},[o]),m.jsxs(m.Fragment,{children:[m.jsx(U$,{}),m.jsx("div",{className:"layout",children:m.jsx("div",{className:"container",children:m.jsxs("div",{className:"main",children:[m.jsxs("div",{className:"validator_card",children:[m.jsxs("div",{className:"user_details",children:[m.jsxs("div",{className:"d-flex align-items-center gap-3",children:[m.jsx("img",{src:"/assets/img/user/user3.png",alt:"pfp"}),m.jsxs("div",{children:[m.jsxs("div",{className:"d-flex align-items-center gap-2",children:[m.jsx("h3",{className:"user_name mb-0",children:k||`Alpha ${i.slice(-2)}`})," ",m.jsx("span",{className:"badge badge_green",children:"Active"})]}),m.jsx("p",{className:"text_pera mt-2",children:O||"This validator is a member of the initial validator group."}),j&&m.jsxs("p",{className:"text-white",children:["Reward Amount: ",ni(j)]})]})]}),m.jsxs("div",{className:"",children:[m.jsx("button",{onClick:Si,className:"btn table_btn btn_brand me-2",children:"Delegate"}),(P||H>0||s&&se)&&s.toLowerCase()===se.toLowerCase()?m.jsx("button",{onClick:sn,className:"btn table_btn btn_brand",children:"Withdraw"}):null,(j>0||s&&i)&&s.toLowerCase()===i.toLowerCase()?m.jsx("button",{onClick:()=>qr(d),className:"btn table_btn btn_brand ms-2",children:"Claim Reward"}):null]})]}),m.jsxs("div",{className:"row g-2 mt_30",children:[m.jsxs("div",{className:"col-xl-4 col-lg-5 mt-0",children:[m.jsxs("div",{className:"payment_card mb_10 bg_main p-3",children:[m.jsxs("div",{className:"d-flex flex-column justify-content-between gap-3 py-2",children:[m.jsx("p",{className:"card_title",children:"Total LYC Staked"}),m.jsxs("h5",{className:"card_price",children:[ni(B)," LYC"]})]}),m.jsx("div",{className:"icon_card bg_dark_300",children:m.jsx(Fre,{})})]}),m.jsxs("div",{className:"payment_card bg_main mb_10 p-3",children:[m.jsxs("div",{className:"d-flex flex-column justify-content-between gap-3 py-2",children:[m.jsx("p",{className:"card_title",children:"Delegators"}),m.jsx("h5",{className:"card_price",children:W.length})]}),m.jsx("div",{className:"icon_card bg_dark_300",children:m.jsx(zre,{})})]}),m.jsxs("div",{className:"payment_card bg_main mb-lg-0 mb_10 p-3",children:[m.jsxs("div",{className:"d-flex flex-column justify-content-between gap-3 py-2",children:[m.jsx("p",{className:"card_title",children:"APY"}),m.jsx("h5",{className:"card_price",children:"Up to 2.50%"})]}),m.jsx("div",{className:"icon_card bg_dark_300",children:m.jsx(Hre,{})})]})]}),m.jsx("div",{className:"col-xl-8 col-lg-7 mt-0",children:m.jsxs("div",{className:"details_card bg_main",children:[m.jsxs("div",{className:"d_flex mb-md-3",children:[m.jsx("p",{className:"u_data gray",children:"Operation Since"}),m.jsx("p",{className:"u_data light_gray",children:"2024 - 04 - 18"})]}),m.jsxs("div",{className:"d_flex mb-md-3",children:[m.jsx("p",{className:"u_data gray",children:"Type"}),m.jsx("span",{className:"position bg_dark_200",children:"Cabinet"})]}),m.jsxs("div",{className:"d_flex mb-md-3",children:[m.jsx("p",{className:"u_data gray",children:"Website"}),m.jsx("p",{className:"u_data light_gray",children:"-"})]}),m.jsxs("div",{className:"d_flex mb-md-3",children:[m.jsx("p",{className:"u_data gray",children:"Self Delegation"}),m.jsxs("p",{className:"u_data light_gray",children:[P?ni(P):"0"," LYC"]})]}),m.jsxs("div",{className:"d_flex mb-md-3",children:[m.jsx("p",{className:"u_data gray",children:"Delegators"}),m.jsx("p",{className:"u_data light_gray",children:W.length})]}),m.jsxs("div",{className:"d_flex mb-md-3",children:[m.jsx("p",{className:"u_data gray",children:"Operator Address"}),m.jsxs("a",{href:"#",className:"u_data text_brand",children:[Zm(se)," ",m.jsx("span",{className:"ms-1",onClick:()=>h3(se),children:m.jsx(d3,{})})]})]}),m.jsxs("div",{className:"d_flex mb-md-3",children:[m.jsx("p",{className:"u_data gray",children:"Consensus Address"}),m.jsxs("a",{href:"#",className:"u_data text_brand",children:[Zm(se)," ",m.jsx("span",{className:"ms-1",onClick:()=>h3(se),children:m.jsx(d3,{})})]})]}),m.jsxs("div",{className:"d_flex mb-md-3",children:[m.jsx("p",{className:"u_data gray",children:"Vote Address"}),m.jsxs("p",{className:"u_data light_gray d-inline-block",children:[Zm(i)," ",m.jsx("span",{className:"ms-1",onClick:()=>h3(i),children:m.jsx(d3,{})})]})]}),m.jsxs("div",{className:"d_flex",children:[m.jsx("p",{className:"u_data gray",children:"Identity"}),m.jsxs("p",{className:"u_data light_gray d-inline-block",children:[Zm(i)," ",m.jsx("span",{className:"ms-1",onClick:()=>h3(i),children:m.jsx(d3,{})})]})]})]})})]})]}),m.jsxs("div",{className:"mt-4",children:[m.jsx("h2",{className:"second_title",children:"Delegator History"}),m.jsx("div",{className:"table-responsive",children:m.jsxs("table",{className:"table validator_table border-0 mb-0",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsxs("th",{className:"ps-3",children:["Address",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]}),m.jsxs("th",{children:["Type",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]}),m.jsxs("th",{children:["Amount",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]}),m.jsxs("th",{children:["Time",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]}),m.jsxs("th",{className:"text-end pe-3",children:["Txn Hash",m.jsx("span",{className:"ms-1",children:m.jsx("img",{src:"/assets/img/icon/alert.svg"})})]})]})}),m.jsx("tbody",{children:W.map((Pe,It)=>m.jsx(Urt,{i:It+1,address:Pe}))})]})}),m.jsxs("div",{className:"table_footer",children:[m.jsxs("div",{className:"d-flex flex-md-row flex-column align-items-md-center gap-2",children:[m.jsx("p",{className:"footer_title",children:"Row per Page"}),m.jsxs("select",{className:"form-select page_select",value:re,onChange:Pe=>{be(Pe.target.value)},children:[m.jsx("option",{value:10,children:"10"}),m.jsx("option",{value:15,children:"15"}),m.jsx("option",{value:20,children:"20"})]})]}),m.jsxs("div",{className:"d-flex flex-md-row flex-column align-items-md-center gap-2",children:[m.jsxs("p",{className:"footer_title",children:["Total of ",W.length," Validators"]}),m.jsxs("ul",{className:"table_pagination",children:[m.jsx("li",{onClick:ft,children:m.jsx(pr,{children:m.jsx(vg,{})})}),Array.from({length:Ue},(Pe,It)=>m.jsx("li",{onClick:()=>Vt(It+1),children:m.jsx(pr,{className:"",children:It+1})})),m.jsx("li",{onClick:ut,children:m.jsx(pr,{children:m.jsx(nl,{})})})]})]})]}),m.jsx(gL,{show:l,handleClose:He,minStake:x,balance:v,selectedPool:i,stakingAllowed:c}),m.jsx(Nce,{show:T,validator:i,balance:v,handleClose:ct,maxWithdrawOrderAllowed:C,orderedWithdrawAmount:H,maxWithdrawAllowed:Y,stakeFirstEpoch:he,orderWithdrawEpoch:y,onOrderWithdraw:Ge,onWithdrawOrder:nt,onDirectWithdraw:nn,isLoading:g})]})]})})})]})}const Urt=({address:t})=>m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"table_data",children:[m.jsx(pr,{to:"",className:"user_data text_brand",onClick:()=>VUe(t),children:Zm(t)}),m.jsx("span",{className:"cursor_pointer",onClick:()=>h3(t),children:m.jsx(d3,{})})]})}),m.jsx("td",{children:"Delegate"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"NA"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"2024-07-22 10:52:27"}),m.jsx("td",{children:m.jsx(pr,{to:"",className:"user_data text_brand",onClick:txnHash?()=>qUe(txnHash):null,children:"0x969f...c805"})})]});function Frt({show:t,handleClose:e}){return m.jsx(m.Fragment,{children:m.jsxs(ho,{show:t,onHide:e,className:"delegate",centered:!0,shouldCloseOnOverlayClick:!1,backdrop:"static",keyboard:"false",children:[m.jsxs(ho.Header,{children:[m.jsx(ho.Title,{children:"Undelegate"}),m.jsx(f4,{className:"btn-close",onClick:e,children:m.jsx(D9,{})})]}),m.jsxs(ho.Body,{className:"p-0",children:[m.jsxs("div",{className:"modal_card mb_20",children:[m.jsx("p",{className:"text_brand",children:"Note."}),m.jsx("p",{children:"If you choose to undelegate, there is a 7-day waiting period the process completes."}),m.jsx("p",{children:"You can claim your BNB after a 7-day period following undelegation."})]}),m.jsxs("div",{className:"d-flex align-items-center justify-content-between mb_20",children:[m.jsx("p",{className:"footer_title",children:"From Validator"}),m.jsxs("div",{className:"d-flex align-items-center gap-2",children:[m.jsx("img",{src:"/assets/img/user/user2.png"}),m.jsx("span",{className:"user_data",children:"Legendill"}),m.jsx("span",{className:"rank",children:"APY : 0.56%"})]})]}),m.jsxs("div",{className:"d-flex align-items-center justify-content-between position-relative mb_20",children:[m.jsx("p",{className:"footer_title",children:"To Validator"}),m.jsxs("div",{className:"d-flex align-items-center u_validator gap-2 ",children:[m.jsx("div",{className:"user_profile",children:m.jsx("img",{src:"/assets/img/user/user1.png"})}),m.jsx("span",{className:"user_data text_main_dark",children:"Nval."}),m.jsx("span",{className:"rank",children:"APY : 0.56%"}),m.jsxs("div",{className:"dropdown main_drop",children:[m.jsx("button",{className:"btn p-0",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false",children:m.jsx("span",{className:"px-md-2 px-1 cursor_pointer",children:m.jsx(gLe,{})})}),m.jsxs("ul",{className:"dropdown-menu drop_menu",children:[m.jsxs("li",{className:"dropdown-item d-flex align-items-center justify-content-between",children:[m.jsxs("div",{className:"d-flex align-items-center gap-2",children:[m.jsx("div",{className:"user_profile",children:m.jsx("img",{src:"/assets/img/user/user1.png"})}),m.jsx("span",{className:"user_data text_main_dark",children:"Legendill"})]}),m.jsx("div",{children:m.jsx("span",{className:"rank",children:"APY : 0.56%"})})]}),m.jsxs("li",{className:"dropdown-item d-flex align-items-center justify-content-between",children:[m.jsxs("div",{className:"d-flex align-items-center gap-2",children:[m.jsx("div",{className:"user_profile",children:m.jsx("img",{src:"/assets/img/user/user1.png"})}),m.jsx("span",{className:"user_data text_main_dark",children:"Legendill"})]}),m.jsx("div",{children:m.jsx("span",{className:"rank",children:"APY : 0.56%"})})]}),m.jsxs("li",{className:"dropdown-item d-flex align-items-center justify-content-between",children:[m.jsxs("div",{className:"d-flex align-items-center gap-2",children:[m.jsx("div",{className:"user_profile",children:m.jsx("img",{src:"/assets/img/user/user1.png"})}),m.jsx("span",{className:"user_data text_main_dark",children:"Legendill"})]}),m.jsx("div",{children:m.jsx("span",{className:"rank",children:"APY : 0.56%"})})]}),m.jsxs("li",{className:"dropdown-item d-flex align-items-center justify-content-between",children:[m.jsxs("div",{className:"d-flex align-items-center gap-2",children:[m.jsx("div",{className:"user_profile",children:m.jsx("img",{src:"/assets/img/user/user1.png"})}),m.jsx("span",{className:"user_data text_main_dark",children:"Legendill"})]}),m.jsx("div",{children:m.jsx("span",{className:"rank",children:"APY : 0.56%"})})]}),m.jsxs("li",{className:"dropdown-item d-flex align-items-center justify-content-between",children:[m.jsxs("div",{className:"d-flex align-items-center gap-2",children:[m.jsx("div",{className:"user_profile",children:m.jsx("img",{src:"/assets/img/user/user1.png"})}),m.jsx("span",{className:"user_data text_main_dark",children:"Legendill"})]}),m.jsx("div",{children:m.jsx("span",{className:"rank",children:"APY : 0.56%"})})]}),m.jsxs("li",{className:"dropdown-item d-flex align-items-center justify-content-between",children:[m.jsxs("div",{className:"d-flex align-items-center gap-2",children:[m.jsx("div",{className:"user_profile",children:m.jsx("img",{src:"/assets/img/user/user1.png"})}),m.jsx("span",{className:"user_data text_main_dark",children:"Legendill"})]}),m.jsx("div",{children:m.jsx("span",{className:"rank",children:"APY : 0.56%"})})]})]})]})]})]}),m.jsxs("div",{className:"amount_card mb_20",children:[m.jsx("p",{children:"UnDelegate Amount"}),m.jsxs("div",{className:"d-flex align-items-center justify-content-between",children:[m.jsx("h3",{className:"amount",children:"1.0"}),m.jsx("span",{className:"max_price",children:"MAX"})]})]}),m.jsx("div",{className:"mb_20",children:m.jsxs("p",{className:"footer_title",children:["Available Balance:"," ",m.jsx("span",{className:"light_gray",children:"3.0000000123242 LYC"})]})}),m.jsxs("div",{className:"mb_20",children:[m.jsxs("div",{className:"d-flex align-items-center justify-content-between mb-1",children:[m.jsx("p",{className:"footer_title",children:"Validator"}),m.jsx("p",{className:"footer_title light_gray",children:"0.0228665 LYC (~$9.42)"})]}),m.jsxs("div",{className:"d-flex align-items-center justify-content-between",children:[m.jsx("p",{className:"footer_title",children:"Total Amount"}),m.jsx("p",{className:"footer_title light_gray",children:"1.0228665 LYC (~$142.51)"})]})]}),m.jsx("button",{className:"btn modal_btn",children:"UnDelegate"})]})]})})}function zrt(){const[t,e]=ce.useState(!1),n=()=>e(!1);return m.jsxs(m.Fragment,{children:[m.jsx(U$,{}),m.jsx("div",{className:"layout",children:m.jsxs("div",{className:"container",children:[m.jsxs("div",{className:"main",children:[m.jsx("h2",{className:"user_name mb-3",children:"My Staking"}),m.jsx("p",{className:"text_pera",children:"By Staking BNB, you can contribute to LYC network security & earn Rewards."}),m.jsx("div",{className:"validator_card mt-4",children:m.jsxs("div",{className:"staking_data",children:[m.jsxs("div",{className:"d-flex flex-column justify-content-between gap-2 py-2",children:[m.jsx("p",{className:"card_title",children:"Available"}),m.jsx("h5",{className:"card_price",children:"5342.2343 LYC"})]}),m.jsx("div",{className:"vertical_border"}),m.jsxs("div",{className:"d-flex flex-column justify-content-between gap-2 py-2",children:[m.jsx("p",{className:"card_title",children:"Delegated"}),m.jsx("h5",{className:"card_price",children:"62.10 LYC"})]}),m.jsx("div",{className:"vertical_border"}),m.jsxs("div",{className:"d-flex flex-column justify-content-between gap-2 py-2",children:[m.jsx("p",{className:"card_title",children:"Unbounding"}),m.jsx("h5",{className:"card_price",children:"0.00 LYC"})]}),m.jsx("div",{className:"vertical_border"}),m.jsxs("div",{className:"d-flex flex-column justify-content-between gap-2 py-2",children:[m.jsx("p",{className:"card_title",children:"In Order"}),m.jsx("h5",{className:"card_price",children:"0.00 LYC"})]}),m.jsx("div",{className:"vertical_border"}),m.jsxs("div",{className:"d-flex flex-column justify-content-between gap-2 py-2",children:[m.jsx("p",{className:"card_title",children:"Frozen"}),m.jsx("h5",{className:"card_price",children:"0.00 LYC"})]})]})}),m.jsxs("div",{className:"mt-4",children:[m.jsx("h2",{className:"second_title",children:"Delegation (6)"}),m.jsx("div",{className:"table-responsive",children:m.jsxs("table",{className:"table validator_table stking_data border-0 mb-0",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{className:"ps-3",children:"Status"}),m.jsx("th",{children:"Validator Name"}),m.jsx("th",{children:"Amount"}),m.jsx("th",{children:"Staking Since"}),m.jsx("th",{className:"text-end pe-3",children:"Action"})]})}),m.jsxs("tbody",{children:[m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{children:"Delegate"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"30.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"2024-07-22 10:52:27"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center  justify-content-end gap-2",children:[m.jsx("button",{className:"btn table_btn btn1",onClick:()=>e(!0),children:"Undelegate"}),m.jsx("button",{className:"btn table_btn btn2",onClick:()=>e(!0),children:"Redelegate"})]})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{children:"Delegate"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"30.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"2024-07-22 10:52:27"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center  justify-content-end gap-2",children:[m.jsx("button",{className:"btn table_btn btn1",onClick:()=>e(!0),children:"Undelegate"}),m.jsx("button",{className:"btn table_btn btn2",onClick:()=>e(!0),children:"Redelegate"})]})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{children:"Delegate"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"30.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"2024-07-22 10:52:27"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center  justify-content-end gap-2",children:[m.jsx("button",{className:"btn table_btn btn1",onClick:()=>e(!0),children:"Undelegate"}),m.jsx("button",{className:"btn table_btn btn2",onClick:()=>e(!0),children:"Redelegate"})]})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{children:"Delegate"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"30.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"2024-07-22 10:52:27"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center  justify-content-end gap-2",children:[m.jsx("button",{className:"btn table_btn btn1",onClick:()=>e(!0),children:"Undelegate"}),m.jsx("button",{className:"btn table_btn btn2",onClick:()=>e(!0),children:"Redelegate"})]})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{children:"Delegate"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"30.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"2024-07-22 10:52:27"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center  justify-content-end gap-2",children:[m.jsx("button",{className:"btn table_btn btn1",onClick:()=>e(!0),children:"Undelegate"}),m.jsx("button",{className:"btn table_btn btn2",onClick:()=>e(!0),children:"Redelegate"})]})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{children:"Delegate"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"30.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"2024-07-22 10:52:27"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center  justify-content-end gap-2",children:[m.jsx("button",{className:"btn table_btn btn1",onClick:()=>e(!0),children:"Undelegate"}),m.jsx("button",{className:"btn table_btn btn2",onClick:()=>e(!0),children:"Redelegate"})]})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{children:"Delegate"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"30.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"2024-07-22 10:52:27"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center  justify-content-end gap-2",children:[m.jsx("button",{className:"btn table_btn btn1",onClick:()=>e(!0),children:"Undelegate"}),m.jsx("button",{className:"btn table_btn btn2",onClick:()=>e(!0),children:"Redelegate"})]})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{children:"Delegate"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"30.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"2024-07-22 10:52:27"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center  justify-content-end gap-2",children:[m.jsx("button",{className:"btn table_btn btn1",onClick:()=>e(!0),children:"Undelegate"}),m.jsx("button",{className:"btn table_btn btn2",onClick:()=>e(!0),children:"Redelegate"})]})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{children:"Delegate"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"30.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"2024-07-22 10:52:27"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center  justify-content-end gap-2",children:[m.jsx("button",{className:"btn table_btn btn1",onClick:()=>e(!0),children:"Undelegate"}),m.jsx("button",{className:"btn table_btn btn2",onClick:()=>e(!0),children:"Redelegate"})]})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{children:"Delegate"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"30.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"2024-07-22 10:52:27"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center  justify-content-end gap-2",children:[m.jsx("button",{className:"btn table_btn btn1",onClick:()=>e(!0),children:"Undelegate"}),m.jsx("button",{className:"btn table_btn btn2",onClick:()=>e(!0),children:"Redelegate"})]})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{children:"Delegate"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"30.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"2024-07-22 10:52:27"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center  justify-content-end gap-2",children:[m.jsx("button",{className:"btn table_btn btn1",onClick:()=>e(!0),children:"Undelegate"}),m.jsx("button",{className:"btn table_btn btn2",onClick:()=>e(!0),children:"Redelegate"})]})})]})]})]})}),m.jsxs("div",{className:"table_footer",children:[m.jsxs("div",{className:"d-flex flex-md-row flex-column align-items-md-center gap-2",children:[m.jsx("p",{className:"footer_title",children:"Row per Page"}),m.jsxs("select",{className:"form-select page_select",children:[m.jsx("option",{children:"10"}),m.jsx("option",{children:"15"}),m.jsx("option",{children:"20"})]})]}),m.jsxs("div",{className:"d-flex flex-md-row flex-column align-items-md-center gap-2",children:[m.jsx("p",{className:"footer_title",children:"Total of 46 Validators"}),m.jsxs("ul",{className:"table_pagination",children:[m.jsx("li",{children:m.jsx(pr,{children:m.jsx(vg,{})})}),m.jsx("li",{children:m.jsx(pr,{className:"active",children:"1"})}),m.jsx("li",{children:m.jsx(pr,{children:"2"})}),m.jsx("li",{children:m.jsx(pr,{children:"3"})}),m.jsx("li",{children:m.jsx(pr,{children:m.jsx(nl,{})})})]})]})]}),m.jsx(gL,{show:t,handleClose:n})]}),m.jsxs("div",{className:"mt-4",children:[m.jsxs("ul",{className:"nav nav-pills align-items-center gap-2 mb-3",id:"pills-tab",role:"tablist",children:[m.jsx("h2",{className:"second_title mb-0",children:"History"}),m.jsx("li",{className:"nav-item",role:"presentation",children:m.jsx("button",{className:"nav-link history_btn active",id:"pills-home-tab","data-bs-toggle":"pill","data-bs-target":"#pills-home",type:"button",role:"tab","aria-controls":"pills-home","aria-selected":"true",children:"Staking Transactions"})}),m.jsx("li",{className:"nav-item",role:"presentation",children:m.jsx("button",{className:"nav-link history_btn",id:"pills-profile-tab","data-bs-toggle":"pill","data-bs-target":"#pills-profile",type:"button",role:"tab","aria-controls":"pills-profile","aria-selected":"false",children:"Rewards"})})]}),m.jsxs("div",{className:"tab-content",id:"pills-tabContent",children:[m.jsxs("div",{className:"tab-pane fade show active",id:"pills-home",role:"tabpanel","aria-labelledby":"pills-home-tab",tabindex:"{0}",children:[m.jsx("div",{className:"table-responsive",children:m.jsxs("table",{className:"table validator_table border-0 mb-0",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{className:"ps-3",children:"Type"}),m.jsx("th",{children:"Amount"}),m.jsx("th",{children:"Validator Name"}),m.jsx("th",{children:"Status"}),m.jsx("th",{children:"Time"}),m.jsx("th",{className:"text-end pe-3",children:"Action"})]})}),m.jsxs("tbody",{children:[m.jsxs("tr",{children:[m.jsx("td",{children:"Undelegate"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"10.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"Legendill"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{children:"2024-07-22 10:52:27"}),m.jsx("td",{children:m.jsx("button",{className:"btn table_btn btn_action",children:m.jsx(nl,{})})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:"Undelegate"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"10.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"Legendill"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{children:"2024-07-22 10:52:27"}),m.jsx("td",{children:m.jsx("button",{className:"btn table_btn btn_action",children:m.jsx(nl,{})})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:"Undelegate"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"10.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"Legendill"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{children:"2024-07-22 10:52:27"}),m.jsx("td",{children:m.jsx("button",{className:"btn table_btn btn_action",children:m.jsx(nl,{})})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:"Undelegate"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"10.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"Legendill"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{children:"2024-07-22 10:52:27"}),m.jsx("td",{children:m.jsx("button",{className:"btn table_btn btn_action",children:m.jsx(nl,{})})})]}),m.jsxs("tr",{children:[m.jsx("td",{children:"Undelegate"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"10.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"Legendill"}),m.jsx("td",{children:m.jsxs("div",{className:"d-flex align-items-center gap-1",children:[m.jsx("span",{className:"dote"}),m.jsx("span",{className:"text_green text-uppercase",children:"Active"})]})}),m.jsx("td",{children:"2024-07-22 10:52:27"}),m.jsx("td",{children:m.jsx("button",{className:"btn table_btn btn_action",children:m.jsx(nl,{})})})]})]})]})}),m.jsxs("div",{className:"table_footer",children:[m.jsxs("div",{className:"d-flex flex-md-row flex-column align-items-md-center gap-2",children:[m.jsx("p",{className:"footer_title",children:"Row per Page"}),m.jsxs("select",{className:"form-select page_select",children:[m.jsx("option",{children:"10"}),m.jsx("option",{children:"15"}),m.jsx("option",{children:"20"})]})]}),m.jsxs("div",{className:"d-flex flex-md-row flex-column align-items-md-center gap-2",children:[m.jsx("p",{className:"footer_title",children:"Total of 46 Validators"}),m.jsxs("ul",{className:"table_pagination",children:[m.jsx("li",{children:m.jsx(pr,{children:m.jsx(vg,{})})}),m.jsx("li",{children:m.jsx(pr,{className:"active",children:"1"})}),m.jsx("li",{children:m.jsx(pr,{children:"2"})}),m.jsx("li",{children:m.jsx(pr,{children:"3"})}),m.jsx("li",{children:m.jsx(pr,{children:m.jsx(nl,{})})})]})]})]})]}),m.jsxs("div",{className:"tab-pane fade",id:"pills-profile",role:"tabpanel","aria-labelledby":"pills-profile-tab",tabindex:"{0}",children:[m.jsx("div",{className:"table-responsive",children:m.jsxs("table",{className:"table validator_table border-0 mb-0",children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{children:"Amount"}),m.jsx("th",{children:"Validator Name"}),m.jsx("th",{children:"Time"})]})}),m.jsxs("tbody",{children:[m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"10.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"Legendill"}),m.jsx("td",{className:"text-start",children:"2024-07-22 10:52:27"})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"10.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"Legendill"}),m.jsx("td",{className:"text-start",children:"2024-07-22 10:52:27"})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"10.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"Legendill"}),m.jsx("td",{className:"text-start",children:"2024-07-22 10:52:27"})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"10.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"Legendill"}),m.jsx("td",{className:"text-start",children:"2024-07-22 10:52:27"})]}),m.jsxs("tr",{children:[m.jsx("td",{children:m.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[m.jsx("span",{className:"user_data",children:"10.00"}),m.jsx("span",{className:"user_data",children:"LYC"})]})}),m.jsx("td",{children:"Legendill"}),m.jsx("td",{className:"text-start",children:"2024-07-22 10:52:27"})]})]})]})}),m.jsxs("div",{className:"table_footer",children:[m.jsxs("div",{className:"d-flex flex-md-row flex-column align-items-md-center gap-2",children:[m.jsx("p",{className:"footer_title",children:"Row per Page"}),m.jsxs("select",{className:"form-select page_select",children:[m.jsx("option",{children:"10"}),m.jsx("option",{children:"15"}),m.jsx("option",{children:"20"})]})]}),m.jsxs("div",{className:"d-flex flex-md-row flex-column align-items-md-center gap-2",children:[m.jsx("p",{className:"footer_title",children:"Total of 46 Validators"}),m.jsxs("ul",{className:"table_pagination",children:[m.jsx("li",{children:m.jsx(pr,{children:m.jsx(vg,{})})}),m.jsx("li",{children:m.jsx(pr,{className:"active",children:"1"})}),m.jsx("li",{children:m.jsx(pr,{children:"2"})}),m.jsx("li",{children:m.jsx(pr,{children:"3"})}),m.jsx("li",{children:m.jsx(pr,{children:m.jsx(nl,{})})})]})]})]})]})]})]})]}),m.jsx(Nce,{show:t,handleClose:n}),m.jsx(Frt,{show:t,handleClose:n})]})})]})}function Hrt(){return m.jsx(m.Fragment,{children:m.jsx("div",{className:"App",children:m.jsxs(kge,{children:[m.jsx($A,{path:"/",element:m.jsx(Brt,{balance:""})}),m.jsx($A,{path:"validators-details/:id",element:m.jsx(Lrt,{})}),m.jsx($A,{path:"my-staking",element:m.jsx(zrt,{})})]})})})}const Wrt=new $je,Vrt="05bf1a3bdce78ac897ccc68fafd1c7af",qrt=["c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96","622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0"];sje({wagmiConfig:tce,projectId:Vrt,includeWalletIds:qrt,enableAnalytics:!0,enableOnramp:!1});const Grt=CR.createRoot(document.getElementById("root"));Grt.render(m.jsx(aje,{config:tce,children:m.jsx(Yje,{client:Wrt,children:m.jsx(Bge,{children:m.jsx(Hrt,{})})})}));export{NC as $,Ne as A,TC as B,tn as C,Vg as D,wt as E,yl as F,IC as G,mh as H,gh as I,nx as J,Cv as K,MP as L,dn as M,rt as N,pt as O,kC as P,rx as Q,ke as R,er as S,Ym as T,qt as U,Sv as V,Fn as W,Gg as X,du as Y,Kg as Z,Sa as _,Bo as a,fh as a$,ix as a0,fu as a1,sx as a2,vl as a3,ic as a4,$P as a5,sc as a6,ax as a7,PC as a8,Tv as a9,bh as aA,vd as aB,jv as aC,Qg as aD,Zg as aE,px as aF,mx as aG,Jg as aH,jo as aI,Oa as aJ,BC as aK,Qt as aL,st as aM,Oi as aN,Hr as aO,h7e as aP,Qs as aQ,Lwe as aR,hc as aS,RD as aT,kte as aU,Je as aV,hB as aW,Ks as aX,iSe as aY,kB as aZ,$6 as a_,qg as aa,Iv as ab,gd as ac,zP as ad,C0 as ae,wd as af,lx as ag,ox as ah,Ov as ai,yd as aj,wh as ak,Dv as al,ph as am,Mv as an,ux as ao,Bv as ap,Yg as aq,S0 as ar,MC as as,dx as at,T0 as au,yh as av,vh as aw,fx as ax,hx as ay,$v as az,pe as b,Sb as b0,P3 as b1,pl as b2,Q6 as b3,Ce as c,Ht as d,vte as e,Ze as f,pA as g,Te as h,De as i,ust as j,K as k,ene as l,GRe as m,OP as n,Av as o,Li as p,Ev as q,wg as r,$a as s,DP as t,ex as u,SC as v,Hg as w,Wg as x,tx as y,wl as z};
