From 885e67f2a149319a90a54649a86b4e1521a07fc0 Mon Sep 17 00:00:00 2001 From: corbanbrook Date: Wed, 27 Mar 2024 14:59:11 +0000 Subject: [PATCH] Build: (da7008f) Add signMessageString, signMessageHex, and signMessageBytes --- .../{index-JpT6H9sP.js => index-DoP0A_M_.js} | 56 +++++++++---------- index.html | 2 +- 2 files changed, 29 insertions(+), 29 deletions(-) rename assets/{index-JpT6H9sP.js => index-DoP0A_M_.js} (61%) diff --git a/assets/index-JpT6H9sP.js b/assets/index-DoP0A_M_.js similarity index 61% rename from assets/index-JpT6H9sP.js rename to assets/index-DoP0A_M_.js index 811f125..097763f 100644 --- a/assets/index-JpT6H9sP.js +++ b/assets/index-DoP0A_M_.js @@ -1,4 +1,4 @@ -var uA=Object.defineProperty;var dA=(t,e,r)=>e in t?uA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Oe=(t,e,r)=>(dA(t,typeof e!="symbol"?e+"":e,r),r);function hA(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(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 n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var A5=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function vA(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var _5={exports:{}},hh={},T5={exports:{}},Ie={};/** +var uA=Object.defineProperty;var dA=(t,e,r)=>e in t?uA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Ne=(t,e,r)=>(dA(t,typeof e!="symbol"?e+"":e,r),r);function hA(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(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 n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var A5=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function vA(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var _5={exports:{}},hh={},T5={exports:{}},Re={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var uA=Object.defineProperty;var dA=(t,e,r)=>e in t?uA(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var lu=Symbol.for("react.element"),yA=Symbol.for("react.portal"),pA=Symbol.for("react.fragment"),gA=Symbol.for("react.strict_mode"),mA=Symbol.for("react.profiler"),xA=Symbol.for("react.provider"),bA=Symbol.for("react.context"),wA=Symbol.for("react.forward_ref"),CA=Symbol.for("react.suspense"),EA=Symbol.for("react.memo"),SA=Symbol.for("react.lazy"),nb=Symbol.iterator;function kA(t){return t===null||typeof t!="object"?null:(t=nb&&t[nb]||t["@@iterator"],typeof t=="function"?t:null)}var P5={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},I5=Object.assign,R5={};function tc(t,e,r){this.props=t,this.context=e,this.refs=R5,this.updater=r||P5}tc.prototype.isReactComponent={};tc.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")};tc.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function M5(){}M5.prototype=tc.prototype;function og(t,e,r){this.props=t,this.context=e,this.refs=R5,this.updater=r||P5}var ag=og.prototype=new M5;ag.constructor=og;I5(ag,tc.prototype);ag.isPureReactComponent=!0;var ib=Array.isArray,O5=Object.prototype.hasOwnProperty,lg={current:null},N5={key:!0,ref:!0,__self:!0,__source:!0};function $5(t,e,r){var n,i={},s=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)O5.call(e,n)&&!N5.hasOwnProperty(n)&&(i[n]=e[n]);var a=arguments.length-2;if(a===1)i.children=r;else if(1e in t?uA(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var RA=S,MA=Symbol.for("react.element"),OA=Symbol.for("react.fragment"),NA=Object.prototype.hasOwnProperty,$A=RA.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,DA={key:!0,ref:!0,__self:!0,__source:!0};function D5(t,e,r){var n,i={},s=null,o=null;r!==void 0&&(s=""+r),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)NA.call(e,n)&&!DA.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:MA,type:t,key:s,ref:o,props:i,_owner:$A.current}}hh.Fragment=OA;hh.jsx=D5;hh.jsxs=D5;_5.exports=hh;var se=_5.exports,L5={exports:{}},bn={},B5={exports:{}},j5={};/** + */var RA=S,MA=Symbol.for("react.element"),OA=Symbol.for("react.fragment"),NA=Object.prototype.hasOwnProperty,$A=RA.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,DA={key:!0,ref:!0,__self:!0,__source:!0};function D5(t,e,r){var n,i={},s=null,o=null;r!==void 0&&(s=""+r),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)NA.call(e,n)&&!DA.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:MA,type:t,key:s,ref:o,props:i,_owner:$A.current}}hh.Fragment=OA;hh.jsx=D5;hh.jsxs=D5;_5.exports=hh;var ae=_5.exports,B5={exports:{}},bn={},L5={exports:{}},j5={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var uA=Object.defineProperty;var dA=(t,e,r)=>e in t?uA(t,e,{enumerable:!0,config * * 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(b,_){var R=b.length;b.push(_);e:for(;0>>1,d=b[m];if(0>>1;mi(x,R))$i(L,x)?(b[m]=L,b[$]=R,m=$):(b[m]=x,b[N]=R,m=N);else if($i(L,R))b[m]=L,b[$]=R,m=$;else break e}}return _}function i(b,_){var R=b.sortIndex-_.sortIndex;return R!==0?R:b.id-_.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 l=[],c=[],f=1,u=null,h=3,y=!1,g=!1,p=!1,k=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(b){for(var _=r(c);_!==null;){if(_.callback===null)n(c);else if(_.startTime<=b)n(c),_.sortIndex=_.expirationTime,e(l,_);else break;_=r(c)}}function I(b){if(p=!1,A(b),!g)if(r(l)!==null)g=!0,P(M);else{var _=r(c);_!==null&&O(I,_.startTime-b)}}function M(b,_){g=!1,p&&(p=!1,w(F),F=-1),y=!0;var R=h;try{for(A(_),u=r(l);u!==null&&(!(u.expirationTime>_)||b&&!Z());){var m=u.callback;if(typeof m=="function"){u.callback=null,h=u.priorityLevel;var d=m(u.expirationTime<=_);_=t.unstable_now(),typeof d=="function"?u.callback=d:u===r(l)&&n(l),A(_)}else n(l);u=r(l)}if(u!==null)var T=!0;else{var N=r(c);N!==null&&O(I,N.startTime-_),T=!1}return T}finally{u=null,h=R,y=!1}}var B=!1,z=null,F=-1,K=5,J=-1;function Z(){return!(t.unstable_now()-Jb||125m?(b.sortIndex=R,e(c,b),r(l)===null&&b===r(c)&&(p?(w(F),F=-1):p=!0,O(I,R-m))):(b.sortIndex=d,e(l,b),g||y||(g=!0,P(M))),b},t.unstable_shouldYield=Z,t.unstable_wrapCallback=function(b){var _=h;return function(){var R=h;h=_;try{return b.apply(this,arguments)}finally{h=R}}}})(j5);B5.exports=j5;var LA=B5.exports;/** + */(function(t){function e(x,T){var R=x.length;x.push(T);e:for(;0>>1,d=x[b];if(0>>1;b<_;){var $=2*(b+1)-1,m=x[$],N=$+1,B=x[N];if(0>i(m,R))Ni(B,m)?(x[b]=B,x[N]=R,b=N):(x[b]=m,x[$]=R,b=$);else if(Ni(B,R))x[b]=B,x[N]=R,b=N;else break e}}return T}function i(x,T){var R=x.sortIndex-T.sortIndex;return R!==0?R:x.id-T.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 l=[],c=[],f=1,u=null,h=3,y=!1,g=!1,p=!1,k=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(x){for(var T=r(c);T!==null;){if(T.callback===null)n(c);else if(T.startTime<=x)n(c),T.sortIndex=T.expirationTime,e(l,T);else break;T=r(c)}}function I(x){if(p=!1,A(x),!g)if(r(l)!==null)g=!0,P(M);else{var T=r(c);T!==null&&O(I,T.startTime-x)}}function M(x,T){g=!1,p&&(p=!1,w(F),F=-1),y=!0;var R=h;try{for(A(T),u=r(l);u!==null&&(!(u.expirationTime>T)||x&&!Z());){var b=u.callback;if(typeof b=="function"){u.callback=null,h=u.priorityLevel;var d=b(u.expirationTime<=T);T=t.unstable_now(),typeof d=="function"?u.callback=d:u===r(l)&&n(l),A(T)}else n(l);u=r(l)}if(u!==null)var _=!0;else{var $=r(c);$!==null&&O(I,$.startTime-T),_=!1}return _}finally{u=null,h=R,y=!1}}var j=!1,z=null,F=-1,q=5,G=-1;function Z(){return!(t.unstable_now()-Gx||125b?(x.sortIndex=R,e(c,x),r(l)===null&&x===r(c)&&(p?(w(F),F=-1):p=!0,O(I,R-b))):(x.sortIndex=d,e(l,x),g||y||(g=!0,P(M))),x},t.unstable_shouldYield=Z,t.unstable_wrapCallback=function(x){var T=h;return function(){var R=h;h=T;try{return x.apply(this,arguments)}finally{h=R}}}})(j5);L5.exports=j5;var BA=L5.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ var uA=Object.defineProperty;var dA=(t,e,r)=>e in t?uA(t,e,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var F5=S,gn=LA;function ne(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yv=Object.prototype.hasOwnProperty,BA=/^[: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]*$/,ob={},ab={};function jA(t){return Yv.call(ab,t)?!0:Yv.call(ob,t)?!1:BA.test(t)?ab[t]=!0:(ob[t]=!0,!1)}function FA(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function UA(t,e,r,n){if(e===null||typeof e>"u"||FA(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Yr(t,e,r,n,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Ar={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Ar[t]=new Yr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Ar[e]=new Yr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Ar[t]=new Yr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Ar[t]=new Yr(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){Ar[t]=new Yr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Ar[t]=new Yr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Ar[t]=new Yr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Ar[t]=new Yr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Ar[t]=new Yr(t,5,!1,t.toLowerCase(),null,!1,!1)});var fg=/[\-:]([a-z])/g;function ug(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(fg,ug);Ar[e]=new Yr(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(fg,ug);Ar[e]=new Yr(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(fg,ug);Ar[e]=new Yr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Ar[t]=new Yr(t,1,!1,t.toLowerCase(),null,!1,!1)});Ar.xlinkHref=new Yr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Ar[t]=new Yr(t,1,!1,t.toLowerCase(),null,!0,!0)});function dg(t,e,r,n){var i=Ar.hasOwnProperty(e)?Ar[e]:null;(i!==null?i.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yv=Object.prototype.hasOwnProperty,LA=/^[: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]*$/,ob={},ab={};function jA(t){return Yv.call(ab,t)?!0:Yv.call(ob,t)?!1:LA.test(t)?ab[t]=!0:(ob[t]=!0,!1)}function FA(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function UA(t,e,r,n){if(e===null||typeof e>"u"||FA(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Yr(t,e,r,n,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Ar={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Ar[t]=new Yr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Ar[e]=new Yr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Ar[t]=new Yr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Ar[t]=new Yr(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){Ar[t]=new Yr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Ar[t]=new Yr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Ar[t]=new Yr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Ar[t]=new Yr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Ar[t]=new Yr(t,5,!1,t.toLowerCase(),null,!1,!1)});var fg=/[\-:]([a-z])/g;function ug(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(fg,ug);Ar[e]=new Yr(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(fg,ug);Ar[e]=new Yr(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(fg,ug);Ar[e]=new Yr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Ar[t]=new Yr(t,1,!1,t.toLowerCase(),null,!1,!1)});Ar.xlinkHref=new Yr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Ar[t]=new Yr(t,1,!1,t.toLowerCase(),null,!0,!0)});function dg(t,e,r,n){var i=Ar.hasOwnProperty(e)?Ar[e]:null;(i!==null?i.type!==0:n||!(2a||i[o]!==s[a]){var l=` -`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{M1=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Fc(t):""}function zA(t){switch(t.tag){case 5:return Fc(t.type);case 16:return Fc("Lazy");case 13:return Fc("Suspense");case 19:return Fc("SuspenseList");case 0:case 2:case 15:return t=O1(t.type,!1),t;case 11:return t=O1(t.type.render,!1),t;case 1:return t=O1(t.type,!0),t;default:return""}}function ey(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 Za:return"Fragment";case Xa:return"Portal";case Qv:return"Profiler";case hg:return"StrictMode";case Xv:return"Suspense";case Zv:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case V5:return(t.displayName||"Context")+".Consumer";case z5:return(t._context.displayName||"Context")+".Provider";case vg:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case yg:return e=t.displayName||null,e!==null?e:ey(t.type)||"Memo";case Is:e=t._payload,t=t._init;try{return ey(t(e))}catch{}}return null}function VA(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 ey(e);case 8:return e===hg?"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 no(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function W5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function HA(t){var e=W5(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ou(t){t._valueTracker||(t._valueTracker=HA(t))}function q5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=W5(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Kd(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 ty(t,e){var r=e.checked;return Ut({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function cb(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=no(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function G5(t,e){e=e.checked,e!=null&&dg(t,"checked",e,!1)}function ry(t,e){G5(t,e);var r=no(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?ny(t,e.type,r):e.hasOwnProperty("defaultValue")&&ny(t,e.type,no(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function fb(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function ny(t,e,r){(e!=="number"||Kd(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Uc=Array.isArray;function gl(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Nu.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Af(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Gc={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},WA=["Webkit","ms","Moz","O"];Object.keys(Gc).forEach(function(t){WA.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Gc[e]=Gc[t]})});function Q5(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Gc.hasOwnProperty(t)&&Gc[t]?(""+e).trim():e+"px"}function X5(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=Q5(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var qA=Ut({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 oy(t,e){if(e){if(qA[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ne(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ne(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ne(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ne(62))}}function ay(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 ly=null;function pg(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var cy=null,ml=null,xl=null;function hb(t){if(t=uu(t)){if(typeof cy!="function")throw Error(ne(280));var e=t.stateNode;e&&(e=mh(e),cy(t.stateNode,t.type,e))}}function Z5(t){ml?xl?xl.push(t):xl=[t]:ml=t}function e3(){if(ml){var t=ml,e=xl;if(xl=ml=null,hb(t),e)for(t=0;t>>=0,t===0?32:31-(n_(t)/i_|0)|0}var $u=64,Du=4194304;function zc(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 Xd(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,s=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~i;a!==0?n=zc(a):(s&=o,s!==0&&(n=zc(s)))}else o=r&~i,o!==0?n=zc(o):s!==0&&(n=zc(s));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function cu(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ti(e),t[e]=r}function l_(t,e){var r=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 n=t.eventTimes;for(t=t.expirationTimes;0=Jc),Cb=" ",Eb=!1;function b3(t,e){switch(t){case"keyup":return D_.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function w3(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var el=!1;function B_(t,e){switch(t){case"compositionend":return w3(e);case"keypress":return e.which!==32?null:(Eb=!0,Cb);case"textInput":return t=e.data,t===Cb&&Eb?null:t;default:return null}}function j_(t,e){if(el)return t==="compositionend"||!Sg&&b3(t,e)?(t=m3(),md=wg=Ds=null,el=!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)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=_b(r)}}function k3(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?k3(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function A3(){for(var t=window,e=Kd();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Kd(t.document)}return e}function kg(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 K_(t){var e=A3(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&k3(r.ownerDocument.documentElement,r)){if(n!==null&&kg(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!t.extend&&s>n&&(i=n,n=s,s=i),i=Tb(r,s);var o=Tb(r,n);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>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,tl=null,yy=null,Qc=null,py=!1;function Pb(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;py||tl==null||tl!==Kd(n)||(n=tl,"selectionStart"in n&&kg(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Qc&&Mf(Qc,n)||(Qc=n,n=t0(yy,"onSelect"),0il||(t.current=Cy[il],Cy[il]=null,il--)}function Qe(t,e){il++,Cy[il]=t.current,t.current=e}var io={},Dr=go(io),nn=go(!1),ua=io;function Nl(t,e){var r=t.type.contextTypes;if(!r)return io;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=e[s];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function sn(t){return t=t.childContextTypes,t!=null}function n0(){Mt(nn),Mt(Dr)}function Db(t,e,r){if(Dr.current!==io)throw Error(ne(168));Qe(Dr,e),Qe(nn,r)}function $3(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(ne(108,VA(t)||"Unknown",i));return Ut({},r,n)}function i0(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||io,ua=Dr.current,Qe(Dr,t),Qe(nn,nn.current),!0}function Lb(t,e,r){var n=t.stateNode;if(!n)throw Error(ne(169));r?(t=$3(t,e,ua),n.__reactInternalMemoizedMergedChildContext=t,Mt(nn),Mt(Dr),Qe(Dr,t)):Mt(nn),Qe(nn,r)}var Vi=null,xh=!1,G1=!1;function D3(t){Vi===null?Vi=[t]:Vi.push(t)}function oT(t){xh=!0,D3(t)}function mo(){if(!G1&&Vi!==null){G1=!0;var t=0,e=Fe;try{var r=Vi;for(Fe=1;t>=o,i-=o,Gi=1<<32-ti(e)+i|r<F?(K=z,z=null):K=z.sibling;var J=h(w,z,A[F],I);if(J===null){z===null&&(z=K);break}t&&z&&J.alternate===null&&e(w,z),E=s(J,E,F),B===null?M=J:B.sibling=J,B=J,z=K}if(F===A.length)return r(w,z),$t&&zo(w,F),M;if(z===null){for(;FF?(K=z,z=null):K=z.sibling;var Z=h(w,z,J.value,I);if(Z===null){z===null&&(z=K);break}t&&z&&Z.alternate===null&&e(w,z),E=s(Z,E,F),B===null?M=Z:B.sibling=Z,B=Z,z=K}if(J.done)return r(w,z),$t&&zo(w,F),M;if(z===null){for(;!J.done;F++,J=A.next())J=u(w,J.value,I),J!==null&&(E=s(J,E,F),B===null?M=J:B.sibling=J,B=J);return $t&&zo(w,F),M}for(z=n(w,z);!J.done;F++,J=A.next())J=y(z,w,F,J.value,I),J!==null&&(t&&J.alternate!==null&&z.delete(J.key===null?F:J.key),E=s(J,E,F),B===null?M=J:B.sibling=J,B=J);return t&&z.forEach(function(ie){return e(w,ie)}),$t&&zo(w,F),M}function k(w,E,A,I){if(typeof A=="object"&&A!==null&&A.type===Za&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case Mu:e:{for(var M=A.key,B=E;B!==null;){if(B.key===M){if(M=A.type,M===Za){if(B.tag===7){r(w,B.sibling),E=i(B,A.props.children),E.return=w,w=E;break e}}else if(B.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===Is&&Hb(M)===B.type){r(w,B.sibling),E=i(B,A.props),E.ref=kc(w,B,A),E.return=w,w=E;break e}r(w,B);break}else e(w,B);B=B.sibling}A.type===Za?(E=ra(A.props.children,w.mode,I,A.key),E.return=w,w=E):(I=Ad(A.type,A.key,A.props,null,w.mode,I),I.ref=kc(w,E,A),I.return=w,w=I)}return o(w);case Xa:e:{for(B=A.key;E!==null;){if(E.key===B)if(E.tag===4&&E.stateNode.containerInfo===A.containerInfo&&E.stateNode.implementation===A.implementation){r(w,E.sibling),E=i(E,A.children||[]),E.return=w,w=E;break e}else{r(w,E);break}else e(w,E);E=E.sibling}E=tv(A,w.mode,I),E.return=w,w=E}return o(w);case Is:return B=A._init,k(w,E,B(A._payload),I)}if(Uc(A))return g(w,E,A,I);if(bc(A))return p(w,E,A,I);Vu(w,A)}return typeof A=="string"&&A!==""||typeof A=="number"?(A=""+A,E!==null&&E.tag===6?(r(w,E.sibling),E=i(E,A),E.return=w,w=E):(r(w,E),E=ev(A,w.mode,I),E.return=w,w=E),o(w)):r(w,E)}return k}var Dl=H3(!0),W3=H3(!1),du={},Ei=go(du),Df=go(du),Lf=go(du);function Qo(t){if(t===du)throw Error(ne(174));return t}function Ng(t,e){switch(Qe(Lf,e),Qe(Df,t),Qe(Ei,du),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:sy(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=sy(e,t)}Mt(Ei),Qe(Ei,e)}function Ll(){Mt(Ei),Mt(Df),Mt(Lf)}function q3(t){Qo(Lf.current);var e=Qo(Ei.current),r=sy(e,t.type);e!==r&&(Qe(Df,t),Qe(Ei,r))}function $g(t){Df.current===t&&(Mt(Ei),Mt(Df))}var jt=go(0);function f0(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&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 K1=[];function Dg(){for(var t=0;tr?r:4,t(!0);var n=J1.transition;J1.transition={};try{t(!1),e()}finally{Fe=r,J1.transition=n}}function l4(){return On().memoizedState}function fT(t,e,r){var n=Js(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},c4(t))f4(e,r);else if(r=F3(t,e,r,n),r!==null){var i=qr();ri(r,t,n,i),u4(r,e,n)}}function uT(t,e,r){var n=Js(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(c4(t))f4(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,r);if(i.hasEagerState=!0,i.eagerState=a,si(a,o)){var l=e.interleaved;l===null?(i.next=i,Mg(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=F3(t,e,i,n),r!==null&&(i=qr(),ri(r,t,n,i),u4(r,e,n))}}function c4(t){var e=t.alternate;return t===Ft||e!==null&&e===Ft}function f4(t,e){Xc=u0=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function u4(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,mg(t,r)}}var d0={readContext:Mn,useCallback:Tr,useContext:Tr,useEffect:Tr,useImperativeHandle:Tr,useInsertionEffect:Tr,useLayoutEffect:Tr,useMemo:Tr,useReducer:Tr,useRef:Tr,useState:Tr,useDebugValue:Tr,useDeferredValue:Tr,useTransition:Tr,useMutableSource:Tr,useSyncExternalStore:Tr,useId:Tr,unstable_isNewReconciler:!1},dT={readContext:Mn,useCallback:function(t,e){return ui().memoizedState=[t,e===void 0?null:e],t},useContext:Mn,useEffect:qb,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Cd(4194308,4,n4.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Cd(4194308,4,t,e)},useInsertionEffect:function(t,e){return Cd(4,2,t,e)},useMemo:function(t,e){var r=ui();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=ui();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=fT.bind(null,Ft,t),[n.memoizedState,t]},useRef:function(t){var e=ui();return t={current:t},e.memoizedState=t},useState:Wb,useDebugValue:Ug,useDeferredValue:function(t){return ui().memoizedState=t},useTransition:function(){var t=Wb(!1),e=t[0];return t=cT.bind(null,t[1]),ui().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Ft,i=ui();if($t){if(r===void 0)throw Error(ne(407));r=r()}else{if(r=e(),gr===null)throw Error(ne(349));ha&30||J3(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,qb(Q3.bind(null,n,s,t),[t]),n.flags|=2048,Ff(9,Y3.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=ui(),e=gr.identifierPrefix;if($t){var r=Ki,n=Gi;r=(n&~(1<<32-ti(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Bf++,0")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{M1=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Fc(t):""}function zA(t){switch(t.tag){case 5:return Fc(t.type);case 16:return Fc("Lazy");case 13:return Fc("Suspense");case 19:return Fc("SuspenseList");case 0:case 2:case 15:return t=O1(t.type,!1),t;case 11:return t=O1(t.type.render,!1),t;case 1:return t=O1(t.type,!0),t;default:return""}}function ey(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 Za:return"Fragment";case Xa:return"Portal";case Qv:return"Profiler";case hg:return"StrictMode";case Xv:return"Suspense";case Zv:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case V5:return(t.displayName||"Context")+".Consumer";case z5:return(t._context.displayName||"Context")+".Provider";case vg:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case yg:return e=t.displayName||null,e!==null?e:ey(t.type)||"Memo";case Is:e=t._payload,t=t._init;try{return ey(t(e))}catch{}}return null}function VA(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 ey(e);case 8:return e===hg?"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 no(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function W5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function HA(t){var e=W5(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ou(t){t._valueTracker||(t._valueTracker=HA(t))}function q5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=W5(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Kd(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 ty(t,e){var r=e.checked;return Ut({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function cb(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=no(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function G5(t,e){e=e.checked,e!=null&&dg(t,"checked",e,!1)}function ry(t,e){G5(t,e);var r=no(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?ny(t,e.type,r):e.hasOwnProperty("defaultValue")&&ny(t,e.type,no(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function fb(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function ny(t,e,r){(e!=="number"||Kd(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Uc=Array.isArray;function gl(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=Nu.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Af(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Gc={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},WA=["Webkit","ms","Moz","O"];Object.keys(Gc).forEach(function(t){WA.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Gc[e]=Gc[t]})});function Q5(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Gc.hasOwnProperty(t)&&Gc[t]?(""+e).trim():e+"px"}function X5(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=Q5(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var qA=Ut({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 oy(t,e){if(e){if(qA[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(se(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(se(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(se(61))}if(e.style!=null&&typeof e.style!="object")throw Error(se(62))}}function ay(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 ly=null;function pg(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var cy=null,ml=null,xl=null;function hb(t){if(t=uu(t)){if(typeof cy!="function")throw Error(se(280));var e=t.stateNode;e&&(e=mh(e),cy(t.stateNode,t.type,e))}}function Z5(t){ml?xl?xl.push(t):xl=[t]:ml=t}function e3(){if(ml){var t=ml,e=xl;if(xl=ml=null,hb(t),e)for(t=0;t>>=0,t===0?32:31-(n_(t)/i_|0)|0}var $u=64,Du=4194304;function zc(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 Xd(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,s=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~i;a!==0?n=zc(a):(s&=o,s!==0&&(n=zc(s)))}else o=r&~i,o!==0?n=zc(o):s!==0&&(n=zc(s));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function cu(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ti(e),t[e]=r}function l_(t,e){var r=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 n=t.eventTimes;for(t=t.expirationTimes;0=Jc),Cb=" ",Eb=!1;function b3(t,e){switch(t){case"keyup":return D_.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function w3(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var el=!1;function L_(t,e){switch(t){case"compositionend":return w3(e);case"keypress":return e.which!==32?null:(Eb=!0,Cb);case"textInput":return t=e.data,t===Cb&&Eb?null:t;default:return null}}function j_(t,e){if(el)return t==="compositionend"||!Sg&&b3(t,e)?(t=m3(),md=wg=Ds=null,el=!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)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=_b(r)}}function k3(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?k3(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function A3(){for(var t=window,e=Kd();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Kd(t.document)}return e}function kg(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 K_(t){var e=A3(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&k3(r.ownerDocument.documentElement,r)){if(n!==null&&kg(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!t.extend&&s>n&&(i=n,n=s,s=i),i=Tb(r,s);var o=Tb(r,n);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>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,tl=null,yy=null,Qc=null,py=!1;function Pb(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;py||tl==null||tl!==Kd(n)||(n=tl,"selectionStart"in n&&kg(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Qc&&Mf(Qc,n)||(Qc=n,n=t0(yy,"onSelect"),0il||(t.current=Cy[il],Cy[il]=null,il--)}function Xe(t,e){il++,Cy[il]=t.current,t.current=e}var io={},Dr=go(io),nn=go(!1),ua=io;function Nl(t,e){var r=t.type.contextTypes;if(!r)return io;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=e[s];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function sn(t){return t=t.childContextTypes,t!=null}function n0(){Ot(nn),Ot(Dr)}function Db(t,e,r){if(Dr.current!==io)throw Error(se(168));Xe(Dr,e),Xe(nn,r)}function $3(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(se(108,VA(t)||"Unknown",i));return Ut({},r,n)}function i0(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||io,ua=Dr.current,Xe(Dr,t),Xe(nn,nn.current),!0}function Bb(t,e,r){var n=t.stateNode;if(!n)throw Error(se(169));r?(t=$3(t,e,ua),n.__reactInternalMemoizedMergedChildContext=t,Ot(nn),Ot(Dr),Xe(Dr,t)):Ot(nn),Xe(nn,r)}var Vi=null,xh=!1,G1=!1;function D3(t){Vi===null?Vi=[t]:Vi.push(t)}function oT(t){xh=!0,D3(t)}function mo(){if(!G1&&Vi!==null){G1=!0;var t=0,e=Ve;try{var r=Vi;for(Ve=1;t>=o,i-=o,Gi=1<<32-ti(e)+i|r<F?(q=z,z=null):q=z.sibling;var G=h(w,z,A[F],I);if(G===null){z===null&&(z=q);break}t&&z&&G.alternate===null&&e(w,z),E=s(G,E,F),j===null?M=G:j.sibling=G,j=G,z=q}if(F===A.length)return r(w,z),$t&&zo(w,F),M;if(z===null){for(;FF?(q=z,z=null):q=z.sibling;var Z=h(w,z,G.value,I);if(Z===null){z===null&&(z=q);break}t&&z&&Z.alternate===null&&e(w,z),E=s(Z,E,F),j===null?M=Z:j.sibling=Z,j=Z,z=q}if(G.done)return r(w,z),$t&&zo(w,F),M;if(z===null){for(;!G.done;F++,G=A.next())G=u(w,G.value,I),G!==null&&(E=s(G,E,F),j===null?M=G:j.sibling=G,j=G);return $t&&zo(w,F),M}for(z=n(w,z);!G.done;F++,G=A.next())G=y(z,w,F,G.value,I),G!==null&&(t&&G.alternate!==null&&z.delete(G.key===null?F:G.key),E=s(G,E,F),j===null?M=G:j.sibling=G,j=G);return t&&z.forEach(function(oe){return e(w,oe)}),$t&&zo(w,F),M}function k(w,E,A,I){if(typeof A=="object"&&A!==null&&A.type===Za&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case Mu:e:{for(var M=A.key,j=E;j!==null;){if(j.key===M){if(M=A.type,M===Za){if(j.tag===7){r(w,j.sibling),E=i(j,A.props.children),E.return=w,w=E;break e}}else if(j.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===Is&&Hb(M)===j.type){r(w,j.sibling),E=i(j,A.props),E.ref=kc(w,j,A),E.return=w,w=E;break e}r(w,j);break}else e(w,j);j=j.sibling}A.type===Za?(E=ra(A.props.children,w.mode,I,A.key),E.return=w,w=E):(I=Ad(A.type,A.key,A.props,null,w.mode,I),I.ref=kc(w,E,A),I.return=w,w=I)}return o(w);case Xa:e:{for(j=A.key;E!==null;){if(E.key===j)if(E.tag===4&&E.stateNode.containerInfo===A.containerInfo&&E.stateNode.implementation===A.implementation){r(w,E.sibling),E=i(E,A.children||[]),E.return=w,w=E;break e}else{r(w,E);break}else e(w,E);E=E.sibling}E=tv(A,w.mode,I),E.return=w,w=E}return o(w);case Is:return j=A._init,k(w,E,j(A._payload),I)}if(Uc(A))return g(w,E,A,I);if(bc(A))return p(w,E,A,I);Vu(w,A)}return typeof A=="string"&&A!==""||typeof A=="number"?(A=""+A,E!==null&&E.tag===6?(r(w,E.sibling),E=i(E,A),E.return=w,w=E):(r(w,E),E=ev(A,w.mode,I),E.return=w,w=E),o(w)):r(w,E)}return k}var Dl=H3(!0),W3=H3(!1),du={},Ei=go(du),Df=go(du),Bf=go(du);function Qo(t){if(t===du)throw Error(se(174));return t}function Ng(t,e){switch(Xe(Bf,e),Xe(Df,t),Xe(Ei,du),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:sy(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=sy(e,t)}Ot(Ei),Xe(Ei,e)}function Bl(){Ot(Ei),Ot(Df),Ot(Bf)}function q3(t){Qo(Bf.current);var e=Qo(Ei.current),r=sy(e,t.type);e!==r&&(Xe(Df,t),Xe(Ei,r))}function $g(t){Df.current===t&&(Ot(Ei),Ot(Df))}var jt=go(0);function f0(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&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 K1=[];function Dg(){for(var t=0;tr?r:4,t(!0);var n=J1.transition;J1.transition={};try{t(!1),e()}finally{Ve=r,J1.transition=n}}function l4(){return On().memoizedState}function fT(t,e,r){var n=Js(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},c4(t))f4(e,r);else if(r=F3(t,e,r,n),r!==null){var i=qr();ri(r,t,n,i),u4(r,e,n)}}function uT(t,e,r){var n=Js(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(c4(t))f4(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,r);if(i.hasEagerState=!0,i.eagerState=a,si(a,o)){var l=e.interleaved;l===null?(i.next=i,Mg(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=F3(t,e,i,n),r!==null&&(i=qr(),ri(r,t,n,i),u4(r,e,n))}}function c4(t){var e=t.alternate;return t===Ft||e!==null&&e===Ft}function f4(t,e){Xc=u0=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function u4(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,mg(t,r)}}var d0={readContext:Mn,useCallback:Tr,useContext:Tr,useEffect:Tr,useImperativeHandle:Tr,useInsertionEffect:Tr,useLayoutEffect:Tr,useMemo:Tr,useReducer:Tr,useRef:Tr,useState:Tr,useDebugValue:Tr,useDeferredValue:Tr,useTransition:Tr,useMutableSource:Tr,useSyncExternalStore:Tr,useId:Tr,unstable_isNewReconciler:!1},dT={readContext:Mn,useCallback:function(t,e){return ui().memoizedState=[t,e===void 0?null:e],t},useContext:Mn,useEffect:qb,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Cd(4194308,4,n4.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Cd(4194308,4,t,e)},useInsertionEffect:function(t,e){return Cd(4,2,t,e)},useMemo:function(t,e){var r=ui();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=ui();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=fT.bind(null,Ft,t),[n.memoizedState,t]},useRef:function(t){var e=ui();return t={current:t},e.memoizedState=t},useState:Wb,useDebugValue:Ug,useDeferredValue:function(t){return ui().memoizedState=t},useTransition:function(){var t=Wb(!1),e=t[0];return t=cT.bind(null,t[1]),ui().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Ft,i=ui();if($t){if(r===void 0)throw Error(se(407));r=r()}else{if(r=e(),gr===null)throw Error(se(349));ha&30||J3(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,qb(Q3.bind(null,n,s,t),[t]),n.flags|=2048,Ff(9,Y3.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=ui(),e=gr.identifierPrefix;if($t){var r=Ki,n=Gi;r=(n&~(1<<32-ti(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Lf++,0<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[yi]=e,t[$f]=n,b4(t,e,!1,!1),e.stateNode=t;e:{switch(o=ay(r,n),r){case"dialog":Tt("cancel",t),Tt("close",t),i=n;break;case"iframe":case"object":case"embed":Tt("load",t),i=n;break;case"video":case"audio":for(i=0;ijl&&(e.flags|=128,n=!0,Ac(s,!1),e.lanes=4194304)}else{if(!n)if(t=f0(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Ac(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!$t)return Pr(e),null}else 2*Zt()-s.renderingStartTime>jl&&r!==1073741824&&(e.flags|=128,n=!0,Ac(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(r=s.last,r!==null?r.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Zt(),e.sibling=null,r=jt.current,Qe(jt,n?r&1|2:r&1),e):(Pr(e),null);case 22:case 23:return Gg(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?fn&1073741824&&(Pr(e),e.subtreeFlags&6&&(e.flags|=8192)):Pr(e),null;case 24:return null;case 25:return null}throw Error(ne(156,e.tag))}function bT(t,e){switch(_g(e),e.tag){case 1:return sn(e.type)&&n0(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ll(),Mt(nn),Mt(Dr),Dg(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return $g(e),null;case 13:if(Mt(jt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ne(340));$l()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Mt(jt),null;case 4:return Ll(),null;case 10:return Rg(e.type._context),null;case 22:case 23:return Gg(),null;case 24:return null;default:return null}}var Wu=!1,Rr=!1,wT=typeof WeakSet=="function"?WeakSet:Set,le=null;function ll(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ht(t,e,n)}else r.current=null}function Ny(t,e,r){try{r()}catch(n){Ht(t,e,n)}}var t2=!1;function CT(t,e){if(gy=Zd,t=A3(),kg(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,c=0,f=0,u=t,h=null;t:for(;;){for(var y;u!==r||i!==0&&u.nodeType!==3||(a=o+i),u!==s||n!==0&&u.nodeType!==3||(l=o+n),u.nodeType===3&&(o+=u.nodeValue.length),(y=u.firstChild)!==null;)h=u,u=y;for(;;){if(u===t)break t;if(h===r&&++c===i&&(a=o),h===s&&++f===n&&(l=o),(y=u.nextSibling)!==null)break;u=h,h=u.parentNode}u=y}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(my={focusedElem:t,selectionRange:r},Zd=!1,le=e;le!==null;)if(e=le,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,le=t;else for(;le!==null;){e=le;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var p=g.memoizedProps,k=g.memoizedState,w=e.stateNode,E=w.getSnapshotBeforeUpdate(e.elementType===e.type?p:Gn(e.type,p),k);w.__reactInternalSnapshotBeforeUpdate=E}break;case 3:var A=e.stateNode.containerInfo;A.nodeType===1?A.textContent="":A.nodeType===9&&A.documentElement&&A.removeChild(A.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(I){Ht(e,e.return,I)}if(t=e.sibling,t!==null){t.return=e.return,le=t;break}le=e.return}return g=t2,t2=!1,g}function Zc(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&Ny(e,r,s)}i=i.next}while(i!==n)}}function Ch(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function $y(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function E4(t){var e=t.alternate;e!==null&&(t.alternate=null,E4(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[yi],delete e[$f],delete e[wy],delete e[iT],delete e[sT])),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 S4(t){return t.tag===5||t.tag===3||t.tag===4}function r2(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||S4(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 Dy(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=r0));else if(n!==4&&(t=t.child,t!==null))for(Dy(t,e,r),t=t.sibling;t!==null;)Dy(t,e,r),t=t.sibling}function Ly(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Ly(t,e,r),t=t.sibling;t!==null;)Ly(t,e,r),t=t.sibling}var wr=null,Jn=!1;function Es(t,e,r){for(r=r.child;r!==null;)k4(t,e,r),r=r.sibling}function k4(t,e,r){if(Ci&&typeof Ci.onCommitFiberUnmount=="function")try{Ci.onCommitFiberUnmount(vh,r)}catch{}switch(r.tag){case 5:Rr||ll(r,e);case 6:var n=wr,i=Jn;wr=null,Es(t,e,r),wr=n,Jn=i,wr!==null&&(Jn?(t=wr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):wr.removeChild(r.stateNode));break;case 18:wr!==null&&(Jn?(t=wr,r=r.stateNode,t.nodeType===8?q1(t.parentNode,r):t.nodeType===1&&q1(t,r),If(t)):q1(wr,r.stateNode));break;case 4:n=wr,i=Jn,wr=r.stateNode.containerInfo,Jn=!0,Es(t,e,r),wr=n,Jn=i;break;case 0:case 11:case 14:case 15:if(!Rr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Ny(r,e,o),i=i.next}while(i!==n)}Es(t,e,r);break;case 1:if(!Rr&&(ll(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Ht(r,e,a)}Es(t,e,r);break;case 21:Es(t,e,r);break;case 22:r.mode&1?(Rr=(n=Rr)||r.memoizedState!==null,Es(t,e,r),Rr=n):Es(t,e,r);break;default:Es(t,e,r)}}function n2(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new wT),e.forEach(function(n){var i=RT.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function jn(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=Zt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*ST(n/1960))-n,10t?16:t,Ls===null)var n=!1;else{if(t=Ls,Ls=null,y0=0,$e&6)throw Error(ne(331));var i=$e;for($e|=4,le=t.current;le!==null;){var s=le,o=s.child;if(le.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lZt()-Wg?ta(t,0):Hg|=r),on(t,e)}function O4(t,e){e===0&&(t.mode&1?(e=Du,Du<<=1,!(Du&130023424)&&(Du=4194304)):e=1);var r=qr();t=ts(t,e),t!==null&&(cu(t,e,r),on(t,r))}function IT(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),O4(t,r)}function RT(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(ne(314))}n!==null&&n.delete(e),O4(t,r)}var N4;N4=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||nn.current)tn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return tn=!1,mT(t,e,r);tn=!!(t.flags&131072)}else tn=!1,$t&&e.flags&1048576&&L3(e,o0,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Ed(t,e),t=e.pendingProps;var i=Nl(e,Dr.current);wl(e,r),i=Bg(null,e,n,t,i,r);var s=jg();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,sn(n)?(s=!0,i0(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Og(e),i.updater=bh,e.stateNode=i,i._reactInternals=e,_y(e,n,t,r),e=Iy(null,e,n,!0,s,r)):(e.tag=0,$t&&s&&Ag(e),Vr(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Ed(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=OT(n),t=Gn(n,t),i){case 0:e=Py(null,e,n,t,r);break e;case 1:e=Xb(null,e,n,t,r);break e;case 11:e=Yb(null,e,n,t,r);break e;case 14:e=Qb(null,e,n,Gn(n.type,t),r);break e}throw Error(ne(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Gn(n,i),Py(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Gn(n,i),Xb(t,e,n,i,r);case 3:e:{if(g4(e),t===null)throw Error(ne(387));n=e.pendingProps,s=e.memoizedState,i=s.element,U3(t,e),c0(e,n,null,r);var o=e.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=Bl(Error(ne(423)),e),e=Zb(t,e,n,r,i);break e}else if(n!==i){i=Bl(Error(ne(424)),e),e=Zb(t,e,n,r,i);break e}else for(vn=qs(e.stateNode.containerInfo.firstChild),yn=e,$t=!0,Yn=null,r=W3(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if($l(),n===i){e=rs(t,e,r);break e}Vr(t,e,n,r)}e=e.child}return e;case 5:return q3(e),t===null&&Sy(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,xy(n,i)?o=null:s!==null&&xy(n,s)&&(e.flags|=32),p4(t,e),Vr(t,e,o,r),e.child;case 6:return t===null&&Sy(e),null;case 13:return m4(t,e,r);case 4:return Ng(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Dl(e,null,n,r):Vr(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Gn(n,i),Yb(t,e,n,i,r);case 7:return Vr(t,e,e.pendingProps,r),e.child;case 8:return Vr(t,e,e.pendingProps.children,r),e.child;case 12:return Vr(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,Qe(a0,n._currentValue),n._currentValue=o,s!==null)if(si(s.value,o)){if(s.children===i.children&&!nn.current){e=rs(t,e,r);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 l=a.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=Qi(-1,r&-r),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),ky(s.return,r,e),a.lanes|=r;break}l=l.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(ne(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),ky(o,r,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}Vr(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,wl(e,r),i=Mn(i),n=n(i),e.flags|=1,Vr(t,e,n,r),e.child;case 14:return n=e.type,i=Gn(n,e.pendingProps),i=Gn(n.type,i),Qb(t,e,n,i,r);case 15:return v4(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Gn(n,i),Ed(t,e),e.tag=1,sn(n)?(t=!0,i0(e)):t=!1,wl(e,r),V3(e,n,i),_y(e,n,i,r),Iy(null,e,n,!0,t,r);case 19:return x4(t,e,r);case 22:return y4(t,e,r)}throw Error(ne(156,e.tag))};function $4(t,e){return a3(t,e)}function MT(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pn(t,e,r,n){return new MT(t,e,r,n)}function Jg(t){return t=t.prototype,!(!t||!t.isReactComponent)}function OT(t){if(typeof t=="function")return Jg(t)?1:0;if(t!=null){if(t=t.$$typeof,t===vg)return 11;if(t===yg)return 14}return 2}function Ys(t,e){var r=t.alternate;return r===null?(r=Pn(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Ad(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")Jg(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Za:return ra(r.children,i,s,e);case hg:o=8,i|=8;break;case Qv:return t=Pn(12,r,e,i|2),t.elementType=Qv,t.lanes=s,t;case Xv:return t=Pn(13,r,e,i),t.elementType=Xv,t.lanes=s,t;case Zv:return t=Pn(19,r,e,i),t.elementType=Zv,t.lanes=s,t;case H5:return Sh(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case z5:o=10;break e;case V5:o=9;break e;case vg:o=11;break e;case yg:o=14;break e;case Is:o=16,n=null;break e}throw Error(ne(130,t==null?t:typeof t,""))}return e=Pn(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function ra(t,e,r,n){return t=Pn(7,t,n,e),t.lanes=r,t}function Sh(t,e,r,n){return t=Pn(22,t,n,e),t.elementType=H5,t.lanes=r,t.stateNode={isHidden:!1},t}function ev(t,e,r){return t=Pn(6,t,null,e),t.lanes=r,t}function tv(t,e,r){return e=Pn(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function NT(t,e,r,n,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=$1(0),this.expirationTimes=$1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$1(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Yg(t,e,r,n,i,s,o,a,l){return t=new NT(t,e,r,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Pn(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Og(s),t}function $T(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(j4)}catch(t){console.error(t)}}j4(),L5.exports=bn;var xo=L5.exports;const FT=yo(xo),em=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Ph=S.createContext({});function UT(){return S.useContext(Ph).visualElement}const hu=S.createContext(null),Ih=typeof document<"u",m0=Ih?S.useLayoutEffect:S.useEffect,F4=S.createContext({strict:!1});function zT(t,e,r,n){const i=UT(),s=S.useContext(F4),o=S.useContext(hu),a=S.useContext(em).reducedMotion,l=S.useRef();n=n||s.renderer,!l.current&&n&&(l.current=n(t,{visualState:e,parent:i,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;return m0(()=>{c&&c.render()}),(window.HandoffAppearAnimations?m0:S.useEffect)(()=>{c&&c.animationState&&c.animationState.animateChanges()}),c}function fl(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function VT(t,e,r){return S.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):fl(r)&&(r.current=n))},[e])}function zf(t){return typeof t=="string"||Array.isArray(t)}function Rh(t){return typeof t=="object"&&typeof t.start=="function"}const HT=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function Mh(t){return Rh(t.animate)||HT.some(e=>zf(t[e]))}function U4(t){return!!(Mh(t)||t.variants)}function WT(t,e){if(Mh(t)){const{initial:r,animate:n}=t;return{initial:r===!1||zf(r)?r:void 0,animate:zf(n)?n:void 0}}return t.inherit!==!1?e:{}}function qT(t){const{initial:e,animate:r}=WT(t,S.useContext(Ph));return S.useMemo(()=>({initial:e,animate:r}),[u2(e),u2(r)])}function u2(t){return Array.isArray(t)?t.join(" "):t}const Li=t=>({isEnabled:e=>t.some(r=>!!e[r])}),Vf={measureLayout:Li(["layout","layoutId","drag"]),animation:Li(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Li(["exit"]),drag:Li(["drag","dragControls"]),focus:Li(["whileFocus"]),hover:Li(["whileHover","onHoverStart","onHoverEnd"]),tap:Li(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Li(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Li(["whileInView","onViewportEnter","onViewportLeave"])};function GT(t){for(const e in t)e==="projectionNodeConstructor"?Vf.projectionNodeConstructor=t[e]:Vf[e].Component=t[e]}function Oh(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const rf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let KT=1;function JT(){return Oh(()=>{if(rf.hasEverUpdated)return KT++})}const tm=S.createContext({});class YT extends lr.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}}const z4=S.createContext({}),QT=Symbol.for("motionComponentSymbol");function XT({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:i,Component:s}){t&>(t);function o(l,c){const f={...S.useContext(em),...l,layoutId:ZT(l)},{isStatic:u}=f;let h=null;const y=qT(l),g=u?void 0:JT(),p=i(l,u);if(!u&&Ih){y.visualElement=zT(s,p,f,e);const k=S.useContext(F4).strict,w=S.useContext(z4);y.visualElement&&(h=y.visualElement.loadFeatures(f,k,t,g,r||Vf.projectionNodeConstructor,w))}return S.createElement(YT,{visualElement:y.visualElement,props:f},h,S.createElement(Ph.Provider,{value:y},n(s,l,g,VT(p,y.visualElement,c),p,u,y.visualElement)))}const a=S.forwardRef(o);return a[QT]=s,a}function ZT({layoutId:t}){const e=S.useContext(tm).id;return e&&t!==void 0?e+"-"+t:t}function eP(t){function e(n,i={}){return XT(t(n,i))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,i)=>(r.has(i)||r.set(i,e(i)),r.get(i))})}const tP=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function rm(t){return typeof t!="string"||t.includes("-")?!1:!!(tP.indexOf(t)>-1||/[A-Z]/.test(t))}const x0={};function rP(t){Object.assign(x0,t)}const b0=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ic=new Set(b0);function V4(t,{layout:e,layoutId:r}){return ic.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!x0[t]||t==="opacity")}const an=t=>!!(t!=null&&t.getVelocity),nP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},iP=(t,e)=>b0.indexOf(t)-b0.indexOf(e);function sP({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},i,s){let o="";e.sort(iP);for(const a of e)o+=`${nP[a]||a}(${t[a]}) `;return r&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,i?"":o):n&&i&&(o="none"),o}function H4(t){return t.startsWith("--")}const oP=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Fl=(t,e,r)=>Math.min(Math.max(r,t),e),_a={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},nf={..._a,transform:t=>Fl(0,1,t)},Ku={..._a,default:1},sf=t=>Math.round(t*1e5)/1e5,Hf=/(-)?([\d]*\.?[\d])+/g,zy=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,aP=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function vu(t){return typeof t=="string"}const yu=t=>({test:e=>vu(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ts=yu("deg"),Si=yu("%"),ye=yu("px"),lP=yu("vh"),cP=yu("vw"),d2={...Si,parse:t=>Si.parse(t)/100,transform:t=>Si.transform(t*100)},h2={..._a,transform:Math.round},W4={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,size:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,rotate:Ts,rotateX:Ts,rotateY:Ts,rotateZ:Ts,scale:Ku,scaleX:Ku,scaleY:Ku,scaleZ:Ku,skew:Ts,skewX:Ts,skewY:Ts,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:nf,originX:d2,originY:d2,originZ:ye,zIndex:h2,fillOpacity:nf,strokeOpacity:nf,numOctaves:h2};function nm(t,e,r,n){const{style:i,vars:s,transform:o,transformKeys:a,transformOrigin:l}=t;a.length=0;let c=!1,f=!1,u=!0;for(const h in e){const y=e[h];if(H4(h)){s[h]=y;continue}const g=W4[h],p=oP(y,g);if(ic.has(h)){if(c=!0,o[h]=p,a.push(h),!u)continue;y!==(g.default||0)&&(u=!1)}else h.startsWith("origin")?(f=!0,l[h]=p):i[h]=p}if(e.transform||(c||n?i.transform=sP(t,r,u,n):i.transform&&(i.transform="none")),f){const{originX:h="50%",originY:y="50%",originZ:g=0}=l;i.transformOrigin=`${h} ${y} ${g}`}}const im=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function q4(t,e,r){for(const n in e)!an(e[n])&&!V4(n,r)&&(t[n]=e[n])}function fP({transformTemplate:t},e,r){return S.useMemo(()=>{const n=im();return nm(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function uP(t,e,r){const n=t.style||{},i={};return q4(i,n,t),Object.assign(i,fP(t,e,r)),t.transformValues?t.transformValues(i):i}function dP(t,e,r){const n={},i=uP(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const hP=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","viewport"]);function w0(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||hP.has(t)}let G4=t=>!w0(t);function vP(t){t&&(G4=e=>e.startsWith("on")?!w0(e):t(e))}try{vP(require("@emotion/is-prop-valid").default)}catch{}function yP(t,e,r){const n={};for(const i in t)i==="values"&&typeof t.values=="object"||(G4(i)||r===!0&&w0(i)||!e&&!w0(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}function v2(t,e,r){return typeof t=="string"?t:ye.transform(e+r*t)}function pP(t,e,r){const n=v2(e,t.x,t.width),i=v2(r,t.y,t.height);return`${n} ${i}`}const gP={offset:"stroke-dashoffset",array:"stroke-dasharray"},mP={offset:"strokeDashoffset",array:"strokeDasharray"};function xP(t,e,r=1,n=0,i=!0){t.pathLength=1;const s=i?gP:mP;t[s.offset]=ye.transform(-n);const o=ye.transform(e),a=ye.transform(r);t[s.array]=`${o} ${a}`}function sm(t,{attrX:e,attrY:r,originX:n,originY:i,pathLength:s,pathSpacing:o=1,pathOffset:a=0,...l},c,f,u){if(nm(t,l,c,u),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:y,dimensions:g}=t;h.transform&&(g&&(y.transform=h.transform),delete h.transform),g&&(n!==void 0||i!==void 0||y.transform)&&(y.transformOrigin=pP(g,n!==void 0?n:.5,i!==void 0?i:.5)),e!==void 0&&(h.x=e),r!==void 0&&(h.y=r),s!==void 0&&xP(h,s,o,a,!1)}const K4=()=>({...im(),attrs:{}}),om=t=>typeof t=="string"&&t.toLowerCase()==="svg";function bP(t,e,r,n){const i=S.useMemo(()=>{const s=K4();return sm(s,e,{enableHardwareAcceleration:!1},om(n),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};q4(s,t.style,t),i.style={...s,...i.style}}return i}function wP(t=!1){return(r,n,i,s,{latestValues:o},a)=>{const c=(rm(r)?bP:dP)(n,o,a,r),u={...yP(n,typeof r=="string",t),...c,ref:s},{children:h}=n,y=S.useMemo(()=>an(h)?h.get():h,[h]);return i&&(u["data-projection-id"]=i),S.createElement(r,{...u,children:y})}}const am=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function J4(t,{style:e,vars:r},n,i){Object.assign(t.style,e,i&&i.getProjectionStyles(n));for(const s in r)t.style.setProperty(s,r[s])}const Y4=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Q4(t,e,r,n){J4(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(Y4.has(i)?i:am(i),e.attrs[i])}function lm(t,e){const{style:r}=t,n={};for(const i in r)(an(r[i])||e.style&&an(e.style[i])||V4(i,t))&&(n[i]=r[i]);return n}function X4(t,e){const r=lm(t,e);for(const n in t)if(an(t[n])||an(e[n])){const i=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[i]=t[n]}return r}function cm(t,e,r,n={},i={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),e}const C0=t=>Array.isArray(t),CP=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),EP=t=>C0(t)?t[t.length-1]||0:t;function _d(t){const e=an(t)?t.get():t;return CP(e)?e.toValue():e}function SP({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,i,s){const o={latestValues:kP(n,i,s,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const Z4=t=>(e,r)=>{const n=S.useContext(Ph),i=S.useContext(hu),s=()=>SP(t,e,n,i);return r?s():Oh(s)};function kP(t,e,r,n){const i={},s=n(t,{});for(const h in s)i[h]=_d(s[h]);let{initial:o,animate:a}=t;const l=Mh(t),c=U4(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let f=r?r.initial===!1:!1;f=f||o===!1;const u=f?a:o;return u&&typeof u!="boolean"&&!Rh(u)&&(Array.isArray(u)?u:[u]).forEach(y=>{const g=cm(t,y);if(!g)return;const{transitionEnd:p,transition:k,...w}=g;for(const E in w){let A=w[E];if(Array.isArray(A)){const I=f?A.length-1:0;A=A[I]}A!==null&&(i[E]=A)}for(const E in p)i[E]=p[E]}),i}const AP={useVisualState:Z4({scrapeMotionValuesFromProps:X4,createRenderState:K4,onMount:(t,e,{renderState:r,latestValues:n})=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}sm(r,n,{enableHardwareAcceleration:!1},om(e.tagName),t.transformTemplate),Q4(e,r)}})},_P={useVisualState:Z4({scrapeMotionValuesFromProps:lm,createRenderState:im})};function TP(t,{forwardMotionProps:e=!1},r,n,i){return{...rm(t)?AP:_P,preloadedFeatures:r,useRender:wP(e),createVisualElement:n,projectionNodeConstructor:i,Component:t}}var Ye;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(Ye||(Ye={}));function na(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function E0(t,e,r,n){S.useEffect(()=>{const i=t.current;if(r&&i)return na(i,e,r,n)},[t,e,r,n])}function PP({whileFocus:t,visualElement:e}){const r=S.useRef(!1),{animationState:n}=e,i=S.useCallback(()=>{let o=!1;try{o=e.current.matches(":focus-visible")}catch{o=!0}!o||!n||(n.setActive(Ye.Focus,!0),r.current=!0)},[n]),s=S.useCallback(()=>{!r.current||!n||(n.setActive(Ye.Focus,!1),r.current=!1)},[n]);E0(e,"focus",t?i:void 0),E0(e,"blur",t?s:void 0)}const e8=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Nh(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const t8=t=>e=>e8(e)&&t(e,Nh(e));function El(t,e,r,n){return na(t,e,t8(r),n)}function S0(t,e,r,n){return E0(t,e,r&&t8(r),n)}function r8(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const y2=r8("dragHorizontal"),p2=r8("dragVertical");function n8(t){let e=!1;if(t==="y")e=p2();else if(t==="x")e=y2();else{const r=y2(),n=p2();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function i8(){const t=n8(!0);return t?(t(),!1):!0}function g2(t,e,r,n){return(i,s)=>{i.type==="touch"||i8()||(r&&t.animationState&&t.animationState.setActive(Ye.Hover,e),n&&n(i,s))}}function IP({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){S0(n,"pointerenter",S.useMemo(()=>t||r?g2(n,!0,!!r,t):void 0,[t,!!r,n]),{passive:!t}),S0(n,"pointerleave",S.useMemo(()=>e||r?g2(n,!1,!!r,e):void 0,[t,!!r,n]),{passive:!e})}const s8=(t,e)=>e?t===e?!0:s8(t,e.parentElement):!1;function fm(t){return S.useEffect(()=>()=>t(),[])}const RP=(t,e)=>r=>e(t(r)),$h=(...t)=>t.reduce(RP);function rv(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,Nh(r))}function MP({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:i,...s}){const o=t||e||r||n,a=S.useRef(!1),l=S.useRef(null),c={passive:!(e||t||r||s.onPointerDown)};function f(){l.current&&l.current(),l.current=null}function u(){return f(),a.current=!1,i.getProps().whileTap&&i.animationState&&i.animationState.setActive(Ye.Tap,!1),!i8()}function h(E,A){var I,M,B,z;u()&&(s8(i.current,E.target)?(z=(B=i.getProps()).onTap)===null||z===void 0||z.call(B,E,A):(M=(I=i.getProps()).onTapCancel)===null||M===void 0||M.call(I,E,A))}function y(E,A){var I,M;u()&&((M=(I=i.getProps()).onTapCancel)===null||M===void 0||M.call(I,E,A))}function g(E,A){var I;const M=i.getProps();M.whileTap&&i.animationState&&i.animationState.setActive(Ye.Tap,!0),(I=M.onTapStart)===null||I===void 0||I.call(M,E,A)}const p=[!!e,!!t,!!n,i],k=S.useCallback((E,A)=>{f(),!a.current&&(a.current=!0,l.current=$h(El(window,"pointerup",h,c),El(window,"pointercancel",y,c)),g(E,A))},p);S0(i,"pointerdown",o?k:void 0,c);const w=S.useCallback(()=>{const E=na(i.current,"keydown",I=>{I.key!=="Enter"||a.current||(a.current=!0,l.current=na(i.current,"keyup",()=>{I.key!=="Enter"||!u()||rv("up",i.getProps().onTap)},c),rv("down",g))}),A=na(i.current,"blur",()=>{E(),A(),a.current&&rv("cancel",y)})},p);E0(i,"focus",o?w:void 0),fm(f)}const Vy=new WeakMap,nv=new WeakMap,OP=t=>{const e=Vy.get(t.target);e&&e(t)},NP=t=>{t.forEach(OP)};function $P({root:t,...e}){const r=t||document;nv.has(r)||nv.set(r,{});const n=nv.get(r),i=JSON.stringify(e);return n[i]||(n[i]=new IntersectionObserver(NP,{root:t,...e})),n[i]}function DP(t,e,r){const n=$P(e);return Vy.set(t,r),n.observe(t),()=>{Vy.delete(t),n.unobserve(t)}}function LP({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:i={}}){const s=S.useRef({hasEnteredView:!1,isInView:!1});let o=!!(e||r||n);i.once&&s.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?FP:jP)(o,s.current,t,i)}const BP={some:0,all:1};function jP(t,e,r,{root:n,margin:i,amount:s="some",once:o}){S.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:i,threshold:typeof s=="number"?s:BP[s]},l=c=>{const{isIntersecting:f}=c;if(e.isInView===f||(e.isInView=f,o&&!f&&e.hasEnteredView))return;f&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(Ye.InView,f);const u=r.getProps(),h=f?u.onViewportEnter:u.onViewportLeave;h&&h(c)};return DP(r.current,a,l)},[t,n,i,s])}function FP(t,e,r,{fallback:n=!0}){S.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:i}=r.getProps();i&&i(null),r.animationState&&r.animationState.setActive(Ye.InView,!0)})},[t])}const Bs=t=>e=>(t(e),null),UP={inView:Bs(LP),tap:Bs(MP),focus:Bs(PP),hover:Bs(IP)};function o8(){const t=S.useContext(hu);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,i=S.useId();return S.useEffect(()=>n(i),[]),!e&&r?[!1,()=>r&&r(i)]:[!0]}function a8(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let n=0;n/^\-?\d*\.?\d+$/.test(t),VP=t=>/^0[^.\s]+$/.test(t),Xi={delta:0,timestamp:0},l8=1/60*1e3,HP=typeof performance<"u"?()=>performance.now():()=>Date.now(),c8=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(HP()),l8);function WP(t){let e=[],r=[],n=0,i=!1,s=!1;const o=new WeakSet,a={schedule:(l,c=!1,f=!1)=>{const u=f&&i,h=u?e:r;return c&&o.add(l),h.indexOf(l)===-1&&(h.push(l),u&&i&&(n=e.length)),l},cancel:l=>{const c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let c=0;c(t[e]=WP(()=>Wf=!0),t),{}),Nr=pu.reduce((t,e)=>{const r=Dh[e];return t[e]=(n,i=!1,s=!1)=>(Wf||KP(),r.schedule(n,i,s)),t},{}),so=pu.reduce((t,e)=>(t[e]=Dh[e].cancel,t),{}),iv=pu.reduce((t,e)=>(t[e]=()=>Dh[e].process(Xi),t),{}),GP=t=>Dh[t].process(Xi),f8=t=>{Wf=!1,Xi.delta=Hy?l8:Math.max(Math.min(t-Xi.timestamp,qP),1),Xi.timestamp=t,Wy=!0,pu.forEach(GP),Wy=!1,Wf&&(Hy=!1,c8(f8))},KP=()=>{Wf=!0,Hy=!0,Wy||c8(f8)};function um(t,e){t.indexOf(e)===-1&&t.push(e)}function dm(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class hm{constructor(){this.subscriptions=[]}add(e){return um(this.subscriptions,e),()=>dm(this.subscriptions,e)}notify(e,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,r,n);else for(let s=0;s!isNaN(parseFloat(t));class YP{constructor(e,r={}){this.version="9.0.1",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,i=!0)=>{this.prev=this.current,this.current=n;const{delta:s,timestamp:o}=Xi;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,Nr.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Nr.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=JP(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new hm);const n=this.events[e].add(r);return e==="change"?()=>{n(),Nr.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e,r=!0){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,r,n){this.set(r),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?vm(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ul(t,e){return new YP(t,e)}const ym=(t,e)=>r=>!!(vu(r)&&aP.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),u8=(t,e,r)=>n=>{if(!vu(n))return n;const[i,s,o,a]=n.match(Hf);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},QP=t=>Fl(0,255,t),sv={..._a,transform:t=>Math.round(QP(t))},Xo={test:ym("rgb","red"),parse:u8("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+sv.transform(t)+", "+sv.transform(e)+", "+sv.transform(r)+", "+sf(nf.transform(n))+")"};function XP(t){let e="",r="",n="",i="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const qy={test:ym("#"),parse:XP,transform:Xo.transform},ul={test:ym("hsl","hue"),parse:u8("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+Si.transform(sf(e))+", "+Si.transform(sf(r))+", "+sf(nf.transform(n))+")"},zr={test:t=>Xo.test(t)||qy.test(t)||ul.test(t),parse:t=>Xo.test(t)?Xo.parse(t):ul.test(t)?ul.parse(t):qy.parse(t),transform:t=>vu(t)?t:t.hasOwnProperty("red")?Xo.transform(t):ul.transform(t)},d8="${c}",h8="${n}";function ZP(t){var e,r;return isNaN(t)&&vu(t)&&(((e=t.match(Hf))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(zy))===null||r===void 0?void 0:r.length)||0)>0}function k0(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const i=t.match(zy);i&&(r=i.length,t=t.replace(zy,d8),e.push(...i.map(zr.parse)));const s=t.match(Hf);return s&&(n=s.length,t=t.replace(Hf,h8),e.push(...s.map(_a.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function v8(t){return k0(t).values}function y8(t){const{values:e,numColors:r,tokenised:n}=k0(t),i=e.length;return s=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function tI(t){const e=v8(t);return y8(t)(e.map(eI))}const oo={test:ZP,parse:v8,createTransformer:y8,getAnimatableNone:tI},rI=new Set(["brightness","contrast","saturate","opacity"]);function nI(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(Hf)||[];if(!n)return t;const i=r.replace(n,"");let s=rI.has(e)?1:0;return n!==r&&(s*=100),e+"("+s+i+")"}const iI=/([a-z-]*)\(.*?\)/g,Gy={...oo,getAnimatableNone:t=>{const e=t.match(iI);return e?e.map(nI).join(" "):t}},sI={...W4,color:zr,backgroundColor:zr,outlineColor:zr,fill:zr,stroke:zr,borderColor:zr,borderTopColor:zr,borderRightColor:zr,borderBottomColor:zr,borderLeftColor:zr,filter:Gy,WebkitFilter:Gy},pm=t=>sI[t];function gm(t,e){var r;let n=pm(t);return n!==Gy&&(n=oo),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const p8=t=>e=>e.test(t),oI={test:t=>t==="auto",parse:t=>t},g8=[_a,ye,Si,Ts,cP,lP,oI],Tc=t=>g8.find(p8(t)),aI=[...g8,zr,oo],lI=t=>aI.find(p8(t));function cI(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function fI(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function Lh(t,e,r){const n=t.getProps();return cm(n,e,r!==void 0?r:n.custom,cI(t),fI(t))}function uI(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Ul(r))}function dI(t,e){const r=Lh(t,e);let{transitionEnd:n={},transition:i={},...s}=r?t.makeTargetAnimatable(r,!1):{};s={...s,...n};for(const o in s){const a=EP(s[o]);uI(t,o,a)}}function hI(t,e,r){var n,i;const s=Object.keys(e).filter(a=>!t.hasValue(a)),o=s.length;if(o)for(let a=0;at*1e3,mI={current:!1},mm=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,xm=t=>e=>1-t(1-e),bm=t=>t*t,xI=xm(bm),wm=mm(bm),Kt=(t,e,r)=>-r*t+r*e+t;function ov(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function bI({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,s=0,o=0;if(!e)i=s=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;i=ov(l,a,t+1/3),s=ov(l,a,t),o=ov(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}const av=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},wI=[qy,Xo,ul],CI=t=>wI.find(e=>e.test(t));function m2(t){const e=CI(t);let r=e.parse(t);return e===ul&&(r=bI(r)),r}const m8=(t,e)=>{const r=m2(t),n=m2(e),i={...r};return s=>(i.red=av(r.red,n.red,s),i.green=av(r.green,n.green,s),i.blue=av(r.blue,n.blue,s),i.alpha=Kt(r.alpha,n.alpha,s),Xo.transform(i))};function x8(t,e){return typeof t=="number"?r=>Kt(t,e,r):zr.test(t)?m8(t,e):w8(t,e)}const b8=(t,e)=>{const r=[...t],n=r.length,i=t.map((s,o)=>x8(s,e[o]));return s=>{for(let o=0;o{const r={...t,...e},n={};for(const i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=x8(t[i],e[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}},w8=(t,e)=>{const r=oo.createTransformer(e),n=k0(t),i=k0(e);return n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?$h(b8(n.values,i.values),r):o=>`${o>0?e:t}`},T0=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},x2=(t,e)=>r=>Kt(t,e,r);function SI(t){return typeof t=="number"?x2:typeof t=="string"?zr.test(t)?m8:w8:Array.isArray(t)?b8:typeof t=="object"?EI:x2}function kI(t,e,r){const n=[],i=r||SI(t[0]),s=t.length-1;for(let o=0;ot[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=kI(e,n,i),a=o.length,l=c=>{let f=0;if(a>1)for(;fl(Fl(t[0],t[s-1],c)):l}const Cm=t=>t,E8=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,AI=1e-7,_I=12;function TI(t,e,r,n,i){let s,o,a=0;do o=e+(r-e)/2,s=E8(o,n,i)-t,s>0?r=o:e=o;while(Math.abs(s)>AI&&++a<_I);return o}function S8(t,e,r,n){if(t===e&&r===n)return Cm;const i=s=>TI(s,0,1,t,r);return s=>s===0||s===1?s:E8(i(s),e,n)}const k8=t=>1-Math.sin(Math.acos(t)),Em=xm(k8),PI=mm(Em),A8=S8(.33,1.53,.69,.99),Sm=xm(A8),II=mm(Sm),RI=t=>(t*=2)<1?.5*Sm(t):.5*(2-Math.pow(2,-10*(t-1))),MI={linear:Cm,easeIn:bm,easeInOut:wm,easeOut:xI,circIn:k8,circInOut:PI,circOut:Em,backIn:Sm,backInOut:II,backOut:A8,anticipate:RI},b2=t=>{if(Array.isArray(t)){_0(t.length===4);const[e,r,n,i]=t;return S8(e,r,n,i)}else if(typeof t=="string")return MI[t];return t},OI=t=>Array.isArray(t)&&typeof t[0]!="number";function NI(t,e){return t.map(()=>e||wm).splice(0,t.length-1)}function $I(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function DI(t,e){return t.map(r=>r*e)}function Ky({keyframes:t,ease:e=wm,times:r,duration:n=300}){t=[...t];const i=OI(e)?e.map(b2):b2(e),s={done:!1,value:t[0]},o=DI(r&&r.length===t.length?r:$I(t),n);function a(){return C8(o,t,{ease:Array.isArray(i)?i:NI(t,i)})}let l=a();return{next:c=>(s.value=l(c),s.done=c>=n,s),flipTarget:()=>{t.reverse(),l=a()}}}const lv=.001,LI=.01,BI=10,jI=.05,FI=1;function UI({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s,o=1-e;o=Fl(jI,FI,o),t=Fl(LI,BI,t/1e3),o<1?(i=c=>{const f=c*o,u=f*t,h=f-r,y=Jy(c,o),g=Math.exp(-u);return lv-h/y*g},s=c=>{const u=c*o*t,h=u*r+r,y=Math.pow(o,2)*Math.pow(c,2)*t,g=Math.exp(-u),p=Jy(Math.pow(c,2),o);return(-i(c)+lv>0?-1:1)*((h-y)*g)/p}):(i=c=>{const f=Math.exp(-c*t),u=(c-r)*t+1;return-lv+f*u},s=c=>{const f=Math.exp(-c*t),u=(r-c)*(t*t);return f*u});const a=5/t,l=VI(i,s,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}const zI=12;function VI(t,e,r){let n=r;for(let i=1;it[r]!==void 0)}function qI(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!w2(t,WI)&&w2(t,HI)){const r=UI(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const GI=5;function _8({keyframes:t,restDelta:e,restSpeed:r,...n}){let i=t[0],s=t[t.length-1];const o={done:!1,value:i},{stiffness:a,damping:l,mass:c,velocity:f,duration:u,isResolvedFromDuration:h}=qI(n);let y=KI,g=f?-(f/1e3):0;const p=l/(2*Math.sqrt(a*c));function k(){const w=s-i,E=Math.sqrt(a/c)/1e3,A=Math.abs(w)<5;if(r||(r=A?.01:2),e||(e=A?.005:.5),p<1){const I=Jy(E,p);y=M=>{const B=Math.exp(-p*E*M);return s-B*((g+p*E*w)/I*Math.sin(I*M)+w*Math.cos(I*M))}}else if(p===1)y=I=>s-Math.exp(-E*I)*(w+(g+E*w)*I);else{const I=E*Math.sqrt(p*p-1);y=M=>{const B=Math.exp(-p*E*M),z=Math.min(I*M,300);return s-B*((g+p*E*w)*Math.sinh(z)+I*w*Math.cosh(z))/I}}}return k(),{next:w=>{const E=y(w);if(h)o.done=w>=u;else{let A=g;if(w!==0)if(p<1){const B=Math.max(0,w-GI);A=vm(E-y(B),w-B)}else A=0;const I=Math.abs(A)<=r,M=Math.abs(s-E)<=e;o.done=I&&M}return o.value=o.done?s:E,o},flipTarget:()=>{g=-g,[i,s]=[s,i],k()}}}_8.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const KI=t=>0;function JI({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){const o=t[0],a={done:!1,value:o};let l=r*e;const c=o+l,f=s===void 0?c:s(c);return f!==c&&(l=f-o),{next:u=>{const h=-l*Math.exp(-u/n);return a.done=!(h>i||h<-i),a.value=a.done?f:f+h,a},flipTarget:()=>{}}}const YI={decay:JI,keyframes:Ky,tween:Ky,spring:_8};function T8(t,e,r=0){return t-e-r}function QI(t,e=0,r=0,n=!0){return n?T8(e+-t,e,r):e-(t-e)+r}function XI(t,e,r,n){return n?t>=e+r:t<=-r}const ZI=t=>{const e=({delta:r})=>t(r);return{start:()=>Nr.update(e,!0),stop:()=>so.update(e)}};function P0({duration:t,driver:e=ZI,elapsed:r=0,repeat:n=0,repeatType:i="loop",repeatDelay:s=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:c,onComplete:f,onRepeat:u,onUpdate:h,type:y="keyframes",...g}){var p,k;const w=r;let E,A=0,I=t,M=!1,B=!0,z;const F=YI[o.length>2?"keyframes":y]||Ky,K=o[0],J=o[o.length-1];let Z={done:!1,value:K};!((k=(p=F).needsInterpolation)===null||k===void 0)&&k.call(p,K,J)&&(z=C8([0,100],[K,J],{clamp:!1}),o=[0,100]);const ie=F({...g,duration:t,keyframes:o});function D(){A++,i==="reverse"?(B=A%2===0,r=QI(r,I,s,B)):(r=T8(r,I,s),i==="mirror"&&ie.flipTarget()),M=!1,u&&u()}function v(){E&&E.stop(),f&&f()}function C(O){B||(O=-O),r+=O,M||(Z=ie.next(Math.max(0,r)),z&&(Z.value=z(Z.value)),M=B?Z.done:r<=0),h&&h(Z.value),M&&(A===0&&(I=I!==void 0?I:r),A{c&&c(),E&&E.stop()},set currentTime(O){r=w,C(O)},sample:O=>{r=w;const b=t&&typeof t=="number"?Math.max(t*.5,50):50;let _=0;for(C(0);_<=O;){const R=O-_;C(Math.min(R,b)),_+=b}return Z}}}function eR(t){return!t||Array.isArray(t)||typeof t=="string"&&P8[t]}const Hc=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,P8={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Hc([0,.65,.55,1]),circOut:Hc([.55,0,1,.45]),backIn:Hc([.31,.01,.66,-.59]),backOut:Hc([.33,1.53,.69,.99])};function tR(t){if(t)return Array.isArray(t)?Hc(t):P8[t]}function rR(t,e,r,{delay:n=0,duration:i,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){return t.animate({[e]:r,offset:l},{delay:n,duration:i,easing:tR(a),fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const C2={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},cv={},I8={};for(const t in C2)I8[t]=()=>(cv[t]===void 0&&(cv[t]=C2[t]()),cv[t]);function nR(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const iR=new Set(["opacity"]),Ju=10;function sR(t,e,{onUpdate:r,onComplete:n,...i}){if(!(I8.waapi()&&iR.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:c}=i;if(i.type==="spring"||!eR(i.ease)){if(i.repeat===1/0)return;const u=P0({...i,elapsed:0});let h={done:!1,value:o[0]};const y=[];let g=0;for(;!h.done&&g<2e4;)h=u.sample(g),y.push(h.value),g+=Ju;o=y,a=g-Ju,c="linear"}const f=rR(t.owner.current,e,o,{...i,delay:-l,duration:a,ease:c});return f.onfinish=()=>{t.set(nR(o,i)),Nr.update(()=>f.cancel()),n&&n()},{get currentTime(){return f.currentTime||0},set currentTime(u){f.currentTime=u},stop:()=>{const{currentTime:u}=f;if(u){const h=P0({...i,autoplay:!1});t.setWithVelocity(h.sample(u-Ju).value,h.sample(u).value,Ju)}Nr.update(()=>f.cancel())}}}function R8(t,e){const r=performance.now(),n=({timestamp:i})=>{const s=i-r;s>=e&&(so.read(n),t(s-e))};return Nr.read(n,!0),()=>so.read(n)}function oR({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const i=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:R8(i,-e)}:i()}function aR({keyframes:t,velocity:e=0,min:r,max:n,power:i=.8,timeConstant:s=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:f,onUpdate:u,onComplete:h,onStop:y}){const g=t[0];let p;function k(I){return r!==void 0&&In}function w(I){return r===void 0?n:n===void 0||Math.abs(r-I){var B;u==null||u(M),(B=I.onUpdate)===null||B===void 0||B.call(I,M)},onComplete:h,onStop:y})}function A(I){E({type:"spring",stiffness:o,damping:a,restDelta:l,...I})}if(k(g))A({velocity:e,keyframes:[g,w(g)]});else{let I=i*e+g;typeof c<"u"&&(I=c(I));const M=w(I),B=M===r?-1:1;let z,F;const K=J=>{z=F,F=J,e=vm(J-z,Xi.delta),(B===1&&J>M||B===-1&&Jp==null?void 0:p.stop()}}const Bo=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Yu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),fv=()=>({type:"keyframes",ease:"linear",duration:.3}),lR={type:"keyframes",duration:.8},E2={x:Bo,y:Bo,z:Bo,rotate:Bo,rotateX:Bo,rotateY:Bo,rotateZ:Bo,scaleX:Yu,scaleY:Yu,scale:Yu,opacity:fv,backgroundColor:fv,color:fv,default:Yu},cR=(t,{keyframes:e})=>e.length>2?lR:(E2[t]||E2.default)(e[1]),Yy=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&oo.test(e)&&!e.startsWith("url("));function fR({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...f}){return!!Object.keys(f).length}function S2(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function k2(t){return typeof t=="number"?0:gm("",t)}function M8(t,e){return t[e]||t.default||t}function uR(t,e,r,n){const i=Yy(e,r);let s=n.from!==void 0?n.from:t.get();return s==="none"&&i&&typeof r=="string"?s=gm(e,r):S2(s)&&typeof r=="string"?s=k2(r):!Array.isArray(r)&&S2(r)&&typeof s=="string"&&(r=k2(s)),Array.isArray(r)?(r[0]===null&&(r[0]=s),r):[s,r]}const km=(t,e,r,n={})=>i=>{const s=M8(n,t)||{},o=s.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Td(o);const l=uR(e,t,r,s),c=l[0],f=l[l.length-1],u=Yy(t,c),h=Yy(t,f);let y={keyframes:l,velocity:e.getVelocity(),...s,elapsed:a,onUpdate:k=>{e.set(k),s.onUpdate&&s.onUpdate(k)},onComplete:()=>{i(),s.onComplete&&s.onComplete()}};if(!u||!h||mI.current||s.type===!1)return oR(y);if(s.type==="inertia")return aR(y);fR(s)||(y={...y,...cR(t,y)}),y.duration&&(y.duration=Td(y.duration)),y.repeatDelay&&(y.repeatDelay=Td(y.repeatDelay));const g=e.owner,p=g&&g.current;if(g&&p instanceof HTMLElement&&!(g!=null&&g.getProps().onUpdate)){const k=sR(e,t,y);if(k)return k}return P0(y)};function dR(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const i=e.map(s=>Qy(t,s,r));n=Promise.all(i)}else if(typeof e=="string")n=Qy(t,e,r);else{const i=typeof e=="function"?Lh(t,e,r.custom):e;n=O8(t,i,r)}return n.then(()=>t.notify("AnimationComplete",e))}function Qy(t,e,r={}){var n;const i=Lh(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(s=r.transitionOverride);const o=i?()=>O8(t,i,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:h}=s;return hR(t,e,f+c,u,h,r)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,f]=l==="beforeChildren"?[o,a]:[a,o];return c().then(f)}else return Promise.all([o(),a(r.delay)])}function O8(t,e,{delay:r=0,transitionOverride:n,type:i}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");n&&(o=n);const f=[],u=i&&((s=t.animationState)===null||s===void 0?void 0:s.getState()[i]);for(const h in l){const y=t.getValue(h),g=l[h];if(!y||g===void 0||u&&yR(u,h))continue;const p={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!y.hasAnimated){const w=t.getProps()[gI];w&&(p.elapsed=window.HandoffAppearAnimations(w,h,y,Nr))}let k=y.start(km(h,y,g,t.shouldReduceMotion&&ic.has(h)?{type:!1}:p));A0(c)&&(c.add(h),k=k.then(()=>c.remove(h))),f.push(k)}return Promise.all(f).then(()=>{a&&dI(t,a)})}function hR(t,e,r=0,n=0,i=1,s){const o=[],a=(t.variantChildren.size-1)*n,l=i===1?(c=0)=>c*n:(c=0)=>a-c*n;return Array.from(t.variantChildren).sort(vR).forEach((c,f)=>{c.notify("AnimationStart",e),o.push(Qy(c,e,{...s,delay:r+l(f)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function vR(t,e){return t.sortNodePosition(e)}function yR({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const Am=[Ye.Animate,Ye.InView,Ye.Focus,Ye.Hover,Ye.Tap,Ye.Drag,Ye.Exit],pR=[...Am].reverse(),gR=Am.length;function mR(t){return e=>Promise.all(e.map(({animation:r,options:n})=>dR(t,r,n)))}function xR(t){let e=mR(t);const r=wR();let n=!0;const i=(l,c)=>{const f=Lh(t,c);if(f){const{transition:u,transitionEnd:h,...y}=f;l={...l,...y,...h}}return l};function s(l){e=l(t)}function o(l,c){const f=t.getProps(),u=t.getVariantContext(!0)||{},h=[],y=new Set;let g={},p=1/0;for(let w=0;wp&&M;const J=Array.isArray(I)?I:[I];let Z=J.reduce(i,{});B===!1&&(Z={});const{prevResolvedValues:ie={}}=A,D={...ie,...Z},v=C=>{K=!0,y.delete(C),A.needsAnimating[C]=!0};for(const C in D){const P=Z[C],O=ie[C];g.hasOwnProperty(C)||(P!==O?C0(P)&&C0(O)?!a8(P,O)||F?v(C):A.protectedKeys[C]=!0:P!==void 0?v(C):y.add(C):P!==void 0&&y.has(C)?v(C):A.protectedKeys[C]=!0)}A.prevProp=I,A.prevResolvedValues=Z,A.isActive&&(g={...g,...Z}),n&&t.blockInitialAnimation&&(K=!1),K&&!z&&h.push(...J.map(C=>({animation:C,options:{type:E,...l}})))}if(y.size){const w={};y.forEach(E=>{const A=t.getBaseTarget(E);A!==void 0&&(w[E]=A)}),h.push({animation:w})}let k=!!h.length;return n&&f.initial===!1&&!t.manuallyAnimateOnMount&&(k=!1),n=!1,k?e(h):Promise.resolve()}function a(l,c,f){var u;if(r[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(y=>{var g;return(g=y.animationState)===null||g===void 0?void 0:g.setActive(l,c)}),r[l].isActive=c;const h=o(f,l);for(const y in r)r[y].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>r}}function bR(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!a8(e,t):!1}function jo(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function wR(){return{[Ye.Animate]:jo(!0),[Ye.InView]:jo(),[Ye.Hover]:jo(),[Ye.Tap]:jo(),[Ye.Drag]:jo(),[Ye.Focus]:jo(),[Ye.Exit]:jo()}}const CR={animation:Bs(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=xR(t)),Rh(e)&&S.useEffect(()=>e.subscribe(t),[e])}),exit:Bs(t=>{const{custom:e,visualElement:r}=t,[n,i]=o8(),s=S.useContext(hu);S.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(Ye.Exit,!n,{custom:s&&s.custom||e});o&&!n&&o.then(i)},[n])})},A2=(t,e)=>Math.abs(t-e);function ER(t,e){const r=A2(t.x,e.x),n=A2(t.y,e.y);return Math.sqrt(r**2+n**2)}class N8{constructor(e,r,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=dv(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,u=ER(c.offset,{x:0,y:0})>=3;if(!f&&!u)return;const{point:h}=c,{timestamp:y}=Xi;this.history.push({...h,timestamp:y});const{onStart:g,onMove:p}=this.handlers;f||(g&&g(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=uv(f,this.transformPagePoint),Nr.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:h}=this.handlers,y=dv(c.type==="pointercancel"?this.lastMoveEventInfo:uv(f,this.transformPagePoint),this.history);this.startEvent&&u&&u(c,y),h&&h(c,y)},!e8(e))return;this.handlers=r,this.transformPagePoint=n;const i=Nh(e),s=uv(i,this.transformPagePoint),{point:o}=s,{timestamp:a}=Xi;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=r;l&&l(e,dv(s,this.history)),this.removeListeners=$h(El(window,"pointermove",this.handlePointerMove),El(window,"pointerup",this.handlePointerUp),El(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),so.update(this.updatePoint)}}function uv(t,e){return e?{point:e(t.point)}:t}function _2(t,e){return{x:t.x-e.x,y:t.y-e.y}}function dv({point:t},e){return{point:t,delta:_2(t,$8(e)),offset:_2(t,SR(e)),velocity:kR(e,.1)}}function SR(t){return t[0]}function $8(t){return t[t.length-1]}function kR(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const i=$8(t);for(;r>=0&&(n=t[r],!(i.timestamp-n.timestamp>Td(e)));)r--;if(!n)return{x:0,y:0};const s=(i.timestamp-n.timestamp)/1e3;if(s===0)return{x:0,y:0};const o={x:(i.x-n.x)/s,y:(i.y-n.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function mn(t){return t.max-t.min}function Xy(t,e=0,r=.01){return Math.abs(t-e)<=r}function T2(t,e,r,n=.5){t.origin=n,t.originPoint=Kt(e.min,e.max,t.origin),t.scale=mn(r)/mn(e),(Xy(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Kt(r.min,r.max,t.origin)-t.originPoint,(Xy(t.translate)||isNaN(t.translate))&&(t.translate=0)}function of(t,e,r,n){T2(t.x,e.x,r.x,n==null?void 0:n.originX),T2(t.y,e.y,r.y,n==null?void 0:n.originY)}function P2(t,e,r){t.min=r.min+e.min,t.max=t.min+mn(e)}function AR(t,e,r){P2(t.x,e.x,r.x),P2(t.y,e.y,r.y)}function I2(t,e,r){t.min=e.min-r.min,t.max=t.min+mn(e)}function af(t,e,r){I2(t.x,e.x,r.x),I2(t.y,e.y,r.y)}function _R(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?Kt(r,t,n.max):Math.min(t,r)),t}function R2(t,e,r){return{min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function TR(t,{top:e,left:r,bottom:n,right:i}){return{x:R2(t.x,r,i),y:R2(t.y,e,n)}}function M2(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=T0(e.min,e.max-n,t.min):n>i&&(r=T0(t.min,t.max-i,e.min)),Fl(0,1,r)}function RR(t,e){const r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}const Zy=.35;function MR(t=Zy){return t===!1?t=0:t===!0&&(t=Zy),{x:O2(t,"left","right"),y:O2(t,"top","bottom")}}function O2(t,e,r){return{min:N2(t,e),max:N2(t,r)}}function N2(t,e){return typeof t=="number"?t:t[e]||0}const $2=()=>({translate:0,scale:1,origin:0,originPoint:0}),lf=()=>({x:$2(),y:$2()}),D2=()=>({min:0,max:0}),or=()=>({x:D2(),y:D2()});function di(t){return[t("x"),t("y")]}function D8({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function OR({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function NR(t,e){if(!e)return t;const r=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function hv(t){return t===void 0||t===1}function ep({scale:t,scaleX:e,scaleY:r}){return!hv(t)||!hv(e)||!hv(r)}function Ho(t){return ep(t)||L8(t)||t.z||t.rotate||t.rotateX||t.rotateY}function L8(t){return L2(t.x)||L2(t.y)}function L2(t){return t&&t!=="0%"}function I0(t,e,r){const n=t-r,i=e*n;return r+i}function B2(t,e,r,n,i){return i!==void 0&&(t=I0(t,i,n)),I0(t,r,n)+e}function tp(t,e=0,r=1,n,i){t.min=B2(t.min,e,r,n,i),t.max=B2(t.max,e,r,n,i)}function B8(t,{x:e,y:r}){tp(t.x,e.translate,e.scale,e.originPoint),tp(t.y,r.translate,r.scale,r.originPoint)}function $R(t,e,r,n=!1){var i,s;const o=r.length;if(!o)return;e.x=e.y=1;let a,l;for(let c=0;c1.0000000000001||t<.999999999999?t:1}function Ms(t,e){t.min=t.min+e,t.max=t.max+e}function F2(t,e,[r,n,i]){const s=e[i]!==void 0?e[i]:.5,o=Kt(t.min,t.max,s);tp(t,e[r],e[n],o,e.scale)}const DR=["x","scaleX","originX"],LR=["y","scaleY","originY"];function dl(t,e){F2(t.x,e,DR),F2(t.y,e,LR)}function j8(t,e){return D8(NR(t.getBoundingClientRect(),e))}function BR(t,e,r){const n=j8(t,r),{scroll:i}=e;return i&&(Ms(n.x,i.offset.x),Ms(n.y,i.offset.y)),n}const jR=new WeakMap;class FR{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=or(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(Nh(a,"page").point)},i=(a,l)=>{var c;const{drag:f,dragPropagation:u,onDragStart:h}=this.getProps();f&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=n8(f),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),di(y=>{var g,p;let k=this.getAxisMotionValue(y).get()||0;if(Si.test(k)){const w=(p=(g=this.visualElement.projection)===null||g===void 0?void 0:g.layout)===null||p===void 0?void 0:p.layoutBox[y];w&&(k=mn(w)*(parseFloat(k)/100))}this.originPoint[y]=k}),h==null||h(a,l),(c=this.visualElement.animationState)===null||c===void 0||c.setActive(Ye.Drag,!0))},s=(a,l)=>{const{dragPropagation:c,dragDirectionLock:f,onDirectionLock:u,onDrag:h}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:y}=l;if(f&&this.currentDirection===null){this.currentDirection=UR(y),this.currentDirection!==null&&(u==null||u(this.currentDirection));return}this.updateAxis("x",l.point,y),this.updateAxis("y",l.point,y),this.visualElement.render(),h==null||h(a,l)},o=(a,l)=>this.stop(a,l);this.panSession=new N8(e,{onSessionStart:n,onStart:i,onMove:s,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s==null||s(e,r)}cancel(){var e,r;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(r=this.visualElement.animationState)===null||r===void 0||r.setActive(Ye.Drag,!1)}updateAxis(e,r,n){const{drag:i}=this.getProps();if(!n||!Qu(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=_R(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},i=this.constraints;e&&fl(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=TR(n.layoutBox,e):this.constraints=!1,this.elastic=MR(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&di(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=RR(n.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!fl(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=BR(n,i.root,this.visualElement.getTransformPagePoint());let o=PR(i.layout.layoutBox,s);if(r){const a=r(OR(o));this.hasMutatedConstraints=!!a,a&&(o=D8(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=di(f=>{if(!Qu(f,r,this.currentDirection))return;let u=(l==null?void 0:l[f])||{};o&&(u={min:0,max:0});const h=i?200:1e6,y=i?40:1e7,g={type:"inertia",velocity:n?e[f]:0,bounceStiffness:h,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(f,g)});return Promise.all(c).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(km(e,n,0,r))}stopAnimation(){di(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var r;const n="_drag"+e.toUpperCase(),i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,((r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[e])||0)}snapToCursor(e){di(r=>{const{drag:n}=this.getProps();if(!Qu(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(r);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[r];s.set(e[r]-Kt(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!fl(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};di(a=>{const l=this.getAxisMotionValue(a);if(l){const c=l.get();s[a]=IR({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",(e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout(),this.resolveConstraints(),di(a=>{if(!Qu(a,r,null))return;const l=this.getAxisMotionValue(a),{min:c,max:f}=this.constraints[a];l.set(Kt(c,f,s[a]))})}addListeners(){var e;if(!this.visualElement.current)return;jR.set(this.visualElement,this);const r=this.visualElement.current,n=El(r,"pointerdown",c=>{const{drag:f,dragListener:u=!0}=this.getProps();f&&u&&this.start(c)}),i=()=>{const{dragConstraints:c}=this.getProps();fl(c)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&((e=s.root)===null||e===void 0||e.updateScroll(),s.updateLayout()),i();const a=na(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f})=>{this.isDragging&&f&&(di(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=c[u].translate,h.set(h.get()+c[u].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l==null||l()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Zy,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Qu(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function UR(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function zR(t){const{dragControls:e,visualElement:r}=t,n=Oh(()=>new FR(r));S.useEffect(()=>e&&e.subscribe(n),[n,e]),S.useEffect(()=>n.addListeners(),[n])}function VR({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:i}){const s=t||e||r||n,o=S.useRef(null),{transformPagePoint:a}=S.useContext(em),l={onSessionStart:n,onStart:e,onMove:t,onEnd:(f,u)=>{o.current=null,r&&r(f,u)}};S.useEffect(()=>{o.current!==null&&o.current.updateHandlers(l)});function c(f){o.current=new N8(f,l,{transformPagePoint:a})}S0(i,"pointerdown",s&&c),fm(()=>o.current&&o.current.end())}const HR={pan:Bs(VR),drag:Bs(zR)};function rp(t){return typeof t=="string"&&t.startsWith("var(--")}const F8=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function WR(t){const e=F8.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function np(t,e,r=1){const[n,i]=WR(t);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);return s?s.trim():rp(i)?np(i,e,r+1):i}function qR(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(i=>{const s=i.get();if(!rp(s))return;const o=np(s,n);o&&i.set(o)});for(const i in e){const s=e[i];if(!rp(s))continue;const o=np(s,n);o&&(e[i]=o,r&&r[i]===void 0&&(r[i]=s))}return{target:e,transitionEnd:r}}const GR=new Set(["width","height","top","left","right","bottom","x","y"]),U8=t=>GR.has(t),KR=t=>Object.keys(t).some(U8),U2=t=>t===_a||t===ye;var z2;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(z2||(z2={}));const V2=(t,e)=>parseFloat(t.split(", ")[e]),H2=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return V2(i[1],e);{const s=n.match(/^matrix\((.+)\)$/);return s?V2(s[1],t):0}},JR=new Set(["x","y","z"]),YR=b0.filter(t=>!JR.has(t));function QR(t){const e=[];return YR.forEach(r=>{const n=t.getValue(r);n!==void 0&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),e.length&&t.render(),e}const W2={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:H2(4,13),y:H2(5,14)},XR=(t,e,r)=>{const n=e.measureViewportBox(),i=e.current,s=getComputedStyle(i),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(c=>{a[c]=W2[c](n,s)}),e.render();const l=e.measureViewportBox();return r.forEach(c=>{const f=e.getValue(c);f&&f.jump(a[c]),t[c]=W2[c](l,s)}),t},ZR=(t,e,r={},n={})=>{e={...e},n={...n};const i=Object.keys(e).filter(U8);let s=[],o=!1;const a=[];if(i.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let f=r[l],u=Tc(f);const h=e[l];let y;if(C0(h)){const g=h.length,p=h[0]===null?1:0;f=h[p],u=Tc(f);for(let k=p;k=0?window.pageYOffset:null,c=XR(e,t,a);return s.length&&s.forEach(([f,u])=>{t.getValue(f).set(u)}),t.render(),Ih&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:e,transitionEnd:n}};function eM(t,e,r,n){return KR(e)?ZR(t,e,r,n):{target:e,transitionEnd:n}}const tM=(t,e,r,n)=>{const i=qR(t,e,n);return e=i.target,n=i.transitionEnd,eM(t,e,r,n)},ip={current:null},z8={current:!1};function rM(){if(z8.current=!0,!!Ih)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ip.current=t.matches;t.addListener(e),e()}else ip.current=!1}function nM(t,e,r){const{willChange:n}=e;for(const i in e){const s=e[i],o=r[i];if(an(s))t.addValue(i,s),A0(n)&&n.add(i);else if(an(o))t.addValue(i,Ul(s,{owner:t})),A0(n)&&n.remove(i);else if(o!==s)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(s)}else{const a=t.getStaticValue(i);t.addValue(i,Ul(a!==void 0?a:s,{owner:t}))}}for(const i in r)e[i]===void 0&&t.removeValue(i);return e}const V8=Object.keys(Vf),iM=V8.length,q2=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class sM{constructor({parent:e,props:r,reducedMotionConfig:n,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Nr.render(this.render,!1,!0);const{latestValues:o,renderState:a}=i;this.latestValues=o,this.baseTarget={...o},this.initialValues=r.initial?{...o}:{},this.renderState=a,this.parent=e,this.props=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=s,this.isControllingVariants=Mh(r),this.isVariantNode=U4(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(r,{});for(const f in c){const u=c[f];o[f]!==void 0&&an(u)&&(u.set(o[f],!1),A0(l)&&l.add(f))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){var r;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(r=this.parent)===null||r===void 0?void 0:r.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),z8.current||rM(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ip.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,r,n;(e=this.projection)===null||e===void 0||e.unmount(),so.update(this.notifyUpdate),so.render(this.render),this.valueSubscriptions.forEach(i=>i()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(e,r){const n=ic.has(e),i=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Nr.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),s()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,i,s,o,a){const l=[];for(let c=0;cthis.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:a,layoutScroll:y,layoutRoot:g})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):or()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender();const r=this.props;this.props=e;for(let n=0;nn.variantChildren.delete(e)}addValue(e,r){r!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,r)),this.values.set(e,r),this.latestValues[e]=r.get()}removeValue(e){var r;this.values.delete(e),(r=this.valueSubscriptions.get(e))===null||r===void 0||r(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&r!==void 0&&(n=Ul(r,{owner:this}),this.addValue(e,n)),n}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var r;const{initial:n}=this.props,i=typeof n=="string"||typeof n=="object"?(r=cm(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!an(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new hm),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}}const H8=["initial",...Am],oM=H8.length;class W8 extends sM{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){var n;return(n=e.style)===null||n===void 0?void 0:n[r]}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:i},s){let o=yI(n,e||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),o&&(o=i(o))),s){hI(this,n,o);const a=tM(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function aM(t){return window.getComputedStyle(t)}class lM extends W8{readValueFromInstance(e,r){if(ic.has(r)){const n=pm(r);return n&&n.default||0}else{const n=aM(e),i=(H4(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return j8(e,r)}build(e,r,n,i){nm(e,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,r){return lm(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;an(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,i){J4(e,r,n,i)}}class cM extends W8{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return ic.has(r)?((n=pm(r))===null||n===void 0?void 0:n.default)||0:(r=Y4.has(r)?r:am(r),e.getAttribute(r))}measureInstanceViewportBox(){return or()}scrapeMotionValuesFromProps(e,r){return X4(e,r)}build(e,r,n,i){sm(e,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,r,n,i){Q4(e,r,n,i)}mount(e){this.isSVGTag=om(e.tagName),super.mount(e)}}const fM=(t,e)=>rm(t)?new cM(e,{enableHardwareAcceleration:!1}):new lM(e,{enableHardwareAcceleration:!0});function G2(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Pc={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ye.test(t))t=parseFloat(t);else return t;const r=G2(t,e.target.x),n=G2(t,e.target.y);return`${r}% ${n}%`}},K2="_$css",uM={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,i=t.includes("var("),s=[];i&&(t=t.replace(F8,y=>(s.push(y),K2)));const o=oo.parse(t);if(o.length>5)return n;const a=oo.createTransformer(t),l=typeof o[0]!="number"?1:0,c=r.x.scale*e.x,f=r.y.scale*e.y;o[0+l]/=c,o[1+l]/=f;const u=Kt(c,f,.5);typeof o[2+l]=="number"&&(o[2+l]/=u),typeof o[3+l]=="number"&&(o[3+l]/=u);let h=a(o);if(i){let y=0;h=h.replace(K2,()=>{const g=s[y];return y++,g})}return h}};class dM extends lr.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=e;rP(vM),s&&(r.group&&r.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),rf.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o&&(o.isPresent=s,i||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||Nr.postRender(()=>{var a;!((a=o.getStack())===null||a===void 0)&&a.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(i),n!=null&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}}function hM(t){const[e,r]=o8(),n=S.useContext(tm);return lr.createElement(dM,{...t,layoutGroup:n,switchLayoutGroup:S.useContext(z4),isPresent:e,safeToRemove:r})}const vM={borderRadius:{...Pc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pc,borderTopRightRadius:Pc,borderBottomLeftRadius:Pc,borderBottomRightRadius:Pc,boxShadow:uM},yM={measureLayout:hM};function pM(t,e,r={}){const n=an(t)?t:Ul(t);return n.start(km("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const q8=["TopLeft","TopRight","BottomLeft","BottomRight"],gM=q8.length,J2=t=>typeof t=="string"?parseFloat(t):t,Y2=t=>typeof t=="number"||ye.test(t);function mM(t,e,r,n,i,s){i?(t.opacity=Kt(0,r.opacity!==void 0?r.opacity:1,xM(n)),t.opacityExit=Kt(e.opacity!==void 0?e.opacity:1,0,bM(n))):s&&(t.opacity=Kt(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(T0(t,e,n))}function X2(t,e){t.min=e.min,t.max=e.max}function Fn(t,e){X2(t.x,e.x),X2(t.y,e.y)}function Z2(t,e,r,n,i){return t-=e,t=I0(t,1/r,n),i!==void 0&&(t=I0(t,1/i,n)),t}function wM(t,e=0,r=1,n=.5,i,s=t,o=t){if(Si.test(e)&&(e=parseFloat(e),e=Kt(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=Kt(s.min,s.max,n);t===s&&(a-=e),t.min=Z2(t.min,e,r,a,i),t.max=Z2(t.max,e,r,a,i)}function ew(t,e,[r,n,i],s,o){wM(t,e[r],e[n],e[i],e.scale,s,o)}const CM=["x","scaleX","originX"],EM=["y","scaleY","originY"];function tw(t,e,r,n){ew(t.x,e,CM,r==null?void 0:r.x,n==null?void 0:n.x),ew(t.y,e,EM,r==null?void 0:r.y,n==null?void 0:n.y)}function rw(t){return t.translate===0&&t.scale===1}function K8(t){return rw(t.x)&&rw(t.y)}function J8(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function nw(t){return mn(t.x)/mn(t.y)}class SM{constructor(){this.members=[]}add(e){um(this.members,e),e.scheduleRender()}remove(e){if(dm(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(e){const r=this.members.findIndex(i=>e===i);if(r===0)return!1;let n;for(let i=r;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){n=s;break}}return n?(this.promote(n),!0):!1}promote(e,r){var n;const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,r&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,n,i,s,o;(n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r),(o=(i=e.resumingFrom)===null||i===void 0?void 0:(s=i.options).onExitComplete)===null||o===void 0||o.call(s)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function iw(t,e,r){let n="";const i=t.x.translate/e.x,s=t.y.translate/e.y;if((i||s)&&(n=`translate3d(${i}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:l,rotateX:c,rotateY:f}=r;l&&(n+=`rotate(${l}deg) `),c&&(n+=`rotateX(${c}deg) `),f&&(n+=`rotateY(${f}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(n+=`scale(${o}, ${a})`),n||"none"}const kM=(t,e)=>t.depth-e.depth;class AM{constructor(){this.children=[],this.isDirty=!1}add(e){um(this.children,e),this.isDirty=!0}remove(e){dm(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(kM),this.isDirty=!1,this.children.forEach(e)}}const sw=["","X","Y","Z"],ow=1e3;let _M=0;function Y8({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=_M++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(IM),this.nodes.forEach(OM),this.nodes.forEach(NM)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let c=0;cthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=R8(y,250),rf.hasAnimatedSinceResize&&(rf.hasAnimatedSinceResize=!1,this.nodes.forEach(lw))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||f)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:y,hasRelativeTargetChanged:g,layout:p})=>{var k,w,E,A,I;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const M=(w=(k=this.options.transition)!==null&&k!==void 0?k:u.getDefaultTransition())!==null&&w!==void 0?w:jM,{onLayoutAnimationStart:B,onLayoutAnimationComplete:z}=u.getProps(),F=!this.targetLayout||!J8(this.targetLayout,p)||g,K=!y&&g;if(this.options.layoutRoot||!((E=this.resumeFrom)===null||E===void 0)&&E.instance||K||y&&(F||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,K);const J={...M8(M,"layout"),onPlay:B,onComplete:z};(u.shouldReduceMotion||this.options.layoutRoot)&&(J.delay=0,J.type=!1),this.startAnimation(J)}else!y&&this.animationProgress===0&&lw(this),this.isLead()&&((I=(A=this.options).onExitComplete)===null||I===void 0||I.call(A));this.targetLayout=p})}unmount(){var o,a;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(o=this.getStack())===null||o===void 0||o.remove(this),(a=this.parent)===null||a===void 0||a.children.delete(this),this.instance=void 0,so.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var o;return this.isAnimationBlocked||((o=this.parent)===null||o===void 0?void 0:o.isTreeAnimationBlocked())||!1}startUpdate(){var o;this.isUpdateBlocked()||(this.isUpdating=!0,(o=this.nodes)===null||o===void 0||o.forEach($M),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,l,c;if(this.root.isUpdateBlocked()){(l=(a=this.options).onExitComplete)===null||l===void 0||l.call(a);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var o;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var A;const I=E/1e3;cw(y.x,o.x,I),cw(y.y,o.y,I),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((A=this.relativeParent)===null||A===void 0)&&A.layout)&&(af(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),LM(this.relativeTarget,this.relativeTargetOrigin,g,I)),p&&(this.animationValues=h,mM(h,u,this.latestValues,I,w,k)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=I},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(so.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Nr.update(()=>{rf.hasAnimatedSinceResize=!0,this.currentAnimation=pM(0,ow,{...o,onUpdate:c=>{var f;this.mixTargetDelta(c),(f=o.onUpdate)===null||f===void 0||f.call(o,c)},onComplete:()=>{var c;(c=o.onComplete)===null||c===void 0||c.call(o),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var o;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(o=this.getStack())===null||o===void 0||o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var o;this.currentAnimation&&((o=this.mixTargetDelta)===null||o===void 0||o.call(this,ow),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&Q8(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||or();const u=mn(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const h=mn(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}Fn(a,l),dl(a,f),of(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){var l,c,f;this.sharedNodes.has(o)||this.sharedNodes.set(o,new SM),this.sharedNodes.get(o).add(a),a.promote({transition:(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(c=a.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(c,a)})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let f=0;f{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(aw),this.root.sharedNodes.clear()}}}function TM(t){t.updateLayout()}function PM(t){var e,r,n;const i=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=t.layout,{animationType:a}=t.options,l=i.source!==t.layout.source;a==="size"?di(y=>{const g=l?i.measuredBox[y]:i.layoutBox[y],p=mn(g);g.min=s[y].min,g.max=g.min+p}):Q8(a,i.layoutBox,s)&&di(y=>{const g=l?i.measuredBox[y]:i.layoutBox[y],p=mn(s[y]);g.max=g.min+p});const c=lf();of(c,s,i.layoutBox);const f=lf();l?of(f,t.applyTransform(o,!0),i.measuredBox):of(f,s,i.layoutBox);const u=!K8(c);let h=!1;if(!t.resumeFrom){const y=t.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:g,layout:p}=y;if(g&&p){const k=or();af(k,i.layoutBox,g.layoutBox);const w=or();af(w,s,p.layoutBox),J8(k,w)||(h=!0),y.options.layoutRoot&&(t.relativeTarget=w,t.relativeTargetOrigin=k,t.relativeParent=y)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:i,delta:f,layoutDelta:c,hasLayoutChanged:u,hasRelativeTargetChanged:h})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function IM(t){t.isProjectionDirty||(t.isProjectionDirty=!!(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=!!(t.parent&&t.parent.isTransformDirty))}function RM(t){t.clearSnapshot()}function aw(t){t.clearMeasurements()}function MM(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function lw(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function OM(t){t.resolveTargetDelta()}function NM(t){t.calcProjection()}function $M(t){t.resetRotation()}function DM(t){t.removeLeadSnapshot()}function cw(t,e,r){t.translate=Kt(e.translate,0,r),t.scale=Kt(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function fw(t,e,r,n){t.min=Kt(e.min,r.min,n),t.max=Kt(e.max,r.max,n)}function LM(t,e,r,n){fw(t.x,e.x,r.x,n),fw(t.y,e.y,r.y,n)}function BM(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const jM={duration:.45,ease:[.4,0,.1,1]};function FM(t,e){let r=t.root;for(let s=t.path.length-1;s>=0;s--)if(t.path[s].instance){r=t.path[s];break}const i=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);i&&t.mount(i,!0)}function uw(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function UM(t){uw(t.x),uw(t.y)}function Q8(t,e,r){return t==="position"||t==="preserve-aspect"&&!Xy(nw(e),nw(r),.2)}const zM=Y8({attachResizeListener:(t,e)=>na(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),vv={current:void 0},VM=Y8({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!vv.current){const t=new zM(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),vv.current=t}return vv.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),HM={...CR,...UP,...HR,...yM},Sl=eP((t,e)=>TP(t,e,HM,fM,VM));function X8(){const t=S.useRef(!1);return m0(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function WM(){const t=X8(),[e,r]=S.useState(0),n=S.useCallback(()=>{t.current&&r(e+1)},[e]);return[S.useCallback(()=>Nr.postRender(n),[n]),e]}class qM extends S.Component{getSnapshotBeforeUpdate(e){const r=this.props.childRef.current;if(r&&e.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function GM({children:t,isPresent:e}){const r=S.useId(),n=S.useRef(null),i=S.useRef({width:0,height:0,top:0,left:0});return S.useInsertionEffect(()=>{const{width:s,height:o,top:a,left:l}=i.current;if(e||!n.current||!s||!o)return;n.current.dataset.motionPopId=r;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` +`+s.stack}return{value:t,source:e,stack:i,digest:null}}function X1(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function Ty(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var yT=typeof WeakMap=="function"?WeakMap:Map;function d4(t,e,r){r=Qi(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){v0||(v0=!0,Ly=n),Ty(t,e)},r}function h4(t,e,r){r=Qi(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){Ty(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){Ty(t,e),typeof n!="function"&&(Ks===null?Ks=new Set([this]):Ks.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function Gb(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new yT;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=PT.bind(null,t,e,r),e.then(t,t))}function Kb(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 Jb(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=Qi(-1,1),e.tag=2,Gs(r,e,1))),r.lanes|=1),t)}var pT=fs.ReactCurrentOwner,tn=!1;function Vr(t,e,r,n){e.child=t===null?W3(e,null,r,n):Dl(e,t.child,r,n)}function Yb(t,e,r,n,i){r=r.render;var s=e.ref;return wl(e,i),n=Lg(t,e,r,n,s,i),r=jg(),t!==null&&!tn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,rs(t,e,i)):($t&&r&&Ag(e),e.flags|=1,Vr(t,e,n,i),e.child)}function Qb(t,e,r,n,i){if(t===null){var s=r.type;return typeof s=="function"&&!Jg(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=s,v4(t,e,s,n,i)):(t=Ad(r.type,null,n,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(r=r.compare,r=r!==null?r:Mf,r(o,n)&&t.ref===e.ref)return rs(t,e,i)}return e.flags|=1,t=Ys(s,n),t.ref=e.ref,t.return=e,e.child=t}function v4(t,e,r,n,i){if(t!==null){var s=t.memoizedProps;if(Mf(s,n)&&t.ref===e.ref)if(tn=!1,e.pendingProps=n=s,(t.lanes&i)!==0)t.flags&131072&&(tn=!0);else return e.lanes=t.lanes,rs(t,e,i)}return Py(t,e,r,n,i)}function y4(t,e,r){var n=e.pendingProps,i=n.children,s=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Xe(cl,fn),fn|=r;else{if(!(r&1073741824))return t=s!==null?s.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Xe(cl,fn),fn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,Xe(cl,fn),fn|=n}else s!==null?(n=s.baseLanes|r,e.memoizedState=null):n=r,Xe(cl,fn),fn|=n;return Vr(t,e,i,r),e.child}function p4(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function Py(t,e,r,n,i){var s=sn(r)?ua:Dr.current;return s=Nl(e,s),wl(e,i),r=Lg(t,e,r,n,s,i),n=jg(),t!==null&&!tn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,rs(t,e,i)):($t&&n&&Ag(e),e.flags|=1,Vr(t,e,r,i),e.child)}function Xb(t,e,r,n,i){if(sn(r)){var s=!0;i0(e)}else s=!1;if(wl(e,i),e.stateNode===null)Ed(t,e),V3(e,r,n),_y(e,r,n,i),n=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=Mn(c):(c=sn(r)?ua:Dr.current,c=Nl(e,c));var f=r.getDerivedStateFromProps,u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==c)&&Vb(e,o,n,c),Rs=!1;var h=e.memoizedState;o.state=h,c0(e,n,o,i),l=e.memoizedState,a!==n||h!==l||nn.current||Rs?(typeof f=="function"&&(Ay(e,r,f,n),l=e.memoizedState),(a=Rs||zb(e,r,a,n,h,l,c))?(u||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=n,e.memoizedState=l),o.props=n,o.state=l,o.context=c,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,U3(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Gn(e.type,a),o.props=c,u=e.pendingProps,h=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=Mn(l):(l=sn(r)?ua:Dr.current,l=Nl(e,l));var y=r.getDerivedStateFromProps;(f=typeof y=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||h!==l)&&Vb(e,o,n,l),Rs=!1,h=e.memoizedState,o.state=h,c0(e,n,o,i);var g=e.memoizedState;a!==u||h!==g||nn.current||Rs?(typeof y=="function"&&(Ay(e,r,y,n),g=e.memoizedState),(c=Rs||zb(e,r,c,n,h,g,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,g,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,g,l)),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=n,e.memoizedState=g),o.props=n,o.state=g,o.context=l,n=c):(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),n=!1)}return Iy(t,e,r,n,s,i)}function Iy(t,e,r,n,i,s){p4(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return i&&Bb(e,r,!1),rs(t,e,s);n=e.stateNode,pT.current=e;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=Dl(e,t.child,null,s),e.child=Dl(e,null,a,s)):Vr(t,e,a,s),e.memoizedState=n.state,i&&Bb(e,r,!0),e.child}function g4(t){var e=t.stateNode;e.pendingContext?Db(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Db(t,e.context,!1),Ng(t,e.containerInfo)}function Zb(t,e,r,n,i){return $l(),Tg(i),e.flags|=256,Vr(t,e,r,n),e.child}var Ry={dehydrated:null,treeContext:null,retryLane:0};function My(t){return{baseLanes:t,cachePool:null,transitions:null}}function m4(t,e,r){var n=e.pendingProps,i=jt.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),Xe(jt,i&1),t===null)return Sy(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=n.children,t=n.fallback,s?(n=e.mode,s=e.child,o={mode:"hidden",children:o},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Sh(o,n,0,null),t=ra(t,n,r,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=My(r),e.memoizedState=Ry,t):zg(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return gT(t,e,o,n,a,i,r);if(s){s=n.fallback,o=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=Ys(i,l),n.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Ys(a,s):(s=ra(s,o,r,null),s.flags|=2),s.return=e,n.return=e,n.sibling=s,e.child=n,n=s,s=e.child,o=t.child.memoizedState,o=o===null?My(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~r,e.memoizedState=Ry,n}return s=t.child,t=s.sibling,n=Ys(s,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function zg(t,e){return e=Sh({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Hu(t,e,r,n){return n!==null&&Tg(n),Dl(e,t.child,null,r),t=zg(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function gT(t,e,r,n,i,s,o){if(r)return e.flags&256?(e.flags&=-257,n=X1(Error(se(422))),Hu(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=n.fallback,i=e.mode,n=Sh({mode:"visible",children:n.children},i,0,null),s=ra(s,i,o,null),s.flags|=2,n.return=e,s.return=e,n.sibling=s,e.child=n,e.mode&1&&Dl(e,t.child,null,o),e.child.memoizedState=My(o),e.memoizedState=Ry,s);if(!(e.mode&1))return Hu(t,e,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var a=n.dgst;return n=a,s=Error(se(419)),n=X1(s,n,void 0),Hu(t,e,o,n)}if(a=(o&t.childLanes)!==0,tn||a){if(n=gr,n!==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&(n.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,ts(t,i),ri(n,t,i,-1))}return Kg(),n=X1(Error(se(421))),Hu(t,e,o,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=IT.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,vn=qs(i.nextSibling),yn=e,$t=!0,Yn=null,t!==null&&(An[_n++]=Gi,An[_n++]=Ki,An[_n++]=da,Gi=t.id,Ki=t.overflow,da=e),e=zg(e,n.children),e.flags|=4096,e)}function e2(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),ky(t.return,e,r)}function Z1(t,e,r,n,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i)}function x4(t,e,r){var n=e.pendingProps,i=n.revealOrder,s=n.tail;if(Vr(t,e,n.children,r),n=jt.current,n&2)n=n&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&&e2(t,r,e);else if(t.tag===19)e2(t,r,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}n&=1}if(Xe(jt,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&f0(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),Z1(e,!1,i,r,s);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&f0(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}Z1(e,!0,r,null,s);break;case"together":Z1(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Ed(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function rs(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),va|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(se(153));if(e.child!==null){for(t=e.child,r=Ys(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=Ys(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function mT(t,e,r){switch(e.tag){case 3:g4(e),$l();break;case 5:q3(e);break;case 1:sn(e.type)&&i0(e);break;case 4:Ng(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;Xe(a0,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(Xe(jt,jt.current&1),e.flags|=128,null):r&e.child.childLanes?m4(t,e,r):(Xe(jt,jt.current&1),t=rs(t,e,r),t!==null?t.sibling:null);Xe(jt,jt.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return x4(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Xe(jt,jt.current),n)break;return null;case 22:case 23:return e.lanes=0,y4(t,e,r)}return rs(t,e,r)}var b4,Oy,w4,C4;b4=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Oy=function(){};w4=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,Qo(Ei.current);var s=null;switch(r){case"input":i=ty(t,i),n=ty(t,n),s=[];break;case"select":i=Ut({},i,{value:void 0}),n=Ut({},n,{value:void 0}),s=[];break;case"textarea":i=iy(t,i),n=iy(t,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=r0)}oy(r,n);var o;r=null;for(c in i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(kf.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in n){var l=n[c];if(a=i!=null?i[c]:void 0,n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(s||(s=[]),s.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(kf.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Pt("scroll",t),s||a===l||(s=[])):(s=s||[]).push(c,l))}r&&(s=s||[]).push("style",r);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};C4=function(t,e,r,n){r!==n&&(e.flags|=4)};function Ac(t,e){if(!$t)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function Pr(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function xT(t,e,r){var n=e.pendingProps;switch(_g(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pr(e),null;case 1:return sn(e.type)&&n0(),Pr(e),null;case 3:return n=e.stateNode,Bl(),Ot(nn),Ot(Dr),Dg(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(zu(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Yn!==null&&(Uy(Yn),Yn=null))),Oy(t,e),Pr(e),null;case 5:$g(e);var i=Qo(Bf.current);if(r=e.type,t!==null&&e.stateNode!=null)w4(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(se(166));return Pr(e),null}if(t=Qo(Ei.current),zu(e)){n=e.stateNode,r=e.type;var s=e.memoizedProps;switch(n[yi]=e,n[$f]=s,t=(e.mode&1)!==0,r){case"dialog":Pt("cancel",n),Pt("close",n);break;case"iframe":case"object":case"embed":Pt("load",n);break;case"video":case"audio":for(i=0;i<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[yi]=e,t[$f]=n,b4(t,e,!1,!1),e.stateNode=t;e:{switch(o=ay(r,n),r){case"dialog":Pt("cancel",t),Pt("close",t),i=n;break;case"iframe":case"object":case"embed":Pt("load",t),i=n;break;case"video":case"audio":for(i=0;ijl&&(e.flags|=128,n=!0,Ac(s,!1),e.lanes=4194304)}else{if(!n)if(t=f0(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Ac(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!$t)return Pr(e),null}else 2*Zt()-s.renderingStartTime>jl&&r!==1073741824&&(e.flags|=128,n=!0,Ac(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(r=s.last,r!==null?r.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Zt(),e.sibling=null,r=jt.current,Xe(jt,n?r&1|2:r&1),e):(Pr(e),null);case 22:case 23:return Gg(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?fn&1073741824&&(Pr(e),e.subtreeFlags&6&&(e.flags|=8192)):Pr(e),null;case 24:return null;case 25:return null}throw Error(se(156,e.tag))}function bT(t,e){switch(_g(e),e.tag){case 1:return sn(e.type)&&n0(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Bl(),Ot(nn),Ot(Dr),Dg(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return $g(e),null;case 13:if(Ot(jt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(se(340));$l()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Ot(jt),null;case 4:return Bl(),null;case 10:return Rg(e.type._context),null;case 22:case 23:return Gg(),null;case 24:return null;default:return null}}var Wu=!1,Rr=!1,wT=typeof WeakSet=="function"?WeakSet:Set,le=null;function ll(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ht(t,e,n)}else r.current=null}function Ny(t,e,r){try{r()}catch(n){Ht(t,e,n)}}var t2=!1;function CT(t,e){if(gy=Zd,t=A3(),kg(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,c=0,f=0,u=t,h=null;t:for(;;){for(var y;u!==r||i!==0&&u.nodeType!==3||(a=o+i),u!==s||n!==0&&u.nodeType!==3||(l=o+n),u.nodeType===3&&(o+=u.nodeValue.length),(y=u.firstChild)!==null;)h=u,u=y;for(;;){if(u===t)break t;if(h===r&&++c===i&&(a=o),h===s&&++f===n&&(l=o),(y=u.nextSibling)!==null)break;u=h,h=u.parentNode}u=y}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(my={focusedElem:t,selectionRange:r},Zd=!1,le=e;le!==null;)if(e=le,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,le=t;else for(;le!==null;){e=le;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var p=g.memoizedProps,k=g.memoizedState,w=e.stateNode,E=w.getSnapshotBeforeUpdate(e.elementType===e.type?p:Gn(e.type,p),k);w.__reactInternalSnapshotBeforeUpdate=E}break;case 3:var A=e.stateNode.containerInfo;A.nodeType===1?A.textContent="":A.nodeType===9&&A.documentElement&&A.removeChild(A.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(se(163))}}catch(I){Ht(e,e.return,I)}if(t=e.sibling,t!==null){t.return=e.return,le=t;break}le=e.return}return g=t2,t2=!1,g}function Zc(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&Ny(e,r,s)}i=i.next}while(i!==n)}}function Ch(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function $y(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function E4(t){var e=t.alternate;e!==null&&(t.alternate=null,E4(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[yi],delete e[$f],delete e[wy],delete e[iT],delete e[sT])),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 S4(t){return t.tag===5||t.tag===3||t.tag===4}function r2(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||S4(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 Dy(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=r0));else if(n!==4&&(t=t.child,t!==null))for(Dy(t,e,r),t=t.sibling;t!==null;)Dy(t,e,r),t=t.sibling}function By(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(By(t,e,r),t=t.sibling;t!==null;)By(t,e,r),t=t.sibling}var wr=null,Jn=!1;function Es(t,e,r){for(r=r.child;r!==null;)k4(t,e,r),r=r.sibling}function k4(t,e,r){if(Ci&&typeof Ci.onCommitFiberUnmount=="function")try{Ci.onCommitFiberUnmount(vh,r)}catch{}switch(r.tag){case 5:Rr||ll(r,e);case 6:var n=wr,i=Jn;wr=null,Es(t,e,r),wr=n,Jn=i,wr!==null&&(Jn?(t=wr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):wr.removeChild(r.stateNode));break;case 18:wr!==null&&(Jn?(t=wr,r=r.stateNode,t.nodeType===8?q1(t.parentNode,r):t.nodeType===1&&q1(t,r),If(t)):q1(wr,r.stateNode));break;case 4:n=wr,i=Jn,wr=r.stateNode.containerInfo,Jn=!0,Es(t,e,r),wr=n,Jn=i;break;case 0:case 11:case 14:case 15:if(!Rr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Ny(r,e,o),i=i.next}while(i!==n)}Es(t,e,r);break;case 1:if(!Rr&&(ll(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Ht(r,e,a)}Es(t,e,r);break;case 21:Es(t,e,r);break;case 22:r.mode&1?(Rr=(n=Rr)||r.memoizedState!==null,Es(t,e,r),Rr=n):Es(t,e,r);break;default:Es(t,e,r)}}function n2(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new wT),e.forEach(function(n){var i=RT.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function jn(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=Zt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*ST(n/1960))-n,10t?16:t,Bs===null)var n=!1;else{if(t=Bs,Bs=null,y0=0,De&6)throw Error(se(331));var i=De;for(De|=4,le=t.current;le!==null;){var s=le,o=s.child;if(le.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lZt()-Wg?ta(t,0):Hg|=r),on(t,e)}function O4(t,e){e===0&&(t.mode&1?(e=Du,Du<<=1,!(Du&130023424)&&(Du=4194304)):e=1);var r=qr();t=ts(t,e),t!==null&&(cu(t,e,r),on(t,r))}function IT(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),O4(t,r)}function RT(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(se(314))}n!==null&&n.delete(e),O4(t,r)}var N4;N4=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||nn.current)tn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return tn=!1,mT(t,e,r);tn=!!(t.flags&131072)}else tn=!1,$t&&e.flags&1048576&&B3(e,o0,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Ed(t,e),t=e.pendingProps;var i=Nl(e,Dr.current);wl(e,r),i=Lg(null,e,n,t,i,r);var s=jg();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,sn(n)?(s=!0,i0(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Og(e),i.updater=bh,e.stateNode=i,i._reactInternals=e,_y(e,n,t,r),e=Iy(null,e,n,!0,s,r)):(e.tag=0,$t&&s&&Ag(e),Vr(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Ed(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=OT(n),t=Gn(n,t),i){case 0:e=Py(null,e,n,t,r);break e;case 1:e=Xb(null,e,n,t,r);break e;case 11:e=Yb(null,e,n,t,r);break e;case 14:e=Qb(null,e,n,Gn(n.type,t),r);break e}throw Error(se(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Gn(n,i),Py(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Gn(n,i),Xb(t,e,n,i,r);case 3:e:{if(g4(e),t===null)throw Error(se(387));n=e.pendingProps,s=e.memoizedState,i=s.element,U3(t,e),c0(e,n,null,r);var o=e.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=Ll(Error(se(423)),e),e=Zb(t,e,n,r,i);break e}else if(n!==i){i=Ll(Error(se(424)),e),e=Zb(t,e,n,r,i);break e}else for(vn=qs(e.stateNode.containerInfo.firstChild),yn=e,$t=!0,Yn=null,r=W3(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if($l(),n===i){e=rs(t,e,r);break e}Vr(t,e,n,r)}e=e.child}return e;case 5:return q3(e),t===null&&Sy(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,xy(n,i)?o=null:s!==null&&xy(n,s)&&(e.flags|=32),p4(t,e),Vr(t,e,o,r),e.child;case 6:return t===null&&Sy(e),null;case 13:return m4(t,e,r);case 4:return Ng(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Dl(e,null,n,r):Vr(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Gn(n,i),Yb(t,e,n,i,r);case 7:return Vr(t,e,e.pendingProps,r),e.child;case 8:return Vr(t,e,e.pendingProps.children,r),e.child;case 12:return Vr(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,Xe(a0,n._currentValue),n._currentValue=o,s!==null)if(si(s.value,o)){if(s.children===i.children&&!nn.current){e=rs(t,e,r);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 l=a.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=Qi(-1,r&-r),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),ky(s.return,r,e),a.lanes|=r;break}l=l.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(se(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),ky(o,r,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}Vr(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,wl(e,r),i=Mn(i),n=n(i),e.flags|=1,Vr(t,e,n,r),e.child;case 14:return n=e.type,i=Gn(n,e.pendingProps),i=Gn(n.type,i),Qb(t,e,n,i,r);case 15:return v4(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Gn(n,i),Ed(t,e),e.tag=1,sn(n)?(t=!0,i0(e)):t=!1,wl(e,r),V3(e,n,i),_y(e,n,i,r),Iy(null,e,n,!0,t,r);case 19:return x4(t,e,r);case 22:return y4(t,e,r)}throw Error(se(156,e.tag))};function $4(t,e){return a3(t,e)}function MT(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pn(t,e,r,n){return new MT(t,e,r,n)}function Jg(t){return t=t.prototype,!(!t||!t.isReactComponent)}function OT(t){if(typeof t=="function")return Jg(t)?1:0;if(t!=null){if(t=t.$$typeof,t===vg)return 11;if(t===yg)return 14}return 2}function Ys(t,e){var r=t.alternate;return r===null?(r=Pn(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Ad(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")Jg(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Za:return ra(r.children,i,s,e);case hg:o=8,i|=8;break;case Qv:return t=Pn(12,r,e,i|2),t.elementType=Qv,t.lanes=s,t;case Xv:return t=Pn(13,r,e,i),t.elementType=Xv,t.lanes=s,t;case Zv:return t=Pn(19,r,e,i),t.elementType=Zv,t.lanes=s,t;case H5:return Sh(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case z5:o=10;break e;case V5:o=9;break e;case vg:o=11;break e;case yg:o=14;break e;case Is:o=16,n=null;break e}throw Error(se(130,t==null?t:typeof t,""))}return e=Pn(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function ra(t,e,r,n){return t=Pn(7,t,n,e),t.lanes=r,t}function Sh(t,e,r,n){return t=Pn(22,t,n,e),t.elementType=H5,t.lanes=r,t.stateNode={isHidden:!1},t}function ev(t,e,r){return t=Pn(6,t,null,e),t.lanes=r,t}function tv(t,e,r){return e=Pn(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function NT(t,e,r,n,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=$1(0),this.expirationTimes=$1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$1(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Yg(t,e,r,n,i,s,o,a,l){return t=new NT(t,e,r,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Pn(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Og(s),t}function $T(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(j4)}catch(t){console.error(t)}}j4(),B5.exports=bn;var xo=B5.exports;const FT=yo(xo),em=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Ph=S.createContext({});function UT(){return S.useContext(Ph).visualElement}const hu=S.createContext(null),Ih=typeof document<"u",m0=Ih?S.useLayoutEffect:S.useEffect,F4=S.createContext({strict:!1});function zT(t,e,r,n){const i=UT(),s=S.useContext(F4),o=S.useContext(hu),a=S.useContext(em).reducedMotion,l=S.useRef();n=n||s.renderer,!l.current&&n&&(l.current=n(t,{visualState:e,parent:i,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;return m0(()=>{c&&c.render()}),(window.HandoffAppearAnimations?m0:S.useEffect)(()=>{c&&c.animationState&&c.animationState.animateChanges()}),c}function fl(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function VT(t,e,r){return S.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):fl(r)&&(r.current=n))},[e])}function zf(t){return typeof t=="string"||Array.isArray(t)}function Rh(t){return typeof t=="object"&&typeof t.start=="function"}const HT=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function Mh(t){return Rh(t.animate)||HT.some(e=>zf(t[e]))}function U4(t){return!!(Mh(t)||t.variants)}function WT(t,e){if(Mh(t)){const{initial:r,animate:n}=t;return{initial:r===!1||zf(r)?r:void 0,animate:zf(n)?n:void 0}}return t.inherit!==!1?e:{}}function qT(t){const{initial:e,animate:r}=WT(t,S.useContext(Ph));return S.useMemo(()=>({initial:e,animate:r}),[u2(e),u2(r)])}function u2(t){return Array.isArray(t)?t.join(" "):t}const Bi=t=>({isEnabled:e=>t.some(r=>!!e[r])}),Vf={measureLayout:Bi(["layout","layoutId","drag"]),animation:Bi(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Bi(["exit"]),drag:Bi(["drag","dragControls"]),focus:Bi(["whileFocus"]),hover:Bi(["whileHover","onHoverStart","onHoverEnd"]),tap:Bi(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Bi(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Bi(["whileInView","onViewportEnter","onViewportLeave"])};function GT(t){for(const e in t)e==="projectionNodeConstructor"?Vf.projectionNodeConstructor=t[e]:Vf[e].Component=t[e]}function Oh(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const rf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let KT=1;function JT(){return Oh(()=>{if(rf.hasEverUpdated)return KT++})}const tm=S.createContext({});class YT extends lr.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}}const z4=S.createContext({}),QT=Symbol.for("motionComponentSymbol");function XT({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:i,Component:s}){t&>(t);function o(l,c){const f={...S.useContext(em),...l,layoutId:ZT(l)},{isStatic:u}=f;let h=null;const y=qT(l),g=u?void 0:JT(),p=i(l,u);if(!u&&Ih){y.visualElement=zT(s,p,f,e);const k=S.useContext(F4).strict,w=S.useContext(z4);y.visualElement&&(h=y.visualElement.loadFeatures(f,k,t,g,r||Vf.projectionNodeConstructor,w))}return S.createElement(YT,{visualElement:y.visualElement,props:f},h,S.createElement(Ph.Provider,{value:y},n(s,l,g,VT(p,y.visualElement,c),p,u,y.visualElement)))}const a=S.forwardRef(o);return a[QT]=s,a}function ZT({layoutId:t}){const e=S.useContext(tm).id;return e&&t!==void 0?e+"-"+t:t}function eP(t){function e(n,i={}){return XT(t(n,i))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,i)=>(r.has(i)||r.set(i,e(i)),r.get(i))})}const tP=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function rm(t){return typeof t!="string"||t.includes("-")?!1:!!(tP.indexOf(t)>-1||/[A-Z]/.test(t))}const x0={};function rP(t){Object.assign(x0,t)}const b0=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ic=new Set(b0);function V4(t,{layout:e,layoutId:r}){return ic.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!x0[t]||t==="opacity")}const an=t=>!!(t!=null&&t.getVelocity),nP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},iP=(t,e)=>b0.indexOf(t)-b0.indexOf(e);function sP({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},i,s){let o="";e.sort(iP);for(const a of e)o+=`${nP[a]||a}(${t[a]}) `;return r&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,i?"":o):n&&i&&(o="none"),o}function H4(t){return t.startsWith("--")}const oP=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Fl=(t,e,r)=>Math.min(Math.max(r,t),e),_a={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},nf={..._a,transform:t=>Fl(0,1,t)},Ku={..._a,default:1},sf=t=>Math.round(t*1e5)/1e5,Hf=/(-)?([\d]*\.?[\d])+/g,zy=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,aP=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function vu(t){return typeof t=="string"}const yu=t=>({test:e=>vu(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ts=yu("deg"),Si=yu("%"),ge=yu("px"),lP=yu("vh"),cP=yu("vw"),d2={...Si,parse:t=>Si.parse(t)/100,transform:t=>Si.transform(t*100)},h2={..._a,transform:Math.round},W4={borderWidth:ge,borderTopWidth:ge,borderRightWidth:ge,borderBottomWidth:ge,borderLeftWidth:ge,borderRadius:ge,radius:ge,borderTopLeftRadius:ge,borderTopRightRadius:ge,borderBottomRightRadius:ge,borderBottomLeftRadius:ge,width:ge,maxWidth:ge,height:ge,maxHeight:ge,size:ge,top:ge,right:ge,bottom:ge,left:ge,padding:ge,paddingTop:ge,paddingRight:ge,paddingBottom:ge,paddingLeft:ge,margin:ge,marginTop:ge,marginRight:ge,marginBottom:ge,marginLeft:ge,rotate:Ts,rotateX:Ts,rotateY:Ts,rotateZ:Ts,scale:Ku,scaleX:Ku,scaleY:Ku,scaleZ:Ku,skew:Ts,skewX:Ts,skewY:Ts,distance:ge,translateX:ge,translateY:ge,translateZ:ge,x:ge,y:ge,z:ge,perspective:ge,transformPerspective:ge,opacity:nf,originX:d2,originY:d2,originZ:ge,zIndex:h2,fillOpacity:nf,strokeOpacity:nf,numOctaves:h2};function nm(t,e,r,n){const{style:i,vars:s,transform:o,transformKeys:a,transformOrigin:l}=t;a.length=0;let c=!1,f=!1,u=!0;for(const h in e){const y=e[h];if(H4(h)){s[h]=y;continue}const g=W4[h],p=oP(y,g);if(ic.has(h)){if(c=!0,o[h]=p,a.push(h),!u)continue;y!==(g.default||0)&&(u=!1)}else h.startsWith("origin")?(f=!0,l[h]=p):i[h]=p}if(e.transform||(c||n?i.transform=sP(t,r,u,n):i.transform&&(i.transform="none")),f){const{originX:h="50%",originY:y="50%",originZ:g=0}=l;i.transformOrigin=`${h} ${y} ${g}`}}const im=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function q4(t,e,r){for(const n in e)!an(e[n])&&!V4(n,r)&&(t[n]=e[n])}function fP({transformTemplate:t},e,r){return S.useMemo(()=>{const n=im();return nm(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function uP(t,e,r){const n=t.style||{},i={};return q4(i,n,t),Object.assign(i,fP(t,e,r)),t.transformValues?t.transformValues(i):i}function dP(t,e,r){const n={},i=uP(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const hP=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","viewport"]);function w0(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||hP.has(t)}let G4=t=>!w0(t);function vP(t){t&&(G4=e=>e.startsWith("on")?!w0(e):t(e))}try{vP(require("@emotion/is-prop-valid").default)}catch{}function yP(t,e,r){const n={};for(const i in t)i==="values"&&typeof t.values=="object"||(G4(i)||r===!0&&w0(i)||!e&&!w0(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}function v2(t,e,r){return typeof t=="string"?t:ge.transform(e+r*t)}function pP(t,e,r){const n=v2(e,t.x,t.width),i=v2(r,t.y,t.height);return`${n} ${i}`}const gP={offset:"stroke-dashoffset",array:"stroke-dasharray"},mP={offset:"strokeDashoffset",array:"strokeDasharray"};function xP(t,e,r=1,n=0,i=!0){t.pathLength=1;const s=i?gP:mP;t[s.offset]=ge.transform(-n);const o=ge.transform(e),a=ge.transform(r);t[s.array]=`${o} ${a}`}function sm(t,{attrX:e,attrY:r,originX:n,originY:i,pathLength:s,pathSpacing:o=1,pathOffset:a=0,...l},c,f,u){if(nm(t,l,c,u),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:y,dimensions:g}=t;h.transform&&(g&&(y.transform=h.transform),delete h.transform),g&&(n!==void 0||i!==void 0||y.transform)&&(y.transformOrigin=pP(g,n!==void 0?n:.5,i!==void 0?i:.5)),e!==void 0&&(h.x=e),r!==void 0&&(h.y=r),s!==void 0&&xP(h,s,o,a,!1)}const K4=()=>({...im(),attrs:{}}),om=t=>typeof t=="string"&&t.toLowerCase()==="svg";function bP(t,e,r,n){const i=S.useMemo(()=>{const s=K4();return sm(s,e,{enableHardwareAcceleration:!1},om(n),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};q4(s,t.style,t),i.style={...s,...i.style}}return i}function wP(t=!1){return(r,n,i,s,{latestValues:o},a)=>{const c=(rm(r)?bP:dP)(n,o,a,r),u={...yP(n,typeof r=="string",t),...c,ref:s},{children:h}=n,y=S.useMemo(()=>an(h)?h.get():h,[h]);return i&&(u["data-projection-id"]=i),S.createElement(r,{...u,children:y})}}const am=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function J4(t,{style:e,vars:r},n,i){Object.assign(t.style,e,i&&i.getProjectionStyles(n));for(const s in r)t.style.setProperty(s,r[s])}const Y4=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Q4(t,e,r,n){J4(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(Y4.has(i)?i:am(i),e.attrs[i])}function lm(t,e){const{style:r}=t,n={};for(const i in r)(an(r[i])||e.style&&an(e.style[i])||V4(i,t))&&(n[i]=r[i]);return n}function X4(t,e){const r=lm(t,e);for(const n in t)if(an(t[n])||an(e[n])){const i=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[i]=t[n]}return r}function cm(t,e,r,n={},i={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),e}const C0=t=>Array.isArray(t),CP=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),EP=t=>C0(t)?t[t.length-1]||0:t;function _d(t){const e=an(t)?t.get():t;return CP(e)?e.toValue():e}function SP({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,i,s){const o={latestValues:kP(n,i,s,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const Z4=t=>(e,r)=>{const n=S.useContext(Ph),i=S.useContext(hu),s=()=>SP(t,e,n,i);return r?s():Oh(s)};function kP(t,e,r,n){const i={},s=n(t,{});for(const h in s)i[h]=_d(s[h]);let{initial:o,animate:a}=t;const l=Mh(t),c=U4(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let f=r?r.initial===!1:!1;f=f||o===!1;const u=f?a:o;return u&&typeof u!="boolean"&&!Rh(u)&&(Array.isArray(u)?u:[u]).forEach(y=>{const g=cm(t,y);if(!g)return;const{transitionEnd:p,transition:k,...w}=g;for(const E in w){let A=w[E];if(Array.isArray(A)){const I=f?A.length-1:0;A=A[I]}A!==null&&(i[E]=A)}for(const E in p)i[E]=p[E]}),i}const AP={useVisualState:Z4({scrapeMotionValuesFromProps:X4,createRenderState:K4,onMount:(t,e,{renderState:r,latestValues:n})=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}sm(r,n,{enableHardwareAcceleration:!1},om(e.tagName),t.transformTemplate),Q4(e,r)}})},_P={useVisualState:Z4({scrapeMotionValuesFromProps:lm,createRenderState:im})};function TP(t,{forwardMotionProps:e=!1},r,n,i){return{...rm(t)?AP:_P,preloadedFeatures:r,useRender:wP(e),createVisualElement:n,projectionNodeConstructor:i,Component:t}}var Qe;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(Qe||(Qe={}));function na(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function E0(t,e,r,n){S.useEffect(()=>{const i=t.current;if(r&&i)return na(i,e,r,n)},[t,e,r,n])}function PP({whileFocus:t,visualElement:e}){const r=S.useRef(!1),{animationState:n}=e,i=S.useCallback(()=>{let o=!1;try{o=e.current.matches(":focus-visible")}catch{o=!0}!o||!n||(n.setActive(Qe.Focus,!0),r.current=!0)},[n]),s=S.useCallback(()=>{!r.current||!n||(n.setActive(Qe.Focus,!1),r.current=!1)},[n]);E0(e,"focus",t?i:void 0),E0(e,"blur",t?s:void 0)}const e8=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Nh(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const t8=t=>e=>e8(e)&&t(e,Nh(e));function El(t,e,r,n){return na(t,e,t8(r),n)}function S0(t,e,r,n){return E0(t,e,r&&t8(r),n)}function r8(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const y2=r8("dragHorizontal"),p2=r8("dragVertical");function n8(t){let e=!1;if(t==="y")e=p2();else if(t==="x")e=y2();else{const r=y2(),n=p2();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function i8(){const t=n8(!0);return t?(t(),!1):!0}function g2(t,e,r,n){return(i,s)=>{i.type==="touch"||i8()||(r&&t.animationState&&t.animationState.setActive(Qe.Hover,e),n&&n(i,s))}}function IP({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){S0(n,"pointerenter",S.useMemo(()=>t||r?g2(n,!0,!!r,t):void 0,[t,!!r,n]),{passive:!t}),S0(n,"pointerleave",S.useMemo(()=>e||r?g2(n,!1,!!r,e):void 0,[t,!!r,n]),{passive:!e})}const s8=(t,e)=>e?t===e?!0:s8(t,e.parentElement):!1;function fm(t){return S.useEffect(()=>()=>t(),[])}const RP=(t,e)=>r=>e(t(r)),$h=(...t)=>t.reduce(RP);function rv(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,Nh(r))}function MP({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:i,...s}){const o=t||e||r||n,a=S.useRef(!1),l=S.useRef(null),c={passive:!(e||t||r||s.onPointerDown)};function f(){l.current&&l.current(),l.current=null}function u(){return f(),a.current=!1,i.getProps().whileTap&&i.animationState&&i.animationState.setActive(Qe.Tap,!1),!i8()}function h(E,A){var I,M,j,z;u()&&(s8(i.current,E.target)?(z=(j=i.getProps()).onTap)===null||z===void 0||z.call(j,E,A):(M=(I=i.getProps()).onTapCancel)===null||M===void 0||M.call(I,E,A))}function y(E,A){var I,M;u()&&((M=(I=i.getProps()).onTapCancel)===null||M===void 0||M.call(I,E,A))}function g(E,A){var I;const M=i.getProps();M.whileTap&&i.animationState&&i.animationState.setActive(Qe.Tap,!0),(I=M.onTapStart)===null||I===void 0||I.call(M,E,A)}const p=[!!e,!!t,!!n,i],k=S.useCallback((E,A)=>{f(),!a.current&&(a.current=!0,l.current=$h(El(window,"pointerup",h,c),El(window,"pointercancel",y,c)),g(E,A))},p);S0(i,"pointerdown",o?k:void 0,c);const w=S.useCallback(()=>{const E=na(i.current,"keydown",I=>{I.key!=="Enter"||a.current||(a.current=!0,l.current=na(i.current,"keyup",()=>{I.key!=="Enter"||!u()||rv("up",i.getProps().onTap)},c),rv("down",g))}),A=na(i.current,"blur",()=>{E(),A(),a.current&&rv("cancel",y)})},p);E0(i,"focus",o?w:void 0),fm(f)}const Vy=new WeakMap,nv=new WeakMap,OP=t=>{const e=Vy.get(t.target);e&&e(t)},NP=t=>{t.forEach(OP)};function $P({root:t,...e}){const r=t||document;nv.has(r)||nv.set(r,{});const n=nv.get(r),i=JSON.stringify(e);return n[i]||(n[i]=new IntersectionObserver(NP,{root:t,...e})),n[i]}function DP(t,e,r){const n=$P(e);return Vy.set(t,r),n.observe(t),()=>{Vy.delete(t),n.unobserve(t)}}function BP({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:i={}}){const s=S.useRef({hasEnteredView:!1,isInView:!1});let o=!!(e||r||n);i.once&&s.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?FP:jP)(o,s.current,t,i)}const LP={some:0,all:1};function jP(t,e,r,{root:n,margin:i,amount:s="some",once:o}){S.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:i,threshold:typeof s=="number"?s:LP[s]},l=c=>{const{isIntersecting:f}=c;if(e.isInView===f||(e.isInView=f,o&&!f&&e.hasEnteredView))return;f&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(Qe.InView,f);const u=r.getProps(),h=f?u.onViewportEnter:u.onViewportLeave;h&&h(c)};return DP(r.current,a,l)},[t,n,i,s])}function FP(t,e,r,{fallback:n=!0}){S.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:i}=r.getProps();i&&i(null),r.animationState&&r.animationState.setActive(Qe.InView,!0)})},[t])}const Ls=t=>e=>(t(e),null),UP={inView:Ls(BP),tap:Ls(MP),focus:Ls(PP),hover:Ls(IP)};function o8(){const t=S.useContext(hu);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,i=S.useId();return S.useEffect(()=>n(i),[]),!e&&r?[!1,()=>r&&r(i)]:[!0]}function a8(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let n=0;n/^\-?\d*\.?\d+$/.test(t),VP=t=>/^0[^.\s]+$/.test(t),Xi={delta:0,timestamp:0},l8=1/60*1e3,HP=typeof performance<"u"?()=>performance.now():()=>Date.now(),c8=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(HP()),l8);function WP(t){let e=[],r=[],n=0,i=!1,s=!1;const o=new WeakSet,a={schedule:(l,c=!1,f=!1)=>{const u=f&&i,h=u?e:r;return c&&o.add(l),h.indexOf(l)===-1&&(h.push(l),u&&i&&(n=e.length)),l},cancel:l=>{const c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let c=0;c(t[e]=WP(()=>Wf=!0),t),{}),Nr=pu.reduce((t,e)=>{const r=Dh[e];return t[e]=(n,i=!1,s=!1)=>(Wf||KP(),r.schedule(n,i,s)),t},{}),so=pu.reduce((t,e)=>(t[e]=Dh[e].cancel,t),{}),iv=pu.reduce((t,e)=>(t[e]=()=>Dh[e].process(Xi),t),{}),GP=t=>Dh[t].process(Xi),f8=t=>{Wf=!1,Xi.delta=Hy?l8:Math.max(Math.min(t-Xi.timestamp,qP),1),Xi.timestamp=t,Wy=!0,pu.forEach(GP),Wy=!1,Wf&&(Hy=!1,c8(f8))},KP=()=>{Wf=!0,Hy=!0,Wy||c8(f8)};function um(t,e){t.indexOf(e)===-1&&t.push(e)}function dm(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class hm{constructor(){this.subscriptions=[]}add(e){return um(this.subscriptions,e),()=>dm(this.subscriptions,e)}notify(e,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,r,n);else for(let s=0;s!isNaN(parseFloat(t));class YP{constructor(e,r={}){this.version="9.0.1",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,i=!0)=>{this.prev=this.current,this.current=n;const{delta:s,timestamp:o}=Xi;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,Nr.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Nr.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=JP(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new hm);const n=this.events[e].add(r);return e==="change"?()=>{n(),Nr.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e,r=!0){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,r,n){this.set(r),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?vm(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ul(t,e){return new YP(t,e)}const ym=(t,e)=>r=>!!(vu(r)&&aP.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),u8=(t,e,r)=>n=>{if(!vu(n))return n;const[i,s,o,a]=n.match(Hf);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},QP=t=>Fl(0,255,t),sv={..._a,transform:t=>Math.round(QP(t))},Xo={test:ym("rgb","red"),parse:u8("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+sv.transform(t)+", "+sv.transform(e)+", "+sv.transform(r)+", "+sf(nf.transform(n))+")"};function XP(t){let e="",r="",n="",i="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const qy={test:ym("#"),parse:XP,transform:Xo.transform},ul={test:ym("hsl","hue"),parse:u8("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+Si.transform(sf(e))+", "+Si.transform(sf(r))+", "+sf(nf.transform(n))+")"},zr={test:t=>Xo.test(t)||qy.test(t)||ul.test(t),parse:t=>Xo.test(t)?Xo.parse(t):ul.test(t)?ul.parse(t):qy.parse(t),transform:t=>vu(t)?t:t.hasOwnProperty("red")?Xo.transform(t):ul.transform(t)},d8="${c}",h8="${n}";function ZP(t){var e,r;return isNaN(t)&&vu(t)&&(((e=t.match(Hf))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(zy))===null||r===void 0?void 0:r.length)||0)>0}function k0(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const i=t.match(zy);i&&(r=i.length,t=t.replace(zy,d8),e.push(...i.map(zr.parse)));const s=t.match(Hf);return s&&(n=s.length,t=t.replace(Hf,h8),e.push(...s.map(_a.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function v8(t){return k0(t).values}function y8(t){const{values:e,numColors:r,tokenised:n}=k0(t),i=e.length;return s=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function tI(t){const e=v8(t);return y8(t)(e.map(eI))}const oo={test:ZP,parse:v8,createTransformer:y8,getAnimatableNone:tI},rI=new Set(["brightness","contrast","saturate","opacity"]);function nI(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(Hf)||[];if(!n)return t;const i=r.replace(n,"");let s=rI.has(e)?1:0;return n!==r&&(s*=100),e+"("+s+i+")"}const iI=/([a-z-]*)\(.*?\)/g,Gy={...oo,getAnimatableNone:t=>{const e=t.match(iI);return e?e.map(nI).join(" "):t}},sI={...W4,color:zr,backgroundColor:zr,outlineColor:zr,fill:zr,stroke:zr,borderColor:zr,borderTopColor:zr,borderRightColor:zr,borderBottomColor:zr,borderLeftColor:zr,filter:Gy,WebkitFilter:Gy},pm=t=>sI[t];function gm(t,e){var r;let n=pm(t);return n!==Gy&&(n=oo),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const p8=t=>e=>e.test(t),oI={test:t=>t==="auto",parse:t=>t},g8=[_a,ge,Si,Ts,cP,lP,oI],Tc=t=>g8.find(p8(t)),aI=[...g8,zr,oo],lI=t=>aI.find(p8(t));function cI(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function fI(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function Bh(t,e,r){const n=t.getProps();return cm(n,e,r!==void 0?r:n.custom,cI(t),fI(t))}function uI(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Ul(r))}function dI(t,e){const r=Bh(t,e);let{transitionEnd:n={},transition:i={},...s}=r?t.makeTargetAnimatable(r,!1):{};s={...s,...n};for(const o in s){const a=EP(s[o]);uI(t,o,a)}}function hI(t,e,r){var n,i;const s=Object.keys(e).filter(a=>!t.hasValue(a)),o=s.length;if(o)for(let a=0;at*1e3,mI={current:!1},mm=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,xm=t=>e=>1-t(1-e),bm=t=>t*t,xI=xm(bm),wm=mm(bm),Kt=(t,e,r)=>-r*t+r*e+t;function ov(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function bI({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,s=0,o=0;if(!e)i=s=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;i=ov(l,a,t+1/3),s=ov(l,a,t),o=ov(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}const av=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},wI=[qy,Xo,ul],CI=t=>wI.find(e=>e.test(t));function m2(t){const e=CI(t);let r=e.parse(t);return e===ul&&(r=bI(r)),r}const m8=(t,e)=>{const r=m2(t),n=m2(e),i={...r};return s=>(i.red=av(r.red,n.red,s),i.green=av(r.green,n.green,s),i.blue=av(r.blue,n.blue,s),i.alpha=Kt(r.alpha,n.alpha,s),Xo.transform(i))};function x8(t,e){return typeof t=="number"?r=>Kt(t,e,r):zr.test(t)?m8(t,e):w8(t,e)}const b8=(t,e)=>{const r=[...t],n=r.length,i=t.map((s,o)=>x8(s,e[o]));return s=>{for(let o=0;o{const r={...t,...e},n={};for(const i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=x8(t[i],e[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}},w8=(t,e)=>{const r=oo.createTransformer(e),n=k0(t),i=k0(e);return n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?$h(b8(n.values,i.values),r):o=>`${o>0?e:t}`},T0=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},x2=(t,e)=>r=>Kt(t,e,r);function SI(t){return typeof t=="number"?x2:typeof t=="string"?zr.test(t)?m8:w8:Array.isArray(t)?b8:typeof t=="object"?EI:x2}function kI(t,e,r){const n=[],i=r||SI(t[0]),s=t.length-1;for(let o=0;ot[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=kI(e,n,i),a=o.length,l=c=>{let f=0;if(a>1)for(;fl(Fl(t[0],t[s-1],c)):l}const Cm=t=>t,E8=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,AI=1e-7,_I=12;function TI(t,e,r,n,i){let s,o,a=0;do o=e+(r-e)/2,s=E8(o,n,i)-t,s>0?r=o:e=o;while(Math.abs(s)>AI&&++a<_I);return o}function S8(t,e,r,n){if(t===e&&r===n)return Cm;const i=s=>TI(s,0,1,t,r);return s=>s===0||s===1?s:E8(i(s),e,n)}const k8=t=>1-Math.sin(Math.acos(t)),Em=xm(k8),PI=mm(Em),A8=S8(.33,1.53,.69,.99),Sm=xm(A8),II=mm(Sm),RI=t=>(t*=2)<1?.5*Sm(t):.5*(2-Math.pow(2,-10*(t-1))),MI={linear:Cm,easeIn:bm,easeInOut:wm,easeOut:xI,circIn:k8,circInOut:PI,circOut:Em,backIn:Sm,backInOut:II,backOut:A8,anticipate:RI},b2=t=>{if(Array.isArray(t)){_0(t.length===4);const[e,r,n,i]=t;return S8(e,r,n,i)}else if(typeof t=="string")return MI[t];return t},OI=t=>Array.isArray(t)&&typeof t[0]!="number";function NI(t,e){return t.map(()=>e||wm).splice(0,t.length-1)}function $I(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function DI(t,e){return t.map(r=>r*e)}function Ky({keyframes:t,ease:e=wm,times:r,duration:n=300}){t=[...t];const i=OI(e)?e.map(b2):b2(e),s={done:!1,value:t[0]},o=DI(r&&r.length===t.length?r:$I(t),n);function a(){return C8(o,t,{ease:Array.isArray(i)?i:NI(t,i)})}let l=a();return{next:c=>(s.value=l(c),s.done=c>=n,s),flipTarget:()=>{t.reverse(),l=a()}}}const lv=.001,BI=.01,LI=10,jI=.05,FI=1;function UI({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s,o=1-e;o=Fl(jI,FI,o),t=Fl(BI,LI,t/1e3),o<1?(i=c=>{const f=c*o,u=f*t,h=f-r,y=Jy(c,o),g=Math.exp(-u);return lv-h/y*g},s=c=>{const u=c*o*t,h=u*r+r,y=Math.pow(o,2)*Math.pow(c,2)*t,g=Math.exp(-u),p=Jy(Math.pow(c,2),o);return(-i(c)+lv>0?-1:1)*((h-y)*g)/p}):(i=c=>{const f=Math.exp(-c*t),u=(c-r)*t+1;return-lv+f*u},s=c=>{const f=Math.exp(-c*t),u=(r-c)*(t*t);return f*u});const a=5/t,l=VI(i,s,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}const zI=12;function VI(t,e,r){let n=r;for(let i=1;it[r]!==void 0)}function qI(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!w2(t,WI)&&w2(t,HI)){const r=UI(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const GI=5;function _8({keyframes:t,restDelta:e,restSpeed:r,...n}){let i=t[0],s=t[t.length-1];const o={done:!1,value:i},{stiffness:a,damping:l,mass:c,velocity:f,duration:u,isResolvedFromDuration:h}=qI(n);let y=KI,g=f?-(f/1e3):0;const p=l/(2*Math.sqrt(a*c));function k(){const w=s-i,E=Math.sqrt(a/c)/1e3,A=Math.abs(w)<5;if(r||(r=A?.01:2),e||(e=A?.005:.5),p<1){const I=Jy(E,p);y=M=>{const j=Math.exp(-p*E*M);return s-j*((g+p*E*w)/I*Math.sin(I*M)+w*Math.cos(I*M))}}else if(p===1)y=I=>s-Math.exp(-E*I)*(w+(g+E*w)*I);else{const I=E*Math.sqrt(p*p-1);y=M=>{const j=Math.exp(-p*E*M),z=Math.min(I*M,300);return s-j*((g+p*E*w)*Math.sinh(z)+I*w*Math.cosh(z))/I}}}return k(),{next:w=>{const E=y(w);if(h)o.done=w>=u;else{let A=g;if(w!==0)if(p<1){const j=Math.max(0,w-GI);A=vm(E-y(j),w-j)}else A=0;const I=Math.abs(A)<=r,M=Math.abs(s-E)<=e;o.done=I&&M}return o.value=o.done?s:E,o},flipTarget:()=>{g=-g,[i,s]=[s,i],k()}}}_8.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const KI=t=>0;function JI({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){const o=t[0],a={done:!1,value:o};let l=r*e;const c=o+l,f=s===void 0?c:s(c);return f!==c&&(l=f-o),{next:u=>{const h=-l*Math.exp(-u/n);return a.done=!(h>i||h<-i),a.value=a.done?f:f+h,a},flipTarget:()=>{}}}const YI={decay:JI,keyframes:Ky,tween:Ky,spring:_8};function T8(t,e,r=0){return t-e-r}function QI(t,e=0,r=0,n=!0){return n?T8(e+-t,e,r):e-(t-e)+r}function XI(t,e,r,n){return n?t>=e+r:t<=-r}const ZI=t=>{const e=({delta:r})=>t(r);return{start:()=>Nr.update(e,!0),stop:()=>so.update(e)}};function P0({duration:t,driver:e=ZI,elapsed:r=0,repeat:n=0,repeatType:i="loop",repeatDelay:s=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:c,onComplete:f,onRepeat:u,onUpdate:h,type:y="keyframes",...g}){var p,k;const w=r;let E,A=0,I=t,M=!1,j=!0,z;const F=YI[o.length>2?"keyframes":y]||Ky,q=o[0],G=o[o.length-1];let Z={done:!1,value:q};!((k=(p=F).needsInterpolation)===null||k===void 0)&&k.call(p,q,G)&&(z=C8([0,100],[q,G],{clamp:!1}),o=[0,100]);const oe=F({...g,duration:t,keyframes:o});function D(){A++,i==="reverse"?(j=A%2===0,r=QI(r,I,s,j)):(r=T8(r,I,s),i==="mirror"&&oe.flipTarget()),M=!1,u&&u()}function v(){E&&E.stop(),f&&f()}function C(O){j||(O=-O),r+=O,M||(Z=oe.next(Math.max(0,r)),z&&(Z.value=z(Z.value)),M=j?Z.done:r<=0),h&&h(Z.value),M&&(A===0&&(I=I!==void 0?I:r),A{c&&c(),E&&E.stop()},set currentTime(O){r=w,C(O)},sample:O=>{r=w;const x=t&&typeof t=="number"?Math.max(t*.5,50):50;let T=0;for(C(0);T<=O;){const R=O-T;C(Math.min(R,x)),T+=x}return Z}}}function eR(t){return!t||Array.isArray(t)||typeof t=="string"&&P8[t]}const Hc=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,P8={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Hc([0,.65,.55,1]),circOut:Hc([.55,0,1,.45]),backIn:Hc([.31,.01,.66,-.59]),backOut:Hc([.33,1.53,.69,.99])};function tR(t){if(t)return Array.isArray(t)?Hc(t):P8[t]}function rR(t,e,r,{delay:n=0,duration:i,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){return t.animate({[e]:r,offset:l},{delay:n,duration:i,easing:tR(a),fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const C2={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},cv={},I8={};for(const t in C2)I8[t]=()=>(cv[t]===void 0&&(cv[t]=C2[t]()),cv[t]);function nR(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const iR=new Set(["opacity"]),Ju=10;function sR(t,e,{onUpdate:r,onComplete:n,...i}){if(!(I8.waapi()&&iR.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:c}=i;if(i.type==="spring"||!eR(i.ease)){if(i.repeat===1/0)return;const u=P0({...i,elapsed:0});let h={done:!1,value:o[0]};const y=[];let g=0;for(;!h.done&&g<2e4;)h=u.sample(g),y.push(h.value),g+=Ju;o=y,a=g-Ju,c="linear"}const f=rR(t.owner.current,e,o,{...i,delay:-l,duration:a,ease:c});return f.onfinish=()=>{t.set(nR(o,i)),Nr.update(()=>f.cancel()),n&&n()},{get currentTime(){return f.currentTime||0},set currentTime(u){f.currentTime=u},stop:()=>{const{currentTime:u}=f;if(u){const h=P0({...i,autoplay:!1});t.setWithVelocity(h.sample(u-Ju).value,h.sample(u).value,Ju)}Nr.update(()=>f.cancel())}}}function R8(t,e){const r=performance.now(),n=({timestamp:i})=>{const s=i-r;s>=e&&(so.read(n),t(s-e))};return Nr.read(n,!0),()=>so.read(n)}function oR({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const i=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:R8(i,-e)}:i()}function aR({keyframes:t,velocity:e=0,min:r,max:n,power:i=.8,timeConstant:s=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:f,onUpdate:u,onComplete:h,onStop:y}){const g=t[0];let p;function k(I){return r!==void 0&&In}function w(I){return r===void 0?n:n===void 0||Math.abs(r-I){var j;u==null||u(M),(j=I.onUpdate)===null||j===void 0||j.call(I,M)},onComplete:h,onStop:y})}function A(I){E({type:"spring",stiffness:o,damping:a,restDelta:l,...I})}if(k(g))A({velocity:e,keyframes:[g,w(g)]});else{let I=i*e+g;typeof c<"u"&&(I=c(I));const M=w(I),j=M===r?-1:1;let z,F;const q=G=>{z=F,F=G,e=vm(G-z,Xi.delta),(j===1&&G>M||j===-1&&Gp==null?void 0:p.stop()}}const Lo=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Yu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),fv=()=>({type:"keyframes",ease:"linear",duration:.3}),lR={type:"keyframes",duration:.8},E2={x:Lo,y:Lo,z:Lo,rotate:Lo,rotateX:Lo,rotateY:Lo,rotateZ:Lo,scaleX:Yu,scaleY:Yu,scale:Yu,opacity:fv,backgroundColor:fv,color:fv,default:Yu},cR=(t,{keyframes:e})=>e.length>2?lR:(E2[t]||E2.default)(e[1]),Yy=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&oo.test(e)&&!e.startsWith("url("));function fR({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...f}){return!!Object.keys(f).length}function S2(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function k2(t){return typeof t=="number"?0:gm("",t)}function M8(t,e){return t[e]||t.default||t}function uR(t,e,r,n){const i=Yy(e,r);let s=n.from!==void 0?n.from:t.get();return s==="none"&&i&&typeof r=="string"?s=gm(e,r):S2(s)&&typeof r=="string"?s=k2(r):!Array.isArray(r)&&S2(r)&&typeof s=="string"&&(r=k2(s)),Array.isArray(r)?(r[0]===null&&(r[0]=s),r):[s,r]}const km=(t,e,r,n={})=>i=>{const s=M8(n,t)||{},o=s.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Td(o);const l=uR(e,t,r,s),c=l[0],f=l[l.length-1],u=Yy(t,c),h=Yy(t,f);let y={keyframes:l,velocity:e.getVelocity(),...s,elapsed:a,onUpdate:k=>{e.set(k),s.onUpdate&&s.onUpdate(k)},onComplete:()=>{i(),s.onComplete&&s.onComplete()}};if(!u||!h||mI.current||s.type===!1)return oR(y);if(s.type==="inertia")return aR(y);fR(s)||(y={...y,...cR(t,y)}),y.duration&&(y.duration=Td(y.duration)),y.repeatDelay&&(y.repeatDelay=Td(y.repeatDelay));const g=e.owner,p=g&&g.current;if(g&&p instanceof HTMLElement&&!(g!=null&&g.getProps().onUpdate)){const k=sR(e,t,y);if(k)return k}return P0(y)};function dR(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const i=e.map(s=>Qy(t,s,r));n=Promise.all(i)}else if(typeof e=="string")n=Qy(t,e,r);else{const i=typeof e=="function"?Bh(t,e,r.custom):e;n=O8(t,i,r)}return n.then(()=>t.notify("AnimationComplete",e))}function Qy(t,e,r={}){var n;const i=Bh(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(s=r.transitionOverride);const o=i?()=>O8(t,i,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:h}=s;return hR(t,e,f+c,u,h,r)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,f]=l==="beforeChildren"?[o,a]:[a,o];return c().then(f)}else return Promise.all([o(),a(r.delay)])}function O8(t,e,{delay:r=0,transitionOverride:n,type:i}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");n&&(o=n);const f=[],u=i&&((s=t.animationState)===null||s===void 0?void 0:s.getState()[i]);for(const h in l){const y=t.getValue(h),g=l[h];if(!y||g===void 0||u&&yR(u,h))continue;const p={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!y.hasAnimated){const w=t.getProps()[gI];w&&(p.elapsed=window.HandoffAppearAnimations(w,h,y,Nr))}let k=y.start(km(h,y,g,t.shouldReduceMotion&&ic.has(h)?{type:!1}:p));A0(c)&&(c.add(h),k=k.then(()=>c.remove(h))),f.push(k)}return Promise.all(f).then(()=>{a&&dI(t,a)})}function hR(t,e,r=0,n=0,i=1,s){const o=[],a=(t.variantChildren.size-1)*n,l=i===1?(c=0)=>c*n:(c=0)=>a-c*n;return Array.from(t.variantChildren).sort(vR).forEach((c,f)=>{c.notify("AnimationStart",e),o.push(Qy(c,e,{...s,delay:r+l(f)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function vR(t,e){return t.sortNodePosition(e)}function yR({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const Am=[Qe.Animate,Qe.InView,Qe.Focus,Qe.Hover,Qe.Tap,Qe.Drag,Qe.Exit],pR=[...Am].reverse(),gR=Am.length;function mR(t){return e=>Promise.all(e.map(({animation:r,options:n})=>dR(t,r,n)))}function xR(t){let e=mR(t);const r=wR();let n=!0;const i=(l,c)=>{const f=Bh(t,c);if(f){const{transition:u,transitionEnd:h,...y}=f;l={...l,...y,...h}}return l};function s(l){e=l(t)}function o(l,c){const f=t.getProps(),u=t.getVariantContext(!0)||{},h=[],y=new Set;let g={},p=1/0;for(let w=0;wp&&M;const G=Array.isArray(I)?I:[I];let Z=G.reduce(i,{});j===!1&&(Z={});const{prevResolvedValues:oe={}}=A,D={...oe,...Z},v=C=>{q=!0,y.delete(C),A.needsAnimating[C]=!0};for(const C in D){const P=Z[C],O=oe[C];g.hasOwnProperty(C)||(P!==O?C0(P)&&C0(O)?!a8(P,O)||F?v(C):A.protectedKeys[C]=!0:P!==void 0?v(C):y.add(C):P!==void 0&&y.has(C)?v(C):A.protectedKeys[C]=!0)}A.prevProp=I,A.prevResolvedValues=Z,A.isActive&&(g={...g,...Z}),n&&t.blockInitialAnimation&&(q=!1),q&&!z&&h.push(...G.map(C=>({animation:C,options:{type:E,...l}})))}if(y.size){const w={};y.forEach(E=>{const A=t.getBaseTarget(E);A!==void 0&&(w[E]=A)}),h.push({animation:w})}let k=!!h.length;return n&&f.initial===!1&&!t.manuallyAnimateOnMount&&(k=!1),n=!1,k?e(h):Promise.resolve()}function a(l,c,f){var u;if(r[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(y=>{var g;return(g=y.animationState)===null||g===void 0?void 0:g.setActive(l,c)}),r[l].isActive=c;const h=o(f,l);for(const y in r)r[y].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>r}}function bR(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!a8(e,t):!1}function jo(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function wR(){return{[Qe.Animate]:jo(!0),[Qe.InView]:jo(),[Qe.Hover]:jo(),[Qe.Tap]:jo(),[Qe.Drag]:jo(),[Qe.Focus]:jo(),[Qe.Exit]:jo()}}const CR={animation:Ls(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=xR(t)),Rh(e)&&S.useEffect(()=>e.subscribe(t),[e])}),exit:Ls(t=>{const{custom:e,visualElement:r}=t,[n,i]=o8(),s=S.useContext(hu);S.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(Qe.Exit,!n,{custom:s&&s.custom||e});o&&!n&&o.then(i)},[n])})},A2=(t,e)=>Math.abs(t-e);function ER(t,e){const r=A2(t.x,e.x),n=A2(t.y,e.y);return Math.sqrt(r**2+n**2)}class N8{constructor(e,r,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=dv(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,u=ER(c.offset,{x:0,y:0})>=3;if(!f&&!u)return;const{point:h}=c,{timestamp:y}=Xi;this.history.push({...h,timestamp:y});const{onStart:g,onMove:p}=this.handlers;f||(g&&g(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=uv(f,this.transformPagePoint),Nr.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:h}=this.handlers,y=dv(c.type==="pointercancel"?this.lastMoveEventInfo:uv(f,this.transformPagePoint),this.history);this.startEvent&&u&&u(c,y),h&&h(c,y)},!e8(e))return;this.handlers=r,this.transformPagePoint=n;const i=Nh(e),s=uv(i,this.transformPagePoint),{point:o}=s,{timestamp:a}=Xi;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=r;l&&l(e,dv(s,this.history)),this.removeListeners=$h(El(window,"pointermove",this.handlePointerMove),El(window,"pointerup",this.handlePointerUp),El(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),so.update(this.updatePoint)}}function uv(t,e){return e?{point:e(t.point)}:t}function _2(t,e){return{x:t.x-e.x,y:t.y-e.y}}function dv({point:t},e){return{point:t,delta:_2(t,$8(e)),offset:_2(t,SR(e)),velocity:kR(e,.1)}}function SR(t){return t[0]}function $8(t){return t[t.length-1]}function kR(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const i=$8(t);for(;r>=0&&(n=t[r],!(i.timestamp-n.timestamp>Td(e)));)r--;if(!n)return{x:0,y:0};const s=(i.timestamp-n.timestamp)/1e3;if(s===0)return{x:0,y:0};const o={x:(i.x-n.x)/s,y:(i.y-n.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function mn(t){return t.max-t.min}function Xy(t,e=0,r=.01){return Math.abs(t-e)<=r}function T2(t,e,r,n=.5){t.origin=n,t.originPoint=Kt(e.min,e.max,t.origin),t.scale=mn(r)/mn(e),(Xy(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Kt(r.min,r.max,t.origin)-t.originPoint,(Xy(t.translate)||isNaN(t.translate))&&(t.translate=0)}function of(t,e,r,n){T2(t.x,e.x,r.x,n==null?void 0:n.originX),T2(t.y,e.y,r.y,n==null?void 0:n.originY)}function P2(t,e,r){t.min=r.min+e.min,t.max=t.min+mn(e)}function AR(t,e,r){P2(t.x,e.x,r.x),P2(t.y,e.y,r.y)}function I2(t,e,r){t.min=e.min-r.min,t.max=t.min+mn(e)}function af(t,e,r){I2(t.x,e.x,r.x),I2(t.y,e.y,r.y)}function _R(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?Kt(r,t,n.max):Math.min(t,r)),t}function R2(t,e,r){return{min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function TR(t,{top:e,left:r,bottom:n,right:i}){return{x:R2(t.x,r,i),y:R2(t.y,e,n)}}function M2(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=T0(e.min,e.max-n,t.min):n>i&&(r=T0(t.min,t.max-i,e.min)),Fl(0,1,r)}function RR(t,e){const r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}const Zy=.35;function MR(t=Zy){return t===!1?t=0:t===!0&&(t=Zy),{x:O2(t,"left","right"),y:O2(t,"top","bottom")}}function O2(t,e,r){return{min:N2(t,e),max:N2(t,r)}}function N2(t,e){return typeof t=="number"?t:t[e]||0}const $2=()=>({translate:0,scale:1,origin:0,originPoint:0}),lf=()=>({x:$2(),y:$2()}),D2=()=>({min:0,max:0}),or=()=>({x:D2(),y:D2()});function di(t){return[t("x"),t("y")]}function D8({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function OR({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function NR(t,e){if(!e)return t;const r=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function hv(t){return t===void 0||t===1}function ep({scale:t,scaleX:e,scaleY:r}){return!hv(t)||!hv(e)||!hv(r)}function Ho(t){return ep(t)||B8(t)||t.z||t.rotate||t.rotateX||t.rotateY}function B8(t){return B2(t.x)||B2(t.y)}function B2(t){return t&&t!=="0%"}function I0(t,e,r){const n=t-r,i=e*n;return r+i}function L2(t,e,r,n,i){return i!==void 0&&(t=I0(t,i,n)),I0(t,r,n)+e}function tp(t,e=0,r=1,n,i){t.min=L2(t.min,e,r,n,i),t.max=L2(t.max,e,r,n,i)}function L8(t,{x:e,y:r}){tp(t.x,e.translate,e.scale,e.originPoint),tp(t.y,r.translate,r.scale,r.originPoint)}function $R(t,e,r,n=!1){var i,s;const o=r.length;if(!o)return;e.x=e.y=1;let a,l;for(let c=0;c1.0000000000001||t<.999999999999?t:1}function Ms(t,e){t.min=t.min+e,t.max=t.max+e}function F2(t,e,[r,n,i]){const s=e[i]!==void 0?e[i]:.5,o=Kt(t.min,t.max,s);tp(t,e[r],e[n],o,e.scale)}const DR=["x","scaleX","originX"],BR=["y","scaleY","originY"];function dl(t,e){F2(t.x,e,DR),F2(t.y,e,BR)}function j8(t,e){return D8(NR(t.getBoundingClientRect(),e))}function LR(t,e,r){const n=j8(t,r),{scroll:i}=e;return i&&(Ms(n.x,i.offset.x),Ms(n.y,i.offset.y)),n}const jR=new WeakMap;class FR{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=or(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(Nh(a,"page").point)},i=(a,l)=>{var c;const{drag:f,dragPropagation:u,onDragStart:h}=this.getProps();f&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=n8(f),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),di(y=>{var g,p;let k=this.getAxisMotionValue(y).get()||0;if(Si.test(k)){const w=(p=(g=this.visualElement.projection)===null||g===void 0?void 0:g.layout)===null||p===void 0?void 0:p.layoutBox[y];w&&(k=mn(w)*(parseFloat(k)/100))}this.originPoint[y]=k}),h==null||h(a,l),(c=this.visualElement.animationState)===null||c===void 0||c.setActive(Qe.Drag,!0))},s=(a,l)=>{const{dragPropagation:c,dragDirectionLock:f,onDirectionLock:u,onDrag:h}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:y}=l;if(f&&this.currentDirection===null){this.currentDirection=UR(y),this.currentDirection!==null&&(u==null||u(this.currentDirection));return}this.updateAxis("x",l.point,y),this.updateAxis("y",l.point,y),this.visualElement.render(),h==null||h(a,l)},o=(a,l)=>this.stop(a,l);this.panSession=new N8(e,{onSessionStart:n,onStart:i,onMove:s,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s==null||s(e,r)}cancel(){var e,r;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(r=this.visualElement.animationState)===null||r===void 0||r.setActive(Qe.Drag,!1)}updateAxis(e,r,n){const{drag:i}=this.getProps();if(!n||!Qu(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=_R(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},i=this.constraints;e&&fl(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=TR(n.layoutBox,e):this.constraints=!1,this.elastic=MR(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&di(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=RR(n.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!fl(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=LR(n,i.root,this.visualElement.getTransformPagePoint());let o=PR(i.layout.layoutBox,s);if(r){const a=r(OR(o));this.hasMutatedConstraints=!!a,a&&(o=D8(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=di(f=>{if(!Qu(f,r,this.currentDirection))return;let u=(l==null?void 0:l[f])||{};o&&(u={min:0,max:0});const h=i?200:1e6,y=i?40:1e7,g={type:"inertia",velocity:n?e[f]:0,bounceStiffness:h,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(f,g)});return Promise.all(c).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(km(e,n,0,r))}stopAnimation(){di(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var r;const n="_drag"+e.toUpperCase(),i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,((r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[e])||0)}snapToCursor(e){di(r=>{const{drag:n}=this.getProps();if(!Qu(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(r);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[r];s.set(e[r]-Kt(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!fl(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};di(a=>{const l=this.getAxisMotionValue(a);if(l){const c=l.get();s[a]=IR({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",(e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout(),this.resolveConstraints(),di(a=>{if(!Qu(a,r,null))return;const l=this.getAxisMotionValue(a),{min:c,max:f}=this.constraints[a];l.set(Kt(c,f,s[a]))})}addListeners(){var e;if(!this.visualElement.current)return;jR.set(this.visualElement,this);const r=this.visualElement.current,n=El(r,"pointerdown",c=>{const{drag:f,dragListener:u=!0}=this.getProps();f&&u&&this.start(c)}),i=()=>{const{dragConstraints:c}=this.getProps();fl(c)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&((e=s.root)===null||e===void 0||e.updateScroll(),s.updateLayout()),i();const a=na(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f})=>{this.isDragging&&f&&(di(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=c[u].translate,h.set(h.get()+c[u].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l==null||l()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Zy,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Qu(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function UR(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function zR(t){const{dragControls:e,visualElement:r}=t,n=Oh(()=>new FR(r));S.useEffect(()=>e&&e.subscribe(n),[n,e]),S.useEffect(()=>n.addListeners(),[n])}function VR({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:i}){const s=t||e||r||n,o=S.useRef(null),{transformPagePoint:a}=S.useContext(em),l={onSessionStart:n,onStart:e,onMove:t,onEnd:(f,u)=>{o.current=null,r&&r(f,u)}};S.useEffect(()=>{o.current!==null&&o.current.updateHandlers(l)});function c(f){o.current=new N8(f,l,{transformPagePoint:a})}S0(i,"pointerdown",s&&c),fm(()=>o.current&&o.current.end())}const HR={pan:Ls(VR),drag:Ls(zR)};function rp(t){return typeof t=="string"&&t.startsWith("var(--")}const F8=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function WR(t){const e=F8.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function np(t,e,r=1){const[n,i]=WR(t);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);return s?s.trim():rp(i)?np(i,e,r+1):i}function qR(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(i=>{const s=i.get();if(!rp(s))return;const o=np(s,n);o&&i.set(o)});for(const i in e){const s=e[i];if(!rp(s))continue;const o=np(s,n);o&&(e[i]=o,r&&r[i]===void 0&&(r[i]=s))}return{target:e,transitionEnd:r}}const GR=new Set(["width","height","top","left","right","bottom","x","y"]),U8=t=>GR.has(t),KR=t=>Object.keys(t).some(U8),U2=t=>t===_a||t===ge;var z2;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(z2||(z2={}));const V2=(t,e)=>parseFloat(t.split(", ")[e]),H2=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return V2(i[1],e);{const s=n.match(/^matrix\((.+)\)$/);return s?V2(s[1],t):0}},JR=new Set(["x","y","z"]),YR=b0.filter(t=>!JR.has(t));function QR(t){const e=[];return YR.forEach(r=>{const n=t.getValue(r);n!==void 0&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),e.length&&t.render(),e}const W2={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:H2(4,13),y:H2(5,14)},XR=(t,e,r)=>{const n=e.measureViewportBox(),i=e.current,s=getComputedStyle(i),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(c=>{a[c]=W2[c](n,s)}),e.render();const l=e.measureViewportBox();return r.forEach(c=>{const f=e.getValue(c);f&&f.jump(a[c]),t[c]=W2[c](l,s)}),t},ZR=(t,e,r={},n={})=>{e={...e},n={...n};const i=Object.keys(e).filter(U8);let s=[],o=!1;const a=[];if(i.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let f=r[l],u=Tc(f);const h=e[l];let y;if(C0(h)){const g=h.length,p=h[0]===null?1:0;f=h[p],u=Tc(f);for(let k=p;k=0?window.pageYOffset:null,c=XR(e,t,a);return s.length&&s.forEach(([f,u])=>{t.getValue(f).set(u)}),t.render(),Ih&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:e,transitionEnd:n}};function eM(t,e,r,n){return KR(e)?ZR(t,e,r,n):{target:e,transitionEnd:n}}const tM=(t,e,r,n)=>{const i=qR(t,e,n);return e=i.target,n=i.transitionEnd,eM(t,e,r,n)},ip={current:null},z8={current:!1};function rM(){if(z8.current=!0,!!Ih)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ip.current=t.matches;t.addListener(e),e()}else ip.current=!1}function nM(t,e,r){const{willChange:n}=e;for(const i in e){const s=e[i],o=r[i];if(an(s))t.addValue(i,s),A0(n)&&n.add(i);else if(an(o))t.addValue(i,Ul(s,{owner:t})),A0(n)&&n.remove(i);else if(o!==s)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(s)}else{const a=t.getStaticValue(i);t.addValue(i,Ul(a!==void 0?a:s,{owner:t}))}}for(const i in r)e[i]===void 0&&t.removeValue(i);return e}const V8=Object.keys(Vf),iM=V8.length,q2=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class sM{constructor({parent:e,props:r,reducedMotionConfig:n,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Nr.render(this.render,!1,!0);const{latestValues:o,renderState:a}=i;this.latestValues=o,this.baseTarget={...o},this.initialValues=r.initial?{...o}:{},this.renderState=a,this.parent=e,this.props=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=s,this.isControllingVariants=Mh(r),this.isVariantNode=U4(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(r,{});for(const f in c){const u=c[f];o[f]!==void 0&&an(u)&&(u.set(o[f],!1),A0(l)&&l.add(f))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){var r;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(r=this.parent)===null||r===void 0?void 0:r.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),z8.current||rM(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ip.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,r,n;(e=this.projection)===null||e===void 0||e.unmount(),so.update(this.notifyUpdate),so.render(this.render),this.valueSubscriptions.forEach(i=>i()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(e,r){const n=ic.has(e),i=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Nr.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),s()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,i,s,o,a){const l=[];for(let c=0;cthis.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:a,layoutScroll:y,layoutRoot:g})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):or()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender();const r=this.props;this.props=e;for(let n=0;nn.variantChildren.delete(e)}addValue(e,r){r!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,r)),this.values.set(e,r),this.latestValues[e]=r.get()}removeValue(e){var r;this.values.delete(e),(r=this.valueSubscriptions.get(e))===null||r===void 0||r(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&r!==void 0&&(n=Ul(r,{owner:this}),this.addValue(e,n)),n}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var r;const{initial:n}=this.props,i=typeof n=="string"||typeof n=="object"?(r=cm(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!an(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new hm),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}}const H8=["initial",...Am],oM=H8.length;class W8 extends sM{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){var n;return(n=e.style)===null||n===void 0?void 0:n[r]}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:i},s){let o=yI(n,e||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),o&&(o=i(o))),s){hI(this,n,o);const a=tM(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function aM(t){return window.getComputedStyle(t)}class lM extends W8{readValueFromInstance(e,r){if(ic.has(r)){const n=pm(r);return n&&n.default||0}else{const n=aM(e),i=(H4(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return j8(e,r)}build(e,r,n,i){nm(e,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,r){return lm(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;an(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,i){J4(e,r,n,i)}}class cM extends W8{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return ic.has(r)?((n=pm(r))===null||n===void 0?void 0:n.default)||0:(r=Y4.has(r)?r:am(r),e.getAttribute(r))}measureInstanceViewportBox(){return or()}scrapeMotionValuesFromProps(e,r){return X4(e,r)}build(e,r,n,i){sm(e,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,r,n,i){Q4(e,r,n,i)}mount(e){this.isSVGTag=om(e.tagName),super.mount(e)}}const fM=(t,e)=>rm(t)?new cM(e,{enableHardwareAcceleration:!1}):new lM(e,{enableHardwareAcceleration:!0});function G2(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Pc={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ge.test(t))t=parseFloat(t);else return t;const r=G2(t,e.target.x),n=G2(t,e.target.y);return`${r}% ${n}%`}},K2="_$css",uM={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,i=t.includes("var("),s=[];i&&(t=t.replace(F8,y=>(s.push(y),K2)));const o=oo.parse(t);if(o.length>5)return n;const a=oo.createTransformer(t),l=typeof o[0]!="number"?1:0,c=r.x.scale*e.x,f=r.y.scale*e.y;o[0+l]/=c,o[1+l]/=f;const u=Kt(c,f,.5);typeof o[2+l]=="number"&&(o[2+l]/=u),typeof o[3+l]=="number"&&(o[3+l]/=u);let h=a(o);if(i){let y=0;h=h.replace(K2,()=>{const g=s[y];return y++,g})}return h}};class dM extends lr.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=e;rP(vM),s&&(r.group&&r.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),rf.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o&&(o.isPresent=s,i||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||Nr.postRender(()=>{var a;!((a=o.getStack())===null||a===void 0)&&a.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(i),n!=null&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}}function hM(t){const[e,r]=o8(),n=S.useContext(tm);return lr.createElement(dM,{...t,layoutGroup:n,switchLayoutGroup:S.useContext(z4),isPresent:e,safeToRemove:r})}const vM={borderRadius:{...Pc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pc,borderTopRightRadius:Pc,borderBottomLeftRadius:Pc,borderBottomRightRadius:Pc,boxShadow:uM},yM={measureLayout:hM};function pM(t,e,r={}){const n=an(t)?t:Ul(t);return n.start(km("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const q8=["TopLeft","TopRight","BottomLeft","BottomRight"],gM=q8.length,J2=t=>typeof t=="string"?parseFloat(t):t,Y2=t=>typeof t=="number"||ge.test(t);function mM(t,e,r,n,i,s){i?(t.opacity=Kt(0,r.opacity!==void 0?r.opacity:1,xM(n)),t.opacityExit=Kt(e.opacity!==void 0?e.opacity:1,0,bM(n))):s&&(t.opacity=Kt(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(T0(t,e,n))}function X2(t,e){t.min=e.min,t.max=e.max}function Fn(t,e){X2(t.x,e.x),X2(t.y,e.y)}function Z2(t,e,r,n,i){return t-=e,t=I0(t,1/r,n),i!==void 0&&(t=I0(t,1/i,n)),t}function wM(t,e=0,r=1,n=.5,i,s=t,o=t){if(Si.test(e)&&(e=parseFloat(e),e=Kt(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=Kt(s.min,s.max,n);t===s&&(a-=e),t.min=Z2(t.min,e,r,a,i),t.max=Z2(t.max,e,r,a,i)}function ew(t,e,[r,n,i],s,o){wM(t,e[r],e[n],e[i],e.scale,s,o)}const CM=["x","scaleX","originX"],EM=["y","scaleY","originY"];function tw(t,e,r,n){ew(t.x,e,CM,r==null?void 0:r.x,n==null?void 0:n.x),ew(t.y,e,EM,r==null?void 0:r.y,n==null?void 0:n.y)}function rw(t){return t.translate===0&&t.scale===1}function K8(t){return rw(t.x)&&rw(t.y)}function J8(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function nw(t){return mn(t.x)/mn(t.y)}class SM{constructor(){this.members=[]}add(e){um(this.members,e),e.scheduleRender()}remove(e){if(dm(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(e){const r=this.members.findIndex(i=>e===i);if(r===0)return!1;let n;for(let i=r;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){n=s;break}}return n?(this.promote(n),!0):!1}promote(e,r){var n;const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,r&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,n,i,s,o;(n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r),(o=(i=e.resumingFrom)===null||i===void 0?void 0:(s=i.options).onExitComplete)===null||o===void 0||o.call(s)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function iw(t,e,r){let n="";const i=t.x.translate/e.x,s=t.y.translate/e.y;if((i||s)&&(n=`translate3d(${i}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:l,rotateX:c,rotateY:f}=r;l&&(n+=`rotate(${l}deg) `),c&&(n+=`rotateX(${c}deg) `),f&&(n+=`rotateY(${f}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(n+=`scale(${o}, ${a})`),n||"none"}const kM=(t,e)=>t.depth-e.depth;class AM{constructor(){this.children=[],this.isDirty=!1}add(e){um(this.children,e),this.isDirty=!0}remove(e){dm(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(kM),this.isDirty=!1,this.children.forEach(e)}}const sw=["","X","Y","Z"],ow=1e3;let _M=0;function Y8({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=_M++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(IM),this.nodes.forEach(OM),this.nodes.forEach(NM)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let c=0;cthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=R8(y,250),rf.hasAnimatedSinceResize&&(rf.hasAnimatedSinceResize=!1,this.nodes.forEach(lw))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||f)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:y,hasRelativeTargetChanged:g,layout:p})=>{var k,w,E,A,I;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const M=(w=(k=this.options.transition)!==null&&k!==void 0?k:u.getDefaultTransition())!==null&&w!==void 0?w:jM,{onLayoutAnimationStart:j,onLayoutAnimationComplete:z}=u.getProps(),F=!this.targetLayout||!J8(this.targetLayout,p)||g,q=!y&&g;if(this.options.layoutRoot||!((E=this.resumeFrom)===null||E===void 0)&&E.instance||q||y&&(F||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,q);const G={...M8(M,"layout"),onPlay:j,onComplete:z};(u.shouldReduceMotion||this.options.layoutRoot)&&(G.delay=0,G.type=!1),this.startAnimation(G)}else!y&&this.animationProgress===0&&lw(this),this.isLead()&&((I=(A=this.options).onExitComplete)===null||I===void 0||I.call(A));this.targetLayout=p})}unmount(){var o,a;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(o=this.getStack())===null||o===void 0||o.remove(this),(a=this.parent)===null||a===void 0||a.children.delete(this),this.instance=void 0,so.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var o;return this.isAnimationBlocked||((o=this.parent)===null||o===void 0?void 0:o.isTreeAnimationBlocked())||!1}startUpdate(){var o;this.isUpdateBlocked()||(this.isUpdating=!0,(o=this.nodes)===null||o===void 0||o.forEach($M),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,l,c;if(this.root.isUpdateBlocked()){(l=(a=this.options).onExitComplete)===null||l===void 0||l.call(a);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var o;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var A;const I=E/1e3;cw(y.x,o.x,I),cw(y.y,o.y,I),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((A=this.relativeParent)===null||A===void 0)&&A.layout)&&(af(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),BM(this.relativeTarget,this.relativeTargetOrigin,g,I)),p&&(this.animationValues=h,mM(h,u,this.latestValues,I,w,k)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=I},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(so.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Nr.update(()=>{rf.hasAnimatedSinceResize=!0,this.currentAnimation=pM(0,ow,{...o,onUpdate:c=>{var f;this.mixTargetDelta(c),(f=o.onUpdate)===null||f===void 0||f.call(o,c)},onComplete:()=>{var c;(c=o.onComplete)===null||c===void 0||c.call(o),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var o;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(o=this.getStack())===null||o===void 0||o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var o;this.currentAnimation&&((o=this.mixTargetDelta)===null||o===void 0||o.call(this,ow),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&Q8(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||or();const u=mn(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const h=mn(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}Fn(a,l),dl(a,f),of(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){var l,c,f;this.sharedNodes.has(o)||this.sharedNodes.set(o,new SM),this.sharedNodes.get(o).add(a),a.promote({transition:(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(c=a.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(c,a)})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let f=0;f{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(aw),this.root.sharedNodes.clear()}}}function TM(t){t.updateLayout()}function PM(t){var e,r,n;const i=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=t.layout,{animationType:a}=t.options,l=i.source!==t.layout.source;a==="size"?di(y=>{const g=l?i.measuredBox[y]:i.layoutBox[y],p=mn(g);g.min=s[y].min,g.max=g.min+p}):Q8(a,i.layoutBox,s)&&di(y=>{const g=l?i.measuredBox[y]:i.layoutBox[y],p=mn(s[y]);g.max=g.min+p});const c=lf();of(c,s,i.layoutBox);const f=lf();l?of(f,t.applyTransform(o,!0),i.measuredBox):of(f,s,i.layoutBox);const u=!K8(c);let h=!1;if(!t.resumeFrom){const y=t.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:g,layout:p}=y;if(g&&p){const k=or();af(k,i.layoutBox,g.layoutBox);const w=or();af(w,s,p.layoutBox),J8(k,w)||(h=!0),y.options.layoutRoot&&(t.relativeTarget=w,t.relativeTargetOrigin=k,t.relativeParent=y)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:i,delta:f,layoutDelta:c,hasLayoutChanged:u,hasRelativeTargetChanged:h})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function IM(t){t.isProjectionDirty||(t.isProjectionDirty=!!(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=!!(t.parent&&t.parent.isTransformDirty))}function RM(t){t.clearSnapshot()}function aw(t){t.clearMeasurements()}function MM(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function lw(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function OM(t){t.resolveTargetDelta()}function NM(t){t.calcProjection()}function $M(t){t.resetRotation()}function DM(t){t.removeLeadSnapshot()}function cw(t,e,r){t.translate=Kt(e.translate,0,r),t.scale=Kt(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function fw(t,e,r,n){t.min=Kt(e.min,r.min,n),t.max=Kt(e.max,r.max,n)}function BM(t,e,r,n){fw(t.x,e.x,r.x,n),fw(t.y,e.y,r.y,n)}function LM(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const jM={duration:.45,ease:[.4,0,.1,1]};function FM(t,e){let r=t.root;for(let s=t.path.length-1;s>=0;s--)if(t.path[s].instance){r=t.path[s];break}const i=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);i&&t.mount(i,!0)}function uw(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function UM(t){uw(t.x),uw(t.y)}function Q8(t,e,r){return t==="position"||t==="preserve-aspect"&&!Xy(nw(e),nw(r),.2)}const zM=Y8({attachResizeListener:(t,e)=>na(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),vv={current:void 0},VM=Y8({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!vv.current){const t=new zM(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),vv.current=t}return vv.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),HM={...CR,...UP,...HR,...yM},Sl=eP((t,e)=>TP(t,e,HM,fM,VM));function X8(){const t=S.useRef(!1);return m0(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function WM(){const t=X8(),[e,r]=S.useState(0),n=S.useCallback(()=>{t.current&&r(e+1)},[e]);return[S.useCallback(()=>Nr.postRender(n),[n]),e]}class qM extends S.Component{getSnapshotBeforeUpdate(e){const r=this.props.childRef.current;if(r&&e.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function GM({children:t,isPresent:e}){const r=S.useId(),n=S.useRef(null),i=S.useRef({width:0,height:0,top:0,left:0});return S.useInsertionEffect(()=>{const{width:s,height:o,top:a,left:l}=i.current;if(e||!n.current||!s||!o)return;n.current.dataset.motionPopId=r;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` [data-motion-pop-id="${r}"] { position: absolute !important; width: ${s}px !important; @@ -45,12 +45,12 @@ Error generating stack: `+s.message+` top: ${a}px !important; left: ${l}px !important; } - `),()=>{document.head.removeChild(c)}},[e]),S.createElement(qM,{isPresent:e,childRef:n,sizeRef:i},S.cloneElement(t,{ref:n}))}const yv=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:s,mode:o})=>{const a=Oh(KM),l=S.useId(),c=S.useMemo(()=>({id:l,initial:e,isPresent:r,custom:i,onExitComplete:f=>{a.set(f,!0);for(const u of a.values())if(!u)return;n&&n()},register:f=>(a.set(f,!1),()=>a.delete(f))}),s?void 0:[r]);return S.useMemo(()=>{a.forEach((f,u)=>a.set(u,!1))},[r]),S.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=S.createElement(GM,{isPresent:r},t)),S.createElement(hu.Provider,{value:c},t)};function KM(){return new Map}const qa=t=>t.key||"";function JM(t,e){t.forEach(r=>{const n=qa(r);e.set(n,r)})}function YM(t){const e=[];return S.Children.forEach(t,r=>{S.isValidElement(r)&&e.push(r)}),e}const Z8=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{i&&(o="wait");let[a]=WM();const l=S.useContext(tm).forceRender;l&&(a=l);const c=X8(),f=YM(t);let u=f;const h=new Set,y=S.useRef(u),g=S.useRef(new Map).current,p=S.useRef(!0);if(m0(()=>{p.current=!1,JM(f,g),y.current=u}),fm(()=>{p.current=!0,g.clear(),h.clear()}),p.current)return S.createElement(S.Fragment,null,u.map(A=>S.createElement(yv,{key:qa(A),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:s,mode:o},A)));u=[...u];const k=y.current.map(qa),w=f.map(qa),E=k.length;for(let A=0;A{if(w.indexOf(A)!==-1)return;const I=g.get(A);if(!I)return;const M=k.indexOf(A),B=()=>{g.delete(A),h.delete(A);const z=y.current.findIndex(F=>F.key===A);if(y.current.splice(z,1),!h.size){if(y.current=f,c.current===!1)return;a(),n&&n()}};u.splice(M,0,S.createElement(yv,{key:qa(I),isPresent:!1,onExitComplete:B,custom:e,presenceAffectsLayout:s,mode:o},I))}),u=u.map(A=>{const I=A.key;return h.has(I)?A:S.createElement(yv,{key:qa(A),isPresent:!0,presenceAffectsLayout:s,mode:o},A)}),S.createElement(S.Fragment,null,h.size?u:u.map(A=>S.cloneElement(A)))},eC={black:"#000000",white:"#ffffff",inherit:"inherit",transparent:"transparent",positive:"#1FC266",negative:"#C2501F",info:"#0076CC",warning:"#F4B03E",gradientBackdrop:`linear-gradient( + `),()=>{document.head.removeChild(c)}},[e]),S.createElement(qM,{isPresent:e,childRef:n,sizeRef:i},S.cloneElement(t,{ref:n}))}const yv=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:s,mode:o})=>{const a=Oh(KM),l=S.useId(),c=S.useMemo(()=>({id:l,initial:e,isPresent:r,custom:i,onExitComplete:f=>{a.set(f,!0);for(const u of a.values())if(!u)return;n&&n()},register:f=>(a.set(f,!1),()=>a.delete(f))}),s?void 0:[r]);return S.useMemo(()=>{a.forEach((f,u)=>a.set(u,!1))},[r]),S.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=S.createElement(GM,{isPresent:r},t)),S.createElement(hu.Provider,{value:c},t)};function KM(){return new Map}const qa=t=>t.key||"";function JM(t,e){t.forEach(r=>{const n=qa(r);e.set(n,r)})}function YM(t){const e=[];return S.Children.forEach(t,r=>{S.isValidElement(r)&&e.push(r)}),e}const Z8=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{i&&(o="wait");let[a]=WM();const l=S.useContext(tm).forceRender;l&&(a=l);const c=X8(),f=YM(t);let u=f;const h=new Set,y=S.useRef(u),g=S.useRef(new Map).current,p=S.useRef(!0);if(m0(()=>{p.current=!1,JM(f,g),y.current=u}),fm(()=>{p.current=!0,g.clear(),h.clear()}),p.current)return S.createElement(S.Fragment,null,u.map(A=>S.createElement(yv,{key:qa(A),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:s,mode:o},A)));u=[...u];const k=y.current.map(qa),w=f.map(qa),E=k.length;for(let A=0;A{if(w.indexOf(A)!==-1)return;const I=g.get(A);if(!I)return;const M=k.indexOf(A),j=()=>{g.delete(A),h.delete(A);const z=y.current.findIndex(F=>F.key===A);if(y.current.splice(z,1),!h.size){if(y.current=f,c.current===!1)return;a(),n&&n()}};u.splice(M,0,S.createElement(yv,{key:qa(I),isPresent:!1,onExitComplete:j,custom:e,presenceAffectsLayout:s,mode:o},I))}),u=u.map(A=>{const I=A.key;return h.has(I)?A:S.createElement(yv,{key:qa(A),isPresent:!0,presenceAffectsLayout:s,mode:o},A)}),S.createElement(S.Fragment,null,h.size?u:u.map(A=>S.cloneElement(A)))},eC={black:"#000000",white:"#ffffff",inherit:"inherit",transparent:"transparent",positive:"#1FC266",negative:"#C2501F",info:"#0076CC",warning:"#F4B03E",gradientBackdrop:`linear-gradient( 243.18deg, rgba(86, 52, 189, 0.85) 0%, rgba(49, 41, 223, 0.85) 63.54%, rgba(7, 98, 149, 0.85) 100% - )`,gradientPrimary:"linear-gradient(89.69deg, #4411E1 0.27%, #7537F9 99.73%)",gradientSecondary:"linear-gradient(32.51deg, #951990 -15.23%, #3A35B1 48.55%, #20A8B0 100%)",arbitrumDark:"#212D44",arbitrumLight:"#93D4FF",avalanceDark:"#810C0C",avalanceLight:"#FF8080",bscDark:"#584508",bscLight:"#FCCF43",ethereumDark:"#132362",ethereumLight:"#AABBFF",gnosisDark:"#084246",gnosisLight:"#8CF6FD",polygonDark:"#350881",polygonLight:"#C7A6FF"},QM={...eC,text100:"rgba(255, 255, 255, 1)",text80:"rgba(255, 255, 255, 0.8)",text50:"rgba(255, 255, 255, 0.5)",textInverse100:"rgba(0, 0, 0, 1)",backgroundPrimary:"rgba(0, 0, 0, 1)",backgroundSecondary:"rgba(255, 255, 255, 0.1)",backgroundContrast:"rgba(0, 0, 0, 0.5)",backgroundMuted:"rgba(255, 255, 255, 0.05)",backgroundControl:"rgba(255, 255, 255, 0.25)",backgroundInverse:"rgba(255, 255, 255, 1)",backgroundBackdrop:"rgba(34, 34, 34, 0.9)",backgroundOverlay:"rgba(0, 0, 0, 0.7)",backgroundRaised:"rgba(54, 54, 54, 0.7)",buttonGlass:"rgba(255, 255, 255, 0.15)",buttonEmphasis:"rgba(0, 0, 0, 0.5)",buttonInverse:"rgba(255, 255, 255, 0.8)",borderNormal:"rgba(255, 255, 255, 0.25)",borderFocus:"rgba(255, 255, 255, 0.5)"},XM={...eC,text100:"rgba(0, 0, 0, 1)",text80:"rgba(0, 0, 0, 0.8)",text50:"rgba(0, 0, 0, 0.5)",textInverse100:"rgba(255, 255, 255, 1)",backgroundPrimary:"rgba(244, 244, 244, 1)",backgroundSecondary:"rgba(0, 0, 0, 0.1)",backgroundContrast:"rgba(244, 244, 244, 0.5)",backgroundMuted:"rgba(0, 0, 0, 0.05)",backgroundControl:"rgba(0, 0, 0, 0.25)",backgroundInverse:"rgba(0, 0, 0, 1)",backgroundBackdrop:"rgba(221, 221, 221, 0.9)",backgroundOverlay:"rgba(244, 244, 244, 0.7)",backgroundRaised:"rgba(192, 192, 192, 0.7)",buttonGlass:"rgba(0, 0, 0, 0.15)",buttonEmphasis:"rgba(255, 255, 255, 0.5)",buttonInverse:"rgba(0, 0, 0, 0.8)",borderNormal:"rgba(0, 0, 0, 0.25)",borderFocus:"rgba(0, 0, 0, 0.5)"},ZM={dark:QM,light:XM},eO={inherit:{fontFamily:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit",fontWeight:"inherit"},xlarge:{fontFamily:"body",fontSize:"xlarge",lineHeight:"9",letterSpacing:"none",fontWeight:"bold"},large:{fontFamily:"body",fontSize:"large",lineHeight:"7",letterSpacing:"normal",fontWeight:"semibold"},medium:{fontFamily:"body",fontSize:"medium",lineHeight:"6",letterSpacing:"normal",fontWeight:"bold"},normal:{fontFamily:"body",fontSize:"normal",lineHeight:"5",letterSpacing:"wide",fontWeight:"normal"},small:{fontFamily:"body",fontSize:"small",lineHeight:"4",letterSpacing:"wide",fontWeight:"medium"},xsmall:{fontFamily:"body",fontSize:"xsmall",lineHeight:"4",letterSpacing:"wide",fontWeight:"bold"},code:{fontFamily:"mono",fontSize:"normal",lineHeight:"5",letterSpacing:"none",fontWeight:"normal"}};var dw={colors:{black:"var(--colors-black)",white:"var(--colors-white)",inherit:"var(--colors-inherit)",transparent:"var(--colors-transparent)",positive:"var(--colors-positive)",negative:"var(--colors-negative)",info:"var(--colors-info)",warning:"var(--colors-warning)",gradientBackdrop:"var(--colors-gradient-backdrop)",gradientPrimary:"var(--colors-gradient-primary)",gradientSecondary:"var(--colors-gradient-secondary)",arbitrumDark:"var(--colors-arbitrum-dark)",arbitrumLight:"var(--colors-arbitrum-light)",avalanceDark:"var(--colors-avalance-dark)",avalanceLight:"var(--colors-avalance-light)",bscDark:"var(--colors-bsc-dark)",bscLight:"var(--colors-bsc-light)",ethereumDark:"var(--colors-ethereum-dark)",ethereumLight:"var(--colors-ethereum-light)",gnosisDark:"var(--colors-gnosis-dark)",gnosisLight:"var(--colors-gnosis-light)",polygonDark:"var(--colors-polygon-dark)",polygonLight:"var(--colors-polygon-light)",text100:"var(--colors-text100)",text80:"var(--colors-text80)",text50:"var(--colors-text50)",textInverse100:"var(--colors-text-inverse100)",backgroundPrimary:"var(--colors-background-primary)",backgroundSecondary:"var(--colors-background-secondary)",backgroundContrast:"var(--colors-background-contrast)",backgroundMuted:"var(--colors-background-muted)",backgroundControl:"var(--colors-background-control)",backgroundInverse:"var(--colors-background-inverse)",backgroundBackdrop:"var(--colors-background-backdrop)",backgroundOverlay:"var(--colors-background-overlay)",backgroundRaised:"var(--colors-background-raised)",buttonGlass:"var(--colors-button-glass)",buttonEmphasis:"var(--colors-button-emphasis)",buttonInverse:"var(--colors-button-inverse)",borderNormal:"var(--colors-border-normal)",borderFocus:"var(--colors-border-focus)"}};function tO(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function rO(t){var e=tO(t,"string");return typeof e=="symbol"?e:String(e)}function nO(t,e,r){return e=rO(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pv(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nl.styles)),s=Object.keys(i),o=s.filter(l=>"mappings"in i[l]),a=l=>{var c=[],f={},u=pv({},l),h=!1;for(var y of o){var g=l[y];if(g!=null){var p=i[y];h=!0;for(var k of p.mappings)f[k]=g,u[k]==null&&delete u[k]}}var w=h?pv(pv({},f),u):l,E=function(){var B=w[A],z=i[A];try{if(z.mappings)return"continue";if(typeof B=="string"||typeof B=="number")c.push(z.values[B].defaultClass);else if(Array.isArray(B))for(var F=0;Ft,oO=function(){return iO(sO)(...arguments)},tC=oO({conditions:{defaultCondition:"sm",conditionNames:["sm","md","lg","xl"],responsiveArray:void 0},styles:{borderWidth:{mappings:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"]},borderRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderLeftRadius:{mappings:["borderBottomLeftRadius","borderTopLeftRadius"]},borderRightRadius:{mappings:["borderBottomRightRadius","borderTopRightRadius"]},borderTopRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius"]},borderBottomRadius:{mappings:["borderBottomLeftRadius","borderBottomRightRadius"]},margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},overflow:{mappings:["overflowX","overflowY"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},placeItems:{mappings:["justifyContent","alignItems"]},inset:{mappings:["top","bottom","left","right"]},width:{values:{0:{conditions:{sm:"fyvr10",md:"fyvr11",lg:"fyvr12",xl:"fyvr13"},defaultClass:"fyvr10"},1:{conditions:{sm:"fyvr14",md:"fyvr15",lg:"fyvr16",xl:"fyvr17"},defaultClass:"fyvr14"},2:{conditions:{sm:"fyvr18",md:"fyvr19",lg:"fyvr1a",xl:"fyvr1b"},defaultClass:"fyvr18"},3:{conditions:{sm:"fyvr1c",md:"fyvr1d",lg:"fyvr1e",xl:"fyvr1f"},defaultClass:"fyvr1c"},4:{conditions:{sm:"fyvr1g",md:"fyvr1h",lg:"fyvr1i",xl:"fyvr1j"},defaultClass:"fyvr1g"},5:{conditions:{sm:"fyvr1k",md:"fyvr1l",lg:"fyvr1m",xl:"fyvr1n"},defaultClass:"fyvr1k"},6:{conditions:{sm:"fyvr1o",md:"fyvr1p",lg:"fyvr1q",xl:"fyvr1r"},defaultClass:"fyvr1o"},7:{conditions:{sm:"fyvr1s",md:"fyvr1t",lg:"fyvr1u",xl:"fyvr1v"},defaultClass:"fyvr1s"},8:{conditions:{sm:"fyvr1w",md:"fyvr1x",lg:"fyvr1y",xl:"fyvr1z"},defaultClass:"fyvr1w"},9:{conditions:{sm:"fyvr110",md:"fyvr111",lg:"fyvr112",xl:"fyvr113"},defaultClass:"fyvr110"},10:{conditions:{sm:"fyvr114",md:"fyvr115",lg:"fyvr116",xl:"fyvr117"},defaultClass:"fyvr114"},12:{conditions:{sm:"fyvr118",md:"fyvr119",lg:"fyvr11a",xl:"fyvr11b"},defaultClass:"fyvr118"},14:{conditions:{sm:"fyvr11c",md:"fyvr11d",lg:"fyvr11e",xl:"fyvr11f"},defaultClass:"fyvr11c"},16:{conditions:{sm:"fyvr11g",md:"fyvr11h",lg:"fyvr11i",xl:"fyvr11j"},defaultClass:"fyvr11g"},"0.25":{conditions:{sm:"fyvr11k",md:"fyvr11l",lg:"fyvr11m",xl:"fyvr11n"},defaultClass:"fyvr11k"},"0.5":{conditions:{sm:"fyvr11o",md:"fyvr11p",lg:"fyvr11q",xl:"fyvr11r"},defaultClass:"fyvr11o"},"1.5":{conditions:{sm:"fyvr11s",md:"fyvr11t",lg:"fyvr11u",xl:"fyvr11v"},defaultClass:"fyvr11s"},none:{conditions:{sm:"fyvr11w",md:"fyvr11x",lg:"fyvr11y",xl:"fyvr11z"},defaultClass:"fyvr11w"},px:{conditions:{sm:"fyvr120",md:"fyvr121",lg:"fyvr122",xl:"fyvr123"},defaultClass:"fyvr120"},auto:{conditions:{sm:"fyvr124",md:"fyvr125",lg:"fyvr126",xl:"fyvr127"},defaultClass:"fyvr124"},full:{conditions:{sm:"fyvr128",md:"fyvr129",lg:"fyvr12a",xl:"fyvr12b"},defaultClass:"fyvr128"},"1/2":{conditions:{sm:"fyvr12c",md:"fyvr12d",lg:"fyvr12e",xl:"fyvr12f"},defaultClass:"fyvr12c"},"1/3":{conditions:{sm:"fyvr12g",md:"fyvr12h",lg:"fyvr12i",xl:"fyvr12j"},defaultClass:"fyvr12g"},"2/3":{conditions:{sm:"fyvr12k",md:"fyvr12l",lg:"fyvr12m",xl:"fyvr12n"},defaultClass:"fyvr12k"},"1/4":{conditions:{sm:"fyvr12o",md:"fyvr12p",lg:"fyvr12q",xl:"fyvr12r"},defaultClass:"fyvr12o"},"3/4":{conditions:{sm:"fyvr12s",md:"fyvr12t",lg:"fyvr12u",xl:"fyvr12v"},defaultClass:"fyvr12s"},fit:{conditions:{sm:"fyvr12w",md:"fyvr12x",lg:"fyvr12y",xl:"fyvr12z"},defaultClass:"fyvr12w"},max:{conditions:{sm:"fyvr130",md:"fyvr131",lg:"fyvr132",xl:"fyvr133"},defaultClass:"fyvr130"},min:{conditions:{sm:"fyvr134",md:"fyvr135",lg:"fyvr136",xl:"fyvr137"},defaultClass:"fyvr134"},vw:{conditions:{sm:"fyvr138",md:"fyvr139",lg:"fyvr13a",xl:"fyvr13b"},defaultClass:"fyvr138"},vh:{conditions:{sm:"fyvr13c",md:"fyvr13d",lg:"fyvr13e",xl:"fyvr13f"},defaultClass:"fyvr13c"}}},height:{values:{0:{conditions:{sm:"fyvr13g",md:"fyvr13h",lg:"fyvr13i",xl:"fyvr13j"},defaultClass:"fyvr13g"},1:{conditions:{sm:"fyvr13k",md:"fyvr13l",lg:"fyvr13m",xl:"fyvr13n"},defaultClass:"fyvr13k"},2:{conditions:{sm:"fyvr13o",md:"fyvr13p",lg:"fyvr13q",xl:"fyvr13r"},defaultClass:"fyvr13o"},3:{conditions:{sm:"fyvr13s",md:"fyvr13t",lg:"fyvr13u",xl:"fyvr13v"},defaultClass:"fyvr13s"},4:{conditions:{sm:"fyvr13w",md:"fyvr13x",lg:"fyvr13y",xl:"fyvr13z"},defaultClass:"fyvr13w"},5:{conditions:{sm:"fyvr140",md:"fyvr141",lg:"fyvr142",xl:"fyvr143"},defaultClass:"fyvr140"},6:{conditions:{sm:"fyvr144",md:"fyvr145",lg:"fyvr146",xl:"fyvr147"},defaultClass:"fyvr144"},7:{conditions:{sm:"fyvr148",md:"fyvr149",lg:"fyvr14a",xl:"fyvr14b"},defaultClass:"fyvr148"},8:{conditions:{sm:"fyvr14c",md:"fyvr14d",lg:"fyvr14e",xl:"fyvr14f"},defaultClass:"fyvr14c"},9:{conditions:{sm:"fyvr14g",md:"fyvr14h",lg:"fyvr14i",xl:"fyvr14j"},defaultClass:"fyvr14g"},10:{conditions:{sm:"fyvr14k",md:"fyvr14l",lg:"fyvr14m",xl:"fyvr14n"},defaultClass:"fyvr14k"},12:{conditions:{sm:"fyvr14o",md:"fyvr14p",lg:"fyvr14q",xl:"fyvr14r"},defaultClass:"fyvr14o"},14:{conditions:{sm:"fyvr14s",md:"fyvr14t",lg:"fyvr14u",xl:"fyvr14v"},defaultClass:"fyvr14s"},16:{conditions:{sm:"fyvr14w",md:"fyvr14x",lg:"fyvr14y",xl:"fyvr14z"},defaultClass:"fyvr14w"},"0.25":{conditions:{sm:"fyvr150",md:"fyvr151",lg:"fyvr152",xl:"fyvr153"},defaultClass:"fyvr150"},"0.5":{conditions:{sm:"fyvr154",md:"fyvr155",lg:"fyvr156",xl:"fyvr157"},defaultClass:"fyvr154"},"1.5":{conditions:{sm:"fyvr158",md:"fyvr159",lg:"fyvr15a",xl:"fyvr15b"},defaultClass:"fyvr158"},none:{conditions:{sm:"fyvr15c",md:"fyvr15d",lg:"fyvr15e",xl:"fyvr15f"},defaultClass:"fyvr15c"},px:{conditions:{sm:"fyvr15g",md:"fyvr15h",lg:"fyvr15i",xl:"fyvr15j"},defaultClass:"fyvr15g"},auto:{conditions:{sm:"fyvr15k",md:"fyvr15l",lg:"fyvr15m",xl:"fyvr15n"},defaultClass:"fyvr15k"},full:{conditions:{sm:"fyvr15o",md:"fyvr15p",lg:"fyvr15q",xl:"fyvr15r"},defaultClass:"fyvr15o"},"1/2":{conditions:{sm:"fyvr15s",md:"fyvr15t",lg:"fyvr15u",xl:"fyvr15v"},defaultClass:"fyvr15s"},"1/3":{conditions:{sm:"fyvr15w",md:"fyvr15x",lg:"fyvr15y",xl:"fyvr15z"},defaultClass:"fyvr15w"},"2/3":{conditions:{sm:"fyvr160",md:"fyvr161",lg:"fyvr162",xl:"fyvr163"},defaultClass:"fyvr160"},"1/4":{conditions:{sm:"fyvr164",md:"fyvr165",lg:"fyvr166",xl:"fyvr167"},defaultClass:"fyvr164"},"3/4":{conditions:{sm:"fyvr168",md:"fyvr169",lg:"fyvr16a",xl:"fyvr16b"},defaultClass:"fyvr168"},fit:{conditions:{sm:"fyvr16c",md:"fyvr16d",lg:"fyvr16e",xl:"fyvr16f"},defaultClass:"fyvr16c"},max:{conditions:{sm:"fyvr16g",md:"fyvr16h",lg:"fyvr16i",xl:"fyvr16j"},defaultClass:"fyvr16g"},min:{conditions:{sm:"fyvr16k",md:"fyvr16l",lg:"fyvr16m",xl:"fyvr16n"},defaultClass:"fyvr16k"},vw:{conditions:{sm:"fyvr16o",md:"fyvr16p",lg:"fyvr16q",xl:"fyvr16r"},defaultClass:"fyvr16o"},vh:{conditions:{sm:"fyvr16s",md:"fyvr16t",lg:"fyvr16u",xl:"fyvr16v"},defaultClass:"fyvr16s"}}},maxWidth:{values:{0:{conditions:{sm:"fyvr16w",md:"fyvr16x",lg:"fyvr16y",xl:"fyvr16z"},defaultClass:"fyvr16w"},1:{conditions:{sm:"fyvr170",md:"fyvr171",lg:"fyvr172",xl:"fyvr173"},defaultClass:"fyvr170"},2:{conditions:{sm:"fyvr174",md:"fyvr175",lg:"fyvr176",xl:"fyvr177"},defaultClass:"fyvr174"},3:{conditions:{sm:"fyvr178",md:"fyvr179",lg:"fyvr17a",xl:"fyvr17b"},defaultClass:"fyvr178"},4:{conditions:{sm:"fyvr17c",md:"fyvr17d",lg:"fyvr17e",xl:"fyvr17f"},defaultClass:"fyvr17c"},5:{conditions:{sm:"fyvr17g",md:"fyvr17h",lg:"fyvr17i",xl:"fyvr17j"},defaultClass:"fyvr17g"},6:{conditions:{sm:"fyvr17k",md:"fyvr17l",lg:"fyvr17m",xl:"fyvr17n"},defaultClass:"fyvr17k"},7:{conditions:{sm:"fyvr17o",md:"fyvr17p",lg:"fyvr17q",xl:"fyvr17r"},defaultClass:"fyvr17o"},8:{conditions:{sm:"fyvr17s",md:"fyvr17t",lg:"fyvr17u",xl:"fyvr17v"},defaultClass:"fyvr17s"},9:{conditions:{sm:"fyvr17w",md:"fyvr17x",lg:"fyvr17y",xl:"fyvr17z"},defaultClass:"fyvr17w"},10:{conditions:{sm:"fyvr180",md:"fyvr181",lg:"fyvr182",xl:"fyvr183"},defaultClass:"fyvr180"},12:{conditions:{sm:"fyvr184",md:"fyvr185",lg:"fyvr186",xl:"fyvr187"},defaultClass:"fyvr184"},14:{conditions:{sm:"fyvr188",md:"fyvr189",lg:"fyvr18a",xl:"fyvr18b"},defaultClass:"fyvr188"},16:{conditions:{sm:"fyvr18c",md:"fyvr18d",lg:"fyvr18e",xl:"fyvr18f"},defaultClass:"fyvr18c"},"0.25":{conditions:{sm:"fyvr18g",md:"fyvr18h",lg:"fyvr18i",xl:"fyvr18j"},defaultClass:"fyvr18g"},"0.5":{conditions:{sm:"fyvr18k",md:"fyvr18l",lg:"fyvr18m",xl:"fyvr18n"},defaultClass:"fyvr18k"},"1.5":{conditions:{sm:"fyvr18o",md:"fyvr18p",lg:"fyvr18q",xl:"fyvr18r"},defaultClass:"fyvr18o"},none:{conditions:{sm:"fyvr18s",md:"fyvr18t",lg:"fyvr18u",xl:"fyvr18v"},defaultClass:"fyvr18s"},px:{conditions:{sm:"fyvr18w",md:"fyvr18x",lg:"fyvr18y",xl:"fyvr18z"},defaultClass:"fyvr18w"},auto:{conditions:{sm:"fyvr190",md:"fyvr191",lg:"fyvr192",xl:"fyvr193"},defaultClass:"fyvr190"},full:{conditions:{sm:"fyvr194",md:"fyvr195",lg:"fyvr196",xl:"fyvr197"},defaultClass:"fyvr194"},"1/2":{conditions:{sm:"fyvr198",md:"fyvr199",lg:"fyvr19a",xl:"fyvr19b"},defaultClass:"fyvr198"},"1/3":{conditions:{sm:"fyvr19c",md:"fyvr19d",lg:"fyvr19e",xl:"fyvr19f"},defaultClass:"fyvr19c"},"2/3":{conditions:{sm:"fyvr19g",md:"fyvr19h",lg:"fyvr19i",xl:"fyvr19j"},defaultClass:"fyvr19g"},"1/4":{conditions:{sm:"fyvr19k",md:"fyvr19l",lg:"fyvr19m",xl:"fyvr19n"},defaultClass:"fyvr19k"},"3/4":{conditions:{sm:"fyvr19o",md:"fyvr19p",lg:"fyvr19q",xl:"fyvr19r"},defaultClass:"fyvr19o"},fit:{conditions:{sm:"fyvr19s",md:"fyvr19t",lg:"fyvr19u",xl:"fyvr19v"},defaultClass:"fyvr19s"},max:{conditions:{sm:"fyvr19w",md:"fyvr19x",lg:"fyvr19y",xl:"fyvr19z"},defaultClass:"fyvr19w"},min:{conditions:{sm:"fyvr1a0",md:"fyvr1a1",lg:"fyvr1a2",xl:"fyvr1a3"},defaultClass:"fyvr1a0"},vw:{conditions:{sm:"fyvr1a4",md:"fyvr1a5",lg:"fyvr1a6",xl:"fyvr1a7"},defaultClass:"fyvr1a4"},vh:{conditions:{sm:"fyvr1a8",md:"fyvr1a9",lg:"fyvr1aa",xl:"fyvr1ab"},defaultClass:"fyvr1a8"}}},maxHeight:{values:{0:{conditions:{sm:"fyvr1ac",md:"fyvr1ad",lg:"fyvr1ae",xl:"fyvr1af"},defaultClass:"fyvr1ac"},1:{conditions:{sm:"fyvr1ag",md:"fyvr1ah",lg:"fyvr1ai",xl:"fyvr1aj"},defaultClass:"fyvr1ag"},2:{conditions:{sm:"fyvr1ak",md:"fyvr1al",lg:"fyvr1am",xl:"fyvr1an"},defaultClass:"fyvr1ak"},3:{conditions:{sm:"fyvr1ao",md:"fyvr1ap",lg:"fyvr1aq",xl:"fyvr1ar"},defaultClass:"fyvr1ao"},4:{conditions:{sm:"fyvr1as",md:"fyvr1at",lg:"fyvr1au",xl:"fyvr1av"},defaultClass:"fyvr1as"},5:{conditions:{sm:"fyvr1aw",md:"fyvr1ax",lg:"fyvr1ay",xl:"fyvr1az"},defaultClass:"fyvr1aw"},6:{conditions:{sm:"fyvr1b0",md:"fyvr1b1",lg:"fyvr1b2",xl:"fyvr1b3"},defaultClass:"fyvr1b0"},7:{conditions:{sm:"fyvr1b4",md:"fyvr1b5",lg:"fyvr1b6",xl:"fyvr1b7"},defaultClass:"fyvr1b4"},8:{conditions:{sm:"fyvr1b8",md:"fyvr1b9",lg:"fyvr1ba",xl:"fyvr1bb"},defaultClass:"fyvr1b8"},9:{conditions:{sm:"fyvr1bc",md:"fyvr1bd",lg:"fyvr1be",xl:"fyvr1bf"},defaultClass:"fyvr1bc"},10:{conditions:{sm:"fyvr1bg",md:"fyvr1bh",lg:"fyvr1bi",xl:"fyvr1bj"},defaultClass:"fyvr1bg"},12:{conditions:{sm:"fyvr1bk",md:"fyvr1bl",lg:"fyvr1bm",xl:"fyvr1bn"},defaultClass:"fyvr1bk"},14:{conditions:{sm:"fyvr1bo",md:"fyvr1bp",lg:"fyvr1bq",xl:"fyvr1br"},defaultClass:"fyvr1bo"},16:{conditions:{sm:"fyvr1bs",md:"fyvr1bt",lg:"fyvr1bu",xl:"fyvr1bv"},defaultClass:"fyvr1bs"},"0.25":{conditions:{sm:"fyvr1bw",md:"fyvr1bx",lg:"fyvr1by",xl:"fyvr1bz"},defaultClass:"fyvr1bw"},"0.5":{conditions:{sm:"fyvr1c0",md:"fyvr1c1",lg:"fyvr1c2",xl:"fyvr1c3"},defaultClass:"fyvr1c0"},"1.5":{conditions:{sm:"fyvr1c4",md:"fyvr1c5",lg:"fyvr1c6",xl:"fyvr1c7"},defaultClass:"fyvr1c4"},none:{conditions:{sm:"fyvr1c8",md:"fyvr1c9",lg:"fyvr1ca",xl:"fyvr1cb"},defaultClass:"fyvr1c8"},px:{conditions:{sm:"fyvr1cc",md:"fyvr1cd",lg:"fyvr1ce",xl:"fyvr1cf"},defaultClass:"fyvr1cc"},auto:{conditions:{sm:"fyvr1cg",md:"fyvr1ch",lg:"fyvr1ci",xl:"fyvr1cj"},defaultClass:"fyvr1cg"},full:{conditions:{sm:"fyvr1ck",md:"fyvr1cl",lg:"fyvr1cm",xl:"fyvr1cn"},defaultClass:"fyvr1ck"},"1/2":{conditions:{sm:"fyvr1co",md:"fyvr1cp",lg:"fyvr1cq",xl:"fyvr1cr"},defaultClass:"fyvr1co"},"1/3":{conditions:{sm:"fyvr1cs",md:"fyvr1ct",lg:"fyvr1cu",xl:"fyvr1cv"},defaultClass:"fyvr1cs"},"2/3":{conditions:{sm:"fyvr1cw",md:"fyvr1cx",lg:"fyvr1cy",xl:"fyvr1cz"},defaultClass:"fyvr1cw"},"1/4":{conditions:{sm:"fyvr1d0",md:"fyvr1d1",lg:"fyvr1d2",xl:"fyvr1d3"},defaultClass:"fyvr1d0"},"3/4":{conditions:{sm:"fyvr1d4",md:"fyvr1d5",lg:"fyvr1d6",xl:"fyvr1d7"},defaultClass:"fyvr1d4"},fit:{conditions:{sm:"fyvr1d8",md:"fyvr1d9",lg:"fyvr1da",xl:"fyvr1db"},defaultClass:"fyvr1d8"},max:{conditions:{sm:"fyvr1dc",md:"fyvr1dd",lg:"fyvr1de",xl:"fyvr1df"},defaultClass:"fyvr1dc"},min:{conditions:{sm:"fyvr1dg",md:"fyvr1dh",lg:"fyvr1di",xl:"fyvr1dj"},defaultClass:"fyvr1dg"},vw:{conditions:{sm:"fyvr1dk",md:"fyvr1dl",lg:"fyvr1dm",xl:"fyvr1dn"},defaultClass:"fyvr1dk"},vh:{conditions:{sm:"fyvr1do",md:"fyvr1dp",lg:"fyvr1dq",xl:"fyvr1dr"},defaultClass:"fyvr1do"}}},minWidth:{values:{0:{conditions:{sm:"fyvr1ds",md:"fyvr1dt",lg:"fyvr1du",xl:"fyvr1dv"},defaultClass:"fyvr1ds"},1:{conditions:{sm:"fyvr1dw",md:"fyvr1dx",lg:"fyvr1dy",xl:"fyvr1dz"},defaultClass:"fyvr1dw"},2:{conditions:{sm:"fyvr1e0",md:"fyvr1e1",lg:"fyvr1e2",xl:"fyvr1e3"},defaultClass:"fyvr1e0"},3:{conditions:{sm:"fyvr1e4",md:"fyvr1e5",lg:"fyvr1e6",xl:"fyvr1e7"},defaultClass:"fyvr1e4"},4:{conditions:{sm:"fyvr1e8",md:"fyvr1e9",lg:"fyvr1ea",xl:"fyvr1eb"},defaultClass:"fyvr1e8"},5:{conditions:{sm:"fyvr1ec",md:"fyvr1ed",lg:"fyvr1ee",xl:"fyvr1ef"},defaultClass:"fyvr1ec"},6:{conditions:{sm:"fyvr1eg",md:"fyvr1eh",lg:"fyvr1ei",xl:"fyvr1ej"},defaultClass:"fyvr1eg"},7:{conditions:{sm:"fyvr1ek",md:"fyvr1el",lg:"fyvr1em",xl:"fyvr1en"},defaultClass:"fyvr1ek"},8:{conditions:{sm:"fyvr1eo",md:"fyvr1ep",lg:"fyvr1eq",xl:"fyvr1er"},defaultClass:"fyvr1eo"},9:{conditions:{sm:"fyvr1es",md:"fyvr1et",lg:"fyvr1eu",xl:"fyvr1ev"},defaultClass:"fyvr1es"},10:{conditions:{sm:"fyvr1ew",md:"fyvr1ex",lg:"fyvr1ey",xl:"fyvr1ez"},defaultClass:"fyvr1ew"},12:{conditions:{sm:"fyvr1f0",md:"fyvr1f1",lg:"fyvr1f2",xl:"fyvr1f3"},defaultClass:"fyvr1f0"},14:{conditions:{sm:"fyvr1f4",md:"fyvr1f5",lg:"fyvr1f6",xl:"fyvr1f7"},defaultClass:"fyvr1f4"},16:{conditions:{sm:"fyvr1f8",md:"fyvr1f9",lg:"fyvr1fa",xl:"fyvr1fb"},defaultClass:"fyvr1f8"},"0.25":{conditions:{sm:"fyvr1fc",md:"fyvr1fd",lg:"fyvr1fe",xl:"fyvr1ff"},defaultClass:"fyvr1fc"},"0.5":{conditions:{sm:"fyvr1fg",md:"fyvr1fh",lg:"fyvr1fi",xl:"fyvr1fj"},defaultClass:"fyvr1fg"},"1.5":{conditions:{sm:"fyvr1fk",md:"fyvr1fl",lg:"fyvr1fm",xl:"fyvr1fn"},defaultClass:"fyvr1fk"},none:{conditions:{sm:"fyvr1fo",md:"fyvr1fp",lg:"fyvr1fq",xl:"fyvr1fr"},defaultClass:"fyvr1fo"},px:{conditions:{sm:"fyvr1fs",md:"fyvr1ft",lg:"fyvr1fu",xl:"fyvr1fv"},defaultClass:"fyvr1fs"},auto:{conditions:{sm:"fyvr1fw",md:"fyvr1fx",lg:"fyvr1fy",xl:"fyvr1fz"},defaultClass:"fyvr1fw"},full:{conditions:{sm:"fyvr1g0",md:"fyvr1g1",lg:"fyvr1g2",xl:"fyvr1g3"},defaultClass:"fyvr1g0"},"1/2":{conditions:{sm:"fyvr1g4",md:"fyvr1g5",lg:"fyvr1g6",xl:"fyvr1g7"},defaultClass:"fyvr1g4"},"1/3":{conditions:{sm:"fyvr1g8",md:"fyvr1g9",lg:"fyvr1ga",xl:"fyvr1gb"},defaultClass:"fyvr1g8"},"2/3":{conditions:{sm:"fyvr1gc",md:"fyvr1gd",lg:"fyvr1ge",xl:"fyvr1gf"},defaultClass:"fyvr1gc"},"1/4":{conditions:{sm:"fyvr1gg",md:"fyvr1gh",lg:"fyvr1gi",xl:"fyvr1gj"},defaultClass:"fyvr1gg"},"3/4":{conditions:{sm:"fyvr1gk",md:"fyvr1gl",lg:"fyvr1gm",xl:"fyvr1gn"},defaultClass:"fyvr1gk"},fit:{conditions:{sm:"fyvr1go",md:"fyvr1gp",lg:"fyvr1gq",xl:"fyvr1gr"},defaultClass:"fyvr1go"},max:{conditions:{sm:"fyvr1gs",md:"fyvr1gt",lg:"fyvr1gu",xl:"fyvr1gv"},defaultClass:"fyvr1gs"},min:{conditions:{sm:"fyvr1gw",md:"fyvr1gx",lg:"fyvr1gy",xl:"fyvr1gz"},defaultClass:"fyvr1gw"},vw:{conditions:{sm:"fyvr1h0",md:"fyvr1h1",lg:"fyvr1h2",xl:"fyvr1h3"},defaultClass:"fyvr1h0"},vh:{conditions:{sm:"fyvr1h4",md:"fyvr1h5",lg:"fyvr1h6",xl:"fyvr1h7"},defaultClass:"fyvr1h4"}}},minHeight:{values:{0:{conditions:{sm:"fyvr1h8",md:"fyvr1h9",lg:"fyvr1ha",xl:"fyvr1hb"},defaultClass:"fyvr1h8"},1:{conditions:{sm:"fyvr1hc",md:"fyvr1hd",lg:"fyvr1he",xl:"fyvr1hf"},defaultClass:"fyvr1hc"},2:{conditions:{sm:"fyvr1hg",md:"fyvr1hh",lg:"fyvr1hi",xl:"fyvr1hj"},defaultClass:"fyvr1hg"},3:{conditions:{sm:"fyvr1hk",md:"fyvr1hl",lg:"fyvr1hm",xl:"fyvr1hn"},defaultClass:"fyvr1hk"},4:{conditions:{sm:"fyvr1ho",md:"fyvr1hp",lg:"fyvr1hq",xl:"fyvr1hr"},defaultClass:"fyvr1ho"},5:{conditions:{sm:"fyvr1hs",md:"fyvr1ht",lg:"fyvr1hu",xl:"fyvr1hv"},defaultClass:"fyvr1hs"},6:{conditions:{sm:"fyvr1hw",md:"fyvr1hx",lg:"fyvr1hy",xl:"fyvr1hz"},defaultClass:"fyvr1hw"},7:{conditions:{sm:"fyvr1i0",md:"fyvr1i1",lg:"fyvr1i2",xl:"fyvr1i3"},defaultClass:"fyvr1i0"},8:{conditions:{sm:"fyvr1i4",md:"fyvr1i5",lg:"fyvr1i6",xl:"fyvr1i7"},defaultClass:"fyvr1i4"},9:{conditions:{sm:"fyvr1i8",md:"fyvr1i9",lg:"fyvr1ia",xl:"fyvr1ib"},defaultClass:"fyvr1i8"},10:{conditions:{sm:"fyvr1ic",md:"fyvr1id",lg:"fyvr1ie",xl:"fyvr1if"},defaultClass:"fyvr1ic"},12:{conditions:{sm:"fyvr1ig",md:"fyvr1ih",lg:"fyvr1ii",xl:"fyvr1ij"},defaultClass:"fyvr1ig"},14:{conditions:{sm:"fyvr1ik",md:"fyvr1il",lg:"fyvr1im",xl:"fyvr1in"},defaultClass:"fyvr1ik"},16:{conditions:{sm:"fyvr1io",md:"fyvr1ip",lg:"fyvr1iq",xl:"fyvr1ir"},defaultClass:"fyvr1io"},"0.25":{conditions:{sm:"fyvr1is",md:"fyvr1it",lg:"fyvr1iu",xl:"fyvr1iv"},defaultClass:"fyvr1is"},"0.5":{conditions:{sm:"fyvr1iw",md:"fyvr1ix",lg:"fyvr1iy",xl:"fyvr1iz"},defaultClass:"fyvr1iw"},"1.5":{conditions:{sm:"fyvr1j0",md:"fyvr1j1",lg:"fyvr1j2",xl:"fyvr1j3"},defaultClass:"fyvr1j0"},none:{conditions:{sm:"fyvr1j4",md:"fyvr1j5",lg:"fyvr1j6",xl:"fyvr1j7"},defaultClass:"fyvr1j4"},px:{conditions:{sm:"fyvr1j8",md:"fyvr1j9",lg:"fyvr1ja",xl:"fyvr1jb"},defaultClass:"fyvr1j8"},auto:{conditions:{sm:"fyvr1jc",md:"fyvr1jd",lg:"fyvr1je",xl:"fyvr1jf"},defaultClass:"fyvr1jc"},full:{conditions:{sm:"fyvr1jg",md:"fyvr1jh",lg:"fyvr1ji",xl:"fyvr1jj"},defaultClass:"fyvr1jg"},"1/2":{conditions:{sm:"fyvr1jk",md:"fyvr1jl",lg:"fyvr1jm",xl:"fyvr1jn"},defaultClass:"fyvr1jk"},"1/3":{conditions:{sm:"fyvr1jo",md:"fyvr1jp",lg:"fyvr1jq",xl:"fyvr1jr"},defaultClass:"fyvr1jo"},"2/3":{conditions:{sm:"fyvr1js",md:"fyvr1jt",lg:"fyvr1ju",xl:"fyvr1jv"},defaultClass:"fyvr1js"},"1/4":{conditions:{sm:"fyvr1jw",md:"fyvr1jx",lg:"fyvr1jy",xl:"fyvr1jz"},defaultClass:"fyvr1jw"},"3/4":{conditions:{sm:"fyvr1k0",md:"fyvr1k1",lg:"fyvr1k2",xl:"fyvr1k3"},defaultClass:"fyvr1k0"},fit:{conditions:{sm:"fyvr1k4",md:"fyvr1k5",lg:"fyvr1k6",xl:"fyvr1k7"},defaultClass:"fyvr1k4"},max:{conditions:{sm:"fyvr1k8",md:"fyvr1k9",lg:"fyvr1ka",xl:"fyvr1kb"},defaultClass:"fyvr1k8"},min:{conditions:{sm:"fyvr1kc",md:"fyvr1kd",lg:"fyvr1ke",xl:"fyvr1kf"},defaultClass:"fyvr1kc"},vw:{conditions:{sm:"fyvr1kg",md:"fyvr1kh",lg:"fyvr1ki",xl:"fyvr1kj"},defaultClass:"fyvr1kg"},vh:{conditions:{sm:"fyvr1kk",md:"fyvr1kl",lg:"fyvr1km",xl:"fyvr1kn"},defaultClass:"fyvr1kk"}}},top:{values:{0:{conditions:{sm:"fyvr1ko",md:"fyvr1kp",lg:"fyvr1kq",xl:"fyvr1kr"},defaultClass:"fyvr1ko"},1:{conditions:{sm:"fyvr1ks",md:"fyvr1kt",lg:"fyvr1ku",xl:"fyvr1kv"},defaultClass:"fyvr1ks"},2:{conditions:{sm:"fyvr1kw",md:"fyvr1kx",lg:"fyvr1ky",xl:"fyvr1kz"},defaultClass:"fyvr1kw"},3:{conditions:{sm:"fyvr1l0",md:"fyvr1l1",lg:"fyvr1l2",xl:"fyvr1l3"},defaultClass:"fyvr1l0"},4:{conditions:{sm:"fyvr1l4",md:"fyvr1l5",lg:"fyvr1l6",xl:"fyvr1l7"},defaultClass:"fyvr1l4"},5:{conditions:{sm:"fyvr1l8",md:"fyvr1l9",lg:"fyvr1la",xl:"fyvr1lb"},defaultClass:"fyvr1l8"},6:{conditions:{sm:"fyvr1lc",md:"fyvr1ld",lg:"fyvr1le",xl:"fyvr1lf"},defaultClass:"fyvr1lc"},7:{conditions:{sm:"fyvr1lg",md:"fyvr1lh",lg:"fyvr1li",xl:"fyvr1lj"},defaultClass:"fyvr1lg"},8:{conditions:{sm:"fyvr1lk",md:"fyvr1ll",lg:"fyvr1lm",xl:"fyvr1ln"},defaultClass:"fyvr1lk"},9:{conditions:{sm:"fyvr1lo",md:"fyvr1lp",lg:"fyvr1lq",xl:"fyvr1lr"},defaultClass:"fyvr1lo"},10:{conditions:{sm:"fyvr1ls",md:"fyvr1lt",lg:"fyvr1lu",xl:"fyvr1lv"},defaultClass:"fyvr1ls"},12:{conditions:{sm:"fyvr1lw",md:"fyvr1lx",lg:"fyvr1ly",xl:"fyvr1lz"},defaultClass:"fyvr1lw"},14:{conditions:{sm:"fyvr1m0",md:"fyvr1m1",lg:"fyvr1m2",xl:"fyvr1m3"},defaultClass:"fyvr1m0"},16:{conditions:{sm:"fyvr1m4",md:"fyvr1m5",lg:"fyvr1m6",xl:"fyvr1m7"},defaultClass:"fyvr1m4"},"0.25":{conditions:{sm:"fyvr1m8",md:"fyvr1m9",lg:"fyvr1ma",xl:"fyvr1mb"},defaultClass:"fyvr1m8"},"0.5":{conditions:{sm:"fyvr1mc",md:"fyvr1md",lg:"fyvr1me",xl:"fyvr1mf"},defaultClass:"fyvr1mc"},"1.5":{conditions:{sm:"fyvr1mg",md:"fyvr1mh",lg:"fyvr1mi",xl:"fyvr1mj"},defaultClass:"fyvr1mg"},auto:{conditions:{sm:"fyvr1mk",md:"fyvr1ml",lg:"fyvr1mm",xl:"fyvr1mn"},defaultClass:"fyvr1mk"}}},bottom:{values:{0:{conditions:{sm:"fyvr1mo",md:"fyvr1mp",lg:"fyvr1mq",xl:"fyvr1mr"},defaultClass:"fyvr1mo"},1:{conditions:{sm:"fyvr1ms",md:"fyvr1mt",lg:"fyvr1mu",xl:"fyvr1mv"},defaultClass:"fyvr1ms"},2:{conditions:{sm:"fyvr1mw",md:"fyvr1mx",lg:"fyvr1my",xl:"fyvr1mz"},defaultClass:"fyvr1mw"},3:{conditions:{sm:"fyvr1n0",md:"fyvr1n1",lg:"fyvr1n2",xl:"fyvr1n3"},defaultClass:"fyvr1n0"},4:{conditions:{sm:"fyvr1n4",md:"fyvr1n5",lg:"fyvr1n6",xl:"fyvr1n7"},defaultClass:"fyvr1n4"},5:{conditions:{sm:"fyvr1n8",md:"fyvr1n9",lg:"fyvr1na",xl:"fyvr1nb"},defaultClass:"fyvr1n8"},6:{conditions:{sm:"fyvr1nc",md:"fyvr1nd",lg:"fyvr1ne",xl:"fyvr1nf"},defaultClass:"fyvr1nc"},7:{conditions:{sm:"fyvr1ng",md:"fyvr1nh",lg:"fyvr1ni",xl:"fyvr1nj"},defaultClass:"fyvr1ng"},8:{conditions:{sm:"fyvr1nk",md:"fyvr1nl",lg:"fyvr1nm",xl:"fyvr1nn"},defaultClass:"fyvr1nk"},9:{conditions:{sm:"fyvr1no",md:"fyvr1np",lg:"fyvr1nq",xl:"fyvr1nr"},defaultClass:"fyvr1no"},10:{conditions:{sm:"fyvr1ns",md:"fyvr1nt",lg:"fyvr1nu",xl:"fyvr1nv"},defaultClass:"fyvr1ns"},12:{conditions:{sm:"fyvr1nw",md:"fyvr1nx",lg:"fyvr1ny",xl:"fyvr1nz"},defaultClass:"fyvr1nw"},14:{conditions:{sm:"fyvr1o0",md:"fyvr1o1",lg:"fyvr1o2",xl:"fyvr1o3"},defaultClass:"fyvr1o0"},16:{conditions:{sm:"fyvr1o4",md:"fyvr1o5",lg:"fyvr1o6",xl:"fyvr1o7"},defaultClass:"fyvr1o4"},"0.25":{conditions:{sm:"fyvr1o8",md:"fyvr1o9",lg:"fyvr1oa",xl:"fyvr1ob"},defaultClass:"fyvr1o8"},"0.5":{conditions:{sm:"fyvr1oc",md:"fyvr1od",lg:"fyvr1oe",xl:"fyvr1of"},defaultClass:"fyvr1oc"},"1.5":{conditions:{sm:"fyvr1og",md:"fyvr1oh",lg:"fyvr1oi",xl:"fyvr1oj"},defaultClass:"fyvr1og"},auto:{conditions:{sm:"fyvr1ok",md:"fyvr1ol",lg:"fyvr1om",xl:"fyvr1on"},defaultClass:"fyvr1ok"}}},left:{values:{0:{conditions:{sm:"fyvr1oo",md:"fyvr1op",lg:"fyvr1oq",xl:"fyvr1or"},defaultClass:"fyvr1oo"},1:{conditions:{sm:"fyvr1os",md:"fyvr1ot",lg:"fyvr1ou",xl:"fyvr1ov"},defaultClass:"fyvr1os"},2:{conditions:{sm:"fyvr1ow",md:"fyvr1ox",lg:"fyvr1oy",xl:"fyvr1oz"},defaultClass:"fyvr1ow"},3:{conditions:{sm:"fyvr1p0",md:"fyvr1p1",lg:"fyvr1p2",xl:"fyvr1p3"},defaultClass:"fyvr1p0"},4:{conditions:{sm:"fyvr1p4",md:"fyvr1p5",lg:"fyvr1p6",xl:"fyvr1p7"},defaultClass:"fyvr1p4"},5:{conditions:{sm:"fyvr1p8",md:"fyvr1p9",lg:"fyvr1pa",xl:"fyvr1pb"},defaultClass:"fyvr1p8"},6:{conditions:{sm:"fyvr1pc",md:"fyvr1pd",lg:"fyvr1pe",xl:"fyvr1pf"},defaultClass:"fyvr1pc"},7:{conditions:{sm:"fyvr1pg",md:"fyvr1ph",lg:"fyvr1pi",xl:"fyvr1pj"},defaultClass:"fyvr1pg"},8:{conditions:{sm:"fyvr1pk",md:"fyvr1pl",lg:"fyvr1pm",xl:"fyvr1pn"},defaultClass:"fyvr1pk"},9:{conditions:{sm:"fyvr1po",md:"fyvr1pp",lg:"fyvr1pq",xl:"fyvr1pr"},defaultClass:"fyvr1po"},10:{conditions:{sm:"fyvr1ps",md:"fyvr1pt",lg:"fyvr1pu",xl:"fyvr1pv"},defaultClass:"fyvr1ps"},12:{conditions:{sm:"fyvr1pw",md:"fyvr1px",lg:"fyvr1py",xl:"fyvr1pz"},defaultClass:"fyvr1pw"},14:{conditions:{sm:"fyvr1q0",md:"fyvr1q1",lg:"fyvr1q2",xl:"fyvr1q3"},defaultClass:"fyvr1q0"},16:{conditions:{sm:"fyvr1q4",md:"fyvr1q5",lg:"fyvr1q6",xl:"fyvr1q7"},defaultClass:"fyvr1q4"},"0.25":{conditions:{sm:"fyvr1q8",md:"fyvr1q9",lg:"fyvr1qa",xl:"fyvr1qb"},defaultClass:"fyvr1q8"},"0.5":{conditions:{sm:"fyvr1qc",md:"fyvr1qd",lg:"fyvr1qe",xl:"fyvr1qf"},defaultClass:"fyvr1qc"},"1.5":{conditions:{sm:"fyvr1qg",md:"fyvr1qh",lg:"fyvr1qi",xl:"fyvr1qj"},defaultClass:"fyvr1qg"},auto:{conditions:{sm:"fyvr1qk",md:"fyvr1ql",lg:"fyvr1qm",xl:"fyvr1qn"},defaultClass:"fyvr1qk"}}},right:{values:{0:{conditions:{sm:"fyvr1qo",md:"fyvr1qp",lg:"fyvr1qq",xl:"fyvr1qr"},defaultClass:"fyvr1qo"},1:{conditions:{sm:"fyvr1qs",md:"fyvr1qt",lg:"fyvr1qu",xl:"fyvr1qv"},defaultClass:"fyvr1qs"},2:{conditions:{sm:"fyvr1qw",md:"fyvr1qx",lg:"fyvr1qy",xl:"fyvr1qz"},defaultClass:"fyvr1qw"},3:{conditions:{sm:"fyvr1r0",md:"fyvr1r1",lg:"fyvr1r2",xl:"fyvr1r3"},defaultClass:"fyvr1r0"},4:{conditions:{sm:"fyvr1r4",md:"fyvr1r5",lg:"fyvr1r6",xl:"fyvr1r7"},defaultClass:"fyvr1r4"},5:{conditions:{sm:"fyvr1r8",md:"fyvr1r9",lg:"fyvr1ra",xl:"fyvr1rb"},defaultClass:"fyvr1r8"},6:{conditions:{sm:"fyvr1rc",md:"fyvr1rd",lg:"fyvr1re",xl:"fyvr1rf"},defaultClass:"fyvr1rc"},7:{conditions:{sm:"fyvr1rg",md:"fyvr1rh",lg:"fyvr1ri",xl:"fyvr1rj"},defaultClass:"fyvr1rg"},8:{conditions:{sm:"fyvr1rk",md:"fyvr1rl",lg:"fyvr1rm",xl:"fyvr1rn"},defaultClass:"fyvr1rk"},9:{conditions:{sm:"fyvr1ro",md:"fyvr1rp",lg:"fyvr1rq",xl:"fyvr1rr"},defaultClass:"fyvr1ro"},10:{conditions:{sm:"fyvr1rs",md:"fyvr1rt",lg:"fyvr1ru",xl:"fyvr1rv"},defaultClass:"fyvr1rs"},12:{conditions:{sm:"fyvr1rw",md:"fyvr1rx",lg:"fyvr1ry",xl:"fyvr1rz"},defaultClass:"fyvr1rw"},14:{conditions:{sm:"fyvr1s0",md:"fyvr1s1",lg:"fyvr1s2",xl:"fyvr1s3"},defaultClass:"fyvr1s0"},16:{conditions:{sm:"fyvr1s4",md:"fyvr1s5",lg:"fyvr1s6",xl:"fyvr1s7"},defaultClass:"fyvr1s4"},"0.25":{conditions:{sm:"fyvr1s8",md:"fyvr1s9",lg:"fyvr1sa",xl:"fyvr1sb"},defaultClass:"fyvr1s8"},"0.5":{conditions:{sm:"fyvr1sc",md:"fyvr1sd",lg:"fyvr1se",xl:"fyvr1sf"},defaultClass:"fyvr1sc"},"1.5":{conditions:{sm:"fyvr1sg",md:"fyvr1sh",lg:"fyvr1si",xl:"fyvr1sj"},defaultClass:"fyvr1sg"},auto:{conditions:{sm:"fyvr1sk",md:"fyvr1sl",lg:"fyvr1sm",xl:"fyvr1sn"},defaultClass:"fyvr1sk"}}},paddingTop:{values:{0:{conditions:{sm:"fyvr1so",md:"fyvr1sp",lg:"fyvr1sq",xl:"fyvr1sr"},defaultClass:"fyvr1so"},1:{conditions:{sm:"fyvr1ss",md:"fyvr1st",lg:"fyvr1su",xl:"fyvr1sv"},defaultClass:"fyvr1ss"},2:{conditions:{sm:"fyvr1sw",md:"fyvr1sx",lg:"fyvr1sy",xl:"fyvr1sz"},defaultClass:"fyvr1sw"},3:{conditions:{sm:"fyvr1t0",md:"fyvr1t1",lg:"fyvr1t2",xl:"fyvr1t3"},defaultClass:"fyvr1t0"},4:{conditions:{sm:"fyvr1t4",md:"fyvr1t5",lg:"fyvr1t6",xl:"fyvr1t7"},defaultClass:"fyvr1t4"},5:{conditions:{sm:"fyvr1t8",md:"fyvr1t9",lg:"fyvr1ta",xl:"fyvr1tb"},defaultClass:"fyvr1t8"},6:{conditions:{sm:"fyvr1tc",md:"fyvr1td",lg:"fyvr1te",xl:"fyvr1tf"},defaultClass:"fyvr1tc"},7:{conditions:{sm:"fyvr1tg",md:"fyvr1th",lg:"fyvr1ti",xl:"fyvr1tj"},defaultClass:"fyvr1tg"},8:{conditions:{sm:"fyvr1tk",md:"fyvr1tl",lg:"fyvr1tm",xl:"fyvr1tn"},defaultClass:"fyvr1tk"},9:{conditions:{sm:"fyvr1to",md:"fyvr1tp",lg:"fyvr1tq",xl:"fyvr1tr"},defaultClass:"fyvr1to"},10:{conditions:{sm:"fyvr1ts",md:"fyvr1tt",lg:"fyvr1tu",xl:"fyvr1tv"},defaultClass:"fyvr1ts"},12:{conditions:{sm:"fyvr1tw",md:"fyvr1tx",lg:"fyvr1ty",xl:"fyvr1tz"},defaultClass:"fyvr1tw"},14:{conditions:{sm:"fyvr1u0",md:"fyvr1u1",lg:"fyvr1u2",xl:"fyvr1u3"},defaultClass:"fyvr1u0"},16:{conditions:{sm:"fyvr1u4",md:"fyvr1u5",lg:"fyvr1u6",xl:"fyvr1u7"},defaultClass:"fyvr1u4"},"0.25":{conditions:{sm:"fyvr1u8",md:"fyvr1u9",lg:"fyvr1ua",xl:"fyvr1ub"},defaultClass:"fyvr1u8"},"0.5":{conditions:{sm:"fyvr1uc",md:"fyvr1ud",lg:"fyvr1ue",xl:"fyvr1uf"},defaultClass:"fyvr1uc"},"1.5":{conditions:{sm:"fyvr1ug",md:"fyvr1uh",lg:"fyvr1ui",xl:"fyvr1uj"},defaultClass:"fyvr1ug"}}},paddingBottom:{values:{0:{conditions:{sm:"fyvr1uk",md:"fyvr1ul",lg:"fyvr1um",xl:"fyvr1un"},defaultClass:"fyvr1uk"},1:{conditions:{sm:"fyvr1uo",md:"fyvr1up",lg:"fyvr1uq",xl:"fyvr1ur"},defaultClass:"fyvr1uo"},2:{conditions:{sm:"fyvr1us",md:"fyvr1ut",lg:"fyvr1uu",xl:"fyvr1uv"},defaultClass:"fyvr1us"},3:{conditions:{sm:"fyvr1uw",md:"fyvr1ux",lg:"fyvr1uy",xl:"fyvr1uz"},defaultClass:"fyvr1uw"},4:{conditions:{sm:"fyvr1v0",md:"fyvr1v1",lg:"fyvr1v2",xl:"fyvr1v3"},defaultClass:"fyvr1v0"},5:{conditions:{sm:"fyvr1v4",md:"fyvr1v5",lg:"fyvr1v6",xl:"fyvr1v7"},defaultClass:"fyvr1v4"},6:{conditions:{sm:"fyvr1v8",md:"fyvr1v9",lg:"fyvr1va",xl:"fyvr1vb"},defaultClass:"fyvr1v8"},7:{conditions:{sm:"fyvr1vc",md:"fyvr1vd",lg:"fyvr1ve",xl:"fyvr1vf"},defaultClass:"fyvr1vc"},8:{conditions:{sm:"fyvr1vg",md:"fyvr1vh",lg:"fyvr1vi",xl:"fyvr1vj"},defaultClass:"fyvr1vg"},9:{conditions:{sm:"fyvr1vk",md:"fyvr1vl",lg:"fyvr1vm",xl:"fyvr1vn"},defaultClass:"fyvr1vk"},10:{conditions:{sm:"fyvr1vo",md:"fyvr1vp",lg:"fyvr1vq",xl:"fyvr1vr"},defaultClass:"fyvr1vo"},12:{conditions:{sm:"fyvr1vs",md:"fyvr1vt",lg:"fyvr1vu",xl:"fyvr1vv"},defaultClass:"fyvr1vs"},14:{conditions:{sm:"fyvr1vw",md:"fyvr1vx",lg:"fyvr1vy",xl:"fyvr1vz"},defaultClass:"fyvr1vw"},16:{conditions:{sm:"fyvr1w0",md:"fyvr1w1",lg:"fyvr1w2",xl:"fyvr1w3"},defaultClass:"fyvr1w0"},"0.25":{conditions:{sm:"fyvr1w4",md:"fyvr1w5",lg:"fyvr1w6",xl:"fyvr1w7"},defaultClass:"fyvr1w4"},"0.5":{conditions:{sm:"fyvr1w8",md:"fyvr1w9",lg:"fyvr1wa",xl:"fyvr1wb"},defaultClass:"fyvr1w8"},"1.5":{conditions:{sm:"fyvr1wc",md:"fyvr1wd",lg:"fyvr1we",xl:"fyvr1wf"},defaultClass:"fyvr1wc"}}},paddingLeft:{values:{0:{conditions:{sm:"fyvr1wg",md:"fyvr1wh",lg:"fyvr1wi",xl:"fyvr1wj"},defaultClass:"fyvr1wg"},1:{conditions:{sm:"fyvr1wk",md:"fyvr1wl",lg:"fyvr1wm",xl:"fyvr1wn"},defaultClass:"fyvr1wk"},2:{conditions:{sm:"fyvr1wo",md:"fyvr1wp",lg:"fyvr1wq",xl:"fyvr1wr"},defaultClass:"fyvr1wo"},3:{conditions:{sm:"fyvr1ws",md:"fyvr1wt",lg:"fyvr1wu",xl:"fyvr1wv"},defaultClass:"fyvr1ws"},4:{conditions:{sm:"fyvr1ww",md:"fyvr1wx",lg:"fyvr1wy",xl:"fyvr1wz"},defaultClass:"fyvr1ww"},5:{conditions:{sm:"fyvr1x0",md:"fyvr1x1",lg:"fyvr1x2",xl:"fyvr1x3"},defaultClass:"fyvr1x0"},6:{conditions:{sm:"fyvr1x4",md:"fyvr1x5",lg:"fyvr1x6",xl:"fyvr1x7"},defaultClass:"fyvr1x4"},7:{conditions:{sm:"fyvr1x8",md:"fyvr1x9",lg:"fyvr1xa",xl:"fyvr1xb"},defaultClass:"fyvr1x8"},8:{conditions:{sm:"fyvr1xc",md:"fyvr1xd",lg:"fyvr1xe",xl:"fyvr1xf"},defaultClass:"fyvr1xc"},9:{conditions:{sm:"fyvr1xg",md:"fyvr1xh",lg:"fyvr1xi",xl:"fyvr1xj"},defaultClass:"fyvr1xg"},10:{conditions:{sm:"fyvr1xk",md:"fyvr1xl",lg:"fyvr1xm",xl:"fyvr1xn"},defaultClass:"fyvr1xk"},12:{conditions:{sm:"fyvr1xo",md:"fyvr1xp",lg:"fyvr1xq",xl:"fyvr1xr"},defaultClass:"fyvr1xo"},14:{conditions:{sm:"fyvr1xs",md:"fyvr1xt",lg:"fyvr1xu",xl:"fyvr1xv"},defaultClass:"fyvr1xs"},16:{conditions:{sm:"fyvr1xw",md:"fyvr1xx",lg:"fyvr1xy",xl:"fyvr1xz"},defaultClass:"fyvr1xw"},"0.25":{conditions:{sm:"fyvr1y0",md:"fyvr1y1",lg:"fyvr1y2",xl:"fyvr1y3"},defaultClass:"fyvr1y0"},"0.5":{conditions:{sm:"fyvr1y4",md:"fyvr1y5",lg:"fyvr1y6",xl:"fyvr1y7"},defaultClass:"fyvr1y4"},"1.5":{conditions:{sm:"fyvr1y8",md:"fyvr1y9",lg:"fyvr1ya",xl:"fyvr1yb"},defaultClass:"fyvr1y8"}}},paddingRight:{values:{0:{conditions:{sm:"fyvr1yc",md:"fyvr1yd",lg:"fyvr1ye",xl:"fyvr1yf"},defaultClass:"fyvr1yc"},1:{conditions:{sm:"fyvr1yg",md:"fyvr1yh",lg:"fyvr1yi",xl:"fyvr1yj"},defaultClass:"fyvr1yg"},2:{conditions:{sm:"fyvr1yk",md:"fyvr1yl",lg:"fyvr1ym",xl:"fyvr1yn"},defaultClass:"fyvr1yk"},3:{conditions:{sm:"fyvr1yo",md:"fyvr1yp",lg:"fyvr1yq",xl:"fyvr1yr"},defaultClass:"fyvr1yo"},4:{conditions:{sm:"fyvr1ys",md:"fyvr1yt",lg:"fyvr1yu",xl:"fyvr1yv"},defaultClass:"fyvr1ys"},5:{conditions:{sm:"fyvr1yw",md:"fyvr1yx",lg:"fyvr1yy",xl:"fyvr1yz"},defaultClass:"fyvr1yw"},6:{conditions:{sm:"fyvr1z0",md:"fyvr1z1",lg:"fyvr1z2",xl:"fyvr1z3"},defaultClass:"fyvr1z0"},7:{conditions:{sm:"fyvr1z4",md:"fyvr1z5",lg:"fyvr1z6",xl:"fyvr1z7"},defaultClass:"fyvr1z4"},8:{conditions:{sm:"fyvr1z8",md:"fyvr1z9",lg:"fyvr1za",xl:"fyvr1zb"},defaultClass:"fyvr1z8"},9:{conditions:{sm:"fyvr1zc",md:"fyvr1zd",lg:"fyvr1ze",xl:"fyvr1zf"},defaultClass:"fyvr1zc"},10:{conditions:{sm:"fyvr1zg",md:"fyvr1zh",lg:"fyvr1zi",xl:"fyvr1zj"},defaultClass:"fyvr1zg"},12:{conditions:{sm:"fyvr1zk",md:"fyvr1zl",lg:"fyvr1zm",xl:"fyvr1zn"},defaultClass:"fyvr1zk"},14:{conditions:{sm:"fyvr1zo",md:"fyvr1zp",lg:"fyvr1zq",xl:"fyvr1zr"},defaultClass:"fyvr1zo"},16:{conditions:{sm:"fyvr1zs",md:"fyvr1zt",lg:"fyvr1zu",xl:"fyvr1zv"},defaultClass:"fyvr1zs"},"0.25":{conditions:{sm:"fyvr1zw",md:"fyvr1zx",lg:"fyvr1zy",xl:"fyvr1zz"},defaultClass:"fyvr1zw"},"0.5":{conditions:{sm:"fyvr1100",md:"fyvr1101",lg:"fyvr1102",xl:"fyvr1103"},defaultClass:"fyvr1100"},"1.5":{conditions:{sm:"fyvr1104",md:"fyvr1105",lg:"fyvr1106",xl:"fyvr1107"},defaultClass:"fyvr1104"}}},marginTop:{values:{0:{conditions:{sm:"fyvr1108",md:"fyvr1109",lg:"fyvr110a",xl:"fyvr110b"},defaultClass:"fyvr1108"},1:{conditions:{sm:"fyvr110c",md:"fyvr110d",lg:"fyvr110e",xl:"fyvr110f"},defaultClass:"fyvr110c"},2:{conditions:{sm:"fyvr110g",md:"fyvr110h",lg:"fyvr110i",xl:"fyvr110j"},defaultClass:"fyvr110g"},3:{conditions:{sm:"fyvr110k",md:"fyvr110l",lg:"fyvr110m",xl:"fyvr110n"},defaultClass:"fyvr110k"},4:{conditions:{sm:"fyvr110o",md:"fyvr110p",lg:"fyvr110q",xl:"fyvr110r"},defaultClass:"fyvr110o"},5:{conditions:{sm:"fyvr110s",md:"fyvr110t",lg:"fyvr110u",xl:"fyvr110v"},defaultClass:"fyvr110s"},6:{conditions:{sm:"fyvr110w",md:"fyvr110x",lg:"fyvr110y",xl:"fyvr110z"},defaultClass:"fyvr110w"},7:{conditions:{sm:"fyvr1110",md:"fyvr1111",lg:"fyvr1112",xl:"fyvr1113"},defaultClass:"fyvr1110"},8:{conditions:{sm:"fyvr1114",md:"fyvr1115",lg:"fyvr1116",xl:"fyvr1117"},defaultClass:"fyvr1114"},9:{conditions:{sm:"fyvr1118",md:"fyvr1119",lg:"fyvr111a",xl:"fyvr111b"},defaultClass:"fyvr1118"},10:{conditions:{sm:"fyvr111c",md:"fyvr111d",lg:"fyvr111e",xl:"fyvr111f"},defaultClass:"fyvr111c"},12:{conditions:{sm:"fyvr111g",md:"fyvr111h",lg:"fyvr111i",xl:"fyvr111j"},defaultClass:"fyvr111g"},14:{conditions:{sm:"fyvr111k",md:"fyvr111l",lg:"fyvr111m",xl:"fyvr111n"},defaultClass:"fyvr111k"},16:{conditions:{sm:"fyvr111o",md:"fyvr111p",lg:"fyvr111q",xl:"fyvr111r"},defaultClass:"fyvr111o"},"0.25":{conditions:{sm:"fyvr111s",md:"fyvr111t",lg:"fyvr111u",xl:"fyvr111v"},defaultClass:"fyvr111s"},"0.5":{conditions:{sm:"fyvr111w",md:"fyvr111x",lg:"fyvr111y",xl:"fyvr111z"},defaultClass:"fyvr111w"},"1.5":{conditions:{sm:"fyvr1120",md:"fyvr1121",lg:"fyvr1122",xl:"fyvr1123"},defaultClass:"fyvr1120"},auto:{conditions:{sm:"fyvr1124",md:"fyvr1125",lg:"fyvr1126",xl:"fyvr1127"},defaultClass:"fyvr1124"}}},marginBottom:{values:{0:{conditions:{sm:"fyvr1128",md:"fyvr1129",lg:"fyvr112a",xl:"fyvr112b"},defaultClass:"fyvr1128"},1:{conditions:{sm:"fyvr112c",md:"fyvr112d",lg:"fyvr112e",xl:"fyvr112f"},defaultClass:"fyvr112c"},2:{conditions:{sm:"fyvr112g",md:"fyvr112h",lg:"fyvr112i",xl:"fyvr112j"},defaultClass:"fyvr112g"},3:{conditions:{sm:"fyvr112k",md:"fyvr112l",lg:"fyvr112m",xl:"fyvr112n"},defaultClass:"fyvr112k"},4:{conditions:{sm:"fyvr112o",md:"fyvr112p",lg:"fyvr112q",xl:"fyvr112r"},defaultClass:"fyvr112o"},5:{conditions:{sm:"fyvr112s",md:"fyvr112t",lg:"fyvr112u",xl:"fyvr112v"},defaultClass:"fyvr112s"},6:{conditions:{sm:"fyvr112w",md:"fyvr112x",lg:"fyvr112y",xl:"fyvr112z"},defaultClass:"fyvr112w"},7:{conditions:{sm:"fyvr1130",md:"fyvr1131",lg:"fyvr1132",xl:"fyvr1133"},defaultClass:"fyvr1130"},8:{conditions:{sm:"fyvr1134",md:"fyvr1135",lg:"fyvr1136",xl:"fyvr1137"},defaultClass:"fyvr1134"},9:{conditions:{sm:"fyvr1138",md:"fyvr1139",lg:"fyvr113a",xl:"fyvr113b"},defaultClass:"fyvr1138"},10:{conditions:{sm:"fyvr113c",md:"fyvr113d",lg:"fyvr113e",xl:"fyvr113f"},defaultClass:"fyvr113c"},12:{conditions:{sm:"fyvr113g",md:"fyvr113h",lg:"fyvr113i",xl:"fyvr113j"},defaultClass:"fyvr113g"},14:{conditions:{sm:"fyvr113k",md:"fyvr113l",lg:"fyvr113m",xl:"fyvr113n"},defaultClass:"fyvr113k"},16:{conditions:{sm:"fyvr113o",md:"fyvr113p",lg:"fyvr113q",xl:"fyvr113r"},defaultClass:"fyvr113o"},"0.25":{conditions:{sm:"fyvr113s",md:"fyvr113t",lg:"fyvr113u",xl:"fyvr113v"},defaultClass:"fyvr113s"},"0.5":{conditions:{sm:"fyvr113w",md:"fyvr113x",lg:"fyvr113y",xl:"fyvr113z"},defaultClass:"fyvr113w"},"1.5":{conditions:{sm:"fyvr1140",md:"fyvr1141",lg:"fyvr1142",xl:"fyvr1143"},defaultClass:"fyvr1140"},auto:{conditions:{sm:"fyvr1144",md:"fyvr1145",lg:"fyvr1146",xl:"fyvr1147"},defaultClass:"fyvr1144"}}},marginLeft:{values:{0:{conditions:{sm:"fyvr1148",md:"fyvr1149",lg:"fyvr114a",xl:"fyvr114b"},defaultClass:"fyvr1148"},1:{conditions:{sm:"fyvr114c",md:"fyvr114d",lg:"fyvr114e",xl:"fyvr114f"},defaultClass:"fyvr114c"},2:{conditions:{sm:"fyvr114g",md:"fyvr114h",lg:"fyvr114i",xl:"fyvr114j"},defaultClass:"fyvr114g"},3:{conditions:{sm:"fyvr114k",md:"fyvr114l",lg:"fyvr114m",xl:"fyvr114n"},defaultClass:"fyvr114k"},4:{conditions:{sm:"fyvr114o",md:"fyvr114p",lg:"fyvr114q",xl:"fyvr114r"},defaultClass:"fyvr114o"},5:{conditions:{sm:"fyvr114s",md:"fyvr114t",lg:"fyvr114u",xl:"fyvr114v"},defaultClass:"fyvr114s"},6:{conditions:{sm:"fyvr114w",md:"fyvr114x",lg:"fyvr114y",xl:"fyvr114z"},defaultClass:"fyvr114w"},7:{conditions:{sm:"fyvr1150",md:"fyvr1151",lg:"fyvr1152",xl:"fyvr1153"},defaultClass:"fyvr1150"},8:{conditions:{sm:"fyvr1154",md:"fyvr1155",lg:"fyvr1156",xl:"fyvr1157"},defaultClass:"fyvr1154"},9:{conditions:{sm:"fyvr1158",md:"fyvr1159",lg:"fyvr115a",xl:"fyvr115b"},defaultClass:"fyvr1158"},10:{conditions:{sm:"fyvr115c",md:"fyvr115d",lg:"fyvr115e",xl:"fyvr115f"},defaultClass:"fyvr115c"},12:{conditions:{sm:"fyvr115g",md:"fyvr115h",lg:"fyvr115i",xl:"fyvr115j"},defaultClass:"fyvr115g"},14:{conditions:{sm:"fyvr115k",md:"fyvr115l",lg:"fyvr115m",xl:"fyvr115n"},defaultClass:"fyvr115k"},16:{conditions:{sm:"fyvr115o",md:"fyvr115p",lg:"fyvr115q",xl:"fyvr115r"},defaultClass:"fyvr115o"},"0.25":{conditions:{sm:"fyvr115s",md:"fyvr115t",lg:"fyvr115u",xl:"fyvr115v"},defaultClass:"fyvr115s"},"0.5":{conditions:{sm:"fyvr115w",md:"fyvr115x",lg:"fyvr115y",xl:"fyvr115z"},defaultClass:"fyvr115w"},"1.5":{conditions:{sm:"fyvr1160",md:"fyvr1161",lg:"fyvr1162",xl:"fyvr1163"},defaultClass:"fyvr1160"},auto:{conditions:{sm:"fyvr1164",md:"fyvr1165",lg:"fyvr1166",xl:"fyvr1167"},defaultClass:"fyvr1164"}}},marginRight:{values:{0:{conditions:{sm:"fyvr1168",md:"fyvr1169",lg:"fyvr116a",xl:"fyvr116b"},defaultClass:"fyvr1168"},1:{conditions:{sm:"fyvr116c",md:"fyvr116d",lg:"fyvr116e",xl:"fyvr116f"},defaultClass:"fyvr116c"},2:{conditions:{sm:"fyvr116g",md:"fyvr116h",lg:"fyvr116i",xl:"fyvr116j"},defaultClass:"fyvr116g"},3:{conditions:{sm:"fyvr116k",md:"fyvr116l",lg:"fyvr116m",xl:"fyvr116n"},defaultClass:"fyvr116k"},4:{conditions:{sm:"fyvr116o",md:"fyvr116p",lg:"fyvr116q",xl:"fyvr116r"},defaultClass:"fyvr116o"},5:{conditions:{sm:"fyvr116s",md:"fyvr116t",lg:"fyvr116u",xl:"fyvr116v"},defaultClass:"fyvr116s"},6:{conditions:{sm:"fyvr116w",md:"fyvr116x",lg:"fyvr116y",xl:"fyvr116z"},defaultClass:"fyvr116w"},7:{conditions:{sm:"fyvr1170",md:"fyvr1171",lg:"fyvr1172",xl:"fyvr1173"},defaultClass:"fyvr1170"},8:{conditions:{sm:"fyvr1174",md:"fyvr1175",lg:"fyvr1176",xl:"fyvr1177"},defaultClass:"fyvr1174"},9:{conditions:{sm:"fyvr1178",md:"fyvr1179",lg:"fyvr117a",xl:"fyvr117b"},defaultClass:"fyvr1178"},10:{conditions:{sm:"fyvr117c",md:"fyvr117d",lg:"fyvr117e",xl:"fyvr117f"},defaultClass:"fyvr117c"},12:{conditions:{sm:"fyvr117g",md:"fyvr117h",lg:"fyvr117i",xl:"fyvr117j"},defaultClass:"fyvr117g"},14:{conditions:{sm:"fyvr117k",md:"fyvr117l",lg:"fyvr117m",xl:"fyvr117n"},defaultClass:"fyvr117k"},16:{conditions:{sm:"fyvr117o",md:"fyvr117p",lg:"fyvr117q",xl:"fyvr117r"},defaultClass:"fyvr117o"},"0.25":{conditions:{sm:"fyvr117s",md:"fyvr117t",lg:"fyvr117u",xl:"fyvr117v"},defaultClass:"fyvr117s"},"0.5":{conditions:{sm:"fyvr117w",md:"fyvr117x",lg:"fyvr117y",xl:"fyvr117z"},defaultClass:"fyvr117w"},"1.5":{conditions:{sm:"fyvr1180",md:"fyvr1181",lg:"fyvr1182",xl:"fyvr1183"},defaultClass:"fyvr1180"},auto:{conditions:{sm:"fyvr1184",md:"fyvr1185",lg:"fyvr1186",xl:"fyvr1187"},defaultClass:"fyvr1184"}}},gap:{values:{0:{conditions:{sm:"fyvr1188",md:"fyvr1189",lg:"fyvr118a",xl:"fyvr118b"},defaultClass:"fyvr1188"},1:{conditions:{sm:"fyvr118c",md:"fyvr118d",lg:"fyvr118e",xl:"fyvr118f"},defaultClass:"fyvr118c"},2:{conditions:{sm:"fyvr118g",md:"fyvr118h",lg:"fyvr118i",xl:"fyvr118j"},defaultClass:"fyvr118g"},3:{conditions:{sm:"fyvr118k",md:"fyvr118l",lg:"fyvr118m",xl:"fyvr118n"},defaultClass:"fyvr118k"},4:{conditions:{sm:"fyvr118o",md:"fyvr118p",lg:"fyvr118q",xl:"fyvr118r"},defaultClass:"fyvr118o"},5:{conditions:{sm:"fyvr118s",md:"fyvr118t",lg:"fyvr118u",xl:"fyvr118v"},defaultClass:"fyvr118s"},6:{conditions:{sm:"fyvr118w",md:"fyvr118x",lg:"fyvr118y",xl:"fyvr118z"},defaultClass:"fyvr118w"},7:{conditions:{sm:"fyvr1190",md:"fyvr1191",lg:"fyvr1192",xl:"fyvr1193"},defaultClass:"fyvr1190"},8:{conditions:{sm:"fyvr1194",md:"fyvr1195",lg:"fyvr1196",xl:"fyvr1197"},defaultClass:"fyvr1194"},9:{conditions:{sm:"fyvr1198",md:"fyvr1199",lg:"fyvr119a",xl:"fyvr119b"},defaultClass:"fyvr1198"},10:{conditions:{sm:"fyvr119c",md:"fyvr119d",lg:"fyvr119e",xl:"fyvr119f"},defaultClass:"fyvr119c"},12:{conditions:{sm:"fyvr119g",md:"fyvr119h",lg:"fyvr119i",xl:"fyvr119j"},defaultClass:"fyvr119g"},14:{conditions:{sm:"fyvr119k",md:"fyvr119l",lg:"fyvr119m",xl:"fyvr119n"},defaultClass:"fyvr119k"},16:{conditions:{sm:"fyvr119o",md:"fyvr119p",lg:"fyvr119q",xl:"fyvr119r"},defaultClass:"fyvr119o"},"0.25":{conditions:{sm:"fyvr119s",md:"fyvr119t",lg:"fyvr119u",xl:"fyvr119v"},defaultClass:"fyvr119s"},"0.5":{conditions:{sm:"fyvr119w",md:"fyvr119x",lg:"fyvr119y",xl:"fyvr119z"},defaultClass:"fyvr119w"},"1.5":{conditions:{sm:"fyvr11a0",md:"fyvr11a1",lg:"fyvr11a2",xl:"fyvr11a3"},defaultClass:"fyvr11a0"}}},borderBottomWidth:{values:{none:{conditions:{sm:"fyvr11a4",md:"fyvr11a5",lg:"fyvr11a6",xl:"fyvr11a7"},defaultClass:"fyvr11a4"},thin:{conditions:{sm:"fyvr11a8",md:"fyvr11a9",lg:"fyvr11aa",xl:"fyvr11ab"},defaultClass:"fyvr11a8"},thick:{conditions:{sm:"fyvr11ac",md:"fyvr11ad",lg:"fyvr11ae",xl:"fyvr11af"},defaultClass:"fyvr11ac"}}},borderLeftWidth:{values:{none:{conditions:{sm:"fyvr11ag",md:"fyvr11ah",lg:"fyvr11ai",xl:"fyvr11aj"},defaultClass:"fyvr11ag"},thin:{conditions:{sm:"fyvr11ak",md:"fyvr11al",lg:"fyvr11am",xl:"fyvr11an"},defaultClass:"fyvr11ak"},thick:{conditions:{sm:"fyvr11ao",md:"fyvr11ap",lg:"fyvr11aq",xl:"fyvr11ar"},defaultClass:"fyvr11ao"}}},borderRightWidth:{values:{none:{conditions:{sm:"fyvr11as",md:"fyvr11at",lg:"fyvr11au",xl:"fyvr11av"},defaultClass:"fyvr11as"},thin:{conditions:{sm:"fyvr11aw",md:"fyvr11ax",lg:"fyvr11ay",xl:"fyvr11az"},defaultClass:"fyvr11aw"},thick:{conditions:{sm:"fyvr11b0",md:"fyvr11b1",lg:"fyvr11b2",xl:"fyvr11b3"},defaultClass:"fyvr11b0"}}},borderTopWidth:{values:{none:{conditions:{sm:"fyvr11b4",md:"fyvr11b5",lg:"fyvr11b6",xl:"fyvr11b7"},defaultClass:"fyvr11b4"},thin:{conditions:{sm:"fyvr11b8",md:"fyvr11b9",lg:"fyvr11ba",xl:"fyvr11bb"},defaultClass:"fyvr11b8"},thick:{conditions:{sm:"fyvr11bc",md:"fyvr11bd",lg:"fyvr11be",xl:"fyvr11bf"},defaultClass:"fyvr11bc"}}},borderBottomLeftRadius:{values:{none:{conditions:{sm:"fyvr11bg",md:"fyvr11bh",lg:"fyvr11bi",xl:"fyvr11bj"},defaultClass:"fyvr11bg"},xs:{conditions:{sm:"fyvr11bk",md:"fyvr11bl",lg:"fyvr11bm",xl:"fyvr11bn"},defaultClass:"fyvr11bk"},sm:{conditions:{sm:"fyvr11bo",md:"fyvr11bp",lg:"fyvr11bq",xl:"fyvr11br"},defaultClass:"fyvr11bo"},md:{conditions:{sm:"fyvr11bs",md:"fyvr11bt",lg:"fyvr11bu",xl:"fyvr11bv"},defaultClass:"fyvr11bs"},lg:{conditions:{sm:"fyvr11bw",md:"fyvr11bx",lg:"fyvr11by",xl:"fyvr11bz"},defaultClass:"fyvr11bw"},circle:{conditions:{sm:"fyvr11c0",md:"fyvr11c1",lg:"fyvr11c2",xl:"fyvr11c3"},defaultClass:"fyvr11c0"}}},borderBottomRightRadius:{values:{none:{conditions:{sm:"fyvr11c4",md:"fyvr11c5",lg:"fyvr11c6",xl:"fyvr11c7"},defaultClass:"fyvr11c4"},xs:{conditions:{sm:"fyvr11c8",md:"fyvr11c9",lg:"fyvr11ca",xl:"fyvr11cb"},defaultClass:"fyvr11c8"},sm:{conditions:{sm:"fyvr11cc",md:"fyvr11cd",lg:"fyvr11ce",xl:"fyvr11cf"},defaultClass:"fyvr11cc"},md:{conditions:{sm:"fyvr11cg",md:"fyvr11ch",lg:"fyvr11ci",xl:"fyvr11cj"},defaultClass:"fyvr11cg"},lg:{conditions:{sm:"fyvr11ck",md:"fyvr11cl",lg:"fyvr11cm",xl:"fyvr11cn"},defaultClass:"fyvr11ck"},circle:{conditions:{sm:"fyvr11co",md:"fyvr11cp",lg:"fyvr11cq",xl:"fyvr11cr"},defaultClass:"fyvr11co"}}},borderTopLeftRadius:{values:{none:{conditions:{sm:"fyvr11cs",md:"fyvr11ct",lg:"fyvr11cu",xl:"fyvr11cv"},defaultClass:"fyvr11cs"},xs:{conditions:{sm:"fyvr11cw",md:"fyvr11cx",lg:"fyvr11cy",xl:"fyvr11cz"},defaultClass:"fyvr11cw"},sm:{conditions:{sm:"fyvr11d0",md:"fyvr11d1",lg:"fyvr11d2",xl:"fyvr11d3"},defaultClass:"fyvr11d0"},md:{conditions:{sm:"fyvr11d4",md:"fyvr11d5",lg:"fyvr11d6",xl:"fyvr11d7"},defaultClass:"fyvr11d4"},lg:{conditions:{sm:"fyvr11d8",md:"fyvr11d9",lg:"fyvr11da",xl:"fyvr11db"},defaultClass:"fyvr11d8"},circle:{conditions:{sm:"fyvr11dc",md:"fyvr11dd",lg:"fyvr11de",xl:"fyvr11df"},defaultClass:"fyvr11dc"}}},borderTopRightRadius:{values:{none:{conditions:{sm:"fyvr11dg",md:"fyvr11dh",lg:"fyvr11di",xl:"fyvr11dj"},defaultClass:"fyvr11dg"},xs:{conditions:{sm:"fyvr11dk",md:"fyvr11dl",lg:"fyvr11dm",xl:"fyvr11dn"},defaultClass:"fyvr11dk"},sm:{conditions:{sm:"fyvr11do",md:"fyvr11dp",lg:"fyvr11dq",xl:"fyvr11dr"},defaultClass:"fyvr11do"},md:{conditions:{sm:"fyvr11ds",md:"fyvr11dt",lg:"fyvr11du",xl:"fyvr11dv"},defaultClass:"fyvr11ds"},lg:{conditions:{sm:"fyvr11dw",md:"fyvr11dx",lg:"fyvr11dy",xl:"fyvr11dz"},defaultClass:"fyvr11dw"},circle:{conditions:{sm:"fyvr11e0",md:"fyvr11e1",lg:"fyvr11e2",xl:"fyvr11e3"},defaultClass:"fyvr11e0"}}},fontSize:{values:{inherit:{conditions:{sm:"fyvr11e4",md:"fyvr11e5",lg:"fyvr11e6",xl:"fyvr11e7"},defaultClass:"fyvr11e4"},xsmall:{conditions:{sm:"fyvr11e8",md:"fyvr11e9",lg:"fyvr11ea",xl:"fyvr11eb"},defaultClass:"fyvr11e8"},small:{conditions:{sm:"fyvr11ec",md:"fyvr11ed",lg:"fyvr11ee",xl:"fyvr11ef"},defaultClass:"fyvr11ec"},normal:{conditions:{sm:"fyvr11eg",md:"fyvr11eh",lg:"fyvr11ei",xl:"fyvr11ej"},defaultClass:"fyvr11eg"},medium:{conditions:{sm:"fyvr11ek",md:"fyvr11el",lg:"fyvr11em",xl:"fyvr11en"},defaultClass:"fyvr11ek"},large:{conditions:{sm:"fyvr11eo",md:"fyvr11ep",lg:"fyvr11eq",xl:"fyvr11er"},defaultClass:"fyvr11eo"},xlarge:{conditions:{sm:"fyvr11es",md:"fyvr11et",lg:"fyvr11eu",xl:"fyvr11ev"},defaultClass:"fyvr11es"}}},fontWeight:{values:{inherit:{conditions:{sm:"fyvr11ew",md:"fyvr11ex",lg:"fyvr11ey",xl:"fyvr11ez"},defaultClass:"fyvr11ew"},normal:{conditions:{sm:"fyvr11f0",md:"fyvr11f1",lg:"fyvr11f2",xl:"fyvr11f3"},defaultClass:"fyvr11f0"},medium:{conditions:{sm:"fyvr11f4",md:"fyvr11f5",lg:"fyvr11f6",xl:"fyvr11f7"},defaultClass:"fyvr11f4"},semibold:{conditions:{sm:"fyvr11f8",md:"fyvr11f9",lg:"fyvr11fa",xl:"fyvr11fb"},defaultClass:"fyvr11f8"},bold:{conditions:{sm:"fyvr11fc",md:"fyvr11fd",lg:"fyvr11fe",xl:"fyvr11ff"},defaultClass:"fyvr11fc"}}},letterSpacing:{values:{inherit:{conditions:{sm:"fyvr11fg",md:"fyvr11fh",lg:"fyvr11fi",xl:"fyvr11fj"},defaultClass:"fyvr11fg"},none:{conditions:{sm:"fyvr11fk",md:"fyvr11fl",lg:"fyvr11fm",xl:"fyvr11fn"},defaultClass:"fyvr11fk"},normal:{conditions:{sm:"fyvr11fo",md:"fyvr11fp",lg:"fyvr11fq",xl:"fyvr11fr"},defaultClass:"fyvr11fo"},wide:{conditions:{sm:"fyvr11fs",md:"fyvr11ft",lg:"fyvr11fu",xl:"fyvr11fv"},defaultClass:"fyvr11fs"}}},lineHeight:{values:{4:{conditions:{sm:"fyvr11fw",md:"fyvr11fx",lg:"fyvr11fy",xl:"fyvr11fz"},defaultClass:"fyvr11fw"},5:{conditions:{sm:"fyvr11g0",md:"fyvr11g1",lg:"fyvr11g2",xl:"fyvr11g3"},defaultClass:"fyvr11g0"},6:{conditions:{sm:"fyvr11g4",md:"fyvr11g5",lg:"fyvr11g6",xl:"fyvr11g7"},defaultClass:"fyvr11g4"},7:{conditions:{sm:"fyvr11g8",md:"fyvr11g9",lg:"fyvr11ga",xl:"fyvr11gb"},defaultClass:"fyvr11g8"},9:{conditions:{sm:"fyvr11gc",md:"fyvr11gd",lg:"fyvr11ge",xl:"fyvr11gf"},defaultClass:"fyvr11gc"},inherit:{conditions:{sm:"fyvr11gg",md:"fyvr11gh",lg:"fyvr11gi",xl:"fyvr11gj"},defaultClass:"fyvr11gg"}}},textAlign:{values:{center:{conditions:{sm:"fyvr11gk",md:"fyvr11gl",lg:"fyvr11gm",xl:"fyvr11gn"},defaultClass:"fyvr11gk"},left:{conditions:{sm:"fyvr11go",md:"fyvr11gp",lg:"fyvr11gq",xl:"fyvr11gr"},defaultClass:"fyvr11go"},right:{conditions:{sm:"fyvr11gs",md:"fyvr11gt",lg:"fyvr11gu",xl:"fyvr11gv"},defaultClass:"fyvr11gs"}}},display:{values:{block:{conditions:{sm:"fyvr11gw",md:"fyvr11gx",lg:"fyvr11gy",xl:"fyvr11gz"},defaultClass:"fyvr11gw"},flex:{conditions:{sm:"fyvr11h0",md:"fyvr11h1",lg:"fyvr11h2",xl:"fyvr11h3"},defaultClass:"fyvr11h0"},grid:{conditions:{sm:"fyvr11h4",md:"fyvr11h5",lg:"fyvr11h6",xl:"fyvr11h7"},defaultClass:"fyvr11h4"},"inline-block":{conditions:{sm:"fyvr11h8",md:"fyvr11h9",lg:"fyvr11ha",xl:"fyvr11hb"},defaultClass:"fyvr11h8"},"inline-flex":{conditions:{sm:"fyvr11hc",md:"fyvr11hd",lg:"fyvr11he",xl:"fyvr11hf"},defaultClass:"fyvr11hc"},none:{conditions:{sm:"fyvr11hg",md:"fyvr11hh",lg:"fyvr11hi",xl:"fyvr11hj"},defaultClass:"fyvr11hg"},contents:{conditions:{sm:"fyvr11hk",md:"fyvr11hl",lg:"fyvr11hm",xl:"fyvr11hn"},defaultClass:"fyvr11hk"}}},position:{values:{absolute:{conditions:{sm:"fyvr11ho",md:"fyvr11hp",lg:"fyvr11hq",xl:"fyvr11hr"},defaultClass:"fyvr11ho"},fixed:{conditions:{sm:"fyvr11hs",md:"fyvr11ht",lg:"fyvr11hu",xl:"fyvr11hv"},defaultClass:"fyvr11hs"},relative:{conditions:{sm:"fyvr11hw",md:"fyvr11hx",lg:"fyvr11hy",xl:"fyvr11hz"},defaultClass:"fyvr11hw"},sticky:{conditions:{sm:"fyvr11i0",md:"fyvr11i1",lg:"fyvr11i2",xl:"fyvr11i3"},defaultClass:"fyvr11i0"}}},flexDirection:{values:{column:{conditions:{sm:"fyvr11i4",md:"fyvr11i5",lg:"fyvr11i6",xl:"fyvr11i7"},defaultClass:"fyvr11i4"},"column-reverse":{conditions:{sm:"fyvr11i8",md:"fyvr11i9",lg:"fyvr11ia",xl:"fyvr11ib"},defaultClass:"fyvr11i8"},row:{conditions:{sm:"fyvr11ic",md:"fyvr11id",lg:"fyvr11ie",xl:"fyvr11if"},defaultClass:"fyvr11ic"},"row-reverse":{conditions:{sm:"fyvr11ig",md:"fyvr11ih",lg:"fyvr11ii",xl:"fyvr11ij"},defaultClass:"fyvr11ig"}}},flexShrink:{values:{0:{conditions:{sm:"fyvr11ik",md:"fyvr11il",lg:"fyvr11im",xl:"fyvr11in"},defaultClass:"fyvr11ik"},1:{conditions:{sm:"fyvr11io",md:"fyvr11ip",lg:"fyvr11iq",xl:"fyvr11ir"},defaultClass:"fyvr11io"}}},flexGrow:{values:{0:{conditions:{sm:"fyvr11is",md:"fyvr11it",lg:"fyvr11iu",xl:"fyvr11iv"},defaultClass:"fyvr11is"},1:{conditions:{sm:"fyvr11iw",md:"fyvr11ix",lg:"fyvr11iy",xl:"fyvr11iz"},defaultClass:"fyvr11iw"}}},flexWrap:{values:{nowrap:{conditions:{sm:"fyvr11j0",md:"fyvr11j1",lg:"fyvr11j2",xl:"fyvr11j3"},defaultClass:"fyvr11j0"},wrap:{conditions:{sm:"fyvr11j4",md:"fyvr11j5",lg:"fyvr11j6",xl:"fyvr11j7"},defaultClass:"fyvr11j4"},"wrap-reverse":{conditions:{sm:"fyvr11j8",md:"fyvr11j9",lg:"fyvr11ja",xl:"fyvr11jb"},defaultClass:"fyvr11j8"}}},justifyContent:{values:{"flex-start":{conditions:{sm:"fyvr11jc",md:"fyvr11jd",lg:"fyvr11je",xl:"fyvr11jf"},defaultClass:"fyvr11jc"},center:{conditions:{sm:"fyvr11jg",md:"fyvr11jh",lg:"fyvr11ji",xl:"fyvr11jj"},defaultClass:"fyvr11jg"},"flex-end":{conditions:{sm:"fyvr11jk",md:"fyvr11jl",lg:"fyvr11jm",xl:"fyvr11jn"},defaultClass:"fyvr11jk"},stretch:{conditions:{sm:"fyvr11jo",md:"fyvr11jp",lg:"fyvr11jq",xl:"fyvr11jr"},defaultClass:"fyvr11jo"},"space-around":{conditions:{sm:"fyvr11js",md:"fyvr11jt",lg:"fyvr11ju",xl:"fyvr11jv"},defaultClass:"fyvr11js"},"space-between":{conditions:{sm:"fyvr11jw",md:"fyvr11jx",lg:"fyvr11jy",xl:"fyvr11jz"},defaultClass:"fyvr11jw"},"space-evenly":{conditions:{sm:"fyvr11k0",md:"fyvr11k1",lg:"fyvr11k2",xl:"fyvr11k3"},defaultClass:"fyvr11k0"}}},justifySelf:{values:{"flex-start":{conditions:{sm:"fyvr11k4",md:"fyvr11k5",lg:"fyvr11k6",xl:"fyvr11k7"},defaultClass:"fyvr11k4"},center:{conditions:{sm:"fyvr11k8",md:"fyvr11k9",lg:"fyvr11ka",xl:"fyvr11kb"},defaultClass:"fyvr11k8"},"flex-end":{conditions:{sm:"fyvr11kc",md:"fyvr11kd",lg:"fyvr11ke",xl:"fyvr11kf"},defaultClass:"fyvr11kc"},stretch:{conditions:{sm:"fyvr11kg",md:"fyvr11kh",lg:"fyvr11ki",xl:"fyvr11kj"},defaultClass:"fyvr11kg"}}},alignItems:{values:{"flex-start":{conditions:{sm:"fyvr11kk",md:"fyvr11kl",lg:"fyvr11km",xl:"fyvr11kn"},defaultClass:"fyvr11kk"},center:{conditions:{sm:"fyvr11ko",md:"fyvr11kp",lg:"fyvr11kq",xl:"fyvr11kr"},defaultClass:"fyvr11ko"},"flex-end":{conditions:{sm:"fyvr11ks",md:"fyvr11kt",lg:"fyvr11ku",xl:"fyvr11kv"},defaultClass:"fyvr11ks"},stretch:{conditions:{sm:"fyvr11kw",md:"fyvr11kx",lg:"fyvr11ky",xl:"fyvr11kz"},defaultClass:"fyvr11kw"},baseline:{conditions:{sm:"fyvr11l0",md:"fyvr11l1",lg:"fyvr11l2",xl:"fyvr11l3"},defaultClass:"fyvr11l0"}}},alignSelf:{values:{"flex-start":{conditions:{sm:"fyvr11l4",md:"fyvr11l5",lg:"fyvr11l6",xl:"fyvr11l7"},defaultClass:"fyvr11l4"},center:{conditions:{sm:"fyvr11l8",md:"fyvr11l9",lg:"fyvr11la",xl:"fyvr11lb"},defaultClass:"fyvr11l8"},"flex-end":{conditions:{sm:"fyvr11lc",md:"fyvr11ld",lg:"fyvr11le",xl:"fyvr11lf"},defaultClass:"fyvr11lc"},stretch:{conditions:{sm:"fyvr11lg",md:"fyvr11lh",lg:"fyvr11li",xl:"fyvr11lj"},defaultClass:"fyvr11lg"},baseline:{conditions:{sm:"fyvr11lk",md:"fyvr11ll",lg:"fyvr11lm",xl:"fyvr11ln"},defaultClass:"fyvr11lk"}}},overflowX:{values:{auto:{conditions:{sm:"fyvr11lo",md:"fyvr11lp",lg:"fyvr11lq",xl:"fyvr11lr"},defaultClass:"fyvr11lo"},hidden:{conditions:{sm:"fyvr11ls",md:"fyvr11lt",lg:"fyvr11lu",xl:"fyvr11lv"},defaultClass:"fyvr11ls"},scroll:{conditions:{sm:"fyvr11lw",md:"fyvr11lx",lg:"fyvr11ly",xl:"fyvr11lz"},defaultClass:"fyvr11lw"},visible:{conditions:{sm:"fyvr11m0",md:"fyvr11m1",lg:"fyvr11m2",xl:"fyvr11m3"},defaultClass:"fyvr11m0"}}},overflowY:{values:{auto:{conditions:{sm:"fyvr11m4",md:"fyvr11m5",lg:"fyvr11m6",xl:"fyvr11m7"},defaultClass:"fyvr11m4"},hidden:{conditions:{sm:"fyvr11m8",md:"fyvr11m9",lg:"fyvr11ma",xl:"fyvr11mb"},defaultClass:"fyvr11m8"},scroll:{conditions:{sm:"fyvr11mc",md:"fyvr11md",lg:"fyvr11me",xl:"fyvr11mf"},defaultClass:"fyvr11mc"},visible:{conditions:{sm:"fyvr11mg",md:"fyvr11mh",lg:"fyvr11mi",xl:"fyvr11mj"},defaultClass:"fyvr11mg"}}},visibility:{values:{hidden:{conditions:{sm:"fyvr11mk",md:"fyvr11ml",lg:"fyvr11mm",xl:"fyvr11mn"},defaultClass:"fyvr11mk"},visible:{conditions:{sm:"fyvr11mo",md:"fyvr11mp",lg:"fyvr11mq",xl:"fyvr11mr"},defaultClass:"fyvr11mo"}}}}},{conditions:void 0,styles:{backdropFilter:{values:{blur:{defaultClass:"fyvr11ms"},none:{defaultClass:"fyvr11mt"}}},fontFamily:{values:{inherit:{defaultClass:"fyvr11mu"},body:{defaultClass:"fyvr11mv"},mono:{defaultClass:"fyvr11mw"}}},textOverflow:{values:{ellipsis:{defaultClass:"fyvr11mx"},clip:{defaultClass:"fyvr11my"}}},textTransform:{values:{capitalize:{defaultClass:"fyvr11mz"},lowercase:{defaultClass:"fyvr11n0"},uppercase:{defaultClass:"fyvr11n1"}}},userSelect:{values:{none:{defaultClass:"fyvr11n2"},text:{defaultClass:"fyvr11n3"},all:{defaultClass:"fyvr11n4"},auto:{defaultClass:"fyvr11n5"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11n6"},nowrap:{defaultClass:"fyvr11n7"},initial:{defaultClass:"fyvr11n8"},inherit:{defaultClass:"fyvr11n9"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11na"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11nb"},"break-word":{defaultClass:"fyvr11nc"},initial:{defaultClass:"fyvr11nd"},inherit:{defaultClass:"fyvr11ne"}}},zIndex:{values:{0:{defaultClass:"fyvr11nf"},1:{defaultClass:"fyvr11ng"},10:{defaultClass:"fyvr11nh"},20:{defaultClass:"fyvr11ni"},30:{defaultClass:"fyvr11nj"},40:{defaultClass:"fyvr11nk"},50:{defaultClass:"fyvr11nl"},"-1":{defaultClass:"fyvr11nm"},auto:{defaultClass:"fyvr11nn"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11no"},"16/9":{defaultClass:"fyvr11np"},"4/3":{defaultClass:"fyvr11nq"},"3/1":{defaultClass:"fyvr11nr"},auto:{defaultClass:"fyvr11ns"}}}}},{conditions:{defaultCondition:"base",conditionNames:["base","active","disabled","focus","hover","checked"],responsiveArray:void 0},styles:{borderColor:{mappings:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]},borderStyle:{mappings:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"]},focusRing:{mappings:["boxShadow","outline"]},background:{values:{black:{conditions:{base:"fyvr11nt",active:"fyvr11nu",disabled:"fyvr11nv",focus:"fyvr11nw",hover:"fyvr11nx",checked:"fyvr11ny"},defaultClass:"fyvr11nt"},white:{conditions:{base:"fyvr11nz",active:"fyvr11o0",disabled:"fyvr11o1",focus:"fyvr11o2",hover:"fyvr11o3",checked:"fyvr11o4"},defaultClass:"fyvr11nz"},inherit:{conditions:{base:"fyvr11o5",active:"fyvr11o6",disabled:"fyvr11o7",focus:"fyvr11o8",hover:"fyvr11o9",checked:"fyvr11oa"},defaultClass:"fyvr11o5"},transparent:{conditions:{base:"fyvr11ob",active:"fyvr11oc",disabled:"fyvr11od",focus:"fyvr11oe",hover:"fyvr11of",checked:"fyvr11og"},defaultClass:"fyvr11ob"},positive:{conditions:{base:"fyvr11oh",active:"fyvr11oi",disabled:"fyvr11oj",focus:"fyvr11ok",hover:"fyvr11ol",checked:"fyvr11om"},defaultClass:"fyvr11oh"},negative:{conditions:{base:"fyvr11on",active:"fyvr11oo",disabled:"fyvr11op",focus:"fyvr11oq",hover:"fyvr11or",checked:"fyvr11os"},defaultClass:"fyvr11on"},info:{conditions:{base:"fyvr11ot",active:"fyvr11ou",disabled:"fyvr11ov",focus:"fyvr11ow",hover:"fyvr11ox",checked:"fyvr11oy"},defaultClass:"fyvr11ot"},warning:{conditions:{base:"fyvr11oz",active:"fyvr11p0",disabled:"fyvr11p1",focus:"fyvr11p2",hover:"fyvr11p3",checked:"fyvr11p4"},defaultClass:"fyvr11oz"},gradientBackdrop:{conditions:{base:"fyvr11p5",active:"fyvr11p6",disabled:"fyvr11p7",focus:"fyvr11p8",hover:"fyvr11p9",checked:"fyvr11pa"},defaultClass:"fyvr11p5"},gradientPrimary:{conditions:{base:"fyvr11pb",active:"fyvr11pc",disabled:"fyvr11pd",focus:"fyvr11pe",hover:"fyvr11pf",checked:"fyvr11pg"},defaultClass:"fyvr11pb"},gradientSecondary:{conditions:{base:"fyvr11ph",active:"fyvr11pi",disabled:"fyvr11pj",focus:"fyvr11pk",hover:"fyvr11pl",checked:"fyvr11pm"},defaultClass:"fyvr11ph"},arbitrumDark:{conditions:{base:"fyvr11pn",active:"fyvr11po",disabled:"fyvr11pp",focus:"fyvr11pq",hover:"fyvr11pr",checked:"fyvr11ps"},defaultClass:"fyvr11pn"},arbitrumLight:{conditions:{base:"fyvr11pt",active:"fyvr11pu",disabled:"fyvr11pv",focus:"fyvr11pw",hover:"fyvr11px",checked:"fyvr11py"},defaultClass:"fyvr11pt"},avalanceDark:{conditions:{base:"fyvr11pz",active:"fyvr11q0",disabled:"fyvr11q1",focus:"fyvr11q2",hover:"fyvr11q3",checked:"fyvr11q4"},defaultClass:"fyvr11pz"},avalanceLight:{conditions:{base:"fyvr11q5",active:"fyvr11q6",disabled:"fyvr11q7",focus:"fyvr11q8",hover:"fyvr11q9",checked:"fyvr11qa"},defaultClass:"fyvr11q5"},bscDark:{conditions:{base:"fyvr11qb",active:"fyvr11qc",disabled:"fyvr11qd",focus:"fyvr11qe",hover:"fyvr11qf",checked:"fyvr11qg"},defaultClass:"fyvr11qb"},bscLight:{conditions:{base:"fyvr11qh",active:"fyvr11qi",disabled:"fyvr11qj",focus:"fyvr11qk",hover:"fyvr11ql",checked:"fyvr11qm"},defaultClass:"fyvr11qh"},ethereumDark:{conditions:{base:"fyvr11qn",active:"fyvr11qo",disabled:"fyvr11qp",focus:"fyvr11qq",hover:"fyvr11qr",checked:"fyvr11qs"},defaultClass:"fyvr11qn"},ethereumLight:{conditions:{base:"fyvr11qt",active:"fyvr11qu",disabled:"fyvr11qv",focus:"fyvr11qw",hover:"fyvr11qx",checked:"fyvr11qy"},defaultClass:"fyvr11qt"},gnosisDark:{conditions:{base:"fyvr11qz",active:"fyvr11r0",disabled:"fyvr11r1",focus:"fyvr11r2",hover:"fyvr11r3",checked:"fyvr11r4"},defaultClass:"fyvr11qz"},gnosisLight:{conditions:{base:"fyvr11r5",active:"fyvr11r6",disabled:"fyvr11r7",focus:"fyvr11r8",hover:"fyvr11r9",checked:"fyvr11ra"},defaultClass:"fyvr11r5"},polygonDark:{conditions:{base:"fyvr11rb",active:"fyvr11rc",disabled:"fyvr11rd",focus:"fyvr11re",hover:"fyvr11rf",checked:"fyvr11rg"},defaultClass:"fyvr11rb"},polygonLight:{conditions:{base:"fyvr11rh",active:"fyvr11ri",disabled:"fyvr11rj",focus:"fyvr11rk",hover:"fyvr11rl",checked:"fyvr11rm"},defaultClass:"fyvr11rh"},text100:{conditions:{base:"fyvr11rn",active:"fyvr11ro",disabled:"fyvr11rp",focus:"fyvr11rq",hover:"fyvr11rr",checked:"fyvr11rs"},defaultClass:"fyvr11rn"},text80:{conditions:{base:"fyvr11rt",active:"fyvr11ru",disabled:"fyvr11rv",focus:"fyvr11rw",hover:"fyvr11rx",checked:"fyvr11ry"},defaultClass:"fyvr11rt"},text50:{conditions:{base:"fyvr11rz",active:"fyvr11s0",disabled:"fyvr11s1",focus:"fyvr11s2",hover:"fyvr11s3",checked:"fyvr11s4"},defaultClass:"fyvr11rz"},textInverse100:{conditions:{base:"fyvr11s5",active:"fyvr11s6",disabled:"fyvr11s7",focus:"fyvr11s8",hover:"fyvr11s9",checked:"fyvr11sa"},defaultClass:"fyvr11s5"},backgroundPrimary:{conditions:{base:"fyvr11sb",active:"fyvr11sc",disabled:"fyvr11sd",focus:"fyvr11se",hover:"fyvr11sf",checked:"fyvr11sg"},defaultClass:"fyvr11sb"},backgroundSecondary:{conditions:{base:"fyvr11sh",active:"fyvr11si",disabled:"fyvr11sj",focus:"fyvr11sk",hover:"fyvr11sl",checked:"fyvr11sm"},defaultClass:"fyvr11sh"},backgroundContrast:{conditions:{base:"fyvr11sn",active:"fyvr11so",disabled:"fyvr11sp",focus:"fyvr11sq",hover:"fyvr11sr",checked:"fyvr11ss"},defaultClass:"fyvr11sn"},backgroundMuted:{conditions:{base:"fyvr11st",active:"fyvr11su",disabled:"fyvr11sv",focus:"fyvr11sw",hover:"fyvr11sx",checked:"fyvr11sy"},defaultClass:"fyvr11st"},backgroundControl:{conditions:{base:"fyvr11sz",active:"fyvr11t0",disabled:"fyvr11t1",focus:"fyvr11t2",hover:"fyvr11t3",checked:"fyvr11t4"},defaultClass:"fyvr11sz"},backgroundInverse:{conditions:{base:"fyvr11t5",active:"fyvr11t6",disabled:"fyvr11t7",focus:"fyvr11t8",hover:"fyvr11t9",checked:"fyvr11ta"},defaultClass:"fyvr11t5"},backgroundBackdrop:{conditions:{base:"fyvr11tb",active:"fyvr11tc",disabled:"fyvr11td",focus:"fyvr11te",hover:"fyvr11tf",checked:"fyvr11tg"},defaultClass:"fyvr11tb"},backgroundOverlay:{conditions:{base:"fyvr11th",active:"fyvr11ti",disabled:"fyvr11tj",focus:"fyvr11tk",hover:"fyvr11tl",checked:"fyvr11tm"},defaultClass:"fyvr11th"},backgroundRaised:{conditions:{base:"fyvr11tn",active:"fyvr11to",disabled:"fyvr11tp",focus:"fyvr11tq",hover:"fyvr11tr",checked:"fyvr11ts"},defaultClass:"fyvr11tn"},buttonGlass:{conditions:{base:"fyvr11tt",active:"fyvr11tu",disabled:"fyvr11tv",focus:"fyvr11tw",hover:"fyvr11tx",checked:"fyvr11ty"},defaultClass:"fyvr11tt"},buttonEmphasis:{conditions:{base:"fyvr11tz",active:"fyvr11u0",disabled:"fyvr11u1",focus:"fyvr11u2",hover:"fyvr11u3",checked:"fyvr11u4"},defaultClass:"fyvr11tz"},buttonInverse:{conditions:{base:"fyvr11u5",active:"fyvr11u6",disabled:"fyvr11u7",focus:"fyvr11u8",hover:"fyvr11u9",checked:"fyvr11ua"},defaultClass:"fyvr11u5"},borderNormal:{conditions:{base:"fyvr11ub",active:"fyvr11uc",disabled:"fyvr11ud",focus:"fyvr11ue",hover:"fyvr11uf",checked:"fyvr11ug"},defaultClass:"fyvr11ub"},borderFocus:{conditions:{base:"fyvr11uh",active:"fyvr11ui",disabled:"fyvr11uj",focus:"fyvr11uk",hover:"fyvr11ul",checked:"fyvr11um"},defaultClass:"fyvr11uh"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11un",active:"fyvr11uo",disabled:"fyvr11up",focus:"fyvr11uq",hover:"fyvr11ur",checked:"fyvr11us"},defaultClass:"fyvr11un"},white:{conditions:{base:"fyvr11ut",active:"fyvr11uu",disabled:"fyvr11uv",focus:"fyvr11uw",hover:"fyvr11ux",checked:"fyvr11uy"},defaultClass:"fyvr11ut"},inherit:{conditions:{base:"fyvr11uz",active:"fyvr11v0",disabled:"fyvr11v1",focus:"fyvr11v2",hover:"fyvr11v3",checked:"fyvr11v4"},defaultClass:"fyvr11uz"},transparent:{conditions:{base:"fyvr11v5",active:"fyvr11v6",disabled:"fyvr11v7",focus:"fyvr11v8",hover:"fyvr11v9",checked:"fyvr11va"},defaultClass:"fyvr11v5"},positive:{conditions:{base:"fyvr11vb",active:"fyvr11vc",disabled:"fyvr11vd",focus:"fyvr11ve",hover:"fyvr11vf",checked:"fyvr11vg"},defaultClass:"fyvr11vb"},negative:{conditions:{base:"fyvr11vh",active:"fyvr11vi",disabled:"fyvr11vj",focus:"fyvr11vk",hover:"fyvr11vl",checked:"fyvr11vm"},defaultClass:"fyvr11vh"},info:{conditions:{base:"fyvr11vn",active:"fyvr11vo",disabled:"fyvr11vp",focus:"fyvr11vq",hover:"fyvr11vr",checked:"fyvr11vs"},defaultClass:"fyvr11vn"},warning:{conditions:{base:"fyvr11vt",active:"fyvr11vu",disabled:"fyvr11vv",focus:"fyvr11vw",hover:"fyvr11vx",checked:"fyvr11vy"},defaultClass:"fyvr11vt"},gradientBackdrop:{conditions:{base:"fyvr11vz",active:"fyvr11w0",disabled:"fyvr11w1",focus:"fyvr11w2",hover:"fyvr11w3",checked:"fyvr11w4"},defaultClass:"fyvr11vz"},gradientPrimary:{conditions:{base:"fyvr11w5",active:"fyvr11w6",disabled:"fyvr11w7",focus:"fyvr11w8",hover:"fyvr11w9",checked:"fyvr11wa"},defaultClass:"fyvr11w5"},gradientSecondary:{conditions:{base:"fyvr11wb",active:"fyvr11wc",disabled:"fyvr11wd",focus:"fyvr11we",hover:"fyvr11wf",checked:"fyvr11wg"},defaultClass:"fyvr11wb"},arbitrumDark:{conditions:{base:"fyvr11wh",active:"fyvr11wi",disabled:"fyvr11wj",focus:"fyvr11wk",hover:"fyvr11wl",checked:"fyvr11wm"},defaultClass:"fyvr11wh"},arbitrumLight:{conditions:{base:"fyvr11wn",active:"fyvr11wo",disabled:"fyvr11wp",focus:"fyvr11wq",hover:"fyvr11wr",checked:"fyvr11ws"},defaultClass:"fyvr11wn"},avalanceDark:{conditions:{base:"fyvr11wt",active:"fyvr11wu",disabled:"fyvr11wv",focus:"fyvr11ww",hover:"fyvr11wx",checked:"fyvr11wy"},defaultClass:"fyvr11wt"},avalanceLight:{conditions:{base:"fyvr11wz",active:"fyvr11x0",disabled:"fyvr11x1",focus:"fyvr11x2",hover:"fyvr11x3",checked:"fyvr11x4"},defaultClass:"fyvr11wz"},bscDark:{conditions:{base:"fyvr11x5",active:"fyvr11x6",disabled:"fyvr11x7",focus:"fyvr11x8",hover:"fyvr11x9",checked:"fyvr11xa"},defaultClass:"fyvr11x5"},bscLight:{conditions:{base:"fyvr11xb",active:"fyvr11xc",disabled:"fyvr11xd",focus:"fyvr11xe",hover:"fyvr11xf",checked:"fyvr11xg"},defaultClass:"fyvr11xb"},ethereumDark:{conditions:{base:"fyvr11xh",active:"fyvr11xi",disabled:"fyvr11xj",focus:"fyvr11xk",hover:"fyvr11xl",checked:"fyvr11xm"},defaultClass:"fyvr11xh"},ethereumLight:{conditions:{base:"fyvr11xn",active:"fyvr11xo",disabled:"fyvr11xp",focus:"fyvr11xq",hover:"fyvr11xr",checked:"fyvr11xs"},defaultClass:"fyvr11xn"},gnosisDark:{conditions:{base:"fyvr11xt",active:"fyvr11xu",disabled:"fyvr11xv",focus:"fyvr11xw",hover:"fyvr11xx",checked:"fyvr11xy"},defaultClass:"fyvr11xt"},gnosisLight:{conditions:{base:"fyvr11xz",active:"fyvr11y0",disabled:"fyvr11y1",focus:"fyvr11y2",hover:"fyvr11y3",checked:"fyvr11y4"},defaultClass:"fyvr11xz"},polygonDark:{conditions:{base:"fyvr11y5",active:"fyvr11y6",disabled:"fyvr11y7",focus:"fyvr11y8",hover:"fyvr11y9",checked:"fyvr11ya"},defaultClass:"fyvr11y5"},polygonLight:{conditions:{base:"fyvr11yb",active:"fyvr11yc",disabled:"fyvr11yd",focus:"fyvr11ye",hover:"fyvr11yf",checked:"fyvr11yg"},defaultClass:"fyvr11yb"},text100:{conditions:{base:"fyvr11yh",active:"fyvr11yi",disabled:"fyvr11yj",focus:"fyvr11yk",hover:"fyvr11yl",checked:"fyvr11ym"},defaultClass:"fyvr11yh"},text80:{conditions:{base:"fyvr11yn",active:"fyvr11yo",disabled:"fyvr11yp",focus:"fyvr11yq",hover:"fyvr11yr",checked:"fyvr11ys"},defaultClass:"fyvr11yn"},text50:{conditions:{base:"fyvr11yt",active:"fyvr11yu",disabled:"fyvr11yv",focus:"fyvr11yw",hover:"fyvr11yx",checked:"fyvr11yy"},defaultClass:"fyvr11yt"},textInverse100:{conditions:{base:"fyvr11yz",active:"fyvr11z0",disabled:"fyvr11z1",focus:"fyvr11z2",hover:"fyvr11z3",checked:"fyvr11z4"},defaultClass:"fyvr11yz"},backgroundPrimary:{conditions:{base:"fyvr11z5",active:"fyvr11z6",disabled:"fyvr11z7",focus:"fyvr11z8",hover:"fyvr11z9",checked:"fyvr11za"},defaultClass:"fyvr11z5"},backgroundSecondary:{conditions:{base:"fyvr11zb",active:"fyvr11zc",disabled:"fyvr11zd",focus:"fyvr11ze",hover:"fyvr11zf",checked:"fyvr11zg"},defaultClass:"fyvr11zb"},backgroundContrast:{conditions:{base:"fyvr11zh",active:"fyvr11zi",disabled:"fyvr11zj",focus:"fyvr11zk",hover:"fyvr11zl",checked:"fyvr11zm"},defaultClass:"fyvr11zh"},backgroundMuted:{conditions:{base:"fyvr11zn",active:"fyvr11zo",disabled:"fyvr11zp",focus:"fyvr11zq",hover:"fyvr11zr",checked:"fyvr11zs"},defaultClass:"fyvr11zn"},backgroundControl:{conditions:{base:"fyvr11zt",active:"fyvr11zu",disabled:"fyvr11zv",focus:"fyvr11zw",hover:"fyvr11zx",checked:"fyvr11zy"},defaultClass:"fyvr11zt"},backgroundInverse:{conditions:{base:"fyvr11zz",active:"fyvr1200",disabled:"fyvr1201",focus:"fyvr1202",hover:"fyvr1203",checked:"fyvr1204"},defaultClass:"fyvr11zz"},backgroundBackdrop:{conditions:{base:"fyvr1205",active:"fyvr1206",disabled:"fyvr1207",focus:"fyvr1208",hover:"fyvr1209",checked:"fyvr120a"},defaultClass:"fyvr1205"},backgroundOverlay:{conditions:{base:"fyvr120b",active:"fyvr120c",disabled:"fyvr120d",focus:"fyvr120e",hover:"fyvr120f",checked:"fyvr120g"},defaultClass:"fyvr120b"},backgroundRaised:{conditions:{base:"fyvr120h",active:"fyvr120i",disabled:"fyvr120j",focus:"fyvr120k",hover:"fyvr120l",checked:"fyvr120m"},defaultClass:"fyvr120h"},buttonGlass:{conditions:{base:"fyvr120n",active:"fyvr120o",disabled:"fyvr120p",focus:"fyvr120q",hover:"fyvr120r",checked:"fyvr120s"},defaultClass:"fyvr120n"},buttonEmphasis:{conditions:{base:"fyvr120t",active:"fyvr120u",disabled:"fyvr120v",focus:"fyvr120w",hover:"fyvr120x",checked:"fyvr120y"},defaultClass:"fyvr120t"},buttonInverse:{conditions:{base:"fyvr120z",active:"fyvr1210",disabled:"fyvr1211",focus:"fyvr1212",hover:"fyvr1213",checked:"fyvr1214"},defaultClass:"fyvr120z"},borderNormal:{conditions:{base:"fyvr1215",active:"fyvr1216",disabled:"fyvr1217",focus:"fyvr1218",hover:"fyvr1219",checked:"fyvr121a"},defaultClass:"fyvr1215"},borderFocus:{conditions:{base:"fyvr121b",active:"fyvr121c",disabled:"fyvr121d",focus:"fyvr121e",hover:"fyvr121f",checked:"fyvr121g"},defaultClass:"fyvr121b"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr121h",active:"fyvr121i",disabled:"fyvr121j",focus:"fyvr121k",hover:"fyvr121l",checked:"fyvr121m"},defaultClass:"fyvr121h"},dashed:{conditions:{base:"fyvr121n",active:"fyvr121o",disabled:"fyvr121p",focus:"fyvr121q",hover:"fyvr121r",checked:"fyvr121s"},defaultClass:"fyvr121n"},dotted:{conditions:{base:"fyvr121t",active:"fyvr121u",disabled:"fyvr121v",focus:"fyvr121w",hover:"fyvr121x",checked:"fyvr121y"},defaultClass:"fyvr121t"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr121z",active:"fyvr1220",disabled:"fyvr1221",focus:"fyvr1222",hover:"fyvr1223",checked:"fyvr1224"},defaultClass:"fyvr121z"},white:{conditions:{base:"fyvr1225",active:"fyvr1226",disabled:"fyvr1227",focus:"fyvr1228",hover:"fyvr1229",checked:"fyvr122a"},defaultClass:"fyvr1225"},inherit:{conditions:{base:"fyvr122b",active:"fyvr122c",disabled:"fyvr122d",focus:"fyvr122e",hover:"fyvr122f",checked:"fyvr122g"},defaultClass:"fyvr122b"},transparent:{conditions:{base:"fyvr122h",active:"fyvr122i",disabled:"fyvr122j",focus:"fyvr122k",hover:"fyvr122l",checked:"fyvr122m"},defaultClass:"fyvr122h"},positive:{conditions:{base:"fyvr122n",active:"fyvr122o",disabled:"fyvr122p",focus:"fyvr122q",hover:"fyvr122r",checked:"fyvr122s"},defaultClass:"fyvr122n"},negative:{conditions:{base:"fyvr122t",active:"fyvr122u",disabled:"fyvr122v",focus:"fyvr122w",hover:"fyvr122x",checked:"fyvr122y"},defaultClass:"fyvr122t"},info:{conditions:{base:"fyvr122z",active:"fyvr1230",disabled:"fyvr1231",focus:"fyvr1232",hover:"fyvr1233",checked:"fyvr1234"},defaultClass:"fyvr122z"},warning:{conditions:{base:"fyvr1235",active:"fyvr1236",disabled:"fyvr1237",focus:"fyvr1238",hover:"fyvr1239",checked:"fyvr123a"},defaultClass:"fyvr1235"},gradientBackdrop:{conditions:{base:"fyvr123b",active:"fyvr123c",disabled:"fyvr123d",focus:"fyvr123e",hover:"fyvr123f",checked:"fyvr123g"},defaultClass:"fyvr123b"},gradientPrimary:{conditions:{base:"fyvr123h",active:"fyvr123i",disabled:"fyvr123j",focus:"fyvr123k",hover:"fyvr123l",checked:"fyvr123m"},defaultClass:"fyvr123h"},gradientSecondary:{conditions:{base:"fyvr123n",active:"fyvr123o",disabled:"fyvr123p",focus:"fyvr123q",hover:"fyvr123r",checked:"fyvr123s"},defaultClass:"fyvr123n"},arbitrumDark:{conditions:{base:"fyvr123t",active:"fyvr123u",disabled:"fyvr123v",focus:"fyvr123w",hover:"fyvr123x",checked:"fyvr123y"},defaultClass:"fyvr123t"},arbitrumLight:{conditions:{base:"fyvr123z",active:"fyvr1240",disabled:"fyvr1241",focus:"fyvr1242",hover:"fyvr1243",checked:"fyvr1244"},defaultClass:"fyvr123z"},avalanceDark:{conditions:{base:"fyvr1245",active:"fyvr1246",disabled:"fyvr1247",focus:"fyvr1248",hover:"fyvr1249",checked:"fyvr124a"},defaultClass:"fyvr1245"},avalanceLight:{conditions:{base:"fyvr124b",active:"fyvr124c",disabled:"fyvr124d",focus:"fyvr124e",hover:"fyvr124f",checked:"fyvr124g"},defaultClass:"fyvr124b"},bscDark:{conditions:{base:"fyvr124h",active:"fyvr124i",disabled:"fyvr124j",focus:"fyvr124k",hover:"fyvr124l",checked:"fyvr124m"},defaultClass:"fyvr124h"},bscLight:{conditions:{base:"fyvr124n",active:"fyvr124o",disabled:"fyvr124p",focus:"fyvr124q",hover:"fyvr124r",checked:"fyvr124s"},defaultClass:"fyvr124n"},ethereumDark:{conditions:{base:"fyvr124t",active:"fyvr124u",disabled:"fyvr124v",focus:"fyvr124w",hover:"fyvr124x",checked:"fyvr124y"},defaultClass:"fyvr124t"},ethereumLight:{conditions:{base:"fyvr124z",active:"fyvr1250",disabled:"fyvr1251",focus:"fyvr1252",hover:"fyvr1253",checked:"fyvr1254"},defaultClass:"fyvr124z"},gnosisDark:{conditions:{base:"fyvr1255",active:"fyvr1256",disabled:"fyvr1257",focus:"fyvr1258",hover:"fyvr1259",checked:"fyvr125a"},defaultClass:"fyvr1255"},gnosisLight:{conditions:{base:"fyvr125b",active:"fyvr125c",disabled:"fyvr125d",focus:"fyvr125e",hover:"fyvr125f",checked:"fyvr125g"},defaultClass:"fyvr125b"},polygonDark:{conditions:{base:"fyvr125h",active:"fyvr125i",disabled:"fyvr125j",focus:"fyvr125k",hover:"fyvr125l",checked:"fyvr125m"},defaultClass:"fyvr125h"},polygonLight:{conditions:{base:"fyvr125n",active:"fyvr125o",disabled:"fyvr125p",focus:"fyvr125q",hover:"fyvr125r",checked:"fyvr125s"},defaultClass:"fyvr125n"},text100:{conditions:{base:"fyvr125t",active:"fyvr125u",disabled:"fyvr125v",focus:"fyvr125w",hover:"fyvr125x",checked:"fyvr125y"},defaultClass:"fyvr125t"},text80:{conditions:{base:"fyvr125z",active:"fyvr1260",disabled:"fyvr1261",focus:"fyvr1262",hover:"fyvr1263",checked:"fyvr1264"},defaultClass:"fyvr125z"},text50:{conditions:{base:"fyvr1265",active:"fyvr1266",disabled:"fyvr1267",focus:"fyvr1268",hover:"fyvr1269",checked:"fyvr126a"},defaultClass:"fyvr1265"},textInverse100:{conditions:{base:"fyvr126b",active:"fyvr126c",disabled:"fyvr126d",focus:"fyvr126e",hover:"fyvr126f",checked:"fyvr126g"},defaultClass:"fyvr126b"},backgroundPrimary:{conditions:{base:"fyvr126h",active:"fyvr126i",disabled:"fyvr126j",focus:"fyvr126k",hover:"fyvr126l",checked:"fyvr126m"},defaultClass:"fyvr126h"},backgroundSecondary:{conditions:{base:"fyvr126n",active:"fyvr126o",disabled:"fyvr126p",focus:"fyvr126q",hover:"fyvr126r",checked:"fyvr126s"},defaultClass:"fyvr126n"},backgroundContrast:{conditions:{base:"fyvr126t",active:"fyvr126u",disabled:"fyvr126v",focus:"fyvr126w",hover:"fyvr126x",checked:"fyvr126y"},defaultClass:"fyvr126t"},backgroundMuted:{conditions:{base:"fyvr126z",active:"fyvr1270",disabled:"fyvr1271",focus:"fyvr1272",hover:"fyvr1273",checked:"fyvr1274"},defaultClass:"fyvr126z"},backgroundControl:{conditions:{base:"fyvr1275",active:"fyvr1276",disabled:"fyvr1277",focus:"fyvr1278",hover:"fyvr1279",checked:"fyvr127a"},defaultClass:"fyvr1275"},backgroundInverse:{conditions:{base:"fyvr127b",active:"fyvr127c",disabled:"fyvr127d",focus:"fyvr127e",hover:"fyvr127f",checked:"fyvr127g"},defaultClass:"fyvr127b"},backgroundBackdrop:{conditions:{base:"fyvr127h",active:"fyvr127i",disabled:"fyvr127j",focus:"fyvr127k",hover:"fyvr127l",checked:"fyvr127m"},defaultClass:"fyvr127h"},backgroundOverlay:{conditions:{base:"fyvr127n",active:"fyvr127o",disabled:"fyvr127p",focus:"fyvr127q",hover:"fyvr127r",checked:"fyvr127s"},defaultClass:"fyvr127n"},backgroundRaised:{conditions:{base:"fyvr127t",active:"fyvr127u",disabled:"fyvr127v",focus:"fyvr127w",hover:"fyvr127x",checked:"fyvr127y"},defaultClass:"fyvr127t"},buttonGlass:{conditions:{base:"fyvr127z",active:"fyvr1280",disabled:"fyvr1281",focus:"fyvr1282",hover:"fyvr1283",checked:"fyvr1284"},defaultClass:"fyvr127z"},buttonEmphasis:{conditions:{base:"fyvr1285",active:"fyvr1286",disabled:"fyvr1287",focus:"fyvr1288",hover:"fyvr1289",checked:"fyvr128a"},defaultClass:"fyvr1285"},buttonInverse:{conditions:{base:"fyvr128b",active:"fyvr128c",disabled:"fyvr128d",focus:"fyvr128e",hover:"fyvr128f",checked:"fyvr128g"},defaultClass:"fyvr128b"},borderNormal:{conditions:{base:"fyvr128h",active:"fyvr128i",disabled:"fyvr128j",focus:"fyvr128k",hover:"fyvr128l",checked:"fyvr128m"},defaultClass:"fyvr128h"},borderFocus:{conditions:{base:"fyvr128n",active:"fyvr128o",disabled:"fyvr128p",focus:"fyvr128q",hover:"fyvr128r",checked:"fyvr128s"},defaultClass:"fyvr128n"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128t",active:"fyvr128u",disabled:"fyvr128v",focus:"fyvr128w",hover:"fyvr128x",checked:"fyvr128y"},defaultClass:"fyvr128t"},dashed:{conditions:{base:"fyvr128z",active:"fyvr1290",disabled:"fyvr1291",focus:"fyvr1292",hover:"fyvr1293",checked:"fyvr1294"},defaultClass:"fyvr128z"},dotted:{conditions:{base:"fyvr1295",active:"fyvr1296",disabled:"fyvr1297",focus:"fyvr1298",hover:"fyvr1299",checked:"fyvr129a"},defaultClass:"fyvr1295"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr129b",active:"fyvr129c",disabled:"fyvr129d",focus:"fyvr129e",hover:"fyvr129f",checked:"fyvr129g"},defaultClass:"fyvr129b"},white:{conditions:{base:"fyvr129h",active:"fyvr129i",disabled:"fyvr129j",focus:"fyvr129k",hover:"fyvr129l",checked:"fyvr129m"},defaultClass:"fyvr129h"},inherit:{conditions:{base:"fyvr129n",active:"fyvr129o",disabled:"fyvr129p",focus:"fyvr129q",hover:"fyvr129r",checked:"fyvr129s"},defaultClass:"fyvr129n"},transparent:{conditions:{base:"fyvr129t",active:"fyvr129u",disabled:"fyvr129v",focus:"fyvr129w",hover:"fyvr129x",checked:"fyvr129y"},defaultClass:"fyvr129t"},positive:{conditions:{base:"fyvr129z",active:"fyvr12a0",disabled:"fyvr12a1",focus:"fyvr12a2",hover:"fyvr12a3",checked:"fyvr12a4"},defaultClass:"fyvr129z"},negative:{conditions:{base:"fyvr12a5",active:"fyvr12a6",disabled:"fyvr12a7",focus:"fyvr12a8",hover:"fyvr12a9",checked:"fyvr12aa"},defaultClass:"fyvr12a5"},info:{conditions:{base:"fyvr12ab",active:"fyvr12ac",disabled:"fyvr12ad",focus:"fyvr12ae",hover:"fyvr12af",checked:"fyvr12ag"},defaultClass:"fyvr12ab"},warning:{conditions:{base:"fyvr12ah",active:"fyvr12ai",disabled:"fyvr12aj",focus:"fyvr12ak",hover:"fyvr12al",checked:"fyvr12am"},defaultClass:"fyvr12ah"},gradientBackdrop:{conditions:{base:"fyvr12an",active:"fyvr12ao",disabled:"fyvr12ap",focus:"fyvr12aq",hover:"fyvr12ar",checked:"fyvr12as"},defaultClass:"fyvr12an"},gradientPrimary:{conditions:{base:"fyvr12at",active:"fyvr12au",disabled:"fyvr12av",focus:"fyvr12aw",hover:"fyvr12ax",checked:"fyvr12ay"},defaultClass:"fyvr12at"},gradientSecondary:{conditions:{base:"fyvr12az",active:"fyvr12b0",disabled:"fyvr12b1",focus:"fyvr12b2",hover:"fyvr12b3",checked:"fyvr12b4"},defaultClass:"fyvr12az"},arbitrumDark:{conditions:{base:"fyvr12b5",active:"fyvr12b6",disabled:"fyvr12b7",focus:"fyvr12b8",hover:"fyvr12b9",checked:"fyvr12ba"},defaultClass:"fyvr12b5"},arbitrumLight:{conditions:{base:"fyvr12bb",active:"fyvr12bc",disabled:"fyvr12bd",focus:"fyvr12be",hover:"fyvr12bf",checked:"fyvr12bg"},defaultClass:"fyvr12bb"},avalanceDark:{conditions:{base:"fyvr12bh",active:"fyvr12bi",disabled:"fyvr12bj",focus:"fyvr12bk",hover:"fyvr12bl",checked:"fyvr12bm"},defaultClass:"fyvr12bh"},avalanceLight:{conditions:{base:"fyvr12bn",active:"fyvr12bo",disabled:"fyvr12bp",focus:"fyvr12bq",hover:"fyvr12br",checked:"fyvr12bs"},defaultClass:"fyvr12bn"},bscDark:{conditions:{base:"fyvr12bt",active:"fyvr12bu",disabled:"fyvr12bv",focus:"fyvr12bw",hover:"fyvr12bx",checked:"fyvr12by"},defaultClass:"fyvr12bt"},bscLight:{conditions:{base:"fyvr12bz",active:"fyvr12c0",disabled:"fyvr12c1",focus:"fyvr12c2",hover:"fyvr12c3",checked:"fyvr12c4"},defaultClass:"fyvr12bz"},ethereumDark:{conditions:{base:"fyvr12c5",active:"fyvr12c6",disabled:"fyvr12c7",focus:"fyvr12c8",hover:"fyvr12c9",checked:"fyvr12ca"},defaultClass:"fyvr12c5"},ethereumLight:{conditions:{base:"fyvr12cb",active:"fyvr12cc",disabled:"fyvr12cd",focus:"fyvr12ce",hover:"fyvr12cf",checked:"fyvr12cg"},defaultClass:"fyvr12cb"},gnosisDark:{conditions:{base:"fyvr12ch",active:"fyvr12ci",disabled:"fyvr12cj",focus:"fyvr12ck",hover:"fyvr12cl",checked:"fyvr12cm"},defaultClass:"fyvr12ch"},gnosisLight:{conditions:{base:"fyvr12cn",active:"fyvr12co",disabled:"fyvr12cp",focus:"fyvr12cq",hover:"fyvr12cr",checked:"fyvr12cs"},defaultClass:"fyvr12cn"},polygonDark:{conditions:{base:"fyvr12ct",active:"fyvr12cu",disabled:"fyvr12cv",focus:"fyvr12cw",hover:"fyvr12cx",checked:"fyvr12cy"},defaultClass:"fyvr12ct"},polygonLight:{conditions:{base:"fyvr12cz",active:"fyvr12d0",disabled:"fyvr12d1",focus:"fyvr12d2",hover:"fyvr12d3",checked:"fyvr12d4"},defaultClass:"fyvr12cz"},text100:{conditions:{base:"fyvr12d5",active:"fyvr12d6",disabled:"fyvr12d7",focus:"fyvr12d8",hover:"fyvr12d9",checked:"fyvr12da"},defaultClass:"fyvr12d5"},text80:{conditions:{base:"fyvr12db",active:"fyvr12dc",disabled:"fyvr12dd",focus:"fyvr12de",hover:"fyvr12df",checked:"fyvr12dg"},defaultClass:"fyvr12db"},text50:{conditions:{base:"fyvr12dh",active:"fyvr12di",disabled:"fyvr12dj",focus:"fyvr12dk",hover:"fyvr12dl",checked:"fyvr12dm"},defaultClass:"fyvr12dh"},textInverse100:{conditions:{base:"fyvr12dn",active:"fyvr12do",disabled:"fyvr12dp",focus:"fyvr12dq",hover:"fyvr12dr",checked:"fyvr12ds"},defaultClass:"fyvr12dn"},backgroundPrimary:{conditions:{base:"fyvr12dt",active:"fyvr12du",disabled:"fyvr12dv",focus:"fyvr12dw",hover:"fyvr12dx",checked:"fyvr12dy"},defaultClass:"fyvr12dt"},backgroundSecondary:{conditions:{base:"fyvr12dz",active:"fyvr12e0",disabled:"fyvr12e1",focus:"fyvr12e2",hover:"fyvr12e3",checked:"fyvr12e4"},defaultClass:"fyvr12dz"},backgroundContrast:{conditions:{base:"fyvr12e5",active:"fyvr12e6",disabled:"fyvr12e7",focus:"fyvr12e8",hover:"fyvr12e9",checked:"fyvr12ea"},defaultClass:"fyvr12e5"},backgroundMuted:{conditions:{base:"fyvr12eb",active:"fyvr12ec",disabled:"fyvr12ed",focus:"fyvr12ee",hover:"fyvr12ef",checked:"fyvr12eg"},defaultClass:"fyvr12eb"},backgroundControl:{conditions:{base:"fyvr12eh",active:"fyvr12ei",disabled:"fyvr12ej",focus:"fyvr12ek",hover:"fyvr12el",checked:"fyvr12em"},defaultClass:"fyvr12eh"},backgroundInverse:{conditions:{base:"fyvr12en",active:"fyvr12eo",disabled:"fyvr12ep",focus:"fyvr12eq",hover:"fyvr12er",checked:"fyvr12es"},defaultClass:"fyvr12en"},backgroundBackdrop:{conditions:{base:"fyvr12et",active:"fyvr12eu",disabled:"fyvr12ev",focus:"fyvr12ew",hover:"fyvr12ex",checked:"fyvr12ey"},defaultClass:"fyvr12et"},backgroundOverlay:{conditions:{base:"fyvr12ez",active:"fyvr12f0",disabled:"fyvr12f1",focus:"fyvr12f2",hover:"fyvr12f3",checked:"fyvr12f4"},defaultClass:"fyvr12ez"},backgroundRaised:{conditions:{base:"fyvr12f5",active:"fyvr12f6",disabled:"fyvr12f7",focus:"fyvr12f8",hover:"fyvr12f9",checked:"fyvr12fa"},defaultClass:"fyvr12f5"},buttonGlass:{conditions:{base:"fyvr12fb",active:"fyvr12fc",disabled:"fyvr12fd",focus:"fyvr12fe",hover:"fyvr12ff",checked:"fyvr12fg"},defaultClass:"fyvr12fb"},buttonEmphasis:{conditions:{base:"fyvr12fh",active:"fyvr12fi",disabled:"fyvr12fj",focus:"fyvr12fk",hover:"fyvr12fl",checked:"fyvr12fm"},defaultClass:"fyvr12fh"},buttonInverse:{conditions:{base:"fyvr12fn",active:"fyvr12fo",disabled:"fyvr12fp",focus:"fyvr12fq",hover:"fyvr12fr",checked:"fyvr12fs"},defaultClass:"fyvr12fn"},borderNormal:{conditions:{base:"fyvr12ft",active:"fyvr12fu",disabled:"fyvr12fv",focus:"fyvr12fw",hover:"fyvr12fx",checked:"fyvr12fy"},defaultClass:"fyvr12ft"},borderFocus:{conditions:{base:"fyvr12fz",active:"fyvr12g0",disabled:"fyvr12g1",focus:"fyvr12g2",hover:"fyvr12g3",checked:"fyvr12g4"},defaultClass:"fyvr12fz"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12g5",active:"fyvr12g6",disabled:"fyvr12g7",focus:"fyvr12g8",hover:"fyvr12g9",checked:"fyvr12ga"},defaultClass:"fyvr12g5"},dashed:{conditions:{base:"fyvr12gb",active:"fyvr12gc",disabled:"fyvr12gd",focus:"fyvr12ge",hover:"fyvr12gf",checked:"fyvr12gg"},defaultClass:"fyvr12gb"},dotted:{conditions:{base:"fyvr12gh",active:"fyvr12gi",disabled:"fyvr12gj",focus:"fyvr12gk",hover:"fyvr12gl",checked:"fyvr12gm"},defaultClass:"fyvr12gh"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12gn",active:"fyvr12go",disabled:"fyvr12gp",focus:"fyvr12gq",hover:"fyvr12gr",checked:"fyvr12gs"},defaultClass:"fyvr12gn"},white:{conditions:{base:"fyvr12gt",active:"fyvr12gu",disabled:"fyvr12gv",focus:"fyvr12gw",hover:"fyvr12gx",checked:"fyvr12gy"},defaultClass:"fyvr12gt"},inherit:{conditions:{base:"fyvr12gz",active:"fyvr12h0",disabled:"fyvr12h1",focus:"fyvr12h2",hover:"fyvr12h3",checked:"fyvr12h4"},defaultClass:"fyvr12gz"},transparent:{conditions:{base:"fyvr12h5",active:"fyvr12h6",disabled:"fyvr12h7",focus:"fyvr12h8",hover:"fyvr12h9",checked:"fyvr12ha"},defaultClass:"fyvr12h5"},positive:{conditions:{base:"fyvr12hb",active:"fyvr12hc",disabled:"fyvr12hd",focus:"fyvr12he",hover:"fyvr12hf",checked:"fyvr12hg"},defaultClass:"fyvr12hb"},negative:{conditions:{base:"fyvr12hh",active:"fyvr12hi",disabled:"fyvr12hj",focus:"fyvr12hk",hover:"fyvr12hl",checked:"fyvr12hm"},defaultClass:"fyvr12hh"},info:{conditions:{base:"fyvr12hn",active:"fyvr12ho",disabled:"fyvr12hp",focus:"fyvr12hq",hover:"fyvr12hr",checked:"fyvr12hs"},defaultClass:"fyvr12hn"},warning:{conditions:{base:"fyvr12ht",active:"fyvr12hu",disabled:"fyvr12hv",focus:"fyvr12hw",hover:"fyvr12hx",checked:"fyvr12hy"},defaultClass:"fyvr12ht"},gradientBackdrop:{conditions:{base:"fyvr12hz",active:"fyvr12i0",disabled:"fyvr12i1",focus:"fyvr12i2",hover:"fyvr12i3",checked:"fyvr12i4"},defaultClass:"fyvr12hz"},gradientPrimary:{conditions:{base:"fyvr12i5",active:"fyvr12i6",disabled:"fyvr12i7",focus:"fyvr12i8",hover:"fyvr12i9",checked:"fyvr12ia"},defaultClass:"fyvr12i5"},gradientSecondary:{conditions:{base:"fyvr12ib",active:"fyvr12ic",disabled:"fyvr12id",focus:"fyvr12ie",hover:"fyvr12if",checked:"fyvr12ig"},defaultClass:"fyvr12ib"},arbitrumDark:{conditions:{base:"fyvr12ih",active:"fyvr12ii",disabled:"fyvr12ij",focus:"fyvr12ik",hover:"fyvr12il",checked:"fyvr12im"},defaultClass:"fyvr12ih"},arbitrumLight:{conditions:{base:"fyvr12in",active:"fyvr12io",disabled:"fyvr12ip",focus:"fyvr12iq",hover:"fyvr12ir",checked:"fyvr12is"},defaultClass:"fyvr12in"},avalanceDark:{conditions:{base:"fyvr12it",active:"fyvr12iu",disabled:"fyvr12iv",focus:"fyvr12iw",hover:"fyvr12ix",checked:"fyvr12iy"},defaultClass:"fyvr12it"},avalanceLight:{conditions:{base:"fyvr12iz",active:"fyvr12j0",disabled:"fyvr12j1",focus:"fyvr12j2",hover:"fyvr12j3",checked:"fyvr12j4"},defaultClass:"fyvr12iz"},bscDark:{conditions:{base:"fyvr12j5",active:"fyvr12j6",disabled:"fyvr12j7",focus:"fyvr12j8",hover:"fyvr12j9",checked:"fyvr12ja"},defaultClass:"fyvr12j5"},bscLight:{conditions:{base:"fyvr12jb",active:"fyvr12jc",disabled:"fyvr12jd",focus:"fyvr12je",hover:"fyvr12jf",checked:"fyvr12jg"},defaultClass:"fyvr12jb"},ethereumDark:{conditions:{base:"fyvr12jh",active:"fyvr12ji",disabled:"fyvr12jj",focus:"fyvr12jk",hover:"fyvr12jl",checked:"fyvr12jm"},defaultClass:"fyvr12jh"},ethereumLight:{conditions:{base:"fyvr12jn",active:"fyvr12jo",disabled:"fyvr12jp",focus:"fyvr12jq",hover:"fyvr12jr",checked:"fyvr12js"},defaultClass:"fyvr12jn"},gnosisDark:{conditions:{base:"fyvr12jt",active:"fyvr12ju",disabled:"fyvr12jv",focus:"fyvr12jw",hover:"fyvr12jx",checked:"fyvr12jy"},defaultClass:"fyvr12jt"},gnosisLight:{conditions:{base:"fyvr12jz",active:"fyvr12k0",disabled:"fyvr12k1",focus:"fyvr12k2",hover:"fyvr12k3",checked:"fyvr12k4"},defaultClass:"fyvr12jz"},polygonDark:{conditions:{base:"fyvr12k5",active:"fyvr12k6",disabled:"fyvr12k7",focus:"fyvr12k8",hover:"fyvr12k9",checked:"fyvr12ka"},defaultClass:"fyvr12k5"},polygonLight:{conditions:{base:"fyvr12kb",active:"fyvr12kc",disabled:"fyvr12kd",focus:"fyvr12ke",hover:"fyvr12kf",checked:"fyvr12kg"},defaultClass:"fyvr12kb"},text100:{conditions:{base:"fyvr12kh",active:"fyvr12ki",disabled:"fyvr12kj",focus:"fyvr12kk",hover:"fyvr12kl",checked:"fyvr12km"},defaultClass:"fyvr12kh"},text80:{conditions:{base:"fyvr12kn",active:"fyvr12ko",disabled:"fyvr12kp",focus:"fyvr12kq",hover:"fyvr12kr",checked:"fyvr12ks"},defaultClass:"fyvr12kn"},text50:{conditions:{base:"fyvr12kt",active:"fyvr12ku",disabled:"fyvr12kv",focus:"fyvr12kw",hover:"fyvr12kx",checked:"fyvr12ky"},defaultClass:"fyvr12kt"},textInverse100:{conditions:{base:"fyvr12kz",active:"fyvr12l0",disabled:"fyvr12l1",focus:"fyvr12l2",hover:"fyvr12l3",checked:"fyvr12l4"},defaultClass:"fyvr12kz"},backgroundPrimary:{conditions:{base:"fyvr12l5",active:"fyvr12l6",disabled:"fyvr12l7",focus:"fyvr12l8",hover:"fyvr12l9",checked:"fyvr12la"},defaultClass:"fyvr12l5"},backgroundSecondary:{conditions:{base:"fyvr12lb",active:"fyvr12lc",disabled:"fyvr12ld",focus:"fyvr12le",hover:"fyvr12lf",checked:"fyvr12lg"},defaultClass:"fyvr12lb"},backgroundContrast:{conditions:{base:"fyvr12lh",active:"fyvr12li",disabled:"fyvr12lj",focus:"fyvr12lk",hover:"fyvr12ll",checked:"fyvr12lm"},defaultClass:"fyvr12lh"},backgroundMuted:{conditions:{base:"fyvr12ln",active:"fyvr12lo",disabled:"fyvr12lp",focus:"fyvr12lq",hover:"fyvr12lr",checked:"fyvr12ls"},defaultClass:"fyvr12ln"},backgroundControl:{conditions:{base:"fyvr12lt",active:"fyvr12lu",disabled:"fyvr12lv",focus:"fyvr12lw",hover:"fyvr12lx",checked:"fyvr12ly"},defaultClass:"fyvr12lt"},backgroundInverse:{conditions:{base:"fyvr12lz",active:"fyvr12m0",disabled:"fyvr12m1",focus:"fyvr12m2",hover:"fyvr12m3",checked:"fyvr12m4"},defaultClass:"fyvr12lz"},backgroundBackdrop:{conditions:{base:"fyvr12m5",active:"fyvr12m6",disabled:"fyvr12m7",focus:"fyvr12m8",hover:"fyvr12m9",checked:"fyvr12ma"},defaultClass:"fyvr12m5"},backgroundOverlay:{conditions:{base:"fyvr12mb",active:"fyvr12mc",disabled:"fyvr12md",focus:"fyvr12me",hover:"fyvr12mf",checked:"fyvr12mg"},defaultClass:"fyvr12mb"},backgroundRaised:{conditions:{base:"fyvr12mh",active:"fyvr12mi",disabled:"fyvr12mj",focus:"fyvr12mk",hover:"fyvr12ml",checked:"fyvr12mm"},defaultClass:"fyvr12mh"},buttonGlass:{conditions:{base:"fyvr12mn",active:"fyvr12mo",disabled:"fyvr12mp",focus:"fyvr12mq",hover:"fyvr12mr",checked:"fyvr12ms"},defaultClass:"fyvr12mn"},buttonEmphasis:{conditions:{base:"fyvr12mt",active:"fyvr12mu",disabled:"fyvr12mv",focus:"fyvr12mw",hover:"fyvr12mx",checked:"fyvr12my"},defaultClass:"fyvr12mt"},buttonInverse:{conditions:{base:"fyvr12mz",active:"fyvr12n0",disabled:"fyvr12n1",focus:"fyvr12n2",hover:"fyvr12n3",checked:"fyvr12n4"},defaultClass:"fyvr12mz"},borderNormal:{conditions:{base:"fyvr12n5",active:"fyvr12n6",disabled:"fyvr12n7",focus:"fyvr12n8",hover:"fyvr12n9",checked:"fyvr12na"},defaultClass:"fyvr12n5"},borderFocus:{conditions:{base:"fyvr12nb",active:"fyvr12nc",disabled:"fyvr12nd",focus:"fyvr12ne",hover:"fyvr12nf",checked:"fyvr12ng"},defaultClass:"fyvr12nb"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12nh",active:"fyvr12ni",disabled:"fyvr12nj",focus:"fyvr12nk",hover:"fyvr12nl",checked:"fyvr12nm"},defaultClass:"fyvr12nh"},dashed:{conditions:{base:"fyvr12nn",active:"fyvr12no",disabled:"fyvr12np",focus:"fyvr12nq",hover:"fyvr12nr",checked:"fyvr12ns"},defaultClass:"fyvr12nn"},dotted:{conditions:{base:"fyvr12nt",active:"fyvr12nu",disabled:"fyvr12nv",focus:"fyvr12nw",hover:"fyvr12nx",checked:"fyvr12ny"},defaultClass:"fyvr12nt"}}},color:{values:{black:{conditions:{base:"fyvr12nz",active:"fyvr12o0",disabled:"fyvr12o1",focus:"fyvr12o2",hover:"fyvr12o3",checked:"fyvr12o4"},defaultClass:"fyvr12nz"},white:{conditions:{base:"fyvr12o5",active:"fyvr12o6",disabled:"fyvr12o7",focus:"fyvr12o8",hover:"fyvr12o9",checked:"fyvr12oa"},defaultClass:"fyvr12o5"},inherit:{conditions:{base:"fyvr12ob",active:"fyvr12oc",disabled:"fyvr12od",focus:"fyvr12oe",hover:"fyvr12of",checked:"fyvr12og"},defaultClass:"fyvr12ob"},transparent:{conditions:{base:"fyvr12oh",active:"fyvr12oi",disabled:"fyvr12oj",focus:"fyvr12ok",hover:"fyvr12ol",checked:"fyvr12om"},defaultClass:"fyvr12oh"},positive:{conditions:{base:"fyvr12on",active:"fyvr12oo",disabled:"fyvr12op",focus:"fyvr12oq",hover:"fyvr12or",checked:"fyvr12os"},defaultClass:"fyvr12on"},negative:{conditions:{base:"fyvr12ot",active:"fyvr12ou",disabled:"fyvr12ov",focus:"fyvr12ow",hover:"fyvr12ox",checked:"fyvr12oy"},defaultClass:"fyvr12ot"},info:{conditions:{base:"fyvr12oz",active:"fyvr12p0",disabled:"fyvr12p1",focus:"fyvr12p2",hover:"fyvr12p3",checked:"fyvr12p4"},defaultClass:"fyvr12oz"},warning:{conditions:{base:"fyvr12p5",active:"fyvr12p6",disabled:"fyvr12p7",focus:"fyvr12p8",hover:"fyvr12p9",checked:"fyvr12pa"},defaultClass:"fyvr12p5"},gradientBackdrop:{conditions:{base:"fyvr12pb",active:"fyvr12pc",disabled:"fyvr12pd",focus:"fyvr12pe",hover:"fyvr12pf",checked:"fyvr12pg"},defaultClass:"fyvr12pb"},gradientPrimary:{conditions:{base:"fyvr12ph",active:"fyvr12pi",disabled:"fyvr12pj",focus:"fyvr12pk",hover:"fyvr12pl",checked:"fyvr12pm"},defaultClass:"fyvr12ph"},gradientSecondary:{conditions:{base:"fyvr12pn",active:"fyvr12po",disabled:"fyvr12pp",focus:"fyvr12pq",hover:"fyvr12pr",checked:"fyvr12ps"},defaultClass:"fyvr12pn"},arbitrumDark:{conditions:{base:"fyvr12pt",active:"fyvr12pu",disabled:"fyvr12pv",focus:"fyvr12pw",hover:"fyvr12px",checked:"fyvr12py"},defaultClass:"fyvr12pt"},arbitrumLight:{conditions:{base:"fyvr12pz",active:"fyvr12q0",disabled:"fyvr12q1",focus:"fyvr12q2",hover:"fyvr12q3",checked:"fyvr12q4"},defaultClass:"fyvr12pz"},avalanceDark:{conditions:{base:"fyvr12q5",active:"fyvr12q6",disabled:"fyvr12q7",focus:"fyvr12q8",hover:"fyvr12q9",checked:"fyvr12qa"},defaultClass:"fyvr12q5"},avalanceLight:{conditions:{base:"fyvr12qb",active:"fyvr12qc",disabled:"fyvr12qd",focus:"fyvr12qe",hover:"fyvr12qf",checked:"fyvr12qg"},defaultClass:"fyvr12qb"},bscDark:{conditions:{base:"fyvr12qh",active:"fyvr12qi",disabled:"fyvr12qj",focus:"fyvr12qk",hover:"fyvr12ql",checked:"fyvr12qm"},defaultClass:"fyvr12qh"},bscLight:{conditions:{base:"fyvr12qn",active:"fyvr12qo",disabled:"fyvr12qp",focus:"fyvr12qq",hover:"fyvr12qr",checked:"fyvr12qs"},defaultClass:"fyvr12qn"},ethereumDark:{conditions:{base:"fyvr12qt",active:"fyvr12qu",disabled:"fyvr12qv",focus:"fyvr12qw",hover:"fyvr12qx",checked:"fyvr12qy"},defaultClass:"fyvr12qt"},ethereumLight:{conditions:{base:"fyvr12qz",active:"fyvr12r0",disabled:"fyvr12r1",focus:"fyvr12r2",hover:"fyvr12r3",checked:"fyvr12r4"},defaultClass:"fyvr12qz"},gnosisDark:{conditions:{base:"fyvr12r5",active:"fyvr12r6",disabled:"fyvr12r7",focus:"fyvr12r8",hover:"fyvr12r9",checked:"fyvr12ra"},defaultClass:"fyvr12r5"},gnosisLight:{conditions:{base:"fyvr12rb",active:"fyvr12rc",disabled:"fyvr12rd",focus:"fyvr12re",hover:"fyvr12rf",checked:"fyvr12rg"},defaultClass:"fyvr12rb"},polygonDark:{conditions:{base:"fyvr12rh",active:"fyvr12ri",disabled:"fyvr12rj",focus:"fyvr12rk",hover:"fyvr12rl",checked:"fyvr12rm"},defaultClass:"fyvr12rh"},polygonLight:{conditions:{base:"fyvr12rn",active:"fyvr12ro",disabled:"fyvr12rp",focus:"fyvr12rq",hover:"fyvr12rr",checked:"fyvr12rs"},defaultClass:"fyvr12rn"},text100:{conditions:{base:"fyvr12rt",active:"fyvr12ru",disabled:"fyvr12rv",focus:"fyvr12rw",hover:"fyvr12rx",checked:"fyvr12ry"},defaultClass:"fyvr12rt"},text80:{conditions:{base:"fyvr12rz",active:"fyvr12s0",disabled:"fyvr12s1",focus:"fyvr12s2",hover:"fyvr12s3",checked:"fyvr12s4"},defaultClass:"fyvr12rz"},text50:{conditions:{base:"fyvr12s5",active:"fyvr12s6",disabled:"fyvr12s7",focus:"fyvr12s8",hover:"fyvr12s9",checked:"fyvr12sa"},defaultClass:"fyvr12s5"},textInverse100:{conditions:{base:"fyvr12sb",active:"fyvr12sc",disabled:"fyvr12sd",focus:"fyvr12se",hover:"fyvr12sf",checked:"fyvr12sg"},defaultClass:"fyvr12sb"},backgroundPrimary:{conditions:{base:"fyvr12sh",active:"fyvr12si",disabled:"fyvr12sj",focus:"fyvr12sk",hover:"fyvr12sl",checked:"fyvr12sm"},defaultClass:"fyvr12sh"},backgroundSecondary:{conditions:{base:"fyvr12sn",active:"fyvr12so",disabled:"fyvr12sp",focus:"fyvr12sq",hover:"fyvr12sr",checked:"fyvr12ss"},defaultClass:"fyvr12sn"},backgroundContrast:{conditions:{base:"fyvr12st",active:"fyvr12su",disabled:"fyvr12sv",focus:"fyvr12sw",hover:"fyvr12sx",checked:"fyvr12sy"},defaultClass:"fyvr12st"},backgroundMuted:{conditions:{base:"fyvr12sz",active:"fyvr12t0",disabled:"fyvr12t1",focus:"fyvr12t2",hover:"fyvr12t3",checked:"fyvr12t4"},defaultClass:"fyvr12sz"},backgroundControl:{conditions:{base:"fyvr12t5",active:"fyvr12t6",disabled:"fyvr12t7",focus:"fyvr12t8",hover:"fyvr12t9",checked:"fyvr12ta"},defaultClass:"fyvr12t5"},backgroundInverse:{conditions:{base:"fyvr12tb",active:"fyvr12tc",disabled:"fyvr12td",focus:"fyvr12te",hover:"fyvr12tf",checked:"fyvr12tg"},defaultClass:"fyvr12tb"},backgroundBackdrop:{conditions:{base:"fyvr12th",active:"fyvr12ti",disabled:"fyvr12tj",focus:"fyvr12tk",hover:"fyvr12tl",checked:"fyvr12tm"},defaultClass:"fyvr12th"},backgroundOverlay:{conditions:{base:"fyvr12tn",active:"fyvr12to",disabled:"fyvr12tp",focus:"fyvr12tq",hover:"fyvr12tr",checked:"fyvr12ts"},defaultClass:"fyvr12tn"},backgroundRaised:{conditions:{base:"fyvr12tt",active:"fyvr12tu",disabled:"fyvr12tv",focus:"fyvr12tw",hover:"fyvr12tx",checked:"fyvr12ty"},defaultClass:"fyvr12tt"},buttonGlass:{conditions:{base:"fyvr12tz",active:"fyvr12u0",disabled:"fyvr12u1",focus:"fyvr12u2",hover:"fyvr12u3",checked:"fyvr12u4"},defaultClass:"fyvr12tz"},buttonEmphasis:{conditions:{base:"fyvr12u5",active:"fyvr12u6",disabled:"fyvr12u7",focus:"fyvr12u8",hover:"fyvr12u9",checked:"fyvr12ua"},defaultClass:"fyvr12u5"},buttonInverse:{conditions:{base:"fyvr12ub",active:"fyvr12uc",disabled:"fyvr12ud",focus:"fyvr12ue",hover:"fyvr12uf",checked:"fyvr12ug"},defaultClass:"fyvr12ub"},borderNormal:{conditions:{base:"fyvr12uh",active:"fyvr12ui",disabled:"fyvr12uj",focus:"fyvr12uk",hover:"fyvr12ul",checked:"fyvr12um"},defaultClass:"fyvr12uh"},borderFocus:{conditions:{base:"fyvr12un",active:"fyvr12uo",disabled:"fyvr12up",focus:"fyvr12uq",hover:"fyvr12ur",checked:"fyvr12us"},defaultClass:"fyvr12un"}}},cursor:{values:{default:{conditions:{base:"fyvr12ut",active:"fyvr12uu",disabled:"fyvr12uv",focus:"fyvr12uw",hover:"fyvr12ux",checked:"fyvr12uy"},defaultClass:"fyvr12ut"},pointer:{conditions:{base:"fyvr12uz",active:"fyvr12v0",disabled:"fyvr12v1",focus:"fyvr12v2",hover:"fyvr12v3",checked:"fyvr12v4"},defaultClass:"fyvr12uz"},text:{conditions:{base:"fyvr12v5",active:"fyvr12v6",disabled:"fyvr12v7",focus:"fyvr12v8",hover:"fyvr12v9",checked:"fyvr12va"},defaultClass:"fyvr12v5"}}},opacity:{values:{0:{conditions:{base:"fyvr12vb",active:"fyvr12vc",disabled:"fyvr12vd",focus:"fyvr12ve",hover:"fyvr12vf",checked:"fyvr12vg"},defaultClass:"fyvr12vb"},50:{conditions:{base:"fyvr12vh",active:"fyvr12vi",disabled:"fyvr12vj",focus:"fyvr12vk",hover:"fyvr12vl",checked:"fyvr12vm"},defaultClass:"fyvr12vh"},80:{conditions:{base:"fyvr12vn",active:"fyvr12vo",disabled:"fyvr12vp",focus:"fyvr12vq",hover:"fyvr12vr",checked:"fyvr12vs"},defaultClass:"fyvr12vn"},100:{conditions:{base:"fyvr12vt",active:"fyvr12vu",disabled:"fyvr12vv",focus:"fyvr12vw",hover:"fyvr12vx",checked:"fyvr12vy"},defaultClass:"fyvr12vt"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12vz",active:"fyvr12w0",disabled:"fyvr12w1",focus:"fyvr12w2",hover:"fyvr12w3",checked:"fyvr12w4"},defaultClass:"fyvr12vz"},auto:{conditions:{base:"fyvr12w5",active:"fyvr12w6",disabled:"fyvr12w7",focus:"fyvr12w8",hover:"fyvr12w9",checked:"fyvr12wa"},defaultClass:"fyvr12w5"}}},outline:{values:{none:{conditions:{base:"fyvr12wb",active:"fyvr12wc",disabled:"fyvr12wd",focus:"fyvr12we",hover:"fyvr12wf",checked:"fyvr12wg"},defaultClass:"fyvr12wb"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12wh",active:"fyvr12wi",disabled:"fyvr12wj",focus:"fyvr12wk",hover:"fyvr12wl",checked:"fyvr12wm"},defaultClass:"fyvr12wh"}}}}});const aO=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],sp=t=>(t.display||(t.display=Object.keys(t).some(e=>aO.includes(e))?"flex":void 0),tC(t));sp.properties=tC.properties;function rC(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e{const{as:r="div",sx:n={},className:i,...s}=t,o={},a={};for(const c in s)sp.properties.has(c)?o[c]=s[c]:a[c]=s[c];const l=sp({...o,...n});return S.createElement(r,{className:cn(l,i),...a,ref:e})});var nC={exports:{}},Ic={};/** + )`,gradientPrimary:"linear-gradient(89.69deg, #4411E1 0.27%, #7537F9 99.73%)",gradientSecondary:"linear-gradient(32.51deg, #951990 -15.23%, #3A35B1 48.55%, #20A8B0 100%)",arbitrumDark:"#212D44",arbitrumLight:"#93D4FF",avalanceDark:"#810C0C",avalanceLight:"#FF8080",bscDark:"#584508",bscLight:"#FCCF43",ethereumDark:"#132362",ethereumLight:"#AABBFF",gnosisDark:"#084246",gnosisLight:"#8CF6FD",polygonDark:"#350881",polygonLight:"#C7A6FF"},QM={...eC,text100:"rgba(255, 255, 255, 1)",text80:"rgba(255, 255, 255, 0.8)",text50:"rgba(255, 255, 255, 0.5)",textInverse100:"rgba(0, 0, 0, 1)",backgroundPrimary:"rgba(0, 0, 0, 1)",backgroundSecondary:"rgba(255, 255, 255, 0.1)",backgroundContrast:"rgba(0, 0, 0, 0.5)",backgroundMuted:"rgba(255, 255, 255, 0.05)",backgroundControl:"rgba(255, 255, 255, 0.25)",backgroundInverse:"rgba(255, 255, 255, 1)",backgroundBackdrop:"rgba(34, 34, 34, 0.9)",backgroundOverlay:"rgba(0, 0, 0, 0.7)",backgroundRaised:"rgba(54, 54, 54, 0.7)",buttonGlass:"rgba(255, 255, 255, 0.15)",buttonEmphasis:"rgba(0, 0, 0, 0.5)",buttonInverse:"rgba(255, 255, 255, 0.8)",borderNormal:"rgba(255, 255, 255, 0.25)",borderFocus:"rgba(255, 255, 255, 0.5)"},XM={...eC,text100:"rgba(0, 0, 0, 1)",text80:"rgba(0, 0, 0, 0.8)",text50:"rgba(0, 0, 0, 0.5)",textInverse100:"rgba(255, 255, 255, 1)",backgroundPrimary:"rgba(244, 244, 244, 1)",backgroundSecondary:"rgba(0, 0, 0, 0.1)",backgroundContrast:"rgba(244, 244, 244, 0.5)",backgroundMuted:"rgba(0, 0, 0, 0.05)",backgroundControl:"rgba(0, 0, 0, 0.25)",backgroundInverse:"rgba(0, 0, 0, 1)",backgroundBackdrop:"rgba(221, 221, 221, 0.9)",backgroundOverlay:"rgba(244, 244, 244, 0.7)",backgroundRaised:"rgba(192, 192, 192, 0.7)",buttonGlass:"rgba(0, 0, 0, 0.15)",buttonEmphasis:"rgba(255, 255, 255, 0.5)",buttonInverse:"rgba(0, 0, 0, 0.8)",borderNormal:"rgba(0, 0, 0, 0.25)",borderFocus:"rgba(0, 0, 0, 0.5)"},ZM={dark:QM,light:XM},eO={inherit:{fontFamily:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit",fontWeight:"inherit"},xlarge:{fontFamily:"body",fontSize:"xlarge",lineHeight:"9",letterSpacing:"none",fontWeight:"bold"},large:{fontFamily:"body",fontSize:"large",lineHeight:"7",letterSpacing:"normal",fontWeight:"semibold"},medium:{fontFamily:"body",fontSize:"medium",lineHeight:"6",letterSpacing:"normal",fontWeight:"bold"},normal:{fontFamily:"body",fontSize:"normal",lineHeight:"5",letterSpacing:"wide",fontWeight:"normal"},small:{fontFamily:"body",fontSize:"small",lineHeight:"4",letterSpacing:"wide",fontWeight:"medium"},xsmall:{fontFamily:"body",fontSize:"xsmall",lineHeight:"4",letterSpacing:"wide",fontWeight:"bold"},code:{fontFamily:"mono",fontSize:"normal",lineHeight:"5",letterSpacing:"none",fontWeight:"normal"}};var dw={colors:{black:"var(--colors-black)",white:"var(--colors-white)",inherit:"var(--colors-inherit)",transparent:"var(--colors-transparent)",positive:"var(--colors-positive)",negative:"var(--colors-negative)",info:"var(--colors-info)",warning:"var(--colors-warning)",gradientBackdrop:"var(--colors-gradient-backdrop)",gradientPrimary:"var(--colors-gradient-primary)",gradientSecondary:"var(--colors-gradient-secondary)",arbitrumDark:"var(--colors-arbitrum-dark)",arbitrumLight:"var(--colors-arbitrum-light)",avalanceDark:"var(--colors-avalance-dark)",avalanceLight:"var(--colors-avalance-light)",bscDark:"var(--colors-bsc-dark)",bscLight:"var(--colors-bsc-light)",ethereumDark:"var(--colors-ethereum-dark)",ethereumLight:"var(--colors-ethereum-light)",gnosisDark:"var(--colors-gnosis-dark)",gnosisLight:"var(--colors-gnosis-light)",polygonDark:"var(--colors-polygon-dark)",polygonLight:"var(--colors-polygon-light)",text100:"var(--colors-text100)",text80:"var(--colors-text80)",text50:"var(--colors-text50)",textInverse100:"var(--colors-text-inverse100)",backgroundPrimary:"var(--colors-background-primary)",backgroundSecondary:"var(--colors-background-secondary)",backgroundContrast:"var(--colors-background-contrast)",backgroundMuted:"var(--colors-background-muted)",backgroundControl:"var(--colors-background-control)",backgroundInverse:"var(--colors-background-inverse)",backgroundBackdrop:"var(--colors-background-backdrop)",backgroundOverlay:"var(--colors-background-overlay)",backgroundRaised:"var(--colors-background-raised)",buttonGlass:"var(--colors-button-glass)",buttonEmphasis:"var(--colors-button-emphasis)",buttonInverse:"var(--colors-button-inverse)",borderNormal:"var(--colors-border-normal)",borderFocus:"var(--colors-border-focus)"}};function tO(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function rO(t){var e=tO(t,"string");return typeof e=="symbol"?e:String(e)}function nO(t,e,r){return e=rO(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pv(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nl.styles)),s=Object.keys(i),o=s.filter(l=>"mappings"in i[l]),a=l=>{var c=[],f={},u=pv({},l),h=!1;for(var y of o){var g=l[y];if(g!=null){var p=i[y];h=!0;for(var k of p.mappings)f[k]=g,u[k]==null&&delete u[k]}}var w=h?pv(pv({},f),u):l,E=function(){var j=w[A],z=i[A];try{if(z.mappings)return"continue";if(typeof j=="string"||typeof j=="number")c.push(z.values[j].defaultClass);else if(Array.isArray(j))for(var F=0;Ft,oO=function(){return iO(sO)(...arguments)},tC=oO({conditions:{defaultCondition:"sm",conditionNames:["sm","md","lg","xl"],responsiveArray:void 0},styles:{borderWidth:{mappings:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"]},borderRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderLeftRadius:{mappings:["borderBottomLeftRadius","borderTopLeftRadius"]},borderRightRadius:{mappings:["borderBottomRightRadius","borderTopRightRadius"]},borderTopRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius"]},borderBottomRadius:{mappings:["borderBottomLeftRadius","borderBottomRightRadius"]},margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},overflow:{mappings:["overflowX","overflowY"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},placeItems:{mappings:["justifyContent","alignItems"]},inset:{mappings:["top","bottom","left","right"]},width:{values:{0:{conditions:{sm:"fyvr10",md:"fyvr11",lg:"fyvr12",xl:"fyvr13"},defaultClass:"fyvr10"},1:{conditions:{sm:"fyvr14",md:"fyvr15",lg:"fyvr16",xl:"fyvr17"},defaultClass:"fyvr14"},2:{conditions:{sm:"fyvr18",md:"fyvr19",lg:"fyvr1a",xl:"fyvr1b"},defaultClass:"fyvr18"},3:{conditions:{sm:"fyvr1c",md:"fyvr1d",lg:"fyvr1e",xl:"fyvr1f"},defaultClass:"fyvr1c"},4:{conditions:{sm:"fyvr1g",md:"fyvr1h",lg:"fyvr1i",xl:"fyvr1j"},defaultClass:"fyvr1g"},5:{conditions:{sm:"fyvr1k",md:"fyvr1l",lg:"fyvr1m",xl:"fyvr1n"},defaultClass:"fyvr1k"},6:{conditions:{sm:"fyvr1o",md:"fyvr1p",lg:"fyvr1q",xl:"fyvr1r"},defaultClass:"fyvr1o"},7:{conditions:{sm:"fyvr1s",md:"fyvr1t",lg:"fyvr1u",xl:"fyvr1v"},defaultClass:"fyvr1s"},8:{conditions:{sm:"fyvr1w",md:"fyvr1x",lg:"fyvr1y",xl:"fyvr1z"},defaultClass:"fyvr1w"},9:{conditions:{sm:"fyvr110",md:"fyvr111",lg:"fyvr112",xl:"fyvr113"},defaultClass:"fyvr110"},10:{conditions:{sm:"fyvr114",md:"fyvr115",lg:"fyvr116",xl:"fyvr117"},defaultClass:"fyvr114"},12:{conditions:{sm:"fyvr118",md:"fyvr119",lg:"fyvr11a",xl:"fyvr11b"},defaultClass:"fyvr118"},14:{conditions:{sm:"fyvr11c",md:"fyvr11d",lg:"fyvr11e",xl:"fyvr11f"},defaultClass:"fyvr11c"},16:{conditions:{sm:"fyvr11g",md:"fyvr11h",lg:"fyvr11i",xl:"fyvr11j"},defaultClass:"fyvr11g"},"0.25":{conditions:{sm:"fyvr11k",md:"fyvr11l",lg:"fyvr11m",xl:"fyvr11n"},defaultClass:"fyvr11k"},"0.5":{conditions:{sm:"fyvr11o",md:"fyvr11p",lg:"fyvr11q",xl:"fyvr11r"},defaultClass:"fyvr11o"},"1.5":{conditions:{sm:"fyvr11s",md:"fyvr11t",lg:"fyvr11u",xl:"fyvr11v"},defaultClass:"fyvr11s"},none:{conditions:{sm:"fyvr11w",md:"fyvr11x",lg:"fyvr11y",xl:"fyvr11z"},defaultClass:"fyvr11w"},px:{conditions:{sm:"fyvr120",md:"fyvr121",lg:"fyvr122",xl:"fyvr123"},defaultClass:"fyvr120"},auto:{conditions:{sm:"fyvr124",md:"fyvr125",lg:"fyvr126",xl:"fyvr127"},defaultClass:"fyvr124"},full:{conditions:{sm:"fyvr128",md:"fyvr129",lg:"fyvr12a",xl:"fyvr12b"},defaultClass:"fyvr128"},"1/2":{conditions:{sm:"fyvr12c",md:"fyvr12d",lg:"fyvr12e",xl:"fyvr12f"},defaultClass:"fyvr12c"},"1/3":{conditions:{sm:"fyvr12g",md:"fyvr12h",lg:"fyvr12i",xl:"fyvr12j"},defaultClass:"fyvr12g"},"2/3":{conditions:{sm:"fyvr12k",md:"fyvr12l",lg:"fyvr12m",xl:"fyvr12n"},defaultClass:"fyvr12k"},"1/4":{conditions:{sm:"fyvr12o",md:"fyvr12p",lg:"fyvr12q",xl:"fyvr12r"},defaultClass:"fyvr12o"},"3/4":{conditions:{sm:"fyvr12s",md:"fyvr12t",lg:"fyvr12u",xl:"fyvr12v"},defaultClass:"fyvr12s"},fit:{conditions:{sm:"fyvr12w",md:"fyvr12x",lg:"fyvr12y",xl:"fyvr12z"},defaultClass:"fyvr12w"},max:{conditions:{sm:"fyvr130",md:"fyvr131",lg:"fyvr132",xl:"fyvr133"},defaultClass:"fyvr130"},min:{conditions:{sm:"fyvr134",md:"fyvr135",lg:"fyvr136",xl:"fyvr137"},defaultClass:"fyvr134"},vw:{conditions:{sm:"fyvr138",md:"fyvr139",lg:"fyvr13a",xl:"fyvr13b"},defaultClass:"fyvr138"},vh:{conditions:{sm:"fyvr13c",md:"fyvr13d",lg:"fyvr13e",xl:"fyvr13f"},defaultClass:"fyvr13c"}}},height:{values:{0:{conditions:{sm:"fyvr13g",md:"fyvr13h",lg:"fyvr13i",xl:"fyvr13j"},defaultClass:"fyvr13g"},1:{conditions:{sm:"fyvr13k",md:"fyvr13l",lg:"fyvr13m",xl:"fyvr13n"},defaultClass:"fyvr13k"},2:{conditions:{sm:"fyvr13o",md:"fyvr13p",lg:"fyvr13q",xl:"fyvr13r"},defaultClass:"fyvr13o"},3:{conditions:{sm:"fyvr13s",md:"fyvr13t",lg:"fyvr13u",xl:"fyvr13v"},defaultClass:"fyvr13s"},4:{conditions:{sm:"fyvr13w",md:"fyvr13x",lg:"fyvr13y",xl:"fyvr13z"},defaultClass:"fyvr13w"},5:{conditions:{sm:"fyvr140",md:"fyvr141",lg:"fyvr142",xl:"fyvr143"},defaultClass:"fyvr140"},6:{conditions:{sm:"fyvr144",md:"fyvr145",lg:"fyvr146",xl:"fyvr147"},defaultClass:"fyvr144"},7:{conditions:{sm:"fyvr148",md:"fyvr149",lg:"fyvr14a",xl:"fyvr14b"},defaultClass:"fyvr148"},8:{conditions:{sm:"fyvr14c",md:"fyvr14d",lg:"fyvr14e",xl:"fyvr14f"},defaultClass:"fyvr14c"},9:{conditions:{sm:"fyvr14g",md:"fyvr14h",lg:"fyvr14i",xl:"fyvr14j"},defaultClass:"fyvr14g"},10:{conditions:{sm:"fyvr14k",md:"fyvr14l",lg:"fyvr14m",xl:"fyvr14n"},defaultClass:"fyvr14k"},12:{conditions:{sm:"fyvr14o",md:"fyvr14p",lg:"fyvr14q",xl:"fyvr14r"},defaultClass:"fyvr14o"},14:{conditions:{sm:"fyvr14s",md:"fyvr14t",lg:"fyvr14u",xl:"fyvr14v"},defaultClass:"fyvr14s"},16:{conditions:{sm:"fyvr14w",md:"fyvr14x",lg:"fyvr14y",xl:"fyvr14z"},defaultClass:"fyvr14w"},"0.25":{conditions:{sm:"fyvr150",md:"fyvr151",lg:"fyvr152",xl:"fyvr153"},defaultClass:"fyvr150"},"0.5":{conditions:{sm:"fyvr154",md:"fyvr155",lg:"fyvr156",xl:"fyvr157"},defaultClass:"fyvr154"},"1.5":{conditions:{sm:"fyvr158",md:"fyvr159",lg:"fyvr15a",xl:"fyvr15b"},defaultClass:"fyvr158"},none:{conditions:{sm:"fyvr15c",md:"fyvr15d",lg:"fyvr15e",xl:"fyvr15f"},defaultClass:"fyvr15c"},px:{conditions:{sm:"fyvr15g",md:"fyvr15h",lg:"fyvr15i",xl:"fyvr15j"},defaultClass:"fyvr15g"},auto:{conditions:{sm:"fyvr15k",md:"fyvr15l",lg:"fyvr15m",xl:"fyvr15n"},defaultClass:"fyvr15k"},full:{conditions:{sm:"fyvr15o",md:"fyvr15p",lg:"fyvr15q",xl:"fyvr15r"},defaultClass:"fyvr15o"},"1/2":{conditions:{sm:"fyvr15s",md:"fyvr15t",lg:"fyvr15u",xl:"fyvr15v"},defaultClass:"fyvr15s"},"1/3":{conditions:{sm:"fyvr15w",md:"fyvr15x",lg:"fyvr15y",xl:"fyvr15z"},defaultClass:"fyvr15w"},"2/3":{conditions:{sm:"fyvr160",md:"fyvr161",lg:"fyvr162",xl:"fyvr163"},defaultClass:"fyvr160"},"1/4":{conditions:{sm:"fyvr164",md:"fyvr165",lg:"fyvr166",xl:"fyvr167"},defaultClass:"fyvr164"},"3/4":{conditions:{sm:"fyvr168",md:"fyvr169",lg:"fyvr16a",xl:"fyvr16b"},defaultClass:"fyvr168"},fit:{conditions:{sm:"fyvr16c",md:"fyvr16d",lg:"fyvr16e",xl:"fyvr16f"},defaultClass:"fyvr16c"},max:{conditions:{sm:"fyvr16g",md:"fyvr16h",lg:"fyvr16i",xl:"fyvr16j"},defaultClass:"fyvr16g"},min:{conditions:{sm:"fyvr16k",md:"fyvr16l",lg:"fyvr16m",xl:"fyvr16n"},defaultClass:"fyvr16k"},vw:{conditions:{sm:"fyvr16o",md:"fyvr16p",lg:"fyvr16q",xl:"fyvr16r"},defaultClass:"fyvr16o"},vh:{conditions:{sm:"fyvr16s",md:"fyvr16t",lg:"fyvr16u",xl:"fyvr16v"},defaultClass:"fyvr16s"}}},maxWidth:{values:{0:{conditions:{sm:"fyvr16w",md:"fyvr16x",lg:"fyvr16y",xl:"fyvr16z"},defaultClass:"fyvr16w"},1:{conditions:{sm:"fyvr170",md:"fyvr171",lg:"fyvr172",xl:"fyvr173"},defaultClass:"fyvr170"},2:{conditions:{sm:"fyvr174",md:"fyvr175",lg:"fyvr176",xl:"fyvr177"},defaultClass:"fyvr174"},3:{conditions:{sm:"fyvr178",md:"fyvr179",lg:"fyvr17a",xl:"fyvr17b"},defaultClass:"fyvr178"},4:{conditions:{sm:"fyvr17c",md:"fyvr17d",lg:"fyvr17e",xl:"fyvr17f"},defaultClass:"fyvr17c"},5:{conditions:{sm:"fyvr17g",md:"fyvr17h",lg:"fyvr17i",xl:"fyvr17j"},defaultClass:"fyvr17g"},6:{conditions:{sm:"fyvr17k",md:"fyvr17l",lg:"fyvr17m",xl:"fyvr17n"},defaultClass:"fyvr17k"},7:{conditions:{sm:"fyvr17o",md:"fyvr17p",lg:"fyvr17q",xl:"fyvr17r"},defaultClass:"fyvr17o"},8:{conditions:{sm:"fyvr17s",md:"fyvr17t",lg:"fyvr17u",xl:"fyvr17v"},defaultClass:"fyvr17s"},9:{conditions:{sm:"fyvr17w",md:"fyvr17x",lg:"fyvr17y",xl:"fyvr17z"},defaultClass:"fyvr17w"},10:{conditions:{sm:"fyvr180",md:"fyvr181",lg:"fyvr182",xl:"fyvr183"},defaultClass:"fyvr180"},12:{conditions:{sm:"fyvr184",md:"fyvr185",lg:"fyvr186",xl:"fyvr187"},defaultClass:"fyvr184"},14:{conditions:{sm:"fyvr188",md:"fyvr189",lg:"fyvr18a",xl:"fyvr18b"},defaultClass:"fyvr188"},16:{conditions:{sm:"fyvr18c",md:"fyvr18d",lg:"fyvr18e",xl:"fyvr18f"},defaultClass:"fyvr18c"},"0.25":{conditions:{sm:"fyvr18g",md:"fyvr18h",lg:"fyvr18i",xl:"fyvr18j"},defaultClass:"fyvr18g"},"0.5":{conditions:{sm:"fyvr18k",md:"fyvr18l",lg:"fyvr18m",xl:"fyvr18n"},defaultClass:"fyvr18k"},"1.5":{conditions:{sm:"fyvr18o",md:"fyvr18p",lg:"fyvr18q",xl:"fyvr18r"},defaultClass:"fyvr18o"},none:{conditions:{sm:"fyvr18s",md:"fyvr18t",lg:"fyvr18u",xl:"fyvr18v"},defaultClass:"fyvr18s"},px:{conditions:{sm:"fyvr18w",md:"fyvr18x",lg:"fyvr18y",xl:"fyvr18z"},defaultClass:"fyvr18w"},auto:{conditions:{sm:"fyvr190",md:"fyvr191",lg:"fyvr192",xl:"fyvr193"},defaultClass:"fyvr190"},full:{conditions:{sm:"fyvr194",md:"fyvr195",lg:"fyvr196",xl:"fyvr197"},defaultClass:"fyvr194"},"1/2":{conditions:{sm:"fyvr198",md:"fyvr199",lg:"fyvr19a",xl:"fyvr19b"},defaultClass:"fyvr198"},"1/3":{conditions:{sm:"fyvr19c",md:"fyvr19d",lg:"fyvr19e",xl:"fyvr19f"},defaultClass:"fyvr19c"},"2/3":{conditions:{sm:"fyvr19g",md:"fyvr19h",lg:"fyvr19i",xl:"fyvr19j"},defaultClass:"fyvr19g"},"1/4":{conditions:{sm:"fyvr19k",md:"fyvr19l",lg:"fyvr19m",xl:"fyvr19n"},defaultClass:"fyvr19k"},"3/4":{conditions:{sm:"fyvr19o",md:"fyvr19p",lg:"fyvr19q",xl:"fyvr19r"},defaultClass:"fyvr19o"},fit:{conditions:{sm:"fyvr19s",md:"fyvr19t",lg:"fyvr19u",xl:"fyvr19v"},defaultClass:"fyvr19s"},max:{conditions:{sm:"fyvr19w",md:"fyvr19x",lg:"fyvr19y",xl:"fyvr19z"},defaultClass:"fyvr19w"},min:{conditions:{sm:"fyvr1a0",md:"fyvr1a1",lg:"fyvr1a2",xl:"fyvr1a3"},defaultClass:"fyvr1a0"},vw:{conditions:{sm:"fyvr1a4",md:"fyvr1a5",lg:"fyvr1a6",xl:"fyvr1a7"},defaultClass:"fyvr1a4"},vh:{conditions:{sm:"fyvr1a8",md:"fyvr1a9",lg:"fyvr1aa",xl:"fyvr1ab"},defaultClass:"fyvr1a8"}}},maxHeight:{values:{0:{conditions:{sm:"fyvr1ac",md:"fyvr1ad",lg:"fyvr1ae",xl:"fyvr1af"},defaultClass:"fyvr1ac"},1:{conditions:{sm:"fyvr1ag",md:"fyvr1ah",lg:"fyvr1ai",xl:"fyvr1aj"},defaultClass:"fyvr1ag"},2:{conditions:{sm:"fyvr1ak",md:"fyvr1al",lg:"fyvr1am",xl:"fyvr1an"},defaultClass:"fyvr1ak"},3:{conditions:{sm:"fyvr1ao",md:"fyvr1ap",lg:"fyvr1aq",xl:"fyvr1ar"},defaultClass:"fyvr1ao"},4:{conditions:{sm:"fyvr1as",md:"fyvr1at",lg:"fyvr1au",xl:"fyvr1av"},defaultClass:"fyvr1as"},5:{conditions:{sm:"fyvr1aw",md:"fyvr1ax",lg:"fyvr1ay",xl:"fyvr1az"},defaultClass:"fyvr1aw"},6:{conditions:{sm:"fyvr1b0",md:"fyvr1b1",lg:"fyvr1b2",xl:"fyvr1b3"},defaultClass:"fyvr1b0"},7:{conditions:{sm:"fyvr1b4",md:"fyvr1b5",lg:"fyvr1b6",xl:"fyvr1b7"},defaultClass:"fyvr1b4"},8:{conditions:{sm:"fyvr1b8",md:"fyvr1b9",lg:"fyvr1ba",xl:"fyvr1bb"},defaultClass:"fyvr1b8"},9:{conditions:{sm:"fyvr1bc",md:"fyvr1bd",lg:"fyvr1be",xl:"fyvr1bf"},defaultClass:"fyvr1bc"},10:{conditions:{sm:"fyvr1bg",md:"fyvr1bh",lg:"fyvr1bi",xl:"fyvr1bj"},defaultClass:"fyvr1bg"},12:{conditions:{sm:"fyvr1bk",md:"fyvr1bl",lg:"fyvr1bm",xl:"fyvr1bn"},defaultClass:"fyvr1bk"},14:{conditions:{sm:"fyvr1bo",md:"fyvr1bp",lg:"fyvr1bq",xl:"fyvr1br"},defaultClass:"fyvr1bo"},16:{conditions:{sm:"fyvr1bs",md:"fyvr1bt",lg:"fyvr1bu",xl:"fyvr1bv"},defaultClass:"fyvr1bs"},"0.25":{conditions:{sm:"fyvr1bw",md:"fyvr1bx",lg:"fyvr1by",xl:"fyvr1bz"},defaultClass:"fyvr1bw"},"0.5":{conditions:{sm:"fyvr1c0",md:"fyvr1c1",lg:"fyvr1c2",xl:"fyvr1c3"},defaultClass:"fyvr1c0"},"1.5":{conditions:{sm:"fyvr1c4",md:"fyvr1c5",lg:"fyvr1c6",xl:"fyvr1c7"},defaultClass:"fyvr1c4"},none:{conditions:{sm:"fyvr1c8",md:"fyvr1c9",lg:"fyvr1ca",xl:"fyvr1cb"},defaultClass:"fyvr1c8"},px:{conditions:{sm:"fyvr1cc",md:"fyvr1cd",lg:"fyvr1ce",xl:"fyvr1cf"},defaultClass:"fyvr1cc"},auto:{conditions:{sm:"fyvr1cg",md:"fyvr1ch",lg:"fyvr1ci",xl:"fyvr1cj"},defaultClass:"fyvr1cg"},full:{conditions:{sm:"fyvr1ck",md:"fyvr1cl",lg:"fyvr1cm",xl:"fyvr1cn"},defaultClass:"fyvr1ck"},"1/2":{conditions:{sm:"fyvr1co",md:"fyvr1cp",lg:"fyvr1cq",xl:"fyvr1cr"},defaultClass:"fyvr1co"},"1/3":{conditions:{sm:"fyvr1cs",md:"fyvr1ct",lg:"fyvr1cu",xl:"fyvr1cv"},defaultClass:"fyvr1cs"},"2/3":{conditions:{sm:"fyvr1cw",md:"fyvr1cx",lg:"fyvr1cy",xl:"fyvr1cz"},defaultClass:"fyvr1cw"},"1/4":{conditions:{sm:"fyvr1d0",md:"fyvr1d1",lg:"fyvr1d2",xl:"fyvr1d3"},defaultClass:"fyvr1d0"},"3/4":{conditions:{sm:"fyvr1d4",md:"fyvr1d5",lg:"fyvr1d6",xl:"fyvr1d7"},defaultClass:"fyvr1d4"},fit:{conditions:{sm:"fyvr1d8",md:"fyvr1d9",lg:"fyvr1da",xl:"fyvr1db"},defaultClass:"fyvr1d8"},max:{conditions:{sm:"fyvr1dc",md:"fyvr1dd",lg:"fyvr1de",xl:"fyvr1df"},defaultClass:"fyvr1dc"},min:{conditions:{sm:"fyvr1dg",md:"fyvr1dh",lg:"fyvr1di",xl:"fyvr1dj"},defaultClass:"fyvr1dg"},vw:{conditions:{sm:"fyvr1dk",md:"fyvr1dl",lg:"fyvr1dm",xl:"fyvr1dn"},defaultClass:"fyvr1dk"},vh:{conditions:{sm:"fyvr1do",md:"fyvr1dp",lg:"fyvr1dq",xl:"fyvr1dr"},defaultClass:"fyvr1do"}}},minWidth:{values:{0:{conditions:{sm:"fyvr1ds",md:"fyvr1dt",lg:"fyvr1du",xl:"fyvr1dv"},defaultClass:"fyvr1ds"},1:{conditions:{sm:"fyvr1dw",md:"fyvr1dx",lg:"fyvr1dy",xl:"fyvr1dz"},defaultClass:"fyvr1dw"},2:{conditions:{sm:"fyvr1e0",md:"fyvr1e1",lg:"fyvr1e2",xl:"fyvr1e3"},defaultClass:"fyvr1e0"},3:{conditions:{sm:"fyvr1e4",md:"fyvr1e5",lg:"fyvr1e6",xl:"fyvr1e7"},defaultClass:"fyvr1e4"},4:{conditions:{sm:"fyvr1e8",md:"fyvr1e9",lg:"fyvr1ea",xl:"fyvr1eb"},defaultClass:"fyvr1e8"},5:{conditions:{sm:"fyvr1ec",md:"fyvr1ed",lg:"fyvr1ee",xl:"fyvr1ef"},defaultClass:"fyvr1ec"},6:{conditions:{sm:"fyvr1eg",md:"fyvr1eh",lg:"fyvr1ei",xl:"fyvr1ej"},defaultClass:"fyvr1eg"},7:{conditions:{sm:"fyvr1ek",md:"fyvr1el",lg:"fyvr1em",xl:"fyvr1en"},defaultClass:"fyvr1ek"},8:{conditions:{sm:"fyvr1eo",md:"fyvr1ep",lg:"fyvr1eq",xl:"fyvr1er"},defaultClass:"fyvr1eo"},9:{conditions:{sm:"fyvr1es",md:"fyvr1et",lg:"fyvr1eu",xl:"fyvr1ev"},defaultClass:"fyvr1es"},10:{conditions:{sm:"fyvr1ew",md:"fyvr1ex",lg:"fyvr1ey",xl:"fyvr1ez"},defaultClass:"fyvr1ew"},12:{conditions:{sm:"fyvr1f0",md:"fyvr1f1",lg:"fyvr1f2",xl:"fyvr1f3"},defaultClass:"fyvr1f0"},14:{conditions:{sm:"fyvr1f4",md:"fyvr1f5",lg:"fyvr1f6",xl:"fyvr1f7"},defaultClass:"fyvr1f4"},16:{conditions:{sm:"fyvr1f8",md:"fyvr1f9",lg:"fyvr1fa",xl:"fyvr1fb"},defaultClass:"fyvr1f8"},"0.25":{conditions:{sm:"fyvr1fc",md:"fyvr1fd",lg:"fyvr1fe",xl:"fyvr1ff"},defaultClass:"fyvr1fc"},"0.5":{conditions:{sm:"fyvr1fg",md:"fyvr1fh",lg:"fyvr1fi",xl:"fyvr1fj"},defaultClass:"fyvr1fg"},"1.5":{conditions:{sm:"fyvr1fk",md:"fyvr1fl",lg:"fyvr1fm",xl:"fyvr1fn"},defaultClass:"fyvr1fk"},none:{conditions:{sm:"fyvr1fo",md:"fyvr1fp",lg:"fyvr1fq",xl:"fyvr1fr"},defaultClass:"fyvr1fo"},px:{conditions:{sm:"fyvr1fs",md:"fyvr1ft",lg:"fyvr1fu",xl:"fyvr1fv"},defaultClass:"fyvr1fs"},auto:{conditions:{sm:"fyvr1fw",md:"fyvr1fx",lg:"fyvr1fy",xl:"fyvr1fz"},defaultClass:"fyvr1fw"},full:{conditions:{sm:"fyvr1g0",md:"fyvr1g1",lg:"fyvr1g2",xl:"fyvr1g3"},defaultClass:"fyvr1g0"},"1/2":{conditions:{sm:"fyvr1g4",md:"fyvr1g5",lg:"fyvr1g6",xl:"fyvr1g7"},defaultClass:"fyvr1g4"},"1/3":{conditions:{sm:"fyvr1g8",md:"fyvr1g9",lg:"fyvr1ga",xl:"fyvr1gb"},defaultClass:"fyvr1g8"},"2/3":{conditions:{sm:"fyvr1gc",md:"fyvr1gd",lg:"fyvr1ge",xl:"fyvr1gf"},defaultClass:"fyvr1gc"},"1/4":{conditions:{sm:"fyvr1gg",md:"fyvr1gh",lg:"fyvr1gi",xl:"fyvr1gj"},defaultClass:"fyvr1gg"},"3/4":{conditions:{sm:"fyvr1gk",md:"fyvr1gl",lg:"fyvr1gm",xl:"fyvr1gn"},defaultClass:"fyvr1gk"},fit:{conditions:{sm:"fyvr1go",md:"fyvr1gp",lg:"fyvr1gq",xl:"fyvr1gr"},defaultClass:"fyvr1go"},max:{conditions:{sm:"fyvr1gs",md:"fyvr1gt",lg:"fyvr1gu",xl:"fyvr1gv"},defaultClass:"fyvr1gs"},min:{conditions:{sm:"fyvr1gw",md:"fyvr1gx",lg:"fyvr1gy",xl:"fyvr1gz"},defaultClass:"fyvr1gw"},vw:{conditions:{sm:"fyvr1h0",md:"fyvr1h1",lg:"fyvr1h2",xl:"fyvr1h3"},defaultClass:"fyvr1h0"},vh:{conditions:{sm:"fyvr1h4",md:"fyvr1h5",lg:"fyvr1h6",xl:"fyvr1h7"},defaultClass:"fyvr1h4"}}},minHeight:{values:{0:{conditions:{sm:"fyvr1h8",md:"fyvr1h9",lg:"fyvr1ha",xl:"fyvr1hb"},defaultClass:"fyvr1h8"},1:{conditions:{sm:"fyvr1hc",md:"fyvr1hd",lg:"fyvr1he",xl:"fyvr1hf"},defaultClass:"fyvr1hc"},2:{conditions:{sm:"fyvr1hg",md:"fyvr1hh",lg:"fyvr1hi",xl:"fyvr1hj"},defaultClass:"fyvr1hg"},3:{conditions:{sm:"fyvr1hk",md:"fyvr1hl",lg:"fyvr1hm",xl:"fyvr1hn"},defaultClass:"fyvr1hk"},4:{conditions:{sm:"fyvr1ho",md:"fyvr1hp",lg:"fyvr1hq",xl:"fyvr1hr"},defaultClass:"fyvr1ho"},5:{conditions:{sm:"fyvr1hs",md:"fyvr1ht",lg:"fyvr1hu",xl:"fyvr1hv"},defaultClass:"fyvr1hs"},6:{conditions:{sm:"fyvr1hw",md:"fyvr1hx",lg:"fyvr1hy",xl:"fyvr1hz"},defaultClass:"fyvr1hw"},7:{conditions:{sm:"fyvr1i0",md:"fyvr1i1",lg:"fyvr1i2",xl:"fyvr1i3"},defaultClass:"fyvr1i0"},8:{conditions:{sm:"fyvr1i4",md:"fyvr1i5",lg:"fyvr1i6",xl:"fyvr1i7"},defaultClass:"fyvr1i4"},9:{conditions:{sm:"fyvr1i8",md:"fyvr1i9",lg:"fyvr1ia",xl:"fyvr1ib"},defaultClass:"fyvr1i8"},10:{conditions:{sm:"fyvr1ic",md:"fyvr1id",lg:"fyvr1ie",xl:"fyvr1if"},defaultClass:"fyvr1ic"},12:{conditions:{sm:"fyvr1ig",md:"fyvr1ih",lg:"fyvr1ii",xl:"fyvr1ij"},defaultClass:"fyvr1ig"},14:{conditions:{sm:"fyvr1ik",md:"fyvr1il",lg:"fyvr1im",xl:"fyvr1in"},defaultClass:"fyvr1ik"},16:{conditions:{sm:"fyvr1io",md:"fyvr1ip",lg:"fyvr1iq",xl:"fyvr1ir"},defaultClass:"fyvr1io"},"0.25":{conditions:{sm:"fyvr1is",md:"fyvr1it",lg:"fyvr1iu",xl:"fyvr1iv"},defaultClass:"fyvr1is"},"0.5":{conditions:{sm:"fyvr1iw",md:"fyvr1ix",lg:"fyvr1iy",xl:"fyvr1iz"},defaultClass:"fyvr1iw"},"1.5":{conditions:{sm:"fyvr1j0",md:"fyvr1j1",lg:"fyvr1j2",xl:"fyvr1j3"},defaultClass:"fyvr1j0"},none:{conditions:{sm:"fyvr1j4",md:"fyvr1j5",lg:"fyvr1j6",xl:"fyvr1j7"},defaultClass:"fyvr1j4"},px:{conditions:{sm:"fyvr1j8",md:"fyvr1j9",lg:"fyvr1ja",xl:"fyvr1jb"},defaultClass:"fyvr1j8"},auto:{conditions:{sm:"fyvr1jc",md:"fyvr1jd",lg:"fyvr1je",xl:"fyvr1jf"},defaultClass:"fyvr1jc"},full:{conditions:{sm:"fyvr1jg",md:"fyvr1jh",lg:"fyvr1ji",xl:"fyvr1jj"},defaultClass:"fyvr1jg"},"1/2":{conditions:{sm:"fyvr1jk",md:"fyvr1jl",lg:"fyvr1jm",xl:"fyvr1jn"},defaultClass:"fyvr1jk"},"1/3":{conditions:{sm:"fyvr1jo",md:"fyvr1jp",lg:"fyvr1jq",xl:"fyvr1jr"},defaultClass:"fyvr1jo"},"2/3":{conditions:{sm:"fyvr1js",md:"fyvr1jt",lg:"fyvr1ju",xl:"fyvr1jv"},defaultClass:"fyvr1js"},"1/4":{conditions:{sm:"fyvr1jw",md:"fyvr1jx",lg:"fyvr1jy",xl:"fyvr1jz"},defaultClass:"fyvr1jw"},"3/4":{conditions:{sm:"fyvr1k0",md:"fyvr1k1",lg:"fyvr1k2",xl:"fyvr1k3"},defaultClass:"fyvr1k0"},fit:{conditions:{sm:"fyvr1k4",md:"fyvr1k5",lg:"fyvr1k6",xl:"fyvr1k7"},defaultClass:"fyvr1k4"},max:{conditions:{sm:"fyvr1k8",md:"fyvr1k9",lg:"fyvr1ka",xl:"fyvr1kb"},defaultClass:"fyvr1k8"},min:{conditions:{sm:"fyvr1kc",md:"fyvr1kd",lg:"fyvr1ke",xl:"fyvr1kf"},defaultClass:"fyvr1kc"},vw:{conditions:{sm:"fyvr1kg",md:"fyvr1kh",lg:"fyvr1ki",xl:"fyvr1kj"},defaultClass:"fyvr1kg"},vh:{conditions:{sm:"fyvr1kk",md:"fyvr1kl",lg:"fyvr1km",xl:"fyvr1kn"},defaultClass:"fyvr1kk"}}},top:{values:{0:{conditions:{sm:"fyvr1ko",md:"fyvr1kp",lg:"fyvr1kq",xl:"fyvr1kr"},defaultClass:"fyvr1ko"},1:{conditions:{sm:"fyvr1ks",md:"fyvr1kt",lg:"fyvr1ku",xl:"fyvr1kv"},defaultClass:"fyvr1ks"},2:{conditions:{sm:"fyvr1kw",md:"fyvr1kx",lg:"fyvr1ky",xl:"fyvr1kz"},defaultClass:"fyvr1kw"},3:{conditions:{sm:"fyvr1l0",md:"fyvr1l1",lg:"fyvr1l2",xl:"fyvr1l3"},defaultClass:"fyvr1l0"},4:{conditions:{sm:"fyvr1l4",md:"fyvr1l5",lg:"fyvr1l6",xl:"fyvr1l7"},defaultClass:"fyvr1l4"},5:{conditions:{sm:"fyvr1l8",md:"fyvr1l9",lg:"fyvr1la",xl:"fyvr1lb"},defaultClass:"fyvr1l8"},6:{conditions:{sm:"fyvr1lc",md:"fyvr1ld",lg:"fyvr1le",xl:"fyvr1lf"},defaultClass:"fyvr1lc"},7:{conditions:{sm:"fyvr1lg",md:"fyvr1lh",lg:"fyvr1li",xl:"fyvr1lj"},defaultClass:"fyvr1lg"},8:{conditions:{sm:"fyvr1lk",md:"fyvr1ll",lg:"fyvr1lm",xl:"fyvr1ln"},defaultClass:"fyvr1lk"},9:{conditions:{sm:"fyvr1lo",md:"fyvr1lp",lg:"fyvr1lq",xl:"fyvr1lr"},defaultClass:"fyvr1lo"},10:{conditions:{sm:"fyvr1ls",md:"fyvr1lt",lg:"fyvr1lu",xl:"fyvr1lv"},defaultClass:"fyvr1ls"},12:{conditions:{sm:"fyvr1lw",md:"fyvr1lx",lg:"fyvr1ly",xl:"fyvr1lz"},defaultClass:"fyvr1lw"},14:{conditions:{sm:"fyvr1m0",md:"fyvr1m1",lg:"fyvr1m2",xl:"fyvr1m3"},defaultClass:"fyvr1m0"},16:{conditions:{sm:"fyvr1m4",md:"fyvr1m5",lg:"fyvr1m6",xl:"fyvr1m7"},defaultClass:"fyvr1m4"},"0.25":{conditions:{sm:"fyvr1m8",md:"fyvr1m9",lg:"fyvr1ma",xl:"fyvr1mb"},defaultClass:"fyvr1m8"},"0.5":{conditions:{sm:"fyvr1mc",md:"fyvr1md",lg:"fyvr1me",xl:"fyvr1mf"},defaultClass:"fyvr1mc"},"1.5":{conditions:{sm:"fyvr1mg",md:"fyvr1mh",lg:"fyvr1mi",xl:"fyvr1mj"},defaultClass:"fyvr1mg"},auto:{conditions:{sm:"fyvr1mk",md:"fyvr1ml",lg:"fyvr1mm",xl:"fyvr1mn"},defaultClass:"fyvr1mk"}}},bottom:{values:{0:{conditions:{sm:"fyvr1mo",md:"fyvr1mp",lg:"fyvr1mq",xl:"fyvr1mr"},defaultClass:"fyvr1mo"},1:{conditions:{sm:"fyvr1ms",md:"fyvr1mt",lg:"fyvr1mu",xl:"fyvr1mv"},defaultClass:"fyvr1ms"},2:{conditions:{sm:"fyvr1mw",md:"fyvr1mx",lg:"fyvr1my",xl:"fyvr1mz"},defaultClass:"fyvr1mw"},3:{conditions:{sm:"fyvr1n0",md:"fyvr1n1",lg:"fyvr1n2",xl:"fyvr1n3"},defaultClass:"fyvr1n0"},4:{conditions:{sm:"fyvr1n4",md:"fyvr1n5",lg:"fyvr1n6",xl:"fyvr1n7"},defaultClass:"fyvr1n4"},5:{conditions:{sm:"fyvr1n8",md:"fyvr1n9",lg:"fyvr1na",xl:"fyvr1nb"},defaultClass:"fyvr1n8"},6:{conditions:{sm:"fyvr1nc",md:"fyvr1nd",lg:"fyvr1ne",xl:"fyvr1nf"},defaultClass:"fyvr1nc"},7:{conditions:{sm:"fyvr1ng",md:"fyvr1nh",lg:"fyvr1ni",xl:"fyvr1nj"},defaultClass:"fyvr1ng"},8:{conditions:{sm:"fyvr1nk",md:"fyvr1nl",lg:"fyvr1nm",xl:"fyvr1nn"},defaultClass:"fyvr1nk"},9:{conditions:{sm:"fyvr1no",md:"fyvr1np",lg:"fyvr1nq",xl:"fyvr1nr"},defaultClass:"fyvr1no"},10:{conditions:{sm:"fyvr1ns",md:"fyvr1nt",lg:"fyvr1nu",xl:"fyvr1nv"},defaultClass:"fyvr1ns"},12:{conditions:{sm:"fyvr1nw",md:"fyvr1nx",lg:"fyvr1ny",xl:"fyvr1nz"},defaultClass:"fyvr1nw"},14:{conditions:{sm:"fyvr1o0",md:"fyvr1o1",lg:"fyvr1o2",xl:"fyvr1o3"},defaultClass:"fyvr1o0"},16:{conditions:{sm:"fyvr1o4",md:"fyvr1o5",lg:"fyvr1o6",xl:"fyvr1o7"},defaultClass:"fyvr1o4"},"0.25":{conditions:{sm:"fyvr1o8",md:"fyvr1o9",lg:"fyvr1oa",xl:"fyvr1ob"},defaultClass:"fyvr1o8"},"0.5":{conditions:{sm:"fyvr1oc",md:"fyvr1od",lg:"fyvr1oe",xl:"fyvr1of"},defaultClass:"fyvr1oc"},"1.5":{conditions:{sm:"fyvr1og",md:"fyvr1oh",lg:"fyvr1oi",xl:"fyvr1oj"},defaultClass:"fyvr1og"},auto:{conditions:{sm:"fyvr1ok",md:"fyvr1ol",lg:"fyvr1om",xl:"fyvr1on"},defaultClass:"fyvr1ok"}}},left:{values:{0:{conditions:{sm:"fyvr1oo",md:"fyvr1op",lg:"fyvr1oq",xl:"fyvr1or"},defaultClass:"fyvr1oo"},1:{conditions:{sm:"fyvr1os",md:"fyvr1ot",lg:"fyvr1ou",xl:"fyvr1ov"},defaultClass:"fyvr1os"},2:{conditions:{sm:"fyvr1ow",md:"fyvr1ox",lg:"fyvr1oy",xl:"fyvr1oz"},defaultClass:"fyvr1ow"},3:{conditions:{sm:"fyvr1p0",md:"fyvr1p1",lg:"fyvr1p2",xl:"fyvr1p3"},defaultClass:"fyvr1p0"},4:{conditions:{sm:"fyvr1p4",md:"fyvr1p5",lg:"fyvr1p6",xl:"fyvr1p7"},defaultClass:"fyvr1p4"},5:{conditions:{sm:"fyvr1p8",md:"fyvr1p9",lg:"fyvr1pa",xl:"fyvr1pb"},defaultClass:"fyvr1p8"},6:{conditions:{sm:"fyvr1pc",md:"fyvr1pd",lg:"fyvr1pe",xl:"fyvr1pf"},defaultClass:"fyvr1pc"},7:{conditions:{sm:"fyvr1pg",md:"fyvr1ph",lg:"fyvr1pi",xl:"fyvr1pj"},defaultClass:"fyvr1pg"},8:{conditions:{sm:"fyvr1pk",md:"fyvr1pl",lg:"fyvr1pm",xl:"fyvr1pn"},defaultClass:"fyvr1pk"},9:{conditions:{sm:"fyvr1po",md:"fyvr1pp",lg:"fyvr1pq",xl:"fyvr1pr"},defaultClass:"fyvr1po"},10:{conditions:{sm:"fyvr1ps",md:"fyvr1pt",lg:"fyvr1pu",xl:"fyvr1pv"},defaultClass:"fyvr1ps"},12:{conditions:{sm:"fyvr1pw",md:"fyvr1px",lg:"fyvr1py",xl:"fyvr1pz"},defaultClass:"fyvr1pw"},14:{conditions:{sm:"fyvr1q0",md:"fyvr1q1",lg:"fyvr1q2",xl:"fyvr1q3"},defaultClass:"fyvr1q0"},16:{conditions:{sm:"fyvr1q4",md:"fyvr1q5",lg:"fyvr1q6",xl:"fyvr1q7"},defaultClass:"fyvr1q4"},"0.25":{conditions:{sm:"fyvr1q8",md:"fyvr1q9",lg:"fyvr1qa",xl:"fyvr1qb"},defaultClass:"fyvr1q8"},"0.5":{conditions:{sm:"fyvr1qc",md:"fyvr1qd",lg:"fyvr1qe",xl:"fyvr1qf"},defaultClass:"fyvr1qc"},"1.5":{conditions:{sm:"fyvr1qg",md:"fyvr1qh",lg:"fyvr1qi",xl:"fyvr1qj"},defaultClass:"fyvr1qg"},auto:{conditions:{sm:"fyvr1qk",md:"fyvr1ql",lg:"fyvr1qm",xl:"fyvr1qn"},defaultClass:"fyvr1qk"}}},right:{values:{0:{conditions:{sm:"fyvr1qo",md:"fyvr1qp",lg:"fyvr1qq",xl:"fyvr1qr"},defaultClass:"fyvr1qo"},1:{conditions:{sm:"fyvr1qs",md:"fyvr1qt",lg:"fyvr1qu",xl:"fyvr1qv"},defaultClass:"fyvr1qs"},2:{conditions:{sm:"fyvr1qw",md:"fyvr1qx",lg:"fyvr1qy",xl:"fyvr1qz"},defaultClass:"fyvr1qw"},3:{conditions:{sm:"fyvr1r0",md:"fyvr1r1",lg:"fyvr1r2",xl:"fyvr1r3"},defaultClass:"fyvr1r0"},4:{conditions:{sm:"fyvr1r4",md:"fyvr1r5",lg:"fyvr1r6",xl:"fyvr1r7"},defaultClass:"fyvr1r4"},5:{conditions:{sm:"fyvr1r8",md:"fyvr1r9",lg:"fyvr1ra",xl:"fyvr1rb"},defaultClass:"fyvr1r8"},6:{conditions:{sm:"fyvr1rc",md:"fyvr1rd",lg:"fyvr1re",xl:"fyvr1rf"},defaultClass:"fyvr1rc"},7:{conditions:{sm:"fyvr1rg",md:"fyvr1rh",lg:"fyvr1ri",xl:"fyvr1rj"},defaultClass:"fyvr1rg"},8:{conditions:{sm:"fyvr1rk",md:"fyvr1rl",lg:"fyvr1rm",xl:"fyvr1rn"},defaultClass:"fyvr1rk"},9:{conditions:{sm:"fyvr1ro",md:"fyvr1rp",lg:"fyvr1rq",xl:"fyvr1rr"},defaultClass:"fyvr1ro"},10:{conditions:{sm:"fyvr1rs",md:"fyvr1rt",lg:"fyvr1ru",xl:"fyvr1rv"},defaultClass:"fyvr1rs"},12:{conditions:{sm:"fyvr1rw",md:"fyvr1rx",lg:"fyvr1ry",xl:"fyvr1rz"},defaultClass:"fyvr1rw"},14:{conditions:{sm:"fyvr1s0",md:"fyvr1s1",lg:"fyvr1s2",xl:"fyvr1s3"},defaultClass:"fyvr1s0"},16:{conditions:{sm:"fyvr1s4",md:"fyvr1s5",lg:"fyvr1s6",xl:"fyvr1s7"},defaultClass:"fyvr1s4"},"0.25":{conditions:{sm:"fyvr1s8",md:"fyvr1s9",lg:"fyvr1sa",xl:"fyvr1sb"},defaultClass:"fyvr1s8"},"0.5":{conditions:{sm:"fyvr1sc",md:"fyvr1sd",lg:"fyvr1se",xl:"fyvr1sf"},defaultClass:"fyvr1sc"},"1.5":{conditions:{sm:"fyvr1sg",md:"fyvr1sh",lg:"fyvr1si",xl:"fyvr1sj"},defaultClass:"fyvr1sg"},auto:{conditions:{sm:"fyvr1sk",md:"fyvr1sl",lg:"fyvr1sm",xl:"fyvr1sn"},defaultClass:"fyvr1sk"}}},paddingTop:{values:{0:{conditions:{sm:"fyvr1so",md:"fyvr1sp",lg:"fyvr1sq",xl:"fyvr1sr"},defaultClass:"fyvr1so"},1:{conditions:{sm:"fyvr1ss",md:"fyvr1st",lg:"fyvr1su",xl:"fyvr1sv"},defaultClass:"fyvr1ss"},2:{conditions:{sm:"fyvr1sw",md:"fyvr1sx",lg:"fyvr1sy",xl:"fyvr1sz"},defaultClass:"fyvr1sw"},3:{conditions:{sm:"fyvr1t0",md:"fyvr1t1",lg:"fyvr1t2",xl:"fyvr1t3"},defaultClass:"fyvr1t0"},4:{conditions:{sm:"fyvr1t4",md:"fyvr1t5",lg:"fyvr1t6",xl:"fyvr1t7"},defaultClass:"fyvr1t4"},5:{conditions:{sm:"fyvr1t8",md:"fyvr1t9",lg:"fyvr1ta",xl:"fyvr1tb"},defaultClass:"fyvr1t8"},6:{conditions:{sm:"fyvr1tc",md:"fyvr1td",lg:"fyvr1te",xl:"fyvr1tf"},defaultClass:"fyvr1tc"},7:{conditions:{sm:"fyvr1tg",md:"fyvr1th",lg:"fyvr1ti",xl:"fyvr1tj"},defaultClass:"fyvr1tg"},8:{conditions:{sm:"fyvr1tk",md:"fyvr1tl",lg:"fyvr1tm",xl:"fyvr1tn"},defaultClass:"fyvr1tk"},9:{conditions:{sm:"fyvr1to",md:"fyvr1tp",lg:"fyvr1tq",xl:"fyvr1tr"},defaultClass:"fyvr1to"},10:{conditions:{sm:"fyvr1ts",md:"fyvr1tt",lg:"fyvr1tu",xl:"fyvr1tv"},defaultClass:"fyvr1ts"},12:{conditions:{sm:"fyvr1tw",md:"fyvr1tx",lg:"fyvr1ty",xl:"fyvr1tz"},defaultClass:"fyvr1tw"},14:{conditions:{sm:"fyvr1u0",md:"fyvr1u1",lg:"fyvr1u2",xl:"fyvr1u3"},defaultClass:"fyvr1u0"},16:{conditions:{sm:"fyvr1u4",md:"fyvr1u5",lg:"fyvr1u6",xl:"fyvr1u7"},defaultClass:"fyvr1u4"},"0.25":{conditions:{sm:"fyvr1u8",md:"fyvr1u9",lg:"fyvr1ua",xl:"fyvr1ub"},defaultClass:"fyvr1u8"},"0.5":{conditions:{sm:"fyvr1uc",md:"fyvr1ud",lg:"fyvr1ue",xl:"fyvr1uf"},defaultClass:"fyvr1uc"},"1.5":{conditions:{sm:"fyvr1ug",md:"fyvr1uh",lg:"fyvr1ui",xl:"fyvr1uj"},defaultClass:"fyvr1ug"}}},paddingBottom:{values:{0:{conditions:{sm:"fyvr1uk",md:"fyvr1ul",lg:"fyvr1um",xl:"fyvr1un"},defaultClass:"fyvr1uk"},1:{conditions:{sm:"fyvr1uo",md:"fyvr1up",lg:"fyvr1uq",xl:"fyvr1ur"},defaultClass:"fyvr1uo"},2:{conditions:{sm:"fyvr1us",md:"fyvr1ut",lg:"fyvr1uu",xl:"fyvr1uv"},defaultClass:"fyvr1us"},3:{conditions:{sm:"fyvr1uw",md:"fyvr1ux",lg:"fyvr1uy",xl:"fyvr1uz"},defaultClass:"fyvr1uw"},4:{conditions:{sm:"fyvr1v0",md:"fyvr1v1",lg:"fyvr1v2",xl:"fyvr1v3"},defaultClass:"fyvr1v0"},5:{conditions:{sm:"fyvr1v4",md:"fyvr1v5",lg:"fyvr1v6",xl:"fyvr1v7"},defaultClass:"fyvr1v4"},6:{conditions:{sm:"fyvr1v8",md:"fyvr1v9",lg:"fyvr1va",xl:"fyvr1vb"},defaultClass:"fyvr1v8"},7:{conditions:{sm:"fyvr1vc",md:"fyvr1vd",lg:"fyvr1ve",xl:"fyvr1vf"},defaultClass:"fyvr1vc"},8:{conditions:{sm:"fyvr1vg",md:"fyvr1vh",lg:"fyvr1vi",xl:"fyvr1vj"},defaultClass:"fyvr1vg"},9:{conditions:{sm:"fyvr1vk",md:"fyvr1vl",lg:"fyvr1vm",xl:"fyvr1vn"},defaultClass:"fyvr1vk"},10:{conditions:{sm:"fyvr1vo",md:"fyvr1vp",lg:"fyvr1vq",xl:"fyvr1vr"},defaultClass:"fyvr1vo"},12:{conditions:{sm:"fyvr1vs",md:"fyvr1vt",lg:"fyvr1vu",xl:"fyvr1vv"},defaultClass:"fyvr1vs"},14:{conditions:{sm:"fyvr1vw",md:"fyvr1vx",lg:"fyvr1vy",xl:"fyvr1vz"},defaultClass:"fyvr1vw"},16:{conditions:{sm:"fyvr1w0",md:"fyvr1w1",lg:"fyvr1w2",xl:"fyvr1w3"},defaultClass:"fyvr1w0"},"0.25":{conditions:{sm:"fyvr1w4",md:"fyvr1w5",lg:"fyvr1w6",xl:"fyvr1w7"},defaultClass:"fyvr1w4"},"0.5":{conditions:{sm:"fyvr1w8",md:"fyvr1w9",lg:"fyvr1wa",xl:"fyvr1wb"},defaultClass:"fyvr1w8"},"1.5":{conditions:{sm:"fyvr1wc",md:"fyvr1wd",lg:"fyvr1we",xl:"fyvr1wf"},defaultClass:"fyvr1wc"}}},paddingLeft:{values:{0:{conditions:{sm:"fyvr1wg",md:"fyvr1wh",lg:"fyvr1wi",xl:"fyvr1wj"},defaultClass:"fyvr1wg"},1:{conditions:{sm:"fyvr1wk",md:"fyvr1wl",lg:"fyvr1wm",xl:"fyvr1wn"},defaultClass:"fyvr1wk"},2:{conditions:{sm:"fyvr1wo",md:"fyvr1wp",lg:"fyvr1wq",xl:"fyvr1wr"},defaultClass:"fyvr1wo"},3:{conditions:{sm:"fyvr1ws",md:"fyvr1wt",lg:"fyvr1wu",xl:"fyvr1wv"},defaultClass:"fyvr1ws"},4:{conditions:{sm:"fyvr1ww",md:"fyvr1wx",lg:"fyvr1wy",xl:"fyvr1wz"},defaultClass:"fyvr1ww"},5:{conditions:{sm:"fyvr1x0",md:"fyvr1x1",lg:"fyvr1x2",xl:"fyvr1x3"},defaultClass:"fyvr1x0"},6:{conditions:{sm:"fyvr1x4",md:"fyvr1x5",lg:"fyvr1x6",xl:"fyvr1x7"},defaultClass:"fyvr1x4"},7:{conditions:{sm:"fyvr1x8",md:"fyvr1x9",lg:"fyvr1xa",xl:"fyvr1xb"},defaultClass:"fyvr1x8"},8:{conditions:{sm:"fyvr1xc",md:"fyvr1xd",lg:"fyvr1xe",xl:"fyvr1xf"},defaultClass:"fyvr1xc"},9:{conditions:{sm:"fyvr1xg",md:"fyvr1xh",lg:"fyvr1xi",xl:"fyvr1xj"},defaultClass:"fyvr1xg"},10:{conditions:{sm:"fyvr1xk",md:"fyvr1xl",lg:"fyvr1xm",xl:"fyvr1xn"},defaultClass:"fyvr1xk"},12:{conditions:{sm:"fyvr1xo",md:"fyvr1xp",lg:"fyvr1xq",xl:"fyvr1xr"},defaultClass:"fyvr1xo"},14:{conditions:{sm:"fyvr1xs",md:"fyvr1xt",lg:"fyvr1xu",xl:"fyvr1xv"},defaultClass:"fyvr1xs"},16:{conditions:{sm:"fyvr1xw",md:"fyvr1xx",lg:"fyvr1xy",xl:"fyvr1xz"},defaultClass:"fyvr1xw"},"0.25":{conditions:{sm:"fyvr1y0",md:"fyvr1y1",lg:"fyvr1y2",xl:"fyvr1y3"},defaultClass:"fyvr1y0"},"0.5":{conditions:{sm:"fyvr1y4",md:"fyvr1y5",lg:"fyvr1y6",xl:"fyvr1y7"},defaultClass:"fyvr1y4"},"1.5":{conditions:{sm:"fyvr1y8",md:"fyvr1y9",lg:"fyvr1ya",xl:"fyvr1yb"},defaultClass:"fyvr1y8"}}},paddingRight:{values:{0:{conditions:{sm:"fyvr1yc",md:"fyvr1yd",lg:"fyvr1ye",xl:"fyvr1yf"},defaultClass:"fyvr1yc"},1:{conditions:{sm:"fyvr1yg",md:"fyvr1yh",lg:"fyvr1yi",xl:"fyvr1yj"},defaultClass:"fyvr1yg"},2:{conditions:{sm:"fyvr1yk",md:"fyvr1yl",lg:"fyvr1ym",xl:"fyvr1yn"},defaultClass:"fyvr1yk"},3:{conditions:{sm:"fyvr1yo",md:"fyvr1yp",lg:"fyvr1yq",xl:"fyvr1yr"},defaultClass:"fyvr1yo"},4:{conditions:{sm:"fyvr1ys",md:"fyvr1yt",lg:"fyvr1yu",xl:"fyvr1yv"},defaultClass:"fyvr1ys"},5:{conditions:{sm:"fyvr1yw",md:"fyvr1yx",lg:"fyvr1yy",xl:"fyvr1yz"},defaultClass:"fyvr1yw"},6:{conditions:{sm:"fyvr1z0",md:"fyvr1z1",lg:"fyvr1z2",xl:"fyvr1z3"},defaultClass:"fyvr1z0"},7:{conditions:{sm:"fyvr1z4",md:"fyvr1z5",lg:"fyvr1z6",xl:"fyvr1z7"},defaultClass:"fyvr1z4"},8:{conditions:{sm:"fyvr1z8",md:"fyvr1z9",lg:"fyvr1za",xl:"fyvr1zb"},defaultClass:"fyvr1z8"},9:{conditions:{sm:"fyvr1zc",md:"fyvr1zd",lg:"fyvr1ze",xl:"fyvr1zf"},defaultClass:"fyvr1zc"},10:{conditions:{sm:"fyvr1zg",md:"fyvr1zh",lg:"fyvr1zi",xl:"fyvr1zj"},defaultClass:"fyvr1zg"},12:{conditions:{sm:"fyvr1zk",md:"fyvr1zl",lg:"fyvr1zm",xl:"fyvr1zn"},defaultClass:"fyvr1zk"},14:{conditions:{sm:"fyvr1zo",md:"fyvr1zp",lg:"fyvr1zq",xl:"fyvr1zr"},defaultClass:"fyvr1zo"},16:{conditions:{sm:"fyvr1zs",md:"fyvr1zt",lg:"fyvr1zu",xl:"fyvr1zv"},defaultClass:"fyvr1zs"},"0.25":{conditions:{sm:"fyvr1zw",md:"fyvr1zx",lg:"fyvr1zy",xl:"fyvr1zz"},defaultClass:"fyvr1zw"},"0.5":{conditions:{sm:"fyvr1100",md:"fyvr1101",lg:"fyvr1102",xl:"fyvr1103"},defaultClass:"fyvr1100"},"1.5":{conditions:{sm:"fyvr1104",md:"fyvr1105",lg:"fyvr1106",xl:"fyvr1107"},defaultClass:"fyvr1104"}}},marginTop:{values:{0:{conditions:{sm:"fyvr1108",md:"fyvr1109",lg:"fyvr110a",xl:"fyvr110b"},defaultClass:"fyvr1108"},1:{conditions:{sm:"fyvr110c",md:"fyvr110d",lg:"fyvr110e",xl:"fyvr110f"},defaultClass:"fyvr110c"},2:{conditions:{sm:"fyvr110g",md:"fyvr110h",lg:"fyvr110i",xl:"fyvr110j"},defaultClass:"fyvr110g"},3:{conditions:{sm:"fyvr110k",md:"fyvr110l",lg:"fyvr110m",xl:"fyvr110n"},defaultClass:"fyvr110k"},4:{conditions:{sm:"fyvr110o",md:"fyvr110p",lg:"fyvr110q",xl:"fyvr110r"},defaultClass:"fyvr110o"},5:{conditions:{sm:"fyvr110s",md:"fyvr110t",lg:"fyvr110u",xl:"fyvr110v"},defaultClass:"fyvr110s"},6:{conditions:{sm:"fyvr110w",md:"fyvr110x",lg:"fyvr110y",xl:"fyvr110z"},defaultClass:"fyvr110w"},7:{conditions:{sm:"fyvr1110",md:"fyvr1111",lg:"fyvr1112",xl:"fyvr1113"},defaultClass:"fyvr1110"},8:{conditions:{sm:"fyvr1114",md:"fyvr1115",lg:"fyvr1116",xl:"fyvr1117"},defaultClass:"fyvr1114"},9:{conditions:{sm:"fyvr1118",md:"fyvr1119",lg:"fyvr111a",xl:"fyvr111b"},defaultClass:"fyvr1118"},10:{conditions:{sm:"fyvr111c",md:"fyvr111d",lg:"fyvr111e",xl:"fyvr111f"},defaultClass:"fyvr111c"},12:{conditions:{sm:"fyvr111g",md:"fyvr111h",lg:"fyvr111i",xl:"fyvr111j"},defaultClass:"fyvr111g"},14:{conditions:{sm:"fyvr111k",md:"fyvr111l",lg:"fyvr111m",xl:"fyvr111n"},defaultClass:"fyvr111k"},16:{conditions:{sm:"fyvr111o",md:"fyvr111p",lg:"fyvr111q",xl:"fyvr111r"},defaultClass:"fyvr111o"},"0.25":{conditions:{sm:"fyvr111s",md:"fyvr111t",lg:"fyvr111u",xl:"fyvr111v"},defaultClass:"fyvr111s"},"0.5":{conditions:{sm:"fyvr111w",md:"fyvr111x",lg:"fyvr111y",xl:"fyvr111z"},defaultClass:"fyvr111w"},"1.5":{conditions:{sm:"fyvr1120",md:"fyvr1121",lg:"fyvr1122",xl:"fyvr1123"},defaultClass:"fyvr1120"},auto:{conditions:{sm:"fyvr1124",md:"fyvr1125",lg:"fyvr1126",xl:"fyvr1127"},defaultClass:"fyvr1124"}}},marginBottom:{values:{0:{conditions:{sm:"fyvr1128",md:"fyvr1129",lg:"fyvr112a",xl:"fyvr112b"},defaultClass:"fyvr1128"},1:{conditions:{sm:"fyvr112c",md:"fyvr112d",lg:"fyvr112e",xl:"fyvr112f"},defaultClass:"fyvr112c"},2:{conditions:{sm:"fyvr112g",md:"fyvr112h",lg:"fyvr112i",xl:"fyvr112j"},defaultClass:"fyvr112g"},3:{conditions:{sm:"fyvr112k",md:"fyvr112l",lg:"fyvr112m",xl:"fyvr112n"},defaultClass:"fyvr112k"},4:{conditions:{sm:"fyvr112o",md:"fyvr112p",lg:"fyvr112q",xl:"fyvr112r"},defaultClass:"fyvr112o"},5:{conditions:{sm:"fyvr112s",md:"fyvr112t",lg:"fyvr112u",xl:"fyvr112v"},defaultClass:"fyvr112s"},6:{conditions:{sm:"fyvr112w",md:"fyvr112x",lg:"fyvr112y",xl:"fyvr112z"},defaultClass:"fyvr112w"},7:{conditions:{sm:"fyvr1130",md:"fyvr1131",lg:"fyvr1132",xl:"fyvr1133"},defaultClass:"fyvr1130"},8:{conditions:{sm:"fyvr1134",md:"fyvr1135",lg:"fyvr1136",xl:"fyvr1137"},defaultClass:"fyvr1134"},9:{conditions:{sm:"fyvr1138",md:"fyvr1139",lg:"fyvr113a",xl:"fyvr113b"},defaultClass:"fyvr1138"},10:{conditions:{sm:"fyvr113c",md:"fyvr113d",lg:"fyvr113e",xl:"fyvr113f"},defaultClass:"fyvr113c"},12:{conditions:{sm:"fyvr113g",md:"fyvr113h",lg:"fyvr113i",xl:"fyvr113j"},defaultClass:"fyvr113g"},14:{conditions:{sm:"fyvr113k",md:"fyvr113l",lg:"fyvr113m",xl:"fyvr113n"},defaultClass:"fyvr113k"},16:{conditions:{sm:"fyvr113o",md:"fyvr113p",lg:"fyvr113q",xl:"fyvr113r"},defaultClass:"fyvr113o"},"0.25":{conditions:{sm:"fyvr113s",md:"fyvr113t",lg:"fyvr113u",xl:"fyvr113v"},defaultClass:"fyvr113s"},"0.5":{conditions:{sm:"fyvr113w",md:"fyvr113x",lg:"fyvr113y",xl:"fyvr113z"},defaultClass:"fyvr113w"},"1.5":{conditions:{sm:"fyvr1140",md:"fyvr1141",lg:"fyvr1142",xl:"fyvr1143"},defaultClass:"fyvr1140"},auto:{conditions:{sm:"fyvr1144",md:"fyvr1145",lg:"fyvr1146",xl:"fyvr1147"},defaultClass:"fyvr1144"}}},marginLeft:{values:{0:{conditions:{sm:"fyvr1148",md:"fyvr1149",lg:"fyvr114a",xl:"fyvr114b"},defaultClass:"fyvr1148"},1:{conditions:{sm:"fyvr114c",md:"fyvr114d",lg:"fyvr114e",xl:"fyvr114f"},defaultClass:"fyvr114c"},2:{conditions:{sm:"fyvr114g",md:"fyvr114h",lg:"fyvr114i",xl:"fyvr114j"},defaultClass:"fyvr114g"},3:{conditions:{sm:"fyvr114k",md:"fyvr114l",lg:"fyvr114m",xl:"fyvr114n"},defaultClass:"fyvr114k"},4:{conditions:{sm:"fyvr114o",md:"fyvr114p",lg:"fyvr114q",xl:"fyvr114r"},defaultClass:"fyvr114o"},5:{conditions:{sm:"fyvr114s",md:"fyvr114t",lg:"fyvr114u",xl:"fyvr114v"},defaultClass:"fyvr114s"},6:{conditions:{sm:"fyvr114w",md:"fyvr114x",lg:"fyvr114y",xl:"fyvr114z"},defaultClass:"fyvr114w"},7:{conditions:{sm:"fyvr1150",md:"fyvr1151",lg:"fyvr1152",xl:"fyvr1153"},defaultClass:"fyvr1150"},8:{conditions:{sm:"fyvr1154",md:"fyvr1155",lg:"fyvr1156",xl:"fyvr1157"},defaultClass:"fyvr1154"},9:{conditions:{sm:"fyvr1158",md:"fyvr1159",lg:"fyvr115a",xl:"fyvr115b"},defaultClass:"fyvr1158"},10:{conditions:{sm:"fyvr115c",md:"fyvr115d",lg:"fyvr115e",xl:"fyvr115f"},defaultClass:"fyvr115c"},12:{conditions:{sm:"fyvr115g",md:"fyvr115h",lg:"fyvr115i",xl:"fyvr115j"},defaultClass:"fyvr115g"},14:{conditions:{sm:"fyvr115k",md:"fyvr115l",lg:"fyvr115m",xl:"fyvr115n"},defaultClass:"fyvr115k"},16:{conditions:{sm:"fyvr115o",md:"fyvr115p",lg:"fyvr115q",xl:"fyvr115r"},defaultClass:"fyvr115o"},"0.25":{conditions:{sm:"fyvr115s",md:"fyvr115t",lg:"fyvr115u",xl:"fyvr115v"},defaultClass:"fyvr115s"},"0.5":{conditions:{sm:"fyvr115w",md:"fyvr115x",lg:"fyvr115y",xl:"fyvr115z"},defaultClass:"fyvr115w"},"1.5":{conditions:{sm:"fyvr1160",md:"fyvr1161",lg:"fyvr1162",xl:"fyvr1163"},defaultClass:"fyvr1160"},auto:{conditions:{sm:"fyvr1164",md:"fyvr1165",lg:"fyvr1166",xl:"fyvr1167"},defaultClass:"fyvr1164"}}},marginRight:{values:{0:{conditions:{sm:"fyvr1168",md:"fyvr1169",lg:"fyvr116a",xl:"fyvr116b"},defaultClass:"fyvr1168"},1:{conditions:{sm:"fyvr116c",md:"fyvr116d",lg:"fyvr116e",xl:"fyvr116f"},defaultClass:"fyvr116c"},2:{conditions:{sm:"fyvr116g",md:"fyvr116h",lg:"fyvr116i",xl:"fyvr116j"},defaultClass:"fyvr116g"},3:{conditions:{sm:"fyvr116k",md:"fyvr116l",lg:"fyvr116m",xl:"fyvr116n"},defaultClass:"fyvr116k"},4:{conditions:{sm:"fyvr116o",md:"fyvr116p",lg:"fyvr116q",xl:"fyvr116r"},defaultClass:"fyvr116o"},5:{conditions:{sm:"fyvr116s",md:"fyvr116t",lg:"fyvr116u",xl:"fyvr116v"},defaultClass:"fyvr116s"},6:{conditions:{sm:"fyvr116w",md:"fyvr116x",lg:"fyvr116y",xl:"fyvr116z"},defaultClass:"fyvr116w"},7:{conditions:{sm:"fyvr1170",md:"fyvr1171",lg:"fyvr1172",xl:"fyvr1173"},defaultClass:"fyvr1170"},8:{conditions:{sm:"fyvr1174",md:"fyvr1175",lg:"fyvr1176",xl:"fyvr1177"},defaultClass:"fyvr1174"},9:{conditions:{sm:"fyvr1178",md:"fyvr1179",lg:"fyvr117a",xl:"fyvr117b"},defaultClass:"fyvr1178"},10:{conditions:{sm:"fyvr117c",md:"fyvr117d",lg:"fyvr117e",xl:"fyvr117f"},defaultClass:"fyvr117c"},12:{conditions:{sm:"fyvr117g",md:"fyvr117h",lg:"fyvr117i",xl:"fyvr117j"},defaultClass:"fyvr117g"},14:{conditions:{sm:"fyvr117k",md:"fyvr117l",lg:"fyvr117m",xl:"fyvr117n"},defaultClass:"fyvr117k"},16:{conditions:{sm:"fyvr117o",md:"fyvr117p",lg:"fyvr117q",xl:"fyvr117r"},defaultClass:"fyvr117o"},"0.25":{conditions:{sm:"fyvr117s",md:"fyvr117t",lg:"fyvr117u",xl:"fyvr117v"},defaultClass:"fyvr117s"},"0.5":{conditions:{sm:"fyvr117w",md:"fyvr117x",lg:"fyvr117y",xl:"fyvr117z"},defaultClass:"fyvr117w"},"1.5":{conditions:{sm:"fyvr1180",md:"fyvr1181",lg:"fyvr1182",xl:"fyvr1183"},defaultClass:"fyvr1180"},auto:{conditions:{sm:"fyvr1184",md:"fyvr1185",lg:"fyvr1186",xl:"fyvr1187"},defaultClass:"fyvr1184"}}},gap:{values:{0:{conditions:{sm:"fyvr1188",md:"fyvr1189",lg:"fyvr118a",xl:"fyvr118b"},defaultClass:"fyvr1188"},1:{conditions:{sm:"fyvr118c",md:"fyvr118d",lg:"fyvr118e",xl:"fyvr118f"},defaultClass:"fyvr118c"},2:{conditions:{sm:"fyvr118g",md:"fyvr118h",lg:"fyvr118i",xl:"fyvr118j"},defaultClass:"fyvr118g"},3:{conditions:{sm:"fyvr118k",md:"fyvr118l",lg:"fyvr118m",xl:"fyvr118n"},defaultClass:"fyvr118k"},4:{conditions:{sm:"fyvr118o",md:"fyvr118p",lg:"fyvr118q",xl:"fyvr118r"},defaultClass:"fyvr118o"},5:{conditions:{sm:"fyvr118s",md:"fyvr118t",lg:"fyvr118u",xl:"fyvr118v"},defaultClass:"fyvr118s"},6:{conditions:{sm:"fyvr118w",md:"fyvr118x",lg:"fyvr118y",xl:"fyvr118z"},defaultClass:"fyvr118w"},7:{conditions:{sm:"fyvr1190",md:"fyvr1191",lg:"fyvr1192",xl:"fyvr1193"},defaultClass:"fyvr1190"},8:{conditions:{sm:"fyvr1194",md:"fyvr1195",lg:"fyvr1196",xl:"fyvr1197"},defaultClass:"fyvr1194"},9:{conditions:{sm:"fyvr1198",md:"fyvr1199",lg:"fyvr119a",xl:"fyvr119b"},defaultClass:"fyvr1198"},10:{conditions:{sm:"fyvr119c",md:"fyvr119d",lg:"fyvr119e",xl:"fyvr119f"},defaultClass:"fyvr119c"},12:{conditions:{sm:"fyvr119g",md:"fyvr119h",lg:"fyvr119i",xl:"fyvr119j"},defaultClass:"fyvr119g"},14:{conditions:{sm:"fyvr119k",md:"fyvr119l",lg:"fyvr119m",xl:"fyvr119n"},defaultClass:"fyvr119k"},16:{conditions:{sm:"fyvr119o",md:"fyvr119p",lg:"fyvr119q",xl:"fyvr119r"},defaultClass:"fyvr119o"},"0.25":{conditions:{sm:"fyvr119s",md:"fyvr119t",lg:"fyvr119u",xl:"fyvr119v"},defaultClass:"fyvr119s"},"0.5":{conditions:{sm:"fyvr119w",md:"fyvr119x",lg:"fyvr119y",xl:"fyvr119z"},defaultClass:"fyvr119w"},"1.5":{conditions:{sm:"fyvr11a0",md:"fyvr11a1",lg:"fyvr11a2",xl:"fyvr11a3"},defaultClass:"fyvr11a0"}}},borderBottomWidth:{values:{none:{conditions:{sm:"fyvr11a4",md:"fyvr11a5",lg:"fyvr11a6",xl:"fyvr11a7"},defaultClass:"fyvr11a4"},thin:{conditions:{sm:"fyvr11a8",md:"fyvr11a9",lg:"fyvr11aa",xl:"fyvr11ab"},defaultClass:"fyvr11a8"},thick:{conditions:{sm:"fyvr11ac",md:"fyvr11ad",lg:"fyvr11ae",xl:"fyvr11af"},defaultClass:"fyvr11ac"}}},borderLeftWidth:{values:{none:{conditions:{sm:"fyvr11ag",md:"fyvr11ah",lg:"fyvr11ai",xl:"fyvr11aj"},defaultClass:"fyvr11ag"},thin:{conditions:{sm:"fyvr11ak",md:"fyvr11al",lg:"fyvr11am",xl:"fyvr11an"},defaultClass:"fyvr11ak"},thick:{conditions:{sm:"fyvr11ao",md:"fyvr11ap",lg:"fyvr11aq",xl:"fyvr11ar"},defaultClass:"fyvr11ao"}}},borderRightWidth:{values:{none:{conditions:{sm:"fyvr11as",md:"fyvr11at",lg:"fyvr11au",xl:"fyvr11av"},defaultClass:"fyvr11as"},thin:{conditions:{sm:"fyvr11aw",md:"fyvr11ax",lg:"fyvr11ay",xl:"fyvr11az"},defaultClass:"fyvr11aw"},thick:{conditions:{sm:"fyvr11b0",md:"fyvr11b1",lg:"fyvr11b2",xl:"fyvr11b3"},defaultClass:"fyvr11b0"}}},borderTopWidth:{values:{none:{conditions:{sm:"fyvr11b4",md:"fyvr11b5",lg:"fyvr11b6",xl:"fyvr11b7"},defaultClass:"fyvr11b4"},thin:{conditions:{sm:"fyvr11b8",md:"fyvr11b9",lg:"fyvr11ba",xl:"fyvr11bb"},defaultClass:"fyvr11b8"},thick:{conditions:{sm:"fyvr11bc",md:"fyvr11bd",lg:"fyvr11be",xl:"fyvr11bf"},defaultClass:"fyvr11bc"}}},borderBottomLeftRadius:{values:{none:{conditions:{sm:"fyvr11bg",md:"fyvr11bh",lg:"fyvr11bi",xl:"fyvr11bj"},defaultClass:"fyvr11bg"},xs:{conditions:{sm:"fyvr11bk",md:"fyvr11bl",lg:"fyvr11bm",xl:"fyvr11bn"},defaultClass:"fyvr11bk"},sm:{conditions:{sm:"fyvr11bo",md:"fyvr11bp",lg:"fyvr11bq",xl:"fyvr11br"},defaultClass:"fyvr11bo"},md:{conditions:{sm:"fyvr11bs",md:"fyvr11bt",lg:"fyvr11bu",xl:"fyvr11bv"},defaultClass:"fyvr11bs"},lg:{conditions:{sm:"fyvr11bw",md:"fyvr11bx",lg:"fyvr11by",xl:"fyvr11bz"},defaultClass:"fyvr11bw"},circle:{conditions:{sm:"fyvr11c0",md:"fyvr11c1",lg:"fyvr11c2",xl:"fyvr11c3"},defaultClass:"fyvr11c0"}}},borderBottomRightRadius:{values:{none:{conditions:{sm:"fyvr11c4",md:"fyvr11c5",lg:"fyvr11c6",xl:"fyvr11c7"},defaultClass:"fyvr11c4"},xs:{conditions:{sm:"fyvr11c8",md:"fyvr11c9",lg:"fyvr11ca",xl:"fyvr11cb"},defaultClass:"fyvr11c8"},sm:{conditions:{sm:"fyvr11cc",md:"fyvr11cd",lg:"fyvr11ce",xl:"fyvr11cf"},defaultClass:"fyvr11cc"},md:{conditions:{sm:"fyvr11cg",md:"fyvr11ch",lg:"fyvr11ci",xl:"fyvr11cj"},defaultClass:"fyvr11cg"},lg:{conditions:{sm:"fyvr11ck",md:"fyvr11cl",lg:"fyvr11cm",xl:"fyvr11cn"},defaultClass:"fyvr11ck"},circle:{conditions:{sm:"fyvr11co",md:"fyvr11cp",lg:"fyvr11cq",xl:"fyvr11cr"},defaultClass:"fyvr11co"}}},borderTopLeftRadius:{values:{none:{conditions:{sm:"fyvr11cs",md:"fyvr11ct",lg:"fyvr11cu",xl:"fyvr11cv"},defaultClass:"fyvr11cs"},xs:{conditions:{sm:"fyvr11cw",md:"fyvr11cx",lg:"fyvr11cy",xl:"fyvr11cz"},defaultClass:"fyvr11cw"},sm:{conditions:{sm:"fyvr11d0",md:"fyvr11d1",lg:"fyvr11d2",xl:"fyvr11d3"},defaultClass:"fyvr11d0"},md:{conditions:{sm:"fyvr11d4",md:"fyvr11d5",lg:"fyvr11d6",xl:"fyvr11d7"},defaultClass:"fyvr11d4"},lg:{conditions:{sm:"fyvr11d8",md:"fyvr11d9",lg:"fyvr11da",xl:"fyvr11db"},defaultClass:"fyvr11d8"},circle:{conditions:{sm:"fyvr11dc",md:"fyvr11dd",lg:"fyvr11de",xl:"fyvr11df"},defaultClass:"fyvr11dc"}}},borderTopRightRadius:{values:{none:{conditions:{sm:"fyvr11dg",md:"fyvr11dh",lg:"fyvr11di",xl:"fyvr11dj"},defaultClass:"fyvr11dg"},xs:{conditions:{sm:"fyvr11dk",md:"fyvr11dl",lg:"fyvr11dm",xl:"fyvr11dn"},defaultClass:"fyvr11dk"},sm:{conditions:{sm:"fyvr11do",md:"fyvr11dp",lg:"fyvr11dq",xl:"fyvr11dr"},defaultClass:"fyvr11do"},md:{conditions:{sm:"fyvr11ds",md:"fyvr11dt",lg:"fyvr11du",xl:"fyvr11dv"},defaultClass:"fyvr11ds"},lg:{conditions:{sm:"fyvr11dw",md:"fyvr11dx",lg:"fyvr11dy",xl:"fyvr11dz"},defaultClass:"fyvr11dw"},circle:{conditions:{sm:"fyvr11e0",md:"fyvr11e1",lg:"fyvr11e2",xl:"fyvr11e3"},defaultClass:"fyvr11e0"}}},fontSize:{values:{inherit:{conditions:{sm:"fyvr11e4",md:"fyvr11e5",lg:"fyvr11e6",xl:"fyvr11e7"},defaultClass:"fyvr11e4"},xsmall:{conditions:{sm:"fyvr11e8",md:"fyvr11e9",lg:"fyvr11ea",xl:"fyvr11eb"},defaultClass:"fyvr11e8"},small:{conditions:{sm:"fyvr11ec",md:"fyvr11ed",lg:"fyvr11ee",xl:"fyvr11ef"},defaultClass:"fyvr11ec"},normal:{conditions:{sm:"fyvr11eg",md:"fyvr11eh",lg:"fyvr11ei",xl:"fyvr11ej"},defaultClass:"fyvr11eg"},medium:{conditions:{sm:"fyvr11ek",md:"fyvr11el",lg:"fyvr11em",xl:"fyvr11en"},defaultClass:"fyvr11ek"},large:{conditions:{sm:"fyvr11eo",md:"fyvr11ep",lg:"fyvr11eq",xl:"fyvr11er"},defaultClass:"fyvr11eo"},xlarge:{conditions:{sm:"fyvr11es",md:"fyvr11et",lg:"fyvr11eu",xl:"fyvr11ev"},defaultClass:"fyvr11es"}}},fontWeight:{values:{inherit:{conditions:{sm:"fyvr11ew",md:"fyvr11ex",lg:"fyvr11ey",xl:"fyvr11ez"},defaultClass:"fyvr11ew"},normal:{conditions:{sm:"fyvr11f0",md:"fyvr11f1",lg:"fyvr11f2",xl:"fyvr11f3"},defaultClass:"fyvr11f0"},medium:{conditions:{sm:"fyvr11f4",md:"fyvr11f5",lg:"fyvr11f6",xl:"fyvr11f7"},defaultClass:"fyvr11f4"},semibold:{conditions:{sm:"fyvr11f8",md:"fyvr11f9",lg:"fyvr11fa",xl:"fyvr11fb"},defaultClass:"fyvr11f8"},bold:{conditions:{sm:"fyvr11fc",md:"fyvr11fd",lg:"fyvr11fe",xl:"fyvr11ff"},defaultClass:"fyvr11fc"}}},letterSpacing:{values:{inherit:{conditions:{sm:"fyvr11fg",md:"fyvr11fh",lg:"fyvr11fi",xl:"fyvr11fj"},defaultClass:"fyvr11fg"},none:{conditions:{sm:"fyvr11fk",md:"fyvr11fl",lg:"fyvr11fm",xl:"fyvr11fn"},defaultClass:"fyvr11fk"},normal:{conditions:{sm:"fyvr11fo",md:"fyvr11fp",lg:"fyvr11fq",xl:"fyvr11fr"},defaultClass:"fyvr11fo"},wide:{conditions:{sm:"fyvr11fs",md:"fyvr11ft",lg:"fyvr11fu",xl:"fyvr11fv"},defaultClass:"fyvr11fs"}}},lineHeight:{values:{4:{conditions:{sm:"fyvr11fw",md:"fyvr11fx",lg:"fyvr11fy",xl:"fyvr11fz"},defaultClass:"fyvr11fw"},5:{conditions:{sm:"fyvr11g0",md:"fyvr11g1",lg:"fyvr11g2",xl:"fyvr11g3"},defaultClass:"fyvr11g0"},6:{conditions:{sm:"fyvr11g4",md:"fyvr11g5",lg:"fyvr11g6",xl:"fyvr11g7"},defaultClass:"fyvr11g4"},7:{conditions:{sm:"fyvr11g8",md:"fyvr11g9",lg:"fyvr11ga",xl:"fyvr11gb"},defaultClass:"fyvr11g8"},9:{conditions:{sm:"fyvr11gc",md:"fyvr11gd",lg:"fyvr11ge",xl:"fyvr11gf"},defaultClass:"fyvr11gc"},inherit:{conditions:{sm:"fyvr11gg",md:"fyvr11gh",lg:"fyvr11gi",xl:"fyvr11gj"},defaultClass:"fyvr11gg"}}},textAlign:{values:{center:{conditions:{sm:"fyvr11gk",md:"fyvr11gl",lg:"fyvr11gm",xl:"fyvr11gn"},defaultClass:"fyvr11gk"},left:{conditions:{sm:"fyvr11go",md:"fyvr11gp",lg:"fyvr11gq",xl:"fyvr11gr"},defaultClass:"fyvr11go"},right:{conditions:{sm:"fyvr11gs",md:"fyvr11gt",lg:"fyvr11gu",xl:"fyvr11gv"},defaultClass:"fyvr11gs"}}},display:{values:{block:{conditions:{sm:"fyvr11gw",md:"fyvr11gx",lg:"fyvr11gy",xl:"fyvr11gz"},defaultClass:"fyvr11gw"},flex:{conditions:{sm:"fyvr11h0",md:"fyvr11h1",lg:"fyvr11h2",xl:"fyvr11h3"},defaultClass:"fyvr11h0"},grid:{conditions:{sm:"fyvr11h4",md:"fyvr11h5",lg:"fyvr11h6",xl:"fyvr11h7"},defaultClass:"fyvr11h4"},"inline-block":{conditions:{sm:"fyvr11h8",md:"fyvr11h9",lg:"fyvr11ha",xl:"fyvr11hb"},defaultClass:"fyvr11h8"},"inline-flex":{conditions:{sm:"fyvr11hc",md:"fyvr11hd",lg:"fyvr11he",xl:"fyvr11hf"},defaultClass:"fyvr11hc"},none:{conditions:{sm:"fyvr11hg",md:"fyvr11hh",lg:"fyvr11hi",xl:"fyvr11hj"},defaultClass:"fyvr11hg"},contents:{conditions:{sm:"fyvr11hk",md:"fyvr11hl",lg:"fyvr11hm",xl:"fyvr11hn"},defaultClass:"fyvr11hk"}}},position:{values:{absolute:{conditions:{sm:"fyvr11ho",md:"fyvr11hp",lg:"fyvr11hq",xl:"fyvr11hr"},defaultClass:"fyvr11ho"},fixed:{conditions:{sm:"fyvr11hs",md:"fyvr11ht",lg:"fyvr11hu",xl:"fyvr11hv"},defaultClass:"fyvr11hs"},relative:{conditions:{sm:"fyvr11hw",md:"fyvr11hx",lg:"fyvr11hy",xl:"fyvr11hz"},defaultClass:"fyvr11hw"},sticky:{conditions:{sm:"fyvr11i0",md:"fyvr11i1",lg:"fyvr11i2",xl:"fyvr11i3"},defaultClass:"fyvr11i0"}}},flexDirection:{values:{column:{conditions:{sm:"fyvr11i4",md:"fyvr11i5",lg:"fyvr11i6",xl:"fyvr11i7"},defaultClass:"fyvr11i4"},"column-reverse":{conditions:{sm:"fyvr11i8",md:"fyvr11i9",lg:"fyvr11ia",xl:"fyvr11ib"},defaultClass:"fyvr11i8"},row:{conditions:{sm:"fyvr11ic",md:"fyvr11id",lg:"fyvr11ie",xl:"fyvr11if"},defaultClass:"fyvr11ic"},"row-reverse":{conditions:{sm:"fyvr11ig",md:"fyvr11ih",lg:"fyvr11ii",xl:"fyvr11ij"},defaultClass:"fyvr11ig"}}},flexShrink:{values:{0:{conditions:{sm:"fyvr11ik",md:"fyvr11il",lg:"fyvr11im",xl:"fyvr11in"},defaultClass:"fyvr11ik"},1:{conditions:{sm:"fyvr11io",md:"fyvr11ip",lg:"fyvr11iq",xl:"fyvr11ir"},defaultClass:"fyvr11io"}}},flexGrow:{values:{0:{conditions:{sm:"fyvr11is",md:"fyvr11it",lg:"fyvr11iu",xl:"fyvr11iv"},defaultClass:"fyvr11is"},1:{conditions:{sm:"fyvr11iw",md:"fyvr11ix",lg:"fyvr11iy",xl:"fyvr11iz"},defaultClass:"fyvr11iw"}}},flexWrap:{values:{nowrap:{conditions:{sm:"fyvr11j0",md:"fyvr11j1",lg:"fyvr11j2",xl:"fyvr11j3"},defaultClass:"fyvr11j0"},wrap:{conditions:{sm:"fyvr11j4",md:"fyvr11j5",lg:"fyvr11j6",xl:"fyvr11j7"},defaultClass:"fyvr11j4"},"wrap-reverse":{conditions:{sm:"fyvr11j8",md:"fyvr11j9",lg:"fyvr11ja",xl:"fyvr11jb"},defaultClass:"fyvr11j8"}}},justifyContent:{values:{"flex-start":{conditions:{sm:"fyvr11jc",md:"fyvr11jd",lg:"fyvr11je",xl:"fyvr11jf"},defaultClass:"fyvr11jc"},center:{conditions:{sm:"fyvr11jg",md:"fyvr11jh",lg:"fyvr11ji",xl:"fyvr11jj"},defaultClass:"fyvr11jg"},"flex-end":{conditions:{sm:"fyvr11jk",md:"fyvr11jl",lg:"fyvr11jm",xl:"fyvr11jn"},defaultClass:"fyvr11jk"},stretch:{conditions:{sm:"fyvr11jo",md:"fyvr11jp",lg:"fyvr11jq",xl:"fyvr11jr"},defaultClass:"fyvr11jo"},"space-around":{conditions:{sm:"fyvr11js",md:"fyvr11jt",lg:"fyvr11ju",xl:"fyvr11jv"},defaultClass:"fyvr11js"},"space-between":{conditions:{sm:"fyvr11jw",md:"fyvr11jx",lg:"fyvr11jy",xl:"fyvr11jz"},defaultClass:"fyvr11jw"},"space-evenly":{conditions:{sm:"fyvr11k0",md:"fyvr11k1",lg:"fyvr11k2",xl:"fyvr11k3"},defaultClass:"fyvr11k0"}}},justifySelf:{values:{"flex-start":{conditions:{sm:"fyvr11k4",md:"fyvr11k5",lg:"fyvr11k6",xl:"fyvr11k7"},defaultClass:"fyvr11k4"},center:{conditions:{sm:"fyvr11k8",md:"fyvr11k9",lg:"fyvr11ka",xl:"fyvr11kb"},defaultClass:"fyvr11k8"},"flex-end":{conditions:{sm:"fyvr11kc",md:"fyvr11kd",lg:"fyvr11ke",xl:"fyvr11kf"},defaultClass:"fyvr11kc"},stretch:{conditions:{sm:"fyvr11kg",md:"fyvr11kh",lg:"fyvr11ki",xl:"fyvr11kj"},defaultClass:"fyvr11kg"}}},alignItems:{values:{"flex-start":{conditions:{sm:"fyvr11kk",md:"fyvr11kl",lg:"fyvr11km",xl:"fyvr11kn"},defaultClass:"fyvr11kk"},center:{conditions:{sm:"fyvr11ko",md:"fyvr11kp",lg:"fyvr11kq",xl:"fyvr11kr"},defaultClass:"fyvr11ko"},"flex-end":{conditions:{sm:"fyvr11ks",md:"fyvr11kt",lg:"fyvr11ku",xl:"fyvr11kv"},defaultClass:"fyvr11ks"},stretch:{conditions:{sm:"fyvr11kw",md:"fyvr11kx",lg:"fyvr11ky",xl:"fyvr11kz"},defaultClass:"fyvr11kw"},baseline:{conditions:{sm:"fyvr11l0",md:"fyvr11l1",lg:"fyvr11l2",xl:"fyvr11l3"},defaultClass:"fyvr11l0"}}},alignSelf:{values:{"flex-start":{conditions:{sm:"fyvr11l4",md:"fyvr11l5",lg:"fyvr11l6",xl:"fyvr11l7"},defaultClass:"fyvr11l4"},center:{conditions:{sm:"fyvr11l8",md:"fyvr11l9",lg:"fyvr11la",xl:"fyvr11lb"},defaultClass:"fyvr11l8"},"flex-end":{conditions:{sm:"fyvr11lc",md:"fyvr11ld",lg:"fyvr11le",xl:"fyvr11lf"},defaultClass:"fyvr11lc"},stretch:{conditions:{sm:"fyvr11lg",md:"fyvr11lh",lg:"fyvr11li",xl:"fyvr11lj"},defaultClass:"fyvr11lg"},baseline:{conditions:{sm:"fyvr11lk",md:"fyvr11ll",lg:"fyvr11lm",xl:"fyvr11ln"},defaultClass:"fyvr11lk"}}},overflowX:{values:{auto:{conditions:{sm:"fyvr11lo",md:"fyvr11lp",lg:"fyvr11lq",xl:"fyvr11lr"},defaultClass:"fyvr11lo"},hidden:{conditions:{sm:"fyvr11ls",md:"fyvr11lt",lg:"fyvr11lu",xl:"fyvr11lv"},defaultClass:"fyvr11ls"},scroll:{conditions:{sm:"fyvr11lw",md:"fyvr11lx",lg:"fyvr11ly",xl:"fyvr11lz"},defaultClass:"fyvr11lw"},visible:{conditions:{sm:"fyvr11m0",md:"fyvr11m1",lg:"fyvr11m2",xl:"fyvr11m3"},defaultClass:"fyvr11m0"}}},overflowY:{values:{auto:{conditions:{sm:"fyvr11m4",md:"fyvr11m5",lg:"fyvr11m6",xl:"fyvr11m7"},defaultClass:"fyvr11m4"},hidden:{conditions:{sm:"fyvr11m8",md:"fyvr11m9",lg:"fyvr11ma",xl:"fyvr11mb"},defaultClass:"fyvr11m8"},scroll:{conditions:{sm:"fyvr11mc",md:"fyvr11md",lg:"fyvr11me",xl:"fyvr11mf"},defaultClass:"fyvr11mc"},visible:{conditions:{sm:"fyvr11mg",md:"fyvr11mh",lg:"fyvr11mi",xl:"fyvr11mj"},defaultClass:"fyvr11mg"}}},visibility:{values:{hidden:{conditions:{sm:"fyvr11mk",md:"fyvr11ml",lg:"fyvr11mm",xl:"fyvr11mn"},defaultClass:"fyvr11mk"},visible:{conditions:{sm:"fyvr11mo",md:"fyvr11mp",lg:"fyvr11mq",xl:"fyvr11mr"},defaultClass:"fyvr11mo"}}}}},{conditions:void 0,styles:{backdropFilter:{values:{blur:{defaultClass:"fyvr11ms"},none:{defaultClass:"fyvr11mt"}}},fontFamily:{values:{inherit:{defaultClass:"fyvr11mu"},body:{defaultClass:"fyvr11mv"},mono:{defaultClass:"fyvr11mw"}}},textOverflow:{values:{ellipsis:{defaultClass:"fyvr11mx"},clip:{defaultClass:"fyvr11my"}}},textTransform:{values:{capitalize:{defaultClass:"fyvr11mz"},lowercase:{defaultClass:"fyvr11n0"},uppercase:{defaultClass:"fyvr11n1"}}},userSelect:{values:{none:{defaultClass:"fyvr11n2"},text:{defaultClass:"fyvr11n3"},all:{defaultClass:"fyvr11n4"},auto:{defaultClass:"fyvr11n5"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11n6"},nowrap:{defaultClass:"fyvr11n7"},initial:{defaultClass:"fyvr11n8"},inherit:{defaultClass:"fyvr11n9"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11na"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11nb"},"break-word":{defaultClass:"fyvr11nc"},initial:{defaultClass:"fyvr11nd"},inherit:{defaultClass:"fyvr11ne"}}},zIndex:{values:{0:{defaultClass:"fyvr11nf"},1:{defaultClass:"fyvr11ng"},10:{defaultClass:"fyvr11nh"},20:{defaultClass:"fyvr11ni"},30:{defaultClass:"fyvr11nj"},40:{defaultClass:"fyvr11nk"},50:{defaultClass:"fyvr11nl"},"-1":{defaultClass:"fyvr11nm"},auto:{defaultClass:"fyvr11nn"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11no"},"16/9":{defaultClass:"fyvr11np"},"4/3":{defaultClass:"fyvr11nq"},"3/1":{defaultClass:"fyvr11nr"},auto:{defaultClass:"fyvr11ns"}}}}},{conditions:{defaultCondition:"base",conditionNames:["base","active","disabled","focus","hover","checked"],responsiveArray:void 0},styles:{borderColor:{mappings:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]},borderStyle:{mappings:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"]},focusRing:{mappings:["boxShadow","outline"]},background:{values:{black:{conditions:{base:"fyvr11nt",active:"fyvr11nu",disabled:"fyvr11nv",focus:"fyvr11nw",hover:"fyvr11nx",checked:"fyvr11ny"},defaultClass:"fyvr11nt"},white:{conditions:{base:"fyvr11nz",active:"fyvr11o0",disabled:"fyvr11o1",focus:"fyvr11o2",hover:"fyvr11o3",checked:"fyvr11o4"},defaultClass:"fyvr11nz"},inherit:{conditions:{base:"fyvr11o5",active:"fyvr11o6",disabled:"fyvr11o7",focus:"fyvr11o8",hover:"fyvr11o9",checked:"fyvr11oa"},defaultClass:"fyvr11o5"},transparent:{conditions:{base:"fyvr11ob",active:"fyvr11oc",disabled:"fyvr11od",focus:"fyvr11oe",hover:"fyvr11of",checked:"fyvr11og"},defaultClass:"fyvr11ob"},positive:{conditions:{base:"fyvr11oh",active:"fyvr11oi",disabled:"fyvr11oj",focus:"fyvr11ok",hover:"fyvr11ol",checked:"fyvr11om"},defaultClass:"fyvr11oh"},negative:{conditions:{base:"fyvr11on",active:"fyvr11oo",disabled:"fyvr11op",focus:"fyvr11oq",hover:"fyvr11or",checked:"fyvr11os"},defaultClass:"fyvr11on"},info:{conditions:{base:"fyvr11ot",active:"fyvr11ou",disabled:"fyvr11ov",focus:"fyvr11ow",hover:"fyvr11ox",checked:"fyvr11oy"},defaultClass:"fyvr11ot"},warning:{conditions:{base:"fyvr11oz",active:"fyvr11p0",disabled:"fyvr11p1",focus:"fyvr11p2",hover:"fyvr11p3",checked:"fyvr11p4"},defaultClass:"fyvr11oz"},gradientBackdrop:{conditions:{base:"fyvr11p5",active:"fyvr11p6",disabled:"fyvr11p7",focus:"fyvr11p8",hover:"fyvr11p9",checked:"fyvr11pa"},defaultClass:"fyvr11p5"},gradientPrimary:{conditions:{base:"fyvr11pb",active:"fyvr11pc",disabled:"fyvr11pd",focus:"fyvr11pe",hover:"fyvr11pf",checked:"fyvr11pg"},defaultClass:"fyvr11pb"},gradientSecondary:{conditions:{base:"fyvr11ph",active:"fyvr11pi",disabled:"fyvr11pj",focus:"fyvr11pk",hover:"fyvr11pl",checked:"fyvr11pm"},defaultClass:"fyvr11ph"},arbitrumDark:{conditions:{base:"fyvr11pn",active:"fyvr11po",disabled:"fyvr11pp",focus:"fyvr11pq",hover:"fyvr11pr",checked:"fyvr11ps"},defaultClass:"fyvr11pn"},arbitrumLight:{conditions:{base:"fyvr11pt",active:"fyvr11pu",disabled:"fyvr11pv",focus:"fyvr11pw",hover:"fyvr11px",checked:"fyvr11py"},defaultClass:"fyvr11pt"},avalanceDark:{conditions:{base:"fyvr11pz",active:"fyvr11q0",disabled:"fyvr11q1",focus:"fyvr11q2",hover:"fyvr11q3",checked:"fyvr11q4"},defaultClass:"fyvr11pz"},avalanceLight:{conditions:{base:"fyvr11q5",active:"fyvr11q6",disabled:"fyvr11q7",focus:"fyvr11q8",hover:"fyvr11q9",checked:"fyvr11qa"},defaultClass:"fyvr11q5"},bscDark:{conditions:{base:"fyvr11qb",active:"fyvr11qc",disabled:"fyvr11qd",focus:"fyvr11qe",hover:"fyvr11qf",checked:"fyvr11qg"},defaultClass:"fyvr11qb"},bscLight:{conditions:{base:"fyvr11qh",active:"fyvr11qi",disabled:"fyvr11qj",focus:"fyvr11qk",hover:"fyvr11ql",checked:"fyvr11qm"},defaultClass:"fyvr11qh"},ethereumDark:{conditions:{base:"fyvr11qn",active:"fyvr11qo",disabled:"fyvr11qp",focus:"fyvr11qq",hover:"fyvr11qr",checked:"fyvr11qs"},defaultClass:"fyvr11qn"},ethereumLight:{conditions:{base:"fyvr11qt",active:"fyvr11qu",disabled:"fyvr11qv",focus:"fyvr11qw",hover:"fyvr11qx",checked:"fyvr11qy"},defaultClass:"fyvr11qt"},gnosisDark:{conditions:{base:"fyvr11qz",active:"fyvr11r0",disabled:"fyvr11r1",focus:"fyvr11r2",hover:"fyvr11r3",checked:"fyvr11r4"},defaultClass:"fyvr11qz"},gnosisLight:{conditions:{base:"fyvr11r5",active:"fyvr11r6",disabled:"fyvr11r7",focus:"fyvr11r8",hover:"fyvr11r9",checked:"fyvr11ra"},defaultClass:"fyvr11r5"},polygonDark:{conditions:{base:"fyvr11rb",active:"fyvr11rc",disabled:"fyvr11rd",focus:"fyvr11re",hover:"fyvr11rf",checked:"fyvr11rg"},defaultClass:"fyvr11rb"},polygonLight:{conditions:{base:"fyvr11rh",active:"fyvr11ri",disabled:"fyvr11rj",focus:"fyvr11rk",hover:"fyvr11rl",checked:"fyvr11rm"},defaultClass:"fyvr11rh"},text100:{conditions:{base:"fyvr11rn",active:"fyvr11ro",disabled:"fyvr11rp",focus:"fyvr11rq",hover:"fyvr11rr",checked:"fyvr11rs"},defaultClass:"fyvr11rn"},text80:{conditions:{base:"fyvr11rt",active:"fyvr11ru",disabled:"fyvr11rv",focus:"fyvr11rw",hover:"fyvr11rx",checked:"fyvr11ry"},defaultClass:"fyvr11rt"},text50:{conditions:{base:"fyvr11rz",active:"fyvr11s0",disabled:"fyvr11s1",focus:"fyvr11s2",hover:"fyvr11s3",checked:"fyvr11s4"},defaultClass:"fyvr11rz"},textInverse100:{conditions:{base:"fyvr11s5",active:"fyvr11s6",disabled:"fyvr11s7",focus:"fyvr11s8",hover:"fyvr11s9",checked:"fyvr11sa"},defaultClass:"fyvr11s5"},backgroundPrimary:{conditions:{base:"fyvr11sb",active:"fyvr11sc",disabled:"fyvr11sd",focus:"fyvr11se",hover:"fyvr11sf",checked:"fyvr11sg"},defaultClass:"fyvr11sb"},backgroundSecondary:{conditions:{base:"fyvr11sh",active:"fyvr11si",disabled:"fyvr11sj",focus:"fyvr11sk",hover:"fyvr11sl",checked:"fyvr11sm"},defaultClass:"fyvr11sh"},backgroundContrast:{conditions:{base:"fyvr11sn",active:"fyvr11so",disabled:"fyvr11sp",focus:"fyvr11sq",hover:"fyvr11sr",checked:"fyvr11ss"},defaultClass:"fyvr11sn"},backgroundMuted:{conditions:{base:"fyvr11st",active:"fyvr11su",disabled:"fyvr11sv",focus:"fyvr11sw",hover:"fyvr11sx",checked:"fyvr11sy"},defaultClass:"fyvr11st"},backgroundControl:{conditions:{base:"fyvr11sz",active:"fyvr11t0",disabled:"fyvr11t1",focus:"fyvr11t2",hover:"fyvr11t3",checked:"fyvr11t4"},defaultClass:"fyvr11sz"},backgroundInverse:{conditions:{base:"fyvr11t5",active:"fyvr11t6",disabled:"fyvr11t7",focus:"fyvr11t8",hover:"fyvr11t9",checked:"fyvr11ta"},defaultClass:"fyvr11t5"},backgroundBackdrop:{conditions:{base:"fyvr11tb",active:"fyvr11tc",disabled:"fyvr11td",focus:"fyvr11te",hover:"fyvr11tf",checked:"fyvr11tg"},defaultClass:"fyvr11tb"},backgroundOverlay:{conditions:{base:"fyvr11th",active:"fyvr11ti",disabled:"fyvr11tj",focus:"fyvr11tk",hover:"fyvr11tl",checked:"fyvr11tm"},defaultClass:"fyvr11th"},backgroundRaised:{conditions:{base:"fyvr11tn",active:"fyvr11to",disabled:"fyvr11tp",focus:"fyvr11tq",hover:"fyvr11tr",checked:"fyvr11ts"},defaultClass:"fyvr11tn"},buttonGlass:{conditions:{base:"fyvr11tt",active:"fyvr11tu",disabled:"fyvr11tv",focus:"fyvr11tw",hover:"fyvr11tx",checked:"fyvr11ty"},defaultClass:"fyvr11tt"},buttonEmphasis:{conditions:{base:"fyvr11tz",active:"fyvr11u0",disabled:"fyvr11u1",focus:"fyvr11u2",hover:"fyvr11u3",checked:"fyvr11u4"},defaultClass:"fyvr11tz"},buttonInverse:{conditions:{base:"fyvr11u5",active:"fyvr11u6",disabled:"fyvr11u7",focus:"fyvr11u8",hover:"fyvr11u9",checked:"fyvr11ua"},defaultClass:"fyvr11u5"},borderNormal:{conditions:{base:"fyvr11ub",active:"fyvr11uc",disabled:"fyvr11ud",focus:"fyvr11ue",hover:"fyvr11uf",checked:"fyvr11ug"},defaultClass:"fyvr11ub"},borderFocus:{conditions:{base:"fyvr11uh",active:"fyvr11ui",disabled:"fyvr11uj",focus:"fyvr11uk",hover:"fyvr11ul",checked:"fyvr11um"},defaultClass:"fyvr11uh"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11un",active:"fyvr11uo",disabled:"fyvr11up",focus:"fyvr11uq",hover:"fyvr11ur",checked:"fyvr11us"},defaultClass:"fyvr11un"},white:{conditions:{base:"fyvr11ut",active:"fyvr11uu",disabled:"fyvr11uv",focus:"fyvr11uw",hover:"fyvr11ux",checked:"fyvr11uy"},defaultClass:"fyvr11ut"},inherit:{conditions:{base:"fyvr11uz",active:"fyvr11v0",disabled:"fyvr11v1",focus:"fyvr11v2",hover:"fyvr11v3",checked:"fyvr11v4"},defaultClass:"fyvr11uz"},transparent:{conditions:{base:"fyvr11v5",active:"fyvr11v6",disabled:"fyvr11v7",focus:"fyvr11v8",hover:"fyvr11v9",checked:"fyvr11va"},defaultClass:"fyvr11v5"},positive:{conditions:{base:"fyvr11vb",active:"fyvr11vc",disabled:"fyvr11vd",focus:"fyvr11ve",hover:"fyvr11vf",checked:"fyvr11vg"},defaultClass:"fyvr11vb"},negative:{conditions:{base:"fyvr11vh",active:"fyvr11vi",disabled:"fyvr11vj",focus:"fyvr11vk",hover:"fyvr11vl",checked:"fyvr11vm"},defaultClass:"fyvr11vh"},info:{conditions:{base:"fyvr11vn",active:"fyvr11vo",disabled:"fyvr11vp",focus:"fyvr11vq",hover:"fyvr11vr",checked:"fyvr11vs"},defaultClass:"fyvr11vn"},warning:{conditions:{base:"fyvr11vt",active:"fyvr11vu",disabled:"fyvr11vv",focus:"fyvr11vw",hover:"fyvr11vx",checked:"fyvr11vy"},defaultClass:"fyvr11vt"},gradientBackdrop:{conditions:{base:"fyvr11vz",active:"fyvr11w0",disabled:"fyvr11w1",focus:"fyvr11w2",hover:"fyvr11w3",checked:"fyvr11w4"},defaultClass:"fyvr11vz"},gradientPrimary:{conditions:{base:"fyvr11w5",active:"fyvr11w6",disabled:"fyvr11w7",focus:"fyvr11w8",hover:"fyvr11w9",checked:"fyvr11wa"},defaultClass:"fyvr11w5"},gradientSecondary:{conditions:{base:"fyvr11wb",active:"fyvr11wc",disabled:"fyvr11wd",focus:"fyvr11we",hover:"fyvr11wf",checked:"fyvr11wg"},defaultClass:"fyvr11wb"},arbitrumDark:{conditions:{base:"fyvr11wh",active:"fyvr11wi",disabled:"fyvr11wj",focus:"fyvr11wk",hover:"fyvr11wl",checked:"fyvr11wm"},defaultClass:"fyvr11wh"},arbitrumLight:{conditions:{base:"fyvr11wn",active:"fyvr11wo",disabled:"fyvr11wp",focus:"fyvr11wq",hover:"fyvr11wr",checked:"fyvr11ws"},defaultClass:"fyvr11wn"},avalanceDark:{conditions:{base:"fyvr11wt",active:"fyvr11wu",disabled:"fyvr11wv",focus:"fyvr11ww",hover:"fyvr11wx",checked:"fyvr11wy"},defaultClass:"fyvr11wt"},avalanceLight:{conditions:{base:"fyvr11wz",active:"fyvr11x0",disabled:"fyvr11x1",focus:"fyvr11x2",hover:"fyvr11x3",checked:"fyvr11x4"},defaultClass:"fyvr11wz"},bscDark:{conditions:{base:"fyvr11x5",active:"fyvr11x6",disabled:"fyvr11x7",focus:"fyvr11x8",hover:"fyvr11x9",checked:"fyvr11xa"},defaultClass:"fyvr11x5"},bscLight:{conditions:{base:"fyvr11xb",active:"fyvr11xc",disabled:"fyvr11xd",focus:"fyvr11xe",hover:"fyvr11xf",checked:"fyvr11xg"},defaultClass:"fyvr11xb"},ethereumDark:{conditions:{base:"fyvr11xh",active:"fyvr11xi",disabled:"fyvr11xj",focus:"fyvr11xk",hover:"fyvr11xl",checked:"fyvr11xm"},defaultClass:"fyvr11xh"},ethereumLight:{conditions:{base:"fyvr11xn",active:"fyvr11xo",disabled:"fyvr11xp",focus:"fyvr11xq",hover:"fyvr11xr",checked:"fyvr11xs"},defaultClass:"fyvr11xn"},gnosisDark:{conditions:{base:"fyvr11xt",active:"fyvr11xu",disabled:"fyvr11xv",focus:"fyvr11xw",hover:"fyvr11xx",checked:"fyvr11xy"},defaultClass:"fyvr11xt"},gnosisLight:{conditions:{base:"fyvr11xz",active:"fyvr11y0",disabled:"fyvr11y1",focus:"fyvr11y2",hover:"fyvr11y3",checked:"fyvr11y4"},defaultClass:"fyvr11xz"},polygonDark:{conditions:{base:"fyvr11y5",active:"fyvr11y6",disabled:"fyvr11y7",focus:"fyvr11y8",hover:"fyvr11y9",checked:"fyvr11ya"},defaultClass:"fyvr11y5"},polygonLight:{conditions:{base:"fyvr11yb",active:"fyvr11yc",disabled:"fyvr11yd",focus:"fyvr11ye",hover:"fyvr11yf",checked:"fyvr11yg"},defaultClass:"fyvr11yb"},text100:{conditions:{base:"fyvr11yh",active:"fyvr11yi",disabled:"fyvr11yj",focus:"fyvr11yk",hover:"fyvr11yl",checked:"fyvr11ym"},defaultClass:"fyvr11yh"},text80:{conditions:{base:"fyvr11yn",active:"fyvr11yo",disabled:"fyvr11yp",focus:"fyvr11yq",hover:"fyvr11yr",checked:"fyvr11ys"},defaultClass:"fyvr11yn"},text50:{conditions:{base:"fyvr11yt",active:"fyvr11yu",disabled:"fyvr11yv",focus:"fyvr11yw",hover:"fyvr11yx",checked:"fyvr11yy"},defaultClass:"fyvr11yt"},textInverse100:{conditions:{base:"fyvr11yz",active:"fyvr11z0",disabled:"fyvr11z1",focus:"fyvr11z2",hover:"fyvr11z3",checked:"fyvr11z4"},defaultClass:"fyvr11yz"},backgroundPrimary:{conditions:{base:"fyvr11z5",active:"fyvr11z6",disabled:"fyvr11z7",focus:"fyvr11z8",hover:"fyvr11z9",checked:"fyvr11za"},defaultClass:"fyvr11z5"},backgroundSecondary:{conditions:{base:"fyvr11zb",active:"fyvr11zc",disabled:"fyvr11zd",focus:"fyvr11ze",hover:"fyvr11zf",checked:"fyvr11zg"},defaultClass:"fyvr11zb"},backgroundContrast:{conditions:{base:"fyvr11zh",active:"fyvr11zi",disabled:"fyvr11zj",focus:"fyvr11zk",hover:"fyvr11zl",checked:"fyvr11zm"},defaultClass:"fyvr11zh"},backgroundMuted:{conditions:{base:"fyvr11zn",active:"fyvr11zo",disabled:"fyvr11zp",focus:"fyvr11zq",hover:"fyvr11zr",checked:"fyvr11zs"},defaultClass:"fyvr11zn"},backgroundControl:{conditions:{base:"fyvr11zt",active:"fyvr11zu",disabled:"fyvr11zv",focus:"fyvr11zw",hover:"fyvr11zx",checked:"fyvr11zy"},defaultClass:"fyvr11zt"},backgroundInverse:{conditions:{base:"fyvr11zz",active:"fyvr1200",disabled:"fyvr1201",focus:"fyvr1202",hover:"fyvr1203",checked:"fyvr1204"},defaultClass:"fyvr11zz"},backgroundBackdrop:{conditions:{base:"fyvr1205",active:"fyvr1206",disabled:"fyvr1207",focus:"fyvr1208",hover:"fyvr1209",checked:"fyvr120a"},defaultClass:"fyvr1205"},backgroundOverlay:{conditions:{base:"fyvr120b",active:"fyvr120c",disabled:"fyvr120d",focus:"fyvr120e",hover:"fyvr120f",checked:"fyvr120g"},defaultClass:"fyvr120b"},backgroundRaised:{conditions:{base:"fyvr120h",active:"fyvr120i",disabled:"fyvr120j",focus:"fyvr120k",hover:"fyvr120l",checked:"fyvr120m"},defaultClass:"fyvr120h"},buttonGlass:{conditions:{base:"fyvr120n",active:"fyvr120o",disabled:"fyvr120p",focus:"fyvr120q",hover:"fyvr120r",checked:"fyvr120s"},defaultClass:"fyvr120n"},buttonEmphasis:{conditions:{base:"fyvr120t",active:"fyvr120u",disabled:"fyvr120v",focus:"fyvr120w",hover:"fyvr120x",checked:"fyvr120y"},defaultClass:"fyvr120t"},buttonInverse:{conditions:{base:"fyvr120z",active:"fyvr1210",disabled:"fyvr1211",focus:"fyvr1212",hover:"fyvr1213",checked:"fyvr1214"},defaultClass:"fyvr120z"},borderNormal:{conditions:{base:"fyvr1215",active:"fyvr1216",disabled:"fyvr1217",focus:"fyvr1218",hover:"fyvr1219",checked:"fyvr121a"},defaultClass:"fyvr1215"},borderFocus:{conditions:{base:"fyvr121b",active:"fyvr121c",disabled:"fyvr121d",focus:"fyvr121e",hover:"fyvr121f",checked:"fyvr121g"},defaultClass:"fyvr121b"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr121h",active:"fyvr121i",disabled:"fyvr121j",focus:"fyvr121k",hover:"fyvr121l",checked:"fyvr121m"},defaultClass:"fyvr121h"},dashed:{conditions:{base:"fyvr121n",active:"fyvr121o",disabled:"fyvr121p",focus:"fyvr121q",hover:"fyvr121r",checked:"fyvr121s"},defaultClass:"fyvr121n"},dotted:{conditions:{base:"fyvr121t",active:"fyvr121u",disabled:"fyvr121v",focus:"fyvr121w",hover:"fyvr121x",checked:"fyvr121y"},defaultClass:"fyvr121t"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr121z",active:"fyvr1220",disabled:"fyvr1221",focus:"fyvr1222",hover:"fyvr1223",checked:"fyvr1224"},defaultClass:"fyvr121z"},white:{conditions:{base:"fyvr1225",active:"fyvr1226",disabled:"fyvr1227",focus:"fyvr1228",hover:"fyvr1229",checked:"fyvr122a"},defaultClass:"fyvr1225"},inherit:{conditions:{base:"fyvr122b",active:"fyvr122c",disabled:"fyvr122d",focus:"fyvr122e",hover:"fyvr122f",checked:"fyvr122g"},defaultClass:"fyvr122b"},transparent:{conditions:{base:"fyvr122h",active:"fyvr122i",disabled:"fyvr122j",focus:"fyvr122k",hover:"fyvr122l",checked:"fyvr122m"},defaultClass:"fyvr122h"},positive:{conditions:{base:"fyvr122n",active:"fyvr122o",disabled:"fyvr122p",focus:"fyvr122q",hover:"fyvr122r",checked:"fyvr122s"},defaultClass:"fyvr122n"},negative:{conditions:{base:"fyvr122t",active:"fyvr122u",disabled:"fyvr122v",focus:"fyvr122w",hover:"fyvr122x",checked:"fyvr122y"},defaultClass:"fyvr122t"},info:{conditions:{base:"fyvr122z",active:"fyvr1230",disabled:"fyvr1231",focus:"fyvr1232",hover:"fyvr1233",checked:"fyvr1234"},defaultClass:"fyvr122z"},warning:{conditions:{base:"fyvr1235",active:"fyvr1236",disabled:"fyvr1237",focus:"fyvr1238",hover:"fyvr1239",checked:"fyvr123a"},defaultClass:"fyvr1235"},gradientBackdrop:{conditions:{base:"fyvr123b",active:"fyvr123c",disabled:"fyvr123d",focus:"fyvr123e",hover:"fyvr123f",checked:"fyvr123g"},defaultClass:"fyvr123b"},gradientPrimary:{conditions:{base:"fyvr123h",active:"fyvr123i",disabled:"fyvr123j",focus:"fyvr123k",hover:"fyvr123l",checked:"fyvr123m"},defaultClass:"fyvr123h"},gradientSecondary:{conditions:{base:"fyvr123n",active:"fyvr123o",disabled:"fyvr123p",focus:"fyvr123q",hover:"fyvr123r",checked:"fyvr123s"},defaultClass:"fyvr123n"},arbitrumDark:{conditions:{base:"fyvr123t",active:"fyvr123u",disabled:"fyvr123v",focus:"fyvr123w",hover:"fyvr123x",checked:"fyvr123y"},defaultClass:"fyvr123t"},arbitrumLight:{conditions:{base:"fyvr123z",active:"fyvr1240",disabled:"fyvr1241",focus:"fyvr1242",hover:"fyvr1243",checked:"fyvr1244"},defaultClass:"fyvr123z"},avalanceDark:{conditions:{base:"fyvr1245",active:"fyvr1246",disabled:"fyvr1247",focus:"fyvr1248",hover:"fyvr1249",checked:"fyvr124a"},defaultClass:"fyvr1245"},avalanceLight:{conditions:{base:"fyvr124b",active:"fyvr124c",disabled:"fyvr124d",focus:"fyvr124e",hover:"fyvr124f",checked:"fyvr124g"},defaultClass:"fyvr124b"},bscDark:{conditions:{base:"fyvr124h",active:"fyvr124i",disabled:"fyvr124j",focus:"fyvr124k",hover:"fyvr124l",checked:"fyvr124m"},defaultClass:"fyvr124h"},bscLight:{conditions:{base:"fyvr124n",active:"fyvr124o",disabled:"fyvr124p",focus:"fyvr124q",hover:"fyvr124r",checked:"fyvr124s"},defaultClass:"fyvr124n"},ethereumDark:{conditions:{base:"fyvr124t",active:"fyvr124u",disabled:"fyvr124v",focus:"fyvr124w",hover:"fyvr124x",checked:"fyvr124y"},defaultClass:"fyvr124t"},ethereumLight:{conditions:{base:"fyvr124z",active:"fyvr1250",disabled:"fyvr1251",focus:"fyvr1252",hover:"fyvr1253",checked:"fyvr1254"},defaultClass:"fyvr124z"},gnosisDark:{conditions:{base:"fyvr1255",active:"fyvr1256",disabled:"fyvr1257",focus:"fyvr1258",hover:"fyvr1259",checked:"fyvr125a"},defaultClass:"fyvr1255"},gnosisLight:{conditions:{base:"fyvr125b",active:"fyvr125c",disabled:"fyvr125d",focus:"fyvr125e",hover:"fyvr125f",checked:"fyvr125g"},defaultClass:"fyvr125b"},polygonDark:{conditions:{base:"fyvr125h",active:"fyvr125i",disabled:"fyvr125j",focus:"fyvr125k",hover:"fyvr125l",checked:"fyvr125m"},defaultClass:"fyvr125h"},polygonLight:{conditions:{base:"fyvr125n",active:"fyvr125o",disabled:"fyvr125p",focus:"fyvr125q",hover:"fyvr125r",checked:"fyvr125s"},defaultClass:"fyvr125n"},text100:{conditions:{base:"fyvr125t",active:"fyvr125u",disabled:"fyvr125v",focus:"fyvr125w",hover:"fyvr125x",checked:"fyvr125y"},defaultClass:"fyvr125t"},text80:{conditions:{base:"fyvr125z",active:"fyvr1260",disabled:"fyvr1261",focus:"fyvr1262",hover:"fyvr1263",checked:"fyvr1264"},defaultClass:"fyvr125z"},text50:{conditions:{base:"fyvr1265",active:"fyvr1266",disabled:"fyvr1267",focus:"fyvr1268",hover:"fyvr1269",checked:"fyvr126a"},defaultClass:"fyvr1265"},textInverse100:{conditions:{base:"fyvr126b",active:"fyvr126c",disabled:"fyvr126d",focus:"fyvr126e",hover:"fyvr126f",checked:"fyvr126g"},defaultClass:"fyvr126b"},backgroundPrimary:{conditions:{base:"fyvr126h",active:"fyvr126i",disabled:"fyvr126j",focus:"fyvr126k",hover:"fyvr126l",checked:"fyvr126m"},defaultClass:"fyvr126h"},backgroundSecondary:{conditions:{base:"fyvr126n",active:"fyvr126o",disabled:"fyvr126p",focus:"fyvr126q",hover:"fyvr126r",checked:"fyvr126s"},defaultClass:"fyvr126n"},backgroundContrast:{conditions:{base:"fyvr126t",active:"fyvr126u",disabled:"fyvr126v",focus:"fyvr126w",hover:"fyvr126x",checked:"fyvr126y"},defaultClass:"fyvr126t"},backgroundMuted:{conditions:{base:"fyvr126z",active:"fyvr1270",disabled:"fyvr1271",focus:"fyvr1272",hover:"fyvr1273",checked:"fyvr1274"},defaultClass:"fyvr126z"},backgroundControl:{conditions:{base:"fyvr1275",active:"fyvr1276",disabled:"fyvr1277",focus:"fyvr1278",hover:"fyvr1279",checked:"fyvr127a"},defaultClass:"fyvr1275"},backgroundInverse:{conditions:{base:"fyvr127b",active:"fyvr127c",disabled:"fyvr127d",focus:"fyvr127e",hover:"fyvr127f",checked:"fyvr127g"},defaultClass:"fyvr127b"},backgroundBackdrop:{conditions:{base:"fyvr127h",active:"fyvr127i",disabled:"fyvr127j",focus:"fyvr127k",hover:"fyvr127l",checked:"fyvr127m"},defaultClass:"fyvr127h"},backgroundOverlay:{conditions:{base:"fyvr127n",active:"fyvr127o",disabled:"fyvr127p",focus:"fyvr127q",hover:"fyvr127r",checked:"fyvr127s"},defaultClass:"fyvr127n"},backgroundRaised:{conditions:{base:"fyvr127t",active:"fyvr127u",disabled:"fyvr127v",focus:"fyvr127w",hover:"fyvr127x",checked:"fyvr127y"},defaultClass:"fyvr127t"},buttonGlass:{conditions:{base:"fyvr127z",active:"fyvr1280",disabled:"fyvr1281",focus:"fyvr1282",hover:"fyvr1283",checked:"fyvr1284"},defaultClass:"fyvr127z"},buttonEmphasis:{conditions:{base:"fyvr1285",active:"fyvr1286",disabled:"fyvr1287",focus:"fyvr1288",hover:"fyvr1289",checked:"fyvr128a"},defaultClass:"fyvr1285"},buttonInverse:{conditions:{base:"fyvr128b",active:"fyvr128c",disabled:"fyvr128d",focus:"fyvr128e",hover:"fyvr128f",checked:"fyvr128g"},defaultClass:"fyvr128b"},borderNormal:{conditions:{base:"fyvr128h",active:"fyvr128i",disabled:"fyvr128j",focus:"fyvr128k",hover:"fyvr128l",checked:"fyvr128m"},defaultClass:"fyvr128h"},borderFocus:{conditions:{base:"fyvr128n",active:"fyvr128o",disabled:"fyvr128p",focus:"fyvr128q",hover:"fyvr128r",checked:"fyvr128s"},defaultClass:"fyvr128n"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128t",active:"fyvr128u",disabled:"fyvr128v",focus:"fyvr128w",hover:"fyvr128x",checked:"fyvr128y"},defaultClass:"fyvr128t"},dashed:{conditions:{base:"fyvr128z",active:"fyvr1290",disabled:"fyvr1291",focus:"fyvr1292",hover:"fyvr1293",checked:"fyvr1294"},defaultClass:"fyvr128z"},dotted:{conditions:{base:"fyvr1295",active:"fyvr1296",disabled:"fyvr1297",focus:"fyvr1298",hover:"fyvr1299",checked:"fyvr129a"},defaultClass:"fyvr1295"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr129b",active:"fyvr129c",disabled:"fyvr129d",focus:"fyvr129e",hover:"fyvr129f",checked:"fyvr129g"},defaultClass:"fyvr129b"},white:{conditions:{base:"fyvr129h",active:"fyvr129i",disabled:"fyvr129j",focus:"fyvr129k",hover:"fyvr129l",checked:"fyvr129m"},defaultClass:"fyvr129h"},inherit:{conditions:{base:"fyvr129n",active:"fyvr129o",disabled:"fyvr129p",focus:"fyvr129q",hover:"fyvr129r",checked:"fyvr129s"},defaultClass:"fyvr129n"},transparent:{conditions:{base:"fyvr129t",active:"fyvr129u",disabled:"fyvr129v",focus:"fyvr129w",hover:"fyvr129x",checked:"fyvr129y"},defaultClass:"fyvr129t"},positive:{conditions:{base:"fyvr129z",active:"fyvr12a0",disabled:"fyvr12a1",focus:"fyvr12a2",hover:"fyvr12a3",checked:"fyvr12a4"},defaultClass:"fyvr129z"},negative:{conditions:{base:"fyvr12a5",active:"fyvr12a6",disabled:"fyvr12a7",focus:"fyvr12a8",hover:"fyvr12a9",checked:"fyvr12aa"},defaultClass:"fyvr12a5"},info:{conditions:{base:"fyvr12ab",active:"fyvr12ac",disabled:"fyvr12ad",focus:"fyvr12ae",hover:"fyvr12af",checked:"fyvr12ag"},defaultClass:"fyvr12ab"},warning:{conditions:{base:"fyvr12ah",active:"fyvr12ai",disabled:"fyvr12aj",focus:"fyvr12ak",hover:"fyvr12al",checked:"fyvr12am"},defaultClass:"fyvr12ah"},gradientBackdrop:{conditions:{base:"fyvr12an",active:"fyvr12ao",disabled:"fyvr12ap",focus:"fyvr12aq",hover:"fyvr12ar",checked:"fyvr12as"},defaultClass:"fyvr12an"},gradientPrimary:{conditions:{base:"fyvr12at",active:"fyvr12au",disabled:"fyvr12av",focus:"fyvr12aw",hover:"fyvr12ax",checked:"fyvr12ay"},defaultClass:"fyvr12at"},gradientSecondary:{conditions:{base:"fyvr12az",active:"fyvr12b0",disabled:"fyvr12b1",focus:"fyvr12b2",hover:"fyvr12b3",checked:"fyvr12b4"},defaultClass:"fyvr12az"},arbitrumDark:{conditions:{base:"fyvr12b5",active:"fyvr12b6",disabled:"fyvr12b7",focus:"fyvr12b8",hover:"fyvr12b9",checked:"fyvr12ba"},defaultClass:"fyvr12b5"},arbitrumLight:{conditions:{base:"fyvr12bb",active:"fyvr12bc",disabled:"fyvr12bd",focus:"fyvr12be",hover:"fyvr12bf",checked:"fyvr12bg"},defaultClass:"fyvr12bb"},avalanceDark:{conditions:{base:"fyvr12bh",active:"fyvr12bi",disabled:"fyvr12bj",focus:"fyvr12bk",hover:"fyvr12bl",checked:"fyvr12bm"},defaultClass:"fyvr12bh"},avalanceLight:{conditions:{base:"fyvr12bn",active:"fyvr12bo",disabled:"fyvr12bp",focus:"fyvr12bq",hover:"fyvr12br",checked:"fyvr12bs"},defaultClass:"fyvr12bn"},bscDark:{conditions:{base:"fyvr12bt",active:"fyvr12bu",disabled:"fyvr12bv",focus:"fyvr12bw",hover:"fyvr12bx",checked:"fyvr12by"},defaultClass:"fyvr12bt"},bscLight:{conditions:{base:"fyvr12bz",active:"fyvr12c0",disabled:"fyvr12c1",focus:"fyvr12c2",hover:"fyvr12c3",checked:"fyvr12c4"},defaultClass:"fyvr12bz"},ethereumDark:{conditions:{base:"fyvr12c5",active:"fyvr12c6",disabled:"fyvr12c7",focus:"fyvr12c8",hover:"fyvr12c9",checked:"fyvr12ca"},defaultClass:"fyvr12c5"},ethereumLight:{conditions:{base:"fyvr12cb",active:"fyvr12cc",disabled:"fyvr12cd",focus:"fyvr12ce",hover:"fyvr12cf",checked:"fyvr12cg"},defaultClass:"fyvr12cb"},gnosisDark:{conditions:{base:"fyvr12ch",active:"fyvr12ci",disabled:"fyvr12cj",focus:"fyvr12ck",hover:"fyvr12cl",checked:"fyvr12cm"},defaultClass:"fyvr12ch"},gnosisLight:{conditions:{base:"fyvr12cn",active:"fyvr12co",disabled:"fyvr12cp",focus:"fyvr12cq",hover:"fyvr12cr",checked:"fyvr12cs"},defaultClass:"fyvr12cn"},polygonDark:{conditions:{base:"fyvr12ct",active:"fyvr12cu",disabled:"fyvr12cv",focus:"fyvr12cw",hover:"fyvr12cx",checked:"fyvr12cy"},defaultClass:"fyvr12ct"},polygonLight:{conditions:{base:"fyvr12cz",active:"fyvr12d0",disabled:"fyvr12d1",focus:"fyvr12d2",hover:"fyvr12d3",checked:"fyvr12d4"},defaultClass:"fyvr12cz"},text100:{conditions:{base:"fyvr12d5",active:"fyvr12d6",disabled:"fyvr12d7",focus:"fyvr12d8",hover:"fyvr12d9",checked:"fyvr12da"},defaultClass:"fyvr12d5"},text80:{conditions:{base:"fyvr12db",active:"fyvr12dc",disabled:"fyvr12dd",focus:"fyvr12de",hover:"fyvr12df",checked:"fyvr12dg"},defaultClass:"fyvr12db"},text50:{conditions:{base:"fyvr12dh",active:"fyvr12di",disabled:"fyvr12dj",focus:"fyvr12dk",hover:"fyvr12dl",checked:"fyvr12dm"},defaultClass:"fyvr12dh"},textInverse100:{conditions:{base:"fyvr12dn",active:"fyvr12do",disabled:"fyvr12dp",focus:"fyvr12dq",hover:"fyvr12dr",checked:"fyvr12ds"},defaultClass:"fyvr12dn"},backgroundPrimary:{conditions:{base:"fyvr12dt",active:"fyvr12du",disabled:"fyvr12dv",focus:"fyvr12dw",hover:"fyvr12dx",checked:"fyvr12dy"},defaultClass:"fyvr12dt"},backgroundSecondary:{conditions:{base:"fyvr12dz",active:"fyvr12e0",disabled:"fyvr12e1",focus:"fyvr12e2",hover:"fyvr12e3",checked:"fyvr12e4"},defaultClass:"fyvr12dz"},backgroundContrast:{conditions:{base:"fyvr12e5",active:"fyvr12e6",disabled:"fyvr12e7",focus:"fyvr12e8",hover:"fyvr12e9",checked:"fyvr12ea"},defaultClass:"fyvr12e5"},backgroundMuted:{conditions:{base:"fyvr12eb",active:"fyvr12ec",disabled:"fyvr12ed",focus:"fyvr12ee",hover:"fyvr12ef",checked:"fyvr12eg"},defaultClass:"fyvr12eb"},backgroundControl:{conditions:{base:"fyvr12eh",active:"fyvr12ei",disabled:"fyvr12ej",focus:"fyvr12ek",hover:"fyvr12el",checked:"fyvr12em"},defaultClass:"fyvr12eh"},backgroundInverse:{conditions:{base:"fyvr12en",active:"fyvr12eo",disabled:"fyvr12ep",focus:"fyvr12eq",hover:"fyvr12er",checked:"fyvr12es"},defaultClass:"fyvr12en"},backgroundBackdrop:{conditions:{base:"fyvr12et",active:"fyvr12eu",disabled:"fyvr12ev",focus:"fyvr12ew",hover:"fyvr12ex",checked:"fyvr12ey"},defaultClass:"fyvr12et"},backgroundOverlay:{conditions:{base:"fyvr12ez",active:"fyvr12f0",disabled:"fyvr12f1",focus:"fyvr12f2",hover:"fyvr12f3",checked:"fyvr12f4"},defaultClass:"fyvr12ez"},backgroundRaised:{conditions:{base:"fyvr12f5",active:"fyvr12f6",disabled:"fyvr12f7",focus:"fyvr12f8",hover:"fyvr12f9",checked:"fyvr12fa"},defaultClass:"fyvr12f5"},buttonGlass:{conditions:{base:"fyvr12fb",active:"fyvr12fc",disabled:"fyvr12fd",focus:"fyvr12fe",hover:"fyvr12ff",checked:"fyvr12fg"},defaultClass:"fyvr12fb"},buttonEmphasis:{conditions:{base:"fyvr12fh",active:"fyvr12fi",disabled:"fyvr12fj",focus:"fyvr12fk",hover:"fyvr12fl",checked:"fyvr12fm"},defaultClass:"fyvr12fh"},buttonInverse:{conditions:{base:"fyvr12fn",active:"fyvr12fo",disabled:"fyvr12fp",focus:"fyvr12fq",hover:"fyvr12fr",checked:"fyvr12fs"},defaultClass:"fyvr12fn"},borderNormal:{conditions:{base:"fyvr12ft",active:"fyvr12fu",disabled:"fyvr12fv",focus:"fyvr12fw",hover:"fyvr12fx",checked:"fyvr12fy"},defaultClass:"fyvr12ft"},borderFocus:{conditions:{base:"fyvr12fz",active:"fyvr12g0",disabled:"fyvr12g1",focus:"fyvr12g2",hover:"fyvr12g3",checked:"fyvr12g4"},defaultClass:"fyvr12fz"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12g5",active:"fyvr12g6",disabled:"fyvr12g7",focus:"fyvr12g8",hover:"fyvr12g9",checked:"fyvr12ga"},defaultClass:"fyvr12g5"},dashed:{conditions:{base:"fyvr12gb",active:"fyvr12gc",disabled:"fyvr12gd",focus:"fyvr12ge",hover:"fyvr12gf",checked:"fyvr12gg"},defaultClass:"fyvr12gb"},dotted:{conditions:{base:"fyvr12gh",active:"fyvr12gi",disabled:"fyvr12gj",focus:"fyvr12gk",hover:"fyvr12gl",checked:"fyvr12gm"},defaultClass:"fyvr12gh"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12gn",active:"fyvr12go",disabled:"fyvr12gp",focus:"fyvr12gq",hover:"fyvr12gr",checked:"fyvr12gs"},defaultClass:"fyvr12gn"},white:{conditions:{base:"fyvr12gt",active:"fyvr12gu",disabled:"fyvr12gv",focus:"fyvr12gw",hover:"fyvr12gx",checked:"fyvr12gy"},defaultClass:"fyvr12gt"},inherit:{conditions:{base:"fyvr12gz",active:"fyvr12h0",disabled:"fyvr12h1",focus:"fyvr12h2",hover:"fyvr12h3",checked:"fyvr12h4"},defaultClass:"fyvr12gz"},transparent:{conditions:{base:"fyvr12h5",active:"fyvr12h6",disabled:"fyvr12h7",focus:"fyvr12h8",hover:"fyvr12h9",checked:"fyvr12ha"},defaultClass:"fyvr12h5"},positive:{conditions:{base:"fyvr12hb",active:"fyvr12hc",disabled:"fyvr12hd",focus:"fyvr12he",hover:"fyvr12hf",checked:"fyvr12hg"},defaultClass:"fyvr12hb"},negative:{conditions:{base:"fyvr12hh",active:"fyvr12hi",disabled:"fyvr12hj",focus:"fyvr12hk",hover:"fyvr12hl",checked:"fyvr12hm"},defaultClass:"fyvr12hh"},info:{conditions:{base:"fyvr12hn",active:"fyvr12ho",disabled:"fyvr12hp",focus:"fyvr12hq",hover:"fyvr12hr",checked:"fyvr12hs"},defaultClass:"fyvr12hn"},warning:{conditions:{base:"fyvr12ht",active:"fyvr12hu",disabled:"fyvr12hv",focus:"fyvr12hw",hover:"fyvr12hx",checked:"fyvr12hy"},defaultClass:"fyvr12ht"},gradientBackdrop:{conditions:{base:"fyvr12hz",active:"fyvr12i0",disabled:"fyvr12i1",focus:"fyvr12i2",hover:"fyvr12i3",checked:"fyvr12i4"},defaultClass:"fyvr12hz"},gradientPrimary:{conditions:{base:"fyvr12i5",active:"fyvr12i6",disabled:"fyvr12i7",focus:"fyvr12i8",hover:"fyvr12i9",checked:"fyvr12ia"},defaultClass:"fyvr12i5"},gradientSecondary:{conditions:{base:"fyvr12ib",active:"fyvr12ic",disabled:"fyvr12id",focus:"fyvr12ie",hover:"fyvr12if",checked:"fyvr12ig"},defaultClass:"fyvr12ib"},arbitrumDark:{conditions:{base:"fyvr12ih",active:"fyvr12ii",disabled:"fyvr12ij",focus:"fyvr12ik",hover:"fyvr12il",checked:"fyvr12im"},defaultClass:"fyvr12ih"},arbitrumLight:{conditions:{base:"fyvr12in",active:"fyvr12io",disabled:"fyvr12ip",focus:"fyvr12iq",hover:"fyvr12ir",checked:"fyvr12is"},defaultClass:"fyvr12in"},avalanceDark:{conditions:{base:"fyvr12it",active:"fyvr12iu",disabled:"fyvr12iv",focus:"fyvr12iw",hover:"fyvr12ix",checked:"fyvr12iy"},defaultClass:"fyvr12it"},avalanceLight:{conditions:{base:"fyvr12iz",active:"fyvr12j0",disabled:"fyvr12j1",focus:"fyvr12j2",hover:"fyvr12j3",checked:"fyvr12j4"},defaultClass:"fyvr12iz"},bscDark:{conditions:{base:"fyvr12j5",active:"fyvr12j6",disabled:"fyvr12j7",focus:"fyvr12j8",hover:"fyvr12j9",checked:"fyvr12ja"},defaultClass:"fyvr12j5"},bscLight:{conditions:{base:"fyvr12jb",active:"fyvr12jc",disabled:"fyvr12jd",focus:"fyvr12je",hover:"fyvr12jf",checked:"fyvr12jg"},defaultClass:"fyvr12jb"},ethereumDark:{conditions:{base:"fyvr12jh",active:"fyvr12ji",disabled:"fyvr12jj",focus:"fyvr12jk",hover:"fyvr12jl",checked:"fyvr12jm"},defaultClass:"fyvr12jh"},ethereumLight:{conditions:{base:"fyvr12jn",active:"fyvr12jo",disabled:"fyvr12jp",focus:"fyvr12jq",hover:"fyvr12jr",checked:"fyvr12js"},defaultClass:"fyvr12jn"},gnosisDark:{conditions:{base:"fyvr12jt",active:"fyvr12ju",disabled:"fyvr12jv",focus:"fyvr12jw",hover:"fyvr12jx",checked:"fyvr12jy"},defaultClass:"fyvr12jt"},gnosisLight:{conditions:{base:"fyvr12jz",active:"fyvr12k0",disabled:"fyvr12k1",focus:"fyvr12k2",hover:"fyvr12k3",checked:"fyvr12k4"},defaultClass:"fyvr12jz"},polygonDark:{conditions:{base:"fyvr12k5",active:"fyvr12k6",disabled:"fyvr12k7",focus:"fyvr12k8",hover:"fyvr12k9",checked:"fyvr12ka"},defaultClass:"fyvr12k5"},polygonLight:{conditions:{base:"fyvr12kb",active:"fyvr12kc",disabled:"fyvr12kd",focus:"fyvr12ke",hover:"fyvr12kf",checked:"fyvr12kg"},defaultClass:"fyvr12kb"},text100:{conditions:{base:"fyvr12kh",active:"fyvr12ki",disabled:"fyvr12kj",focus:"fyvr12kk",hover:"fyvr12kl",checked:"fyvr12km"},defaultClass:"fyvr12kh"},text80:{conditions:{base:"fyvr12kn",active:"fyvr12ko",disabled:"fyvr12kp",focus:"fyvr12kq",hover:"fyvr12kr",checked:"fyvr12ks"},defaultClass:"fyvr12kn"},text50:{conditions:{base:"fyvr12kt",active:"fyvr12ku",disabled:"fyvr12kv",focus:"fyvr12kw",hover:"fyvr12kx",checked:"fyvr12ky"},defaultClass:"fyvr12kt"},textInverse100:{conditions:{base:"fyvr12kz",active:"fyvr12l0",disabled:"fyvr12l1",focus:"fyvr12l2",hover:"fyvr12l3",checked:"fyvr12l4"},defaultClass:"fyvr12kz"},backgroundPrimary:{conditions:{base:"fyvr12l5",active:"fyvr12l6",disabled:"fyvr12l7",focus:"fyvr12l8",hover:"fyvr12l9",checked:"fyvr12la"},defaultClass:"fyvr12l5"},backgroundSecondary:{conditions:{base:"fyvr12lb",active:"fyvr12lc",disabled:"fyvr12ld",focus:"fyvr12le",hover:"fyvr12lf",checked:"fyvr12lg"},defaultClass:"fyvr12lb"},backgroundContrast:{conditions:{base:"fyvr12lh",active:"fyvr12li",disabled:"fyvr12lj",focus:"fyvr12lk",hover:"fyvr12ll",checked:"fyvr12lm"},defaultClass:"fyvr12lh"},backgroundMuted:{conditions:{base:"fyvr12ln",active:"fyvr12lo",disabled:"fyvr12lp",focus:"fyvr12lq",hover:"fyvr12lr",checked:"fyvr12ls"},defaultClass:"fyvr12ln"},backgroundControl:{conditions:{base:"fyvr12lt",active:"fyvr12lu",disabled:"fyvr12lv",focus:"fyvr12lw",hover:"fyvr12lx",checked:"fyvr12ly"},defaultClass:"fyvr12lt"},backgroundInverse:{conditions:{base:"fyvr12lz",active:"fyvr12m0",disabled:"fyvr12m1",focus:"fyvr12m2",hover:"fyvr12m3",checked:"fyvr12m4"},defaultClass:"fyvr12lz"},backgroundBackdrop:{conditions:{base:"fyvr12m5",active:"fyvr12m6",disabled:"fyvr12m7",focus:"fyvr12m8",hover:"fyvr12m9",checked:"fyvr12ma"},defaultClass:"fyvr12m5"},backgroundOverlay:{conditions:{base:"fyvr12mb",active:"fyvr12mc",disabled:"fyvr12md",focus:"fyvr12me",hover:"fyvr12mf",checked:"fyvr12mg"},defaultClass:"fyvr12mb"},backgroundRaised:{conditions:{base:"fyvr12mh",active:"fyvr12mi",disabled:"fyvr12mj",focus:"fyvr12mk",hover:"fyvr12ml",checked:"fyvr12mm"},defaultClass:"fyvr12mh"},buttonGlass:{conditions:{base:"fyvr12mn",active:"fyvr12mo",disabled:"fyvr12mp",focus:"fyvr12mq",hover:"fyvr12mr",checked:"fyvr12ms"},defaultClass:"fyvr12mn"},buttonEmphasis:{conditions:{base:"fyvr12mt",active:"fyvr12mu",disabled:"fyvr12mv",focus:"fyvr12mw",hover:"fyvr12mx",checked:"fyvr12my"},defaultClass:"fyvr12mt"},buttonInverse:{conditions:{base:"fyvr12mz",active:"fyvr12n0",disabled:"fyvr12n1",focus:"fyvr12n2",hover:"fyvr12n3",checked:"fyvr12n4"},defaultClass:"fyvr12mz"},borderNormal:{conditions:{base:"fyvr12n5",active:"fyvr12n6",disabled:"fyvr12n7",focus:"fyvr12n8",hover:"fyvr12n9",checked:"fyvr12na"},defaultClass:"fyvr12n5"},borderFocus:{conditions:{base:"fyvr12nb",active:"fyvr12nc",disabled:"fyvr12nd",focus:"fyvr12ne",hover:"fyvr12nf",checked:"fyvr12ng"},defaultClass:"fyvr12nb"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12nh",active:"fyvr12ni",disabled:"fyvr12nj",focus:"fyvr12nk",hover:"fyvr12nl",checked:"fyvr12nm"},defaultClass:"fyvr12nh"},dashed:{conditions:{base:"fyvr12nn",active:"fyvr12no",disabled:"fyvr12np",focus:"fyvr12nq",hover:"fyvr12nr",checked:"fyvr12ns"},defaultClass:"fyvr12nn"},dotted:{conditions:{base:"fyvr12nt",active:"fyvr12nu",disabled:"fyvr12nv",focus:"fyvr12nw",hover:"fyvr12nx",checked:"fyvr12ny"},defaultClass:"fyvr12nt"}}},color:{values:{black:{conditions:{base:"fyvr12nz",active:"fyvr12o0",disabled:"fyvr12o1",focus:"fyvr12o2",hover:"fyvr12o3",checked:"fyvr12o4"},defaultClass:"fyvr12nz"},white:{conditions:{base:"fyvr12o5",active:"fyvr12o6",disabled:"fyvr12o7",focus:"fyvr12o8",hover:"fyvr12o9",checked:"fyvr12oa"},defaultClass:"fyvr12o5"},inherit:{conditions:{base:"fyvr12ob",active:"fyvr12oc",disabled:"fyvr12od",focus:"fyvr12oe",hover:"fyvr12of",checked:"fyvr12og"},defaultClass:"fyvr12ob"},transparent:{conditions:{base:"fyvr12oh",active:"fyvr12oi",disabled:"fyvr12oj",focus:"fyvr12ok",hover:"fyvr12ol",checked:"fyvr12om"},defaultClass:"fyvr12oh"},positive:{conditions:{base:"fyvr12on",active:"fyvr12oo",disabled:"fyvr12op",focus:"fyvr12oq",hover:"fyvr12or",checked:"fyvr12os"},defaultClass:"fyvr12on"},negative:{conditions:{base:"fyvr12ot",active:"fyvr12ou",disabled:"fyvr12ov",focus:"fyvr12ow",hover:"fyvr12ox",checked:"fyvr12oy"},defaultClass:"fyvr12ot"},info:{conditions:{base:"fyvr12oz",active:"fyvr12p0",disabled:"fyvr12p1",focus:"fyvr12p2",hover:"fyvr12p3",checked:"fyvr12p4"},defaultClass:"fyvr12oz"},warning:{conditions:{base:"fyvr12p5",active:"fyvr12p6",disabled:"fyvr12p7",focus:"fyvr12p8",hover:"fyvr12p9",checked:"fyvr12pa"},defaultClass:"fyvr12p5"},gradientBackdrop:{conditions:{base:"fyvr12pb",active:"fyvr12pc",disabled:"fyvr12pd",focus:"fyvr12pe",hover:"fyvr12pf",checked:"fyvr12pg"},defaultClass:"fyvr12pb"},gradientPrimary:{conditions:{base:"fyvr12ph",active:"fyvr12pi",disabled:"fyvr12pj",focus:"fyvr12pk",hover:"fyvr12pl",checked:"fyvr12pm"},defaultClass:"fyvr12ph"},gradientSecondary:{conditions:{base:"fyvr12pn",active:"fyvr12po",disabled:"fyvr12pp",focus:"fyvr12pq",hover:"fyvr12pr",checked:"fyvr12ps"},defaultClass:"fyvr12pn"},arbitrumDark:{conditions:{base:"fyvr12pt",active:"fyvr12pu",disabled:"fyvr12pv",focus:"fyvr12pw",hover:"fyvr12px",checked:"fyvr12py"},defaultClass:"fyvr12pt"},arbitrumLight:{conditions:{base:"fyvr12pz",active:"fyvr12q0",disabled:"fyvr12q1",focus:"fyvr12q2",hover:"fyvr12q3",checked:"fyvr12q4"},defaultClass:"fyvr12pz"},avalanceDark:{conditions:{base:"fyvr12q5",active:"fyvr12q6",disabled:"fyvr12q7",focus:"fyvr12q8",hover:"fyvr12q9",checked:"fyvr12qa"},defaultClass:"fyvr12q5"},avalanceLight:{conditions:{base:"fyvr12qb",active:"fyvr12qc",disabled:"fyvr12qd",focus:"fyvr12qe",hover:"fyvr12qf",checked:"fyvr12qg"},defaultClass:"fyvr12qb"},bscDark:{conditions:{base:"fyvr12qh",active:"fyvr12qi",disabled:"fyvr12qj",focus:"fyvr12qk",hover:"fyvr12ql",checked:"fyvr12qm"},defaultClass:"fyvr12qh"},bscLight:{conditions:{base:"fyvr12qn",active:"fyvr12qo",disabled:"fyvr12qp",focus:"fyvr12qq",hover:"fyvr12qr",checked:"fyvr12qs"},defaultClass:"fyvr12qn"},ethereumDark:{conditions:{base:"fyvr12qt",active:"fyvr12qu",disabled:"fyvr12qv",focus:"fyvr12qw",hover:"fyvr12qx",checked:"fyvr12qy"},defaultClass:"fyvr12qt"},ethereumLight:{conditions:{base:"fyvr12qz",active:"fyvr12r0",disabled:"fyvr12r1",focus:"fyvr12r2",hover:"fyvr12r3",checked:"fyvr12r4"},defaultClass:"fyvr12qz"},gnosisDark:{conditions:{base:"fyvr12r5",active:"fyvr12r6",disabled:"fyvr12r7",focus:"fyvr12r8",hover:"fyvr12r9",checked:"fyvr12ra"},defaultClass:"fyvr12r5"},gnosisLight:{conditions:{base:"fyvr12rb",active:"fyvr12rc",disabled:"fyvr12rd",focus:"fyvr12re",hover:"fyvr12rf",checked:"fyvr12rg"},defaultClass:"fyvr12rb"},polygonDark:{conditions:{base:"fyvr12rh",active:"fyvr12ri",disabled:"fyvr12rj",focus:"fyvr12rk",hover:"fyvr12rl",checked:"fyvr12rm"},defaultClass:"fyvr12rh"},polygonLight:{conditions:{base:"fyvr12rn",active:"fyvr12ro",disabled:"fyvr12rp",focus:"fyvr12rq",hover:"fyvr12rr",checked:"fyvr12rs"},defaultClass:"fyvr12rn"},text100:{conditions:{base:"fyvr12rt",active:"fyvr12ru",disabled:"fyvr12rv",focus:"fyvr12rw",hover:"fyvr12rx",checked:"fyvr12ry"},defaultClass:"fyvr12rt"},text80:{conditions:{base:"fyvr12rz",active:"fyvr12s0",disabled:"fyvr12s1",focus:"fyvr12s2",hover:"fyvr12s3",checked:"fyvr12s4"},defaultClass:"fyvr12rz"},text50:{conditions:{base:"fyvr12s5",active:"fyvr12s6",disabled:"fyvr12s7",focus:"fyvr12s8",hover:"fyvr12s9",checked:"fyvr12sa"},defaultClass:"fyvr12s5"},textInverse100:{conditions:{base:"fyvr12sb",active:"fyvr12sc",disabled:"fyvr12sd",focus:"fyvr12se",hover:"fyvr12sf",checked:"fyvr12sg"},defaultClass:"fyvr12sb"},backgroundPrimary:{conditions:{base:"fyvr12sh",active:"fyvr12si",disabled:"fyvr12sj",focus:"fyvr12sk",hover:"fyvr12sl",checked:"fyvr12sm"},defaultClass:"fyvr12sh"},backgroundSecondary:{conditions:{base:"fyvr12sn",active:"fyvr12so",disabled:"fyvr12sp",focus:"fyvr12sq",hover:"fyvr12sr",checked:"fyvr12ss"},defaultClass:"fyvr12sn"},backgroundContrast:{conditions:{base:"fyvr12st",active:"fyvr12su",disabled:"fyvr12sv",focus:"fyvr12sw",hover:"fyvr12sx",checked:"fyvr12sy"},defaultClass:"fyvr12st"},backgroundMuted:{conditions:{base:"fyvr12sz",active:"fyvr12t0",disabled:"fyvr12t1",focus:"fyvr12t2",hover:"fyvr12t3",checked:"fyvr12t4"},defaultClass:"fyvr12sz"},backgroundControl:{conditions:{base:"fyvr12t5",active:"fyvr12t6",disabled:"fyvr12t7",focus:"fyvr12t8",hover:"fyvr12t9",checked:"fyvr12ta"},defaultClass:"fyvr12t5"},backgroundInverse:{conditions:{base:"fyvr12tb",active:"fyvr12tc",disabled:"fyvr12td",focus:"fyvr12te",hover:"fyvr12tf",checked:"fyvr12tg"},defaultClass:"fyvr12tb"},backgroundBackdrop:{conditions:{base:"fyvr12th",active:"fyvr12ti",disabled:"fyvr12tj",focus:"fyvr12tk",hover:"fyvr12tl",checked:"fyvr12tm"},defaultClass:"fyvr12th"},backgroundOverlay:{conditions:{base:"fyvr12tn",active:"fyvr12to",disabled:"fyvr12tp",focus:"fyvr12tq",hover:"fyvr12tr",checked:"fyvr12ts"},defaultClass:"fyvr12tn"},backgroundRaised:{conditions:{base:"fyvr12tt",active:"fyvr12tu",disabled:"fyvr12tv",focus:"fyvr12tw",hover:"fyvr12tx",checked:"fyvr12ty"},defaultClass:"fyvr12tt"},buttonGlass:{conditions:{base:"fyvr12tz",active:"fyvr12u0",disabled:"fyvr12u1",focus:"fyvr12u2",hover:"fyvr12u3",checked:"fyvr12u4"},defaultClass:"fyvr12tz"},buttonEmphasis:{conditions:{base:"fyvr12u5",active:"fyvr12u6",disabled:"fyvr12u7",focus:"fyvr12u8",hover:"fyvr12u9",checked:"fyvr12ua"},defaultClass:"fyvr12u5"},buttonInverse:{conditions:{base:"fyvr12ub",active:"fyvr12uc",disabled:"fyvr12ud",focus:"fyvr12ue",hover:"fyvr12uf",checked:"fyvr12ug"},defaultClass:"fyvr12ub"},borderNormal:{conditions:{base:"fyvr12uh",active:"fyvr12ui",disabled:"fyvr12uj",focus:"fyvr12uk",hover:"fyvr12ul",checked:"fyvr12um"},defaultClass:"fyvr12uh"},borderFocus:{conditions:{base:"fyvr12un",active:"fyvr12uo",disabled:"fyvr12up",focus:"fyvr12uq",hover:"fyvr12ur",checked:"fyvr12us"},defaultClass:"fyvr12un"}}},cursor:{values:{default:{conditions:{base:"fyvr12ut",active:"fyvr12uu",disabled:"fyvr12uv",focus:"fyvr12uw",hover:"fyvr12ux",checked:"fyvr12uy"},defaultClass:"fyvr12ut"},pointer:{conditions:{base:"fyvr12uz",active:"fyvr12v0",disabled:"fyvr12v1",focus:"fyvr12v2",hover:"fyvr12v3",checked:"fyvr12v4"},defaultClass:"fyvr12uz"},text:{conditions:{base:"fyvr12v5",active:"fyvr12v6",disabled:"fyvr12v7",focus:"fyvr12v8",hover:"fyvr12v9",checked:"fyvr12va"},defaultClass:"fyvr12v5"}}},opacity:{values:{0:{conditions:{base:"fyvr12vb",active:"fyvr12vc",disabled:"fyvr12vd",focus:"fyvr12ve",hover:"fyvr12vf",checked:"fyvr12vg"},defaultClass:"fyvr12vb"},50:{conditions:{base:"fyvr12vh",active:"fyvr12vi",disabled:"fyvr12vj",focus:"fyvr12vk",hover:"fyvr12vl",checked:"fyvr12vm"},defaultClass:"fyvr12vh"},80:{conditions:{base:"fyvr12vn",active:"fyvr12vo",disabled:"fyvr12vp",focus:"fyvr12vq",hover:"fyvr12vr",checked:"fyvr12vs"},defaultClass:"fyvr12vn"},100:{conditions:{base:"fyvr12vt",active:"fyvr12vu",disabled:"fyvr12vv",focus:"fyvr12vw",hover:"fyvr12vx",checked:"fyvr12vy"},defaultClass:"fyvr12vt"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12vz",active:"fyvr12w0",disabled:"fyvr12w1",focus:"fyvr12w2",hover:"fyvr12w3",checked:"fyvr12w4"},defaultClass:"fyvr12vz"},auto:{conditions:{base:"fyvr12w5",active:"fyvr12w6",disabled:"fyvr12w7",focus:"fyvr12w8",hover:"fyvr12w9",checked:"fyvr12wa"},defaultClass:"fyvr12w5"}}},outline:{values:{none:{conditions:{base:"fyvr12wb",active:"fyvr12wc",disabled:"fyvr12wd",focus:"fyvr12we",hover:"fyvr12wf",checked:"fyvr12wg"},defaultClass:"fyvr12wb"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12wh",active:"fyvr12wi",disabled:"fyvr12wj",focus:"fyvr12wk",hover:"fyvr12wl",checked:"fyvr12wm"},defaultClass:"fyvr12wh"}}}}});const aO=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],sp=t=>(t.display||(t.display=Object.keys(t).some(e=>aO.includes(e))?"flex":void 0),tC(t));sp.properties=tC.properties;function rC(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e{const{as:r="div",sx:n={},className:i,...s}=t,o={},a={};for(const c in s)sp.properties.has(c)?o[c]=s[c]:a[c]=s[c];const l=sp({...o,...n});return S.createElement(r,{className:cn(l,i),...a,ref:e})});var nC={exports:{}},Ic={};/** * @license React * react-jsx-runtime.production.min.js * @@ -58,8 +58,8 @@ Error generating stack: `+s.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var vw;function lO(){if(vw)return Ic;vw=1;var t=lr,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,c){var f,u={},h=null,y=null;c!==void 0&&(h=""+c),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(y=l.ref);for(f in l)n.call(l,f)&&!s.hasOwnProperty(f)&&(u[f]=l[f]);if(a&&a.defaultProps)for(f in l=a.defaultProps,l)u[f]===void 0&&(u[f]=l[f]);return{$$typeof:e,type:a,key:h,ref:y,props:u,_owner:i.current}}return Ic.Fragment=r,Ic.jsx=o,Ic.jsxs=o,Ic}nC.exports=lO();var Y=nC.exports;function cO(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function fO(t){var e=cO(t,"string");return typeof e=="symbol"?e:String(e)}function uO(t,e,r){return e=fO(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pw(t){for(var e=1;e{for(var n of Object.keys(t)){var i;if(t[n]!==((i=e[n])!==null&&i!==void 0?i:r[n]))return!1}return!0},zt=t=>{var e=r=>{var n=t.defaultClassName,i=pw(pw({},t.defaultVariants),r);for(var s in i){var o,a=(o=i[s])!==null&&o!==void 0?o:t.defaultVariants[s];if(a!=null){var l=a;typeof l=="boolean"&&(l=l===!0?"true":"false");var c=t.variantClassNames[s][l];c&&(n+=" "+c)}}for(var[f,u]of t.compoundVariants)dO(f,i,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return gw(t.variantClassNames,r=>gw(r,n=>n.split(" ")[0]))}},e};zt({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"fyvr11ot",warning:"fyvr11oz",success:"fyvr11oh",error:"fyvr11on"},size:{sm:"_1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"_1qxj1ib9 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc fyvr1ww fyvr1ys fyvr144 fyvr1eg"}},defaultVariants:{},compoundVariants:[]});const mw=t=>{const{color:e="borderNormal",marginY:r="4",...n}=t;return Y.jsx(ue,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var hO=zt({defaultClassName:"_1qxj1ib9",variantClassNames:{variant:{inherit:"fyvr11mu fyvr11e4 fyvr11gg fyvr11fg fyvr11ew",xlarge:"fyvr11mv fyvr11es fyvr11gc fyvr11fk fyvr11fc",large:"fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8",medium:"fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc",normal:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",small:"fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4",xsmall:"fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc",code:"fyvr11mw fyvr11eg fyvr11g0 fyvr11fk fyvr11f0"},ellipsis:{true:"fyvr11ls fyvr11m8 fyvr11n7 fyvr11mx"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const Wt=S.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:i,hidden:s,italic:o,underline:a,children:l,ellipsis:c,uppercase:f,capitalize:u,...h}=t,y=eO[n];return Y.jsx(ue,{as:r,className:cn(i,hO({hidden:s,ellipsis:c,italic:o,underline:a,uppercase:f,capitalize:u})),ref:e,...y,...h,children:l})});var vO=zt({defaultClassName:"_140wn8ng fyvr11ls fyvr11m8 fyvr11n7 fyvr11ko fyvr11h0",variantClassNames:{variant:{base:"_140wn8nh",feature:"_140wn8ni fyvr11ph fyvr12o5",primary:"fyvr11pb fyvr12o5",glass:"fyvr11tt fyvr12rt",emphasis:"fyvr11tz fyvr12rt",raised:"fyvr11tn fyvr12rt",danger:"fyvr11on fyvr12o5",text:"_140wn8no _1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11ob fyvr12s5"},shape:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"fyvr12ut fyvr12vh",false:"fyvr12uz fyvr12vt fyvr12vr"},size:{xs:"_140wn8nt _1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr1ws fyvr1yo",sm:"_140wn8nu _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys",md:"_140wn8nv _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw",lg:"_140wn8nw _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8nx"},hasLeftIcon:{true:"_140wn8ny"},hasRightIcon:{true:"_140wn8nz"},activeOutline:{light:"_140wn8n10",bold:"_140wn8n11"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8n12"],[{iconOnly:!0,size:"sm"},"_140wn8n13"],[{iconOnly:!0,size:"md"},"_140wn8n14"],[{iconOnly:!0,size:"lg"},"_140wn8n15"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n16"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n17"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n18"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n19"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n1a"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n1b"]]});const Ge=S.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:i,disabled:s=!1,display:o="inline-flex",fontWeight:a="bold",pending:l=!1,label:c,leftIcon:f,rightIcon:u,size:h="md",variant:y="glass",width:g="fit",shape:p="circle",type:k="button",...w}=t,E=f!==void 0&&c!==void 0,A=u!==void 0&&c!==void 0,I=f!==void 0&&c===void 0,M=h==="xs"?"xs":"sm";return Y.jsx(ue,{as:r,className:cn(i,vO({activeOutline:n,disabled:s||l,hasLeftIcon:E,hasRightIcon:A,iconOnly:I,size:y==="text"?void 0:h,shape:y==="text"?void 0:p,variant:y})),disabled:s||l,display:o,fontWeight:a,ref:e,type:k,width:g,...w,children:I?Y.jsx(f,{size:M}):Y.jsxs(ue,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:h==="xs"?"1":"2",children:[Y.jsxs(ue,{justifyContent:"flex-start",alignItems:"center",gap:h==="xs"?"1":"2",children:[f&&Y.jsx(f,{size:M}),Y.jsx(Wt,{children:c})]}),u&&Y.jsx(u,{size:M})]})})});var yO=zt({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"fyvr12vr fyvr12uz"},disabled:{true:"rhmai65"},outlined:{true:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12n5 fyvr12ft fyvr1215 fyvr128h fyvr12nh fyvr12g5 fyvr121h fyvr128t"},blur:{true:"fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const pO=S.forwardRef((t,e)=>{const{className:r,children:n,clickable:i,outlined:s,disabled:o,blur:a,width:l="full",...c}=t;return Y.jsx(ue,{className:cn(r,yO({clickable:i,outlined:s,disabled:o,blur:a})),background:s?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...c,children:n})});function Jt(){return Jt=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>gO(r,e))}function Ot(...t){return S.useCallback(iC(...t),t)}function Lr(t,e=[]){let r=[];function n(s,o){const a=S.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:h,children:y,...g}=u,p=(h==null?void 0:h[t][l])||a,k=S.useMemo(()=>g,Object.values(g));return S.createElement(p.Provider,{value:k},y)}function f(u,h){const y=(h==null?void 0:h[t][l])||a,g=S.useContext(y);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,f]}const i=()=>{const s=r.map(o=>S.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return S.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[n,mO(i,...e)]}function mO(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(s)[`__scope${c}`];return{...a,...u}},{});return S.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function ge(t,e,{checkForDefaultPrevented:r=!0}={}){return function(i){if(t==null||t(i),r===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function Nn(t){const e=S.useRef(t);return S.useEffect(()=>{e.current=t}),S.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function pa({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=xO({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=Nn(r),l=S.useCallback(c=>{if(s){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else i(c)},[s,t,i,a]);return[o,l]}function xO({defaultProp:t,onChange:e}){const r=S.useState(t),[n]=r,i=S.useRef(n),s=Nn(e);return S.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}function _m(t){const e=S.useRef({value:t,previous:t});return S.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const xn=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{};function Tm(t){const[e,r]=S.useState(void 0);return xn(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function bO(t,e){return S.useReducer((r,n)=>{const i=e[r][n];return i??r},t)}const bo=t=>{const{present:e,children:r}=t,n=wO(e),i=typeof r=="function"?r({present:n.isPresent}):S.Children.only(r),s=Ot(n.ref,i.ref);return typeof r=="function"||n.isPresent?S.cloneElement(i,{ref:s}):null};bo.displayName="Presence";function wO(t){const[e,r]=S.useState(),n=S.useRef({}),i=S.useRef(t),s=S.useRef("none"),o=t?"mounted":"unmounted",[a,l]=bO(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const c=Xu(n.current);s.current=a==="mounted"?c:"none"},[a]),xn(()=>{const c=n.current,f=i.current;if(f!==t){const h=s.current,y=Xu(c);t?l("MOUNT"):y==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&h!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),xn(()=>{if(e){const c=u=>{const y=Xu(n.current).includes(u.animationName);u.target===e&&y&&xo.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(s.current=Xu(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:S.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function Xu(t){return(t==null?void 0:t.animationName)||"none"}function xe(){return xe=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,i=S.Children.toArray(r),s=i.find(EO);if(s){const o=s.props.children,a=i.map(l=>l===s?S.Children.count(o)>1?S.Children.only(null):S.isValidElement(o)?o.props.children:null:l);return S.createElement(op,xe({},n,{ref:e}),S.isValidElement(o)?S.cloneElement(o,void 0,a):null)}return S.createElement(op,xe({},n,{ref:e}),r)});zl.displayName="Slot";const op=S.forwardRef((t,e)=>{const{children:r,...n}=t;return S.isValidElement(r)?S.cloneElement(r,{...SO(n,r.props),ref:e?iC(e,r.ref):r.ref}):S.Children.count(r)>1?S.Children.only(null):null});op.displayName="SlotClone";const CO=({children:t})=>S.createElement(S.Fragment,null,t);function EO(t){return S.isValidElement(t)&&t.type===CO}function SO(t,e){const r={...e};for(const n in e){const i=t[n],s=e[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...a)=>{s(...a),i(...a)}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...t,...r}}const kO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],De=kO.reduce((t,e)=>{const r=S.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?zl:e;return S.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),S.createElement(a,Jt({},o,{ref:i}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function Pm(t,e){t&&xo.flushSync(()=>t.dispatchEvent(e))}const sC="Checkbox",[AO,IY]=Lr(sC),[_O,TO]=AO(sC),PO=S.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,h]=S.useState(null),y=Ot(e,A=>h(A)),g=S.useRef(!1),p=u?!!u.closest("form"):!0,[k=!1,w]=pa({prop:i,defaultProp:s,onChange:c}),E=S.useRef(k);return S.useEffect(()=>{const A=u==null?void 0:u.form;if(A){const I=()=>w(E.current);return A.addEventListener("reset",I),()=>A.removeEventListener("reset",I)}},[u,w]),S.createElement(_O,{scope:r,state:k,disabled:a},S.createElement(De.button,Jt({type:"button",role:"checkbox","aria-checked":ia(k)?"mixed":k,"aria-required":o,"data-state":oC(k),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:y,onKeyDown:ge(t.onKeyDown,A=>{A.key==="Enter"&&A.preventDefault()}),onClick:ge(t.onClick,A=>{w(I=>ia(I)?!0:!I),p&&(g.current=A.isPropagationStopped(),g.current||A.stopPropagation())})})),p&&S.createElement(MO,{control:u,bubbles:!g.current,name:n,value:l,checked:k,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),IO="CheckboxIndicator",RO=S.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...i}=t,s=TO(IO,r);return S.createElement(bo,{present:n||ia(s.state)||s.state===!0},S.createElement(De.span,Jt({"data-state":oC(s.state),"data-disabled":s.disabled?"":void 0},i,{ref:e,style:{pointerEvents:"none",...t.style}})))}),MO=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=S.useRef(null),o=_m(r),a=Tm(e);return S.useEffect(()=>{const l=s.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const h=new Event("click",{bubbles:n});l.indeterminate=ia(r),u.call(l,ia(r)?!1:r),l.dispatchEvent(h)}},[o,r,n]),S.createElement("input",Jt({type:"checkbox","aria-hidden":!0,defaultChecked:ia(r)?!1:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ia(t){return t==="indeterminate"}function oC(t){return ia(t)?"indeterminate":t?"checked":"unchecked"}const OO=PO,NO=RO;var $O=zt({defaultClassName:"_43lu9r4",variantClassNames:{labelLocation:{top:"fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r6 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r7 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"fyvr1188 fyvr11h0"}},defaultVariants:{},compoundVariants:[]});const sc=t=>{const{id:e,label:r,description:n,labelLocation:i="top",children:s,...o}=t,a=()=>r||n?Y.jsxs(ue,{flexDirection:"column",gap:"0.5",children:[r&&Y.jsx(Wt,{variant:"small",color:"text100",hidden:i==="hidden",children:r}),n&&Y.jsx(Wt,{variant:"small",color:"text50",hidden:i==="hidden",children:n})]}):null;return Y.jsxs(ue,{as:"label",className:$O({labelLocation:i}),htmlFor:e,...o,children:[["left","top","hidden"].includes(i)&&a(),s,i==="right"&&a()]})};var oc=zt({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const DO=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),aC=({size:t="sm",...e})=>Y.jsx(ue,{as:DO,className:oc({size:t}),...e}),LO=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m3.888 7.53 1.06-1.06 5.47 5.47 5.47-5.47 1.06 1.06-6.53 6.53-6.53-6.53Z",clipRule:"evenodd"})}),lC=({size:t="sm",...e})=>Y.jsx(ue,{as:LO,className:oc({size:t}),...e}),BO=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.418 11.06 4.47 4.47 1.06-1.06L11.48 10l4.47-4.47-1.06-1.06-4.47 4.47-4.47-4.47-1.06 1.06L9.357 10l-4.47 4.47 1.06 1.06 4.47-4.47Z",clipRule:"evenodd"})}),Im=({size:t="sm",...e})=>Y.jsx(ue,{as:BO,className:oc({size:t}),...e}),jO=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.608 6.75h-5.19v-1.5h7.75V13h-1.5V7.81l-7.72 7.72-1.06-1.06 7.72-7.72Z",clipRule:"evenodd"})}),FO=({size:t="sm",...e})=>Y.jsx(ue,{as:jO,className:oc({size:t}),...e}),UO=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.918 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-.677 4.383a5.5 5.5 0 1 1 1.06-1.06l2.648 2.647-1.061 1.06-2.647-2.647Z",clipRule:"evenodd"})}),zO=({size:t="sm",...e})=>Y.jsx(ue,{as:UO,className:oc({size:t}),...e}),VO=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m12.28 2.856-6.71 8.887h4.134l-1.424 6.2 6.887-8.71h-4.322l1.435-6.377Z",clipRule:"evenodd"})}),HO=({size:t="sm",...e})=>Y.jsx(ue,{as:VO,className:oc({size:t}),...e});var WO=zt({defaultClassName:"_1c9x66f1 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12nb fyvr12fz fyvr121b fyvr128n fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11h0 fyvr11ko fyvr11jg fyvr12vt fyvr12vr fyvr12vj fyvr12uz fyvr12uv",variantClassNames:{size:{sm:"_1c9x66f2",lg:"_1c9x66f3"}},defaultVariants:{},compoundVariants:[]}),qO=zt({defaultClassName:"_1c9x66f5 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12rt fyvr11rz",variantClassNames:{size:{sm:"_1c9x66f6",lg:"_1c9x66f7"}},defaultVariants:{},compoundVariants:[]});const GO=({size:t="sm"})=>Y.jsx(NO,{className:qO({size:t}),children:Y.jsx(aC,{size:t})});S.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:i,label:s="",labelLocation:o="left",size:a="sm",...l}=t;return Y.jsx(sc,{disabled:r,display:"flex",id:n??i,label:s,labelLocation:o,whiteSpace:"nowrap",children:Y.jsx(OO,{className:WO({size:a}),disabled:r,id:n??i,name:i,ref:e,...l,children:Y.jsx(GO,{})})})});lr.createContext(null);const KO=IA.useId||(()=>{});let JO=0;function Qs(t){const[e,r]=S.useState(KO());return xn(()=>{t||r(n=>n??String(JO++))},[t]),t||(e?`radix-${e}`:"")}const cC="Collapsible",[YO,RY]=Lr(cC),[QO,Rm]=YO(cC),XO=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:s,onOpenChange:o,...a}=t,[l=!1,c]=pa({prop:n,defaultProp:i,onChange:o});return S.createElement(QO,{scope:r,disabled:s,contentId:Qs(),open:l,onOpenToggle:S.useCallback(()=>c(f=>!f),[c])},S.createElement(De.div,Jt({"data-state":Mm(l),"data-disabled":s?"":void 0},a,{ref:e})))}),ZO="CollapsibleTrigger",eN=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,i=Rm(ZO,r);return S.createElement(De.button,Jt({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Mm(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},n,{ref:e,onClick:ge(t.onClick,i.onOpenToggle)}))}),fC="CollapsibleContent",tN=S.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=Rm(fC,t.__scopeCollapsible);return S.createElement(bo,{present:r||i.open},({present:s})=>S.createElement(rN,Jt({},n,{ref:e,present:s})))}),rN=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:i,...s}=t,o=Rm(fC,r),[a,l]=S.useState(n),c=S.useRef(null),f=Ot(e,c),u=S.useRef(0),h=u.current,y=S.useRef(0),g=y.current,p=o.open||a,k=S.useRef(p),w=S.useRef();return S.useEffect(()=>{const E=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(E)},[]),xn(()=>{const E=c.current;if(E){w.current=w.current||{transitionDuration:E.style.transitionDuration,animationName:E.style.animationName},E.style.transitionDuration="0s",E.style.animationName="none";const A=E.getBoundingClientRect();u.current=A.height,y.current=A.width,k.current||(E.style.transitionDuration=w.current.transitionDuration,E.style.animationName=w.current.animationName),l(n)}},[o.open,n]),S.createElement(De.div,Jt({"data-state":Mm(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!p},s,{ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...t.style}}),p&&i)});function Mm(t){return t?"open":"closed"}const nN=XO,iN=eN,sN=tN;var xw="64px",oN="_4j62fl4 fyvr1ww fyvr1ys fyvr1so fyvr1v0 fyvr128",aN="_4j62fl5",lN="_4j62fl0",cN="_4j62fl2 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11h0 fyvr11ko fyvr11ob fyvr128 fyvr12uz fyvr11n2";const fN=t=>{const{className:e,children:r,defaultOpen:n,onOpenChange:i,label:s,...o}=t,[a,l]=S.useState(n),c=f=>{l(f),i==null||i(f)};return Y.jsx(nN,{defaultOpen:n,onOpenChange:c,asChild:!0,children:Y.jsxs(ue,{as:Sl.div,className:cn(e,lN),initial:{height:n?"auto":xw},animate:{height:a?"auto":xw},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...o,children:[Y.jsxs(iN,{className:cN,children:[Y.jsx(Wt,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:s}),Y.jsx(ue,{as:Sl.div,position:"absolute",right:"0",marginRight:"4",initial:{rotate:n?180:0},animate:{rotate:a?180:0},transition:{ease:"linear",duration:.1},children:Y.jsx(lC,{className:aN,color:"text50"})})]}),Y.jsx(Z8,{children:a&&Y.jsx(sN,{className:oN,asChild:!0,forceMount:!0,children:Y.jsx(Sl.div,{initial:{opacity:n?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function Bh(t){const e=t+"CollectionProvider",[r,n]=Lr(e),[i,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:g,children:p}=y,k=lr.useRef(null),w=lr.useRef(new Map).current;return lr.createElement(i,{scope:g,itemMap:w,collectionRef:k},p)},a=t+"CollectionSlot",l=lr.forwardRef((y,g)=>{const{scope:p,children:k}=y,w=s(a,p),E=Ot(g,w.collectionRef);return lr.createElement(zl,{ref:E},k)}),c=t+"CollectionItemSlot",f="data-radix-collection-item",u=lr.forwardRef((y,g)=>{const{scope:p,children:k,...w}=y,E=lr.useRef(null),A=Ot(g,E),I=s(c,p);return lr.useEffect(()=>(I.itemMap.set(E,{ref:E,...w}),()=>void I.itemMap.delete(E))),lr.createElement(zl,{[f]:"",ref:A},k)});function h(y){const g=s(t+"CollectionConsumer",y);return lr.useCallback(()=>{const k=g.collectionRef.current;if(!k)return[];const w=Array.from(k.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((I,M)=>w.indexOf(I.ref.current)-w.indexOf(M.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},h,n]}const uN=S.createContext(void 0);function Om(t){const e=S.useContext(uN);return t||e||"ltr"}function dN(t,e=globalThis==null?void 0:globalThis.document){const r=Nn(t);S.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const ap="dismissableLayer.update",hN="dismissableLayer.pointerDownOutside",vN="dismissableLayer.focusOutside";let bw;const yN=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nm=S.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=S.useContext(yN),[u,h]=S.useState(null),y=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,g]=S.useState({}),p=Ot(e,F=>h(F)),k=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf(w),A=u?k.indexOf(u):-1,I=f.layersWithOutsidePointerEventsDisabled.size>0,M=A>=E,B=pN(F=>{const K=F.target,J=[...f.branches].some(Z=>Z.contains(K));!M||J||(s==null||s(F),a==null||a(F),F.defaultPrevented||l==null||l())},y),z=gN(F=>{const K=F.target;[...f.branches].some(Z=>Z.contains(K))||(o==null||o(F),a==null||a(F),F.defaultPrevented||l==null||l())},y);return dN(F=>{A===f.layers.size-1&&(i==null||i(F),!F.defaultPrevented&&l&&(F.preventDefault(),l()))},y),S.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(bw=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),ww(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=bw)}},[u,y,n,f]),S.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),ww())},[u,f]),S.useEffect(()=>{const F=()=>g({});return document.addEventListener(ap,F),()=>document.removeEventListener(ap,F)},[]),S.createElement(De.div,xe({},c,{ref:p,style:{pointerEvents:I?M?"auto":"none":void 0,...t.style},onFocusCapture:ge(t.onFocusCapture,z.onFocusCapture),onBlurCapture:ge(t.onBlurCapture,z.onBlurCapture),onPointerDownCapture:ge(t.onPointerDownCapture,B.onPointerDownCapture)}))});function pN(t,e=globalThis==null?void 0:globalThis.document){const r=Nn(t),n=S.useRef(!1),i=S.useRef(()=>{});return S.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){uC(hN,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function gN(t,e=globalThis==null?void 0:globalThis.document){const r=Nn(t),n=S.useRef(!1);return S.useEffect(()=>{const i=s=>{s.target&&!n.current&&uC(vN,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ww(){const t=new CustomEvent(ap);document.dispatchEvent(t)}function uC(t,e,r,{discrete:n}){const i=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?Pm(i,s):i.dispatchEvent(s)}const mN=Nm;let gv=0;function dC(){S.useEffect(()=>{var t,e;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=r[0])!==null&&t!==void 0?t:Cw()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:Cw()),gv++,()=>{gv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),gv--}},[])}function Cw(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const mv="focusScope.autoFocusOnMount",xv="focusScope.autoFocusOnUnmount",Ew={bubbles:!1,cancelable:!0},hC=S.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=S.useState(null),c=Nn(i),f=Nn(s),u=S.useRef(null),h=Ot(e,p=>l(p)),y=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(n){let p=function(A){if(y.paused||!a)return;const I=A.target;a.contains(I)?u.current=I:Ps(u.current,{select:!0})},k=function(A){if(y.paused||!a)return;const I=A.relatedTarget;I!==null&&(a.contains(I)||Ps(u.current,{select:!0}))},w=function(A){if(document.activeElement===document.body)for(const M of A)M.removedNodes.length>0&&Ps(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",k);const E=new MutationObserver(w);return a&&E.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",k),E.disconnect()}}},[n,a,y.paused]),S.useEffect(()=>{if(a){kw.add(y);const p=document.activeElement;if(!a.contains(p)){const w=new CustomEvent(mv,Ew);a.addEventListener(mv,c),a.dispatchEvent(w),w.defaultPrevented||(xN(SN(vC(a)),{select:!0}),document.activeElement===p&&Ps(a))}return()=>{a.removeEventListener(mv,c),setTimeout(()=>{const w=new CustomEvent(xv,Ew);a.addEventListener(xv,f),a.dispatchEvent(w),w.defaultPrevented||Ps(p??document.body,{select:!0}),a.removeEventListener(xv,f),kw.remove(y)},0)}}},[a,c,f,y]);const g=S.useCallback(p=>{if(!r&&!n||y.paused)return;const k=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,w=document.activeElement;if(k&&w){const E=p.currentTarget,[A,I]=bN(E);A&&I?!p.shiftKey&&w===I?(p.preventDefault(),r&&Ps(A,{select:!0})):p.shiftKey&&w===A&&(p.preventDefault(),r&&Ps(I,{select:!0})):w===E&&p.preventDefault()}},[r,n,y.paused]);return S.createElement(De.div,xe({tabIndex:-1},o,{ref:h,onKeyDown:g}))});function xN(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ps(n,{select:e}),document.activeElement!==r)return}function bN(t){const e=vC(t),r=Sw(e,t),n=Sw(e.reverse(),t);return[r,n]}function vC(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Sw(t,e){for(const r of t)if(!wN(r,{upTo:e}))return r}function wN(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function CN(t){return t instanceof HTMLInputElement&&"select"in t}function Ps(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&CN(t)&&e&&t.select()}}const kw=EN();function EN(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=Aw(t,e),t.unshift(e)},remove(e){var r;t=Aw(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function Aw(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function SN(t){return t.filter(e=>e.tagName!=="A")}const kN=["top","right","bottom","left"],ao=Math.min,hn=Math.max,R0=Math.round,Zu=Math.floor,lo=t=>({x:t,y:t}),AN={left:"right",right:"left",bottom:"top",top:"bottom"},_N={start:"end",end:"start"};function lp(t,e,r){return hn(t,ao(e,r))}function ns(t,e){return typeof t=="function"?t(e):t}function is(t){return t.split("-")[0]}function ac(t){return t.split("-")[1]}function $m(t){return t==="x"?"y":"x"}function Dm(t){return t==="y"?"height":"width"}function lc(t){return["top","bottom"].includes(is(t))?"y":"x"}function Lm(t){return $m(lc(t))}function TN(t,e,r){r===void 0&&(r=!1);const n=ac(t),i=Lm(t),s=Dm(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=M0(o)),[o,M0(o)]}function PN(t){const e=M0(t);return[cp(t),e,cp(e)]}function cp(t){return t.replace(/start|end/g,e=>_N[e])}function IN(t,e,r){const n=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?i:n:e?n:i;case"left":case"right":return e?s:o;default:return[]}}function RN(t,e,r,n){const i=ac(t);let s=IN(is(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(cp)))),s}function M0(t){return t.replace(/left|right|bottom|top/g,e=>AN[e])}function MN(t){return{top:0,right:0,bottom:0,left:0,...t}}function yC(t){return typeof t!="number"?MN(t):{top:t,right:t,bottom:t,left:t}}function O0(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function _w(t,e,r){let{reference:n,floating:i}=t;const s=lc(e),o=Lm(e),a=Dm(o),l=is(e),c=s==="y",f=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,h=n[a]/2-i[a]/2;let y;switch(l){case"top":y={x:f,y:n.y-i.height};break;case"bottom":y={x:f,y:n.y+n.height};break;case"right":y={x:n.x+n.width,y:u};break;case"left":y={x:n.x-i.width,y:u};break;default:y={x:n.x,y:n.y}}switch(ac(e)){case"start":y[o]-=h*(r&&c?-1:1);break;case"end":y[o]+=h*(r&&c?-1:1);break}return y}const ON=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=_w(c,n,l),h=n,y={},g=0;for(let p=0;p({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:f=0}=ns(t,e)||{};if(c==null)return{};const u=yC(f),h={x:r,y:n},y=Lm(i),g=Dm(y),p=await o.getDimensions(c),k=y==="y",w=k?"top":"left",E=k?"bottom":"right",A=k?"clientHeight":"clientWidth",I=s.reference[g]+s.reference[y]-h[y]-s.floating[g],M=h[y]-s.reference[y],B=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let z=B?B[A]:0;(!z||!await(o.isElement==null?void 0:o.isElement(B)))&&(z=a.floating[A]||s.floating[g]);const F=I/2-M/2,K=z/2-p[g]/2-1,J=ao(u[w],K),Z=ao(u[E],K),ie=J,D=z-p[g]-Z,v=z/2-p[g]/2+F,C=lp(ie,v,D),P=!l.arrow&&ac(i)!=null&&v!=C&&s.reference[g]/2-(vie<=0)){var K,J;const ie=(((K=s.flip)==null?void 0:K.index)||0)+1,D=M[ie];if(D)return{data:{index:ie,overflows:F},reset:{placement:D}};let v=(J=F.filter(C=>C.overflows[0]<=0).sort((C,P)=>C.overflows[1]-P.overflows[1])[0])==null?void 0:J.placement;if(!v)switch(y){case"bestFit":{var Z;const C=(Z=F.map(P=>[P.placement,P.overflows.filter(O=>O>0).reduce((O,b)=>O+b,0)]).sort((P,O)=>P[1]-O[1])[0])==null?void 0:Z[0];C&&(v=C);break}case"initialPlacement":v=a;break}if(i!==v)return{reset:{placement:v}}}return{}}}};function Pw(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Iw(t){return kN.some(e=>t[e]>=0)}const $N=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...i}=ns(t,e);switch(n){case"referenceHidden":{const s=await qf(e,{...i,elementContext:"reference"}),o=Pw(s,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Iw(o)}}}case"escaped":{const s=await qf(e,{...i,altBoundary:!0}),o=Pw(s,r.floating);return{data:{escapedOffsets:o,escaped:Iw(o)}}}default:return{}}}}};async function DN(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=is(r),a=ac(r),l=lc(r)==="y",c=["left","top"].includes(o)?-1:1,f=s&&l?-1:1,u=ns(e,t);let{mainAxis:h,crossAxis:y,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&typeof g=="number"&&(y=a==="end"?g*-1:g),l?{x:y*f,y:h*c}:{x:h*c,y:y*f}}const LN=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,i=await DN(e,t);return{x:r+i.x,y:n+i.y,data:i}}}},BN=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:k=>{let{x:w,y:E}=k;return{x:w,y:E}}},...l}=ns(t,e),c={x:r,y:n},f=await qf(e,l),u=lc(is(i)),h=$m(u);let y=c[h],g=c[u];if(s){const k=h==="y"?"top":"left",w=h==="y"?"bottom":"right",E=y+f[k],A=y-f[w];y=lp(E,y,A)}if(o){const k=u==="y"?"top":"left",w=u==="y"?"bottom":"right",E=g+f[k],A=g-f[w];g=lp(E,g,A)}const p=a.fn({...e,[h]:y,[u]:g});return{...p,data:{x:p.x-r,y:p.y-n}}}}},jN=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=ns(t,e),f={x:r,y:n},u=lc(i),h=$m(u);let y=f[h],g=f[u];const p=ns(a,e),k=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const A=h==="y"?"height":"width",I=s.reference[h]-s.floating[A]+k.mainAxis,M=s.reference[h]+s.reference[A]-k.mainAxis;yM&&(y=M)}if(c){var w,E;const A=h==="y"?"width":"height",I=["top","left"].includes(is(i)),M=s.reference[u]-s.floating[A]+(I&&((w=o.offset)==null?void 0:w[u])||0)+(I?0:k.crossAxis),B=s.reference[u]+s.reference[A]+(I?0:((E=o.offset)==null?void 0:E[u])||0)-(I?k.crossAxis:0);gB&&(g=B)}return{[h]:y,[u]:g}}}},FN=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:i,elements:s}=e,{apply:o=()=>{},...a}=ns(t,e),l=await qf(e,a),c=is(r),f=ac(r),u=lc(r)==="y",{width:h,height:y}=n.floating;let g,p;c==="top"||c==="bottom"?(g=c,p=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(p=c,g=f==="end"?"top":"bottom");const k=y-l[g],w=h-l[p],E=!e.middlewareData.shift;let A=k,I=w;if(u){const B=h-l.left-l.right;I=f||E?ao(w,B):B}else{const B=y-l.top-l.bottom;A=f||E?ao(k,B):B}if(E&&!f){const B=hn(l.left,0),z=hn(l.right,0),F=hn(l.top,0),K=hn(l.bottom,0);u?I=h-2*(B!==0||z!==0?B+z:hn(l.left,l.right)):A=y-2*(F!==0||K!==0?F+K:hn(l.top,l.bottom))}await o({...e,availableWidth:I,availableHeight:A});const M=await i.getDimensions(s.floating);return h!==M.width||y!==M.height?{reset:{rects:!0}}:{}}}};function co(t){return pC(t)?(t.nodeName||"").toLowerCase():"#document"}function pn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function us(t){var e;return(e=(pC(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function pC(t){return t instanceof Node||t instanceof pn(t).Node}function ss(t){return t instanceof Element||t instanceof pn(t).Element}function Pi(t){return t instanceof HTMLElement||t instanceof pn(t).HTMLElement}function Rw(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof pn(t).ShadowRoot}function gu(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=$n(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function UN(t){return["table","td","th"].includes(co(t))}function Bm(t){const e=jm(),r=$n(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function zN(t){let e=Vl(t);for(;Pi(e)&&!jh(e);){if(Bm(e))return e;e=Vl(e)}return null}function jm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function jh(t){return["html","body","#document"].includes(co(t))}function $n(t){return pn(t).getComputedStyle(t)}function Fh(t){return ss(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Vl(t){if(co(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Rw(t)&&t.host||us(t);return Rw(e)?e.host:e}function gC(t){const e=Vl(t);return jh(e)?t.ownerDocument?t.ownerDocument.body:t.body:Pi(e)&&gu(e)?e:gC(e)}function Gf(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=gC(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=pn(i);return s?e.concat(o,o.visualViewport||[],gu(i)?i:[],o.frameElement&&r?Gf(o.frameElement):[]):e.concat(i,Gf(i,[],r))}function mC(t){const e=$n(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=Pi(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=R0(r)!==s||R0(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function Fm(t){return ss(t)?t:t.contextElement}function kl(t){const e=Fm(t);if(!Pi(e))return lo(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=mC(e);let o=(s?R0(r.width):r.width)/n,a=(s?R0(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const VN=lo(0);function xC(t){const e=pn(t);return!jm()||!e.visualViewport?VN:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function HN(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==pn(t)?!1:e}function ga(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=Fm(t);let o=lo(1);e&&(n?ss(n)&&(o=kl(n)):o=kl(t));const a=HN(s,r,n)?xC(s):lo(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,f=i.width/o.x,u=i.height/o.y;if(s){const h=pn(s),y=n&&ss(n)?pn(n):n;let g=h.frameElement;for(;g&&n&&y!==h;){const p=kl(g),k=g.getBoundingClientRect(),w=$n(g),E=k.left+(g.clientLeft+parseFloat(w.paddingLeft))*p.x,A=k.top+(g.clientTop+parseFloat(w.paddingTop))*p.y;l*=p.x,c*=p.y,f*=p.x,u*=p.y,l+=E,c+=A,g=pn(g).frameElement}}return O0({width:f,height:u,x:l,y:c})}function WN(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=Pi(r),s=us(r);if(r===s)return e;let o={scrollLeft:0,scrollTop:0},a=lo(1);const l=lo(0);if((i||!i&&n!=="fixed")&&((co(r)!=="body"||gu(s))&&(o=Fh(r)),Pi(r))){const c=ga(r);a=kl(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}}function qN(t){return Array.from(t.getClientRects())}function bC(t){return ga(us(t)).left+Fh(t).scrollLeft}function GN(t){const e=us(t),r=Fh(t),n=t.ownerDocument.body,i=hn(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=hn(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+bC(t);const a=-r.scrollTop;return $n(n).direction==="rtl"&&(o+=hn(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}function KN(t,e){const r=pn(t),n=us(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=jm();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function JN(t,e){const r=ga(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=Pi(t)?kl(t):lo(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,c=n*s.y;return{width:o,height:a,x:l,y:c}}function Mw(t,e,r){let n;if(e==="viewport")n=KN(t,r);else if(e==="document")n=GN(us(t));else if(ss(e))n=JN(e,r);else{const i=xC(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return O0(n)}function wC(t,e){const r=Vl(t);return r===e||!ss(r)||jh(r)?!1:$n(r).position==="fixed"||wC(r,e)}function YN(t,e){const r=e.get(t);if(r)return r;let n=Gf(t,[],!1).filter(a=>ss(a)&&co(a)!=="body"),i=null;const s=$n(t).position==="fixed";let o=s?Vl(t):t;for(;ss(o)&&!jh(o);){const a=$n(o),l=Bm(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||gu(o)&&!l&&wC(t,o))?n=n.filter(f=>f!==o):i=a,o=Vl(o)}return e.set(t,n),n}function QN(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?YN(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,f)=>{const u=Mw(e,f,i);return c.top=hn(u.top,c.top),c.right=ao(u.right,c.right),c.bottom=ao(u.bottom,c.bottom),c.left=hn(u.left,c.left),c},Mw(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function XN(t){return mC(t)}function ZN(t,e,r){const n=Pi(e),i=us(e),s=r==="fixed",o=ga(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=lo(0);if(n||!n&&!s)if((co(e)!=="body"||gu(i))&&(a=Fh(e)),n){const c=ga(e,!0,s,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else i&&(l.x=bC(i));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function Ow(t,e){return!Pi(t)||$n(t).position==="fixed"?null:e?e(t):t.offsetParent}function CC(t,e){const r=pn(t);if(!Pi(t))return r;let n=Ow(t,e);for(;n&&UN(n)&&$n(n).position==="static";)n=Ow(n,e);return n&&(co(n)==="html"||co(n)==="body"&&$n(n).position==="static"&&!Bm(n))?r:n||zN(t)||r}const e$=async function(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||CC,s=this.getDimensions;return{reference:ZN(e,await i(r),n),floating:{x:0,y:0,...await s(r)}}};function t$(t){return $n(t).direction==="rtl"}const r$={convertOffsetParentRelativeRectToViewportRelativeRect:WN,getDocumentElement:us,getClippingRect:QN,getOffsetParent:CC,getElementRects:e$,getClientRects:qN,getDimensions:XN,getScale:kl,isElement:ss,isRTL:t$};function n$(t,e){let r=null,n;const i=us(t);function s(){clearTimeout(n),r&&r.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:f,width:u,height:h}=t.getBoundingClientRect();if(a||e(),!u||!h)return;const y=Zu(f),g=Zu(i.clientWidth-(c+u)),p=Zu(i.clientHeight-(f+h)),k=Zu(c),E={rootMargin:-y+"px "+-g+"px "+-p+"px "+-k+"px",threshold:hn(0,ao(1,l))||1};let A=!0;function I(M){const B=M[0].intersectionRatio;if(B!==l){if(!A)return o();B?o(!1,B):n=setTimeout(()=>{o(!1,1e-7)},100)}A=!1}try{r=new IntersectionObserver(I,{...E,root:i.ownerDocument})}catch{r=new IntersectionObserver(I,E)}r.observe(t)}return o(!0),s}function i$(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Fm(t),f=i||s?[...c?Gf(c):[],...Gf(e)]:[];f.forEach(w=>{i&&w.addEventListener("scroll",r,{passive:!0}),s&&w.addEventListener("resize",r)});const u=c&&a?n$(c,r):null;let h=-1,y=null;o&&(y=new ResizeObserver(w=>{let[E]=w;E&&E.target===c&&y&&(y.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{y&&y.observe(e)})),r()}),c&&!l&&y.observe(c),y.observe(e));let g,p=l?ga(t):null;l&&k();function k(){const w=ga(t);p&&(w.x!==p.x||w.y!==p.y||w.width!==p.width||w.height!==p.height)&&r(),p=w,g=requestAnimationFrame(k)}return r(),()=>{f.forEach(w=>{i&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),u&&u(),y&&y.disconnect(),y=null,l&&cancelAnimationFrame(g)}}const s$=(t,e,r)=>{const n=new Map,i={platform:r$,...r},s={...i.platform,_c:n};return ON(t,e,{...i,platform:s})},o$=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:i}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?Tw({element:n.current,padding:i}).fn(r):{}:n?Tw({element:n,padding:i}).fn(r):{}}}};var Pd=typeof document<"u"?S.useLayoutEffect:S.useEffect;function N0(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!N0(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){const s=i[n];if(!(s==="_owner"&&t.$$typeof)&&!N0(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function EC(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Nw(t,e){const r=EC(t);return Math.round(e*r)/r}function $w(t){const e=S.useRef(t);return Pd(()=>{e.current=t}),e}function a$(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=S.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[h,y]=S.useState(n);N0(h,n)||y(n);const[g,p]=S.useState(null),[k,w]=S.useState(null),E=S.useCallback(P=>{P!=B.current&&(B.current=P,p(P))},[p]),A=S.useCallback(P=>{P!==z.current&&(z.current=P,w(P))},[w]),I=s||g,M=o||k,B=S.useRef(null),z=S.useRef(null),F=S.useRef(f),K=$w(l),J=$w(i),Z=S.useCallback(()=>{if(!B.current||!z.current)return;const P={placement:e,strategy:r,middleware:h};J.current&&(P.platform=J.current),s$(B.current,z.current,P).then(O=>{const b={...O,isPositioned:!0};ie.current&&!N0(F.current,b)&&(F.current=b,xo.flushSync(()=>{u(b)}))})},[h,e,r,J]);Pd(()=>{c===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,u(P=>({...P,isPositioned:!1})))},[c]);const ie=S.useRef(!1);Pd(()=>(ie.current=!0,()=>{ie.current=!1}),[]),Pd(()=>{if(I&&(B.current=I),M&&(z.current=M),I&&M){if(K.current)return K.current(I,M,Z);Z()}},[I,M,Z,K]);const D=S.useMemo(()=>({reference:B,floating:z,setReference:E,setFloating:A}),[E,A]),v=S.useMemo(()=>({reference:I,floating:M}),[I,M]),C=S.useMemo(()=>{const P={position:r,left:0,top:0};if(!v.floating)return P;const O=Nw(v.floating,f.x),b=Nw(v.floating,f.y);return a?{...P,transform:"translate("+O+"px, "+b+"px)",...EC(v.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:b}},[r,a,v.floating,f.x,f.y]);return S.useMemo(()=>({...f,update:Z,refs:D,elements:v,floatingStyles:C}),[f,Z,D,v,C])}const SC="Popper",[kC,cc]=Lr(SC),[l$,AC]=kC(SC),c$=t=>{const{__scopePopper:e,children:r}=t,[n,i]=S.useState(null);return S.createElement(l$,{scope:e,anchor:n,onAnchorChange:i},r)},f$="PopperAnchor",u$=S.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...i}=t,s=AC(f$,r),o=S.useRef(null),a=Ot(e,o);return S.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:S.createElement(De.div,xe({},i,{ref:a}))}),_C="PopperContent",[d$,MY]=kC(_C),h$=S.forwardRef((t,e)=>{var r,n,i,s,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:h=0,align:y="center",alignOffset:g=0,arrowPadding:p=0,avoidCollisions:k=!0,collisionBoundary:w=[],collisionPadding:E=0,sticky:A="partial",hideWhenDetached:I=!1,updatePositionStrategy:M="optimized",onPlaced:B,...z}=t,F=AC(_C,f),[K,J]=S.useState(null),Z=Ot(e,ae=>J(ae)),[ie,D]=S.useState(null),v=Tm(ie),C=(r=v==null?void 0:v.width)!==null&&r!==void 0?r:0,P=(n=v==null?void 0:v.height)!==null&&n!==void 0?n:0,O=u+(y!=="center"?"-"+y:""),b=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},_=Array.isArray(w)?w:[w],R=_.length>0,m={padding:b,boundary:_.filter(v$),altBoundary:R},{refs:d,floatingStyles:T,placement:N,isPositioned:x,middlewareData:$}=a$({strategy:"fixed",placement:O,whileElementsMounted:(...ae)=>i$(...ae,{animationFrame:M==="always"}),elements:{reference:F.anchor},middleware:[LN({mainAxis:h+P,alignmentAxis:g}),k&&BN({mainAxis:!0,crossAxis:!1,limiter:A==="partial"?jN():void 0,...m}),k&&NN({...m}),FN({...m,apply:({elements:ae,rects:Le,availableWidth:Ee,availableHeight:Ce})=>{const{width:Nt,height:qe}=Le.reference,Be=ae.floating.style;Be.setProperty("--radix-popper-available-width",`${Ee}px`),Be.setProperty("--radix-popper-available-height",`${Ce}px`),Be.setProperty("--radix-popper-anchor-width",`${Nt}px`),Be.setProperty("--radix-popper-anchor-height",`${qe}px`)}}),ie&&o$({element:ie,padding:p}),y$({arrowWidth:C,arrowHeight:P}),I&&$N({strategy:"referenceHidden",...m})]}),[L,U]=TC(N),G=Nn(B);xn(()=>{x&&(G==null||G())},[x,G]);const j=(i=$.arrow)===null||i===void 0?void 0:i.x,V=(s=$.arrow)===null||s===void 0?void 0:s.y,W=((o=$.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[oe,re]=S.useState();return xn(()=>{K&&re(window.getComputedStyle(K).zIndex)},[K]),S.createElement("div",{ref:d.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:x?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(a=$.transformOrigin)===null||a===void 0?void 0:a.x,(l=$.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},S.createElement(d$,{scope:f,placedSide:L,onArrowChange:D,arrowX:j,arrowY:V,shouldHideArrow:W},S.createElement(De.div,xe({"data-side":L,"data-align":U},z,{ref:Z,style:{...z.style,animation:x?void 0:"none",opacity:(c=$.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function v$(t){return t!==null}const y$=t=>({name:"transformOrigin",options:t,fn(e){var r,n,i,s,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,h=u?0:t.arrowWidth,y=u?0:t.arrowHeight,[g,p]=TC(a),k={start:"0%",center:"50%",end:"100%"}[p],w=((n=(i=c.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+h/2,E=((s=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&s!==void 0?s:0)+y/2;let A="",I="";return g==="bottom"?(A=u?k:`${w}px`,I=`${-y}px`):g==="top"?(A=u?k:`${w}px`,I=`${l.floating.height+y}px`):g==="right"?(A=`${-y}px`,I=u?k:`${E}px`):g==="left"&&(A=`${l.floating.width+y}px`,I=u?k:`${E}px`),{data:{x:A,y:I}}}});function TC(t){const[e,r="center"]=t.split("-");return[e,r]}const p$=c$,g$=u$,m$=h$,PC=S.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...i}=t;return n?FT.createPortal(S.createElement(De.div,xe({},i,{ref:e})),n):null}),bv="rovingFocusGroup.onEntryFocus",x$={bubbles:!1,cancelable:!0},Um="RovingFocusGroup",[fp,IC,b$]=Bh(Um),[w$,fc]=Lr(Um,[b$]),[C$,E$]=w$(Um),S$=S.forwardRef((t,e)=>S.createElement(fp.Provider,{scope:t.__scopeRovingFocusGroup},S.createElement(fp.Slot,{scope:t.__scopeRovingFocusGroup},S.createElement(k$,Jt({},t,{ref:e}))))),k$=S.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,...f}=t,u=S.useRef(null),h=Ot(e,u),y=Om(s),[g=null,p]=pa({prop:o,defaultProp:a,onChange:l}),[k,w]=S.useState(!1),E=Nn(c),A=IC(r),I=S.useRef(!1),[M,B]=S.useState(0);return S.useEffect(()=>{const z=u.current;if(z)return z.addEventListener(bv,E),()=>z.removeEventListener(bv,E)},[E]),S.createElement(C$,{scope:r,orientation:n,dir:y,loop:i,currentTabStopId:g,onItemFocus:S.useCallback(z=>p(z),[p]),onItemShiftTab:S.useCallback(()=>w(!0),[]),onFocusableItemAdd:S.useCallback(()=>B(z=>z+1),[]),onFocusableItemRemove:S.useCallback(()=>B(z=>z-1),[])},S.createElement(De.div,Jt({tabIndex:k||M===0?-1:0,"data-orientation":n},f,{ref:h,style:{outline:"none",...t.style},onMouseDown:ge(t.onMouseDown,()=>{I.current=!0}),onFocus:ge(t.onFocus,z=>{const F=!I.current;if(z.target===z.currentTarget&&F&&!k){const K=new CustomEvent(bv,x$);if(z.currentTarget.dispatchEvent(K),!K.defaultPrevented){const J=A().filter(C=>C.focusable),Z=J.find(C=>C.active),ie=J.find(C=>C.id===g),v=[Z,ie,...J].filter(Boolean).map(C=>C.ref.current);RC(v)}}I.current=!1}),onBlur:ge(t.onBlur,()=>w(!1))})))}),A$="RovingFocusGroupItem",_$=S.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,...o}=t,a=Qs(),l=s||a,c=E$(A$,r),f=c.currentTabStopId===l,u=IC(r),{onFocusableItemAdd:h,onFocusableItemRemove:y}=c;return S.useEffect(()=>{if(n)return h(),()=>y()},[n,h,y]),S.createElement(fp.ItemSlot,{scope:r,id:l,focusable:n,active:i},S.createElement(De.span,Jt({tabIndex:f?0:-1,"data-orientation":c.orientation},o,{ref:e,onMouseDown:ge(t.onMouseDown,g=>{n?c.onItemFocus(l):g.preventDefault()}),onFocus:ge(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:ge(t.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){c.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const p=I$(g,c.orientation,c.dir);if(p!==void 0){g.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(p==="last")w.reverse();else if(p==="prev"||p==="next"){p==="prev"&&w.reverse();const E=w.indexOf(g.currentTarget);w=c.loop?R$(w,E+1):w.slice(E+1)}setTimeout(()=>RC(w))}})})))}),T$={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function P$(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function I$(t,e,r){const n=P$(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return T$[n]}function RC(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function R$(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const M$=S$,MC=_$;var O$=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},La=new WeakMap,ed=new WeakMap,td={},wv=0,OC=function(t){return t&&(t.host||OC(t.parentNode))},N$=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=OC(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},$$=function(t,e,r,n){var i=N$(e,Array.isArray(t)?t:[t]);td[r]||(td[r]=new WeakMap);var s=td[r],o=[],a=new Set,l=new Set(i),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};i.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(h){if(a.has(h))f(h);else{var y=h.getAttribute(n),g=y!==null&&y!=="false",p=(La.get(h)||0)+1,k=(s.get(h)||0)+1;La.set(h,p),s.set(h,k),o.push(h),p===1&&g&&ed.set(h,!0),k===1&&h.setAttribute(r,"true"),g||h.setAttribute(n,"true")}})};return f(e),a.clear(),wv++,function(){o.forEach(function(u){var h=La.get(u)-1,y=s.get(u)-1;La.set(u,h),s.set(u,y),h||(ed.has(u)||u.removeAttribute(n),ed.delete(u)),y||u.removeAttribute(r)}),wv--,wv||(La=new WeakMap,La=new WeakMap,ed=new WeakMap,td={})}},NC=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=e||O$(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),$$(n,i,r,"aria-hidden")):function(){return null}},pi=function(){return pi=Object.assign||function(e){for(var r,n=1,i=arguments.length;n"u")return X$;var e=Z$(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},tD=BC(),rD=function(t,e,r,n){var i=t.left,s=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` - .`.concat(L$,` { + */var vw;function lO(){if(vw)return Ic;vw=1;var t=lr,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,c){var f,u={},h=null,y=null;c!==void 0&&(h=""+c),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(y=l.ref);for(f in l)n.call(l,f)&&!s.hasOwnProperty(f)&&(u[f]=l[f]);if(a&&a.defaultProps)for(f in l=a.defaultProps,l)u[f]===void 0&&(u[f]=l[f]);return{$$typeof:e,type:a,key:h,ref:y,props:u,_owner:i.current}}return Ic.Fragment=r,Ic.jsx=o,Ic.jsxs=o,Ic}nC.exports=lO();var J=nC.exports;function cO(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function fO(t){var e=cO(t,"string");return typeof e=="symbol"?e:String(e)}function uO(t,e,r){return e=fO(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pw(t){for(var e=1;e{for(var n of Object.keys(t)){var i;if(t[n]!==((i=e[n])!==null&&i!==void 0?i:r[n]))return!1}return!0},zt=t=>{var e=r=>{var n=t.defaultClassName,i=pw(pw({},t.defaultVariants),r);for(var s in i){var o,a=(o=i[s])!==null&&o!==void 0?o:t.defaultVariants[s];if(a!=null){var l=a;typeof l=="boolean"&&(l=l===!0?"true":"false");var c=t.variantClassNames[s][l];c&&(n+=" "+c)}}for(var[f,u]of t.compoundVariants)dO(f,i,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return gw(t.variantClassNames,r=>gw(r,n=>n.split(" ")[0]))}},e};zt({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"fyvr11ot",warning:"fyvr11oz",success:"fyvr11oh",error:"fyvr11on"},size:{sm:"_1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"_1qxj1ib9 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc fyvr1ww fyvr1ys fyvr144 fyvr1eg"}},defaultVariants:{},compoundVariants:[]});const mw=t=>{const{color:e="borderNormal",marginY:r="4",...n}=t;return J.jsx(ue,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var hO=zt({defaultClassName:"_1qxj1ib9",variantClassNames:{variant:{inherit:"fyvr11mu fyvr11e4 fyvr11gg fyvr11fg fyvr11ew",xlarge:"fyvr11mv fyvr11es fyvr11gc fyvr11fk fyvr11fc",large:"fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8",medium:"fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc",normal:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",small:"fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4",xsmall:"fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc",code:"fyvr11mw fyvr11eg fyvr11g0 fyvr11fk fyvr11f0"},ellipsis:{true:"fyvr11ls fyvr11m8 fyvr11n7 fyvr11mx"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const Wt=S.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:i,hidden:s,italic:o,underline:a,children:l,ellipsis:c,uppercase:f,capitalize:u,...h}=t,y=eO[n];return J.jsx(ue,{as:r,className:cn(i,hO({hidden:s,ellipsis:c,italic:o,underline:a,uppercase:f,capitalize:u})),ref:e,...y,...h,children:l})});var vO=zt({defaultClassName:"_140wn8ng fyvr11ls fyvr11m8 fyvr11n7 fyvr11ko fyvr11h0",variantClassNames:{variant:{base:"_140wn8nh",feature:"_140wn8ni fyvr11ph fyvr12o5",primary:"fyvr11pb fyvr12o5",glass:"fyvr11tt fyvr12rt",emphasis:"fyvr11tz fyvr12rt",raised:"fyvr11tn fyvr12rt",danger:"fyvr11on fyvr12o5",text:"_140wn8no _1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11ob fyvr12s5"},shape:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"fyvr12ut fyvr12vh",false:"fyvr12uz fyvr12vt fyvr12vr"},size:{xs:"_140wn8nt _1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr1ws fyvr1yo",sm:"_140wn8nu _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys",md:"_140wn8nv _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw",lg:"_140wn8nw _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8nx"},hasLeftIcon:{true:"_140wn8ny"},hasRightIcon:{true:"_140wn8nz"},activeOutline:{light:"_140wn8n10",bold:"_140wn8n11"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8n12"],[{iconOnly:!0,size:"sm"},"_140wn8n13"],[{iconOnly:!0,size:"md"},"_140wn8n14"],[{iconOnly:!0,size:"lg"},"_140wn8n15"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n16"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n17"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n18"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n19"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n1a"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n1b"]]});const ze=S.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:i,disabled:s=!1,display:o="inline-flex",fontWeight:a="bold",pending:l=!1,label:c,leftIcon:f,rightIcon:u,size:h="md",variant:y="glass",width:g="fit",shape:p="circle",type:k="button",...w}=t,E=f!==void 0&&c!==void 0,A=u!==void 0&&c!==void 0,I=f!==void 0&&c===void 0,M=h==="xs"?"xs":"sm";return J.jsx(ue,{as:r,className:cn(i,vO({activeOutline:n,disabled:s||l,hasLeftIcon:E,hasRightIcon:A,iconOnly:I,size:y==="text"?void 0:h,shape:y==="text"?void 0:p,variant:y})),disabled:s||l,display:o,fontWeight:a,ref:e,type:k,width:g,...w,children:I?J.jsx(f,{size:M}):J.jsxs(ue,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:h==="xs"?"1":"2",children:[J.jsxs(ue,{justifyContent:"flex-start",alignItems:"center",gap:h==="xs"?"1":"2",children:[f&&J.jsx(f,{size:M}),J.jsx(Wt,{children:c})]}),u&&J.jsx(u,{size:M})]})})});var yO=zt({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"fyvr12vr fyvr12uz"},disabled:{true:"rhmai65"},outlined:{true:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12n5 fyvr12ft fyvr1215 fyvr128h fyvr12nh fyvr12g5 fyvr121h fyvr128t"},blur:{true:"fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const pO=S.forwardRef((t,e)=>{const{className:r,children:n,clickable:i,outlined:s,disabled:o,blur:a,width:l="full",...c}=t;return J.jsx(ue,{className:cn(r,yO({clickable:i,outlined:s,disabled:o,blur:a})),background:s?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...c,children:n})});function Jt(){return Jt=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>gO(r,e))}function Nt(...t){return S.useCallback(iC(...t),t)}function Br(t,e=[]){let r=[];function n(s,o){const a=S.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:h,children:y,...g}=u,p=(h==null?void 0:h[t][l])||a,k=S.useMemo(()=>g,Object.values(g));return S.createElement(p.Provider,{value:k},y)}function f(u,h){const y=(h==null?void 0:h[t][l])||a,g=S.useContext(y);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,f]}const i=()=>{const s=r.map(o=>S.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return S.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[n,mO(i,...e)]}function mO(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(s)[`__scope${c}`];return{...a,...u}},{});return S.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function be(t,e,{checkForDefaultPrevented:r=!0}={}){return function(i){if(t==null||t(i),r===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function Nn(t){const e=S.useRef(t);return S.useEffect(()=>{e.current=t}),S.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function pa({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=xO({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=Nn(r),l=S.useCallback(c=>{if(s){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else i(c)},[s,t,i,a]);return[o,l]}function xO({defaultProp:t,onChange:e}){const r=S.useState(t),[n]=r,i=S.useRef(n),s=Nn(e);return S.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}function _m(t){const e=S.useRef({value:t,previous:t});return S.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const xn=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{};function Tm(t){const[e,r]=S.useState(void 0);return xn(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function bO(t,e){return S.useReducer((r,n)=>{const i=e[r][n];return i??r},t)}const bo=t=>{const{present:e,children:r}=t,n=wO(e),i=typeof r=="function"?r({present:n.isPresent}):S.Children.only(r),s=Nt(n.ref,i.ref);return typeof r=="function"||n.isPresent?S.cloneElement(i,{ref:s}):null};bo.displayName="Presence";function wO(t){const[e,r]=S.useState(),n=S.useRef({}),i=S.useRef(t),s=S.useRef("none"),o=t?"mounted":"unmounted",[a,l]=bO(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const c=Xu(n.current);s.current=a==="mounted"?c:"none"},[a]),xn(()=>{const c=n.current,f=i.current;if(f!==t){const h=s.current,y=Xu(c);t?l("MOUNT"):y==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&h!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),xn(()=>{if(e){const c=u=>{const y=Xu(n.current).includes(u.animationName);u.target===e&&y&&xo.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(s.current=Xu(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:S.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function Xu(t){return(t==null?void 0:t.animationName)||"none"}function Ce(){return Ce=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,i=S.Children.toArray(r),s=i.find(EO);if(s){const o=s.props.children,a=i.map(l=>l===s?S.Children.count(o)>1?S.Children.only(null):S.isValidElement(o)?o.props.children:null:l);return S.createElement(op,Ce({},n,{ref:e}),S.isValidElement(o)?S.cloneElement(o,void 0,a):null)}return S.createElement(op,Ce({},n,{ref:e}),r)});zl.displayName="Slot";const op=S.forwardRef((t,e)=>{const{children:r,...n}=t;return S.isValidElement(r)?S.cloneElement(r,{...SO(n,r.props),ref:e?iC(e,r.ref):r.ref}):S.Children.count(r)>1?S.Children.only(null):null});op.displayName="SlotClone";const CO=({children:t})=>S.createElement(S.Fragment,null,t);function EO(t){return S.isValidElement(t)&&t.type===CO}function SO(t,e){const r={...e};for(const n in e){const i=t[n],s=e[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...a)=>{s(...a),i(...a)}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...t,...r}}const kO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Be=kO.reduce((t,e)=>{const r=S.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?zl:e;return S.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),S.createElement(a,Jt({},o,{ref:i}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function Pm(t,e){t&&xo.flushSync(()=>t.dispatchEvent(e))}const sC="Checkbox",[AO,IY]=Br(sC),[_O,TO]=AO(sC),PO=S.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,h]=S.useState(null),y=Nt(e,A=>h(A)),g=S.useRef(!1),p=u?!!u.closest("form"):!0,[k=!1,w]=pa({prop:i,defaultProp:s,onChange:c}),E=S.useRef(k);return S.useEffect(()=>{const A=u==null?void 0:u.form;if(A){const I=()=>w(E.current);return A.addEventListener("reset",I),()=>A.removeEventListener("reset",I)}},[u,w]),S.createElement(_O,{scope:r,state:k,disabled:a},S.createElement(Be.button,Jt({type:"button",role:"checkbox","aria-checked":ia(k)?"mixed":k,"aria-required":o,"data-state":oC(k),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:y,onKeyDown:be(t.onKeyDown,A=>{A.key==="Enter"&&A.preventDefault()}),onClick:be(t.onClick,A=>{w(I=>ia(I)?!0:!I),p&&(g.current=A.isPropagationStopped(),g.current||A.stopPropagation())})})),p&&S.createElement(MO,{control:u,bubbles:!g.current,name:n,value:l,checked:k,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),IO="CheckboxIndicator",RO=S.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...i}=t,s=TO(IO,r);return S.createElement(bo,{present:n||ia(s.state)||s.state===!0},S.createElement(Be.span,Jt({"data-state":oC(s.state),"data-disabled":s.disabled?"":void 0},i,{ref:e,style:{pointerEvents:"none",...t.style}})))}),MO=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=S.useRef(null),o=_m(r),a=Tm(e);return S.useEffect(()=>{const l=s.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const h=new Event("click",{bubbles:n});l.indeterminate=ia(r),u.call(l,ia(r)?!1:r),l.dispatchEvent(h)}},[o,r,n]),S.createElement("input",Jt({type:"checkbox","aria-hidden":!0,defaultChecked:ia(r)?!1:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ia(t){return t==="indeterminate"}function oC(t){return ia(t)?"indeterminate":t?"checked":"unchecked"}const OO=PO,NO=RO;var $O=zt({defaultClassName:"_43lu9r4",variantClassNames:{labelLocation:{top:"fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r6 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r7 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"fyvr1188 fyvr11h0"}},defaultVariants:{},compoundVariants:[]});const sc=t=>{const{id:e,label:r,description:n,labelLocation:i="top",children:s,...o}=t,a=()=>r||n?J.jsxs(ue,{flexDirection:"column",gap:"0.5",children:[r&&J.jsx(Wt,{variant:"small",color:"text100",hidden:i==="hidden",children:r}),n&&J.jsx(Wt,{variant:"small",color:"text50",hidden:i==="hidden",children:n})]}):null;return J.jsxs(ue,{as:"label",className:$O({labelLocation:i}),htmlFor:e,...o,children:[["left","top","hidden"].includes(i)&&a(),s,i==="right"&&a()]})};var oc=zt({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const DO=t=>J.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:J.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),aC=({size:t="sm",...e})=>J.jsx(ue,{as:DO,className:oc({size:t}),...e}),BO=t=>J.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:J.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m3.888 7.53 1.06-1.06 5.47 5.47 5.47-5.47 1.06 1.06-6.53 6.53-6.53-6.53Z",clipRule:"evenodd"})}),lC=({size:t="sm",...e})=>J.jsx(ue,{as:BO,className:oc({size:t}),...e}),LO=t=>J.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:J.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.418 11.06 4.47 4.47 1.06-1.06L11.48 10l4.47-4.47-1.06-1.06-4.47 4.47-4.47-4.47-1.06 1.06L9.357 10l-4.47 4.47 1.06 1.06 4.47-4.47Z",clipRule:"evenodd"})}),Im=({size:t="sm",...e})=>J.jsx(ue,{as:LO,className:oc({size:t}),...e}),jO=t=>J.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:J.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.608 6.75h-5.19v-1.5h7.75V13h-1.5V7.81l-7.72 7.72-1.06-1.06 7.72-7.72Z",clipRule:"evenodd"})}),FO=({size:t="sm",...e})=>J.jsx(ue,{as:jO,className:oc({size:t}),...e}),UO=t=>J.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:J.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.918 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-.677 4.383a5.5 5.5 0 1 1 1.06-1.06l2.648 2.647-1.061 1.06-2.647-2.647Z",clipRule:"evenodd"})}),zO=({size:t="sm",...e})=>J.jsx(ue,{as:UO,className:oc({size:t}),...e}),VO=t=>J.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:J.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m12.28 2.856-6.71 8.887h4.134l-1.424 6.2 6.887-8.71h-4.322l1.435-6.377Z",clipRule:"evenodd"})}),HO=({size:t="sm",...e})=>J.jsx(ue,{as:VO,className:oc({size:t}),...e});var WO=zt({defaultClassName:"_1c9x66f1 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12nb fyvr12fz fyvr121b fyvr128n fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11h0 fyvr11ko fyvr11jg fyvr12vt fyvr12vr fyvr12vj fyvr12uz fyvr12uv",variantClassNames:{size:{sm:"_1c9x66f2",lg:"_1c9x66f3"}},defaultVariants:{},compoundVariants:[]}),qO=zt({defaultClassName:"_1c9x66f5 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12rt fyvr11rz",variantClassNames:{size:{sm:"_1c9x66f6",lg:"_1c9x66f7"}},defaultVariants:{},compoundVariants:[]});const GO=({size:t="sm"})=>J.jsx(NO,{className:qO({size:t}),children:J.jsx(aC,{size:t})});S.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:i,label:s="",labelLocation:o="left",size:a="sm",...l}=t;return J.jsx(sc,{disabled:r,display:"flex",id:n??i,label:s,labelLocation:o,whiteSpace:"nowrap",children:J.jsx(OO,{className:WO({size:a}),disabled:r,id:n??i,name:i,ref:e,...l,children:J.jsx(GO,{})})})});lr.createContext(null);const KO=IA.useId||(()=>{});let JO=0;function Qs(t){const[e,r]=S.useState(KO());return xn(()=>{t||r(n=>n??String(JO++))},[t]),t||(e?`radix-${e}`:"")}const cC="Collapsible",[YO,RY]=Br(cC),[QO,Rm]=YO(cC),XO=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:s,onOpenChange:o,...a}=t,[l=!1,c]=pa({prop:n,defaultProp:i,onChange:o});return S.createElement(QO,{scope:r,disabled:s,contentId:Qs(),open:l,onOpenToggle:S.useCallback(()=>c(f=>!f),[c])},S.createElement(Be.div,Jt({"data-state":Mm(l),"data-disabled":s?"":void 0},a,{ref:e})))}),ZO="CollapsibleTrigger",eN=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,i=Rm(ZO,r);return S.createElement(Be.button,Jt({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Mm(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},n,{ref:e,onClick:be(t.onClick,i.onOpenToggle)}))}),fC="CollapsibleContent",tN=S.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=Rm(fC,t.__scopeCollapsible);return S.createElement(bo,{present:r||i.open},({present:s})=>S.createElement(rN,Jt({},n,{ref:e,present:s})))}),rN=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:i,...s}=t,o=Rm(fC,r),[a,l]=S.useState(n),c=S.useRef(null),f=Nt(e,c),u=S.useRef(0),h=u.current,y=S.useRef(0),g=y.current,p=o.open||a,k=S.useRef(p),w=S.useRef();return S.useEffect(()=>{const E=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(E)},[]),xn(()=>{const E=c.current;if(E){w.current=w.current||{transitionDuration:E.style.transitionDuration,animationName:E.style.animationName},E.style.transitionDuration="0s",E.style.animationName="none";const A=E.getBoundingClientRect();u.current=A.height,y.current=A.width,k.current||(E.style.transitionDuration=w.current.transitionDuration,E.style.animationName=w.current.animationName),l(n)}},[o.open,n]),S.createElement(Be.div,Jt({"data-state":Mm(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!p},s,{ref:f,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...t.style}}),p&&i)});function Mm(t){return t?"open":"closed"}const nN=XO,iN=eN,sN=tN;var xw="64px",oN="_4j62fl4 fyvr1ww fyvr1ys fyvr1so fyvr1v0 fyvr128",aN="_4j62fl5",lN="_4j62fl0",cN="_4j62fl2 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11h0 fyvr11ko fyvr11ob fyvr128 fyvr12uz fyvr11n2";const fN=t=>{const{className:e,children:r,defaultOpen:n,onOpenChange:i,label:s,...o}=t,[a,l]=S.useState(n),c=f=>{l(f),i==null||i(f)};return J.jsx(nN,{defaultOpen:n,onOpenChange:c,asChild:!0,children:J.jsxs(ue,{as:Sl.div,className:cn(e,lN),initial:{height:n?"auto":xw},animate:{height:a?"auto":xw},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...o,children:[J.jsxs(iN,{className:cN,children:[J.jsx(Wt,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:s}),J.jsx(ue,{as:Sl.div,position:"absolute",right:"0",marginRight:"4",initial:{rotate:n?180:0},animate:{rotate:a?180:0},transition:{ease:"linear",duration:.1},children:J.jsx(lC,{className:aN,color:"text50"})})]}),J.jsx(Z8,{children:a&&J.jsx(sN,{className:oN,asChild:!0,forceMount:!0,children:J.jsx(Sl.div,{initial:{opacity:n?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function Lh(t){const e=t+"CollectionProvider",[r,n]=Br(e),[i,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:g,children:p}=y,k=lr.useRef(null),w=lr.useRef(new Map).current;return lr.createElement(i,{scope:g,itemMap:w,collectionRef:k},p)},a=t+"CollectionSlot",l=lr.forwardRef((y,g)=>{const{scope:p,children:k}=y,w=s(a,p),E=Nt(g,w.collectionRef);return lr.createElement(zl,{ref:E},k)}),c=t+"CollectionItemSlot",f="data-radix-collection-item",u=lr.forwardRef((y,g)=>{const{scope:p,children:k,...w}=y,E=lr.useRef(null),A=Nt(g,E),I=s(c,p);return lr.useEffect(()=>(I.itemMap.set(E,{ref:E,...w}),()=>void I.itemMap.delete(E))),lr.createElement(zl,{[f]:"",ref:A},k)});function h(y){const g=s(t+"CollectionConsumer",y);return lr.useCallback(()=>{const k=g.collectionRef.current;if(!k)return[];const w=Array.from(k.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((I,M)=>w.indexOf(I.ref.current)-w.indexOf(M.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},h,n]}const uN=S.createContext(void 0);function Om(t){const e=S.useContext(uN);return t||e||"ltr"}function dN(t,e=globalThis==null?void 0:globalThis.document){const r=Nn(t);S.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const ap="dismissableLayer.update",hN="dismissableLayer.pointerDownOutside",vN="dismissableLayer.focusOutside";let bw;const yN=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nm=S.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=S.useContext(yN),[u,h]=S.useState(null),y=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,g]=S.useState({}),p=Nt(e,F=>h(F)),k=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf(w),A=u?k.indexOf(u):-1,I=f.layersWithOutsidePointerEventsDisabled.size>0,M=A>=E,j=pN(F=>{const q=F.target,G=[...f.branches].some(Z=>Z.contains(q));!M||G||(s==null||s(F),a==null||a(F),F.defaultPrevented||l==null||l())},y),z=gN(F=>{const q=F.target;[...f.branches].some(Z=>Z.contains(q))||(o==null||o(F),a==null||a(F),F.defaultPrevented||l==null||l())},y);return dN(F=>{A===f.layers.size-1&&(i==null||i(F),!F.defaultPrevented&&l&&(F.preventDefault(),l()))},y),S.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(bw=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),ww(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=bw)}},[u,y,n,f]),S.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),ww())},[u,f]),S.useEffect(()=>{const F=()=>g({});return document.addEventListener(ap,F),()=>document.removeEventListener(ap,F)},[]),S.createElement(Be.div,Ce({},c,{ref:p,style:{pointerEvents:I?M?"auto":"none":void 0,...t.style},onFocusCapture:be(t.onFocusCapture,z.onFocusCapture),onBlurCapture:be(t.onBlurCapture,z.onBlurCapture),onPointerDownCapture:be(t.onPointerDownCapture,j.onPointerDownCapture)}))});function pN(t,e=globalThis==null?void 0:globalThis.document){const r=Nn(t),n=S.useRef(!1),i=S.useRef(()=>{});return S.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){uC(hN,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function gN(t,e=globalThis==null?void 0:globalThis.document){const r=Nn(t),n=S.useRef(!1);return S.useEffect(()=>{const i=s=>{s.target&&!n.current&&uC(vN,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ww(){const t=new CustomEvent(ap);document.dispatchEvent(t)}function uC(t,e,r,{discrete:n}){const i=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?Pm(i,s):i.dispatchEvent(s)}const mN=Nm;let gv=0;function dC(){S.useEffect(()=>{var t,e;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=r[0])!==null&&t!==void 0?t:Cw()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:Cw()),gv++,()=>{gv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),gv--}},[])}function Cw(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const mv="focusScope.autoFocusOnMount",xv="focusScope.autoFocusOnUnmount",Ew={bubbles:!1,cancelable:!0},hC=S.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=S.useState(null),c=Nn(i),f=Nn(s),u=S.useRef(null),h=Nt(e,p=>l(p)),y=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(n){let p=function(A){if(y.paused||!a)return;const I=A.target;a.contains(I)?u.current=I:Ps(u.current,{select:!0})},k=function(A){if(y.paused||!a)return;const I=A.relatedTarget;I!==null&&(a.contains(I)||Ps(u.current,{select:!0}))},w=function(A){if(document.activeElement===document.body)for(const M of A)M.removedNodes.length>0&&Ps(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",k);const E=new MutationObserver(w);return a&&E.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",k),E.disconnect()}}},[n,a,y.paused]),S.useEffect(()=>{if(a){kw.add(y);const p=document.activeElement;if(!a.contains(p)){const w=new CustomEvent(mv,Ew);a.addEventListener(mv,c),a.dispatchEvent(w),w.defaultPrevented||(xN(SN(vC(a)),{select:!0}),document.activeElement===p&&Ps(a))}return()=>{a.removeEventListener(mv,c),setTimeout(()=>{const w=new CustomEvent(xv,Ew);a.addEventListener(xv,f),a.dispatchEvent(w),w.defaultPrevented||Ps(p??document.body,{select:!0}),a.removeEventListener(xv,f),kw.remove(y)},0)}}},[a,c,f,y]);const g=S.useCallback(p=>{if(!r&&!n||y.paused)return;const k=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,w=document.activeElement;if(k&&w){const E=p.currentTarget,[A,I]=bN(E);A&&I?!p.shiftKey&&w===I?(p.preventDefault(),r&&Ps(A,{select:!0})):p.shiftKey&&w===A&&(p.preventDefault(),r&&Ps(I,{select:!0})):w===E&&p.preventDefault()}},[r,n,y.paused]);return S.createElement(Be.div,Ce({tabIndex:-1},o,{ref:h,onKeyDown:g}))});function xN(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ps(n,{select:e}),document.activeElement!==r)return}function bN(t){const e=vC(t),r=Sw(e,t),n=Sw(e.reverse(),t);return[r,n]}function vC(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Sw(t,e){for(const r of t)if(!wN(r,{upTo:e}))return r}function wN(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function CN(t){return t instanceof HTMLInputElement&&"select"in t}function Ps(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&CN(t)&&e&&t.select()}}const kw=EN();function EN(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=Aw(t,e),t.unshift(e)},remove(e){var r;t=Aw(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function Aw(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function SN(t){return t.filter(e=>e.tagName!=="A")}const kN=["top","right","bottom","left"],ao=Math.min,hn=Math.max,R0=Math.round,Zu=Math.floor,lo=t=>({x:t,y:t}),AN={left:"right",right:"left",bottom:"top",top:"bottom"},_N={start:"end",end:"start"};function lp(t,e,r){return hn(t,ao(e,r))}function ns(t,e){return typeof t=="function"?t(e):t}function is(t){return t.split("-")[0]}function ac(t){return t.split("-")[1]}function $m(t){return t==="x"?"y":"x"}function Dm(t){return t==="y"?"height":"width"}function lc(t){return["top","bottom"].includes(is(t))?"y":"x"}function Bm(t){return $m(lc(t))}function TN(t,e,r){r===void 0&&(r=!1);const n=ac(t),i=Bm(t),s=Dm(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=M0(o)),[o,M0(o)]}function PN(t){const e=M0(t);return[cp(t),e,cp(e)]}function cp(t){return t.replace(/start|end/g,e=>_N[e])}function IN(t,e,r){const n=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?i:n:e?n:i;case"left":case"right":return e?s:o;default:return[]}}function RN(t,e,r,n){const i=ac(t);let s=IN(is(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(cp)))),s}function M0(t){return t.replace(/left|right|bottom|top/g,e=>AN[e])}function MN(t){return{top:0,right:0,bottom:0,left:0,...t}}function yC(t){return typeof t!="number"?MN(t):{top:t,right:t,bottom:t,left:t}}function O0(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function _w(t,e,r){let{reference:n,floating:i}=t;const s=lc(e),o=Bm(e),a=Dm(o),l=is(e),c=s==="y",f=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,h=n[a]/2-i[a]/2;let y;switch(l){case"top":y={x:f,y:n.y-i.height};break;case"bottom":y={x:f,y:n.y+n.height};break;case"right":y={x:n.x+n.width,y:u};break;case"left":y={x:n.x-i.width,y:u};break;default:y={x:n.x,y:n.y}}switch(ac(e)){case"start":y[o]-=h*(r&&c?-1:1);break;case"end":y[o]+=h*(r&&c?-1:1);break}return y}const ON=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=_w(c,n,l),h=n,y={},g=0;for(let p=0;p({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:f=0}=ns(t,e)||{};if(c==null)return{};const u=yC(f),h={x:r,y:n},y=Bm(i),g=Dm(y),p=await o.getDimensions(c),k=y==="y",w=k?"top":"left",E=k?"bottom":"right",A=k?"clientHeight":"clientWidth",I=s.reference[g]+s.reference[y]-h[y]-s.floating[g],M=h[y]-s.reference[y],j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let z=j?j[A]:0;(!z||!await(o.isElement==null?void 0:o.isElement(j)))&&(z=a.floating[A]||s.floating[g]);const F=I/2-M/2,q=z/2-p[g]/2-1,G=ao(u[w],q),Z=ao(u[E],q),oe=G,D=z-p[g]-Z,v=z/2-p[g]/2+F,C=lp(oe,v,D),P=!l.arrow&&ac(i)!=null&&v!=C&&s.reference[g]/2-(voe<=0)){var q,G;const oe=(((q=s.flip)==null?void 0:q.index)||0)+1,D=M[oe];if(D)return{data:{index:oe,overflows:F},reset:{placement:D}};let v=(G=F.filter(C=>C.overflows[0]<=0).sort((C,P)=>C.overflows[1]-P.overflows[1])[0])==null?void 0:G.placement;if(!v)switch(y){case"bestFit":{var Z;const C=(Z=F.map(P=>[P.placement,P.overflows.filter(O=>O>0).reduce((O,x)=>O+x,0)]).sort((P,O)=>P[1]-O[1])[0])==null?void 0:Z[0];C&&(v=C);break}case"initialPlacement":v=a;break}if(i!==v)return{reset:{placement:v}}}return{}}}};function Pw(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Iw(t){return kN.some(e=>t[e]>=0)}const $N=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...i}=ns(t,e);switch(n){case"referenceHidden":{const s=await qf(e,{...i,elementContext:"reference"}),o=Pw(s,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Iw(o)}}}case"escaped":{const s=await qf(e,{...i,altBoundary:!0}),o=Pw(s,r.floating);return{data:{escapedOffsets:o,escaped:Iw(o)}}}default:return{}}}}};async function DN(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=is(r),a=ac(r),l=lc(r)==="y",c=["left","top"].includes(o)?-1:1,f=s&&l?-1:1,u=ns(e,t);let{mainAxis:h,crossAxis:y,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&typeof g=="number"&&(y=a==="end"?g*-1:g),l?{x:y*f,y:h*c}:{x:h*c,y:y*f}}const BN=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,i=await DN(e,t);return{x:r+i.x,y:n+i.y,data:i}}}},LN=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:k=>{let{x:w,y:E}=k;return{x:w,y:E}}},...l}=ns(t,e),c={x:r,y:n},f=await qf(e,l),u=lc(is(i)),h=$m(u);let y=c[h],g=c[u];if(s){const k=h==="y"?"top":"left",w=h==="y"?"bottom":"right",E=y+f[k],A=y-f[w];y=lp(E,y,A)}if(o){const k=u==="y"?"top":"left",w=u==="y"?"bottom":"right",E=g+f[k],A=g-f[w];g=lp(E,g,A)}const p=a.fn({...e,[h]:y,[u]:g});return{...p,data:{x:p.x-r,y:p.y-n}}}}},jN=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=ns(t,e),f={x:r,y:n},u=lc(i),h=$m(u);let y=f[h],g=f[u];const p=ns(a,e),k=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const A=h==="y"?"height":"width",I=s.reference[h]-s.floating[A]+k.mainAxis,M=s.reference[h]+s.reference[A]-k.mainAxis;yM&&(y=M)}if(c){var w,E;const A=h==="y"?"width":"height",I=["top","left"].includes(is(i)),M=s.reference[u]-s.floating[A]+(I&&((w=o.offset)==null?void 0:w[u])||0)+(I?0:k.crossAxis),j=s.reference[u]+s.reference[A]+(I?0:((E=o.offset)==null?void 0:E[u])||0)-(I?k.crossAxis:0);gj&&(g=j)}return{[h]:y,[u]:g}}}},FN=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:i,elements:s}=e,{apply:o=()=>{},...a}=ns(t,e),l=await qf(e,a),c=is(r),f=ac(r),u=lc(r)==="y",{width:h,height:y}=n.floating;let g,p;c==="top"||c==="bottom"?(g=c,p=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(p=c,g=f==="end"?"top":"bottom");const k=y-l[g],w=h-l[p],E=!e.middlewareData.shift;let A=k,I=w;if(u){const j=h-l.left-l.right;I=f||E?ao(w,j):j}else{const j=y-l.top-l.bottom;A=f||E?ao(k,j):j}if(E&&!f){const j=hn(l.left,0),z=hn(l.right,0),F=hn(l.top,0),q=hn(l.bottom,0);u?I=h-2*(j!==0||z!==0?j+z:hn(l.left,l.right)):A=y-2*(F!==0||q!==0?F+q:hn(l.top,l.bottom))}await o({...e,availableWidth:I,availableHeight:A});const M=await i.getDimensions(s.floating);return h!==M.width||y!==M.height?{reset:{rects:!0}}:{}}}};function co(t){return pC(t)?(t.nodeName||"").toLowerCase():"#document"}function pn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function us(t){var e;return(e=(pC(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function pC(t){return t instanceof Node||t instanceof pn(t).Node}function ss(t){return t instanceof Element||t instanceof pn(t).Element}function Pi(t){return t instanceof HTMLElement||t instanceof pn(t).HTMLElement}function Rw(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof pn(t).ShadowRoot}function gu(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=$n(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function UN(t){return["table","td","th"].includes(co(t))}function Lm(t){const e=jm(),r=$n(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function zN(t){let e=Vl(t);for(;Pi(e)&&!jh(e);){if(Lm(e))return e;e=Vl(e)}return null}function jm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function jh(t){return["html","body","#document"].includes(co(t))}function $n(t){return pn(t).getComputedStyle(t)}function Fh(t){return ss(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Vl(t){if(co(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Rw(t)&&t.host||us(t);return Rw(e)?e.host:e}function gC(t){const e=Vl(t);return jh(e)?t.ownerDocument?t.ownerDocument.body:t.body:Pi(e)&&gu(e)?e:gC(e)}function Gf(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=gC(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=pn(i);return s?e.concat(o,o.visualViewport||[],gu(i)?i:[],o.frameElement&&r?Gf(o.frameElement):[]):e.concat(i,Gf(i,[],r))}function mC(t){const e=$n(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=Pi(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=R0(r)!==s||R0(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function Fm(t){return ss(t)?t:t.contextElement}function kl(t){const e=Fm(t);if(!Pi(e))return lo(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=mC(e);let o=(s?R0(r.width):r.width)/n,a=(s?R0(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const VN=lo(0);function xC(t){const e=pn(t);return!jm()||!e.visualViewport?VN:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function HN(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==pn(t)?!1:e}function ga(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=Fm(t);let o=lo(1);e&&(n?ss(n)&&(o=kl(n)):o=kl(t));const a=HN(s,r,n)?xC(s):lo(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,f=i.width/o.x,u=i.height/o.y;if(s){const h=pn(s),y=n&&ss(n)?pn(n):n;let g=h.frameElement;for(;g&&n&&y!==h;){const p=kl(g),k=g.getBoundingClientRect(),w=$n(g),E=k.left+(g.clientLeft+parseFloat(w.paddingLeft))*p.x,A=k.top+(g.clientTop+parseFloat(w.paddingTop))*p.y;l*=p.x,c*=p.y,f*=p.x,u*=p.y,l+=E,c+=A,g=pn(g).frameElement}}return O0({width:f,height:u,x:l,y:c})}function WN(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=Pi(r),s=us(r);if(r===s)return e;let o={scrollLeft:0,scrollTop:0},a=lo(1);const l=lo(0);if((i||!i&&n!=="fixed")&&((co(r)!=="body"||gu(s))&&(o=Fh(r)),Pi(r))){const c=ga(r);a=kl(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}}function qN(t){return Array.from(t.getClientRects())}function bC(t){return ga(us(t)).left+Fh(t).scrollLeft}function GN(t){const e=us(t),r=Fh(t),n=t.ownerDocument.body,i=hn(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=hn(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+bC(t);const a=-r.scrollTop;return $n(n).direction==="rtl"&&(o+=hn(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}function KN(t,e){const r=pn(t),n=us(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=jm();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function JN(t,e){const r=ga(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=Pi(t)?kl(t):lo(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,c=n*s.y;return{width:o,height:a,x:l,y:c}}function Mw(t,e,r){let n;if(e==="viewport")n=KN(t,r);else if(e==="document")n=GN(us(t));else if(ss(e))n=JN(e,r);else{const i=xC(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return O0(n)}function wC(t,e){const r=Vl(t);return r===e||!ss(r)||jh(r)?!1:$n(r).position==="fixed"||wC(r,e)}function YN(t,e){const r=e.get(t);if(r)return r;let n=Gf(t,[],!1).filter(a=>ss(a)&&co(a)!=="body"),i=null;const s=$n(t).position==="fixed";let o=s?Vl(t):t;for(;ss(o)&&!jh(o);){const a=$n(o),l=Lm(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||gu(o)&&!l&&wC(t,o))?n=n.filter(f=>f!==o):i=a,o=Vl(o)}return e.set(t,n),n}function QN(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?YN(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,f)=>{const u=Mw(e,f,i);return c.top=hn(u.top,c.top),c.right=ao(u.right,c.right),c.bottom=ao(u.bottom,c.bottom),c.left=hn(u.left,c.left),c},Mw(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function XN(t){return mC(t)}function ZN(t,e,r){const n=Pi(e),i=us(e),s=r==="fixed",o=ga(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=lo(0);if(n||!n&&!s)if((co(e)!=="body"||gu(i))&&(a=Fh(e)),n){const c=ga(e,!0,s,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else i&&(l.x=bC(i));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function Ow(t,e){return!Pi(t)||$n(t).position==="fixed"?null:e?e(t):t.offsetParent}function CC(t,e){const r=pn(t);if(!Pi(t))return r;let n=Ow(t,e);for(;n&&UN(n)&&$n(n).position==="static";)n=Ow(n,e);return n&&(co(n)==="html"||co(n)==="body"&&$n(n).position==="static"&&!Lm(n))?r:n||zN(t)||r}const e$=async function(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||CC,s=this.getDimensions;return{reference:ZN(e,await i(r),n),floating:{x:0,y:0,...await s(r)}}};function t$(t){return $n(t).direction==="rtl"}const r$={convertOffsetParentRelativeRectToViewportRelativeRect:WN,getDocumentElement:us,getClippingRect:QN,getOffsetParent:CC,getElementRects:e$,getClientRects:qN,getDimensions:XN,getScale:kl,isElement:ss,isRTL:t$};function n$(t,e){let r=null,n;const i=us(t);function s(){clearTimeout(n),r&&r.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:f,width:u,height:h}=t.getBoundingClientRect();if(a||e(),!u||!h)return;const y=Zu(f),g=Zu(i.clientWidth-(c+u)),p=Zu(i.clientHeight-(f+h)),k=Zu(c),E={rootMargin:-y+"px "+-g+"px "+-p+"px "+-k+"px",threshold:hn(0,ao(1,l))||1};let A=!0;function I(M){const j=M[0].intersectionRatio;if(j!==l){if(!A)return o();j?o(!1,j):n=setTimeout(()=>{o(!1,1e-7)},100)}A=!1}try{r=new IntersectionObserver(I,{...E,root:i.ownerDocument})}catch{r=new IntersectionObserver(I,E)}r.observe(t)}return o(!0),s}function i$(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Fm(t),f=i||s?[...c?Gf(c):[],...Gf(e)]:[];f.forEach(w=>{i&&w.addEventListener("scroll",r,{passive:!0}),s&&w.addEventListener("resize",r)});const u=c&&a?n$(c,r):null;let h=-1,y=null;o&&(y=new ResizeObserver(w=>{let[E]=w;E&&E.target===c&&y&&(y.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{y&&y.observe(e)})),r()}),c&&!l&&y.observe(c),y.observe(e));let g,p=l?ga(t):null;l&&k();function k(){const w=ga(t);p&&(w.x!==p.x||w.y!==p.y||w.width!==p.width||w.height!==p.height)&&r(),p=w,g=requestAnimationFrame(k)}return r(),()=>{f.forEach(w=>{i&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),u&&u(),y&&y.disconnect(),y=null,l&&cancelAnimationFrame(g)}}const s$=(t,e,r)=>{const n=new Map,i={platform:r$,...r},s={...i.platform,_c:n};return ON(t,e,{...i,platform:s})},o$=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:i}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?Tw({element:n.current,padding:i}).fn(r):{}:n?Tw({element:n,padding:i}).fn(r):{}}}};var Pd=typeof document<"u"?S.useLayoutEffect:S.useEffect;function N0(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!N0(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){const s=i[n];if(!(s==="_owner"&&t.$$typeof)&&!N0(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function EC(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Nw(t,e){const r=EC(t);return Math.round(e*r)/r}function $w(t){const e=S.useRef(t);return Pd(()=>{e.current=t}),e}function a$(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=S.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[h,y]=S.useState(n);N0(h,n)||y(n);const[g,p]=S.useState(null),[k,w]=S.useState(null),E=S.useCallback(P=>{P!=j.current&&(j.current=P,p(P))},[p]),A=S.useCallback(P=>{P!==z.current&&(z.current=P,w(P))},[w]),I=s||g,M=o||k,j=S.useRef(null),z=S.useRef(null),F=S.useRef(f),q=$w(l),G=$w(i),Z=S.useCallback(()=>{if(!j.current||!z.current)return;const P={placement:e,strategy:r,middleware:h};G.current&&(P.platform=G.current),s$(j.current,z.current,P).then(O=>{const x={...O,isPositioned:!0};oe.current&&!N0(F.current,x)&&(F.current=x,xo.flushSync(()=>{u(x)}))})},[h,e,r,G]);Pd(()=>{c===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,u(P=>({...P,isPositioned:!1})))},[c]);const oe=S.useRef(!1);Pd(()=>(oe.current=!0,()=>{oe.current=!1}),[]),Pd(()=>{if(I&&(j.current=I),M&&(z.current=M),I&&M){if(q.current)return q.current(I,M,Z);Z()}},[I,M,Z,q]);const D=S.useMemo(()=>({reference:j,floating:z,setReference:E,setFloating:A}),[E,A]),v=S.useMemo(()=>({reference:I,floating:M}),[I,M]),C=S.useMemo(()=>{const P={position:r,left:0,top:0};if(!v.floating)return P;const O=Nw(v.floating,f.x),x=Nw(v.floating,f.y);return a?{...P,transform:"translate("+O+"px, "+x+"px)",...EC(v.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:x}},[r,a,v.floating,f.x,f.y]);return S.useMemo(()=>({...f,update:Z,refs:D,elements:v,floatingStyles:C}),[f,Z,D,v,C])}const SC="Popper",[kC,cc]=Br(SC),[l$,AC]=kC(SC),c$=t=>{const{__scopePopper:e,children:r}=t,[n,i]=S.useState(null);return S.createElement(l$,{scope:e,anchor:n,onAnchorChange:i},r)},f$="PopperAnchor",u$=S.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...i}=t,s=AC(f$,r),o=S.useRef(null),a=Nt(e,o);return S.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:S.createElement(Be.div,Ce({},i,{ref:a}))}),_C="PopperContent",[d$,MY]=kC(_C),h$=S.forwardRef((t,e)=>{var r,n,i,s,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:h=0,align:y="center",alignOffset:g=0,arrowPadding:p=0,avoidCollisions:k=!0,collisionBoundary:w=[],collisionPadding:E=0,sticky:A="partial",hideWhenDetached:I=!1,updatePositionStrategy:M="optimized",onPlaced:j,...z}=t,F=AC(_C,f),[q,G]=S.useState(null),Z=Nt(e,ie=>G(ie)),[oe,D]=S.useState(null),v=Tm(oe),C=(r=v==null?void 0:v.width)!==null&&r!==void 0?r:0,P=(n=v==null?void 0:v.height)!==null&&n!==void 0?n:0,O=u+(y!=="center"?"-"+y:""),x=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},T=Array.isArray(w)?w:[w],R=T.length>0,b={padding:x,boundary:T.filter(v$),altBoundary:R},{refs:d,floatingStyles:_,placement:$,isPositioned:m,middlewareData:N}=a$({strategy:"fixed",placement:O,whileElementsMounted:(...ie)=>i$(...ie,{animationFrame:M==="always"}),elements:{reference:F.anchor},middleware:[BN({mainAxis:h+P,alignmentAxis:g}),k&&LN({mainAxis:!0,crossAxis:!1,limiter:A==="partial"?jN():void 0,...b}),k&&NN({...b}),FN({...b,apply:({elements:ie,rects:pe,availableWidth:ve,availableHeight:me})=>{const{width:He,height:Le}=pe.reference,je=ie.floating.style;je.setProperty("--radix-popper-available-width",`${ve}px`),je.setProperty("--radix-popper-available-height",`${me}px`),je.setProperty("--radix-popper-anchor-width",`${He}px`),je.setProperty("--radix-popper-anchor-height",`${Le}px`)}}),oe&&o$({element:oe,padding:p}),y$({arrowWidth:C,arrowHeight:P}),I&&$N({strategy:"referenceHidden",...b})]}),[B,U]=TC($),W=Nn(j);xn(()=>{m&&(W==null||W())},[m,W]);const ee=(i=N.arrow)===null||i===void 0?void 0:i.x,K=(s=N.arrow)===null||s===void 0?void 0:s.y,L=((o=N.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[ne,Y]=S.useState();return xn(()=>{q&&Y(window.getComputedStyle(q).zIndex)},[q]),S.createElement("div",{ref:d.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:m?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[(a=N.transformOrigin)===null||a===void 0?void 0:a.x,(l=N.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},S.createElement(d$,{scope:f,placedSide:B,onArrowChange:D,arrowX:ee,arrowY:K,shouldHideArrow:L},S.createElement(Be.div,Ce({"data-side":B,"data-align":U},z,{ref:Z,style:{...z.style,animation:m?void 0:"none",opacity:(c=N.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function v$(t){return t!==null}const y$=t=>({name:"transformOrigin",options:t,fn(e){var r,n,i,s,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,h=u?0:t.arrowWidth,y=u?0:t.arrowHeight,[g,p]=TC(a),k={start:"0%",center:"50%",end:"100%"}[p],w=((n=(i=c.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+h/2,E=((s=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&s!==void 0?s:0)+y/2;let A="",I="";return g==="bottom"?(A=u?k:`${w}px`,I=`${-y}px`):g==="top"?(A=u?k:`${w}px`,I=`${l.floating.height+y}px`):g==="right"?(A=`${-y}px`,I=u?k:`${E}px`):g==="left"&&(A=`${l.floating.width+y}px`,I=u?k:`${E}px`),{data:{x:A,y:I}}}});function TC(t){const[e,r="center"]=t.split("-");return[e,r]}const p$=c$,g$=u$,m$=h$,PC=S.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...i}=t;return n?FT.createPortal(S.createElement(Be.div,Ce({},i,{ref:e})),n):null}),bv="rovingFocusGroup.onEntryFocus",x$={bubbles:!1,cancelable:!0},Um="RovingFocusGroup",[fp,IC,b$]=Lh(Um),[w$,fc]=Br(Um,[b$]),[C$,E$]=w$(Um),S$=S.forwardRef((t,e)=>S.createElement(fp.Provider,{scope:t.__scopeRovingFocusGroup},S.createElement(fp.Slot,{scope:t.__scopeRovingFocusGroup},S.createElement(k$,Jt({},t,{ref:e}))))),k$=S.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,...f}=t,u=S.useRef(null),h=Nt(e,u),y=Om(s),[g=null,p]=pa({prop:o,defaultProp:a,onChange:l}),[k,w]=S.useState(!1),E=Nn(c),A=IC(r),I=S.useRef(!1),[M,j]=S.useState(0);return S.useEffect(()=>{const z=u.current;if(z)return z.addEventListener(bv,E),()=>z.removeEventListener(bv,E)},[E]),S.createElement(C$,{scope:r,orientation:n,dir:y,loop:i,currentTabStopId:g,onItemFocus:S.useCallback(z=>p(z),[p]),onItemShiftTab:S.useCallback(()=>w(!0),[]),onFocusableItemAdd:S.useCallback(()=>j(z=>z+1),[]),onFocusableItemRemove:S.useCallback(()=>j(z=>z-1),[])},S.createElement(Be.div,Jt({tabIndex:k||M===0?-1:0,"data-orientation":n},f,{ref:h,style:{outline:"none",...t.style},onMouseDown:be(t.onMouseDown,()=>{I.current=!0}),onFocus:be(t.onFocus,z=>{const F=!I.current;if(z.target===z.currentTarget&&F&&!k){const q=new CustomEvent(bv,x$);if(z.currentTarget.dispatchEvent(q),!q.defaultPrevented){const G=A().filter(C=>C.focusable),Z=G.find(C=>C.active),oe=G.find(C=>C.id===g),v=[Z,oe,...G].filter(Boolean).map(C=>C.ref.current);RC(v)}}I.current=!1}),onBlur:be(t.onBlur,()=>w(!1))})))}),A$="RovingFocusGroupItem",_$=S.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,...o}=t,a=Qs(),l=s||a,c=E$(A$,r),f=c.currentTabStopId===l,u=IC(r),{onFocusableItemAdd:h,onFocusableItemRemove:y}=c;return S.useEffect(()=>{if(n)return h(),()=>y()},[n,h,y]),S.createElement(fp.ItemSlot,{scope:r,id:l,focusable:n,active:i},S.createElement(Be.span,Jt({tabIndex:f?0:-1,"data-orientation":c.orientation},o,{ref:e,onMouseDown:be(t.onMouseDown,g=>{n?c.onItemFocus(l):g.preventDefault()}),onFocus:be(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:be(t.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){c.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const p=I$(g,c.orientation,c.dir);if(p!==void 0){g.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(p==="last")w.reverse();else if(p==="prev"||p==="next"){p==="prev"&&w.reverse();const E=w.indexOf(g.currentTarget);w=c.loop?R$(w,E+1):w.slice(E+1)}setTimeout(()=>RC(w))}})})))}),T$={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function P$(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function I$(t,e,r){const n=P$(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return T$[n]}function RC(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function R$(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const M$=S$,MC=_$;var O$=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Ba=new WeakMap,ed=new WeakMap,td={},wv=0,OC=function(t){return t&&(t.host||OC(t.parentNode))},N$=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=OC(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},$$=function(t,e,r,n){var i=N$(e,Array.isArray(t)?t:[t]);td[r]||(td[r]=new WeakMap);var s=td[r],o=[],a=new Set,l=new Set(i),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};i.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(h){if(a.has(h))f(h);else{var y=h.getAttribute(n),g=y!==null&&y!=="false",p=(Ba.get(h)||0)+1,k=(s.get(h)||0)+1;Ba.set(h,p),s.set(h,k),o.push(h),p===1&&g&&ed.set(h,!0),k===1&&h.setAttribute(r,"true"),g||h.setAttribute(n,"true")}})};return f(e),a.clear(),wv++,function(){o.forEach(function(u){var h=Ba.get(u)-1,y=s.get(u)-1;Ba.set(u,h),s.set(u,y),h||(ed.has(u)||u.removeAttribute(n),ed.delete(u)),y||u.removeAttribute(r)}),wv--,wv||(Ba=new WeakMap,Ba=new WeakMap,ed=new WeakMap,td={})}},NC=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=e||O$(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),$$(n,i,r,"aria-hidden")):function(){return null}},pi=function(){return pi=Object.assign||function(e){for(var r,n=1,i=arguments.length;n"u")return X$;var e=Z$(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},tD=LC(),rD=function(t,e,r,n){var i=t.left,s=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + .`.concat(B$,` { overflow: hidden `).concat(n,`; padding-right: `).concat(a,"px ").concat(n,`; } @@ -93,52 +93,52 @@ Error generating stack: `+s.message+` } body { - `).concat(B$,": ").concat(a,`px; + `).concat(L$,": ").concat(a,`px; } -`)},nD=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,s=S.useMemo(function(){return eD(i)},[i]);return S.createElement(tD,{styles:rD(s,!e,i,r?"":"!important")})},up=!1;if(typeof window<"u")try{var rd=Object.defineProperty({},"passive",{get:function(){return up=!0,!0}});window.addEventListener("test",rd,rd),window.removeEventListener("test",rd,rd)}catch{up=!1}var Ba=up?{passive:!1}:!1,iD=function(t){return t.tagName==="TEXTAREA"},jC=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!iD(t)&&r[e]==="visible")},sD=function(t){return jC(t,"overflowY")},oD=function(t){return jC(t,"overflowX")},Dw=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=FC(t,r);if(n){var i=UC(t,r),s=i[1],o=i[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},aD=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},lD=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},FC=function(t,e){return t==="v"?sD(e):oD(e)},UC=function(t,e){return t==="v"?aD(e):lD(e)},cD=function(t,e){return t==="h"&&e==="rtl"?-1:1},fD=function(t,e,r,n,i){var s=cD(t,window.getComputedStyle(e).direction),o=s*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,h=0;do{var y=UC(t,a),g=y[0],p=y[1],k=y[2],w=p-k-s*g;(g||w)&&FC(t,a)&&(u+=w,h+=g),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(i&&u===0||!i&&o>u)||!f&&(i&&h===0||!i&&-o>h))&&(c=!0),c},nd=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Lw=function(t){return[t.deltaX,t.deltaY]},Bw=function(t){return t&&"current"in t?t.current:t},uD=function(t,e){return t[0]===e[0]&&t[1]===e[1]},dD=function(t){return` +`)},nD=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,s=S.useMemo(function(){return eD(i)},[i]);return S.createElement(tD,{styles:rD(s,!e,i,r?"":"!important")})},up=!1;if(typeof window<"u")try{var rd=Object.defineProperty({},"passive",{get:function(){return up=!0,!0}});window.addEventListener("test",rd,rd),window.removeEventListener("test",rd,rd)}catch{up=!1}var La=up?{passive:!1}:!1,iD=function(t){return t.tagName==="TEXTAREA"},jC=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!iD(t)&&r[e]==="visible")},sD=function(t){return jC(t,"overflowY")},oD=function(t){return jC(t,"overflowX")},Dw=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=FC(t,r);if(n){var i=UC(t,r),s=i[1],o=i[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},aD=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},lD=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},FC=function(t,e){return t==="v"?sD(e):oD(e)},UC=function(t,e){return t==="v"?aD(e):lD(e)},cD=function(t,e){return t==="h"&&e==="rtl"?-1:1},fD=function(t,e,r,n,i){var s=cD(t,window.getComputedStyle(e).direction),o=s*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,h=0;do{var y=UC(t,a),g=y[0],p=y[1],k=y[2],w=p-k-s*g;(g||w)&&FC(t,a)&&(u+=w,h+=g),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(i&&u===0||!i&&o>u)||!f&&(i&&h===0||!i&&-o>h))&&(c=!0),c},nd=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Bw=function(t){return[t.deltaX,t.deltaY]},Lw=function(t){return t&&"current"in t?t.current:t},uD=function(t,e){return t[0]===e[0]&&t[1]===e[1]},dD=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},hD=0,ja=[];function vD(t){var e=S.useRef([]),r=S.useRef([0,0]),n=S.useRef(),i=S.useState(hD++)[0],s=S.useState(function(){return BC()})[0],o=S.useRef(t);S.useEffect(function(){o.current=t},[t]),S.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var p=D$([t.lockRef.current],(t.shards||[]).map(Bw),!0).filter(Boolean);return p.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),p.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=S.useCallback(function(p,k){if("touches"in p&&p.touches.length===2)return!o.current.allowPinchZoom;var w=nd(p),E=r.current,A="deltaX"in p?p.deltaX:E[0]-w[0],I="deltaY"in p?p.deltaY:E[1]-w[1],M,B=p.target,z=Math.abs(A)>Math.abs(I)?"h":"v";if("touches"in p&&z==="h"&&B.type==="range")return!1;var F=Dw(z,B);if(!F)return!0;if(F?M=z:(M=z==="v"?"h":"v",F=Dw(z,B)),!F)return!1;if(!n.current&&"changedTouches"in p&&(A||I)&&(n.current=M),!M)return!0;var K=n.current||M;return fD(K,k,p,K==="h"?A:I,!0)},[]),l=S.useCallback(function(p){var k=p;if(!(!ja.length||ja[ja.length-1]!==s)){var w="deltaY"in k?Lw(k):nd(k),E=e.current.filter(function(M){return M.name===k.type&&M.target===k.target&&uD(M.delta,w)})[0];if(E&&E.should){k.cancelable&&k.preventDefault();return}if(!E){var A=(o.current.shards||[]).map(Bw).filter(Boolean).filter(function(M){return M.contains(k.target)}),I=A.length>0?a(k,A[0]):!o.current.noIsolation;I&&k.cancelable&&k.preventDefault()}}},[]),c=S.useCallback(function(p,k,w,E){var A={name:p,delta:k,target:w,should:E};e.current.push(A),setTimeout(function(){e.current=e.current.filter(function(I){return I!==A})},1)},[]),f=S.useCallback(function(p){r.current=nd(p),n.current=void 0},[]),u=S.useCallback(function(p){c(p.type,Lw(p),p.target,a(p,t.lockRef.current))},[]),h=S.useCallback(function(p){c(p.type,nd(p),p.target,a(p,t.lockRef.current))},[]);S.useEffect(function(){return ja.push(s),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Ba),document.addEventListener("touchmove",l,Ba),document.addEventListener("touchstart",f,Ba),function(){ja=ja.filter(function(p){return p!==s}),document.removeEventListener("wheel",l,Ba),document.removeEventListener("touchmove",l,Ba),document.removeEventListener("touchstart",f,Ba)}},[]);var y=t.removeScrollBar,g=t.inert;return S.createElement(S.Fragment,null,g?S.createElement(s,{styles:dD(i)}):null,y?S.createElement(nD,{gapMode:"margin"}):null)}const yD=W$(LC,vD);var zC=S.forwardRef(function(t,e){return S.createElement(Uh,pi({},t,{ref:e,sideCar:yD}))});zC.classNames=Uh.classNames;const VC=zC,pD=["Enter"," "],zh="Menu",[gD,OY,mD]=Bh(zh),[Ta,HC]=Lr(zh,[mD,cc,fc]);cc();const xD=fc();Ta(zh);const[NY,bD]=Ta(zh),wD="MenuPortal";Ta(wD,{forceMount:void 0});const CD="MenuContent",[$Y,WC]=Ta(CD),dp="MenuItem",jw="menu.itemSelect",qC=S.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...i}=t,s=S.useRef(null),o=bD(dp,t.__scopeMenu),a=WC(dp,t.__scopeMenu),l=Ot(e,s),c=S.useRef(!1),f=()=>{const u=s.current;if(!r&&u){const h=new CustomEvent(jw,{bubbles:!0,cancelable:!0});u.addEventListener(jw,y=>n==null?void 0:n(y),{once:!0}),Pm(u,h),h.defaultPrevented?c.current=!1:o.onClose()}};return S.createElement(ED,xe({},i,{ref:l,disabled:r,onClick:ge(t.onClick,f),onPointerDown:u=>{var h;(h=t.onPointerDown)===null||h===void 0||h.call(t,u),c.current=!0},onPointerUp:ge(t.onPointerUp,u=>{var h;c.current||(h=u.currentTarget)===null||h===void 0||h.click()}),onKeyDown:ge(t.onKeyDown,u=>{const h=a.searchRef.current!=="";r||h&&u.key===" "||pD.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),ED=S.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...s}=t,o=WC(dp,r),a=xD(r),l=S.useRef(null),c=Ot(e,l),[f,u]=S.useState(!1),[h,y]=S.useState("");return S.useEffect(()=>{const g=l.current;if(g){var p;y(((p=g.textContent)!==null&&p!==void 0?p:"").trim())}},[s.children]),S.createElement(gD.ItemSlot,{scope:r,disabled:n,textValue:i??h},S.createElement(MC,xe({asChild:!0},a,{focusable:!n}),S.createElement(De.div,xe({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},s,{ref:c,onPointerMove:ge(t.onPointerMove,Fw(g=>{n?o.onItemLeave(g):(o.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus())})),onPointerLeave:ge(t.onPointerLeave,Fw(g=>o.onItemLeave(g))),onFocus:ge(t.onFocus,()=>u(!0)),onBlur:ge(t.onBlur,()=>u(!1))}))))}),SD=S.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...i}=t;return S.createElement(KC,{scope:t.__scopeMenu,checked:r},S.createElement(qC,xe({role:"menuitemcheckbox","aria-checked":$0(r)?"mixed":r},i,{ref:e,"data-state":zm(r),onSelect:ge(i.onSelect,()=>n==null?void 0:n($0(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),kD="MenuRadioGroup",[DY,AD]=Ta(kD,{value:void 0,onValueChange:()=>{}}),_D="MenuRadioItem",TD=S.forwardRef((t,e)=>{const{value:r,...n}=t,i=AD(_D,t.__scopeMenu),s=r===i.value;return S.createElement(KC,{scope:t.__scopeMenu,checked:s},S.createElement(qC,xe({role:"menuitemradio","aria-checked":s},n,{ref:e,"data-state":zm(s),onSelect:ge(n.onSelect,()=>{var o;return(o=i.onValueChange)===null||o===void 0?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})))}),GC="MenuItemIndicator",[KC,PD]=Ta(GC,{checked:!1}),ID=S.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...i}=t,s=PD(GC,r);return S.createElement(bo,{present:n||$0(s.checked)||s.checked===!0},S.createElement(De.span,xe({},i,{ref:e,"data-state":zm(s.checked)})))}),RD="MenuSub";Ta(RD);function $0(t){return t==="indeterminate"}function zm(t){return $0(t)?"indeterminate":t?"checked":"unchecked"}function Fw(t){return e=>e.pointerType==="mouse"?t(e):void 0}const MD=SD,OD=TD,ND=ID,JC="DropdownMenu",[$D,LY]=Lr(JC,[HC]),Vm=HC();$D(JC);const DD=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=Vm(r);return S.createElement(MD,xe({},i,n,{ref:e}))}),LD=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=Vm(r);return S.createElement(OD,xe({},i,n,{ref:e}))}),BD=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=Vm(r);return S.createElement(ND,xe({},i,n,{ref:e}))}),jD=DD,FD=LD,YC=BD;var QC="_1k2mbvi5",XC="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12wk fyvr12we fyvr11h0 fyvr11ko fyvr11jw fyvr12uz fyvr11n2 fyvr11hw fyvr12rz";const UD=({children:t})=>Y.jsx(YC,{className:QC,children:t});S.forwardRef(({className:t,children:e,...r},n)=>Y.jsxs(jD,{className:cn(XC,t),...r,ref:n,children:[Y.jsx(UD,{children:Y.jsx(aC,{size:"xs"})}),Y.jsx(Wt,{variant:"small",children:e})]}));S.forwardRef(({className:t,children:e,...r},n)=>Y.jsxs(FD,{className:cn(XC,t),...r,ref:n,children:[Y.jsx(YC,{className:QC,children:Y.jsx(Wt,{children:"•"})}),Y.jsx(Wt,{variant:"small",children:e})]}));const Hm=S.forwardRef((t,e)=>{const{icon:r,size:n="md",...i}=t;return Y.jsx(Ge,{leftIcon:r,size:n,flexShrink:"0",ref:e,...i})}),zD=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var VD="fyvr12wh fyvr12wb fyvr11ho fyvr12vb fyvr1ko fyvr1oo fyvr1mo fyvr1qo",HD="_1hq71vk1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12n5 fyvr12ft fyvr1215 fyvr128h fyvr12nn fyvr12gb fyvr121n fyvr128z fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",WD=zt({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const qD={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};S.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:i=!1,id:s,label:o="",labelLocation:a="hidden",name:l,onValueChange:c,placeholder:f="Upload a file",validExtensions:u,...h}=t,y=S.useRef(null),g=zD(y,e),[p,k]=S.useState(null),w=A=>{const I=A.currentTarget.files;if(!I||!I[0])return;const M=I[0],B=M.name,z=M.size/1e3;k({name:B,size:z,extension:B.split(".").pop()??""}),c==null||c(M)},E=u.map(A=>qD[A]).join(",");return Y.jsx(sc,{description:n,disabled:i,display:"grid",id:s??l,label:o,labelLocation:a,children:Y.jsxs(ue,{width:"full",minWidth:"0",justifyContent:p?"space-between":"flex-start",gap:"2",color:p?"text100":"text50",className:cn(HD,WD({borderRadius:r})),children:[p?Y.jsxs(ue,{flexDirection:"row",gap:"2",alignItems:"center",minWidth:"0",children:[Y.jsx(Wt,{ellipsis:!0,children:p.name}),Y.jsxs(Wt,{color:"text50",variant:"xsmall",whiteSpace:"nowrap",children:[p.size.toFixed(2)," kb"]})]}):Y.jsx(Wt,{ellipsis:!0,children:f}),Y.jsx(ue,{accept:E,as:"input",className:VD,cursor:"pointer",disabled:i,id:s??l,name:l,onChange:w,ref:g,type:"file",...h}),p&&Y.jsx(Hm,{cursor:"pointer",icon:Im,size:"xs",onClick:A=>{var I;A.preventDefault(),A.stopPropagation(),(I=y.current)!=null&&I.value&&(y.current.value=""),c==null||c(null),k(null)},zIndex:"10"})]})})});var GD=zt({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const hp=1e3,Al=64,Sv=Al/2,kv=(t,e=hp)=>t%e/(hp/Al),Wo=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let i=0,s;i>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},KD=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),i=t%360,s=(t+120)%360,o=r%360;return{id:Wo(n),a:`hsl(${i}deg 100% 40%)`,b:`hsl(${s}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},JD=(t,e)=>{const r=[];for(let n=0;n{const s=Al/10+kv(n.r,hp*1.5/(i+1));return{...KD(n.a,n.b,n.c),x:kv(n.x),y:kv(n.y),r:s}})};S.memo(t=>{const{className:e,address:r,size:n="md",complexity:i=1,...s}=t,o=JD(r,i);return Y.jsxs(ue,{as:"svg",className:cn(e,GD({size:n})),viewBox:`0 0 ${Al} ${Al}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...s,children:[Y.jsxs("defs",{children:[Y.jsx("clipPath",{id:"circle-clip",children:Y.jsx("circle",{cx:Sv,cy:Sv,r:Sv})}),Y.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[Y.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Y.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),Y.jsx("feGaussianBlur",{stdDeviation:Al/10,result:"effect1_foregroundBlur"})]}),Y.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[Y.jsx("stop",{offset:"0",stopColor:o[0].c}),Y.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>Y.jsxs(S.Fragment,{children:[Y.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[Y.jsx("stop",{offset:"0",stopColor:a.a}),Y.jsx("stop",{offset:"1",stopColor:a.b})]}),Y.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[Y.jsx("stop",{offset:"0",stopColor:a.c}),Y.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),Y.jsxs("g",{clipPath:"url(#circle-clip)",children:[Y.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),Y.jsx("g",{filter:"url(#blur)",children:o.map(a=>Y.jsxs(S.Fragment,{children:[Y.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),Y.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})});const ZC=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[i,s]=S.useState(!1),o=a=>{s(!0),r==null||r(a)};return Y.jsx(ue,{as:Sl.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:i?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},eE="Dialog",[tE,BY]=Lr(eE),[YD,wo]=tE(eE),QD=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:o=!0}=t,a=S.useRef(null),l=S.useRef(null),[c=!1,f]=pa({prop:n,defaultProp:i,onChange:s});return S.createElement(YD,{scope:e,triggerRef:a,contentRef:l,contentId:Qs(),titleId:Qs(),descriptionId:Qs(),open:c,onOpenChange:f,onOpenToggle:S.useCallback(()=>f(u=>!u),[f]),modal:o},r)},rE="DialogPortal",[XD,nE]=tE(rE,{forceMount:void 0}),ZD=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:i}=t,s=wo(rE,e);return S.createElement(XD,{scope:e,forceMount:r},S.Children.map(n,o=>S.createElement(bo,{present:r||s.open},S.createElement(PC,{asChild:!0,container:i},o))))},vp="DialogOverlay",eL=S.forwardRef((t,e)=>{const r=nE(vp,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=wo(vp,t.__scopeDialog);return s.modal?S.createElement(bo,{present:n||s.open},S.createElement(tL,xe({},i,{ref:e}))):null}),tL=S.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=wo(vp,r);return S.createElement(VC,{as:zl,allowPinchZoom:!0,shards:[i.contentRef]},S.createElement(De.div,xe({"data-state":sE(i.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),Kf="DialogContent",rL=S.forwardRef((t,e)=>{const r=nE(Kf,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=wo(Kf,t.__scopeDialog);return S.createElement(bo,{present:n||s.open},s.modal?S.createElement(nL,xe({},i,{ref:e})):S.createElement(iL,xe({},i,{ref:e})))}),nL=S.forwardRef((t,e)=>{const r=wo(Kf,t.__scopeDialog),n=S.useRef(null),i=Ot(e,r.contentRef,n);return S.useEffect(()=>{const s=n.current;if(s)return NC(s)},[]),S.createElement(iE,xe({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ge(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=r.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:ge(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:ge(t.onFocusOutside,s=>s.preventDefault())}))}),iL=S.forwardRef((t,e)=>{const r=wo(Kf,t.__scopeDialog),n=S.useRef(!1),i=S.useRef(!1);return S.createElement(iE,xe({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,s),!s.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),s.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:s=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=s.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}}))}),iE=S.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=t,a=wo(Kf,r),l=S.useRef(null),c=Ot(e,l);return dC(),S.createElement(S.Fragment,null,S.createElement(hC,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s},S.createElement(Nm,xe({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":sE(a.open)},o,{ref:c,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),sL="DialogClose",oL=S.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=wo(sL,r);return S.createElement(De.button,xe({type:"button"},n,{ref:e,onClick:ge(t.onClick,()=>i.onOpenChange(!1))}))});function sE(t){return t?"open":"closed"}const aL=QD,lL=ZD,cL=eL,fL=rL,uL=oL;var dL=zt({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]}),hL=zt({defaultClassName:"_1vqx0w91 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]});const vL=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:i,...s}=t;return Y.jsx(ue,{className:dL({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...s,children:Y.jsx(ue,{className:hL({direction:n}),background:"backgroundPrimary",...i,children:e})})};function yL(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function pL(t,e){var r=t;for(var n of e){if(!(n in r))throw new Error("Path ".concat(e.join(" -> ")," does not exist in object"));r=r[n]}return r}function oE(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=t.constructor();for(var i in t){var s=t[i],o=[...r,i];typeof s=="string"||typeof s=="number"||s==null?n[i]=e(s,o):typeof s=="object"&&!Array.isArray(s)?n[i]=oE(s,e,o):console.warn('Skipping invalid key "'.concat(o.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(s)?"Array":typeof s,'"'))}return n}function Uw(t,e,r){t.style.setProperty(yL(e),r)}function zw(t,e,r){if(typeof r=="object"){var n=e;oE(r,(a,l)=>{a!=null&&Uw(t,pL(n,l),String(a))})}else{var i=e;for(var s in i){var o=i[s];o!=null&&Uw(t,s,i[s])}}}const Wm=["dark","light"],gL="dark",mL="data-theme",Vw="@sequence.theme",xL=t=>Wm.includes(t),bL=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),aE=t=>t?`${Vw}.${t}`:Vw,wL=t=>{const e=localStorage.getItem(aE(t));return e&&Wm.includes(e)?e:gL},lE=S.createContext(null),CL=t=>{const[e,r]=S.useState(t.theme||wL(t.scope));S.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),S.useEffect(()=>{t.theme&&r(t.theme)},[t.theme]),S.useEffect(()=>{const i=document.querySelector(t.root||":root");i&&(xL(e)?(i.setAttribute(mL,e),zw(i,dw,{colors:ZM[e]})):bL(e)&&zw(i,dw,{colors:e}))},[e,t.root]);const n=S.useMemo(()=>({theme:e,root:t.root,setTheme:i=>{Wm.includes(i)&&(localStorage.setItem(aE(t.scope),i),r(i))}}),[e,t.root,t.scope]);return Y.jsx(lE.Provider,{value:n,children:t.children})},EL=()=>{const t=S.useContext(lE);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t};var SL="fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11ni",kL=zt({defaultClassName:"_5b32m95 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12wk fyvr12we fyvr11h0 fyvr11i4 fyvr11hs fyvr11sb fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]}),AL="fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",_L="fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11ni fyvr1ko fyvr1oo fyvr1qo fyvr1mo";const TL=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:i=!1,isDismissible:s=!0,onClose:o,scroll:a=!0,size:l="lg",overlayProps:c,contentProps:f}=t,{root:u}=EL(),h=document.querySelector(u||"body");return Y.jsx(aL,{modal:!0,defaultOpen:!0,onOpenChange:o,children:Y.jsx(lL,{forceMount:!0,container:h,children:Y.jsxs(ue,{className:_L,children:[Y.jsx(ue,{as:cL,asChild:!0,background:r,className:AL,forceMount:!0,children:Y.jsx(Sl.div,{initial:i?!1:{opacity:0},animate:i?!1:{opacity:1},exit:i?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...c},"modal-overlay")}),Y.jsx(fL,{asChild:!0,className:kL({autoHeight:e,size:l}),forceMount:!0,onEscapeKeyDown:y=>{s?o==null||o():y.preventDefault()},onInteractOutside:y=>{s||y.preventDefault()},children:Y.jsxs(Sl.div,{initial:i?!1:{y:"100%",opacity:l==="sm"?0:1},animate:i?!1:{y:0,opacity:1},exit:i?void 0:{y:"100%",opacity:l==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...f,children:[a?Y.jsx(vL,{children:n}):n,s&&Y.jsx(uL,{asChild:!0,children:Y.jsx(Hm,{icon:Im,backdropFilter:"blur",size:"xs",className:SL,"aria-label":"Close"})})]},"modal-content")})]})})})};var PL=zt({defaultClassName:"_1acm19ya fyvr1t4 fyvr1v0 fyvr12wh fyvr12wb fyvr11gw fyvr128 fyvr15o",variantClassNames:{numeric:{false:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"_1qxj1ib9 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]}),IL="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12rt fyvr1g0 fyvr118g",RL=zt({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const qm=S.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",leftIcon:f,rightIcon:u,name:h,controls:y,type:g="text",numeric:p=!1,...k}=t;return Y.jsx(sc,{description:s,disabled:o,display:"grid",id:a??h,label:l,labelLocation:c,children:Y.jsx(ue,{width:"full",children:Y.jsxs(ue,{className:cn(IL,RL({borderRadius:i})),children:[f&&Y.jsx(f,{size:"sm"}),Y.jsx(ue,{as:r,autoComplete:n,spellCheck:"false",className:PL({numeric:p}),disabled:o,id:a??h,name:h,ref:e,type:g,...k}),u&&Y.jsx(u,{size:"sm"}),y]})})})}),ML=RegExp("^\\d*(?:\\\\[.])?\\d*$");function OL(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}S.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:i,onBlur:s,...o}=t,a=c=>{let{value:f}=c.target;f=f.replace(/,/g,"."),f.startsWith(".")&&(f="0"+f),f.startsWith("0")&&(f=f.replace(/^0+(?=\d)/,"")),(f===""||ML.test(OL(f)))&&(i==null||i({...c,target:{...c.target,value:f}}))},l=c=>{const{value:f}=c.target;let u=f;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),s==null||s(c),u!==f&&(i==null||i({...c,target:{...c.target,value:u}}))};return Y.jsx(qm,{name:r,onChange:a,onBlur:l,inputMode:"decimal",autoComplete:"off",autoCorrect:"off",type:"text",pattern:"^[0-9]*[.,]?[0-9]*$",placeholder:n||"0",minLength:1,maxLength:79,spellCheck:"false",numeric:!0,ref:e,...o})});zt({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const cE="Progress",Vh=100,[NL,jY]=Lr(cE),[$L,FY]=NL(cE),DL=S.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:i,getValueLabel:s=LL,...o}=t,a=yp(i)?i:Vh,l=fE(n,a)?n:null,c=D0(l)?s(l,a):void 0;return S.createElement($L,{scope:r,value:l,max:a},S.createElement(De.div,Jt({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":D0(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":BL(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});DL.propTypes={max(t,e,r){const n=t[e],i=String(n);return n&&!yp(n)?new Error(jL(i,r)):null},value(t,e,r){const n=t[e],i=String(n),s=yp(t.max)?t.max:Vh;return n!=null&&!fE(n,s)?new Error(FL(i,r)):null}};function LL(t,e){return`${Math.round(t/e*100)}%`}function BL(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function D0(t){return typeof t=="number"}function yp(t){return D0(t)&&!isNaN(t)&&t>0}function fE(t,e){return D0(t)&&!isNaN(t)&&t<=e&&t>=0}function jL(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Vh}\`.`}function FL(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: +`)},hD=0,ja=[];function vD(t){var e=S.useRef([]),r=S.useRef([0,0]),n=S.useRef(),i=S.useState(hD++)[0],s=S.useState(function(){return LC()})[0],o=S.useRef(t);S.useEffect(function(){o.current=t},[t]),S.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var p=D$([t.lockRef.current],(t.shards||[]).map(Lw),!0).filter(Boolean);return p.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),p.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=S.useCallback(function(p,k){if("touches"in p&&p.touches.length===2)return!o.current.allowPinchZoom;var w=nd(p),E=r.current,A="deltaX"in p?p.deltaX:E[0]-w[0],I="deltaY"in p?p.deltaY:E[1]-w[1],M,j=p.target,z=Math.abs(A)>Math.abs(I)?"h":"v";if("touches"in p&&z==="h"&&j.type==="range")return!1;var F=Dw(z,j);if(!F)return!0;if(F?M=z:(M=z==="v"?"h":"v",F=Dw(z,j)),!F)return!1;if(!n.current&&"changedTouches"in p&&(A||I)&&(n.current=M),!M)return!0;var q=n.current||M;return fD(q,k,p,q==="h"?A:I,!0)},[]),l=S.useCallback(function(p){var k=p;if(!(!ja.length||ja[ja.length-1]!==s)){var w="deltaY"in k?Bw(k):nd(k),E=e.current.filter(function(M){return M.name===k.type&&M.target===k.target&&uD(M.delta,w)})[0];if(E&&E.should){k.cancelable&&k.preventDefault();return}if(!E){var A=(o.current.shards||[]).map(Lw).filter(Boolean).filter(function(M){return M.contains(k.target)}),I=A.length>0?a(k,A[0]):!o.current.noIsolation;I&&k.cancelable&&k.preventDefault()}}},[]),c=S.useCallback(function(p,k,w,E){var A={name:p,delta:k,target:w,should:E};e.current.push(A),setTimeout(function(){e.current=e.current.filter(function(I){return I!==A})},1)},[]),f=S.useCallback(function(p){r.current=nd(p),n.current=void 0},[]),u=S.useCallback(function(p){c(p.type,Bw(p),p.target,a(p,t.lockRef.current))},[]),h=S.useCallback(function(p){c(p.type,nd(p),p.target,a(p,t.lockRef.current))},[]);S.useEffect(function(){return ja.push(s),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:h}),document.addEventListener("wheel",l,La),document.addEventListener("touchmove",l,La),document.addEventListener("touchstart",f,La),function(){ja=ja.filter(function(p){return p!==s}),document.removeEventListener("wheel",l,La),document.removeEventListener("touchmove",l,La),document.removeEventListener("touchstart",f,La)}},[]);var y=t.removeScrollBar,g=t.inert;return S.createElement(S.Fragment,null,g?S.createElement(s,{styles:dD(i)}):null,y?S.createElement(nD,{gapMode:"margin"}):null)}const yD=W$(BC,vD);var zC=S.forwardRef(function(t,e){return S.createElement(Uh,pi({},t,{ref:e,sideCar:yD}))});zC.classNames=Uh.classNames;const VC=zC,pD=["Enter"," "],zh="Menu",[gD,OY,mD]=Lh(zh),[Ta,HC]=Br(zh,[mD,cc,fc]);cc();const xD=fc();Ta(zh);const[NY,bD]=Ta(zh),wD="MenuPortal";Ta(wD,{forceMount:void 0});const CD="MenuContent",[$Y,WC]=Ta(CD),dp="MenuItem",jw="menu.itemSelect",qC=S.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...i}=t,s=S.useRef(null),o=bD(dp,t.__scopeMenu),a=WC(dp,t.__scopeMenu),l=Nt(e,s),c=S.useRef(!1),f=()=>{const u=s.current;if(!r&&u){const h=new CustomEvent(jw,{bubbles:!0,cancelable:!0});u.addEventListener(jw,y=>n==null?void 0:n(y),{once:!0}),Pm(u,h),h.defaultPrevented?c.current=!1:o.onClose()}};return S.createElement(ED,Ce({},i,{ref:l,disabled:r,onClick:be(t.onClick,f),onPointerDown:u=>{var h;(h=t.onPointerDown)===null||h===void 0||h.call(t,u),c.current=!0},onPointerUp:be(t.onPointerUp,u=>{var h;c.current||(h=u.currentTarget)===null||h===void 0||h.click()}),onKeyDown:be(t.onKeyDown,u=>{const h=a.searchRef.current!=="";r||h&&u.key===" "||pD.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),ED=S.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...s}=t,o=WC(dp,r),a=xD(r),l=S.useRef(null),c=Nt(e,l),[f,u]=S.useState(!1),[h,y]=S.useState("");return S.useEffect(()=>{const g=l.current;if(g){var p;y(((p=g.textContent)!==null&&p!==void 0?p:"").trim())}},[s.children]),S.createElement(gD.ItemSlot,{scope:r,disabled:n,textValue:i??h},S.createElement(MC,Ce({asChild:!0},a,{focusable:!n}),S.createElement(Be.div,Ce({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},s,{ref:c,onPointerMove:be(t.onPointerMove,Fw(g=>{n?o.onItemLeave(g):(o.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus())})),onPointerLeave:be(t.onPointerLeave,Fw(g=>o.onItemLeave(g))),onFocus:be(t.onFocus,()=>u(!0)),onBlur:be(t.onBlur,()=>u(!1))}))))}),SD=S.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...i}=t;return S.createElement(KC,{scope:t.__scopeMenu,checked:r},S.createElement(qC,Ce({role:"menuitemcheckbox","aria-checked":$0(r)?"mixed":r},i,{ref:e,"data-state":zm(r),onSelect:be(i.onSelect,()=>n==null?void 0:n($0(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),kD="MenuRadioGroup",[DY,AD]=Ta(kD,{value:void 0,onValueChange:()=>{}}),_D="MenuRadioItem",TD=S.forwardRef((t,e)=>{const{value:r,...n}=t,i=AD(_D,t.__scopeMenu),s=r===i.value;return S.createElement(KC,{scope:t.__scopeMenu,checked:s},S.createElement(qC,Ce({role:"menuitemradio","aria-checked":s},n,{ref:e,"data-state":zm(s),onSelect:be(n.onSelect,()=>{var o;return(o=i.onValueChange)===null||o===void 0?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})))}),GC="MenuItemIndicator",[KC,PD]=Ta(GC,{checked:!1}),ID=S.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...i}=t,s=PD(GC,r);return S.createElement(bo,{present:n||$0(s.checked)||s.checked===!0},S.createElement(Be.span,Ce({},i,{ref:e,"data-state":zm(s.checked)})))}),RD="MenuSub";Ta(RD);function $0(t){return t==="indeterminate"}function zm(t){return $0(t)?"indeterminate":t?"checked":"unchecked"}function Fw(t){return e=>e.pointerType==="mouse"?t(e):void 0}const MD=SD,OD=TD,ND=ID,JC="DropdownMenu",[$D,BY]=Br(JC,[HC]),Vm=HC();$D(JC);const DD=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=Vm(r);return S.createElement(MD,Ce({},i,n,{ref:e}))}),BD=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=Vm(r);return S.createElement(OD,Ce({},i,n,{ref:e}))}),LD=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=Vm(r);return S.createElement(ND,Ce({},i,n,{ref:e}))}),jD=DD,FD=BD,YC=LD;var QC="_1k2mbvi5",XC="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12wk fyvr12we fyvr11h0 fyvr11ko fyvr11jw fyvr12uz fyvr11n2 fyvr11hw fyvr12rz";const UD=({children:t})=>J.jsx(YC,{className:QC,children:t});S.forwardRef(({className:t,children:e,...r},n)=>J.jsxs(jD,{className:cn(XC,t),...r,ref:n,children:[J.jsx(UD,{children:J.jsx(aC,{size:"xs"})}),J.jsx(Wt,{variant:"small",children:e})]}));S.forwardRef(({className:t,children:e,...r},n)=>J.jsxs(FD,{className:cn(XC,t),...r,ref:n,children:[J.jsx(YC,{className:QC,children:J.jsx(Wt,{children:"•"})}),J.jsx(Wt,{variant:"small",children:e})]}));const Hm=S.forwardRef((t,e)=>{const{icon:r,size:n="md",...i}=t;return J.jsx(ze,{leftIcon:r,size:n,flexShrink:"0",ref:e,...i})}),zD=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var VD="fyvr12wh fyvr12wb fyvr11ho fyvr12vb fyvr1ko fyvr1oo fyvr1mo fyvr1qo",HD="_1hq71vk1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12n5 fyvr12ft fyvr1215 fyvr128h fyvr12nn fyvr12gb fyvr121n fyvr128z fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",WD=zt({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const qD={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};S.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:i=!1,id:s,label:o="",labelLocation:a="hidden",name:l,onValueChange:c,placeholder:f="Upload a file",validExtensions:u,...h}=t,y=S.useRef(null),g=zD(y,e),[p,k]=S.useState(null),w=A=>{const I=A.currentTarget.files;if(!I||!I[0])return;const M=I[0],j=M.name,z=M.size/1e3;k({name:j,size:z,extension:j.split(".").pop()??""}),c==null||c(M)},E=u.map(A=>qD[A]).join(",");return J.jsx(sc,{description:n,disabled:i,display:"grid",id:s??l,label:o,labelLocation:a,children:J.jsxs(ue,{width:"full",minWidth:"0",justifyContent:p?"space-between":"flex-start",gap:"2",color:p?"text100":"text50",className:cn(HD,WD({borderRadius:r})),children:[p?J.jsxs(ue,{flexDirection:"row",gap:"2",alignItems:"center",minWidth:"0",children:[J.jsx(Wt,{ellipsis:!0,children:p.name}),J.jsxs(Wt,{color:"text50",variant:"xsmall",whiteSpace:"nowrap",children:[p.size.toFixed(2)," kb"]})]}):J.jsx(Wt,{ellipsis:!0,children:f}),J.jsx(ue,{accept:E,as:"input",className:VD,cursor:"pointer",disabled:i,id:s??l,name:l,onChange:w,ref:g,type:"file",...h}),p&&J.jsx(Hm,{cursor:"pointer",icon:Im,size:"xs",onClick:A=>{var I;A.preventDefault(),A.stopPropagation(),(I=y.current)!=null&&I.value&&(y.current.value=""),c==null||c(null),k(null)},zIndex:"10"})]})})});var GD=zt({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const hp=1e3,Al=64,Sv=Al/2,kv=(t,e=hp)=>t%e/(hp/Al),Wo=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let i=0,s;i>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},KD=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),i=t%360,s=(t+120)%360,o=r%360;return{id:Wo(n),a:`hsl(${i}deg 100% 40%)`,b:`hsl(${s}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},JD=(t,e)=>{const r=[];for(let n=0;n{const s=Al/10+kv(n.r,hp*1.5/(i+1));return{...KD(n.a,n.b,n.c),x:kv(n.x),y:kv(n.y),r:s}})};S.memo(t=>{const{className:e,address:r,size:n="md",complexity:i=1,...s}=t,o=JD(r,i);return J.jsxs(ue,{as:"svg",className:cn(e,GD({size:n})),viewBox:`0 0 ${Al} ${Al}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...s,children:[J.jsxs("defs",{children:[J.jsx("clipPath",{id:"circle-clip",children:J.jsx("circle",{cx:Sv,cy:Sv,r:Sv})}),J.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[J.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),J.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),J.jsx("feGaussianBlur",{stdDeviation:Al/10,result:"effect1_foregroundBlur"})]}),J.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[J.jsx("stop",{offset:"0",stopColor:o[0].c}),J.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>J.jsxs(S.Fragment,{children:[J.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[J.jsx("stop",{offset:"0",stopColor:a.a}),J.jsx("stop",{offset:"1",stopColor:a.b})]}),J.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[J.jsx("stop",{offset:"0",stopColor:a.c}),J.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),J.jsxs("g",{clipPath:"url(#circle-clip)",children:[J.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),J.jsx("g",{filter:"url(#blur)",children:o.map(a=>J.jsxs(S.Fragment,{children:[J.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),J.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})});const ZC=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[i,s]=S.useState(!1),o=a=>{s(!0),r==null||r(a)};return J.jsx(ue,{as:Sl.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:i?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},eE="Dialog",[tE,LY]=Br(eE),[YD,wo]=tE(eE),QD=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:o=!0}=t,a=S.useRef(null),l=S.useRef(null),[c=!1,f]=pa({prop:n,defaultProp:i,onChange:s});return S.createElement(YD,{scope:e,triggerRef:a,contentRef:l,contentId:Qs(),titleId:Qs(),descriptionId:Qs(),open:c,onOpenChange:f,onOpenToggle:S.useCallback(()=>f(u=>!u),[f]),modal:o},r)},rE="DialogPortal",[XD,nE]=tE(rE,{forceMount:void 0}),ZD=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:i}=t,s=wo(rE,e);return S.createElement(XD,{scope:e,forceMount:r},S.Children.map(n,o=>S.createElement(bo,{present:r||s.open},S.createElement(PC,{asChild:!0,container:i},o))))},vp="DialogOverlay",eB=S.forwardRef((t,e)=>{const r=nE(vp,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=wo(vp,t.__scopeDialog);return s.modal?S.createElement(bo,{present:n||s.open},S.createElement(tB,Ce({},i,{ref:e}))):null}),tB=S.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=wo(vp,r);return S.createElement(VC,{as:zl,allowPinchZoom:!0,shards:[i.contentRef]},S.createElement(Be.div,Ce({"data-state":sE(i.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),Kf="DialogContent",rB=S.forwardRef((t,e)=>{const r=nE(Kf,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=wo(Kf,t.__scopeDialog);return S.createElement(bo,{present:n||s.open},s.modal?S.createElement(nB,Ce({},i,{ref:e})):S.createElement(iB,Ce({},i,{ref:e})))}),nB=S.forwardRef((t,e)=>{const r=wo(Kf,t.__scopeDialog),n=S.useRef(null),i=Nt(e,r.contentRef,n);return S.useEffect(()=>{const s=n.current;if(s)return NC(s)},[]),S.createElement(iE,Ce({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:be(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=r.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:be(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:be(t.onFocusOutside,s=>s.preventDefault())}))}),iB=S.forwardRef((t,e)=>{const r=wo(Kf,t.__scopeDialog),n=S.useRef(!1),i=S.useRef(!1);return S.createElement(iE,Ce({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,s),!s.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),s.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:s=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=s.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}}))}),iE=S.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=t,a=wo(Kf,r),l=S.useRef(null),c=Nt(e,l);return dC(),S.createElement(S.Fragment,null,S.createElement(hC,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s},S.createElement(Nm,Ce({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":sE(a.open)},o,{ref:c,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),sB="DialogClose",oB=S.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=wo(sB,r);return S.createElement(Be.button,Ce({type:"button"},n,{ref:e,onClick:be(t.onClick,()=>i.onOpenChange(!1))}))});function sE(t){return t?"open":"closed"}const aB=QD,lB=ZD,cB=eB,fB=rB,uB=oB;var dB=zt({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]}),hB=zt({defaultClassName:"_1vqx0w91 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]});const vB=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:i,...s}=t;return J.jsx(ue,{className:dB({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...s,children:J.jsx(ue,{className:hB({direction:n}),background:"backgroundPrimary",...i,children:e})})};function yB(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function pB(t,e){var r=t;for(var n of e){if(!(n in r))throw new Error("Path ".concat(e.join(" -> ")," does not exist in object"));r=r[n]}return r}function oE(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=t.constructor();for(var i in t){var s=t[i],o=[...r,i];typeof s=="string"||typeof s=="number"||s==null?n[i]=e(s,o):typeof s=="object"&&!Array.isArray(s)?n[i]=oE(s,e,o):console.warn('Skipping invalid key "'.concat(o.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(s)?"Array":typeof s,'"'))}return n}function Uw(t,e,r){t.style.setProperty(yB(e),r)}function zw(t,e,r){if(typeof r=="object"){var n=e;oE(r,(a,l)=>{a!=null&&Uw(t,pB(n,l),String(a))})}else{var i=e;for(var s in i){var o=i[s];o!=null&&Uw(t,s,i[s])}}}const Wm=["dark","light"],gB="dark",mB="data-theme",Vw="@sequence.theme",xB=t=>Wm.includes(t),bB=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),aE=t=>t?`${Vw}.${t}`:Vw,wB=t=>{const e=localStorage.getItem(aE(t));return e&&Wm.includes(e)?e:gB},lE=S.createContext(null),CB=t=>{const[e,r]=S.useState(t.theme||wB(t.scope));S.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),S.useEffect(()=>{t.theme&&r(t.theme)},[t.theme]),S.useEffect(()=>{const i=document.querySelector(t.root||":root");i&&(xB(e)?(i.setAttribute(mB,e),zw(i,dw,{colors:ZM[e]})):bB(e)&&zw(i,dw,{colors:e}))},[e,t.root]);const n=S.useMemo(()=>({theme:e,root:t.root,setTheme:i=>{Wm.includes(i)&&(localStorage.setItem(aE(t.scope),i),r(i))}}),[e,t.root,t.scope]);return J.jsx(lE.Provider,{value:n,children:t.children})},EB=()=>{const t=S.useContext(lE);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t};var SB="fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11ni",kB=zt({defaultClassName:"_5b32m95 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12wk fyvr12we fyvr11h0 fyvr11i4 fyvr11hs fyvr11sb fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]}),AB="fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",_B="fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11ni fyvr1ko fyvr1oo fyvr1qo fyvr1mo";const TB=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:i=!1,isDismissible:s=!0,onClose:o,scroll:a=!0,size:l="lg",overlayProps:c,contentProps:f}=t,{root:u}=EB(),h=document.querySelector(u||"body");return J.jsx(aB,{modal:!0,defaultOpen:!0,onOpenChange:o,children:J.jsx(lB,{forceMount:!0,container:h,children:J.jsxs(ue,{className:_B,children:[J.jsx(ue,{as:cB,asChild:!0,background:r,className:AB,forceMount:!0,children:J.jsx(Sl.div,{initial:i?!1:{opacity:0},animate:i?!1:{opacity:1},exit:i?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...c},"modal-overlay")}),J.jsx(fB,{asChild:!0,className:kB({autoHeight:e,size:l}),forceMount:!0,onEscapeKeyDown:y=>{s?o==null||o():y.preventDefault()},onInteractOutside:y=>{s||y.preventDefault()},children:J.jsxs(Sl.div,{initial:i?!1:{y:"100%",opacity:l==="sm"?0:1},animate:i?!1:{y:0,opacity:1},exit:i?void 0:{y:"100%",opacity:l==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...f,children:[a?J.jsx(vB,{children:n}):n,s&&J.jsx(uB,{asChild:!0,children:J.jsx(Hm,{icon:Im,backdropFilter:"blur",size:"xs",className:SB,"aria-label":"Close"})})]},"modal-content")})]})})})};var PB=zt({defaultClassName:"_1acm19ya fyvr1t4 fyvr1v0 fyvr12wh fyvr12wb fyvr11gw fyvr128 fyvr15o",variantClassNames:{numeric:{false:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"_1qxj1ib9 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]}),IB="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12rt fyvr1g0 fyvr118g",RB=zt({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const qm=S.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",leftIcon:f,rightIcon:u,name:h,controls:y,type:g="text",numeric:p=!1,...k}=t;return J.jsx(sc,{description:s,disabled:o,display:"grid",id:a??h,label:l,labelLocation:c,children:J.jsx(ue,{width:"full",children:J.jsxs(ue,{className:cn(IB,RB({borderRadius:i})),children:[f&&J.jsx(f,{size:"sm"}),J.jsx(ue,{as:r,autoComplete:n,spellCheck:"false",className:PB({numeric:p}),disabled:o,id:a??h,name:h,ref:e,type:g,...k}),u&&J.jsx(u,{size:"sm"}),y]})})})}),MB=RegExp("^\\d*(?:\\\\[.])?\\d*$");function OB(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}S.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:i,onBlur:s,...o}=t,a=c=>{let{value:f}=c.target;f=f.replace(/,/g,"."),f.startsWith(".")&&(f="0"+f),f.startsWith("0")&&(f=f.replace(/^0+(?=\d)/,"")),(f===""||MB.test(OB(f)))&&(i==null||i({...c,target:{...c.target,value:f}}))},l=c=>{const{value:f}=c.target;let u=f;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),s==null||s(c),u!==f&&(i==null||i({...c,target:{...c.target,value:u}}))};return J.jsx(qm,{name:r,onChange:a,onBlur:l,inputMode:"decimal",autoComplete:"off",autoCorrect:"off",type:"text",pattern:"^[0-9]*[.,]?[0-9]*$",placeholder:n||"0",minLength:1,maxLength:79,spellCheck:"false",numeric:!0,ref:e,...o})});zt({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const cE="Progress",Vh=100,[NB,jY]=Br(cE),[$B,FY]=NB(cE),DB=S.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:i,getValueLabel:s=BB,...o}=t,a=yp(i)?i:Vh,l=fE(n,a)?n:null,c=D0(l)?s(l,a):void 0;return S.createElement($B,{scope:r,value:l,max:a},S.createElement(Be.div,Jt({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":D0(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":LB(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});DB.propTypes={max(t,e,r){const n=t[e],i=String(n);return n&&!yp(n)?new Error(jB(i,r)):null},value(t,e,r){const n=t[e],i=String(n),s=yp(t.max)?t.max:Vh;return n!=null&&!fE(n,s)?new Error(FB(i,r)):null}};function BB(t,e){return`${Math.round(t/e*100)}%`}function LB(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function D0(t){return typeof t=="number"}function yp(t){return D0(t)&&!isNaN(t)&&t>0}function fE(t,e){return D0(t)&&!isNaN(t)&&t<=e&&t>=0}function jB(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Vh}\`.`}function FB(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: - a positive number - less than the value passed to \`max\` (or ${Vh} if no \`max\` prop is set) - \`null\` if the progress is indeterminate. -Defaulting to \`null\`.`}const uE="Radio",[UL,dE]=Lr(uE),[zL,VL]=UL(uE),HL=S.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:l,...c}=t,[f,u]=S.useState(null),h=Ot(e,p=>u(p)),y=S.useRef(!1),g=f?!!f.closest("form"):!0;return S.createElement(zL,{scope:r,checked:i,disabled:o},S.createElement(De.button,Jt({type:"button",role:"radio","aria-checked":i,"data-state":hE(i),"data-disabled":o?"":void 0,disabled:o,value:a},c,{ref:h,onClick:ge(t.onClick,p=>{i||l==null||l(),g&&(y.current=p.isPropagationStopped(),y.current||p.stopPropagation())})})),g&&S.createElement(GL,{control:f,bubbles:!y.current,name:n,value:a,checked:i,required:s,disabled:o,style:{transform:"translateX(-100%)"}}))}),WL="RadioIndicator",qL=S.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...i}=t,s=VL(WL,r);return S.createElement(bo,{present:n||s.checked},S.createElement(De.span,Jt({"data-state":hE(s.checked),"data-disabled":s.disabled?"":void 0},i,{ref:e})))}),GL=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=S.useRef(null),o=_m(r),a=Tm(e);return S.useEffect(()=>{const l=s.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const h=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(h)}},[o,r,n]),S.createElement("input",Jt({type:"radio","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function hE(t){return t?"checked":"unchecked"}const KL=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],vE="RadioGroup",[JL,UY]=Lr(vE,[fc,dE]),yE=fc(),pE=dE(),[YL,QL]=JL(vE),XL=S.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:u,...h}=t,y=yE(r),g=Om(c),[p,k]=pa({prop:s,defaultProp:i,onChange:u});return S.createElement(YL,{scope:r,name:n,required:o,disabled:a,value:p,onValueChange:k},S.createElement(M$,Jt({asChild:!0},y,{orientation:l,dir:g,loop:f}),S.createElement(De.div,Jt({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:g},h,{ref:e}))))}),ZL="RadioGroupItem",eB=S.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...i}=t,s=QL(ZL,r),o=s.disabled||n,a=yE(r),l=pE(r),c=S.useRef(null),f=Ot(e,c),u=s.value===i.value,h=S.useRef(!1);return S.useEffect(()=>{const y=p=>{KL.includes(p.key)&&(h.current=!0)},g=()=>h.current=!1;return document.addEventListener("keydown",y),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",y),document.removeEventListener("keyup",g)}},[]),S.createElement(MC,Jt({asChild:!0},a,{focusable:!o,active:u}),S.createElement(HL,Jt({disabled:o,required:s.required,checked:u},l,i,{name:s.name,ref:f,onCheck:()=>s.onValueChange(i.value),onKeyDown:ge(y=>{y.key==="Enter"&&y.preventDefault()}),onFocus:ge(i.onFocus,()=>{var y;h.current&&((y=c.current)===null||y===void 0||y.click())})})))}),tB=S.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,i=pE(r);return S.createElement(qL,Jt({},i,n,{ref:e}))}),rB=XL,nB=eB,iB=tB;var sB=zt({defaultClassName:"io59uy8 io59uy7 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12rt",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]}),oB=zt({defaultClassName:"io59uy3 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr12nb fyvr12fz fyvr121b fyvr128n fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11ob fyvr12uz fyvr12uv fyvr12vj",variantClassNames:{size:{sm:"io59uy4 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy5 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]});const aB=t=>{const{id:e,label:r,size:n="sm",value:i,disabled:s}=t;return Y.jsx(ue,{alignItems:"center",children:Y.jsx(sc,{disabled:s,display:"flex",id:e,label:r,labelLocation:"right",children:Y.jsx(nB,{className:oB({size:n}),value:i,id:e,disabled:s,children:Y.jsx(iB,{className:sB({size:n})})})})})};S.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:i="2",name:s,options:o,size:a="sm",...l}=t;return Y.jsx(rB,{disabled:n,name:s,ref:e,...l,children:Y.jsx(ue,{flexDirection:r,gap:i,children:o.map(({label:c,value:f,disabled:u})=>Y.jsx(aB,{id:`${s}-${f}`,label:c,size:a,value:f,disabled:u},f))})})});function Hw(t,[e,r]){return Math.min(r,Math.max(e,t))}const gE=S.forwardRef((t,e)=>S.createElement(De.span,xe({},t,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}))),lB=[" ","Enter","ArrowUp","ArrowDown"],cB=[" ","Enter"],Hh="Select",[Wh,Gm,fB]=Bh(Hh),[uc,zY]=Lr(Hh,[fB,cc]),Km=cc(),[uB,Pa]=uc(Hh),[dB,hB]=uc(Hh),vB=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:u,disabled:h,required:y}=t,g=Km(e),[p,k]=S.useState(null),[w,E]=S.useState(null),[A,I]=S.useState(!1),M=Om(c),[B=!1,z]=pa({prop:n,defaultProp:i,onChange:s}),[F,K]=pa({prop:o,defaultProp:a,onChange:l}),J=S.useRef(null),Z=p?!!p.closest("form"):!0,[ie,D]=S.useState(new Set),v=Array.from(ie).map(C=>C.props.value).join(";");return S.createElement(p$,g,S.createElement(uB,{required:y,scope:e,trigger:p,onTriggerChange:k,valueNode:w,onValueNodeChange:E,valueNodeHasChildren:A,onValueNodeHasChildrenChange:I,contentId:Qs(),value:F,onValueChange:K,open:B,onOpenChange:z,dir:M,triggerPointerDownPosRef:J,disabled:h},S.createElement(Wh.Provider,{scope:e},S.createElement(dB,{scope:t.__scopeSelect,onNativeOptionAdd:S.useCallback(C=>{D(P=>new Set(P).add(C))},[]),onNativeOptionRemove:S.useCallback(C=>{D(P=>{const O=new Set(P);return O.delete(C),O})},[])},r)),Z?S.createElement(bE,{key:v,"aria-hidden":!0,required:y,tabIndex:-1,name:f,autoComplete:u,value:F,onChange:C=>K(C.target.value),disabled:h},F===void 0?S.createElement("option",{value:""}):null,Array.from(ie)):null))},yB="SelectTrigger",pB=S.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...i}=t,s=Km(r),o=Pa(yB,r),a=o.disabled||n,l=Ot(e,o.onTriggerChange),c=Gm(r),[f,u,h]=wE(g=>{const p=c().filter(E=>!E.disabled),k=p.find(E=>E.value===o.value),w=CE(p,g,k);w!==void 0&&o.onValueChange(w.value)}),y=()=>{a||(o.onOpenChange(!0),h())};return S.createElement(g$,xe({asChild:!0},s),S.createElement(De.button,xe({type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":xE(o.value)?"":void 0},i,{ref:l,onClick:ge(i.onClick,g=>{g.currentTarget.focus()}),onPointerDown:ge(i.onPointerDown,g=>{const p=g.target;p.hasPointerCapture(g.pointerId)&&p.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&(y(),o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)},g.preventDefault())}),onKeyDown:ge(i.onKeyDown,g=>{const p=f.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&u(g.key),!(p&&g.key===" ")&&lB.includes(g.key)&&(y(),g.preventDefault())})})))}),gB="SelectValue",mB=S.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,children:s,placeholder:o="",...a}=t,l=Pa(gB,r),{onValueNodeHasChildrenChange:c}=l,f=s!==void 0,u=Ot(e,l.onValueNodeChange);return xn(()=>{c(f)},[c,f]),S.createElement(De.span,xe({},a,{ref:u,style:{pointerEvents:"none"}}),xE(l.value)?S.createElement(S.Fragment,null,o):s)}),xB=S.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...i}=t;return S.createElement(De.span,xe({"aria-hidden":!0},i,{ref:e}),n||"▼")}),Hl="SelectContent",bB=S.forwardRef((t,e)=>{const r=Pa(Hl,t.__scopeSelect),[n,i]=S.useState();if(xn(()=>{i(new DocumentFragment)},[]),!r.open){const s=n;return s?xo.createPortal(S.createElement(mE,{scope:t.__scopeSelect},S.createElement(Wh.Slot,{scope:t.__scopeSelect},S.createElement("div",null,t.children))),s):null}return S.createElement(wB,xe({},t,{ref:e}))}),ji=10,[mE,qh]=uc(Hl),wB=S.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:h,collisionPadding:y,sticky:g,hideWhenDetached:p,avoidCollisions:k,...w}=t,E=Pa(Hl,r),[A,I]=S.useState(null),[M,B]=S.useState(null),z=Ot(e,L=>I(L)),[F,K]=S.useState(null),[J,Z]=S.useState(null),ie=Gm(r),[D,v]=S.useState(!1),C=S.useRef(!1);S.useEffect(()=>{if(A)return NC(A)},[A]),dC();const P=S.useCallback(L=>{const[U,...G]=ie().map(W=>W.ref.current),[j]=G.slice(-1),V=document.activeElement;for(const W of L)if(W===V||(W==null||W.scrollIntoView({block:"nearest"}),W===U&&M&&(M.scrollTop=0),W===j&&M&&(M.scrollTop=M.scrollHeight),W==null||W.focus(),document.activeElement!==V))return},[ie,M]),O=S.useCallback(()=>P([F,A]),[P,F,A]);S.useEffect(()=>{D&&O()},[D,O]);const{onOpenChange:b,triggerPointerDownPosRef:_}=E;S.useEffect(()=>{if(A){let L={x:0,y:0};const U=j=>{var V,W,oe,re;L={x:Math.abs(Math.round(j.pageX)-((V=(W=_.current)===null||W===void 0?void 0:W.x)!==null&&V!==void 0?V:0)),y:Math.abs(Math.round(j.pageY)-((oe=(re=_.current)===null||re===void 0?void 0:re.y)!==null&&oe!==void 0?oe:0))}},G=j=>{L.x<=10&&L.y<=10?j.preventDefault():A.contains(j.target)||b(!1),document.removeEventListener("pointermove",U),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",G,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",G,{capture:!0})}}},[A,b,_]),S.useEffect(()=>{const L=()=>b(!1);return window.addEventListener("blur",L),window.addEventListener("resize",L),()=>{window.removeEventListener("blur",L),window.removeEventListener("resize",L)}},[b]);const[R,m]=wE(L=>{const U=ie().filter(V=>!V.disabled),G=U.find(V=>V.ref.current===document.activeElement),j=CE(U,L,G);j&&setTimeout(()=>j.ref.current.focus())}),d=S.useCallback((L,U,G)=>{const j=!C.current&&!G;(E.value!==void 0&&E.value===U||j)&&(K(L),j&&(C.current=!0))},[E.value]),T=S.useCallback(()=>A==null?void 0:A.focus(),[A]),N=S.useCallback((L,U,G)=>{const j=!C.current&&!G;(E.value!==void 0&&E.value===U||j)&&Z(L)},[E.value]),x=n==="popper"?Ww:CB,$=x===Ww?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:h,collisionPadding:y,sticky:g,hideWhenDetached:p,avoidCollisions:k}:{};return S.createElement(mE,{scope:r,content:A,viewport:M,onViewportChange:B,itemRefCallback:d,selectedItem:F,onItemLeave:T,itemTextRefCallback:N,focusSelectedItem:O,selectedItemText:J,position:n,isPositioned:D,searchRef:R},S.createElement(VC,{as:zl,allowPinchZoom:!0},S.createElement(hC,{asChild:!0,trapped:E.open,onMountAutoFocus:L=>{L.preventDefault()},onUnmountAutoFocus:ge(i,L=>{var U;(U=E.trigger)===null||U===void 0||U.focus({preventScroll:!0}),L.preventDefault()})},S.createElement(Nm,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:L=>L.preventDefault(),onDismiss:()=>E.onOpenChange(!1)},S.createElement(x,xe({role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:L=>L.preventDefault()},w,$,{onPlaced:()=>v(!0),ref:z,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:ge(w.onKeyDown,L=>{const U=L.ctrlKey||L.altKey||L.metaKey;if(L.key==="Tab"&&L.preventDefault(),!U&&L.key.length===1&&m(L.key),["ArrowUp","ArrowDown","Home","End"].includes(L.key)){let j=ie().filter(V=>!V.disabled).map(V=>V.ref.current);if(["ArrowUp","End"].includes(L.key)&&(j=j.slice().reverse()),["ArrowUp","ArrowDown"].includes(L.key)){const V=L.target,W=j.indexOf(V);j=j.slice(W+1)}setTimeout(()=>P(j)),L.preventDefault()}})}))))))}),CB=S.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...i}=t,s=Pa(Hl,r),o=qh(Hl,r),[a,l]=S.useState(null),[c,f]=S.useState(null),u=Ot(e,z=>f(z)),h=Gm(r),y=S.useRef(!1),g=S.useRef(!0),{viewport:p,selectedItem:k,selectedItemText:w,focusSelectedItem:E}=o,A=S.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&c&&p&&k&&w){const z=s.trigger.getBoundingClientRect(),F=c.getBoundingClientRect(),K=s.valueNode.getBoundingClientRect(),J=w.getBoundingClientRect();if(s.dir!=="rtl"){const V=J.left-F.left,W=K.left-V,oe=z.left-W,re=z.width+oe,ae=Math.max(re,F.width),Le=window.innerWidth-ji,Ee=Hw(W,[ji,Le-ae]);a.style.minWidth=re+"px",a.style.left=Ee+"px"}else{const V=F.right-J.right,W=window.innerWidth-K.right-V,oe=window.innerWidth-z.right-W,re=z.width+oe,ae=Math.max(re,F.width),Le=window.innerWidth-ji,Ee=Hw(W,[ji,Le-ae]);a.style.minWidth=re+"px",a.style.right=Ee+"px"}const Z=h(),ie=window.innerHeight-ji*2,D=p.scrollHeight,v=window.getComputedStyle(c),C=parseInt(v.borderTopWidth,10),P=parseInt(v.paddingTop,10),O=parseInt(v.borderBottomWidth,10),b=parseInt(v.paddingBottom,10),_=C+P+D+b+O,R=Math.min(k.offsetHeight*5,_),m=window.getComputedStyle(p),d=parseInt(m.paddingTop,10),T=parseInt(m.paddingBottom,10),N=z.top+z.height/2-ji,x=ie-N,$=k.offsetHeight/2,L=k.offsetTop+$,U=C+P+L,G=_-U;if(U<=N){const V=k===Z[Z.length-1].ref.current;a.style.bottom="0px";const W=c.clientHeight-p.offsetTop-p.offsetHeight,oe=Math.max(x,$+(V?T:0)+W+O),re=U+oe;a.style.height=re+"px"}else{const V=k===Z[0].ref.current;a.style.top="0px";const oe=Math.max(N,C+p.offsetTop+(V?d:0)+$)+G;a.style.height=oe+"px",p.scrollTop=U-N+p.offsetTop}a.style.margin=`${ji}px 0`,a.style.minHeight=R+"px",a.style.maxHeight=ie+"px",n==null||n(),requestAnimationFrame(()=>y.current=!0)}},[h,s.trigger,s.valueNode,a,c,p,k,w,s.dir,n]);xn(()=>A(),[A]);const[I,M]=S.useState();xn(()=>{c&&M(window.getComputedStyle(c).zIndex)},[c]);const B=S.useCallback(z=>{z&&g.current===!0&&(A(),E==null||E(),g.current=!1)},[A,E]);return S.createElement(EB,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:y,onScrollButtonChange:B},S.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:I}},S.createElement(De.div,xe({},i,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),Ww=S.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=ji,...s}=t,o=Km(r);return S.createElement(m$,xe({},o,s,{ref:e,align:n,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[EB,SB]=uc(Hl,{}),qw="SelectViewport",kB=S.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=qh(qw,r),s=SB(qw,r),o=Ot(e,i.onViewportChange),a=S.useRef(0);return S.createElement(S.Fragment,null,S.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),S.createElement(Wh.Slot,{scope:r},S.createElement(De.div,xe({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:ge(n.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:u}=s;if(u!=null&&u.current&&f){const h=Math.abs(a.current-c.scrollTop);if(h>0){const y=window.innerHeight-ji*2,g=parseFloat(f.style.minHeight),p=parseFloat(f.style.height),k=Math.max(g,p);if(k0?A:0,f.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),AB="SelectGroup",[_B,VY]=uc(AB),TB=S.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=Qs();return S.createElement(_B,{scope:r,id:i},S.createElement(De.div,xe({role:"group","aria-labelledby":i},n,{ref:e})))}),pp="SelectItem",[PB,IB]=uc(pp),RB=S.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=t,a=Pa(pp,r),l=qh(pp,r),c=a.value===n,[f,u]=S.useState(s??""),[h,y]=S.useState(!1),g=Ot(e,w=>{var E;return(E=l.itemRefCallback)===null||E===void 0?void 0:E.call(l,w,n,i)}),p=Qs(),k=()=>{i||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return S.createElement(PB,{scope:r,value:n,disabled:i,textId:p,isSelected:c,onItemTextChange:S.useCallback(w=>{u(E=>{var A;return E||((A=w==null?void 0:w.textContent)!==null&&A!==void 0?A:"").trim()})},[])},S.createElement(Wh.ItemSlot,{scope:r,value:n,disabled:i,textValue:f},S.createElement(De.div,xe({role:"option","aria-labelledby":p,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},o,{ref:g,onFocus:ge(o.onFocus,()=>y(!0)),onBlur:ge(o.onBlur,()=>y(!1)),onPointerUp:ge(o.onPointerUp,k),onPointerMove:ge(o.onPointerMove,w=>{if(i){var E;(E=l.onItemLeave)===null||E===void 0||E.call(l)}else w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ge(o.onPointerLeave,w=>{if(w.currentTarget===document.activeElement){var E;(E=l.onItemLeave)===null||E===void 0||E.call(l)}}),onKeyDown:ge(o.onKeyDown,w=>{var E;((E=l.searchRef)===null||E===void 0?void 0:E.current)!==""&&w.key===" "||(cB.includes(w.key)&&k(),w.key===" "&&w.preventDefault())})}))))}),id="SelectItemText",MB=S.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,...s}=t,o=Pa(id,r),a=qh(id,r),l=IB(id,r),c=hB(id,r),[f,u]=S.useState(null),h=Ot(e,w=>u(w),l.onItemTextChange,w=>{var E;return(E=a.itemTextRefCallback)===null||E===void 0?void 0:E.call(a,w,l.value,l.disabled)}),y=f==null?void 0:f.textContent,g=S.useMemo(()=>S.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},y),[l.disabled,l.value,y]),{onNativeOptionAdd:p,onNativeOptionRemove:k}=c;return xn(()=>(p(g),()=>k(g)),[p,k,g]),S.createElement(S.Fragment,null,S.createElement(De.span,xe({id:l.textId},s,{ref:h})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?xo.createPortal(s.children,o.valueNode):null)});function xE(t){return t===""||t===void 0}const bE=S.forwardRef((t,e)=>{const{value:r,...n}=t,i=S.useRef(null),s=Ot(e,i),o=_m(r);return S.useEffect(()=>{const a=i.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&f){const u=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(u)}},[o,r]),S.createElement(gE,{asChild:!0},S.createElement("select",xe({},n,{ref:s,defaultValue:r})))});bE.displayName="BubbleSelect";function wE(t){const e=Nn(t),r=S.useRef(""),n=S.useRef(0),i=S.useCallback(o=>{const a=r.current+o;e(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),s=S.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,s]}function CE(t,e,r){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=r?t.indexOf(r):-1;let o=OB(t,Math.max(s,0));i.length===1&&(o=o.filter(c=>c!==r));const l=o.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==r?l:void 0}function OB(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const NB=vB,$B=pB,DB=mB,LB=xB,BB=bB,jB=kB,FB=TB,UB=RB,zB=MB;var VB="gohwuma fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11tt fyvr12rt fyvr11nj",HB="gohwume _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12wk fyvr12wl fyvr12we fyvr12wf fyvr11h0 fyvr11jw fyvr11ko fyvr12uz fyvr12uv fyvr12rt fyvr12vt fyvr12vj",WB="gohwum1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12rt fyvr118c fyvr11jw fyvr11n2 fyvr12uz",qB=zt({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const GB=S.forwardRef(({children:t,className:e,...r},n)=>Y.jsx(UB,{className:cn(HB,e),...r,ref:n,children:Y.jsx(zB,{children:t})})),Gw=S.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:i,label:s="",description:o,labelLocation:a="hidden",name:l,options:c,placeholder:f,...u}=t;return Y.jsx(sc,{disabled:n,display:"grid",id:i??l,label:s,labelLocation:a,description:o,whiteSpace:"nowrap",children:Y.jsxs(NB,{disabled:n,name:l,...u,children:[Y.jsxs($B,{id:i??l,className:cn(WB,qB({borderRadius:r})),ref:e,children:[Y.jsx(DB,{placeholder:f}),Y.jsx(ue,{as:LB,display:"inline-flex",children:Y.jsx(lC,{})})]}),Y.jsx(BB,{className:VB,children:Y.jsx(jB,{children:Y.jsx(FB,{children:c.map(({value:h,label:y,...g})=>Y.jsx(GB,{value:h,...g,children:y},h))})})})]})})});S.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:i="Search",name:s="search",value:o,...a}=t,l=o?Y.jsx(Hm,{icon:Im,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return Y.jsx(qm,{ref:e,name:s,leftIcon:zO,controls:r||l,placeholder:i,value:o,onChange:c=>n==null?void 0:n(c),...a})});var KB=zt({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});S.forwardRef((t,e)=>{const{size:r="md",...n}=t;return Y.jsx(ue,{className:KB({size:r}),color:"text50",ref:e,...n,children:Y.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[Y.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),Y.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});S.forwardRef(({children:t},e)=>Y.jsx(ue,{ref:e,width:"fit",height:"fit",onClick:r=>{r.preventDefault(),r.stopPropagation()},onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.stopPropagation())},children:t}));const EE="Switch",[JB,HY]=Lr(EE);JB(EE);zt({defaultClassName:"nwwh3z7",variantClassNames:{variant:{pill:"nwwh3z8",line:"nwwh3z9 fyvr11g0"},active:{true:"fyvr12vx",false:"nwwh3zb"},disabled:{true:"fyvr12vh"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"fyvr11u5 fyvr12sb"],[{active:!1,variant:"pill"},"fyvr11ob fyvr12rz"],[{active:!0,variant:"line"},"fyvr12rt"],[{active:!1,variant:"line"},"fyvr12rz"]]});const SE="Tabs",[YB,WY]=Lr(SE,[fc]);fc();YB(SE);var QB="_1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n7";S.forwardRef((t,e)=>{const{icon:r,label:n,...i}=t;return Y.jsxs(ue,{className:QB,ref:e,background:"buttonGlass",...i,children:[r&&Y.jsx(r,{size:"xs"}),Y.jsx(Wt,{children:n})]})});const XB="ToastProvider",[ZB,qY,ej]=Bh("Toast"),[kE,GY]=Lr("Toast",[ej]),[KY,AE]=kE(XB),Kw="toast.viewportPause",Jw="toast.viewportResume",Gh="Toast",tj="toast.swipeStart",rj="toast.swipeMove",nj="toast.swipeCancel",ij="toast.swipeEnd",[sj,oj]=kE(Gh,{onClose(){}}),aj=S.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:f,onSwipeMove:u,onSwipeCancel:h,onSwipeEnd:y,...g}=t,p=AE(Gh,r),[k,w]=S.useState(null),E=Ot(e,v=>w(v)),A=S.useRef(null),I=S.useRef(null),M=i||p.duration,B=S.useRef(0),z=S.useRef(M),F=S.useRef(0),{onToastAdd:K,onToastRemove:J}=p,Z=Nn(()=>{var v;(k==null?void 0:k.contains(document.activeElement))&&((v=p.viewport)===null||v===void 0||v.focus()),o()}),ie=S.useCallback(v=>{!v||v===1/0||(window.clearTimeout(F.current),B.current=new Date().getTime(),F.current=window.setTimeout(Z,v))},[Z]);S.useEffect(()=>{const v=p.viewport;if(v){const C=()=>{ie(z.current),c==null||c()},P=()=>{const O=new Date().getTime()-B.current;z.current=z.current-O,window.clearTimeout(F.current),l==null||l()};return v.addEventListener(Kw,P),v.addEventListener(Jw,C),()=>{v.removeEventListener(Kw,P),v.removeEventListener(Jw,C)}}},[p.viewport,M,l,c,ie]),S.useEffect(()=>{s&&!p.isClosePausedRef.current&&ie(M)},[s,M,p.isClosePausedRef,ie]),S.useEffect(()=>(K(),()=>J()),[K,J]);const D=S.useMemo(()=>k?TE(k):null,[k]);return p.viewport?S.createElement(S.Fragment,null,D&&S.createElement(lj,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},D),S.createElement(sj,{scope:r,onClose:Z},xo.createPortal(S.createElement(ZB.ItemSlot,{scope:r},S.createElement(mN,{asChild:!0,onEscapeKeyDown:ge(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||Z(),p.isFocusedToastEscapeKeyDownRef.current=!1})},S.createElement(De.li,xe({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection},g,{ref:E,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ge(t.onKeyDown,v=>{v.key==="Escape"&&(a==null||a(v.nativeEvent),v.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,Z()))}),onPointerDown:ge(t.onPointerDown,v=>{v.button===0&&(A.current={x:v.clientX,y:v.clientY})}),onPointerMove:ge(t.onPointerMove,v=>{if(!A.current)return;const C=v.clientX-A.current.x,P=v.clientY-A.current.y,O=!!I.current,b=["left","right"].includes(p.swipeDirection),_=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,R=b?_(0,C):0,m=b?0:_(0,P),d=v.pointerType==="touch"?10:2,T={x:R,y:m},N={originalEvent:v,delta:T};O?(I.current=T,sd(rj,u,N,{discrete:!1})):Yw(T,p.swipeDirection,d)?(I.current=T,sd(tj,f,N,{discrete:!1}),v.target.setPointerCapture(v.pointerId)):(Math.abs(C)>d||Math.abs(P)>d)&&(A.current=null)}),onPointerUp:ge(t.onPointerUp,v=>{const C=I.current,P=v.target;if(P.hasPointerCapture(v.pointerId)&&P.releasePointerCapture(v.pointerId),I.current=null,A.current=null,C){const O=v.currentTarget,b={originalEvent:v,delta:C};Yw(C,p.swipeDirection,p.swipeThreshold)?sd(ij,y,b,{discrete:!0}):sd(nj,h,b,{discrete:!0}),O.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})))),p.viewport))):null});aj.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${Gh}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const lj=t=>{const{__scopeToast:e,children:r,...n}=t,i=AE(Gh,e),[s,o]=S.useState(!1),[a,l]=S.useState(!1);return hj(()=>o(!0)),S.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:S.createElement(PC,{asChild:!0},S.createElement(gE,n,s&&S.createElement(S.Fragment,null,i.label," ",r)))},cj="ToastAction",fj=S.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?S.createElement(_E,{altText:r,asChild:!0},S.createElement(dj,xe({},n,{ref:e}))):null});fj.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${cj}\``)}};const uj="ToastClose",dj=S.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,i=oj(uj,r);return S.createElement(_E,{asChild:!0},S.createElement(De.button,xe({type:"button"},n,{ref:e,onClick:ge(t.onClick,i.onClose)})))}),_E=S.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...i}=t;return S.createElement(De.div,xe({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},i,{ref:e}))});function TE(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),vj(n)){const i=n.ariaHidden||n.hidden||n.style.display==="none",s=n.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...TE(n))}}),e}function sd(t,e,r,{discrete:n}){const i=r.originalEvent.currentTarget,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?Pm(i,s):i.dispatchEvent(s)}const Yw=(t,e,r=0)=>{const n=Math.abs(t.x),i=Math.abs(t.y),s=n>i;return e==="left"||e==="right"?s&&n>r:!s&&i>r};function hj(t=()=>{}){const e=Nn(t);xn(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function vj(t){return t.nodeType===t.ELEMENT_NODE}zt({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});S.createContext(null);var yj="_15pztn2",pj="_15pztn1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12rt fyvr128 fyvr11h0";S.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",name:f,rows:u,resize:h=!1,...y}=t;return Y.jsx(sc,{description:s,disabled:o,display:"grid",id:a??f,label:l,labelLocation:c,children:Y.jsx(ue,{as:r,autoComplete:n,spellCheck:"false",className:cn(pj,h&&yj),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:i,...y})})});var gj="bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11sh fyvr128 fyvr15o fyvr11h0",mj="bnrrebe",xj=zt({defaultClassName:"bnrreb5 fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb6",sm:"bnrreb7",md:"bnrreb8",lg:"bnrreb9"},borderRadius:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]});const bj=S.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:i,src:s,symbol:o,size:a="md",...l}=t;return Y.jsx(ue,{className:cn(r,xj({borderRadius:e,size:a})),style:i,flexShrink:"0",...l,children:s?Y.jsx(ZC,{className:mj,disableAnimation:n,src:s}):Y.jsx(Wt,{className:gj,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})}),[Kh,JY]=Lr("Tooltip",[cc]);cc();const wj="TooltipProvider";Kh(wj);const PE="Tooltip";Kh(PE);const Cj="TooltipPortal";Kh(Cj,{forceMount:void 0});Kh(PE,{isInside:!1});var IE,Qw=xo;IE=Qw.createRoot,Qw.hydrateRoot;var Jm={exports:{}};const Ej={},Sj=Object.freeze(Object.defineProperty({__proto__:null,default:Ej},Symbol.toStringTag,{value:"Module"})),kj=vA(Sj);Jm.exports;(function(t){(function(e,r){function n(D,v){if(!D)throw new Error(v||"Assertion failed")}function i(D,v){D.super_=v;var C=function(){};C.prototype=v.prototype,D.prototype=new C,D.prototype.constructor=D}function s(D,v,C){if(s.isBN(D))return D;this.negative=0,this.words=null,this.length=0,this.red=null,D!==null&&((v==="le"||v==="be")&&(C=v,v=10),this._init(D||0,v||10,C||"be"))}typeof e=="object"?e.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=kj.Buffer}catch{}s.isBN=function(v){return v instanceof s?!0:v!==null&&typeof v=="object"&&v.constructor.wordSize===s.wordSize&&Array.isArray(v.words)},s.max=function(v,C){return v.cmp(C)>0?v:C},s.min=function(v,C){return v.cmp(C)<0?v:C},s.prototype._init=function(v,C,P){if(typeof v=="number")return this._initNumber(v,C,P);if(typeof v=="object")return this._initArray(v,C,P);C==="hex"&&(C=16),n(C===(C|0)&&C>=2&&C<=36),v=v.toString().replace(/\s+/g,"");var O=0;v[0]==="-"&&(O++,this.negative=1),O=0;O-=3)_=v[O]|v[O-1]<<8|v[O-2]<<16,this.words[b]|=_<>>26-R&67108863,R+=24,R>=26&&(R-=26,b++);else if(P==="le")for(O=0,b=0;O>>26-R&67108863,R+=24,R>=26&&(R-=26,b++);return this._strip()};function a(D,v){var C=D.charCodeAt(v);if(C>=48&&C<=57)return C-48;if(C>=65&&C<=70)return C-55;if(C>=97&&C<=102)return C-87;n(!1,"Invalid character in "+D)}function l(D,v,C){var P=a(D,C);return C-1>=v&&(P|=a(D,C-1)<<4),P}s.prototype._parseHex=function(v,C,P){this.length=Math.ceil((v.length-C)/6),this.words=new Array(this.length);for(var O=0;O=C;O-=2)R=l(v,C,O)<=18?(b-=18,_+=1,this.words[_]|=R>>>26):b+=8;else{var m=v.length-C;for(O=m%2===0?C+1:C;O=18?(b-=18,_+=1,this.words[_]|=R>>>26):b+=8}this._strip()};function c(D,v,C,P){for(var O=0,b=0,_=Math.min(D.length,C),R=v;R<_;R++){var m=D.charCodeAt(R)-48;O*=P,m>=49?b=m-49+10:m>=17?b=m-17+10:b=m,n(m>=0&&b1&&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")]=u}catch{s.prototype.inspect=u}else s.prototype.inspect=u;function u(){return(this.red?""}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"],y=[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],g=[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(v,C){v=v||10,C=C|0||1;var P;if(v===16||v==="hex"){P="";for(var O=0,b=0,_=0;_>>24-O&16777215,O+=2,O>=26&&(O-=26,_--),b!==0||_!==this.length-1?P=h[6-m.length]+m+P:P=m+P}for(b!==0&&(P=b.toString(16)+P);P.length%C!==0;)P="0"+P;return this.negative!==0&&(P="-"+P),P}if(v===(v|0)&&v>=2&&v<=36){var d=y[v],T=g[v];P="";var N=this.clone();for(N.negative=0;!N.isZero();){var x=N.modrn(T).toString(v);N=N.idivn(T),N.isZero()?P=x+P:P=h[d-x.length]+x+P}for(this.isZero()&&(P="0"+P);P.length%C!==0;)P="0"+P;return this.negative!==0&&(P="-"+P),P}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var v=this.words[0];return this.length===2?v+=this.words[1]*67108864:this.length===3&&this.words[2]===1?v+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-v:v},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(v,C){return this.toArrayLike(o,v,C)}),s.prototype.toArray=function(v,C){return this.toArrayLike(Array,v,C)};var p=function(v,C){return v.allocUnsafe?v.allocUnsafe(C):new v(C)};s.prototype.toArrayLike=function(v,C,P){this._strip();var O=this.byteLength(),b=P||Math.max(1,O);n(O<=b,"byte array longer than desired length"),n(b>0,"Requested array length <= 0");var _=p(v,b),R=C==="le"?"LE":"BE";return this["_toArrayLike"+R](_,O),_},s.prototype._toArrayLikeLE=function(v,C){for(var P=0,O=0,b=0,_=0;b>8&255),P>16&255),_===6?(P>24&255),O=0,_=0):(O=R>>>24,_+=2)}if(P=0&&(v[P--]=R>>8&255),P>=0&&(v[P--]=R>>16&255),_===6?(P>=0&&(v[P--]=R>>24&255),O=0,_=0):(O=R>>>24,_+=2)}if(P>=0)for(v[P--]=O;P>=0;)v[P--]=0},Math.clz32?s.prototype._countBits=function(v){return 32-Math.clz32(v)}:s.prototype._countBits=function(v){var C=v,P=0;return C>=4096&&(P+=13,C>>>=13),C>=64&&(P+=7,C>>>=7),C>=8&&(P+=4,C>>>=4),C>=2&&(P+=2,C>>>=2),P+C},s.prototype._zeroBits=function(v){if(v===0)return 26;var C=v,P=0;return C&8191||(P+=13,C>>>=13),C&127||(P+=7,C>>>=7),C&15||(P+=4,C>>>=4),C&3||(P+=2,C>>>=2),C&1||P++,P},s.prototype.bitLength=function(){var v=this.words[this.length-1],C=this._countBits(v);return(this.length-1)*26+C};function k(D){for(var v=new Array(D.bitLength()),C=0;C>>O&1}return v}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var v=0,C=0;Cv.length?this.clone().ior(v):v.clone().ior(this)},s.prototype.uor=function(v){return this.length>v.length?this.clone().iuor(v):v.clone().iuor(this)},s.prototype.iuand=function(v){var C;this.length>v.length?C=v:C=this;for(var P=0;Pv.length?this.clone().iand(v):v.clone().iand(this)},s.prototype.uand=function(v){return this.length>v.length?this.clone().iuand(v):v.clone().iuand(this)},s.prototype.iuxor=function(v){var C,P;this.length>v.length?(C=this,P=v):(C=v,P=this);for(var O=0;Ov.length?this.clone().ixor(v):v.clone().ixor(this)},s.prototype.uxor=function(v){return this.length>v.length?this.clone().iuxor(v):v.clone().iuxor(this)},s.prototype.inotn=function(v){n(typeof v=="number"&&v>=0);var C=Math.ceil(v/26)|0,P=v%26;this._expand(C),P>0&&C--;for(var O=0;O0&&(this.words[O]=~this.words[O]&67108863>>26-P),this._strip()},s.prototype.notn=function(v){return this.clone().inotn(v)},s.prototype.setn=function(v,C){n(typeof v=="number"&&v>=0);var P=v/26|0,O=v%26;return this._expand(P+1),C?this.words[P]=this.words[P]|1<v.length?(P=this,O=v):(P=v,O=this);for(var b=0,_=0;_>>26;for(;b!==0&&_>>26;if(this.length=P.length,b!==0)this.words[this.length]=b,this.length++;else if(P!==this)for(;_v.length?this.clone().iadd(v):v.clone().iadd(this)},s.prototype.isub=function(v){if(v.negative!==0){v.negative=0;var C=this.iadd(v);return v.negative=1,C._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(v),this.negative=1,this._normSign();var P=this.cmp(v);if(P===0)return this.negative=0,this.length=1,this.words[0]=0,this;var O,b;P>0?(O=this,b=v):(O=v,b=this);for(var _=0,R=0;R>26,this.words[R]=C&67108863;for(;_!==0&&R>26,this.words[R]=C&67108863;if(_===0&&R>>26,N=m&67108863,x=Math.min(d,v.length-1),$=Math.max(0,d-D.length+1);$<=x;$++){var L=d-$|0;O=D.words[L]|0,b=v.words[$]|0,_=O*b+N,T+=_/67108864|0,N=_&67108863}C.words[d]=N|0,m=T|0}return m!==0?C.words[d]=m|0:C.length--,C._strip()}var E=function(v,C,P){var O=v.words,b=C.words,_=P.words,R=0,m,d,T,N=O[0]|0,x=N&8191,$=N>>>13,L=O[1]|0,U=L&8191,G=L>>>13,j=O[2]|0,V=j&8191,W=j>>>13,oe=O[3]|0,re=oe&8191,ae=oe>>>13,Le=O[4]|0,Ee=Le&8191,Ce=Le>>>13,Nt=O[5]|0,qe=Nt&8191,Be=Nt>>>13,So=O[6]|0,Xe=So&8191,Ze=So>>>13,ko=O[7]|0,et=ko&8191,tt=ko>>>13,Ao=O[8]|0,rt=Ao&8191,nt=Ao>>>13,_o=O[9]|0,it=_o&8191,st=_o>>>13,To=b[0]|0,ot=To&8191,at=To>>>13,Po=b[1]|0,lt=Po&8191,ct=Po>>>13,Io=b[2]|0,ft=Io&8191,ut=Io>>>13,Ro=b[3]|0,dt=Ro&8191,ht=Ro>>>13,Mo=b[4]|0,vt=Mo&8191,yt=Mo>>>13,Oo=b[5]|0,pt=Oo&8191,gt=Oo>>>13,No=b[6]|0,mt=No&8191,xt=No>>>13,$o=b[7]|0,bt=$o&8191,wt=$o>>>13,Do=b[8]|0,Ct=Do&8191,Et=Do>>>13,Lo=b[9]|0,St=Lo&8191,kt=Lo>>>13;P.negative=v.negative^C.negative,P.length=19,m=Math.imul(x,ot),d=Math.imul(x,at),d=d+Math.imul($,ot)|0,T=Math.imul($,at);var ms=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(ms>>>26)|0,ms&=67108863,m=Math.imul(U,ot),d=Math.imul(U,at),d=d+Math.imul(G,ot)|0,T=Math.imul(G,at),m=m+Math.imul(x,lt)|0,d=d+Math.imul(x,ct)|0,d=d+Math.imul($,lt)|0,T=T+Math.imul($,ct)|0;var xs=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(xs>>>26)|0,xs&=67108863,m=Math.imul(V,ot),d=Math.imul(V,at),d=d+Math.imul(W,ot)|0,T=Math.imul(W,at),m=m+Math.imul(U,lt)|0,d=d+Math.imul(U,ct)|0,d=d+Math.imul(G,lt)|0,T=T+Math.imul(G,ct)|0,m=m+Math.imul(x,ft)|0,d=d+Math.imul(x,ut)|0,d=d+Math.imul($,ft)|0,T=T+Math.imul($,ut)|0;var bs=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(bs>>>26)|0,bs&=67108863,m=Math.imul(re,ot),d=Math.imul(re,at),d=d+Math.imul(ae,ot)|0,T=Math.imul(ae,at),m=m+Math.imul(V,lt)|0,d=d+Math.imul(V,ct)|0,d=d+Math.imul(W,lt)|0,T=T+Math.imul(W,ct)|0,m=m+Math.imul(U,ft)|0,d=d+Math.imul(U,ut)|0,d=d+Math.imul(G,ft)|0,T=T+Math.imul(G,ut)|0,m=m+Math.imul(x,dt)|0,d=d+Math.imul(x,ht)|0,d=d+Math.imul($,dt)|0,T=T+Math.imul($,ht)|0;var ws=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(ws>>>26)|0,ws&=67108863,m=Math.imul(Ee,ot),d=Math.imul(Ee,at),d=d+Math.imul(Ce,ot)|0,T=Math.imul(Ce,at),m=m+Math.imul(re,lt)|0,d=d+Math.imul(re,ct)|0,d=d+Math.imul(ae,lt)|0,T=T+Math.imul(ae,ct)|0,m=m+Math.imul(V,ft)|0,d=d+Math.imul(V,ut)|0,d=d+Math.imul(W,ft)|0,T=T+Math.imul(W,ut)|0,m=m+Math.imul(U,dt)|0,d=d+Math.imul(U,ht)|0,d=d+Math.imul(G,dt)|0,T=T+Math.imul(G,ht)|0,m=m+Math.imul(x,vt)|0,d=d+Math.imul(x,yt)|0,d=d+Math.imul($,vt)|0,T=T+Math.imul($,yt)|0;var Cs=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(Cs>>>26)|0,Cs&=67108863,m=Math.imul(qe,ot),d=Math.imul(qe,at),d=d+Math.imul(Be,ot)|0,T=Math.imul(Be,at),m=m+Math.imul(Ee,lt)|0,d=d+Math.imul(Ee,ct)|0,d=d+Math.imul(Ce,lt)|0,T=T+Math.imul(Ce,ct)|0,m=m+Math.imul(re,ft)|0,d=d+Math.imul(re,ut)|0,d=d+Math.imul(ae,ft)|0,T=T+Math.imul(ae,ut)|0,m=m+Math.imul(V,dt)|0,d=d+Math.imul(V,ht)|0,d=d+Math.imul(W,dt)|0,T=T+Math.imul(W,ht)|0,m=m+Math.imul(U,vt)|0,d=d+Math.imul(U,yt)|0,d=d+Math.imul(G,vt)|0,T=T+Math.imul(G,yt)|0,m=m+Math.imul(x,pt)|0,d=d+Math.imul(x,gt)|0,d=d+Math.imul($,pt)|0,T=T+Math.imul($,gt)|0;var p1=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(p1>>>26)|0,p1&=67108863,m=Math.imul(Xe,ot),d=Math.imul(Xe,at),d=d+Math.imul(Ze,ot)|0,T=Math.imul(Ze,at),m=m+Math.imul(qe,lt)|0,d=d+Math.imul(qe,ct)|0,d=d+Math.imul(Be,lt)|0,T=T+Math.imul(Be,ct)|0,m=m+Math.imul(Ee,ft)|0,d=d+Math.imul(Ee,ut)|0,d=d+Math.imul(Ce,ft)|0,T=T+Math.imul(Ce,ut)|0,m=m+Math.imul(re,dt)|0,d=d+Math.imul(re,ht)|0,d=d+Math.imul(ae,dt)|0,T=T+Math.imul(ae,ht)|0,m=m+Math.imul(V,vt)|0,d=d+Math.imul(V,yt)|0,d=d+Math.imul(W,vt)|0,T=T+Math.imul(W,yt)|0,m=m+Math.imul(U,pt)|0,d=d+Math.imul(U,gt)|0,d=d+Math.imul(G,pt)|0,T=T+Math.imul(G,gt)|0,m=m+Math.imul(x,mt)|0,d=d+Math.imul(x,xt)|0,d=d+Math.imul($,mt)|0,T=T+Math.imul($,xt)|0;var g1=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(g1>>>26)|0,g1&=67108863,m=Math.imul(et,ot),d=Math.imul(et,at),d=d+Math.imul(tt,ot)|0,T=Math.imul(tt,at),m=m+Math.imul(Xe,lt)|0,d=d+Math.imul(Xe,ct)|0,d=d+Math.imul(Ze,lt)|0,T=T+Math.imul(Ze,ct)|0,m=m+Math.imul(qe,ft)|0,d=d+Math.imul(qe,ut)|0,d=d+Math.imul(Be,ft)|0,T=T+Math.imul(Be,ut)|0,m=m+Math.imul(Ee,dt)|0,d=d+Math.imul(Ee,ht)|0,d=d+Math.imul(Ce,dt)|0,T=T+Math.imul(Ce,ht)|0,m=m+Math.imul(re,vt)|0,d=d+Math.imul(re,yt)|0,d=d+Math.imul(ae,vt)|0,T=T+Math.imul(ae,yt)|0,m=m+Math.imul(V,pt)|0,d=d+Math.imul(V,gt)|0,d=d+Math.imul(W,pt)|0,T=T+Math.imul(W,gt)|0,m=m+Math.imul(U,mt)|0,d=d+Math.imul(U,xt)|0,d=d+Math.imul(G,mt)|0,T=T+Math.imul(G,xt)|0,m=m+Math.imul(x,bt)|0,d=d+Math.imul(x,wt)|0,d=d+Math.imul($,bt)|0,T=T+Math.imul($,wt)|0;var m1=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(m1>>>26)|0,m1&=67108863,m=Math.imul(rt,ot),d=Math.imul(rt,at),d=d+Math.imul(nt,ot)|0,T=Math.imul(nt,at),m=m+Math.imul(et,lt)|0,d=d+Math.imul(et,ct)|0,d=d+Math.imul(tt,lt)|0,T=T+Math.imul(tt,ct)|0,m=m+Math.imul(Xe,ft)|0,d=d+Math.imul(Xe,ut)|0,d=d+Math.imul(Ze,ft)|0,T=T+Math.imul(Ze,ut)|0,m=m+Math.imul(qe,dt)|0,d=d+Math.imul(qe,ht)|0,d=d+Math.imul(Be,dt)|0,T=T+Math.imul(Be,ht)|0,m=m+Math.imul(Ee,vt)|0,d=d+Math.imul(Ee,yt)|0,d=d+Math.imul(Ce,vt)|0,T=T+Math.imul(Ce,yt)|0,m=m+Math.imul(re,pt)|0,d=d+Math.imul(re,gt)|0,d=d+Math.imul(ae,pt)|0,T=T+Math.imul(ae,gt)|0,m=m+Math.imul(V,mt)|0,d=d+Math.imul(V,xt)|0,d=d+Math.imul(W,mt)|0,T=T+Math.imul(W,xt)|0,m=m+Math.imul(U,bt)|0,d=d+Math.imul(U,wt)|0,d=d+Math.imul(G,bt)|0,T=T+Math.imul(G,wt)|0,m=m+Math.imul(x,Ct)|0,d=d+Math.imul(x,Et)|0,d=d+Math.imul($,Ct)|0,T=T+Math.imul($,Et)|0;var x1=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(x1>>>26)|0,x1&=67108863,m=Math.imul(it,ot),d=Math.imul(it,at),d=d+Math.imul(st,ot)|0,T=Math.imul(st,at),m=m+Math.imul(rt,lt)|0,d=d+Math.imul(rt,ct)|0,d=d+Math.imul(nt,lt)|0,T=T+Math.imul(nt,ct)|0,m=m+Math.imul(et,ft)|0,d=d+Math.imul(et,ut)|0,d=d+Math.imul(tt,ft)|0,T=T+Math.imul(tt,ut)|0,m=m+Math.imul(Xe,dt)|0,d=d+Math.imul(Xe,ht)|0,d=d+Math.imul(Ze,dt)|0,T=T+Math.imul(Ze,ht)|0,m=m+Math.imul(qe,vt)|0,d=d+Math.imul(qe,yt)|0,d=d+Math.imul(Be,vt)|0,T=T+Math.imul(Be,yt)|0,m=m+Math.imul(Ee,pt)|0,d=d+Math.imul(Ee,gt)|0,d=d+Math.imul(Ce,pt)|0,T=T+Math.imul(Ce,gt)|0,m=m+Math.imul(re,mt)|0,d=d+Math.imul(re,xt)|0,d=d+Math.imul(ae,mt)|0,T=T+Math.imul(ae,xt)|0,m=m+Math.imul(V,bt)|0,d=d+Math.imul(V,wt)|0,d=d+Math.imul(W,bt)|0,T=T+Math.imul(W,wt)|0,m=m+Math.imul(U,Ct)|0,d=d+Math.imul(U,Et)|0,d=d+Math.imul(G,Ct)|0,T=T+Math.imul(G,Et)|0,m=m+Math.imul(x,St)|0,d=d+Math.imul(x,kt)|0,d=d+Math.imul($,St)|0,T=T+Math.imul($,kt)|0;var b1=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(b1>>>26)|0,b1&=67108863,m=Math.imul(it,lt),d=Math.imul(it,ct),d=d+Math.imul(st,lt)|0,T=Math.imul(st,ct),m=m+Math.imul(rt,ft)|0,d=d+Math.imul(rt,ut)|0,d=d+Math.imul(nt,ft)|0,T=T+Math.imul(nt,ut)|0,m=m+Math.imul(et,dt)|0,d=d+Math.imul(et,ht)|0,d=d+Math.imul(tt,dt)|0,T=T+Math.imul(tt,ht)|0,m=m+Math.imul(Xe,vt)|0,d=d+Math.imul(Xe,yt)|0,d=d+Math.imul(Ze,vt)|0,T=T+Math.imul(Ze,yt)|0,m=m+Math.imul(qe,pt)|0,d=d+Math.imul(qe,gt)|0,d=d+Math.imul(Be,pt)|0,T=T+Math.imul(Be,gt)|0,m=m+Math.imul(Ee,mt)|0,d=d+Math.imul(Ee,xt)|0,d=d+Math.imul(Ce,mt)|0,T=T+Math.imul(Ce,xt)|0,m=m+Math.imul(re,bt)|0,d=d+Math.imul(re,wt)|0,d=d+Math.imul(ae,bt)|0,T=T+Math.imul(ae,wt)|0,m=m+Math.imul(V,Ct)|0,d=d+Math.imul(V,Et)|0,d=d+Math.imul(W,Ct)|0,T=T+Math.imul(W,Et)|0,m=m+Math.imul(U,St)|0,d=d+Math.imul(U,kt)|0,d=d+Math.imul(G,St)|0,T=T+Math.imul(G,kt)|0;var w1=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(w1>>>26)|0,w1&=67108863,m=Math.imul(it,ft),d=Math.imul(it,ut),d=d+Math.imul(st,ft)|0,T=Math.imul(st,ut),m=m+Math.imul(rt,dt)|0,d=d+Math.imul(rt,ht)|0,d=d+Math.imul(nt,dt)|0,T=T+Math.imul(nt,ht)|0,m=m+Math.imul(et,vt)|0,d=d+Math.imul(et,yt)|0,d=d+Math.imul(tt,vt)|0,T=T+Math.imul(tt,yt)|0,m=m+Math.imul(Xe,pt)|0,d=d+Math.imul(Xe,gt)|0,d=d+Math.imul(Ze,pt)|0,T=T+Math.imul(Ze,gt)|0,m=m+Math.imul(qe,mt)|0,d=d+Math.imul(qe,xt)|0,d=d+Math.imul(Be,mt)|0,T=T+Math.imul(Be,xt)|0,m=m+Math.imul(Ee,bt)|0,d=d+Math.imul(Ee,wt)|0,d=d+Math.imul(Ce,bt)|0,T=T+Math.imul(Ce,wt)|0,m=m+Math.imul(re,Ct)|0,d=d+Math.imul(re,Et)|0,d=d+Math.imul(ae,Ct)|0,T=T+Math.imul(ae,Et)|0,m=m+Math.imul(V,St)|0,d=d+Math.imul(V,kt)|0,d=d+Math.imul(W,St)|0,T=T+Math.imul(W,kt)|0;var C1=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(C1>>>26)|0,C1&=67108863,m=Math.imul(it,dt),d=Math.imul(it,ht),d=d+Math.imul(st,dt)|0,T=Math.imul(st,ht),m=m+Math.imul(rt,vt)|0,d=d+Math.imul(rt,yt)|0,d=d+Math.imul(nt,vt)|0,T=T+Math.imul(nt,yt)|0,m=m+Math.imul(et,pt)|0,d=d+Math.imul(et,gt)|0,d=d+Math.imul(tt,pt)|0,T=T+Math.imul(tt,gt)|0,m=m+Math.imul(Xe,mt)|0,d=d+Math.imul(Xe,xt)|0,d=d+Math.imul(Ze,mt)|0,T=T+Math.imul(Ze,xt)|0,m=m+Math.imul(qe,bt)|0,d=d+Math.imul(qe,wt)|0,d=d+Math.imul(Be,bt)|0,T=T+Math.imul(Be,wt)|0,m=m+Math.imul(Ee,Ct)|0,d=d+Math.imul(Ee,Et)|0,d=d+Math.imul(Ce,Ct)|0,T=T+Math.imul(Ce,Et)|0,m=m+Math.imul(re,St)|0,d=d+Math.imul(re,kt)|0,d=d+Math.imul(ae,St)|0,T=T+Math.imul(ae,kt)|0;var E1=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(E1>>>26)|0,E1&=67108863,m=Math.imul(it,vt),d=Math.imul(it,yt),d=d+Math.imul(st,vt)|0,T=Math.imul(st,yt),m=m+Math.imul(rt,pt)|0,d=d+Math.imul(rt,gt)|0,d=d+Math.imul(nt,pt)|0,T=T+Math.imul(nt,gt)|0,m=m+Math.imul(et,mt)|0,d=d+Math.imul(et,xt)|0,d=d+Math.imul(tt,mt)|0,T=T+Math.imul(tt,xt)|0,m=m+Math.imul(Xe,bt)|0,d=d+Math.imul(Xe,wt)|0,d=d+Math.imul(Ze,bt)|0,T=T+Math.imul(Ze,wt)|0,m=m+Math.imul(qe,Ct)|0,d=d+Math.imul(qe,Et)|0,d=d+Math.imul(Be,Ct)|0,T=T+Math.imul(Be,Et)|0,m=m+Math.imul(Ee,St)|0,d=d+Math.imul(Ee,kt)|0,d=d+Math.imul(Ce,St)|0,T=T+Math.imul(Ce,kt)|0;var S1=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(S1>>>26)|0,S1&=67108863,m=Math.imul(it,pt),d=Math.imul(it,gt),d=d+Math.imul(st,pt)|0,T=Math.imul(st,gt),m=m+Math.imul(rt,mt)|0,d=d+Math.imul(rt,xt)|0,d=d+Math.imul(nt,mt)|0,T=T+Math.imul(nt,xt)|0,m=m+Math.imul(et,bt)|0,d=d+Math.imul(et,wt)|0,d=d+Math.imul(tt,bt)|0,T=T+Math.imul(tt,wt)|0,m=m+Math.imul(Xe,Ct)|0,d=d+Math.imul(Xe,Et)|0,d=d+Math.imul(Ze,Ct)|0,T=T+Math.imul(Ze,Et)|0,m=m+Math.imul(qe,St)|0,d=d+Math.imul(qe,kt)|0,d=d+Math.imul(Be,St)|0,T=T+Math.imul(Be,kt)|0;var k1=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(k1>>>26)|0,k1&=67108863,m=Math.imul(it,mt),d=Math.imul(it,xt),d=d+Math.imul(st,mt)|0,T=Math.imul(st,xt),m=m+Math.imul(rt,bt)|0,d=d+Math.imul(rt,wt)|0,d=d+Math.imul(nt,bt)|0,T=T+Math.imul(nt,wt)|0,m=m+Math.imul(et,Ct)|0,d=d+Math.imul(et,Et)|0,d=d+Math.imul(tt,Ct)|0,T=T+Math.imul(tt,Et)|0,m=m+Math.imul(Xe,St)|0,d=d+Math.imul(Xe,kt)|0,d=d+Math.imul(Ze,St)|0,T=T+Math.imul(Ze,kt)|0;var A1=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(A1>>>26)|0,A1&=67108863,m=Math.imul(it,bt),d=Math.imul(it,wt),d=d+Math.imul(st,bt)|0,T=Math.imul(st,wt),m=m+Math.imul(rt,Ct)|0,d=d+Math.imul(rt,Et)|0,d=d+Math.imul(nt,Ct)|0,T=T+Math.imul(nt,Et)|0,m=m+Math.imul(et,St)|0,d=d+Math.imul(et,kt)|0,d=d+Math.imul(tt,St)|0,T=T+Math.imul(tt,kt)|0;var _1=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(_1>>>26)|0,_1&=67108863,m=Math.imul(it,Ct),d=Math.imul(it,Et),d=d+Math.imul(st,Ct)|0,T=Math.imul(st,Et),m=m+Math.imul(rt,St)|0,d=d+Math.imul(rt,kt)|0,d=d+Math.imul(nt,St)|0,T=T+Math.imul(nt,kt)|0;var T1=(R+m|0)+((d&8191)<<13)|0;R=(T+(d>>>13)|0)+(T1>>>26)|0,T1&=67108863,m=Math.imul(it,St),d=Math.imul(it,kt),d=d+Math.imul(st,St)|0,T=Math.imul(st,kt);var P1=(R+m|0)+((d&8191)<<13)|0;return R=(T+(d>>>13)|0)+(P1>>>26)|0,P1&=67108863,_[0]=ms,_[1]=xs,_[2]=bs,_[3]=ws,_[4]=Cs,_[5]=p1,_[6]=g1,_[7]=m1,_[8]=x1,_[9]=b1,_[10]=w1,_[11]=C1,_[12]=E1,_[13]=S1,_[14]=k1,_[15]=A1,_[16]=_1,_[17]=T1,_[18]=P1,R!==0&&(_[19]=R,P.length++),P};Math.imul||(E=w);function A(D,v,C){C.negative=v.negative^D.negative,C.length=D.length+v.length;for(var P=0,O=0,b=0;b>>26)|0,O+=_>>>26,_&=67108863}C.words[b]=R,P=_,_=O}return P!==0?C.words[b]=P:C.length--,C._strip()}function I(D,v,C){return A(D,v,C)}s.prototype.mulTo=function(v,C){var P,O=this.length+v.length;return this.length===10&&v.length===10?P=E(this,v,C):O<63?P=w(this,v,C):O<1024?P=A(this,v,C):P=I(this,v,C),P},s.prototype.mul=function(v){var C=new s(null);return C.words=new Array(this.length+v.length),this.mulTo(v,C)},s.prototype.mulf=function(v){var C=new s(null);return C.words=new Array(this.length+v.length),I(this,v,C)},s.prototype.imul=function(v){return this.clone().mulTo(v,this)},s.prototype.imuln=function(v){var C=v<0;C&&(v=-v),n(typeof v=="number"),n(v<67108864);for(var P=0,O=0;O>=26,P+=b/67108864|0,P+=_>>>26,this.words[O]=_&67108863}return P!==0&&(this.words[O]=P,this.length++),C?this.ineg():this},s.prototype.muln=function(v){return this.clone().imuln(v)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(v){var C=k(v);if(C.length===0)return new s(1);for(var P=this,O=0;O=0);var C=v%26,P=(v-C)/26,O=67108863>>>26-C<<26-C,b;if(C!==0){var _=0;for(b=0;b>>26-C}_&&(this.words[b]=_,this.length++)}if(P!==0){for(b=this.length-1;b>=0;b--)this.words[b+P]=this.words[b];for(b=0;b=0);var O;C?O=(C-C%26)/26:O=0;var b=v%26,_=Math.min((v-b)/26,this.length),R=67108863^67108863>>>b<_)for(this.length-=_,d=0;d=0&&(T!==0||d>=O);d--){var N=this.words[d]|0;this.words[d]=T<<26-b|N>>>b,T=N&R}return m&&T!==0&&(m.words[m.length++]=T),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(v,C,P){return n(this.negative===0),this.iushrn(v,C,P)},s.prototype.shln=function(v){return this.clone().ishln(v)},s.prototype.ushln=function(v){return this.clone().iushln(v)},s.prototype.shrn=function(v){return this.clone().ishrn(v)},s.prototype.ushrn=function(v){return this.clone().iushrn(v)},s.prototype.testn=function(v){n(typeof v=="number"&&v>=0);var C=v%26,P=(v-C)/26,O=1<=0);var C=v%26,P=(v-C)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=P)return this;if(C!==0&&P++,this.length=Math.min(P,this.length),C!==0){var O=67108863^67108863>>>C<=67108864;C++)this.words[C]-=67108864,C===this.length-1?this.words[C+1]=1:this.words[C+1]++;return this.length=Math.max(this.length,C+1),this},s.prototype.isubn=function(v){if(n(typeof v=="number"),n(v<67108864),v<0)return this.iaddn(-v);if(this.negative!==0)return this.negative=0,this.iaddn(v),this.negative=1,this;if(this.words[0]-=v,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var C=0;C>26)-(m/67108864|0),this.words[b+P]=_&67108863}for(;b>26,this.words[b+P]=_&67108863;if(R===0)return this._strip();for(n(R===-1),R=0,b=0;b>26,this.words[b]=_&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(v,C){var P=this.length-v.length,O=this.clone(),b=v,_=b.words[b.length-1]|0,R=this._countBits(_);P=26-R,P!==0&&(b=b.ushln(P),O.iushln(P),_=b.words[b.length-1]|0);var m=O.length-b.length,d;if(C!=="mod"){d=new s(null),d.length=m+1,d.words=new Array(d.length);for(var T=0;T=0;x--){var $=(O.words[b.length+x]|0)*67108864+(O.words[b.length+x-1]|0);for($=Math.min($/_|0,67108863),O._ishlnsubmul(b,$,x);O.negative!==0;)$--,O.negative=0,O._ishlnsubmul(b,1,x),O.isZero()||(O.negative^=1);d&&(d.words[x]=$)}return d&&d._strip(),O._strip(),C!=="div"&&P!==0&&O.iushrn(P),{div:d||null,mod:O}},s.prototype.divmod=function(v,C,P){if(n(!v.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var O,b,_;return this.negative!==0&&v.negative===0?(_=this.neg().divmod(v,C),C!=="mod"&&(O=_.div.neg()),C!=="div"&&(b=_.mod.neg(),P&&b.negative!==0&&b.iadd(v)),{div:O,mod:b}):this.negative===0&&v.negative!==0?(_=this.divmod(v.neg(),C),C!=="mod"&&(O=_.div.neg()),{div:O,mod:_.mod}):this.negative&v.negative?(_=this.neg().divmod(v.neg(),C),C!=="div"&&(b=_.mod.neg(),P&&b.negative!==0&&b.isub(v)),{div:_.div,mod:b}):v.length>this.length||this.cmp(v)<0?{div:new s(0),mod:this}:v.length===1?C==="div"?{div:this.divn(v.words[0]),mod:null}:C==="mod"?{div:null,mod:new s(this.modrn(v.words[0]))}:{div:this.divn(v.words[0]),mod:new s(this.modrn(v.words[0]))}:this._wordDiv(v,C)},s.prototype.div=function(v){return this.divmod(v,"div",!1).div},s.prototype.mod=function(v){return this.divmod(v,"mod",!1).mod},s.prototype.umod=function(v){return this.divmod(v,"mod",!0).mod},s.prototype.divRound=function(v){var C=this.divmod(v);if(C.mod.isZero())return C.div;var P=C.div.negative!==0?C.mod.isub(v):C.mod,O=v.ushrn(1),b=v.andln(1),_=P.cmp(O);return _<0||b===1&&_===0?C.div:C.div.negative!==0?C.div.isubn(1):C.div.iaddn(1)},s.prototype.modrn=function(v){var C=v<0;C&&(v=-v),n(v<=67108863);for(var P=(1<<26)%v,O=0,b=this.length-1;b>=0;b--)O=(P*O+(this.words[b]|0))%v;return C?-O:O},s.prototype.modn=function(v){return this.modrn(v)},s.prototype.idivn=function(v){var C=v<0;C&&(v=-v),n(v<=67108863);for(var P=0,O=this.length-1;O>=0;O--){var b=(this.words[O]|0)+P*67108864;this.words[O]=b/v|0,P=b%v}return this._strip(),C?this.ineg():this},s.prototype.divn=function(v){return this.clone().idivn(v)},s.prototype.egcd=function(v){n(v.negative===0),n(!v.isZero());var C=this,P=v.clone();C.negative!==0?C=C.umod(v):C=C.clone();for(var O=new s(1),b=new s(0),_=new s(0),R=new s(1),m=0;C.isEven()&&P.isEven();)C.iushrn(1),P.iushrn(1),++m;for(var d=P.clone(),T=C.clone();!C.isZero();){for(var N=0,x=1;!(C.words[0]&x)&&N<26;++N,x<<=1);if(N>0)for(C.iushrn(N);N-- >0;)(O.isOdd()||b.isOdd())&&(O.iadd(d),b.isub(T)),O.iushrn(1),b.iushrn(1);for(var $=0,L=1;!(P.words[0]&L)&&$<26;++$,L<<=1);if($>0)for(P.iushrn($);$-- >0;)(_.isOdd()||R.isOdd())&&(_.iadd(d),R.isub(T)),_.iushrn(1),R.iushrn(1);C.cmp(P)>=0?(C.isub(P),O.isub(_),b.isub(R)):(P.isub(C),_.isub(O),R.isub(b))}return{a:_,b:R,gcd:P.iushln(m)}},s.prototype._invmp=function(v){n(v.negative===0),n(!v.isZero());var C=this,P=v.clone();C.negative!==0?C=C.umod(v):C=C.clone();for(var O=new s(1),b=new s(0),_=P.clone();C.cmpn(1)>0&&P.cmpn(1)>0;){for(var R=0,m=1;!(C.words[0]&m)&&R<26;++R,m<<=1);if(R>0)for(C.iushrn(R);R-- >0;)O.isOdd()&&O.iadd(_),O.iushrn(1);for(var d=0,T=1;!(P.words[0]&T)&&d<26;++d,T<<=1);if(d>0)for(P.iushrn(d);d-- >0;)b.isOdd()&&b.iadd(_),b.iushrn(1);C.cmp(P)>=0?(C.isub(P),O.isub(b)):(P.isub(C),b.isub(O))}var N;return C.cmpn(1)===0?N=O:N=b,N.cmpn(0)<0&&N.iadd(v),N},s.prototype.gcd=function(v){if(this.isZero())return v.abs();if(v.isZero())return this.abs();var C=this.clone(),P=v.clone();C.negative=0,P.negative=0;for(var O=0;C.isEven()&&P.isEven();O++)C.iushrn(1),P.iushrn(1);do{for(;C.isEven();)C.iushrn(1);for(;P.isEven();)P.iushrn(1);var b=C.cmp(P);if(b<0){var _=C;C=P,P=_}else if(b===0||P.cmpn(1)===0)break;C.isub(P)}while(!0);return P.iushln(O)},s.prototype.invm=function(v){return this.egcd(v).a.umod(v)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(v){return this.words[0]&v},s.prototype.bincn=function(v){n(typeof v=="number");var C=v%26,P=(v-C)/26,O=1<>>26,R&=67108863,this.words[_]=R}return b!==0&&(this.words[_]=b,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(v){var C=v<0;if(this.negative!==0&&!C)return-1;if(this.negative===0&&C)return 1;this._strip();var P;if(this.length>1)P=1;else{C&&(v=-v),n(v<=67108863,"Number is too big");var O=this.words[0]|0;P=O===v?0:Ov.length)return 1;if(this.length=0;P--){var O=this.words[P]|0,b=v.words[P]|0;if(O!==b){Ob&&(C=1);break}}return C},s.prototype.gtn=function(v){return this.cmpn(v)===1},s.prototype.gt=function(v){return this.cmp(v)===1},s.prototype.gten=function(v){return this.cmpn(v)>=0},s.prototype.gte=function(v){return this.cmp(v)>=0},s.prototype.ltn=function(v){return this.cmpn(v)===-1},s.prototype.lt=function(v){return this.cmp(v)===-1},s.prototype.lten=function(v){return this.cmpn(v)<=0},s.prototype.lte=function(v){return this.cmp(v)<=0},s.prototype.eqn=function(v){return this.cmpn(v)===0},s.prototype.eq=function(v){return this.cmp(v)===0},s.red=function(v){return new Z(v)},s.prototype.toRed=function(v){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),v.convertTo(this)._forceRed(v)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(v){return this.red=v,this},s.prototype.forceRed=function(v){return n(!this.red,"Already a number in reduction context"),this._forceRed(v)},s.prototype.redAdd=function(v){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,v)},s.prototype.redIAdd=function(v){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,v)},s.prototype.redSub=function(v){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,v)},s.prototype.redISub=function(v){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,v)},s.prototype.redShl=function(v){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,v)},s.prototype.redMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.mul(this,v)},s.prototype.redIMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.imul(this,v)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(v){return n(this.red&&!v.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,v)};var M={k256:null,p224:null,p192:null,p25519:null};function B(D,v){this.name=D,this.p=new s(v,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}B.prototype._tmp=function(){var v=new s(null);return v.words=new Array(Math.ceil(this.n/13)),v},B.prototype.ireduce=function(v){var C=v,P;do this.split(C,this.tmp),C=this.imulK(C),C=C.iadd(this.tmp),P=C.bitLength();while(P>this.n);var O=P0?C.isub(this.p):C.strip!==void 0?C.strip():C._strip(),C},B.prototype.split=function(v,C){v.iushrn(this.n,0,C)},B.prototype.imulK=function(v){return v.imul(this.k)};function z(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(z,B),z.prototype.split=function(v,C){for(var P=4194303,O=Math.min(v.length,9),b=0;b>>22,_=R}_>>>=22,v.words[b-10]=_,_===0&&v.length>10?v.length-=10:v.length-=9},z.prototype.imulK=function(v){v.words[v.length]=0,v.words[v.length+1]=0,v.length+=2;for(var C=0,P=0;P>>=26,v.words[P]=b,C=O}return C!==0&&(v.words[v.length++]=C),v},s._prime=function(v){if(M[v])return M[v];var C;if(v==="k256")C=new z;else if(v==="p224")C=new F;else if(v==="p192")C=new K;else if(v==="p25519")C=new J;else throw new Error("Unknown prime "+v);return M[v]=C,C};function Z(D){if(typeof D=="string"){var v=s._prime(D);this.m=v.p,this.prime=v}else n(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}Z.prototype._verify1=function(v){n(v.negative===0,"red works only with positives"),n(v.red,"red works only with red numbers")},Z.prototype._verify2=function(v,C){n((v.negative|C.negative)===0,"red works only with positives"),n(v.red&&v.red===C.red,"red works only with red numbers")},Z.prototype.imod=function(v){return this.prime?this.prime.ireduce(v)._forceRed(this):(f(v,v.umod(this.m)._forceRed(this)),v)},Z.prototype.neg=function(v){return v.isZero()?v.clone():this.m.sub(v)._forceRed(this)},Z.prototype.add=function(v,C){this._verify2(v,C);var P=v.add(C);return P.cmp(this.m)>=0&&P.isub(this.m),P._forceRed(this)},Z.prototype.iadd=function(v,C){this._verify2(v,C);var P=v.iadd(C);return P.cmp(this.m)>=0&&P.isub(this.m),P},Z.prototype.sub=function(v,C){this._verify2(v,C);var P=v.sub(C);return P.cmpn(0)<0&&P.iadd(this.m),P._forceRed(this)},Z.prototype.isub=function(v,C){this._verify2(v,C);var P=v.isub(C);return P.cmpn(0)<0&&P.iadd(this.m),P},Z.prototype.shl=function(v,C){return this._verify1(v),this.imod(v.ushln(C))},Z.prototype.imul=function(v,C){return this._verify2(v,C),this.imod(v.imul(C))},Z.prototype.mul=function(v,C){return this._verify2(v,C),this.imod(v.mul(C))},Z.prototype.isqr=function(v){return this.imul(v,v.clone())},Z.prototype.sqr=function(v){return this.mul(v,v)},Z.prototype.sqrt=function(v){if(v.isZero())return v.clone();var C=this.m.andln(3);if(n(C%2===1),C===3){var P=this.m.add(new s(1)).iushrn(2);return this.pow(v,P)}for(var O=this.m.subn(1),b=0;!O.isZero()&&O.andln(1)===0;)b++,O.iushrn(1);n(!O.isZero());var _=new s(1).toRed(this),R=_.redNeg(),m=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new s(2*d*d).toRed(this);this.pow(d,m).cmp(R)!==0;)d.redIAdd(R);for(var T=this.pow(d,O),N=this.pow(v,O.addn(1).iushrn(1)),x=this.pow(v,O),$=b;x.cmp(_)!==0;){for(var L=x,U=0;L.cmp(_)!==0;U++)L=L.redSqr();n(U<$);var G=this.pow(T,new s(1).iushln($-U-1));N=N.redMul(G),T=G.redSqr(),x=x.redMul(T),$=U}return N},Z.prototype.invm=function(v){var C=v._invmp(this.m);return C.negative!==0?(C.negative=0,this.imod(C).redNeg()):this.imod(C)},Z.prototype.pow=function(v,C){if(C.isZero())return new s(1).toRed(this);if(C.cmpn(1)===0)return v.clone();var P=4,O=new Array(1<=0;b--){for(var T=C.words[b],N=d-1;N>=0;N--){var x=T>>N&1;if(_!==O[0]&&(_=this.sqr(_)),x===0&&R===0){m=0;continue}R<<=1,R|=x,m++,!(m!==P&&(b!==0||N!==0))&&(_=this.mul(_,O[R]),m=0,R=0)}d=26}return _},Z.prototype.convertTo=function(v){var C=v.umod(this.m);return C===v?C.clone():C},Z.prototype.convertFrom=function(v){var C=v.clone();return C.red=null,C},s.mont=function(v){return new ie(v)};function ie(D){Z.call(this,D),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(ie,Z),ie.prototype.convertTo=function(v){return this.imod(v.ushln(this.shift))},ie.prototype.convertFrom=function(v){var C=this.imod(v.mul(this.rinv));return C.red=null,C},ie.prototype.imul=function(v,C){if(v.isZero()||C.isZero())return v.words[0]=0,v.length=1,v;var P=v.imul(C),O=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=P.isub(O).iushrn(this.shift),_=b;return b.cmp(this.m)>=0?_=b.isub(this.m):b.cmpn(0)<0&&(_=b.iadd(this.m)),_._forceRed(this)},ie.prototype.mul=function(v,C){if(v.isZero()||C.isZero())return new s(0)._forceRed(this);var P=v.mul(C),O=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=P.isub(O).iushrn(this.shift),_=b;return b.cmp(this.m)>=0?_=b.isub(this.m):b.cmpn(0)<0&&(_=b.iadd(this.m)),_._forceRed(this)},ie.prototype.invm=function(v){var C=this.imod(v._invmp(this.m).mul(this.r2));return C._forceRed(this)}})(t,A5)})(Jm);var Aj=Jm.exports;const be=yo(Aj),_j="logger/5.7.0";let Xw=!1,Zw=!1;const Md={debug:1,default:2,info:2,warning:3,error:4,off:5};let e6=Md.default,Av=null;function Tj(){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")!=="é")throw new Error("broken implementation")}catch(t){return t.message}return null}const t6=Tj();var gp;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(gp||(gp={}));var Kn;(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"})(Kn||(Kn={}));const r6="0123456789abcdef";let q=class sr{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();Md[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(e6>Md[n])&&console.log.apply(console,r)}debug(...e){this._log(sr.levels.DEBUG,e)}info(...e){this._log(sr.levels.INFO,e)}warn(...e){this._log(sr.levels.WARNING,e)}makeError(e,r,n){if(Zw)return this.makeError("censored error",r,{});r||(r=sr.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(l=>{const c=n[l];try{if(c instanceof Uint8Array){let f="";for(let u=0;u>4],f+=r6[c[u]&15];i.push(l+"=Uint8Array(0x"+f+")")}else i.push(l+"="+JSON.stringify(c))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const s=e;let o="";switch(r){case Kn.NUMERIC_FAULT:{o="NUMERIC_FAULT";const l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":o+="-"+l;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case Kn.CALL_EXCEPTION:case Kn.INSUFFICIENT_FUNDS:case Kn.MISSING_NEW:case Kn.NONCE_EXPIRED:case Kn.REPLACEMENT_UNDERPRICED:case Kn.TRANSACTION_REPLACED:case Kn.UNPREDICTABLE_GAS_LIMIT:o=r;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=r,Object.keys(n).forEach(function(l){a[l]=n[l]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,sr.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){t6&&this.throwError("platform missing String.prototype.normalize",sr.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:t6})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,sr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,sr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,sr.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",sr.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",sr.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",sr.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return Av||(Av=new sr(_j)),Av}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",sr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Xw){if(!e)return;this.globalLogger().throwError("error censorship permanent",sr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Zw=!!e,Xw=!!r}static setLogLevel(e){const r=Md[e.toLowerCase()];if(r==null){sr.globalLogger().warn("invalid log level - "+e);return}e6=r}static from(e){return new sr(e)}};q.errors=Kn;q.levels=gp;const Pj="bytes/5.7.0",Vt=new q(Pj);function RE(t){return!!t.toHexString}function _l(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return _l(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function os(t){return Pe(t)&&!(t.length%2)||ds(t)}function n6(t){return typeof t=="number"&&t==t&&t%1===0}function ds(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!n6(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function X(t,e){if(e||(e={}),typeof t=="number"){Vt.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),_l(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),RE(t)&&(t=t.toHexString()),Pe(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":Vt.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;iX(i)),r=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(r);return e.reduce((i,s)=>(n.set(s,i),i+s.length),0),_l(n)}function ki(t){let e=X(t);if(e.length===0)return e;let r=0;for(;re&&Vt.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),_l(r)}function Pe(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const _v="0123456789abcdef";function Q(t,e){if(e||(e={}),typeof t=="number"){Vt.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=_v[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"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),RE(t))return t.toHexString();if(Pe(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":Vt.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(ds(t)){let r="0x";for(let n=0;n>4]+_v[i&15]}return r}return Vt.throwArgumentError("invalid hexlify value","value",t)}function Ii(t){if(typeof t!="string")t=Q(t);else if(!Pe(t)||t.length%2)return null;return(t.length-2)/2}function qt(t,e,r){return typeof t!="string"?t=Q(t):(!Pe(t)||t.length%2)&&Vt.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function Hr(t){let e="0x";return t.forEach(r=>{e+=Q(r).substring(2)}),e}function ni(t){const e=ME(Q(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function ME(t){typeof t!="string"&&(t=Q(t)),Pe(t)||Vt.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&Vt.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function Ia(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(os(t)){let r=X(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=Q(r.slice(0,32)),e.s=Q(r.slice(32,64))):r.length===65?(e.r=Q(r.slice(0,32)),e.s=Q(r.slice(32,64)),e.v=r[64]):Vt.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:Vt.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=Q(r.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=cf(X(e._vs),32);e._vs=Q(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&Vt.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const o=Q(i);e.s==null?e.s=o:e.s!==o&&Vt.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?Vt.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&&Vt.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Pe(e.r)?Vt.throwArgumentError("signature missing or invalid r","signature",t):e.r=He(e.r,32),e.s==null||!Pe(e.s)?Vt.throwArgumentError("signature missing or invalid s","signature",t):e.s=He(e.s,32);const r=X(e.s);r[0]>=128&&Vt.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=Q(r);e._vs&&(Pe(e._vs)||Vt.throwArgumentError("signature invalid _vs","signature",t),e._vs=He(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&Vt.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function mp(t){return t=Ia(t),Q(Ve([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const OE="bignumber/5.7.0";var Jf=be.BN;const Fi=new q(OE),Tv={},i6=9007199254740991;function Ij(t){return t!=null&&(H.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Pe(t)||typeof t=="bigint"||ds(t))}let s6=!1;class H{constructor(e,r){e!==Tv&&Fi.throwError("cannot call constructor directly; use BigNumber.from",q.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Qr(_e(this).fromTwos(e))}toTwos(e){return Qr(_e(this).toTwos(e))}abs(){return this._hex[0]==="-"?H.from(this._hex.substring(1)):this}add(e){return Qr(_e(this).add(_e(e)))}sub(e){return Qr(_e(this).sub(_e(e)))}div(e){return H.from(e).isZero()&&En("division-by-zero","div"),Qr(_e(this).div(_e(e)))}mul(e){return Qr(_e(this).mul(_e(e)))}mod(e){const r=_e(e);return r.isNeg()&&En("division-by-zero","mod"),Qr(_e(this).umod(r))}pow(e){const r=_e(e);return r.isNeg()&&En("negative-power","pow"),Qr(_e(this).pow(r))}and(e){const r=_e(e);return(this.isNegative()||r.isNeg())&&En("unbound-bitwise-result","and"),Qr(_e(this).and(r))}or(e){const r=_e(e);return(this.isNegative()||r.isNeg())&&En("unbound-bitwise-result","or"),Qr(_e(this).or(r))}xor(e){const r=_e(e);return(this.isNegative()||r.isNeg())&&En("unbound-bitwise-result","xor"),Qr(_e(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&En("negative-width","mask"),Qr(_e(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&En("negative-width","shl"),Qr(_e(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&En("negative-width","shr"),Qr(_e(this).shrn(e))}eq(e){return _e(this).eq(_e(e))}lt(e){return _e(this).lt(_e(e))}lte(e){return _e(this).lte(_e(e))}gt(e){return _e(this).gt(_e(e))}gte(e){return _e(this).gte(_e(e))}isNegative(){return this._hex[0]==="-"}isZero(){return _e(this).isZero()}toNumber(){try{return _e(this).toNumber()}catch{En("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Fi.throwError("this platform does not support BigInt",q.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?s6||(s6=!0,Fi.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Fi.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",q.errors.UNEXPECTED_ARGUMENT,{}):Fi.throwError("BigNumber.toString does not accept parameters",q.errors.UNEXPECTED_ARGUMENT,{})),_e(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof H)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new H(Tv,Yf(e)):e.match(/^-?[0-9]+$/)?new H(Tv,Yf(new Jf(e))):Fi.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&En("underflow","BigNumber.from",e),(e>=i6||e<=-i6)&&En("overflow","BigNumber.from",e),H.from(String(e));const r=e;if(typeof r=="bigint")return H.from(r.toString());if(ds(r))return H.from(Q(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return H.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(Pe(n)||n[0]==="-"&&Pe(n.substring(1))))return H.from(n)}return Fi.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Yf(t){if(typeof t!="string")return Yf(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Fi.throwArgumentError("invalid hex","value",t),t=Yf(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 Qr(t){return H.from(Yf(t))}function _e(t){const e=H.from(t).toHexString();return e[0]==="-"?new Jf("-"+e.substring(3),16):new Jf(e.substring(2),16)}function En(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Fi.throwError(t,q.errors.NUMERIC_FAULT,n)}function Rj(t){return new Jf(t,36).toString(16)}function Mj(t){return new Jf(t,16).toString(36)}const Wr=new q(OE),ff={},NE=H.from(0),$E=H.from(-1);function DE(t,e,r,n){const i={fault:e,operation:r};return n!==void 0&&(i.value=n),Wr.throwError(t,q.errors.NUMERIC_FAULT,i)}let uf="0";for(;uf.length<256;)uf+=uf;function Ym(t){if(typeof t!="number")try{t=H.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+uf.substring(0,t):Wr.throwArgumentError("invalid decimal size","decimals",t)}function Od(t,e){e==null&&(e=0);const r=Ym(e);t=H.from(t);const n=t.lt(NE);n&&(t=t.mul($E));let i=t.mod(r).toString();for(;i.length2&&Wr.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>r.length-1&&DE("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?l:(typeof e[o]!==a&&Wr.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);r=s("signed","boolean",r),n=s("width","number",n),i=s("decimals","number",i)}return n%8&&Wr.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&Wr.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new Tl(ff,r,n,i)}}class br{constructor(e,r,n,i){e!==ff&&Wr.throwError("cannot use FixedNumber constructor; use FixedNumber.from",q.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Wr.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=fi(this._value,this.format.decimals),n=fi(e._value,e.format.decimals);return br.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=fi(this._value,this.format.decimals),n=fi(e._value,e.format.decimals);return br.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=fi(this._value,this.format.decimals),n=fi(e._value,e.format.decimals);return br.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=fi(this._value,this.format.decimals),n=fi(e._value,e.format.decimals);return br.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=br.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(o6.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=br.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(o6.toFormat(r.format))),r}round(e){e==null&&(e=0);const r=this.toString().split(".");if(r.length===1&&r.push("0"),(e<0||e>80||e%1)&&Wr.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=br.from("1"+uf.substring(0,e),this.format),i=Oj.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}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&&Wr.throwArgumentError("invalid byte width","width",e);const r=H.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return He(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return br.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!Ij(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),br.fromString(Od(e,r),Tl.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=Tl.from(r),i=fi(e,n.decimals);!n.signed&&i.lt(NE)&&DE("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=He(s,n.width/8));const o=Od(i,n.decimals);return new br(ff,s,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=Tl.from(r);if(X(e).length>n.width/8)throw new Error("overflow");let i=H.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=Od(i,n.decimals);return new br(ff,s,o,n)}static from(e,r){if(typeof e=="string")return br.fromString(e,r);if(ds(e))return br.fromBytes(e,r);try{return br.fromValue(e,0,r)}catch(n){if(n.code!==q.errors.INVALID_ARGUMENT)throw n}return Wr.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const o6=br.from(1),Oj=br.from("0.5"),Nj="properties/5.7.0";var $j=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const L0=new q(Nj);function te(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function Zn(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function Ke(t){return $j(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const i=t[n];return Promise.resolve(i).then(s=>({key:n,value:s}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function Qm(t,e){(!t||typeof t!="object")&&L0.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||L0.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function nr(t){const e={};for(const r in t)e[r]=t[r];return e}const Dj={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function LE(t){if(t==null||Dj[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;rRi(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&te(e,r,Ri(n))}return e}return L0.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function Ri(t){return Lj(t)}class Ra{constructor(e){for(const r in e)this[r]=Ri(e[r])}}const mu="abi/5.7.0",Me=new q(mu),ma={};let a6={calldata:!0,memory:!0,storage:!0},Bj={calldata:!0,memory:!0};function od(t,e){if(t==="bytes"||t==="string"){if(a6[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&Bj[e])return!0;return(a6[e]||e==="payable")&&Me.throwArgumentError("invalid modifier","name",e),!1}function jj(t,e){let r=t;function n(a){Me.throwArgumentError(`unexpected character at position ${a}`,"param",t)}t=t.replace(/\s/g," ");function i(a){let l={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(l.indexed=!1),l}let s={type:"",name:"",state:{allowType:!0}},o=s;for(let a=0;aJSON.parse(i.format(e)))),JSON.stringify(n)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==Ne.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===Ne.full?", ":",")+")"):r+=this.type,e!==Ne.sighash&&(this.indexed===!0&&(r+=" indexed"),e===Ne.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?fr.fromString(e,r):fr.fromObject(e)}static fromObject(e){return fr.isParamType(e)?e:new fr(ma,{name:e.name||null,type:Ga(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(fr.fromObject):null})}static fromString(e,r){function n(i){return fr.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(jj(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function Qf(t,e){return zj(t).map(r=>fr.fromString(r,e))}class mi{constructor(e,r){e!==ma&&Me.throwError("use a static from method",q.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Nd(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return mi.isFragment(e)?e:typeof e=="string"?mi.fromString(e):mi.fromObject(e)}static fromObject(e){if(mi.isFragment(e))return e;switch(e.type){case"function":return Xn.fromObject(e);case"event":return gi.fromObject(e);case"constructor":return Qn.fromObject(e);case"error":return Wi.fromObject(e);case"fallback":case"receive":return null}return Me.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?gi.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Xn.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Qn.fromString(e.trim()):e.split(" ")[0]==="error"?Wi.fromString(e.substring(5).trim()):Me.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class gi extends mi{format(e){if(e||(e=Ne.sighash),Ne[e]||Me.throwArgumentError("invalid format type","format",e),e===Ne.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Ne.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Ne.full?", ":",")+") ",e!==Ne.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?gi.fromString(e):gi.fromObject(e)}static fromObject(e){if(gi.isEventFragment(e))return e;e.type!=="event"&&Me.throwArgumentError("invalid event object","value",e);const r={name:Xf(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(fr.fromObject):[],type:"event"};return new gi(ma,r)}static fromString(e){let r=e.match(Zf);r||Me.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:Me.warn("unknown modifier: "+i)}}),gi.fromObject({name:r[1].trim(),anonymous:n,inputs:Qf(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function BE(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&Me.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Me.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=H.from(r[1]),r[0]):t}function jE(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r)}})}function FE(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&Me.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&Me.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&Me.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Me.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&Me.throwArgumentError("unable to determine stateMutability","value",t),e}class Qn extends mi{format(e){if(e||(e=Ne.sighash),Ne[e]||Me.throwArgumentError("invalid format type","format",e),e===Ne.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===Ne.sighash&&Me.throwError("cannot format a constructor for sighash",q.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===Ne.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?Qn.fromString(e):Qn.fromObject(e)}static fromObject(e){if(Qn.isConstructorFragment(e))return e;e.type!=="constructor"&&Me.throwArgumentError("invalid constructor object","value",e);let r=FE(e);r.constant&&Me.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(fr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?H.from(e.gas):null};return new Qn(ma,n)}static fromString(e){let r={type:"constructor"};e=BE(e,r);let n=e.match(Zf);return(!n||n[1].trim()!=="constructor")&&Me.throwArgumentError("invalid constructor string","value",e),r.inputs=Qf(n[2].trim(),!1),jE(n[3].trim(),r),Qn.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class Xn extends Qn{format(e){if(e||(e=Ne.sighash),Ne[e]||Me.throwArgumentError("invalid format type","format",e),e===Ne.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Ne.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Ne.full?", ":",")+") ",e!==Ne.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?Xn.fromString(e):Xn.fromObject(e)}static fromObject(e){if(Xn.isFunctionFragment(e))return e;e.type!=="function"&&Me.throwArgumentError("invalid function object","value",e);let r=FE(e);const n={type:e.type,name:Xf(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(fr.fromObject):[],outputs:e.outputs?e.outputs.map(fr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?H.from(e.gas):null};return new Xn(ma,n)}static fromString(e){let r={type:"function"};e=BE(e,r);let n=e.split(" returns ");n.length>2&&Me.throwArgumentError("invalid function string","value",e);let i=n[0].match(Zf);if(i||Me.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&Xf(r.name),r.inputs=Qf(i[2],!1),jE(i[3].trim(),r),n.length>1){let s=n[1].match(Zf);(s[1].trim()!=""||s[3].trim()!="")&&Me.throwArgumentError("unexpected tokens","value",e),r.outputs=Qf(s[2],!1)}else r.outputs=[];return Xn.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function l6(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Me.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Wi extends mi{format(e){if(e||(e=Ne.sighash),Ne[e]||Me.throwArgumentError("invalid format type","format",e),e===Ne.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Ne.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Ne.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?Wi.fromString(e):Wi.fromObject(e)}static fromObject(e){if(Wi.isErrorFragment(e))return e;e.type!=="error"&&Me.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:Xf(e.name),inputs:e.inputs?e.inputs.map(fr.fromObject):[]};return l6(new Wi(ma,r))}static fromString(e){let r={type:"error"},n=e.match(Zf);return n||Me.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&Xf(r.name),r.inputs=Qf(n[2],!1),l6(Wi.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function Ga(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const Uj=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Xf(t){return(!t||!t.match(Uj))&&Me.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const Zf=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function zj(t){t=t.trim();let e=[],r="",n=0;for(let i=0;ithis.wordSize&&Xm.throwError("value out-of-bounds",q.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=Ve([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r)}}}class B0{constructor(e,r,n,i){te(this,"_data",X(e)),te(this,"wordSize",r||32),te(this,"_coerceFunc",n),te(this,"allowLoose",i),this._offset=0}get data(){return Q(this._data)}get consumed(){return this._offset}static coerce(e,r){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):B0.coerce(e,r)}_peekBytes(e,r,n){let i=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?i=r:Xm.throwError("data out-of-bounds",q.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new B0(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let n=this._peekBytes(0,e,!!r);return this._offset+=n.length,n.slice(0,e)}readValue(){return H.from(this.readBytes(this.wordSize))}}var zE={exports:{}};/** +Defaulting to \`null\`.`}const uE="Radio",[UB,dE]=Br(uE),[zB,VB]=UB(uE),HB=S.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:l,...c}=t,[f,u]=S.useState(null),h=Nt(e,p=>u(p)),y=S.useRef(!1),g=f?!!f.closest("form"):!0;return S.createElement(zB,{scope:r,checked:i,disabled:o},S.createElement(Be.button,Jt({type:"button",role:"radio","aria-checked":i,"data-state":hE(i),"data-disabled":o?"":void 0,disabled:o,value:a},c,{ref:h,onClick:be(t.onClick,p=>{i||l==null||l(),g&&(y.current=p.isPropagationStopped(),y.current||p.stopPropagation())})})),g&&S.createElement(GB,{control:f,bubbles:!y.current,name:n,value:a,checked:i,required:s,disabled:o,style:{transform:"translateX(-100%)"}}))}),WB="RadioIndicator",qB=S.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...i}=t,s=VB(WB,r);return S.createElement(bo,{present:n||s.checked},S.createElement(Be.span,Jt({"data-state":hE(s.checked),"data-disabled":s.disabled?"":void 0},i,{ref:e})))}),GB=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=S.useRef(null),o=_m(r),a=Tm(e);return S.useEffect(()=>{const l=s.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const h=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(h)}},[o,r,n]),S.createElement("input",Jt({type:"radio","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function hE(t){return t?"checked":"unchecked"}const KB=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],vE="RadioGroup",[JB,UY]=Br(vE,[fc,dE]),yE=fc(),pE=dE(),[YB,QB]=JB(vE),XB=S.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:u,...h}=t,y=yE(r),g=Om(c),[p,k]=pa({prop:s,defaultProp:i,onChange:u});return S.createElement(YB,{scope:r,name:n,required:o,disabled:a,value:p,onValueChange:k},S.createElement(M$,Jt({asChild:!0},y,{orientation:l,dir:g,loop:f}),S.createElement(Be.div,Jt({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:g},h,{ref:e}))))}),ZB="RadioGroupItem",eL=S.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...i}=t,s=QB(ZB,r),o=s.disabled||n,a=yE(r),l=pE(r),c=S.useRef(null),f=Nt(e,c),u=s.value===i.value,h=S.useRef(!1);return S.useEffect(()=>{const y=p=>{KB.includes(p.key)&&(h.current=!0)},g=()=>h.current=!1;return document.addEventListener("keydown",y),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",y),document.removeEventListener("keyup",g)}},[]),S.createElement(MC,Jt({asChild:!0},a,{focusable:!o,active:u}),S.createElement(HB,Jt({disabled:o,required:s.required,checked:u},l,i,{name:s.name,ref:f,onCheck:()=>s.onValueChange(i.value),onKeyDown:be(y=>{y.key==="Enter"&&y.preventDefault()}),onFocus:be(i.onFocus,()=>{var y;h.current&&((y=c.current)===null||y===void 0||y.click())})})))}),tL=S.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,i=pE(r);return S.createElement(qB,Jt({},i,n,{ref:e}))}),rL=XB,nL=eL,iL=tL;var sL=zt({defaultClassName:"io59uy8 io59uy7 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12rt",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]}),oL=zt({defaultClassName:"io59uy3 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr12nb fyvr12fz fyvr121b fyvr128n fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11ob fyvr12uz fyvr12uv fyvr12vj",variantClassNames:{size:{sm:"io59uy4 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy5 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]});const aL=t=>{const{id:e,label:r,size:n="sm",value:i,disabled:s}=t;return J.jsx(ue,{alignItems:"center",children:J.jsx(sc,{disabled:s,display:"flex",id:e,label:r,labelLocation:"right",children:J.jsx(nL,{className:oL({size:n}),value:i,id:e,disabled:s,children:J.jsx(iL,{className:sL({size:n})})})})})};S.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:i="2",name:s,options:o,size:a="sm",...l}=t;return J.jsx(rL,{disabled:n,name:s,ref:e,...l,children:J.jsx(ue,{flexDirection:r,gap:i,children:o.map(({label:c,value:f,disabled:u})=>J.jsx(aL,{id:`${s}-${f}`,label:c,size:a,value:f,disabled:u},f))})})});function Hw(t,[e,r]){return Math.min(r,Math.max(e,t))}const gE=S.forwardRef((t,e)=>S.createElement(Be.span,Ce({},t,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}))),lL=[" ","Enter","ArrowUp","ArrowDown"],cL=[" ","Enter"],Hh="Select",[Wh,Gm,fL]=Lh(Hh),[uc,zY]=Br(Hh,[fL,cc]),Km=cc(),[uL,Pa]=uc(Hh),[dL,hL]=uc(Hh),vL=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:u,disabled:h,required:y}=t,g=Km(e),[p,k]=S.useState(null),[w,E]=S.useState(null),[A,I]=S.useState(!1),M=Om(c),[j=!1,z]=pa({prop:n,defaultProp:i,onChange:s}),[F,q]=pa({prop:o,defaultProp:a,onChange:l}),G=S.useRef(null),Z=p?!!p.closest("form"):!0,[oe,D]=S.useState(new Set),v=Array.from(oe).map(C=>C.props.value).join(";");return S.createElement(p$,g,S.createElement(uL,{required:y,scope:e,trigger:p,onTriggerChange:k,valueNode:w,onValueNodeChange:E,valueNodeHasChildren:A,onValueNodeHasChildrenChange:I,contentId:Qs(),value:F,onValueChange:q,open:j,onOpenChange:z,dir:M,triggerPointerDownPosRef:G,disabled:h},S.createElement(Wh.Provider,{scope:e},S.createElement(dL,{scope:t.__scopeSelect,onNativeOptionAdd:S.useCallback(C=>{D(P=>new Set(P).add(C))},[]),onNativeOptionRemove:S.useCallback(C=>{D(P=>{const O=new Set(P);return O.delete(C),O})},[])},r)),Z?S.createElement(bE,{key:v,"aria-hidden":!0,required:y,tabIndex:-1,name:f,autoComplete:u,value:F,onChange:C=>q(C.target.value),disabled:h},F===void 0?S.createElement("option",{value:""}):null,Array.from(oe)):null))},yL="SelectTrigger",pL=S.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...i}=t,s=Km(r),o=Pa(yL,r),a=o.disabled||n,l=Nt(e,o.onTriggerChange),c=Gm(r),[f,u,h]=wE(g=>{const p=c().filter(E=>!E.disabled),k=p.find(E=>E.value===o.value),w=CE(p,g,k);w!==void 0&&o.onValueChange(w.value)}),y=()=>{a||(o.onOpenChange(!0),h())};return S.createElement(g$,Ce({asChild:!0},s),S.createElement(Be.button,Ce({type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":xE(o.value)?"":void 0},i,{ref:l,onClick:be(i.onClick,g=>{g.currentTarget.focus()}),onPointerDown:be(i.onPointerDown,g=>{const p=g.target;p.hasPointerCapture(g.pointerId)&&p.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&(y(),o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)},g.preventDefault())}),onKeyDown:be(i.onKeyDown,g=>{const p=f.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&u(g.key),!(p&&g.key===" ")&&lL.includes(g.key)&&(y(),g.preventDefault())})})))}),gL="SelectValue",mL=S.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,children:s,placeholder:o="",...a}=t,l=Pa(gL,r),{onValueNodeHasChildrenChange:c}=l,f=s!==void 0,u=Nt(e,l.onValueNodeChange);return xn(()=>{c(f)},[c,f]),S.createElement(Be.span,Ce({},a,{ref:u,style:{pointerEvents:"none"}}),xE(l.value)?S.createElement(S.Fragment,null,o):s)}),xL=S.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...i}=t;return S.createElement(Be.span,Ce({"aria-hidden":!0},i,{ref:e}),n||"▼")}),Hl="SelectContent",bL=S.forwardRef((t,e)=>{const r=Pa(Hl,t.__scopeSelect),[n,i]=S.useState();if(xn(()=>{i(new DocumentFragment)},[]),!r.open){const s=n;return s?xo.createPortal(S.createElement(mE,{scope:t.__scopeSelect},S.createElement(Wh.Slot,{scope:t.__scopeSelect},S.createElement("div",null,t.children))),s):null}return S.createElement(wL,Ce({},t,{ref:e}))}),ji=10,[mE,qh]=uc(Hl),wL=S.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:h,collisionPadding:y,sticky:g,hideWhenDetached:p,avoidCollisions:k,...w}=t,E=Pa(Hl,r),[A,I]=S.useState(null),[M,j]=S.useState(null),z=Nt(e,B=>I(B)),[F,q]=S.useState(null),[G,Z]=S.useState(null),oe=Gm(r),[D,v]=S.useState(!1),C=S.useRef(!1);S.useEffect(()=>{if(A)return NC(A)},[A]),dC();const P=S.useCallback(B=>{const[U,...W]=oe().map(L=>L.ref.current),[ee]=W.slice(-1),K=document.activeElement;for(const L of B)if(L===K||(L==null||L.scrollIntoView({block:"nearest"}),L===U&&M&&(M.scrollTop=0),L===ee&&M&&(M.scrollTop=M.scrollHeight),L==null||L.focus(),document.activeElement!==K))return},[oe,M]),O=S.useCallback(()=>P([F,A]),[P,F,A]);S.useEffect(()=>{D&&O()},[D,O]);const{onOpenChange:x,triggerPointerDownPosRef:T}=E;S.useEffect(()=>{if(A){let B={x:0,y:0};const U=ee=>{var K,L,ne,Y;B={x:Math.abs(Math.round(ee.pageX)-((K=(L=T.current)===null||L===void 0?void 0:L.x)!==null&&K!==void 0?K:0)),y:Math.abs(Math.round(ee.pageY)-((ne=(Y=T.current)===null||Y===void 0?void 0:Y.y)!==null&&ne!==void 0?ne:0))}},W=ee=>{B.x<=10&&B.y<=10?ee.preventDefault():A.contains(ee.target)||x(!1),document.removeEventListener("pointermove",U),T.current=null};return T.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",W,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",W,{capture:!0})}}},[A,x,T]),S.useEffect(()=>{const B=()=>x(!1);return window.addEventListener("blur",B),window.addEventListener("resize",B),()=>{window.removeEventListener("blur",B),window.removeEventListener("resize",B)}},[x]);const[R,b]=wE(B=>{const U=oe().filter(K=>!K.disabled),W=U.find(K=>K.ref.current===document.activeElement),ee=CE(U,B,W);ee&&setTimeout(()=>ee.ref.current.focus())}),d=S.useCallback((B,U,W)=>{const ee=!C.current&&!W;(E.value!==void 0&&E.value===U||ee)&&(q(B),ee&&(C.current=!0))},[E.value]),_=S.useCallback(()=>A==null?void 0:A.focus(),[A]),$=S.useCallback((B,U,W)=>{const ee=!C.current&&!W;(E.value!==void 0&&E.value===U||ee)&&Z(B)},[E.value]),m=n==="popper"?Ww:CL,N=m===Ww?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:h,collisionPadding:y,sticky:g,hideWhenDetached:p,avoidCollisions:k}:{};return S.createElement(mE,{scope:r,content:A,viewport:M,onViewportChange:j,itemRefCallback:d,selectedItem:F,onItemLeave:_,itemTextRefCallback:$,focusSelectedItem:O,selectedItemText:G,position:n,isPositioned:D,searchRef:R},S.createElement(VC,{as:zl,allowPinchZoom:!0},S.createElement(hC,{asChild:!0,trapped:E.open,onMountAutoFocus:B=>{B.preventDefault()},onUnmountAutoFocus:be(i,B=>{var U;(U=E.trigger)===null||U===void 0||U.focus({preventScroll:!0}),B.preventDefault()})},S.createElement(Nm,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:B=>B.preventDefault(),onDismiss:()=>E.onOpenChange(!1)},S.createElement(m,Ce({role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:B=>B.preventDefault()},w,N,{onPlaced:()=>v(!0),ref:z,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:be(w.onKeyDown,B=>{const U=B.ctrlKey||B.altKey||B.metaKey;if(B.key==="Tab"&&B.preventDefault(),!U&&B.key.length===1&&b(B.key),["ArrowUp","ArrowDown","Home","End"].includes(B.key)){let ee=oe().filter(K=>!K.disabled).map(K=>K.ref.current);if(["ArrowUp","End"].includes(B.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(B.key)){const K=B.target,L=ee.indexOf(K);ee=ee.slice(L+1)}setTimeout(()=>P(ee)),B.preventDefault()}})}))))))}),CL=S.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...i}=t,s=Pa(Hl,r),o=qh(Hl,r),[a,l]=S.useState(null),[c,f]=S.useState(null),u=Nt(e,z=>f(z)),h=Gm(r),y=S.useRef(!1),g=S.useRef(!0),{viewport:p,selectedItem:k,selectedItemText:w,focusSelectedItem:E}=o,A=S.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&c&&p&&k&&w){const z=s.trigger.getBoundingClientRect(),F=c.getBoundingClientRect(),q=s.valueNode.getBoundingClientRect(),G=w.getBoundingClientRect();if(s.dir!=="rtl"){const K=G.left-F.left,L=q.left-K,ne=z.left-L,Y=z.width+ne,ie=Math.max(Y,F.width),pe=window.innerWidth-ji,ve=Hw(L,[ji,pe-ie]);a.style.minWidth=Y+"px",a.style.left=ve+"px"}else{const K=F.right-G.right,L=window.innerWidth-q.right-K,ne=window.innerWidth-z.right-L,Y=z.width+ne,ie=Math.max(Y,F.width),pe=window.innerWidth-ji,ve=Hw(L,[ji,pe-ie]);a.style.minWidth=Y+"px",a.style.right=ve+"px"}const Z=h(),oe=window.innerHeight-ji*2,D=p.scrollHeight,v=window.getComputedStyle(c),C=parseInt(v.borderTopWidth,10),P=parseInt(v.paddingTop,10),O=parseInt(v.borderBottomWidth,10),x=parseInt(v.paddingBottom,10),T=C+P+D+x+O,R=Math.min(k.offsetHeight*5,T),b=window.getComputedStyle(p),d=parseInt(b.paddingTop,10),_=parseInt(b.paddingBottom,10),$=z.top+z.height/2-ji,m=oe-$,N=k.offsetHeight/2,B=k.offsetTop+N,U=C+P+B,W=T-U;if(U<=$){const K=k===Z[Z.length-1].ref.current;a.style.bottom="0px";const L=c.clientHeight-p.offsetTop-p.offsetHeight,ne=Math.max(m,N+(K?_:0)+L+O),Y=U+ne;a.style.height=Y+"px"}else{const K=k===Z[0].ref.current;a.style.top="0px";const ne=Math.max($,C+p.offsetTop+(K?d:0)+N)+W;a.style.height=ne+"px",p.scrollTop=U-$+p.offsetTop}a.style.margin=`${ji}px 0`,a.style.minHeight=R+"px",a.style.maxHeight=oe+"px",n==null||n(),requestAnimationFrame(()=>y.current=!0)}},[h,s.trigger,s.valueNode,a,c,p,k,w,s.dir,n]);xn(()=>A(),[A]);const[I,M]=S.useState();xn(()=>{c&&M(window.getComputedStyle(c).zIndex)},[c]);const j=S.useCallback(z=>{z&&g.current===!0&&(A(),E==null||E(),g.current=!1)},[A,E]);return S.createElement(EL,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:y,onScrollButtonChange:j},S.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:I}},S.createElement(Be.div,Ce({},i,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),Ww=S.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=ji,...s}=t,o=Km(r);return S.createElement(m$,Ce({},o,s,{ref:e,align:n,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[EL,SL]=uc(Hl,{}),qw="SelectViewport",kL=S.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=qh(qw,r),s=SL(qw,r),o=Nt(e,i.onViewportChange),a=S.useRef(0);return S.createElement(S.Fragment,null,S.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),S.createElement(Wh.Slot,{scope:r},S.createElement(Be.div,Ce({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:be(n.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:u}=s;if(u!=null&&u.current&&f){const h=Math.abs(a.current-c.scrollTop);if(h>0){const y=window.innerHeight-ji*2,g=parseFloat(f.style.minHeight),p=parseFloat(f.style.height),k=Math.max(g,p);if(k0?A:0,f.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),AL="SelectGroup",[_L,VY]=uc(AL),TL=S.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=Qs();return S.createElement(_L,{scope:r,id:i},S.createElement(Be.div,Ce({role:"group","aria-labelledby":i},n,{ref:e})))}),pp="SelectItem",[PL,IL]=uc(pp),RL=S.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=t,a=Pa(pp,r),l=qh(pp,r),c=a.value===n,[f,u]=S.useState(s??""),[h,y]=S.useState(!1),g=Nt(e,w=>{var E;return(E=l.itemRefCallback)===null||E===void 0?void 0:E.call(l,w,n,i)}),p=Qs(),k=()=>{i||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return S.createElement(PL,{scope:r,value:n,disabled:i,textId:p,isSelected:c,onItemTextChange:S.useCallback(w=>{u(E=>{var A;return E||((A=w==null?void 0:w.textContent)!==null&&A!==void 0?A:"").trim()})},[])},S.createElement(Wh.ItemSlot,{scope:r,value:n,disabled:i,textValue:f},S.createElement(Be.div,Ce({role:"option","aria-labelledby":p,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},o,{ref:g,onFocus:be(o.onFocus,()=>y(!0)),onBlur:be(o.onBlur,()=>y(!1)),onPointerUp:be(o.onPointerUp,k),onPointerMove:be(o.onPointerMove,w=>{if(i){var E;(E=l.onItemLeave)===null||E===void 0||E.call(l)}else w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(o.onPointerLeave,w=>{if(w.currentTarget===document.activeElement){var E;(E=l.onItemLeave)===null||E===void 0||E.call(l)}}),onKeyDown:be(o.onKeyDown,w=>{var E;((E=l.searchRef)===null||E===void 0?void 0:E.current)!==""&&w.key===" "||(cL.includes(w.key)&&k(),w.key===" "&&w.preventDefault())})}))))}),id="SelectItemText",ML=S.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,...s}=t,o=Pa(id,r),a=qh(id,r),l=IL(id,r),c=hL(id,r),[f,u]=S.useState(null),h=Nt(e,w=>u(w),l.onItemTextChange,w=>{var E;return(E=a.itemTextRefCallback)===null||E===void 0?void 0:E.call(a,w,l.value,l.disabled)}),y=f==null?void 0:f.textContent,g=S.useMemo(()=>S.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},y),[l.disabled,l.value,y]),{onNativeOptionAdd:p,onNativeOptionRemove:k}=c;return xn(()=>(p(g),()=>k(g)),[p,k,g]),S.createElement(S.Fragment,null,S.createElement(Be.span,Ce({id:l.textId},s,{ref:h})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?xo.createPortal(s.children,o.valueNode):null)});function xE(t){return t===""||t===void 0}const bE=S.forwardRef((t,e)=>{const{value:r,...n}=t,i=S.useRef(null),s=Nt(e,i),o=_m(r);return S.useEffect(()=>{const a=i.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&f){const u=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(u)}},[o,r]),S.createElement(gE,{asChild:!0},S.createElement("select",Ce({},n,{ref:s,defaultValue:r})))});bE.displayName="BubbleSelect";function wE(t){const e=Nn(t),r=S.useRef(""),n=S.useRef(0),i=S.useCallback(o=>{const a=r.current+o;e(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),s=S.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,s]}function CE(t,e,r){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=r?t.indexOf(r):-1;let o=OL(t,Math.max(s,0));i.length===1&&(o=o.filter(c=>c!==r));const l=o.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==r?l:void 0}function OL(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const NL=vL,$L=pL,DL=mL,BL=xL,LL=bL,jL=kL,FL=TL,UL=RL,zL=ML;var VL="gohwuma fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11tt fyvr12rt fyvr11nj",HL="gohwume _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12wk fyvr12wl fyvr12we fyvr12wf fyvr11h0 fyvr11jw fyvr11ko fyvr12uz fyvr12uv fyvr12rt fyvr12vt fyvr12vj",WL="gohwum1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12rt fyvr118c fyvr11jw fyvr11n2 fyvr12uz",qL=zt({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const GL=S.forwardRef(({children:t,className:e,...r},n)=>J.jsx(UL,{className:cn(HL,e),...r,ref:n,children:J.jsx(zL,{children:t})})),Gw=S.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:i,label:s="",description:o,labelLocation:a="hidden",name:l,options:c,placeholder:f,...u}=t;return J.jsx(sc,{disabled:n,display:"grid",id:i??l,label:s,labelLocation:a,description:o,whiteSpace:"nowrap",children:J.jsxs(NL,{disabled:n,name:l,...u,children:[J.jsxs($L,{id:i??l,className:cn(WL,qL({borderRadius:r})),ref:e,children:[J.jsx(DL,{placeholder:f}),J.jsx(ue,{as:BL,display:"inline-flex",children:J.jsx(lC,{})})]}),J.jsx(LL,{className:VL,children:J.jsx(jL,{children:J.jsx(FL,{children:c.map(({value:h,label:y,...g})=>J.jsx(GL,{value:h,...g,children:y},h))})})})]})})});S.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:i="Search",name:s="search",value:o,...a}=t,l=o?J.jsx(Hm,{icon:Im,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return J.jsx(qm,{ref:e,name:s,leftIcon:zO,controls:r||l,placeholder:i,value:o,onChange:c=>n==null?void 0:n(c),...a})});var KL=zt({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});S.forwardRef((t,e)=>{const{size:r="md",...n}=t;return J.jsx(ue,{className:KL({size:r}),color:"text50",ref:e,...n,children:J.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[J.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),J.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});S.forwardRef(({children:t},e)=>J.jsx(ue,{ref:e,width:"fit",height:"fit",onClick:r=>{r.preventDefault(),r.stopPropagation()},onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.stopPropagation())},children:t}));const EE="Switch",[JL,HY]=Br(EE);JL(EE);zt({defaultClassName:"nwwh3z7",variantClassNames:{variant:{pill:"nwwh3z8",line:"nwwh3z9 fyvr11g0"},active:{true:"fyvr12vx",false:"nwwh3zb"},disabled:{true:"fyvr12vh"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"fyvr11u5 fyvr12sb"],[{active:!1,variant:"pill"},"fyvr11ob fyvr12rz"],[{active:!0,variant:"line"},"fyvr12rt"],[{active:!1,variant:"line"},"fyvr12rz"]]});const SE="Tabs",[YL,WY]=Br(SE,[fc]);fc();YL(SE);var QL="_1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n7";S.forwardRef((t,e)=>{const{icon:r,label:n,...i}=t;return J.jsxs(ue,{className:QL,ref:e,background:"buttonGlass",...i,children:[r&&J.jsx(r,{size:"xs"}),J.jsx(Wt,{children:n})]})});const XL="ToastProvider",[ZL,qY,ej]=Lh("Toast"),[kE,GY]=Br("Toast",[ej]),[KY,AE]=kE(XL),Kw="toast.viewportPause",Jw="toast.viewportResume",Gh="Toast",tj="toast.swipeStart",rj="toast.swipeMove",nj="toast.swipeCancel",ij="toast.swipeEnd",[sj,oj]=kE(Gh,{onClose(){}}),aj=S.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:f,onSwipeMove:u,onSwipeCancel:h,onSwipeEnd:y,...g}=t,p=AE(Gh,r),[k,w]=S.useState(null),E=Nt(e,v=>w(v)),A=S.useRef(null),I=S.useRef(null),M=i||p.duration,j=S.useRef(0),z=S.useRef(M),F=S.useRef(0),{onToastAdd:q,onToastRemove:G}=p,Z=Nn(()=>{var v;(k==null?void 0:k.contains(document.activeElement))&&((v=p.viewport)===null||v===void 0||v.focus()),o()}),oe=S.useCallback(v=>{!v||v===1/0||(window.clearTimeout(F.current),j.current=new Date().getTime(),F.current=window.setTimeout(Z,v))},[Z]);S.useEffect(()=>{const v=p.viewport;if(v){const C=()=>{oe(z.current),c==null||c()},P=()=>{const O=new Date().getTime()-j.current;z.current=z.current-O,window.clearTimeout(F.current),l==null||l()};return v.addEventListener(Kw,P),v.addEventListener(Jw,C),()=>{v.removeEventListener(Kw,P),v.removeEventListener(Jw,C)}}},[p.viewport,M,l,c,oe]),S.useEffect(()=>{s&&!p.isClosePausedRef.current&&oe(M)},[s,M,p.isClosePausedRef,oe]),S.useEffect(()=>(q(),()=>G()),[q,G]);const D=S.useMemo(()=>k?TE(k):null,[k]);return p.viewport?S.createElement(S.Fragment,null,D&&S.createElement(lj,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},D),S.createElement(sj,{scope:r,onClose:Z},xo.createPortal(S.createElement(ZL.ItemSlot,{scope:r},S.createElement(mN,{asChild:!0,onEscapeKeyDown:be(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||Z(),p.isFocusedToastEscapeKeyDownRef.current=!1})},S.createElement(Be.li,Ce({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection},g,{ref:E,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:be(t.onKeyDown,v=>{v.key==="Escape"&&(a==null||a(v.nativeEvent),v.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,Z()))}),onPointerDown:be(t.onPointerDown,v=>{v.button===0&&(A.current={x:v.clientX,y:v.clientY})}),onPointerMove:be(t.onPointerMove,v=>{if(!A.current)return;const C=v.clientX-A.current.x,P=v.clientY-A.current.y,O=!!I.current,x=["left","right"].includes(p.swipeDirection),T=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,R=x?T(0,C):0,b=x?0:T(0,P),d=v.pointerType==="touch"?10:2,_={x:R,y:b},$={originalEvent:v,delta:_};O?(I.current=_,sd(rj,u,$,{discrete:!1})):Yw(_,p.swipeDirection,d)?(I.current=_,sd(tj,f,$,{discrete:!1}),v.target.setPointerCapture(v.pointerId)):(Math.abs(C)>d||Math.abs(P)>d)&&(A.current=null)}),onPointerUp:be(t.onPointerUp,v=>{const C=I.current,P=v.target;if(P.hasPointerCapture(v.pointerId)&&P.releasePointerCapture(v.pointerId),I.current=null,A.current=null,C){const O=v.currentTarget,x={originalEvent:v,delta:C};Yw(C,p.swipeDirection,p.swipeThreshold)?sd(ij,y,x,{discrete:!0}):sd(nj,h,x,{discrete:!0}),O.addEventListener("click",T=>T.preventDefault(),{once:!0})}})})))),p.viewport))):null});aj.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${Gh}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const lj=t=>{const{__scopeToast:e,children:r,...n}=t,i=AE(Gh,e),[s,o]=S.useState(!1),[a,l]=S.useState(!1);return hj(()=>o(!0)),S.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:S.createElement(PC,{asChild:!0},S.createElement(gE,n,s&&S.createElement(S.Fragment,null,i.label," ",r)))},cj="ToastAction",fj=S.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?S.createElement(_E,{altText:r,asChild:!0},S.createElement(dj,Ce({},n,{ref:e}))):null});fj.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${cj}\``)}};const uj="ToastClose",dj=S.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,i=oj(uj,r);return S.createElement(_E,{asChild:!0},S.createElement(Be.button,Ce({type:"button"},n,{ref:e,onClick:be(t.onClick,i.onClose)})))}),_E=S.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...i}=t;return S.createElement(Be.div,Ce({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},i,{ref:e}))});function TE(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),vj(n)){const i=n.ariaHidden||n.hidden||n.style.display==="none",s=n.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...TE(n))}}),e}function sd(t,e,r,{discrete:n}){const i=r.originalEvent.currentTarget,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?Pm(i,s):i.dispatchEvent(s)}const Yw=(t,e,r=0)=>{const n=Math.abs(t.x),i=Math.abs(t.y),s=n>i;return e==="left"||e==="right"?s&&n>r:!s&&i>r};function hj(t=()=>{}){const e=Nn(t);xn(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function vj(t){return t.nodeType===t.ELEMENT_NODE}zt({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});S.createContext(null);var yj="_15pztn2",pj="_15pztn1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12rt fyvr128 fyvr11h0";S.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",name:f,rows:u,resize:h=!1,...y}=t;return J.jsx(sc,{description:s,disabled:o,display:"grid",id:a??f,label:l,labelLocation:c,children:J.jsx(ue,{as:r,autoComplete:n,spellCheck:"false",className:cn(pj,h&&yj),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:i,...y})})});var gj="bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11sh fyvr128 fyvr15o fyvr11h0",mj="bnrrebe",xj=zt({defaultClassName:"bnrreb5 fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb6",sm:"bnrreb7",md:"bnrreb8",lg:"bnrreb9"},borderRadius:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]});const bj=S.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:i,src:s,symbol:o,size:a="md",...l}=t;return J.jsx(ue,{className:cn(r,xj({borderRadius:e,size:a})),style:i,flexShrink:"0",...l,children:s?J.jsx(ZC,{className:mj,disableAnimation:n,src:s}):J.jsx(Wt,{className:gj,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})}),[Kh,JY]=Br("Tooltip",[cc]);cc();const wj="TooltipProvider";Kh(wj);const PE="Tooltip";Kh(PE);const Cj="TooltipPortal";Kh(Cj,{forceMount:void 0});Kh(PE,{isInside:!1});var IE,Qw=xo;IE=Qw.createRoot,Qw.hydrateRoot;var Jm={exports:{}};const Ej={},Sj=Object.freeze(Object.defineProperty({__proto__:null,default:Ej},Symbol.toStringTag,{value:"Module"})),kj=vA(Sj);Jm.exports;(function(t){(function(e,r){function n(D,v){if(!D)throw new Error(v||"Assertion failed")}function i(D,v){D.super_=v;var C=function(){};C.prototype=v.prototype,D.prototype=new C,D.prototype.constructor=D}function s(D,v,C){if(s.isBN(D))return D;this.negative=0,this.words=null,this.length=0,this.red=null,D!==null&&((v==="le"||v==="be")&&(C=v,v=10),this._init(D||0,v||10,C||"be"))}typeof e=="object"?e.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=kj.Buffer}catch{}s.isBN=function(v){return v instanceof s?!0:v!==null&&typeof v=="object"&&v.constructor.wordSize===s.wordSize&&Array.isArray(v.words)},s.max=function(v,C){return v.cmp(C)>0?v:C},s.min=function(v,C){return v.cmp(C)<0?v:C},s.prototype._init=function(v,C,P){if(typeof v=="number")return this._initNumber(v,C,P);if(typeof v=="object")return this._initArray(v,C,P);C==="hex"&&(C=16),n(C===(C|0)&&C>=2&&C<=36),v=v.toString().replace(/\s+/g,"");var O=0;v[0]==="-"&&(O++,this.negative=1),O=0;O-=3)T=v[O]|v[O-1]<<8|v[O-2]<<16,this.words[x]|=T<>>26-R&67108863,R+=24,R>=26&&(R-=26,x++);else if(P==="le")for(O=0,x=0;O>>26-R&67108863,R+=24,R>=26&&(R-=26,x++);return this._strip()};function a(D,v){var C=D.charCodeAt(v);if(C>=48&&C<=57)return C-48;if(C>=65&&C<=70)return C-55;if(C>=97&&C<=102)return C-87;n(!1,"Invalid character in "+D)}function l(D,v,C){var P=a(D,C);return C-1>=v&&(P|=a(D,C-1)<<4),P}s.prototype._parseHex=function(v,C,P){this.length=Math.ceil((v.length-C)/6),this.words=new Array(this.length);for(var O=0;O=C;O-=2)R=l(v,C,O)<=18?(x-=18,T+=1,this.words[T]|=R>>>26):x+=8;else{var b=v.length-C;for(O=b%2===0?C+1:C;O=18?(x-=18,T+=1,this.words[T]|=R>>>26):x+=8}this._strip()};function c(D,v,C,P){for(var O=0,x=0,T=Math.min(D.length,C),R=v;R=49?x=b-49+10:b>=17?x=b-17+10:x=b,n(b>=0&&x1&&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")]=u}catch{s.prototype.inspect=u}else s.prototype.inspect=u;function u(){return(this.red?""}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"],y=[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],g=[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(v,C){v=v||10,C=C|0||1;var P;if(v===16||v==="hex"){P="";for(var O=0,x=0,T=0;T>>24-O&16777215,O+=2,O>=26&&(O-=26,T--),x!==0||T!==this.length-1?P=h[6-b.length]+b+P:P=b+P}for(x!==0&&(P=x.toString(16)+P);P.length%C!==0;)P="0"+P;return this.negative!==0&&(P="-"+P),P}if(v===(v|0)&&v>=2&&v<=36){var d=y[v],_=g[v];P="";var $=this.clone();for($.negative=0;!$.isZero();){var m=$.modrn(_).toString(v);$=$.idivn(_),$.isZero()?P=m+P:P=h[d-m.length]+m+P}for(this.isZero()&&(P="0"+P);P.length%C!==0;)P="0"+P;return this.negative!==0&&(P="-"+P),P}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var v=this.words[0];return this.length===2?v+=this.words[1]*67108864:this.length===3&&this.words[2]===1?v+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-v:v},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(v,C){return this.toArrayLike(o,v,C)}),s.prototype.toArray=function(v,C){return this.toArrayLike(Array,v,C)};var p=function(v,C){return v.allocUnsafe?v.allocUnsafe(C):new v(C)};s.prototype.toArrayLike=function(v,C,P){this._strip();var O=this.byteLength(),x=P||Math.max(1,O);n(O<=x,"byte array longer than desired length"),n(x>0,"Requested array length <= 0");var T=p(v,x),R=C==="le"?"LE":"BE";return this["_toArrayLike"+R](T,O),T},s.prototype._toArrayLikeLE=function(v,C){for(var P=0,O=0,x=0,T=0;x>8&255),P>16&255),T===6?(P>24&255),O=0,T=0):(O=R>>>24,T+=2)}if(P=0&&(v[P--]=R>>8&255),P>=0&&(v[P--]=R>>16&255),T===6?(P>=0&&(v[P--]=R>>24&255),O=0,T=0):(O=R>>>24,T+=2)}if(P>=0)for(v[P--]=O;P>=0;)v[P--]=0},Math.clz32?s.prototype._countBits=function(v){return 32-Math.clz32(v)}:s.prototype._countBits=function(v){var C=v,P=0;return C>=4096&&(P+=13,C>>>=13),C>=64&&(P+=7,C>>>=7),C>=8&&(P+=4,C>>>=4),C>=2&&(P+=2,C>>>=2),P+C},s.prototype._zeroBits=function(v){if(v===0)return 26;var C=v,P=0;return C&8191||(P+=13,C>>>=13),C&127||(P+=7,C>>>=7),C&15||(P+=4,C>>>=4),C&3||(P+=2,C>>>=2),C&1||P++,P},s.prototype.bitLength=function(){var v=this.words[this.length-1],C=this._countBits(v);return(this.length-1)*26+C};function k(D){for(var v=new Array(D.bitLength()),C=0;C>>O&1}return v}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var v=0,C=0;Cv.length?this.clone().ior(v):v.clone().ior(this)},s.prototype.uor=function(v){return this.length>v.length?this.clone().iuor(v):v.clone().iuor(this)},s.prototype.iuand=function(v){var C;this.length>v.length?C=v:C=this;for(var P=0;Pv.length?this.clone().iand(v):v.clone().iand(this)},s.prototype.uand=function(v){return this.length>v.length?this.clone().iuand(v):v.clone().iuand(this)},s.prototype.iuxor=function(v){var C,P;this.length>v.length?(C=this,P=v):(C=v,P=this);for(var O=0;Ov.length?this.clone().ixor(v):v.clone().ixor(this)},s.prototype.uxor=function(v){return this.length>v.length?this.clone().iuxor(v):v.clone().iuxor(this)},s.prototype.inotn=function(v){n(typeof v=="number"&&v>=0);var C=Math.ceil(v/26)|0,P=v%26;this._expand(C),P>0&&C--;for(var O=0;O0&&(this.words[O]=~this.words[O]&67108863>>26-P),this._strip()},s.prototype.notn=function(v){return this.clone().inotn(v)},s.prototype.setn=function(v,C){n(typeof v=="number"&&v>=0);var P=v/26|0,O=v%26;return this._expand(P+1),C?this.words[P]=this.words[P]|1<v.length?(P=this,O=v):(P=v,O=this);for(var x=0,T=0;T>>26;for(;x!==0&&T>>26;if(this.length=P.length,x!==0)this.words[this.length]=x,this.length++;else if(P!==this)for(;Tv.length?this.clone().iadd(v):v.clone().iadd(this)},s.prototype.isub=function(v){if(v.negative!==0){v.negative=0;var C=this.iadd(v);return v.negative=1,C._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(v),this.negative=1,this._normSign();var P=this.cmp(v);if(P===0)return this.negative=0,this.length=1,this.words[0]=0,this;var O,x;P>0?(O=this,x=v):(O=v,x=this);for(var T=0,R=0;R>26,this.words[R]=C&67108863;for(;T!==0&&R>26,this.words[R]=C&67108863;if(T===0&&R>>26,$=b&67108863,m=Math.min(d,v.length-1),N=Math.max(0,d-D.length+1);N<=m;N++){var B=d-N|0;O=D.words[B]|0,x=v.words[N]|0,T=O*x+$,_+=T/67108864|0,$=T&67108863}C.words[d]=$|0,b=_|0}return b!==0?C.words[d]=b|0:C.length--,C._strip()}var E=function(v,C,P){var O=v.words,x=C.words,T=P.words,R=0,b,d,_,$=O[0]|0,m=$&8191,N=$>>>13,B=O[1]|0,U=B&8191,W=B>>>13,ee=O[2]|0,K=ee&8191,L=ee>>>13,ne=O[3]|0,Y=ne&8191,ie=ne>>>13,pe=O[4]|0,ve=pe&8191,me=pe>>>13,He=O[5]|0,Le=He&8191,je=He>>>13,So=O[6]|0,Ze=So&8191,et=So>>>13,ko=O[7]|0,tt=ko&8191,rt=ko>>>13,Ao=O[8]|0,nt=Ao&8191,it=Ao>>>13,_o=O[9]|0,st=_o&8191,ot=_o>>>13,To=x[0]|0,at=To&8191,lt=To>>>13,Po=x[1]|0,ct=Po&8191,ft=Po>>>13,Io=x[2]|0,ut=Io&8191,dt=Io>>>13,Ro=x[3]|0,ht=Ro&8191,vt=Ro>>>13,Mo=x[4]|0,yt=Mo&8191,pt=Mo>>>13,Oo=x[5]|0,gt=Oo&8191,mt=Oo>>>13,No=x[6]|0,xt=No&8191,bt=No>>>13,$o=x[7]|0,wt=$o&8191,Ct=$o>>>13,Do=x[8]|0,Et=Do&8191,St=Do>>>13,Bo=x[9]|0,kt=Bo&8191,At=Bo>>>13;P.negative=v.negative^C.negative,P.length=19,b=Math.imul(m,at),d=Math.imul(m,lt),d=d+Math.imul(N,at)|0,_=Math.imul(N,lt);var ms=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(ms>>>26)|0,ms&=67108863,b=Math.imul(U,at),d=Math.imul(U,lt),d=d+Math.imul(W,at)|0,_=Math.imul(W,lt),b=b+Math.imul(m,ct)|0,d=d+Math.imul(m,ft)|0,d=d+Math.imul(N,ct)|0,_=_+Math.imul(N,ft)|0;var xs=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(xs>>>26)|0,xs&=67108863,b=Math.imul(K,at),d=Math.imul(K,lt),d=d+Math.imul(L,at)|0,_=Math.imul(L,lt),b=b+Math.imul(U,ct)|0,d=d+Math.imul(U,ft)|0,d=d+Math.imul(W,ct)|0,_=_+Math.imul(W,ft)|0,b=b+Math.imul(m,ut)|0,d=d+Math.imul(m,dt)|0,d=d+Math.imul(N,ut)|0,_=_+Math.imul(N,dt)|0;var bs=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(bs>>>26)|0,bs&=67108863,b=Math.imul(Y,at),d=Math.imul(Y,lt),d=d+Math.imul(ie,at)|0,_=Math.imul(ie,lt),b=b+Math.imul(K,ct)|0,d=d+Math.imul(K,ft)|0,d=d+Math.imul(L,ct)|0,_=_+Math.imul(L,ft)|0,b=b+Math.imul(U,ut)|0,d=d+Math.imul(U,dt)|0,d=d+Math.imul(W,ut)|0,_=_+Math.imul(W,dt)|0,b=b+Math.imul(m,ht)|0,d=d+Math.imul(m,vt)|0,d=d+Math.imul(N,ht)|0,_=_+Math.imul(N,vt)|0;var ws=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(ws>>>26)|0,ws&=67108863,b=Math.imul(ve,at),d=Math.imul(ve,lt),d=d+Math.imul(me,at)|0,_=Math.imul(me,lt),b=b+Math.imul(Y,ct)|0,d=d+Math.imul(Y,ft)|0,d=d+Math.imul(ie,ct)|0,_=_+Math.imul(ie,ft)|0,b=b+Math.imul(K,ut)|0,d=d+Math.imul(K,dt)|0,d=d+Math.imul(L,ut)|0,_=_+Math.imul(L,dt)|0,b=b+Math.imul(U,ht)|0,d=d+Math.imul(U,vt)|0,d=d+Math.imul(W,ht)|0,_=_+Math.imul(W,vt)|0,b=b+Math.imul(m,yt)|0,d=d+Math.imul(m,pt)|0,d=d+Math.imul(N,yt)|0,_=_+Math.imul(N,pt)|0;var Cs=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(Cs>>>26)|0,Cs&=67108863,b=Math.imul(Le,at),d=Math.imul(Le,lt),d=d+Math.imul(je,at)|0,_=Math.imul(je,lt),b=b+Math.imul(ve,ct)|0,d=d+Math.imul(ve,ft)|0,d=d+Math.imul(me,ct)|0,_=_+Math.imul(me,ft)|0,b=b+Math.imul(Y,ut)|0,d=d+Math.imul(Y,dt)|0,d=d+Math.imul(ie,ut)|0,_=_+Math.imul(ie,dt)|0,b=b+Math.imul(K,ht)|0,d=d+Math.imul(K,vt)|0,d=d+Math.imul(L,ht)|0,_=_+Math.imul(L,vt)|0,b=b+Math.imul(U,yt)|0,d=d+Math.imul(U,pt)|0,d=d+Math.imul(W,yt)|0,_=_+Math.imul(W,pt)|0,b=b+Math.imul(m,gt)|0,d=d+Math.imul(m,mt)|0,d=d+Math.imul(N,gt)|0,_=_+Math.imul(N,mt)|0;var p1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(p1>>>26)|0,p1&=67108863,b=Math.imul(Ze,at),d=Math.imul(Ze,lt),d=d+Math.imul(et,at)|0,_=Math.imul(et,lt),b=b+Math.imul(Le,ct)|0,d=d+Math.imul(Le,ft)|0,d=d+Math.imul(je,ct)|0,_=_+Math.imul(je,ft)|0,b=b+Math.imul(ve,ut)|0,d=d+Math.imul(ve,dt)|0,d=d+Math.imul(me,ut)|0,_=_+Math.imul(me,dt)|0,b=b+Math.imul(Y,ht)|0,d=d+Math.imul(Y,vt)|0,d=d+Math.imul(ie,ht)|0,_=_+Math.imul(ie,vt)|0,b=b+Math.imul(K,yt)|0,d=d+Math.imul(K,pt)|0,d=d+Math.imul(L,yt)|0,_=_+Math.imul(L,pt)|0,b=b+Math.imul(U,gt)|0,d=d+Math.imul(U,mt)|0,d=d+Math.imul(W,gt)|0,_=_+Math.imul(W,mt)|0,b=b+Math.imul(m,xt)|0,d=d+Math.imul(m,bt)|0,d=d+Math.imul(N,xt)|0,_=_+Math.imul(N,bt)|0;var g1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(g1>>>26)|0,g1&=67108863,b=Math.imul(tt,at),d=Math.imul(tt,lt),d=d+Math.imul(rt,at)|0,_=Math.imul(rt,lt),b=b+Math.imul(Ze,ct)|0,d=d+Math.imul(Ze,ft)|0,d=d+Math.imul(et,ct)|0,_=_+Math.imul(et,ft)|0,b=b+Math.imul(Le,ut)|0,d=d+Math.imul(Le,dt)|0,d=d+Math.imul(je,ut)|0,_=_+Math.imul(je,dt)|0,b=b+Math.imul(ve,ht)|0,d=d+Math.imul(ve,vt)|0,d=d+Math.imul(me,ht)|0,_=_+Math.imul(me,vt)|0,b=b+Math.imul(Y,yt)|0,d=d+Math.imul(Y,pt)|0,d=d+Math.imul(ie,yt)|0,_=_+Math.imul(ie,pt)|0,b=b+Math.imul(K,gt)|0,d=d+Math.imul(K,mt)|0,d=d+Math.imul(L,gt)|0,_=_+Math.imul(L,mt)|0,b=b+Math.imul(U,xt)|0,d=d+Math.imul(U,bt)|0,d=d+Math.imul(W,xt)|0,_=_+Math.imul(W,bt)|0,b=b+Math.imul(m,wt)|0,d=d+Math.imul(m,Ct)|0,d=d+Math.imul(N,wt)|0,_=_+Math.imul(N,Ct)|0;var m1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(m1>>>26)|0,m1&=67108863,b=Math.imul(nt,at),d=Math.imul(nt,lt),d=d+Math.imul(it,at)|0,_=Math.imul(it,lt),b=b+Math.imul(tt,ct)|0,d=d+Math.imul(tt,ft)|0,d=d+Math.imul(rt,ct)|0,_=_+Math.imul(rt,ft)|0,b=b+Math.imul(Ze,ut)|0,d=d+Math.imul(Ze,dt)|0,d=d+Math.imul(et,ut)|0,_=_+Math.imul(et,dt)|0,b=b+Math.imul(Le,ht)|0,d=d+Math.imul(Le,vt)|0,d=d+Math.imul(je,ht)|0,_=_+Math.imul(je,vt)|0,b=b+Math.imul(ve,yt)|0,d=d+Math.imul(ve,pt)|0,d=d+Math.imul(me,yt)|0,_=_+Math.imul(me,pt)|0,b=b+Math.imul(Y,gt)|0,d=d+Math.imul(Y,mt)|0,d=d+Math.imul(ie,gt)|0,_=_+Math.imul(ie,mt)|0,b=b+Math.imul(K,xt)|0,d=d+Math.imul(K,bt)|0,d=d+Math.imul(L,xt)|0,_=_+Math.imul(L,bt)|0,b=b+Math.imul(U,wt)|0,d=d+Math.imul(U,Ct)|0,d=d+Math.imul(W,wt)|0,_=_+Math.imul(W,Ct)|0,b=b+Math.imul(m,Et)|0,d=d+Math.imul(m,St)|0,d=d+Math.imul(N,Et)|0,_=_+Math.imul(N,St)|0;var x1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(x1>>>26)|0,x1&=67108863,b=Math.imul(st,at),d=Math.imul(st,lt),d=d+Math.imul(ot,at)|0,_=Math.imul(ot,lt),b=b+Math.imul(nt,ct)|0,d=d+Math.imul(nt,ft)|0,d=d+Math.imul(it,ct)|0,_=_+Math.imul(it,ft)|0,b=b+Math.imul(tt,ut)|0,d=d+Math.imul(tt,dt)|0,d=d+Math.imul(rt,ut)|0,_=_+Math.imul(rt,dt)|0,b=b+Math.imul(Ze,ht)|0,d=d+Math.imul(Ze,vt)|0,d=d+Math.imul(et,ht)|0,_=_+Math.imul(et,vt)|0,b=b+Math.imul(Le,yt)|0,d=d+Math.imul(Le,pt)|0,d=d+Math.imul(je,yt)|0,_=_+Math.imul(je,pt)|0,b=b+Math.imul(ve,gt)|0,d=d+Math.imul(ve,mt)|0,d=d+Math.imul(me,gt)|0,_=_+Math.imul(me,mt)|0,b=b+Math.imul(Y,xt)|0,d=d+Math.imul(Y,bt)|0,d=d+Math.imul(ie,xt)|0,_=_+Math.imul(ie,bt)|0,b=b+Math.imul(K,wt)|0,d=d+Math.imul(K,Ct)|0,d=d+Math.imul(L,wt)|0,_=_+Math.imul(L,Ct)|0,b=b+Math.imul(U,Et)|0,d=d+Math.imul(U,St)|0,d=d+Math.imul(W,Et)|0,_=_+Math.imul(W,St)|0,b=b+Math.imul(m,kt)|0,d=d+Math.imul(m,At)|0,d=d+Math.imul(N,kt)|0,_=_+Math.imul(N,At)|0;var b1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(b1>>>26)|0,b1&=67108863,b=Math.imul(st,ct),d=Math.imul(st,ft),d=d+Math.imul(ot,ct)|0,_=Math.imul(ot,ft),b=b+Math.imul(nt,ut)|0,d=d+Math.imul(nt,dt)|0,d=d+Math.imul(it,ut)|0,_=_+Math.imul(it,dt)|0,b=b+Math.imul(tt,ht)|0,d=d+Math.imul(tt,vt)|0,d=d+Math.imul(rt,ht)|0,_=_+Math.imul(rt,vt)|0,b=b+Math.imul(Ze,yt)|0,d=d+Math.imul(Ze,pt)|0,d=d+Math.imul(et,yt)|0,_=_+Math.imul(et,pt)|0,b=b+Math.imul(Le,gt)|0,d=d+Math.imul(Le,mt)|0,d=d+Math.imul(je,gt)|0,_=_+Math.imul(je,mt)|0,b=b+Math.imul(ve,xt)|0,d=d+Math.imul(ve,bt)|0,d=d+Math.imul(me,xt)|0,_=_+Math.imul(me,bt)|0,b=b+Math.imul(Y,wt)|0,d=d+Math.imul(Y,Ct)|0,d=d+Math.imul(ie,wt)|0,_=_+Math.imul(ie,Ct)|0,b=b+Math.imul(K,Et)|0,d=d+Math.imul(K,St)|0,d=d+Math.imul(L,Et)|0,_=_+Math.imul(L,St)|0,b=b+Math.imul(U,kt)|0,d=d+Math.imul(U,At)|0,d=d+Math.imul(W,kt)|0,_=_+Math.imul(W,At)|0;var w1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(w1>>>26)|0,w1&=67108863,b=Math.imul(st,ut),d=Math.imul(st,dt),d=d+Math.imul(ot,ut)|0,_=Math.imul(ot,dt),b=b+Math.imul(nt,ht)|0,d=d+Math.imul(nt,vt)|0,d=d+Math.imul(it,ht)|0,_=_+Math.imul(it,vt)|0,b=b+Math.imul(tt,yt)|0,d=d+Math.imul(tt,pt)|0,d=d+Math.imul(rt,yt)|0,_=_+Math.imul(rt,pt)|0,b=b+Math.imul(Ze,gt)|0,d=d+Math.imul(Ze,mt)|0,d=d+Math.imul(et,gt)|0,_=_+Math.imul(et,mt)|0,b=b+Math.imul(Le,xt)|0,d=d+Math.imul(Le,bt)|0,d=d+Math.imul(je,xt)|0,_=_+Math.imul(je,bt)|0,b=b+Math.imul(ve,wt)|0,d=d+Math.imul(ve,Ct)|0,d=d+Math.imul(me,wt)|0,_=_+Math.imul(me,Ct)|0,b=b+Math.imul(Y,Et)|0,d=d+Math.imul(Y,St)|0,d=d+Math.imul(ie,Et)|0,_=_+Math.imul(ie,St)|0,b=b+Math.imul(K,kt)|0,d=d+Math.imul(K,At)|0,d=d+Math.imul(L,kt)|0,_=_+Math.imul(L,At)|0;var C1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(C1>>>26)|0,C1&=67108863,b=Math.imul(st,ht),d=Math.imul(st,vt),d=d+Math.imul(ot,ht)|0,_=Math.imul(ot,vt),b=b+Math.imul(nt,yt)|0,d=d+Math.imul(nt,pt)|0,d=d+Math.imul(it,yt)|0,_=_+Math.imul(it,pt)|0,b=b+Math.imul(tt,gt)|0,d=d+Math.imul(tt,mt)|0,d=d+Math.imul(rt,gt)|0,_=_+Math.imul(rt,mt)|0,b=b+Math.imul(Ze,xt)|0,d=d+Math.imul(Ze,bt)|0,d=d+Math.imul(et,xt)|0,_=_+Math.imul(et,bt)|0,b=b+Math.imul(Le,wt)|0,d=d+Math.imul(Le,Ct)|0,d=d+Math.imul(je,wt)|0,_=_+Math.imul(je,Ct)|0,b=b+Math.imul(ve,Et)|0,d=d+Math.imul(ve,St)|0,d=d+Math.imul(me,Et)|0,_=_+Math.imul(me,St)|0,b=b+Math.imul(Y,kt)|0,d=d+Math.imul(Y,At)|0,d=d+Math.imul(ie,kt)|0,_=_+Math.imul(ie,At)|0;var E1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(E1>>>26)|0,E1&=67108863,b=Math.imul(st,yt),d=Math.imul(st,pt),d=d+Math.imul(ot,yt)|0,_=Math.imul(ot,pt),b=b+Math.imul(nt,gt)|0,d=d+Math.imul(nt,mt)|0,d=d+Math.imul(it,gt)|0,_=_+Math.imul(it,mt)|0,b=b+Math.imul(tt,xt)|0,d=d+Math.imul(tt,bt)|0,d=d+Math.imul(rt,xt)|0,_=_+Math.imul(rt,bt)|0,b=b+Math.imul(Ze,wt)|0,d=d+Math.imul(Ze,Ct)|0,d=d+Math.imul(et,wt)|0,_=_+Math.imul(et,Ct)|0,b=b+Math.imul(Le,Et)|0,d=d+Math.imul(Le,St)|0,d=d+Math.imul(je,Et)|0,_=_+Math.imul(je,St)|0,b=b+Math.imul(ve,kt)|0,d=d+Math.imul(ve,At)|0,d=d+Math.imul(me,kt)|0,_=_+Math.imul(me,At)|0;var S1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(S1>>>26)|0,S1&=67108863,b=Math.imul(st,gt),d=Math.imul(st,mt),d=d+Math.imul(ot,gt)|0,_=Math.imul(ot,mt),b=b+Math.imul(nt,xt)|0,d=d+Math.imul(nt,bt)|0,d=d+Math.imul(it,xt)|0,_=_+Math.imul(it,bt)|0,b=b+Math.imul(tt,wt)|0,d=d+Math.imul(tt,Ct)|0,d=d+Math.imul(rt,wt)|0,_=_+Math.imul(rt,Ct)|0,b=b+Math.imul(Ze,Et)|0,d=d+Math.imul(Ze,St)|0,d=d+Math.imul(et,Et)|0,_=_+Math.imul(et,St)|0,b=b+Math.imul(Le,kt)|0,d=d+Math.imul(Le,At)|0,d=d+Math.imul(je,kt)|0,_=_+Math.imul(je,At)|0;var k1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(k1>>>26)|0,k1&=67108863,b=Math.imul(st,xt),d=Math.imul(st,bt),d=d+Math.imul(ot,xt)|0,_=Math.imul(ot,bt),b=b+Math.imul(nt,wt)|0,d=d+Math.imul(nt,Ct)|0,d=d+Math.imul(it,wt)|0,_=_+Math.imul(it,Ct)|0,b=b+Math.imul(tt,Et)|0,d=d+Math.imul(tt,St)|0,d=d+Math.imul(rt,Et)|0,_=_+Math.imul(rt,St)|0,b=b+Math.imul(Ze,kt)|0,d=d+Math.imul(Ze,At)|0,d=d+Math.imul(et,kt)|0,_=_+Math.imul(et,At)|0;var A1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(A1>>>26)|0,A1&=67108863,b=Math.imul(st,wt),d=Math.imul(st,Ct),d=d+Math.imul(ot,wt)|0,_=Math.imul(ot,Ct),b=b+Math.imul(nt,Et)|0,d=d+Math.imul(nt,St)|0,d=d+Math.imul(it,Et)|0,_=_+Math.imul(it,St)|0,b=b+Math.imul(tt,kt)|0,d=d+Math.imul(tt,At)|0,d=d+Math.imul(rt,kt)|0,_=_+Math.imul(rt,At)|0;var _1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(_1>>>26)|0,_1&=67108863,b=Math.imul(st,Et),d=Math.imul(st,St),d=d+Math.imul(ot,Et)|0,_=Math.imul(ot,St),b=b+Math.imul(nt,kt)|0,d=d+Math.imul(nt,At)|0,d=d+Math.imul(it,kt)|0,_=_+Math.imul(it,At)|0;var T1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(T1>>>26)|0,T1&=67108863,b=Math.imul(st,kt),d=Math.imul(st,At),d=d+Math.imul(ot,kt)|0,_=Math.imul(ot,At);var P1=(R+b|0)+((d&8191)<<13)|0;return R=(_+(d>>>13)|0)+(P1>>>26)|0,P1&=67108863,T[0]=ms,T[1]=xs,T[2]=bs,T[3]=ws,T[4]=Cs,T[5]=p1,T[6]=g1,T[7]=m1,T[8]=x1,T[9]=b1,T[10]=w1,T[11]=C1,T[12]=E1,T[13]=S1,T[14]=k1,T[15]=A1,T[16]=_1,T[17]=T1,T[18]=P1,R!==0&&(T[19]=R,P.length++),P};Math.imul||(E=w);function A(D,v,C){C.negative=v.negative^D.negative,C.length=D.length+v.length;for(var P=0,O=0,x=0;x>>26)|0,O+=T>>>26,T&=67108863}C.words[x]=R,P=T,T=O}return P!==0?C.words[x]=P:C.length--,C._strip()}function I(D,v,C){return A(D,v,C)}s.prototype.mulTo=function(v,C){var P,O=this.length+v.length;return this.length===10&&v.length===10?P=E(this,v,C):O<63?P=w(this,v,C):O<1024?P=A(this,v,C):P=I(this,v,C),P},s.prototype.mul=function(v){var C=new s(null);return C.words=new Array(this.length+v.length),this.mulTo(v,C)},s.prototype.mulf=function(v){var C=new s(null);return C.words=new Array(this.length+v.length),I(this,v,C)},s.prototype.imul=function(v){return this.clone().mulTo(v,this)},s.prototype.imuln=function(v){var C=v<0;C&&(v=-v),n(typeof v=="number"),n(v<67108864);for(var P=0,O=0;O>=26,P+=x/67108864|0,P+=T>>>26,this.words[O]=T&67108863}return P!==0&&(this.words[O]=P,this.length++),C?this.ineg():this},s.prototype.muln=function(v){return this.clone().imuln(v)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(v){var C=k(v);if(C.length===0)return new s(1);for(var P=this,O=0;O=0);var C=v%26,P=(v-C)/26,O=67108863>>>26-C<<26-C,x;if(C!==0){var T=0;for(x=0;x>>26-C}T&&(this.words[x]=T,this.length++)}if(P!==0){for(x=this.length-1;x>=0;x--)this.words[x+P]=this.words[x];for(x=0;x=0);var O;C?O=(C-C%26)/26:O=0;var x=v%26,T=Math.min((v-x)/26,this.length),R=67108863^67108863>>>x<T)for(this.length-=T,d=0;d=0&&(_!==0||d>=O);d--){var $=this.words[d]|0;this.words[d]=_<<26-x|$>>>x,_=$&R}return b&&_!==0&&(b.words[b.length++]=_),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(v,C,P){return n(this.negative===0),this.iushrn(v,C,P)},s.prototype.shln=function(v){return this.clone().ishln(v)},s.prototype.ushln=function(v){return this.clone().iushln(v)},s.prototype.shrn=function(v){return this.clone().ishrn(v)},s.prototype.ushrn=function(v){return this.clone().iushrn(v)},s.prototype.testn=function(v){n(typeof v=="number"&&v>=0);var C=v%26,P=(v-C)/26,O=1<=0);var C=v%26,P=(v-C)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=P)return this;if(C!==0&&P++,this.length=Math.min(P,this.length),C!==0){var O=67108863^67108863>>>C<=67108864;C++)this.words[C]-=67108864,C===this.length-1?this.words[C+1]=1:this.words[C+1]++;return this.length=Math.max(this.length,C+1),this},s.prototype.isubn=function(v){if(n(typeof v=="number"),n(v<67108864),v<0)return this.iaddn(-v);if(this.negative!==0)return this.negative=0,this.iaddn(v),this.negative=1,this;if(this.words[0]-=v,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var C=0;C>26)-(b/67108864|0),this.words[x+P]=T&67108863}for(;x>26,this.words[x+P]=T&67108863;if(R===0)return this._strip();for(n(R===-1),R=0,x=0;x>26,this.words[x]=T&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(v,C){var P=this.length-v.length,O=this.clone(),x=v,T=x.words[x.length-1]|0,R=this._countBits(T);P=26-R,P!==0&&(x=x.ushln(P),O.iushln(P),T=x.words[x.length-1]|0);var b=O.length-x.length,d;if(C!=="mod"){d=new s(null),d.length=b+1,d.words=new Array(d.length);for(var _=0;_=0;m--){var N=(O.words[x.length+m]|0)*67108864+(O.words[x.length+m-1]|0);for(N=Math.min(N/T|0,67108863),O._ishlnsubmul(x,N,m);O.negative!==0;)N--,O.negative=0,O._ishlnsubmul(x,1,m),O.isZero()||(O.negative^=1);d&&(d.words[m]=N)}return d&&d._strip(),O._strip(),C!=="div"&&P!==0&&O.iushrn(P),{div:d||null,mod:O}},s.prototype.divmod=function(v,C,P){if(n(!v.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var O,x,T;return this.negative!==0&&v.negative===0?(T=this.neg().divmod(v,C),C!=="mod"&&(O=T.div.neg()),C!=="div"&&(x=T.mod.neg(),P&&x.negative!==0&&x.iadd(v)),{div:O,mod:x}):this.negative===0&&v.negative!==0?(T=this.divmod(v.neg(),C),C!=="mod"&&(O=T.div.neg()),{div:O,mod:T.mod}):this.negative&v.negative?(T=this.neg().divmod(v.neg(),C),C!=="div"&&(x=T.mod.neg(),P&&x.negative!==0&&x.isub(v)),{div:T.div,mod:x}):v.length>this.length||this.cmp(v)<0?{div:new s(0),mod:this}:v.length===1?C==="div"?{div:this.divn(v.words[0]),mod:null}:C==="mod"?{div:null,mod:new s(this.modrn(v.words[0]))}:{div:this.divn(v.words[0]),mod:new s(this.modrn(v.words[0]))}:this._wordDiv(v,C)},s.prototype.div=function(v){return this.divmod(v,"div",!1).div},s.prototype.mod=function(v){return this.divmod(v,"mod",!1).mod},s.prototype.umod=function(v){return this.divmod(v,"mod",!0).mod},s.prototype.divRound=function(v){var C=this.divmod(v);if(C.mod.isZero())return C.div;var P=C.div.negative!==0?C.mod.isub(v):C.mod,O=v.ushrn(1),x=v.andln(1),T=P.cmp(O);return T<0||x===1&&T===0?C.div:C.div.negative!==0?C.div.isubn(1):C.div.iaddn(1)},s.prototype.modrn=function(v){var C=v<0;C&&(v=-v),n(v<=67108863);for(var P=(1<<26)%v,O=0,x=this.length-1;x>=0;x--)O=(P*O+(this.words[x]|0))%v;return C?-O:O},s.prototype.modn=function(v){return this.modrn(v)},s.prototype.idivn=function(v){var C=v<0;C&&(v=-v),n(v<=67108863);for(var P=0,O=this.length-1;O>=0;O--){var x=(this.words[O]|0)+P*67108864;this.words[O]=x/v|0,P=x%v}return this._strip(),C?this.ineg():this},s.prototype.divn=function(v){return this.clone().idivn(v)},s.prototype.egcd=function(v){n(v.negative===0),n(!v.isZero());var C=this,P=v.clone();C.negative!==0?C=C.umod(v):C=C.clone();for(var O=new s(1),x=new s(0),T=new s(0),R=new s(1),b=0;C.isEven()&&P.isEven();)C.iushrn(1),P.iushrn(1),++b;for(var d=P.clone(),_=C.clone();!C.isZero();){for(var $=0,m=1;!(C.words[0]&m)&&$<26;++$,m<<=1);if($>0)for(C.iushrn($);$-- >0;)(O.isOdd()||x.isOdd())&&(O.iadd(d),x.isub(_)),O.iushrn(1),x.iushrn(1);for(var N=0,B=1;!(P.words[0]&B)&&N<26;++N,B<<=1);if(N>0)for(P.iushrn(N);N-- >0;)(T.isOdd()||R.isOdd())&&(T.iadd(d),R.isub(_)),T.iushrn(1),R.iushrn(1);C.cmp(P)>=0?(C.isub(P),O.isub(T),x.isub(R)):(P.isub(C),T.isub(O),R.isub(x))}return{a:T,b:R,gcd:P.iushln(b)}},s.prototype._invmp=function(v){n(v.negative===0),n(!v.isZero());var C=this,P=v.clone();C.negative!==0?C=C.umod(v):C=C.clone();for(var O=new s(1),x=new s(0),T=P.clone();C.cmpn(1)>0&&P.cmpn(1)>0;){for(var R=0,b=1;!(C.words[0]&b)&&R<26;++R,b<<=1);if(R>0)for(C.iushrn(R);R-- >0;)O.isOdd()&&O.iadd(T),O.iushrn(1);for(var d=0,_=1;!(P.words[0]&_)&&d<26;++d,_<<=1);if(d>0)for(P.iushrn(d);d-- >0;)x.isOdd()&&x.iadd(T),x.iushrn(1);C.cmp(P)>=0?(C.isub(P),O.isub(x)):(P.isub(C),x.isub(O))}var $;return C.cmpn(1)===0?$=O:$=x,$.cmpn(0)<0&&$.iadd(v),$},s.prototype.gcd=function(v){if(this.isZero())return v.abs();if(v.isZero())return this.abs();var C=this.clone(),P=v.clone();C.negative=0,P.negative=0;for(var O=0;C.isEven()&&P.isEven();O++)C.iushrn(1),P.iushrn(1);do{for(;C.isEven();)C.iushrn(1);for(;P.isEven();)P.iushrn(1);var x=C.cmp(P);if(x<0){var T=C;C=P,P=T}else if(x===0||P.cmpn(1)===0)break;C.isub(P)}while(!0);return P.iushln(O)},s.prototype.invm=function(v){return this.egcd(v).a.umod(v)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(v){return this.words[0]&v},s.prototype.bincn=function(v){n(typeof v=="number");var C=v%26,P=(v-C)/26,O=1<>>26,R&=67108863,this.words[T]=R}return x!==0&&(this.words[T]=x,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(v){var C=v<0;if(this.negative!==0&&!C)return-1;if(this.negative===0&&C)return 1;this._strip();var P;if(this.length>1)P=1;else{C&&(v=-v),n(v<=67108863,"Number is too big");var O=this.words[0]|0;P=O===v?0:Ov.length)return 1;if(this.length=0;P--){var O=this.words[P]|0,x=v.words[P]|0;if(O!==x){Ox&&(C=1);break}}return C},s.prototype.gtn=function(v){return this.cmpn(v)===1},s.prototype.gt=function(v){return this.cmp(v)===1},s.prototype.gten=function(v){return this.cmpn(v)>=0},s.prototype.gte=function(v){return this.cmp(v)>=0},s.prototype.ltn=function(v){return this.cmpn(v)===-1},s.prototype.lt=function(v){return this.cmp(v)===-1},s.prototype.lten=function(v){return this.cmpn(v)<=0},s.prototype.lte=function(v){return this.cmp(v)<=0},s.prototype.eqn=function(v){return this.cmpn(v)===0},s.prototype.eq=function(v){return this.cmp(v)===0},s.red=function(v){return new Z(v)},s.prototype.toRed=function(v){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),v.convertTo(this)._forceRed(v)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(v){return this.red=v,this},s.prototype.forceRed=function(v){return n(!this.red,"Already a number in reduction context"),this._forceRed(v)},s.prototype.redAdd=function(v){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,v)},s.prototype.redIAdd=function(v){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,v)},s.prototype.redSub=function(v){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,v)},s.prototype.redISub=function(v){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,v)},s.prototype.redShl=function(v){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,v)},s.prototype.redMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.mul(this,v)},s.prototype.redIMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.imul(this,v)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(v){return n(this.red&&!v.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,v)};var M={k256:null,p224:null,p192:null,p25519:null};function j(D,v){this.name=D,this.p=new s(v,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}j.prototype._tmp=function(){var v=new s(null);return v.words=new Array(Math.ceil(this.n/13)),v},j.prototype.ireduce=function(v){var C=v,P;do this.split(C,this.tmp),C=this.imulK(C),C=C.iadd(this.tmp),P=C.bitLength();while(P>this.n);var O=P0?C.isub(this.p):C.strip!==void 0?C.strip():C._strip(),C},j.prototype.split=function(v,C){v.iushrn(this.n,0,C)},j.prototype.imulK=function(v){return v.imul(this.k)};function z(){j.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(z,j),z.prototype.split=function(v,C){for(var P=4194303,O=Math.min(v.length,9),x=0;x>>22,T=R}T>>>=22,v.words[x-10]=T,T===0&&v.length>10?v.length-=10:v.length-=9},z.prototype.imulK=function(v){v.words[v.length]=0,v.words[v.length+1]=0,v.length+=2;for(var C=0,P=0;P>>=26,v.words[P]=x,C=O}return C!==0&&(v.words[v.length++]=C),v},s._prime=function(v){if(M[v])return M[v];var C;if(v==="k256")C=new z;else if(v==="p224")C=new F;else if(v==="p192")C=new q;else if(v==="p25519")C=new G;else throw new Error("Unknown prime "+v);return M[v]=C,C};function Z(D){if(typeof D=="string"){var v=s._prime(D);this.m=v.p,this.prime=v}else n(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}Z.prototype._verify1=function(v){n(v.negative===0,"red works only with positives"),n(v.red,"red works only with red numbers")},Z.prototype._verify2=function(v,C){n((v.negative|C.negative)===0,"red works only with positives"),n(v.red&&v.red===C.red,"red works only with red numbers")},Z.prototype.imod=function(v){return this.prime?this.prime.ireduce(v)._forceRed(this):(f(v,v.umod(this.m)._forceRed(this)),v)},Z.prototype.neg=function(v){return v.isZero()?v.clone():this.m.sub(v)._forceRed(this)},Z.prototype.add=function(v,C){this._verify2(v,C);var P=v.add(C);return P.cmp(this.m)>=0&&P.isub(this.m),P._forceRed(this)},Z.prototype.iadd=function(v,C){this._verify2(v,C);var P=v.iadd(C);return P.cmp(this.m)>=0&&P.isub(this.m),P},Z.prototype.sub=function(v,C){this._verify2(v,C);var P=v.sub(C);return P.cmpn(0)<0&&P.iadd(this.m),P._forceRed(this)},Z.prototype.isub=function(v,C){this._verify2(v,C);var P=v.isub(C);return P.cmpn(0)<0&&P.iadd(this.m),P},Z.prototype.shl=function(v,C){return this._verify1(v),this.imod(v.ushln(C))},Z.prototype.imul=function(v,C){return this._verify2(v,C),this.imod(v.imul(C))},Z.prototype.mul=function(v,C){return this._verify2(v,C),this.imod(v.mul(C))},Z.prototype.isqr=function(v){return this.imul(v,v.clone())},Z.prototype.sqr=function(v){return this.mul(v,v)},Z.prototype.sqrt=function(v){if(v.isZero())return v.clone();var C=this.m.andln(3);if(n(C%2===1),C===3){var P=this.m.add(new s(1)).iushrn(2);return this.pow(v,P)}for(var O=this.m.subn(1),x=0;!O.isZero()&&O.andln(1)===0;)x++,O.iushrn(1);n(!O.isZero());var T=new s(1).toRed(this),R=T.redNeg(),b=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new s(2*d*d).toRed(this);this.pow(d,b).cmp(R)!==0;)d.redIAdd(R);for(var _=this.pow(d,O),$=this.pow(v,O.addn(1).iushrn(1)),m=this.pow(v,O),N=x;m.cmp(T)!==0;){for(var B=m,U=0;B.cmp(T)!==0;U++)B=B.redSqr();n(U=0;x--){for(var _=C.words[x],$=d-1;$>=0;$--){var m=_>>$&1;if(T!==O[0]&&(T=this.sqr(T)),m===0&&R===0){b=0;continue}R<<=1,R|=m,b++,!(b!==P&&(x!==0||$!==0))&&(T=this.mul(T,O[R]),b=0,R=0)}d=26}return T},Z.prototype.convertTo=function(v){var C=v.umod(this.m);return C===v?C.clone():C},Z.prototype.convertFrom=function(v){var C=v.clone();return C.red=null,C},s.mont=function(v){return new oe(v)};function oe(D){Z.call(this,D),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(oe,Z),oe.prototype.convertTo=function(v){return this.imod(v.ushln(this.shift))},oe.prototype.convertFrom=function(v){var C=this.imod(v.mul(this.rinv));return C.red=null,C},oe.prototype.imul=function(v,C){if(v.isZero()||C.isZero())return v.words[0]=0,v.length=1,v;var P=v.imul(C),O=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=P.isub(O).iushrn(this.shift),T=x;return x.cmp(this.m)>=0?T=x.isub(this.m):x.cmpn(0)<0&&(T=x.iadd(this.m)),T._forceRed(this)},oe.prototype.mul=function(v,C){if(v.isZero()||C.isZero())return new s(0)._forceRed(this);var P=v.mul(C),O=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=P.isub(O).iushrn(this.shift),T=x;return x.cmp(this.m)>=0?T=x.isub(this.m):x.cmpn(0)<0&&(T=x.iadd(this.m)),T._forceRed(this)},oe.prototype.invm=function(v){var C=this.imod(v._invmp(this.m).mul(this.r2));return C._forceRed(this)}})(t,A5)})(Jm);var Aj=Jm.exports;const Ee=yo(Aj),_j="logger/5.7.0";let Xw=!1,Zw=!1;const Md={debug:1,default:2,info:2,warning:3,error:4,off:5};let e6=Md.default,Av=null;function Tj(){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")!=="é")throw new Error("broken implementation")}catch(t){return t.message}return null}const t6=Tj();var gp;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(gp||(gp={}));var Kn;(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"})(Kn||(Kn={}));const r6="0123456789abcdef";let H=class sr{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();Md[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(e6>Md[n])&&console.log.apply(console,r)}debug(...e){this._log(sr.levels.DEBUG,e)}info(...e){this._log(sr.levels.INFO,e)}warn(...e){this._log(sr.levels.WARNING,e)}makeError(e,r,n){if(Zw)return this.makeError("censored error",r,{});r||(r=sr.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(l=>{const c=n[l];try{if(c instanceof Uint8Array){let f="";for(let u=0;u>4],f+=r6[c[u]&15];i.push(l+"=Uint8Array(0x"+f+")")}else i.push(l+"="+JSON.stringify(c))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const s=e;let o="";switch(r){case Kn.NUMERIC_FAULT:{o="NUMERIC_FAULT";const l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":o+="-"+l;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case Kn.CALL_EXCEPTION:case Kn.INSUFFICIENT_FUNDS:case Kn.MISSING_NEW:case Kn.NONCE_EXPIRED:case Kn.REPLACEMENT_UNDERPRICED:case Kn.TRANSACTION_REPLACED:case Kn.UNPREDICTABLE_GAS_LIMIT:o=r;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=r,Object.keys(n).forEach(function(l){a[l]=n[l]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,sr.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){t6&&this.throwError("platform missing String.prototype.normalize",sr.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:t6})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,sr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,sr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,sr.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",sr.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",sr.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",sr.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return Av||(Av=new sr(_j)),Av}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",sr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Xw){if(!e)return;this.globalLogger().throwError("error censorship permanent",sr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Zw=!!e,Xw=!!r}static setLogLevel(e){const r=Md[e.toLowerCase()];if(r==null){sr.globalLogger().warn("invalid log level - "+e);return}e6=r}static from(e){return new sr(e)}};H.errors=Kn;H.levels=gp;const Pj="bytes/5.7.0",Vt=new H(Pj);function RE(t){return!!t.toHexString}function _l(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return _l(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function os(t){return Ie(t)&&!(t.length%2)||ds(t)}function n6(t){return typeof t=="number"&&t==t&&t%1===0}function ds(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!n6(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function X(t,e){if(e||(e={}),typeof t=="number"){Vt.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),_l(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),RE(t)&&(t=t.toHexString()),Ie(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":Vt.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;iX(i)),r=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(r);return e.reduce((i,s)=>(n.set(s,i),i+s.length),0),_l(n)}function ki(t){let e=X(t);if(e.length===0)return e;let r=0;for(;re&&Vt.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),_l(r)}function Ie(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const _v="0123456789abcdef";function Q(t,e){if(e||(e={}),typeof t=="number"){Vt.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=_v[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"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),RE(t))return t.toHexString();if(Ie(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":Vt.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(ds(t)){let r="0x";for(let n=0;n>4]+_v[i&15]}return r}return Vt.throwArgumentError("invalid hexlify value","value",t)}function Ii(t){if(typeof t!="string")t=Q(t);else if(!Ie(t)||t.length%2)return null;return(t.length-2)/2}function qt(t,e,r){return typeof t!="string"?t=Q(t):(!Ie(t)||t.length%2)&&Vt.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function Hr(t){let e="0x";return t.forEach(r=>{e+=Q(r).substring(2)}),e}function ni(t){const e=ME(Q(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function ME(t){typeof t!="string"&&(t=Q(t)),Ie(t)||Vt.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&Vt.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function Ia(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(os(t)){let r=X(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=Q(r.slice(0,32)),e.s=Q(r.slice(32,64))):r.length===65?(e.r=Q(r.slice(0,32)),e.s=Q(r.slice(32,64)),e.v=r[64]):Vt.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:Vt.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=Q(r.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=cf(X(e._vs),32);e._vs=Q(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&Vt.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const o=Q(i);e.s==null?e.s=o:e.s!==o&&Vt.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?Vt.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&&Vt.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Ie(e.r)?Vt.throwArgumentError("signature missing or invalid r","signature",t):e.r=Je(e.r,32),e.s==null||!Ie(e.s)?Vt.throwArgumentError("signature missing or invalid s","signature",t):e.s=Je(e.s,32);const r=X(e.s);r[0]>=128&&Vt.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=Q(r);e._vs&&(Ie(e._vs)||Vt.throwArgumentError("signature invalid _vs","signature",t),e._vs=Je(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&Vt.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function mp(t){return t=Ia(t),Q(Ke([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const OE="bignumber/5.7.0";var Jf=Ee.BN;const Fi=new H(OE),Tv={},i6=9007199254740991;function Ij(t){return t!=null&&(V.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Ie(t)||typeof t=="bigint"||ds(t))}let s6=!1;class V{constructor(e,r){e!==Tv&&Fi.throwError("cannot call constructor directly; use BigNumber.from",H.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Qr(Te(this).fromTwos(e))}toTwos(e){return Qr(Te(this).toTwos(e))}abs(){return this._hex[0]==="-"?V.from(this._hex.substring(1)):this}add(e){return Qr(Te(this).add(Te(e)))}sub(e){return Qr(Te(this).sub(Te(e)))}div(e){return V.from(e).isZero()&&En("division-by-zero","div"),Qr(Te(this).div(Te(e)))}mul(e){return Qr(Te(this).mul(Te(e)))}mod(e){const r=Te(e);return r.isNeg()&&En("division-by-zero","mod"),Qr(Te(this).umod(r))}pow(e){const r=Te(e);return r.isNeg()&&En("negative-power","pow"),Qr(Te(this).pow(r))}and(e){const r=Te(e);return(this.isNegative()||r.isNeg())&&En("unbound-bitwise-result","and"),Qr(Te(this).and(r))}or(e){const r=Te(e);return(this.isNegative()||r.isNeg())&&En("unbound-bitwise-result","or"),Qr(Te(this).or(r))}xor(e){const r=Te(e);return(this.isNegative()||r.isNeg())&&En("unbound-bitwise-result","xor"),Qr(Te(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&En("negative-width","mask"),Qr(Te(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&En("negative-width","shl"),Qr(Te(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&En("negative-width","shr"),Qr(Te(this).shrn(e))}eq(e){return Te(this).eq(Te(e))}lt(e){return Te(this).lt(Te(e))}lte(e){return Te(this).lte(Te(e))}gt(e){return Te(this).gt(Te(e))}gte(e){return Te(this).gte(Te(e))}isNegative(){return this._hex[0]==="-"}isZero(){return Te(this).isZero()}toNumber(){try{return Te(this).toNumber()}catch{En("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Fi.throwError("this platform does not support BigInt",H.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?s6||(s6=!0,Fi.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Fi.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",H.errors.UNEXPECTED_ARGUMENT,{}):Fi.throwError("BigNumber.toString does not accept parameters",H.errors.UNEXPECTED_ARGUMENT,{})),Te(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof V)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new V(Tv,Yf(e)):e.match(/^-?[0-9]+$/)?new V(Tv,Yf(new Jf(e))):Fi.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&En("underflow","BigNumber.from",e),(e>=i6||e<=-i6)&&En("overflow","BigNumber.from",e),V.from(String(e));const r=e;if(typeof r=="bigint")return V.from(r.toString());if(ds(r))return V.from(Q(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return V.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(Ie(n)||n[0]==="-"&&Ie(n.substring(1))))return V.from(n)}return Fi.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Yf(t){if(typeof t!="string")return Yf(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Fi.throwArgumentError("invalid hex","value",t),t=Yf(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 Qr(t){return V.from(Yf(t))}function Te(t){const e=V.from(t).toHexString();return e[0]==="-"?new Jf("-"+e.substring(3),16):new Jf(e.substring(2),16)}function En(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Fi.throwError(t,H.errors.NUMERIC_FAULT,n)}function Rj(t){return new Jf(t,36).toString(16)}function Mj(t){return new Jf(t,16).toString(36)}const Wr=new H(OE),ff={},NE=V.from(0),$E=V.from(-1);function DE(t,e,r,n){const i={fault:e,operation:r};return n!==void 0&&(i.value=n),Wr.throwError(t,H.errors.NUMERIC_FAULT,i)}let uf="0";for(;uf.length<256;)uf+=uf;function Ym(t){if(typeof t!="number")try{t=V.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+uf.substring(0,t):Wr.throwArgumentError("invalid decimal size","decimals",t)}function Od(t,e){e==null&&(e=0);const r=Ym(e);t=V.from(t);const n=t.lt(NE);n&&(t=t.mul($E));let i=t.mod(r).toString();for(;i.length2&&Wr.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>r.length-1&&DE("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?l:(typeof e[o]!==a&&Wr.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);r=s("signed","boolean",r),n=s("width","number",n),i=s("decimals","number",i)}return n%8&&Wr.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&Wr.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new Tl(ff,r,n,i)}}class br{constructor(e,r,n,i){e!==ff&&Wr.throwError("cannot use FixedNumber constructor; use FixedNumber.from",H.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Wr.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=fi(this._value,this.format.decimals),n=fi(e._value,e.format.decimals);return br.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=fi(this._value,this.format.decimals),n=fi(e._value,e.format.decimals);return br.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=fi(this._value,this.format.decimals),n=fi(e._value,e.format.decimals);return br.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=fi(this._value,this.format.decimals),n=fi(e._value,e.format.decimals);return br.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=br.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(o6.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=br.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(o6.toFormat(r.format))),r}round(e){e==null&&(e=0);const r=this.toString().split(".");if(r.length===1&&r.push("0"),(e<0||e>80||e%1)&&Wr.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=br.from("1"+uf.substring(0,e),this.format),i=Oj.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}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&&Wr.throwArgumentError("invalid byte width","width",e);const r=V.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return Je(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return br.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!Ij(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),br.fromString(Od(e,r),Tl.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=Tl.from(r),i=fi(e,n.decimals);!n.signed&&i.lt(NE)&&DE("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=Je(s,n.width/8));const o=Od(i,n.decimals);return new br(ff,s,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=Tl.from(r);if(X(e).length>n.width/8)throw new Error("overflow");let i=V.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=Od(i,n.decimals);return new br(ff,s,o,n)}static from(e,r){if(typeof e=="string")return br.fromString(e,r);if(ds(e))return br.fromBytes(e,r);try{return br.fromValue(e,0,r)}catch(n){if(n.code!==H.errors.INVALID_ARGUMENT)throw n}return Wr.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const o6=br.from(1),Oj=br.from("0.5"),Nj="properties/5.7.0";var $j=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const B0=new H(Nj);function re(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function Zn(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function Ye(t){return $j(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const i=t[n];return Promise.resolve(i).then(s=>({key:n,value:s}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function Qm(t,e){(!t||typeof t!="object")&&B0.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||B0.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function nr(t){const e={};for(const r in t)e[r]=t[r];return e}const Dj={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function BE(t){if(t==null||Dj[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;rRi(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&re(e,r,Ri(n))}return e}return B0.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function Ri(t){return Bj(t)}class Ra{constructor(e){for(const r in e)this[r]=Ri(e[r])}}const mu="abi/5.7.0",Oe=new H(mu),ma={};let a6={calldata:!0,memory:!0,storage:!0},Lj={calldata:!0,memory:!0};function od(t,e){if(t==="bytes"||t==="string"){if(a6[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&Lj[e])return!0;return(a6[e]||e==="payable")&&Oe.throwArgumentError("invalid modifier","name",e),!1}function jj(t,e){let r=t;function n(a){Oe.throwArgumentError(`unexpected character at position ${a}`,"param",t)}t=t.replace(/\s/g," ");function i(a){let l={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(l.indexed=!1),l}let s={type:"",name:"",state:{allowType:!0}},o=s;for(let a=0;aJSON.parse(i.format(e)))),JSON.stringify(n)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==$e.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===$e.full?", ":",")+")"):r+=this.type,e!==$e.sighash&&(this.indexed===!0&&(r+=" indexed"),e===$e.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?fr.fromString(e,r):fr.fromObject(e)}static fromObject(e){return fr.isParamType(e)?e:new fr(ma,{name:e.name||null,type:Ga(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(fr.fromObject):null})}static fromString(e,r){function n(i){return fr.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(jj(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function Qf(t,e){return zj(t).map(r=>fr.fromString(r,e))}class mi{constructor(e,r){e!==ma&&Oe.throwError("use a static from method",H.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Nd(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return mi.isFragment(e)?e:typeof e=="string"?mi.fromString(e):mi.fromObject(e)}static fromObject(e){if(mi.isFragment(e))return e;switch(e.type){case"function":return Xn.fromObject(e);case"event":return gi.fromObject(e);case"constructor":return Qn.fromObject(e);case"error":return Wi.fromObject(e);case"fallback":case"receive":return null}return Oe.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?gi.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Xn.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Qn.fromString(e.trim()):e.split(" ")[0]==="error"?Wi.fromString(e.substring(5).trim()):Oe.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class gi extends mi{format(e){if(e||(e=$e.sighash),$e[e]||Oe.throwArgumentError("invalid format type","format",e),e===$e.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==$e.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===$e.full?", ":",")+") ",e!==$e.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?gi.fromString(e):gi.fromObject(e)}static fromObject(e){if(gi.isEventFragment(e))return e;e.type!=="event"&&Oe.throwArgumentError("invalid event object","value",e);const r={name:Xf(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(fr.fromObject):[],type:"event"};return new gi(ma,r)}static fromString(e){let r=e.match(Zf);r||Oe.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:Oe.warn("unknown modifier: "+i)}}),gi.fromObject({name:r[1].trim(),anonymous:n,inputs:Qf(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function LE(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&Oe.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Oe.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=V.from(r[1]),r[0]):t}function jE(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r)}})}function FE(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&Oe.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&Oe.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&Oe.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Oe.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&Oe.throwArgumentError("unable to determine stateMutability","value",t),e}class Qn extends mi{format(e){if(e||(e=$e.sighash),$e[e]||Oe.throwArgumentError("invalid format type","format",e),e===$e.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===$e.sighash&&Oe.throwError("cannot format a constructor for sighash",H.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===$e.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?Qn.fromString(e):Qn.fromObject(e)}static fromObject(e){if(Qn.isConstructorFragment(e))return e;e.type!=="constructor"&&Oe.throwArgumentError("invalid constructor object","value",e);let r=FE(e);r.constant&&Oe.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(fr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?V.from(e.gas):null};return new Qn(ma,n)}static fromString(e){let r={type:"constructor"};e=LE(e,r);let n=e.match(Zf);return(!n||n[1].trim()!=="constructor")&&Oe.throwArgumentError("invalid constructor string","value",e),r.inputs=Qf(n[2].trim(),!1),jE(n[3].trim(),r),Qn.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class Xn extends Qn{format(e){if(e||(e=$e.sighash),$e[e]||Oe.throwArgumentError("invalid format type","format",e),e===$e.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==$e.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===$e.full?", ":",")+") ",e!==$e.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?Xn.fromString(e):Xn.fromObject(e)}static fromObject(e){if(Xn.isFunctionFragment(e))return e;e.type!=="function"&&Oe.throwArgumentError("invalid function object","value",e);let r=FE(e);const n={type:e.type,name:Xf(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(fr.fromObject):[],outputs:e.outputs?e.outputs.map(fr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?V.from(e.gas):null};return new Xn(ma,n)}static fromString(e){let r={type:"function"};e=LE(e,r);let n=e.split(" returns ");n.length>2&&Oe.throwArgumentError("invalid function string","value",e);let i=n[0].match(Zf);if(i||Oe.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&Xf(r.name),r.inputs=Qf(i[2],!1),jE(i[3].trim(),r),n.length>1){let s=n[1].match(Zf);(s[1].trim()!=""||s[3].trim()!="")&&Oe.throwArgumentError("unexpected tokens","value",e),r.outputs=Qf(s[2],!1)}else r.outputs=[];return Xn.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function l6(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Oe.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Wi extends mi{format(e){if(e||(e=$e.sighash),$e[e]||Oe.throwArgumentError("invalid format type","format",e),e===$e.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==$e.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===$e.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?Wi.fromString(e):Wi.fromObject(e)}static fromObject(e){if(Wi.isErrorFragment(e))return e;e.type!=="error"&&Oe.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:Xf(e.name),inputs:e.inputs?e.inputs.map(fr.fromObject):[]};return l6(new Wi(ma,r))}static fromString(e){let r={type:"error"},n=e.match(Zf);return n||Oe.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&Xf(r.name),r.inputs=Qf(n[2],!1),l6(Wi.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function Ga(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const Uj=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Xf(t){return(!t||!t.match(Uj))&&Oe.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const Zf=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function zj(t){t=t.trim();let e=[],r="",n=0;for(let i=0;ithis.wordSize&&Xm.throwError("value out-of-bounds",H.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=Ke([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r)}}}class L0{constructor(e,r,n,i){re(this,"_data",X(e)),re(this,"wordSize",r||32),re(this,"_coerceFunc",n),re(this,"allowLoose",i),this._offset=0}get data(){return Q(this._data)}get consumed(){return this._offset}static coerce(e,r){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):L0.coerce(e,r)}_peekBytes(e,r,n){let i=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?i=r:Xm.throwError("data out-of-bounds",H.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new L0(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let n=this._peekBytes(0,e,!!r);return this._offset+=n.length,n.slice(0,e)}readValue(){return V.from(this.readBytes(this.wordSize))}}var zE={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",r="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var s=!n&&typeof self=="object",o=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?i=A5:s&&(i=self);var a=!i.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,l=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",c="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],u=[4,1024,262144,67108864],h=[1,256,65536,16777216],y=[6,1536,393216,100663296],g=[0,8,16,24],p=[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],k=[224,256,384,512],w=[128,256],E=["hex","buffer","arrayBuffer","array","digest"],A={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(x){return Object.prototype.toString.call(x)==="[object Array]"}),l&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(x){return typeof x=="object"&&x.buffer&&x.buffer.constructor===ArrayBuffer});for(var I=function(x,$,L){return function(U){return new d(x,$,x).update(U)[L]()}},M=function(x,$,L){return function(U,G){return new d(x,$,G).update(U)[L]()}},B=function(x,$,L){return function(U,G,j,V){return v["cshake"+x].update(U,G,j,V)[L]()}},z=function(x,$,L){return function(U,G,j,V){return v["kmac"+x].update(U,G,j,V)[L]()}},F=function(x,$,L,U){for(var G=0;G>5,this.byteCount=this.blockCount<<2,this.outputBlocks=L>>5,this.extraBytes=(L&31)>>3;for(var U=0;U<50;++U)this.s[U]=0}d.prototype.update=function(x){if(this.finalized)throw new Error(r);var $,L=typeof x;if(L!=="string"){if(L==="object"){if(x===null)throw new Error(e);if(l&&x.constructor===ArrayBuffer)x=new Uint8Array(x);else if(!Array.isArray(x)&&(!l||!ArrayBuffer.isView(x)))throw new Error(e)}else throw new Error(e);$=!0}for(var U=this.blocks,G=this.byteCount,j=x.length,V=this.blockCount,W=0,oe=this.s,re,ae;W>2]|=x[W]<>2]|=ae<>2]|=(192|ae>>6)<>2]|=(128|ae&63)<=57344?(U[re>>2]|=(224|ae>>12)<>2]|=(128|ae>>6&63)<>2]|=(128|ae&63)<>2]|=(240|ae>>18)<>2]|=(128|ae>>12&63)<>2]|=(128|ae>>6&63)<>2]|=(128|ae&63)<=G){for(this.start=re-G,this.block=U[V],re=0;re>8,L=x&255;L>0;)G.unshift(L),x=x>>8,L=x&255,++U;return $?G.push(U):G.unshift(U),this.update(G),G.length},d.prototype.encodeString=function(x){var $,L=typeof x;if(L!=="string"){if(L==="object"){if(x===null)throw new Error(e);if(l&&x.constructor===ArrayBuffer)x=new Uint8Array(x);else if(!Array.isArray(x)&&(!l||!ArrayBuffer.isView(x)))throw new Error(e)}else throw new Error(e);$=!0}var U=0,G=x.length;if($)U=G;else for(var j=0;j=57344?U+=3:(V=65536+((V&1023)<<10|x.charCodeAt(++j)&1023),U+=4)}return U+=this.encode(U*8),this.update(x),U},d.prototype.bytepad=function(x,$){for(var L=this.encode($),U=0;U>2]|=this.padding[$&3],this.lastByteIndex===this.byteCount)for(x[0]=x[L],$=1;$>4&15]+c[W&15]+c[W>>12&15]+c[W>>8&15]+c[W>>20&15]+c[W>>16&15]+c[W>>28&15]+c[W>>24&15];j%x===0&&(N($),G=0)}return U&&(W=$[G],V+=c[W>>4&15]+c[W&15],U>1&&(V+=c[W>>12&15]+c[W>>8&15]),U>2&&(V+=c[W>>20&15]+c[W>>16&15])),V},d.prototype.arrayBuffer=function(){this.finalize();var x=this.blockCount,$=this.s,L=this.outputBlocks,U=this.extraBytes,G=0,j=0,V=this.outputBits>>3,W;U?W=new ArrayBuffer(L+1<<2):W=new ArrayBuffer(V);for(var oe=new Uint32Array(W);j>8&255,V[W+2]=oe>>16&255,V[W+3]=oe>>24&255;j%x===0&&N($)}return U&&(W=j<<2,oe=$[G],V[W]=oe&255,U>1&&(V[W+1]=oe>>8&255),U>2&&(V[W+2]=oe>>16&255)),V};function T(x,$,L){d.call(this,x,$,L)}T.prototype=new d,T.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var N=function(x){var $,L,U,G,j,V,W,oe,re,ae,Le,Ee,Ce,Nt,qe,Be,So,Xe,Ze,ko,et,tt,Ao,rt,nt,_o,it,st,To,ot,at,Po,lt,ct,Io,ft,ut,Ro,dt,ht,Mo,vt,yt,Oo,pt,gt,No,mt,xt,$o,bt,wt,Do,Ct,Et,Lo,St,kt,ms,xs,bs,ws,Cs;for(U=0;U<48;U+=2)G=x[0]^x[10]^x[20]^x[30]^x[40],j=x[1]^x[11]^x[21]^x[31]^x[41],V=x[2]^x[12]^x[22]^x[32]^x[42],W=x[3]^x[13]^x[23]^x[33]^x[43],oe=x[4]^x[14]^x[24]^x[34]^x[44],re=x[5]^x[15]^x[25]^x[35]^x[45],ae=x[6]^x[16]^x[26]^x[36]^x[46],Le=x[7]^x[17]^x[27]^x[37]^x[47],Ee=x[8]^x[18]^x[28]^x[38]^x[48],Ce=x[9]^x[19]^x[29]^x[39]^x[49],$=Ee^(V<<1|W>>>31),L=Ce^(W<<1|V>>>31),x[0]^=$,x[1]^=L,x[10]^=$,x[11]^=L,x[20]^=$,x[21]^=L,x[30]^=$,x[31]^=L,x[40]^=$,x[41]^=L,$=G^(oe<<1|re>>>31),L=j^(re<<1|oe>>>31),x[2]^=$,x[3]^=L,x[12]^=$,x[13]^=L,x[22]^=$,x[23]^=L,x[32]^=$,x[33]^=L,x[42]^=$,x[43]^=L,$=V^(ae<<1|Le>>>31),L=W^(Le<<1|ae>>>31),x[4]^=$,x[5]^=L,x[14]^=$,x[15]^=L,x[24]^=$,x[25]^=L,x[34]^=$,x[35]^=L,x[44]^=$,x[45]^=L,$=oe^(Ee<<1|Ce>>>31),L=re^(Ce<<1|Ee>>>31),x[6]^=$,x[7]^=L,x[16]^=$,x[17]^=L,x[26]^=$,x[27]^=L,x[36]^=$,x[37]^=L,x[46]^=$,x[47]^=L,$=ae^(G<<1|j>>>31),L=Le^(j<<1|G>>>31),x[8]^=$,x[9]^=L,x[18]^=$,x[19]^=L,x[28]^=$,x[29]^=L,x[38]^=$,x[39]^=L,x[48]^=$,x[49]^=L,Nt=x[0],qe=x[1],gt=x[11]<<4|x[10]>>>28,No=x[10]<<4|x[11]>>>28,st=x[20]<<3|x[21]>>>29,To=x[21]<<3|x[20]>>>29,xs=x[31]<<9|x[30]>>>23,bs=x[30]<<9|x[31]>>>23,vt=x[40]<<18|x[41]>>>14,yt=x[41]<<18|x[40]>>>14,ct=x[2]<<1|x[3]>>>31,Io=x[3]<<1|x[2]>>>31,Be=x[13]<<12|x[12]>>>20,So=x[12]<<12|x[13]>>>20,mt=x[22]<<10|x[23]>>>22,xt=x[23]<<10|x[22]>>>22,ot=x[33]<<13|x[32]>>>19,at=x[32]<<13|x[33]>>>19,ws=x[42]<<2|x[43]>>>30,Cs=x[43]<<2|x[42]>>>30,Ct=x[5]<<30|x[4]>>>2,Et=x[4]<<30|x[5]>>>2,ft=x[14]<<6|x[15]>>>26,ut=x[15]<<6|x[14]>>>26,Xe=x[25]<<11|x[24]>>>21,Ze=x[24]<<11|x[25]>>>21,$o=x[34]<<15|x[35]>>>17,bt=x[35]<<15|x[34]>>>17,Po=x[45]<<29|x[44]>>>3,lt=x[44]<<29|x[45]>>>3,rt=x[6]<<28|x[7]>>>4,nt=x[7]<<28|x[6]>>>4,Lo=x[17]<<23|x[16]>>>9,St=x[16]<<23|x[17]>>>9,Ro=x[26]<<25|x[27]>>>7,dt=x[27]<<25|x[26]>>>7,ko=x[36]<<21|x[37]>>>11,et=x[37]<<21|x[36]>>>11,wt=x[47]<<24|x[46]>>>8,Do=x[46]<<24|x[47]>>>8,Oo=x[8]<<27|x[9]>>>5,pt=x[9]<<27|x[8]>>>5,_o=x[18]<<20|x[19]>>>12,it=x[19]<<20|x[18]>>>12,kt=x[29]<<7|x[28]>>>25,ms=x[28]<<7|x[29]>>>25,ht=x[38]<<8|x[39]>>>24,Mo=x[39]<<8|x[38]>>>24,tt=x[48]<<14|x[49]>>>18,Ao=x[49]<<14|x[48]>>>18,x[0]=Nt^~Be&Xe,x[1]=qe^~So&Ze,x[10]=rt^~_o&st,x[11]=nt^~it&To,x[20]=ct^~ft&Ro,x[21]=Io^~ut&dt,x[30]=Oo^~gt&mt,x[31]=pt^~No&xt,x[40]=Ct^~Lo&kt,x[41]=Et^~St&ms,x[2]=Be^~Xe&ko,x[3]=So^~Ze&et,x[12]=_o^~st&ot,x[13]=it^~To&at,x[22]=ft^~Ro&ht,x[23]=ut^~dt&Mo,x[32]=gt^~mt&$o,x[33]=No^~xt&bt,x[42]=Lo^~kt&xs,x[43]=St^~ms&bs,x[4]=Xe^~ko&tt,x[5]=Ze^~et&Ao,x[14]=st^~ot&Po,x[15]=To^~at<,x[24]=Ro^~ht&vt,x[25]=dt^~Mo&yt,x[34]=mt^~$o&wt,x[35]=xt^~bt&Do,x[44]=kt^~xs&ws,x[45]=ms^~bs&Cs,x[6]=ko^~tt&Nt,x[7]=et^~Ao&qe,x[16]=ot^~Po&rt,x[17]=at^~lt&nt,x[26]=ht^~vt&ct,x[27]=Mo^~yt&Io,x[36]=$o^~wt&Oo,x[37]=bt^~Do&pt,x[46]=xs^~ws&Ct,x[47]=bs^~Cs&Et,x[8]=tt^~Nt&Be,x[9]=Ao^~qe&So,x[18]=Po^~rt&_o,x[19]=lt^~nt&it,x[28]=vt^~ct&ft,x[29]=yt^~Io&ut,x[38]=wt^~Oo>,x[39]=Do^~pt&No,x[48]=ws^~Ct&Lo,x[49]=Cs^~Et&St,x[0]^=p[U],x[1]^=p[U+1]};if(a)t.exports=v;else for(P=0;P>=8;return e}function f6(t,e,r){let n=0;for(let i=0;ie+1+n&&hi.throwError("child data too short",q.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function HE(t,e){if(t.length===0&&hi.throwError("data too short",q.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&hi.throwError("data short segment too short",q.errors.BUFFER_OVERRUN,{});const n=f6(t,e+1,r);return e+1+r+n>t.length&&hi.throwError("data long segment too short",q.errors.BUFFER_OVERRUN,{}),u6(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&hi.throwError("data array too short",q.errors.BUFFER_OVERRUN,{}),u6(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&hi.throwError("data array too short",q.errors.BUFFER_OVERRUN,{});const n=f6(t,e+1,r);e+1+r+n>t.length&&hi.throwError("data array too short",q.errors.BUFFER_OVERRUN,{});const i=Q(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:i}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&hi.throwError("data too short",q.errors.BUFFER_OVERRUN,{});const n=Q(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:Q(t[e])}}function Jh(t){const e=X(t),r=HE(e,0);return r.consumed!==e.length&&hi.throwArgumentError("invalid rlp data","data",t),r.result}const qj=Object.freeze(Object.defineProperty({__proto__:null,decode:Jh,encode:xa},Symbol.toStringTag,{value:"Module"})),Gj="address/5.7.0",js=new q(Gj);function d6(t){Pe(t,20)||js.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=X(pe(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const Kj=9007199254740991;function Jj(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const Zm={};for(let t=0;t<10;t++)Zm[String(t)]=String(t);for(let t=0;t<26;t++)Zm[String.fromCharCode(65+t)]=String(10+t);const h6=Math.floor(Jj(Kj));function WE(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>Zm[n]).join("");for(;e.length>=h6;){let n=e.substring(0,h6);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function we(t){let e=null;if(typeof t!="string"&&js.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=d6(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&js.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)!==WE(t)&&js.throwArgumentError("bad icap checksum","address",t),e=Rj(t.substring(4));e.length<40;)e="0"+e;e=d6("0x"+e)}else js.throwArgumentError("invalid address","address",t);return e}function qE(t){try{return we(t),!0}catch{}return!1}function Yj(t){let e=Mj(we(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+WE("XE00"+e)+e}function ex(t){let e=null;try{e=we(t.from)}catch{js.throwArgumentError("missing from address","transaction",t)}const r=ki(X(H.from(t.nonce).toHexString()));return we(qt(pe(xa([e,r])),12))}function Qj(t,e,r){return Ii(e)!==32&&js.throwArgumentError("salt must be 32 bytes","salt",e),Ii(r)!==32&&js.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),we(qt(pe(Ve(["0xff",we(t),e,r])),12))}class Xj extends hs{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=we(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return we(He(e.readValue().toHexString(),20))}}class Zj extends hs{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const hl=new q(mu);function GE(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let l={};n=e.map(c=>{const f=c.localName;return f||hl.throwError("cannot encode object for signature with missing names",q.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]&&hl.throwError("cannot encode object for signature with duplicate names",q.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]=!0,r[f]})}else hl.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&hl.throwArgumentError("types/value length mismatch","tuple",r);let i=new xp(t.wordSize),s=new xp(t.wordSize),o=[];e.forEach((l,c)=>{let f=n[c];if(l.dynamic){let u=s.length;l.encode(s,f);let h=i.writeUpdatableValue();o.push(y=>{h(y+u)})}else l.encode(i,f)}),o.forEach(l=>{l(i.length)});let a=t.appendWriter(i);return a+=t.appendWriter(s),a}function KE(t,e){let r=[],n=t.subReader(0);e.forEach(s=>{let o=null;if(s.dynamic){let a=t.readValue(),l=n.subReader(a.toNumber());try{o=s.decode(l)}catch(c){if(c.code===q.errors.BUFFER_OVERRUN)throw c;o=c,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(t)}catch(a){if(a.code===q.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}o!=null&&r.push(o)});const i=e.reduce((s,o)=>{const a=o.localName;return a&&(s[a]||(s[a]=0),s[a]++),s},{});e.forEach((s,o)=>{let a=s.localName;if(!a||i[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;const l=r[o];l instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw l}}):r[a]=l});for(let s=0;s{throw o}})}return Object.freeze(r)}class eF extends hs{constructor(e,r,n){const i=e.type+"["+(r>=0?r:"")+"]",s=r===-1||e.dynamic;super("array",i,n,s),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&hl.throwError("insufficient data length",q.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let i=0;i>6===2;o++)s++;return s}return t===Zr.OVERRUN?r.length-e-1:0}function fF(t,e,r,n,i){return t===Zr.OVERLONG?(n.push(i),0):(n.push(65533),ZE(t,e,r))}const e7=Object.freeze({error:cF,ignore:ZE,replace:fF});function rx(t,e){e==null&&(e=e7.error),t=X(t);const r=[];let n=0;for(;n>7)){r.push(i);continue}let s=null,o=null;if((i&224)===192)s=1,o=127;else if((i&240)===224)s=2,o=2047;else if((i&248)===240)s=3,o=65535;else{(i&192)===128?n+=e(Zr.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Zr.BAD_PREFIX,n-1,t,r);continue}if(n-1+s>=t.length){n+=e(Zr.OVERRUN,n-1,t,r);continue}let a=i&(1<<8-s-1)-1;for(let l=0;l1114111){n+=e(Zr.OUT_OF_RANGE,n-1-s,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(Zr.UTF16_SURROGATE,n-1-s,t,r,a);continue}if(a<=o){n+=e(Zr.OVERLONG,n-1-s,t,r,a);continue}r.push(a)}}return r}function We(t,e=Mi.current){e!=Mi.current&&(XE.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const s=t.charCodeAt(n);if(n>=t.length||(s&64512)!==56320)throw new Error("invalid utf-8 string");const o=65536+((i&1023)<<10)+(s&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return X(r)}function Pv(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function uF(t,e){return'"'+rx(t,e).map(r=>{if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?Pv(r):(r-=65536,Pv((r>>10&1023)+55296)+Pv((r&1023)+56320))}).join("")+'"'}function bp(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function vs(t,e){return bp(rx(t,e))}function F0(t,e=Mi.current){return rx(We(t,e))}function dF(t){const e=We(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Q(Ve([e,j0]).slice(0,32))}function hF(t){const e=X(t);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return vs(e.slice(0,r))}function vF(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let s=i.split(":");r+=parseInt(s[0],16),n[r]=e(s[1])}),n}function t7(t){let e=0;return t.split(",").map(r=>{let n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function ix(t,e){let r=0;for(let n=0;n=r&&t<=r+i.h&&(t-r)%(i.d||1)===0){if(i.e&&i.e.indexOf(t-r)!==-1)continue;return i}}return null}const yF=t7("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"),pF="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),gF=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],mF=nx("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"),xF=nx("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"),bF=nx("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",vF),wF=t7("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 CF(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function EF(t){return!!ix(t,yF)}function SF(t){let e=ix(t,gF);if(e)return[t+e.s];let r=mF[t];if(r)return r;let n=xF[t];if(n)return[t+n[0]];let i=bF[t];return i||null}function kF(t){return!!ix(t,wF)}function AF(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=F0(t);e=CF(e.map(n=>{if(pF.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=SF(n);return i||[n]})),e=F0(bp(e),Mi.NFKC),e.forEach(n=>{if(kF(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(EF(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=bp(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}class _F extends JE{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,We(r))}decode(e){return vs(super.decode(e))}}class ad extends hs{constructor(e,r){let n=!1;const i=[];e.forEach(o=>{o.dynamic&&(n=!0),i.push(o.type)});const s="tuple("+i.join(",")+")";super("tuple",s,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,i)=>{const s=i.localName;return s&&(n[s]||(n[s]=0),n[s]++),n},{});return this.coders.forEach((n,i)=>{let s=n.localName;!s||r[s]!==1||(s==="length"&&(s="_length"),e[s]==null&&(e[s]=e[i]))}),Object.freeze(e)}encode(e,r){return GE(e,this.coders,r)}decode(e){return e.coerce(this.name,KE(e,this.coders))}}const ld=new q(mu),TF=new RegExp(/^bytes([0-9]*)$/),PF=new RegExp(/^(u?int)([0-9]*)$/);class sx{constructor(e){te(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Xj(e.name);case"bool":return new tF(e.name);case"string":return new _F(e.name);case"bytes":return new rF(e.name);case"array":return new eF(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new ad((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new iF(e.name)}let r=e.type.match(PF);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&ld.throwArgumentError("invalid "+r[1]+" bit length","param",e),new aF(n/8,r[1]==="int",e.name)}if(r=e.type.match(TF),r){let n=parseInt(r[1]);return(n===0||n>32)&&ld.throwArgumentError("invalid bytes length","param",e),new nF(n,e.name)}return ld.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new B0(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new xp(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(fr.from(i)));return new ad(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&ld.throwError("types/values length mismatch",q.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(fr.from(o))),i=new ad(n,"_"),s=this._getWriter();return i.encode(s,r),s.data}decode(e,r,n){const i=e.map(o=>this._getCoder(fr.from(o)));return new ad(i,"_").decode(this._getReader(X(r),n))}}const Kr=new sx;function Fs(t){return pe(We(t))}const r7="hash/5.7.0";function ox(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(a)?i(a,o-1):r.push(a)})};return i(t,e),r}function RF(t){const e={};for(let r=0;r>--l&1}const u=31,h=Math.pow(2,u),y=h>>>1,g=y>>1,p=h-1;let k=0;for(let M=0;M1;){let J=B+z>>>1;M>>1|f(),F=F<<1^y,K=(K^y)<<1|y|1;E=F,A=1+K-F}let I=n-4;return w.map(M=>{switch(M-I){case 3:return I+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return I+256+(t[a++]<<8|t[a++]);case 1:return I+t[a++];default:return M-1}})}function OF(t){let e=0;return()=>t[e++]}function NF(t){return OF(MF(t))}function $F(t){return t&1?~t>>1:t>>1}function DF(t,e){let r=Array(t);for(let n=0;ne[o]):r}function BF(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(FF(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(UF(r,t))}return RF(n7(e))}function jF(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function i7(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function FF(t,e){let r=1+e(),n=e(),i=jF(e),s=i7(i.length,1+t,e);return n7(s.map((o,a)=>{const l=o[0],c=o.slice(1);return Array(i[a]).fill(void 0).map((f,u)=>{let h=u*n;return[l+u*r,c.map(y=>y+h)]})}))}function UF(t,e){let r=1+e();return i7(r,1+t,e).map(i=>[i[0],i.slice(1)])}function zF(t){let e=U0(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let c=U0(t,e);if(c.length==0)break;n.push({set:new Set(c),node:r()})}n.sort((c,f)=>f.set.size-c.set.size);let i=t(),s=i%3;i=i/3|0;let o=!!(i&1);i>>=1;let a=i==1,l=i==2;return{branches:n,valid:s,fe0f:o,save:a,check:l}}}function VF(){return NF(ox("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 Yh=VF(),HF=new Set(U0(Yh)),WF=new Set(U0(Yh)),qF=BF(Yh),GF=zF(Yh),y6=45,p6=95;function s7(t){return F0(t)}function KF(t){return t.filter(e=>e!=65039)}function o7(t){for(let e of t.split(".")){let r=s7(e);try{for(let n=r.lastIndexOf(p6)-1;n>=0;n--)if(r[n]!==p6)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===y6&&r[3]===y6)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function JF(t){return o7(YF(t,KF))}function YF(t,e){let r=s7(t).reverse(),n=[];for(;r.length;){let i=XF(r);if(i){n.push(...e(i));continue}let s=r.pop();if(HF.has(s)){n.push(s);continue}if(WF.has(s))continue;let o=qF[s];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${s.toString(16).toUpperCase()}`)}return o7(QF(String.fromCodePoint(...n)))}function QF(t){return t.normalize("NFC")}function XF(t,e){var r;let n=GF,i,s,o=[],a=t.length;for(e&&(e.length=0);a;){let l=t[--a];if(n=(r=n.branches.find(c=>c.set.has(l)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)s=l;else if(n.check&&l===s)break;o.push(l),n.fe0f&&(o.push(65039),a>0&&t[a-1]==65039&&a--),n.valid&&(i=o.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return i}const ZF=new q(r7),a7=new Uint8Array(32);a7.fill(0);function g6(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function lx(t){const e=We(JF(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return r.push(g6(e.slice(n))),r}function eU(t){try{return lx(t).length!==0}catch{}return!1}function df(t){typeof t!="string"&&ZF.throwArgumentError("invalid ENS name; not a string","name",t);let e=a7;const r=lx(t);for(;r.length;)e=pe(Ve([e,pe(r.pop())]));return Q(e)}function l7(t){return Q(Ve(lx(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}const tU=`Ethereum Signed Message: -`;function Qh(t){return typeof t=="string"&&(t=We(t)),pe(Ve([We(tU),We(String(t.length)),t]))}var rU=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Bt=new q(r7),c7=new Uint8Array(32);c7.fill(0);const nU=H.from(-1),f7=H.from(0),u7=H.from(1),iU=H.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function sU(t){const e=X(t),r=e.length%32;return r?Hr([e,c7.slice(r)]):Q(e)}const oU=He(u7.toHexString(),32),aU=He(f7.toHexString(),32),m6={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Iv=["name","version","chainId","verifyingContract","salt"];function x6(t){return function(e){return typeof e!="string"&&Bt.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const lU={name:x6("name"),version:x6("version"),chainId:function(t){try{return H.from(t).toString()}catch{}return Bt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return we(t).toLowerCase()}catch{}return Bt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=X(t);if(e.length!==32)throw new Error("bad length");return Q(e)}catch{}return Bt.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function Rv(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&Bt.throwArgumentError("invalid numeric width","type",t);const i=iU.mask(r?n-1:n),s=r?i.add(u7).mul(nU):f7;return function(o){const a=H.from(o);return(a.lt(s)||a.gt(i))&&Bt.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),He(a.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&Bt.throwArgumentError("invalid bytes width","type",t),function(n){return X(n).length!==r&&Bt.throwArgumentError(`invalid length for ${t}`,"value",n),sU(n)}}}switch(t){case"address":return function(e){return He(we(e),32)};case"bool":return function(e){return e?oU:aU};case"bytes":return function(e){return pe(e)};case"string":return function(e){return Fs(e)}}return null}function b6(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class er{constructor(e){te(this,"types",Object.freeze(Ri(e))),te(this,"_encoderCache",{}),te(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],i[a]={}});for(const a in e){const l={};e[a].forEach(c=>{l[c.name]&&Bt.throwArgumentError(`duplicate variable name ${JSON.stringify(c.name)} in ${JSON.stringify(a)}`,"types",e),l[c.name]=!0;const f=c.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===a&&Bt.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!Rv(f)&&(n[f]||Bt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(a),r[a][f]=!0)})}const s=Object.keys(n).filter(a=>n[a].length===0);s.length===0?Bt.throwArgumentError("missing primary type","types",e):s.length>1&&Bt.throwArgumentError(`ambiguous primary types or unused types: ${s.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),te(this,"primaryType",s[0]);function o(a,l){l[a]&&Bt.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),l[a]=!0,Object.keys(r[a]).forEach(c=>{n[c]&&(o(c,l),Object.keys(l).forEach(f=>{i[f][c]=!0}))}),delete l[a]}o(this.primaryType,{});for(const a in i){const l=Object.keys(i[a]);l.sort(),this._types[a]=b6(a,e[a])+l.map(c=>b6(c,e[c])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=Rv(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],s=this.getEncoder(i),o=parseInt(r[3]);return a=>{o>=0&&a.length!==o&&Bt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let l=a.map(s);return this._types[i]&&(l=l.map(pe)),pe(Hr(l))}}const n=this.types[e];if(n){const i=Fs(this._types[e]);return s=>{const o=n.map(({name:a,type:l})=>{const c=this.getEncoder(l)(s[a]);return this._types[l]?pe(c):c});return o.unshift(i),Hr(o)}}return Bt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||Bt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return pe(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(Rv(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const o=i[1],a=parseInt(i[3]);return a>=0&&r.length!==a&&Bt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(l=>this._visit(o,l,n))}const s=this.types[e];return s?s.reduce((o,{name:a,type:l})=>(o[a]=this._visit(l,r[a],n),o),{}):Bt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new er(e)}static getPrimaryType(e){return er.from(e).primaryType}static hashStruct(e,r,n){return er.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=m6[n];i||Bt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>Iv.indexOf(n.name)-Iv.indexOf(i.name)),er.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Hr(["0x1901",er.hashDomain(e),er.from(r).hash(n)])}static hash(e,r,n){return pe(er.encode(e,r,n))}static resolveNames(e,r,n,i){return rU(this,void 0,void 0,function*(){e=nr(e);const s={};e.verifyingContract&&!Pe(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=er.from(r);o.visit(n,(a,l)=>(a==="address"&&!Pe(l,20)&&(s[l]="0x"),l));for(const a in s)s[a]=yield i(a);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),n=o.visit(n,(a,l)=>a==="address"&&s[l]?s[l]:l),{domain:e,value:n}})}static getPayload(e,r,n){er.hashDomain(e);const i={},s=[];Iv.forEach(l=>{const c=e[l];c!=null&&(i[l]=lU[l](c),s.push({name:l,type:m6[l]}))});const o=er.from(r),a=nr(r);return a.EIP712Domain?Bt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(l,c)=>{if(l.match(/^bytes(\d*)/))return Q(X(c));if(l.match(/^u?int/))return H.from(c).toString();switch(l){case"address":return c.toLowerCase();case"bool":return!!c;case"string":return typeof c!="string"&&Bt.throwArgumentError("invalid string","value",c),c}return Bt.throwArgumentError("unsupported type","type",l)})}}}const Lt=new q(mu);class d7 extends Ra{}class h7 extends Ra{}class cU extends Ra{}class z0 extends Ra{static isIndexed(e){return!!(e&&e._isIndexed)}}const fU={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function w6(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class ir{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,te(this,"fragments",r.map(n=>mi.from(n)).filter(n=>n!=null)),te(this,"_abiCoder",Zn(new.target,"getAbiCoder")()),te(this,"functions",{}),te(this,"errors",{}),te(this,"events",{}),te(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){Lt.warn("duplicate definition - constructor");return}te(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let s=n.format();if(i[s]){Lt.warn("duplicate definition - "+s);return}i[s]=n}),this.deploy||te(this,"deploy",Qn.from({payable:!1,type:"constructor"})),te(this,"_isInterface",!0)}format(e){e||(e=Ne.full),e===Ne.sighash&&Lt.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===Ne.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return Kr}static getAddress(e){return we(e)}static getSighash(e){return qt(Fs(e.format()),0,4)}static getEventTopic(e){return Fs(e.format())}getFunction(e){if(Pe(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];Lt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.functions).filter(s=>s.split("(")[0]===n);return i.length===0?Lt.throwArgumentError("no matching function","name",n):i.length>1&&Lt.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[Xn.fromString(e).format()];return r||Lt.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(Pe(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];Lt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.events).filter(s=>s.split("(")[0]===n);return i.length===0?Lt.throwArgumentError("no matching event","name",n):i.length>1&&Lt.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[gi.fromString(e).format()];return r||Lt.throwArgumentError("no matching event","signature",e),r}getError(e){if(Pe(e)){const n=Zn(this.constructor,"getSighash");for(const i in this.errors){const s=this.errors[i];if(e===n(s))return this.errors[i]}Lt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.errors).filter(s=>s.split("(")[0]===n);return i.length===0?Lt.throwArgumentError("no matching error","name",n):i.length>1&&Lt.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[Xn.fromString(e).format()];return r||Lt.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return Zn(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),Zn(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=X(r);return Q(n.slice(0,4))!==this.getSighash(e)&&Lt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Q(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),Q(Ve([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=X(r);return Q(n.slice(0,4))!==this.getSighash(e)&&Lt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Q(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Q(Ve([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=X(r),i=null,s="",o=null,a=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const c=Q(n.slice(0,4)),f=fU[c];if(f)o=this._abiCoder.decode(f.inputs,n.slice(4)),a=f.name,l=f.signature,f.reason&&(i=o[0]),a==="Error"?s=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(s=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const u=this.getError(c);o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,l=u.format()}catch{}break}}return Lt.throwError("call revert exception"+s,q.errors.CALL_EXCEPTION,{method:e.format(),data:Q(r),errorArgs:o,errorName:a,errorSignature:l,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Q(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&Lt.throwError("too many arguments for "+e.format(),q.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(s,o)=>s.type==="string"?Fs(o):s.type==="bytes"?pe(Q(o)):(s.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),s.type.match(/^u?int/)&&(o=H.from(o).toHexString()),s.type==="address"&&this._abiCoder.encode(["address"],[o]),He(Q(o),32));for(r.forEach((s,o)=>{let a=e.inputs[o];if(!a.indexed){s!=null&&Lt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,s);return}s==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?Lt.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,s):Array.isArray(s)?n.push(s.map(l=>i(a,l))):n.push(i(a,s))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],i=[],s=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&Lt.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const l=r[a];if(o.indexed)if(o.type==="string")n.push(Fs(l));else if(o.type==="bytes")n.push(pe(l));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([o.type],[l]))}else i.push(o),s.push(l)}),{data:this._abiCoder.encode(i,s),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let h=this.getEventTopic(e);(!Pe(n[0],32)||n[0].toLowerCase()!==h)&&Lt.throwError("fragment/topic mismatch",q.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:h,value:n[0]}),n=n.slice(1)}let i=[],s=[],o=[];e.inputs.forEach((h,y)=>{h.indexed?h.type==="string"||h.type==="bytes"||h.baseType==="tuple"||h.baseType==="array"?(i.push(fr.fromObject({type:"bytes32",name:h.name})),o.push(!0)):(i.push(h),o.push(!1)):(s.push(h),o.push(!1))});let a=n!=null?this._abiCoder.decode(i,Ve(n)):null,l=this._abiCoder.decode(s,r,!0),c=[],f=0,u=0;e.inputs.forEach((h,y)=>{if(h.indexed)if(a==null)c[y]=new z0({_isIndexed:!0,hash:null});else if(o[y])c[y]=new z0({_isIndexed:!0,hash:a[u++]});else try{c[y]=a[u++]}catch(g){c[y]=g}else try{c[y]=l[f++]}catch(g){c[y]=g}if(h.name&&c[h.name]==null){const g=c[y];g instanceof Error?Object.defineProperty(c,h.name,{enumerable:!0,get:()=>{throw w6(`property ${JSON.stringify(h.name)}`,g)}}):c[h.name]=g}});for(let h=0;h{throw w6(`index ${h}`,y)}})}return Object.freeze(c)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new h7({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:H.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new d7({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=Q(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new cU({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const uU="abstract-provider/5.7.0";var dU=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const hU=new q(uU);class vU extends Ra{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class Co{constructor(){hU.checkAbstract(new.target,Co),te(this,"_isProvider",!0)}getFeeData(){return dU(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield Ke({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(o=>null)});let n=null,i=null,s=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,s=H.from("1500000000"),i=e.baseFeePerGas.mul(2).add(s)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:s,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const yU="abstract-signer/5.7.0";var Un=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Sn=new q(yU),pU=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],gU=[q.errors.INSUFFICIENT_FUNDS,q.errors.NONCE_EXPIRED,q.errors.REPLACEMENT_UNDERPRICED];let fo=class v7{constructor(){Sn.checkAbstract(new.target,v7),te(this,"_isSigner",!0)}getBalance(e){return Un(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Un(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Un(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield Ke(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return Un(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield Ke(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return Un(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return Un(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Un(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Un(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Un(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)pU.indexOf(n)===-1&&Sn.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=nr(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&Sn.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return Un(this,void 0,void 0,function*(){const r=yield Ke(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>Un(this,void 0,void 0,function*(){if(i==null)return null;const s=yield this.resolveName(i);return s==null&&Sn.throwArgumentError("provided ENS name resolves to null","tx.to",i),s})),r.to.catch(i=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?Sn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&Sn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(r.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const s=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=s,r.maxPriorityFeePerGas=s}else r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&Sn.throwError("network does not support EIP-1559",q.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):Sn.throwError("failed to get consistent fee data",q.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(i=>{if(gU.indexOf(i.code)>=0)throw i;return Sn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",q.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&Sn.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Ke(r)})}_checkProvider(e){this.provider||Sn.throwError("missing provider",q.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class cx extends fo{constructor(e,r){super(),te(this,"address",e),te(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{Sn.throwError(e,q.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new cx(this.address,e)}}var y7={},Re={},xu=p7;function p7(t,e){if(!t)throw new Error(e||"Assertion failed")}p7.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var wp={exports:{}};typeof Object.create=="function"?wp.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:wp.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var mU=wp.exports,xU=xu,bU=mU;Re.inherits=bU;function wU(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function CU(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];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>6|192,r[n++]=s&63|128):wU(t,i)?(s=65536+((s&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=s&63|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=s&63|128)}else for(i=0;i>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Re.htonl=g7;function SU(t,e){for(var r="",n=0;n>>0}return s}Re.join32=kU;function AU(t,e){for(var r=new Array(t.length*4),n=0,i=0;n>>24,r[i+1]=s>>>16&255,r[i+2]=s>>>8&255,r[i+3]=s&255):(r[i+3]=s>>>24,r[i+2]=s>>>16&255,r[i+1]=s>>>8&255,r[i]=s&255)}return r}Re.split32=AU;function _U(t,e){return t>>>e|t<<32-e}Re.rotr32=_U;function TU(t,e){return t<>>32-e}Re.rotl32=TU;function PU(t,e){return t+e>>>0}Re.sum32=PU;function IU(t,e,r){return t+e+r>>>0}Re.sum32_3=IU;function RU(t,e,r,n){return t+e+r+n>>>0}Re.sum32_4=RU;function MU(t,e,r,n,i){return t+e+r+n+i>>>0}Re.sum32_5=MU;function OU(t,e,r,n){var i=t[e],s=t[e+1],o=n+s>>>0,a=(o>>0,t[e+1]=o}Re.sum64=OU;function NU(t,e,r,n){var i=e+n>>>0,s=(i>>0}Re.sum64_hi=NU;function $U(t,e,r,n){var i=e+n;return i>>>0}Re.sum64_lo=$U;function DU(t,e,r,n,i,s,o,a){var l=0,c=e;c=c+n>>>0,l+=c>>0,l+=c>>0,l+=c>>0}Re.sum64_4_hi=DU;function LU(t,e,r,n,i,s,o,a){var l=e+n+s+a;return l>>>0}Re.sum64_4_lo=LU;function BU(t,e,r,n,i,s,o,a,l,c){var f=0,u=e;u=u+n>>>0,f+=u>>0,f+=u>>0,f+=u>>0,f+=u>>0}Re.sum64_5_hi=BU;function jU(t,e,r,n,i,s,o,a,l,c){var f=e+n+s+a+c;return f>>>0}Re.sum64_5_lo=jU;function FU(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Re.rotr64_hi=FU;function UU(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Re.rotr64_lo=UU;function zU(t,e,r){return t>>>r}Re.shr64_hi=zU;function VU(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Re.shr64_lo=VU;var dc={},C6=Re,HU=xu;function Xh(){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}dc.BlockHash=Xh;Xh.prototype.update=function(e,r){if(e=C6.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=C6.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[s++]=e>>>16&255,i[s++]=e>>>8&255,i[s++]=e&255}else for(i[s++]=e&255,i[s++]=e>>>8&255,i[s++]=e>>>16&255,i[s++]=e>>>24&255,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,o=8;o>>3}Di.g0_256=JU;function YU(t){return Ai(t,17)^Ai(t,19)^t>>>10}Di.g1_256=YU;var Wl=Re,QU=dc,XU=Di,Mv=Wl.rotl32,Rc=Wl.sum32,ZU=Wl.sum32_5,ez=XU.ft_1,E7=QU.BlockHash,tz=[1518500249,1859775393,2400959708,3395469782];function Oi(){if(!(this instanceof Oi))return new Oi;E7.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Wl.inherits(Oi,E7);var rz=Oi;Oi.blockSize=512;Oi.outSize=160;Oi.hmacStrength=80;Oi.padLength=64;Oi.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),Vz(e.length<=this.blockSize);for(var r=e.length;r>8,h=f&255;u?l.push(u,h):l.push(h)}return l}r.toArray=n;function i(o){return o.length===1?"0"+o:o}r.zero2=i;function s(o){for(var a="",l=0;l(h>>1)-1?p=(h>>1)-k:p=k,y.isubn(p)):p=0,u[g]=p,y.iushrn(1)}return u}r.getNAF=n;function i(l,c){var f=[[],[]];l=l.clone(),c=c.clone();for(var u=0,h=0,y;l.cmpn(-u)>0||c.cmpn(-h)>0;){var g=l.andln(3)+u&3,p=c.andln(3)+h&3;g===3&&(g=-1),p===3&&(p=-1);var k;g&1?(y=l.andln(7)+u&7,(y===3||y===5)&&p===2?k=-g:k=g):k=0,f[0].push(k);var w;p&1?(y=c.andln(7)+h&7,(y===3||y===5)&&g===2?w=-p:w=p):w=0,f[1].push(w),2*u===k+1&&(u=1-u),2*h===w+1&&(h=1-h),l.iushrn(1),c.iushrn(1)}return f}r.getJSF=i;function s(l,c,f){var u="_"+c;l.prototype[c]=function(){return this[u]!==void 0?this[u]:this[u]=f.call(this)}}r.cachedProperty=s;function o(l){return typeof l=="string"?r.toArray(l,"hex"):l}r.parseBytes=o;function a(l){return new be(l,"hex","le")}r.intFromLE=a}),V0=Cn.getNAF,qz=Cn.getJSF,H0=Cn.assert;function Eo(t,e){this.type=t,this.p=new be(e.p,16),this.red=e.prime?be.red(e.prime):be.mont(this.p),this.zero=new be(0).toRed(this.red),this.one=new be(1).toRed(this.red),this.two=new be(2).toRed(this.red),this.n=e.n&&new be(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 r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Ma=Eo;Eo.prototype.point=function(){throw new Error("Not implemented")};Eo.prototype.validate=function(){throw new Error("Not implemented")};Eo.prototype._fixedNafMul=function(e,r){H0(e.precomputed);var n=e._getDoubles(),i=V0(r,1,this._bitLength),s=(1<=a;c--)l=(l<<1)+i[c];o.push(l)}for(var f=this.jpoint(null,null,null),u=this.jpoint(null,null,null),h=s;h>0;h--){for(a=0;a=0;l--){for(var c=0;l>=0&&o[l]===0;l--)c++;if(l>=0&&c++,a=a.dblp(c),l<0)break;var f=o[l];H0(f!==0),e.type==="affine"?f>0?a=a.mixedAdd(s[f-1>>1]):a=a.mixedAdd(s[-f-1>>1].neg()):f>0?a=a.add(s[f-1>>1]):a=a.add(s[-f-1>>1].neg())}return e.type==="affine"?a.toP():a};Eo.prototype._wnafMulAdd=function(e,r,n,i,s){var o=this._wnafT1,a=this._wnafT2,l=this._wnafT3,c=0,f,u,h;for(f=0;f=1;f-=2){var g=f-1,p=f;if(o[g]!==1||o[p]!==1){l[g]=V0(n[g],o[g],this._bitLength),l[p]=V0(n[p],o[p],this._bitLength),c=Math.max(l[g].length,c),c=Math.max(l[p].length,c);continue}var k=[r[g],null,null,r[p]];r[g].y.cmp(r[p].y)===0?(k[1]=r[g].add(r[p]),k[2]=r[g].toJ().mixedAdd(r[p].neg())):r[g].y.cmp(r[p].y.redNeg())===0?(k[1]=r[g].toJ().mixedAdd(r[p]),k[2]=r[g].add(r[p].neg())):(k[1]=r[g].toJ().mixedAdd(r[p]),k[2]=r[g].toJ().mixedAdd(r[p].neg()));var w=[-3,-1,-5,-7,0,7,5,1,3],E=qz(n[g],n[p]);for(c=Math.max(E[0].length,c),l[g]=new Array(c),l[p]=new Array(c),u=0;u=0;f--){for(var z=0;f>=0;){var F=!0;for(u=0;u=0&&z++,M=M.dblp(z),f<0)break;for(u=0;u0?h=a[u][K-1>>1]:K<0&&(h=a[u][-K-1>>1].neg()),h.type==="affine"?M=M.mixedAdd(h):M=M.add(h))}}for(f=0;f=Math.ceil((e.bitLength()+1)/r.step):!1};Ln.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,s=0;s=0&&(y=c,g=f),u.negative&&(u=u.neg(),h=h.neg()),y.negative&&(y=y.neg(),g=g.neg()),[{a:u,b:h},{a:y,b:g}]};Bn.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],s=i.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=s.mul(n.a),l=o.mul(i.a),c=s.mul(n.b),f=o.mul(i.b),u=e.sub(a).sub(l),h=c.add(f).neg();return{k1:u,k2:h}};Bn.prototype.pointFromX=function(e,r){e=new be(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var s=i.fromRed().isOdd();return(r&&!s||!r&&s)&&(i=i.redNeg()),this.point(e,i)};Bn.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),s=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(s).cmpn(0)===0};Bn.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,o=0;o":""};xr.prototype.isInfinity=function(){return this.inf};xr.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};xr.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),s=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),o=s.redSqr().redISub(this.x.redAdd(this.x)),a=s.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)};xr.prototype.getX=function(){return this.x.fromRed()};xr.prototype.getY=function(){return this.y.fromRed()};xr.prototype.mul=function(e){return e=new be(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};xr.prototype.mulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s):this.curve._wnafMulAdd(1,i,s,2)};xr.prototype.jmulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s,!0):this.curve._wnafMulAdd(1,i,s,2,!0)};xr.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};xr.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(s){return s.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};xr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function _r(t,e,r,n){Ma.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new be(0)):(this.x=new be(e,16),this.y=new be(r,16),this.z=new be(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}ux(_r,Ma.BasePoint);Bn.prototype.jpoint=function(e,r,n){return new _r(this,e,r,n)};_r.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};_r.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};_r.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),s=e.x.redMul(n),o=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),l=i.redSub(s),c=o.redSub(a);if(l.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),u=f.redMul(l),h=i.redMul(f),y=c.redSqr().redIAdd(u).redISub(h).redISub(h),g=c.redMul(h.redISub(y)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(y,g,p)};_r.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),s=this.y,o=e.y.redMul(r).redMul(this.z),a=n.redSub(i),l=s.redSub(o);if(a.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),f=c.redMul(a),u=n.redMul(c),h=l.redSqr().redIAdd(f).redISub(u).redISub(u),y=l.redMul(u.redISub(h)).redISub(s.redMul(f)),g=this.z.redMul(a);return this.curve.jpoint(h,y,g)};_r.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(s),this.x.cmp(n)===0)return!0}};_r.prototype.inspect=function(){return this.isInfinity()?"":""};_r.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var $d=yc(function(t,e){var r=e;r.base=Ma,r.short=Kz,r.mont=null,r.edwards=null}),Dd=yc(function(t,e){var r=e,n=Cn.assert;function i(a){a.type==="short"?this.curve=new $d.short(a):a.type==="edwards"?this.curve=new $d.edwards(a):this.curve=new $d.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function s(a,l){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var c=new i(l);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:c}),c}})}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:Xr.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:Xr.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:Xr.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:Xr.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:Xr.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:Xr.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:Xr.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:Xr.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function uo(t){if(!(this instanceof uo))return new uo(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=ei.toArray(t.entropy,t.entropyEnc||"hex"),r=ei.toArray(t.nonce,t.nonceEnc||"hex"),n=ei.toArray(t.pers,t.persEnc||"hex");fx(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var $7=uo;uo.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};uo.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=ei.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length"};var Jz=Cn.assert;function Zh(t,e){if(t instanceof Zh)return t;this._importDER(t,e)||(Jz(t.r&&t.s,"Signature without r or s"),this.r=new be(t.r,16),this.s=new be(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var e1=Zh;function Yz(){this.place=0}function $v(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,s=0,o=e.place;s>>=0;return i<=127?!1:(e.place=o,i)}function A6(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Zh.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=A6(r),n=A6(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];Dv(i,r.length),i=i.concat(r),i.push(2),Dv(i,n.length);var s=i.concat(n),o=[48];return Dv(o,s.length),o=o.concat(s),Cn.encode(o,e)};var Qz=function(){throw new Error("unsupported")},D7=Cn.assert;function Dn(t){if(!(this instanceof Dn))return new Dn(t);typeof t=="string"&&(D7(Object.prototype.hasOwnProperty.call(Dd,t),"Unknown curve "+t),t=Dd[t]),t instanceof Dd.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 Xz=Dn;Dn.prototype.keyPair=function(e){return new dx(this,e)};Dn.prototype.keyFromPrivate=function(e,r){return dx.fromPrivate(this,e,r)};Dn.prototype.keyFromPublic=function(e,r){return dx.fromPublic(this,e,r)};Dn.prototype.genKeyPair=function(e){e||(e={});for(var r=new $7({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Qz(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new be(2));;){var s=new be(r.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}};Dn.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};Dn.prototype.sign=function(e,r,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new be(e,16));for(var s=this.n.byteLength(),o=r.getPrivate().toArray("be",s),a=e.toArray("be",s),l=new $7({hash:this.hash,entropy:o,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),c=this.n.sub(new be(1)),f=0;;f++){var u=i.k?i.k(f):new be(l.generate(this.n.byteLength()));if(u=this._truncateToN(u,!0),!(u.cmpn(1)<=0||u.cmp(c)>=0)){var h=this.g.mul(u);if(!h.isInfinity()){var y=h.getX(),g=y.umod(this.n);if(g.cmpn(0)!==0){var p=u.invm(this.n).mul(g.mul(r.getPrivate()).iadd(e));if(p=p.umod(this.n),p.cmpn(0)!==0){var k=(h.getY().isOdd()?1:0)|(y.cmp(g)!==0?2:0);return i.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),k^=1),new e1({r:g,s:p,recoveryParam:k})}}}}}};Dn.prototype.verify=function(e,r,n,i){e=this._truncateToN(new be(e,16)),n=this.keyFromPublic(n,i),r=new e1(r,"hex");var s=r.r,o=r.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a=o.invm(this.n),l=a.mul(e).umod(this.n),c=a.mul(s).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.eqXToP(s)):(f=this.g.mulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.getX().umod(this.n).cmp(s)===0)};Dn.prototype.recoverPubKey=function(t,e,r,n){D7((3&r)===r,"The recovery param is more than two bits"),e=new e1(e,n);var i=this.n,s=new be(t),o=e.r,a=e.s,l=r&1,c=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");c?o=this.curve.pointFromX(o.add(this.curve.n),l):o=this.curve.pointFromX(o,l);var f=e.r.invm(i),u=i.sub(s).mul(f).umod(i),h=a.mul(f).umod(i);return this.g.mulAdd(u,o,h)};Dn.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new e1(e,n),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(r))return i}throw new Error("Unable to find valid recovery factor")};var Zz=yc(function(t,e){var r=e;r.version="6.5.4",r.utils=Cn,r.rand=function(){throw new Error("unsupported")},r.curve=$d,r.curves=Dd,r.ec=Xz,r.eddsa=null}),eV=Zz.ec;const tV="signing-key/5.7.0",kp=new q(tV);let Lv=null;function vi(){return Lv||(Lv=new eV("secp256k1")),Lv}class sa{constructor(e){te(this,"curve","secp256k1"),te(this,"privateKey",Q(e)),Ii(this.privateKey)!==32&&kp.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=vi().keyFromPrivate(X(this.privateKey));te(this,"publicKey","0x"+r.getPublic(!1,"hex")),te(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),te(this,"_isSigningKey",!0)}_addPoint(e){const r=vi().keyFromPublic(X(this.publicKey)),n=vi().keyFromPublic(X(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=vi().keyFromPrivate(X(this.privateKey)),n=X(e);n.length!==32&&kp.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return Ia({recoveryParam:i.recoveryParam,r:He("0x"+i.r.toString(16),32),s:He("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=vi().keyFromPrivate(X(this.privateKey)),n=vi().keyFromPublic(X(hx(e)));return He("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function L7(t,e){const r=Ia(e),n={r:X(r.r),s:X(r.s)};return"0x"+vi().recoverPubKey(X(t),n,r.recoveryParam).encode("hex",!1)}function hx(t,e){const r=X(t);if(r.length===32){const n=new sa(r);return e?"0x"+vi().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?Q(r):"0x"+vi().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+vi().keyFromPublic(r).getPublic(!0,"hex"):Q(r)}return kp.throwArgumentError("invalid public or private key","key","[REDACTED]")}const rV="transactions/5.7.0",Or=new q(rV);var Ap;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(Ap||(Ap={}));function vx(t){return t==="0x"?null:we(t)}function Mr(t){return t==="0x"?Dt:H.from(t)}const nV=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],iV={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function Xs(t){const e=hx(t);return we(qt(pe(qt(e,1)),12))}function wa(t,e){return Xs(L7(X(t),e))}function un(t,e){const r=ki(H.from(t).toHexString());return r.length>32&&Or.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function Bv(t,e){return{address:we(t),storageKeys:(e||[]).map((r,n)=>(Ii(r)!==32&&Or.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function Oa(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Or.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),Bv(r[0],r[1])):Bv(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return Bv(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function B7(t){return Oa(t).map(e=>[e.address,e.storageKeys])}function j7(t,e){if(t.gasPrice!=null){const n=H.from(t.gasPrice),i=H.from(t.maxFeePerGas||0);n.eq(i)||Or.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[un(t.chainId||0,"chainId"),un(t.nonce||0,"nonce"),un(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),un(t.maxFeePerGas||0,"maxFeePerGas"),un(t.gasLimit||0,"gasLimit"),t.to!=null?we(t.to):"0x",un(t.value||0,"value"),t.data||"0x",B7(t.accessList||[])];if(e){const n=Ia(e);r.push(un(n.recoveryParam,"recoveryParam")),r.push(ki(n.r)),r.push(ki(n.s))}return Hr(["0x02",xa(r)])}function F7(t,e){const r=[un(t.chainId||0,"chainId"),un(t.nonce||0,"nonce"),un(t.gasPrice||0,"gasPrice"),un(t.gasLimit||0,"gasLimit"),t.to!=null?we(t.to):"0x",un(t.value||0,"value"),t.data||"0x",B7(t.accessList||[])];if(e){const n=Ia(e);r.push(un(n.recoveryParam,"recoveryParam")),r.push(ki(n.r)),r.push(ki(n.s))}return Hr(["0x01",xa(r)])}function sV(t,e){Qm(t,iV);const r=[];nV.forEach(function(o){let a=t[o.name]||[];const l={};o.numeric&&(l.hexPad="left"),a=X(Q(a,l)),o.length&&a.length!==o.length&&a.length>0&&Or.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=ki(a),a.length>o.maxLength&&Or.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push(Q(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Or.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!os(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(Q(n)),r.push("0x"),r.push("0x")),!e)return xa(r);const i=Ia(e);let s=27+i.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),s+=n*2+8,i.v>28&&i.v!==s&&Or.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==s&&Or.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(Q(s)),r.push(ki(X(i.r))),r.push(ki(X(i.s))),xa(r)}function _p(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Or.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),sV(t,e);switch(t.type){case 1:return F7(t,e);case 2:return j7(t,e)}return Or.throwError(`unsupported transaction type: ${t.type}`,q.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function U7(t,e,r){try{const n=Mr(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Or.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=He(e[1],32),t.s=He(e[2],32);try{const n=pe(r(t));t.from=wa(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function oV(t){const e=Jh(t.slice(1));e.length!==9&&e.length!==12&&Or.throwArgumentError("invalid component count for transaction type: 2","payload",Q(t));const r=Mr(e[2]),n=Mr(e[3]),i={type:2,chainId:Mr(e[0]).toNumber(),nonce:Mr(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Mr(e[4]),to:vx(e[5]),value:Mr(e[6]),data:e[7],accessList:Oa(e[8])};return e.length===9||(i.hash=pe(t),U7(i,e.slice(9),j7)),i}function aV(t){const e=Jh(t.slice(1));e.length!==8&&e.length!==11&&Or.throwArgumentError("invalid component count for transaction type: 1","payload",Q(t));const r={type:1,chainId:Mr(e[0]).toNumber(),nonce:Mr(e[1]).toNumber(),gasPrice:Mr(e[2]),gasLimit:Mr(e[3]),to:vx(e[4]),value:Mr(e[5]),data:e[6],accessList:Oa(e[7])};return e.length===8||(r.hash=pe(t),U7(r,e.slice(8),F7)),r}function lV(t){const e=Jh(t);e.length!==9&&e.length!==6&&Or.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:Mr(e[0]).toNumber(),gasPrice:Mr(e[1]),gasLimit:Mr(e[2]),to:vx(e[3]),value:Mr(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=H.from(e[6]).toNumber()}catch{return r}if(r.r=He(e[7],32),r.s=He(e[8],32),H.from(r.r).isZero()&&H.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=e.slice(0,6);r.chainId!==0&&(i.push(Q(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const s=pe(xa(i));try{r.from=wa(s,{r:Q(r.r),s:Q(r.s),recoveryParam:n})}catch{}r.hash=pe(t)}return r.type=null,r}function z7(t){const e=X(t);if(e[0]>127)return lV(e);switch(e[0]){case 1:return aV(e);case 2:return oV(e)}return Or.throwError(`unsupported transaction type: ${e[0]}`,q.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const cV="contracts/5.7.0";var Ca=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Qt=new q(cV);function W0(t,e){return Ca(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&Qt.throwArgumentError("invalid address or ENS name","name",r);try{return we(r)}catch{}t||Qt.throwError("a provider or signer is needed to resolve ENS names",q.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&Qt.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function Ld(t,e,r){return Ca(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>Ld(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield W0(t,e):r.type==="tuple"?yield Ld(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Ld(t,n,r.arrayChildren))):Promise.reject(Qt.makeError("invalid value for array",q.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function t1(t,e,r){return Ca(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=nr(r.pop())),Qt.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=Ke({override:W0(t.signer,n.from),signer:t.signer.getAddress()}).then(c=>Ca(this,void 0,void 0,function*(){return we(c.signer)!==c.override&&Qt.throwError("Contract with a Signer cannot override from",q.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),c.override})):n.from=t.signer.getAddress():n.from&&(n.from=W0(t.provider,n.from));const i=yield Ke({args:Ld(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:Ke(n)||{}}),s=t.interface.encodeFunctionData(e,i.args),o={data:s,to:i.address},a=i.overrides;if(a.nonce!=null&&(o.nonce=H.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=H.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=H.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=H.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=H.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=Oa(a.accessList)),o.gasLimit==null&&e.gas!=null){let c=21e3;const f=X(s);for(let u=0;un[c]!=null);return l.length&&Qt.throwError(`cannot override ${l.map(c=>JSON.stringify(c)).join(",")}`,q.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),o})}function fV(t,e){return function(...r){return t1(t,e,r)}}function uV(t,e){const r=t.signer||t.provider;return function(...n){return Ca(this,void 0,void 0,function*(){r||Qt.throwError("estimate require a provider or signer",q.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield t1(t,e,n);return yield r.estimateGas(i)})}}function dV(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(s=>{let o=Ri(s),a=null;try{a=t.interface.parseLog(s)}catch{}return a&&(o.args=a.args,o.decode=(l,c)=>t.interface.decodeEventLog(a.eventFragment,l,c),o.event=a.name,o.eventSignature=a.signature),o.removeListener=()=>t.provider,o.getBlock=()=>t.provider.getBlock(i.blockHash),o.getTransaction=()=>t.provider.getTransaction(i.transactionHash),o.getTransactionReceipt=()=>Promise.resolve(i),o}),i))}function V7(t,e,r){const n=t.signer||t.provider;return function(...i){return Ca(this,void 0,void 0,function*(){let s;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const l=nr(i.pop());l.blockTag!=null&&(s=yield l.blockTag),delete l.blockTag,i.push(l)}t.deployTransaction!=null&&(yield t._deployed(s));const o=yield t1(t,e,i),a=yield n.call(o,s);try{let l=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===q.errors.CALL_EXCEPTION&&(l.address=t.address,l.args=i,l.transaction=o),l}})}}function hV(t,e){return function(...r){return Ca(this,void 0,void 0,function*(){t.signer||Qt.throwError("sending a transaction requires a signer",q.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield t1(t,e,r),i=yield t.signer.sendTransaction(n);return dV(t,i),i})}}function _6(t,e,r){return e.constant?V7(t,e,r):hV(t,e)}function H7(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class eu{constructor(e,r){te(this,"tag",e),te(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class vV extends eu{constructor(){super("error",null)}}class T6 extends eu{constructor(e,r,n,i){const s={address:e};let o=r.getEventTopic(n);i?(o!==i[0]&&Qt.throwArgumentError("topic mismatch","topics",i),s.topics=i.slice()):s.topics=[o],super(H7(s),s),te(this,"address",e),te(this,"interface",r),te(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=UE(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class P6 extends eu{constructor(e,r){super("*",{address:e}),te(this,"address",e),te(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,i)=>this.interface.decodeEventLog(r.eventFragment,n,i),e.args=r.args}catch{}}}class yV{constructor(e,r,n){te(this,"interface",Zn(new.target,"getInterface")(r)),n==null?(te(this,"provider",null),te(this,"signer",null)):fo.isSigner(n)?(te(this,"provider",n.provider||null),te(this,"signer",n)):Co.isProvider(n)?(te(this,"provider",n),te(this,"signer",null)):Qt.throwArgumentError("invalid signer or provider","signerOrProvider",n),te(this,"callStatic",{}),te(this,"estimateGas",{}),te(this,"functions",{}),te(this,"populateTransaction",{}),te(this,"filters",{});{const o={};Object.keys(this.interface.events).forEach(a=>{const l=this.interface.events[a];te(this.filters,a,(...c)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,c)})),o[l.name]||(o[l.name]=[]),o[l.name].push(a)}),Object.keys(o).forEach(a=>{const l=o[a];l.length===1?te(this.filters,a,this.filters[l[0]]):Qt.warn(`Duplicate definition of ${a} (${l.join(", ")})`)})}if(te(this,"_runningEvents",{}),te(this,"_wrappedEmits",{}),e==null&&Qt.throwArgumentError("invalid contract address or ENS name","addressOrName",e),te(this,"address",e),this.provider)te(this,"resolvedAddress",W0(this.provider,e));else try{te(this,"resolvedAddress",Promise.resolve(we(e)))}catch{Qt.throwError("provider is required to use ENS name as contract address",q.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(o=>{});const i={},s={};Object.keys(this.interface.functions).forEach(o=>{const a=this.interface.functions[o];if(s[o]){Qt.warn(`Duplicate ABI entry for ${JSON.stringify(o)}`);return}s[o]=!0;{const l=a.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(o)}this[o]==null&&te(this,o,_6(this,a,!0)),this.functions[o]==null&&te(this.functions,o,_6(this,a,!1)),this.callStatic[o]==null&&te(this.callStatic,o,V7(this,a,!0)),this.populateTransaction[o]==null&&te(this.populateTransaction,o,fV(this,a)),this.estimateGas[o]==null&&te(this.estimateGas,o,uV(this,a))}),Object.keys(i).forEach(o=>{const a=i[o];if(a.length>1)return;o=o.substring(1);const l=a[0];try{this[o]==null&&te(this,o,this[l])}catch{}this.functions[o]==null&&te(this.functions,o,this.functions[l]),this.callStatic[o]==null&&te(this.callStatic,o,this.callStatic[l]),this.populateTransaction[o]==null&&te(this.populateTransaction,o,this.populateTransaction[l]),this.estimateGas[o]==null&&te(this.estimateGas,o,this.estimateGas[l])})}static getContractAddress(e){return ex(e)}static getInterface(e){return ir.isInterface(e)?e:new ir(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&&Qt.throwError("contract not deployed",q.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Qt.throwError("sending a transactions require a signer",q.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=nr(e||{});return["from","to"].forEach(function(n){r[n]!=null&&Qt.throwError("cannot override "+n,q.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new cx(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&te(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return z0.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new vV);if(e==="event")return this._normalizeRunningEvent(new eu("event",null));if(e==="*")return this._normalizeRunningEvent(new P6(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new T6(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const i=this.interface.getEvent(n);return this._normalizeRunningEvent(new T6(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new eu(H7(r),r))}return this._normalizeRunningEvent(new P6(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const i=Ri(r);return i.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(r.blockHash),i.getTransaction=()=>this.provider.getTransaction(r.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(i),i}_addEventListener(e,r,n){if(this.provider||Qt.throwError("events require a provider or a signer with a provider",q.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=s=>{let o=this._wrapEvent(e,s,r);if(o.decodeError==null)try{const a=e.getEmit(o);this.emit(e.filter,...a)}catch(a){o.decodeError=a.error}e.filter!=null&&this.emit("event",o),o.decodeError!=null&&this.emit("error",o.decodeError,o)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,r,n){const i=this._getRunningEvent(e),s=nr(i.filter);return typeof r=="string"&&Pe(r,32)?(n!=null&&Qt.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),s.blockHash=r):(s.fromBlock=r??0,s.toBlock=n??"latest"),this.provider.getLogs(s).then(o=>o.map(a=>this._wrapEvent(i,a,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),i=n.run(r)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{r.push(i)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class Na extends yV{}class W7{constructor(e){te(this,"alphabet",e),te(this,"base",e.length),te(this,"_alphabetMap",{}),te(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(o%this.base),o=o/this.base|0}let i="";for(let s=0;r[s]===0&&s=0;--s)i+=this.alphabet[n[s]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;s>0;)r.push(s&255),s>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=u>>16&255,l[e.length+2]=u>>8&255,l[e.length+3]=u&255;let h=X(tu(i,t,l));s||(s=h.length,f=new Uint8Array(s),o=Math.ceil(n/s),c=n-(o-1)*s),f.set(h);for(let p=1;p>5,this.byteCount=this.blockCount<<2,this.outputBlocks=B>>5,this.extraBytes=(B&31)>>3;for(var U=0;U<50;++U)this.s[U]=0}d.prototype.update=function(m){if(this.finalized)throw new Error(r);var N,B=typeof m;if(B!=="string"){if(B==="object"){if(m===null)throw new Error(e);if(l&&m.constructor===ArrayBuffer)m=new Uint8Array(m);else if(!Array.isArray(m)&&(!l||!ArrayBuffer.isView(m)))throw new Error(e)}else throw new Error(e);N=!0}for(var U=this.blocks,W=this.byteCount,ee=m.length,K=this.blockCount,L=0,ne=this.s,Y,ie;L>2]|=m[L]<>2]|=ie<>2]|=(192|ie>>6)<>2]|=(128|ie&63)<=57344?(U[Y>>2]|=(224|ie>>12)<>2]|=(128|ie>>6&63)<>2]|=(128|ie&63)<>2]|=(240|ie>>18)<>2]|=(128|ie>>12&63)<>2]|=(128|ie>>6&63)<>2]|=(128|ie&63)<=W){for(this.start=Y-W,this.block=U[K],Y=0;Y>8,B=m&255;B>0;)W.unshift(B),m=m>>8,B=m&255,++U;return N?W.push(U):W.unshift(U),this.update(W),W.length},d.prototype.encodeString=function(m){var N,B=typeof m;if(B!=="string"){if(B==="object"){if(m===null)throw new Error(e);if(l&&m.constructor===ArrayBuffer)m=new Uint8Array(m);else if(!Array.isArray(m)&&(!l||!ArrayBuffer.isView(m)))throw new Error(e)}else throw new Error(e);N=!0}var U=0,W=m.length;if(N)U=W;else for(var ee=0;ee=57344?U+=3:(K=65536+((K&1023)<<10|m.charCodeAt(++ee)&1023),U+=4)}return U+=this.encode(U*8),this.update(m),U},d.prototype.bytepad=function(m,N){for(var B=this.encode(N),U=0;U>2]|=this.padding[N&3],this.lastByteIndex===this.byteCount)for(m[0]=m[B],N=1;N>4&15]+c[L&15]+c[L>>12&15]+c[L>>8&15]+c[L>>20&15]+c[L>>16&15]+c[L>>28&15]+c[L>>24&15];ee%m===0&&($(N),W=0)}return U&&(L=N[W],K+=c[L>>4&15]+c[L&15],U>1&&(K+=c[L>>12&15]+c[L>>8&15]),U>2&&(K+=c[L>>20&15]+c[L>>16&15])),K},d.prototype.arrayBuffer=function(){this.finalize();var m=this.blockCount,N=this.s,B=this.outputBlocks,U=this.extraBytes,W=0,ee=0,K=this.outputBits>>3,L;U?L=new ArrayBuffer(B+1<<2):L=new ArrayBuffer(K);for(var ne=new Uint32Array(L);ee>8&255,K[L+2]=ne>>16&255,K[L+3]=ne>>24&255;ee%m===0&&$(N)}return U&&(L=ee<<2,ne=N[W],K[L]=ne&255,U>1&&(K[L+1]=ne>>8&255),U>2&&(K[L+2]=ne>>16&255)),K};function _(m,N,B){d.call(this,m,N,B)}_.prototype=new d,_.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var $=function(m){var N,B,U,W,ee,K,L,ne,Y,ie,pe,ve,me,He,Le,je,So,Ze,et,ko,tt,rt,Ao,nt,it,_o,st,ot,To,at,lt,Po,ct,ft,Io,ut,dt,Ro,ht,vt,Mo,yt,pt,Oo,gt,mt,No,xt,bt,$o,wt,Ct,Do,Et,St,Bo,kt,At,ms,xs,bs,ws,Cs;for(U=0;U<48;U+=2)W=m[0]^m[10]^m[20]^m[30]^m[40],ee=m[1]^m[11]^m[21]^m[31]^m[41],K=m[2]^m[12]^m[22]^m[32]^m[42],L=m[3]^m[13]^m[23]^m[33]^m[43],ne=m[4]^m[14]^m[24]^m[34]^m[44],Y=m[5]^m[15]^m[25]^m[35]^m[45],ie=m[6]^m[16]^m[26]^m[36]^m[46],pe=m[7]^m[17]^m[27]^m[37]^m[47],ve=m[8]^m[18]^m[28]^m[38]^m[48],me=m[9]^m[19]^m[29]^m[39]^m[49],N=ve^(K<<1|L>>>31),B=me^(L<<1|K>>>31),m[0]^=N,m[1]^=B,m[10]^=N,m[11]^=B,m[20]^=N,m[21]^=B,m[30]^=N,m[31]^=B,m[40]^=N,m[41]^=B,N=W^(ne<<1|Y>>>31),B=ee^(Y<<1|ne>>>31),m[2]^=N,m[3]^=B,m[12]^=N,m[13]^=B,m[22]^=N,m[23]^=B,m[32]^=N,m[33]^=B,m[42]^=N,m[43]^=B,N=K^(ie<<1|pe>>>31),B=L^(pe<<1|ie>>>31),m[4]^=N,m[5]^=B,m[14]^=N,m[15]^=B,m[24]^=N,m[25]^=B,m[34]^=N,m[35]^=B,m[44]^=N,m[45]^=B,N=ne^(ve<<1|me>>>31),B=Y^(me<<1|ve>>>31),m[6]^=N,m[7]^=B,m[16]^=N,m[17]^=B,m[26]^=N,m[27]^=B,m[36]^=N,m[37]^=B,m[46]^=N,m[47]^=B,N=ie^(W<<1|ee>>>31),B=pe^(ee<<1|W>>>31),m[8]^=N,m[9]^=B,m[18]^=N,m[19]^=B,m[28]^=N,m[29]^=B,m[38]^=N,m[39]^=B,m[48]^=N,m[49]^=B,He=m[0],Le=m[1],mt=m[11]<<4|m[10]>>>28,No=m[10]<<4|m[11]>>>28,ot=m[20]<<3|m[21]>>>29,To=m[21]<<3|m[20]>>>29,xs=m[31]<<9|m[30]>>>23,bs=m[30]<<9|m[31]>>>23,yt=m[40]<<18|m[41]>>>14,pt=m[41]<<18|m[40]>>>14,ft=m[2]<<1|m[3]>>>31,Io=m[3]<<1|m[2]>>>31,je=m[13]<<12|m[12]>>>20,So=m[12]<<12|m[13]>>>20,xt=m[22]<<10|m[23]>>>22,bt=m[23]<<10|m[22]>>>22,at=m[33]<<13|m[32]>>>19,lt=m[32]<<13|m[33]>>>19,ws=m[42]<<2|m[43]>>>30,Cs=m[43]<<2|m[42]>>>30,Et=m[5]<<30|m[4]>>>2,St=m[4]<<30|m[5]>>>2,ut=m[14]<<6|m[15]>>>26,dt=m[15]<<6|m[14]>>>26,Ze=m[25]<<11|m[24]>>>21,et=m[24]<<11|m[25]>>>21,$o=m[34]<<15|m[35]>>>17,wt=m[35]<<15|m[34]>>>17,Po=m[45]<<29|m[44]>>>3,ct=m[44]<<29|m[45]>>>3,nt=m[6]<<28|m[7]>>>4,it=m[7]<<28|m[6]>>>4,Bo=m[17]<<23|m[16]>>>9,kt=m[16]<<23|m[17]>>>9,Ro=m[26]<<25|m[27]>>>7,ht=m[27]<<25|m[26]>>>7,ko=m[36]<<21|m[37]>>>11,tt=m[37]<<21|m[36]>>>11,Ct=m[47]<<24|m[46]>>>8,Do=m[46]<<24|m[47]>>>8,Oo=m[8]<<27|m[9]>>>5,gt=m[9]<<27|m[8]>>>5,_o=m[18]<<20|m[19]>>>12,st=m[19]<<20|m[18]>>>12,At=m[29]<<7|m[28]>>>25,ms=m[28]<<7|m[29]>>>25,vt=m[38]<<8|m[39]>>>24,Mo=m[39]<<8|m[38]>>>24,rt=m[48]<<14|m[49]>>>18,Ao=m[49]<<14|m[48]>>>18,m[0]=He^~je&Ze,m[1]=Le^~So&et,m[10]=nt^~_o&ot,m[11]=it^~st&To,m[20]=ft^~ut&Ro,m[21]=Io^~dt&ht,m[30]=Oo^~mt&xt,m[31]=gt^~No&bt,m[40]=Et^~Bo&At,m[41]=St^~kt&ms,m[2]=je^~Ze&ko,m[3]=So^~et&tt,m[12]=_o^~ot&at,m[13]=st^~To<,m[22]=ut^~Ro&vt,m[23]=dt^~ht&Mo,m[32]=mt^~xt&$o,m[33]=No^~bt&wt,m[42]=Bo^~At&xs,m[43]=kt^~ms&bs,m[4]=Ze^~ko&rt,m[5]=et^~tt&Ao,m[14]=ot^~at&Po,m[15]=To^~lt&ct,m[24]=Ro^~vt&yt,m[25]=ht^~Mo&pt,m[34]=xt^~$o&Ct,m[35]=bt^~wt&Do,m[44]=At^~xs&ws,m[45]=ms^~bs&Cs,m[6]=ko^~rt&He,m[7]=tt^~Ao&Le,m[16]=at^~Po&nt,m[17]=lt^~ct&it,m[26]=vt^~yt&ft,m[27]=Mo^~pt&Io,m[36]=$o^~Ct&Oo,m[37]=wt^~Do>,m[46]=xs^~ws&Et,m[47]=bs^~Cs&St,m[8]=rt^~He&je,m[9]=Ao^~Le&So,m[18]=Po^~nt&_o,m[19]=ct^~it&st,m[28]=yt^~ft&ut,m[29]=pt^~Io&dt,m[38]=Ct^~Oo&mt,m[39]=Do^~gt&No,m[48]=ws^~Et&Bo,m[49]=Cs^~St&kt,m[0]^=p[U],m[1]^=p[U+1]};if(a)t.exports=v;else for(P=0;P>=8;return e}function f6(t,e,r){let n=0;for(let i=0;ie+1+n&&hi.throwError("child data too short",H.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function HE(t,e){if(t.length===0&&hi.throwError("data too short",H.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&hi.throwError("data short segment too short",H.errors.BUFFER_OVERRUN,{});const n=f6(t,e+1,r);return e+1+r+n>t.length&&hi.throwError("data long segment too short",H.errors.BUFFER_OVERRUN,{}),u6(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&hi.throwError("data array too short",H.errors.BUFFER_OVERRUN,{}),u6(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&hi.throwError("data array too short",H.errors.BUFFER_OVERRUN,{});const n=f6(t,e+1,r);e+1+r+n>t.length&&hi.throwError("data array too short",H.errors.BUFFER_OVERRUN,{});const i=Q(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:i}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&hi.throwError("data too short",H.errors.BUFFER_OVERRUN,{});const n=Q(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:Q(t[e])}}function Jh(t){const e=X(t),r=HE(e,0);return r.consumed!==e.length&&hi.throwArgumentError("invalid rlp data","data",t),r.result}const qj=Object.freeze(Object.defineProperty({__proto__:null,decode:Jh,encode:xa},Symbol.toStringTag,{value:"Module"})),Gj="address/5.7.0",js=new H(Gj);function d6(t){Ie(t,20)||js.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=X(xe(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const Kj=9007199254740991;function Jj(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const Zm={};for(let t=0;t<10;t++)Zm[String(t)]=String(t);for(let t=0;t<26;t++)Zm[String.fromCharCode(65+t)]=String(10+t);const h6=Math.floor(Jj(Kj));function WE(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>Zm[n]).join("");for(;e.length>=h6;){let n=e.substring(0,h6);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function Se(t){let e=null;if(typeof t!="string"&&js.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=d6(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&js.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)!==WE(t)&&js.throwArgumentError("bad icap checksum","address",t),e=Rj(t.substring(4));e.length<40;)e="0"+e;e=d6("0x"+e)}else js.throwArgumentError("invalid address","address",t);return e}function qE(t){try{return Se(t),!0}catch{}return!1}function Yj(t){let e=Mj(Se(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+WE("XE00"+e)+e}function ex(t){let e=null;try{e=Se(t.from)}catch{js.throwArgumentError("missing from address","transaction",t)}const r=ki(X(V.from(t.nonce).toHexString()));return Se(qt(xe(xa([e,r])),12))}function Qj(t,e,r){return Ii(e)!==32&&js.throwArgumentError("salt must be 32 bytes","salt",e),Ii(r)!==32&&js.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),Se(qt(xe(Ke(["0xff",Se(t),e,r])),12))}class Xj extends hs{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=Se(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return Se(Je(e.readValue().toHexString(),20))}}class Zj extends hs{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const hl=new H(mu);function GE(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let l={};n=e.map(c=>{const f=c.localName;return f||hl.throwError("cannot encode object for signature with missing names",H.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]&&hl.throwError("cannot encode object for signature with duplicate names",H.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]=!0,r[f]})}else hl.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&hl.throwArgumentError("types/value length mismatch","tuple",r);let i=new xp(t.wordSize),s=new xp(t.wordSize),o=[];e.forEach((l,c)=>{let f=n[c];if(l.dynamic){let u=s.length;l.encode(s,f);let h=i.writeUpdatableValue();o.push(y=>{h(y+u)})}else l.encode(i,f)}),o.forEach(l=>{l(i.length)});let a=t.appendWriter(i);return a+=t.appendWriter(s),a}function KE(t,e){let r=[],n=t.subReader(0);e.forEach(s=>{let o=null;if(s.dynamic){let a=t.readValue(),l=n.subReader(a.toNumber());try{o=s.decode(l)}catch(c){if(c.code===H.errors.BUFFER_OVERRUN)throw c;o=c,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(t)}catch(a){if(a.code===H.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}o!=null&&r.push(o)});const i=e.reduce((s,o)=>{const a=o.localName;return a&&(s[a]||(s[a]=0),s[a]++),s},{});e.forEach((s,o)=>{let a=s.localName;if(!a||i[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;const l=r[o];l instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw l}}):r[a]=l});for(let s=0;s{throw o}})}return Object.freeze(r)}class eF extends hs{constructor(e,r,n){const i=e.type+"["+(r>=0?r:"")+"]",s=r===-1||e.dynamic;super("array",i,n,s),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&hl.throwError("insufficient data length",H.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let i=0;i>6===2;o++)s++;return s}return t===Zr.OVERRUN?r.length-e-1:0}function fF(t,e,r,n,i){return t===Zr.OVERLONG?(n.push(i),0):(n.push(65533),ZE(t,e,r))}const e7=Object.freeze({error:cF,ignore:ZE,replace:fF});function rx(t,e){e==null&&(e=e7.error),t=X(t);const r=[];let n=0;for(;n>7)){r.push(i);continue}let s=null,o=null;if((i&224)===192)s=1,o=127;else if((i&240)===224)s=2,o=2047;else if((i&248)===240)s=3,o=65535;else{(i&192)===128?n+=e(Zr.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Zr.BAD_PREFIX,n-1,t,r);continue}if(n-1+s>=t.length){n+=e(Zr.OVERRUN,n-1,t,r);continue}let a=i&(1<<8-s-1)-1;for(let l=0;l1114111){n+=e(Zr.OUT_OF_RANGE,n-1-s,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(Zr.UTF16_SURROGATE,n-1-s,t,r,a);continue}if(a<=o){n+=e(Zr.OVERLONG,n-1-s,t,r,a);continue}r.push(a)}}return r}function Ue(t,e=Mi.current){e!=Mi.current&&(XE.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const s=t.charCodeAt(n);if(n>=t.length||(s&64512)!==56320)throw new Error("invalid utf-8 string");const o=65536+((i&1023)<<10)+(s&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return X(r)}function Pv(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function uF(t,e){return'"'+rx(t,e).map(r=>{if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?Pv(r):(r-=65536,Pv((r>>10&1023)+55296)+Pv((r&1023)+56320))}).join("")+'"'}function bp(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function vs(t,e){return bp(rx(t,e))}function F0(t,e=Mi.current){return rx(Ue(t,e))}function dF(t){const e=Ue(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Q(Ke([e,j0]).slice(0,32))}function hF(t){const e=X(t);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return vs(e.slice(0,r))}function vF(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let s=i.split(":");r+=parseInt(s[0],16),n[r]=e(s[1])}),n}function t7(t){let e=0;return t.split(",").map(r=>{let n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function ix(t,e){let r=0;for(let n=0;n=r&&t<=r+i.h&&(t-r)%(i.d||1)===0){if(i.e&&i.e.indexOf(t-r)!==-1)continue;return i}}return null}const yF=t7("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"),pF="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),gF=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],mF=nx("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"),xF=nx("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"),bF=nx("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",vF),wF=t7("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 CF(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function EF(t){return!!ix(t,yF)}function SF(t){let e=ix(t,gF);if(e)return[t+e.s];let r=mF[t];if(r)return r;let n=xF[t];if(n)return[t+n[0]];let i=bF[t];return i||null}function kF(t){return!!ix(t,wF)}function AF(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=F0(t);e=CF(e.map(n=>{if(pF.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=SF(n);return i||[n]})),e=F0(bp(e),Mi.NFKC),e.forEach(n=>{if(kF(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(EF(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=bp(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}class _F extends JE{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Ue(r))}decode(e){return vs(super.decode(e))}}class ad extends hs{constructor(e,r){let n=!1;const i=[];e.forEach(o=>{o.dynamic&&(n=!0),i.push(o.type)});const s="tuple("+i.join(",")+")";super("tuple",s,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,i)=>{const s=i.localName;return s&&(n[s]||(n[s]=0),n[s]++),n},{});return this.coders.forEach((n,i)=>{let s=n.localName;!s||r[s]!==1||(s==="length"&&(s="_length"),e[s]==null&&(e[s]=e[i]))}),Object.freeze(e)}encode(e,r){return GE(e,this.coders,r)}decode(e){return e.coerce(this.name,KE(e,this.coders))}}const ld=new H(mu),TF=new RegExp(/^bytes([0-9]*)$/),PF=new RegExp(/^(u?int)([0-9]*)$/);class sx{constructor(e){re(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Xj(e.name);case"bool":return new tF(e.name);case"string":return new _F(e.name);case"bytes":return new rF(e.name);case"array":return new eF(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new ad((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new iF(e.name)}let r=e.type.match(PF);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&ld.throwArgumentError("invalid "+r[1]+" bit length","param",e),new aF(n/8,r[1]==="int",e.name)}if(r=e.type.match(TF),r){let n=parseInt(r[1]);return(n===0||n>32)&&ld.throwArgumentError("invalid bytes length","param",e),new nF(n,e.name)}return ld.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new L0(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new xp(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(fr.from(i)));return new ad(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&ld.throwError("types/values length mismatch",H.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(fr.from(o))),i=new ad(n,"_"),s=this._getWriter();return i.encode(s,r),s.data}decode(e,r,n){const i=e.map(o=>this._getCoder(fr.from(o)));return new ad(i,"_").decode(this._getReader(X(r),n))}}const Kr=new sx;function Fs(t){return xe(Ue(t))}const r7="hash/5.7.0";function ox(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(a)?i(a,o-1):r.push(a)})};return i(t,e),r}function RF(t){const e={};for(let r=0;r>--l&1}const u=31,h=Math.pow(2,u),y=h>>>1,g=y>>1,p=h-1;let k=0;for(let M=0;M1;){let G=j+z>>>1;M>>1|f(),F=F<<1^y,q=(q^y)<<1|y|1;E=F,A=1+q-F}let I=n-4;return w.map(M=>{switch(M-I){case 3:return I+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return I+256+(t[a++]<<8|t[a++]);case 1:return I+t[a++];default:return M-1}})}function OF(t){let e=0;return()=>t[e++]}function NF(t){return OF(MF(t))}function $F(t){return t&1?~t>>1:t>>1}function DF(t,e){let r=Array(t);for(let n=0;ne[o]):r}function LF(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(FF(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(UF(r,t))}return RF(n7(e))}function jF(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function i7(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function FF(t,e){let r=1+e(),n=e(),i=jF(e),s=i7(i.length,1+t,e);return n7(s.map((o,a)=>{const l=o[0],c=o.slice(1);return Array(i[a]).fill(void 0).map((f,u)=>{let h=u*n;return[l+u*r,c.map(y=>y+h)]})}))}function UF(t,e){let r=1+e();return i7(r,1+t,e).map(i=>[i[0],i.slice(1)])}function zF(t){let e=U0(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let c=U0(t,e);if(c.length==0)break;n.push({set:new Set(c),node:r()})}n.sort((c,f)=>f.set.size-c.set.size);let i=t(),s=i%3;i=i/3|0;let o=!!(i&1);i>>=1;let a=i==1,l=i==2;return{branches:n,valid:s,fe0f:o,save:a,check:l}}}function VF(){return NF(ox("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 Yh=VF(),HF=new Set(U0(Yh)),WF=new Set(U0(Yh)),qF=LF(Yh),GF=zF(Yh),y6=45,p6=95;function s7(t){return F0(t)}function KF(t){return t.filter(e=>e!=65039)}function o7(t){for(let e of t.split(".")){let r=s7(e);try{for(let n=r.lastIndexOf(p6)-1;n>=0;n--)if(r[n]!==p6)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===y6&&r[3]===y6)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function JF(t){return o7(YF(t,KF))}function YF(t,e){let r=s7(t).reverse(),n=[];for(;r.length;){let i=XF(r);if(i){n.push(...e(i));continue}let s=r.pop();if(HF.has(s)){n.push(s);continue}if(WF.has(s))continue;let o=qF[s];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${s.toString(16).toUpperCase()}`)}return o7(QF(String.fromCodePoint(...n)))}function QF(t){return t.normalize("NFC")}function XF(t,e){var r;let n=GF,i,s,o=[],a=t.length;for(e&&(e.length=0);a;){let l=t[--a];if(n=(r=n.branches.find(c=>c.set.has(l)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)s=l;else if(n.check&&l===s)break;o.push(l),n.fe0f&&(o.push(65039),a>0&&t[a-1]==65039&&a--),n.valid&&(i=o.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return i}const ZF=new H(r7),a7=new Uint8Array(32);a7.fill(0);function g6(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function lx(t){const e=Ue(JF(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return r.push(g6(e.slice(n))),r}function eU(t){try{return lx(t).length!==0}catch{}return!1}function df(t){typeof t!="string"&&ZF.throwArgumentError("invalid ENS name; not a string","name",t);let e=a7;const r=lx(t);for(;r.length;)e=xe(Ke([e,xe(r.pop())]));return Q(e)}function l7(t){return Q(Ke(lx(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}const tU=`Ethereum Signed Message: +`;function Qh(t){return typeof t=="string"&&(t=Ue(t)),xe(Ke([Ue(tU),Ue(String(t.length)),t]))}var rU=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Lt=new H(r7),c7=new Uint8Array(32);c7.fill(0);const nU=V.from(-1),f7=V.from(0),u7=V.from(1),iU=V.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function sU(t){const e=X(t),r=e.length%32;return r?Hr([e,c7.slice(r)]):Q(e)}const oU=Je(u7.toHexString(),32),aU=Je(f7.toHexString(),32),m6={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Iv=["name","version","chainId","verifyingContract","salt"];function x6(t){return function(e){return typeof e!="string"&&Lt.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const lU={name:x6("name"),version:x6("version"),chainId:function(t){try{return V.from(t).toString()}catch{}return Lt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return Se(t).toLowerCase()}catch{}return Lt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=X(t);if(e.length!==32)throw new Error("bad length");return Q(e)}catch{}return Lt.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function Rv(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&Lt.throwArgumentError("invalid numeric width","type",t);const i=iU.mask(r?n-1:n),s=r?i.add(u7).mul(nU):f7;return function(o){const a=V.from(o);return(a.lt(s)||a.gt(i))&&Lt.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),Je(a.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&Lt.throwArgumentError("invalid bytes width","type",t),function(n){return X(n).length!==r&&Lt.throwArgumentError(`invalid length for ${t}`,"value",n),sU(n)}}}switch(t){case"address":return function(e){return Je(Se(e),32)};case"bool":return function(e){return e?oU:aU};case"bytes":return function(e){return xe(e)};case"string":return function(e){return Fs(e)}}return null}function b6(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class er{constructor(e){re(this,"types",Object.freeze(Ri(e))),re(this,"_encoderCache",{}),re(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],i[a]={}});for(const a in e){const l={};e[a].forEach(c=>{l[c.name]&&Lt.throwArgumentError(`duplicate variable name ${JSON.stringify(c.name)} in ${JSON.stringify(a)}`,"types",e),l[c.name]=!0;const f=c.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===a&&Lt.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!Rv(f)&&(n[f]||Lt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(a),r[a][f]=!0)})}const s=Object.keys(n).filter(a=>n[a].length===0);s.length===0?Lt.throwArgumentError("missing primary type","types",e):s.length>1&&Lt.throwArgumentError(`ambiguous primary types or unused types: ${s.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),re(this,"primaryType",s[0]);function o(a,l){l[a]&&Lt.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),l[a]=!0,Object.keys(r[a]).forEach(c=>{n[c]&&(o(c,l),Object.keys(l).forEach(f=>{i[f][c]=!0}))}),delete l[a]}o(this.primaryType,{});for(const a in i){const l=Object.keys(i[a]);l.sort(),this._types[a]=b6(a,e[a])+l.map(c=>b6(c,e[c])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=Rv(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],s=this.getEncoder(i),o=parseInt(r[3]);return a=>{o>=0&&a.length!==o&&Lt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let l=a.map(s);return this._types[i]&&(l=l.map(xe)),xe(Hr(l))}}const n=this.types[e];if(n){const i=Fs(this._types[e]);return s=>{const o=n.map(({name:a,type:l})=>{const c=this.getEncoder(l)(s[a]);return this._types[l]?xe(c):c});return o.unshift(i),Hr(o)}}return Lt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||Lt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return xe(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(Rv(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const o=i[1],a=parseInt(i[3]);return a>=0&&r.length!==a&&Lt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(l=>this._visit(o,l,n))}const s=this.types[e];return s?s.reduce((o,{name:a,type:l})=>(o[a]=this._visit(l,r[a],n),o),{}):Lt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new er(e)}static getPrimaryType(e){return er.from(e).primaryType}static hashStruct(e,r,n){return er.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=m6[n];i||Lt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>Iv.indexOf(n.name)-Iv.indexOf(i.name)),er.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Hr(["0x1901",er.hashDomain(e),er.from(r).hash(n)])}static hash(e,r,n){return xe(er.encode(e,r,n))}static resolveNames(e,r,n,i){return rU(this,void 0,void 0,function*(){e=nr(e);const s={};e.verifyingContract&&!Ie(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=er.from(r);o.visit(n,(a,l)=>(a==="address"&&!Ie(l,20)&&(s[l]="0x"),l));for(const a in s)s[a]=yield i(a);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),n=o.visit(n,(a,l)=>a==="address"&&s[l]?s[l]:l),{domain:e,value:n}})}static getPayload(e,r,n){er.hashDomain(e);const i={},s=[];Iv.forEach(l=>{const c=e[l];c!=null&&(i[l]=lU[l](c),s.push({name:l,type:m6[l]}))});const o=er.from(r),a=nr(r);return a.EIP712Domain?Lt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(l,c)=>{if(l.match(/^bytes(\d*)/))return Q(X(c));if(l.match(/^u?int/))return V.from(c).toString();switch(l){case"address":return c.toLowerCase();case"bool":return!!c;case"string":return typeof c!="string"&&Lt.throwArgumentError("invalid string","value",c),c}return Lt.throwArgumentError("unsupported type","type",l)})}}}const Bt=new H(mu);class d7 extends Ra{}class h7 extends Ra{}class cU extends Ra{}class z0 extends Ra{static isIndexed(e){return!!(e&&e._isIndexed)}}const fU={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function w6(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class ir{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,re(this,"fragments",r.map(n=>mi.from(n)).filter(n=>n!=null)),re(this,"_abiCoder",Zn(new.target,"getAbiCoder")()),re(this,"functions",{}),re(this,"errors",{}),re(this,"events",{}),re(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){Bt.warn("duplicate definition - constructor");return}re(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let s=n.format();if(i[s]){Bt.warn("duplicate definition - "+s);return}i[s]=n}),this.deploy||re(this,"deploy",Qn.from({payable:!1,type:"constructor"})),re(this,"_isInterface",!0)}format(e){e||(e=$e.full),e===$e.sighash&&Bt.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===$e.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return Kr}static getAddress(e){return Se(e)}static getSighash(e){return qt(Fs(e.format()),0,4)}static getEventTopic(e){return Fs(e.format())}getFunction(e){if(Ie(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];Bt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.functions).filter(s=>s.split("(")[0]===n);return i.length===0?Bt.throwArgumentError("no matching function","name",n):i.length>1&&Bt.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[Xn.fromString(e).format()];return r||Bt.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(Ie(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];Bt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.events).filter(s=>s.split("(")[0]===n);return i.length===0?Bt.throwArgumentError("no matching event","name",n):i.length>1&&Bt.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[gi.fromString(e).format()];return r||Bt.throwArgumentError("no matching event","signature",e),r}getError(e){if(Ie(e)){const n=Zn(this.constructor,"getSighash");for(const i in this.errors){const s=this.errors[i];if(e===n(s))return this.errors[i]}Bt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.errors).filter(s=>s.split("(")[0]===n);return i.length===0?Bt.throwArgumentError("no matching error","name",n):i.length>1&&Bt.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[Xn.fromString(e).format()];return r||Bt.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return Zn(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),Zn(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=X(r);return Q(n.slice(0,4))!==this.getSighash(e)&&Bt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Q(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),Q(Ke([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=X(r);return Q(n.slice(0,4))!==this.getSighash(e)&&Bt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Q(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Q(Ke([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=X(r),i=null,s="",o=null,a=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const c=Q(n.slice(0,4)),f=fU[c];if(f)o=this._abiCoder.decode(f.inputs,n.slice(4)),a=f.name,l=f.signature,f.reason&&(i=o[0]),a==="Error"?s=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(s=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const u=this.getError(c);o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,l=u.format()}catch{}break}}return Bt.throwError("call revert exception"+s,H.errors.CALL_EXCEPTION,{method:e.format(),data:Q(r),errorArgs:o,errorName:a,errorSignature:l,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Q(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&Bt.throwError("too many arguments for "+e.format(),H.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(s,o)=>s.type==="string"?Fs(o):s.type==="bytes"?xe(Q(o)):(s.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),s.type.match(/^u?int/)&&(o=V.from(o).toHexString()),s.type==="address"&&this._abiCoder.encode(["address"],[o]),Je(Q(o),32));for(r.forEach((s,o)=>{let a=e.inputs[o];if(!a.indexed){s!=null&&Bt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,s);return}s==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?Bt.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,s):Array.isArray(s)?n.push(s.map(l=>i(a,l))):n.push(i(a,s))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],i=[],s=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&Bt.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const l=r[a];if(o.indexed)if(o.type==="string")n.push(Fs(l));else if(o.type==="bytes")n.push(xe(l));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([o.type],[l]))}else i.push(o),s.push(l)}),{data:this._abiCoder.encode(i,s),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let h=this.getEventTopic(e);(!Ie(n[0],32)||n[0].toLowerCase()!==h)&&Bt.throwError("fragment/topic mismatch",H.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:h,value:n[0]}),n=n.slice(1)}let i=[],s=[],o=[];e.inputs.forEach((h,y)=>{h.indexed?h.type==="string"||h.type==="bytes"||h.baseType==="tuple"||h.baseType==="array"?(i.push(fr.fromObject({type:"bytes32",name:h.name})),o.push(!0)):(i.push(h),o.push(!1)):(s.push(h),o.push(!1))});let a=n!=null?this._abiCoder.decode(i,Ke(n)):null,l=this._abiCoder.decode(s,r,!0),c=[],f=0,u=0;e.inputs.forEach((h,y)=>{if(h.indexed)if(a==null)c[y]=new z0({_isIndexed:!0,hash:null});else if(o[y])c[y]=new z0({_isIndexed:!0,hash:a[u++]});else try{c[y]=a[u++]}catch(g){c[y]=g}else try{c[y]=l[f++]}catch(g){c[y]=g}if(h.name&&c[h.name]==null){const g=c[y];g instanceof Error?Object.defineProperty(c,h.name,{enumerable:!0,get:()=>{throw w6(`property ${JSON.stringify(h.name)}`,g)}}):c[h.name]=g}});for(let h=0;h{throw w6(`index ${h}`,y)}})}return Object.freeze(c)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new h7({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:V.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new d7({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=Q(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new cU({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const uU="abstract-provider/5.7.0";var dU=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const hU=new H(uU);class vU extends Ra{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class Co{constructor(){hU.checkAbstract(new.target,Co),re(this,"_isProvider",!0)}getFeeData(){return dU(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield Ye({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(o=>null)});let n=null,i=null,s=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,s=V.from("1500000000"),i=e.baseFeePerGas.mul(2).add(s)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:s,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const yU="abstract-signer/5.7.0";var Un=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Sn=new H(yU),pU=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],gU=[H.errors.INSUFFICIENT_FUNDS,H.errors.NONCE_EXPIRED,H.errors.REPLACEMENT_UNDERPRICED];let fo=class v7{constructor(){Sn.checkAbstract(new.target,v7),re(this,"_isSigner",!0)}getBalance(e){return Un(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Un(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Un(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield Ye(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return Un(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield Ye(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return Un(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return Un(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Un(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Un(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Un(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)pU.indexOf(n)===-1&&Sn.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=nr(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&Sn.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return Un(this,void 0,void 0,function*(){const r=yield Ye(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>Un(this,void 0,void 0,function*(){if(i==null)return null;const s=yield this.resolveName(i);return s==null&&Sn.throwArgumentError("provided ENS name resolves to null","tx.to",i),s})),r.to.catch(i=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?Sn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&Sn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(r.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const s=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=s,r.maxPriorityFeePerGas=s}else r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&Sn.throwError("network does not support EIP-1559",H.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):Sn.throwError("failed to get consistent fee data",H.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(i=>{if(gU.indexOf(i.code)>=0)throw i;return Sn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",H.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&Sn.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Ye(r)})}_checkProvider(e){this.provider||Sn.throwError("missing provider",H.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class cx extends fo{constructor(e,r){super(),re(this,"address",e),re(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{Sn.throwError(e,H.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new cx(this.address,e)}}var y7={},Me={},xu=p7;function p7(t,e){if(!t)throw new Error(e||"Assertion failed")}p7.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var wp={exports:{}};typeof Object.create=="function"?wp.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:wp.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var mU=wp.exports,xU=xu,bU=mU;Me.inherits=bU;function wU(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function CU(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];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>6|192,r[n++]=s&63|128):wU(t,i)?(s=65536+((s&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=s&63|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=s&63|128)}else for(i=0;i>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Me.htonl=g7;function SU(t,e){for(var r="",n=0;n>>0}return s}Me.join32=kU;function AU(t,e){for(var r=new Array(t.length*4),n=0,i=0;n>>24,r[i+1]=s>>>16&255,r[i+2]=s>>>8&255,r[i+3]=s&255):(r[i+3]=s>>>24,r[i+2]=s>>>16&255,r[i+1]=s>>>8&255,r[i]=s&255)}return r}Me.split32=AU;function _U(t,e){return t>>>e|t<<32-e}Me.rotr32=_U;function TU(t,e){return t<>>32-e}Me.rotl32=TU;function PU(t,e){return t+e>>>0}Me.sum32=PU;function IU(t,e,r){return t+e+r>>>0}Me.sum32_3=IU;function RU(t,e,r,n){return t+e+r+n>>>0}Me.sum32_4=RU;function MU(t,e,r,n,i){return t+e+r+n+i>>>0}Me.sum32_5=MU;function OU(t,e,r,n){var i=t[e],s=t[e+1],o=n+s>>>0,a=(o>>0,t[e+1]=o}Me.sum64=OU;function NU(t,e,r,n){var i=e+n>>>0,s=(i>>0}Me.sum64_hi=NU;function $U(t,e,r,n){var i=e+n;return i>>>0}Me.sum64_lo=$U;function DU(t,e,r,n,i,s,o,a){var l=0,c=e;c=c+n>>>0,l+=c>>0,l+=c>>0,l+=c>>0}Me.sum64_4_hi=DU;function BU(t,e,r,n,i,s,o,a){var l=e+n+s+a;return l>>>0}Me.sum64_4_lo=BU;function LU(t,e,r,n,i,s,o,a,l,c){var f=0,u=e;u=u+n>>>0,f+=u>>0,f+=u>>0,f+=u>>0,f+=u>>0}Me.sum64_5_hi=LU;function jU(t,e,r,n,i,s,o,a,l,c){var f=e+n+s+a+c;return f>>>0}Me.sum64_5_lo=jU;function FU(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Me.rotr64_hi=FU;function UU(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Me.rotr64_lo=UU;function zU(t,e,r){return t>>>r}Me.shr64_hi=zU;function VU(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Me.shr64_lo=VU;var dc={},C6=Me,HU=xu;function Xh(){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}dc.BlockHash=Xh;Xh.prototype.update=function(e,r){if(e=C6.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=C6.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[s++]=e>>>16&255,i[s++]=e>>>8&255,i[s++]=e&255}else for(i[s++]=e&255,i[s++]=e>>>8&255,i[s++]=e>>>16&255,i[s++]=e>>>24&255,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,o=8;o>>3}Di.g0_256=JU;function YU(t){return Ai(t,17)^Ai(t,19)^t>>>10}Di.g1_256=YU;var Wl=Me,QU=dc,XU=Di,Mv=Wl.rotl32,Rc=Wl.sum32,ZU=Wl.sum32_5,ez=XU.ft_1,E7=QU.BlockHash,tz=[1518500249,1859775393,2400959708,3395469782];function Oi(){if(!(this instanceof Oi))return new Oi;E7.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Wl.inherits(Oi,E7);var rz=Oi;Oi.blockSize=512;Oi.outSize=160;Oi.hmacStrength=80;Oi.padLength=64;Oi.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),Vz(e.length<=this.blockSize);for(var r=e.length;r>8,h=f&255;u?l.push(u,h):l.push(h)}return l}r.toArray=n;function i(o){return o.length===1?"0"+o:o}r.zero2=i;function s(o){for(var a="",l=0;l(h>>1)-1?p=(h>>1)-k:p=k,y.isubn(p)):p=0,u[g]=p,y.iushrn(1)}return u}r.getNAF=n;function i(l,c){var f=[[],[]];l=l.clone(),c=c.clone();for(var u=0,h=0,y;l.cmpn(-u)>0||c.cmpn(-h)>0;){var g=l.andln(3)+u&3,p=c.andln(3)+h&3;g===3&&(g=-1),p===3&&(p=-1);var k;g&1?(y=l.andln(7)+u&7,(y===3||y===5)&&p===2?k=-g:k=g):k=0,f[0].push(k);var w;p&1?(y=c.andln(7)+h&7,(y===3||y===5)&&g===2?w=-p:w=p):w=0,f[1].push(w),2*u===k+1&&(u=1-u),2*h===w+1&&(h=1-h),l.iushrn(1),c.iushrn(1)}return f}r.getJSF=i;function s(l,c,f){var u="_"+c;l.prototype[c]=function(){return this[u]!==void 0?this[u]:this[u]=f.call(this)}}r.cachedProperty=s;function o(l){return typeof l=="string"?r.toArray(l,"hex"):l}r.parseBytes=o;function a(l){return new Ee(l,"hex","le")}r.intFromLE=a}),V0=Cn.getNAF,qz=Cn.getJSF,H0=Cn.assert;function Eo(t,e){this.type=t,this.p=new Ee(e.p,16),this.red=e.prime?Ee.red(e.prime):Ee.mont(this.p),this.zero=new Ee(0).toRed(this.red),this.one=new Ee(1).toRed(this.red),this.two=new Ee(2).toRed(this.red),this.n=e.n&&new Ee(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 r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Ma=Eo;Eo.prototype.point=function(){throw new Error("Not implemented")};Eo.prototype.validate=function(){throw new Error("Not implemented")};Eo.prototype._fixedNafMul=function(e,r){H0(e.precomputed);var n=e._getDoubles(),i=V0(r,1,this._bitLength),s=(1<=a;c--)l=(l<<1)+i[c];o.push(l)}for(var f=this.jpoint(null,null,null),u=this.jpoint(null,null,null),h=s;h>0;h--){for(a=0;a=0;l--){for(var c=0;l>=0&&o[l]===0;l--)c++;if(l>=0&&c++,a=a.dblp(c),l<0)break;var f=o[l];H0(f!==0),e.type==="affine"?f>0?a=a.mixedAdd(s[f-1>>1]):a=a.mixedAdd(s[-f-1>>1].neg()):f>0?a=a.add(s[f-1>>1]):a=a.add(s[-f-1>>1].neg())}return e.type==="affine"?a.toP():a};Eo.prototype._wnafMulAdd=function(e,r,n,i,s){var o=this._wnafT1,a=this._wnafT2,l=this._wnafT3,c=0,f,u,h;for(f=0;f=1;f-=2){var g=f-1,p=f;if(o[g]!==1||o[p]!==1){l[g]=V0(n[g],o[g],this._bitLength),l[p]=V0(n[p],o[p],this._bitLength),c=Math.max(l[g].length,c),c=Math.max(l[p].length,c);continue}var k=[r[g],null,null,r[p]];r[g].y.cmp(r[p].y)===0?(k[1]=r[g].add(r[p]),k[2]=r[g].toJ().mixedAdd(r[p].neg())):r[g].y.cmp(r[p].y.redNeg())===0?(k[1]=r[g].toJ().mixedAdd(r[p]),k[2]=r[g].add(r[p].neg())):(k[1]=r[g].toJ().mixedAdd(r[p]),k[2]=r[g].toJ().mixedAdd(r[p].neg()));var w=[-3,-1,-5,-7,0,7,5,1,3],E=qz(n[g],n[p]);for(c=Math.max(E[0].length,c),l[g]=new Array(c),l[p]=new Array(c),u=0;u=0;f--){for(var z=0;f>=0;){var F=!0;for(u=0;u=0&&z++,M=M.dblp(z),f<0)break;for(u=0;u0?h=a[u][q-1>>1]:q<0&&(h=a[u][-q-1>>1].neg()),h.type==="affine"?M=M.mixedAdd(h):M=M.add(h))}}for(f=0;f=Math.ceil((e.bitLength()+1)/r.step):!1};Bn.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,s=0;s=0&&(y=c,g=f),u.negative&&(u=u.neg(),h=h.neg()),y.negative&&(y=y.neg(),g=g.neg()),[{a:u,b:h},{a:y,b:g}]};Ln.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],s=i.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=s.mul(n.a),l=o.mul(i.a),c=s.mul(n.b),f=o.mul(i.b),u=e.sub(a).sub(l),h=c.add(f).neg();return{k1:u,k2:h}};Ln.prototype.pointFromX=function(e,r){e=new Ee(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var s=i.fromRed().isOdd();return(r&&!s||!r&&s)&&(i=i.redNeg()),this.point(e,i)};Ln.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),s=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(s).cmpn(0)===0};Ln.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,o=0;o":""};xr.prototype.isInfinity=function(){return this.inf};xr.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};xr.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),s=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),o=s.redSqr().redISub(this.x.redAdd(this.x)),a=s.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)};xr.prototype.getX=function(){return this.x.fromRed()};xr.prototype.getY=function(){return this.y.fromRed()};xr.prototype.mul=function(e){return e=new Ee(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};xr.prototype.mulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s):this.curve._wnafMulAdd(1,i,s,2)};xr.prototype.jmulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s,!0):this.curve._wnafMulAdd(1,i,s,2,!0)};xr.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};xr.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(s){return s.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};xr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function _r(t,e,r,n){Ma.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Ee(0)):(this.x=new Ee(e,16),this.y=new Ee(r,16),this.z=new Ee(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}ux(_r,Ma.BasePoint);Ln.prototype.jpoint=function(e,r,n){return new _r(this,e,r,n)};_r.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};_r.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};_r.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),s=e.x.redMul(n),o=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),l=i.redSub(s),c=o.redSub(a);if(l.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),u=f.redMul(l),h=i.redMul(f),y=c.redSqr().redIAdd(u).redISub(h).redISub(h),g=c.redMul(h.redISub(y)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(y,g,p)};_r.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),s=this.y,o=e.y.redMul(r).redMul(this.z),a=n.redSub(i),l=s.redSub(o);if(a.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),f=c.redMul(a),u=n.redMul(c),h=l.redSqr().redIAdd(f).redISub(u).redISub(u),y=l.redMul(u.redISub(h)).redISub(s.redMul(f)),g=this.z.redMul(a);return this.curve.jpoint(h,y,g)};_r.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(s),this.x.cmp(n)===0)return!0}};_r.prototype.inspect=function(){return this.isInfinity()?"":""};_r.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var $d=yc(function(t,e){var r=e;r.base=Ma,r.short=Kz,r.mont=null,r.edwards=null}),Dd=yc(function(t,e){var r=e,n=Cn.assert;function i(a){a.type==="short"?this.curve=new $d.short(a):a.type==="edwards"?this.curve=new $d.edwards(a):this.curve=new $d.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function s(a,l){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var c=new i(l);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:c}),c}})}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:Xr.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:Xr.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:Xr.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:Xr.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:Xr.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:Xr.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:Xr.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:Xr.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function uo(t){if(!(this instanceof uo))return new uo(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=ei.toArray(t.entropy,t.entropyEnc||"hex"),r=ei.toArray(t.nonce,t.nonceEnc||"hex"),n=ei.toArray(t.pers,t.persEnc||"hex");fx(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var $7=uo;uo.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};uo.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=ei.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length"};var Jz=Cn.assert;function Zh(t,e){if(t instanceof Zh)return t;this._importDER(t,e)||(Jz(t.r&&t.s,"Signature without r or s"),this.r=new Ee(t.r,16),this.s=new Ee(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var e1=Zh;function Yz(){this.place=0}function $v(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,s=0,o=e.place;s>>=0;return i<=127?!1:(e.place=o,i)}function A6(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}Zh.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=A6(r),n=A6(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];Dv(i,r.length),i=i.concat(r),i.push(2),Dv(i,n.length);var s=i.concat(n),o=[48];return Dv(o,s.length),o=o.concat(s),Cn.encode(o,e)};var Qz=function(){throw new Error("unsupported")},D7=Cn.assert;function Dn(t){if(!(this instanceof Dn))return new Dn(t);typeof t=="string"&&(D7(Object.prototype.hasOwnProperty.call(Dd,t),"Unknown curve "+t),t=Dd[t]),t instanceof Dd.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 Xz=Dn;Dn.prototype.keyPair=function(e){return new dx(this,e)};Dn.prototype.keyFromPrivate=function(e,r){return dx.fromPrivate(this,e,r)};Dn.prototype.keyFromPublic=function(e,r){return dx.fromPublic(this,e,r)};Dn.prototype.genKeyPair=function(e){e||(e={});for(var r=new $7({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Qz(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new Ee(2));;){var s=new Ee(r.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}};Dn.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};Dn.prototype.sign=function(e,r,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new Ee(e,16));for(var s=this.n.byteLength(),o=r.getPrivate().toArray("be",s),a=e.toArray("be",s),l=new $7({hash:this.hash,entropy:o,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),c=this.n.sub(new Ee(1)),f=0;;f++){var u=i.k?i.k(f):new Ee(l.generate(this.n.byteLength()));if(u=this._truncateToN(u,!0),!(u.cmpn(1)<=0||u.cmp(c)>=0)){var h=this.g.mul(u);if(!h.isInfinity()){var y=h.getX(),g=y.umod(this.n);if(g.cmpn(0)!==0){var p=u.invm(this.n).mul(g.mul(r.getPrivate()).iadd(e));if(p=p.umod(this.n),p.cmpn(0)!==0){var k=(h.getY().isOdd()?1:0)|(y.cmp(g)!==0?2:0);return i.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),k^=1),new e1({r:g,s:p,recoveryParam:k})}}}}}};Dn.prototype.verify=function(e,r,n,i){e=this._truncateToN(new Ee(e,16)),n=this.keyFromPublic(n,i),r=new e1(r,"hex");var s=r.r,o=r.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a=o.invm(this.n),l=a.mul(e).umod(this.n),c=a.mul(s).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.eqXToP(s)):(f=this.g.mulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.getX().umod(this.n).cmp(s)===0)};Dn.prototype.recoverPubKey=function(t,e,r,n){D7((3&r)===r,"The recovery param is more than two bits"),e=new e1(e,n);var i=this.n,s=new Ee(t),o=e.r,a=e.s,l=r&1,c=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");c?o=this.curve.pointFromX(o.add(this.curve.n),l):o=this.curve.pointFromX(o,l);var f=e.r.invm(i),u=i.sub(s).mul(f).umod(i),h=a.mul(f).umod(i);return this.g.mulAdd(u,o,h)};Dn.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new e1(e,n),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(r))return i}throw new Error("Unable to find valid recovery factor")};var Zz=yc(function(t,e){var r=e;r.version="6.5.4",r.utils=Cn,r.rand=function(){throw new Error("unsupported")},r.curve=$d,r.curves=Dd,r.ec=Xz,r.eddsa=null}),eV=Zz.ec;const tV="signing-key/5.7.0",kp=new H(tV);let Bv=null;function vi(){return Bv||(Bv=new eV("secp256k1")),Bv}class sa{constructor(e){re(this,"curve","secp256k1"),re(this,"privateKey",Q(e)),Ii(this.privateKey)!==32&&kp.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=vi().keyFromPrivate(X(this.privateKey));re(this,"publicKey","0x"+r.getPublic(!1,"hex")),re(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),re(this,"_isSigningKey",!0)}_addPoint(e){const r=vi().keyFromPublic(X(this.publicKey)),n=vi().keyFromPublic(X(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=vi().keyFromPrivate(X(this.privateKey)),n=X(e);n.length!==32&&kp.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return Ia({recoveryParam:i.recoveryParam,r:Je("0x"+i.r.toString(16),32),s:Je("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=vi().keyFromPrivate(X(this.privateKey)),n=vi().keyFromPublic(X(hx(e)));return Je("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function B7(t,e){const r=Ia(e),n={r:X(r.r),s:X(r.s)};return"0x"+vi().recoverPubKey(X(t),n,r.recoveryParam).encode("hex",!1)}function hx(t,e){const r=X(t);if(r.length===32){const n=new sa(r);return e?"0x"+vi().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?Q(r):"0x"+vi().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+vi().keyFromPublic(r).getPublic(!0,"hex"):Q(r)}return kp.throwArgumentError("invalid public or private key","key","[REDACTED]")}const rV="transactions/5.7.0",Or=new H(rV);var Ap;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(Ap||(Ap={}));function vx(t){return t==="0x"?null:Se(t)}function Mr(t){return t==="0x"?Dt:V.from(t)}const nV=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],iV={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function Xs(t){const e=hx(t);return Se(qt(xe(qt(e,1)),12))}function wa(t,e){return Xs(B7(X(t),e))}function un(t,e){const r=ki(V.from(t).toHexString());return r.length>32&&Or.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function Lv(t,e){return{address:Se(t),storageKeys:(e||[]).map((r,n)=>(Ii(r)!==32&&Or.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function Oa(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Or.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),Lv(r[0],r[1])):Lv(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return Lv(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function L7(t){return Oa(t).map(e=>[e.address,e.storageKeys])}function j7(t,e){if(t.gasPrice!=null){const n=V.from(t.gasPrice),i=V.from(t.maxFeePerGas||0);n.eq(i)||Or.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[un(t.chainId||0,"chainId"),un(t.nonce||0,"nonce"),un(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),un(t.maxFeePerGas||0,"maxFeePerGas"),un(t.gasLimit||0,"gasLimit"),t.to!=null?Se(t.to):"0x",un(t.value||0,"value"),t.data||"0x",L7(t.accessList||[])];if(e){const n=Ia(e);r.push(un(n.recoveryParam,"recoveryParam")),r.push(ki(n.r)),r.push(ki(n.s))}return Hr(["0x02",xa(r)])}function F7(t,e){const r=[un(t.chainId||0,"chainId"),un(t.nonce||0,"nonce"),un(t.gasPrice||0,"gasPrice"),un(t.gasLimit||0,"gasLimit"),t.to!=null?Se(t.to):"0x",un(t.value||0,"value"),t.data||"0x",L7(t.accessList||[])];if(e){const n=Ia(e);r.push(un(n.recoveryParam,"recoveryParam")),r.push(ki(n.r)),r.push(ki(n.s))}return Hr(["0x01",xa(r)])}function sV(t,e){Qm(t,iV);const r=[];nV.forEach(function(o){let a=t[o.name]||[];const l={};o.numeric&&(l.hexPad="left"),a=X(Q(a,l)),o.length&&a.length!==o.length&&a.length>0&&Or.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=ki(a),a.length>o.maxLength&&Or.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push(Q(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Or.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!os(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(Q(n)),r.push("0x"),r.push("0x")),!e)return xa(r);const i=Ia(e);let s=27+i.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),s+=n*2+8,i.v>28&&i.v!==s&&Or.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==s&&Or.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(Q(s)),r.push(ki(X(i.r))),r.push(ki(X(i.s))),xa(r)}function _p(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Or.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),sV(t,e);switch(t.type){case 1:return F7(t,e);case 2:return j7(t,e)}return Or.throwError(`unsupported transaction type: ${t.type}`,H.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function U7(t,e,r){try{const n=Mr(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Or.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=Je(e[1],32),t.s=Je(e[2],32);try{const n=xe(r(t));t.from=wa(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function oV(t){const e=Jh(t.slice(1));e.length!==9&&e.length!==12&&Or.throwArgumentError("invalid component count for transaction type: 2","payload",Q(t));const r=Mr(e[2]),n=Mr(e[3]),i={type:2,chainId:Mr(e[0]).toNumber(),nonce:Mr(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Mr(e[4]),to:vx(e[5]),value:Mr(e[6]),data:e[7],accessList:Oa(e[8])};return e.length===9||(i.hash=xe(t),U7(i,e.slice(9),j7)),i}function aV(t){const e=Jh(t.slice(1));e.length!==8&&e.length!==11&&Or.throwArgumentError("invalid component count for transaction type: 1","payload",Q(t));const r={type:1,chainId:Mr(e[0]).toNumber(),nonce:Mr(e[1]).toNumber(),gasPrice:Mr(e[2]),gasLimit:Mr(e[3]),to:vx(e[4]),value:Mr(e[5]),data:e[6],accessList:Oa(e[7])};return e.length===8||(r.hash=xe(t),U7(r,e.slice(8),F7)),r}function lV(t){const e=Jh(t);e.length!==9&&e.length!==6&&Or.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:Mr(e[0]).toNumber(),gasPrice:Mr(e[1]),gasLimit:Mr(e[2]),to:vx(e[3]),value:Mr(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=V.from(e[6]).toNumber()}catch{return r}if(r.r=Je(e[7],32),r.s=Je(e[8],32),V.from(r.r).isZero()&&V.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=e.slice(0,6);r.chainId!==0&&(i.push(Q(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const s=xe(xa(i));try{r.from=wa(s,{r:Q(r.r),s:Q(r.s),recoveryParam:n})}catch{}r.hash=xe(t)}return r.type=null,r}function z7(t){const e=X(t);if(e[0]>127)return lV(e);switch(e[0]){case 1:return aV(e);case 2:return oV(e)}return Or.throwError(`unsupported transaction type: ${e[0]}`,H.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const cV="contracts/5.7.0";var Ca=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Qt=new H(cV);function W0(t,e){return Ca(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&Qt.throwArgumentError("invalid address or ENS name","name",r);try{return Se(r)}catch{}t||Qt.throwError("a provider or signer is needed to resolve ENS names",H.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&Qt.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function Bd(t,e,r){return Ca(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>Bd(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield W0(t,e):r.type==="tuple"?yield Bd(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Bd(t,n,r.arrayChildren))):Promise.reject(Qt.makeError("invalid value for array",H.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function t1(t,e,r){return Ca(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=nr(r.pop())),Qt.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=Ye({override:W0(t.signer,n.from),signer:t.signer.getAddress()}).then(c=>Ca(this,void 0,void 0,function*(){return Se(c.signer)!==c.override&&Qt.throwError("Contract with a Signer cannot override from",H.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),c.override})):n.from=t.signer.getAddress():n.from&&(n.from=W0(t.provider,n.from));const i=yield Ye({args:Bd(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:Ye(n)||{}}),s=t.interface.encodeFunctionData(e,i.args),o={data:s,to:i.address},a=i.overrides;if(a.nonce!=null&&(o.nonce=V.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=V.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=V.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=V.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=V.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=Oa(a.accessList)),o.gasLimit==null&&e.gas!=null){let c=21e3;const f=X(s);for(let u=0;un[c]!=null);return l.length&&Qt.throwError(`cannot override ${l.map(c=>JSON.stringify(c)).join(",")}`,H.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),o})}function fV(t,e){return function(...r){return t1(t,e,r)}}function uV(t,e){const r=t.signer||t.provider;return function(...n){return Ca(this,void 0,void 0,function*(){r||Qt.throwError("estimate require a provider or signer",H.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield t1(t,e,n);return yield r.estimateGas(i)})}}function dV(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(s=>{let o=Ri(s),a=null;try{a=t.interface.parseLog(s)}catch{}return a&&(o.args=a.args,o.decode=(l,c)=>t.interface.decodeEventLog(a.eventFragment,l,c),o.event=a.name,o.eventSignature=a.signature),o.removeListener=()=>t.provider,o.getBlock=()=>t.provider.getBlock(i.blockHash),o.getTransaction=()=>t.provider.getTransaction(i.transactionHash),o.getTransactionReceipt=()=>Promise.resolve(i),o}),i))}function V7(t,e,r){const n=t.signer||t.provider;return function(...i){return Ca(this,void 0,void 0,function*(){let s;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const l=nr(i.pop());l.blockTag!=null&&(s=yield l.blockTag),delete l.blockTag,i.push(l)}t.deployTransaction!=null&&(yield t._deployed(s));const o=yield t1(t,e,i),a=yield n.call(o,s);try{let l=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===H.errors.CALL_EXCEPTION&&(l.address=t.address,l.args=i,l.transaction=o),l}})}}function hV(t,e){return function(...r){return Ca(this,void 0,void 0,function*(){t.signer||Qt.throwError("sending a transaction requires a signer",H.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield t1(t,e,r),i=yield t.signer.sendTransaction(n);return dV(t,i),i})}}function _6(t,e,r){return e.constant?V7(t,e,r):hV(t,e)}function H7(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class eu{constructor(e,r){re(this,"tag",e),re(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class vV extends eu{constructor(){super("error",null)}}class T6 extends eu{constructor(e,r,n,i){const s={address:e};let o=r.getEventTopic(n);i?(o!==i[0]&&Qt.throwArgumentError("topic mismatch","topics",i),s.topics=i.slice()):s.topics=[o],super(H7(s),s),re(this,"address",e),re(this,"interface",r),re(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=UE(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class P6 extends eu{constructor(e,r){super("*",{address:e}),re(this,"address",e),re(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,i)=>this.interface.decodeEventLog(r.eventFragment,n,i),e.args=r.args}catch{}}}class yV{constructor(e,r,n){re(this,"interface",Zn(new.target,"getInterface")(r)),n==null?(re(this,"provider",null),re(this,"signer",null)):fo.isSigner(n)?(re(this,"provider",n.provider||null),re(this,"signer",n)):Co.isProvider(n)?(re(this,"provider",n),re(this,"signer",null)):Qt.throwArgumentError("invalid signer or provider","signerOrProvider",n),re(this,"callStatic",{}),re(this,"estimateGas",{}),re(this,"functions",{}),re(this,"populateTransaction",{}),re(this,"filters",{});{const o={};Object.keys(this.interface.events).forEach(a=>{const l=this.interface.events[a];re(this.filters,a,(...c)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,c)})),o[l.name]||(o[l.name]=[]),o[l.name].push(a)}),Object.keys(o).forEach(a=>{const l=o[a];l.length===1?re(this.filters,a,this.filters[l[0]]):Qt.warn(`Duplicate definition of ${a} (${l.join(", ")})`)})}if(re(this,"_runningEvents",{}),re(this,"_wrappedEmits",{}),e==null&&Qt.throwArgumentError("invalid contract address or ENS name","addressOrName",e),re(this,"address",e),this.provider)re(this,"resolvedAddress",W0(this.provider,e));else try{re(this,"resolvedAddress",Promise.resolve(Se(e)))}catch{Qt.throwError("provider is required to use ENS name as contract address",H.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(o=>{});const i={},s={};Object.keys(this.interface.functions).forEach(o=>{const a=this.interface.functions[o];if(s[o]){Qt.warn(`Duplicate ABI entry for ${JSON.stringify(o)}`);return}s[o]=!0;{const l=a.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(o)}this[o]==null&&re(this,o,_6(this,a,!0)),this.functions[o]==null&&re(this.functions,o,_6(this,a,!1)),this.callStatic[o]==null&&re(this.callStatic,o,V7(this,a,!0)),this.populateTransaction[o]==null&&re(this.populateTransaction,o,fV(this,a)),this.estimateGas[o]==null&&re(this.estimateGas,o,uV(this,a))}),Object.keys(i).forEach(o=>{const a=i[o];if(a.length>1)return;o=o.substring(1);const l=a[0];try{this[o]==null&&re(this,o,this[l])}catch{}this.functions[o]==null&&re(this.functions,o,this.functions[l]),this.callStatic[o]==null&&re(this.callStatic,o,this.callStatic[l]),this.populateTransaction[o]==null&&re(this.populateTransaction,o,this.populateTransaction[l]),this.estimateGas[o]==null&&re(this.estimateGas,o,this.estimateGas[l])})}static getContractAddress(e){return ex(e)}static getInterface(e){return ir.isInterface(e)?e:new ir(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&&Qt.throwError("contract not deployed",H.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Qt.throwError("sending a transactions require a signer",H.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=nr(e||{});return["from","to"].forEach(function(n){r[n]!=null&&Qt.throwError("cannot override "+n,H.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new cx(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&re(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return z0.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new vV);if(e==="event")return this._normalizeRunningEvent(new eu("event",null));if(e==="*")return this._normalizeRunningEvent(new P6(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new T6(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const i=this.interface.getEvent(n);return this._normalizeRunningEvent(new T6(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new eu(H7(r),r))}return this._normalizeRunningEvent(new P6(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const i=Ri(r);return i.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(r.blockHash),i.getTransaction=()=>this.provider.getTransaction(r.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(i),i}_addEventListener(e,r,n){if(this.provider||Qt.throwError("events require a provider or a signer with a provider",H.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=s=>{let o=this._wrapEvent(e,s,r);if(o.decodeError==null)try{const a=e.getEmit(o);this.emit(e.filter,...a)}catch(a){o.decodeError=a.error}e.filter!=null&&this.emit("event",o),o.decodeError!=null&&this.emit("error",o.decodeError,o)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,r,n){const i=this._getRunningEvent(e),s=nr(i.filter);return typeof r=="string"&&Ie(r,32)?(n!=null&&Qt.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),s.blockHash=r):(s.fromBlock=r??0,s.toBlock=n??"latest"),this.provider.getLogs(s).then(o=>o.map(a=>this._wrapEvent(i,a,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),i=n.run(r)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{r.push(i)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class Na extends yV{}class W7{constructor(e){re(this,"alphabet",e),re(this,"base",e.length),re(this,"_alphabetMap",{}),re(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(o%this.base),o=o/this.base|0}let i="";for(let s=0;r[s]===0&&s=0;--s)i+=this.alphabet[n[s]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;s>0;)r.push(s&255),s>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=u>>16&255,l[e.length+2]=u>>8&255,l[e.length+3]=u&255;let h=X(tu(i,t,l));s||(s=h.length,f=new Uint8Array(s),o=Math.ceil(n/s),c=n-(o-1)*s),f.set(h);for(let p=1;p=256)throw new Error("Depth too large!");return M6(Ve([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",Q(this.depth),this.parentFingerprint,He(Q(this.index),4),this.chainCode,this.privateKey!=null?Ve(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new dn(Fa,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~Ka));const n=new Uint8Array(37);if(e&Ka){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(X(this.privateKey),1),r&&(r+="'")}else n.set(X(this.publicKey));for(let u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const i=X(tu(Jl.sha512,this.chainCode,n)),s=i.slice(0,32),o=i.slice(32);let a=null,l=null;this.privateKey?a=fd(H.from(s).add(this.privateKey).mod(SV)):l=new sa(Q(s))._addPoint(this.publicKey);let c=r;const f=this.mnemonic;return f&&(c=Object.freeze({phrase:f.phrase,path:r,locale:f.locale||"en"})),new dn(Fa,a,l,this.fingerprint,fd(o),e,this.depth+1,c)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let i=0;i=Ka)throw new Error("invalid path index - "+s);n=n._derive(Ka+o)}else if(s.match(/^[0-9]+$/)){const o=parseInt(s);if(o>=Ka)throw new Error("invalid path index - "+s);n=n._derive(o)}else throw new Error("invalid path component - "+s)}return n}static _fromSeed(e,r){const n=X(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=X(tu(Jl.sha512,kV,n));return new dn(Fa,fd(i.slice(0,32)),null,"0x00000000",fd(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=px(n),e=n1(r1(e,n),n),dn._fromSeed(J7(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return dn._fromSeed(e,null)}static fromExtendedKey(e){const r=Kl.decode(e);(r.length!==82||M6(r.slice(0,78))!==e)&&ru.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=Q(r.slice(5,9)),s=parseInt(Q(r.slice(9,13)).substring(2),16),o=Q(r.slice(13,45)),a=r.slice(45,78);switch(Q(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new dn(Fa,null,Q(a),i,o,s,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new dn(Fa,Q(a.slice(1)),null,i,o,s,n,null)}return ru.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function J7(t,e){e||(e="");const r=We("mnemonic"+e,Mi.NFKD);return yx(We(t,Mi.NFKD),r,2048,64,"sha512")}function r1(t,e){e=px(e),ru.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=X(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let c=0;c>3]|=1<<7-i%8),i++}const s=32*r.length/3,o=r.length/3,a=K7(o);if((X(cs(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return Q(n.slice(0,s/8))}function n1(t,e){if(e=px(e),t=X(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let o=0;o8?(r[r.length-1]<<=8,r[r.length-1]|=t[o],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[o]>>8-n,r.push(t[o]&AV(8-n)),n+=3);const i=t.length/4,s=X(cs(t))[0]&K7(i);return r[r.length-1]<<=i,r[r.length-1]|=s>>8-i,e.join(r.map(o=>e.getWord(o)))}function _V(t,e){try{return r1(t,e),!0}catch{}return!1}function TV(t){return(typeof t!="number"||t<0||t>=Ka||t%1)&&ru.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const PV="random/5.7.0",Tp=new q(PV);function IV(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const O6=IV();let Bd=O6.crypto||O6.msCrypto;(!Bd||!Bd.getRandomValues)&&(Tp.warn("WARNING: Missing strong random number source"),Bd={getRandomValues:function(t){return Tp.throwError("no secure random source avaialble",q.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function xi(t){(t<=0||t>1024||t%1||t!=t)&&Tp.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return Bd.getRandomValues(e),X(e)}function RV(t){t=t.slice();for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}var Y7={exports:{}};(function(t,e){(function(r){function n(m){return parseInt(m)===m}function i(m){if(!n(m.length))return!1;for(var d=0;d255)return!1;return!0}function s(m,d){if(m.buffer&&ArrayBuffer.isView(m)&&m.name==="Uint8Array")return d&&(m.slice?m=m.slice():m=Array.prototype.slice.call(m)),m;if(Array.isArray(m)){if(!i(m))throw new Error("Array contains invalid value: "+m);return new Uint8Array(m)}if(n(m.length)&&i(m))return new Uint8Array(m);throw new Error("unsupported array-like object")}function o(m){return new Uint8Array(m)}function a(m,d,T,N,x){(N!=null||x!=null)&&(m.slice?m=m.slice(N,x):m=Array.prototype.slice.call(m,N,x)),d.set(m,T)}var l=function(){function m(T){var N=[],x=0;for(T=encodeURI(T);x191&&$<224?(N.push(String.fromCharCode(($&31)<<6|T[x+1]&63)),x+=2):(N.push(String.fromCharCode(($&15)<<12|(T[x+1]&63)<<6|T[x+2]&63)),x+=3)}return N.join("")}return{toBytes:m,fromBytes:d}}(),c=function(){function m(N){for(var x=[],$=0;$>4]+d[L&15])}return x.join("")}return{toBytes:m,fromBytes:T}}(),f={16:10,24:12,32:14},u=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],h=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],y=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],g=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],k=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],w=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],E=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],A=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],I=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],M=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],B=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],z=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],F=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],K=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function J(m){for(var d=[],T=0;T>2,this._Ke[$][d%4]=x[d],this._Kd[m-$][d%4]=x[d];for(var L=0,U=N,G;U>16&255]<<24^h[G>>8&255]<<16^h[G&255]<<8^h[G>>24&255]^u[L]<<24,L+=1,N!=8)for(var d=1;d>8&255]<<8^h[G>>16&255]<<16^h[G>>24&255]<<24;for(var d=N/2+1;d>2,V=U%4,this._Ke[j][V]=x[d],this._Kd[m-j][V]=x[d++],U++}for(var j=1;j>24&255]^z[G>>16&255]^F[G>>8&255]^K[G&255]},Z.prototype.encrypt=function(m){if(m.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var d=this._Ke.length-1,T=[0,0,0,0],N=J(m),x=0;x<4;x++)N[x]^=this._Ke[0][x];for(var $=1;$>24&255]^p[N[(x+1)%4]>>16&255]^k[N[(x+2)%4]>>8&255]^w[N[(x+3)%4]&255]^this._Ke[$][x];N=T.slice()}for(var L=o(16),U,x=0;x<4;x++)U=this._Ke[d][x],L[4*x]=(h[N[x]>>24&255]^U>>24)&255,L[4*x+1]=(h[N[(x+1)%4]>>16&255]^U>>16)&255,L[4*x+2]=(h[N[(x+2)%4]>>8&255]^U>>8)&255,L[4*x+3]=(h[N[(x+3)%4]&255]^U)&255;return L},Z.prototype.decrypt=function(m){if(m.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var d=this._Kd.length-1,T=[0,0,0,0],N=J(m),x=0;x<4;x++)N[x]^=this._Kd[0][x];for(var $=1;$>24&255]^A[N[(x+3)%4]>>16&255]^I[N[(x+2)%4]>>8&255]^M[N[(x+1)%4]&255]^this._Kd[$][x];N=T.slice()}for(var L=o(16),U,x=0;x<4;x++)U=this._Kd[d][x],L[4*x]=(y[N[x]>>24&255]^U>>24)&255,L[4*x+1]=(y[N[(x+3)%4]>>16&255]^U>>16)&255,L[4*x+2]=(y[N[(x+2)%4]>>8&255]^U>>8)&255,L[4*x+3]=(y[N[(x+1)%4]&255]^U)&255;return L};var ie=function(m){if(!(this instanceof ie))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Z(m)};ie.prototype.encrypt=function(m){if(m=s(m),m.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var d=o(m.length),T=o(16),N=0;N=0;--d)this._counter[d]=m%256,m=m>>8},P.prototype.setBytes=function(m){if(m=s(m,!0),m.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=m},P.prototype.increment=function(){for(var m=15;m>=0;m--)if(this._counter[m]===255)this._counter[m]=0;else{this._counter[m]++;break}};var O=function(m,d){if(!(this instanceof O))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",d instanceof P||(d=new P(d)),this._counter=d,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Z(m)};O.prototype.encrypt=function(m){for(var d=s(m,!0),T=0;T16)throw new Error("PKCS#7 padding byte out of range");for(var T=m.length-d,N=0;N=64;){let R=w,m=E,d=A,T=I,N=M,x=B,$=z,L=F,U,G,j,V,W;for(G=0;G<16;G++)j=b+G*4,K[G]=(O[j]&255)<<24|(O[j+1]&255)<<16|(O[j+2]&255)<<8|O[j+3]&255;for(G=16;G<64;G++)U=K[G-2],V=(U>>>17|U<<15)^(U>>>19|U<<13)^U>>>10,U=K[G-15],W=(U>>>7|U<<25)^(U>>>18|U<<14)^U>>>3,K[G]=(V+K[G-7]|0)+(W+K[G-16]|0)|0;for(G=0;G<64;G++)V=(((N>>>6|N<<26)^(N>>>11|N<<21)^(N>>>25|N<<7))+(N&x^~N&$)|0)+(L+(k[G]+K[G]|0)|0)|0,W=((R>>>2|R<<30)^(R>>>13|R<<19)^(R>>>22|R<<10))+(R&m^R&d^m&d)|0,L=$,$=x,x=N,N=T+V|0,T=d,d=m,m=R,R=V+W|0;w=w+R|0,E=E+m|0,A=A+d|0,I=I+T|0,M=M+N|0,B=B+x|0,z=z+$|0,F=F+L|0,b+=64,_-=64}}J(p);let Z,ie=p.length%64,D=p.length/536870912|0,v=p.length<<3,C=ie<56?56:120,P=p.slice(p.length-ie,p.length);for(P.push(128),Z=ie+1;Z>>24&255),P.push(D>>>16&255),P.push(D>>>8&255),P.push(D>>>0&255),P.push(v>>>24&255),P.push(v>>>16&255),P.push(v>>>8&255),P.push(v>>>0&255),J(P),[w>>>24&255,w>>>16&255,w>>>8&255,w>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255,A>>>24&255,A>>>16&255,A>>>8&255,A>>>0&255,I>>>24&255,I>>>16&255,I>>>8&255,I>>>0&255,M>>>24&255,M>>>16&255,M>>>8&255,M>>>0&255,B>>>24&255,B>>>16&255,B>>>8&255,B>>>0&255,z>>>24&255,z>>>16&255,z>>>8&255,z>>>0&255,F>>>24&255,F>>>16&255,F>>>8&255,F>>>0&255]}function s(p,k,w){p=p.length<=64?p:i(p);const E=64+k.length+4,A=new Array(E),I=new Array(64);let M,B=[];for(M=0;M<64;M++)A[M]=54;for(M=0;M=E-4;F--){if(A[F]++,A[F]<=255)return;A[F]=0}}for(;w>=32;)z(),B=B.concat(i(I.concat(i(A)))),w-=32;return w>0&&(z(),B=B.concat(i(I.concat(i(A))).slice(0,w))),B}function o(p,k,w,E,A){let I;for(f(p,(2*w-1)*16,A,0,16),I=0;I<2*w;I++)c(p,I*16,A,16),l(A,E),f(A,0,p,k+I*16,16);for(I=0;I>>32-k}function l(p,k){f(p,0,k,0,16);for(let w=8;w>0;w-=2)k[4]^=a(k[0]+k[12],7),k[8]^=a(k[4]+k[0],9),k[12]^=a(k[8]+k[4],13),k[0]^=a(k[12]+k[8],18),k[9]^=a(k[5]+k[1],7),k[13]^=a(k[9]+k[5],9),k[1]^=a(k[13]+k[9],13),k[5]^=a(k[1]+k[13],18),k[14]^=a(k[10]+k[6],7),k[2]^=a(k[14]+k[10],9),k[6]^=a(k[2]+k[14],13),k[10]^=a(k[6]+k[2],18),k[3]^=a(k[15]+k[11],7),k[7]^=a(k[3]+k[15],9),k[11]^=a(k[7]+k[3],13),k[15]^=a(k[11]+k[7],18),k[1]^=a(k[0]+k[3],7),k[2]^=a(k[1]+k[0],9),k[3]^=a(k[2]+k[1],13),k[0]^=a(k[3]+k[2],18),k[6]^=a(k[5]+k[4],7),k[7]^=a(k[6]+k[5],9),k[4]^=a(k[7]+k[6],13),k[5]^=a(k[4]+k[7],18),k[11]^=a(k[10]+k[9],7),k[8]^=a(k[11]+k[10],9),k[9]^=a(k[8]+k[11],13),k[10]^=a(k[9]+k[8],18),k[12]^=a(k[15]+k[14],7),k[13]^=a(k[12]+k[15],9),k[14]^=a(k[13]+k[12],13),k[15]^=a(k[14]+k[13],18);for(let w=0;w<16;++w)p[w]+=k[w]}function c(p,k,w,E){for(let A=0;A=256)return!1}return!0}function h(p,k){if(typeof p!="number"||p%1)throw new Error("invalid "+k);return p}function y(p,k,w,E,A,I,M){if(w=h(w,"N"),E=h(E,"r"),A=h(A,"p"),I=h(I,"dkLen"),w===0||w&w-1)throw new Error("N must be power of 2");if(w>2147483647/128/E)throw new Error("N too large");if(E>2147483647/128/A)throw new Error("r too large");if(!u(p))throw new Error("password must be an array or buffer");if(p=Array.prototype.slice.call(p),!u(k))throw new Error("salt must be an array or buffer");k=Array.prototype.slice.call(k);let B=s(p,k,A*128*E);const z=new Uint32Array(A*32*E);for(let N=0;Nm&&(N=m);for(let $=0;$m&&(N=m);for(let $=0;$>0&255),B.push(z[$]>>8&255),B.push(z[$]>>16&255),B.push(z[$]>>24&255);const x=s(p,B,I);return M&&M(null,1,x),x}M&&d(T)};if(!M)for(;;){const N=T();if(N!=null)return N}T()}const g={scrypt:function(p,k,w,E,A,I,M){return new Promise(function(B,z){let F=0;M&&M(0),y(p,k,w,E,A,I,function(K,J,Z){if(K)z(K);else if(Z)M&&F!==1&&M(1),B(new Uint8Array(Z));else if(M&&J!==F)return F=J,M(J)})})},syncScrypt:function(p,k,w,E,A,I){return new Uint8Array(y(p,k,w,E,A,I))}};t.exports=g})()})(Z7);var LV=Z7.exports;const bx=yo(LV);var BV=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Pp=new q(Q7);function N6(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class jV extends Ra{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function FV(t,e,r){if(Xt(t,"crypto/cipher")==="aes-128-ctr"){const i=oa(Xt(t,"crypto/cipherparams/iv")),s=new bi.Counter(i),o=new bi.ModeOfOperation.ctr(e,s);return X(o.decrypt(r))}return null}function e9(t,e){const r=oa(Xt(t,"crypto/ciphertext"));if(Q(pe(Ve([e.slice(16,32),r]))).substring(2)!==Xt(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=FV(t,e.slice(0,16),r);i||Pp.throwError("unsupported cipher",q.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const s=e.slice(32,64),o=Xs(i);if(t.address){let l=t.address.toLowerCase();if(l.substring(0,2)!=="0x"&&(l="0x"+l),we(l)!==o)throw new Error("address mismatch")}const a={_isKeystoreAccount:!0,address:o,privateKey:Q(i)};if(Xt(t,"x-ethers/version")==="0.1"){const l=oa(Xt(t,"x-ethers/mnemonicCiphertext")),c=oa(Xt(t,"x-ethers/mnemonicCounter")),f=new bi.Counter(c),u=new bi.ModeOfOperation.ctr(s,f),h=Xt(t,"x-ethers/path")||Yl,y=Xt(t,"x-ethers/locale")||"en",g=X(u.decrypt(l));try{const p=n1(g,y),k=dn.fromMnemonic(p,null,y).derivePath(h);if(k.privateKey!=a.privateKey)throw new Error("mnemonic mismatch");a.mnemonic=k.mnemonic}catch(p){if(p.code!==q.errors.INVALID_ARGUMENT||p.argument!=="wordlist")throw p}}return new jV(a)}function t9(t,e,r,n,i){return X(yx(t,e,r,n,i))}function UV(t,e,r,n,i){return Promise.resolve(t9(t,e,r,n,i))}function r9(t,e,r,n,i){const s=gx(e),o=Xt(t,"crypto/kdf");if(o&&typeof o=="string"){const a=function(l,c){return Pp.throwArgumentError("invalid key-derivation function parameters",l,c)};if(o.toLowerCase()==="scrypt"){const l=oa(Xt(t,"crypto/kdfparams/salt")),c=parseInt(Xt(t,"crypto/kdfparams/n")),f=parseInt(Xt(t,"crypto/kdfparams/r")),u=parseInt(Xt(t,"crypto/kdfparams/p"));(!c||!f||!u)&&a("kdf",o),c&c-1&&a("N",c);const h=parseInt(Xt(t,"crypto/kdfparams/dklen"));return h!==32&&a("dklen",h),n(s,l,c,f,u,64,i)}else if(o.toLowerCase()==="pbkdf2"){const l=oa(Xt(t,"crypto/kdfparams/salt"));let c=null;const f=Xt(t,"crypto/kdfparams/prf");f==="hmac-sha256"?c="sha256":f==="hmac-sha512"?c="sha512":a("prf",f);const u=parseInt(Xt(t,"crypto/kdfparams/c")),h=parseInt(Xt(t,"crypto/kdfparams/dklen"));return h!==32&&a("dklen",h),r(s,l,u,h,c)}}return Pp.throwArgumentError("unsupported key-derivation function","kdf",o)}function zV(t,e){const r=JSON.parse(t),n=r9(r,e,t9,bx.syncScrypt);return e9(r,n)}function VV(t,e,r){return BV(this,void 0,void 0,function*(){const n=JSON.parse(t),i=yield r9(n,e,UV,bx.scrypt,r);return e9(n,i)})}function HV(t,e,r,n){try{if(we(t.address)!==Xs(t.privateKey))throw new Error("address/privateKey mismatch");if(N6(t)){const k=t.mnemonic;if(dn.fromMnemonic(k.phrase,null,k.locale).derivePath(k.path||Yl).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(k){return Promise.reject(k)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});const i=X(t.privateKey),s=gx(e);let o=null,a=null,l=null;if(N6(t)){const k=t.mnemonic;o=X(r1(k.phrase,k.locale||"en")),a=k.path||Yl,l=k.locale||"en"}let c=r.client;c||(c="ethers.js");let f=null;r.salt?f=X(r.salt):f=xi(32);let u=null;if(r.iv){if(u=X(r.iv),u.length!==16)throw new Error("invalid iv")}else u=xi(16);let h=null;if(r.uuid){if(h=X(r.uuid),h.length!==16)throw new Error("invalid uuid")}else h=xi(16);let y=1<<17,g=8,p=1;return r.scrypt&&(r.scrypt.N&&(y=r.scrypt.N),r.scrypt.r&&(g=r.scrypt.r),r.scrypt.p&&(p=r.scrypt.p)),bx.scrypt(s,f,y,g,p,64,n).then(k=>{k=X(k);const w=k.slice(0,16),E=k.slice(16,32),A=k.slice(32,64),I=new bi.Counter(u),M=new bi.ModeOfOperation.ctr(w,I),B=X(M.encrypt(i)),z=pe(Ve([E,B])),F={address:t.address.substring(2).toLowerCase(),id:OV(h),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:Q(u).substring(2)},ciphertext:Q(B).substring(2),kdf:"scrypt",kdfparams:{salt:Q(f).substring(2),n:y,dklen:32,p,r:g},mac:z.substring(2)}};if(o){const K=xi(16),J=new bi.Counter(K),Z=new bi.ModeOfOperation.ctr(A,J),ie=X(Z.encrypt(o)),D=new Date,v=D.getUTCFullYear()+"-"+Oc(D.getUTCMonth()+1,2)+"-"+Oc(D.getUTCDate(),2)+"T"+Oc(D.getUTCHours(),2)+"-"+Oc(D.getUTCMinutes(),2)+"-"+Oc(D.getUTCSeconds(),2)+".0Z";F["x-ethers"]={client:c,gethFilename:"UTC--"+v+"--"+F.address,mnemonicCounter:Q(K).substring(2),mnemonicCiphertext:Q(ie).substring(2),path:a,locale:l,version:"0.1"}}return JSON.stringify(F)})}function WV(t,e,r){if(mx(t)){r&&r(0);const n=X7(t,e);return r&&r(1),Promise.resolve(n)}return xx(t)?VV(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function qV(t,e){if(mx(t))return X7(t,e);if(xx(t))return zV(t,e);throw new Error("invalid JSON wallet")}const GV="wallet/5.7.0";var $6=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Ua=new q(GV);function KV(t){return t!=null&&Pe(t.privateKey,32)&&t.address!=null}function JV(t){const e=t.mnemonic;return e&&e.phrase}let YV=class Ja extends fo{constructor(e,r){if(super(),KV(e)){const n=new sa(e.privateKey);if(te(this,"_signingKey",()=>n),te(this,"address",Xs(this.publicKey)),this.address!==we(e.address)&&Ua.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),JV(e)){const i=e.mnemonic;te(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||Yl,locale:i.locale||"en"}));const s=this.mnemonic,o=dn.fromMnemonic(s.phrase,null,s.locale).derivePath(s.path);Xs(o.privateKey)!==this.address&&Ua.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else te(this,"_mnemonic",()=>null)}else{if(sa.isSigningKey(e))e.curve!=="secp256k1"&&Ua.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),te(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new sa(e);te(this,"_signingKey",()=>n)}te(this,"_mnemonic",()=>null),te(this,"address",Xs(this.publicKey))}r&&!Co.isProvider(r)&&Ua.throwArgumentError("invalid provider","provider",r),te(this,"provider",r||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Ja(this,e)}signTransaction(e){return Ke(e).then(r=>{r.from!=null&&(we(r.from)!==this.address&&Ua.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(pe(_p(r)));return _p(r,n)})}signMessage(e){return $6(this,void 0,void 0,function*(){return mp(this._signingKey().signDigest(Qh(e)))})}_signTypedData(e,r,n){return $6(this,void 0,void 0,function*(){const i=yield er.resolveNames(e,r,n,s=>(this.provider==null&&Ua.throwError("cannot resolve ENS names without a provider",q.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:s}),this.provider.resolveName(s)));return mp(this._signingKey().signDigest(er.hash(i.domain,r,i.value)))})}encrypt(e,r,n){if(typeof r=="function"&&!n&&(n=r,r={}),n&&typeof n!="function")throw new Error("invalid callback");return r||(r={}),HV(this,e,r,n)}static createRandom(e){let r=xi(16);e||(e={}),e.extraEntropy&&(r=X(qt(pe(Ve([r,e.extraEntropy])),0,16)));const n=n1(r,e.locale);return Ja.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return WV(e,r,n).then(i=>new Ja(i))}static fromEncryptedJsonSync(e,r){return new Ja(qV(e,r))}static fromMnemonic(e,r,n){return r||(r=Yl),new Ja(dn.fromMnemonic(e,null,n).derivePath(r))}};function n9(t,e){return wa(Qh(t),e)}function QV(t,e,r,n){return wa(er.hash(t,e,r),n)}const XV="networks/5.7.1",D6=new q(XV);function ZV(t){return t&&typeof t.renetwork=="function"}function Hi(t){const e=function(r,n){n==null&&(n={});const i=[];if(r.InfuraProvider&&n.infura!=="-")try{i.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{i.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{i.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const s=["goerli","ropsten","rinkeby","sepolia"];try{const o=new r.PocketProvider(t,n.pocket);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const s=["ropsten"],o=new r.AnkrProvider(t,n.ankr);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}if(i.length===0)return null;if(r.FallbackProvider){let s=1;return n.quorum!=null?s=n.quorum:t==="homestead"&&(s=2),new r.FallbackProvider(i,s)}return i[0]};return e.renetwork=function(r){return Hi(r)},e}function q0(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return q0(t,n)},r}const L6={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Hi("homestead")},B6={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Hi("ropsten")},j6={chainId:63,name:"classicMordor",_defaultProvider:q0("https://www.ethercluster.com/mordor","classicMordor")},ud={unspecified:{chainId:0,name:"unspecified"},homestead:L6,mainnet:L6,morden:{chainId:2,name:"morden"},ropsten:B6,testnet:B6,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Hi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Hi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Hi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Hi("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:q0("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:j6,classicTestnet:j6,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:q0("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Hi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Hi("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function eH(t){if(t==null)return null;if(typeof t=="number"){for(const n in ud){const i=ud[n];if(i.chainId===t)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=ud[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=ud[t.name];if(!e)return typeof t.chainId!="number"&&D6.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&D6.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(ZV(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}const tH="web/5.7.1";var rH=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};function nH(t,e){return rH(this,void 0,void 0,function*(){e==null&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),e.fetchOptions!=null){const o=e.fetchOptions;o.mode&&(r.mode=o.mode),o.cache&&(r.cache=o.cache),o.credentials&&(r.credentials=o.credentials),o.redirect&&(r.redirect=o.redirect),o.referrer&&(r.referrer=o.referrer)}const n=yield fetch(t,r),i=yield n.arrayBuffer(),s={};return n.headers.forEach?n.headers.forEach((o,a)=>{s[a.toLowerCase()]=o}):n.headers.keys().forEach(o=>{s[o.toLowerCase()]=n.headers.get(o)}),{headers:s,statusCode:n.status,statusMessage:n.statusText,body:X(new Uint8Array(i))}})}var iH=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Wn=new q(tH);function F6(t){return new Promise(e=>{setTimeout(e,t)})}function ks(t,e){if(t==null)return null;if(typeof t=="string")return t;if(os(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return vs(t)}catch{}return Q(t)}return t}function sH(t){return We(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function i9(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;Wn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const i=typeof t=="object"?t.throttleCallback:null,s=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;Wn.assertArgument(s>0&&s%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",s);const o=typeof t=="object"?!!t.errorPassThrough:!1,a={};let l=null;const c={method:"GET"};let f=!1,u=2*60*1e3;if(typeof t=="string")l=t;else if(typeof t=="object"){if((t==null||t.url==null)&&Wn.throwArgumentError("missing URL","connection.url",t),l=t.url,typeof t.timeout=="number"&&t.timeout>0&&(u=t.timeout),t.headers)for(const w in t.headers)a[w.toLowerCase()]={key:w,value:String(t.headers[w])},["if-none-match","if-modified-since"].indexOf(w.toLowerCase())>=0&&(f=!0);if(c.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){l.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&Wn.throwError("basic authentication requires a secure https url",q.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:t.user,password:"[REDACTED]"});const w=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+ax(We(w))}}t.skipFetchSetup!=null&&(c.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(c.fetchOptions=nr(t.fetchOptions))}const h=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),y=l?l.match(h):null;if(y)try{const w={statusCode:200,statusMessage:"OK",headers:{"content-type":y[1]||"text/plain"},body:y[2]?ox(y[3]):sH(y[3])};let E=w.body;return r&&(E=r(w.body,w)),Promise.resolve(E)}catch(w){Wn.throwError("processing response error",q.errors.SERVER_ERROR,{body:ks(y[1],y[2]),error:w,requestBody:null,requestMethod:"GET",url:l})}e&&(c.method="POST",c.body=e,a["content-type"]==null&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),a["content-length"]==null&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));const g={};Object.keys(a).forEach(w=>{const E=a[w];g[E.key]=E.value}),c.headers=g;const p=function(){let w=null;return{promise:new Promise(function(I,M){u&&(w=setTimeout(()=>{w!=null&&(w=null,M(Wn.makeError("timeout",q.errors.TIMEOUT,{requestBody:ks(c.body,g["content-type"]),requestMethod:c.method,timeout:u,url:l})))},u))}),cancel:function(){w!=null&&(clearTimeout(w),w=null)}}}(),k=function(){return iH(this,void 0,void 0,function*(){for(let w=0;w=300)&&(p.cancel(),Wn.throwError("bad response",q.errors.SERVER_ERROR,{status:E.statusCode,headers:E.headers,body:ks(A,E.headers?E.headers["content-type"]:null),requestBody:ks(c.body,g["content-type"]),requestMethod:c.method,url:l})),r)try{const I=yield r(A,E);return p.cancel(),I}catch(I){if(I.throttleRetry&&w{let a=null;if(s!=null)try{a=JSON.parse(vs(s))}catch(l){Wn.throwError("invalid JSON",q.errors.SERVER_ERROR,{body:s,error:l})}return r&&(a=r(a,o)),a},i=null;if(e!=null){i=We(e);const s=typeof t=="string"?{url:t}:nr(t);s.headers?Object.keys(s.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(s.headers=nr(s.headers),s.headers["content-type"]="application/json"):s.headers={"content-type":"application/json"},t=s}return i9(t,i,n)}function Zo(t,e){return e||(e={}),e=nr(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let i=null,s=!1;const o=()=>s?!1:(s=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{o()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let l=0;function c(){return t().then(function(f){if(f!==void 0)o()&&r(f);else if(e.oncePoll)e.oncePoll.once("poll",c);else if(e.onceBlock)e.onceBlock.once("block",c);else if(!s){if(l++,l>a){o()&&n(new Error("retry limit reached"));return}let u=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));ue.ceiling&&(u=e.ceiling),setTimeout(c,u)}return null},function(f){o()&&n(f)})}c()})}var G0="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Ip={};for(var dd=0;dd>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function s9(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=Pl(e)^n>>5}for(e=Pl(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=s9(t);if(typeof n=="string")throw new Error(n);for(var i=t+"1",s=0;s>5)throw new Error("Non 5-bit word");n=Pl(n)^o,i+=G0.charAt(o)}for(s=0;s<6;++s)n=Pl(n);for(n^=1,s=0;s<6;++s){var a=n>>(5-s)*5&31;i+=G0.charAt(a)}return i}function o9(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var i=t.lastIndexOf("1");if(i===-1)return"No separator character for "+t;if(i===0)return"Missing prefix for "+t;var s=t.slice(0,i),o=t.slice(i+1);if(o.length<6)return"Data too short";var a=s9(s);if(typeof a=="string")return a;for(var l=[],c=0;c=o.length)&&l.push(u)}return a!==1?"Invalid checksum for "+t:{prefix:s,words:l}}function aH(){var t=o9.apply(null,arguments);if(typeof t=="object")return t}function lH(t){var e=o9.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function i1(t,e,r,n){for(var i=0,s=0,o=(1<=r;)s-=r,a.push(i>>s&o);if(n)s>0&&a.push(i<=e)return"Excess padding";if(i<this.data(u,!0);return e.transaction={hash:o,type:c,accessList:fe.allowNull(this.accessList.bind(this),null),blockHash:fe.allowNull(o,null),blockNumber:fe.allowNull(l,null),transactionIndex:fe.allowNull(l,null),confirmations:fe.allowNull(l,null),from:r,gasPrice:fe.allowNull(n),maxPriorityFeePerGas:fe.allowNull(n),maxFeePerGas:fe.allowNull(n),gasLimit:n,to:fe.allowNull(r,null),value:n,nonce:l,data:s,r:fe.allowNull(this.uint256),s:fe.allowNull(this.uint256),v:fe.allowNull(l),creates:fe.allowNull(r,null),raw:fe.allowNull(s)},e.transactionRequest={from:fe.allowNull(r),nonce:fe.allowNull(l),gasLimit:fe.allowNull(n),gasPrice:fe.allowNull(n),maxPriorityFeePerGas:fe.allowNull(n),maxFeePerGas:fe.allowNull(n),to:fe.allowNull(r),value:fe.allowNull(n),data:fe.allowNull(f),type:fe.allowNull(l),accessList:fe.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:o,address:r,topics:fe.arrayOf(o),data:s,logIndex:l,blockHash:o},e.receipt={to:fe.allowNull(this.address,null),from:fe.allowNull(this.address,null),contractAddress:fe.allowNull(r,null),transactionIndex:l,root:fe.allowNull(a),gasUsed:n,logsBloom:fe.allowNull(s),blockHash:o,transactionHash:o,logs:fe.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:fe.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:fe.allowNull(n),status:fe.allowNull(l),type:c},e.block={hash:fe.allowNull(o),parentHash:o,number:l,timestamp:l,nonce:fe.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:fe.allowNull(r),extraData:s,transactions:fe.allowNull(fe.arrayOf(o)),baseFeePerGas:fe.allowNull(n)},e.blockWithTransactions=nr(e.block),e.blockWithTransactions.transactions=fe.allowNull(fe.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:fe.allowNull(i,void 0),toBlock:fe.allowNull(i,void 0),blockHash:fe.allowNull(o,void 0),address:fe.allowNull(r,void 0),topics:fe.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:fe.allowNull(l),blockHash:fe.allowNull(o),transactionIndex:l,removed:fe.allowNull(this.boolean.bind(this)),address:r,data:fe.allowFalsish(s,"0x"),topics:fe.arrayOf(o),transactionHash:o,logIndex:l},e}accessList(e){return Oa(e||[])}number(e){return e==="0x"?0:H.from(e).toNumber()}type(e){return e==="0x"||e==null?0:H.from(e).toNumber()}bigNumber(e){return H.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),Pe(e))?e.toLowerCase():Nc.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return we(e)}callAddress(e){if(!Pe(e,32))return null;const r=we(qt(e,12));return r===tx?null:r}contractAddress(e){return ex(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||Pe(e))return ni(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return Ii(n)!==32?Nc.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=H.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!Pe(e))throw new Error("invalid uint256");return He(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,i=fe.check(r,e);return i._difficulty=n==null?null:H.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return fe.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&H.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=fe.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;Pe(n)&&(n=H.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),Pe(n)&&(n=H.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return z7(e)}receiptLog(e){return fe.check(this.formats.receiptLog,e)}receipt(e){const r=fe.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=H.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&Nc.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):Nc.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&Nc.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return fe.check(this.formats.filter,e)}filterLog(e){return fe.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const i in e)try{const s=e[i](r[i]);s!==void 0&&(n[i]=s)}catch(s){throw s.checkKey=i,s.checkValue=r[i],s}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(i){n.push(e(i))}),n}}}var me=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const ke=new q(Cu),vH=10;function z6(t){return t==null?"null":(Ii(t)!==32&&ke.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function V6(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(i=>{r[z6(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return z6(e)}).join("&")}function yH(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function za(t){if(typeof t=="string"){if(t=t.toLowerCase(),Ii(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+V6(t);if(vU.isForkEvent(t))throw ke.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+V6(t.topics||[])}throw new Error("invalid event - "+t)}function $c(){return new Date().getTime()}function H6(t){return new Promise(e=>{setTimeout(e,t)})}const pH=["block","network","pending","poll"];let gH=class{constructor(e,r,n){te(this,"tag",e),te(this,"listener",r),te(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=yH(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||pH.indexOf(this.tag)>=0}};const mH={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Fv(t){return He(H.from(t).toHexString(),32)}function W6(t){return Kl.encode(Ve([t,qt(cs(cs(t)),0,4)]))}const a9=new RegExp("^(ipfs)://(.*)$","i"),q6=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),a9,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function jd(t,e){try{return vs(nu(t,e))}catch{}return null}function nu(t,e){if(t==="0x")return null;const r=H.from(qt(t,e,e+32)).toNumber(),n=H.from(qt(t,r,r+32)).toNumber();return qt(t,r+32,r+32+n)}function Uv(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):ke.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function G6(t){const e=X(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function xH(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function l9(t){const e=[];let r=0;for(let n=0;nH.from(e).eq(1)).catch(e=>{if(e.code===q.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return me(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Hr([e,df(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=Hr(["0x9061b923",l9([l7(this.name),n.data])]));try{let s=yield this.provider.call(n);return X(s).length%32===4&&ke.throwError("resolver threw error",q.errors.CALL_EXCEPTION,{transaction:n,data:s}),i&&(s=nu(s,0)),s}catch(s){if(s.code===q.errors.CALL_EXCEPTION)return null;throw s}})}_fetchBytes(e,r){return me(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?nu(n,0):null})}_getAddress(e,r){const n=mH[String(e)];if(n==null&&ke.throwError(`unsupported coin type: ${e}`,q.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=X(r);if(n.p2pkh!=null){const s=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return W6(Ve([[n.p2pkh],"0x"+s[2]]))}}if(n.p2sh!=null){const s=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return W6(Ve([[n.p2sh],"0x"+s[2]]))}}if(n.prefix!=null){const s=i[1];let o=i[0];if(o===0?s!==20&&s!==32&&(o=-1):o=-1,o>=0&&i.length===2+s&&s>=1&&s<=75){const a=U6.toWords(i.slice(2));return a.unshift(o),U6.encode(n.prefix,a)}}return null}getAddress(e){return me(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===j0?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===q.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",Fv(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&ke.throwError("invalid or unsupported coin data",q.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return me(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;no[l])}return ke.throwError("invalid or unsupported content hash data",q.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return me(this,void 0,void 0,function*(){let r=We(e);r=Ve([Fv(64),Fv(r.length),r]),r.length%32!==0&&(r=Ve([r,He("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",Q(r));return n==null||n==="0x"?null:vs(n)})}}let zv=null,bH=1;class wx extends Co{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),te(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=Zn(new.target,"getNetwork")(e);r?(te(this,"_network",r),this.emit("network",r,null)):ke.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return me(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||ke.throwError("no network detected",q.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:te(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Zo(()=>this._ready().then(e=>e,e=>{if(!(e.code===q.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return zv==null&&(zv=new fe),zv}static getNetwork(e){return eH(e??"homestead")}ccipReadFetch(e,r,n){return me(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),s=r.toLowerCase(),o=[];for(let a=0;a=0?null:JSON.stringify({data:s,sender:i}),u=yield wu({url:c,errorPassThrough:!0},f,(y,g)=>(y.status=g.statusCode,y));if(u.data)return u.data;const h=u.message||"unknown error";if(u.status>=400&&u.status<500)return ke.throwError(`response not found during CCIP fetch: ${h}`,q.errors.SERVER_ERROR,{url:l,errorMessage:h});o.push(h)}return ke.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,q.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return me(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const s=yield i;if($c()-s.respTime<=e)return s.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=$c(),n=Ke({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:s})=>{if(s)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),s;const o=$c();return i=H.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return me(this,void 0,void 0,function*(){const e=bH++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)ke.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",ke.makeError("network block skew detected",q.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const s=this._emitted[i];s!=="pending"&&n-s>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const s=i.hash;let o=this.getTransactionReceipt(s).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+s]=a.blockNumber,this.emit(s,a)),null)).catch(a=>{this.emit("error",a)});r.push(o);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const s=i.filter;s.fromBlock=i._lastBlockNumber+1,s.toBlock=n;const o=s.toBlock-this._maxFilterBlockRange;o>s.fromBlock&&(s.fromBlock=o),s.fromBlock<0&&(s.fromBlock=0);const a=this.getLogs(s).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(c=>{c.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=c.blockNumber),this._emitted["b:"+c.blockHash]=c.blockNumber,this._emitted["t:"+c.transactionHash]=c.blockNumber,this.emit(s,c)})}).catch(l=>{this.emit("error",l),i._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return me(this,void 0,void 0,function*(){return ke.throwError("provider does not support network detection",q.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return me(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),yield H6(0),this._network;const n=ke.makeError("underlying network changed",q.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=$c();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return me(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return me(this,void 0,void 0,function*(){const s=yield this.getTransactionReceipt(e);return(s?s.confirmations:0)>=r?s:new Promise((o,a)=>{const l=[];let c=!1;const f=function(){return c?!0:(c=!0,l.forEach(h=>{h()}),!1)},u=h=>{h.confirmations{this.removeListener(e,u)}),i){let h=i.startBlock,y=null;const g=p=>me(this,void 0,void 0,function*(){c||(yield H6(1e3),this.getTransactionCount(i.from).then(k=>me(this,void 0,void 0,function*(){if(!c){if(k<=i.nonce)h=p;else{{const w=yield this.getTransaction(e);if(w&&w.blockNumber!=null)return}for(y==null&&(y=h-3,y{c||this.once("block",g)}))});if(c)return;this.once("block",g),l.push(()=>{this.removeListener("block",g)})}if(typeof n=="number"&&n>0){const h=setTimeout(()=>{f()||a(ke.makeError("timeout exceeded",q.errors.TIMEOUT,{timeout:n}))},n);h.unref&&h.unref(),l.push(()=>{clearTimeout(h)})}})})}getBlockNumber(){return me(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return me(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return H.from(e)}catch(r){return ke.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return me(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ke({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return H.from(i)}catch(s){return ke.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:s})}})}getTransactionCount(e,r){return me(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ke({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return H.from(i).toNumber()}catch(s){return ke.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:s})}})}getCode(e,r){return me(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ke({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return Q(i)}catch(s){return ke.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:s})}})}getStorageAt(e,r,n){return me(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield Ke({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>ni(o))}),s=yield this.perform("getStorageAt",i);try{return Q(s)}catch(o){return ke.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:s,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&Ii(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&ke.throwError("Transaction hash mismatch from Provider.sendTransaction.",q.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(s,o)=>me(this,void 0,void 0,function*(){s==null&&(s=1),o==null&&(o=0);let a;s!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const l=yield this._waitForTransaction(e.hash,s,o,a);return l==null&&s===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&ke.throwError("transaction failed",q.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return me(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(s=>Q(s)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const s=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,s,i)}catch(s){throw s.transaction=n,s.transactionHash=n.hash,s}})}_getTransactionRequest(e){return me(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?this._getAddress(s):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?H.from(s):null))}),["type"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?Q(s):null))}),this.formatter.transactionRequest(yield Ke(n))})}_getFilter(e){return me(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ke(r))})}_call(e,r,n){return me(this,void 0,void 0,function*(){n>=vH&&ke.throwError("CCIP read exceeded maximum redirections",q.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,s=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&i!=null&&s.substring(0,10)==="0x556f1830"&&Ii(s)%32===4)try{const o=qt(s,4),a=qt(o,0,32);H.from(a).eq(i)||ke.throwError("CCIP Read sender did not match",q.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:s});const l=[],c=H.from(qt(o,32,64)).toNumber(),f=H.from(qt(o,c,c+32)).toNumber(),u=qt(o,c+32);for(let w=0;wme(this,void 0,void 0,function*(){const s=yield this.perform("getBlock",i);if(s==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let o=null;for(let l=0;lthis._wrapTransaction(l)),a}return this.formatter.block(s)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return me(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return Zo(()=>me(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return me(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return Zo(()=>me(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return i}),{oncePoll:this})})}getLogs(e){return me(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Ke({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),fe.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return me(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return me(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&ke.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return me(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const i=new Rp(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return me(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||ke.throwError("network does not support ENS",q.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+df(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return me(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(Pe(e))throw n}typeof e!="string"&&ke.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return me(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const i=jd(yield this.call({to:n,data:"0x691f3431"+df(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return me(this,void 0,void 0,function*(){let r=null;if(Pe(e)){const s=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(s,"getAvatar");if(!o)return null;r=new Rp(this,o,s);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==q.errors.CALL_EXCEPTION)throw a}try{const a=jd(yield this.call({to:o,data:"0x691f3431"+df(s).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==q.errors.CALL_EXCEPTION)throw a;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return ke.throwError(e+" not implemented",q.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const i=new gH(za(e),r,n);return this._events.push(i),this._startEvent(i),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,i=[],s=za(e);return this._events=this._events.filter(o=>o.tag!==s?!0:(setTimeout(()=>{o.listener.apply(this,r)},0),n=!0,o.once?(i.push(o),!1):!0)),i.forEach(o=>{this._stopEvent(o)}),n}listenerCount(e){if(!e)return this._events.length;let r=za(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=za(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let i=!1,s=za(e);return this._events=this._events.filter(o=>o.tag!==s||o.listener!=r||i?!0:(i=!0,n.push(o),!1)),n.forEach(o=>{this._stopEvent(o)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=za(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var Ui=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const tr=new q(Cu),wH=["call","estimateGas"];function vf(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=Pe(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=vf(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return vf(JSON.parse(t),e)}catch{}return null}function c9(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const s=vf(e,!0);if(s)return s.data;tr.throwError("missing revert data in call exception; Transaction reverted without a reason string",q.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let s=vf(e.body,!1);s==null&&(s=vf(e,!1)),s&&tr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",q.errors.UNPREDICTABLE_GAS_LIMIT,{reason:s.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===q.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&tr.throwError("insufficient funds for intrinsic transaction cost",q.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&tr.throwError("nonce has already been used",q.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&tr.throwError("replacement fee too low",q.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&tr.throwError("legacy pre-eip-155 transactions not supported",q.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),wH.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&tr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",q.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function K6(t){return new Promise(function(e){setTimeout(e,t)})}function CH(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function Dc(t){return t&&t.toLowerCase()}const Mp={};class f9 extends fo{constructor(e,r,n){if(super(),e!==Mp)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");te(this,"provider",r),n==null&&(n=0),typeof n=="string"?(te(this,"_address",this.provider.formatter.address(n)),te(this,"_index",null)):typeof n=="number"?(te(this,"_index",n),te(this,"_address",null)):tr.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return tr.throwError("cannot alter JSON-RPC Signer connection",q.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new EH(Mp,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&tr.throwError("unknown account #"+this._index,q.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=nr(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=nr(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Ui(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&tr.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),Ke({tx:Ke(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&tr.throwArgumentError("from address mismatch","transaction",e):n.from=i;const s=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[s]).then(o=>o,o=>(typeof o.message=="string"&&o.message.match(/user denied/i)&&tr.throwError("user rejected transaction",q.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),c9("sendTransaction",o,s)))})}signTransaction(e){return tr.throwError("signing transactions is unsupported",q.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Ui(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Zo(()=>Ui(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,r)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return Ui(this,void 0,void 0,function*(){const r=typeof e=="string"?We(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[Q(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&tr.throwError("user rejected signing",q.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return Ui(this,void 0,void 0,function*(){const r=typeof e=="string"?We(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),Q(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&tr.throwError("user rejected signing",q.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return Ui(this,void 0,void 0,function*(){const i=yield er.resolveNames(e,r,n,o=>this.provider.resolveName(o)),s=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[s.toLowerCase(),JSON.stringify(er.getPayload(i.domain,r,i.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&tr.throwError("user rejected signing",q.errors.ACTION_REJECTED,{action:"_signTypedData",from:s,messageData:{domain:i.domain,types:r,value:i.value}}),o}})}unlock(e){return Ui(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class EH extends f9{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const SH={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let $a=class extends wx{constructor(e,r){let n=r;n==null&&(n=new Promise((i,s)=>{setTimeout(()=>{this.detectNetwork().then(o=>{i(o)},o=>{s(o)})},0)})),super(n),e||(e=Zn(this.constructor,"defaultUrl")()),typeof e=="string"?te(this,"connection",Object.freeze({url:e})):te(this,"connection",Object.freeze(nr(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Ui(this,void 0,void 0,function*(){yield K6(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=Zn(this.constructor,"getNetwork");try{return r(H.from(e).toNumber())}catch(n){return tr.throwError("could not detect network",q.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return tr.throwError("could not detect network",q.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new f9(Mp,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:Ri(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const s=wu(this.connection,JSON.stringify(n),CH).then(o=>(this.emit("debug",{action:"response",request:n,response:o,provider:this}),o),o=>{throw this.emit("debug",{action:"response",error:o,request:n,provider:this}),o});return i&&(this._cache[e]=s,setTimeout(()=>{this._cache[e]=null},0)),s}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Dc(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Dc(r.address),r.blockTag]];case"getCode":return["eth_getCode",[Dc(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Dc(r.address),He(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[Zn(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[Zn(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=Dc(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return Ui(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&H.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=yield this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(r=nr(r),r.transaction=nr(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&tr.throwError(e+" not implemented",q.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return c9(e,i,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(s){if(e._pendingFilter!=r)return null;let o=Promise.resolve();return s.forEach(function(a){e._emitted["t:"+a.toLowerCase()]="pending",o=o.then(function(){return e.getTransaction(a).then(function(l){return e.emit("pending",l),null})})}),o.then(function(){return K6(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(s=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=nr(SH);if(r)for(const s in r)r[s]&&(n[s]=!0);Qm(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(s){if(e[s]==null)return;const o=ni(H.from(e[s]));s==="gasLimit"&&(s="gas"),i[s]=o}),["from","to","data"].forEach(function(s){e[s]!=null&&(i[s]=Q(e[s]))}),e.accessList&&(i.accessList=Oa(e.accessList)),i}};var kH=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const AH=new q(Cu);class K0 extends $a{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return kH(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||AH.throwError("no network detected",q.errors.UNKNOWN_ERROR,{}),this._network==null&&(te(this,"_network",r),this.emit("network",r,null))),r})}}const J6=new q(Cu);let _H=1;function Y6(t,e){const r="Web3LegacyFetcher";return function(n,i){const s={method:n,params:i,id:_H++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:Ri(s),provider:this}),e(s,(l,c)=>{if(l)return this.emit("debug",{action:"response",fetcher:r,error:l,request:s,provider:this}),a(l);if(this.emit("debug",{action:"response",fetcher:r,request:s,response:c,provider:this}),c.error){const f=new Error(c.error.message);return f.code=c.error.code,f.data=c.error.data,a(f)}o(c.result)})})}}function TH(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:Ri(n),provider:this}),t.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}class PH extends $a{constructor(e,r){e==null&&J6.throwArgumentError("missing provider","provider",e);let n=null,i=null,s=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),s=e,e.request?(n===""&&(n="eip-1193:"),i=TH(e)):e.sendAsync?i=Y6(e,e.sendAsync.bind(e)):e.send?i=Y6(e,e.send.bind(e)):J6.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),te(this,"jsonRpcFetchFunc",i),te(this,"provider",s)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const IH="solidity/5.7.0",RH=new RegExp("^bytes([0-9]+)$"),MH=new RegExp("^(u?int)([0-9]*)$"),OH=new RegExp("^(.*)\\[([0-9]*)\\]$"),NH="0000000000000000000000000000000000000000000000000000000000000000",Ya=new q(IH);function u9(t,e,r){switch(t){case"address":return r?cf(e,32):X(e);case"string":return We(e);case"bytes":return X(e);case"bool":return e=e?"0x01":"0x00",r?cf(e,32):X(e)}let n=t.match(MH);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Ya.throwArgumentError("invalid number type","type",t),r&&(i=256),e=H.from(e).toTwos(i),cf(e,i/8)}if(n=t.match(RH),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Ya.throwArgumentError("invalid bytes type","type",t),X(e).byteLength!==i&&Ya.throwArgumentError(`invalid value for ${t}`,"value",e),r?X((e+NH).substring(0,66)):e}if(n=t.match(OH),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Ya.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(u9(i,a,!0))}),Ve(o)}return Ya.throwArgumentError("invalid type","type",t)}function Se(t,e){t.length!=e.length&&Ya.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(u9(n,e[i]))}),Q(Ve(r))}function Zs(t,e){return pe(Se(t,e))}function $H(t,e){return cs(Se(t,e))}const DH="units/5.7.0",d9=new q(DH),h9=["wei","kwei","mwei","gwei","szabo","finney","ether"];function LH(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&d9.throwArgumentError("invalid value","value",t);let r=e[0],n="";for(r.substring(0,1)==="-"&&(n="-",r=r.substring(1));r.substring(0,1)==="0";)r=r.substring(1);r===""&&(r="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);const s=[];for(;r.length;)if(r.length<=3){s.unshift(r);break}else{const o=r.length-3;s.unshift(r.substring(o)),r=r.substring(0,o)}return n+s.join(",")+i}function v9(t,e){if(typeof e=="string"){const r=h9.indexOf(e);r!==-1&&(e=3*r)}return Od(t,e??18)}function J0(t,e){if(typeof t!="string"&&d9.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=h9.indexOf(e);r!==-1&&(e=3*r)}return fi(t,e??18)}function BH(t){return v9(t,18)}function Op(t){return J0(t,18)}const jH=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:sx,ConstructorFragment:Qn,ErrorFragment:Wi,EventFragment:gi,FormatTypes:Ne,Fragment:mi,FunctionFragment:Xn,HDNode:dn,Indexed:z0,Interface:ir,LogDescription:d7,Logger:q,ParamType:fr,RLP:qj,SigningKey:sa,get SupportedAlgorithm(){return Jl},TransactionDescription:h7,get TransactionTypes(){return Ap},get UnicodeNormalizationForm(){return Mi},Utf8ErrorFuncs:e7,get Utf8ErrorReason(){return Zr},_TypedDataEncoder:er,_fetchData:i9,_toEscapedUtf8String:uF,accessListify:Oa,arrayify:X,base58:Kl,base64:IF,checkProperties:Qm,checkResultErrors:UE,commify:LH,computeAddress:Xs,computeHmac:tu,computePublicKey:hx,concat:Ve,deepCopy:Ri,defaultAbiCoder:Kr,defaultPath:Yl,defineReadOnly:te,dnsEncode:l7,entropyToMnemonic:n1,fetchJson:wu,formatBytes32String:dF,formatEther:BH,formatUnits:v9,getAccountPath:TV,getAddress:we,getContractAddress:ex,getCreate2Address:Qj,getIcapAddress:Yj,getJsonWalletAddress:DV,getStatic:Zn,hashMessage:Qh,hexConcat:Hr,hexDataLength:Ii,hexDataSlice:qt,hexStripZeros:ME,hexValue:ni,hexZeroPad:He,hexlify:Q,id:Fs,isAddress:qE,isBytes:ds,isBytesLike:os,isHexString:Pe,isValidMnemonic:_V,isValidName:eU,joinSignature:mp,keccak256:pe,mnemonicToEntropy:r1,mnemonicToSeed:J7,namehash:df,nameprep:AF,parseBytes32String:hF,parseEther:Op,parseTransaction:z7,parseUnits:J0,poll:Zo,randomBytes:xi,recoverAddress:wa,recoverPublicKey:L7,resolveProperties:Ke,ripemd160:q7,serializeTransaction:_p,sha256:cs,sha512:mV,shallowCopy:nr,shuffled:RV,solidityKeccak256:Zs,solidityPack:Se,soliditySha256:$H,splitSignature:Ia,stripZeros:ki,toUtf8Bytes:We,toUtf8CodePoints:F0,toUtf8String:vs,verifyMessage:n9,verifyTypedData:QV,zeroPad:cf},Symbol.toStringTag,{value:"Module"})),FH=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var UH=Object.freeze({__proto__:null,abi:FH});const zH=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],VH={isValidSignatureBytes32:"0x1626ba7e"};var HH=Object.freeze({__proto__:null,abi:zH,returns:VH});const WH=[{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC1271Revert",type:"error"},{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC6492DeployFailed",type:"error"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSig",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"allowSideEffects",type:"bool"},{internalType:"bool",name:"deployAlreadyDeployed",type:"bool"}],name:"isValidSigImpl",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffects",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffectsNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];var qH=Object.freeze({__proto__:null,abi:WH});const GH=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var KH=Object.freeze({__proto__:null,abi:GH});const JH=[{type:"function",name:"nonce",constant:!0,inputs:[],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"readNonce",constant:!0,inputs:[{type:"uint256"}],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"updateImplementation",constant:!1,inputs:[{type:"address"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"selfExecute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"execute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"},{type:"uint256"},{type:"bytes"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"createContract",inputs:[{type:"bytes"}],payable:!0,stateMutability:"payable"},{type:"function",name:"setExtraImageHash",constant:!1,inputs:[{type:"bytes32",name:"imageHash"},{type:"uint256",name:"expiration"}],outputs:[],payable:!1,stateMutability:"nonpayable"}];var YH=Object.freeze({__proto__:null,abi:JH});const QH=[{type:"function",name:"updateImageHash",constant:!0,inputs:[{type:"bytes32"}],outputs:[],payable:!1,stateMutability:"view"},{type:"function",name:"imageHash",constant:!0,inputs:[],outputs:[{type:"bytes32"}],payable:!1,stateMutability:"view"}];var XH=Object.freeze({__proto__:null,abi:QH});const ZH=[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_mainModule",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"bytes32",name:"_imageHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"_threshold",type:"uint256"},{indexed:!1,internalType:"bytes",name:"_signers",type:"bytes"}],name:"RequiredConfig",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"address",name:"_signer",type:"address"}],name:"RequiredSigner",type:"event"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callBalanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callBlockNumber",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_i",type:"uint256"}],name:"callBlockhash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"callChainId",outputs:[{internalType:"uint256",name:"id",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCode",outputs:[{internalType:"bytes",name:"code",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeHash",outputs:[{internalType:"bytes32",name:"codeHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeSize",outputs:[{internalType:"uint256",name:"size",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callCoinbase",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callDifficulty",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLeft",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLimit",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasPrice",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callOrigin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"knownImageHashes",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"lastImageHashUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastSignerUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastWalletUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bool",name:"delegateCall",type:"bool"},{internalType:"bool",name:"revertOnError",type:"bool"},{internalType:"uint256",name:"gasLimit",type:"uint256"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct IModuleCalls.Transaction[]",name:"_txs",type:"tuple[]"}],name:"multiCall",outputs:[{internalType:"bool[]",name:"_successes",type:"bool[]"},{internalType:"bytes[]",name:"_results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_threshold",type:"uint256"},{components:[{internalType:"uint256",name:"weight",type:"uint256"},{internalType:"address",name:"signer",type:"address"}],internalType:"struct RequireUtils.Member[]",name:"_members",type:"tuple[]"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"uint256",name:"_sizeMembers",type:"uint256"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishInitialSigners",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"}],name:"requireMinNonce",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_expiration",type:"uint256"}],name:"requireNonExpired",outputs:[],stateMutability:"view",type:"function"}];var eW=Object.freeze({__proto__:null,abi:ZH});const tW=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var rW=Object.freeze({__proto__:null,abi:tW});const mr={erc6492:qH,erc5719:UH,erc1271:HH,factory:KH,mainModule:YH,mainModuleUpgradable:XH,sequenceUtils:eW,requireFreshSigner:rW},nW=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:mr},Symbol.toStringTag,{value:"Module"}));function Y0(){return Y0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),de({},n)).then(i=>he(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),de({},n)).then(i=>he(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),de({},n)).then(i=>he(i).then(s=>({status:s.status}))),this.clock=n=>this.fetch(this.url("Clock"),de({},n)).then(i=>he(i).then(s=>({serverTime:s.serverTime}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),de({},n)).then(i=>he(i).then(s=>({data:s.data}))),this.getAuthToken=(n,i)=>this.fetch(this.url("GetAuthToken"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.getAuthToken2=(n,i)=>this.fetch(this.url("GetAuthToken2"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.sendPasswordlessLink=(n,i)=>this.fetch(this.url("SendPasswordlessLink"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.friendList=(n,i)=>this.fetch(this.url("FriendList"),de(n,i)).then(s=>he(s).then(o=>({page:o.page,friends:o.friends}))),this.getFriendByAddress=(n,i)=>this.fetch(this.url("GetFriendByAddress"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,friend:o.friend}))),this.searchFriends=(n,i)=>this.fetch(this.url("SearchFriends"),de(n,i)).then(s=>he(s).then(o=>({friends:o.friends}))),this.addFriend=(n,i)=>this.fetch(this.url("AddFriend"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,friend:o.friend}))),this.updateFriendNickname=(n,i)=>this.fetch(this.url("UpdateFriendNickname"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,friend:o.friend}))),this.removeFriend=(n,i)=>this.fetch(this.url("RemoveFriend"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.contractCall=(n,i)=>this.fetch(this.url("ContractCall"),de(n,i)).then(s=>he(s).then(o=>({returns:o.returns}))),this.decodeContractCall=(n,i)=>this.fetch(this.url("DecodeContractCall"),de(n,i)).then(s=>he(s).then(o=>({call:o.call}))),this.lookupContractCallSelectors=(n,i)=>this.fetch(this.url("LookupContractCallSelectors"),de(n,i)).then(s=>he(s).then(o=>({signatures:o.signatures}))),this.userStorageFetch=(n,i)=>this.fetch(this.url("UserStorageFetch"),de(n,i)).then(s=>he(s).then(o=>({object:o.object}))),this.userStorageSave=(n,i)=>this.fetch(this.url("UserStorageSave"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.userStorageDelete=(n,i)=>this.fetch(this.url("UserStorageDelete"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.userStorageFetchAll=(n,i)=>this.fetch(this.url("UserStorageFetchAll"),de(n,i)).then(s=>he(s).then(o=>({objects:o.objects}))),this.getMoonpayLink=(n,i)=>this.fetch(this.url("GetMoonpayLink"),de(n,i)).then(s=>he(s).then(o=>({signedUrl:o.signedUrl}))),this.getSardineClientToken=n=>this.fetch(this.url("GetSardineClientToken"),de({},n)).then(i=>he(i).then(s=>({token:s.token}))),this.isUsingGoogleMail=(n,i)=>this.fetch(this.url("IsUsingGoogleMail"),de(n,i)).then(s=>he(s).then(o=>({yes:o.yes}))),this.resolveENSAddress=(n,i)=>this.fetch(this.url("ResolveENSAddress"),de(n,i)).then(s=>he(s).then(o=>({address:o.address,ok:o.ok}))),this.isValidSignature=(n,i)=>this.fetch(this.url("IsValidSignature"),de(n,i)).then(s=>he(s).then(o=>({isValid:o.isValid}))),this.isValidMessageSignature=(n,i)=>this.fetch(this.url("IsValidMessageSignature"),de(n,i)).then(s=>he(s).then(o=>({isValid:o.isValid}))),this.isValidTypedDataSignature=(n,i)=>this.fetch(this.url("IsValidTypedDataSignature"),de(n,i)).then(s=>he(s).then(o=>({isValid:o.isValid}))),this.isValidETHAuthProof=(n,i)=>this.fetch(this.url("IsValidETHAuthProof"),de(n,i)).then(s=>he(s).then(o=>({isValid:o.isValid}))),this.getCoinPrices=(n,i)=>this.fetch(this.url("GetCoinPrices"),de(n,i)).then(s=>he(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getCollectiblePrices=(n,i)=>this.fetch(this.url("GetCollectiblePrices"),de(n,i)).then(s=>he(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getExchangeRate=(n,i)=>this.fetch(this.url("GetExchangeRate"),de(n,i)).then(s=>he(s).then(o=>({exchangeRate:o.exchangeRate}))),this.memoryStore=(n,i)=>this.fetch(this.url("MemoryStore"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.memoryLoad=(n,i)=>this.fetch(this.url("MemoryLoad"),de(n,i)).then(s=>he(s).then(o=>({value:o.value}))),this.listPayCardsOnFile=n=>this.fetch(this.url("ListPayCardsOnFile"),de({},n)).then(i=>he(i).then(s=>({payCards:s.payCards}))),this.savePayCard=(n,i)=>this.fetch(this.url("SavePayCard"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok,payCard:o.payCard}))),this.updatePayCardCVC=(n,i)=>this.fetch(this.url("UpdatePayCardCVC"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.deletePayCard=(n,i)=>this.fetch(this.url("DeletePayCard"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.smartRampQuote=(n,i)=>this.fetch(this.url("SmartRampQuote"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,quoteDetails:o.quoteDetails}))),this.smartRampPurchase=(n,i)=>this.fetch(this.url("SmartRampPurchase"),de(n,i)).then(s=>he(s).then(o=>({processing:o.processing,receipt:o.receipt}))),this.smartRampWaitOrderConfirmation=(n,i)=>this.fetch(this.url("SmartRampWaitOrderConfirmation"),de(n,i)).then(s=>he(s).then(o=>({done:o.done,receipt:o.receipt}))),this.smartRampGetOrder=(n,i)=>this.fetch(this.url("SmartRampGetOrder"),de(n,i)).then(s=>he(s).then(o=>({order:o.order}))),this.smartRampCheckCardAuthorization=(n,i)=>this.fetch(this.url("SmartRampCheckCardAuthorization"),de(n,i)).then(s=>he(s).then(o=>({cardAuth:o.cardAuth}))),this.smartRampOrdersList=(n,i)=>this.fetch(this.url("SmartRampOrdersList"),de(n,i)).then(s=>he(s).then(o=>({page:o.page,orders:o.orders}))),this.smartRampGetOrderTxnHash=(n,i)=>this.fetch(this.url("SmartRampGetOrderTxnHash"),de(n,i)).then(s=>he(s).then(o=>({txnHash:o.txnHash,txnSuccessful:o.txnSuccessful}))),this.smartRampSubmitCardAuthorization=(n,i)=>this.fetch(this.url("SmartRampSubmitCardAuthorization"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.adminSmartRampGetOrder=(n,i)=>this.fetch(this.url("AdminSmartRampGetOrder"),de(n,i)).then(s=>he(s).then(o=>({order:o.order}))),this.adminSmartRampListCompletedOrders=(n,i)=>this.fetch(this.url("AdminSmartRampListCompletedOrders"),de(n,i)).then(s=>he(s).then(o=>({orders:o.orders}))),this.adminSmartRampListPendingOrders=(n,i)=>this.fetch(this.url("AdminSmartRampListPendingOrders"),de(n,i)).then(s=>he(s).then(o=>({pendingOrders:o.pendingOrders}))),this.getInviteInfo=n=>this.fetch(this.url("GetInviteInfo"),de({},n)).then(i=>he(i).then(s=>({inviteInfo:s.inviteInfo}))),this.isValidAccessCode=(n,i)=>this.fetch(this.url("IsValidAccessCode"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.internalClaimAccessCode=(n,i)=>this.fetch(this.url("InternalClaimAccessCode"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.blockNumberAtTime=(n,i)=>this.fetch(this.url("BlockNumberAtTime"),de(n,i)).then(s=>he(s).then(o=>({blocks:o.blocks}))),this.paperSessionSecret=(n,i)=>this.fetch(this.url("PaperSessionSecret"),de(n,i)).then(s=>he(s).then(o=>({secret:o.secret}))),this.paperSessionSecret2=(n,i)=>this.fetch(this.url("PaperSessionSecret2"),de(n,i)).then(s=>he(s).then(o=>({secret:o.secret}))),this.linkWallet=(n,i)=>this.fetch(this.url("LinkWallet"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,linkedWalletAddress:o.linkedWalletAddress}))),this.getLinkedWallets=(n,i)=>this.fetch(this.url("GetLinkedWallets"),de(n,i)).then(s=>he(s).then(o=>({linkedWallets:o.linkedWallets}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const de=(t={},e={})=>({method:"POST",headers:Y0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),he=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),Q6=typeof global=="object"?global.fetch:window.fetch;class Fd extends y9{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,Q6),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(i,s)=>{const o={},a=this.jwtAuth,l=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),l&&l.length>0&&(o["X-Access-Key"]=l),s.headers=Y0({},s.headers,o),Q6(i,s)},this.fetch=this._fetch}}const fW=Object.freeze(Object.defineProperty({__proto__:null,API:y9,SequenceAPIClient:Fd,SmartRampOrderStatus:aW,SmartRampTxnStatus:lW,SortOrder:cW,WebRPCSchemaHash:oW,WebRPCSchemaVersion:sW,WebRPCVersion:iW},Symbol.toStringTag,{value:"Module"})),p9="3.7.5",uW=p9,dW=typeof atob=="function",hW=typeof btoa=="function",pc=typeof Buffer=="function",X6=typeof TextDecoder=="function"?new TextDecoder:void 0,Z6=typeof TextEncoder=="function"?new TextEncoder:void 0,vW="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Wc=Array.prototype.slice.call(vW),hd=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(Wc),yW=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Cr=String.fromCharCode.bind(String),e5=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),g9=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),m9=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),x9=t=>{let e,r,n,i,s="";const o=t.length%3;for(let a=0;a255||(n=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|i,s+=Wc[e>>18&63]+Wc[e>>12&63]+Wc[e>>6&63]+Wc[e&63]}return o?s.slice(0,o-3)+"===".substring(o):s},Cx=hW?t=>btoa(t):pc?t=>Buffer.from(t,"binary").toString("base64"):x9,Np=pc?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;ne?g9(Np(t)):Np(t),pW=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?Cr(192|e>>>6)+Cr(128|e&63):Cr(224|e>>>12&15)+Cr(128|e>>>6&63)+Cr(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return Cr(240|e>>>18&7)+Cr(128|e>>>12&63)+Cr(128|e>>>6&63)+Cr(128|e&63)}},gW=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,b9=t=>t.replace(gW,pW),t5=pc?t=>Buffer.from(t,"utf8").toString("base64"):Z6?t=>Np(Z6.encode(t)):t=>Cx(b9(t)),Il=(t,e=!1)=>e?g9(t5(t)):t5(t),r5=t=>Il(t,!0),mW=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,xW=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return Cr((r>>>10)+55296)+Cr((r&1023)+56320);case 3:return Cr((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return Cr((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},w9=t=>t.replace(mW,xW),C9=t=>{if(t=t.replace(/\s+/g,""),!yW.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,i;for(let s=0;s>16&255):i===64?Cr(e>>16&255,e>>8&255):Cr(e>>16&255,e>>8&255,e&255);return r},Ex=dW?t=>atob(m9(t)):pc?t=>Buffer.from(t,"base64").toString("binary"):C9,E9=pc?t=>e5(Buffer.from(t,"base64")):t=>e5(Ex(t).split("").map(e=>e.charCodeAt(0))),S9=t=>E9(k9(t)),bW=pc?t=>Buffer.from(t,"base64").toString("utf8"):X6?t=>X6.decode(E9(t)):t=>w9(Ex(t)),k9=t=>m9(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),$p=t=>bW(k9(t)),wW=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},A9=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),_9=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,A9(r));t("fromBase64",function(){return $p(this)}),t("toBase64",function(e){return Il(this,e)}),t("toBase64URI",function(){return Il(this,!0)}),t("toBase64URL",function(){return Il(this,!0)}),t("toUint8Array",function(){return S9(this)})},T9=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,A9(r));t("toBase64",function(e){return Ud(this,e)}),t("toBase64URI",function(){return Ud(this,!0)}),t("toBase64URL",function(){return Ud(this,!0)})},CW=()=>{_9(),T9()},Ea={version:p9,VERSION:uW,atob:Ex,atobPolyfill:C9,btoa:Cx,btoaPolyfill:x9,fromBase64:$p,toBase64:Il,encode:Il,encodeURI:r5,encodeURL:r5,utob:b9,btou:w9,decode:$p,isValid:wW,fromUint8Array:Ud,toUint8Array:S9,extendString:_9,extendUint8Array:T9,extendBuiltins:CW};var Dp=function(){return Dp=Object.assign||function(e){for(var r,n=1,i=arguments.length;n0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]0&&(i.types.Claims.push({name:"app",type:"string"}),i.message.app=this.claims.app),this.claims.iat&&this.claims.iat>0&&(i.types.Claims.push({name:"iat",type:"int64"}),i.message.iat=this.claims.iat),this.claims.exp&&this.claims.exp>0&&(i.types.Claims.push({name:"exp",type:"int64"}),i.message.exp=this.claims.exp),this.claims.n&&this.claims.n>0&&(i.types.Claims.push({name:"n",type:"uint64"}),i.message.n=this.claims.n),this.claims.typ&&this.claims.typ.length>0&&(i.types.Claims.push({name:"typ",type:"string"}),i.message.typ=this.claims.typ),this.claims.ogn&&this.claims.ogn.length>0&&(i.types.Claims.push({name:"ogn",type:"string"}),i.message.ogn=this.claims.ogn),this.claims.v&&this.claims.v.length>0&&(i.types.Claims.push({name:"v",type:"string"}),i.message.v=this.claims.v),i},t}(),SW=function(t){if(t.app==="")return{ok:!1,err:new Error("claims: app is empty")};var e=Math.round(new Date().getTime()/1e3),r=5*60,n=60*60*24*365+r;return t.v===""?{ok:!1,err:new Error("claims: ethauth version is empty")}:t.iat&&t.iat!==0&&(t.iat>e+r||t.iate+n?{ok:!1,err:new Error("claims: token has expired")}:{ok:!0}},kW=function(t,e,r){return qo(void 0,void 0,void 0,function(){var n,i;return Go(this,function(s){return n=r.messageDigest(),i=n9(n,r.signature),i.slice(0,2)==="0x"&&i.length===42&&i.toLowerCase()===r.address.toLowerCase()?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]})})},AW=function(t,e,r){return qo(void 0,void 0,void 0,function(){var n,i,s,o,a;return Go(this,function(l){switch(l.label){case 0:return!t||t===void 0?[2,{isValid:!1}]:(n=r.messageDigest(),[4,t.getCode(r.address)]);case 1:if(i=l.sent(),i==="0x"||i.length<=2)throw new Error("ValidateContractAccountProof failed. unable to fetch wallet contract code");return s=["function isValidSignature(bytes32, bytes) public view returns (bytes4)"],o=new Na(r.address,s,t),[4,o.isValidSignature(n,X(r.signature))];case 2:return a=l.sent(),a===_W?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},_W="0x1626ba7e",P9="1",Lp="eth",TW={name:"ETHAuth",version:P9},Q0=function(){function t(){for(var e=[],r=0;r0&&(l+="."+i.extra),[2,l]}})})},this.decodeProof=function(i,s){return s===void 0&&(s=!1),qo(n,void 0,void 0,function(){var o,a,l,c,f,u,h,y,g,p;return Go(this,function(k){switch(k.label){case 0:if(o=i.split("."),o.length<4||o.length>5)throw new Error("ethauth: invalid proof string");if(a=o[0],l=o[1],c=o[2],f=o[3],u=o[4],a!==Lp)throw new Error("ethauth: not an ethauth proof");return h=Ea.decode(c),y=JSON.parse(h),g=new Sx({address:l,claims:y,signature:f,extra:u}),[4,this.validateProof(g,s)];case 1:if(p=k.sent(),!p)throw new Error("ethauth: proof is invalid");return[2,g]}})})},this.validateProof=function(i,s){return s===void 0&&(s=!1),qo(n,void 0,void 0,function(){var o,a;return Go(this,function(l){switch(l.label){case 0:if(o=this.validateProofClaims(i),o.err)throw new Error("ethauth: proof claims are invalid ".concat(o.err));return s===!0?[3,2]:[4,this.validateProofSignature(i)];case 1:if(a=l.sent(),a!==!0)throw new Error("ethauth: proof signature is invalid");l.label=2;case 2:return[2,!0]}})})},this.validateProofSignature=function(i){return qo(n,void 0,void 0,function(){var s,l,o,a,l;return Go(this,function(c){switch(c.label){case 0:s=[],l=0,c.label=1;case 1:if(!(lEa.encode(t,!0),kx=t=>Ea.encode(JSON.stringify(t),!0),IW=t=>{if(t!=null)return Ea.decode(t)},Ax=t=>{if(t!=null)return JSON.parse(Ea.decode(t))};function I9(t){return t!=null&&(H.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Pe(t)||typeof t=="bigint"||ds(t))}const _x=t=>X(pe(typeof t=="string"?We(t):t)),R9=(t,e,r)=>Se(["string","uint256","address","bytes32"],["",e,t,r]),Bp=(t,e,r)=>pe(R9(t,e,r)),M9=()=>typeof window>"u"&&typeof process=="object",RW=()=>!M9(),O9=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(Ea.decode(e[1]))};function X0(){return X0=Object.assign?Object.assign.bind():function(t){for(var e=1;eve.configure(t),iu=(t,e,r)=>{const n={};return r&&r.length>0&&(n.Authorization=`BEARER ${r}`),e&&e.length>0&&(n["X-Access-Key"]=e),{url:t,headers:n,skipFetchSetup:!0,fetchOptions:{mode:"cors",cache:"force-cache",credentials:"same-origin",redirect:"follow",referrer:"client"}}};let MW=class{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...i){e=`${e}:${pe(We(JSON.stringify(i,OW)))}`;let s=this.cache.get(e);if(s&&s.expiration&&new Date>=s.expiration&&(s=void 0,this.cache.delete(e)),!s){const o={promise:n(...i)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),s=o,this.cache.set(e,s)}return s.promise}};function OW(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function Tx(t,e){return function(...r){const n=Array.prototype.slice.call(r);return new Promise(async(i,s)=>{try{n.push((o,a)=>o?s(o):i(a)),await t.apply(e,n)}catch(o){s(o)}})}}function NW(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function $W(t){const e=t.split("&"),r={};for(const n of e){const i=n.split("=");r[decodeURIComponent(i[0])]=JSON.parse(decodeURIComponent(i[1]))}return r}const Px=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),D9=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},L9=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},B9=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},DW=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),j9=t=>{const e=X0({},t.types);return delete e.EIP712Domain,er.hash(t.domain,e,t.message)},Eu=t=>X(j9(t)),{defineReadOnly:LW,getStatic:BW,resolveProperties:jW,checkProperties:FW,shallowCopy:UW,deepCopy:zW}=jH,VW=t=>t.replace(/([^:]\/)\/+/g,"$1"),HW=Object.freeze(Object.defineProperty({__proto__:null,Logger:N9,PromiseCache:MW,base64Decode:IW,base64DecodeObject:Ax,base64Encode:PW,base64EncodeObject:kx,checkProperties:FW,configureLogger:$9,deepCopy:zW,defineReadOnly:LW,encodeMessageDigest:_x,encodeTypedDataDigest:Eu,encodeTypedDataHash:j9,getEthersConnectionInfo:iu,getRandomInt:Px,getStatic:BW,isBigNumberish:I9,isBrowser:RW,isNode:M9,jwtDecodeClaims:O9,logger:ve,packMessageData:R9,promisify:Tx,queryStringFromObject:NW,queryStringToObject:$W,resolveProperties:jW,sanitizeAlphanumeric:L9,sanitizeHost:B9,sanitizeNumberString:D9,shallowCopy:UW,sleep:DW,subDigestOf:Bp,urlClean:VW},Symbol.toStringTag,{value:"Module"}));function It(){return It=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:H.from(t).toNumber(),qW=t=>{if(t)return F9(t)},U9=(t,e=!1,r=!1)=>{if(!t)throw new Error("invalid network config: empty config");const n=[];if(Array.isArray(t)?n.push(...t):n.push(t),n.length===0){if(e)throw new Error("invalid network config: empty config");return!1}const i=n.map(c=>c.chainId).sort(),s=i.filter((c,f)=>i.indexOf(c)!==f);if(s.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${s}`);return!1}n.forEach(c=>c.name=c.name.toLowerCase());const o=n.map(c=>c.name).sort(),a=o.filter((c,f)=>o.indexOf(c)!==f);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let c=0;c(U9(t,!0,e),t),GW=(t,e=!0)=>{const r=t.map(i=>i.chainId).sort(),n=r.filter((i,s)=>r.indexOf(i)!==s);if(n.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${n}`);return!1}return!0},KW=(t,e)=>{if(!(!t||!e)){if(!t.chainId&&!t.name)throw new Error("failed to update network config: source config is missing chainId or name");if(t.chainId!==e.chainId&&t.name!==e.name)throw new Error("failed to update network config: one of chainId or name must match");t.rpcUrl&&(e.rpcUrl=t.rpcUrl,e.provider=void 0),t.provider&&(e.provider=t.provider),t.relayer&&(e.relayer=t.relayer)}},V9=t=>z9(H9(t)),ii=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=H.from(e).toNumber();return t.find(n=>n.chainId===r)}else return t.find(r=>r.name===e||`${r.chainId}`===e);else{if(typeof e=="number")return t.find(r=>r.chainId===e);if(e.chainId)return t.find(r=>r.chainId===e.chainId);if(H.isBigNumber(e)){const r=e.toNumber();return t.find(n=>n.chainId===r)}else return}},JW=(t,e)=>t?t.name===e||t.chainId===e:!1,YW=t=>{const e={};for(let r=0;r{if(!t)return[];const e=t.sort((n,i)=>n.chainId===i.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},s1=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let i=e[n];return typeof i=="function"?i=i():i==null?i="":typeof i=="object"||typeof i=="symbol"?i=i.toString():i=i.valueOf(),i})):"",W9=t=>s1("https://${network}-indexer.sequence.app",{network:t}),q9=t=>s1("https://${network}-relayer.sequence.app",{network:t}),G9=t=>s1("https://nodes.sequence.app/${network}",{network:t});function Ix(t){return ii(Ql,t)}function K9(t){return H.isBigNumber(t)?t:I9(t)?H.from(t):H.from(t.chainId)}const Yt=t=>{const e=G9(t);return{rpcUrl:e,relayer:{url:q9(t),provider:{url:e}},indexerUrl:W9(t)}},Ql=V9([It({},Pt[ee.POLYGON],Yt("polygon"),{isDefaultChain:!0,isAuthChain:!0}),It({},Pt[ee.MAINNET],Yt("mainnet")),It({},Pt[ee.BSC],Yt("bsc")),It({},Pt[ee.AVALANCHE],Yt("avalanche")),It({},Pt[ee.ARBITRUM],Yt("arbitrum")),It({},Pt[ee.ARBITRUM_NOVA],Yt("arbitrum-nova")),It({},Pt[ee.OPTIMISM],Yt("optimism")),It({},Pt[ee.OPTIMISM_SEPOLIA],Yt("optimism-sepolia")),It({},Pt[ee.POLYGON_ZKEVM],Yt("polygon-zkevm")),It({},Pt[ee.GNOSIS],Yt("gnosis")),It({},Pt[ee.RINKEBY],Yt("rinkeby"),{disabled:!0}),It({},Pt[ee.GOERLI],Yt("goerli"),{disabled:!0}),It({},Pt[ee.SEPOLIA],Yt("sepolia")),It({},Pt[ee.POLYGON_MUMBAI],Yt("mumbai")),It({},Pt[ee.BSC_TESTNET],Yt("bsc-testnet")),It({},Pt[ee.ARBITRUM_SEPOLIA],Yt("arbitrum-sepolia")),It({},Pt[ee.BASE],Yt("base")),It({},Pt[ee.BASE_SEPOLIA],Yt("base-sepolia")),It({},Pt[ee.HOMEVERSE],Yt("homeverse")),It({},Pt[ee.HOMEVERSE_TESTNET],Yt("homeverse-testnet")),It({},Pt[ee.AVALANCHE_TESTNET],Yt("avalanche-testnet")),It({},Pt[ee.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),It({},Pt[ee.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),Xl="2.0";class Rx{constructor(e,r){this.sender=void 0,this.handler=void 0,this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=J9(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(i){r(i,void 0)}}}const J9=(t,e)=>{if(t.length===0)return e;const r=i=>i.sendAsyncMiddleware?i.sendAsyncMiddleware:i;let n;n=r(t[t.length-1])(e);for(let i=t.length-2;i>=0;i--)n=r(t[i])(n);return n};function Y9(t){return t!==void 0&&t.send!==void 0&&t.constructor.defaultUrl!==void 0&&t.detectNetwork!==void 0&&t.getSigner!==void 0&&t.perform!==void 0}function Q9(t){return t!==void 0&&t.sendAsync!==void 0}let QW=0;class Z0{constructor(e,r){this.send=void 0,this.request=void 0,this.defaultChainId=void 0,this.sendAsync=(n,i,s)=>{this.send(n.method,n.params,s||this.defaultChainId).then(o=>{i(void 0,{jsonrpc:"2.0",id:n.id,result:o})}).catch(o=>{i(o,void 0)})},this.defaultChainId=r,Y9(e)?this.send=e.send.bind(e):Q9(e)?this.send=(n,i,s)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:Xl,id:++QW,method:n,params:i},(l,c)=>{l?a(l):o(c?c.result:void 0)},s||this.defaultChainId)}):this.send=e,this.request=(n,i)=>this.send(n.method,n.params,i)}}class XW{constructor(e){this.provider=e,this.sendAsync=(r,n)=>{this.provider.send(r.method,r.params).then(i=>{n(void 0,{jsonrpc:"2.0",id:r.id,result:i})}).catch(i=>{n(i,void 0)})},this.send=this.sendAsync}}class ZW{constructor(e){this.sendAsyncMiddleware=void 0,this.isAllowedFunc=void 0,e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.sendAsyncMiddleware=jp(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.sendAsyncMiddleware=jp(this.isAllowedFunc)}}const jp=t=>e=>(r,n,i)=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");e(r,n,i)};class Mx{constructor(e){this.cachableJsonRpcMethods=["net_version","eth_chainId","eth_accounts","sequence_getWalletContext","sequence_getNetworks"],this.cachableJsonRpcMethodsByBlock=["eth_call","eth_getCode"],this.cache=void 0,this.cacheByBlock=void 0,this.cacheByBlockResetLock=!1,this.onUpdateCallback=void 0,this.defaultChainId=void 0,this.sendAsyncMiddleware=r=>(n,i,s)=>{if(this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method)){const o=this.cacheKey(n.method,n.params,s||this.defaultChainId),a=this.getCacheValue(o);if(a&&a!==""){i(void 0,{jsonrpc:"2.0",id:n.id,result:a});return}}r(n,(o,a,l)=>{if((this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method))&&a&&a.result&&this.shouldCacheResponse(n,a)){const c=this.cacheKey(n.method,n.params,l||this.defaultChainId);this.cachableJsonRpcMethods.includes(n.method)?this.setCacheValue(c,a.result):this.setCacheByBlockValue(c,a.result)}i(o,a)},s||this.defaultChainId)},this.cacheKey=(r,n,i)=>{let s="";return i?s=`${i}:${r}:`:s=`:${r}:`,!n||n.length===0?s+"[]":s+JSON.stringify(n)},this.getCache=()=>this.cache,this.setCache=r=>{this.cache=r,this.onUpdateCallback&&this.onUpdateCallback()},this.getCacheValue=r=>{if(this.cache[r])return this.cache[r];if(this.cacheByBlock[r])return this.cacheByBlock[r]},this.setCacheValue=(r,n)=>{this.cache[r]=n,this.onUpdateCallback&&this.onUpdateCallback(r,n)},this.setCacheByBlockValue=(r,n)=>{this.cacheByBlock[r]=n,this.cacheByBlockResetLock||(this.cacheByBlockResetLock=!0,setTimeout(()=>{this.cacheByBlockResetLock=!1,this.cacheByBlock={}},1500))},this.shouldCacheResponse=(r,n)=>!(!n||!n.result||r.method==="eth_getCode"&&n.result.length<=2),this.clearCache=()=>{this.cache={},this.cacheByBlock={}},this.cache={},this.cacheByBlock={},this.defaultChainId=e==null?void 0:e.defaultChainId,e!=null&&e.blockCache?(e==null?void 0:e.blockCache)!==!0&&(this.cachableJsonRpcMethodsByBlock=e==null?void 0:e.blockCache):this.cachableJsonRpcMethodsByBlock=[]}onUpdate(e){this.onUpdateCallback=e}}class X9{constructor(e){this.options=void 0,this.sendAsyncMiddleware=r=>(n,i,s)=>{const{id:o,method:a}=n;switch(a){case"net_version":if(this.options.chainId){i(void 0,{jsonrpc:"2.0",id:o,result:`${this.options.chainId}`});return}break;case"eth_chainId":if(this.options.chainId){i(void 0,{jsonrpc:"2.0",id:o,result:Q(this.options.chainId)});return}break;case"eth_accounts":if(this.options.accountAddress){i(void 0,{jsonrpc:"2.0",id:o,result:[we(this.options.accountAddress)]});return}break;case"sequence_getWalletContext":if(this.options.walletContext){i(void 0,{jsonrpc:"2.0",id:o,result:this.options.walletContext});return}break}r(n,i,s)},this.options=e}}const Z9=t=>(e,r,n)=>{t(e,(i,s)=>{if(!i&&s&&s.error)throw typeof s.error=="string"?new Error(s.error):new Error(s.error.message);r(i,s)},n)},eS=t=>(e,r,n)=>{const i=n?` chainId:${n}`:"";ve.info(`[provider request]${i} id:${e.id} method:${e.method} params:`,e.params),t(e,(s,o)=>{s?ve.warn(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"error:",s):ve.info(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"response:",o),r(s,o)},n)},eq=t=>e=>(r,n,i)=>{const s=t(r),{id:o,method:a}=r;switch(a){case"net_version":n(void 0,{jsonrpc:"2.0",id:o,result:`${s}`});return;case"eth_chainId":n(void 0,{jsonrpc:"2.0",id:o,result:Q(s)});return}e(r,n,i)},tS=["personal_sign","eth_sign","eth_signTypedData","eth_signTypedData_v4","eth_sendTransaction","eth_sendRawTransaction","sequence_sign","sequence_signTypedData_v4","sequence_getWalletContext","sequence_getWalletConfig","sequence_getWalletState","sequence_getNetworks","sequence_updateConfig","sequence_publishConfig","sequence_gasRefundOptions","sequence_getNonce","sequence_relay","eth_decrypt","eth_getEncryptionPublicKey","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"];class tq{constructor(e){this.provider=void 0,this.sendAsyncMiddleware=r=>(n,i,s)=>{if(tS.includes(n.method)){this.provider.sendAsync(n,i,s);return}r(n,i,s)},this.provider=e}}class rq{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...tS],this.provider=void 0,this.rpcUrl=void 0,this.sendAsyncMiddleware=r=>(n,i)=>{if(this.provider&&!this.privateJsonRpcMethods.includes(n.method)){this.provider.send(n.method,n.params).then(s=>{i(void 0,{jsonrpc:"2.0",id:n.id,result:s})}).catch(s=>i(s));return}ve.debug("[public-provider] sending request to signer window",n.method),r(n,i)},e&&this.setRpcUrl(e)}getRpcUrl(){return this.rpcUrl}setRpcUrl(e){!e||e===""?(this.rpcUrl=void 0,this.provider=void 0):(this.rpcUrl=e,this.provider=new $a(e))}}class rS{constructor(){this.singleflightJsonRpcMethods=["eth_chainId","net_version","eth_call","eth_getCode","eth_blockNumber","eth_getBalance","eth_getStorageAt","eth_getTransactionCount","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_getBlockByHash","eth_getBlockByNumber","eth_getTransactionByHash","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionReceipt","eth_getUncleByBlockHashAndIndex","eth_getUncleByBlockNumberAndIndex","eth_getLogs"],this.inflight=void 0,this.sendAsyncMiddleware=e=>(r,n,i)=>{if(!this.singleflightJsonRpcMethods.includes(r.method)){e(r,n,i);return}const s=this.requestKey(r.method,r.params||[],i);if(!this.inflight[s])this.inflight[s]=[];else{this.inflight[s].push({id:r.id,callback:n});return}e(r,(o,a,l)=>{n(o,a);for(let c=0;c{let i="";return n?i=`${n}:${e}:`:i=`:${e}:`,!r||r.length===0?i+"[]":i+JSON.stringify(r)},this.inflight={}}}class nq extends $a{constructor(e,r){super(e,r==null?void 0:r.chainId),this._chainId=void 0,this._sender=void 0,this.send=(a,l)=>this._sender.send(a,l),this.fetch=(a,l)=>{const c={method:a,params:l,id:this._nextId++,jsonrpc:"2.0"};return wu(this.connection,JSON.stringify(c),iq).then(u=>u,u=>{throw u})};const n=r==null?void 0:r.chainId,i=r==null?void 0:r.middlewares,s=r==null?void 0:r.blockCache;this._chainId=n;const o=new Rx(i??[new X9({chainId:n}),new rS,new Mx({defaultChainId:n,blockCache:s})],new Z0(this.fetch,n));this._sender=new Z0(o,n)}async getNetwork(){const e=this._chainId;if(e){const r=Pt[e],n=(r==null?void 0:r.name)||"",i=r==null?void 0:r.ensAddress;return{name:n,chainId:e,ensAddress:i}}else{const r=await this.send("eth_chainId",[]);return this._chainId=H.from(r).toNumber(),this.getNetwork()}}}function iq(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}const sq=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:ZW,CachedProvider:Mx,ChainId:ee,EagerProvider:X9,JsonRpcExternalProvider:XW,JsonRpcProvider:nq,JsonRpcRouter:Rx,JsonRpcSender:Z0,JsonRpcVersion:Xl,NetworkType:je,PublicProvider:rq,SigningProvider:tq,SingleflightMiddleware:rS,allNetworks:Ql,allowProviderMiddleware:jp,checkNetworkConfig:JW,createJsonRpcMiddlewareStack:J9,ensureUniqueNetworks:GW,ensureValidNetworks:z9,exceptionProviderMiddleware:Z9,findNetworkConfig:ii,findSupportedNetwork:Ix,getChainId:F9,indexerURL:W9,isJsonRpcHandler:Q9,isJsonRpcProvider:Y9,isNetworkConfig:WW,isValidNetworkConfig:U9,loggingProviderMiddleware:eS,maybeChainId:qW,networkProviderMiddleware:eq,networks:Pt,networksIndex:YW,nodesURL:G9,relayerURL:q9,sortNetworks:H9,stringTemplate:s1,toChainIdNumber:K9,updateNetworkConfig:KW,validateAndSortNetworks:V9},Symbol.toStringTag,{value:"Module"}));function Sr(){return Sr=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(Nx(i))return Se(["uint8","uint8","address"],[aa.Address,i.weight,i.address]);if(i.isDynamic){const s=X(i.signature);return Se(["uint8","uint8","address","uint16","bytes"],[aa.DynamicSignature,i.weight,i.address,s.length,s])}return Se(["uint8","uint8","bytes"],[aa.EOASignature,i.weight,i.signature])});return Se(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function lS(t,e,r){const n=Su(e),i=await Promise.all(t.signers.map(async s=>{if(Nx(s))return s;if(s.isDynamic){if(!s.address)throw new Error("Dynamic signature part must have address");if(!Ox(s.address,n,s.signature,r))throw new Error(`Invalid dynamic signature part ${s.address}`);return{address:s.address,weight:s.weight,signature:s.signature}}else return{address:ku(n,s.signature),weight:s.weight,signature:s.signature}}));return{version:1,payload:e,subdigest:n,config:{version:1,threshold:t.threshold,signers:i}}}function yf(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let i=H.from(0);const s=t.signers.map(a=>{if(!e.has(a.address))return a;const l=e.get(a.address),c=X(l.signature);return i=i.add(a.weight),l.isDynamic||c.length!==66?Sr({},a,{isDynamic:!0,signature:l.signature,address:a.address}):Sr({},a,{isDynamic:!1,signature:l.signature})});return{encoded:$x({version:1,threshold:t.threshold,signers:s}),weight:i}}const Dx={decode:t=>aS(t),encode:t=>$x(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>lS(t,e,r),encodeSigners:(t,e,r,n)=>yf(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=Dx.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{throw new Error("Signature chaining not supported on v1")},hashSetImageHash:function(t){throw new Error("Image hash not supported on v1")},signaturesOf(t){return t.signers.filter(e=>e.signature!==void 0).map(e=>({address:e.address,signature:e.signature}))},signaturesOfDecoded:function(t){return t.signers.map(e=>e.signature).filter(e=>e!==void 0)}};var vq=Object.freeze({__proto__:null,SignaturePartType:aa,isAddressMember:Nx,isUnrecoveredSignatureMember:sS,isUnrecoveredSignature:oS,decodeSignature:aS,encodeSignature:$x,recoverSignature:lS,encodeSigners:yf,SignatureCoder:Dx});const Lx={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>pe(Kr.encode(["bytes32","uint8","address"],[e,r.weight,r.address])),Se(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>H.from(0),signersOf:t=>t.signers.map(e=>({address:e.address,weight:H.from(e.weight).toNumber()})),fromSimple:t=>{if(!Dt.eq(t.checkpoint))throw new Error("v1 wallet config does not support checkpoint");if(t.subdigests&&t.subdigests.length>0)throw new Error("v1 wallet config does not support subdigests");return{version:1,threshold:t.threshold,signers:t.signers}},update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new ir([...mr.mainModule.abi,...mr.mainModuleUpgradable.abi]),s=[];return(!n||n==="first")&&s.push({to:t,data:i.encodeFunctionData(i.getFunction("updateImplementation"),[r.mainModuleUpgradable]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),s.push({to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[Lx.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),{entrypoint:t,transactions:s}},decodeTransaction:function(t){throw new Error("Function not implemented.")}},toJSON:function(t){const e=t.signers.map(r=>({weight:H.from(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:H.from(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:H.from(n.weight),address:n.address}));return{version:e.version,threshold:H.from(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&!Dt.eq(e.checkpoint))throw new Error("v1 wallet config does not support checkpoint");if(e.add)for(const i of e.add)n.find(s=>s.address===i.address)||n.push({weight:i.weight,address:i.address});if(e.remove)for(const i of e.remove){const s=n.findIndex(o=>o.address===i);s>=0&&n.splice(s,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,signers:n}},buildStubSignature:function(t,e){const r=new Map;for(const[i,s]of e.entries()){r.set(i,{signature:s,isDynamic:!0});const{encoded:o,weight:a}=yf(t,r,[]);if(a.gte(t.threshold))return o}const n=t.signers;for(const{address:i}of n.sort(({weight:s},{weight:o})=>H.from(s).sub(o).toNumber())){r.set(i,{signature:"0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02",isDynamic:!1});const{encoded:o,weight:a}=yf(t,r,[]);if(a.gte(t.threshold))return o}return yf(t,r,[]).encoded}};var yq=Object.freeze({__proto__:null,ConfigCoder:Lx});const cS=1,fS={version:cS,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var qi=Object.freeze({__proto__:null,config:yq,signature:vq,version:cS,DeployedWalletContext:fS});const Bx="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function uS(t){return pe(dS(t))}function dS(t){return Se(["bytes32","bytes32"],[Bx,t])}function hS(t){const e=X(t);if(e.length===64&&Q(e.slice(0,32))===Bx)return Q(e.slice(32,64))}function pq(t){return hS(t)!==void 0}var gq=Object.freeze({__proto__:null,SetImageHashPrefix:Bx,hashSetImageHash:uS,messageSetImageHash:dS,decodeMessageSetImageHash:hS,isMessageSetImageHash:pq});let pr=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),Gt=function(t){return t[t.Signature=0]="Signature",t[t.Address=1]="Address",t[t.DynamicSignature=2]="DynamicSignature",t[t.Node=3]="Node",t[t.Branch=4]="Branch",t[t.Subdigest=5]="Subdigest",t[t.Nested=6]="Nested",t}({});const eh=66;function Sa(t){return t.left!==void 0&&t.right!==void 0}function gc(t){return t.tree!==void 0}function Au(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function th(t){let e=X(t),r;const n=(i,s)=>i?i.right?{left:i,right:s}:{left:i.left,right:s}:{left:s};for(;e.length>0;){const i=e[0];switch(e=e.slice(1),i){case Gt.Signature:{const s=e[0],o=Q(e.slice(1,eh+1));r=n(r,{signature:o,weight:s,unrecovered:!0,isDynamic:!1}),e=e.slice(eh+1)}break;case Gt.Address:{const s=e[0],o=we(Q(e.slice(1,21)));r=n(r,{address:o,weight:s}),e=e.slice(21)}break;case Gt.DynamicSignature:{const s=e[0],o=we(Q(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],l=Q(e.slice(24,24+a));r=n(r,{address:o,signature:l,weight:s,unrecovered:!0,isDynamic:!0}),e=e.slice(24+a)}break;case Gt.Node:{const s=Q(e.slice(0,32));r=n(r,{nodeHash:s}),e=e.slice(32)}break;case Gt.Branch:{const s=e[0]<<16|e[1]<<8|e[2],o=th(e.slice(3,3+s));r=n(r,o),e=e.slice(3+s)}break;case Gt.Subdigest:{const s=Q(e.slice(0,32));r=n(r,{subdigest:s}),e=e.slice(32)}break;case Gt.Nested:{const s=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],l=th(e.slice(6,6+a));r=n(r,{weight:s,threshold:o,tree:l}),e=e.slice(6+a)}break;default:throw new Error(`Unknown signature part type: ${i}: ${Q(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class vS extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function la(t,e,r){if(Sa(t)){const[n,i]=await Promise.all([la(t.left,e,r),la(t.right,e,r)]);return{left:n,right:i}}if(gc(t))return{weight:t.weight,threshold:t.threshold,tree:await la(t.tree,e,r)};if(Au(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await Ox(t.address,e,t.signature,r))throw new vS(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:ku(e,t.signature),signature:t.signature,subdigest:e};return t}const Ir={concat:(t,e)=>Se(["bytes","bytes"],[t,e]),node:t=>Se(["uint8","bytes32"],[Gt.Node,t]),branch:t=>{const e=X(t);return Se(["uint8","uint24","bytes"],[Gt.Branch,e.length,e])},nested:(t,e,r)=>{const n=X(r);return Se(["uint8","uint8","uint16","uint24","bytes"],[Gt.Nested,t,e,n.length,n])},subdigest:t=>Se(["uint8","bytes32"],[Gt.Subdigest,t]),signature:(t,e)=>Se(["uint8","uint8","bytes"],[Gt.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=X(r);return Se(["uint8","uint8","address","uint24","bytes"],[Gt.DynamicSignature,t,e,n.length,n])},address:(t,e)=>Se(["uint8","uint8","address"],[Gt.Address,t,e])};function pf(t,e,r,n,i={}){const s=gf(t.tree,e,r,i);return H.from(n).isZero()?{encoded:Se(["uint8","uint16","uint32","bytes"],[pr.NoChainIdDynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:H.from(t.threshold).gt(255)?{encoded:Se(["uint8","uint16","uint32","bytes"],[pr.Dynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:{encoded:Se(["uint8","uint8","uint32","bytes"],[pr.Legacy,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}}function gf(t,e,r,n={}){const i=!n.disableTrim;if(ai(t)){const s=gf(t.left,e,r),o=gf(t.right,e,r),a=Gr(t.left),l=Gr(t.right);return i&&s.weight.eq(0)&&o.weight.eq(0)&&!a&&!l?{encoded:Ir.node(Tn(t)),weight:Dt}:i&&o.weight.eq(0)&&!l?{encoded:Ir.concat(s.encoded,Ir.node(Tn(t.right))),weight:s.weight}:i&&s.weight.eq(0)&&!a?{encoded:Ir.concat(Ir.node(Tn(t.left)),Ir.branch(o.encoded)),weight:o.weight}:{encoded:Ir.concat(s.encoded,Ir.branch(o.encoded)),weight:s.weight.add(o.weight)}}if(ps(t)){const s=gf(t.tree,e,r);return i&&s.weight.eq(0)?{encoded:Ir.node(Tn(t)),weight:Dt}:{encoded:Ir.nested(t.weight,t.threshold,s.encoded),weight:s.weight}}if(gs(t))return{encoded:Ir.node(Tn(t)),weight:Dt};if(ys(t)){const s=r.includes(t.subdigest);return{encoded:Ir.subdigest(t.subdigest),weight:s?QE:Dt}}if(Gr(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:Ir.dynamicSignature(t.weight,t.address,a),weight:H.from(t.weight)}:{encoded:Ir.signature(t.weight,a),weight:H.from(t.weight)}}else return{encoded:Ir.address(t.weight,t.address),weight:Dt};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function jx(t){return Ux(t)?jx(t.suffix[t.suffix.length-1]):t.config}function Fx(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function _u(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(Fx)}function yS(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function Ux(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(yS)}function o1(t){const e=X(t),r=e[0];switch(r){case pr.Legacy:return{version:2,type:pr.Legacy,decoded:zd(e)};case pr.Dynamic:return{version:2,type:pr.Dynamic,decoded:zd(e.slice(1))};case pr.NoChainIdDynamic:return{version:2,type:pr.NoChainIdDynamic,decoded:zd(e.slice(1))};case pr.Chained:return pS(e);default:throw new Error(`Invalid signature type: ${r}`)}}function zd(t){const e=X(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],i=th(e.slice(6));return{threshold:r,checkpoint:n,tree:i}}function pS(t){const e=X(t),r=e[0];if(r!==pr.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let i=1;for(;iX(to(s))),i=Se(n.map(()=>["uint24","bytes"]).flat(),n.map(s=>[s.length,s]).flat());return Se(["uint8","bytes"],[pr.Chained,i])}function to(t){if(os(t))return Q(t);if(_u(t)||Ux(t))return a1(to(t),(t.suffix||[]).map(to));const e=Fx(t)?t.decoded:t.config;switch(t.type){case pr.Legacy:if(H.from(e.threshold).gt(255))throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return Fp(e);case pr.NoChainIdDynamic:case pr.Dynamic:return Se(["uint8","bytes"],[t.type,Fp(e)]);case pr.Chained:throw new Error("Unreachable code: Chained signature should be handled above");default:throw new Error(`Invalid signature type: ${t.type}`)}}function Fp(t){return Se(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,mf(t.tree)])}function mf(t){if(ai(t)||Sa(t)){const e=X(mf(t.right)),r=X(mf(t.left));return ai(t.right)||Sa(t.right)?Se(["bytes","uint8","uint24","bytes"],[r,Gt.Branch,e.length,e]):Se(["bytes","bytes"],[r,e])}if(ps(t)||gc(t)){const e=X(mf(t.tree));return Se(["uint8","uint8","uint16","uint24","bytes"],[Gt.Nested,t.weight,t.threshold,e.length,e])}if(Au(t)||Gr(t)&&t.signature!==void 0){const e=X(t.signature);if(t.isDynamic||e.length!==eh){if(!t.address)throw new Error("Dynamic signature leaf must have address");return Se(["uint8","uint8","address","uint24","bytes"],[Gt.DynamicSignature,t.weight,t.address,e.length,e])}else return Se(["uint8","uint8","bytes"],[Gt.Signature,t.weight,e])}if(Gr(t))return Se(["uint8","uint8","address"],[Gt.Address,t.weight,t.address]);if(gs(t))return Se(["uint8","bytes32"],[Gt.Node,t.nodeHash]);if(ys(t))return Se(["uint8","bytes32"],[Gt.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function xf(t){return ai(t)?[...xf(t.left),...xf(t.right)]:ps(t)?xf(t.tree):Gr(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function bf(t){return Sa(t)?[...bf(t.left),...bf(t.right)]:gc(t)?bf(t.tree):Au(t)?[t.signature]:[]}function Vd(t){return Sa(t)?[...Vd(t.left),...Vd(t.right)]:gc(t)?Vd(t.tree):ys(t)?[t.subdigest]:[]}async function rh(t){const e=typeof t=="string"?o1(t):t;if(_u(e)){const n=await Promise.all([rh(Sr({},e,{suffix:void 0})),...e.suffix.map(i=>rh(i))]);return a1(n[0],n.slice(1))}const{trimmed:r}=await wf(e.decoded.tree);return to(Sr({},e,{decoded:Sr({},e.decoded,{tree:r})}))}async function wf(t,e=!0){if(Sa(t)){const[r,n]=await Promise.all([wf(t.left),wf(t.right)]);if(r.weight===0&&n.weight===0)try{const i=await la(t,j0,void 0);return{weight:0,trimmed:{nodeHash:Tn(i)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(gc(t)){const r=await wf(t.tree);if(r.weight===0)try{const n=await la(t,j0,void 0);return{weight:0,trimmed:{nodeHash:Tn(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return gs(t)&&bS(t.nodeHash)?{weight:0,trimmed:Sr({},xS(t.nodeHash))}:Au(t)||Gr(t)&&t.signature!==void 0?{weight:H.from(t.weight).toNumber(),trimmed:t}:!e&&ys(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const l1={decode:t=>o1(t),encode:t=>to(t),trim:t=>rh(t),supportsNoChainId:!0,recover:(t,e,r)=>zx(t,e,r),encodeSigners:(t,e,r,n)=>pf(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=l1.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=os(t)?t:to(t),i=r.map(s=>os(s)?s:to(s));return a1(n,i)},hashSetImageHash:function(t){return uS(t)},signaturesOf(t){return xf(t.tree)},signaturesOfDecoded:function(t){return bf(t.decoded.tree)}};var mq=Object.freeze({__proto__:null,SignatureType:pr,SignaturePartType:Gt,SignaturePartTypeLength:eh,isUnrecoveredNode:Sa,isUnrecoveredNestedLeaf:gc,isUnrecoveredSignatureLeaf:Au,decodeSignatureTree:th,InvalidSignatureLeafError:vS,recoverTopology:la,partEncoder:Ir,encodeSigners:pf,encodeTree:gf,deepestConfigOfSignature:jx,isUnrecoveredSignature:Fx,isUnrecoveredChainedSignature:_u,isSignature:yS,isChainedSignature:Ux,decodeSignature:o1,decodeSignatureBody:zd,decodeChainedSignature:pS,setImageHashStruct:gS,recoverSignature:zx,encodeChain:a1,encodeSignature:to,encodeSignatureBody:Fp,encodeSignatureTree:mf,signaturesOf:xf,signaturesOfDecoded:bf,subdigestsOfDecoded:Vd,trimSignature:rh,trimUnrecoveredTree:wf,SignatureCoder:l1});function Gr(t){return t.address!==void 0&&t.weight!==void 0}function ys(t){return t.subdigest!==void 0&&t.address===void 0}function Cf(t){return ai(t)?JSON.stringify({left:Cf(t.left),right:Cf(t.right)}):ps(t)?JSON.stringify({weight:H.from(t.weight).toString(),threshold:H.from(t.threshold).toString(),tree:Cf(t.tree)}):Gr(t)?JSON.stringify({address:t.address,weight:H.from(t.weight).toString()}):JSON.stringify(t)}function Ef(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:Ef(e.left),right:Ef(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:H.from(e.weight),threshold:H.from(e.threshold),tree:Ef(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:H.from(e.weight)}:e}function ps(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function gs(t){return t.nodeHash!==void 0}function Vx(t){return Gr(t)||ys(t)||ps(t)||gs(t)}function ai(t){return t.left!==void 0&&t.right!==void 0}function xq(t){return ai(t)||Vx(t)}function mS(t){return Se(["uint96","address"],[t.weight,t.address])}function xS(t){const e=X(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=H.from(e.slice(0,12)),n=we(Q(e.slice(12)));return{weight:r,address:n}}function bS(t){const e=X(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function Tn(t){if(Gr(t))return mS(t);if(ys(t))return Zs(["string","bytes32"],[`Sequence static digest: +`)}static register(e,r){r||(r=e.locale)}}const wV="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let hf=null;function I6(t){if(hf==null&&(hf=wV.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),bu.check(t)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw hf=null,new Error("BIP39 Wordlist for en (English) FAILED")}class CV extends bu{constructor(){super("en")}getWord(e){return I6(this),hf[e]}getWordIndex(e){return I6(this),hf.indexOf(e)}}const G7=new CV;bu.register(G7);const R6={en:G7},EV="hdnode/5.7.0",ru=new H(EV),SV=V.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),kV=Ue("Bitcoin seed"),Ka=2147483648;function K7(t){return(1<=256)throw new Error("Depth too large!");return M6(Ke([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",Q(this.depth),this.parentFingerprint,Je(Q(this.index),4),this.chainCode,this.privateKey!=null?Ke(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new dn(Fa,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~Ka));const n=new Uint8Array(37);if(e&Ka){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(X(this.privateKey),1),r&&(r+="'")}else n.set(X(this.publicKey));for(let u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const i=X(tu(Jl.sha512,this.chainCode,n)),s=i.slice(0,32),o=i.slice(32);let a=null,l=null;this.privateKey?a=fd(V.from(s).add(this.privateKey).mod(SV)):l=new sa(Q(s))._addPoint(this.publicKey);let c=r;const f=this.mnemonic;return f&&(c=Object.freeze({phrase:f.phrase,path:r,locale:f.locale||"en"})),new dn(Fa,a,l,this.fingerprint,fd(o),e,this.depth+1,c)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let i=0;i=Ka)throw new Error("invalid path index - "+s);n=n._derive(Ka+o)}else if(s.match(/^[0-9]+$/)){const o=parseInt(s);if(o>=Ka)throw new Error("invalid path index - "+s);n=n._derive(o)}else throw new Error("invalid path component - "+s)}return n}static _fromSeed(e,r){const n=X(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=X(tu(Jl.sha512,kV,n));return new dn(Fa,fd(i.slice(0,32)),null,"0x00000000",fd(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=px(n),e=n1(r1(e,n),n),dn._fromSeed(J7(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return dn._fromSeed(e,null)}static fromExtendedKey(e){const r=Kl.decode(e);(r.length!==82||M6(r.slice(0,78))!==e)&&ru.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=Q(r.slice(5,9)),s=parseInt(Q(r.slice(9,13)).substring(2),16),o=Q(r.slice(13,45)),a=r.slice(45,78);switch(Q(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new dn(Fa,null,Q(a),i,o,s,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new dn(Fa,Q(a.slice(1)),null,i,o,s,n,null)}return ru.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function J7(t,e){e||(e="");const r=Ue("mnemonic"+e,Mi.NFKD);return yx(Ue(t,Mi.NFKD),r,2048,64,"sha512")}function r1(t,e){e=px(e),ru.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=X(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let c=0;c>3]|=1<<7-i%8),i++}const s=32*r.length/3,o=r.length/3,a=K7(o);if((X(cs(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return Q(n.slice(0,s/8))}function n1(t,e){if(e=px(e),t=X(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let o=0;o8?(r[r.length-1]<<=8,r[r.length-1]|=t[o],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[o]>>8-n,r.push(t[o]&AV(8-n)),n+=3);const i=t.length/4,s=X(cs(t))[0]&K7(i);return r[r.length-1]<<=i,r[r.length-1]|=s>>8-i,e.join(r.map(o=>e.getWord(o)))}function _V(t,e){try{return r1(t,e),!0}catch{}return!1}function TV(t){return(typeof t!="number"||t<0||t>=Ka||t%1)&&ru.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const PV="random/5.7.0",Tp=new H(PV);function IV(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const O6=IV();let Ld=O6.crypto||O6.msCrypto;(!Ld||!Ld.getRandomValues)&&(Tp.warn("WARNING: Missing strong random number source"),Ld={getRandomValues:function(t){return Tp.throwError("no secure random source avaialble",H.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function xi(t){(t<=0||t>1024||t%1||t!=t)&&Tp.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return Ld.getRandomValues(e),X(e)}function RV(t){t=t.slice();for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}var Y7={exports:{}};(function(t,e){(function(r){function n(b){return parseInt(b)===b}function i(b){if(!n(b.length))return!1;for(var d=0;d255)return!1;return!0}function s(b,d){if(b.buffer&&ArrayBuffer.isView(b)&&b.name==="Uint8Array")return d&&(b.slice?b=b.slice():b=Array.prototype.slice.call(b)),b;if(Array.isArray(b)){if(!i(b))throw new Error("Array contains invalid value: "+b);return new Uint8Array(b)}if(n(b.length)&&i(b))return new Uint8Array(b);throw new Error("unsupported array-like object")}function o(b){return new Uint8Array(b)}function a(b,d,_,$,m){($!=null||m!=null)&&(b.slice?b=b.slice($,m):b=Array.prototype.slice.call(b,$,m)),d.set(b,_)}var l=function(){function b(_){var $=[],m=0;for(_=encodeURI(_);m<_.length;){var N=_.charCodeAt(m++);N===37?($.push(parseInt(_.substr(m,2),16)),m+=2):$.push(N)}return s($)}function d(_){for(var $=[],m=0;m<_.length;){var N=_[m];N<128?($.push(String.fromCharCode(N)),m++):N>191&&N<224?($.push(String.fromCharCode((N&31)<<6|_[m+1]&63)),m+=2):($.push(String.fromCharCode((N&15)<<12|(_[m+1]&63)<<6|_[m+2]&63)),m+=3)}return $.join("")}return{toBytes:b,fromBytes:d}}(),c=function(){function b($){for(var m=[],N=0;N<$.length;N+=2)m.push(parseInt($.substr(N,2),16));return m}var d="0123456789abcdef";function _($){for(var m=[],N=0;N<$.length;N++){var B=$[N];m.push(d[(B&240)>>4]+d[B&15])}return m.join("")}return{toBytes:b,fromBytes:_}}(),f={16:10,24:12,32:14},u=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],h=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],y=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],g=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],k=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],w=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],E=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],A=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],I=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],M=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],j=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],z=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],F=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],q=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function G(b){for(var d=[],_=0;_>2,this._Ke[N][d%4]=m[d],this._Kd[b-N][d%4]=m[d];for(var B=0,U=$,W;U<_;){if(W=m[$-1],m[0]^=h[W>>16&255]<<24^h[W>>8&255]<<16^h[W&255]<<8^h[W>>24&255]^u[B]<<24,B+=1,$!=8)for(var d=1;d<$;d++)m[d]^=m[d-1];else{for(var d=1;d<$/2;d++)m[d]^=m[d-1];W=m[$/2-1],m[$/2]^=h[W&255]^h[W>>8&255]<<8^h[W>>16&255]<<16^h[W>>24&255]<<24;for(var d=$/2+1;d<$;d++)m[d]^=m[d-1]}for(var d=0,ee,K;d<$&&U<_;)ee=U>>2,K=U%4,this._Ke[ee][K]=m[d],this._Kd[b-ee][K]=m[d++],U++}for(var ee=1;ee>24&255]^z[W>>16&255]^F[W>>8&255]^q[W&255]},Z.prototype.encrypt=function(b){if(b.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var d=this._Ke.length-1,_=[0,0,0,0],$=G(b),m=0;m<4;m++)$[m]^=this._Ke[0][m];for(var N=1;N>24&255]^p[$[(m+1)%4]>>16&255]^k[$[(m+2)%4]>>8&255]^w[$[(m+3)%4]&255]^this._Ke[N][m];$=_.slice()}for(var B=o(16),U,m=0;m<4;m++)U=this._Ke[d][m],B[4*m]=(h[$[m]>>24&255]^U>>24)&255,B[4*m+1]=(h[$[(m+1)%4]>>16&255]^U>>16)&255,B[4*m+2]=(h[$[(m+2)%4]>>8&255]^U>>8)&255,B[4*m+3]=(h[$[(m+3)%4]&255]^U)&255;return B},Z.prototype.decrypt=function(b){if(b.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var d=this._Kd.length-1,_=[0,0,0,0],$=G(b),m=0;m<4;m++)$[m]^=this._Kd[0][m];for(var N=1;N>24&255]^A[$[(m+3)%4]>>16&255]^I[$[(m+2)%4]>>8&255]^M[$[(m+1)%4]&255]^this._Kd[N][m];$=_.slice()}for(var B=o(16),U,m=0;m<4;m++)U=this._Kd[d][m],B[4*m]=(y[$[m]>>24&255]^U>>24)&255,B[4*m+1]=(y[$[(m+3)%4]>>16&255]^U>>16)&255,B[4*m+2]=(y[$[(m+2)%4]>>8&255]^U>>8)&255,B[4*m+3]=(y[$[(m+1)%4]&255]^U)&255;return B};var oe=function(b){if(!(this instanceof oe))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Z(b)};oe.prototype.encrypt=function(b){if(b=s(b),b.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var d=o(b.length),_=o(16),$=0;$=0;--d)this._counter[d]=b%256,b=b>>8},P.prototype.setBytes=function(b){if(b=s(b,!0),b.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=b},P.prototype.increment=function(){for(var b=15;b>=0;b--)if(this._counter[b]===255)this._counter[b]=0;else{this._counter[b]++;break}};var O=function(b,d){if(!(this instanceof O))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",d instanceof P||(d=new P(d)),this._counter=d,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Z(b)};O.prototype.encrypt=function(b){for(var d=s(b,!0),_=0;_16)throw new Error("PKCS#7 padding byte out of range");for(var _=b.length-d,$=0;$=64;){let R=w,b=E,d=A,_=I,$=M,m=j,N=z,B=F,U,W,ee,K,L;for(W=0;W<16;W++)ee=x+W*4,q[W]=(O[ee]&255)<<24|(O[ee+1]&255)<<16|(O[ee+2]&255)<<8|O[ee+3]&255;for(W=16;W<64;W++)U=q[W-2],K=(U>>>17|U<<15)^(U>>>19|U<<13)^U>>>10,U=q[W-15],L=(U>>>7|U<<25)^(U>>>18|U<<14)^U>>>3,q[W]=(K+q[W-7]|0)+(L+q[W-16]|0)|0;for(W=0;W<64;W++)K=((($>>>6|$<<26)^($>>>11|$<<21)^($>>>25|$<<7))+($&m^~$&N)|0)+(B+(k[W]+q[W]|0)|0)|0,L=((R>>>2|R<<30)^(R>>>13|R<<19)^(R>>>22|R<<10))+(R&b^R&d^b&d)|0,B=N,N=m,m=$,$=_+K|0,_=d,d=b,b=R,R=K+L|0;w=w+R|0,E=E+b|0,A=A+d|0,I=I+_|0,M=M+$|0,j=j+m|0,z=z+N|0,F=F+B|0,x+=64,T-=64}}G(p);let Z,oe=p.length%64,D=p.length/536870912|0,v=p.length<<3,C=oe<56?56:120,P=p.slice(p.length-oe,p.length);for(P.push(128),Z=oe+1;Z>>24&255),P.push(D>>>16&255),P.push(D>>>8&255),P.push(D>>>0&255),P.push(v>>>24&255),P.push(v>>>16&255),P.push(v>>>8&255),P.push(v>>>0&255),G(P),[w>>>24&255,w>>>16&255,w>>>8&255,w>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255,A>>>24&255,A>>>16&255,A>>>8&255,A>>>0&255,I>>>24&255,I>>>16&255,I>>>8&255,I>>>0&255,M>>>24&255,M>>>16&255,M>>>8&255,M>>>0&255,j>>>24&255,j>>>16&255,j>>>8&255,j>>>0&255,z>>>24&255,z>>>16&255,z>>>8&255,z>>>0&255,F>>>24&255,F>>>16&255,F>>>8&255,F>>>0&255]}function s(p,k,w){p=p.length<=64?p:i(p);const E=64+k.length+4,A=new Array(E),I=new Array(64);let M,j=[];for(M=0;M<64;M++)A[M]=54;for(M=0;M=E-4;F--){if(A[F]++,A[F]<=255)return;A[F]=0}}for(;w>=32;)z(),j=j.concat(i(I.concat(i(A)))),w-=32;return w>0&&(z(),j=j.concat(i(I.concat(i(A))).slice(0,w))),j}function o(p,k,w,E,A){let I;for(f(p,(2*w-1)*16,A,0,16),I=0;I<2*w;I++)c(p,I*16,A,16),l(A,E),f(A,0,p,k+I*16,16);for(I=0;I>>32-k}function l(p,k){f(p,0,k,0,16);for(let w=8;w>0;w-=2)k[4]^=a(k[0]+k[12],7),k[8]^=a(k[4]+k[0],9),k[12]^=a(k[8]+k[4],13),k[0]^=a(k[12]+k[8],18),k[9]^=a(k[5]+k[1],7),k[13]^=a(k[9]+k[5],9),k[1]^=a(k[13]+k[9],13),k[5]^=a(k[1]+k[13],18),k[14]^=a(k[10]+k[6],7),k[2]^=a(k[14]+k[10],9),k[6]^=a(k[2]+k[14],13),k[10]^=a(k[6]+k[2],18),k[3]^=a(k[15]+k[11],7),k[7]^=a(k[3]+k[15],9),k[11]^=a(k[7]+k[3],13),k[15]^=a(k[11]+k[7],18),k[1]^=a(k[0]+k[3],7),k[2]^=a(k[1]+k[0],9),k[3]^=a(k[2]+k[1],13),k[0]^=a(k[3]+k[2],18),k[6]^=a(k[5]+k[4],7),k[7]^=a(k[6]+k[5],9),k[4]^=a(k[7]+k[6],13),k[5]^=a(k[4]+k[7],18),k[11]^=a(k[10]+k[9],7),k[8]^=a(k[11]+k[10],9),k[9]^=a(k[8]+k[11],13),k[10]^=a(k[9]+k[8],18),k[12]^=a(k[15]+k[14],7),k[13]^=a(k[12]+k[15],9),k[14]^=a(k[13]+k[12],13),k[15]^=a(k[14]+k[13],18);for(let w=0;w<16;++w)p[w]+=k[w]}function c(p,k,w,E){for(let A=0;A=256)return!1}return!0}function h(p,k){if(typeof p!="number"||p%1)throw new Error("invalid "+k);return p}function y(p,k,w,E,A,I,M){if(w=h(w,"N"),E=h(E,"r"),A=h(A,"p"),I=h(I,"dkLen"),w===0||w&w-1)throw new Error("N must be power of 2");if(w>2147483647/128/E)throw new Error("N too large");if(E>2147483647/128/A)throw new Error("r too large");if(!u(p))throw new Error("password must be an array or buffer");if(p=Array.prototype.slice.call(p),!u(k))throw new Error("salt must be an array or buffer");k=Array.prototype.slice.call(k);let j=s(p,k,A*128*E);const z=new Uint32Array(A*32*E);for(let $=0;$b&&($=b);for(let N=0;N<$;N++)f(F,0,q,(T+N)*G,G),o(F,G,E,Z,oe);if(T+=$,v+=$,M){const N=parseInt(1e3*v/D);if(N!==C){if(P=M(null,v/D),P)break;C=N}}if(Tb&&($=b);for(let N=0;N<$;N++){const B=(2*E-1)*16,U=F[B]&w-1;c(q,U*G,F,G),o(F,G,E,Z,oe)}if(T+=$,v+=$,M){const N=parseInt(1e3*v/D);if(N!==C){if(P=M(null,v/D),P)break;C=N}}if(T>0&255),j.push(z[N]>>8&255),j.push(z[N]>>16&255),j.push(z[N]>>24&255);const m=s(p,j,I);return M&&M(null,1,m),m}M&&d(_)};if(!M)for(;;){const $=_();if($!=null)return $}_()}const g={scrypt:function(p,k,w,E,A,I,M){return new Promise(function(j,z){let F=0;M&&M(0),y(p,k,w,E,A,I,function(q,G,Z){if(q)z(q);else if(Z)M&&F!==1&&M(1),j(new Uint8Array(Z));else if(M&&G!==F)return F=G,M(G)})})},syncScrypt:function(p,k,w,E,A,I){return new Uint8Array(y(p,k,w,E,A,I))}};t.exports=g})()})(Z7);var BV=Z7.exports;const bx=yo(BV);var LV=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Pp=new H(Q7);function N6(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class jV extends Ra{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function FV(t,e,r){if(Xt(t,"crypto/cipher")==="aes-128-ctr"){const i=oa(Xt(t,"crypto/cipherparams/iv")),s=new bi.Counter(i),o=new bi.ModeOfOperation.ctr(e,s);return X(o.decrypt(r))}return null}function e9(t,e){const r=oa(Xt(t,"crypto/ciphertext"));if(Q(xe(Ke([e.slice(16,32),r]))).substring(2)!==Xt(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=FV(t,e.slice(0,16),r);i||Pp.throwError("unsupported cipher",H.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const s=e.slice(32,64),o=Xs(i);if(t.address){let l=t.address.toLowerCase();if(l.substring(0,2)!=="0x"&&(l="0x"+l),Se(l)!==o)throw new Error("address mismatch")}const a={_isKeystoreAccount:!0,address:o,privateKey:Q(i)};if(Xt(t,"x-ethers/version")==="0.1"){const l=oa(Xt(t,"x-ethers/mnemonicCiphertext")),c=oa(Xt(t,"x-ethers/mnemonicCounter")),f=new bi.Counter(c),u=new bi.ModeOfOperation.ctr(s,f),h=Xt(t,"x-ethers/path")||Yl,y=Xt(t,"x-ethers/locale")||"en",g=X(u.decrypt(l));try{const p=n1(g,y),k=dn.fromMnemonic(p,null,y).derivePath(h);if(k.privateKey!=a.privateKey)throw new Error("mnemonic mismatch");a.mnemonic=k.mnemonic}catch(p){if(p.code!==H.errors.INVALID_ARGUMENT||p.argument!=="wordlist")throw p}}return new jV(a)}function t9(t,e,r,n,i){return X(yx(t,e,r,n,i))}function UV(t,e,r,n,i){return Promise.resolve(t9(t,e,r,n,i))}function r9(t,e,r,n,i){const s=gx(e),o=Xt(t,"crypto/kdf");if(o&&typeof o=="string"){const a=function(l,c){return Pp.throwArgumentError("invalid key-derivation function parameters",l,c)};if(o.toLowerCase()==="scrypt"){const l=oa(Xt(t,"crypto/kdfparams/salt")),c=parseInt(Xt(t,"crypto/kdfparams/n")),f=parseInt(Xt(t,"crypto/kdfparams/r")),u=parseInt(Xt(t,"crypto/kdfparams/p"));(!c||!f||!u)&&a("kdf",o),c&c-1&&a("N",c);const h=parseInt(Xt(t,"crypto/kdfparams/dklen"));return h!==32&&a("dklen",h),n(s,l,c,f,u,64,i)}else if(o.toLowerCase()==="pbkdf2"){const l=oa(Xt(t,"crypto/kdfparams/salt"));let c=null;const f=Xt(t,"crypto/kdfparams/prf");f==="hmac-sha256"?c="sha256":f==="hmac-sha512"?c="sha512":a("prf",f);const u=parseInt(Xt(t,"crypto/kdfparams/c")),h=parseInt(Xt(t,"crypto/kdfparams/dklen"));return h!==32&&a("dklen",h),r(s,l,u,h,c)}}return Pp.throwArgumentError("unsupported key-derivation function","kdf",o)}function zV(t,e){const r=JSON.parse(t),n=r9(r,e,t9,bx.syncScrypt);return e9(r,n)}function VV(t,e,r){return LV(this,void 0,void 0,function*(){const n=JSON.parse(t),i=yield r9(n,e,UV,bx.scrypt,r);return e9(n,i)})}function HV(t,e,r,n){try{if(Se(t.address)!==Xs(t.privateKey))throw new Error("address/privateKey mismatch");if(N6(t)){const k=t.mnemonic;if(dn.fromMnemonic(k.phrase,null,k.locale).derivePath(k.path||Yl).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(k){return Promise.reject(k)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});const i=X(t.privateKey),s=gx(e);let o=null,a=null,l=null;if(N6(t)){const k=t.mnemonic;o=X(r1(k.phrase,k.locale||"en")),a=k.path||Yl,l=k.locale||"en"}let c=r.client;c||(c="ethers.js");let f=null;r.salt?f=X(r.salt):f=xi(32);let u=null;if(r.iv){if(u=X(r.iv),u.length!==16)throw new Error("invalid iv")}else u=xi(16);let h=null;if(r.uuid){if(h=X(r.uuid),h.length!==16)throw new Error("invalid uuid")}else h=xi(16);let y=1<<17,g=8,p=1;return r.scrypt&&(r.scrypt.N&&(y=r.scrypt.N),r.scrypt.r&&(g=r.scrypt.r),r.scrypt.p&&(p=r.scrypt.p)),bx.scrypt(s,f,y,g,p,64,n).then(k=>{k=X(k);const w=k.slice(0,16),E=k.slice(16,32),A=k.slice(32,64),I=new bi.Counter(u),M=new bi.ModeOfOperation.ctr(w,I),j=X(M.encrypt(i)),z=xe(Ke([E,j])),F={address:t.address.substring(2).toLowerCase(),id:OV(h),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:Q(u).substring(2)},ciphertext:Q(j).substring(2),kdf:"scrypt",kdfparams:{salt:Q(f).substring(2),n:y,dklen:32,p,r:g},mac:z.substring(2)}};if(o){const q=xi(16),G=new bi.Counter(q),Z=new bi.ModeOfOperation.ctr(A,G),oe=X(Z.encrypt(o)),D=new Date,v=D.getUTCFullYear()+"-"+Oc(D.getUTCMonth()+1,2)+"-"+Oc(D.getUTCDate(),2)+"T"+Oc(D.getUTCHours(),2)+"-"+Oc(D.getUTCMinutes(),2)+"-"+Oc(D.getUTCSeconds(),2)+".0Z";F["x-ethers"]={client:c,gethFilename:"UTC--"+v+"--"+F.address,mnemonicCounter:Q(q).substring(2),mnemonicCiphertext:Q(oe).substring(2),path:a,locale:l,version:"0.1"}}return JSON.stringify(F)})}function WV(t,e,r){if(mx(t)){r&&r(0);const n=X7(t,e);return r&&r(1),Promise.resolve(n)}return xx(t)?VV(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function qV(t,e){if(mx(t))return X7(t,e);if(xx(t))return zV(t,e);throw new Error("invalid JSON wallet")}const GV="wallet/5.7.0";var $6=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Ua=new H(GV);function KV(t){return t!=null&&Ie(t.privateKey,32)&&t.address!=null}function JV(t){const e=t.mnemonic;return e&&e.phrase}let YV=class Ja extends fo{constructor(e,r){if(super(),KV(e)){const n=new sa(e.privateKey);if(re(this,"_signingKey",()=>n),re(this,"address",Xs(this.publicKey)),this.address!==Se(e.address)&&Ua.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),JV(e)){const i=e.mnemonic;re(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||Yl,locale:i.locale||"en"}));const s=this.mnemonic,o=dn.fromMnemonic(s.phrase,null,s.locale).derivePath(s.path);Xs(o.privateKey)!==this.address&&Ua.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else re(this,"_mnemonic",()=>null)}else{if(sa.isSigningKey(e))e.curve!=="secp256k1"&&Ua.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),re(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new sa(e);re(this,"_signingKey",()=>n)}re(this,"_mnemonic",()=>null),re(this,"address",Xs(this.publicKey))}r&&!Co.isProvider(r)&&Ua.throwArgumentError("invalid provider","provider",r),re(this,"provider",r||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new Ja(this,e)}signTransaction(e){return Ye(e).then(r=>{r.from!=null&&(Se(r.from)!==this.address&&Ua.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(xe(_p(r)));return _p(r,n)})}signMessage(e){return $6(this,void 0,void 0,function*(){return mp(this._signingKey().signDigest(Qh(e)))})}_signTypedData(e,r,n){return $6(this,void 0,void 0,function*(){const i=yield er.resolveNames(e,r,n,s=>(this.provider==null&&Ua.throwError("cannot resolve ENS names without a provider",H.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:s}),this.provider.resolveName(s)));return mp(this._signingKey().signDigest(er.hash(i.domain,r,i.value)))})}encrypt(e,r,n){if(typeof r=="function"&&!n&&(n=r,r={}),n&&typeof n!="function")throw new Error("invalid callback");return r||(r={}),HV(this,e,r,n)}static createRandom(e){let r=xi(16);e||(e={}),e.extraEntropy&&(r=X(qt(xe(Ke([r,e.extraEntropy])),0,16)));const n=n1(r,e.locale);return Ja.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return WV(e,r,n).then(i=>new Ja(i))}static fromEncryptedJsonSync(e,r){return new Ja(qV(e,r))}static fromMnemonic(e,r,n){return r||(r=Yl),new Ja(dn.fromMnemonic(e,null,n).derivePath(r))}};function n9(t,e){return wa(Qh(t),e)}function QV(t,e,r,n){return wa(er.hash(t,e,r),n)}const XV="networks/5.7.1",D6=new H(XV);function ZV(t){return t&&typeof t.renetwork=="function"}function Hi(t){const e=function(r,n){n==null&&(n={});const i=[];if(r.InfuraProvider&&n.infura!=="-")try{i.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{i.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{i.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const s=["goerli","ropsten","rinkeby","sepolia"];try{const o=new r.PocketProvider(t,n.pocket);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const s=["ropsten"],o=new r.AnkrProvider(t,n.ankr);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}if(i.length===0)return null;if(r.FallbackProvider){let s=1;return n.quorum!=null?s=n.quorum:t==="homestead"&&(s=2),new r.FallbackProvider(i,s)}return i[0]};return e.renetwork=function(r){return Hi(r)},e}function q0(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return q0(t,n)},r}const B6={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Hi("homestead")},L6={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Hi("ropsten")},j6={chainId:63,name:"classicMordor",_defaultProvider:q0("https://www.ethercluster.com/mordor","classicMordor")},ud={unspecified:{chainId:0,name:"unspecified"},homestead:B6,mainnet:B6,morden:{chainId:2,name:"morden"},ropsten:L6,testnet:L6,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Hi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Hi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Hi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Hi("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:q0("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:j6,classicTestnet:j6,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:q0("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Hi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Hi("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function eH(t){if(t==null)return null;if(typeof t=="number"){for(const n in ud){const i=ud[n];if(i.chainId===t)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=ud[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=ud[t.name];if(!e)return typeof t.chainId!="number"&&D6.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&D6.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(ZV(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}const tH="web/5.7.1";var rH=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};function nH(t,e){return rH(this,void 0,void 0,function*(){e==null&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),e.fetchOptions!=null){const o=e.fetchOptions;o.mode&&(r.mode=o.mode),o.cache&&(r.cache=o.cache),o.credentials&&(r.credentials=o.credentials),o.redirect&&(r.redirect=o.redirect),o.referrer&&(r.referrer=o.referrer)}const n=yield fetch(t,r),i=yield n.arrayBuffer(),s={};return n.headers.forEach?n.headers.forEach((o,a)=>{s[a.toLowerCase()]=o}):n.headers.keys().forEach(o=>{s[o.toLowerCase()]=n.headers.get(o)}),{headers:s,statusCode:n.status,statusMessage:n.statusText,body:X(new Uint8Array(i))}})}var iH=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Wn=new H(tH);function F6(t){return new Promise(e=>{setTimeout(e,t)})}function ks(t,e){if(t==null)return null;if(typeof t=="string")return t;if(os(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return vs(t)}catch{}return Q(t)}return t}function sH(t){return Ue(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function i9(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;Wn.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const i=typeof t=="object"?t.throttleCallback:null,s=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;Wn.assertArgument(s>0&&s%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",s);const o=typeof t=="object"?!!t.errorPassThrough:!1,a={};let l=null;const c={method:"GET"};let f=!1,u=2*60*1e3;if(typeof t=="string")l=t;else if(typeof t=="object"){if((t==null||t.url==null)&&Wn.throwArgumentError("missing URL","connection.url",t),l=t.url,typeof t.timeout=="number"&&t.timeout>0&&(u=t.timeout),t.headers)for(const w in t.headers)a[w.toLowerCase()]={key:w,value:String(t.headers[w])},["if-none-match","if-modified-since"].indexOf(w.toLowerCase())>=0&&(f=!0);if(c.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){l.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&Wn.throwError("basic authentication requires a secure https url",H.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:t.user,password:"[REDACTED]"});const w=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+ax(Ue(w))}}t.skipFetchSetup!=null&&(c.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(c.fetchOptions=nr(t.fetchOptions))}const h=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),y=l?l.match(h):null;if(y)try{const w={statusCode:200,statusMessage:"OK",headers:{"content-type":y[1]||"text/plain"},body:y[2]?ox(y[3]):sH(y[3])};let E=w.body;return r&&(E=r(w.body,w)),Promise.resolve(E)}catch(w){Wn.throwError("processing response error",H.errors.SERVER_ERROR,{body:ks(y[1],y[2]),error:w,requestBody:null,requestMethod:"GET",url:l})}e&&(c.method="POST",c.body=e,a["content-type"]==null&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),a["content-length"]==null&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));const g={};Object.keys(a).forEach(w=>{const E=a[w];g[E.key]=E.value}),c.headers=g;const p=function(){let w=null;return{promise:new Promise(function(I,M){u&&(w=setTimeout(()=>{w!=null&&(w=null,M(Wn.makeError("timeout",H.errors.TIMEOUT,{requestBody:ks(c.body,g["content-type"]),requestMethod:c.method,timeout:u,url:l})))},u))}),cancel:function(){w!=null&&(clearTimeout(w),w=null)}}}(),k=function(){return iH(this,void 0,void 0,function*(){for(let w=0;w=300)&&(p.cancel(),Wn.throwError("bad response",H.errors.SERVER_ERROR,{status:E.statusCode,headers:E.headers,body:ks(A,E.headers?E.headers["content-type"]:null),requestBody:ks(c.body,g["content-type"]),requestMethod:c.method,url:l})),r)try{const I=yield r(A,E);return p.cancel(),I}catch(I){if(I.throttleRetry&&w{let a=null;if(s!=null)try{a=JSON.parse(vs(s))}catch(l){Wn.throwError("invalid JSON",H.errors.SERVER_ERROR,{body:s,error:l})}return r&&(a=r(a,o)),a},i=null;if(e!=null){i=Ue(e);const s=typeof t=="string"?{url:t}:nr(t);s.headers?Object.keys(s.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(s.headers=nr(s.headers),s.headers["content-type"]="application/json"):s.headers={"content-type":"application/json"},t=s}return i9(t,i,n)}function Zo(t,e){return e||(e={}),e=nr(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let i=null,s=!1;const o=()=>s?!1:(s=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{o()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let l=0;function c(){return t().then(function(f){if(f!==void 0)o()&&r(f);else if(e.oncePoll)e.oncePoll.once("poll",c);else if(e.onceBlock)e.onceBlock.once("block",c);else if(!s){if(l++,l>a){o()&&n(new Error("retry limit reached"));return}let u=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));ue.ceiling&&(u=e.ceiling),setTimeout(c,u)}return null},function(f){o()&&n(f)})}c()})}var G0="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Ip={};for(var dd=0;dd>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function s9(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=Pl(e)^n>>5}for(e=Pl(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=s9(t);if(typeof n=="string")throw new Error(n);for(var i=t+"1",s=0;s>5)throw new Error("Non 5-bit word");n=Pl(n)^o,i+=G0.charAt(o)}for(s=0;s<6;++s)n=Pl(n);for(n^=1,s=0;s<6;++s){var a=n>>(5-s)*5&31;i+=G0.charAt(a)}return i}function o9(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var i=t.lastIndexOf("1");if(i===-1)return"No separator character for "+t;if(i===0)return"Missing prefix for "+t;var s=t.slice(0,i),o=t.slice(i+1);if(o.length<6)return"Data too short";var a=s9(s);if(typeof a=="string")return a;for(var l=[],c=0;c=o.length)&&l.push(u)}return a!==1?"Invalid checksum for "+t:{prefix:s,words:l}}function aH(){var t=o9.apply(null,arguments);if(typeof t=="object")return t}function lH(t){var e=o9.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function i1(t,e,r,n){for(var i=0,s=0,o=(1<=r;)s-=r,a.push(i>>s&o);if(n)s>0&&a.push(i<=e)return"Excess padding";if(i<this.data(u,!0);return e.transaction={hash:o,type:c,accessList:fe.allowNull(this.accessList.bind(this),null),blockHash:fe.allowNull(o,null),blockNumber:fe.allowNull(l,null),transactionIndex:fe.allowNull(l,null),confirmations:fe.allowNull(l,null),from:r,gasPrice:fe.allowNull(n),maxPriorityFeePerGas:fe.allowNull(n),maxFeePerGas:fe.allowNull(n),gasLimit:n,to:fe.allowNull(r,null),value:n,nonce:l,data:s,r:fe.allowNull(this.uint256),s:fe.allowNull(this.uint256),v:fe.allowNull(l),creates:fe.allowNull(r,null),raw:fe.allowNull(s)},e.transactionRequest={from:fe.allowNull(r),nonce:fe.allowNull(l),gasLimit:fe.allowNull(n),gasPrice:fe.allowNull(n),maxPriorityFeePerGas:fe.allowNull(n),maxFeePerGas:fe.allowNull(n),to:fe.allowNull(r),value:fe.allowNull(n),data:fe.allowNull(f),type:fe.allowNull(l),accessList:fe.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:o,address:r,topics:fe.arrayOf(o),data:s,logIndex:l,blockHash:o},e.receipt={to:fe.allowNull(this.address,null),from:fe.allowNull(this.address,null),contractAddress:fe.allowNull(r,null),transactionIndex:l,root:fe.allowNull(a),gasUsed:n,logsBloom:fe.allowNull(s),blockHash:o,transactionHash:o,logs:fe.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:fe.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:fe.allowNull(n),status:fe.allowNull(l),type:c},e.block={hash:fe.allowNull(o),parentHash:o,number:l,timestamp:l,nonce:fe.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:fe.allowNull(r),extraData:s,transactions:fe.allowNull(fe.arrayOf(o)),baseFeePerGas:fe.allowNull(n)},e.blockWithTransactions=nr(e.block),e.blockWithTransactions.transactions=fe.allowNull(fe.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:fe.allowNull(i,void 0),toBlock:fe.allowNull(i,void 0),blockHash:fe.allowNull(o,void 0),address:fe.allowNull(r,void 0),topics:fe.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:fe.allowNull(l),blockHash:fe.allowNull(o),transactionIndex:l,removed:fe.allowNull(this.boolean.bind(this)),address:r,data:fe.allowFalsish(s,"0x"),topics:fe.arrayOf(o),transactionHash:o,logIndex:l},e}accessList(e){return Oa(e||[])}number(e){return e==="0x"?0:V.from(e).toNumber()}type(e){return e==="0x"||e==null?0:V.from(e).toNumber()}bigNumber(e){return V.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),Ie(e))?e.toLowerCase():Nc.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return Se(e)}callAddress(e){if(!Ie(e,32))return null;const r=Se(qt(e,12));return r===tx?null:r}contractAddress(e){return ex(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||Ie(e))return ni(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return Ii(n)!==32?Nc.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=V.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!Ie(e))throw new Error("invalid uint256");return Je(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,i=fe.check(r,e);return i._difficulty=n==null?null:V.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return fe.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&V.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=fe.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;Ie(n)&&(n=V.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),Ie(n)&&(n=V.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return z7(e)}receiptLog(e){return fe.check(this.formats.receiptLog,e)}receipt(e){const r=fe.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=V.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&Nc.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):Nc.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&Nc.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return fe.check(this.formats.filter,e)}filterLog(e){return fe.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const i in e)try{const s=e[i](r[i]);s!==void 0&&(n[i]=s)}catch(s){throw s.checkKey=i,s.checkValue=r[i],s}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(i){n.push(e(i))}),n}}}var we=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Ae=new H(Cu),vH=10;function z6(t){return t==null?"null":(Ii(t)!==32&&Ae.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function V6(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(i=>{r[z6(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return z6(e)}).join("&")}function yH(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function za(t){if(typeof t=="string"){if(t=t.toLowerCase(),Ii(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+V6(t);if(vU.isForkEvent(t))throw Ae.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+V6(t.topics||[])}throw new Error("invalid event - "+t)}function $c(){return new Date().getTime()}function H6(t){return new Promise(e=>{setTimeout(e,t)})}const pH=["block","network","pending","poll"];let gH=class{constructor(e,r,n){re(this,"tag",e),re(this,"listener",r),re(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=yH(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||pH.indexOf(this.tag)>=0}};const mH={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Fv(t){return Je(V.from(t).toHexString(),32)}function W6(t){return Kl.encode(Ke([t,qt(cs(cs(t)),0,4)]))}const a9=new RegExp("^(ipfs)://(.*)$","i"),q6=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),a9,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function jd(t,e){try{return vs(nu(t,e))}catch{}return null}function nu(t,e){if(t==="0x")return null;const r=V.from(qt(t,e,e+32)).toNumber(),n=V.from(qt(t,r,r+32)).toNumber();return qt(t,r+32,r+32+n)}function Uv(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Ae.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function G6(t){const e=X(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function xH(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function l9(t){const e=[];let r=0;for(let n=0;nV.from(e).eq(1)).catch(e=>{if(e.code===H.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return we(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Hr([e,df(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=Hr(["0x9061b923",l9([l7(this.name),n.data])]));try{let s=yield this.provider.call(n);return X(s).length%32===4&&Ae.throwError("resolver threw error",H.errors.CALL_EXCEPTION,{transaction:n,data:s}),i&&(s=nu(s,0)),s}catch(s){if(s.code===H.errors.CALL_EXCEPTION)return null;throw s}})}_fetchBytes(e,r){return we(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?nu(n,0):null})}_getAddress(e,r){const n=mH[String(e)];if(n==null&&Ae.throwError(`unsupported coin type: ${e}`,H.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=X(r);if(n.p2pkh!=null){const s=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return W6(Ke([[n.p2pkh],"0x"+s[2]]))}}if(n.p2sh!=null){const s=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return W6(Ke([[n.p2sh],"0x"+s[2]]))}}if(n.prefix!=null){const s=i[1];let o=i[0];if(o===0?s!==20&&s!==32&&(o=-1):o=-1,o>=0&&i.length===2+s&&s>=1&&s<=75){const a=U6.toWords(i.slice(2));return a.unshift(o),U6.encode(n.prefix,a)}}return null}getAddress(e){return we(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===j0?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===H.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",Fv(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&Ae.throwError("invalid or unsupported coin data",H.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return we(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;no[l])}return Ae.throwError("invalid or unsupported content hash data",H.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return we(this,void 0,void 0,function*(){let r=Ue(e);r=Ke([Fv(64),Fv(r.length),r]),r.length%32!==0&&(r=Ke([r,Je("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",Q(r));return n==null||n==="0x"?null:vs(n)})}}let zv=null,bH=1;class wx extends Co{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),re(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=Zn(new.target,"getNetwork")(e);r?(re(this,"_network",r),this.emit("network",r,null)):Ae.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return we(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||Ae.throwError("no network detected",H.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:re(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Zo(()=>this._ready().then(e=>e,e=>{if(!(e.code===H.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return zv==null&&(zv=new fe),zv}static getNetwork(e){return eH(e??"homestead")}ccipReadFetch(e,r,n){return we(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),s=r.toLowerCase(),o=[];for(let a=0;a=0?null:JSON.stringify({data:s,sender:i}),u=yield wu({url:c,errorPassThrough:!0},f,(y,g)=>(y.status=g.statusCode,y));if(u.data)return u.data;const h=u.message||"unknown error";if(u.status>=400&&u.status<500)return Ae.throwError(`response not found during CCIP fetch: ${h}`,H.errors.SERVER_ERROR,{url:l,errorMessage:h});o.push(h)}return Ae.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,H.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return we(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const s=yield i;if($c()-s.respTime<=e)return s.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=$c(),n=Ye({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:s})=>{if(s)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),s;const o=$c();return i=V.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return we(this,void 0,void 0,function*(){const e=bH++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)Ae.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",Ae.makeError("network block skew detected",H.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const s=this._emitted[i];s!=="pending"&&n-s>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const s=i.hash;let o=this.getTransactionReceipt(s).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+s]=a.blockNumber,this.emit(s,a)),null)).catch(a=>{this.emit("error",a)});r.push(o);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const s=i.filter;s.fromBlock=i._lastBlockNumber+1,s.toBlock=n;const o=s.toBlock-this._maxFilterBlockRange;o>s.fromBlock&&(s.fromBlock=o),s.fromBlock<0&&(s.fromBlock=0);const a=this.getLogs(s).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(c=>{c.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=c.blockNumber),this._emitted["b:"+c.blockHash]=c.blockNumber,this._emitted["t:"+c.transactionHash]=c.blockNumber,this.emit(s,c)})}).catch(l=>{this.emit("error",l),i._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return we(this,void 0,void 0,function*(){return Ae.throwError("provider does not support network detection",H.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return we(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),yield H6(0),this._network;const n=Ae.makeError("underlying network changed",H.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=$c();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return we(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return we(this,void 0,void 0,function*(){const s=yield this.getTransactionReceipt(e);return(s?s.confirmations:0)>=r?s:new Promise((o,a)=>{const l=[];let c=!1;const f=function(){return c?!0:(c=!0,l.forEach(h=>{h()}),!1)},u=h=>{h.confirmations{this.removeListener(e,u)}),i){let h=i.startBlock,y=null;const g=p=>we(this,void 0,void 0,function*(){c||(yield H6(1e3),this.getTransactionCount(i.from).then(k=>we(this,void 0,void 0,function*(){if(!c){if(k<=i.nonce)h=p;else{{const w=yield this.getTransaction(e);if(w&&w.blockNumber!=null)return}for(y==null&&(y=h-3,y{c||this.once("block",g)}))});if(c)return;this.once("block",g),l.push(()=>{this.removeListener("block",g)})}if(typeof n=="number"&&n>0){const h=setTimeout(()=>{f()||a(Ae.makeError("timeout exceeded",H.errors.TIMEOUT,{timeout:n}))},n);h.unref&&h.unref(),l.push(()=>{clearTimeout(h)})}})})}getBlockNumber(){return we(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return we(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return V.from(e)}catch(r){return Ae.throwError("bad result from backend",H.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return we(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ye({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return V.from(i)}catch(s){return Ae.throwError("bad result from backend",H.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:s})}})}getTransactionCount(e,r){return we(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ye({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return V.from(i).toNumber()}catch(s){return Ae.throwError("bad result from backend",H.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:s})}})}getCode(e,r){return we(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ye({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return Q(i)}catch(s){return Ae.throwError("bad result from backend",H.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:s})}})}getStorageAt(e,r,n){return we(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield Ye({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>ni(o))}),s=yield this.perform("getStorageAt",i);try{return Q(s)}catch(o){return Ae.throwError("bad result from backend",H.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:s,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&Ii(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&Ae.throwError("Transaction hash mismatch from Provider.sendTransaction.",H.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(s,o)=>we(this,void 0,void 0,function*(){s==null&&(s=1),o==null&&(o=0);let a;s!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const l=yield this._waitForTransaction(e.hash,s,o,a);return l==null&&s===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&Ae.throwError("transaction failed",H.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return we(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(s=>Q(s)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const s=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,s,i)}catch(s){throw s.transaction=n,s.transactionHash=n.hash,s}})}_getTransactionRequest(e){return we(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?this._getAddress(s):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?V.from(s):null))}),["type"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?Q(s):null))}),this.formatter.transactionRequest(yield Ye(n))})}_getFilter(e){return we(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield Ye(r))})}_call(e,r,n){return we(this,void 0,void 0,function*(){n>=vH&&Ae.throwError("CCIP read exceeded maximum redirections",H.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,s=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&i!=null&&s.substring(0,10)==="0x556f1830"&&Ii(s)%32===4)try{const o=qt(s,4),a=qt(o,0,32);V.from(a).eq(i)||Ae.throwError("CCIP Read sender did not match",H.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:s});const l=[],c=V.from(qt(o,32,64)).toNumber(),f=V.from(qt(o,c,c+32)).toNumber(),u=qt(o,c+32);for(let w=0;wwe(this,void 0,void 0,function*(){const s=yield this.perform("getBlock",i);if(s==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let o=null;for(let l=0;lthis._wrapTransaction(l)),a}return this.formatter.block(s)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return we(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return Zo(()=>we(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return we(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return Zo(()=>we(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return i}),{oncePoll:this})})}getLogs(e){return we(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Ye({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),fe.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return we(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return we(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&Ae.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return we(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const i=new Rp(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return we(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||Ae.throwError("network does not support ENS",H.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+df(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return we(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(Ie(e))throw n}typeof e!="string"&&Ae.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return we(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const i=jd(yield this.call({to:n,data:"0x691f3431"+df(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return we(this,void 0,void 0,function*(){let r=null;if(Ie(e)){const s=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(s,"getAvatar");if(!o)return null;r=new Rp(this,o,s);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==H.errors.CALL_EXCEPTION)throw a}try{const a=jd(yield this.call({to:o,data:"0x691f3431"+df(s).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==H.errors.CALL_EXCEPTION)throw a;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return Ae.throwError(e+" not implemented",H.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const i=new gH(za(e),r,n);return this._events.push(i),this._startEvent(i),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,i=[],s=za(e);return this._events=this._events.filter(o=>o.tag!==s?!0:(setTimeout(()=>{o.listener.apply(this,r)},0),n=!0,o.once?(i.push(o),!1):!0)),i.forEach(o=>{this._stopEvent(o)}),n}listenerCount(e){if(!e)return this._events.length;let r=za(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=za(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let i=!1,s=za(e);return this._events=this._events.filter(o=>o.tag!==s||o.listener!=r||i?!0:(i=!0,n.push(o),!1)),n.forEach(o=>{this._stopEvent(o)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=za(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var Ui=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const tr=new H(Cu),wH=["call","estimateGas"];function vf(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=Ie(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=vf(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return vf(JSON.parse(t),e)}catch{}return null}function c9(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const s=vf(e,!0);if(s)return s.data;tr.throwError("missing revert data in call exception; Transaction reverted without a reason string",H.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let s=vf(e.body,!1);s==null&&(s=vf(e,!1)),s&&tr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",H.errors.UNPREDICTABLE_GAS_LIMIT,{reason:s.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===H.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&tr.throwError("insufficient funds for intrinsic transaction cost",H.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&tr.throwError("nonce has already been used",H.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&tr.throwError("replacement fee too low",H.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&tr.throwError("legacy pre-eip-155 transactions not supported",H.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),wH.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&tr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",H.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function K6(t){return new Promise(function(e){setTimeout(e,t)})}function CH(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function Dc(t){return t&&t.toLowerCase()}const Mp={};class f9 extends fo{constructor(e,r,n){if(super(),e!==Mp)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");re(this,"provider",r),n==null&&(n=0),typeof n=="string"?(re(this,"_address",this.provider.formatter.address(n)),re(this,"_index",null)):typeof n=="number"?(re(this,"_index",n),re(this,"_address",null)):tr.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return tr.throwError("cannot alter JSON-RPC Signer connection",H.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new EH(Mp,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&tr.throwError("unknown account #"+this._index,H.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=nr(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=nr(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Ui(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&tr.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),Ye({tx:Ye(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&tr.throwArgumentError("from address mismatch","transaction",e):n.from=i;const s=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[s]).then(o=>o,o=>(typeof o.message=="string"&&o.message.match(/user denied/i)&&tr.throwError("user rejected transaction",H.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),c9("sendTransaction",o,s)))})}signTransaction(e){return tr.throwError("signing transactions is unsupported",H.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Ui(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield Zo(()=>Ui(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,r)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return Ui(this,void 0,void 0,function*(){const r=typeof e=="string"?Ue(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[Q(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&tr.throwError("user rejected signing",H.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return Ui(this,void 0,void 0,function*(){const r=typeof e=="string"?Ue(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),Q(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&tr.throwError("user rejected signing",H.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return Ui(this,void 0,void 0,function*(){const i=yield er.resolveNames(e,r,n,o=>this.provider.resolveName(o)),s=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[s.toLowerCase(),JSON.stringify(er.getPayload(i.domain,r,i.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&tr.throwError("user rejected signing",H.errors.ACTION_REJECTED,{action:"_signTypedData",from:s,messageData:{domain:i.domain,types:r,value:i.value}}),o}})}unlock(e){return Ui(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class EH extends f9{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const SH={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let $a=class extends wx{constructor(e,r){let n=r;n==null&&(n=new Promise((i,s)=>{setTimeout(()=>{this.detectNetwork().then(o=>{i(o)},o=>{s(o)})},0)})),super(n),e||(e=Zn(this.constructor,"defaultUrl")()),typeof e=="string"?re(this,"connection",Object.freeze({url:e})):re(this,"connection",Object.freeze(nr(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Ui(this,void 0,void 0,function*(){yield K6(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=Zn(this.constructor,"getNetwork");try{return r(V.from(e).toNumber())}catch(n){return tr.throwError("could not detect network",H.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return tr.throwError("could not detect network",H.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new f9(Mp,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:Ri(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const s=wu(this.connection,JSON.stringify(n),CH).then(o=>(this.emit("debug",{action:"response",request:n,response:o,provider:this}),o),o=>{throw this.emit("debug",{action:"response",error:o,request:n,provider:this}),o});return i&&(this._cache[e]=s,setTimeout(()=>{this._cache[e]=null},0)),s}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Dc(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Dc(r.address),r.blockTag]];case"getCode":return["eth_getCode",[Dc(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Dc(r.address),Je(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[Zn(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[Zn(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=Dc(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return Ui(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&V.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=yield this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(r=nr(r),r.transaction=nr(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&tr.throwError(e+" not implemented",H.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return c9(e,i,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(s){if(e._pendingFilter!=r)return null;let o=Promise.resolve();return s.forEach(function(a){e._emitted["t:"+a.toLowerCase()]="pending",o=o.then(function(){return e.getTransaction(a).then(function(l){return e.emit("pending",l),null})})}),o.then(function(){return K6(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(s=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=nr(SH);if(r)for(const s in r)r[s]&&(n[s]=!0);Qm(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(s){if(e[s]==null)return;const o=ni(V.from(e[s]));s==="gasLimit"&&(s="gas"),i[s]=o}),["from","to","data"].forEach(function(s){e[s]!=null&&(i[s]=Q(e[s]))}),e.accessList&&(i.accessList=Oa(e.accessList)),i}};var kH=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?s(f.value):i(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const AH=new H(Cu);class K0 extends $a{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return kH(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||AH.throwError("no network detected",H.errors.UNKNOWN_ERROR,{}),this._network==null&&(re(this,"_network",r),this.emit("network",r,null))),r})}}const J6=new H(Cu);let _H=1;function Y6(t,e){const r="Web3LegacyFetcher";return function(n,i){const s={method:n,params:i,id:_H++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:Ri(s),provider:this}),e(s,(l,c)=>{if(l)return this.emit("debug",{action:"response",fetcher:r,error:l,request:s,provider:this}),a(l);if(this.emit("debug",{action:"response",fetcher:r,request:s,response:c,provider:this}),c.error){const f=new Error(c.error.message);return f.code=c.error.code,f.data=c.error.data,a(f)}o(c.result)})})}}function TH(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:Ri(n),provider:this}),t.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}class PH extends $a{constructor(e,r){e==null&&J6.throwArgumentError("missing provider","provider",e);let n=null,i=null,s=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),s=e,e.request?(n===""&&(n="eip-1193:"),i=TH(e)):e.sendAsync?i=Y6(e,e.sendAsync.bind(e)):e.send?i=Y6(e,e.send.bind(e)):J6.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),re(this,"jsonRpcFetchFunc",i),re(this,"provider",s)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const IH="solidity/5.7.0",RH=new RegExp("^bytes([0-9]+)$"),MH=new RegExp("^(u?int)([0-9]*)$"),OH=new RegExp("^(.*)\\[([0-9]*)\\]$"),NH="0000000000000000000000000000000000000000000000000000000000000000",Ya=new H(IH);function u9(t,e,r){switch(t){case"address":return r?cf(e,32):X(e);case"string":return Ue(e);case"bytes":return X(e);case"bool":return e=e?"0x01":"0x00",r?cf(e,32):X(e)}let n=t.match(MH);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Ya.throwArgumentError("invalid number type","type",t),r&&(i=256),e=V.from(e).toTwos(i),cf(e,i/8)}if(n=t.match(RH),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Ya.throwArgumentError("invalid bytes type","type",t),X(e).byteLength!==i&&Ya.throwArgumentError(`invalid value for ${t}`,"value",e),r?X((e+NH).substring(0,66)):e}if(n=t.match(OH),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Ya.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(u9(i,a,!0))}),Ke(o)}return Ya.throwArgumentError("invalid type","type",t)}function ke(t,e){t.length!=e.length&&Ya.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(u9(n,e[i]))}),Q(Ke(r))}function Zs(t,e){return xe(ke(t,e))}function $H(t,e){return cs(ke(t,e))}const DH="units/5.7.0",d9=new H(DH),h9=["wei","kwei","mwei","gwei","szabo","finney","ether"];function BH(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&d9.throwArgumentError("invalid value","value",t);let r=e[0],n="";for(r.substring(0,1)==="-"&&(n="-",r=r.substring(1));r.substring(0,1)==="0";)r=r.substring(1);r===""&&(r="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);const s=[];for(;r.length;)if(r.length<=3){s.unshift(r);break}else{const o=r.length-3;s.unshift(r.substring(o)),r=r.substring(0,o)}return n+s.join(",")+i}function v9(t,e){if(typeof e=="string"){const r=h9.indexOf(e);r!==-1&&(e=3*r)}return Od(t,e??18)}function J0(t,e){if(typeof t!="string"&&d9.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=h9.indexOf(e);r!==-1&&(e=3*r)}return fi(t,e??18)}function LH(t){return v9(t,18)}function Op(t){return J0(t,18)}const jH=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:sx,ConstructorFragment:Qn,ErrorFragment:Wi,EventFragment:gi,FormatTypes:$e,Fragment:mi,FunctionFragment:Xn,HDNode:dn,Indexed:z0,Interface:ir,LogDescription:d7,Logger:H,ParamType:fr,RLP:qj,SigningKey:sa,get SupportedAlgorithm(){return Jl},TransactionDescription:h7,get TransactionTypes(){return Ap},get UnicodeNormalizationForm(){return Mi},Utf8ErrorFuncs:e7,get Utf8ErrorReason(){return Zr},_TypedDataEncoder:er,_fetchData:i9,_toEscapedUtf8String:uF,accessListify:Oa,arrayify:X,base58:Kl,base64:IF,checkProperties:Qm,checkResultErrors:UE,commify:BH,computeAddress:Xs,computeHmac:tu,computePublicKey:hx,concat:Ke,deepCopy:Ri,defaultAbiCoder:Kr,defaultPath:Yl,defineReadOnly:re,dnsEncode:l7,entropyToMnemonic:n1,fetchJson:wu,formatBytes32String:dF,formatEther:LH,formatUnits:v9,getAccountPath:TV,getAddress:Se,getContractAddress:ex,getCreate2Address:Qj,getIcapAddress:Yj,getJsonWalletAddress:DV,getStatic:Zn,hashMessage:Qh,hexConcat:Hr,hexDataLength:Ii,hexDataSlice:qt,hexStripZeros:ME,hexValue:ni,hexZeroPad:Je,hexlify:Q,id:Fs,isAddress:qE,isBytes:ds,isBytesLike:os,isHexString:Ie,isValidMnemonic:_V,isValidName:eU,joinSignature:mp,keccak256:xe,mnemonicToEntropy:r1,mnemonicToSeed:J7,namehash:df,nameprep:AF,parseBytes32String:hF,parseEther:Op,parseTransaction:z7,parseUnits:J0,poll:Zo,randomBytes:xi,recoverAddress:wa,recoverPublicKey:B7,resolveProperties:Ye,ripemd160:q7,serializeTransaction:_p,sha256:cs,sha512:mV,shallowCopy:nr,shuffled:RV,solidityKeccak256:Zs,solidityPack:ke,soliditySha256:$H,splitSignature:Ia,stripZeros:ki,toUtf8Bytes:Ue,toUtf8CodePoints:F0,toUtf8String:vs,verifyMessage:n9,verifyTypedData:QV,zeroPad:cf},Symbol.toStringTag,{value:"Module"})),FH=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var UH=Object.freeze({__proto__:null,abi:FH});const zH=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],VH={isValidSignatureBytes32:"0x1626ba7e"};var HH=Object.freeze({__proto__:null,abi:zH,returns:VH});const WH=[{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC1271Revert",type:"error"},{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC6492DeployFailed",type:"error"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSig",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"allowSideEffects",type:"bool"},{internalType:"bool",name:"deployAlreadyDeployed",type:"bool"}],name:"isValidSigImpl",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffects",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffectsNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];var qH=Object.freeze({__proto__:null,abi:WH});const GH=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var KH=Object.freeze({__proto__:null,abi:GH});const JH=[{type:"function",name:"nonce",constant:!0,inputs:[],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"readNonce",constant:!0,inputs:[{type:"uint256"}],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"updateImplementation",constant:!1,inputs:[{type:"address"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"selfExecute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"execute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"},{type:"uint256"},{type:"bytes"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"createContract",inputs:[{type:"bytes"}],payable:!0,stateMutability:"payable"},{type:"function",name:"setExtraImageHash",constant:!1,inputs:[{type:"bytes32",name:"imageHash"},{type:"uint256",name:"expiration"}],outputs:[],payable:!1,stateMutability:"nonpayable"}];var YH=Object.freeze({__proto__:null,abi:JH});const QH=[{type:"function",name:"updateImageHash",constant:!0,inputs:[{type:"bytes32"}],outputs:[],payable:!1,stateMutability:"view"},{type:"function",name:"imageHash",constant:!0,inputs:[],outputs:[{type:"bytes32"}],payable:!1,stateMutability:"view"}];var XH=Object.freeze({__proto__:null,abi:QH});const ZH=[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_mainModule",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"bytes32",name:"_imageHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"_threshold",type:"uint256"},{indexed:!1,internalType:"bytes",name:"_signers",type:"bytes"}],name:"RequiredConfig",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"address",name:"_signer",type:"address"}],name:"RequiredSigner",type:"event"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callBalanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callBlockNumber",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_i",type:"uint256"}],name:"callBlockhash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"callChainId",outputs:[{internalType:"uint256",name:"id",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCode",outputs:[{internalType:"bytes",name:"code",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeHash",outputs:[{internalType:"bytes32",name:"codeHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeSize",outputs:[{internalType:"uint256",name:"size",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callCoinbase",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callDifficulty",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLeft",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLimit",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasPrice",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callOrigin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"knownImageHashes",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"lastImageHashUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastSignerUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastWalletUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bool",name:"delegateCall",type:"bool"},{internalType:"bool",name:"revertOnError",type:"bool"},{internalType:"uint256",name:"gasLimit",type:"uint256"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct IModuleCalls.Transaction[]",name:"_txs",type:"tuple[]"}],name:"multiCall",outputs:[{internalType:"bool[]",name:"_successes",type:"bool[]"},{internalType:"bytes[]",name:"_results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_threshold",type:"uint256"},{components:[{internalType:"uint256",name:"weight",type:"uint256"},{internalType:"address",name:"signer",type:"address"}],internalType:"struct RequireUtils.Member[]",name:"_members",type:"tuple[]"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"uint256",name:"_sizeMembers",type:"uint256"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishInitialSigners",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"}],name:"requireMinNonce",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_expiration",type:"uint256"}],name:"requireNonExpired",outputs:[],stateMutability:"view",type:"function"}];var eW=Object.freeze({__proto__:null,abi:ZH});const tW=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var rW=Object.freeze({__proto__:null,abi:tW});const mr={erc6492:qH,erc5719:UH,erc1271:HH,factory:KH,mainModule:YH,mainModuleUpgradable:XH,sequenceUtils:eW,requireFreshSigner:rW},nW=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:mr},Symbol.toStringTag,{value:"Module"}));function Y0(){return Y0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),de({},n)).then(i=>he(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),de({},n)).then(i=>he(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),de({},n)).then(i=>he(i).then(s=>({status:s.status}))),this.clock=n=>this.fetch(this.url("Clock"),de({},n)).then(i=>he(i).then(s=>({serverTime:s.serverTime}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),de({},n)).then(i=>he(i).then(s=>({data:s.data}))),this.getAuthToken=(n,i)=>this.fetch(this.url("GetAuthToken"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.getAuthToken2=(n,i)=>this.fetch(this.url("GetAuthToken2"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.sendPasswordlessLink=(n,i)=>this.fetch(this.url("SendPasswordlessLink"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.friendList=(n,i)=>this.fetch(this.url("FriendList"),de(n,i)).then(s=>he(s).then(o=>({page:o.page,friends:o.friends}))),this.getFriendByAddress=(n,i)=>this.fetch(this.url("GetFriendByAddress"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,friend:o.friend}))),this.searchFriends=(n,i)=>this.fetch(this.url("SearchFriends"),de(n,i)).then(s=>he(s).then(o=>({friends:o.friends}))),this.addFriend=(n,i)=>this.fetch(this.url("AddFriend"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,friend:o.friend}))),this.updateFriendNickname=(n,i)=>this.fetch(this.url("UpdateFriendNickname"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,friend:o.friend}))),this.removeFriend=(n,i)=>this.fetch(this.url("RemoveFriend"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.contractCall=(n,i)=>this.fetch(this.url("ContractCall"),de(n,i)).then(s=>he(s).then(o=>({returns:o.returns}))),this.decodeContractCall=(n,i)=>this.fetch(this.url("DecodeContractCall"),de(n,i)).then(s=>he(s).then(o=>({call:o.call}))),this.lookupContractCallSelectors=(n,i)=>this.fetch(this.url("LookupContractCallSelectors"),de(n,i)).then(s=>he(s).then(o=>({signatures:o.signatures}))),this.userStorageFetch=(n,i)=>this.fetch(this.url("UserStorageFetch"),de(n,i)).then(s=>he(s).then(o=>({object:o.object}))),this.userStorageSave=(n,i)=>this.fetch(this.url("UserStorageSave"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.userStorageDelete=(n,i)=>this.fetch(this.url("UserStorageDelete"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.userStorageFetchAll=(n,i)=>this.fetch(this.url("UserStorageFetchAll"),de(n,i)).then(s=>he(s).then(o=>({objects:o.objects}))),this.getMoonpayLink=(n,i)=>this.fetch(this.url("GetMoonpayLink"),de(n,i)).then(s=>he(s).then(o=>({signedUrl:o.signedUrl}))),this.getSardineClientToken=n=>this.fetch(this.url("GetSardineClientToken"),de({},n)).then(i=>he(i).then(s=>({token:s.token}))),this.isUsingGoogleMail=(n,i)=>this.fetch(this.url("IsUsingGoogleMail"),de(n,i)).then(s=>he(s).then(o=>({yes:o.yes}))),this.resolveENSAddress=(n,i)=>this.fetch(this.url("ResolveENSAddress"),de(n,i)).then(s=>he(s).then(o=>({address:o.address,ok:o.ok}))),this.isValidSignature=(n,i)=>this.fetch(this.url("IsValidSignature"),de(n,i)).then(s=>he(s).then(o=>({isValid:o.isValid}))),this.isValidMessageSignature=(n,i)=>this.fetch(this.url("IsValidMessageSignature"),de(n,i)).then(s=>he(s).then(o=>({isValid:o.isValid}))),this.isValidTypedDataSignature=(n,i)=>this.fetch(this.url("IsValidTypedDataSignature"),de(n,i)).then(s=>he(s).then(o=>({isValid:o.isValid}))),this.isValidETHAuthProof=(n,i)=>this.fetch(this.url("IsValidETHAuthProof"),de(n,i)).then(s=>he(s).then(o=>({isValid:o.isValid}))),this.getCoinPrices=(n,i)=>this.fetch(this.url("GetCoinPrices"),de(n,i)).then(s=>he(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getCollectiblePrices=(n,i)=>this.fetch(this.url("GetCollectiblePrices"),de(n,i)).then(s=>he(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getExchangeRate=(n,i)=>this.fetch(this.url("GetExchangeRate"),de(n,i)).then(s=>he(s).then(o=>({exchangeRate:o.exchangeRate}))),this.memoryStore=(n,i)=>this.fetch(this.url("MemoryStore"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.memoryLoad=(n,i)=>this.fetch(this.url("MemoryLoad"),de(n,i)).then(s=>he(s).then(o=>({value:o.value}))),this.listPayCardsOnFile=n=>this.fetch(this.url("ListPayCardsOnFile"),de({},n)).then(i=>he(i).then(s=>({payCards:s.payCards}))),this.savePayCard=(n,i)=>this.fetch(this.url("SavePayCard"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok,payCard:o.payCard}))),this.updatePayCardCVC=(n,i)=>this.fetch(this.url("UpdatePayCardCVC"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.deletePayCard=(n,i)=>this.fetch(this.url("DeletePayCard"),de(n,i)).then(s=>he(s).then(o=>({ok:o.ok}))),this.smartRampQuote=(n,i)=>this.fetch(this.url("SmartRampQuote"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,quoteDetails:o.quoteDetails}))),this.smartRampPurchase=(n,i)=>this.fetch(this.url("SmartRampPurchase"),de(n,i)).then(s=>he(s).then(o=>({processing:o.processing,receipt:o.receipt}))),this.smartRampWaitOrderConfirmation=(n,i)=>this.fetch(this.url("SmartRampWaitOrderConfirmation"),de(n,i)).then(s=>he(s).then(o=>({done:o.done,receipt:o.receipt}))),this.smartRampGetOrder=(n,i)=>this.fetch(this.url("SmartRampGetOrder"),de(n,i)).then(s=>he(s).then(o=>({order:o.order}))),this.smartRampCheckCardAuthorization=(n,i)=>this.fetch(this.url("SmartRampCheckCardAuthorization"),de(n,i)).then(s=>he(s).then(o=>({cardAuth:o.cardAuth}))),this.smartRampOrdersList=(n,i)=>this.fetch(this.url("SmartRampOrdersList"),de(n,i)).then(s=>he(s).then(o=>({page:o.page,orders:o.orders}))),this.smartRampGetOrderTxnHash=(n,i)=>this.fetch(this.url("SmartRampGetOrderTxnHash"),de(n,i)).then(s=>he(s).then(o=>({txnHash:o.txnHash,txnSuccessful:o.txnSuccessful}))),this.smartRampSubmitCardAuthorization=(n,i)=>this.fetch(this.url("SmartRampSubmitCardAuthorization"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.adminSmartRampGetOrder=(n,i)=>this.fetch(this.url("AdminSmartRampGetOrder"),de(n,i)).then(s=>he(s).then(o=>({order:o.order}))),this.adminSmartRampListCompletedOrders=(n,i)=>this.fetch(this.url("AdminSmartRampListCompletedOrders"),de(n,i)).then(s=>he(s).then(o=>({orders:o.orders}))),this.adminSmartRampListPendingOrders=(n,i)=>this.fetch(this.url("AdminSmartRampListPendingOrders"),de(n,i)).then(s=>he(s).then(o=>({pendingOrders:o.pendingOrders}))),this.getInviteInfo=n=>this.fetch(this.url("GetInviteInfo"),de({},n)).then(i=>he(i).then(s=>({inviteInfo:s.inviteInfo}))),this.isValidAccessCode=(n,i)=>this.fetch(this.url("IsValidAccessCode"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.internalClaimAccessCode=(n,i)=>this.fetch(this.url("InternalClaimAccessCode"),de(n,i)).then(s=>he(s).then(o=>({status:o.status}))),this.blockNumberAtTime=(n,i)=>this.fetch(this.url("BlockNumberAtTime"),de(n,i)).then(s=>he(s).then(o=>({blocks:o.blocks}))),this.paperSessionSecret=(n,i)=>this.fetch(this.url("PaperSessionSecret"),de(n,i)).then(s=>he(s).then(o=>({secret:o.secret}))),this.paperSessionSecret2=(n,i)=>this.fetch(this.url("PaperSessionSecret2"),de(n,i)).then(s=>he(s).then(o=>({secret:o.secret}))),this.linkWallet=(n,i)=>this.fetch(this.url("LinkWallet"),de(n,i)).then(s=>he(s).then(o=>({status:o.status,linkedWalletAddress:o.linkedWalletAddress}))),this.getLinkedWallets=(n,i)=>this.fetch(this.url("GetLinkedWallets"),de(n,i)).then(s=>he(s).then(o=>({linkedWallets:o.linkedWallets}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const de=(t={},e={})=>({method:"POST",headers:Y0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),he=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),Q6=typeof global=="object"?global.fetch:window.fetch;class Fd extends y9{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,Q6),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(i,s)=>{const o={},a=this.jwtAuth,l=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),l&&l.length>0&&(o["X-Access-Key"]=l),s.headers=Y0({},s.headers,o),Q6(i,s)},this.fetch=this._fetch}}const fW=Object.freeze(Object.defineProperty({__proto__:null,API:y9,SequenceAPIClient:Fd,SmartRampOrderStatus:aW,SmartRampTxnStatus:lW,SortOrder:cW,WebRPCSchemaHash:oW,WebRPCSchemaVersion:sW,WebRPCVersion:iW},Symbol.toStringTag,{value:"Module"})),p9="3.7.5",uW=p9,dW=typeof atob=="function",hW=typeof btoa=="function",pc=typeof Buffer=="function",X6=typeof TextDecoder=="function"?new TextDecoder:void 0,Z6=typeof TextEncoder=="function"?new TextEncoder:void 0,vW="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Wc=Array.prototype.slice.call(vW),hd=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(Wc),yW=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Cr=String.fromCharCode.bind(String),e5=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),g9=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),m9=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),x9=t=>{let e,r,n,i,s="";const o=t.length%3;for(let a=0;a255||(n=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|i,s+=Wc[e>>18&63]+Wc[e>>12&63]+Wc[e>>6&63]+Wc[e&63]}return o?s.slice(0,o-3)+"===".substring(o):s},Cx=hW?t=>btoa(t):pc?t=>Buffer.from(t,"binary").toString("base64"):x9,Np=pc?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;ne?g9(Np(t)):Np(t),pW=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?Cr(192|e>>>6)+Cr(128|e&63):Cr(224|e>>>12&15)+Cr(128|e>>>6&63)+Cr(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return Cr(240|e>>>18&7)+Cr(128|e>>>12&63)+Cr(128|e>>>6&63)+Cr(128|e&63)}},gW=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,b9=t=>t.replace(gW,pW),t5=pc?t=>Buffer.from(t,"utf8").toString("base64"):Z6?t=>Np(Z6.encode(t)):t=>Cx(b9(t)),Il=(t,e=!1)=>e?g9(t5(t)):t5(t),r5=t=>Il(t,!0),mW=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,xW=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return Cr((r>>>10)+55296)+Cr((r&1023)+56320);case 3:return Cr((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return Cr((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},w9=t=>t.replace(mW,xW),C9=t=>{if(t=t.replace(/\s+/g,""),!yW.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,i;for(let s=0;s>16&255):i===64?Cr(e>>16&255,e>>8&255):Cr(e>>16&255,e>>8&255,e&255);return r},Ex=dW?t=>atob(m9(t)):pc?t=>Buffer.from(t,"base64").toString("binary"):C9,E9=pc?t=>e5(Buffer.from(t,"base64")):t=>e5(Ex(t).split("").map(e=>e.charCodeAt(0))),S9=t=>E9(k9(t)),bW=pc?t=>Buffer.from(t,"base64").toString("utf8"):X6?t=>X6.decode(E9(t)):t=>w9(Ex(t)),k9=t=>m9(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),$p=t=>bW(k9(t)),wW=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},A9=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),_9=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,A9(r));t("fromBase64",function(){return $p(this)}),t("toBase64",function(e){return Il(this,e)}),t("toBase64URI",function(){return Il(this,!0)}),t("toBase64URL",function(){return Il(this,!0)}),t("toUint8Array",function(){return S9(this)})},T9=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,A9(r));t("toBase64",function(e){return Ud(this,e)}),t("toBase64URI",function(){return Ud(this,!0)}),t("toBase64URL",function(){return Ud(this,!0)})},CW=()=>{_9(),T9()},Ea={version:p9,VERSION:uW,atob:Ex,atobPolyfill:C9,btoa:Cx,btoaPolyfill:x9,fromBase64:$p,toBase64:Il,encode:Il,encodeURI:r5,encodeURL:r5,utob:b9,btou:w9,decode:$p,isValid:wW,fromUint8Array:Ud,toUint8Array:S9,extendString:_9,extendUint8Array:T9,extendBuiltins:CW};var Dp=function(){return Dp=Object.assign||function(e){for(var r,n=1,i=arguments.length;n0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]0&&(i.types.Claims.push({name:"app",type:"string"}),i.message.app=this.claims.app),this.claims.iat&&this.claims.iat>0&&(i.types.Claims.push({name:"iat",type:"int64"}),i.message.iat=this.claims.iat),this.claims.exp&&this.claims.exp>0&&(i.types.Claims.push({name:"exp",type:"int64"}),i.message.exp=this.claims.exp),this.claims.n&&this.claims.n>0&&(i.types.Claims.push({name:"n",type:"uint64"}),i.message.n=this.claims.n),this.claims.typ&&this.claims.typ.length>0&&(i.types.Claims.push({name:"typ",type:"string"}),i.message.typ=this.claims.typ),this.claims.ogn&&this.claims.ogn.length>0&&(i.types.Claims.push({name:"ogn",type:"string"}),i.message.ogn=this.claims.ogn),this.claims.v&&this.claims.v.length>0&&(i.types.Claims.push({name:"v",type:"string"}),i.message.v=this.claims.v),i},t}(),SW=function(t){if(t.app==="")return{ok:!1,err:new Error("claims: app is empty")};var e=Math.round(new Date().getTime()/1e3),r=5*60,n=60*60*24*365+r;return t.v===""?{ok:!1,err:new Error("claims: ethauth version is empty")}:t.iat&&t.iat!==0&&(t.iat>e+r||t.iate+n?{ok:!1,err:new Error("claims: token has expired")}:{ok:!0}},kW=function(t,e,r){return qo(void 0,void 0,void 0,function(){var n,i;return Go(this,function(s){return n=r.messageDigest(),i=n9(n,r.signature),i.slice(0,2)==="0x"&&i.length===42&&i.toLowerCase()===r.address.toLowerCase()?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]})})},AW=function(t,e,r){return qo(void 0,void 0,void 0,function(){var n,i,s,o,a;return Go(this,function(l){switch(l.label){case 0:return!t||t===void 0?[2,{isValid:!1}]:(n=r.messageDigest(),[4,t.getCode(r.address)]);case 1:if(i=l.sent(),i==="0x"||i.length<=2)throw new Error("ValidateContractAccountProof failed. unable to fetch wallet contract code");return s=["function isValidSignature(bytes32, bytes) public view returns (bytes4)"],o=new Na(r.address,s,t),[4,o.isValidSignature(n,X(r.signature))];case 2:return a=l.sent(),a===_W?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},_W="0x1626ba7e",P9="1",Bp="eth",TW={name:"ETHAuth",version:P9},Q0=function(){function t(){for(var e=[],r=0;r0&&(l+="."+i.extra),[2,l]}})})},this.decodeProof=function(i,s){return s===void 0&&(s=!1),qo(n,void 0,void 0,function(){var o,a,l,c,f,u,h,y,g,p;return Go(this,function(k){switch(k.label){case 0:if(o=i.split("."),o.length<4||o.length>5)throw new Error("ethauth: invalid proof string");if(a=o[0],l=o[1],c=o[2],f=o[3],u=o[4],a!==Bp)throw new Error("ethauth: not an ethauth proof");return h=Ea.decode(c),y=JSON.parse(h),g=new Sx({address:l,claims:y,signature:f,extra:u}),[4,this.validateProof(g,s)];case 1:if(p=k.sent(),!p)throw new Error("ethauth: proof is invalid");return[2,g]}})})},this.validateProof=function(i,s){return s===void 0&&(s=!1),qo(n,void 0,void 0,function(){var o,a;return Go(this,function(l){switch(l.label){case 0:if(o=this.validateProofClaims(i),o.err)throw new Error("ethauth: proof claims are invalid ".concat(o.err));return s===!0?[3,2]:[4,this.validateProofSignature(i)];case 1:if(a=l.sent(),a!==!0)throw new Error("ethauth: proof signature is invalid");l.label=2;case 2:return[2,!0]}})})},this.validateProofSignature=function(i){return qo(n,void 0,void 0,function(){var s,l,o,a,l;return Go(this,function(c){switch(c.label){case 0:s=[],l=0,c.label=1;case 1:if(!(lEa.encode(t,!0),kx=t=>Ea.encode(JSON.stringify(t),!0),IW=t=>{if(t!=null)return Ea.decode(t)},Ax=t=>{if(t!=null)return JSON.parse(Ea.decode(t))};function I9(t){return t!=null&&(V.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Ie(t)||typeof t=="bigint"||ds(t))}const _x=t=>X(xe(typeof t=="string"?Ue(t):t)),R9=(t,e,r)=>ke(["string","uint256","address","bytes32"],["",e,t,r]),Lp=(t,e,r)=>xe(R9(t,e,r)),M9=()=>typeof window>"u"&&typeof process=="object",RW=()=>!M9(),O9=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(Ea.decode(e[1]))};function X0(){return X0=Object.assign?Object.assign.bind():function(t){for(var e=1;eye.configure(t),iu=(t,e,r)=>{const n={};return r&&r.length>0&&(n.Authorization=`BEARER ${r}`),e&&e.length>0&&(n["X-Access-Key"]=e),{url:t,headers:n,skipFetchSetup:!0,fetchOptions:{mode:"cors",cache:"force-cache",credentials:"same-origin",redirect:"follow",referrer:"client"}}};let MW=class{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...i){e=`${e}:${xe(Ue(JSON.stringify(i,OW)))}`;let s=this.cache.get(e);if(s&&s.expiration&&new Date>=s.expiration&&(s=void 0,this.cache.delete(e)),!s){const o={promise:n(...i)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),s=o,this.cache.set(e,s)}return s.promise}};function OW(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function Tx(t,e){return function(...r){const n=Array.prototype.slice.call(r);return new Promise(async(i,s)=>{try{n.push((o,a)=>o?s(o):i(a)),await t.apply(e,n)}catch(o){s(o)}})}}function NW(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function $W(t){const e=t.split("&"),r={};for(const n of e){const i=n.split("=");r[decodeURIComponent(i[0])]=JSON.parse(decodeURIComponent(i[1]))}return r}const Px=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),D9=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},B9=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},L9=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},DW=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),j9=t=>{const e=X0({},t.types);return delete e.EIP712Domain,er.hash(t.domain,e,t.message)},Eu=t=>X(j9(t)),{defineReadOnly:BW,getStatic:LW,resolveProperties:jW,checkProperties:FW,shallowCopy:UW,deepCopy:zW}=jH,VW=t=>t.replace(/([^:]\/)\/+/g,"$1"),HW=Object.freeze(Object.defineProperty({__proto__:null,Logger:N9,PromiseCache:MW,base64Decode:IW,base64DecodeObject:Ax,base64Encode:PW,base64EncodeObject:kx,checkProperties:FW,configureLogger:$9,deepCopy:zW,defineReadOnly:BW,encodeMessageDigest:_x,encodeTypedDataDigest:Eu,encodeTypedDataHash:j9,getEthersConnectionInfo:iu,getRandomInt:Px,getStatic:LW,isBigNumberish:I9,isBrowser:RW,isNode:M9,jwtDecodeClaims:O9,logger:ye,packMessageData:R9,promisify:Tx,queryStringFromObject:NW,queryStringToObject:$W,resolveProperties:jW,sanitizeAlphanumeric:B9,sanitizeHost:L9,sanitizeNumberString:D9,shallowCopy:UW,sleep:DW,subDigestOf:Lp,urlClean:VW},Symbol.toStringTag,{value:"Module"}));function Rt(){return Rt=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:V.from(t).toNumber(),qW=t=>{if(t)return F9(t)},U9=(t,e=!1,r=!1)=>{if(!t)throw new Error("invalid network config: empty config");const n=[];if(Array.isArray(t)?n.push(...t):n.push(t),n.length===0){if(e)throw new Error("invalid network config: empty config");return!1}const i=n.map(c=>c.chainId).sort(),s=i.filter((c,f)=>i.indexOf(c)!==f);if(s.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${s}`);return!1}n.forEach(c=>c.name=c.name.toLowerCase());const o=n.map(c=>c.name).sort(),a=o.filter((c,f)=>o.indexOf(c)!==f);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let c=0;c(U9(t,!0,e),t),GW=(t,e=!0)=>{const r=t.map(i=>i.chainId).sort(),n=r.filter((i,s)=>r.indexOf(i)!==s);if(n.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${n}`);return!1}return!0},KW=(t,e)=>{if(!(!t||!e)){if(!t.chainId&&!t.name)throw new Error("failed to update network config: source config is missing chainId or name");if(t.chainId!==e.chainId&&t.name!==e.name)throw new Error("failed to update network config: one of chainId or name must match");t.rpcUrl&&(e.rpcUrl=t.rpcUrl,e.provider=void 0),t.provider&&(e.provider=t.provider),t.relayer&&(e.relayer=t.relayer)}},V9=t=>z9(H9(t)),ii=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=V.from(e).toNumber();return t.find(n=>n.chainId===r)}else return t.find(r=>r.name===e||`${r.chainId}`===e);else{if(typeof e=="number")return t.find(r=>r.chainId===e);if(e.chainId)return t.find(r=>r.chainId===e.chainId);if(V.isBigNumber(e)){const r=e.toNumber();return t.find(n=>n.chainId===r)}else return}},JW=(t,e)=>t?t.name===e||t.chainId===e:!1,YW=t=>{const e={};for(let r=0;r{if(!t)return[];const e=t.sort((n,i)=>n.chainId===i.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},s1=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let i=e[n];return typeof i=="function"?i=i():i==null?i="":typeof i=="object"||typeof i=="symbol"?i=i.toString():i=i.valueOf(),i})):"",W9=t=>s1("https://${network}-indexer.sequence.app",{network:t}),q9=t=>s1("https://${network}-relayer.sequence.app",{network:t}),G9=t=>s1("https://nodes.sequence.app/${network}",{network:t});function Ix(t){return ii(Ql,t)}function K9(t){return V.isBigNumber(t)?t:I9(t)?V.from(t):V.from(t.chainId)}const Yt=t=>{const e=G9(t);return{rpcUrl:e,relayer:{url:q9(t),provider:{url:e}},indexerUrl:W9(t)}},Ql=V9([Rt({},It[te.POLYGON],Yt("polygon"),{isDefaultChain:!0,isAuthChain:!0}),Rt({},It[te.MAINNET],Yt("mainnet")),Rt({},It[te.BSC],Yt("bsc")),Rt({},It[te.AVALANCHE],Yt("avalanche")),Rt({},It[te.ARBITRUM],Yt("arbitrum")),Rt({},It[te.ARBITRUM_NOVA],Yt("arbitrum-nova")),Rt({},It[te.OPTIMISM],Yt("optimism")),Rt({},It[te.OPTIMISM_SEPOLIA],Yt("optimism-sepolia")),Rt({},It[te.POLYGON_ZKEVM],Yt("polygon-zkevm")),Rt({},It[te.GNOSIS],Yt("gnosis")),Rt({},It[te.RINKEBY],Yt("rinkeby"),{disabled:!0}),Rt({},It[te.GOERLI],Yt("goerli"),{disabled:!0}),Rt({},It[te.SEPOLIA],Yt("sepolia")),Rt({},It[te.POLYGON_MUMBAI],Yt("mumbai")),Rt({},It[te.BSC_TESTNET],Yt("bsc-testnet")),Rt({},It[te.ARBITRUM_SEPOLIA],Yt("arbitrum-sepolia")),Rt({},It[te.BASE],Yt("base")),Rt({},It[te.BASE_SEPOLIA],Yt("base-sepolia")),Rt({},It[te.HOMEVERSE],Yt("homeverse")),Rt({},It[te.HOMEVERSE_TESTNET],Yt("homeverse-testnet")),Rt({},It[te.AVALANCHE_TESTNET],Yt("avalanche-testnet")),Rt({},It[te.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),Rt({},It[te.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),Xl="2.0";class Rx{constructor(e,r){this.sender=void 0,this.handler=void 0,this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=J9(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(i){r(i,void 0)}}}const J9=(t,e)=>{if(t.length===0)return e;const r=i=>i.sendAsyncMiddleware?i.sendAsyncMiddleware:i;let n;n=r(t[t.length-1])(e);for(let i=t.length-2;i>=0;i--)n=r(t[i])(n);return n};function Y9(t){return t!==void 0&&t.send!==void 0&&t.constructor.defaultUrl!==void 0&&t.detectNetwork!==void 0&&t.getSigner!==void 0&&t.perform!==void 0}function Q9(t){return t!==void 0&&t.sendAsync!==void 0}let QW=0;class Z0{constructor(e,r){this.send=void 0,this.request=void 0,this.defaultChainId=void 0,this.sendAsync=(n,i,s)=>{this.send(n.method,n.params,s||this.defaultChainId).then(o=>{i(void 0,{jsonrpc:"2.0",id:n.id,result:o})}).catch(o=>{i(o,void 0)})},this.defaultChainId=r,Y9(e)?this.send=e.send.bind(e):Q9(e)?this.send=(n,i,s)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:Xl,id:++QW,method:n,params:i},(l,c)=>{l?a(l):o(c?c.result:void 0)},s||this.defaultChainId)}):this.send=e,this.request=(n,i)=>this.send(n.method,n.params,i)}}class XW{constructor(e){this.provider=e,this.sendAsync=(r,n)=>{this.provider.send(r.method,r.params).then(i=>{n(void 0,{jsonrpc:"2.0",id:r.id,result:i})}).catch(i=>{n(i,void 0)})},this.send=this.sendAsync}}class ZW{constructor(e){this.sendAsyncMiddleware=void 0,this.isAllowedFunc=void 0,e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.sendAsyncMiddleware=jp(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.sendAsyncMiddleware=jp(this.isAllowedFunc)}}const jp=t=>e=>(r,n,i)=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");e(r,n,i)};class Mx{constructor(e){this.cachableJsonRpcMethods=["net_version","eth_chainId","eth_accounts","sequence_getWalletContext","sequence_getNetworks"],this.cachableJsonRpcMethodsByBlock=["eth_call","eth_getCode"],this.cache=void 0,this.cacheByBlock=void 0,this.cacheByBlockResetLock=!1,this.onUpdateCallback=void 0,this.defaultChainId=void 0,this.sendAsyncMiddleware=r=>(n,i,s)=>{if(this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method)){const o=this.cacheKey(n.method,n.params,s||this.defaultChainId),a=this.getCacheValue(o);if(a&&a!==""){i(void 0,{jsonrpc:"2.0",id:n.id,result:a});return}}r(n,(o,a,l)=>{if((this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method))&&a&&a.result&&this.shouldCacheResponse(n,a)){const c=this.cacheKey(n.method,n.params,l||this.defaultChainId);this.cachableJsonRpcMethods.includes(n.method)?this.setCacheValue(c,a.result):this.setCacheByBlockValue(c,a.result)}i(o,a)},s||this.defaultChainId)},this.cacheKey=(r,n,i)=>{let s="";return i?s=`${i}:${r}:`:s=`:${r}:`,!n||n.length===0?s+"[]":s+JSON.stringify(n)},this.getCache=()=>this.cache,this.setCache=r=>{this.cache=r,this.onUpdateCallback&&this.onUpdateCallback()},this.getCacheValue=r=>{if(this.cache[r])return this.cache[r];if(this.cacheByBlock[r])return this.cacheByBlock[r]},this.setCacheValue=(r,n)=>{this.cache[r]=n,this.onUpdateCallback&&this.onUpdateCallback(r,n)},this.setCacheByBlockValue=(r,n)=>{this.cacheByBlock[r]=n,this.cacheByBlockResetLock||(this.cacheByBlockResetLock=!0,setTimeout(()=>{this.cacheByBlockResetLock=!1,this.cacheByBlock={}},1500))},this.shouldCacheResponse=(r,n)=>!(!n||!n.result||r.method==="eth_getCode"&&n.result.length<=2),this.clearCache=()=>{this.cache={},this.cacheByBlock={}},this.cache={},this.cacheByBlock={},this.defaultChainId=e==null?void 0:e.defaultChainId,e!=null&&e.blockCache?(e==null?void 0:e.blockCache)!==!0&&(this.cachableJsonRpcMethodsByBlock=e==null?void 0:e.blockCache):this.cachableJsonRpcMethodsByBlock=[]}onUpdate(e){this.onUpdateCallback=e}}class X9{constructor(e){this.options=void 0,this.sendAsyncMiddleware=r=>(n,i,s)=>{const{id:o,method:a}=n;switch(a){case"net_version":if(this.options.chainId){i(void 0,{jsonrpc:"2.0",id:o,result:`${this.options.chainId}`});return}break;case"eth_chainId":if(this.options.chainId){i(void 0,{jsonrpc:"2.0",id:o,result:Q(this.options.chainId)});return}break;case"eth_accounts":if(this.options.accountAddress){i(void 0,{jsonrpc:"2.0",id:o,result:[Se(this.options.accountAddress)]});return}break;case"sequence_getWalletContext":if(this.options.walletContext){i(void 0,{jsonrpc:"2.0",id:o,result:this.options.walletContext});return}break}r(n,i,s)},this.options=e}}const Z9=t=>(e,r,n)=>{t(e,(i,s)=>{if(!i&&s&&s.error)throw typeof s.error=="string"?new Error(s.error):new Error(s.error.message);r(i,s)},n)},eS=t=>(e,r,n)=>{const i=n?` chainId:${n}`:"";ye.info(`[provider request]${i} id:${e.id} method:${e.method} params:`,e.params),t(e,(s,o)=>{s?ye.warn(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"error:",s):ye.info(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"response:",o),r(s,o)},n)},eq=t=>e=>(r,n,i)=>{const s=t(r),{id:o,method:a}=r;switch(a){case"net_version":n(void 0,{jsonrpc:"2.0",id:o,result:`${s}`});return;case"eth_chainId":n(void 0,{jsonrpc:"2.0",id:o,result:Q(s)});return}e(r,n,i)},tS=["personal_sign","eth_sign","eth_signTypedData","eth_signTypedData_v4","eth_sendTransaction","eth_sendRawTransaction","sequence_sign","sequence_signTypedData_v4","sequence_getWalletContext","sequence_getWalletConfig","sequence_getWalletState","sequence_getNetworks","sequence_updateConfig","sequence_publishConfig","sequence_gasRefundOptions","sequence_getNonce","sequence_relay","eth_decrypt","eth_getEncryptionPublicKey","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"];class tq{constructor(e){this.provider=void 0,this.sendAsyncMiddleware=r=>(n,i,s)=>{if(tS.includes(n.method)){this.provider.sendAsync(n,i,s);return}r(n,i,s)},this.provider=e}}class rq{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...tS],this.provider=void 0,this.rpcUrl=void 0,this.sendAsyncMiddleware=r=>(n,i)=>{if(this.provider&&!this.privateJsonRpcMethods.includes(n.method)){this.provider.send(n.method,n.params).then(s=>{i(void 0,{jsonrpc:"2.0",id:n.id,result:s})}).catch(s=>i(s));return}ye.debug("[public-provider] sending request to signer window",n.method),r(n,i)},e&&this.setRpcUrl(e)}getRpcUrl(){return this.rpcUrl}setRpcUrl(e){!e||e===""?(this.rpcUrl=void 0,this.provider=void 0):(this.rpcUrl=e,this.provider=new $a(e))}}class rS{constructor(){this.singleflightJsonRpcMethods=["eth_chainId","net_version","eth_call","eth_getCode","eth_blockNumber","eth_getBalance","eth_getStorageAt","eth_getTransactionCount","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_getBlockByHash","eth_getBlockByNumber","eth_getTransactionByHash","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionReceipt","eth_getUncleByBlockHashAndIndex","eth_getUncleByBlockNumberAndIndex","eth_getLogs"],this.inflight=void 0,this.sendAsyncMiddleware=e=>(r,n,i)=>{if(!this.singleflightJsonRpcMethods.includes(r.method)){e(r,n,i);return}const s=this.requestKey(r.method,r.params||[],i);if(!this.inflight[s])this.inflight[s]=[];else{this.inflight[s].push({id:r.id,callback:n});return}e(r,(o,a,l)=>{n(o,a);for(let c=0;c{let i="";return n?i=`${n}:${e}:`:i=`:${e}:`,!r||r.length===0?i+"[]":i+JSON.stringify(r)},this.inflight={}}}class nq extends $a{constructor(e,r){super(e,r==null?void 0:r.chainId),this._chainId=void 0,this._sender=void 0,this.send=(a,l)=>this._sender.send(a,l),this.fetch=(a,l)=>{const c={method:a,params:l,id:this._nextId++,jsonrpc:"2.0"};return wu(this.connection,JSON.stringify(c),iq).then(u=>u,u=>{throw u})};const n=r==null?void 0:r.chainId,i=r==null?void 0:r.middlewares,s=r==null?void 0:r.blockCache;this._chainId=n;const o=new Rx(i??[new X9({chainId:n}),new rS,new Mx({defaultChainId:n,blockCache:s})],new Z0(this.fetch,n));this._sender=new Z0(o,n)}async getNetwork(){const e=this._chainId;if(e){const r=It[e],n=(r==null?void 0:r.name)||"",i=r==null?void 0:r.ensAddress;return{name:n,chainId:e,ensAddress:i}}else{const r=await this.send("eth_chainId",[]);return this._chainId=V.from(r).toNumber(),this.getNetwork()}}}function iq(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}const sq=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:ZW,CachedProvider:Mx,ChainId:te,EagerProvider:X9,JsonRpcExternalProvider:XW,JsonRpcProvider:nq,JsonRpcRouter:Rx,JsonRpcSender:Z0,JsonRpcVersion:Xl,NetworkType:Fe,PublicProvider:rq,SigningProvider:tq,SingleflightMiddleware:rS,allNetworks:Ql,allowProviderMiddleware:jp,checkNetworkConfig:JW,createJsonRpcMiddlewareStack:J9,ensureUniqueNetworks:GW,ensureValidNetworks:z9,exceptionProviderMiddleware:Z9,findNetworkConfig:ii,findSupportedNetwork:Ix,getChainId:F9,indexerURL:W9,isJsonRpcHandler:Q9,isJsonRpcProvider:Y9,isNetworkConfig:WW,isValidNetworkConfig:U9,loggingProviderMiddleware:eS,maybeChainId:qW,networkProviderMiddleware:eq,networks:It,networksIndex:YW,nodesURL:G9,relayerURL:q9,sortNetworks:H9,stringTemplate:s1,toChainIdNumber:K9,updateNetworkConfig:KW,validateAndSortNetworks:V9},Symbol.toStringTag,{value:"Module"}));function Sr(){return Sr=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(Nx(i))return ke(["uint8","uint8","address"],[aa.Address,i.weight,i.address]);if(i.isDynamic){const s=X(i.signature);return ke(["uint8","uint8","address","uint16","bytes"],[aa.DynamicSignature,i.weight,i.address,s.length,s])}return ke(["uint8","uint8","bytes"],[aa.EOASignature,i.weight,i.signature])});return ke(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function lS(t,e,r){const n=Su(e),i=await Promise.all(t.signers.map(async s=>{if(Nx(s))return s;if(s.isDynamic){if(!s.address)throw new Error("Dynamic signature part must have address");if(!Ox(s.address,n,s.signature,r))throw new Error(`Invalid dynamic signature part ${s.address}`);return{address:s.address,weight:s.weight,signature:s.signature}}else return{address:ku(n,s.signature),weight:s.weight,signature:s.signature}}));return{version:1,payload:e,subdigest:n,config:{version:1,threshold:t.threshold,signers:i}}}function yf(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let i=V.from(0);const s=t.signers.map(a=>{if(!e.has(a.address))return a;const l=e.get(a.address),c=X(l.signature);return i=i.add(a.weight),l.isDynamic||c.length!==66?Sr({},a,{isDynamic:!0,signature:l.signature,address:a.address}):Sr({},a,{isDynamic:!1,signature:l.signature})});return{encoded:$x({version:1,threshold:t.threshold,signers:s}),weight:i}}const Dx={decode:t=>aS(t),encode:t=>$x(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>lS(t,e,r),encodeSigners:(t,e,r,n)=>yf(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=Dx.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{throw new Error("Signature chaining not supported on v1")},hashSetImageHash:function(t){throw new Error("Image hash not supported on v1")},signaturesOf(t){return t.signers.filter(e=>e.signature!==void 0).map(e=>({address:e.address,signature:e.signature}))},signaturesOfDecoded:function(t){return t.signers.map(e=>e.signature).filter(e=>e!==void 0)}};var vq=Object.freeze({__proto__:null,SignaturePartType:aa,isAddressMember:Nx,isUnrecoveredSignatureMember:sS,isUnrecoveredSignature:oS,decodeSignature:aS,encodeSignature:$x,recoverSignature:lS,encodeSigners:yf,SignatureCoder:Dx});const Bx={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>xe(Kr.encode(["bytes32","uint8","address"],[e,r.weight,r.address])),ke(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>V.from(0),signersOf:t=>t.signers.map(e=>({address:e.address,weight:V.from(e.weight).toNumber()})),fromSimple:t=>{if(!Dt.eq(t.checkpoint))throw new Error("v1 wallet config does not support checkpoint");if(t.subdigests&&t.subdigests.length>0)throw new Error("v1 wallet config does not support subdigests");return{version:1,threshold:t.threshold,signers:t.signers}},update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new ir([...mr.mainModule.abi,...mr.mainModuleUpgradable.abi]),s=[];return(!n||n==="first")&&s.push({to:t,data:i.encodeFunctionData(i.getFunction("updateImplementation"),[r.mainModuleUpgradable]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),s.push({to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[Bx.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),{entrypoint:t,transactions:s}},decodeTransaction:function(t){throw new Error("Function not implemented.")}},toJSON:function(t){const e=t.signers.map(r=>({weight:V.from(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:V.from(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:V.from(n.weight),address:n.address}));return{version:e.version,threshold:V.from(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&!Dt.eq(e.checkpoint))throw new Error("v1 wallet config does not support checkpoint");if(e.add)for(const i of e.add)n.find(s=>s.address===i.address)||n.push({weight:i.weight,address:i.address});if(e.remove)for(const i of e.remove){const s=n.findIndex(o=>o.address===i);s>=0&&n.splice(s,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,signers:n}},buildStubSignature:function(t,e){const r=new Map;for(const[i,s]of e.entries()){r.set(i,{signature:s,isDynamic:!0});const{encoded:o,weight:a}=yf(t,r,[]);if(a.gte(t.threshold))return o}const n=t.signers;for(const{address:i}of n.sort(({weight:s},{weight:o})=>V.from(s).sub(o).toNumber())){r.set(i,{signature:"0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02",isDynamic:!1});const{encoded:o,weight:a}=yf(t,r,[]);if(a.gte(t.threshold))return o}return yf(t,r,[]).encoded}};var yq=Object.freeze({__proto__:null,ConfigCoder:Bx});const cS=1,fS={version:cS,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var qi=Object.freeze({__proto__:null,config:yq,signature:vq,version:cS,DeployedWalletContext:fS});const Lx="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function uS(t){return xe(dS(t))}function dS(t){return ke(["bytes32","bytes32"],[Lx,t])}function hS(t){const e=X(t);if(e.length===64&&Q(e.slice(0,32))===Lx)return Q(e.slice(32,64))}function pq(t){return hS(t)!==void 0}var gq=Object.freeze({__proto__:null,SetImageHashPrefix:Lx,hashSetImageHash:uS,messageSetImageHash:dS,decodeMessageSetImageHash:hS,isMessageSetImageHash:pq});let pr=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),Gt=function(t){return t[t.Signature=0]="Signature",t[t.Address=1]="Address",t[t.DynamicSignature=2]="DynamicSignature",t[t.Node=3]="Node",t[t.Branch=4]="Branch",t[t.Subdigest=5]="Subdigest",t[t.Nested=6]="Nested",t}({});const eh=66;function Sa(t){return t.left!==void 0&&t.right!==void 0}function gc(t){return t.tree!==void 0}function Au(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function th(t){let e=X(t),r;const n=(i,s)=>i?i.right?{left:i,right:s}:{left:i.left,right:s}:{left:s};for(;e.length>0;){const i=e[0];switch(e=e.slice(1),i){case Gt.Signature:{const s=e[0],o=Q(e.slice(1,eh+1));r=n(r,{signature:o,weight:s,unrecovered:!0,isDynamic:!1}),e=e.slice(eh+1)}break;case Gt.Address:{const s=e[0],o=Se(Q(e.slice(1,21)));r=n(r,{address:o,weight:s}),e=e.slice(21)}break;case Gt.DynamicSignature:{const s=e[0],o=Se(Q(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],l=Q(e.slice(24,24+a));r=n(r,{address:o,signature:l,weight:s,unrecovered:!0,isDynamic:!0}),e=e.slice(24+a)}break;case Gt.Node:{const s=Q(e.slice(0,32));r=n(r,{nodeHash:s}),e=e.slice(32)}break;case Gt.Branch:{const s=e[0]<<16|e[1]<<8|e[2],o=th(e.slice(3,3+s));r=n(r,o),e=e.slice(3+s)}break;case Gt.Subdigest:{const s=Q(e.slice(0,32));r=n(r,{subdigest:s}),e=e.slice(32)}break;case Gt.Nested:{const s=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],l=th(e.slice(6,6+a));r=n(r,{weight:s,threshold:o,tree:l}),e=e.slice(6+a)}break;default:throw new Error(`Unknown signature part type: ${i}: ${Q(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class vS extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function la(t,e,r){if(Sa(t)){const[n,i]=await Promise.all([la(t.left,e,r),la(t.right,e,r)]);return{left:n,right:i}}if(gc(t))return{weight:t.weight,threshold:t.threshold,tree:await la(t.tree,e,r)};if(Au(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await Ox(t.address,e,t.signature,r))throw new vS(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:ku(e,t.signature),signature:t.signature,subdigest:e};return t}const Ir={concat:(t,e)=>ke(["bytes","bytes"],[t,e]),node:t=>ke(["uint8","bytes32"],[Gt.Node,t]),branch:t=>{const e=X(t);return ke(["uint8","uint24","bytes"],[Gt.Branch,e.length,e])},nested:(t,e,r)=>{const n=X(r);return ke(["uint8","uint8","uint16","uint24","bytes"],[Gt.Nested,t,e,n.length,n])},subdigest:t=>ke(["uint8","bytes32"],[Gt.Subdigest,t]),signature:(t,e)=>ke(["uint8","uint8","bytes"],[Gt.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=X(r);return ke(["uint8","uint8","address","uint24","bytes"],[Gt.DynamicSignature,t,e,n.length,n])},address:(t,e)=>ke(["uint8","uint8","address"],[Gt.Address,t,e])};function pf(t,e,r,n,i={}){const s=gf(t.tree,e,r,i);return V.from(n).isZero()?{encoded:ke(["uint8","uint16","uint32","bytes"],[pr.NoChainIdDynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:V.from(t.threshold).gt(255)?{encoded:ke(["uint8","uint16","uint32","bytes"],[pr.Dynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:{encoded:ke(["uint8","uint8","uint32","bytes"],[pr.Legacy,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}}function gf(t,e,r,n={}){const i=!n.disableTrim;if(ai(t)){const s=gf(t.left,e,r),o=gf(t.right,e,r),a=Gr(t.left),l=Gr(t.right);return i&&s.weight.eq(0)&&o.weight.eq(0)&&!a&&!l?{encoded:Ir.node(Tn(t)),weight:Dt}:i&&o.weight.eq(0)&&!l?{encoded:Ir.concat(s.encoded,Ir.node(Tn(t.right))),weight:s.weight}:i&&s.weight.eq(0)&&!a?{encoded:Ir.concat(Ir.node(Tn(t.left)),Ir.branch(o.encoded)),weight:o.weight}:{encoded:Ir.concat(s.encoded,Ir.branch(o.encoded)),weight:s.weight.add(o.weight)}}if(ps(t)){const s=gf(t.tree,e,r);return i&&s.weight.eq(0)?{encoded:Ir.node(Tn(t)),weight:Dt}:{encoded:Ir.nested(t.weight,t.threshold,s.encoded),weight:s.weight}}if(gs(t))return{encoded:Ir.node(Tn(t)),weight:Dt};if(ys(t)){const s=r.includes(t.subdigest);return{encoded:Ir.subdigest(t.subdigest),weight:s?QE:Dt}}if(Gr(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:Ir.dynamicSignature(t.weight,t.address,a),weight:V.from(t.weight)}:{encoded:Ir.signature(t.weight,a),weight:V.from(t.weight)}}else return{encoded:Ir.address(t.weight,t.address),weight:Dt};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function jx(t){return Ux(t)?jx(t.suffix[t.suffix.length-1]):t.config}function Fx(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function _u(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(Fx)}function yS(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function Ux(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(yS)}function o1(t){const e=X(t),r=e[0];switch(r){case pr.Legacy:return{version:2,type:pr.Legacy,decoded:zd(e)};case pr.Dynamic:return{version:2,type:pr.Dynamic,decoded:zd(e.slice(1))};case pr.NoChainIdDynamic:return{version:2,type:pr.NoChainIdDynamic,decoded:zd(e.slice(1))};case pr.Chained:return pS(e);default:throw new Error(`Invalid signature type: ${r}`)}}function zd(t){const e=X(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],i=th(e.slice(6));return{threshold:r,checkpoint:n,tree:i}}function pS(t){const e=X(t),r=e[0];if(r!==pr.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let i=1;for(;iX(to(s))),i=ke(n.map(()=>["uint24","bytes"]).flat(),n.map(s=>[s.length,s]).flat());return ke(["uint8","bytes"],[pr.Chained,i])}function to(t){if(os(t))return Q(t);if(_u(t)||Ux(t))return a1(to(t),(t.suffix||[]).map(to));const e=Fx(t)?t.decoded:t.config;switch(t.type){case pr.Legacy:if(V.from(e.threshold).gt(255))throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return Fp(e);case pr.NoChainIdDynamic:case pr.Dynamic:return ke(["uint8","bytes"],[t.type,Fp(e)]);case pr.Chained:throw new Error("Unreachable code: Chained signature should be handled above");default:throw new Error(`Invalid signature type: ${t.type}`)}}function Fp(t){return ke(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,mf(t.tree)])}function mf(t){if(ai(t)||Sa(t)){const e=X(mf(t.right)),r=X(mf(t.left));return ai(t.right)||Sa(t.right)?ke(["bytes","uint8","uint24","bytes"],[r,Gt.Branch,e.length,e]):ke(["bytes","bytes"],[r,e])}if(ps(t)||gc(t)){const e=X(mf(t.tree));return ke(["uint8","uint8","uint16","uint24","bytes"],[Gt.Nested,t.weight,t.threshold,e.length,e])}if(Au(t)||Gr(t)&&t.signature!==void 0){const e=X(t.signature);if(t.isDynamic||e.length!==eh){if(!t.address)throw new Error("Dynamic signature leaf must have address");return ke(["uint8","uint8","address","uint24","bytes"],[Gt.DynamicSignature,t.weight,t.address,e.length,e])}else return ke(["uint8","uint8","bytes"],[Gt.Signature,t.weight,e])}if(Gr(t))return ke(["uint8","uint8","address"],[Gt.Address,t.weight,t.address]);if(gs(t))return ke(["uint8","bytes32"],[Gt.Node,t.nodeHash]);if(ys(t))return ke(["uint8","bytes32"],[Gt.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function xf(t){return ai(t)?[...xf(t.left),...xf(t.right)]:ps(t)?xf(t.tree):Gr(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function bf(t){return Sa(t)?[...bf(t.left),...bf(t.right)]:gc(t)?bf(t.tree):Au(t)?[t.signature]:[]}function Vd(t){return Sa(t)?[...Vd(t.left),...Vd(t.right)]:gc(t)?Vd(t.tree):ys(t)?[t.subdigest]:[]}async function rh(t){const e=typeof t=="string"?o1(t):t;if(_u(e)){const n=await Promise.all([rh(Sr({},e,{suffix:void 0})),...e.suffix.map(i=>rh(i))]);return a1(n[0],n.slice(1))}const{trimmed:r}=await wf(e.decoded.tree);return to(Sr({},e,{decoded:Sr({},e.decoded,{tree:r})}))}async function wf(t,e=!0){if(Sa(t)){const[r,n]=await Promise.all([wf(t.left),wf(t.right)]);if(r.weight===0&&n.weight===0)try{const i=await la(t,j0,void 0);return{weight:0,trimmed:{nodeHash:Tn(i)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(gc(t)){const r=await wf(t.tree);if(r.weight===0)try{const n=await la(t,j0,void 0);return{weight:0,trimmed:{nodeHash:Tn(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return gs(t)&&bS(t.nodeHash)?{weight:0,trimmed:Sr({},xS(t.nodeHash))}:Au(t)||Gr(t)&&t.signature!==void 0?{weight:V.from(t.weight).toNumber(),trimmed:t}:!e&&ys(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const l1={decode:t=>o1(t),encode:t=>to(t),trim:t=>rh(t),supportsNoChainId:!0,recover:(t,e,r)=>zx(t,e,r),encodeSigners:(t,e,r,n)=>pf(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=l1.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=os(t)?t:to(t),i=r.map(s=>os(s)?s:to(s));return a1(n,i)},hashSetImageHash:function(t){return uS(t)},signaturesOf(t){return xf(t.tree)},signaturesOfDecoded:function(t){return bf(t.decoded.tree)}};var mq=Object.freeze({__proto__:null,SignatureType:pr,SignaturePartType:Gt,SignaturePartTypeLength:eh,isUnrecoveredNode:Sa,isUnrecoveredNestedLeaf:gc,isUnrecoveredSignatureLeaf:Au,decodeSignatureTree:th,InvalidSignatureLeafError:vS,recoverTopology:la,partEncoder:Ir,encodeSigners:pf,encodeTree:gf,deepestConfigOfSignature:jx,isUnrecoveredSignature:Fx,isUnrecoveredChainedSignature:_u,isSignature:yS,isChainedSignature:Ux,decodeSignature:o1,decodeSignatureBody:zd,decodeChainedSignature:pS,setImageHashStruct:gS,recoverSignature:zx,encodeChain:a1,encodeSignature:to,encodeSignatureBody:Fp,encodeSignatureTree:mf,signaturesOf:xf,signaturesOfDecoded:bf,subdigestsOfDecoded:Vd,trimSignature:rh,trimUnrecoveredTree:wf,SignatureCoder:l1});function Gr(t){return t.address!==void 0&&t.weight!==void 0}function ys(t){return t.subdigest!==void 0&&t.address===void 0}function Cf(t){return ai(t)?JSON.stringify({left:Cf(t.left),right:Cf(t.right)}):ps(t)?JSON.stringify({weight:V.from(t.weight).toString(),threshold:V.from(t.threshold).toString(),tree:Cf(t.tree)}):Gr(t)?JSON.stringify({address:t.address,weight:V.from(t.weight).toString()}):JSON.stringify(t)}function Ef(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:Ef(e.left),right:Ef(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:V.from(e.weight),threshold:V.from(e.threshold),tree:Ef(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:V.from(e.weight)}:e}function ps(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function gs(t){return t.nodeHash!==void 0}function Vx(t){return Gr(t)||ys(t)||ps(t)||gs(t)}function ai(t){return t.left!==void 0&&t.right!==void 0}function xq(t){return ai(t)||Vx(t)}function mS(t){return ke(["uint96","address"],[t.weight,t.address])}function xS(t){const e=X(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=V.from(e.slice(0,12)),n=Se(Q(e.slice(12)));return{weight:r,address:n}}function bS(t){const e=X(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function Tn(t){if(Gr(t))return mS(t);if(ys(t))return Zs(["string","bytes32"],[`Sequence static digest: `,t.subdigest]);if(ps(t)){const e=Tn(t.tree);return Zs(["string","bytes32","uint256","uint256"],[`Sequence nested config: -`,e,t.threshold,t.weight])}return gs(t)?t.nodeHash:Zs(["bytes32","bytes32"],[Tn(t.left),Tn(t.right)])}function bq(t){const e=[];let r=t;for(;!Vx(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function wq(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function Hx(t){return Zs(["bytes32","uint256"],[Zs(["bytes32","uint256"],[Tn(t.tree),t.threshold]),t.checkpoint])}function wS(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function Rl(t){return Gr(t)||ys(t)?[t]:ps(t)?[{threshold:t.threshold,weight:t.weight,members:Rl(t.tree)}]:gs(t)?[]:[...Rl(t.left),...Rl(t.right)]}function Up(t){return gs(t)?!0:ai(t)?Up(t.left)||Up(t.right):!1}function Cq(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:Rl(t.tree)}}const CS=(t,e)=>t.map(r=>wS(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function Wx(t){if(t.length===0)throw new Error("Empty members array");return CS(t,Wx).reduce((r,n)=>({left:r,right:n}))}function qx(t){if(t.length===0)throw new Error("Empty members array");const e=CS(t,qx);for(let r=e.length;r>1;r=r/2)for(let n=0;n=r?e[n]=e[i]:e[n]={left:e[i],right:e[s]}}return e[0]}function Gx(t){return t.length>8?qx(t):Wx(t)}function ES(t,e=Gx){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function nh(t,e){return ys(t)?t.subdigest===e:ai(t)?nh(t.left,e)||nh(t.right,e):!1}function zp(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();ps(n)?e.push(n.tree):ai(n)?(e.push(n.left),e.push(n.right)):Gr(n)&&r.add({address:n.address,weight:H.from(n.weight).toNumber()})}return Array.from(r)}function ih(t){return ai(t)?ih(t.left)&&ih(t.right):!gs(t)}const c1={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>Hx(t),hasSubdigest:(t,e)=>nh(t.tree,e),checkpointOf:t=>H.from(t.checkpoint),signersOf:t=>zp(t.tree),fromSimple:t=>{var e;return ES(Sr({},t,{members:[...t.signers,...((e=t.subdigests)!=null?e:[]).map(r=>({subdigest:r}))]}))},isComplete:t=>ih(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new ir(mr.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[c1.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,i;const s=new ir(mr.mainModuleUpgradable.abi);if(t.transactions.length!==1)throw new Error("Invalid transaction bundle, expected 1 transaction");const o=t.transactions[0].data;if(!o)throw new Error("Invalid transaction bundle, expected data");const a=s.decodeFunctionData(s.getFunction("updateImageHash"),o);if(!a)throw new Error("Invalid transaction bundle, expected valid data");if(t.transactions[0].to!==t.entrypoint)throw new Error("Invalid transaction bundle, expected to be sent to entrypoint");if(t.transactions[0].delegateCall)throw new Error("Invalid transaction bundle, expected not to be a delegateCall");if(!t.transactions[0].revertOnError)throw new Error("Invalid transaction bundle, expected revertOnError");if(!Dt.eq((e=(r=t.transactions[0])==null?void 0:r.value)!=null?e:0))throw new Error("Invalid transaction bundle, expected value to be 0");if(!Dt.eq((n=(i=t.transactions[0])==null?void 0:i.gasLimit)!=null?n:0))throw new Error("Invalid transaction bundle, expected value to be 0");return{address:t.entrypoint,newImageHash:a[0],kind:void 0}}},toJSON:function(t){return JSON.stringify({version:t.version,threshold:H.from(t.threshold).toString(),checkpoint:H.from(t.checkpoint).toString(),tree:Cf(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:H.from(e.threshold),checkpoint:H.from(e.checkpoint),tree:Ef(e.tree)}},editConfig:function(t,e){var r,n;const i=Rl(t.tree);if(e.add)for(const s of e.add)i.find(o=>Gr(o)&&o.address===s.address)||i.push({address:s.address,weight:s.weight});if(e.remove)for(const s of e.remove){const o=i.findIndex(a=>Gr(a)&&a.address===s);o>=0&&i.splice(o,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,checkpoint:(n=e.checkpoint)!=null?n:t.checkpoint,tree:Gx(i)}},buildStubSignature:function(t,e){const r=new Map;for(const[i,s]of e.entries()){r.set(i,{signature:s,isDynamic:!0});const{encoded:o,weight:a}=pf(t,r,[],0);if(a.gte(t.threshold))return o}const n=zp(t.tree);for(const{address:i}of n.sort(({weight:s},{weight:o})=>s-o)){r.set(i,{signature:"0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02",isDynamic:!1});const{encoded:o,weight:a}=pf(t,r,[],0);if(a.gte(t.threshold))return o}return pf(t,r,[],0).encoded}};var Eq=Object.freeze({__proto__:null,isSignerLeaf:Gr,isSubdigestLeaf:ys,topologyToJSON:Cf,topologyFromJSON:Ef,isNestedLeaf:ps,isNodeLeaf:gs,isLeaf:Vx,isNode:ai,isTopology:xq,encodeSignerLeaf:mS,decodeSignerLeaf:xS,isEncodedSignerLeaf:bS,hashNode:Tn,leftFace:bq,isWalletConfig:wq,imageHash:Hx,isSimpleNestedMember:wS,topologyToMembers:Rl,hasUnknownNodes:Up,toSimpleWalletConfig:Cq,legacyTopologyBuilder:Wx,merkleTopologyBuilder:qx,optimized2SignersTopologyBuilder:Gx,toWalletConfig:ES,hasSubdigest:nh,signersOf:zp,isComplete:ih,ConfigCoder:c1}),Sq=Object.freeze({__proto__:null});const kq={config:c1,signature:l1},SS=2,kS={version:SS,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Ae=Object.freeze({__proto__:null,config:Eq,signature:mq,context:Sq,chained:gq,coders:kq,version:SS,DeployedWalletContext:kS});function Vp(t,e){const r=pe(Se(["bytes","bytes32"],[t.walletCreationCode,He(t.mainModule,32)])),n=pe(Se(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return we(qt(n,12))}async function Aq(t,e,r,n,i,s){return(await Promise.all(LS.map(async a=>{try{const l=a.signature.SignatureCoder.decode(Q(r)),c=await a.signature.SignatureCoder.recover(l,{address:t,digest:Q(e),chainId:n},i),f=a.config.ConfigCoder.imageHashOf(c.config);if(Vp(s[a.version],f).toLowerCase()===t.toLowerCase())return!0;const h=await a.signature.SignatureCoder.recover(l,{address:t,digest:Q(e),chainId:n},i),y=a.config.ConfigCoder.imageHashOf(h.config);return Vp(s[a.version],y).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function _q(t){const e=Object.keys(t).length;for(let r=1;r<=e;r++){const n=t[r];if(!n||n.version!==r)return!1}return!0}function Tq(t){const e=Object.keys(t).length;return t[e]}const Pq={1:fS,2:kS};var Iq=Object.freeze({__proto__:null,addressOf:Vp,isValidCounterfactual:Aq,isValidVersionedContext:_q,latestContext:Tq,defaultContexts:Pq});const f1=`tuple( +`,e,t.threshold,t.weight])}return gs(t)?t.nodeHash:Zs(["bytes32","bytes32"],[Tn(t.left),Tn(t.right)])}function bq(t){const e=[];let r=t;for(;!Vx(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function wq(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function Hx(t){return Zs(["bytes32","uint256"],[Zs(["bytes32","uint256"],[Tn(t.tree),t.threshold]),t.checkpoint])}function wS(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function Rl(t){return Gr(t)||ys(t)?[t]:ps(t)?[{threshold:t.threshold,weight:t.weight,members:Rl(t.tree)}]:gs(t)?[]:[...Rl(t.left),...Rl(t.right)]}function Up(t){return gs(t)?!0:ai(t)?Up(t.left)||Up(t.right):!1}function Cq(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:Rl(t.tree)}}const CS=(t,e)=>t.map(r=>wS(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function Wx(t){if(t.length===0)throw new Error("Empty members array");return CS(t,Wx).reduce((r,n)=>({left:r,right:n}))}function qx(t){if(t.length===0)throw new Error("Empty members array");const e=CS(t,qx);for(let r=e.length;r>1;r=r/2)for(let n=0;n=r?e[n]=e[i]:e[n]={left:e[i],right:e[s]}}return e[0]}function Gx(t){return t.length>8?qx(t):Wx(t)}function ES(t,e=Gx){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function nh(t,e){return ys(t)?t.subdigest===e:ai(t)?nh(t.left,e)||nh(t.right,e):!1}function zp(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();ps(n)?e.push(n.tree):ai(n)?(e.push(n.left),e.push(n.right)):Gr(n)&&r.add({address:n.address,weight:V.from(n.weight).toNumber()})}return Array.from(r)}function ih(t){return ai(t)?ih(t.left)&&ih(t.right):!gs(t)}const c1={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>Hx(t),hasSubdigest:(t,e)=>nh(t.tree,e),checkpointOf:t=>V.from(t.checkpoint),signersOf:t=>zp(t.tree),fromSimple:t=>{var e;return ES(Sr({},t,{members:[...t.signers,...((e=t.subdigests)!=null?e:[]).map(r=>({subdigest:r}))]}))},isComplete:t=>ih(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new ir(mr.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[c1.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,i;const s=new ir(mr.mainModuleUpgradable.abi);if(t.transactions.length!==1)throw new Error("Invalid transaction bundle, expected 1 transaction");const o=t.transactions[0].data;if(!o)throw new Error("Invalid transaction bundle, expected data");const a=s.decodeFunctionData(s.getFunction("updateImageHash"),o);if(!a)throw new Error("Invalid transaction bundle, expected valid data");if(t.transactions[0].to!==t.entrypoint)throw new Error("Invalid transaction bundle, expected to be sent to entrypoint");if(t.transactions[0].delegateCall)throw new Error("Invalid transaction bundle, expected not to be a delegateCall");if(!t.transactions[0].revertOnError)throw new Error("Invalid transaction bundle, expected revertOnError");if(!Dt.eq((e=(r=t.transactions[0])==null?void 0:r.value)!=null?e:0))throw new Error("Invalid transaction bundle, expected value to be 0");if(!Dt.eq((n=(i=t.transactions[0])==null?void 0:i.gasLimit)!=null?n:0))throw new Error("Invalid transaction bundle, expected value to be 0");return{address:t.entrypoint,newImageHash:a[0],kind:void 0}}},toJSON:function(t){return JSON.stringify({version:t.version,threshold:V.from(t.threshold).toString(),checkpoint:V.from(t.checkpoint).toString(),tree:Cf(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:V.from(e.threshold),checkpoint:V.from(e.checkpoint),tree:Ef(e.tree)}},editConfig:function(t,e){var r,n;const i=Rl(t.tree);if(e.add)for(const s of e.add)i.find(o=>Gr(o)&&o.address===s.address)||i.push({address:s.address,weight:s.weight});if(e.remove)for(const s of e.remove){const o=i.findIndex(a=>Gr(a)&&a.address===s);o>=0&&i.splice(o,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,checkpoint:(n=e.checkpoint)!=null?n:t.checkpoint,tree:Gx(i)}},buildStubSignature:function(t,e){const r=new Map;for(const[i,s]of e.entries()){r.set(i,{signature:s,isDynamic:!0});const{encoded:o,weight:a}=pf(t,r,[],0);if(a.gte(t.threshold))return o}const n=zp(t.tree);for(const{address:i}of n.sort(({weight:s},{weight:o})=>s-o)){r.set(i,{signature:"0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02",isDynamic:!1});const{encoded:o,weight:a}=pf(t,r,[],0);if(a.gte(t.threshold))return o}return pf(t,r,[],0).encoded}};var Eq=Object.freeze({__proto__:null,isSignerLeaf:Gr,isSubdigestLeaf:ys,topologyToJSON:Cf,topologyFromJSON:Ef,isNestedLeaf:ps,isNodeLeaf:gs,isLeaf:Vx,isNode:ai,isTopology:xq,encodeSignerLeaf:mS,decodeSignerLeaf:xS,isEncodedSignerLeaf:bS,hashNode:Tn,leftFace:bq,isWalletConfig:wq,imageHash:Hx,isSimpleNestedMember:wS,topologyToMembers:Rl,hasUnknownNodes:Up,toSimpleWalletConfig:Cq,legacyTopologyBuilder:Wx,merkleTopologyBuilder:qx,optimized2SignersTopologyBuilder:Gx,toWalletConfig:ES,hasSubdigest:nh,signersOf:zp,isComplete:ih,ConfigCoder:c1}),Sq=Object.freeze({__proto__:null});const kq={config:c1,signature:l1},SS=2,kS={version:SS,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var _e=Object.freeze({__proto__:null,config:Eq,signature:mq,context:Sq,chained:gq,coders:kq,version:SS,DeployedWalletContext:kS});function Vp(t,e){const r=xe(ke(["bytes","bytes32"],[t.walletCreationCode,Je(t.mainModule,32)])),n=xe(ke(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return Se(qt(n,12))}async function Aq(t,e,r,n,i,s){return(await Promise.all(BS.map(async a=>{try{const l=a.signature.SignatureCoder.decode(Q(r)),c=await a.signature.SignatureCoder.recover(l,{address:t,digest:Q(e),chainId:n},i),f=a.config.ConfigCoder.imageHashOf(c.config);if(Vp(s[a.version],f).toLowerCase()===t.toLowerCase())return!0;const h=await a.signature.SignatureCoder.recover(l,{address:t,digest:Q(e),chainId:n},i),y=a.config.ConfigCoder.imageHashOf(h.config);return Vp(s[a.version],y).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function _q(t){const e=Object.keys(t).length;for(let r=1;r<=e;r++){const n=t[r];if(!n||n.version!==r)return!1}return!0}function Tq(t){const e=Object.keys(t).length;return t[e]}const Pq={1:fS,2:kS};var Iq=Object.freeze({__proto__:null,addressOf:Vp,isValidCounterfactual:Aq,isValidVersionedContext:_q,latestContext:Tq,defaultContexts:Pq});const f1=`tuple( bool delegateCall, bool revertOnError, uint256 gasLimit, address target, uint256 value, bytes data -)[]`;function Rq(t,e,r,n){return Sr({},t,{chainId:r,intent:{id:n,wallet:e}})}function Mq(t){return pe(Kr.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function Oq(t){const e=Kr.decode(["uint256",f1],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function AS(t,e){return Kr.encode(["uint256",f1],[t,su(e)])}function _S(t,e){return pe(AS(t,e))}function Nq(t,e,r,n){return Su({address:t,chainId:e,digest:_S(r,n)})}function $q(t,e,r){return Su({address:t,chainId:e,digest:pe(Kr.encode(["string",f1],["guest:",su(r)]))})}function TS(t,e){return e.map(r=>Kx(t,r))}function Kx(t,e){if(e.to&&e.to!==tx)return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit||0,to:e.to,value:e.value||0,data:e.data||"0x"}};{const r=new ir(mr.mainModule.abi),n=r.encodeFunctionData(r.getFunction("createContract"),[e.data]);return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit,to:t,value:e.value||0,data:n}}}}function u1(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function PS(t){return t.every(u1)}function su(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:e.gasLimit!==void 0?e.gasLimit:Dt,target:(r=e.to)!=null?r:tx,value:e.value!==void 0?e.value:Dt,data:e.data!==void 0?e.data:[]}})}function Dq(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function Lq(t,e){const r=H.from(t),n=H.from(e),i=YE.pow(H.from(96));if(!n.div(i).eq(Dt))throw new Error("Space already encoded");return n.add(r.mul(i))}function Bq(t){const e=H.from(t),r=YE.pow(H.from(96));return[e.div(r),e.mod(r)]}function jq(t,e){return Array.isArray(e)?PS(e)?e:TS(t,e).map(n=>n.transaction):u1(e)?[e]:[Kx(t,e).transaction]}function IS(t){return t!==void 0&&t.entrypoint!==void 0&&t.chainId!==void 0&&t.transactions!==void 0&&t.nonce!==void 0&&t.intent!==void 0&&t.intent.id!==void 0&&t.intent.wallet!==void 0&&Array.isArray(t.transactions)&&t.transactions.reduce((e,r)=>e&&u1(r),!0)}function RS(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&IS(t)}function Fq(t){const e=new ir(mr.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),RS(t)?[su(t.transactions),t.nonce,t.signature]:[su(t.transactions),0,[]])}const MS="0x61c2926c",OS=`tuple( +)[]`;function Rq(t,e,r,n){return Sr({},t,{chainId:r,intent:{id:n,wallet:e}})}function Mq(t){return xe(Kr.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function Oq(t){const e=Kr.decode(["uint256",f1],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function AS(t,e){return Kr.encode(["uint256",f1],[t,su(e)])}function _S(t,e){return xe(AS(t,e))}function Nq(t,e,r,n){return Su({address:t,chainId:e,digest:_S(r,n)})}function $q(t,e,r){return Su({address:t,chainId:e,digest:xe(Kr.encode(["string",f1],["guest:",su(r)]))})}function TS(t,e){return e.map(r=>Kx(t,r))}function Kx(t,e){if(e.to&&e.to!==tx)return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit||0,to:e.to,value:e.value||0,data:e.data||"0x"}};{const r=new ir(mr.mainModule.abi),n=r.encodeFunctionData(r.getFunction("createContract"),[e.data]);return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit,to:t,value:e.value||0,data:n}}}}function u1(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function PS(t){return t.every(u1)}function su(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:e.gasLimit!==void 0?e.gasLimit:Dt,target:(r=e.to)!=null?r:tx,value:e.value!==void 0?e.value:Dt,data:e.data!==void 0?e.data:[]}})}function Dq(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function Bq(t,e){const r=V.from(t),n=V.from(e),i=YE.pow(V.from(96));if(!n.div(i).eq(Dt))throw new Error("Space already encoded");return n.add(r.mul(i))}function Lq(t){const e=V.from(t),r=YE.pow(V.from(96));return[e.div(r),e.mod(r)]}function jq(t,e){return Array.isArray(e)?PS(e)?e:TS(t,e).map(n=>n.transaction):u1(e)?[e]:[Kx(t,e).transaction]}function IS(t){return t!==void 0&&t.entrypoint!==void 0&&t.chainId!==void 0&&t.transactions!==void 0&&t.nonce!==void 0&&t.intent!==void 0&&t.intent.id!==void 0&&t.intent.wallet!==void 0&&Array.isArray(t.transactions)&&t.transactions.reduce((e,r)=>e&&u1(r),!0)}function RS(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&IS(t)}function Fq(t){const e=new ir(mr.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),RS(t)?[su(t.transactions),t.nonce,t.signature]:[su(t.transactions),0,[]])}const MS="0x61c2926c",OS=`tuple( bool delegateCall, bool revertOnError, uint256 gasLimit, address target, uint256 value, bytes data -)[]`,Hp=(t,e)=>{const r=[],n=new ir(mr.mainModule.abi);for(const i of e){const s=X(i.data||"0x");if(i.to===t&&Q(s.slice(0,4))===MS){const o=s.slice(4),a=Kr.decode([OS],o)[0];r.push(...Hp(i.to,a.map(l=>Sr({},l,{to:l.target}))))}else try{const o=n.decodeFunctionData("execute",s)[0],a=Hp(t,o.map(l=>Sr({},l,{to:l.target})));r.push(...a)}catch{r.push(i)}}return r};var Uq=Object.freeze({__proto__:null,MetaTransactionsType:f1,intendTransactionBundle:Rq,intendedTransactionID:Mq,unpackMetaTransactionsData:Oq,packMetaTransactionsData:AS,digestOfTransactions:_S,subdigestOfTransactions:Nq,subdigestOfGuestModuleTransactions:$q,toSequenceTransactions:TS,toSequenceTransaction:Kx,isSequenceTransaction:u1,hasSequenceTransactions:PS,sequenceTxAbiEncode:su,fromTxAbiEncode:Dq,encodeNonce:Lq,decodeNonce:Bq,fromTransactionish:jq,isTransactionBundle:IS,isSignedTransactionBundle:RS,encodeBundleExecData:Fq,selfExecuteSelector:MS,selfExecuteAbi:OS,unwind:Hp});const NS="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",zq="0x6492649264926492649264926492649264926492649264926492649264926492";async function $S(t,e,r,n){return await t.call({data:Ve([NS,new sx().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}var Vq=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:NS,EIP_6492_SUFFIX:zq,validateEIP6492Offchain:$S});class Hq{constructor(e){this.provider=e,this.isDeployedCache=new Set}module(e){return new Na(e,[...mr.mainModuleUpgradable.abi,...mr.mainModule.abi,...mr.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(i=>X(i))).length!==0;return n&&this.isDeployedCache.add(e),n}async implementation(e){const r=Kr.encode(["address"],[e]),n=await this.provider.getStorageAt(e,r).then(i=>X(i));if(n.length===20)return we(Q(n));if(n.length===32)return Kr.decode(["address"],n)[0]}async imageHash(e){try{return await this.module(e).imageHash()}catch{}}async nonce(e,r=0){try{return await this.module(e).readNonce(r)}catch(n){if(!await this.isDeployed(e))return 0;throw n}}async isValidSignature(e,r,n){return $S(this.provider,e,r,n)}}var Wq=Object.freeze({__proto__:null,OnChainReader:Hq});function qq(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var ce=Object.freeze({__proto__:null,config:oq,signature:aq,context:Iq,signer:hq,EIP1271:fq,transaction:Uq,reader:Wq,EIP6492:Vq,isWalletSignRequestMetadata:qq});const Wp=[{config:Lx,signature:Dx},{config:c1,signature:l1}];function DS(t){const e=t-1;if(e<0||e>=Wp.length)throw new Error(`No coder for version: ${t}`);return Wp[e]}function Gq(t){return DS(t)}var Er=Object.freeze({__proto__:null,ALL_CODERS:Wp,coderFor:DS,genericCoderFor:Gq});const LS=[qi,Ae],Kq=Object.freeze(Object.defineProperty({__proto__:null,allVersions:LS,commons:ce,universal:Er,v1:qi,v2:Ae},Symbol.toStringTag,{value:"Module"}));function Jq(t,e,r){for(let n=0;ne.version)&&(e=r);if(e===void 0)throw new Error("No migrations");return e}async getAllMigratePresignedTransaction(e){const{address:r,fromImageHash:n,fromVersion:i,chainId:s}=e;let o=n,a=i;const l=Object.values(this.contexts),c=[];for(let f=1;fX(s).length===0))return n5;if(!n.provider)throw new Error("signer.provider is not set, but is required");return n.provider.estimateGas({from:e,to:i.to,data:i.data,value:i.value})}))).map(i=>({executed:!0,succeeded:!0,gasUsed:H.from(i).toNumber(),gasLimit:H.from(i).toNumber()}))}async getNonce(e,r,n){if(!this.provider)throw new Error("provider is not set");if(await this.provider.getCode(e)==="0x")return 0;r===void 0&&(r=0);const s=await new Na(e,mr.mainModule.abi,this.provider).readNonce(r,{blockTag:n});return ce.transaction.encodeNonce(r,s)}async wait(e,r,n=this.waitPollRate,i=5){var s=this;typeof e!="string"&&(e=ce.transaction.intendedTransactionID(e));let o=!1;const a=async function(f,u){let h=0;for(;!o;){try{return await f()}catch(y){if(h++,i!==void 0&&h>=i)throw ve.error(`giving up after ${h} failed attempts${u?`: ${u}`:""}`,y),y;ve.warn(`attempt #${h} failed${u?`: ${u}`:""}`,y)}n>0&&await new Promise(y=>setTimeout(y,n))}throw new Error(`timed out after ${h} failed attempts${u?`: ${u}`:""}`)},l=async function(){let f=s.fromBlockLog;if(f<0&&(f=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number")+f),typeof e!="string")throw new Error("impossible");const u=e.replace("0x","");for(;!o;){const h=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number"),y=await a(()=>s.provider.getLogs({fromBlock:Math.max(0,f-s.deltaBlocksLog),toBlock:h,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,f-s.deltaBlocksLog)} to ${h}`);f=h;const p=(await Promise.all(y.map(k=>a(()=>s.provider.getTransactionReceipt(k.transactionHash),`unable to get receipt for transaction ${k.transactionHash}`)))).find(k=>k.logs.find(w=>w.topics.length===0&&w.data.replace("0x","")===u||w.topics.length===1&&w.topics[0]==="0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7"&&w.data.length>=64&&w.data.replace("0x","").startsWith(u)));if(p)return ho({receipt:p},await a(()=>s.provider.getTransaction(p.transactionHash),`unable to get transaction ${p.transactionHash}`));o||await new Promise(k=>setTimeout(k,n))}throw new Error(`Timeout waiting for transaction receipt ${e}`)};return r!==void 0?Promise.race([l(),new Promise((c,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):l()}}function rG(t){return t.signer!==void 0&&fo.isSigner(t.signer)}class nG extends zS{constructor(e){if(super(fo.isSigner(e)?{provider:e.provider}:ho({},e,{provider:e.signer.provider})),this.signer=void 0,this.txnOptions=void 0,this.signer=fo.isSigner(e)?e:e.signer,!this.signer.provider)throw new Error("Signer must have a provider")}async getFeeOptions(e,...r){return{options:[]}}async getFeeOptionsRaw(e,r,n){return{options:[]}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}setTransactionOptions(e){this.txnOptions=e}async relay(e,r,n=!0){r!==void 0&&ve.warn("LocalRelayer doesn't accept fee quotes");const i=ce.transaction.encodeBundleExecData(e),s=this.signer.sendTransaction(ho({to:e.entrypoint,data:i},this.txnOptions,{gasLimit:9e6}));if(n){const o=await s;return o.receipt=await o.wait(),o}else return s}}const iG="v1",sG="v0.4.0",oG="950b00c821b56110c64d947312b9dea3e197e207";let Us=function(t){return t.UNKNOWN="UNKNOWN",t.DROPPED="DROPPED",t.QUEUED="QUEUED",t.SENT="SENT",t.SUCCEEDED="SUCCEEDED",t.PARTIALLY_FAILED="PARTIALLY_FAILED",t.FAILED="FAILED",t}({}),aG=function(t){return t.SEND="SEND",t.RECEIVE="RECEIVE",t.BRIDGE_DEPOSIT="BRIDGE_DEPOSIT",t.BRIDGE_WITHDRAW="BRIDGE_WITHDRAW",t.BURN="BURN",t.UNKNOWN="UNKNOWN",t}({}),lG=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),cG=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class VS{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Relayer/",this.ping=n=>this.fetch(this.url("Ping"),Ue({},n)).then(i=>ze(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Ue({},n)).then(i=>ze(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Ue({},n)).then(i=>ze(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),Ue({},n)).then(i=>ze(i).then(s=>({data:s.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),Ue({},n)).then(i=>ze(i).then(s=>({chainID:s.chainID}))),this.sendMetaTxn=(n,i)=>this.fetch(this.url("SendMetaTxn"),Ue(n,i)).then(s=>ze(s).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,i)=>this.fetch(this.url("GetMetaTxnNonce"),Ue(n,i)).then(s=>ze(s).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,i)=>this.fetch(this.url("GetMetaTxnReceipt"),Ue(n,i)).then(s=>ze(s).then(o=>({receipt:o.receipt}))),this.simulate=(n,i)=>this.fetch(this.url("Simulate"),Ue(n,i)).then(s=>ze(s).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,i)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),Ue(n,i)).then(s=>ze(s).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),Ue({},n)).then(i=>ze(i).then(s=>({isFeeRequired:s.isFeeRequired,tokens:s.tokens}))),this.feeOptions=(n,i)=>this.fetch(this.url("FeeOptions"),Ue(n,i)).then(s=>ze(s).then(o=>({options:o.options,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,i)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),Ue(n,i)).then(s=>ze(s).then(o=>({options:o.options}))),this.sentTransactions=(n,i)=>this.fetch(this.url("SentTransactions"),Ue(n,i)).then(s=>ze(s).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,i)=>this.fetch(this.url("PendingTransactions"),Ue(n,i)).then(s=>ze(s).then(o=>({page:o.page,transactions:o.transactions}))),this.getGasTank=(n,i)=>this.fetch(this.url("GetGasTank"),Ue(n,i)).then(s=>ze(s).then(o=>({gasTank:o.gasTank}))),this.addGasTank=(n,i)=>this.fetch(this.url("AddGasTank"),Ue(n,i)).then(s=>ze(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.updateGasTank=(n,i)=>this.fetch(this.url("UpdateGasTank"),Ue(n,i)).then(s=>ze(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.getGasSponsor=(n,i)=>this.fetch(this.url("GetGasSponsor"),Ue(n,i)).then(s=>ze(s).then(o=>({gasSponsor:o.gasSponsor}))),this.listGasSponsors=(n,i)=>this.fetch(this.url("ListGasSponsors"),Ue(n,i)).then(s=>ze(s).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,i)=>this.fetch(this.url("AddGasSponsor"),Ue(n,i)).then(s=>ze(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,i)=>this.fetch(this.url("UpdateGasSponsor"),Ue(n,i)).then(s=>ze(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.removeGasSponsor=(n,i)=>this.fetch(this.url("RemoveGasSponsor"),Ue(n,i)).then(s=>ze(s).then(o=>({status:o.status}))),this.reportGasSponsorUsage=(n,i)=>this.fetch(this.url("ReportGasSponsorUsage"),Ue(n,i)).then(s=>ze(s).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.nextGasTankBalanceAdjustmentNonce=(n,i)=>this.fetch(this.url("NextGasTankBalanceAdjustmentNonce"),Ue(n,i)).then(s=>ze(s).then(o=>({nonce:o.nonce}))),this.adjustGasTankBalance=(n,i)=>this.fetch(this.url("AdjustGasTankBalance"),Ue(n,i)).then(s=>ze(s).then(o=>({status:o.status,adjustment:o.adjustment}))),this.getGasTankBalanceAdjustment=(n,i)=>this.fetch(this.url("GetGasTankBalanceAdjustment"),Ue(n,i)).then(s=>ze(s).then(o=>({adjustment:o.adjustment}))),this.listGasTankBalanceAdjustments=(n,i)=>this.fetch(this.url("ListGasTankBalanceAdjustments"),Ue(n,i)).then(s=>ze(s).then(o=>({page:o.page,adjustments:o.adjustments}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Ue=(t={},e={})=>({method:"POST",headers:ho({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),ze=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});var Zl=Object.freeze({__proto__:null,WebRPCVersion:iG,WebRPCSchemaVersion:sG,WebRPCSchemaHash:oG,ETHTxnStatus:Us,TransferType:aG,FeeTokenType:lG,SortOrder:cG,Relayer:VS});const fG=[Us.DROPPED,Us.SUCCEEDED,Us.PARTIALLY_FAILED,Us.FAILED],uG=[Us.DROPPED,Us.PARTIALLY_FAILED,Us.FAILED];function dG(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&Co.isProvider(t.provider)}const hG=typeof global=="object"?global.fetch:window.fetch;class HS{constructor(e){if(this.options=e,this.service=void 0,this.provider=void 0,this._fetch=(r,n)=>{const i={},{jwtAuth:s,projectAccessKey:o}=this.options;return s&&s.length>0&&(i.Authorization=`BEARER ${s}`),o&&o.length>0&&(i["X-Access-Key"]=o),n.headers=ho({},n.headers,i),hG(r,n)},this.service=new VS(e.url,this._fetch),Co.isProvider(e.provider))this.provider=e.provider;else{const{jwtAuth:r,projectAccessKey:n}=this.options,i=iu(e.provider.url,n,r);this.provider=new K0(i)}}async waitReceipt(e,r=1e3,n=5,i){typeof e!="string"&&(e=ce.transaction.intendedTransactionID(e)),ve.info(`[rpc-relayer/waitReceipt] waiting for ${e}`);let s=0;for(;i===void 0||!i();){try{const{receipt:o}=await this.service.getMetaTxnReceipt({metaTxID:e});if(o&&o.txnReceipt&&o.txnReceipt!=="null"&&fG.includes(o.status))return{receipt:o}}catch(o){if(s++,s===n)throw o}(i===void 0||!i())&&await new Promise(o=>setTimeout(o,r))}throw new Error(`Cancelled waiting for transaction receipt ${e}`)}async simulate(e,...r){const i=Kr.encode([ce.transaction.MetaTransactionsType],[ce.transaction.sequenceTxAbiEncode(r)]);return(await this.service.simulate({wallet:e,transactions:i})).results}async getFeeOptions(e,...r){const n=await this.service.feeTokens();if(n.isFeeRequired){const i=n.tokens.map(l=>l.symbol).join(", ");ve.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${i}`);const s=await this.getNonce(e);if(!this.provider)throw ve.warn("[rpc-relayer/getFeeOptions] provider not set, needed for stub signature"),new Error("provider is not set");const{options:o,quote:a}=await this.service.feeOptions({wallet:e,to:e,data:ce.transaction.encodeBundleExecData({entrypoint:e,transactions:r,nonce:s})});return ve.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return ve.info("[rpc-relayer/getFeeOptions] relayer fees are not required"),{options:[]}}async getFeeOptionsRaw(e,r,n){const{options:i,quote:s}=await this.service.feeOptions({wallet:e,to:e,data:Q(r),simulate:n==null?void 0:n.simulate});return{options:i,quote:{_tag:"FeeQuote",_quote:s}}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}async getNonce(e,r){ve.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?H.from(r).toHexString():void 0,i=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),s=H.from(i.nonce),[o,a]=ce.transaction.decodeNonce(s);return ve.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),s}async relay(e,r,n=!0){var i=this;ve.info(`[rpc-relayer/relay] relaying signed meta-transactions ${JSON.stringify(e)} with quote ${JSON.stringify(r)}`);let s;if(r!==void 0&&(typeof r._quote=="string"?s=r._quote:ve.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw ve.warn("[rpc-relayer/relay] provider not set, failed relay"),new Error("provider is not set");const o=ce.transaction.encodeBundleExecData(e),a=await this.service.sendMetaTxn({call:{walletAddress:e.intent.wallet,contract:e.entrypoint,input:o},quote:s});if(ve.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(a)}`),n)return this.wait(e.intent.id);{const l={hash:e.intent.id,confirmations:0,from:e.intent.wallet,wait:f=>Promise.reject(new Error("impossible"))},c=async function(u){var h;if(!i.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const y=await i.wait(e.intent.id),g=(h=y.receipt)==null?void 0:h.transactionHash;if(!g)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(l,y),i.provider.waitForTransaction(g,u)};return l.wait=c,l}}async wait(e,r,n=1e3,i=5){var s=this;let o=!1;const{receipt:a}=await(r!==void 0?Promise.race([this.waitReceipt(e,n,i,()=>o),new Promise((c,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,i));if(!a.txnReceipt||uG.includes(a.status))throw new vG(a);const l=JSON.parse(a.txnReceipt);return{blockHash:l.blockHash,blockNumber:H.from(l.blockNumber).toNumber(),confirmations:1,from:typeof e=="string"?void 0:e.intent.wallet,hash:l.transactionHash,raw:a.txnReceipt,receipt:l,wait:async function(c){return s.provider.waitForTransaction(l.transactionHash,c)}}}}class vG{constructor(e){this.receipt=e}}function WS(t){return typeof t=="object"&&typeof t.simulate=="function"&&typeof t.getFeeOptions=="function"&&typeof t.gasRefundOptions=="function"&&typeof t.getNonce=="function"&&typeof t.relay=="function"&&typeof t.wait=="function"}const yG=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:nG,ProviderRelayer:zS,ProviderRelayerDefaults:US,RpcRelayer:HS,RpcRelayerProto:Zl,isLocalRelayerOptions:rG,isProviderRelayerOptions:tG,isRelayer:WS,isRpcRelayerOptions:dG,proto:Zl},Symbol.toStringTag,{value:"Module"}));function qS(t){return t.getAddress!==void 0&&t.buildDeployTransaction!==void 0&&t.predecorateSignedTransactions!==void 0&&t.decorateTransactions!==void 0&&t.sign!==void 0&&t.notifyStatusChange!==void 0}class GS{constructor(e,r=!0){this.signer=e,this.eoa=r}getAddress(){return this.signer.getAddress()}async buildDeployTransaction(e){}async predecorateSignedTransactions(e){return[]}async decorateTransactions(e,r){return e}sign(e,r){return this.signer.signMessage(e)}notifyStatusChange(e,r,n){}suffix(){return[2]}}var Yp=Object.freeze({__proto__:null,isSapientSigner:qS,SignerWrapper:GS});let zs=function(t){return t[t.INITIAL=0]="INITIAL",t[t.SIGNING=1]="SIGNING",t[t.SIGNED=2]="SIGNED",t[t.ERROR=3]="ERROR",t}({});function KS(t){return t===void 0||t.state===zs.INITIAL||t.state===zs.SIGNING}class d1{constructor(e,r=d1.randomTag()){this.tag=r,this.observers=[],this.signers=[],this.count=0,this.setSigners(e)}static randomTag(){return`default-${Q(xi(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>qS(r)?r:new GS(r))}async getSigners(){return Promise.all(this.signers.map(async function(e){return e.getAddress()}))}subscribe(e){return this.observers.push(e),()=>{this.observers=this.observers.filter(r=>r!==e)}}async notifyObservers(e,r,n){await Promise.all([...this.signers.map(async function(i){return i.notifyStatusChange(e,r,n)}),...this.observers.map(async function(i){return i(r,n)})])}async buildDeployTransaction(e){let r;for(const n of this.signers){const i=await n.buildDeployTransaction(e);r===void 0?r=i:i!=null&&i.transactions&&(r.transactions=i.transactions.concat(r.transactions))}return r}async predecorateSignedTransactions(e){const r=[];for(const n of this.signers)r.push(...await n.predecorateSignedTransactions(e??{}));return r}async decorateTransactions(e,r){for(const n of this.signers)e=await n.decorateTransactions(e,r??{});return e}signMessage(e){var r=this;const n=this.pullId();return new Promise(async function(i){const{message:s,metadata:o,callback:a,candidates:l}=e,c={ended:!1,message:s,signers:{}};let f=o??{};const u=p=>{f=p,r.notifyObservers(n,c,f)},h=()=>{try{r.notifyObservers(n,c,f);const p=Object.entries(c.signers).filter(([k,w])=>KS(w));if(a&&a(c,u)||p.length===0){c.ended=!0,i(c),r.notifyObservers(n,c,f);return}}catch(p){console.error("Error while notifying observers",p)}};let y=r.signers;if(l){const p=await Promise.all(r.signers.map(async function(k){return k.getAddress()}));y=r.signers.filter((k,w)=>l.includes(p[w]))}const g=await Promise.allSettled(y.map(async function(p){const k=await p.getAddress();c.signers[k]={state:zs.SIGNING,request:p.sign(s,o??{}).then(w=>{const E=p.suffix();return c.signers[k]={state:zs.SIGNED,signature:w,suffix:E},h(),w}).catch(w=>{throw c.signers[k]={state:zs.ERROR,error:w},h(),w})}}));for(let p=0;pKe(e))):Ke(t)}const s5=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(n.state===zs.SIGNED){const i=X(n.suffix),s=Se(["bytes","bytes"],[n.signature,i]);e.set(r,{signature:s,isDynamic:i.length!==1||i[0]!==2})}}return e};class ou extends fo{constructor(e){if(Dt.eq(e.chainId)&&!e.coders.signature.supportsNoChainId)throw new Error(`Sequence version ${e.config.version} doesn't support chainId 0`);super(),this.context=void 0,this.config=void 0,this.address=void 0,this.chainId=void 0,this.provider=void 0,this.relayer=void 0,this.coders=void 0,this.orchestrator=void 0,this._reader=void 0,this.context=e.context,this.config=e.config,this.orchestrator=e.orchestrator,this.coders=e.coders,this.address=e.address,this.chainId=e.chainId,this.provider=e.provider,this.relayer=e.relayer,this._reader=e.reader}static newWallet(e){const r=ce.context.addressOf(e.context,e.coders.config.imageHashOf(e.config));return new ou(Os({},e,{address:r}))}reader(){if(this._reader)return this._reader;if(!this.provider)throw new Error("Wallet status provider requires a provider");return new ce.reader.OnChainReader(this.provider)}setConfig(e){this.config=e}setOrchestrator(e){this.orchestrator=e}setAddress(e){this.address=e}getSigners(){return this.orchestrator.getSigners()}async getAddress(){return this.address}async decorateTransactions(e){const r=await this.orchestrator.decorateTransactions(e);if(await this.reader().isDeployed(this.address))return r;const n=[{to:r.entrypoint,data:ce.transaction.encodeBundleExecData(r),revertOnError:!0}],i=await this.buildDeployTransaction();return i&&n.unshift(...i.transactions),{entrypoint:this.context.guestModule,chainId:this.chainId,intent:r.intent,transactions:n}}async buildDeployTransaction(e){if(e!=null&&e.ignoreDeployed&&await this.reader().isDeployed(this.address))return;const r=this.coders.config.imageHashOf(this.config);if(ce.context.addressOf(this.context,r)!==this.address)throw new Error(`First address of config ${r} doesn't match wallet address ${this.address}`);const n=ou.buildDeployTransaction(this.context,r);if(e!=null&&e.includeChildren){const i=await this.orchestrator.buildDeployTransaction(e);i&&(n.transactions=i.transactions.concat(n.transactions))}return n}async deploy(e){const r=await this.buildDeployTransaction(e);if(r!==void 0){if(!this.relayer)throw new Error("Wallet deploy requires a relayer");return this.relayer.relay(Os({},r,{chainId:this.chainId,intent:{id:Q(xi(32)),wallet:this.address}}))}}static buildDeployTransaction(e,r){const n=new ir(mr.factory.abi);return{entrypoint:e.guestModule,transactions:[{to:e.factory,data:n.encodeFunctionData(n.getFunction("deploy"),[e.mainModule,r]),gasLimit:1e5,delegateCall:!1,revertOnError:!0,value:0}]}}async buildUpdateConfigurationTransaction(e){if(this.coders.config.update.isKindUsed){const r=await this.reader().implementation(this.address),n=r&&r===this.context.mainModuleUpgradable;return this.coders.config.update.buildTransaction(this.address,e,this.context,n?"later":"first")}return this.coders.config.update.buildTransaction(this.address,e,this.context)}async getNonce(e=0){const r=await this.reader().nonce(this.address,e);if(r===void 0)throw new Error("Unable to determine nonce");return r}async signDigest(e,r){const n=Bp(this.address,this.chainId,e);if(this.coders.config.hasSubdigest(this.config,n))return this.coders.signature.encodeSigners(this.config,new Map,[n],this.chainId).encoded;const i=Os({},r,{digest:e,chainId:this.chainId,address:this.address,config:this.config}),s=X(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(l=>l.address),message:s,metadata:i,callback:(l,c)=>{const f=s5(l),u=Os({},i,{parts:f});return c(u),this.coders.signature.hasEnoughSigningPower(this.config,f)}}),a=s5(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(pe(e),{message:e})}signTransactionBundle(e){if(e.entrypoint!==this.address)throw new Error(`Invalid entrypoint: ${e.entrypoint} !== ${this.address}`);return this.signTransactions(e.transactions,e.nonce)}async fetchNonceOrSpace(e){let r;if(e&&e.space!==void 0)r=H.from(e.space);else{if(e===void 0)return this.randomNonce();if(e&&e.serial===!0)r=0;else return e}const n=await this.reader().nonce(this.address,r);if(n===void 0)throw new Error("Unable to determine nonce");return ce.transaction.encodeNonce(r,n)}randomNonce(){const e=H.from(Q(xi(12)));return ce.transaction.encodeNonce(e,0)}async signTransactions(e,r,n){const i=await i5(e),s=ce.transaction.fromTransactionish(this.address,i);s.length===0&&s.push({to:this.address,data:"0x",value:0,gasLimit:0,delegateCall:!1,revertOnError:!0});const o=await this.fetchNonceOrSpace(r),a=ce.transaction.digestOfTransactions(o,s),l=Os({digest:a,transactions:s},n),c=await this.signDigest(a,l);return{intent:{id:Bp(this.address,this.chainId,a),wallet:this.address},chainId:this.chainId,transactions:s,entrypoint:this.address,nonce:o,signature:c}}async sendSignedTransaction(e,r){if(!this.relayer)throw new Error("Wallet sendTransaction requires a relayer");return this.relayer.relay(e,r)}async sendTransaction(e,r){let n;(r==null?void 0:r.nonce)!==void 0?n=r.nonce:r!=null&&r.serial?n={serial:!0}:n=this.randomNonce();const i=await this.signTransactions(e,n),s=await this.decorateTransactions(i);return this.sendSignedTransaction(s,r==null?void 0:r.quote)}async fillGasLimits(e){const r=await i5(e),n=ce.transaction.fromTransactionish(this.address,r),i=this.relayer;if(!i)throw new Error("Wallet fillGasLimits requires a relayer");const s=await i.simulate(this.address,...n);return n.map((o,a)=>{const l=o.gasLimit?H.from(o.gasLimit).toNumber():s[a].gasLimit;return Os({},o,s[a],{gasLimit:l})})}connect(e,r){return this.provider=e,this.relayer=r,this}signTransaction(e){throw new Error("Method not implemented.")}}function zi(){return zi=Object.assign?Object.assign.bind():function(t){for(var e=1;egG(t[e])):!1}function xG(t){if(!t)return[];const e=H.from(t.value);switch(t.token.type){case Zl.FeeTokenType.UNKNOWN:return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.to,value:e.toHexString(),data:[]}];case Zl.FeeTokenType.ERC20_TOKEN:if(!t.token.contractAddress)throw new Error("No contract address for ERC-20 fee option");return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.token.contractAddress,value:0,data:new ir([{constant:!1,inputs:[{type:"address"},{type:"uint256"}],name:"transfer",outputs:[],type:"function"}]).encodeFunctionData("transfer",[t.to,e.toHexString()])}];default:throw new Error(`Unhandled fee token type ${t.token.type}`)}}class bG{constructor(e,r,n){this.account=e,this.chainId=r,this.options=n,this._isSigner=!0}get provider(){return this.account.providerFor(this.chainId)}async getAddress(){return this.account.address}signMessage(e){var r,n;return this.account.signMessage(e,this.chainId,(r=(n=this.options)==null?void 0:n.cantValidateBehavior)!=null?r:"throw")}async defaultSelectFee(e,r){if(r.length===0)return;const n=[{constant:!0,inputs:[{type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],type:"function"}];for(const i of r)if(i.token.type===Zl.FeeTokenType.UNKNOWN){if((await this.getBalance()).gte(H.from(i.value)))return i}else if(i.token.contractAddress&&i.token.type===Zl.FeeTokenType.ERC20_TOKEN&&(await new Na(i.token.contractAddress,n,this.provider).balanceOf(this.account.address)).gte(H.from(i.value)))return i;throw new Error("No fee option available - not enough balance")}async sendTransaction(e,r){var n,i,s,o,a;const l=mG(e)?await Ke(e):e,c=await this.account.prepareTransactions({txs:l,chainId:this.chainId,stubSignatureOverrides:(n=(i=this.options)==null?void 0:i.stubSignatureOverrides)!=null?n:new Map,simulateForFeeOptions:r==null?void 0:r.simulateForFeeOptions}),u=await((s=(o=this.options)==null?void 0:o.selectFee)!=null?s:this.defaultSelectFee.bind(this))(l,c.feeOptions),h=[...c.transactions,...xG(u)];return this.account.sendTransaction(h,this.chainId,c.feeQuote,void 0,void 0,((a=this.options)==null?void 0:a.nonceSpace)!==void 0?{nonceSpace:this.options.nonceSpace}:void 0)}getBalance(e){return this.provider.getBalance(this.account.address,e)}call(e,r){return this.provider.call(e,r)}async resolveName(e){const r=await this.provider.resolveName(e);if(!r)throw new Error(`Could not resolve name ${e}`);return r}connect(e){throw new Error("Method not implemented.")}signTransaction(e){throw new Error("Method not implemented.")}getTransactionCount(e){throw new Error("Method not implemented.")}estimateGas(e){throw new Error("Method not implemented.")}getChainId(){return Promise.resolve(H.from(this.chainId).toNumber())}getGasPrice(){throw new Error("Method not implemented.")}getFeeData(){throw new Error("Method not implemented.")}checkTransaction(e){throw new Error("Method not implemented.")}populateTransaction(e){throw new Error("Method not implemented.")}_checkProvider(e){throw new Error("Method not implemented.")}}class wG{async isDeployed(e){return!1}async implementation(e){}async imageHash(e){}async nonce(e,r){return Dt}async isValidSignature(e,r,n){throw new Error("Method not supported.")}}class Ji{constructor(e){this.address=void 0,this.networks=void 0,this.tracker=void 0,this.contexts=void 0,this.migrator=void 0,this.migrations=void 0,this.orchestrator=void 0,this.jwt=void 0,this.projectAccessKey=void 0,this.address=we(e.address),this.contexts=e.contexts,this.tracker=e.tracker,this.networks=e.networks,this.orchestrator=e.orchestrator,this.jwt=e.jwt,this.projectAccessKey=e.projectAccessKey,this.migrations=e.migrations||Jp.DefaultMigrations,this.migrator=new Kp.Migrator(e.tracker,this.migrations,this.contexts)}getSigner(e,r){return new bG(this,e,r)}static async new(e){var r;const i=new Kp.Migrator(e.tracker,(r=e.migrations)!=null?r:Jp.DefaultMigrations,e.contexts).lastMigration(),s=i.configCoder,o=s.fromSimple(e.config),a=s.imageHashOf(o),l=e.contexts[i.version],c=ce.context.addressOf(l,a);return await e.tracker.saveCounterfactualWallet({config:o,context:Object.values(e.contexts)}),new Ji({address:c,tracker:e.tracker,contexts:e.contexts,networks:e.networks,orchestrator:e.orchestrator,migrations:e.migrations,projectAccessKey:e.projectAccessKey})}getAddress(){return Promise.resolve(this.address)}get version(){return this.migrator.lastMigration().version}get coders(){const e=this.migrator.lastMigration();return{signature:e.signatureCoder,config:e.configCoder}}network(e){const r=H.from(e),n=this.networks.find(i=>r.eq(i.chainId));if(!n)throw new Error(`Network not found for chainId ${e}`);return n}providerFor(e){const r=this.network(e);if(!r.provider&&!r.rpcUrl)throw new Error(`Provider not found for chainId ${e}`);return r.provider||new K0(iu(r.rpcUrl,this.projectAccessKey,this.jwt),{name:"",chainId:H.from(e).toNumber()})}reader(e){return Dt.eq(e)?new wG:new ce.reader.OnChainReader(this.providerFor(e))}relayer(e){const r=this.network(e);if(!r.relayer)throw new Error(`Relayer not found for chainId ${e}`);return WS(r.relayer)?r.relayer:new HS(zi({},r.relayer,{projectAccessKey:this.projectAccessKey,jwtAuth:this.jwt}))}setOrchestrator(e){this.orchestrator=e}setJwt(e){this.jwt=e}contextFor(e){const r=this.contexts[e];if(!r)throw new Error(`Context not found for version ${e}`);return r}walletForStatus(e,r){const n=Er.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,i){const s=Dt.eq(e);return new ou({config:n,context:r,chainId:e,coders:i,relayer:s?void 0:this.relayer(e),address:this.address,orchestrator:this.orchestrator,reader:this.reader(e)})}async status(e,r=!1){var n=this;const i=this.reader(e).isDeployed(this.address),s=this.tracker.imageHashOfCounterfactualWallet({wallet:this.address}).then(M=>{if(!M)throw new Error(`Counterfactual imageHash not found for wallet ${this.address}`);return M}),o=s.then(M=>BS.counterfactualVersion(this.address,M.imageHash,Object.values(this.contexts))),a=async function(){if(!await i)return o;const B=await n.reader(e).implementation(n.address);if(!B)throw new Error(`Implementation not found for wallet ${n.address}`);const z=Object.values(n.contexts);for(let F=0;F0?p[p.length-1].nextImageHash:h,w=await this.tracker.configOfImageHash({imageHash:k});if(!w)throw new Error(`Config not found for imageHash ${k}`);const E=await i,A=await s,I=Er.coderFor(y).config.checkpointOf(w);return{original:zi({},A,{version:await o}),onChain:{imageHash:u,config:await c,version:f,deployed:E},fullyMigrated:y===this.version,signedMigrations:g,version:y,presignedConfigurations:p,imageHash:k,config:w,checkpoint:I,canOnchainValidate:f===this.version&&E}}mustBeFullyMigrated(e){if(!e.fullyMigrated)throw new Error(`Wallet ${this.address} is not fully migrated`)}async predecorateSignedTransactions(e,r){const n=await this.orchestrator.predecorateSignedTransactions({chainId:r}),i=await this.predecorateTransactions([],e,r);return ce.transaction.fromTransactionish(this.address,i).length>0&&n.push(await this.signTransactions(i,r)),n}async predecorateTransactions(e,r,n){if(r.onChain.imageHash!==r.imageHash){const s=await this.walletForStatus(n,r).buildUpdateConfigurationTransaction(r.config);return[Array.isArray(e)?e:[e],s.transactions].flat()}return e}async decorateTransactions(e,r,n){var i,s;if(!Array.isArray(e))return this.decorateTransactions([e],r,n);n=(i=n)!=null?i:e[0].chainId;const o=await this.buildBootstrapTransactions(r,n),a=o.transactions.length>0;if(!a&&e.length===1)return e[0];const{entrypoint:l}=a?o:e[0],c={entrypoint:l,chainId:n,intent:(s=e[0])==null?void 0:s.intent,transactions:[...o.transactions,...e.map(f=>({to:f.entrypoint,data:ce.transaction.encodeBundleExecData(f),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}))]};if(!r.onChain.deployed){const f=ce.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,n,c.transactions);c.intent===void 0?c.intent={id:f,wallet:this.address}:c.intent.id=f}return c}async decorateSignature(e,r){if(!r.presignedConfigurations||r.presignedConfigurations.length===0)return e;const n=this.coders.signature,i=r.presignedConfigurations.map(o=>o.signature),s=n.chainSignatures(e,i);return n.trim(s)}async publishWitness(){const e=pe(We(`This is a Sequence account woo! ${Date.now()}`)),r=await this.signDigest(e,0,!1),n=this.coders.signature.decode(r),i=this.coders.signature.signaturesOfDecoded(n);return this.tracker.saveWitnesses({wallet:this.address,digest:e,chainId:0,signatures:i})}async signDigest(e,r,n=!0,i="ignore",s){const o=Dt.eq(r)?this.networks[0].chainId:r,a=await this.status(o);if(this.mustBeFullyMigrated(a),!a.canOnchainValidate&&i==="throw")throw new Error("Wallet cannot validate onchain");const c=await this.walletForStatus(r,a).signDigest(e,s),f=n?this.decorateSignature(c,a):c;if(!a.canOnchainValidate)switch(i){case"ignore":return f;case"eip6492":return this.buildEIP6492Signature(await f,a,r)}return f}buildOnChainSignature(e){const r=ce.signature.subdigestOf({digest:Q(e),chainId:0,address:this.address}),n=Q(r),i=this.coders.config.fromSimple({threshold:32768,checkpoint:0,signers:[],subdigests:[n]}),s=new ir(mr.mainModule.abi),o={entrypoint:this.address,transactions:[{to:this.address,data:s.encodeFunctionData("setExtraImageHash",[this.coders.config.imageHashOf(i),"57896044618658097711785492504343953926634992332820282019728792003956564819968"]),gasLimit:25e4}]};this.tracker.saveWalletConfig({config:i});const a=this.coders.signature.encodeSigners(i,new Map,[n],0).encoded;return{bundle:o,signature:a}}async buildEIP6492Signature(e,r,n){const i=await this.buildBootstrapTransactions(r,n);if(i.transactions.length===0)throw new Error("Cannot build EIP-6492 signature without bootstrap transactions");const s=Kr.encode(["address","bytes","bytes"],[i.entrypoint,ce.transaction.encodeBundleExecData(i),e]);return Se(["bytes","bytes32"],[s,ce.EIP6492.EIP_6492_SUFFIX])}async editConfig(e){const r=await this.status(0).then(i=>i.config),n=this.coders.config.editConfig(r,zi({},e,{checkpoint:this.coders.config.checkpointOf(r).add(1)}));return this.updateConfig(n)}async updateConfig(e){if(!this.coders.config.isWalletConfig(e))throw new Error(`Invalid config for wallet ${this.address}`);const r=this.coders.config.imageHashOf(e),n=this.coders.signature.hashSetImageHash(r),i=await this.signDigest(n,0,!1);await this.tracker.savePresignedConfiguration({wallet:this.address,nextConfig:e,signature:i});const s=await this.tracker.configOfImageHash({imageHash:r,noCache:!0});if(!s||this.coders.config.imageHashOf(s)!==r)throw Error(`Reverse lookup failed for imageHash ${r}`)}async buildBootstrapTransactions(e,r){var n;const i=await this.orchestrator.buildDeployTransaction({chainId:r}),s=(n=i==null?void 0:i.transactions)!=null?n:[];if(!e.onChain.deployed){const l=ou.buildDeployTransaction(e.original.context,e.original.imageHash);s.push(...l.transactions)}s.length,s.push(...e.signedMigrations.map(l=>({to:l.tx.entrypoint,data:ce.transaction.encodeBundleExecData(l.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const o=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:ce.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,r,s),{guestModule:a}=this.contextFor(e.version);return{entrypoint:a,transactions:s,chainId:r,intent:{id:o,wallet:this.address}}}async bootstrapTransactions(e,r){const n=r||await this.status(e);return this.buildBootstrapTransactions(n,e)}async doBootstrap(e,r,n){const i=await this.bootstrapTransactions(e,n);return this.relayer(e).relay(zi({},i,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(pe(e),r,!0,n)}async signTransactions(e,r,n,i){const s=n||await this.status(r);this.mustBeFullyMigrated(s);const o=this.walletForStatus(r,s),a={address:this.address,digest:"",chainId:r,config:{version:this.version},decorate:!0,cantValidateBehavior:"ignore"},l=i!=null&&i.serial?{serial:!0}:(i==null?void 0:i.nonceSpace)!==void 0?{space:i.nonceSpace}:void 0,c=await o.signTransactions(e,l,a);return zi({},c,{signature:await this.decorateSignature(c.signature,s)})}async signMigrations(e,r){const n=await this.status(e);if(n.fullyMigrated)return!1;const i=this.walletForStatus(e,n),s=r(i.config),o=await this.migrator.signNextMigration(this.address,n.version,i,s);if(!o)return!1;await this.tracker.saveWalletConfig({config:s});const a=Er.coderFor(s.version).config,l=a.imageHashOf(s),c=await this.tracker.configOfImageHash({imageHash:l,noCache:!0});if(!c||a.imageHashOf(c)!==l)throw Error(`Reverse lookup failed for imageHash ${l}`);return await this.tracker.saveMigration(this.address,o,this.contexts),!0}async signAllMigrations(e){var r=this;const n=[];return{signedMigrations:(await Promise.all(this.networks.map(async function(o){try{return await r.signMigrations(o.chainId,e)}catch(a){return console.warn(`Failed to sign migrations for chain ${o.chainId}`,a),n.push(o.chainId),null}}))).filter(o=>o!==null),failedChains:n}}async isMigratedAllChains(){var e=this;const r=[];return{migratedAllChains:(await Promise.all(this.networks.map(async function(s){try{return await e.status(s.chainId)}catch(o){return r.push(s.chainId),console.warn(`Failed to get status for chain ${s.chainId}`,o),{fullyMigrated:!0}}}))).every(s=>s.fullyMigrated),failedChains:r}}async sendSignedTransactions(e,r,n,i,s){if(!Array.isArray(e))return this.sendSignedTransactions([e],r,n,i,s);const o=i||await this.status(r);this.mustBeFullyMigrated(o);const a=await this.decorateTransactions(e,o,r);return s==null||s(a),this.relayer(r).relay(a,n)}async fillGasLimits(e,r,n){return this.walletForStatus(r,n||await this.status(r)).fillGasLimits(e)}async gasRefundQuotes(e,r,n,i,s){const o=i||await this.status(r),a=this.walletForStatus(r,o),l=await this.predecorateTransactions(e,o,r),c=ce.transaction.fromTransactionish(this.address,l),f=a.coders.config.buildStubSignature(a.config,n),u=Q(xi(32)),h={chainId:r,intent:{id:u,wallet:this.address},signature:f,transactions:c,entrypoint:this.address,nonce:0},y=await this.decorateTransactions(h,o),g=ce.transaction.encodeBundleExecData(y),p=await this.relayer(r).getFeeOptionsRaw(y.entrypoint,g,s);return zi({},p,{decorated:y})}async prepareTransactions(e){const r=await this.status(e.chainId),n=await this.fillGasLimits(e.txs,e.chainId,r),i=await this.gasRefundQuotes(n,e.chainId,e.stubSignatureOverrides,r,{simulate:e.simulateForFeeOptions}),s=ce.transaction.unwind(this.address,i.decorated.transactions);return{transactions:n,flatDecorated:s,feeOptions:i.options,feeQuote:i.quote}}async sendTransaction(e,r,n,i=!1,s,o){const a=await this.status(r),l=i?e:await this.predecorateTransactions(e,a,r),f=ce.transaction.fromTransactionish(this.address,l).length>0?await this.signTransactions(l,r,void 0,o):void 0,u=await this.orchestrator.predecorateSignedTransactions({chainId:r}),h=[];return f!==void 0&&f.transactions.length>0&&h.push(f),h.push(...u.filter(y=>y.transactions.length>0)),this.sendSignedTransactions(h,r,n,void 0,s)}async signTypedData(e,r,n,i,s="ignore"){const o=Eu({domain:e,types:r,message:n});return this.signDigest(o,i,!0,s)}async getSigners(){var e=this;const r=n=>n.length?n[n.length-1]:void 0;return(await Promise.all(this.networks.map(async function({chainId:n,name:i}){try{var s;const o=await e.status(n);let a=(s=r(o.presignedConfigurations))==null?void 0:s.nextImageHash;if(!a&&o.onChain.version!==o.version){const u=r(o.signedMigrations);if(u){const{toVersion:h,toConfig:y}=u;a=Er.genericCoderFor(h).config.imageHashOf(y)}}a||(a=o.onChain.imageHash);const l=await e.tracker.configOfImageHash({imageHash:a});if(!l)throw new Error(`unable to find config for image hash ${a}`);return Er.genericCoderFor(l.version).config.signersOf(l).map(u=>zi({},u,{network:n}))}catch(o){return console.warn(`unable to get signers on network ${n} ${i}`,o),[]}}))).flat()}async getAllSigners(){var e=this;const r=[];return await Promise.all(this.networks.map(async function(n){const i=n.chainId,s=await e.status(i,!0),o=[s.onChain.imageHash,...s.onChain.version!==s.version?s.signedMigrations.map(a=>Er.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...s.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,l){const c=l===o.length-1,f=await e.tracker.configOfImageHash({imageHash:a});if(!f){console.warn(`AllSigners may be incomplete, config not found for imageHash ${a}`);return}Er.genericCoderFor(f.version).config.signersOf(f).forEach(y=>{const g=r.find(p=>p.address===y.address&&p.network===i);if(g&&c&&g.flaggedForRemoval){g.flaggedForRemoval=!1;return}g||r.push({address:y.address,weight:y.weight,network:i,flaggedForRemoval:!c})})}))})),r}}function CG(t){return t instanceof Ji}const EG=Object.freeze(Object.defineProperty({__proto__:null,Account:Ji,isAccount:CG},Symbol.toStringTag,{value:"Module"}));function sh(){return sh=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),hr({},n)).then(i=>vr(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),hr({},n)).then(i=>vr(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),hr({},n)).then(i=>vr(i).then(s=>({status:s.status}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),hr({},n)).then(i=>vr(i).then(s=>({chainID:s.chainID}))),this.getEtherBalance=(n,i)=>this.fetch(this.url("GetEtherBalance"),hr(n,i)).then(s=>vr(s).then(o=>({balance:o.balance}))),this.getTokenBalances=(n,i)=>this.fetch(this.url("GetTokenBalances"),hr(n,i)).then(s=>vr(s).then(o=>({page:o.page,balances:o.balances}))),this.getTokenSupplies=(n,i)=>this.fetch(this.url("GetTokenSupplies"),hr(n,i)).then(s=>vr(s).then(o=>({page:o.page,contractType:o.contractType,tokenIDs:o.tokenIDs}))),this.getTokenSuppliesMap=(n,i)=>this.fetch(this.url("GetTokenSuppliesMap"),hr(n,i)).then(s=>vr(s).then(o=>({supplies:o.supplies}))),this.getBalanceUpdates=(n,i)=>this.fetch(this.url("GetBalanceUpdates"),hr(n,i)).then(s=>vr(s).then(o=>({page:o.page,balances:o.balances}))),this.getTransactionHistory=(n,i)=>this.fetch(this.url("GetTransactionHistory"),hr(n,i)).then(s=>vr(s).then(o=>({page:o.page,transactions:o.transactions}))),this.syncBalance=(n,i)=>this.fetch(this.url("SyncBalance"),hr(n,i)).then(s=>vr(s).then(o=>({}))),this.fetchTransactionReceipt=(n,i)=>this.fetch(this.url("FetchTransactionReceipt"),hr(n,i)).then(s=>vr(s).then(o=>({receipt:o.receipt}))),this.fetchTransactionReceiptWithFilter=(n,i)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),hr(n,i)).then(s=>vr(s).then(o=>({receipt:o.receipt}))),this.getAllWebhookListeners=(n,i)=>this.fetch(this.url("GetAllWebhookListeners"),hr(n,i)).then(s=>vr(s).then(o=>({listeners:o.listeners}))),this.getWebhookListener=(n,i)=>this.fetch(this.url("GetWebhookListener"),hr(n,i)).then(s=>vr(s).then(o=>({listener:o.listener}))),this.addWebhookListener=(n,i)=>this.fetch(this.url("AddWebhookListener"),hr(n,i)).then(s=>vr(s).then(o=>({status:o.status,listener:o.listener}))),this.updateWebhookListener=(n,i)=>this.fetch(this.url("UpdateWebhookListener"),hr(n,i)).then(s=>vr(s).then(o=>({status:o.status}))),this.removeWebhookListener=(n,i)=>this.fetch(this.url("RemoveWebhookListener"),hr(n,i)).then(s=>vr(s).then(o=>({status:o.status}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const hr=(t={},e={})=>({method:"POST",headers:sh({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),vr=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),o5=typeof global=="object"?global.fetch:window.fetch;class YS extends JS{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,o5),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(i,s)=>{const o={},a=this.jwtAuth,l=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),l&&l.length>0&&(o["X-Access-Key"]=l),s.headers=sh({},s.headers,o),o5(i,s)},this.fetch=this._fetch}}const NG=Object.freeze(Object.defineProperty({__proto__:null,ContractType:_G,EventLogDataType:PG,EventLogType:TG,Indexer:JS,SequenceIndexer:YS,SortOrder:OG,TransactionStatus:RG,TransactionType:MG,TxnTransferType:IG,WebRPCSchemaHash:AG,WebRPCSchemaVersion:kG,WebRPCVersion:SG},Symbol.toStringTag,{value:"Module"}));function oh(){return oh=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),At({},n)).then(i=>_t(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),At({},n)).then(i=>_t(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),At({},n)).then(i=>_t(i).then(s=>({status:s.status}))),this.getTokenMetadata=(n,i)=>this.fetch(this.url("GetTokenMetadata"),At(n,i)).then(s=>_t(s).then(o=>({tokenMetadata:o.tokenMetadata}))),this.enqueueTokensForRefresh=(n,i)=>this.fetch(this.url("EnqueueTokensForRefresh"),At(n,i)).then(s=>_t(s).then(o=>({taskId:o.taskId}))),this.getTokenRefreshStatus=(n,i)=>this.fetch(this.url("GetTokenRefreshStatus"),At(n,i)).then(s=>_t(s).then(o=>({status:o.status}))),this.getTokenRefreshResult=(n,i)=>this.fetch(this.url("GetTokenRefreshResult"),At(n,i)).then(s=>_t(s).then(o=>({status:o.status,tokens:o.tokens,failureReasons:o.failureReasons}))),this.cancelRefreshJob=(n,i)=>this.fetch(this.url("CancelRefreshJob"),At(n,i)).then(s=>_t(s).then(o=>({ok:o.ok}))),this.getTokenMetadataBatch=(n,i)=>this.fetch(this.url("GetTokenMetadataBatch"),At(n,i)).then(s=>_t(s).then(o=>({contractTokenMetadata:o.contractTokenMetadata}))),this.searchTokenMetadata=(n,i)=>this.fetch(this.url("SearchTokenMetadata"),At(n,i)).then(s=>_t(s).then(o=>({page:o.page,tokenMetadata:o.tokenMetadata}))),this.searchTokenIDs=(n,i)=>this.fetch(this.url("SearchTokenIDs"),At(n,i)).then(s=>_t(s).then(o=>({page:o.page,tokenIds:o.tokenIds}))),this.tokenCollectionFilters=(n,i)=>this.fetch(this.url("TokenCollectionFilters"),At(n,i)).then(s=>_t(s).then(o=>({filters:o.filters}))),this.getContractInfo=(n,i)=>this.fetch(this.url("GetContractInfo"),At(n,i)).then(s=>_t(s).then(o=>({contractInfo:o.contractInfo}))),this.getContractInfoBatch=(n,i)=>this.fetch(this.url("GetContractInfoBatch"),At(n,i)).then(s=>_t(s).then(o=>({contractInfoMap:o.contractInfoMap}))),this.searchContractInfo=(n,i)=>this.fetch(this.url("SearchContractInfo"),At(n,i)).then(s=>_t(s).then(o=>({contractInfoList:o.contractInfoList}))),this.searchContractInfoBatch=(n,i)=>this.fetch(this.url("SearchContractInfoBatch"),At(n,i)).then(s=>_t(s).then(o=>({contractInfoByChain:o.contractInfoByChain}))),this.searchMetadata=(n,i)=>this.fetch(this.url("SearchMetadata"),At(n,i)).then(s=>_t(s).then(o=>({tokenMetadata:o.tokenMetadata,contractInfo:o.contractInfo}))),this.projectSetTokenMetadata=(n,i)=>this.fetch(this.url("ProjectSetTokenMetadata"),At(n,i)).then(s=>_t(s).then(o=>({ok:o.ok}))),this.getNiftyswapTokenQuantity=(n,i)=>this.fetch(this.url("GetNiftyswapTokenQuantity"),At(n,i)).then(s=>_t(s).then(o=>({quantity:o.quantity}))),this.getNiftyswapUnitPrices=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPrices"),At(n,i)).then(s=>_t(s).then(o=>({prices:o.prices}))),this.getNiftyswapUnitPricesWithQuantities=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPricesWithQuantities"),At(n,i)).then(s=>_t(s).then(o=>({prices:o.prices}))),this.addContractToMintMonitor=(n,i)=>this.fetch(this.url("AddContractToMintMonitor"),At(n,i)).then(s=>_t(s).then(o=>({ok:o.ok}))),this.removeContractFromMintMonitor=(n,i)=>this.fetch(this.url("RemoveContractFromMintMonitor"),At(n,i)).then(s=>_t(s).then(o=>({ok:o.ok}))),this.mintMonitorJobStatus=(n,i)=>this.fetch(this.url("MintMonitorJobStatus"),At(n,i)).then(s=>_t(s).then(o=>({task:o.task}))),this.mintMonitorTriggerJob=(n,i)=>this.fetch(this.url("MintMonitorTriggerJob"),At(n,i)).then(s=>_t(s).then(o=>({ok:o.ok}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const At=(t={},e={})=>({method:"POST",headers:oh({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),_t=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),a5=typeof global=="object"?global.fetch:window.fetch;class XS extends QS{constructor(e="https://metadata.sequence.app",r,n){super(e.endsWith("/")?e.slice(0,-1):e,a5),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(i,s)=>{const o={},a=this.jwtAuth,l=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),l&&l.length>0&&(o["X-Access-Key"]=l),s.headers=oh({},s.headers,o),a5(i,s)},this.fetch=this._fetch}}const VG=Object.freeze(Object.defineProperty({__proto__:null,ContractType:BG,Metadata:QS,PropertyType:jG,SequenceMetadata:XS,SortOrder:UG,SwapType:FG,TaskStatus:zG,WebRPCSchemaHash:LG,WebRPCSchemaVersion:DG,WebRPCVersion:$G},Symbol.toStringTag,{value:"Module"}));function HG(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function WG(t){return t.startsWith("ipfs://")}class qG{constructor(e,r,n=1e3){this.provider=e,this.solver=r,this.window=n,this.pending=new Map}async runByEIP5719(e,r,n){const i=`${e}-${r}-${n}`,s=Date.now();if(this.pending.has(i)&&s-this.pending.get(i).timestamp10)throw new Error("EIP5719 - Too many tries");if(ce.signer.canRecover(n)){const l=ce.signer.recoverSigner(r,n);if(l&&l.toLowerCase()===t.toLowerCase())return n}try{if(await ce.signer.isValidSignature(t,r,n,e))return n}catch{}const o=await KG(GG(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=Q(await(i||new JG).resolve(o));if(!a||a==="")throw new Error("EIP5719 - Empty alternative signature");if(a===Q(n))throw new Error("EIP5719 - Alternative signature is invalid or the same");return ZS(t,e,r,a,i,s+1)}class JG{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.gateway=e,this.uri=n=>WG(n)?HG(n,this.gateway):n,this.resolve=async function(n){const i=r.uri(n),s=await fetch(i);if(!s.ok)throw new Error(`URISolverIPFS - Failed to fetch ${i}`);return await s.text()}}}const YG=(t,e)=>e.some(r=>t instanceof r);let l5,c5;function QG(){return l5||(l5=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function XG(){return c5||(c5=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ek=new WeakMap,Qp=new WeakMap,tk=new WeakMap,Vv=new WeakMap,Jx=new WeakMap;function ZG(t){const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{r(ro(t.result)),i()},o=()=>{n(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&ek.set(r,t)}).catch(()=>{}),Jx.set(e,t),e}function eK(t){if(Qp.has(t))return;const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{r(),i()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});Qp.set(t,e)}let Xp={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return Qp.get(t);if(e==="objectStoreNames")return t.objectStoreNames||tk.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return ro(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function tK(t){Xp=t(Xp)}function rK(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(Hv(this),e,...r);return tk.set(n,e.sort?e.sort():[e]),ro(n)}:XG().includes(t)?function(...e){return t.apply(Hv(this),e),ro(ek.get(this))}:function(...e){return ro(t.apply(Hv(this),e))}}function nK(t){return typeof t=="function"?rK(t):(t instanceof IDBTransaction&&eK(t),YG(t,QG())?new Proxy(t,Xp):t)}function ro(t){if(t instanceof IDBRequest)return ZG(t);if(Vv.has(t))return Vv.get(t);const e=nK(t);return e!==t&&(Vv.set(t,e),Jx.set(e,t)),e}const Hv=t=>Jx.get(t);function iK(t,e,{blocked:r,upgrade:n,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=ro(o);return n&&o.addEventListener("upgradeneeded",l=>{n(ro(o.result),l.oldVersion,l.newVersion,ro(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{s&&l.addEventListener("close",()=>s()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const sK=["get","getKey","getAll","getAllKeys","count"],oK=["put","add","delete","clear"],Wv=new Map;function f5(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Wv.get(e))return Wv.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=oK.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||sK.includes(r)))return;const s=async function(o,...a){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(a.shift())),(await Promise.all([c[r](...a),i&&l.done]))[0]};return Wv.set(e,s),s}tK(t=>({...t,get:(e,r,n)=>f5(e,r)||t.get(e,r,n),has:(e,r)=>!!f5(e,r)||t.has(e,r)}));class aK{constructor(){this.loadPresignedConfiguration=void 0,this.savePresignedConfiguration=void 0,this.saveWitnesses=void 0,this.configOfImageHash=void 0,this.saveWalletConfig=void 0,this.imageHashOfCounterfactualWallet=void 0,this.saveCounterfactualWallet=void 0,this.walletsOfSigner=void 0}}var lK=Object.freeze({__proto__:null,ConfigTracker:aK});class cK{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),jr(e,"? "),jr(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),jr(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),jr(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),jr(e,"? "),jr(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),jr(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),jr(e,"? "),jr(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),jr(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),jr(e,"? "),jr(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,i){return console.debug("? getMigration"),jr({address:e,fromImageHash:r,fromVersion:n,chainId:i},"? "),jr(await this.tracker.getMigration(e,r,n,i),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),jr({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function jr(t,e=""){switch(t){case void 0:console.debug(e+"undefined");break;default:JSON.stringify(t,void 0,2).split(` -`).map(r=>e+r).forEach(r=>console.debug(r));break}return t}var fK=Object.freeze({__proto__:null,DebugConfigTracker:cK});function vo(){return vo=Object.assign?Object.assign.bind():function(t){for(var e=1;ePromise.resolve(this.configs[e]),this.saveConfig=(e,r)=>(this.configs[e]=r,Promise.resolve()),this.loadV2Node=e=>Promise.resolve(this.v2Nodes[e]),this.saveV2Node=(e,r)=>(this.v2Nodes[e]=r,Promise.resolve()),this.loadCounterfactualWallet=e=>Promise.resolve(this.counterfactualWallets[e]),this.saveCounterfactualWallet=(e,r,n)=>(this.counterfactualWallets[e]={imageHash:r,context:n},Promise.resolve()),this.loadPayloadOfSubdigest=e=>Promise.resolve(this.payloads[e]),this.savePayloadOfSubdigest=(e,r)=>(this.payloads[e]=r,Promise.resolve()),this.loadSubdigestsOfSigner=e=>Promise.resolve(Object.keys(this.signatures[e]||{})),this.loadSignatureOfSubdigest=(e,r)=>{var n;return Promise.resolve((n=this.signatures[e])==null?void 0:n[r])},this.saveSignatureOfSubdigest=(e,r,n)=>(this.signatures[e]||(this.signatures[e]={}),this.signatures[e][r]=n,Promise.resolve()),this.loadMigrationsSubdigest=(e,r,n)=>{var i;return Promise.resolve(((i=this.migrations[e])==null||(i=i[r])==null?void 0:i[n])||[])},this.saveMigrationsSubdigest=(e,r,n,i,s)=>(this.migrations[e]||(this.migrations[e]={}),this.migrations[e][r]||(this.migrations[e][r]={}),this.migrations[e][r][n]||(this.migrations[e][r][n]=[]),this.migrations[e][r][n].push({subdigest:i,toImageHash:s}),Promise.resolve())}}function Ml(t){if(t===void 0)return;const e={};for(const r of Object.keys(t)){const n=t[r];n._isBigNumber===!0&&n._hex!==void 0&&typeof n._hex=="string"&&n._hex.length!==""?e[r]=H.from(n):Array.isArray(n)?e[r]=n.map(i=>Ml(i)):typeof n=="object"&&n!==null?e[r]=Ml(n):e[r]=n}return e}class uK{constructor(e){var r=this;this.dbName=e,this._lazyDb=void 0,this.loadConfig=async function(n){return(await r.getDb()).get("configs",n).then(s=>Ml(s))},this.saveConfig=async function(n,i){await(await r.getDb()).put("configs",i,n)},this.loadV2Node=async function(n){return(await r.getDb()).get("v2Nodes",n).then(s=>Ml(s))},this.saveV2Node=async function(n,i){await(await r.getDb()).put("v2Nodes",i,n)},this.loadCounterfactualWallet=async function(n){return(await r.getDb()).get("counterfactualWallets",n)},this.saveCounterfactualWallet=async function(n,i,s){await(await r.getDb()).put("counterfactualWallets",{imageHash:i,context:s},n)},this.loadPayloadOfSubdigest=async function(n){return(await r.getDb()).get("payloads",n).then(s=>Ml(s))},this.savePayloadOfSubdigest=async function(n,i){await(await r.getDb()).put("payloads",i,n)},this.loadSubdigestsOfSigner=async function(n){return(await(await r.getDb()).getAllKeysFromIndex("signatures","signer",IDBKeyRange.only(n))).map(o=>o.split("-")[0])},this.loadSignatureOfSubdigest=async function(n,i){const o=await(await r.getDb()).get("signatures",[i,n].join("-"));return o==null?void 0:o.signature},this.saveSignatureOfSubdigest=async function(n,i,s){await(await r.getDb()).put("signatures",{signature:s,signer:n},[i,n].join("-"))},this.loadMigrationsSubdigest=async function(n,i,s){return(await(await r.getDb()).getAllFromIndex("migrations","jump",IDBKeyRange.only([n,i,s]))).map(l=>({subdigest:l.subdigest,toImageHash:l.toImageHash}))},this.saveMigrationsSubdigest=async function(n,i,s,o,a){await(await r.getDb()).put("migrations",{wallet:n,fromVersion:i,toVersion:s,subdigest:o,toImageHash:a},o)}}async getDb(){if(this._lazyDb)return this._lazyDb;const e=this.dbName;return this._lazyDb=await iK(e,1,{upgrade(r,n,i,s){console.log(`upgrading ${e} from ${n} to ${i} - ${s}`),n===0&&(r.createObjectStore("configs"),r.createObjectStore("v2Nodes"),r.createObjectStore("counterfactualWallets"),r.createObjectStore("payloads"),r.createObjectStore("signatures").createIndex("signer","signer",{unique:!1}),r.createObjectStore("migrations").createIndex("jump",["wallet","fromVersion","toVersion"]))}}),this._lazyDb}}function nk(t){return t.left!==void 0&&t.right!==void 0}function ik(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function Zp(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var dK=Object.freeze({__proto__:null,isPlainNode:nk,isPlainNested:ik,isPlainV2Config:Zp,MemoryTrackerStore:rk,recreateBigNumbers:Ml,IndexedDBStore:uK});class Yx{constructor(e,r=new rk,n=!1){var i=this;this.provider=e,this.store=r,this.useEIP5719=n,this.cachedEIP5719=void 0,this.loadTopology=async function(s){const o=await i.store.loadV2Node(s);if(!o)return{nodeHash:s};if(nk(o)){const[a,l]=await Promise.all([i.loadTopology(o.left),i.loadTopology(o.right)]);return{left:a,right:l}}return ik(o)?{weight:H.from(o.weight),threshold:H.from(o.threshold),tree:await i.loadTopology(o.tree)}:o},this.saveTopology=async function(s){if(Ae.config.isNodeLeaf(s))return;const o=Ae.config.hashNode(s);if(Ae.config.isNode(s)){const a=i.saveTopology(s.left),l=i.saveTopology(s.right),c=i.store.saveV2Node(o,{left:Ae.config.hashNode(s.left),right:Ae.config.hashNode(s.right)});await Promise.all([a,l,c]);return}if(Ae.config.isNestedLeaf(s)){const a=i.saveTopology(s.tree),l=i.store.saveV2Node(o,{weight:H.from(s.weight).toString(),threshold:H.from(s.threshold).toString(),tree:Ae.config.hashNode(s.tree)});await Promise.all([a,l]);return}if(Ae.config.isSignerLeaf(s))return i.store.saveV2Node(o,{address:s.address,weight:s.weight});if(Ae.config.isSubdigestLeaf(s))return i.store.saveV2Node(o,{subdigest:s.subdigest});throw new Error(`Unknown topology type: ${s}`)},this.saveWalletConfig=async function(s){const{config:o}=s;if(qi.config.ConfigCoder.isWalletConfig(o)){const a=qi.config.ConfigCoder.imageHashOf(o);return i.store.saveConfig(a,o)}if(Ae.config.ConfigCoder.isWalletConfig(o)){const a=Ae.config.ConfigCoder.imageHashOf(o);if(Ae.config.isComplete(o.tree))return i.store.saveConfig(a,o)}},this.configOfImageHashCache={},this.configOfImageHash=async function(s){const{imageHash:o}=s;if(i.configOfImageHashCache[s.imageHash])return i.configOfImageHashCache[s.imageHash];const a=await i.store.loadConfig(o);if(a){if(a.version===1||a.version===2&&!Zp(a))return i.configOfImageHashCache[s.imageHash]=a,a;if(Zp(a)){const l={version:2,threshold:H.from(a.threshold),checkpoint:H.from(a.checkpoint),tree:await i.loadTopology(a.tree)};return i.configOfImageHashCache[s.imageHash]=l,l}throw new Error(`Unknown config type: ${a}`)}},this.saveCounterfactualWallet=async function(s){const{config:o,context:a}=s,l=Er.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([i.saveWalletConfig({config:o}),...a.map(c=>{const f=ce.context.addressOf(c,l);return i.store.saveCounterfactualWallet(f,l,c)})])},this.imageHashOfCounterfactualWallet=async function(s){const{wallet:o}=s,a=await i.store.loadCounterfactualWallet(o);if(a)return{imageHash:a.imageHash,context:a.context}},this.savePayload=async function(s){const{payload:o}=s,a=ce.signature.subdigestOf(o);await i.store.savePayloadOfSubdigest(a,o)},this.payloadOfSubdigestCache={},this.payloadOfSubdigest=async function(s){if(i.payloadOfSubdigestCache[s.subdigest])return i.payloadOfSubdigestCache[s.subdigest];const{subdigest:o}=s,a=await i.store.loadPayloadOfSubdigest(o);return a&&(i.payloadOfSubdigestCache[o]=a),a},this.savePresignedConfiguration=async function(s){const o=Ae.signature.SignatureCoder.decode(s.signature),a=Er.genericCoderFor(s.nextConfig.version).config.imageHashOf(s.nextConfig),l=Ae.chained.messageSetImageHash(a),c=pe(l),f={message:l,address:s.wallet,chainId:0,digest:c},u=i.savePayload({payload:f}),h=i.saveWalletConfig({config:s.nextConfig}),y=await Ae.signature.SignatureCoder.recover(o,f,i.provider),g=Ae.signature.signaturesOf(y.config.tree);await Promise.all([u,h,i.saveWalletConfig({config:y.config}),...g.map(p=>i.store.saveSignatureOfSubdigest(p.address,y.subdigest,p.signature))])},this.loadPresignedConfiguration=async function(s){const{wallet:o,fromImageHash:a,longestPath:l}=s,c=await i.configOfImageHash({imageHash:a});if(!c||!Ae.config.ConfigCoder.isWalletConfig(c))return[];const f=Ae.config.signersOf(c.tree).map(A=>A.address),u=await Promise.all(f.map(A=>i.store.loadSubdigestsOfSigner(A))),h=[...new Set(u.flat())],g=(await Promise.all([...new Set(h)].map(async function(A){return vo({},await i.payloadOfSubdigest({subdigest:A}),{subdigest:A})}))).filter(A=>(A==null?void 0:A.message)&&(A==null?void 0:A.address)&&A.address===o).map(A=>({payload:A,nextImageHash:Ae.chained.decodeMessageSetImageHash(A.message)})).filter(A=>A==null?void 0:A.nextImageHash);let p;const w=(await Promise.all(g.map(async function({nextImageHash:A,payload:I}){const M=await i.configOfImageHash({imageHash:A});if(!M||!Ae.config.isWalletConfig(M))return;const B=H.from(M.checkpoint);return{nextConfig:M,nextCheckpoint:B,nextImageHash:A,payload:I}}))).filter(A=>A!==void 0).filter(A=>A.nextCheckpoint.gt(c.checkpoint)).sort((A,I)=>A.nextCheckpoint.gt(I.nextCheckpoint)?l?1:-1:l?-1:1);for(const A of w){const{nextConfig:I,nextCheckpoint:M,nextImageHash:B,payload:z}=A;if(p){const J=p.checkpoint;if(l){if(M.gte(J))continue}else if(M.lte(J))continue}const F=new Map((await Promise.all(f.map(async function(J){const Z=await i.store.loadSignatureOfSubdigest(J,z.subdigest);if(!Z)return[J,void 0];const ie=Q(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(J,z.subdigest,Z):Z),D=ce.signer.tryRecoverSigner(z.subdigest,ie)!==J;return[J,{isDynamic:D,signature:ie}]}))).filter(J=>!!J[1]));if(F.size===0)continue;const K=Ae.signature.SignatureCoder.encodeSigners(c,F,[],0);K.weight.lt(c.threshold)||(p={nextImageHash:B,checkpoint:H.from(I.checkpoint),signature:K.encoded})}if(!p)return[];const E=await i.loadPresignedConfiguration({wallet:o,fromImageHash:p.nextImageHash,longestPath:l});return[{wallet:o,nextImageHash:p.nextImageHash,signature:p.signature},...E]},this.saveWitnesses=async function(s){const o={digest:s.digest,address:s.wallet,chainId:s.chainId},a=ce.signature.subdigestOf(o);await Promise.all([i.savePayload({payload:o}),...s.signatures.filter(l=>ce.signer.canRecover(l)).map(l=>{const c=ce.signer.recoverSigner(a,l);return i.store.saveSignatureOfSubdigest(c,a,l)})])},this.walletsOfSigner=async function(s){const o=await i.store.loadSubdigestsOfSigner(s.signer),a=await Promise.all(o.map(c=>i.payloadOfSubdigest({subdigest:c}))).then(c=>c.filter(f=>f!==void 0)),l=[];for(const c of a){const f=c.address;if(l.find(y=>y.wallet===f))continue;const u=ce.signature.subdigestOf(c),h=await i.store.loadSignatureOfSubdigest(s.signer,u);h&&l.push({wallet:f,proof:{digest:c.digest,chainId:H.from(c.chainId),signature:Q(h)}})}return l},this.cachedEIP5719=new qG(e)}async saveMigration(e,r,n){const i=r.fromVersion;if(i!==1)throw new Error("Migration not supported");if(!Ae.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:s,address:o}=FS.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(Ae.config.ConfigCoder.imageHashOf(r.toConfig)!=s)throw new Error("Invalid migration transaction - config");const a=ce.transaction.packMetaTransactionsData(r.tx.nonce,r.tx.transactions),l=pe(a),c={chainId:r.tx.chainId,message:a,address:e,digest:l},f=ce.signature.subdigestOf(c),u=this.savePayload({payload:c}),h=this.saveWalletConfig({config:r.toConfig}),y=qi.signature.SignatureCoder.decode(r.tx.signature),g=await qi.signature.SignatureCoder.recover(y,c,this.provider),p=qi.signature.SignatureCoder.signaturesOf(g.config);await Promise.all([u,h,this.saveWalletConfig({config:g.config}),this.store.saveMigrationsSubdigest(e,i,i+1,f,s),...p.map(k=>this.store.saveSignatureOfSubdigest(k.address,g.subdigest,k.signature))])}async getMigration(e,r,n,i){var s=this;const[o,a]=await Promise.all([this.configOfImageHash({imageHash:r}),this.store.loadMigrationsSubdigest(e,n,n+1)]),l=Er.coderFor(n);return!o||!l.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(f){const{subdigest:u,toImageHash:h}=f,y=await s.payloadOfSubdigest({subdigest:u});if(!y||!y.message||!H.from(i).eq(y.chainId))return;const g=l.config.signersOf(o).map(A=>A.address),p=new Map((await Promise.all(g.map(async function(A){const I=await s.store.loadSignatureOfSubdigest(A,u);if(!I)return[A,void 0];const M=Q(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(A,u,I):I),B=ce.signer.tryRecoverSigner(u,M)!==A;return[A,{isDynamic:B,signature:M}]}))).filter(A=>!!A[1])),k=l.signature.encodeSigners(o,p,[],i);if(!k||k.weightf.filter(u=>u!==void 0)))[0]}updateProvider(e){this.provider=e}}var hK=Object.freeze({__proto__:null,LocalConfigTracker:Yx});let qv=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class vK{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Sessions/",this.ping=n=>this.fetch(this.url("Ping"),Vn({},n)).then(i=>Hn(i).then(s=>({}))),this.config=(n,i)=>this.fetch(this.url("Config"),Vn(n,i)).then(s=>Hn(s).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,i)=>this.fetch(this.url("Wallets"),Vn(n,i)).then(s=>Hn(s).then(o=>({wallets:o.wallets}))),this.deployHash=(n,i)=>this.fetch(this.url("DeployHash"),Vn(n,i)).then(s=>Hn(s).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,i)=>this.fetch(this.url("ConfigUpdates"),Vn(n,i)).then(s=>Hn(s).then(o=>({updates:o.updates}))),this.migrations=(n,i)=>this.fetch(this.url("Migrations"),Vn(n,i)).then(s=>Hn(s).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,i)=>this.fetch(this.url("SaveConfig"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveWallet=(n,i)=>this.fetch(this.url("SaveWallet"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveSignature=(n,i)=>this.fetch(this.url("SaveSignature"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveSignerSignatures=(n,i)=>this.fetch(this.url("SaveSignerSignatures"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveMigration=(n,i)=>this.fetch(this.url("SaveMigration"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Vn=(t={},e={})=>({method:"POST",headers:vo({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Hn=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});class yK{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=void 0,this.sessions=new vK(e,fetch)}async loadPresignedConfiguration(e){try{const{updates:r}=await this.sessions.configUpdates({wallet:e.wallet,fromImageHash:e.fromImageHash,allUpdates:e.longestPath});return r.map(({toImageHash:n,signature:i})=>({wallet:e.wallet,nextImageHash:n,signature:i}))}catch(r){if(Gv(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=Er.genericCoderFor(r.version).config.imageHashOf(r),i=Ae.signature.setImageHashStruct(n),s=pe(i);await this.sessions.saveSignature({wallet:e.wallet,digest:s,chainID:"0",signature:e.signature,toConfig:vd(r)})}async saveWitnesses(e){let r=e.signatures;this.onlyRecoverable&&(r=r.filter(n=>ce.signer.canRecover(n))),await this.sessions.saveSignerSignatures({wallet:e.wallet,digest:e.digest,chainID:vl(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return pK(r,n)}catch(r){if(Gv(r))return;throw r}}async saveWalletConfig(e){const r=vd(e.config);await this.sessions.saveConfig({version:e.config.version,config:r})}async imageHashOfCounterfactualWallet(e){try{const{deployHash:r,context:n}=await this.sessions.deployHash(e);return{imageHash:r,context:n}}catch(r){if(Gv(r))return;throw r}}async saveCounterfactualWallet(e){const r=vd(e.config);await this.sessions.saveWallet({version:e.config.version,deployConfig:r})}async walletsOfSigner(e){const{wallets:r}=await this.sessions.wallets(e);return Object.entries(r).map(([n,{digest:i,chainID:s,type:o,signature:a}])=>{switch(o){case qv.EIP712:a+=Q(ce.signer.SigType.EIP712).slice(2);break;case qv.EthSign:a+=Q(ce.signer.SigType.ETH_SIGN).slice(2);break;case qv.EIP1271:a+=Q(ce.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:i,signature:a,chainId:H.from(s)}}})}async getMigration(e,r,n,i){var s=this;const o=vl(i),{migrations:a}=await this.sessions.migrations({wallet:e,fromVersion:n,fromImageHash:r,chainID:o}),l=async function(u){const h=a[u];if(h){const y=Object.keys(h).map(Number).sort((g,p)=>p-g);for(const g of y)for(const[p,k]of Object.entries(h[g]))try{const w=await s.configOfImageHash({imageHash:p});if(w)return{fromVersion:n,toVersion:g,toConfig:w,tx:{entrypoint:k.executor,transactions:k.transactions,nonce:k.nonce,signature:k.signature,chainId:u,intent:{id:ce.transaction.subdigestOfTransactions(e,u,k.nonce,k.transactions),wallet:e}}}}catch(w){console.error(w)}}},c=await l(o);if(c)return c;for(const f in a)if(f!==o){const u=await l(f);if(u)return u}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:vd(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(gK),nonce:vl(r.tx.nonce),signature:r.tx.signature,chainID:vl(r.tx.chainId)})}}function vd(t){switch(t.version){case 1:if(qi.config.ConfigCoder.isWalletConfig(t))return{threshold:ea(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:ea(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(Ae.config.ConfigCoder.isWalletConfig(t))return{threshold:ea(t.threshold),checkpoint:ea(t.checkpoint),tree:Hd(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function Hd(t){return Ae.config.isNode(t)?{left:Hd(t.left),right:Hd(t.right)}:Ae.config.isSignerLeaf(t)?{weight:ea(t.weight),address:t.address}:Ae.config.isNestedLeaf(t)?{weight:ea(t.weight),threshold:ea(t.threshold),tree:Hd(t.tree)}:Ae.config.isNodeLeaf(t)?{node:t.nodeHash}:vo({},t)}function pK(t,e){switch(t){case 1:return vo({},e,{version:t});case 2:return vo({},e,{version:t,tree:Wd(e.tree)});default:throw new Error(`unknown version ${t}`)}}function Wd(t){switch(typeof t){case"object":const e=vo({},t);return e.left!==void 0&&(e.left=Wd(e.left)),e.right!==void 0&&(e.right=Wd(e.right)),e.tree!==void 0&&(e.tree=Wd(e.tree)),e.node!==void 0&&(e.nodeHash=e.node,delete e.node),e;default:throw new Error(`v2 config tree ${t} is not an object`)}}function gK(t){return{to:t.to,value:t.value!==void 0?vl(t.value):void 0,data:t.data!==void 0?Q(t.data):void 0,gasLimit:t.gasLimit!==void 0?vl(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function ea(t){return H.from(t).toNumber()}function vl(t){return H.from(t).toString()}function Gv(t){return typeof t=="object"&&t.status===404}var mK=Object.freeze({__proto__:null,RemoteConfigTracker:yK});function eg(t,e,r){return new Promise(n=>{let i=0;t.forEach(s=>s.then(o=>{r(o)?n(o):(i++,i===t.length&&n(e))}).catch(()=>{i++,i===t.length&&n(e)}))})}async function qc(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class xK{constructor(e){this.trackers=e}async configOfImageHash(e){const r=this.trackers.map(async function(a,l){return{res:await a.configOfImageHash(e),i:l}}),n=await eg(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:Er.genericCoderFor(a.res.version).config.isComplete(a.res));if(n!=null&&n.res)return this.saveWalletConfig({config:n.res,skipTracker:n.i}),n.res;const i=new Yx(void 0),s=await qc(r,void 0);for(const a of s)a!=null&&a.res&&await i.saveWalletConfig({config:a.res});const o=await i.configOfImageHash(e);return o&&this.saveWalletConfig({config:o}),o}async saveWalletConfig(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveWalletConfig(e)}))}async imageHashOfCounterfactualWallet(e){const r=await eg(this.trackers.map(n=>n.imageHashOfCounterfactualWallet(e)),void 0,n=>!!n);return r&&this.configOfImageHash({imageHash:r.imageHash}).then(n=>{n&&this.saveCounterfactualWallet({config:n,context:[r.context]})}),r}async saveCounterfactualWallet(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveCounterfactualWallet(e)}))}async walletsOfSigner(e){const r=await qc(this.trackers.map(o=>o.walletsOfSigner(e)),[]).then(o=>o.flat()),n={};for(const o of r)n[o.wallet]=o.proof;const i=Object.keys(n).map(o=>({wallet:o,proof:n[o]})),s=new Map;return i.forEach(({wallet:o,proof:{digest:a,chainId:l,signature:c}})=>{const f=`${o}-${a}-${l}`;let u=s.get(f);u||(u={wallet:o,digest:a,chainId:l,signatures:[]},s.set(f,u)),u.signatures.push(c)}),s.forEach(o=>this.saveWitnesses(o)),i}async saveWitnesses(e){await Promise.all(this.trackers.map(r=>r.saveWitnesses(e)))}async loadPresignedConfiguration(e){var r=this;const n=await qc(this.trackers.map(l=>l.loadPresignedConfiguration(e)),[]),s=(await qc(n.map(async function(l){const c=l[l.length-1],f=await r.configOfImageHash({imageHash:c.nextImageHash});if(f)return{checkpoint:Er.genericCoderFor(f.version).config.checkpointOf(f),result:l}}),void 0)).reduce((l,c)=>c&&(!l||c.checkpoint.gt(l.checkpoint))?c:l);if(!s)return[];const o=new Map,a=l=>(o.has(l)||o.set(l,this.configOfImageHash({imageHash:l})),o.get(l));return s.result.forEach(async function(l){const c=await a(l.nextImageHash);c&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:c,signature:l.signature})}),s.result}async savePresignedConfiguration(e){await Promise.all(this.trackers.map(r=>r.savePresignedConfiguration(e)))}async getMigration(e,r,n,i){return(await Promise.all(this.trackers.map(o=>o.getMigration(e,r,n,i)))).find(o=>!!o)}async saveMigration(e,r,n){await Promise.all(this.trackers.map(i=>i.saveMigration(e,r,n)))}}class bK{constructor(e,r,n){this.tracker=e,this.cache=r,this.contexts=n}async loadPresignedConfiguration(e){var r=this;const n=[this.tracker.loadPresignedConfiguration(e),this.cache.loadPresignedConfiguration(e)];let i;const[s,o]=await Promise.all(n);if(s.length>0&&o.length>0&&s[s.length-1].nextImageHash===o[o.length-1].nextImageHash)i=e.longestPath===!0?s.length>o.length?s:o:s.lengthu&&(!f||u.checkpoint.gt(f.checkpoint))?u:f))==null?void 0:l.result)!=null?a:[]}return i||[]}async savePresignedConfiguration(e){await Promise.all([this.tracker.savePresignedConfiguration(e),this.cache.savePresignedConfiguration(e)])}async configOfImageHash(e){if(e.noCache!==!0){const n=await this.cache.configOfImageHash(e);if(n)return n}const r=await this.tracker.configOfImageHash(e);return r&&await this.cache.saveWalletConfig({config:r}),r}async saveWalletConfig(e){await Promise.all([this.tracker.saveWalletConfig(e),this.cache.saveWalletConfig(e)])}async imageHashOfCounterfactualWallet(e){if(e.noCache!==!0){const n=await this.cache.imageHashOfCounterfactualWallet(e);if(n)return n}const r=await this.tracker.imageHashOfCounterfactualWallet(e);if(r){const n=await this.configOfImageHash({imageHash:r.imageHash});n&&await this.cache.saveCounterfactualWallet({config:n,context:[r.context]})}return r}async saveCounterfactualWallet(e){await Promise.all([this.tracker.saveCounterfactualWallet(e),this.cache.saveCounterfactualWallet(e)])}async walletsOfSigner(e){if(e.noCache)return this.tracker.walletsOfSigner(e);const r=await Promise.all([this.tracker.walletsOfSigner(e),this.cache.walletsOfSigner(e)]),n=new Map;for(const i of r)for(const s of i)n.set(s.wallet,s);return Array.from(n.values())}async saveWitnesses(e){await Promise.all([this.tracker.saveWitnesses(e),this.cache.saveWitnesses(e)])}async getMigration(e,r,n,i){const s=await this.cache.getMigration(e,r,n,i);if(s)return s;const o=await this.tracker.getMigration(e,r,n,i);return o&&await this.cache.saveMigration(e,o,this.contexts),o}async saveMigration(e,r,n){await Promise.all([this.tracker.saveMigration(e,r,n),this.cache.saveMigration(e,r,n)])}}class u5{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...i){e=`${e}:${pe(We(JSON.stringify(i,wK)))}`;let s=this.cache.get(e);if(s&&s.expiration&&new Date>=s.expiration&&(s=void 0,this.cache.delete(e)),!s){const o={promise:n(...i)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),s=o,this.cache.set(e,s)}return s.promise}}function wK(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function CK(t){return t instanceof sk}class sk{constructor(e,r=50,n=!1){this.tracker=e,this.window=r,this.verbose=n,this.cache=new u5}invalidateCache(){this.cache=new u5}configOfImageHash(e){return this.cache.do("configOfImageHash",this.window,r=>this.tracker.configOfImageHash(r),e)}getMigration(e,r,n,i){return this.cache.do("getMigration",this.window,(...s)=>this.tracker.getMigration(...s),e,r,n,i)}saveMigration(e,r,n){return this.cache.do("saveMigration",void 0,(...i)=>this.tracker.saveMigration(...i),e,r,n)}loadPresignedConfiguration(e){return this.cache.do("loadPresignedConfiguration",this.window,r=>this.tracker.loadPresignedConfiguration(r),e)}savePresignedConfiguration(e){return this.cache.do("savePresignedConfiguration",void 0,r=>this.tracker.savePresignedConfiguration(r),e)}saveWitnesses(e){return this.cache.do("saveWitnesses",void 0,r=>this.tracker.saveWitnesses(r),e)}saveWalletConfig(e){return this.cache.do("saveWalletConfig",void 0,r=>this.tracker.saveWalletConfig(r),e)}imageHashOfCounterfactualWallet(e){return this.cache.do("imageHashOfCounterfactualWallet",void 0,r=>this.tracker.imageHashOfCounterfactualWallet(r),e)}saveCounterfactualWallet(e){return this.cache.do("saveCounterfactualWallet",void 0,r=>this.tracker.saveCounterfactualWallet(r),e)}walletsOfSigner(e){return this.cache.do("walletsOfSigner",this.window,r=>this.tracker.walletsOfSigner(r),e)}updateProvider(e){this.tracker instanceof Yx&&this.tracker.updateProvider(e)}}var Qx=Object.freeze({__proto__:null,debug:fK,local:hK,remote:mK,stores:dK,raceUntil:eg,allSafe:qc,MultipleTracker:xK,CachedTracker:bK,isDedupedTracker:CK,DedupedTracker:sk});const EK=Object.freeze(Object.defineProperty({__proto__:null,tracker:lK,trackers:Qx},Symbol.toStringTag,{value:"Module"})),ok=60*60*24*7,SK=60;class d5{constructor(e,r,n={},i){this.account=e,this.settings=r,this.status=n,this._initialAuthRequest=void 0,this.proofStrings=new Map,this.onAuthCallbacks=[],this.apiClient=void 0,this.metadataClient=void 0,this.indexerClients=new Map,this.projectAccessKey=void 0,this.projectAccessKey=i}now(){return Math.floor(Date.now()/1e3)}get expiration(){var e;return Math.max((e=this.settings.metadata.expiration)!=null?e:ok,120)}onAuth(e){return this.onAuthCallbacks.push(e),()=>this.onAuthCallbacks=this.onAuthCallbacks.filter(r=>r!==e)}async dump(){return this.status.jwt?{jwt:{token:await this.status.jwt.token,expiration:this.status.jwt.expiration},metadata:this.status.metadata}:{metadata:this.settings.metadata}}auth(e=5){var r=this;return this._initialAuthRequest?this._initialAuthRequest:(this._initialAuthRequest=async function(){const n=r.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");let i;for(let s=1;;s++)try{i=(await r.getJWT(!0)).token;break}catch(o){if(s===e)throw console.error(`couldn't authenticate after ${e} attempts`,o),o}return new Fd(n,void 0,i)}(),this._initialAuthRequest)}async getJWT(e){var r=this;const n=this.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");if(this.status.jwt){const c=this.status.jwt,f=await c.token;if(this.now(){throw this.status.jwt=void 0,c}),expiration:o};return this.status.jwt=a,a.token.then(c=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"fulfilled",value:c})}catch{}})}).catch(c=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"rejected",reason:c})}catch{}})}),{token:await a.token,expiration:o}}getProofStringKey(){return`${this.account.address} - ${this.settings.metadata.name}`}async isProofStringValid(e){try{const r=new Q0,n=H.from(this.settings.sequenceApiChainId),i=ii(this.account.networks,n);if(!i)throw Error("No network found");return r.chainId=n.toNumber(),r.provider=new K0(iu(i.rpcUrl,this.projectAccessKey),{name:"",chainId:n.toNumber()}),await r.decodeProof(e),!0}catch{return!1}}async getAPIClient(e=!0){if(!this.apiClient){const r=this.settings.sequenceApiUrl;if(!r)throw Error("No sequence api url");const n=(await this.getJWT(e)).token;this.apiClient=new Fd(r,void 0,n)}return this.apiClient}async getMetadataClient(e=!0){if(!this.metadataClient){const r=(await this.getJWT(e)).token;this.metadataClient=new XS(this.settings.sequenceMetadataUrl,void 0,r)}return this.metadataClient}async getIndexerClient(e,r=!0){const n=ii(this.account.networks,e);if(!n)throw Error(`No network for chain ${e}`);if(!this.indexerClients.has(n.chainId))if(n.indexer)this.indexerClients.set(n.chainId,n.indexer);else if(n.indexerUrl){const i=(await this.getJWT(r)).token;this.indexerClients.set(n.chainId,new YS(n.indexerUrl,void 0,i))}else throw Error(`No indexer url for chain ${e}`);return this.indexerClients.get(n.chainId)}getProofString(e){if(this.proofStrings.has(e)){const l=this.proofStrings.get(e);if(this.now()(r.signature=l,n.encodeProof(r,!0))).catch(l=>{throw this.proofStrings.delete(e),l}),expiration:o};return this.proofStrings.set(e,a),a}}const ak=async(t,e,r)=>{const n=we(await t.getAddress());if(!n||n===""||n==="0x")throw lk;const i=new Sx;if(i.address=n,!r||!r.app||r.app==="")throw new Xx("authorization options requires app to be set");i.claims.app=r.app,i.claims.ogn=r.origin,i.claims.n=r.nonce,i.setExpiryIn(r.expiry?Math.max(r.expiry,200):ok);const s=i.messageTypedData(),o=K9(e);i.signature=await(t instanceof Ji?t.signTypedData(s.domain,s.types,s.message,o,"eip6492"):t.signTypedData(s.domain,s.types,s.message,o));const l=await new Q0().encodeProof(i,!0);return{typedData:s,proofString:l}};class Xx extends Error{constructor(e){super(e),this.name="AuthError"}}const lk=new Xx("auth error: account address is empty");function Ko(){return Ko=Object.assign?Object.assign.bind():function(t){for(var e=1;eJ.wallet));let F;if(z){if(u==null||u(z),F=new Ji({address:z,tracker:A,networks:E,contexts:w,orchestrator:p,projectAccessKey:k}),c&&c.length>0){let J=await F.status(M);if(J.original.version!==J.version||F.version!==J.version){const{migratedAllChains:D,failedChains:v}=await F.isMigratedAllChains();if(v.some(C=>tg.includes(C)))throw Error(`Failed to fetch account status on ${v.join(", ")}`);if(!D){if(g&&!await g(F))throw Error("Migration cancelled, cannot open session");const{failedChains:C}=await F.signAllMigrations(y||(O=>O));if(C.some(O=>tg.includes(O)))throw Error(`Failed to sign migrations on ${C.join(", ")}`);Qx.isDedupedTracker(A)&&A.invalidateCache();let P;if([P,J]=await Promise.all([F.isMigratedAllChains().then(O=>O.migratedAllChains),F.status(M)]),!P)throw Error("Failed to migrate account")}}J.onChain.version!==J.version&&await F.doBootstrap(M,void 0,J);const Z=J.config,ie=F.coders.config.editConfig(Z,{add:c,threshold:l});if(F.coders.config.imageHashOf(Z)!==F.coders.config.imageHashOf(ie)){const D=F.coders.config.editConfig(ie,{checkpoint:F.coders.config.checkpointOf(Z).add(1)});await F.updateConfig(D)}}}else{if(!c||c.length===0)throw Error("Cannot create new account without signers");if(!l)throw Error("Cannot create new account without threshold");if(F=await Ji.new({config:{threshold:l,checkpoint:0,signers:c},tracker:A,contexts:w,orchestrator:p,networks:E,projectAccessKey:k}),u==null||u(F.address),await F.publishWitness(),!(await A.walletsOfSigner({signer:a,noCache:!0})).some(Z=>Z.wallet===F.address))throw Error("Account not found on tracker")}let K;return I&&(K=new d5(F,I),K.auth(),K.onAuth(J=>{J.status==="fulfilled"&&F.setJwt(J.value)})),new Sf(E,w,F,K)}static async load(e){const{dump:r,settings:n,editConfigOnMigration:i,onMigration:s,orchestrator:o}=e,{contexts:a,networks:l,tracker:c,services:f}=Ko({},qd,n);let u;if(ck(r)){var h,y,g;const I=r.config.address||ce.context.addressOf(a[1],qi.config.ConfigCoder.imageHashOf(Ko({},r.config,{version:1}))),M=((h=(y=r.jwt)==null?void 0:y.expiration)!=null?h:0)B.migratedAllChains)){if(s&&!await s(u))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await u.signAllMigrations(i),!await u.isMigratedAllChains().then(B=>B.migratedAllChains))throw Error("Failed to migrate account")}}else if(fk(r)){var p,k,w;const I=((p=(k=r.jwt)==null?void 0:k.expiration)!=null?p:0)async(n,i,s)=>{const o=s.messageDigest();return{isValid:await t(i).isValidSignature(s.address,o,s.signature)}},AK=Object.freeze(Object.defineProperty({__proto__:null,AuthError:Xx,CRITICAL_CHAINS:tg,ErrAccountIsRequired:lk,Session:Sf,SessionSettingsDefault:qd,ValidateSequenceWalletProof:kK,isSessionDumpV1:ck,isSessionDumpV2:fk,signAuthorization:ak},Symbol.toStringTag,{value:"Module"}));function ah(){return ah=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Fr({},n)).then(i=>Ur(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Fr({},n)).then(i=>Ur(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Fr({},n)).then(i=>Ur(i).then(s=>({status:s.status}))),this.getSignerConfig=(n,i)=>this.fetch(this.url("GetSignerConfig"),Fr(n,i)).then(s=>Ur(s).then(o=>({signerConfig:o.signerConfig}))),this.sign=(n,i)=>this.fetch(this.url("Sign"),Fr(n,i)).then(s=>Ur(s).then(o=>({sig:o.sig}))),this.signWith=(n,i)=>this.fetch(this.url("SignWith"),Fr(n,i)).then(s=>Ur(s).then(o=>({sig:o.sig}))),this.authMethods=(n,i)=>this.fetch(this.url("AuthMethods"),Fr(n,i)).then(s=>Ur(s).then(o=>({methods:o.methods,active:o.active}))),this.setPIN=(n,i)=>this.fetch(this.url("SetPIN"),Fr(n,i)).then(s=>Ur(s).then(o=>({}))),this.resetPIN=(n,i)=>this.fetch(this.url("ResetPIN"),Fr(n,i)).then(s=>Ur(s).then(o=>({}))),this.createTOTP=(n,i)=>this.fetch(this.url("CreateTOTP"),Fr(n,i)).then(s=>Ur(s).then(o=>({uri:o.uri}))),this.commitTOTP=(n,i)=>this.fetch(this.url("CommitTOTP"),Fr(n,i)).then(s=>Ur(s).then(o=>({codes:o.codes}))),this.resetTOTP=(n,i)=>this.fetch(this.url("ResetTOTP"),Fr(n,i)).then(s=>Ur(s).then(o=>({}))),this.reset2FA=(n,i)=>this.fetch(this.url("Reset2FA"),Fr(n,i)).then(s=>Ur(s).then(o=>({}))),this.recoveryCodes=(n,i)=>this.fetch(this.url("RecoveryCodes"),Fr(n,i)).then(s=>Ur(s).then(o=>({codes:o.codes}))),this.resetRecoveryCodes=(n,i)=>this.fetch(this.url("ResetRecoveryCodes"),Fr(n,i)).then(s=>Ur(s).then(o=>({codes:o.codes}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Fr=(t={},e={})=>({method:"POST",headers:ah({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Ur=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),TK=typeof global=="object"?global.fetch:window.fetch;class PK{constructor(e,r,n=!1){this.address=e,this.url=r,this.appendSuffix=n,this.guard=void 0,this.guard=new _K(r,TK)}async getAddress(){return this.address}async buildDeployTransaction(e){}async predecorateSignedTransactions(e){return[]}async decorateTransactions(e,r){return e}async sign(e,r){var n;if(!ce.isWalletSignRequestMetadata(r))throw new Error("expected sequence signature request metadata");const i=r.guardTotpCode,s=Er.genericCoderFor(r.config.version),{encoded:o}=s.signature.encodeSigners(r.config,(n=r.parts)!=null?n:new Map,[],r.chainId);return(await this.guard.signWith({signer:this.address,request:{msg:Q(e),auxData:this.packMsgAndSig(r.address,r.digest,o,r.chainId),chainId:H.from(r.chainId).toNumber()},token:i?{id:lh.TOTP,token:i}:void 0})).sig}notifyStatusChange(e,r,n){}async getAuthMethods(e){let r;if("jwt"in e)r=await this.guard.authMethods({},{Authorization:`BEARER ${e.jwt}`});else{const n=await rg(e);r=await this.guard.authMethods({proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}return ah({},r,{methods:r.methods.map(IK)})}async setPin(e,r){const n=await Lc(r);e===void 0?await this.guard.resetPIN({timestamp:n.timestamp.getTime(),signature:n.signature},{Authorization:`BEARER ${r.jwt}`}):await this.guard.setPIN({pin:e,timestamp:n.timestamp.getTime(),signature:n.signature},{Authorization:`BEARER ${r.jwt}`})}resetPin(e){return this.setPin(void 0,e)}async createTotp(e){const r=await Lc(e),{uri:n}=await this.guard.createTOTP({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return new URL(n)}async commitTotp(e,r){const{codes:n}=await this.guard.commitTOTP({token:e},{Authorization:`BEARER ${r}`});return n}async resetTotp(e){const r=await Lc(e);await this.guard.resetTOTP({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`})}async reset2fa(e,r){if("jwt"in r)await this.guard.reset2FA({code:e},{Authorization:`BEARER ${r.jwt}`});else{const n=await rg(r);await this.guard.reset2FA({code:e,proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}}async getRecoveryCodes(e){const r=await Lc(e),{codes:n}=await this.guard.recoveryCodes({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return n}async resetRecoveryCodes(e){const r=await Lc(e),{codes:n}=await this.guard.resetRecoveryCodes({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return n}packMsgAndSig(e,r,n,i){return Kr.encode(["address","uint256","bytes","bytes"],[e,i,r,n])}suffix(){return this.appendSuffix?[3]:[]}}let lh=function(t){return t.PIN="PIN",t.TOTP="TOTP",t}({});function IK(t){switch(t){case lh.PIN:case lh.TOTP:return t;default:throw new Error(`unknown auth method '${t}'`)}}function uk(t){return"signerAddress"in t&&typeof t.signerAddress=="string"}async function rg(t){if(uk(t))return t;{const e=Yp.isSapientSigner(t.signer)?t.signer:new Yp.SignerWrapper(t.signer),r=await e.getAddress(),n=new Date,i=dk(t.walletAddress,n),s=Eu(i);return{walletAddress:t.walletAddress,timestamp:n,signerAddress:r,signature:Q(await e.sign(s,{}))}}}async function Lc(t){if("wallet"in t){var e;const r=new Date,n=hk(r),i=await t.wallet.signTypedData(n.domain,n.types,n.message,(e=n.domain.chainId)!=null?e:1,"eip6492");return{jwt:t.jwt,timestamp:r,signature:i}}else return t}function dk(t,e){return{domain:vk,types:{AuthMethods:[{name:"wallet",type:"address"},{name:"timestamp",type:"string"}]},message:{wallet:we(t),timestamp:yk(e)}}}function hk(t){return{domain:vk,types:{AuthUpdate:[{name:"timestamp",type:"string"}]},message:{timestamp:yk(t)}}}const vk={name:"Sequence Guard",version:"1",chainId:1};function yk(t){return t.toUTCString().replace("GMT","UTC")}const RK=Object.freeze(Object.defineProperty({__proto__:null,AuthMethod:lh,GuardSigner:PK,getAuthUpdateProofTypedData:hk,getOwnershipProofTypedData:dk,isSignedOwnershipProof:uk,signOwnershipProof:rg},Symbol.toStringTag,{value:"Module"}));function ch(){return ch=Object.assign?Object.assign.bind():function(t){for(var e=1;e{this.queue.length>0&&(this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(this.run,this.options.timeWindow))},this.handle=(n,i,s)=>{if(this.batchableJsonRpcMethods.find(o=>o===i.method)){this.queue.push({request:i,callback:s,next:n}),this.options.verbose&&console.log("Scheduling call",i.method),this.scheduleExecution();return}return this.options.verbose&&console.log("Forwarded call",i.method),n(i,s)},this.run=async function(){r.options.verbose&&console.log("Processing multicall");const n=Math.min(r.options.batchSize,r.queue.length);if(n===0){r.options.verbose&&console.log("Skip multicall, empty queue");return}if(n===1){r.forward(r.queue[0]),r.queue=[],r.options.verbose&&console.log("Skip multicall, single item");return}r.options.verbose&&console.log("Resolving",n);var a=r.queue.slice(0,n);r.queue=n===r.queue.length?[]:r.queue.slice(n),r.options.verbose&&console.log("Updated queue",r.queue.length),r.queue.length!==0&&(r.options.verbose&&console.log("Scheduling next batch"),r.scheduleExecution());const i=a[0].next;let s;var[a,l]=h5(a,y=>{try{if(y.next!==i)return!1;switch(y.request.method){case ar.ethCall:if(y.request.params[0].from||y.request.params[0].gasPrice||y.request.params[0].value)return!1;case ar.ethGetBalance:case ar.ethGetCode:const g=OK(y.request.params[1]);if(s===void 0&&(s=g),!NK(g,s))return!1}return!0}catch{return!1}});if(l.length!==0&&(r.options.verbose&&console.log("Forwarding incompatible calls",l.length),r.forward(l),a.length===0)){r.options.verbose&&console.log("Skip multicall, all calls are incompatible");return}let o=a.map(y=>{try{switch(y.request.method){case ar.ethCall:return{delegateCall:!1,revertOnError:!1,target:y.request.params[0].to,data:y.request.params[0].data,gasLimit:y.request.params[0].gas?y.request.params[0].gas:0,value:0};case ar.ethGetCode:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callCode"),[y.request.params[0]])};case ar.ethGetBalance:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callBalanceOf"),[y.request.params[0]])};default:return null}}catch{return null}});var[a,l]=h5(a,(y,g)=>o[g]!==void 0);if(o=o.filter(y=>y),l.length!==0&&(r.options.verbose&&console.log("Forwarding calls on error",l.length),r.forward(l),a.length===0)){r.options.verbose&&console.log("Skip multicall, all calls had encoding errors");return}let c;try{r.options.verbose&&console.log("Encoding multicall"),c=r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("multiCall"),[o])}catch(y){r.options.verbose&&console.warn("Error encoding multicall, forwarding one by one",y),r.forward(a);return}const f=Px(),u=await MK(Tx(i)({id:f,jsonrpc:Xl,method:ar.ethCall,params:[{to:r.options.contract,value:0,data:c},H.isBigNumber(s)?s.toNumber():s]}),y=>({jsonrpc:Xl,id:f,result:void 0,error:y}));if(u.error)return r.options.verbose&&console.warn("Error calling multicall, forwarding one by one",u.error),r.forward(a);let h;try{h=r.multicallInterface.decodeFunctionResult(r.multicallInterface.getFunction("multiCall"),u.result)}catch(y){r.options.verbose&&console.warn("Error decoding multicall result, forwarding one by one",y),r.forward(a);return}r.options.verbose&&console.log("Got response for",a.length),a.forEach((y,g)=>{if(!h[0][g])r.options.verbose&&console.warn(`Multicall error for ${y.request.method} not found`),r.forward(y);else switch(y.request.method){case ar.ethCall:y.callback(void 0,{jsonrpc:y.request.jsonrpc,id:y.request.id,result:h[1][g]});break;case ar.ethGetCode:y.callback(void 0,{jsonrpc:y.request.jsonrpc,id:y.request.id,result:Kr.decode(["bytes"],h[1][g])[0]});break;case ar.ethGetBalance:y.callback(void 0,{jsonrpc:y.request.jsonrpc,id:y.request.id,result:Kr.decode(["uint256"],h[1][g])[0]});break}})},this.options=e?ch({},Rn.DefaultOptions,e):Rn.DefaultOptions,this.options.batchSize<=0)throw new Error(`Invalid batch size of ${this.options.batchSize}`)}forward(e){Array.isArray(e)?e.forEach(r=>r.next(r.request,r.callback)):e.next(e.request,e.callback)}static isMulticall(e){return e&&e.handle!==void 0&&e.conf!==void 0&&Rn.isMulticallOptions(e.options)}static isMulticallOptions(e){return e!==void 0&&e.batchSize!==void 0&&e.timeWindow!==void 0&&e.contract!==void 0}}Rn.DefaultOptions=ch({},$K);const pk=["getNetwork","getBlockNumber","getGasPrice","getTransactionCount","getStorageAt","sendTransaction","estimateGas","getBlock","getTransaction","getTransactionReceipt","getLogs","emit","litenerCount","addListener","removeListener","waitForTransaction","detectNetwork","getBlockWithTransactions"];class DK extends wx{constructor(e,r){var n;super(e.getNetwork()),n=this,this.provider=e,this.multicall=void 0,this.getResolver=async function(i){const s=n.provider;if(s.getResolver){const o=await s.getResolver(await i);return o?new Rp(n,o.address,o.name):null}return s.getResolver(await i)},this.next=async function(i,s){try{switch(i.method){case ar.ethCall:n.callback(i,s,await n.provider.call(i.params[0],i.params[1]));break;case ar.ethGetCode:n.callback(i,s,await n.provider.getCode(i.params[0],i.params[1]));break;case ar.ethGetBalance:n.callback(i,s,await n.provider.getBalance(i.params[0],i.params[1]));break}}catch(o){n.callback(i,s,void 0,o)}},this.listenerCount=e.listenerCount.bind(e),this.multicall=Rn.isMulticall(r)?r:new Rn(r),pk.forEach(i=>{e[i]!==void 0&&(this[i]=(...s)=>e[i](...s))})}callback(e,r,n,i){r(i,{jsonrpc:Xl,id:e.id,result:n,error:i})}async call(e,r){return this.rpcCall(ar.ethCall,e,r)}async getCode(e,r){return this.rpcCall(ar.ethGetCode,e,r)}async getBalance(e,r){return this.rpcCall(ar.ethGetBalance,e,r)}async rpcCall(e,...r){const n=Px();return(await Tx(this.multicall.handle)(this.next,{jsonrpc:Xl,id:n,method:e,params:r})).result}}class LK{constructor(e,r){if(this.provider=e,this.multicall=void 0,this.multicall=Rn.isMulticall(r)?r:new Rn(r),e.send){const n=async function(s,o){e.send(s,o)};this.send=(i,s)=>{this.multicall.handle(n,i,s)}}if(e.sendAsync){const n=async function(s,o){e.sendAsync(s,o)};this.sendAsync=(i,s)=>{this.multicall.handle(n,i,s)}}}get isMetaMask(){return this.provider.isMetaMask}get isStatus(){return this.provider.isStatus}}const BK=t=>e=>{const r=Rn.isMulticall(t)?t:new Rn(t);return(n,i)=>r.handle(e,n,i)};var jK=Object.freeze({__proto__:null,ProxyMethods:pk,MulticallProvider:DK,MulticallExternalProvider:LK,multicallMiddleware:BK});const FK=Object.freeze(Object.defineProperty({__proto__:null,Multicall:Rn,providers:jK},Symbol.toStringTag,{value:"Module"}));var gk={exports:{}};/*! +)[]`,Hp=(t,e)=>{const r=[],n=new ir(mr.mainModule.abi);for(const i of e){const s=X(i.data||"0x");if(i.to===t&&Q(s.slice(0,4))===MS){const o=s.slice(4),a=Kr.decode([OS],o)[0];r.push(...Hp(i.to,a.map(l=>Sr({},l,{to:l.target}))))}else try{const o=n.decodeFunctionData("execute",s)[0],a=Hp(t,o.map(l=>Sr({},l,{to:l.target})));r.push(...a)}catch{r.push(i)}}return r};var Uq=Object.freeze({__proto__:null,MetaTransactionsType:f1,intendTransactionBundle:Rq,intendedTransactionID:Mq,unpackMetaTransactionsData:Oq,packMetaTransactionsData:AS,digestOfTransactions:_S,subdigestOfTransactions:Nq,subdigestOfGuestModuleTransactions:$q,toSequenceTransactions:TS,toSequenceTransaction:Kx,isSequenceTransaction:u1,hasSequenceTransactions:PS,sequenceTxAbiEncode:su,fromTxAbiEncode:Dq,encodeNonce:Bq,decodeNonce:Lq,fromTransactionish:jq,isTransactionBundle:IS,isSignedTransactionBundle:RS,encodeBundleExecData:Fq,selfExecuteSelector:MS,selfExecuteAbi:OS,unwind:Hp});const NS="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",zq="0x6492649264926492649264926492649264926492649264926492649264926492";async function $S(t,e,r,n){return await t.call({data:Ke([NS,new sx().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}var Vq=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:NS,EIP_6492_SUFFIX:zq,validateEIP6492Offchain:$S});class Hq{constructor(e){this.provider=e,this.isDeployedCache=new Set}module(e){return new Na(e,[...mr.mainModuleUpgradable.abi,...mr.mainModule.abi,...mr.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(i=>X(i))).length!==0;return n&&this.isDeployedCache.add(e),n}async implementation(e){const r=Kr.encode(["address"],[e]),n=await this.provider.getStorageAt(e,r).then(i=>X(i));if(n.length===20)return Se(Q(n));if(n.length===32)return Kr.decode(["address"],n)[0]}async imageHash(e){try{return await this.module(e).imageHash()}catch{}}async nonce(e,r=0){try{return await this.module(e).readNonce(r)}catch(n){if(!await this.isDeployed(e))return 0;throw n}}async isValidSignature(e,r,n){return $S(this.provider,e,r,n)}}var Wq=Object.freeze({__proto__:null,OnChainReader:Hq});function qq(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var ce=Object.freeze({__proto__:null,config:oq,signature:aq,context:Iq,signer:hq,EIP1271:fq,transaction:Uq,reader:Wq,EIP6492:Vq,isWalletSignRequestMetadata:qq});const Wp=[{config:Bx,signature:Dx},{config:c1,signature:l1}];function DS(t){const e=t-1;if(e<0||e>=Wp.length)throw new Error(`No coder for version: ${t}`);return Wp[e]}function Gq(t){return DS(t)}var Er=Object.freeze({__proto__:null,ALL_CODERS:Wp,coderFor:DS,genericCoderFor:Gq});const BS=[qi,_e],Kq=Object.freeze(Object.defineProperty({__proto__:null,allVersions:BS,commons:ce,universal:Er,v1:qi,v2:_e},Symbol.toStringTag,{value:"Module"}));function Jq(t,e,r){for(let n=0;ne.version)&&(e=r);if(e===void 0)throw new Error("No migrations");return e}async getAllMigratePresignedTransaction(e){const{address:r,fromImageHash:n,fromVersion:i,chainId:s}=e;let o=n,a=i;const l=Object.values(this.contexts),c=[];for(let f=1;fX(s).length===0))return n5;if(!n.provider)throw new Error("signer.provider is not set, but is required");return n.provider.estimateGas({from:e,to:i.to,data:i.data,value:i.value})}))).map(i=>({executed:!0,succeeded:!0,gasUsed:V.from(i).toNumber(),gasLimit:V.from(i).toNumber()}))}async getNonce(e,r,n){if(!this.provider)throw new Error("provider is not set");if(await this.provider.getCode(e)==="0x")return 0;r===void 0&&(r=0);const s=await new Na(e,mr.mainModule.abi,this.provider).readNonce(r,{blockTag:n});return ce.transaction.encodeNonce(r,s)}async wait(e,r,n=this.waitPollRate,i=5){var s=this;typeof e!="string"&&(e=ce.transaction.intendedTransactionID(e));let o=!1;const a=async function(f,u){let h=0;for(;!o;){try{return await f()}catch(y){if(h++,i!==void 0&&h>=i)throw ye.error(`giving up after ${h} failed attempts${u?`: ${u}`:""}`,y),y;ye.warn(`attempt #${h} failed${u?`: ${u}`:""}`,y)}n>0&&await new Promise(y=>setTimeout(y,n))}throw new Error(`timed out after ${h} failed attempts${u?`: ${u}`:""}`)},l=async function(){let f=s.fromBlockLog;if(f<0&&(f=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number")+f),typeof e!="string")throw new Error("impossible");const u=e.replace("0x","");for(;!o;){const h=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number"),y=await a(()=>s.provider.getLogs({fromBlock:Math.max(0,f-s.deltaBlocksLog),toBlock:h,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,f-s.deltaBlocksLog)} to ${h}`);f=h;const p=(await Promise.all(y.map(k=>a(()=>s.provider.getTransactionReceipt(k.transactionHash),`unable to get receipt for transaction ${k.transactionHash}`)))).find(k=>k.logs.find(w=>w.topics.length===0&&w.data.replace("0x","")===u||w.topics.length===1&&w.topics[0]==="0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7"&&w.data.length>=64&&w.data.replace("0x","").startsWith(u)));if(p)return ho({receipt:p},await a(()=>s.provider.getTransaction(p.transactionHash),`unable to get transaction ${p.transactionHash}`));o||await new Promise(k=>setTimeout(k,n))}throw new Error(`Timeout waiting for transaction receipt ${e}`)};return r!==void 0?Promise.race([l(),new Promise((c,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):l()}}function rG(t){return t.signer!==void 0&&fo.isSigner(t.signer)}class nG extends zS{constructor(e){if(super(fo.isSigner(e)?{provider:e.provider}:ho({},e,{provider:e.signer.provider})),this.signer=void 0,this.txnOptions=void 0,this.signer=fo.isSigner(e)?e:e.signer,!this.signer.provider)throw new Error("Signer must have a provider")}async getFeeOptions(e,...r){return{options:[]}}async getFeeOptionsRaw(e,r,n){return{options:[]}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}setTransactionOptions(e){this.txnOptions=e}async relay(e,r,n=!0){r!==void 0&&ye.warn("LocalRelayer doesn't accept fee quotes");const i=ce.transaction.encodeBundleExecData(e),s=this.signer.sendTransaction(ho({to:e.entrypoint,data:i},this.txnOptions,{gasLimit:9e6}));if(n){const o=await s;return o.receipt=await o.wait(),o}else return s}}const iG="v1",sG="v0.4.0",oG="950b00c821b56110c64d947312b9dea3e197e207";let Us=function(t){return t.UNKNOWN="UNKNOWN",t.DROPPED="DROPPED",t.QUEUED="QUEUED",t.SENT="SENT",t.SUCCEEDED="SUCCEEDED",t.PARTIALLY_FAILED="PARTIALLY_FAILED",t.FAILED="FAILED",t}({}),aG=function(t){return t.SEND="SEND",t.RECEIVE="RECEIVE",t.BRIDGE_DEPOSIT="BRIDGE_DEPOSIT",t.BRIDGE_WITHDRAW="BRIDGE_WITHDRAW",t.BURN="BURN",t.UNKNOWN="UNKNOWN",t}({}),lG=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),cG=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class VS{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Relayer/",this.ping=n=>this.fetch(this.url("Ping"),We({},n)).then(i=>qe(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),We({},n)).then(i=>qe(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),We({},n)).then(i=>qe(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),We({},n)).then(i=>qe(i).then(s=>({data:s.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),We({},n)).then(i=>qe(i).then(s=>({chainID:s.chainID}))),this.sendMetaTxn=(n,i)=>this.fetch(this.url("SendMetaTxn"),We(n,i)).then(s=>qe(s).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,i)=>this.fetch(this.url("GetMetaTxnNonce"),We(n,i)).then(s=>qe(s).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,i)=>this.fetch(this.url("GetMetaTxnReceipt"),We(n,i)).then(s=>qe(s).then(o=>({receipt:o.receipt}))),this.simulate=(n,i)=>this.fetch(this.url("Simulate"),We(n,i)).then(s=>qe(s).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,i)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),We(n,i)).then(s=>qe(s).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),We({},n)).then(i=>qe(i).then(s=>({isFeeRequired:s.isFeeRequired,tokens:s.tokens}))),this.feeOptions=(n,i)=>this.fetch(this.url("FeeOptions"),We(n,i)).then(s=>qe(s).then(o=>({options:o.options,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,i)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),We(n,i)).then(s=>qe(s).then(o=>({options:o.options}))),this.sentTransactions=(n,i)=>this.fetch(this.url("SentTransactions"),We(n,i)).then(s=>qe(s).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,i)=>this.fetch(this.url("PendingTransactions"),We(n,i)).then(s=>qe(s).then(o=>({page:o.page,transactions:o.transactions}))),this.getGasTank=(n,i)=>this.fetch(this.url("GetGasTank"),We(n,i)).then(s=>qe(s).then(o=>({gasTank:o.gasTank}))),this.addGasTank=(n,i)=>this.fetch(this.url("AddGasTank"),We(n,i)).then(s=>qe(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.updateGasTank=(n,i)=>this.fetch(this.url("UpdateGasTank"),We(n,i)).then(s=>qe(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.getGasSponsor=(n,i)=>this.fetch(this.url("GetGasSponsor"),We(n,i)).then(s=>qe(s).then(o=>({gasSponsor:o.gasSponsor}))),this.listGasSponsors=(n,i)=>this.fetch(this.url("ListGasSponsors"),We(n,i)).then(s=>qe(s).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,i)=>this.fetch(this.url("AddGasSponsor"),We(n,i)).then(s=>qe(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,i)=>this.fetch(this.url("UpdateGasSponsor"),We(n,i)).then(s=>qe(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.removeGasSponsor=(n,i)=>this.fetch(this.url("RemoveGasSponsor"),We(n,i)).then(s=>qe(s).then(o=>({status:o.status}))),this.reportGasSponsorUsage=(n,i)=>this.fetch(this.url("ReportGasSponsorUsage"),We(n,i)).then(s=>qe(s).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.nextGasTankBalanceAdjustmentNonce=(n,i)=>this.fetch(this.url("NextGasTankBalanceAdjustmentNonce"),We(n,i)).then(s=>qe(s).then(o=>({nonce:o.nonce}))),this.adjustGasTankBalance=(n,i)=>this.fetch(this.url("AdjustGasTankBalance"),We(n,i)).then(s=>qe(s).then(o=>({status:o.status,adjustment:o.adjustment}))),this.getGasTankBalanceAdjustment=(n,i)=>this.fetch(this.url("GetGasTankBalanceAdjustment"),We(n,i)).then(s=>qe(s).then(o=>({adjustment:o.adjustment}))),this.listGasTankBalanceAdjustments=(n,i)=>this.fetch(this.url("ListGasTankBalanceAdjustments"),We(n,i)).then(s=>qe(s).then(o=>({page:o.page,adjustments:o.adjustments}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const We=(t={},e={})=>({method:"POST",headers:ho({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),qe=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});var Zl=Object.freeze({__proto__:null,WebRPCVersion:iG,WebRPCSchemaVersion:sG,WebRPCSchemaHash:oG,ETHTxnStatus:Us,TransferType:aG,FeeTokenType:lG,SortOrder:cG,Relayer:VS});const fG=[Us.DROPPED,Us.SUCCEEDED,Us.PARTIALLY_FAILED,Us.FAILED],uG=[Us.DROPPED,Us.PARTIALLY_FAILED,Us.FAILED];function dG(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&Co.isProvider(t.provider)}const hG=typeof global=="object"?global.fetch:window.fetch;class HS{constructor(e){if(this.options=e,this.service=void 0,this.provider=void 0,this._fetch=(r,n)=>{const i={},{jwtAuth:s,projectAccessKey:o}=this.options;return s&&s.length>0&&(i.Authorization=`BEARER ${s}`),o&&o.length>0&&(i["X-Access-Key"]=o),n.headers=ho({},n.headers,i),hG(r,n)},this.service=new VS(e.url,this._fetch),Co.isProvider(e.provider))this.provider=e.provider;else{const{jwtAuth:r,projectAccessKey:n}=this.options,i=iu(e.provider.url,n,r);this.provider=new K0(i)}}async waitReceipt(e,r=1e3,n=5,i){typeof e!="string"&&(e=ce.transaction.intendedTransactionID(e)),ye.info(`[rpc-relayer/waitReceipt] waiting for ${e}`);let s=0;for(;i===void 0||!i();){try{const{receipt:o}=await this.service.getMetaTxnReceipt({metaTxID:e});if(o&&o.txnReceipt&&o.txnReceipt!=="null"&&fG.includes(o.status))return{receipt:o}}catch(o){if(s++,s===n)throw o}(i===void 0||!i())&&await new Promise(o=>setTimeout(o,r))}throw new Error(`Cancelled waiting for transaction receipt ${e}`)}async simulate(e,...r){const i=Kr.encode([ce.transaction.MetaTransactionsType],[ce.transaction.sequenceTxAbiEncode(r)]);return(await this.service.simulate({wallet:e,transactions:i})).results}async getFeeOptions(e,...r){const n=await this.service.feeTokens();if(n.isFeeRequired){const i=n.tokens.map(l=>l.symbol).join(", ");ye.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${i}`);const s=await this.getNonce(e);if(!this.provider)throw ye.warn("[rpc-relayer/getFeeOptions] provider not set, needed for stub signature"),new Error("provider is not set");const{options:o,quote:a}=await this.service.feeOptions({wallet:e,to:e,data:ce.transaction.encodeBundleExecData({entrypoint:e,transactions:r,nonce:s})});return ye.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return ye.info("[rpc-relayer/getFeeOptions] relayer fees are not required"),{options:[]}}async getFeeOptionsRaw(e,r,n){const{options:i,quote:s}=await this.service.feeOptions({wallet:e,to:e,data:Q(r),simulate:n==null?void 0:n.simulate});return{options:i,quote:{_tag:"FeeQuote",_quote:s}}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}async getNonce(e,r){ye.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?V.from(r).toHexString():void 0,i=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),s=V.from(i.nonce),[o,a]=ce.transaction.decodeNonce(s);return ye.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),s}async relay(e,r,n=!0){var i=this;ye.info(`[rpc-relayer/relay] relaying signed meta-transactions ${JSON.stringify(e)} with quote ${JSON.stringify(r)}`);let s;if(r!==void 0&&(typeof r._quote=="string"?s=r._quote:ye.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw ye.warn("[rpc-relayer/relay] provider not set, failed relay"),new Error("provider is not set");const o=ce.transaction.encodeBundleExecData(e),a=await this.service.sendMetaTxn({call:{walletAddress:e.intent.wallet,contract:e.entrypoint,input:o},quote:s});if(ye.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(a)}`),n)return this.wait(e.intent.id);{const l={hash:e.intent.id,confirmations:0,from:e.intent.wallet,wait:f=>Promise.reject(new Error("impossible"))},c=async function(u){var h;if(!i.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const y=await i.wait(e.intent.id),g=(h=y.receipt)==null?void 0:h.transactionHash;if(!g)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(l,y),i.provider.waitForTransaction(g,u)};return l.wait=c,l}}async wait(e,r,n=1e3,i=5){var s=this;let o=!1;const{receipt:a}=await(r!==void 0?Promise.race([this.waitReceipt(e,n,i,()=>o),new Promise((c,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,i));if(!a.txnReceipt||uG.includes(a.status))throw new vG(a);const l=JSON.parse(a.txnReceipt);return{blockHash:l.blockHash,blockNumber:V.from(l.blockNumber).toNumber(),confirmations:1,from:typeof e=="string"?void 0:e.intent.wallet,hash:l.transactionHash,raw:a.txnReceipt,receipt:l,wait:async function(c){return s.provider.waitForTransaction(l.transactionHash,c)}}}}class vG{constructor(e){this.receipt=e}}function WS(t){return typeof t=="object"&&typeof t.simulate=="function"&&typeof t.getFeeOptions=="function"&&typeof t.gasRefundOptions=="function"&&typeof t.getNonce=="function"&&typeof t.relay=="function"&&typeof t.wait=="function"}const yG=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:nG,ProviderRelayer:zS,ProviderRelayerDefaults:US,RpcRelayer:HS,RpcRelayerProto:Zl,isLocalRelayerOptions:rG,isProviderRelayerOptions:tG,isRelayer:WS,isRpcRelayerOptions:dG,proto:Zl},Symbol.toStringTag,{value:"Module"}));function qS(t){return t.getAddress!==void 0&&t.buildDeployTransaction!==void 0&&t.predecorateSignedTransactions!==void 0&&t.decorateTransactions!==void 0&&t.sign!==void 0&&t.notifyStatusChange!==void 0}class GS{constructor(e,r=!0){this.signer=e,this.eoa=r}getAddress(){return this.signer.getAddress()}async buildDeployTransaction(e){}async predecorateSignedTransactions(e){return[]}async decorateTransactions(e,r){return e}sign(e,r){return this.signer.signMessage(e)}notifyStatusChange(e,r,n){}suffix(){return[2]}}var Yp=Object.freeze({__proto__:null,isSapientSigner:qS,SignerWrapper:GS});let zs=function(t){return t[t.INITIAL=0]="INITIAL",t[t.SIGNING=1]="SIGNING",t[t.SIGNED=2]="SIGNED",t[t.ERROR=3]="ERROR",t}({});function KS(t){return t===void 0||t.state===zs.INITIAL||t.state===zs.SIGNING}class d1{constructor(e,r=d1.randomTag()){this.tag=r,this.observers=[],this.signers=[],this.count=0,this.setSigners(e)}static randomTag(){return`default-${Q(xi(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>qS(r)?r:new GS(r))}async getSigners(){return Promise.all(this.signers.map(async function(e){return e.getAddress()}))}subscribe(e){return this.observers.push(e),()=>{this.observers=this.observers.filter(r=>r!==e)}}async notifyObservers(e,r,n){await Promise.all([...this.signers.map(async function(i){return i.notifyStatusChange(e,r,n)}),...this.observers.map(async function(i){return i(r,n)})])}async buildDeployTransaction(e){let r;for(const n of this.signers){const i=await n.buildDeployTransaction(e);r===void 0?r=i:i!=null&&i.transactions&&(r.transactions=i.transactions.concat(r.transactions))}return r}async predecorateSignedTransactions(e){const r=[];for(const n of this.signers)r.push(...await n.predecorateSignedTransactions(e??{}));return r}async decorateTransactions(e,r){for(const n of this.signers)e=await n.decorateTransactions(e,r??{});return e}signMessage(e){var r=this;const n=this.pullId();return new Promise(async function(i){const{message:s,metadata:o,callback:a,candidates:l}=e,c={ended:!1,message:s,signers:{}};let f=o??{};const u=p=>{f=p,r.notifyObservers(n,c,f)},h=()=>{try{r.notifyObservers(n,c,f);const p=Object.entries(c.signers).filter(([k,w])=>KS(w));if(a&&a(c,u)||p.length===0){c.ended=!0,i(c),r.notifyObservers(n,c,f);return}}catch(p){console.error("Error while notifying observers",p)}};let y=r.signers;if(l){const p=await Promise.all(r.signers.map(async function(k){return k.getAddress()}));y=r.signers.filter((k,w)=>l.includes(p[w]))}const g=await Promise.allSettled(y.map(async function(p){const k=await p.getAddress();c.signers[k]={state:zs.SIGNING,request:p.sign(s,o??{}).then(w=>{const E=p.suffix();return c.signers[k]={state:zs.SIGNED,signature:w,suffix:E},h(),w}).catch(w=>{throw c.signers[k]={state:zs.ERROR,error:w},h(),w})}}));for(let p=0;pYe(e))):Ye(t)}const s5=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(n.state===zs.SIGNED){const i=X(n.suffix),s=ke(["bytes","bytes"],[n.signature,i]);e.set(r,{signature:s,isDynamic:i.length!==1||i[0]!==2})}}return e};class ou extends fo{constructor(e){if(Dt.eq(e.chainId)&&!e.coders.signature.supportsNoChainId)throw new Error(`Sequence version ${e.config.version} doesn't support chainId 0`);super(),this.context=void 0,this.config=void 0,this.address=void 0,this.chainId=void 0,this.provider=void 0,this.relayer=void 0,this.coders=void 0,this.orchestrator=void 0,this._reader=void 0,this.context=e.context,this.config=e.config,this.orchestrator=e.orchestrator,this.coders=e.coders,this.address=e.address,this.chainId=e.chainId,this.provider=e.provider,this.relayer=e.relayer,this._reader=e.reader}static newWallet(e){const r=ce.context.addressOf(e.context,e.coders.config.imageHashOf(e.config));return new ou(Os({},e,{address:r}))}reader(){if(this._reader)return this._reader;if(!this.provider)throw new Error("Wallet status provider requires a provider");return new ce.reader.OnChainReader(this.provider)}setConfig(e){this.config=e}setOrchestrator(e){this.orchestrator=e}setAddress(e){this.address=e}getSigners(){return this.orchestrator.getSigners()}async getAddress(){return this.address}async decorateTransactions(e){const r=await this.orchestrator.decorateTransactions(e);if(await this.reader().isDeployed(this.address))return r;const n=[{to:r.entrypoint,data:ce.transaction.encodeBundleExecData(r),revertOnError:!0}],i=await this.buildDeployTransaction();return i&&n.unshift(...i.transactions),{entrypoint:this.context.guestModule,chainId:this.chainId,intent:r.intent,transactions:n}}async buildDeployTransaction(e){if(e!=null&&e.ignoreDeployed&&await this.reader().isDeployed(this.address))return;const r=this.coders.config.imageHashOf(this.config);if(ce.context.addressOf(this.context,r)!==this.address)throw new Error(`First address of config ${r} doesn't match wallet address ${this.address}`);const n=ou.buildDeployTransaction(this.context,r);if(e!=null&&e.includeChildren){const i=await this.orchestrator.buildDeployTransaction(e);i&&(n.transactions=i.transactions.concat(n.transactions))}return n}async deploy(e){const r=await this.buildDeployTransaction(e);if(r!==void 0){if(!this.relayer)throw new Error("Wallet deploy requires a relayer");return this.relayer.relay(Os({},r,{chainId:this.chainId,intent:{id:Q(xi(32)),wallet:this.address}}))}}static buildDeployTransaction(e,r){const n=new ir(mr.factory.abi);return{entrypoint:e.guestModule,transactions:[{to:e.factory,data:n.encodeFunctionData(n.getFunction("deploy"),[e.mainModule,r]),gasLimit:1e5,delegateCall:!1,revertOnError:!0,value:0}]}}async buildUpdateConfigurationTransaction(e){if(this.coders.config.update.isKindUsed){const r=await this.reader().implementation(this.address),n=r&&r===this.context.mainModuleUpgradable;return this.coders.config.update.buildTransaction(this.address,e,this.context,n?"later":"first")}return this.coders.config.update.buildTransaction(this.address,e,this.context)}async getNonce(e=0){const r=await this.reader().nonce(this.address,e);if(r===void 0)throw new Error("Unable to determine nonce");return r}async signDigest(e,r){const n=Lp(this.address,this.chainId,e);if(this.coders.config.hasSubdigest(this.config,n))return this.coders.signature.encodeSigners(this.config,new Map,[n],this.chainId).encoded;const i=Os({},r,{digest:e,chainId:this.chainId,address:this.address,config:this.config}),s=X(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(l=>l.address),message:s,metadata:i,callback:(l,c)=>{const f=s5(l),u=Os({},i,{parts:f});return c(u),this.coders.signature.hasEnoughSigningPower(this.config,f)}}),a=s5(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(xe(e),{message:e})}signTransactionBundle(e){if(e.entrypoint!==this.address)throw new Error(`Invalid entrypoint: ${e.entrypoint} !== ${this.address}`);return this.signTransactions(e.transactions,e.nonce)}async fetchNonceOrSpace(e){let r;if(e&&e.space!==void 0)r=V.from(e.space);else{if(e===void 0)return this.randomNonce();if(e&&e.serial===!0)r=0;else return e}const n=await this.reader().nonce(this.address,r);if(n===void 0)throw new Error("Unable to determine nonce");return ce.transaction.encodeNonce(r,n)}randomNonce(){const e=V.from(Q(xi(12)));return ce.transaction.encodeNonce(e,0)}async signTransactions(e,r,n){const i=await i5(e),s=ce.transaction.fromTransactionish(this.address,i);s.length===0&&s.push({to:this.address,data:"0x",value:0,gasLimit:0,delegateCall:!1,revertOnError:!0});const o=await this.fetchNonceOrSpace(r),a=ce.transaction.digestOfTransactions(o,s),l=Os({digest:a,transactions:s},n),c=await this.signDigest(a,l);return{intent:{id:Lp(this.address,this.chainId,a),wallet:this.address},chainId:this.chainId,transactions:s,entrypoint:this.address,nonce:o,signature:c}}async sendSignedTransaction(e,r){if(!this.relayer)throw new Error("Wallet sendTransaction requires a relayer");return this.relayer.relay(e,r)}async sendTransaction(e,r){let n;(r==null?void 0:r.nonce)!==void 0?n=r.nonce:r!=null&&r.serial?n={serial:!0}:n=this.randomNonce();const i=await this.signTransactions(e,n),s=await this.decorateTransactions(i);return this.sendSignedTransaction(s,r==null?void 0:r.quote)}async fillGasLimits(e){const r=await i5(e),n=ce.transaction.fromTransactionish(this.address,r),i=this.relayer;if(!i)throw new Error("Wallet fillGasLimits requires a relayer");const s=await i.simulate(this.address,...n);return n.map((o,a)=>{const l=o.gasLimit?V.from(o.gasLimit).toNumber():s[a].gasLimit;return Os({},o,s[a],{gasLimit:l})})}connect(e,r){return this.provider=e,this.relayer=r,this}signTransaction(e){throw new Error("Method not implemented.")}}function zi(){return zi=Object.assign?Object.assign.bind():function(t){for(var e=1;egG(t[e])):!1}function xG(t){if(!t)return[];const e=V.from(t.value);switch(t.token.type){case Zl.FeeTokenType.UNKNOWN:return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.to,value:e.toHexString(),data:[]}];case Zl.FeeTokenType.ERC20_TOKEN:if(!t.token.contractAddress)throw new Error("No contract address for ERC-20 fee option");return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.token.contractAddress,value:0,data:new ir([{constant:!1,inputs:[{type:"address"},{type:"uint256"}],name:"transfer",outputs:[],type:"function"}]).encodeFunctionData("transfer",[t.to,e.toHexString()])}];default:throw new Error(`Unhandled fee token type ${t.token.type}`)}}class bG{constructor(e,r,n){this.account=e,this.chainId=r,this.options=n,this._isSigner=!0}get provider(){return this.account.providerFor(this.chainId)}async getAddress(){return this.account.address}signMessage(e){var r,n;return this.account.signMessage(e,this.chainId,(r=(n=this.options)==null?void 0:n.cantValidateBehavior)!=null?r:"throw")}async defaultSelectFee(e,r){if(r.length===0)return;const n=[{constant:!0,inputs:[{type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],type:"function"}];for(const i of r)if(i.token.type===Zl.FeeTokenType.UNKNOWN){if((await this.getBalance()).gte(V.from(i.value)))return i}else if(i.token.contractAddress&&i.token.type===Zl.FeeTokenType.ERC20_TOKEN&&(await new Na(i.token.contractAddress,n,this.provider).balanceOf(this.account.address)).gte(V.from(i.value)))return i;throw new Error("No fee option available - not enough balance")}async sendTransaction(e,r){var n,i,s,o,a;const l=mG(e)?await Ye(e):e,c=await this.account.prepareTransactions({txs:l,chainId:this.chainId,stubSignatureOverrides:(n=(i=this.options)==null?void 0:i.stubSignatureOverrides)!=null?n:new Map,simulateForFeeOptions:r==null?void 0:r.simulateForFeeOptions}),u=await((s=(o=this.options)==null?void 0:o.selectFee)!=null?s:this.defaultSelectFee.bind(this))(l,c.feeOptions),h=[...c.transactions,...xG(u)];return this.account.sendTransaction(h,this.chainId,c.feeQuote,void 0,void 0,((a=this.options)==null?void 0:a.nonceSpace)!==void 0?{nonceSpace:this.options.nonceSpace}:void 0)}getBalance(e){return this.provider.getBalance(this.account.address,e)}call(e,r){return this.provider.call(e,r)}async resolveName(e){const r=await this.provider.resolveName(e);if(!r)throw new Error(`Could not resolve name ${e}`);return r}connect(e){throw new Error("Method not implemented.")}signTransaction(e){throw new Error("Method not implemented.")}getTransactionCount(e){throw new Error("Method not implemented.")}estimateGas(e){throw new Error("Method not implemented.")}getChainId(){return Promise.resolve(V.from(this.chainId).toNumber())}getGasPrice(){throw new Error("Method not implemented.")}getFeeData(){throw new Error("Method not implemented.")}checkTransaction(e){throw new Error("Method not implemented.")}populateTransaction(e){throw new Error("Method not implemented.")}_checkProvider(e){throw new Error("Method not implemented.")}}class wG{async isDeployed(e){return!1}async implementation(e){}async imageHash(e){}async nonce(e,r){return Dt}async isValidSignature(e,r,n){throw new Error("Method not supported.")}}class Ji{constructor(e){this.address=void 0,this.networks=void 0,this.tracker=void 0,this.contexts=void 0,this.migrator=void 0,this.migrations=void 0,this.orchestrator=void 0,this.jwt=void 0,this.projectAccessKey=void 0,this.address=Se(e.address),this.contexts=e.contexts,this.tracker=e.tracker,this.networks=e.networks,this.orchestrator=e.orchestrator,this.jwt=e.jwt,this.projectAccessKey=e.projectAccessKey,this.migrations=e.migrations||Jp.DefaultMigrations,this.migrator=new Kp.Migrator(e.tracker,this.migrations,this.contexts)}getSigner(e,r){return new bG(this,e,r)}static async new(e){var r;const i=new Kp.Migrator(e.tracker,(r=e.migrations)!=null?r:Jp.DefaultMigrations,e.contexts).lastMigration(),s=i.configCoder,o=s.fromSimple(e.config),a=s.imageHashOf(o),l=e.contexts[i.version],c=ce.context.addressOf(l,a);return await e.tracker.saveCounterfactualWallet({config:o,context:Object.values(e.contexts)}),new Ji({address:c,tracker:e.tracker,contexts:e.contexts,networks:e.networks,orchestrator:e.orchestrator,migrations:e.migrations,projectAccessKey:e.projectAccessKey})}getAddress(){return Promise.resolve(this.address)}get version(){return this.migrator.lastMigration().version}get coders(){const e=this.migrator.lastMigration();return{signature:e.signatureCoder,config:e.configCoder}}network(e){const r=V.from(e),n=this.networks.find(i=>r.eq(i.chainId));if(!n)throw new Error(`Network not found for chainId ${e}`);return n}providerFor(e){const r=this.network(e);if(!r.provider&&!r.rpcUrl)throw new Error(`Provider not found for chainId ${e}`);return r.provider||new K0(iu(r.rpcUrl,this.projectAccessKey,this.jwt),{name:"",chainId:V.from(e).toNumber()})}reader(e){return Dt.eq(e)?new wG:new ce.reader.OnChainReader(this.providerFor(e))}relayer(e){const r=this.network(e);if(!r.relayer)throw new Error(`Relayer not found for chainId ${e}`);return WS(r.relayer)?r.relayer:new HS(zi({},r.relayer,{projectAccessKey:this.projectAccessKey,jwtAuth:this.jwt}))}setOrchestrator(e){this.orchestrator=e}setJwt(e){this.jwt=e}contextFor(e){const r=this.contexts[e];if(!r)throw new Error(`Context not found for version ${e}`);return r}walletForStatus(e,r){const n=Er.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,i){const s=Dt.eq(e);return new ou({config:n,context:r,chainId:e,coders:i,relayer:s?void 0:this.relayer(e),address:this.address,orchestrator:this.orchestrator,reader:this.reader(e)})}async status(e,r=!1){var n=this;const i=this.reader(e).isDeployed(this.address),s=this.tracker.imageHashOfCounterfactualWallet({wallet:this.address}).then(M=>{if(!M)throw new Error(`Counterfactual imageHash not found for wallet ${this.address}`);return M}),o=s.then(M=>LS.counterfactualVersion(this.address,M.imageHash,Object.values(this.contexts))),a=async function(){if(!await i)return o;const j=await n.reader(e).implementation(n.address);if(!j)throw new Error(`Implementation not found for wallet ${n.address}`);const z=Object.values(n.contexts);for(let F=0;F0?p[p.length-1].nextImageHash:h,w=await this.tracker.configOfImageHash({imageHash:k});if(!w)throw new Error(`Config not found for imageHash ${k}`);const E=await i,A=await s,I=Er.coderFor(y).config.checkpointOf(w);return{original:zi({},A,{version:await o}),onChain:{imageHash:u,config:await c,version:f,deployed:E},fullyMigrated:y===this.version,signedMigrations:g,version:y,presignedConfigurations:p,imageHash:k,config:w,checkpoint:I,canOnchainValidate:f===this.version&&E}}mustBeFullyMigrated(e){if(!e.fullyMigrated)throw new Error(`Wallet ${this.address} is not fully migrated`)}async predecorateSignedTransactions(e,r){const n=await this.orchestrator.predecorateSignedTransactions({chainId:r}),i=await this.predecorateTransactions([],e,r);return ce.transaction.fromTransactionish(this.address,i).length>0&&n.push(await this.signTransactions(i,r)),n}async predecorateTransactions(e,r,n){if(r.onChain.imageHash!==r.imageHash){const s=await this.walletForStatus(n,r).buildUpdateConfigurationTransaction(r.config);return[Array.isArray(e)?e:[e],s.transactions].flat()}return e}async decorateTransactions(e,r,n){var i,s;if(!Array.isArray(e))return this.decorateTransactions([e],r,n);n=(i=n)!=null?i:e[0].chainId;const o=await this.buildBootstrapTransactions(r,n),a=o.transactions.length>0;if(!a&&e.length===1)return e[0];const{entrypoint:l}=a?o:e[0],c={entrypoint:l,chainId:n,intent:(s=e[0])==null?void 0:s.intent,transactions:[...o.transactions,...e.map(f=>({to:f.entrypoint,data:ce.transaction.encodeBundleExecData(f),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}))]};if(!r.onChain.deployed){const f=ce.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,n,c.transactions);c.intent===void 0?c.intent={id:f,wallet:this.address}:c.intent.id=f}return c}async decorateSignature(e,r){if(!r.presignedConfigurations||r.presignedConfigurations.length===0)return e;const n=this.coders.signature,i=r.presignedConfigurations.map(o=>o.signature),s=n.chainSignatures(e,i);return n.trim(s)}async publishWitness(){const e=xe(Ue(`This is a Sequence account woo! ${Date.now()}`)),r=await this.signDigest(e,0,!1),n=this.coders.signature.decode(r),i=this.coders.signature.signaturesOfDecoded(n);return this.tracker.saveWitnesses({wallet:this.address,digest:e,chainId:0,signatures:i})}async signDigest(e,r,n=!0,i="ignore",s){const o=Dt.eq(r)?this.networks[0].chainId:r,a=await this.status(o);if(this.mustBeFullyMigrated(a),!a.canOnchainValidate&&i==="throw")throw new Error("Wallet cannot validate onchain");const c=await this.walletForStatus(r,a).signDigest(e,s),f=n?this.decorateSignature(c,a):c;if(!a.canOnchainValidate)switch(i){case"ignore":return f;case"eip6492":return this.buildEIP6492Signature(await f,a,r)}return f}buildOnChainSignature(e){const r=ce.signature.subdigestOf({digest:Q(e),chainId:0,address:this.address}),n=Q(r),i=this.coders.config.fromSimple({threshold:32768,checkpoint:0,signers:[],subdigests:[n]}),s=new ir(mr.mainModule.abi),o={entrypoint:this.address,transactions:[{to:this.address,data:s.encodeFunctionData("setExtraImageHash",[this.coders.config.imageHashOf(i),"57896044618658097711785492504343953926634992332820282019728792003956564819968"]),gasLimit:25e4}]};this.tracker.saveWalletConfig({config:i});const a=this.coders.signature.encodeSigners(i,new Map,[n],0).encoded;return{bundle:o,signature:a}}async buildEIP6492Signature(e,r,n){const i=await this.buildBootstrapTransactions(r,n);if(i.transactions.length===0)throw new Error("Cannot build EIP-6492 signature without bootstrap transactions");const s=Kr.encode(["address","bytes","bytes"],[i.entrypoint,ce.transaction.encodeBundleExecData(i),e]);return ke(["bytes","bytes32"],[s,ce.EIP6492.EIP_6492_SUFFIX])}async editConfig(e){const r=await this.status(0).then(i=>i.config),n=this.coders.config.editConfig(r,zi({},e,{checkpoint:this.coders.config.checkpointOf(r).add(1)}));return this.updateConfig(n)}async updateConfig(e){if(!this.coders.config.isWalletConfig(e))throw new Error(`Invalid config for wallet ${this.address}`);const r=this.coders.config.imageHashOf(e),n=this.coders.signature.hashSetImageHash(r),i=await this.signDigest(n,0,!1);await this.tracker.savePresignedConfiguration({wallet:this.address,nextConfig:e,signature:i});const s=await this.tracker.configOfImageHash({imageHash:r,noCache:!0});if(!s||this.coders.config.imageHashOf(s)!==r)throw Error(`Reverse lookup failed for imageHash ${r}`)}async buildBootstrapTransactions(e,r){var n;const i=await this.orchestrator.buildDeployTransaction({chainId:r}),s=(n=i==null?void 0:i.transactions)!=null?n:[];if(!e.onChain.deployed){const l=ou.buildDeployTransaction(e.original.context,e.original.imageHash);s.push(...l.transactions)}s.length,s.push(...e.signedMigrations.map(l=>({to:l.tx.entrypoint,data:ce.transaction.encodeBundleExecData(l.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const o=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:ce.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,r,s),{guestModule:a}=this.contextFor(e.version);return{entrypoint:a,transactions:s,chainId:r,intent:{id:o,wallet:this.address}}}async bootstrapTransactions(e,r){const n=r||await this.status(e);return this.buildBootstrapTransactions(n,e)}async doBootstrap(e,r,n){const i=await this.bootstrapTransactions(e,n);return this.relayer(e).relay(zi({},i,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(xe(e),r,!0,n)}async signTransactions(e,r,n,i){const s=n||await this.status(r);this.mustBeFullyMigrated(s);const o=this.walletForStatus(r,s),a={address:this.address,digest:"",chainId:r,config:{version:this.version},decorate:!0,cantValidateBehavior:"ignore"},l=i!=null&&i.serial?{serial:!0}:(i==null?void 0:i.nonceSpace)!==void 0?{space:i.nonceSpace}:void 0,c=await o.signTransactions(e,l,a);return zi({},c,{signature:await this.decorateSignature(c.signature,s)})}async signMigrations(e,r){const n=await this.status(e);if(n.fullyMigrated)return!1;const i=this.walletForStatus(e,n),s=r(i.config),o=await this.migrator.signNextMigration(this.address,n.version,i,s);if(!o)return!1;await this.tracker.saveWalletConfig({config:s});const a=Er.coderFor(s.version).config,l=a.imageHashOf(s),c=await this.tracker.configOfImageHash({imageHash:l,noCache:!0});if(!c||a.imageHashOf(c)!==l)throw Error(`Reverse lookup failed for imageHash ${l}`);return await this.tracker.saveMigration(this.address,o,this.contexts),!0}async signAllMigrations(e){var r=this;const n=[];return{signedMigrations:(await Promise.all(this.networks.map(async function(o){try{return await r.signMigrations(o.chainId,e)}catch(a){return console.warn(`Failed to sign migrations for chain ${o.chainId}`,a),n.push(o.chainId),null}}))).filter(o=>o!==null),failedChains:n}}async isMigratedAllChains(){var e=this;const r=[];return{migratedAllChains:(await Promise.all(this.networks.map(async function(s){try{return await e.status(s.chainId)}catch(o){return r.push(s.chainId),console.warn(`Failed to get status for chain ${s.chainId}`,o),{fullyMigrated:!0}}}))).every(s=>s.fullyMigrated),failedChains:r}}async sendSignedTransactions(e,r,n,i,s){if(!Array.isArray(e))return this.sendSignedTransactions([e],r,n,i,s);const o=i||await this.status(r);this.mustBeFullyMigrated(o);const a=await this.decorateTransactions(e,o,r);return s==null||s(a),this.relayer(r).relay(a,n)}async fillGasLimits(e,r,n){return this.walletForStatus(r,n||await this.status(r)).fillGasLimits(e)}async gasRefundQuotes(e,r,n,i,s){const o=i||await this.status(r),a=this.walletForStatus(r,o),l=await this.predecorateTransactions(e,o,r),c=ce.transaction.fromTransactionish(this.address,l),f=a.coders.config.buildStubSignature(a.config,n),u=Q(xi(32)),h={chainId:r,intent:{id:u,wallet:this.address},signature:f,transactions:c,entrypoint:this.address,nonce:0},y=await this.decorateTransactions(h,o),g=ce.transaction.encodeBundleExecData(y),p=await this.relayer(r).getFeeOptionsRaw(y.entrypoint,g,s);return zi({},p,{decorated:y})}async prepareTransactions(e){const r=await this.status(e.chainId),n=await this.fillGasLimits(e.txs,e.chainId,r),i=await this.gasRefundQuotes(n,e.chainId,e.stubSignatureOverrides,r,{simulate:e.simulateForFeeOptions}),s=ce.transaction.unwind(this.address,i.decorated.transactions);return{transactions:n,flatDecorated:s,feeOptions:i.options,feeQuote:i.quote}}async sendTransaction(e,r,n,i=!1,s,o){const a=await this.status(r),l=i?e:await this.predecorateTransactions(e,a,r),f=ce.transaction.fromTransactionish(this.address,l).length>0?await this.signTransactions(l,r,void 0,o):void 0,u=await this.orchestrator.predecorateSignedTransactions({chainId:r}),h=[];return f!==void 0&&f.transactions.length>0&&h.push(f),h.push(...u.filter(y=>y.transactions.length>0)),this.sendSignedTransactions(h,r,n,void 0,s)}async signTypedData(e,r,n,i,s="ignore"){const o=Eu({domain:e,types:r,message:n});return this.signDigest(o,i,!0,s)}async getSigners(){var e=this;const r=n=>n.length?n[n.length-1]:void 0;return(await Promise.all(this.networks.map(async function({chainId:n,name:i}){try{var s;const o=await e.status(n);let a=(s=r(o.presignedConfigurations))==null?void 0:s.nextImageHash;if(!a&&o.onChain.version!==o.version){const u=r(o.signedMigrations);if(u){const{toVersion:h,toConfig:y}=u;a=Er.genericCoderFor(h).config.imageHashOf(y)}}a||(a=o.onChain.imageHash);const l=await e.tracker.configOfImageHash({imageHash:a});if(!l)throw new Error(`unable to find config for image hash ${a}`);return Er.genericCoderFor(l.version).config.signersOf(l).map(u=>zi({},u,{network:n}))}catch(o){return console.warn(`unable to get signers on network ${n} ${i}`,o),[]}}))).flat()}async getAllSigners(){var e=this;const r=[];return await Promise.all(this.networks.map(async function(n){const i=n.chainId,s=await e.status(i,!0),o=[s.onChain.imageHash,...s.onChain.version!==s.version?s.signedMigrations.map(a=>Er.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...s.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,l){const c=l===o.length-1,f=await e.tracker.configOfImageHash({imageHash:a});if(!f){console.warn(`AllSigners may be incomplete, config not found for imageHash ${a}`);return}Er.genericCoderFor(f.version).config.signersOf(f).forEach(y=>{const g=r.find(p=>p.address===y.address&&p.network===i);if(g&&c&&g.flaggedForRemoval){g.flaggedForRemoval=!1;return}g||r.push({address:y.address,weight:y.weight,network:i,flaggedForRemoval:!c})})}))})),r}}function CG(t){return t instanceof Ji}const EG=Object.freeze(Object.defineProperty({__proto__:null,Account:Ji,isAccount:CG},Symbol.toStringTag,{value:"Module"}));function sh(){return sh=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),hr({},n)).then(i=>vr(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),hr({},n)).then(i=>vr(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),hr({},n)).then(i=>vr(i).then(s=>({status:s.status}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),hr({},n)).then(i=>vr(i).then(s=>({chainID:s.chainID}))),this.getEtherBalance=(n,i)=>this.fetch(this.url("GetEtherBalance"),hr(n,i)).then(s=>vr(s).then(o=>({balance:o.balance}))),this.getTokenBalances=(n,i)=>this.fetch(this.url("GetTokenBalances"),hr(n,i)).then(s=>vr(s).then(o=>({page:o.page,balances:o.balances}))),this.getTokenSupplies=(n,i)=>this.fetch(this.url("GetTokenSupplies"),hr(n,i)).then(s=>vr(s).then(o=>({page:o.page,contractType:o.contractType,tokenIDs:o.tokenIDs}))),this.getTokenSuppliesMap=(n,i)=>this.fetch(this.url("GetTokenSuppliesMap"),hr(n,i)).then(s=>vr(s).then(o=>({supplies:o.supplies}))),this.getBalanceUpdates=(n,i)=>this.fetch(this.url("GetBalanceUpdates"),hr(n,i)).then(s=>vr(s).then(o=>({page:o.page,balances:o.balances}))),this.getTransactionHistory=(n,i)=>this.fetch(this.url("GetTransactionHistory"),hr(n,i)).then(s=>vr(s).then(o=>({page:o.page,transactions:o.transactions}))),this.syncBalance=(n,i)=>this.fetch(this.url("SyncBalance"),hr(n,i)).then(s=>vr(s).then(o=>({}))),this.fetchTransactionReceipt=(n,i)=>this.fetch(this.url("FetchTransactionReceipt"),hr(n,i)).then(s=>vr(s).then(o=>({receipt:o.receipt}))),this.fetchTransactionReceiptWithFilter=(n,i)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),hr(n,i)).then(s=>vr(s).then(o=>({receipt:o.receipt}))),this.getAllWebhookListeners=(n,i)=>this.fetch(this.url("GetAllWebhookListeners"),hr(n,i)).then(s=>vr(s).then(o=>({listeners:o.listeners}))),this.getWebhookListener=(n,i)=>this.fetch(this.url("GetWebhookListener"),hr(n,i)).then(s=>vr(s).then(o=>({listener:o.listener}))),this.addWebhookListener=(n,i)=>this.fetch(this.url("AddWebhookListener"),hr(n,i)).then(s=>vr(s).then(o=>({status:o.status,listener:o.listener}))),this.updateWebhookListener=(n,i)=>this.fetch(this.url("UpdateWebhookListener"),hr(n,i)).then(s=>vr(s).then(o=>({status:o.status}))),this.removeWebhookListener=(n,i)=>this.fetch(this.url("RemoveWebhookListener"),hr(n,i)).then(s=>vr(s).then(o=>({status:o.status}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const hr=(t={},e={})=>({method:"POST",headers:sh({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),vr=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),o5=typeof global=="object"?global.fetch:window.fetch;class YS extends JS{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,o5),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(i,s)=>{const o={},a=this.jwtAuth,l=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),l&&l.length>0&&(o["X-Access-Key"]=l),s.headers=sh({},s.headers,o),o5(i,s)},this.fetch=this._fetch}}const NG=Object.freeze(Object.defineProperty({__proto__:null,ContractType:_G,EventLogDataType:PG,EventLogType:TG,Indexer:JS,SequenceIndexer:YS,SortOrder:OG,TransactionStatus:RG,TransactionType:MG,TxnTransferType:IG,WebRPCSchemaHash:AG,WebRPCSchemaVersion:kG,WebRPCVersion:SG},Symbol.toStringTag,{value:"Module"}));function oh(){return oh=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),_t({},n)).then(i=>Tt(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),_t({},n)).then(i=>Tt(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),_t({},n)).then(i=>Tt(i).then(s=>({status:s.status}))),this.getTokenMetadata=(n,i)=>this.fetch(this.url("GetTokenMetadata"),_t(n,i)).then(s=>Tt(s).then(o=>({tokenMetadata:o.tokenMetadata}))),this.enqueueTokensForRefresh=(n,i)=>this.fetch(this.url("EnqueueTokensForRefresh"),_t(n,i)).then(s=>Tt(s).then(o=>({taskId:o.taskId}))),this.getTokenRefreshStatus=(n,i)=>this.fetch(this.url("GetTokenRefreshStatus"),_t(n,i)).then(s=>Tt(s).then(o=>({status:o.status}))),this.getTokenRefreshResult=(n,i)=>this.fetch(this.url("GetTokenRefreshResult"),_t(n,i)).then(s=>Tt(s).then(o=>({status:o.status,tokens:o.tokens,failureReasons:o.failureReasons}))),this.cancelRefreshJob=(n,i)=>this.fetch(this.url("CancelRefreshJob"),_t(n,i)).then(s=>Tt(s).then(o=>({ok:o.ok}))),this.getTokenMetadataBatch=(n,i)=>this.fetch(this.url("GetTokenMetadataBatch"),_t(n,i)).then(s=>Tt(s).then(o=>({contractTokenMetadata:o.contractTokenMetadata}))),this.searchTokenMetadata=(n,i)=>this.fetch(this.url("SearchTokenMetadata"),_t(n,i)).then(s=>Tt(s).then(o=>({page:o.page,tokenMetadata:o.tokenMetadata}))),this.searchTokenIDs=(n,i)=>this.fetch(this.url("SearchTokenIDs"),_t(n,i)).then(s=>Tt(s).then(o=>({page:o.page,tokenIds:o.tokenIds}))),this.tokenCollectionFilters=(n,i)=>this.fetch(this.url("TokenCollectionFilters"),_t(n,i)).then(s=>Tt(s).then(o=>({filters:o.filters}))),this.getContractInfo=(n,i)=>this.fetch(this.url("GetContractInfo"),_t(n,i)).then(s=>Tt(s).then(o=>({contractInfo:o.contractInfo}))),this.getContractInfoBatch=(n,i)=>this.fetch(this.url("GetContractInfoBatch"),_t(n,i)).then(s=>Tt(s).then(o=>({contractInfoMap:o.contractInfoMap}))),this.searchContractInfo=(n,i)=>this.fetch(this.url("SearchContractInfo"),_t(n,i)).then(s=>Tt(s).then(o=>({contractInfoList:o.contractInfoList}))),this.searchContractInfoBatch=(n,i)=>this.fetch(this.url("SearchContractInfoBatch"),_t(n,i)).then(s=>Tt(s).then(o=>({contractInfoByChain:o.contractInfoByChain}))),this.searchMetadata=(n,i)=>this.fetch(this.url("SearchMetadata"),_t(n,i)).then(s=>Tt(s).then(o=>({tokenMetadata:o.tokenMetadata,contractInfo:o.contractInfo}))),this.projectSetTokenMetadata=(n,i)=>this.fetch(this.url("ProjectSetTokenMetadata"),_t(n,i)).then(s=>Tt(s).then(o=>({ok:o.ok}))),this.getNiftyswapTokenQuantity=(n,i)=>this.fetch(this.url("GetNiftyswapTokenQuantity"),_t(n,i)).then(s=>Tt(s).then(o=>({quantity:o.quantity}))),this.getNiftyswapUnitPrices=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPrices"),_t(n,i)).then(s=>Tt(s).then(o=>({prices:o.prices}))),this.getNiftyswapUnitPricesWithQuantities=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPricesWithQuantities"),_t(n,i)).then(s=>Tt(s).then(o=>({prices:o.prices}))),this.addContractToMintMonitor=(n,i)=>this.fetch(this.url("AddContractToMintMonitor"),_t(n,i)).then(s=>Tt(s).then(o=>({ok:o.ok}))),this.removeContractFromMintMonitor=(n,i)=>this.fetch(this.url("RemoveContractFromMintMonitor"),_t(n,i)).then(s=>Tt(s).then(o=>({ok:o.ok}))),this.mintMonitorJobStatus=(n,i)=>this.fetch(this.url("MintMonitorJobStatus"),_t(n,i)).then(s=>Tt(s).then(o=>({task:o.task}))),this.mintMonitorTriggerJob=(n,i)=>this.fetch(this.url("MintMonitorTriggerJob"),_t(n,i)).then(s=>Tt(s).then(o=>({ok:o.ok}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const _t=(t={},e={})=>({method:"POST",headers:oh({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Tt=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),a5=typeof global=="object"?global.fetch:window.fetch;class XS extends QS{constructor(e="https://metadata.sequence.app",r,n){super(e.endsWith("/")?e.slice(0,-1):e,a5),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(i,s)=>{const o={},a=this.jwtAuth,l=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),l&&l.length>0&&(o["X-Access-Key"]=l),s.headers=oh({},s.headers,o),a5(i,s)},this.fetch=this._fetch}}const VG=Object.freeze(Object.defineProperty({__proto__:null,ContractType:LG,Metadata:QS,PropertyType:jG,SequenceMetadata:XS,SortOrder:UG,SwapType:FG,TaskStatus:zG,WebRPCSchemaHash:BG,WebRPCSchemaVersion:DG,WebRPCVersion:$G},Symbol.toStringTag,{value:"Module"}));function HG(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function WG(t){return t.startsWith("ipfs://")}class qG{constructor(e,r,n=1e3){this.provider=e,this.solver=r,this.window=n,this.pending=new Map}async runByEIP5719(e,r,n){const i=`${e}-${r}-${n}`,s=Date.now();if(this.pending.has(i)&&s-this.pending.get(i).timestamp10)throw new Error("EIP5719 - Too many tries");if(ce.signer.canRecover(n)){const l=ce.signer.recoverSigner(r,n);if(l&&l.toLowerCase()===t.toLowerCase())return n}try{if(await ce.signer.isValidSignature(t,r,n,e))return n}catch{}const o=await KG(GG(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=Q(await(i||new JG).resolve(o));if(!a||a==="")throw new Error("EIP5719 - Empty alternative signature");if(a===Q(n))throw new Error("EIP5719 - Alternative signature is invalid or the same");return ZS(t,e,r,a,i,s+1)}class JG{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.gateway=e,this.uri=n=>WG(n)?HG(n,this.gateway):n,this.resolve=async function(n){const i=r.uri(n),s=await fetch(i);if(!s.ok)throw new Error(`URISolverIPFS - Failed to fetch ${i}`);return await s.text()}}}const YG=(t,e)=>e.some(r=>t instanceof r);let l5,c5;function QG(){return l5||(l5=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function XG(){return c5||(c5=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ek=new WeakMap,Qp=new WeakMap,tk=new WeakMap,Vv=new WeakMap,Jx=new WeakMap;function ZG(t){const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{r(ro(t.result)),i()},o=()=>{n(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&ek.set(r,t)}).catch(()=>{}),Jx.set(e,t),e}function eK(t){if(Qp.has(t))return;const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{r(),i()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});Qp.set(t,e)}let Xp={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return Qp.get(t);if(e==="objectStoreNames")return t.objectStoreNames||tk.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return ro(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function tK(t){Xp=t(Xp)}function rK(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(Hv(this),e,...r);return tk.set(n,e.sort?e.sort():[e]),ro(n)}:XG().includes(t)?function(...e){return t.apply(Hv(this),e),ro(ek.get(this))}:function(...e){return ro(t.apply(Hv(this),e))}}function nK(t){return typeof t=="function"?rK(t):(t instanceof IDBTransaction&&eK(t),YG(t,QG())?new Proxy(t,Xp):t)}function ro(t){if(t instanceof IDBRequest)return ZG(t);if(Vv.has(t))return Vv.get(t);const e=nK(t);return e!==t&&(Vv.set(t,e),Jx.set(e,t)),e}const Hv=t=>Jx.get(t);function iK(t,e,{blocked:r,upgrade:n,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=ro(o);return n&&o.addEventListener("upgradeneeded",l=>{n(ro(o.result),l.oldVersion,l.newVersion,ro(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{s&&l.addEventListener("close",()=>s()),i&&l.addEventListener("versionchange",c=>i(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const sK=["get","getKey","getAll","getAllKeys","count"],oK=["put","add","delete","clear"],Wv=new Map;function f5(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Wv.get(e))return Wv.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=oK.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||sK.includes(r)))return;const s=async function(o,...a){const l=this.transaction(o,i?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(a.shift())),(await Promise.all([c[r](...a),i&&l.done]))[0]};return Wv.set(e,s),s}tK(t=>({...t,get:(e,r,n)=>f5(e,r)||t.get(e,r,n),has:(e,r)=>!!f5(e,r)||t.has(e,r)}));class aK{constructor(){this.loadPresignedConfiguration=void 0,this.savePresignedConfiguration=void 0,this.saveWitnesses=void 0,this.configOfImageHash=void 0,this.saveWalletConfig=void 0,this.imageHashOfCounterfactualWallet=void 0,this.saveCounterfactualWallet=void 0,this.walletsOfSigner=void 0}}var lK=Object.freeze({__proto__:null,ConfigTracker:aK});class cK{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),jr(e,"? "),jr(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),jr(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),jr(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),jr(e,"? "),jr(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),jr(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),jr(e,"? "),jr(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),jr(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),jr(e,"? "),jr(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,i){return console.debug("? getMigration"),jr({address:e,fromImageHash:r,fromVersion:n,chainId:i},"? "),jr(await this.tracker.getMigration(e,r,n,i),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),jr({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function jr(t,e=""){switch(t){case void 0:console.debug(e+"undefined");break;default:JSON.stringify(t,void 0,2).split(` +`).map(r=>e+r).forEach(r=>console.debug(r));break}return t}var fK=Object.freeze({__proto__:null,DebugConfigTracker:cK});function vo(){return vo=Object.assign?Object.assign.bind():function(t){for(var e=1;ePromise.resolve(this.configs[e]),this.saveConfig=(e,r)=>(this.configs[e]=r,Promise.resolve()),this.loadV2Node=e=>Promise.resolve(this.v2Nodes[e]),this.saveV2Node=(e,r)=>(this.v2Nodes[e]=r,Promise.resolve()),this.loadCounterfactualWallet=e=>Promise.resolve(this.counterfactualWallets[e]),this.saveCounterfactualWallet=(e,r,n)=>(this.counterfactualWallets[e]={imageHash:r,context:n},Promise.resolve()),this.loadPayloadOfSubdigest=e=>Promise.resolve(this.payloads[e]),this.savePayloadOfSubdigest=(e,r)=>(this.payloads[e]=r,Promise.resolve()),this.loadSubdigestsOfSigner=e=>Promise.resolve(Object.keys(this.signatures[e]||{})),this.loadSignatureOfSubdigest=(e,r)=>{var n;return Promise.resolve((n=this.signatures[e])==null?void 0:n[r])},this.saveSignatureOfSubdigest=(e,r,n)=>(this.signatures[e]||(this.signatures[e]={}),this.signatures[e][r]=n,Promise.resolve()),this.loadMigrationsSubdigest=(e,r,n)=>{var i;return Promise.resolve(((i=this.migrations[e])==null||(i=i[r])==null?void 0:i[n])||[])},this.saveMigrationsSubdigest=(e,r,n,i,s)=>(this.migrations[e]||(this.migrations[e]={}),this.migrations[e][r]||(this.migrations[e][r]={}),this.migrations[e][r][n]||(this.migrations[e][r][n]=[]),this.migrations[e][r][n].push({subdigest:i,toImageHash:s}),Promise.resolve())}}function Ml(t){if(t===void 0)return;const e={};for(const r of Object.keys(t)){const n=t[r];n._isBigNumber===!0&&n._hex!==void 0&&typeof n._hex=="string"&&n._hex.length!==""?e[r]=V.from(n):Array.isArray(n)?e[r]=n.map(i=>Ml(i)):typeof n=="object"&&n!==null?e[r]=Ml(n):e[r]=n}return e}class uK{constructor(e){var r=this;this.dbName=e,this._lazyDb=void 0,this.loadConfig=async function(n){return(await r.getDb()).get("configs",n).then(s=>Ml(s))},this.saveConfig=async function(n,i){await(await r.getDb()).put("configs",i,n)},this.loadV2Node=async function(n){return(await r.getDb()).get("v2Nodes",n).then(s=>Ml(s))},this.saveV2Node=async function(n,i){await(await r.getDb()).put("v2Nodes",i,n)},this.loadCounterfactualWallet=async function(n){return(await r.getDb()).get("counterfactualWallets",n)},this.saveCounterfactualWallet=async function(n,i,s){await(await r.getDb()).put("counterfactualWallets",{imageHash:i,context:s},n)},this.loadPayloadOfSubdigest=async function(n){return(await r.getDb()).get("payloads",n).then(s=>Ml(s))},this.savePayloadOfSubdigest=async function(n,i){await(await r.getDb()).put("payloads",i,n)},this.loadSubdigestsOfSigner=async function(n){return(await(await r.getDb()).getAllKeysFromIndex("signatures","signer",IDBKeyRange.only(n))).map(o=>o.split("-")[0])},this.loadSignatureOfSubdigest=async function(n,i){const o=await(await r.getDb()).get("signatures",[i,n].join("-"));return o==null?void 0:o.signature},this.saveSignatureOfSubdigest=async function(n,i,s){await(await r.getDb()).put("signatures",{signature:s,signer:n},[i,n].join("-"))},this.loadMigrationsSubdigest=async function(n,i,s){return(await(await r.getDb()).getAllFromIndex("migrations","jump",IDBKeyRange.only([n,i,s]))).map(l=>({subdigest:l.subdigest,toImageHash:l.toImageHash}))},this.saveMigrationsSubdigest=async function(n,i,s,o,a){await(await r.getDb()).put("migrations",{wallet:n,fromVersion:i,toVersion:s,subdigest:o,toImageHash:a},o)}}async getDb(){if(this._lazyDb)return this._lazyDb;const e=this.dbName;return this._lazyDb=await iK(e,1,{upgrade(r,n,i,s){console.log(`upgrading ${e} from ${n} to ${i} - ${s}`),n===0&&(r.createObjectStore("configs"),r.createObjectStore("v2Nodes"),r.createObjectStore("counterfactualWallets"),r.createObjectStore("payloads"),r.createObjectStore("signatures").createIndex("signer","signer",{unique:!1}),r.createObjectStore("migrations").createIndex("jump",["wallet","fromVersion","toVersion"]))}}),this._lazyDb}}function nk(t){return t.left!==void 0&&t.right!==void 0}function ik(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function Zp(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var dK=Object.freeze({__proto__:null,isPlainNode:nk,isPlainNested:ik,isPlainV2Config:Zp,MemoryTrackerStore:rk,recreateBigNumbers:Ml,IndexedDBStore:uK});class Yx{constructor(e,r=new rk,n=!1){var i=this;this.provider=e,this.store=r,this.useEIP5719=n,this.cachedEIP5719=void 0,this.loadTopology=async function(s){const o=await i.store.loadV2Node(s);if(!o)return{nodeHash:s};if(nk(o)){const[a,l]=await Promise.all([i.loadTopology(o.left),i.loadTopology(o.right)]);return{left:a,right:l}}return ik(o)?{weight:V.from(o.weight),threshold:V.from(o.threshold),tree:await i.loadTopology(o.tree)}:o},this.saveTopology=async function(s){if(_e.config.isNodeLeaf(s))return;const o=_e.config.hashNode(s);if(_e.config.isNode(s)){const a=i.saveTopology(s.left),l=i.saveTopology(s.right),c=i.store.saveV2Node(o,{left:_e.config.hashNode(s.left),right:_e.config.hashNode(s.right)});await Promise.all([a,l,c]);return}if(_e.config.isNestedLeaf(s)){const a=i.saveTopology(s.tree),l=i.store.saveV2Node(o,{weight:V.from(s.weight).toString(),threshold:V.from(s.threshold).toString(),tree:_e.config.hashNode(s.tree)});await Promise.all([a,l]);return}if(_e.config.isSignerLeaf(s))return i.store.saveV2Node(o,{address:s.address,weight:s.weight});if(_e.config.isSubdigestLeaf(s))return i.store.saveV2Node(o,{subdigest:s.subdigest});throw new Error(`Unknown topology type: ${s}`)},this.saveWalletConfig=async function(s){const{config:o}=s;if(qi.config.ConfigCoder.isWalletConfig(o)){const a=qi.config.ConfigCoder.imageHashOf(o);return i.store.saveConfig(a,o)}if(_e.config.ConfigCoder.isWalletConfig(o)){const a=_e.config.ConfigCoder.imageHashOf(o);if(_e.config.isComplete(o.tree))return i.store.saveConfig(a,o)}},this.configOfImageHashCache={},this.configOfImageHash=async function(s){const{imageHash:o}=s;if(i.configOfImageHashCache[s.imageHash])return i.configOfImageHashCache[s.imageHash];const a=await i.store.loadConfig(o);if(a){if(a.version===1||a.version===2&&!Zp(a))return i.configOfImageHashCache[s.imageHash]=a,a;if(Zp(a)){const l={version:2,threshold:V.from(a.threshold),checkpoint:V.from(a.checkpoint),tree:await i.loadTopology(a.tree)};return i.configOfImageHashCache[s.imageHash]=l,l}throw new Error(`Unknown config type: ${a}`)}},this.saveCounterfactualWallet=async function(s){const{config:o,context:a}=s,l=Er.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([i.saveWalletConfig({config:o}),...a.map(c=>{const f=ce.context.addressOf(c,l);return i.store.saveCounterfactualWallet(f,l,c)})])},this.imageHashOfCounterfactualWallet=async function(s){const{wallet:o}=s,a=await i.store.loadCounterfactualWallet(o);if(a)return{imageHash:a.imageHash,context:a.context}},this.savePayload=async function(s){const{payload:o}=s,a=ce.signature.subdigestOf(o);await i.store.savePayloadOfSubdigest(a,o)},this.payloadOfSubdigestCache={},this.payloadOfSubdigest=async function(s){if(i.payloadOfSubdigestCache[s.subdigest])return i.payloadOfSubdigestCache[s.subdigest];const{subdigest:o}=s,a=await i.store.loadPayloadOfSubdigest(o);return a&&(i.payloadOfSubdigestCache[o]=a),a},this.savePresignedConfiguration=async function(s){const o=_e.signature.SignatureCoder.decode(s.signature),a=Er.genericCoderFor(s.nextConfig.version).config.imageHashOf(s.nextConfig),l=_e.chained.messageSetImageHash(a),c=xe(l),f={message:l,address:s.wallet,chainId:0,digest:c},u=i.savePayload({payload:f}),h=i.saveWalletConfig({config:s.nextConfig}),y=await _e.signature.SignatureCoder.recover(o,f,i.provider),g=_e.signature.signaturesOf(y.config.tree);await Promise.all([u,h,i.saveWalletConfig({config:y.config}),...g.map(p=>i.store.saveSignatureOfSubdigest(p.address,y.subdigest,p.signature))])},this.loadPresignedConfiguration=async function(s){const{wallet:o,fromImageHash:a,longestPath:l}=s,c=await i.configOfImageHash({imageHash:a});if(!c||!_e.config.ConfigCoder.isWalletConfig(c))return[];const f=_e.config.signersOf(c.tree).map(A=>A.address),u=await Promise.all(f.map(A=>i.store.loadSubdigestsOfSigner(A))),h=[...new Set(u.flat())],g=(await Promise.all([...new Set(h)].map(async function(A){return vo({},await i.payloadOfSubdigest({subdigest:A}),{subdigest:A})}))).filter(A=>(A==null?void 0:A.message)&&(A==null?void 0:A.address)&&A.address===o).map(A=>({payload:A,nextImageHash:_e.chained.decodeMessageSetImageHash(A.message)})).filter(A=>A==null?void 0:A.nextImageHash);let p;const w=(await Promise.all(g.map(async function({nextImageHash:A,payload:I}){const M=await i.configOfImageHash({imageHash:A});if(!M||!_e.config.isWalletConfig(M))return;const j=V.from(M.checkpoint);return{nextConfig:M,nextCheckpoint:j,nextImageHash:A,payload:I}}))).filter(A=>A!==void 0).filter(A=>A.nextCheckpoint.gt(c.checkpoint)).sort((A,I)=>A.nextCheckpoint.gt(I.nextCheckpoint)?l?1:-1:l?-1:1);for(const A of w){const{nextConfig:I,nextCheckpoint:M,nextImageHash:j,payload:z}=A;if(p){const G=p.checkpoint;if(l){if(M.gte(G))continue}else if(M.lte(G))continue}const F=new Map((await Promise.all(f.map(async function(G){const Z=await i.store.loadSignatureOfSubdigest(G,z.subdigest);if(!Z)return[G,void 0];const oe=Q(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(G,z.subdigest,Z):Z),D=ce.signer.tryRecoverSigner(z.subdigest,oe)!==G;return[G,{isDynamic:D,signature:oe}]}))).filter(G=>!!G[1]));if(F.size===0)continue;const q=_e.signature.SignatureCoder.encodeSigners(c,F,[],0);q.weight.lt(c.threshold)||(p={nextImageHash:j,checkpoint:V.from(I.checkpoint),signature:q.encoded})}if(!p)return[];const E=await i.loadPresignedConfiguration({wallet:o,fromImageHash:p.nextImageHash,longestPath:l});return[{wallet:o,nextImageHash:p.nextImageHash,signature:p.signature},...E]},this.saveWitnesses=async function(s){const o={digest:s.digest,address:s.wallet,chainId:s.chainId},a=ce.signature.subdigestOf(o);await Promise.all([i.savePayload({payload:o}),...s.signatures.filter(l=>ce.signer.canRecover(l)).map(l=>{const c=ce.signer.recoverSigner(a,l);return i.store.saveSignatureOfSubdigest(c,a,l)})])},this.walletsOfSigner=async function(s){const o=await i.store.loadSubdigestsOfSigner(s.signer),a=await Promise.all(o.map(c=>i.payloadOfSubdigest({subdigest:c}))).then(c=>c.filter(f=>f!==void 0)),l=[];for(const c of a){const f=c.address;if(l.find(y=>y.wallet===f))continue;const u=ce.signature.subdigestOf(c),h=await i.store.loadSignatureOfSubdigest(s.signer,u);h&&l.push({wallet:f,proof:{digest:c.digest,chainId:V.from(c.chainId),signature:Q(h)}})}return l},this.cachedEIP5719=new qG(e)}async saveMigration(e,r,n){const i=r.fromVersion;if(i!==1)throw new Error("Migration not supported");if(!_e.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:s,address:o}=FS.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(_e.config.ConfigCoder.imageHashOf(r.toConfig)!=s)throw new Error("Invalid migration transaction - config");const a=ce.transaction.packMetaTransactionsData(r.tx.nonce,r.tx.transactions),l=xe(a),c={chainId:r.tx.chainId,message:a,address:e,digest:l},f=ce.signature.subdigestOf(c),u=this.savePayload({payload:c}),h=this.saveWalletConfig({config:r.toConfig}),y=qi.signature.SignatureCoder.decode(r.tx.signature),g=await qi.signature.SignatureCoder.recover(y,c,this.provider),p=qi.signature.SignatureCoder.signaturesOf(g.config);await Promise.all([u,h,this.saveWalletConfig({config:g.config}),this.store.saveMigrationsSubdigest(e,i,i+1,f,s),...p.map(k=>this.store.saveSignatureOfSubdigest(k.address,g.subdigest,k.signature))])}async getMigration(e,r,n,i){var s=this;const[o,a]=await Promise.all([this.configOfImageHash({imageHash:r}),this.store.loadMigrationsSubdigest(e,n,n+1)]),l=Er.coderFor(n);return!o||!l.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(f){const{subdigest:u,toImageHash:h}=f,y=await s.payloadOfSubdigest({subdigest:u});if(!y||!y.message||!V.from(i).eq(y.chainId))return;const g=l.config.signersOf(o).map(A=>A.address),p=new Map((await Promise.all(g.map(async function(A){const I=await s.store.loadSignatureOfSubdigest(A,u);if(!I)return[A,void 0];const M=Q(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(A,u,I):I),j=ce.signer.tryRecoverSigner(u,M)!==A;return[A,{isDynamic:j,signature:M}]}))).filter(A=>!!A[1])),k=l.signature.encodeSigners(o,p,[],i);if(!k||k.weightf.filter(u=>u!==void 0)))[0]}updateProvider(e){this.provider=e}}var hK=Object.freeze({__proto__:null,LocalConfigTracker:Yx});let qv=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class vK{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Sessions/",this.ping=n=>this.fetch(this.url("Ping"),Vn({},n)).then(i=>Hn(i).then(s=>({}))),this.config=(n,i)=>this.fetch(this.url("Config"),Vn(n,i)).then(s=>Hn(s).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,i)=>this.fetch(this.url("Wallets"),Vn(n,i)).then(s=>Hn(s).then(o=>({wallets:o.wallets}))),this.deployHash=(n,i)=>this.fetch(this.url("DeployHash"),Vn(n,i)).then(s=>Hn(s).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,i)=>this.fetch(this.url("ConfigUpdates"),Vn(n,i)).then(s=>Hn(s).then(o=>({updates:o.updates}))),this.migrations=(n,i)=>this.fetch(this.url("Migrations"),Vn(n,i)).then(s=>Hn(s).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,i)=>this.fetch(this.url("SaveConfig"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveWallet=(n,i)=>this.fetch(this.url("SaveWallet"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveSignature=(n,i)=>this.fetch(this.url("SaveSignature"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveSignerSignatures=(n,i)=>this.fetch(this.url("SaveSignerSignatures"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveMigration=(n,i)=>this.fetch(this.url("SaveMigration"),Vn(n,i)).then(s=>Hn(s).then(o=>({}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Vn=(t={},e={})=>({method:"POST",headers:vo({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Hn=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});class yK{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=void 0,this.sessions=new vK(e,fetch)}async loadPresignedConfiguration(e){try{const{updates:r}=await this.sessions.configUpdates({wallet:e.wallet,fromImageHash:e.fromImageHash,allUpdates:e.longestPath});return r.map(({toImageHash:n,signature:i})=>({wallet:e.wallet,nextImageHash:n,signature:i}))}catch(r){if(Gv(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=Er.genericCoderFor(r.version).config.imageHashOf(r),i=_e.signature.setImageHashStruct(n),s=xe(i);await this.sessions.saveSignature({wallet:e.wallet,digest:s,chainID:"0",signature:e.signature,toConfig:vd(r)})}async saveWitnesses(e){let r=e.signatures;this.onlyRecoverable&&(r=r.filter(n=>ce.signer.canRecover(n))),await this.sessions.saveSignerSignatures({wallet:e.wallet,digest:e.digest,chainID:vl(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return pK(r,n)}catch(r){if(Gv(r))return;throw r}}async saveWalletConfig(e){const r=vd(e.config);await this.sessions.saveConfig({version:e.config.version,config:r})}async imageHashOfCounterfactualWallet(e){try{const{deployHash:r,context:n}=await this.sessions.deployHash(e);return{imageHash:r,context:n}}catch(r){if(Gv(r))return;throw r}}async saveCounterfactualWallet(e){const r=vd(e.config);await this.sessions.saveWallet({version:e.config.version,deployConfig:r})}async walletsOfSigner(e){const{wallets:r}=await this.sessions.wallets(e);return Object.entries(r).map(([n,{digest:i,chainID:s,type:o,signature:a}])=>{switch(o){case qv.EIP712:a+=Q(ce.signer.SigType.EIP712).slice(2);break;case qv.EthSign:a+=Q(ce.signer.SigType.ETH_SIGN).slice(2);break;case qv.EIP1271:a+=Q(ce.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:i,signature:a,chainId:V.from(s)}}})}async getMigration(e,r,n,i){var s=this;const o=vl(i),{migrations:a}=await this.sessions.migrations({wallet:e,fromVersion:n,fromImageHash:r,chainID:o}),l=async function(u){const h=a[u];if(h){const y=Object.keys(h).map(Number).sort((g,p)=>p-g);for(const g of y)for(const[p,k]of Object.entries(h[g]))try{const w=await s.configOfImageHash({imageHash:p});if(w)return{fromVersion:n,toVersion:g,toConfig:w,tx:{entrypoint:k.executor,transactions:k.transactions,nonce:k.nonce,signature:k.signature,chainId:u,intent:{id:ce.transaction.subdigestOfTransactions(e,u,k.nonce,k.transactions),wallet:e}}}}catch(w){console.error(w)}}},c=await l(o);if(c)return c;for(const f in a)if(f!==o){const u=await l(f);if(u)return u}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:vd(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(gK),nonce:vl(r.tx.nonce),signature:r.tx.signature,chainID:vl(r.tx.chainId)})}}function vd(t){switch(t.version){case 1:if(qi.config.ConfigCoder.isWalletConfig(t))return{threshold:ea(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:ea(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(_e.config.ConfigCoder.isWalletConfig(t))return{threshold:ea(t.threshold),checkpoint:ea(t.checkpoint),tree:Hd(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function Hd(t){return _e.config.isNode(t)?{left:Hd(t.left),right:Hd(t.right)}:_e.config.isSignerLeaf(t)?{weight:ea(t.weight),address:t.address}:_e.config.isNestedLeaf(t)?{weight:ea(t.weight),threshold:ea(t.threshold),tree:Hd(t.tree)}:_e.config.isNodeLeaf(t)?{node:t.nodeHash}:vo({},t)}function pK(t,e){switch(t){case 1:return vo({},e,{version:t});case 2:return vo({},e,{version:t,tree:Wd(e.tree)});default:throw new Error(`unknown version ${t}`)}}function Wd(t){switch(typeof t){case"object":const e=vo({},t);return e.left!==void 0&&(e.left=Wd(e.left)),e.right!==void 0&&(e.right=Wd(e.right)),e.tree!==void 0&&(e.tree=Wd(e.tree)),e.node!==void 0&&(e.nodeHash=e.node,delete e.node),e;default:throw new Error(`v2 config tree ${t} is not an object`)}}function gK(t){return{to:t.to,value:t.value!==void 0?vl(t.value):void 0,data:t.data!==void 0?Q(t.data):void 0,gasLimit:t.gasLimit!==void 0?vl(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function ea(t){return V.from(t).toNumber()}function vl(t){return V.from(t).toString()}function Gv(t){return typeof t=="object"&&t.status===404}var mK=Object.freeze({__proto__:null,RemoteConfigTracker:yK});function eg(t,e,r){return new Promise(n=>{let i=0;t.forEach(s=>s.then(o=>{r(o)?n(o):(i++,i===t.length&&n(e))}).catch(()=>{i++,i===t.length&&n(e)}))})}async function qc(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class xK{constructor(e){this.trackers=e}async configOfImageHash(e){const r=this.trackers.map(async function(a,l){return{res:await a.configOfImageHash(e),i:l}}),n=await eg(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:Er.genericCoderFor(a.res.version).config.isComplete(a.res));if(n!=null&&n.res)return this.saveWalletConfig({config:n.res,skipTracker:n.i}),n.res;const i=new Yx(void 0),s=await qc(r,void 0);for(const a of s)a!=null&&a.res&&await i.saveWalletConfig({config:a.res});const o=await i.configOfImageHash(e);return o&&this.saveWalletConfig({config:o}),o}async saveWalletConfig(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveWalletConfig(e)}))}async imageHashOfCounterfactualWallet(e){const r=await eg(this.trackers.map(n=>n.imageHashOfCounterfactualWallet(e)),void 0,n=>!!n);return r&&this.configOfImageHash({imageHash:r.imageHash}).then(n=>{n&&this.saveCounterfactualWallet({config:n,context:[r.context]})}),r}async saveCounterfactualWallet(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveCounterfactualWallet(e)}))}async walletsOfSigner(e){const r=await qc(this.trackers.map(o=>o.walletsOfSigner(e)),[]).then(o=>o.flat()),n={};for(const o of r)n[o.wallet]=o.proof;const i=Object.keys(n).map(o=>({wallet:o,proof:n[o]})),s=new Map;return i.forEach(({wallet:o,proof:{digest:a,chainId:l,signature:c}})=>{const f=`${o}-${a}-${l}`;let u=s.get(f);u||(u={wallet:o,digest:a,chainId:l,signatures:[]},s.set(f,u)),u.signatures.push(c)}),s.forEach(o=>this.saveWitnesses(o)),i}async saveWitnesses(e){await Promise.all(this.trackers.map(r=>r.saveWitnesses(e)))}async loadPresignedConfiguration(e){var r=this;const n=await qc(this.trackers.map(l=>l.loadPresignedConfiguration(e)),[]),s=(await qc(n.map(async function(l){const c=l[l.length-1],f=await r.configOfImageHash({imageHash:c.nextImageHash});if(f)return{checkpoint:Er.genericCoderFor(f.version).config.checkpointOf(f),result:l}}),void 0)).reduce((l,c)=>c&&(!l||c.checkpoint.gt(l.checkpoint))?c:l);if(!s)return[];const o=new Map,a=l=>(o.has(l)||o.set(l,this.configOfImageHash({imageHash:l})),o.get(l));return s.result.forEach(async function(l){const c=await a(l.nextImageHash);c&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:c,signature:l.signature})}),s.result}async savePresignedConfiguration(e){await Promise.all(this.trackers.map(r=>r.savePresignedConfiguration(e)))}async getMigration(e,r,n,i){return(await Promise.all(this.trackers.map(o=>o.getMigration(e,r,n,i)))).find(o=>!!o)}async saveMigration(e,r,n){await Promise.all(this.trackers.map(i=>i.saveMigration(e,r,n)))}}class bK{constructor(e,r,n){this.tracker=e,this.cache=r,this.contexts=n}async loadPresignedConfiguration(e){var r=this;const n=[this.tracker.loadPresignedConfiguration(e),this.cache.loadPresignedConfiguration(e)];let i;const[s,o]=await Promise.all(n);if(s.length>0&&o.length>0&&s[s.length-1].nextImageHash===o[o.length-1].nextImageHash)i=e.longestPath===!0?s.length>o.length?s:o:s.lengthu&&(!f||u.checkpoint.gt(f.checkpoint))?u:f))==null?void 0:l.result)!=null?a:[]}return i||[]}async savePresignedConfiguration(e){await Promise.all([this.tracker.savePresignedConfiguration(e),this.cache.savePresignedConfiguration(e)])}async configOfImageHash(e){if(e.noCache!==!0){const n=await this.cache.configOfImageHash(e);if(n)return n}const r=await this.tracker.configOfImageHash(e);return r&&await this.cache.saveWalletConfig({config:r}),r}async saveWalletConfig(e){await Promise.all([this.tracker.saveWalletConfig(e),this.cache.saveWalletConfig(e)])}async imageHashOfCounterfactualWallet(e){if(e.noCache!==!0){const n=await this.cache.imageHashOfCounterfactualWallet(e);if(n)return n}const r=await this.tracker.imageHashOfCounterfactualWallet(e);if(r){const n=await this.configOfImageHash({imageHash:r.imageHash});n&&await this.cache.saveCounterfactualWallet({config:n,context:[r.context]})}return r}async saveCounterfactualWallet(e){await Promise.all([this.tracker.saveCounterfactualWallet(e),this.cache.saveCounterfactualWallet(e)])}async walletsOfSigner(e){if(e.noCache)return this.tracker.walletsOfSigner(e);const r=await Promise.all([this.tracker.walletsOfSigner(e),this.cache.walletsOfSigner(e)]),n=new Map;for(const i of r)for(const s of i)n.set(s.wallet,s);return Array.from(n.values())}async saveWitnesses(e){await Promise.all([this.tracker.saveWitnesses(e),this.cache.saveWitnesses(e)])}async getMigration(e,r,n,i){const s=await this.cache.getMigration(e,r,n,i);if(s)return s;const o=await this.tracker.getMigration(e,r,n,i);return o&&await this.cache.saveMigration(e,o,this.contexts),o}async saveMigration(e,r,n){await Promise.all([this.tracker.saveMigration(e,r,n),this.cache.saveMigration(e,r,n)])}}class u5{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...i){e=`${e}:${xe(Ue(JSON.stringify(i,wK)))}`;let s=this.cache.get(e);if(s&&s.expiration&&new Date>=s.expiration&&(s=void 0,this.cache.delete(e)),!s){const o={promise:n(...i)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),s=o,this.cache.set(e,s)}return s.promise}}function wK(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function CK(t){return t instanceof sk}class sk{constructor(e,r=50,n=!1){this.tracker=e,this.window=r,this.verbose=n,this.cache=new u5}invalidateCache(){this.cache=new u5}configOfImageHash(e){return this.cache.do("configOfImageHash",this.window,r=>this.tracker.configOfImageHash(r),e)}getMigration(e,r,n,i){return this.cache.do("getMigration",this.window,(...s)=>this.tracker.getMigration(...s),e,r,n,i)}saveMigration(e,r,n){return this.cache.do("saveMigration",void 0,(...i)=>this.tracker.saveMigration(...i),e,r,n)}loadPresignedConfiguration(e){return this.cache.do("loadPresignedConfiguration",this.window,r=>this.tracker.loadPresignedConfiguration(r),e)}savePresignedConfiguration(e){return this.cache.do("savePresignedConfiguration",void 0,r=>this.tracker.savePresignedConfiguration(r),e)}saveWitnesses(e){return this.cache.do("saveWitnesses",void 0,r=>this.tracker.saveWitnesses(r),e)}saveWalletConfig(e){return this.cache.do("saveWalletConfig",void 0,r=>this.tracker.saveWalletConfig(r),e)}imageHashOfCounterfactualWallet(e){return this.cache.do("imageHashOfCounterfactualWallet",void 0,r=>this.tracker.imageHashOfCounterfactualWallet(r),e)}saveCounterfactualWallet(e){return this.cache.do("saveCounterfactualWallet",void 0,r=>this.tracker.saveCounterfactualWallet(r),e)}walletsOfSigner(e){return this.cache.do("walletsOfSigner",this.window,r=>this.tracker.walletsOfSigner(r),e)}updateProvider(e){this.tracker instanceof Yx&&this.tracker.updateProvider(e)}}var Qx=Object.freeze({__proto__:null,debug:fK,local:hK,remote:mK,stores:dK,raceUntil:eg,allSafe:qc,MultipleTracker:xK,CachedTracker:bK,isDedupedTracker:CK,DedupedTracker:sk});const EK=Object.freeze(Object.defineProperty({__proto__:null,tracker:lK,trackers:Qx},Symbol.toStringTag,{value:"Module"})),ok=60*60*24*7,SK=60;class d5{constructor(e,r,n={},i){this.account=e,this.settings=r,this.status=n,this._initialAuthRequest=void 0,this.proofStrings=new Map,this.onAuthCallbacks=[],this.apiClient=void 0,this.metadataClient=void 0,this.indexerClients=new Map,this.projectAccessKey=void 0,this.projectAccessKey=i}now(){return Math.floor(Date.now()/1e3)}get expiration(){var e;return Math.max((e=this.settings.metadata.expiration)!=null?e:ok,120)}onAuth(e){return this.onAuthCallbacks.push(e),()=>this.onAuthCallbacks=this.onAuthCallbacks.filter(r=>r!==e)}async dump(){return this.status.jwt?{jwt:{token:await this.status.jwt.token,expiration:this.status.jwt.expiration},metadata:this.status.metadata}:{metadata:this.settings.metadata}}auth(e=5){var r=this;return this._initialAuthRequest?this._initialAuthRequest:(this._initialAuthRequest=async function(){const n=r.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");let i;for(let s=1;;s++)try{i=(await r.getJWT(!0)).token;break}catch(o){if(s===e)throw console.error(`couldn't authenticate after ${e} attempts`,o),o}return new Fd(n,void 0,i)}(),this._initialAuthRequest)}async getJWT(e){var r=this;const n=this.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");if(this.status.jwt){const c=this.status.jwt,f=await c.token;if(this.now(){throw this.status.jwt=void 0,c}),expiration:o};return this.status.jwt=a,a.token.then(c=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"fulfilled",value:c})}catch{}})}).catch(c=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"rejected",reason:c})}catch{}})}),{token:await a.token,expiration:o}}getProofStringKey(){return`${this.account.address} - ${this.settings.metadata.name}`}async isProofStringValid(e){try{const r=new Q0,n=V.from(this.settings.sequenceApiChainId),i=ii(this.account.networks,n);if(!i)throw Error("No network found");return r.chainId=n.toNumber(),r.provider=new K0(iu(i.rpcUrl,this.projectAccessKey),{name:"",chainId:n.toNumber()}),await r.decodeProof(e),!0}catch{return!1}}async getAPIClient(e=!0){if(!this.apiClient){const r=this.settings.sequenceApiUrl;if(!r)throw Error("No sequence api url");const n=(await this.getJWT(e)).token;this.apiClient=new Fd(r,void 0,n)}return this.apiClient}async getMetadataClient(e=!0){if(!this.metadataClient){const r=(await this.getJWT(e)).token;this.metadataClient=new XS(this.settings.sequenceMetadataUrl,void 0,r)}return this.metadataClient}async getIndexerClient(e,r=!0){const n=ii(this.account.networks,e);if(!n)throw Error(`No network for chain ${e}`);if(!this.indexerClients.has(n.chainId))if(n.indexer)this.indexerClients.set(n.chainId,n.indexer);else if(n.indexerUrl){const i=(await this.getJWT(r)).token;this.indexerClients.set(n.chainId,new YS(n.indexerUrl,void 0,i))}else throw Error(`No indexer url for chain ${e}`);return this.indexerClients.get(n.chainId)}getProofString(e){if(this.proofStrings.has(e)){const l=this.proofStrings.get(e);if(this.now()(r.signature=l,n.encodeProof(r,!0))).catch(l=>{throw this.proofStrings.delete(e),l}),expiration:o};return this.proofStrings.set(e,a),a}}const ak=async(t,e,r)=>{const n=Se(await t.getAddress());if(!n||n===""||n==="0x")throw lk;const i=new Sx;if(i.address=n,!r||!r.app||r.app==="")throw new Xx("authorization options requires app to be set");i.claims.app=r.app,i.claims.ogn=r.origin,i.claims.n=r.nonce,i.setExpiryIn(r.expiry?Math.max(r.expiry,200):ok);const s=i.messageTypedData(),o=K9(e);i.signature=await(t instanceof Ji?t.signTypedData(s.domain,s.types,s.message,o,"eip6492"):t.signTypedData(s.domain,s.types,s.message,o));const l=await new Q0().encodeProof(i,!0);return{typedData:s,proofString:l}};class Xx extends Error{constructor(e){super(e),this.name="AuthError"}}const lk=new Xx("auth error: account address is empty");function Ko(){return Ko=Object.assign?Object.assign.bind():function(t){for(var e=1;eG.wallet));let F;if(z){if(u==null||u(z),F=new Ji({address:z,tracker:A,networks:E,contexts:w,orchestrator:p,projectAccessKey:k}),c&&c.length>0){let G=await F.status(M);if(G.original.version!==G.version||F.version!==G.version){const{migratedAllChains:D,failedChains:v}=await F.isMigratedAllChains();if(v.some(C=>tg.includes(C)))throw Error(`Failed to fetch account status on ${v.join(", ")}`);if(!D){if(g&&!await g(F))throw Error("Migration cancelled, cannot open session");const{failedChains:C}=await F.signAllMigrations(y||(O=>O));if(C.some(O=>tg.includes(O)))throw Error(`Failed to sign migrations on ${C.join(", ")}`);Qx.isDedupedTracker(A)&&A.invalidateCache();let P;if([P,G]=await Promise.all([F.isMigratedAllChains().then(O=>O.migratedAllChains),F.status(M)]),!P)throw Error("Failed to migrate account")}}G.onChain.version!==G.version&&await F.doBootstrap(M,void 0,G);const Z=G.config,oe=F.coders.config.editConfig(Z,{add:c,threshold:l});if(F.coders.config.imageHashOf(Z)!==F.coders.config.imageHashOf(oe)){const D=F.coders.config.editConfig(oe,{checkpoint:F.coders.config.checkpointOf(Z).add(1)});await F.updateConfig(D)}}}else{if(!c||c.length===0)throw Error("Cannot create new account without signers");if(!l)throw Error("Cannot create new account without threshold");if(F=await Ji.new({config:{threshold:l,checkpoint:0,signers:c},tracker:A,contexts:w,orchestrator:p,networks:E,projectAccessKey:k}),u==null||u(F.address),await F.publishWitness(),!(await A.walletsOfSigner({signer:a,noCache:!0})).some(Z=>Z.wallet===F.address))throw Error("Account not found on tracker")}let q;return I&&(q=new d5(F,I),q.auth(),q.onAuth(G=>{G.status==="fulfilled"&&F.setJwt(G.value)})),new Sf(E,w,F,q)}static async load(e){const{dump:r,settings:n,editConfigOnMigration:i,onMigration:s,orchestrator:o}=e,{contexts:a,networks:l,tracker:c,services:f}=Ko({},qd,n);let u;if(ck(r)){var h,y,g;const I=r.config.address||ce.context.addressOf(a[1],qi.config.ConfigCoder.imageHashOf(Ko({},r.config,{version:1}))),M=((h=(y=r.jwt)==null?void 0:y.expiration)!=null?h:0)j.migratedAllChains)){if(s&&!await s(u))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await u.signAllMigrations(i),!await u.isMigratedAllChains().then(j=>j.migratedAllChains))throw Error("Failed to migrate account")}}else if(fk(r)){var p,k,w;const I=((p=(k=r.jwt)==null?void 0:k.expiration)!=null?p:0)async(n,i,s)=>{const o=s.messageDigest();return{isValid:await t(i).isValidSignature(s.address,o,s.signature)}},AK=Object.freeze(Object.defineProperty({__proto__:null,AuthError:Xx,CRITICAL_CHAINS:tg,ErrAccountIsRequired:lk,Session:Sf,SessionSettingsDefault:qd,ValidateSequenceWalletProof:kK,isSessionDumpV1:ck,isSessionDumpV2:fk,signAuthorization:ak},Symbol.toStringTag,{value:"Module"}));function ah(){return ah=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Fr({},n)).then(i=>Ur(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Fr({},n)).then(i=>Ur(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Fr({},n)).then(i=>Ur(i).then(s=>({status:s.status}))),this.getSignerConfig=(n,i)=>this.fetch(this.url("GetSignerConfig"),Fr(n,i)).then(s=>Ur(s).then(o=>({signerConfig:o.signerConfig}))),this.sign=(n,i)=>this.fetch(this.url("Sign"),Fr(n,i)).then(s=>Ur(s).then(o=>({sig:o.sig}))),this.signWith=(n,i)=>this.fetch(this.url("SignWith"),Fr(n,i)).then(s=>Ur(s).then(o=>({sig:o.sig}))),this.authMethods=(n,i)=>this.fetch(this.url("AuthMethods"),Fr(n,i)).then(s=>Ur(s).then(o=>({methods:o.methods,active:o.active}))),this.setPIN=(n,i)=>this.fetch(this.url("SetPIN"),Fr(n,i)).then(s=>Ur(s).then(o=>({}))),this.resetPIN=(n,i)=>this.fetch(this.url("ResetPIN"),Fr(n,i)).then(s=>Ur(s).then(o=>({}))),this.createTOTP=(n,i)=>this.fetch(this.url("CreateTOTP"),Fr(n,i)).then(s=>Ur(s).then(o=>({uri:o.uri}))),this.commitTOTP=(n,i)=>this.fetch(this.url("CommitTOTP"),Fr(n,i)).then(s=>Ur(s).then(o=>({codes:o.codes}))),this.resetTOTP=(n,i)=>this.fetch(this.url("ResetTOTP"),Fr(n,i)).then(s=>Ur(s).then(o=>({}))),this.reset2FA=(n,i)=>this.fetch(this.url("Reset2FA"),Fr(n,i)).then(s=>Ur(s).then(o=>({}))),this.recoveryCodes=(n,i)=>this.fetch(this.url("RecoveryCodes"),Fr(n,i)).then(s=>Ur(s).then(o=>({codes:o.codes}))),this.resetRecoveryCodes=(n,i)=>this.fetch(this.url("ResetRecoveryCodes"),Fr(n,i)).then(s=>Ur(s).then(o=>({codes:o.codes}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Fr=(t={},e={})=>({method:"POST",headers:ah({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Ur=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),TK=typeof global=="object"?global.fetch:window.fetch;class PK{constructor(e,r,n=!1){this.address=e,this.url=r,this.appendSuffix=n,this.guard=void 0,this.guard=new _K(r,TK)}async getAddress(){return this.address}async buildDeployTransaction(e){}async predecorateSignedTransactions(e){return[]}async decorateTransactions(e,r){return e}async sign(e,r){var n;if(!ce.isWalletSignRequestMetadata(r))throw new Error("expected sequence signature request metadata");const i=r.guardTotpCode,s=Er.genericCoderFor(r.config.version),{encoded:o}=s.signature.encodeSigners(r.config,(n=r.parts)!=null?n:new Map,[],r.chainId);return(await this.guard.signWith({signer:this.address,request:{msg:Q(e),auxData:this.packMsgAndSig(r.address,r.digest,o,r.chainId),chainId:V.from(r.chainId).toNumber()},token:i?{id:lh.TOTP,token:i}:void 0})).sig}notifyStatusChange(e,r,n){}async getAuthMethods(e){let r;if("jwt"in e)r=await this.guard.authMethods({},{Authorization:`BEARER ${e.jwt}`});else{const n=await rg(e);r=await this.guard.authMethods({proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}return ah({},r,{methods:r.methods.map(IK)})}async setPin(e,r){const n=await Bc(r);e===void 0?await this.guard.resetPIN({timestamp:n.timestamp.getTime(),signature:n.signature},{Authorization:`BEARER ${r.jwt}`}):await this.guard.setPIN({pin:e,timestamp:n.timestamp.getTime(),signature:n.signature},{Authorization:`BEARER ${r.jwt}`})}resetPin(e){return this.setPin(void 0,e)}async createTotp(e){const r=await Bc(e),{uri:n}=await this.guard.createTOTP({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return new URL(n)}async commitTotp(e,r){const{codes:n}=await this.guard.commitTOTP({token:e},{Authorization:`BEARER ${r}`});return n}async resetTotp(e){const r=await Bc(e);await this.guard.resetTOTP({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`})}async reset2fa(e,r){if("jwt"in r)await this.guard.reset2FA({code:e},{Authorization:`BEARER ${r.jwt}`});else{const n=await rg(r);await this.guard.reset2FA({code:e,proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}}async getRecoveryCodes(e){const r=await Bc(e),{codes:n}=await this.guard.recoveryCodes({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return n}async resetRecoveryCodes(e){const r=await Bc(e),{codes:n}=await this.guard.resetRecoveryCodes({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return n}packMsgAndSig(e,r,n,i){return Kr.encode(["address","uint256","bytes","bytes"],[e,i,r,n])}suffix(){return this.appendSuffix?[3]:[]}}let lh=function(t){return t.PIN="PIN",t.TOTP="TOTP",t}({});function IK(t){switch(t){case lh.PIN:case lh.TOTP:return t;default:throw new Error(`unknown auth method '${t}'`)}}function uk(t){return"signerAddress"in t&&typeof t.signerAddress=="string"}async function rg(t){if(uk(t))return t;{const e=Yp.isSapientSigner(t.signer)?t.signer:new Yp.SignerWrapper(t.signer),r=await e.getAddress(),n=new Date,i=dk(t.walletAddress,n),s=Eu(i);return{walletAddress:t.walletAddress,timestamp:n,signerAddress:r,signature:Q(await e.sign(s,{}))}}}async function Bc(t){if("wallet"in t){var e;const r=new Date,n=hk(r),i=await t.wallet.signTypedData(n.domain,n.types,n.message,(e=n.domain.chainId)!=null?e:1,"eip6492");return{jwt:t.jwt,timestamp:r,signature:i}}else return t}function dk(t,e){return{domain:vk,types:{AuthMethods:[{name:"wallet",type:"address"},{name:"timestamp",type:"string"}]},message:{wallet:Se(t),timestamp:yk(e)}}}function hk(t){return{domain:vk,types:{AuthUpdate:[{name:"timestamp",type:"string"}]},message:{timestamp:yk(t)}}}const vk={name:"Sequence Guard",version:"1",chainId:1};function yk(t){return t.toUTCString().replace("GMT","UTC")}const RK=Object.freeze(Object.defineProperty({__proto__:null,AuthMethod:lh,GuardSigner:PK,getAuthUpdateProofTypedData:hk,getOwnershipProofTypedData:dk,isSignedOwnershipProof:uk,signOwnershipProof:rg},Symbol.toStringTag,{value:"Module"}));function ch(){return ch=Object.assign?Object.assign.bind():function(t){for(var e=1;e{this.queue.length>0&&(this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(this.run,this.options.timeWindow))},this.handle=(n,i,s)=>{if(this.batchableJsonRpcMethods.find(o=>o===i.method)){this.queue.push({request:i,callback:s,next:n}),this.options.verbose&&console.log("Scheduling call",i.method),this.scheduleExecution();return}return this.options.verbose&&console.log("Forwarded call",i.method),n(i,s)},this.run=async function(){r.options.verbose&&console.log("Processing multicall");const n=Math.min(r.options.batchSize,r.queue.length);if(n===0){r.options.verbose&&console.log("Skip multicall, empty queue");return}if(n===1){r.forward(r.queue[0]),r.queue=[],r.options.verbose&&console.log("Skip multicall, single item");return}r.options.verbose&&console.log("Resolving",n);var a=r.queue.slice(0,n);r.queue=n===r.queue.length?[]:r.queue.slice(n),r.options.verbose&&console.log("Updated queue",r.queue.length),r.queue.length!==0&&(r.options.verbose&&console.log("Scheduling next batch"),r.scheduleExecution());const i=a[0].next;let s;var[a,l]=h5(a,y=>{try{if(y.next!==i)return!1;switch(y.request.method){case ar.ethCall:if(y.request.params[0].from||y.request.params[0].gasPrice||y.request.params[0].value)return!1;case ar.ethGetBalance:case ar.ethGetCode:const g=OK(y.request.params[1]);if(s===void 0&&(s=g),!NK(g,s))return!1}return!0}catch{return!1}});if(l.length!==0&&(r.options.verbose&&console.log("Forwarding incompatible calls",l.length),r.forward(l),a.length===0)){r.options.verbose&&console.log("Skip multicall, all calls are incompatible");return}let o=a.map(y=>{try{switch(y.request.method){case ar.ethCall:return{delegateCall:!1,revertOnError:!1,target:y.request.params[0].to,data:y.request.params[0].data,gasLimit:y.request.params[0].gas?y.request.params[0].gas:0,value:0};case ar.ethGetCode:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callCode"),[y.request.params[0]])};case ar.ethGetBalance:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callBalanceOf"),[y.request.params[0]])};default:return null}}catch{return null}});var[a,l]=h5(a,(y,g)=>o[g]!==void 0);if(o=o.filter(y=>y),l.length!==0&&(r.options.verbose&&console.log("Forwarding calls on error",l.length),r.forward(l),a.length===0)){r.options.verbose&&console.log("Skip multicall, all calls had encoding errors");return}let c;try{r.options.verbose&&console.log("Encoding multicall"),c=r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("multiCall"),[o])}catch(y){r.options.verbose&&console.warn("Error encoding multicall, forwarding one by one",y),r.forward(a);return}const f=Px(),u=await MK(Tx(i)({id:f,jsonrpc:Xl,method:ar.ethCall,params:[{to:r.options.contract,value:0,data:c},V.isBigNumber(s)?s.toNumber():s]}),y=>({jsonrpc:Xl,id:f,result:void 0,error:y}));if(u.error)return r.options.verbose&&console.warn("Error calling multicall, forwarding one by one",u.error),r.forward(a);let h;try{h=r.multicallInterface.decodeFunctionResult(r.multicallInterface.getFunction("multiCall"),u.result)}catch(y){r.options.verbose&&console.warn("Error decoding multicall result, forwarding one by one",y),r.forward(a);return}r.options.verbose&&console.log("Got response for",a.length),a.forEach((y,g)=>{if(!h[0][g])r.options.verbose&&console.warn(`Multicall error for ${y.request.method} not found`),r.forward(y);else switch(y.request.method){case ar.ethCall:y.callback(void 0,{jsonrpc:y.request.jsonrpc,id:y.request.id,result:h[1][g]});break;case ar.ethGetCode:y.callback(void 0,{jsonrpc:y.request.jsonrpc,id:y.request.id,result:Kr.decode(["bytes"],h[1][g])[0]});break;case ar.ethGetBalance:y.callback(void 0,{jsonrpc:y.request.jsonrpc,id:y.request.id,result:Kr.decode(["uint256"],h[1][g])[0]});break}})},this.options=e?ch({},Rn.DefaultOptions,e):Rn.DefaultOptions,this.options.batchSize<=0)throw new Error(`Invalid batch size of ${this.options.batchSize}`)}forward(e){Array.isArray(e)?e.forEach(r=>r.next(r.request,r.callback)):e.next(e.request,e.callback)}static isMulticall(e){return e&&e.handle!==void 0&&e.conf!==void 0&&Rn.isMulticallOptions(e.options)}static isMulticallOptions(e){return e!==void 0&&e.batchSize!==void 0&&e.timeWindow!==void 0&&e.contract!==void 0}}Rn.DefaultOptions=ch({},$K);const pk=["getNetwork","getBlockNumber","getGasPrice","getTransactionCount","getStorageAt","sendTransaction","estimateGas","getBlock","getTransaction","getTransactionReceipt","getLogs","emit","litenerCount","addListener","removeListener","waitForTransaction","detectNetwork","getBlockWithTransactions"];class DK extends wx{constructor(e,r){var n;super(e.getNetwork()),n=this,this.provider=e,this.multicall=void 0,this.getResolver=async function(i){const s=n.provider;if(s.getResolver){const o=await s.getResolver(await i);return o?new Rp(n,o.address,o.name):null}return s.getResolver(await i)},this.next=async function(i,s){try{switch(i.method){case ar.ethCall:n.callback(i,s,await n.provider.call(i.params[0],i.params[1]));break;case ar.ethGetCode:n.callback(i,s,await n.provider.getCode(i.params[0],i.params[1]));break;case ar.ethGetBalance:n.callback(i,s,await n.provider.getBalance(i.params[0],i.params[1]));break}}catch(o){n.callback(i,s,void 0,o)}},this.listenerCount=e.listenerCount.bind(e),this.multicall=Rn.isMulticall(r)?r:new Rn(r),pk.forEach(i=>{e[i]!==void 0&&(this[i]=(...s)=>e[i](...s))})}callback(e,r,n,i){r(i,{jsonrpc:Xl,id:e.id,result:n,error:i})}async call(e,r){return this.rpcCall(ar.ethCall,e,r)}async getCode(e,r){return this.rpcCall(ar.ethGetCode,e,r)}async getBalance(e,r){return this.rpcCall(ar.ethGetBalance,e,r)}async rpcCall(e,...r){const n=Px();return(await Tx(this.multicall.handle)(this.next,{jsonrpc:Xl,id:n,method:e,params:r})).result}}class BK{constructor(e,r){if(this.provider=e,this.multicall=void 0,this.multicall=Rn.isMulticall(r)?r:new Rn(r),e.send){const n=async function(s,o){e.send(s,o)};this.send=(i,s)=>{this.multicall.handle(n,i,s)}}if(e.sendAsync){const n=async function(s,o){e.sendAsync(s,o)};this.sendAsync=(i,s)=>{this.multicall.handle(n,i,s)}}}get isMetaMask(){return this.provider.isMetaMask}get isStatus(){return this.provider.isStatus}}const LK=t=>e=>{const r=Rn.isMulticall(t)?t:new Rn(t);return(n,i)=>r.handle(e,n,i)};var jK=Object.freeze({__proto__:null,ProxyMethods:pk,MulticallProvider:DK,MulticallExternalProvider:BK,multicallMiddleware:LK});const FK=Object.freeze(Object.defineProperty({__proto__:null,Multicall:Rn,providers:jK},Symbol.toStringTag,{value:"Module"}));var gk={exports:{}};/*! * EventEmitter2 * https://github.com/hij1nx/EventEmitter2 * * Copyright (c) 2013 hij1nx * Licensed under the MIT license. - */(function(t,e){(function(r){var n=Object.hasOwnProperty,i=Array.isArray?Array.isArray:function(_){return Object.prototype.toString.call(_)==="[object Array]"},s=10,o=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",l=typeof Reflect=="object",c=typeof setImmediate=="function",f=c?setImmediate:setTimeout,u=a?l&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(b){var _=Object.getOwnPropertyNames(b);return _.push.apply(_,Object.getOwnPropertySymbols(b)),_}:Object.keys;function h(){this._events={},this._conf&&y.call(this,this._conf)}function y(b){b&&(this._conf=b,b.delimiter&&(this.delimiter=b.delimiter),b.maxListeners!==r&&(this._maxListeners=b.maxListeners),b.wildcard&&(this.wildcard=b.wildcard),b.newListener&&(this._newListener=b.newListener),b.removeListener&&(this._removeListener=b.removeListener),b.verboseMemoryLeak&&(this.verboseMemoryLeak=b.verboseMemoryLeak),b.ignoreErrors&&(this.ignoreErrors=b.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function g(b,_){var R="(node) warning: possible EventEmitter memory leak detected. "+b+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(R+=" Event name: "+_+"."),typeof process<"u"&&process.emitWarning){var m=new Error(R);m.name="MaxListenersExceededWarning",m.emitter=this,m.count=b,process.emitWarning(m)}else console.error(R),console.trace&&console.trace()}var p=function(b,_,R){var m=arguments.length;switch(m){case 0:return[];case 1:return[b];case 2:return[b,_];case 3:return[b,_,R];default:for(var d=new Array(m);m--;)d[m]=arguments[m];return d}};function k(b,_){for(var R={},m,d=b.length,T=_?_.length:0,N=0;N0;)b=T[$],N.call(x,b,R[b]);this._listeners={},this._listenersCount=0,L()}}});function E(b,_,R,m){var d=Object.assign({},_);if(!b)return d;if(typeof b!="object")throw TypeError("options must be an object");var T=Object.keys(b),N=T.length,x,$,L;function U(j){throw Error('Invalid "'+x+'" option value'+(j?". Reason: "+j:""))}for(var G=0;G0;)if(x===b[$])return T;N(_)}}var M=I(["function"]),B=I(["object","function"]);function z(b,_,R){var m,d,T=0,N,x=new b(function($,L,U){R=E(R,{timeout:0,overload:!1},{timeout:function(W,oe){return W*=1,(typeof W!="number"||W<0||!Number.isFinite(W))&&oe("timeout must be a positive number"),W}}),m=!R.overload&&typeof b.prototype.cancel=="function"&&typeof U=="function";function G(){d&&(d=null),T&&(clearTimeout(T),T=0)}var j=function(W){G(),$(W)},V=function(W){G(),L(W)};m?_(j,V,U):(d=[function(W){V(W||Error("canceled"))}],_(j,V,function(W){if(N)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof W!="function")throw TypeError("onCancel callback must be a function");d.push(W)}),N=!0),R.timeout>0&&(T=setTimeout(function(){var W=Error("timeout");W.code="ETIMEDOUT",T=0,x.cancel(W),L(W)},R.timeout))});return m||(x.cancel=function($){if(d){for(var L=d.length,U=1;U0;)V=Ce[x],V!=="_listeners"&&(Nt=K(b,_,R[V],m+1,d),Nt&&(j?j.push.apply(j,Nt):j=Nt));return j}else if(Le==="**"){for(ae=m+1===d||m+2===d&&Ee==="*",ae&&R._listeners&&(j=K(b,_,R,d,d)),Ce=u(R),x=Ce.length;x-- >0;)V=Ce[x],V!=="_listeners"&&(V==="*"||V==="**"?(R[V]._listeners&&!ae&&(Nt=K(b,_,R[V],d,d),Nt&&(j?j.push.apply(j,Nt):j=Nt)),Nt=K(b,_,R[V],m,d)):V===Ee?Nt=K(b,_,R[V],m+2,d):Nt=K(b,_,R[V],m,d),Nt&&(j?j.push.apply(j,Nt):j=Nt));return j}else R[Le]&&(j=K(b,_,R[Le],m+1,d));if(W=R["*"],W&&K(b,_,W,m+1,d),oe=R["**"],oe)if(m0;)V=Ce[x],V!=="_listeners"&&(V===Ee?K(b,_,oe[V],m+2,d):V===Le?K(b,_,oe[V],m+1,d):(re={},re[V]=oe[V],K(b,_,{"**":re},m+1,d)));else oe._listeners?K(b,_,oe,d,d):oe["*"]&&oe["*"]._listeners&&K(b,_,oe["*"],d,d);return j}function J(b,_,R){var m=0,d=0,T,N=this.delimiter,x=N.length,$;if(typeof b=="string")if((T=b.indexOf(N))!==-1){$=new Array(5);do $[m++]=b.slice(d,T),d=T+x;while((T=b.indexOf(N,d))!==-1);$[m++]=b.slice(d)}else $=[b],m=1;else $=b,m=b.length;if(m>1){for(T=0;T+10&&L._listeners.length>this._maxListeners&&(L._listeners.warned=!0,g.call(this,L._listeners.length,U))):L._listeners=_,!0;return!0}function Z(b,_,R,m){for(var d=u(b),T=d.length,N,x,$,L=b._listeners,U;T-- >0;)x=d[T],N=b[x],x==="_listeners"?$=R:$=R?R.concat(x):[x],U=m||typeof x=="symbol",L&&_.push(U?$:$.join(this.delimiter)),typeof N=="object"&&Z.call(this,N,_,$,U);return _}function ie(b){for(var _=u(b),R=_.length,m,d,T;R-- >0;)d=_[R],m=b[d],m&&(T=!0,d!=="_listeners"&&!ie(m)&&delete b[d]);return T}function D(b,_,R){this.emitter=b,this.event=_,this.listener=R}D.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function v(b,_,R){if(R===!0)d=!0;else if(R===!1)m=!0;else{if(!R||typeof R!="object")throw TypeError("options should be an object or true");var m=R.async,d=R.promisify,T=R.nextTick,N=R.objectify}if(m||T||d){var x=_,$=_._origin||_;if(T&&!o)throw Error("process.nextTick is not supported");d===r&&(d=_.constructor.name==="AsyncFunction"),_=function(){var L=arguments,U=this,G=this.event;return d?T?Promise.resolve():new Promise(function(j){f(j)}).then(function(){return U.event=G,x.apply(U,L)}):(T?process.nextTick:f)(function(){U.event=G,x.apply(U,L)})},_._async=!0,_._origin=$}return[_,N?new D(this,b,_):this]}function C(b){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,y.call(this,b)}C.EventEmitter2=C,C.prototype.listenTo=function(b,_,R){if(typeof b!="object")throw TypeError("target musts be an object");var m=this;R=E(R,{on:r,off:r,reducers:r},{on:M,off:M,reducers:B});function d(T){if(typeof T!="object")throw TypeError("events must be an object");var N=R.reducers,x=F.call(m,b),$;x===-1?$=new w(m,b,R):$=m._observers[x];for(var L=u(T),U=L.length,G,j=typeof N=="function",V=0;V0;)d=R[m],(!b||d._target===b)&&(d.unsubscribe(_),T=!0);return T},C.prototype.delimiter=".",C.prototype.setMaxListeners=function(b){b!==r&&(this._maxListeners=b,this._conf||(this._conf={}),this._conf.maxListeners=b)},C.prototype.getMaxListeners=function(){return this._maxListeners},C.prototype.event="",C.prototype.once=function(b,_,R){return this._once(b,_,!1,R)},C.prototype.prependOnceListener=function(b,_,R){return this._once(b,_,!0,R)},C.prototype._once=function(b,_,R,m){return this._many(b,1,_,R,m)},C.prototype.many=function(b,_,R,m){return this._many(b,_,R,!1,m)},C.prototype.prependMany=function(b,_,R,m){return this._many(b,_,R,!0,m)},C.prototype._many=function(b,_,R,m,d){var T=this;if(typeof R!="function")throw new Error("many only accepts instances of Function");function N(){return--_===0&&T.off(b,N),R.apply(this,arguments)}return N._origin=R,this._on(b,N,m,d)},C.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||h.call(this);var b=arguments[0],_,R=this.wildcard,m,d,T,N,x;if(b==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(R&&(_=b,b!=="newListener"&&b!=="removeListener"&&typeof b=="object")){if(d=b.length,a){for(T=0;T3)for(m=new Array($-1),N=1;N<$;N++)m[N-1]=arguments[N];for(T=0,d=L.length;T3)for(d=new Array(L-1),x=1;x0&&this._events[b].length>this._maxListeners&&(this._events[b].warned=!0,g.call(this,this._events[b].length,b))):this._events[b]=_,d)},C.prototype.off=function(b,_){if(typeof _!="function")throw new Error("removeListener only takes instances of Function");var R,m=[];if(this.wildcard){var d=typeof b=="string"?b.split(this.delimiter):b.slice();if(m=K.call(this,null,d,this.listenerTree,0),!m)return this}else{if(!this._events[b])return this;R=this._events[b],m.push({_listeners:R})}for(var T=0;T0){for(m=this._all,_=0,R=m.length;_0;)m=_[R[T]],typeof m=="function"?d.push(m):d.push.apply(d,m);return d}else{if(this.wildcard){if(N=this.listenerTree,!N)return[];var x=[],$=typeof b=="string"?b.split(this.delimiter):b.slice();return K.call(this,x,$,N,0),x}return _?(m=_[b],m?typeof m=="function"?[m]:m:[]):[]}},C.prototype.eventNames=function(b){var _=this._events;return this.wildcard?Z.call(this,this.listenerTree,[],null,b):_?u(_):[]},C.prototype.listenerCount=function(b){return this.listeners(b).length},C.prototype.hasListeners=function(b){if(this.wildcard){var _=[],R=typeof b=="string"?b.split(this.delimiter):b.slice();return K.call(this,_,R,this.listenerTree,0),_.length>0}var m=this._events,d=this._all;return!!(d&&d.length||m&&(b===r?u(m).length:m[b]))},C.prototype.listenersAny=function(){return this._all?this._all:[]},C.prototype.waitFor=function(b,_){var R=this,m=typeof _;return m==="number"?_={timeout:_}:m==="function"&&(_={filter:_}),_=E(_,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:M,Promise:A}),z(_.Promise,function(d,T,N){function x(){var $=_.filter;if(!($&&!$.apply(R,arguments)))if(R.off(b,x),_.handleError){var L=arguments[0];L?T(L):d(p.apply(null,arguments).slice(1))}else d(p.apply(null,arguments))}N(function(){R.off(b,x)}),R._on(b,x,!1)},{timeout:_.timeout,overload:_.overload})};function P(b,_,R){R=E(R,{Promise,timeout:0,overload:!1},{Promise:A});var m=R.Promise;return z(m,function(d,T,N){var x;if(typeof b.addEventListener=="function"){x=function(){d(p.apply(null,arguments))},N(function(){b.removeEventListener(_,x)}),b.addEventListener(_,x,{once:!0});return}var $=function(){L&&b.removeListener("error",L),d(p.apply(null,arguments))},L;_!=="error"&&(L=function(U){b.removeListener(_,$),T(U)},b.once("error",L)),N(function(){L&&b.removeListener("error",L),b.removeListener(_,$)}),b.once(_,$)},{timeout:R.timeout,overload:R.overload})}var O=C.prototype;Object.defineProperties(C,{defaultMaxListeners:{get:function(){return O._maxListeners},set:function(b){if(typeof b!="number"||b<0||Number.isNaN(b))throw TypeError("n must be a non-negative number");O._maxListeners=b},enumerable:!0},once:{value:P,writable:!0,configurable:!0}}),Object.defineProperties(O,{_maxListeners:{value:s,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof r=="function"&&r.amd?r(function(){return C}):t.exports=C})()})(gk);var h1=gk.exports;function UK(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function zK(t,...e){if(!UK(t))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function v5(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 VK(t,e){zK(t);const r=e.outputLen;if(t.lengthnew DataView(t.buffer,t.byteOffset,t.byteLength),ci=(t,e)=>t<<32-e|t>>>e,HK=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!HK)throw new Error("Non little-endian hardware is not supported");const WK=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function qK(t){if(!mk(t))throw new Error("Uint8Array expected");let e="";for(let r=0;rt().update(xk(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function YK(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),l=n?4:0,c=n?0:4;t.setUint32(e+l,o,n),t.setUint32(e+c,a,n)}class QK extends KK{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Kv(this.buffer)}update(e){v5(this);const{view:r,buffer:n,blockLen:i}=this;e=xk(e);const s=e.length;for(let o=0;oi-o&&(this.process(n,0),o=0);for(let u=o;uf.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;ut&e^~t&r,ZK=(t,e,r)=>t&e^t&r^e&r,eJ=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]),As=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),_s=new Uint32Array(64);class tJ extends QK{constructor(){super(64,32,8,!1),this.A=As[0]|0,this.B=As[1]|0,this.C=As[2]|0,this.D=As[3]|0,this.E=As[4]|0,this.F=As[5]|0,this.G=As[6]|0,this.H=As[7]|0}get(){const{A:e,B:r,C:n,D:i,E:s,F:o,G:a,H:l}=this;return[e,r,n,i,s,o,a,l]}set(e,r,n,i,s,o,a,l){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=l|0}process(e,r){for(let u=0;u<16;u++,r+=4)_s[u]=e.getUint32(r,!1);for(let u=16;u<64;u++){const h=_s[u-15],y=_s[u-2],g=ci(h,7)^ci(h,18)^h>>>3,p=ci(y,17)^ci(y,19)^y>>>10;_s[u]=p+_s[u-7]+g+_s[u-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:l,G:c,H:f}=this;for(let u=0;u<64;u++){const h=ci(a,6)^ci(a,11)^ci(a,25),y=f+h+XK(a,l,c)+eJ[u]+_s[u]|0,p=(ci(n,2)^ci(n,13)^ci(n,22))+ZK(n,i,s)|0;f=c,c=l,l=a,a=o+y|0,o=s,s=i,i=n,n=y+p|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,l=l+this.F|0,c=c+this.G|0,f=f+this.H|0,this.set(n,i,s,o,a,l,c,f)}roundClean(){_s.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const rJ=JK(()=>new tJ);var nJ=class{constructor(t,e){Oe(this,"hostname");Oe(this,"fetch");Oe(this,"path","/rpc/Databeat/");Oe(this,"ping",(t,e)=>this.fetch(this.url("Ping"),Bc({},t,e)).then(r=>jc(r).then(n=>({status:n.status})),r=>{throw Qa.new({cause:`fetch(): ${r.message||""}`})}));Oe(this,"version",(t,e)=>this.fetch(this.url("Version"),Bc({},t,e)).then(r=>jc(r).then(n=>({version:n.version})),r=>{throw Qa.new({cause:`fetch(): ${r.message||""}`})}));Oe(this,"runtimeStatus",(t,e)=>this.fetch(this.url("RuntimeStatus"),Bc({},t,e)).then(r=>jc(r).then(n=>({status:n.status})),r=>{throw Qa.new({cause:`fetch(): ${r.message||""}`})}));Oe(this,"tick",(t,e,r)=>this.fetch(this.url("Tick"),Bc(t,e,r)).then(n=>jc(n).then(i=>({ok:i.ok})),n=>{throw Qa.new({cause:`fetch(): ${n.message||""}`})}));Oe(this,"rawEvents",(t,e,r)=>this.fetch(this.url("RawEvents"),Bc(t,e,r)).then(n=>jc(n).then(i=>({ok:i.ok})),n=>{throw Qa.new({cause:`fetch(): ${n.message||""}`})}));this.hostname=t,this.fetch=(r,n)=>e(r,n)}url(t){return this.hostname+this.path+t}},Bc=(t={},e={},r=null)=>({method:"POST",headers:{...e,"Content-Type":"application/json"},body:JSON.stringify(t||{}),signal:r}),jc=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let i="";throw n instanceof Error&&(i=n.message),Ak.new({status:t.status,cause:`JSON.parse(): ${i}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(bJ[n]||dr).new(r)}return r}),dr=class bk extends Error{constructor(r,n,i,s,o){super(i);Oe(this,"name");Oe(this,"code");Oe(this,"message");Oe(this,"status");Oe(this,"cause");Oe(this,"msg");this.name=r||"WebrpcError",this.code=typeof n=="number"?n:0,this.message=i||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof s=="number"?s:0,this.cause=o,Object.setPrototypeOf(this,bk.prototype)}static new(r){return new this(r.error,r.code,r.message||r.msg,r.status,r.cause)}},iJ=class wk extends dr{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,wk.prototype)}},Qa=class Ck extends dr{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Ck.prototype)}},sJ=class Ek extends dr{constructor(e="WebrpcBadRoute",r=-2,n="bad route",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Ek.prototype)}},oJ=class Sk extends dr{constructor(e="WebrpcBadMethod",r=-3,n="bad method",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Sk.prototype)}},aJ=class kk extends dr{constructor(e="WebrpcBadRequest",r=-4,n="bad request",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,kk.prototype)}},Ak=class _k extends dr{constructor(e="WebrpcBadResponse",r=-5,n="bad response",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,_k.prototype)}},lJ=class Tk extends dr{constructor(e="WebrpcServerPanic",r=-6,n="server panic",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Tk.prototype)}},cJ=class Pk extends dr{constructor(e="WebrpcInternalError",r=-7,n="internal error",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Pk.prototype)}},fJ=class Ik extends dr{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Ik.prototype)}},uJ=class Rk extends dr{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Rk.prototype)}},dJ=class Mk extends dr{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Mk.prototype)}},hJ=class Ok extends dr{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Ok.prototype)}},vJ=class Nk extends dr{constructor(e="PermissionDenied",r=2e3,n="Permission denied",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Nk.prototype)}},yJ=class $k extends dr{constructor(e="SessionExpired",r=2001,n="Session expired",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,$k.prototype)}},pJ=class Dk extends dr{constructor(e="NotFound",r=3e3,n="Resource not found",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Dk.prototype)}},gJ=class Lk extends dr{constructor(e="InvalidAppKey",r=4e3,n="Invalid app key",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Lk.prototype)}},mJ=class Bk extends dr{constructor(e="QueryFailed",r=4001,n="DB query failed",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Bk.prototype)}},xJ=class jk extends dr{constructor(e="InvalidProjectId",r=4002,n="Invalid project id",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,jk.prototype)}},bJ={0:iJ,[-1]:Qa,[-2]:sJ,[-3]:oJ,[-4]:aJ,[-5]:Ak,[-6]:lJ,[-7]:cJ,[-8]:fJ,[-9]:uJ,[-10]:dJ,1e3:hJ,2e3:vJ,2001:yJ,3e3:pJ,4e3:gJ,4001:mJ,4002:xJ},wJ=class extends nJ{constructor(e,r){const n=typeof global=="object"?global.fetch.bind(global):window.fetch.bind(window);super(e.endsWith("/")?e.slice(0,-1):e,n);Oe(this,"_globalFetch");Oe(this,"_fetch",(e,r)=>{var n;if(this.auth){let i={};((n=this.auth.jwt)==null?void 0:n.length)>0&&(i.Authorization=`BEARER ${this.auth.jwt}`),this.auth.headers&&(i={...i,...this.auth.headers}),r.headers={...r.headers,...i}}return this._globalFetch(e,r)});this.auth=r,this._globalFetch=n,this.fetch=this._fetch}},y5=150,Fo={defaultEnabled:!0,noop:!1,privacy:{userIdHash:!0,userAgentSalt:!1},userIdentTracking:!1,strictMode:!1,flushInterval:500,initProps:()=>({})},CJ=class{constructor(t,e,r){Oe(this,"rpc");Oe(this,"auth");Oe(this,"options");Oe(this,"enabled");Oe(this,"ident");Oe(this,"userId");Oe(this,"sessionId");Oe(this,"allowUserTracking");Oe(this,"projectId");Oe(this,"queue");Oe(this,"flushTimeout");Oe(this,"defaultProps");Oe(this,"previousPageKey");Oe(this,"ts");Oe(this,"flush",async()=>{if(this.flushTimeout!==null&&(clearTimeout(this.flushTimeout),this.flushTimeout=null),!this.enabled||this.options.noop||this.options.strictMode&&!this.allowUserTracking||this.queue.length===0)return;const t=this.dedupedQueue();this.queue=[];try{await this.rpc.tick({events:t})}catch(e){console.warn(`databeat flush failed: ${e}`)}});Oe(this,"dedupedQueue",()=>{const t=new Map;for(let e=0;ey5&&(this.queue=this.queue.splice(this.queue.length-y5)),this.enabled&&(e&&e.flush?await this.flush():this.flushTimeout===null&&(this.flushTimeout=setTimeout(()=>{this.flush()},this.options.flushInterval)))}trackView(t={}){const e={...this.defaultProps,...t},r=g5(),n=`${r}:${JSON.stringify(e)}:${this.userId}:${this.sessionId}`;this.previousPageKey!==n&&(this.previousPageKey=n,this.track({event:"VIEW",source:r,props:e}))}isEnabled(){return this.enabled}isAnon(){return this.ident===0}getIdent(){return this.ident}getUserId(){return this.userId}getSessionId(){return this.sessionId}getStorageTS(){if(this.ts)return this.ts;const t=ng();if(!(t==null||t.id===null))return this.ts=t.ts,this.ts}enable(){if(!Fk(this.auth)){this.enabled=!1;return}Yi()&&(this.enabled=!0,this.ts=Va({on:this.enabled,id:this.userId,it:this.ident,ut:this.allowUserTracking}),this.identify())}disable(){Yi()&&(this.enabled=!1,this.ts=Va({on:this.enabled,id:this.userId,it:this.ident,ut:this.allowUserTracking}))}},Yi=()=>typeof window=="object"&&typeof window.localStorage=="object"&&typeof window.localStorage.getItem=="function"&&typeof window.localStorage.setItem=="function",p5=(t,e)=>{if(!Fk(e))return!1;if(!Yi())return!0;const r=ng();return r===null?t??!0:r.on},Fk=t=>{var e;return!!(((e=t==null?void 0:t.jwt)==null?void 0:e.length)>0||t!=null&&t.headers&&Object.keys(t.headers).length>0)},g5=()=>{try{return window.location.pathname}catch{return""}},EJ=()=>{if(!Yi())return{};const t=new URL(window.location.href).searchParams,e={};return e.origin=window.location.origin,t.get("ref")&&t.get("ref")!==""&&(e.ref=t.get("ref")||""),t.get("source")&&t.get("source")!==""&&(e.source=t.get("source")||""),t.get("utm_source")&&t.get("utm_source")!==""&&(e.utmSource=t.get("utm_source")||""),t.get("utm_campaign")&&t.get("utm_campaign")!==""&&(e.utmCampaign=t.get("utm_campaign")||""),t.get("utm_medium")&&t.get("utm_medium")!==""&&(e.utmMedium=t.get("utm_medium")||""),t.get("utm_content")&&t.get("utm_content")!==""&&(e.utmContent=t.get("utm_content")||""),t.get("utm_term")&&t.get("utm_term")!==""&&(e.utmTerm=t.get("utm_term")||""),document.referrer&&document.referrer!==""&&(e.referrer=document.referrer),t.get("gclid")&&t.get("gclid")!==""&&(e.gclid=t.get("gclid")||""),e},fh="_dbeat",ng=()=>{try{return JSON.parse(window.localStorage.getItem(fh))}catch{return null}},Va=t=>{try{return t.ts||(t.ts=Math.floor(Date.now()/1e3)),window.localStorage.setItem(fh,JSON.stringify(t)),t.ts}catch{return}},SJ=(t,e,r)=>{if(!t||t===null||t==="")return{userId:`${Math.floor(Math.random()*1e14)}`,ident:0};if(r.userIdentTracking&&e)return{userId:t,ident:2};if(r.privacy.userIdHash===!0||!r.userIdentTracking||!e)return Yi()&&r.privacy.userAgentSalt===!0&&(t=t+":"+navigator.userAgent),r.privacy.extraSalt&&r.privacy.extraSalt.length>0&&(t=t+":"+r.privacy.extraSalt),{userId:qK(rJ(t)).substring(0,50),ident:1};throw new Error("invalid configuration")},kJ=()=>{if(Yi()&&typeof window.sessionStorage=="object"&&typeof window.sessionStorage.getItem=="function"&&typeof window.sessionStorage.setItem=="function"){const e=window.sessionStorage.getItem(fh);if(e&&e.length>0)return e;{const r=m5(16);return window.sessionStorage.setItem(fh,r),r}}else return m5(16)},m5=t=>{let e="";for(let r=0;r++AJ;class Pu{constructor(){var e=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.state=void 0,this.confirmationOnly=!1,this.events=new h1.EventEmitter2,this.openPayload=void 0,this.connectPayload=void 0,this.accountsChangedPayload=void 0,this.networksPayload=void 0,this.walletContextPayload=void 0,this._sessionId=void 0,this._init=void 0,this._registered=void 0,this.sendAsync=async function(r,n,i){e.state===kn.CLOSED&&(e.confirmationOnly=!0),e.openWallet(void 0,{type:"jsonRpcRequest",method:r.method},i);try{e.isOpened()||await e.waitUntilOpened();const s=await e.sendMessageRequest({idx:Hk(),type:Te.MESSAGE,data:r,chainId:i});n(void 0,s.data)}catch(s){n(s)}},this.sendMessageRequest=async function(r){return new Promise((n,i)=>{(!r.idx||r.idx<=0)&&r.type!=="init"&&i(new Error("message idx not set"));const s=(a,l)=>{if(a)i(a);else if(l)n(l);else throw new Error("no valid response to return")},o=r.idx;e.responseCallbacks.get(o)?i(new Error("duplicate message idx, should never happen")):e.responseCallbacks.set(o,s),e.isOpened()?e.sendMessage(r):(ve.debug("pushing to pending requests",r),e.pendingMessageRequests.push(r))})},this.waitUntilOpened=async function(r=Zx){let n=!1;return Promise.race([new Promise((i,s)=>{const o=setTimeout(()=>{clearTimeout(o),n||(e.state=kn.CLOSED,e.events.emit("close",{code:1005,message:"opening wallet timed out"})),s(new Error("opening wallet timed out"))},r)}),new Promise(i=>{if(e.isOpened()){var s;n=!0,i((s=e.openPayload)==null?void 0:s.session);return}e.events.once("open",o=>{e.openPayload=o,n=!0,i(o.session)})})])},this.waitUntilConnected=async function(){await e.waitUntilOpened();const r=new Promise(i=>{if(e.connectPayload){i(e.connectPayload);return}e.events.once("connect",s=>{e.connectPayload=s,i(s)})}),n=new Promise((i,s)=>{e.events.once("close",o=>{s(o?new Error(`wallet closed due to ${JSON.stringify(o)}`):new Error("user closed the wallet"))})});return Promise.race([r,n])},this.state=kn.CLOSED,this._registered=!1,this._init=Rt.NIL}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}openWallet(e,r,n){throw new Error("abstract method")}closeWallet(){throw new Error("abstract method")}isOpened(){return this.registered&&this.state===kn.OPENED}isConnected(){var e;const r=(e=this.openPayload)==null?void 0:e.session;return this.registered&&r!==void 0&&!!r.accountAddress&&r.accountAddress.length===42&&!!r.networks&&r.networks.length>0}handleMessage(e){var r=this;if(e.type===Te.INIT){ve.debug("MessageProvider, received INIT message",e);const{nonce:l}=e.data;if(!l||l.length==0){ve.error("invalid init nonce");return}this._init=Rt.OK,this.sendMessage({idx:-1,type:Te.INIT,data:{sessionId:this._sessionId,nonce:l}})}if(this._init!==Rt.OK)return;ve.debug("RECEIVED MESSAGE FROM WALLET",e.idx,e);const n=e.idx,i=this.responseCallbacks.get(n);if(n&&this.responseCallbacks.delete(n),e.type===Te.OPEN&&!this.isOpened()){var s,o;if(this._sessionId&&this._sessionId!==((s=e.data)==null?void 0:s.sessionId)){ve.debug("open event received from wallet, but does not match sessionId",this._sessionId);return}if((o=e.data)!=null&&o.error){var a;const l=new Error(`opening wallet failed: received ${(a=e.data)==null?void 0:a.error}`);throw ve.error(l),this.close(),l}this.state=kn.OPENED,this.openPayload=e.data,this.events.emit("open",this.openPayload),this.pendingMessageRequests.length!==0&&this.pendingMessageRequests.splice(0,this.pendingMessageRequests.length).forEach(async function(c){r.sendMessage(c)});return}if(e.type===Te.MESSAGE){if(this.confirmationOnly&&setTimeout(()=>{this.responseCallbacks.size===0&&this.closeWallet()},500),!i)throw new Error("impossible state");if(i){this.events.emit("message",e),i(e.data.error,e);return}}if(e.type===Te.ACCOUNTS_CHANGED){this.accountsChangedPayload={accounts:[]},e.data&&e.data.length>0?(this.accountsChangedPayload={accounts:[we(e.data[0])],origin:e.origin},this.events.emit("accountsChanged",this.accountsChangedPayload.accounts,this.accountsChangedPayload.origin)):this.events.emit("accountsChanged",[],e.origin);return}if(e.type===Te.CHAIN_CHANGED){this.events.emit("chainChanged",e.data,e.origin);return}if(e.type===Te.NETWORKS){this.networksPayload=e.data,this.events.emit("networks",this.networksPayload);return}if(e.type===Te.WALLET_CONTEXT){this.walletContextPayload=e.data,this.events.emit("walletContext",this.walletContextPayload);return}e.type===Te.CLOSE&&this.state!==kn.CLOSED&&this.close(e.data),e.type===Te.CONNECT&&(this.connectPayload=e.data,this.events.emit("connect",this.connectPayload)),e.type===Te.DISCONNECT&&this.isConnected()&&(this.events.emit("disconnect",e.data,e.origin),this.close())}sendMessage(e){throw new Error("abstract method")}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}emit(e,...r){return this.events.emit(e,...r)}close(e){this.state!==kn.CLOSED&&(this.state=kn.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,ve.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(rn({},new Error("wallet closed"),{code:4001}))}),this.responseCallbacks.clear(),this.connectPayload=void 0,this.openPayload=void 0,this.accountsChangedPayload=void 0,this.networksPayload=void 0,this.walletContextPayload=void 0,this.events.emit("close",e))}}function _J(t){return TJ.some(e=>e.predicate(t))}const TJ=[{name:"Decentraland Exception",predicate:IJ},{name:"0x v3 Exception",predicate:RJ}],PJ=/^Decentraland Login\nEphemeral address: 0x[a-fA-F0-9]{40}\nExpiration: (\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)((-(\d{2}):(\d{2})|Z)?)$/;function IJ(t){try{const e=vs(t);return PJ.test(e)}catch{return!1}}function RJ(t){const e=new ir(MJ);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const MJ=[{inputs:[{components:[{internalType:"address",name:"makerAddress",type:"address"},{internalType:"address",name:"takerAddress",type:"address"},{internalType:"address",name:"feeRecipientAddress",type:"address"},{internalType:"address",name:"senderAddress",type:"address"},{internalType:"uint256",name:"makerAssetAmount",type:"uint256"},{internalType:"uint256",name:"takerAssetAmount",type:"uint256"},{internalType:"uint256",name:"makerFee",type:"uint256"},{internalType:"uint256",name:"takerFee",type:"uint256"},{internalType:"uint256",name:"expirationTimeSeconds",type:"uint256"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes",name:"makerAssetData",type:"bytes"},{internalType:"bytes",name:"takerAssetData",type:"bytes"},{internalType:"bytes",name:"makerFeeAssetData",type:"bytes"},{internalType:"bytes",name:"takerFeeAssetData",type:"bytes"}],internalType:"struct IEIP1271Data.Order",name:"order",type:"tuple"},{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderWithHash",outputs:[],stateMutability:"pure",type:"function"}],Gd=We(`Ethereum Signed Message: -`),Wk=t=>ds(t)||Pe(t)?X(t):We(t),v1=t=>{const e=Wk(t);return _J(e)?e:Ve([Gd,We(String(e.length)),e])},OJ=t=>{if(JSON.stringify(t.slice(0,Gd.length))!==JSON.stringify(Gd))return t;const e=t.slice(Gd.length),r=String(e.length).length;let n,i;try{i=Number(vs(e.slice(0,r)))}catch{i=Number(Q(e.slice(0,r)))}return i>e.length||!Number.isInteger(i)?n=r-1:n=r,e.slice(n)},ec=async(t,e,r,n)=>new ce.reader.OnChainReader(n).isValidSignature(t,e,r),qk=async(t,e,r,n)=>{const i=v1(e),s=_x(i);return ec(t,s,r,n)},Gk=(t,e,r,n)=>ec(t,Eu(e),r,n),uh=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",Kk=()=>!!navigator.userAgent.match(/UnitySequence/i),Jk=t=>t.onChain.deployed&&t.fullyMigrated;class Yk{constructor(){this.callbacks=[],this.store={}}getItem(e){return this.store[e]||null}setItem(e,r){this.store[e]=r,this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){delete this.store[e]}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}class au{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(this.callbacks=[],!au.isAvailable())throw new Error("LocalStorage is not available");window.addEventListener("storage",e=>{const{key:r}=e;this.callbacks.filter(i=>i.key===r).forEach(i=>i.cb(this.getItem(r)))})}getItem(e){return window.localStorage.getItem(e)}setItem(e,r){window.localStorage.setItem(e,r),this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){window.localStorage.removeItem(e),this.callbacks.filter(r=>r.key===e).forEach(r=>r.cb(null))}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}function dh(){return au.isAvailable()?new au:new Yk}async function Qk(t){return Array.isArray(t)?Promise.all(t.map(e=>Ke(e))):Ke(t)}const x5="@sequence.transportSession";class Iu{constructor(e){var r=this;this.walletRequestHandler=void 0,this._sessionId=void 0,this._registered=void 0,this._init=void 0,this._initNonce=void 0,this._initCallback=void 0,this.appOrigin=void 0,this.sendAsync=async function(n,i,s){throw new Error("abstract method")},this.handleMessage=async function(n){const i=n;if(r._init!==Rt.OK){if(i.type===Te.INIT)if(r.isValidInitAck(n))r._initCallback&&r._initCallback();else{r._initCallback&&r._initCallback("invalid init");return}return}switch(i.type){case Te.OPEN:{if(r._init!==Rt.OK)return;const s={sessionId:i.data.sessionId,intent:i.data.intent,networkId:i.data.networkId};await r.open(s);return}case Te.CLOSE:return r._init!==Rt.OK,void 0;case Te.MESSAGE:{const s=await r.walletRequestHandler.sendMessageRequest(i);r.sendMessage(s),s.data.error;return}default:ve.error(`unexpected payload type ${i.type}`)}},this.sendMessageRequest=async function(n){return r.walletRequestHandler.sendMessageRequest(n)},this.open=async function({sessionId:n,intent:i,networkId:s}){n&&(r._sessionId=D9(n),r.saveTransportSession({sessionId:n,intent:i,networkId:s})),r.walletRequestHandler.setOpenIntent(i),await r.init();let o;try{if(s){const a=Ix(s);if(a)o=a.chainId;else throw new Error(`unknown network ${s}`)}else o=r.walletRequestHandler.defaultChainId()}catch(a){console.error(a)}if(i&&i.type==="connect"&&i.options){const a=i.options,l=a;if(r.appOrigin&&l!=null&&l.origin){if(!uh()&&l.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&l!=null&&l.origin?a.origin=B9(l.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=L9(a.app)),a.networkId?s=a.networkId:s&&(a.networkId=s),r.walletRequestHandler.setConnectOptions(a)}else r.walletRequestHandler.setConnectOptions(void 0);if(await r.walletRequestHandler.getAccount(),await r.walletRequestHandler.isSignedIn())if(i&&i.type==="connect"){(!o||o<=0)&&console.log("Failed to set default network on open"),r.notifyOpen({sessionId:r._sessionId});try{const a=await r.walletRequestHandler.promptConnect(i.options);a.connected&&r.walletRequestHandler.notifyConnect(a)}catch(a){ve.warn("promptConnect not connected:",a)}finally{(!i.options||i.options.keepWalletOpened!==!0)&&r.notifyClose()}}else{if(!o||o<=0)return r.notifyOpen({sessionId:r._sessionId,error:`failed to open wallet on network ${s}`}),!1;r.notifyOpen({sessionId:r._sessionId,chainId:`${o}`,session:await r.walletRequestHandler.walletSession(o)})}else return r.notifyOpen({sessionId:r._sessionId}),!0;return!0},this.saveTransportSession=n=>{dh().setItem(x5,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=dh().getItem(x5);try{return n?JSON.parse(n):null}catch{return console.error(`unable to parse transport session: ${n}`),null}},this.walletRequestHandler=e,this._init=Rt.NIL,this.walletRequestHandler.on("connect",n=>{this.registered&&this.notifyConnect(n)}),this.walletRequestHandler.on("disconnect",(n,i)=>{this.registered&&this.notifyDisconnect(n,i)}),this.walletRequestHandler.on("accountsChanged",(n,i)=>{this.registered&&this.notifyAccountsChanged(n,i)}),this.walletRequestHandler.on("networks",n=>{this.registered&&(this.notifyNetworks(n),!n||n.length===0?this.notifyChainChanged("0x0"):this.notifyChainChanged(ni(n.find(i=>i.isDefaultChain).chainId)))}),this.walletRequestHandler.on("chainChanged",(n,i)=>{this.notifyChainChanged(n,i)}),this.walletRequestHandler.on("walletContext",n=>{!this.registered||!n||this.notifyWalletContext(n)}),this.walletRequestHandler.on("close",n=>{this.registered&&this.notifyClose(n)})}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}sendMessage(e){throw new Error("abstract method")}notifyOpen(e){const{chainId:r,sessionId:n,session:i,error:s}=e;this.sendMessage({idx:-1,type:Te.OPEN,data:{chainId:r,sessionId:n,session:i,error:s}})}notifyClose(e){this.sendMessage({idx:-1,type:Te.CLOSE,data:e?{error:e}:null})}notifyConnect(e){this.sendMessage({idx:-1,type:Te.CONNECT,data:e})}notifyDisconnect(e,r){this.sendMessage({idx:-1,type:Te.DISCONNECT,data:e?{error:e}:null,origin:r})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:Te.ACCOUNTS_CHANGED,data:e,origin:r})}notifyChainChanged(e,r){this.sendMessage({idx:-1,type:Te.CHAIN_CHANGED,data:e,origin:r})}notifyNetworks(e){this.sendMessage({idx:-1,type:Te.NETWORKS,data:e})}notifyWalletContext(e){this.sendMessage({idx:-1,type:Te.WALLET_CONTEXT,data:e})}isValidInitAck(e){if(this._init===Rt.OK)return ve.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==Te.INIT)return ve.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(ve.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(ve.error("invalid init ack match"),!1):!0}init(){return new Promise((e,r)=>{if(this._init===Rt.OK){e();return}if(this._init!==Rt.NIL||this._initCallback){r("transport init is in progress");return}const n=setTimeout(()=>{ve.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},Zx/2);this._initCallback=i=>{this._initCallback=void 0,clearTimeout(n),i?r(i):(this._init=Rt.OK,e())},this._initNonce=`${performance.now()}`,this.sendMessage({idx:-1,type:Te.INIT,data:{nonce:this._initNonce}}),this._init=Rt.SENT_NONCE})}}class NJ{constructor(){this.app=void 0,this.wallet=void 0;const e=new ig,r=new ig;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class ig{constructor(){this.conn=void 0,this.events=new h1.EventEmitter2,this.handleMessage=e=>{throw new Error("ProxyMessageChannelPort is not registered")},this.sendMessage=e=>{this.conn.handleMessage(e),e.type==="open"&&this.events.emit("open",e),e.type==="close"&&this.events.emit("close",e),e.type==="connect"&&this.events.emit("connect",e),e.type==="disconnect"&&this.events.emit("disconnect",e)}}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}}class Xk extends Pu{constructor(e){if(super(),this.port=void 0,this.register=()=>{this.port.handleMessage=r=>{this.handleMessage(r)},this.on("open",(...r)=>{this.port.events.emit("open",...r)}),this.on("close",(...r)=>{this.port.events.emit("close",...r)}),this.on("connect",(...r)=>{this.port.events.emit("connect",...r)}),this.on("disconnect",(...r)=>{this.port.events.emit("disconnect",...r)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),this.events.removeAllListeners(),this.port.handleMessage=void 0},this.openWallet=(r,n,i)=>{if(this.state===kn.CLOSED){this.state=kn.OPENING;const s=`${performance.now()}`;this._sessionId=s,this.sendMessage({idx:-1,type:Te.OPEN,data:{path:r,intent:n,networkId:i,sessionId:s}})}},this.state=kn.CLOSED,this.port=e,!e)throw new Error("port argument cannot be empty");this._init=Rt.OK}closeWallet(){this.sendMessage({idx:-1,type:Te.CLOSE,data:null}),this.close()}sendMessage(e){if(!e.idx)throw new Error("message idx is empty");this.port.sendMessage(e)}}class $J extends Iu{constructor(e,r){super(e),this.port=void 0,this.port=r,this._init=Rt.OK}register(){this.port.handleMessage=e=>{this.handleMessage(e)},this._registered=!0}async restoreSession(){const e=await this.getCachedTransportSession();e&&this.open(e)}unregister(){this.port.handleMessage=void 0,this._registered=!1}sendMessage(e){this.port.sendMessage(e)}}function Zk(t){var e;if((e=window.ue)!=null&&e.sequencewallettransport&&!window.logsOverriddenForUnreal){var r;const n=(r=window.ue)==null?void 0:r.sequencewallettransport;console.log=(...i)=>{n.logfromjs(`${t}: ${Jv(i)}`)},console.warn=(...i)=>{n.warnfromjs(`${t}: ${Jv(i)}`)},console.error=(...i)=>{n.errorfromjs(`${t}: ${Jv(i)}`)},window.logsOverriddenForUnreal=!0}}function Jv(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let Ha;class eA extends Pu{constructor(e){super(),this.walletURL=void 0,this.register=()=>{var r;Zk("dapp"),Ha&&(Ha.unregister(),Ha=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),Ha=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r;this._registered=!1,this.closeWallet(),Ha===this&&(Ha=void 0),((r=window.ue)==null||(r=r.sequencewallettransport)==null?void 0:r.onmessagefromwallet)===this.onUnrealCallback&&delete window.ue.sequencewallettransport.onmessagefromwallet,this.events.removeAllListeners()},this.openWallet=(r,n,i)=>{if(this.isOpened()){console.log("wallet already open!");return}console.log("opening wallet!");const s=new URL(this.walletURL.href),o=new Tu;r&&(s.pathname=r.toLowerCase()),this._init=Rt.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",kx(n)),i&&o.set("net",`${i}`),s.search=o.toString(),console.log("opening wallet to",s.href),window.open(s.href)},this.onUnrealCallback=r=>{if(!r)throw new Error("ProviderMessage object is empty");this.handleMessage(r)},this.walletURL=new URL(e)}closeWallet(){this.close()}sendMessage(e){var r;const n=typeof e!="string"?JSON.stringify(e):e;console.log("Sending message to wallet:",n),(r=window.ue)==null||(r=r.sequencewallettransport)==null||r.sendmessagetowallet(n)}}class DJ extends Iu{constructor(e){super(e),this.onMessageFromUnreal=r=>{ve.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new Tu(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:Ax(n.get("intent"))}},this._init=Rt.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;Zk("wallet");const{search:n}=new URL(e||window.location.href);let i=this.getUnrealTransportSession(n);if(!!i.sessionId||(i=await this.getCachedTransportSession()),!i){ve.error("unreal session is undefined");return}window.ue.sequencewallettransport.onmessagefromsequencejs=this.onMessageFromUnreal,this._registered=!0,this.open(i).then(o=>{if(!o){var a;const l=`failed to open to network ${(a=i)==null?void 0:a.networkId}`;ve.error(l),this.notifyClose({message:l}),window.close()}}).catch(o=>{var a;const l=`failed to open to network ${(a=i)==null?void 0:a.networkId}, due to: ${o}`;ve.error(l),this.notifyClose({message:l}),window.close()})}unregister(){var e;((e=window.ue)==null||(e=e.sequencewallettransport)==null?void 0:e.onmessagefromsequencejs)===this.onMessageFromUnreal&&delete window.ue.sequencewallettransport.onmessagefromsequencejs,this._registered=!1}sendMessage(e){var r;if(e.type!==Te.INIT&&this._init!==Rt.OK){ve.error("impossible state, should not be calling postMessage until inited");return}const n=JSON.stringify(e);(r=window.ue)==null||(r=r.sequencewallettransport)==null||r.sendmessagetosequencejs(n)}}const eb="sequence-extension-message-handler";class LJ extends Iu{constructor(e,r){super(e),this.runtime=r,this.port=void 0,this._init=Rt.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:eb})}sendMessage(e){ve.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class tA extends Pu{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===eb&&(this._init=Rt.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class BJ extends h1.EventEmitter2{constructor(e){var r;super(),r=this,this.stream=e,this.responseCallbacks=new Map,this._messageIdx=0,this.nextMessageIdx=()=>++this._messageIdx,this.handleMessage=n=>{if(!n.type||!n.data)return;ve.info("[received message]",n);const i=n.idx,s=this.responseCallbacks.get(i);switch(i&&this.responseCallbacks.delete(i),n.type){case Te.MESSAGE:if(s)this.emit(Te.MESSAGE,n),s(n.data.error,n);else throw new Error("impossible state");break;case Te.DISCONNECT:case Te.ACCOUNTS_CHANGED:case Te.CHAIN_CHANGED:this.emit(n.type,n.data);break;default:console.error("unknown message type",n);break}},this.sendMessageRequest=async function(n){return new Promise((i,s)=>{(!n.idx||n.idx<=0)&&s(new Error("message idx not set"));const o=(l,c)=>{if(l)s(l);else if(c)i(c);else throw new Error("no valid response to return")},{idx:a}=n;r.responseCallbacks.get(a)?s(new Error("duplicate message idx, should never happen")):r.responseCallbacks.set(a,o),r.sendMessage(n)})},this.stream.on("data",this.handleMessage)}sendMessage(e){this.stream.writable||console.error("window post message stream is not writable"),this.stream.write(e)}}let Wa;class rA extends Pu{constructor(e){super(),this.walletURL=void 0,this.walletWindow=void 0,this.register=()=>{Wa&&(Wa.unregister(),Wa=this),window.addEventListener("message",this.onWindowEvent),Wa=this,this.on("open",()=>{const r=this.walletWindow,n=setInterval(()=>{r&&r.closed&&(clearInterval(n),this.close())},500)}),this.on("close",()=>{this.walletWindow&&(this.walletWindow.close(),this.walletWindow=null)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),Wa===this&&(Wa=void 0),window.removeEventListener("message",this.onWindowEvent),this.events.removeAllListeners()},this.openWallet=(r,n,i)=>{if(this.walletWindow&&this.isOpened()){this.walletWindow.focus();return}const s=new URL(this.walletURL.href),o=new Tu;r&&r!==""&&(s.pathname=r.toLowerCase()),this._init=Rt.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&(n.type==="connect"&&(n.options||(n.options={app:window.location.origin}),!uh()&&!Kk()&&n.options&&(n.options.origin=window.location.origin)),o.set("intent",kx(n))),i&&o.set("net",`${i}`);let a,l;uh()?(a=[450,750],l=[Math.abs(window.screen.width/2-a[0]/2),Math.abs(window.screen.height/2-a[1]/2)]):(a=[450,750],l=[Math.abs(window.screenX+window.innerWidth/2-a[0]/2),Math.abs(window.screenY+window.innerHeight/2-a[1]/2)]);const c=`toolbar=0,location=0,menubar=0,scrollbars=yes,status=yes,width=${a[0]},height=${a[1]},left=${l[0]},top=${l[1]}`;s.search=o.toString(),this.walletWindow=window.open(s.href,"sequence.app",c)},this.onWindowEvent=r=>{if(r.origin!==this.walletURL.origin)return;let n;try{n=JSON.parse(r.data)}catch{return}if(!n)throw new Error("ProviderMessage object is empty");this.handleMessage(n)},this.walletURL=new URL(e)}closeWallet(){var e;this.close(),(e=this.walletWindow)==null||e.close()}sendMessage(e){if(!this.walletWindow){ve.warn("WindowMessageProvider: sendMessage failed as walletWindow is unavailable");return}const r=typeof e!="string"?JSON.stringify(e):e;this.walletWindow.postMessage(r,this.walletURL.origin)}}class jJ extends Iu{constructor(e){var r;super(e),r=this,this.parentWindow=void 0,this._isPopup=!1,this.onWindowEvent=async function(n){if(!n.origin||n.origin===""||r.appOrigin&&n.origin!==r.appOrigin)return;let i;try{i=JSON.parse(n.data)}catch{return}if(ve.debug("RECEIVED MESSAGE",i),r._init!==Rt.OK&&r.isValidInitAck(i)&&(r.appOrigin=n.origin),r._init===Rt.OK&&(!r.appOrigin||r.appOrigin.length<8)){ve.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(i)},this.getWindowTransportSession=n=>{const i=new Tu(n);return{sessionId:i.get("sid"),networkId:i.get("net"),intent:Ax(i.get("intent"))}},this._init=Rt.NIL}async register(e){const r=parent.window.opener!==null;if(this._isPopup=r,r!==!0)return;const{pathname:n,search:i}=new URL(e||window.location.href);let s=this.getWindowTransportSession(i);if(!!s.sessionId||(s=await this.getCachedTransportSession()),!s){ve.error("window session is undefined");return}this.parentWindow=parent.window.opener,window.addEventListener("message",this.onWindowEvent,!1),this._registered=!0,this.open(s).then(a=>{if(!a){var l;const c=`failed to open to network ${(l=s)==null?void 0:l.networkId}`;ve.error(c),this.notifyClose({message:c}),window.close()}}).catch(a=>{var l;const c=`failed to open to network ${(l=s)==null?void 0:l.networkId}, due to: ${a}`;ve.error(c),this.notifyClose({message:c}),window.close()})}unregister(){window.removeEventListener("message",this.onWindowEvent),this._registered=!1}sendMessage(e){const r=JSON.stringify(e);e.type===Te.INIT?this.postMessage(r,!0):this.postMessage(r)}get isPopup(){return this._isPopup}postMessage(e,r=!1){if(r!==!0&&this._init!==Rt.OK){ve.error("impossible state, should not be calling postMessage until inited");return}r?this.parentWindow.postMessage(e,"*"):this.appOrigin&&this.appOrigin.length>4?this.parentWindow.postMessage(e,this.appOrigin):ve.error("unable to postMessage as parentOrigin is invalid")}}function nA(t){return t&&typeof t=="object"&&(t.windowTransport&&typeof t.windowTransport=="object"||t.proxyTransport&&typeof t.proxyTransport=="object"||t.extensionTransport&&typeof t.extensionTransport=="object"||t.unrealTransport&&typeof t.unrealTransport=="object")&&(t.windowTransport&&t.windowTransport.enabled||t.proxyTransport&&t.proxyTransport.enabled||t.extensionTransport&&t.extensionTransport.enabled||t.unrealTransport&&t.unrealTransport.enabled)}class y1{constructor(...e){var r=this;this.messageProviders=void 0,this.provider=void 0,this.register=()=>{if(this.messageProviders.length===1){this.provider=this.messageProviders[0],this.provider.register();return}this.messageProviders.forEach(n=>{n.register(),n.once("open",()=>{this.provider||(this.provider=n,this.messageProviders.forEach(i=>{this.provider!==i&&i.unregister()}))})})},this.unregister=()=>{this.messageProviders.forEach(n=>n.unregister()),this.provider=void 0},this.openWallet=(n,i,s)=>{if(this.provider){this.provider.openWallet(n,i,s);return}this.messageProviders.forEach(o=>o.openWallet(n,i,s))},this.sendAsync=async function(n,i,s){if(r.provider){r.provider.sendAsync(n,i,s);return}throw new Error("impossible state, wallet must be opened first")},this.sendMessageRequest=async function(n){if(r.provider)return r.provider.sendMessageRequest(n);throw new Error("impossible state, wallet must be opened first")},this.waitUntilOpened=async function(){return r.provider?r.provider.waitUntilOpened():Promise.race(r.messageProviders.map(n=>n.waitUntilOpened()))},this.waitUntilConnected=async function(){if(r.provider)return r.provider.waitUntilConnected();throw new Error("impossible state, wallet must be opened first")},this.messageProviders=e,this.provider=void 0}static new(e){var r,n,i,s;const o=new y1;if((r=e.windowTransport)!=null&&r.enabled&&typeof window=="object"&&e.walletAppURL){const a=new rA(e.walletAppURL);o.add(a)}if((n=e.proxyTransport)!=null&&n.enabled){const a=new Xk(e.proxyTransport.appPort);o.add(a)}if((i=e.extensionTransport)!=null&&i.enabled){const a=new tA(e.extensionTransport.runtime);o.add(a)}if((s=e.unrealTransport)!=null&&s.enabled&&e.windowTransport&&e.walletAppURL){const a=new eA(e.walletAppURL);o.add(a)}return o.register(),o}add(...e){this.messageProviders.push(...e)}closeWallet(){this.provider&&this.provider.closeWallet()}isOpened(){return this.provider?this.provider.isOpened():!1}isConnected(){return this.provider?this.provider.isConnected():!1}on(e,r){if(this.provider){this.provider.on(e,r);return}this.messageProviders.forEach(n=>{n.on(e,r)})}once(e,r){if(this.provider){this.provider.once(e,r);return}this.messageProviders.forEach(n=>{n.once(e,r)})}emit(e,...r){if(this.provider)return this.provider.emit(e,...r);for(let n=0;nzJ(t,i))}function zJ(t,e){if(e.to.toLowerCase()===t.toLowerCase()&&e.data){const r=X(e.data);if(r.length>=4&&!VJ(r))throw new Error("self calls are forbidden")}if(e.delegateCall)throw new Error("delegate calls are forbidden")}function VJ(t){const e=new ir(mr.mainModule.abi);try{return e.decodeFunctionData("createContract",t),!0}catch{return!1}}const HJ=1e4;class WJ{constructor(e,r,n){var i=this;this.account=void 0,this.signerReadyCallbacks=[],this.prompter=void 0,this.networks=void 0,this._openIntent=void 0,this._connectOptions=void 0,this.events=new h1.EventEmitter2,this.onConnectOptionsChange=void 0,this.promptConnect=async function(s){if(!s&&!i._connectOptions)throw new Error("prompter connect options are empty");if(!i.prompter)return i.connect(s);const o=await i.prompter.promptConnect(s||i._connectOptions).catch(l=>({connected:!1})),a=o;return a.connected&&!a.session&&(a.session=await i.walletSession(s==null?void 0:s.networkId)),o},this.sendAsync=async function(s,o,a){const l={jsonrpc:"2.0",id:s.id,result:null};await i.getAccount();try{var c;if((!i.account||i.account===null)&&!qJ.includes(s.method))throw Vk;const u=i.account;if(!u)throw new Error("WalletRequestHandler: wallet account is not configured");const h=(c=i.account)==null?void 0:c.providerFor(a??i.defaultChainId());if(!h)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${a}`);const y=h instanceof $a?h:void 0;switch(s.method){case"net_version":{if(!y)throw new Error("Account provider doesn't support send method");const g=await y.send("net_version",[]);l.result=g;break}case"eth_chainId":{if(!y)throw new Error("Account provider doesn't support send method");const g=await y.send("eth_chainId",[]);l.result=g;break}case"eth_accounts":{const g=u.address;l.result=[g];break}case"eth_getBalance":{const[g,p]=s.params,k=await h.getBalance(g,p);l.result=k.toHexString();break}case"sequence_sign":case"personal_sign":case"eth_sign":{let g;switch(s.method){case"sequence_sign":case"personal_sign":{const[E,A]=s.params;g=E;break}case"eth_sign":{const[E,A]=s.params;g=A;break}}let p="";const k=v1(g),w=s.method==="sequence_sign";if(i.prompter===null?p=await u.signMessage(k,a??i.defaultChainId(),w?"eip6492":"ignore"):p=await i.prompter.promptSignMessage({chainId:a,message:k,eip6492:w},i.connectOptions),p&&p.length>0)l.result=p;else throw new Error("declined by user");break}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[g,p]=s.params;let k;if(typeof p=="string")try{k=JSON.parse(p)}catch(A){console.warn("walletRequestHandler: error parsing typedData",A)}else k=p;if(!k||!k.domain||!k.types||!k.message)throw new Error("invalid typedData object");let w="";const E=s.method==="sequence_signTypedData_v4";if(i.prompter===null?w=await u.signTypedData(k.domain,k.types,k.message,a??i.defaultChainId(),E?"eip6492":"ignore"):w=await i.prompter.promptSignMessage({chainId:a,typedData:k,eip6492:E},i.connectOptions),w&&w.length>0)l.result=w;else throw new Error("declined by user");break}case"eth_sendTransaction":{const g=UJ(s.params[0]).map(k=>("gas"in k&&k.gasLimit===void 0&&(k.gasLimit=k.gas,delete k.gas),k));b5(u.address,g);let p="";if(i.prompter===null){var f;const k=await u.sendTransaction(g,a??i.defaultChainId());p=(f=k==null?void 0:k.hash)!=null?f:""}else p=await i.prompter.promptSendTransaction(g,a,i.connectOptions);if(p)l.result=p;else throw new Error("declined by user");break}case"eth_signTransaction":{const[g]=s.params;if(we(g.from)!==u.address)throw new Error("sender address does not match wallet");b5(u.address,g),i.prompter===null?l.result=await u.signTransactions(g,a??i.defaultChainId()):l.result=await i.prompter.promptSignTransaction(g,a,i.connectOptions);break}case"eth_sendRawTransaction":{if(ce.transaction.isSignedTransactionBundle(s.params[0])){const g=H.from(s.params[0].chainId).toNumber(),p=await u.relayer(g).relay(s.params[0]);l.result=p.hash}else{const g=await h.sendTransaction(s.params[0]);l.result=g.hash}break}case"eth_getTransactionCount":{const g=we(s.params[0]),p=s.params[1],k=await h.getTransactionCount(g,p);l.result=H.from(k).toHexString();break}case"eth_blockNumber":{l.result=await h.getBlockNumber();break}case"eth_getBlockByNumber":{l.result=await h.getBlock(s.params[0]);break}case"eth_getBlockByHash":{l.result=await h.getBlock(s.params[0]);break}case"eth_getTransactionByHash":{l.result=await h.getTransaction(s.params[0]);break}case"eth_call":{const[g,p]=s.params;l.result=await h.call(g,p);break}case"eth_getCode":{const[g,p]=s.params;l.result=await h.getCode(g,p);break}case"eth_estimateGas":{const[g]=s.params;l.result=await h.estimateGas(g);break}case"eth_gasPrice":{const g=await h.getGasPrice();l.result=g.toHexString();break}case"wallet_switchEthereumChain":{const[g]=s.params;if(!g.chainId||g.chainId.length===0)throw new Error("invalid chainId");const p=H.from(g.chainId);i.setDefaultChainId(p.toNumber()),l.result=null;break}case"sequence_getWalletContext":{l.result=u.contexts;break}case"sequence_getWalletConfig":{const[g]=s.params;g?l.result=[(await u.status(g)).onChain.config]:l.result=await Promise.all(u.networks.map(async function(p){return(await u.status(p.chainId)).onChain.config}));break}case"sequence_getWalletState":{const[g]=s.params;g?l.result=[w5(g,await u.status(g))]:l.result=await Promise.all(u.networks.map(async function(p){const k=await u.status(p.chainId);return w5(p.chainId,k)}));break}case"sequence_getNetworks":{l.result=await i.getNetworks(!0);break}case"sequence_isSequence":{l.result=!0;break}case"sequence_updateConfig":throw new Error("sequence_updateConfig method is not allowed from a dapp");case"sequence_publishConfig":throw new Error("sequence_publishConfig method is not allowed from a dapp");case"sequence_gasRefundOptions":break;case"sequence_getNonce":break;case"sequence_relay":break;case"sequence_setDefaultNetwork":{const[g]=s.params;if(!g)throw new Error("invalid request, method argument defaultChainId cannot be empty");i.setDefaultChainId(g),l.result=await i.getNetworks(!0);break}default:{if(!y)throw new Error("Account provider doesn't support send method");const g=await y.send(s.method,s.params);l.result=g}}}catch(u){ve.error(u),l.result=null,l.error=rn({},new Error(u),{code:4001})}o(void 0,l)},this.isSignedIn=async function(){return await i.signerReady(),!!i.account},this.getAccount=async function(){if(await i.signerReady(),i.account===void 0)throw new Error("signerReady failed resolve");return i.account},this.account=e,this.prompter=r,this.networks=n}defaultChainId(){var e,r;return(e=(r=this.prompter)==null?void 0:r.getDefaultChainId())!=null?e:this.networks[0].chainId}async signIn(e,r={}){this.setAccount(e);const{connect:n,defaultNetworkId:i}=r;if(n){const a=this._connectOptions;let l;if(this.prompter!==null){var s;l=await((s=this.prompter)==null?void 0:s.promptSignInConnect(a))}else l=await this.connect(a);this.notifyConnect(l),(!a||a.keepWalletOpened!==!0)&&this.notifyClose()}if(i&&this.defaultChainId()!==i){var o;await((o=this.prompter)==null?void 0:o.promptChangeNetwork(i))}}signOut(){this.account&&this.notifyDisconnect(),this.setAccount(null)}signerReset(){this.account=void 0}signerReady(e=HJ){return new Promise((r,n)=>{this.account!==void 0?r():(setTimeout(()=>{this.account===void 0&&(this.signerReadyCallbacks=[],n("signerReady timed out"))},e),this.signerReadyCallbacks.push(r))})}async connect(e){var r,n;if(!this.account)return{connected:!1,chainId:"0x0",error:"unable to connect without signed in account"};const i=(r=(n=e==null?void 0:e.networkId)!=null?n:this.defaultChainId())!=null?r:ee.MAINNET,s=Ix(i).chainId,o={connected:!0,chainId:ni(s)};if(e&&e.authorize){const a={app:e.app,origin:e.origin,expiry:e.expiry,nonce:e.authorizeNonce};try{o.proof=await ak(this.account,s,a)}catch(l){return ve.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${l.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${l.message}`}}}return o.session=this.walletSession(s),o}sendMessageRequest(e){return new Promise(r=>{this.sendAsync(e.data,(n,i)=>{const s=rn({},e,{data:i});r(s)},e.chainId)})}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}async getAddress(){var e,r;return(e=(r=this.account)==null?void 0:r.address)!=null?e:""}get openIntent(){return this._openIntent}setOpenIntent(e){this._openIntent=e}get connectOptions(){return this._connectOptions}setConnectOptions(e){var r;this._connectOptions=e,(r=this.onConnectOptionsChange)==null||r.call(this,e)}async setDefaultChainId(e){var r;return await((r=this.prompter)==null?void 0:r.promptChangeNetwork(e)),this.defaultChainId()}async getNetworks(e){return this.account?e?this.account.networks.map(r=>{const n=rn({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(ve.warn("signer not set: getNetworks is returning an empty list"),[])}walletSession(e){if(!this.account)return;const r={walletContext:this.account.contexts,accountAddress:this.account.address,networks:this.account.networks.map(i=>rn({},i,{provider:void 0,relayer:void 0}))};if(e){const i=ii(r.networks,e);if(i){var n;(n=r.networks)==null||n.forEach(s=>delete s.isDefaultChain),i.isDefaultChain=!0}}return r}notifyConnect(e,r){var n;if(console.log("emit connect",e),this.events.emit("connect",e),(n=e.session)!=null&&n.accountAddress){var i;this.events.emit("accountsChanged",[(i=e.session)==null?void 0:i.accountAddress],r)}}notifyDisconnect(e){this.events.emit("accountsChanged",[],e),this.events.emit("disconnect",void 0,e)}notifyChainChanged(e,r){this.events.emit("chainChanged",ni(e),r)}async notifyNetworks(e){const r=e||await this.getNetworks(!0);if(this.events.emit("networks",r),r.length>0){const n=r.find(i=>i.chainId===this.defaultChainId());n&&this.events.emit("chainChanged",ni(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){ve.warn("signer not set: skipping to notify wallet context");return}const e=this.account.contexts;this.events.emit("walletContext",e)}notifyClose(e){this.events.emit("close",e)}setAccount(e){if(this.account=e,e!==void 0){for(let r=0;rl.canOnchainValidate||l.original.version===2&&n,o=await r.status(i);if(s(o))return!0;if(await e.promptConfirmWalletDeploy(i,this.connectOptions)){const l=await r.status(i);return s(l)?!0:(ve.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function w5(t,e){return{context:e.original.context,config:e.onChain.config,address:ce.context.addressOf(e.original.context,e.original.imageHash),chainId:t,deployed:e.onChain.deployed,imageHash:e.imageHash,lastImageHash:e.onChain.imageHash,published:!0,status:e}}const qJ=["net_version","eth_chainId","eth_getBalance","eth_getTransactionCount","eth_blockNumber","eth_getBlockByNumber","eth_getBlockByHash","eth_getTransactionByHash","eth_getCode","eth_estimateGas","eth_gasPrice","sequence_getWalletContext","sequence_getNetworks","sequence_setDefaultNetwork"];class mc{get utils(){return this.provider.utils}constructor(e,r){this.client=e,this.provider=r,this.singleNetworkSigners={},this._isSigner=!0,this._isSequenceSigner=!0}async getAddress(){return this.client.getAddress()}connect(e){if(!xc.is(e))throw new Error("SequenceSigner can only be connected to a SequenceProvider");return new mc(this.client,e)}getSigner(e){if(!e)return this;const r=this.provider.toChainId(e);return this.singleNetworkSigners[r]||(this.singleNetworkSigners[r]=new tb(this.client,this.provider,r)),this.singleNetworkSigners[r]}useChainId(e){return this.provider.toChainId(e)||this.client.getChainId()}async signMessage(e,r){const{eip6492:n=!0}=r||{},i=this.useChainId(r==null?void 0:r.chainId);return this.client.signMessage(e,{eip6492:n,chainId:i})}async signTypedData(e,r,n,i){const{eip6492:s=!0}=i||{},o=this.useChainId(i==null?void 0:i.chainId);return this.client.signTypedData({domain:e,types:r,message:n},{eip6492:s,chainId:o})}getProvider(e){return this.provider.getProvider(e)}async sendTransaction(e,r){const n=this.useChainId(r==null?void 0:r.chainId),i=await Qk(e),s=await this.client.sendTransaction(i,{chainId:n}),o=this.getProvider(n);try{return await Zo(async function(){const a=await o.getTransaction(s);return a?o._wrapTransaction(a,s):void 0},{onceBlock:o})}catch(a){throw a.transactionHash=s,a}}async getWalletConfig(e){const r=this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}getNetworks(){return this.client.getNetworks()}async getBalance(e,r){return this.getProvider(r==null?void 0:r.chainId).getBalance(this.getAddress(),e)}async estimateGas(e,r){return this.getProvider(r==null?void 0:r.chainId).estimateGas(e)}async call(e,r,n){return this.getProvider(n==null?void 0:n.chainId).call(e,r)}getChainId(){return Promise.resolve(this.client.getChainId())}async getGasPrice(e){return this.getProvider(e==null?void 0:e.chainId).getGasPrice()}async getFeeData(e){return this.getProvider(e==null?void 0:e.chainId).getFeeData()}async resolveName(e){const r=await this.provider.resolveName(e);if(r===null)throw new Error(`ENS name not found: ${e}`);return r}_checkProvider(e){}populateTransaction(e){throw new Error("SequenceSigner does not support populateTransaction")}checkTransaction(e){throw new Error("SequenceSigner does not support checkTransaction")}getTransactionCount(e){throw new Error("SequenceSigner does not support getTransactionCount")}signTransaction(e){throw new Error("SequenceWallet does not support signTransaction, use sendTransaction instead.")}static is(e){return e&&typeof e=="object"&&e._isSequenceSigner===!0}}class tb extends mc{constructor(e,r,n){super(e,r.getProvider(n)),this.chainId=n,this._isSingleNetworkSequenceSigner=!0}_useChainId(e){const r=this.provider.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This signer only supports the network ${this.chainId}, but ${r} was requested.`);return r||this.provider.toChainId(this.chainId)}useChainId(e){return this._useChainId(e)}getChainId(){return Promise.resolve(this.provider.toChainId(this.chainId))}getProvider(e){return super.getProvider(this._useChainId(e))}getSigner(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceSigner===!0}}class GJ{constructor(e){if(this.signer=e,tb.is(e))throw new Error("WalletUtils does not support SingleNetworkSequenceSigner")}signMessage(e,r,n){return this.signer.signMessage(e,{chainId:r,eip6492:n})}signTypedData(e,r,n,i,s){return this.signer.signTypedData(e,r,n,{chainId:i,eip6492:s})}async isValidSignature(e,r,n,i){return ec(e,r,n,this.signer.getProvider(i))}async isValidMessageSignature(e,r,n,i){const s=this.signer.getProvider(i),o=v1(r),a=_x(o);return ec(e,a,n,s)}isValidTypedDataSignature(e,r,n,i){return this.isValidSignature(e,Eu(r),n,i)}}class xc extends wx{constructor(e,r,n=Ql){super(e.getChainId()),this.client=e,this.providerFor=r,this.networks=n,this.singleNetworkProviders={},this._isSequenceProvider=!0,this.utils=void 0,this.signer=void 0,e.onConnect(i=>{this.emit("connect",i)}),e.onDisconnect(i=>{this.emit("disconnect",i)}),e.onDefaultChainIdChanged(i=>{this.emit("chainChanged",i)}),e.onAccountsChanged(i=>{this.emit("accountsChanged",i)}),this.signer=new mc(this.client,this),this.utils=new GJ(this.signer)}getSigner(e){return this.signer.getSigner(e)}connect(e){return this.client.connect(e)}disconnect(){return this.client.disconnect()}isConnected(){return this.client.isConnected()}getSession(){return this.client.getSession()}listAccounts(){return[this.client.getAddress()]}getAddress(){return this.client.getAddress()}getNetworks(){return this.client.getNetworks()}getChainId(){return this.client.getChainId()}setDefaultChainId(e){return this.client.setDefaultChainId(this.toChainId(e))}isOpened(){return this.client.isOpened()}closeWallet(){return this.client.closeWallet()}getWalletContext(){return this.client.getWalletContext()}async getWalletConfig(e){const r=await this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}authorize(e){return this.client.connect(rn({},e,{authorize:!0}))}async openWallet(e,r){return await this.client.openWallet(e,r),!0}toChainId(e){if(e===void 0)return;const r=ii(this.networks,e);if(!r)throw new Error(`Unsupported network ${e}`);return r.chainId}async useChainId(e){return this.toChainId(e)||this.client.getChainId()}getProvider(e){if(!e)return this;const r=this.toChainId(e);return this.singleNetworkProviders[r]||(this.singleNetworkProviders[r]=new sA(this.client,this.providerFor,r)),this.singleNetworkProviders[r]}async _getSubprovider(e){const r=await this.useChainId(e),n=this.providerFor(r);if(!n)throw new Error(`Unsupported network ${r}`);return n}async perform(e,r){var n;if(e==="eth_chainId")return ni(await this.useChainId());if(e==="eth_accounts")return[this.client.getAddress()];if(e==="wallet_switchEthereumChain"){const o=r[0],a=iA(o);return this.setDefaultChainId(a)}if(e==="eth_sendTransaction"||e==="eth_sign"||e==="eth_signTypedData"||e==="eth_signTypedData_v4"||e==="personal_sign"||e==="sequence_sign"||e==="sequence_signTypedData_v4")return this.client.send({method:e,params:r},this.getChainId());const i=await this._getSubprovider(),s=(n=i.prepareRequest(e,r))!=null?n:[e,r];return i.send(s[0],s[1])}send(e,r){return this.perform(e,r)}request(e){return this.perform(e.method,e.params)}async detectNetwork(){const e=this.client.getChainId(),r=ii(this.networks,e);if(!r)throw new Error(`Unknown network ${e}`);return r}async waitForTransaction(e,r,n,i){return(await this._getSubprovider(i==null?void 0:i.chainId)).waitForTransaction(e,r,n)}async getBlockNumber(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getBlockNumber()}async getGasPrice(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getGasPrice()}async getBalance(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getBalance(e,r)}async getTransactionCount(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getTransactionCount(e,r)}async getCode(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getCode(e,r)}async getStorageAt(e,r,n,i){return(await this._getSubprovider(i==null?void 0:i.chainId)).getStorageAt(e,r,n)}async call(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).call(e,r)}async estimateGas(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).estimateGas(e)}async getBlock(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getBlock(e)}async getTransaction(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getTransaction(e)}async getLogs(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getLogs(e)}async supportsENS(){return(await this.getNetworks()).some(r=>r.chainId===1)}async getResolver(e){return await this.supportsENS()?(await this._getSubprovider(1)).getResolver(e):null}async resolveName(e){return qE(await e)?e:await this.supportsENS()?(await this._getSubprovider(1)).resolveName(e):null}async lookupAddress(e){return await this.supportsENS()?(await this._getSubprovider(1)).lookupAddress(e):null}async getAvatar(e){return await this.supportsENS()?(await this._getSubprovider(1)).getAvatar(e):null}}xc.is=t=>t&&typeof t=="object"&&t._isSequenceProvider===!0;function iA(t){return typeof t=="object"?iA(t.chainId):H.from(t).toNumber()}class sA extends xc{constructor(e,r,n){super(e,r),this.chainId=n,this._isSingleNetworkSequenceProvider=!0}_useChainId(e){const r=this.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This provider only supports the network ${this.chainId}, but ${r} was requested.`);return r||super.toChainId(this.chainId)}useChainId(e){return Promise.resolve(this._useChainId(e))}getChainId(){return super.toChainId(this.chainId)}async getNetwork(){const e=await this.client.getNetworks(),r=ii(e,this.chainId);if(!r)throw new Error(`Unsupported network ${this.chainId}`);return r}getProvider(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}getSigner(e){return super.getSigner(this._useChainId(e))}setDefaultChainId(e){throw new Error(`This provider only supports the network ${this.chainId}; use the parent provider to switch networks.`)}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceProvider===!0}}class KJ extends CJ{}const JJ=(t,e)=>{e||(e="https://nodes.sequence.app");const r=!t,n={};return t&&(n.headers={"X-Access-Key":t}),new KJ(e,n,{noop:r,defaultEnabled:!0,privacy:{userIdHash:!0,userAgentSalt:!1},initProps:()=>Yi()?{origin:window.location.origin}:{}})};var YJ={name:"@0xsequence/provider",version:"1.9.1",description:"provider sub-package for Sequence",repository:"https://github.com/0xsequence/sequence.js/tree/master/packages/provider",source:"src/index.ts",main:"dist/0xsequence-provider.cjs.js",module:"dist/0xsequence-provider.esm.js",author:"Horizon Blockchain Games",license:"Apache-2.0",scripts:{test:"pnpm test:concurrently 'pnpm test:run'","test:run":"pnpm test:file tests/**/*.spec.ts","test:file":"NODE_OPTIONS='--import tsx' mocha --timeout 30000",typecheck:"tsc --noEmit","test:concurrently":"concurrently -k --success first 'pnpm start:hardhat1' 'pnpm start:hardhat2'","start:hardhat1":"pnpm start:hardhat1:verbose > /dev/null 2>&1","start:hardhat2":"pnpm start:hardhat2:verbose > /dev/null 2>&1","start:hardhat1:verbose":"hardhat node --config hardhat1.config.js --hostname 0.0.0.0 --port 9595","start:hardhat2:verbose":"hardhat node --config hardhat2.config.js --hostname 0.0.0.0 --port 8595"},dependencies:{"@0xsequence/abi":"workspace:*","@0xsequence/account":"workspace:*","@0xsequence/auth":"workspace:*","@0xsequence/core":"workspace:*","@0xsequence/migration":"workspace:*","@0xsequence/network":"workspace:*","@0xsequence/relayer":"workspace:*","@0xsequence/utils":"workspace:*","@0xsequence/wallet":"workspace:*","@databeat/tracker":"^0.9.1",eventemitter2:"^6.4.5","webextension-polyfill":"^0.10.0"},peerDependencies:{ethers:">=5.5 < 6"},devDependencies:{"@types/webextension-polyfill":"^0.10.0",ethers:"^5.7.2",hardhat:"^2.12.2"},files:["src","dist"]};class ca{constructor(e){this.store=e}connectedSession(){const e=this.getSession();if(e&&e.accountAddress&&e.walletContext&&e.networks)return{accountAddress:e.accountAddress,walletContext:e.walletContext,networks:e.networks};throw new Error("Sequence session not connected")}hasSession(){var e;return((e=this.getSession())==null?void 0:e.accountAddress)!==void 0}setSession(e){return this.store.setItem(ca.SESSION_LOCALSTORE_KEY,JSON.stringify(e))}getSession(){const e=this.store.getItem(ca.SESSION_LOCALSTORE_KEY);if(e)return JSON.parse(e)}async clearSession(){return this.store.removeItem(ca.SESSION_LOCALSTORE_KEY)}}ca.SESSION_LOCALSTORE_KEY="@sequence.session";class fa{constructor(e,r=1){this.store=e,this.startingChainId=r,this.callbacks=[],e.onItemChange(fa.SESSION_CHAIN_ID_KEY,n=>{if(n){const i=parseInt(n);this.callbacks.forEach(s=>s(i))}})}onDefaultChainIdChanged(e){return this.callbacks.push(e),()=>{this.callbacks=this.callbacks.filter(r=>r!==e)}}setDefaultChainId(e){e!==this.getDefaultChainId()&&this.store.setItem(fa.SESSION_CHAIN_ID_KEY,e.toString())}getDefaultChainId(){const e=this.store.getItem(fa.SESSION_CHAIN_ID_KEY);return!e||e.length===0?this.startingChainId:parseInt(e)}}fa.SESSION_CHAIN_ID_KEY="@sequence.session.defaultChainId";class rb{constructor(e,r,n){var i,s;if(this.session=void 0,this.defaultChainId=void 0,this.callbacks={},this.transport=void 0,this.defaultEIP6492=void 0,this.projectAccessKey=void 0,this.analytics=void 0,nA(e))this.transport=y1.new(e);else if(Uk(e))this.transport=e;else throw new Error("Invalid transport");const o=n==null?void 0:n.defaultChainId;if(this.defaultEIP6492=(i=n==null?void 0:n.defaultEIP6492)!=null?i:!1,this.session=new ca(r),this.defaultChainId=new fa(r,o),this.transport.on("accountsChanged",c=>{var f;c.length>1&&console.warn("SequenceClient: wallet-webapp returned more than one account"),(f=this.callbacks.accountsChanged)==null||f.forEach(u=>u(c))}),this.transport.on("connect",c=>{var f;const u=ni(this.getChainId());(f=this.callbacks.connect)==null||f.forEach(h=>h(rn({},c,{chainId:u})))}),this.transport.on("disconnect",(c,f)=>{var u;(u=this.callbacks.disconnect)==null||u.forEach(h=>h(c,f))}),this.transport.on("networks",c=>{var f;(f=this.callbacks.networks)==null||f.forEach(u=>u(c))}),this.transport.on("walletContext",c=>{var f;(f=this.callbacks.walletContext)==null||f.forEach(u=>u(c))}),this.transport.on("open",c=>{var f;(f=this.callbacks.open)==null||f.forEach(u=>u(c))}),this.transport.on("close",()=>{var c;(c=this.callbacks.close)==null||c.forEach(f=>f())}),this.transport.on("chainChanged",(c,f)=>{var u;(u=this.callbacks.chainChanged)==null||u.forEach(h=>h(c,f))}),this.defaultChainId.onDefaultChainIdChanged(c=>{var f;const u=ni(c);(f=this.callbacks.chainChanged)==null||f.forEach(h=>h(u))}),n!=null&&n.projectAccessKey&&(this.projectAccessKey=n.projectAccessKey),this.projectAccessKey&&n!=null&&n.analytics&&(this.analytics=JJ(this.projectAccessKey)),(s=this.session.getSession())!=null&&s.accountAddress){var a,l;(a=this.analytics)==null||a.identify((l=this.session.getSession())==null||(l=l.accountAddress)==null?void 0:l.toLowerCase())}}registerCallback(e,r){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(r),()=>{this.callbacks[e]=this.callbacks[e].filter(n=>n!==r)}}onOpen(e){return this.registerCallback("open",e)}onClose(e){return this.registerCallback("close",e)}onConnect(e){return this.registerCallback("connect",e)}onDisconnect(e){return this.registerCallback("disconnect",e)}onNetworks(e){return this.registerCallback("networks",e)}onAccountsChanged(e){return this.registerCallback("accountsChanged",e)}onWalletContext(e){return this.registerCallback("walletContext",e)}onChainChanged(e){return this.registerCallback("chainChanged",e)}onDefaultChainIdChanged(e){return this.registerCallback("chainChanged",e)}getChainId(){return this.defaultChainId.getDefaultChainId()}setDefaultChainId(e){return this.defaultChainId.setDefaultChainId(e)}async openWallet(e,r){return this.transport.openWallet(e,r,this.getChainId()),await this.transport.waitUntilOpened(),this.isOpened()}closeWallet(){return this.transport.closeWallet()}isOpened(){return this.transport.isOpened()}isConnected(){return this.session.hasSession()}getSession(){return this.session.getSession()}getAddress(){return this.session.connectedSession().accountAddress}async connect(e){if((e==null?void 0:e.authorizeVersion)===void 0&&(e.authorizeVersion=2),(e==null?void 0:e.refresh)===!0&&this.disconnect(),e.projectAccessKey=this.projectAccessKey,e&&e.authorize){if(!e.app)throw new Error("connecting with 'authorize' option also requires 'app' to be set");e.authorizeVersion===void 0&&(e.authorizeVersion=2)}await this.openWallet(void 0,{type:"connect",options:rn({},e,{networkId:this.getChainId(),clientVersion:YJ.version})});const r=await this.transport.waitUntilConnected().catch(s=>s instanceof Error?{connected:!1,error:s.message}:{connected:!1,error:JSON.stringify(s)});if(r.chainId&&(r.chainId=H.from(r.chainId).toString()),r.connected){var n;if(!r.session)throw new Error("impossible state, connect response is missing session");if(this.session.setSession(r.session),(n=r.session)!=null&&n.accountAddress){var i;(i=this.analytics)==null||i.identify(r.session.accountAddress.toLowerCase())}}return r}disconnect(){var e;return this.isOpened()&&this.closeWallet(),(e=this.analytics)==null||e.reset(),this.session.clearSession()}send(e,r){return e.method=this.mapSignMethod(e.method),new Promise((n,i)=>{this.transport.sendAsync(e,(s,o)=>{s?i(s):o===void 0?i(new Error(`Got undefined response for request: ${e}`)):typeof o=="object"&&o.error?i(o.error):typeof o=="object"&&o.result?n(o.result):i(new Error(`Got invalid response for request: ${e}`))},r||this.getChainId())})}async getNetworks(e){const r=this.session.connectedSession();return e&&(r.networks=await this.send({method:"sequence_getNetworks"}),this.session.setSession(r)),r.networks}signMethod(e){return(e==null?void 0:e.eip6492)===void 0?"personal_sign":e.eip6492?"sequence_sign":"legacy_sign"}signTypedDataMethod(e){return(e==null?void 0:e.eip6492)===void 0?"eth_signTypedData_v4":e.eip6492?"sequence_signTypedData_v4":"legacy_signTypedData_v4"}mapSignMethod(e){return e==="personal_sign"?this.defaultEIP6492?"sequence_sign":"personal_sign":e==="eth_signTypedData_v4"?this.defaultEIP6492?"sequence_signTypedData_v4":"eth_signTypedData_v4":e==="legacy_sign"?"personal_sign":e==="legacy_signTypedData_v4"?"eth_signTypedData_v4":e}async signMessage(e,r){var n;const i=this.signMethod(r);return(n=this.analytics)==null||n.track({event:"SIGN_MESSAGE_REQUEST",props:{chainId:`${(r==null?void 0:r.chainId)||this.getChainId()}`}}),this.send({method:i,params:[e,this.getAddress()]},r==null?void 0:r.chainId)}async signTypedData(e,r){var n;const i=this.signTypedDataMethod(r),s=er.getPayload(e.domain,e.types,e.message);return(n=this.analytics)==null||n.track({event:"SIGN_TYPED_DATA_REQUEST",props:{chainId:`${(r==null?void 0:r.chainId)||this.getChainId()}`}}),this.send({method:i,params:[this.getAddress(),s]},(r==null?void 0:r.chainId)||e.domain.chainId&&H.from(e.domain.chainId).toNumber()||this.getChainId())}async sendTransaction(e,r){var n;const i=Array.isArray(e)?e:[e],s=FJ(i);return(n=this.analytics)==null||n.track({event:"SEND_TRANSACTION_REQUEST",props:{chainId:`${(r==null?void 0:r.chainId)||this.getChainId()}`}}),this.send({method:"eth_sendTransaction",params:[s]},r==null?void 0:r.chainId)}async getWalletContext(){return this.send({method:"sequence_getWalletContext"})}async getOnchainWalletConfig(e){const r=await this.send({method:"sequence_getWalletConfig",params:[(e==null?void 0:e.chainId)||this.getChainId()]},e==null?void 0:e.chainId);return Array.isArray(r)?r[0]:r}}const sg={transports:{walletAppURL:"https://sequence.app",windowTransport:{enabled:!0},proxyTransport:{enabled:!1}},defaultNetwork:1,analytics:!0};let wi;const oA=(t,e)=>{var r,n,i;if(!t||typeof t!="string")throw new Error("Please pass a projectAccessKey in initWallet.");if(wi)return wi;const s=rn({},sg,e,{transports:rn({},sg.transports,e==null?void 0:e.transports)}),o={},a=(r=(n=s.networks)==null?void 0:n.filter(y=>{y.rpcUrl!==void 0&&y.chainId!==void 0&&Ql.find(g=>g.chainId===y.chainId)}))!=null?r:[],l=Ql.map(y=>{var g;const p=(g=s.networks)==null?void 0:g.find(k=>k.chainId===y.chainId);return p?rn({},y,p):y}).concat(a).map(y=>(y.rpcUrl=y.rpcUrl+`/${t}`,y)),c=y=>{if(!o[y]){var g;const p=(g=l.find(E=>E.chainId===y))==null?void 0:g.rpcUrl;if(!p)throw new Error(`no rpcUrl found for chainId: ${y}`);const k=new $a(p),w=new Rx([eS,Z9,new Mx],new Z0(k));o[y]=new PH(w,y)}return o[y]},f=s.defaultNetwork?(i=ii(l,s.defaultNetwork))==null?void 0:i.chainId:void 0;if(!f&&s.defaultNetwork)throw new Error(`defaultNetwork not found for chainId: ${s.defaultNetwork}`);const u=s.localStorage||dh(),h=new rb(s.transports,u,{defaultChainId:f,defaultEIP6492:s.defaultEIP6492,projectAccessKey:t,analytics:s.analytics});return wi=new xc(h,c),wi},aA=()=>{wi&&(wi.client.closeWallet(),wi.client.transport.unregister(),wi=void 0)},lA=()=>{if(!wi)throw new Error("Wallet has not been initialized, call sequence.initWallet(config) first.");return wi},QJ=Object.freeze(Object.defineProperty({__proto__:null,BaseInjectedTransport:BJ,BaseProviderTransport:Pu,BaseWalletTransport:Iu,CHANNEL_ID:eb,DefaultChainIdTracker:fa,DefaultProviderConfig:sg,ErrSignedInRequired:Vk,EventType:Te,ExtensionMessageHandler:LJ,ExtensionMessageProvider:tA,InitState:Rt,LocalStorage:au,MemoryItemStore:Yk,MuxMessageProvider:y1,OpenState:kn,PROVIDER_OPEN_TIMEOUT:Zx,ProviderError:zk,ProxyMessageChannel:NJ,ProxyMessageChannelPort:ig,ProxyMessageHandler:$J,ProxyMessageProvider:Xk,SequenceClient:rb,SequenceClientSession:ca,SequenceProvider:xc,SequenceSigner:mc,SingleNetworkSequenceProvider:sA,SingleNetworkSequenceSigner:tb,UnrealMessageHandler:DJ,UnrealMessageProvider:eA,WalletRequestHandler:WJ,WindowMessageHandler:jJ,WindowMessageProvider:rA,WindowSessionParams:Tu,getWallet:lA,initWallet:oA,isBrowserExtension:uh,isMuxTransportTemplate:nA,isProviderTransport:Uk,isUnityPlugin:Kk,isValidMessageSignature:qk,isValidSignature:ec,isValidTypedDataSignature:Gk,isWalletUpToDate:Jk,messageToBytes:Wk,nextMessageIdx:Hk,prefixEIP191Message:v1,resolveArrayProperties:Qk,trimEIP191Prefix:OJ,unregisterWallet:aA,useBestStore:dh},Symbol.toStringTag,{value:"Module"}));function Br(t,e){return e.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(n){if(n!=="default"&&!(n in t)){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(t)}var XJ=Br({__proto__:null},[nW]),ZJ=Br({__proto__:null},[fW]),eY=Br({__proto__:null},[AK]),tY=Br({__proto__:null},[RK]),rY=Br({__proto__:null},[NG]),nY=Br({__proto__:null},[VG]),iY=Br({__proto__:null},[FK]),sY=Br({__proto__:null},[sq]),oY=Br({__proto__:null},[QJ]),aY=Br({__proto__:null},[yG]);const lY=ce.transaction;var cY=Object.freeze({__proto__:null,transactions:lY}),fY=Br({__proto__:null,isValidSignature:ec,isValidMessageSignature:qk,isValidTypedDataSignature:Gk,isWalletUpToDate:Jk},[HW]),uY=Br({__proto__:null},[Kq]),dY=Br({__proto__:null},[pG]),hY=Br({__proto__:null},[EK]),vY=Br({__proto__:null},[eG]),yY=Br({__proto__:null},[EG]),Je=Object.freeze({__proto__:null,abi:XJ,api:ZJ,auth:eY,guard:tY,indexer:rY,metadata:nY,multicall:iY,network:sY,provider:oY,relayer:aY,transactions:cY,utils:fY,core:uY,signhub:dY,sessions:hY,migration:vY,account:yY,initWallet:oA,getWallet:lA,unregisterWallet:aA,SequenceProvider:xc,SequenceClient:rb,SequenceSigner:mc});const C5=[{constant:!1,inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}];var pY="_1e9z9271";const gY=({message:t,loading:e})=>{const r=()=>t?` -...`:"...";return se.jsx(fN,{label:"Console",defaultOpen:!0,children:se.jsxs(ue,{as:"pre",style:{fontFamily:"monospace",whiteSpace:"break-spaces",overflowWrap:"anywhere"},children:[t,e&&r(),se.jsx(ue,{className:pY,display:"inline-block",fontSize:"large",lineHeight:"4",style:{top:"-4px",position:"relative"},children:"_"})]})})};var mY="_1q07ov40";const Uo=t=>{const{label:e,children:r,style:n,className:i}=t;return se.jsxs(ue,{marginTop:"10",marginBottom:"8",marginX:"0",width:"full",className:i,style:n,children:[e&&se.jsx(ue,{marginBottom:"2",children:se.jsx(xY,{children:e})}),se.jsx(ue,{className:mY,children:lr.Children.map(r,(s,o)=>se.jsx(ue,{children:s},o))})]})},xY=t=>se.jsx(Wt,{variant:"normal",fontWeight:"medium",color:"text50",children:t.children}),bY=()=>{const t=window.localStorage.getItem("defaultChainId");return t==null?null:Number(t)},wY="/demo-dapp/assets/logo-BCgqmGQR.svg",E5="/demo-dapp/assets/skyweaver-banner-AE_YELV0.png",CY="/demo-dapp/assets/skyweaver-banner-large-7dnVV5Hh.png",S5="AQAAAAAAAAbvrgpWEC2Aefg5qYStQmwjBpA";$9({logLevel:"DEBUG"});const cA=[{name:"production",walletUrl:"https://sequence.app"},{name:"development",walletUrl:"https://dev.sequence.app"},{name:"local",walletUrl:"http://localhost:3333"}],EY="https://api.sequence.app",k5=bY()||ee.MAINNET,yl=new URLSearchParams(window.location.search),fA=yl.get("env")??"production",SY=cA.find(t=>t.name===fA),pl=yl.get("walletAppURL")??SY.walletUrl;pl&&pl.length>0?Je.initWallet(S5,{defaultNetwork:k5,transports:{walletAppURL:pl}}):Je.initWallet(S5,{defaultNetwork:k5,transports:{walletAppURL:pl}});const kY=()=>{const[t,e]=S.useState(null),[r,n]=S.useState(null),[i,s]=S.useState(!1),[o,a]=S.useState(!1),l=Je.getWallet().getProvider(),[c,f]=S.useState(l.getChainId()),[u,h]=S.useState(!1),[y,g]=S.useState(!1);S.useMemo(()=>{l.on("chainChanged",j=>{f(H.from(j).toNumber())})},[]),S.useEffect(()=>{a(l.isConnected())},[l]),S.useEffect(()=>{T()},[o]),S.useEffect(()=>{l.client.onOpen(()=>{console.log("wallet window opened")}),l.client.onClose(()=>{console.log("wallet window closed")})},[l]);const p={app:"Demo Dapp",askForEmail:!0},k=async(j={app:"Demo dapp"})=>{if(o){d(),m("Wallet already connected!"),s(!1);return}j={...p,...j,settings:{...p.settings,...j.settings}};try{d(),m("Connecting");const V=Je.getWallet(),W=await V.connect(j);if(j.authorize&&W.connected){let oe=yl.get("apiUrl");(!oe||oe.length===0)&&(oe=EY);const re=new Je.api.SequenceAPIClient(oe),{isValid:ae}=await re.isValidETHAuthProof({chainId:W.chainId,walletAddress:W.session.accountAddress,ethAuthProofString:W.proof.proofString});m(`isValid (API)?: ${ae}`)}if(j.authorize){const oe=new Q0;if(W.proof){const re=await oe.decodeProof(W.proof.proofString,!0),ae=await V.utils.isValidTypedDataSignature(V.getAddress(),W.proof.typedData,re.signature,H.from(W.chainId).toNumber());m(`connected using chainId: ${H.from(W.chainId).toString()}`),m(`isValid (client)?: ${ae}`)}}s(!1),W.connected?(m("Wallet connected!"),m(`shared email: ${W.email}`),a(!0)):m("Failed to connect wallet - "+W.error)}catch(V){console.error(V),N()}},w=()=>{Je.getWallet().disconnect(),T(),a(!1)},E=()=>{Je.getWallet().openWallet()},A=()=>{const j=Je.getWallet(),W={type:"openWithOptions",options:{app:"Demo Dapp",settings:{theme:"light",includedPaymentProviders:["moonpay","ramp"],defaultFundingCurrency:"eth",defaultPurchaseAmount:400,lockFundingCurrencyToDefault:!1}}};j.openWallet("wallet/add-funds",W)},I=()=>{Je.getWallet().closeWallet()},M=async()=>{d();const j=Je.getWallet();m(`isConnected?: ${j.isConnected()}`),s(!1)},B=async()=>{d();const j=Je.getWallet();m(`isOpened?: ${j.isOpened()}`),s(!1)},z=async()=>{try{d();const j=l.getChainId();m(`top chainId: ${j}`);const W=l.getProvider().getChainId();m(`provider.getChainId(): ${W}`);const re=await l.getSigner().getChainId();m(`signer.getChainId(): ${re}`),s(!1)}catch(j){console.error(j),N()}},F=async()=>{try{d();const j=Je.getWallet(),V=j.getAddress();m(`getAddress(): ${V}`);const oe=j.getProvider().listAccounts();m(`accounts: ${JSON.stringify(oe)}`),s(!1)}catch(j){console.error(j),N()}},K=async()=>{try{d();const j=Je.getWallet(),V=j.getProvider(),W=j.getAddress(),oe=await V.getBalance(W);m(`balance check 1: ${oe.toString()}`);const ae=await j.getSigner().getBalance();m(`balance check 2: ${ae.toString()}`),s(!1)}catch(j){console.error(j),N()}},J=async()=>{try{d();const V=await Je.getWallet().getNetworks();m(`networks: ${JSON.stringify(V,null,2)}`),s(!1)}catch(j){console.error(j),N()}},Z=async()=>{try{d();const j=Je.getWallet();m("signing message...");const V=j.getSigner(),W=`1915 Robert Frost + */(function(t,e){(function(r){var n=Object.hasOwnProperty,i=Array.isArray?Array.isArray:function(T){return Object.prototype.toString.call(T)==="[object Array]"},s=10,o=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",l=typeof Reflect=="object",c=typeof setImmediate=="function",f=c?setImmediate:setTimeout,u=a?l&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(x){var T=Object.getOwnPropertyNames(x);return T.push.apply(T,Object.getOwnPropertySymbols(x)),T}:Object.keys;function h(){this._events={},this._conf&&y.call(this,this._conf)}function y(x){x&&(this._conf=x,x.delimiter&&(this.delimiter=x.delimiter),x.maxListeners!==r&&(this._maxListeners=x.maxListeners),x.wildcard&&(this.wildcard=x.wildcard),x.newListener&&(this._newListener=x.newListener),x.removeListener&&(this._removeListener=x.removeListener),x.verboseMemoryLeak&&(this.verboseMemoryLeak=x.verboseMemoryLeak),x.ignoreErrors&&(this.ignoreErrors=x.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function g(x,T){var R="(node) warning: possible EventEmitter memory leak detected. "+x+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(R+=" Event name: "+T+"."),typeof process<"u"&&process.emitWarning){var b=new Error(R);b.name="MaxListenersExceededWarning",b.emitter=this,b.count=x,process.emitWarning(b)}else console.error(R),console.trace&&console.trace()}var p=function(x,T,R){var b=arguments.length;switch(b){case 0:return[];case 1:return[x];case 2:return[x,T];case 3:return[x,T,R];default:for(var d=new Array(b);b--;)d[b]=arguments[b];return d}};function k(x,T){for(var R={},b,d=x.length,_=T?T.length:0,$=0;$0;)x=_[N],$.call(m,x,R[x]);this._listeners={},this._listenersCount=0,B()}}});function E(x,T,R,b){var d=Object.assign({},T);if(!x)return d;if(typeof x!="object")throw TypeError("options must be an object");var _=Object.keys(x),$=_.length,m,N,B;function U(ee){throw Error('Invalid "'+m+'" option value'+(ee?". Reason: "+ee:""))}for(var W=0;W<$;W++){if(m=_[W],!b&&!n.call(T,m))throw Error('Unknown "'+m+'" option');N=x[m],N!==r&&(B=R[m],d[m]=B?B(N,U):N)}return d}function A(x,T){return(typeof x!="function"||!x.hasOwnProperty("prototype"))&&T("value must be a constructor"),x}function I(x){var T="value must be type of "+x.join("|"),R=x.length,b=x[0],d=x[1];return R===1?function(_,$){if(typeof _===b)return _;$(T)}:R===2?function(_,$){var m=typeof _;if(m===b||m===d)return _;$(T)}:function(_,$){for(var m=typeof _,N=R;N-- >0;)if(m===x[N])return _;$(T)}}var M=I(["function"]),j=I(["object","function"]);function z(x,T,R){var b,d,_=0,$,m=new x(function(N,B,U){R=E(R,{timeout:0,overload:!1},{timeout:function(L,ne){return L*=1,(typeof L!="number"||L<0||!Number.isFinite(L))&&ne("timeout must be a positive number"),L}}),b=!R.overload&&typeof x.prototype.cancel=="function"&&typeof U=="function";function W(){d&&(d=null),_&&(clearTimeout(_),_=0)}var ee=function(L){W(),N(L)},K=function(L){W(),B(L)};b?T(ee,K,U):(d=[function(L){K(L||Error("canceled"))}],T(ee,K,function(L){if($)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof L!="function")throw TypeError("onCancel callback must be a function");d.push(L)}),$=!0),R.timeout>0&&(_=setTimeout(function(){var L=Error("timeout");L.code="ETIMEDOUT",_=0,m.cancel(L),B(L)},R.timeout))});return b||(m.cancel=function(N){if(d){for(var B=d.length,U=1;U0;)K=me[m],K!=="_listeners"&&(He=q(x,T,R[K],b+1,d),He&&(ee?ee.push.apply(ee,He):ee=He));return ee}else if(pe==="**"){for(ie=b+1===d||b+2===d&&ve==="*",ie&&R._listeners&&(ee=q(x,T,R,d,d)),me=u(R),m=me.length;m-- >0;)K=me[m],K!=="_listeners"&&(K==="*"||K==="**"?(R[K]._listeners&&!ie&&(He=q(x,T,R[K],d,d),He&&(ee?ee.push.apply(ee,He):ee=He)),He=q(x,T,R[K],b,d)):K===ve?He=q(x,T,R[K],b+2,d):He=q(x,T,R[K],b,d),He&&(ee?ee.push.apply(ee,He):ee=He));return ee}else R[pe]&&(ee=q(x,T,R[pe],b+1,d));if(L=R["*"],L&&q(x,T,L,b+1,d),ne=R["**"],ne)if(b0;)K=me[m],K!=="_listeners"&&(K===ve?q(x,T,ne[K],b+2,d):K===pe?q(x,T,ne[K],b+1,d):(Y={},Y[K]=ne[K],q(x,T,{"**":Y},b+1,d)));else ne._listeners?q(x,T,ne,d,d):ne["*"]&&ne["*"]._listeners&&q(x,T,ne["*"],d,d);return ee}function G(x,T,R){var b=0,d=0,_,$=this.delimiter,m=$.length,N;if(typeof x=="string")if((_=x.indexOf($))!==-1){N=new Array(5);do N[b++]=x.slice(d,_),d=_+m;while((_=x.indexOf($,d))!==-1);N[b++]=x.slice(d)}else N=[x],b=1;else N=x,b=x.length;if(b>1){for(_=0;_+10&&B._listeners.length>this._maxListeners&&(B._listeners.warned=!0,g.call(this,B._listeners.length,U))):B._listeners=T,!0;return!0}function Z(x,T,R,b){for(var d=u(x),_=d.length,$,m,N,B=x._listeners,U;_-- >0;)m=d[_],$=x[m],m==="_listeners"?N=R:N=R?R.concat(m):[m],U=b||typeof m=="symbol",B&&T.push(U?N:N.join(this.delimiter)),typeof $=="object"&&Z.call(this,$,T,N,U);return T}function oe(x){for(var T=u(x),R=T.length,b,d,_;R-- >0;)d=T[R],b=x[d],b&&(_=!0,d!=="_listeners"&&!oe(b)&&delete x[d]);return _}function D(x,T,R){this.emitter=x,this.event=T,this.listener=R}D.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function v(x,T,R){if(R===!0)d=!0;else if(R===!1)b=!0;else{if(!R||typeof R!="object")throw TypeError("options should be an object or true");var b=R.async,d=R.promisify,_=R.nextTick,$=R.objectify}if(b||_||d){var m=T,N=T._origin||T;if(_&&!o)throw Error("process.nextTick is not supported");d===r&&(d=T.constructor.name==="AsyncFunction"),T=function(){var B=arguments,U=this,W=this.event;return d?_?Promise.resolve():new Promise(function(ee){f(ee)}).then(function(){return U.event=W,m.apply(U,B)}):(_?process.nextTick:f)(function(){U.event=W,m.apply(U,B)})},T._async=!0,T._origin=N}return[T,$?new D(this,x,T):this]}function C(x){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,y.call(this,x)}C.EventEmitter2=C,C.prototype.listenTo=function(x,T,R){if(typeof x!="object")throw TypeError("target musts be an object");var b=this;R=E(R,{on:r,off:r,reducers:r},{on:M,off:M,reducers:j});function d(_){if(typeof _!="object")throw TypeError("events must be an object");var $=R.reducers,m=F.call(b,x),N;m===-1?N=new w(b,x,R):N=b._observers[m];for(var B=u(_),U=B.length,W,ee=typeof $=="function",K=0;K0;)d=R[b],(!x||d._target===x)&&(d.unsubscribe(T),_=!0);return _},C.prototype.delimiter=".",C.prototype.setMaxListeners=function(x){x!==r&&(this._maxListeners=x,this._conf||(this._conf={}),this._conf.maxListeners=x)},C.prototype.getMaxListeners=function(){return this._maxListeners},C.prototype.event="",C.prototype.once=function(x,T,R){return this._once(x,T,!1,R)},C.prototype.prependOnceListener=function(x,T,R){return this._once(x,T,!0,R)},C.prototype._once=function(x,T,R,b){return this._many(x,1,T,R,b)},C.prototype.many=function(x,T,R,b){return this._many(x,T,R,!1,b)},C.prototype.prependMany=function(x,T,R,b){return this._many(x,T,R,!0,b)},C.prototype._many=function(x,T,R,b,d){var _=this;if(typeof R!="function")throw new Error("many only accepts instances of Function");function $(){return--T===0&&_.off(x,$),R.apply(this,arguments)}return $._origin=R,this._on(x,$,b,d)},C.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||h.call(this);var x=arguments[0],T,R=this.wildcard,b,d,_,$,m;if(x==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(R&&(T=x,x!=="newListener"&&x!=="removeListener"&&typeof x=="object")){if(d=x.length,a){for(_=0;_3)for(b=new Array(N-1),$=1;$3)for(d=new Array(B-1),m=1;m0&&this._events[x].length>this._maxListeners&&(this._events[x].warned=!0,g.call(this,this._events[x].length,x))):this._events[x]=T,d)},C.prototype.off=function(x,T){if(typeof T!="function")throw new Error("removeListener only takes instances of Function");var R,b=[];if(this.wildcard){var d=typeof x=="string"?x.split(this.delimiter):x.slice();if(b=q.call(this,null,d,this.listenerTree,0),!b)return this}else{if(!this._events[x])return this;R=this._events[x],b.push({_listeners:R})}for(var _=0;_0){for(b=this._all,T=0,R=b.length;T0;)b=T[R[_]],typeof b=="function"?d.push(b):d.push.apply(d,b);return d}else{if(this.wildcard){if($=this.listenerTree,!$)return[];var m=[],N=typeof x=="string"?x.split(this.delimiter):x.slice();return q.call(this,m,N,$,0),m}return T?(b=T[x],b?typeof b=="function"?[b]:b:[]):[]}},C.prototype.eventNames=function(x){var T=this._events;return this.wildcard?Z.call(this,this.listenerTree,[],null,x):T?u(T):[]},C.prototype.listenerCount=function(x){return this.listeners(x).length},C.prototype.hasListeners=function(x){if(this.wildcard){var T=[],R=typeof x=="string"?x.split(this.delimiter):x.slice();return q.call(this,T,R,this.listenerTree,0),T.length>0}var b=this._events,d=this._all;return!!(d&&d.length||b&&(x===r?u(b).length:b[x]))},C.prototype.listenersAny=function(){return this._all?this._all:[]},C.prototype.waitFor=function(x,T){var R=this,b=typeof T;return b==="number"?T={timeout:T}:b==="function"&&(T={filter:T}),T=E(T,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:M,Promise:A}),z(T.Promise,function(d,_,$){function m(){var N=T.filter;if(!(N&&!N.apply(R,arguments)))if(R.off(x,m),T.handleError){var B=arguments[0];B?_(B):d(p.apply(null,arguments).slice(1))}else d(p.apply(null,arguments))}$(function(){R.off(x,m)}),R._on(x,m,!1)},{timeout:T.timeout,overload:T.overload})};function P(x,T,R){R=E(R,{Promise,timeout:0,overload:!1},{Promise:A});var b=R.Promise;return z(b,function(d,_,$){var m;if(typeof x.addEventListener=="function"){m=function(){d(p.apply(null,arguments))},$(function(){x.removeEventListener(T,m)}),x.addEventListener(T,m,{once:!0});return}var N=function(){B&&x.removeListener("error",B),d(p.apply(null,arguments))},B;T!=="error"&&(B=function(U){x.removeListener(T,N),_(U)},x.once("error",B)),$(function(){B&&x.removeListener("error",B),x.removeListener(T,N)}),x.once(T,N)},{timeout:R.timeout,overload:R.overload})}var O=C.prototype;Object.defineProperties(C,{defaultMaxListeners:{get:function(){return O._maxListeners},set:function(x){if(typeof x!="number"||x<0||Number.isNaN(x))throw TypeError("n must be a non-negative number");O._maxListeners=x},enumerable:!0},once:{value:P,writable:!0,configurable:!0}}),Object.defineProperties(O,{_maxListeners:{value:s,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof r=="function"&&r.amd?r(function(){return C}):t.exports=C})()})(gk);var h1=gk.exports;function UK(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function zK(t,...e){if(!UK(t))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function v5(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 VK(t,e){zK(t);const r=e.outputLen;if(t.lengthnew DataView(t.buffer,t.byteOffset,t.byteLength),ci=(t,e)=>t<<32-e|t>>>e,HK=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!HK)throw new Error("Non little-endian hardware is not supported");const WK=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function qK(t){if(!mk(t))throw new Error("Uint8Array expected");let e="";for(let r=0;rt().update(xk(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function YK(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),l=n?4:0,c=n?0:4;t.setUint32(e+l,o,n),t.setUint32(e+c,a,n)}class QK extends KK{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Kv(this.buffer)}update(e){v5(this);const{view:r,buffer:n,blockLen:i}=this;e=xk(e);const s=e.length;for(let o=0;oi-o&&(this.process(n,0),o=0);for(let u=o;uf.length)throw new Error("_sha2: outputLen bigger than state");for(let u=0;ut&e^~t&r,ZK=(t,e,r)=>t&e^t&r^e&r,eJ=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]),As=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),_s=new Uint32Array(64);class tJ extends QK{constructor(){super(64,32,8,!1),this.A=As[0]|0,this.B=As[1]|0,this.C=As[2]|0,this.D=As[3]|0,this.E=As[4]|0,this.F=As[5]|0,this.G=As[6]|0,this.H=As[7]|0}get(){const{A:e,B:r,C:n,D:i,E:s,F:o,G:a,H:l}=this;return[e,r,n,i,s,o,a,l]}set(e,r,n,i,s,o,a,l){this.A=e|0,this.B=r|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=l|0}process(e,r){for(let u=0;u<16;u++,r+=4)_s[u]=e.getUint32(r,!1);for(let u=16;u<64;u++){const h=_s[u-15],y=_s[u-2],g=ci(h,7)^ci(h,18)^h>>>3,p=ci(y,17)^ci(y,19)^y>>>10;_s[u]=p+_s[u-7]+g+_s[u-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:l,G:c,H:f}=this;for(let u=0;u<64;u++){const h=ci(a,6)^ci(a,11)^ci(a,25),y=f+h+XK(a,l,c)+eJ[u]+_s[u]|0,p=(ci(n,2)^ci(n,13)^ci(n,22))+ZK(n,i,s)|0;f=c,c=l,l=a,a=o+y|0,o=s,s=i,i=n,n=y+p|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,l=l+this.F|0,c=c+this.G|0,f=f+this.H|0,this.set(n,i,s,o,a,l,c,f)}roundClean(){_s.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const rJ=JK(()=>new tJ);var nJ=class{constructor(t,e){Ne(this,"hostname");Ne(this,"fetch");Ne(this,"path","/rpc/Databeat/");Ne(this,"ping",(t,e)=>this.fetch(this.url("Ping"),Lc({},t,e)).then(r=>jc(r).then(n=>({status:n.status})),r=>{throw Qa.new({cause:`fetch(): ${r.message||""}`})}));Ne(this,"version",(t,e)=>this.fetch(this.url("Version"),Lc({},t,e)).then(r=>jc(r).then(n=>({version:n.version})),r=>{throw Qa.new({cause:`fetch(): ${r.message||""}`})}));Ne(this,"runtimeStatus",(t,e)=>this.fetch(this.url("RuntimeStatus"),Lc({},t,e)).then(r=>jc(r).then(n=>({status:n.status})),r=>{throw Qa.new({cause:`fetch(): ${r.message||""}`})}));Ne(this,"tick",(t,e,r)=>this.fetch(this.url("Tick"),Lc(t,e,r)).then(n=>jc(n).then(i=>({ok:i.ok})),n=>{throw Qa.new({cause:`fetch(): ${n.message||""}`})}));Ne(this,"rawEvents",(t,e,r)=>this.fetch(this.url("RawEvents"),Lc(t,e,r)).then(n=>jc(n).then(i=>({ok:i.ok})),n=>{throw Qa.new({cause:`fetch(): ${n.message||""}`})}));this.hostname=t,this.fetch=(r,n)=>e(r,n)}url(t){return this.hostname+this.path+t}},Lc=(t={},e={},r=null)=>({method:"POST",headers:{...e,"Content-Type":"application/json"},body:JSON.stringify(t||{}),signal:r}),jc=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let i="";throw n instanceof Error&&(i=n.message),Ak.new({status:t.status,cause:`JSON.parse(): ${i}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(bJ[n]||dr).new(r)}return r}),dr=class bk extends Error{constructor(r,n,i,s,o){super(i);Ne(this,"name");Ne(this,"code");Ne(this,"message");Ne(this,"status");Ne(this,"cause");Ne(this,"msg");this.name=r||"WebrpcError",this.code=typeof n=="number"?n:0,this.message=i||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof s=="number"?s:0,this.cause=o,Object.setPrototypeOf(this,bk.prototype)}static new(r){return new this(r.error,r.code,r.message||r.msg,r.status,r.cause)}},iJ=class wk extends dr{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,wk.prototype)}},Qa=class Ck extends dr{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Ck.prototype)}},sJ=class Ek extends dr{constructor(e="WebrpcBadRoute",r=-2,n="bad route",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Ek.prototype)}},oJ=class Sk extends dr{constructor(e="WebrpcBadMethod",r=-3,n="bad method",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Sk.prototype)}},aJ=class kk extends dr{constructor(e="WebrpcBadRequest",r=-4,n="bad request",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,kk.prototype)}},Ak=class _k extends dr{constructor(e="WebrpcBadResponse",r=-5,n="bad response",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,_k.prototype)}},lJ=class Tk extends dr{constructor(e="WebrpcServerPanic",r=-6,n="server panic",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Tk.prototype)}},cJ=class Pk extends dr{constructor(e="WebrpcInternalError",r=-7,n="internal error",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Pk.prototype)}},fJ=class Ik extends dr{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Ik.prototype)}},uJ=class Rk extends dr{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Rk.prototype)}},dJ=class Mk extends dr{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Mk.prototype)}},hJ=class Ok extends dr{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Ok.prototype)}},vJ=class Nk extends dr{constructor(e="PermissionDenied",r=2e3,n="Permission denied",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Nk.prototype)}},yJ=class $k extends dr{constructor(e="SessionExpired",r=2001,n="Session expired",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,$k.prototype)}},pJ=class Dk extends dr{constructor(e="NotFound",r=3e3,n="Resource not found",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Dk.prototype)}},gJ=class Bk extends dr{constructor(e="InvalidAppKey",r=4e3,n="Invalid app key",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Bk.prototype)}},mJ=class Lk extends dr{constructor(e="QueryFailed",r=4001,n="DB query failed",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Lk.prototype)}},xJ=class jk extends dr{constructor(e="InvalidProjectId",r=4002,n="Invalid project id",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,jk.prototype)}},bJ={0:iJ,[-1]:Qa,[-2]:sJ,[-3]:oJ,[-4]:aJ,[-5]:Ak,[-6]:lJ,[-7]:cJ,[-8]:fJ,[-9]:uJ,[-10]:dJ,1e3:hJ,2e3:vJ,2001:yJ,3e3:pJ,4e3:gJ,4001:mJ,4002:xJ},wJ=class extends nJ{constructor(e,r){const n=typeof global=="object"?global.fetch.bind(global):window.fetch.bind(window);super(e.endsWith("/")?e.slice(0,-1):e,n);Ne(this,"_globalFetch");Ne(this,"_fetch",(e,r)=>{var n;if(this.auth){let i={};((n=this.auth.jwt)==null?void 0:n.length)>0&&(i.Authorization=`BEARER ${this.auth.jwt}`),this.auth.headers&&(i={...i,...this.auth.headers}),r.headers={...r.headers,...i}}return this._globalFetch(e,r)});this.auth=r,this._globalFetch=n,this.fetch=this._fetch}},y5=150,Fo={defaultEnabled:!0,noop:!1,privacy:{userIdHash:!0,userAgentSalt:!1},userIdentTracking:!1,strictMode:!1,flushInterval:500,initProps:()=>({})},CJ=class{constructor(t,e,r){Ne(this,"rpc");Ne(this,"auth");Ne(this,"options");Ne(this,"enabled");Ne(this,"ident");Ne(this,"userId");Ne(this,"sessionId");Ne(this,"allowUserTracking");Ne(this,"projectId");Ne(this,"queue");Ne(this,"flushTimeout");Ne(this,"defaultProps");Ne(this,"previousPageKey");Ne(this,"ts");Ne(this,"flush",async()=>{if(this.flushTimeout!==null&&(clearTimeout(this.flushTimeout),this.flushTimeout=null),!this.enabled||this.options.noop||this.options.strictMode&&!this.allowUserTracking||this.queue.length===0)return;const t=this.dedupedQueue();this.queue=[];try{await this.rpc.tick({events:t})}catch(e){console.warn(`databeat flush failed: ${e}`)}});Ne(this,"dedupedQueue",()=>{const t=new Map;for(let e=0;ey5&&(this.queue=this.queue.splice(this.queue.length-y5)),this.enabled&&(e&&e.flush?await this.flush():this.flushTimeout===null&&(this.flushTimeout=setTimeout(()=>{this.flush()},this.options.flushInterval)))}trackView(t={}){const e={...this.defaultProps,...t},r=g5(),n=`${r}:${JSON.stringify(e)}:${this.userId}:${this.sessionId}`;this.previousPageKey!==n&&(this.previousPageKey=n,this.track({event:"VIEW",source:r,props:e}))}isEnabled(){return this.enabled}isAnon(){return this.ident===0}getIdent(){return this.ident}getUserId(){return this.userId}getSessionId(){return this.sessionId}getStorageTS(){if(this.ts)return this.ts;const t=ng();if(!(t==null||t.id===null))return this.ts=t.ts,this.ts}enable(){if(!Fk(this.auth)){this.enabled=!1;return}Yi()&&(this.enabled=!0,this.ts=Va({on:this.enabled,id:this.userId,it:this.ident,ut:this.allowUserTracking}),this.identify())}disable(){Yi()&&(this.enabled=!1,this.ts=Va({on:this.enabled,id:this.userId,it:this.ident,ut:this.allowUserTracking}))}},Yi=()=>typeof window=="object"&&typeof window.localStorage=="object"&&typeof window.localStorage.getItem=="function"&&typeof window.localStorage.setItem=="function",p5=(t,e)=>{if(!Fk(e))return!1;if(!Yi())return!0;const r=ng();return r===null?t??!0:r.on},Fk=t=>{var e;return!!(((e=t==null?void 0:t.jwt)==null?void 0:e.length)>0||t!=null&&t.headers&&Object.keys(t.headers).length>0)},g5=()=>{try{return window.location.pathname}catch{return""}},EJ=()=>{if(!Yi())return{};const t=new URL(window.location.href).searchParams,e={};return e.origin=window.location.origin,t.get("ref")&&t.get("ref")!==""&&(e.ref=t.get("ref")||""),t.get("source")&&t.get("source")!==""&&(e.source=t.get("source")||""),t.get("utm_source")&&t.get("utm_source")!==""&&(e.utmSource=t.get("utm_source")||""),t.get("utm_campaign")&&t.get("utm_campaign")!==""&&(e.utmCampaign=t.get("utm_campaign")||""),t.get("utm_medium")&&t.get("utm_medium")!==""&&(e.utmMedium=t.get("utm_medium")||""),t.get("utm_content")&&t.get("utm_content")!==""&&(e.utmContent=t.get("utm_content")||""),t.get("utm_term")&&t.get("utm_term")!==""&&(e.utmTerm=t.get("utm_term")||""),document.referrer&&document.referrer!==""&&(e.referrer=document.referrer),t.get("gclid")&&t.get("gclid")!==""&&(e.gclid=t.get("gclid")||""),e},fh="_dbeat",ng=()=>{try{return JSON.parse(window.localStorage.getItem(fh))}catch{return null}},Va=t=>{try{return t.ts||(t.ts=Math.floor(Date.now()/1e3)),window.localStorage.setItem(fh,JSON.stringify(t)),t.ts}catch{return}},SJ=(t,e,r)=>{if(!t||t===null||t==="")return{userId:`${Math.floor(Math.random()*1e14)}`,ident:0};if(r.userIdentTracking&&e)return{userId:t,ident:2};if(r.privacy.userIdHash===!0||!r.userIdentTracking||!e)return Yi()&&r.privacy.userAgentSalt===!0&&(t=t+":"+navigator.userAgent),r.privacy.extraSalt&&r.privacy.extraSalt.length>0&&(t=t+":"+r.privacy.extraSalt),{userId:qK(rJ(t)).substring(0,50),ident:1};throw new Error("invalid configuration")},kJ=()=>{if(Yi()&&typeof window.sessionStorage=="object"&&typeof window.sessionStorage.getItem=="function"&&typeof window.sessionStorage.setItem=="function"){const e=window.sessionStorage.getItem(fh);if(e&&e.length>0)return e;{const r=m5(16);return window.sessionStorage.setItem(fh,r),r}}else return m5(16)},m5=t=>{let e="";for(let r=0;r++AJ;class Pu{constructor(){var e=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.state=void 0,this.confirmationOnly=!1,this.events=new h1.EventEmitter2,this.openPayload=void 0,this.connectPayload=void 0,this.accountsChangedPayload=void 0,this.networksPayload=void 0,this.walletContextPayload=void 0,this._sessionId=void 0,this._init=void 0,this._registered=void 0,this.sendAsync=async function(r,n,i){e.state===kn.CLOSED&&(e.confirmationOnly=!0),e.openWallet(void 0,{type:"jsonRpcRequest",method:r.method},i);try{e.isOpened()||await e.waitUntilOpened();const s=await e.sendMessageRequest({idx:Hk(),type:Pe.MESSAGE,data:r,chainId:i});n(void 0,s.data)}catch(s){n(s)}},this.sendMessageRequest=async function(r){return new Promise((n,i)=>{(!r.idx||r.idx<=0)&&r.type!=="init"&&i(new Error("message idx not set"));const s=(a,l)=>{if(a)i(a);else if(l)n(l);else throw new Error("no valid response to return")},o=r.idx;e.responseCallbacks.get(o)?i(new Error("duplicate message idx, should never happen")):e.responseCallbacks.set(o,s),e.isOpened()?e.sendMessage(r):(ye.debug("pushing to pending requests",r),e.pendingMessageRequests.push(r))})},this.waitUntilOpened=async function(r=Zx){let n=!1;return Promise.race([new Promise((i,s)=>{const o=setTimeout(()=>{clearTimeout(o),n||(e.state=kn.CLOSED,e.events.emit("close",{code:1005,message:"opening wallet timed out"})),s(new Error("opening wallet timed out"))},r)}),new Promise(i=>{if(e.isOpened()){var s;n=!0,i((s=e.openPayload)==null?void 0:s.session);return}e.events.once("open",o=>{e.openPayload=o,n=!0,i(o.session)})})])},this.waitUntilConnected=async function(){await e.waitUntilOpened();const r=new Promise(i=>{if(e.connectPayload){i(e.connectPayload);return}e.events.once("connect",s=>{e.connectPayload=s,i(s)})}),n=new Promise((i,s)=>{e.events.once("close",o=>{s(o?new Error(`wallet closed due to ${JSON.stringify(o)}`):new Error("user closed the wallet"))})});return Promise.race([r,n])},this.state=kn.CLOSED,this._registered=!1,this._init=Mt.NIL}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}openWallet(e,r,n){throw new Error("abstract method")}closeWallet(){throw new Error("abstract method")}isOpened(){return this.registered&&this.state===kn.OPENED}isConnected(){var e;const r=(e=this.openPayload)==null?void 0:e.session;return this.registered&&r!==void 0&&!!r.accountAddress&&r.accountAddress.length===42&&!!r.networks&&r.networks.length>0}handleMessage(e){var r=this;if(e.type===Pe.INIT){ye.debug("MessageProvider, received INIT message",e);const{nonce:l}=e.data;if(!l||l.length==0){ye.error("invalid init nonce");return}this._init=Mt.OK,this.sendMessage({idx:-1,type:Pe.INIT,data:{sessionId:this._sessionId,nonce:l}})}if(this._init!==Mt.OK)return;ye.debug("RECEIVED MESSAGE FROM WALLET",e.idx,e);const n=e.idx,i=this.responseCallbacks.get(n);if(n&&this.responseCallbacks.delete(n),e.type===Pe.OPEN&&!this.isOpened()){var s,o;if(this._sessionId&&this._sessionId!==((s=e.data)==null?void 0:s.sessionId)){ye.debug("open event received from wallet, but does not match sessionId",this._sessionId);return}if((o=e.data)!=null&&o.error){var a;const l=new Error(`opening wallet failed: received ${(a=e.data)==null?void 0:a.error}`);throw ye.error(l),this.close(),l}this.state=kn.OPENED,this.openPayload=e.data,this.events.emit("open",this.openPayload),this.pendingMessageRequests.length!==0&&this.pendingMessageRequests.splice(0,this.pendingMessageRequests.length).forEach(async function(c){r.sendMessage(c)});return}if(e.type===Pe.MESSAGE){if(this.confirmationOnly&&setTimeout(()=>{this.responseCallbacks.size===0&&this.closeWallet()},500),!i)throw new Error("impossible state");if(i){this.events.emit("message",e),i(e.data.error,e);return}}if(e.type===Pe.ACCOUNTS_CHANGED){this.accountsChangedPayload={accounts:[]},e.data&&e.data.length>0?(this.accountsChangedPayload={accounts:[Se(e.data[0])],origin:e.origin},this.events.emit("accountsChanged",this.accountsChangedPayload.accounts,this.accountsChangedPayload.origin)):this.events.emit("accountsChanged",[],e.origin);return}if(e.type===Pe.CHAIN_CHANGED){this.events.emit("chainChanged",e.data,e.origin);return}if(e.type===Pe.NETWORKS){this.networksPayload=e.data,this.events.emit("networks",this.networksPayload);return}if(e.type===Pe.WALLET_CONTEXT){this.walletContextPayload=e.data,this.events.emit("walletContext",this.walletContextPayload);return}e.type===Pe.CLOSE&&this.state!==kn.CLOSED&&this.close(e.data),e.type===Pe.CONNECT&&(this.connectPayload=e.data,this.events.emit("connect",this.connectPayload)),e.type===Pe.DISCONNECT&&this.isConnected()&&(this.events.emit("disconnect",e.data,e.origin),this.close())}sendMessage(e){throw new Error("abstract method")}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}emit(e,...r){return this.events.emit(e,...r)}close(e){this.state!==kn.CLOSED&&(this.state=kn.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,ye.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(rn({},new Error("wallet closed"),{code:4001}))}),this.responseCallbacks.clear(),this.connectPayload=void 0,this.openPayload=void 0,this.accountsChangedPayload=void 0,this.networksPayload=void 0,this.walletContextPayload=void 0,this.events.emit("close",e))}}function _J(t){return TJ.some(e=>e.predicate(t))}const TJ=[{name:"Decentraland Exception",predicate:IJ},{name:"0x v3 Exception",predicate:RJ}],PJ=/^Decentraland Login\nEphemeral address: 0x[a-fA-F0-9]{40}\nExpiration: (\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)((-(\d{2}):(\d{2})|Z)?)$/;function IJ(t){try{const e=vs(t);return PJ.test(e)}catch{return!1}}function RJ(t){const e=new ir(MJ);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const MJ=[{inputs:[{components:[{internalType:"address",name:"makerAddress",type:"address"},{internalType:"address",name:"takerAddress",type:"address"},{internalType:"address",name:"feeRecipientAddress",type:"address"},{internalType:"address",name:"senderAddress",type:"address"},{internalType:"uint256",name:"makerAssetAmount",type:"uint256"},{internalType:"uint256",name:"takerAssetAmount",type:"uint256"},{internalType:"uint256",name:"makerFee",type:"uint256"},{internalType:"uint256",name:"takerFee",type:"uint256"},{internalType:"uint256",name:"expirationTimeSeconds",type:"uint256"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes",name:"makerAssetData",type:"bytes"},{internalType:"bytes",name:"takerAssetData",type:"bytes"},{internalType:"bytes",name:"makerFeeAssetData",type:"bytes"},{internalType:"bytes",name:"takerFeeAssetData",type:"bytes"}],internalType:"struct IEIP1271Data.Order",name:"order",type:"tuple"},{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderWithHash",outputs:[],stateMutability:"pure",type:"function"}],Gd=Ue(`Ethereum Signed Message: +`),Wk=t=>ds(t)||Ie(t)?X(t):Ue(t),v1=t=>{const e=Wk(t);return _J(e)?e:Ke([Gd,Ue(String(e.length)),e])},OJ=t=>{if(JSON.stringify(t.slice(0,Gd.length))!==JSON.stringify(Gd))return t;const e=t.slice(Gd.length),r=String(e.length).length;let n,i;try{i=Number(vs(e.slice(0,r)))}catch{i=Number(Q(e.slice(0,r)))}return i>e.length||!Number.isInteger(i)?n=r-1:n=r,e.slice(n)},ec=async(t,e,r,n)=>new ce.reader.OnChainReader(n).isValidSignature(t,e,r),qk=async(t,e,r,n)=>{const i=v1(e),s=_x(i);return ec(t,s,r,n)},Gk=(t,e,r,n)=>ec(t,Eu(e),r,n),uh=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",Kk=()=>!!navigator.userAgent.match(/UnitySequence/i),Jk=t=>t.onChain.deployed&&t.fullyMigrated;class Yk{constructor(){this.callbacks=[],this.store={}}getItem(e){return this.store[e]||null}setItem(e,r){this.store[e]=r,this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){delete this.store[e]}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}class au{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(this.callbacks=[],!au.isAvailable())throw new Error("LocalStorage is not available");window.addEventListener("storage",e=>{const{key:r}=e;this.callbacks.filter(i=>i.key===r).forEach(i=>i.cb(this.getItem(r)))})}getItem(e){return window.localStorage.getItem(e)}setItem(e,r){window.localStorage.setItem(e,r),this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){window.localStorage.removeItem(e),this.callbacks.filter(r=>r.key===e).forEach(r=>r.cb(null))}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}function dh(){return au.isAvailable()?new au:new Yk}async function Qk(t){return Array.isArray(t)?Promise.all(t.map(e=>Ye(e))):Ye(t)}const x5="@sequence.transportSession";class Iu{constructor(e){var r=this;this.walletRequestHandler=void 0,this._sessionId=void 0,this._registered=void 0,this._init=void 0,this._initNonce=void 0,this._initCallback=void 0,this.appOrigin=void 0,this.sendAsync=async function(n,i,s){throw new Error("abstract method")},this.handleMessage=async function(n){const i=n;if(r._init!==Mt.OK){if(i.type===Pe.INIT)if(r.isValidInitAck(n))r._initCallback&&r._initCallback();else{r._initCallback&&r._initCallback("invalid init");return}return}switch(i.type){case Pe.OPEN:{if(r._init!==Mt.OK)return;const s={sessionId:i.data.sessionId,intent:i.data.intent,networkId:i.data.networkId};await r.open(s);return}case Pe.CLOSE:return r._init!==Mt.OK,void 0;case Pe.MESSAGE:{const s=await r.walletRequestHandler.sendMessageRequest(i);r.sendMessage(s),s.data.error;return}default:ye.error(`unexpected payload type ${i.type}`)}},this.sendMessageRequest=async function(n){return r.walletRequestHandler.sendMessageRequest(n)},this.open=async function({sessionId:n,intent:i,networkId:s}){n&&(r._sessionId=D9(n),r.saveTransportSession({sessionId:n,intent:i,networkId:s})),r.walletRequestHandler.setOpenIntent(i),await r.init();let o;try{if(s){const a=Ix(s);if(a)o=a.chainId;else throw new Error(`unknown network ${s}`)}else o=r.walletRequestHandler.defaultChainId()}catch(a){console.error(a)}if(i&&i.type==="connect"&&i.options){const a=i.options,l=a;if(r.appOrigin&&l!=null&&l.origin){if(!uh()&&l.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&l!=null&&l.origin?a.origin=L9(l.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=B9(a.app)),a.networkId?s=a.networkId:s&&(a.networkId=s),r.walletRequestHandler.setConnectOptions(a)}else r.walletRequestHandler.setConnectOptions(void 0);if(await r.walletRequestHandler.getAccount(),await r.walletRequestHandler.isSignedIn())if(i&&i.type==="connect"){(!o||o<=0)&&console.log("Failed to set default network on open"),r.notifyOpen({sessionId:r._sessionId});try{const a=await r.walletRequestHandler.promptConnect(i.options);a.connected&&r.walletRequestHandler.notifyConnect(a)}catch(a){ye.warn("promptConnect not connected:",a)}finally{(!i.options||i.options.keepWalletOpened!==!0)&&r.notifyClose()}}else{if(!o||o<=0)return r.notifyOpen({sessionId:r._sessionId,error:`failed to open wallet on network ${s}`}),!1;r.notifyOpen({sessionId:r._sessionId,chainId:`${o}`,session:await r.walletRequestHandler.walletSession(o)})}else return r.notifyOpen({sessionId:r._sessionId}),!0;return!0},this.saveTransportSession=n=>{dh().setItem(x5,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=dh().getItem(x5);try{return n?JSON.parse(n):null}catch{return console.error(`unable to parse transport session: ${n}`),null}},this.walletRequestHandler=e,this._init=Mt.NIL,this.walletRequestHandler.on("connect",n=>{this.registered&&this.notifyConnect(n)}),this.walletRequestHandler.on("disconnect",(n,i)=>{this.registered&&this.notifyDisconnect(n,i)}),this.walletRequestHandler.on("accountsChanged",(n,i)=>{this.registered&&this.notifyAccountsChanged(n,i)}),this.walletRequestHandler.on("networks",n=>{this.registered&&(this.notifyNetworks(n),!n||n.length===0?this.notifyChainChanged("0x0"):this.notifyChainChanged(ni(n.find(i=>i.isDefaultChain).chainId)))}),this.walletRequestHandler.on("chainChanged",(n,i)=>{this.notifyChainChanged(n,i)}),this.walletRequestHandler.on("walletContext",n=>{!this.registered||!n||this.notifyWalletContext(n)}),this.walletRequestHandler.on("close",n=>{this.registered&&this.notifyClose(n)})}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}sendMessage(e){throw new Error("abstract method")}notifyOpen(e){const{chainId:r,sessionId:n,session:i,error:s}=e;this.sendMessage({idx:-1,type:Pe.OPEN,data:{chainId:r,sessionId:n,session:i,error:s}})}notifyClose(e){this.sendMessage({idx:-1,type:Pe.CLOSE,data:e?{error:e}:null})}notifyConnect(e){this.sendMessage({idx:-1,type:Pe.CONNECT,data:e})}notifyDisconnect(e,r){this.sendMessage({idx:-1,type:Pe.DISCONNECT,data:e?{error:e}:null,origin:r})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:Pe.ACCOUNTS_CHANGED,data:e,origin:r})}notifyChainChanged(e,r){this.sendMessage({idx:-1,type:Pe.CHAIN_CHANGED,data:e,origin:r})}notifyNetworks(e){this.sendMessage({idx:-1,type:Pe.NETWORKS,data:e})}notifyWalletContext(e){this.sendMessage({idx:-1,type:Pe.WALLET_CONTEXT,data:e})}isValidInitAck(e){if(this._init===Mt.OK)return ye.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==Pe.INIT)return ye.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(ye.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(ye.error("invalid init ack match"),!1):!0}init(){return new Promise((e,r)=>{if(this._init===Mt.OK){e();return}if(this._init!==Mt.NIL||this._initCallback){r("transport init is in progress");return}const n=setTimeout(()=>{ye.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},Zx/2);this._initCallback=i=>{this._initCallback=void 0,clearTimeout(n),i?r(i):(this._init=Mt.OK,e())},this._initNonce=`${performance.now()}`,this.sendMessage({idx:-1,type:Pe.INIT,data:{nonce:this._initNonce}}),this._init=Mt.SENT_NONCE})}}class NJ{constructor(){this.app=void 0,this.wallet=void 0;const e=new ig,r=new ig;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class ig{constructor(){this.conn=void 0,this.events=new h1.EventEmitter2,this.handleMessage=e=>{throw new Error("ProxyMessageChannelPort is not registered")},this.sendMessage=e=>{this.conn.handleMessage(e),e.type==="open"&&this.events.emit("open",e),e.type==="close"&&this.events.emit("close",e),e.type==="connect"&&this.events.emit("connect",e),e.type==="disconnect"&&this.events.emit("disconnect",e)}}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}}class Xk extends Pu{constructor(e){if(super(),this.port=void 0,this.register=()=>{this.port.handleMessage=r=>{this.handleMessage(r)},this.on("open",(...r)=>{this.port.events.emit("open",...r)}),this.on("close",(...r)=>{this.port.events.emit("close",...r)}),this.on("connect",(...r)=>{this.port.events.emit("connect",...r)}),this.on("disconnect",(...r)=>{this.port.events.emit("disconnect",...r)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),this.events.removeAllListeners(),this.port.handleMessage=void 0},this.openWallet=(r,n,i)=>{if(this.state===kn.CLOSED){this.state=kn.OPENING;const s=`${performance.now()}`;this._sessionId=s,this.sendMessage({idx:-1,type:Pe.OPEN,data:{path:r,intent:n,networkId:i,sessionId:s}})}},this.state=kn.CLOSED,this.port=e,!e)throw new Error("port argument cannot be empty");this._init=Mt.OK}closeWallet(){this.sendMessage({idx:-1,type:Pe.CLOSE,data:null}),this.close()}sendMessage(e){if(!e.idx)throw new Error("message idx is empty");this.port.sendMessage(e)}}class $J extends Iu{constructor(e,r){super(e),this.port=void 0,this.port=r,this._init=Mt.OK}register(){this.port.handleMessage=e=>{this.handleMessage(e)},this._registered=!0}async restoreSession(){const e=await this.getCachedTransportSession();e&&this.open(e)}unregister(){this.port.handleMessage=void 0,this._registered=!1}sendMessage(e){this.port.sendMessage(e)}}function Zk(t){var e;if((e=window.ue)!=null&&e.sequencewallettransport&&!window.logsOverriddenForUnreal){var r;const n=(r=window.ue)==null?void 0:r.sequencewallettransport;console.log=(...i)=>{n.logfromjs(`${t}: ${Jv(i)}`)},console.warn=(...i)=>{n.warnfromjs(`${t}: ${Jv(i)}`)},console.error=(...i)=>{n.errorfromjs(`${t}: ${Jv(i)}`)},window.logsOverriddenForUnreal=!0}}function Jv(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let Ha;class eA extends Pu{constructor(e){super(),this.walletURL=void 0,this.register=()=>{var r;Zk("dapp"),Ha&&(Ha.unregister(),Ha=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),Ha=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r;this._registered=!1,this.closeWallet(),Ha===this&&(Ha=void 0),((r=window.ue)==null||(r=r.sequencewallettransport)==null?void 0:r.onmessagefromwallet)===this.onUnrealCallback&&delete window.ue.sequencewallettransport.onmessagefromwallet,this.events.removeAllListeners()},this.openWallet=(r,n,i)=>{if(this.isOpened()){console.log("wallet already open!");return}console.log("opening wallet!");const s=new URL(this.walletURL.href),o=new Tu;r&&(s.pathname=r.toLowerCase()),this._init=Mt.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",kx(n)),i&&o.set("net",`${i}`),s.search=o.toString(),console.log("opening wallet to",s.href),window.open(s.href)},this.onUnrealCallback=r=>{if(!r)throw new Error("ProviderMessage object is empty");this.handleMessage(r)},this.walletURL=new URL(e)}closeWallet(){this.close()}sendMessage(e){var r;const n=typeof e!="string"?JSON.stringify(e):e;console.log("Sending message to wallet:",n),(r=window.ue)==null||(r=r.sequencewallettransport)==null||r.sendmessagetowallet(n)}}class DJ extends Iu{constructor(e){super(e),this.onMessageFromUnreal=r=>{ye.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new Tu(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:Ax(n.get("intent"))}},this._init=Mt.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;Zk("wallet");const{search:n}=new URL(e||window.location.href);let i=this.getUnrealTransportSession(n);if(!!i.sessionId||(i=await this.getCachedTransportSession()),!i){ye.error("unreal session is undefined");return}window.ue.sequencewallettransport.onmessagefromsequencejs=this.onMessageFromUnreal,this._registered=!0,this.open(i).then(o=>{if(!o){var a;const l=`failed to open to network ${(a=i)==null?void 0:a.networkId}`;ye.error(l),this.notifyClose({message:l}),window.close()}}).catch(o=>{var a;const l=`failed to open to network ${(a=i)==null?void 0:a.networkId}, due to: ${o}`;ye.error(l),this.notifyClose({message:l}),window.close()})}unregister(){var e;((e=window.ue)==null||(e=e.sequencewallettransport)==null?void 0:e.onmessagefromsequencejs)===this.onMessageFromUnreal&&delete window.ue.sequencewallettransport.onmessagefromsequencejs,this._registered=!1}sendMessage(e){var r;if(e.type!==Pe.INIT&&this._init!==Mt.OK){ye.error("impossible state, should not be calling postMessage until inited");return}const n=JSON.stringify(e);(r=window.ue)==null||(r=r.sequencewallettransport)==null||r.sendmessagetosequencejs(n)}}const eb="sequence-extension-message-handler";class BJ extends Iu{constructor(e,r){super(e),this.runtime=r,this.port=void 0,this._init=Mt.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:eb})}sendMessage(e){ye.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class tA extends Pu{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===eb&&(this._init=Mt.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class LJ extends h1.EventEmitter2{constructor(e){var r;super(),r=this,this.stream=e,this.responseCallbacks=new Map,this._messageIdx=0,this.nextMessageIdx=()=>++this._messageIdx,this.handleMessage=n=>{if(!n.type||!n.data)return;ye.info("[received message]",n);const i=n.idx,s=this.responseCallbacks.get(i);switch(i&&this.responseCallbacks.delete(i),n.type){case Pe.MESSAGE:if(s)this.emit(Pe.MESSAGE,n),s(n.data.error,n);else throw new Error("impossible state");break;case Pe.DISCONNECT:case Pe.ACCOUNTS_CHANGED:case Pe.CHAIN_CHANGED:this.emit(n.type,n.data);break;default:console.error("unknown message type",n);break}},this.sendMessageRequest=async function(n){return new Promise((i,s)=>{(!n.idx||n.idx<=0)&&s(new Error("message idx not set"));const o=(l,c)=>{if(l)s(l);else if(c)i(c);else throw new Error("no valid response to return")},{idx:a}=n;r.responseCallbacks.get(a)?s(new Error("duplicate message idx, should never happen")):r.responseCallbacks.set(a,o),r.sendMessage(n)})},this.stream.on("data",this.handleMessage)}sendMessage(e){this.stream.writable||console.error("window post message stream is not writable"),this.stream.write(e)}}let Wa;class rA extends Pu{constructor(e){super(),this.walletURL=void 0,this.walletWindow=void 0,this.register=()=>{Wa&&(Wa.unregister(),Wa=this),window.addEventListener("message",this.onWindowEvent),Wa=this,this.on("open",()=>{const r=this.walletWindow,n=setInterval(()=>{r&&r.closed&&(clearInterval(n),this.close())},500)}),this.on("close",()=>{this.walletWindow&&(this.walletWindow.close(),this.walletWindow=null)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),Wa===this&&(Wa=void 0),window.removeEventListener("message",this.onWindowEvent),this.events.removeAllListeners()},this.openWallet=(r,n,i)=>{if(this.walletWindow&&this.isOpened()){this.walletWindow.focus();return}const s=new URL(this.walletURL.href),o=new Tu;r&&r!==""&&(s.pathname=r.toLowerCase()),this._init=Mt.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&(n.type==="connect"&&(n.options||(n.options={app:window.location.origin}),!uh()&&!Kk()&&n.options&&(n.options.origin=window.location.origin)),o.set("intent",kx(n))),i&&o.set("net",`${i}`);let a,l;uh()?(a=[450,750],l=[Math.abs(window.screen.width/2-a[0]/2),Math.abs(window.screen.height/2-a[1]/2)]):(a=[450,750],l=[Math.abs(window.screenX+window.innerWidth/2-a[0]/2),Math.abs(window.screenY+window.innerHeight/2-a[1]/2)]);const c=`toolbar=0,location=0,menubar=0,scrollbars=yes,status=yes,width=${a[0]},height=${a[1]},left=${l[0]},top=${l[1]}`;s.search=o.toString(),this.walletWindow=window.open(s.href,"sequence.app",c)},this.onWindowEvent=r=>{if(r.origin!==this.walletURL.origin)return;let n;try{n=JSON.parse(r.data)}catch{return}if(!n)throw new Error("ProviderMessage object is empty");this.handleMessage(n)},this.walletURL=new URL(e)}closeWallet(){var e;this.close(),(e=this.walletWindow)==null||e.close()}sendMessage(e){if(!this.walletWindow){ye.warn("WindowMessageProvider: sendMessage failed as walletWindow is unavailable");return}const r=typeof e!="string"?JSON.stringify(e):e;this.walletWindow.postMessage(r,this.walletURL.origin)}}class jJ extends Iu{constructor(e){var r;super(e),r=this,this.parentWindow=void 0,this._isPopup=!1,this.onWindowEvent=async function(n){if(!n.origin||n.origin===""||r.appOrigin&&n.origin!==r.appOrigin)return;let i;try{i=JSON.parse(n.data)}catch{return}if(ye.debug("RECEIVED MESSAGE",i),r._init!==Mt.OK&&r.isValidInitAck(i)&&(r.appOrigin=n.origin),r._init===Mt.OK&&(!r.appOrigin||r.appOrigin.length<8)){ye.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(i)},this.getWindowTransportSession=n=>{const i=new Tu(n);return{sessionId:i.get("sid"),networkId:i.get("net"),intent:Ax(i.get("intent"))}},this._init=Mt.NIL}async register(e){const r=parent.window.opener!==null;if(this._isPopup=r,r!==!0)return;const{pathname:n,search:i}=new URL(e||window.location.href);let s=this.getWindowTransportSession(i);if(!!s.sessionId||(s=await this.getCachedTransportSession()),!s){ye.error("window session is undefined");return}this.parentWindow=parent.window.opener,window.addEventListener("message",this.onWindowEvent,!1),this._registered=!0,this.open(s).then(a=>{if(!a){var l;const c=`failed to open to network ${(l=s)==null?void 0:l.networkId}`;ye.error(c),this.notifyClose({message:c}),window.close()}}).catch(a=>{var l;const c=`failed to open to network ${(l=s)==null?void 0:l.networkId}, due to: ${a}`;ye.error(c),this.notifyClose({message:c}),window.close()})}unregister(){window.removeEventListener("message",this.onWindowEvent),this._registered=!1}sendMessage(e){const r=JSON.stringify(e);e.type===Pe.INIT?this.postMessage(r,!0):this.postMessage(r)}get isPopup(){return this._isPopup}postMessage(e,r=!1){if(r!==!0&&this._init!==Mt.OK){ye.error("impossible state, should not be calling postMessage until inited");return}r?this.parentWindow.postMessage(e,"*"):this.appOrigin&&this.appOrigin.length>4?this.parentWindow.postMessage(e,this.appOrigin):ye.error("unable to postMessage as parentOrigin is invalid")}}function nA(t){return t&&typeof t=="object"&&(t.windowTransport&&typeof t.windowTransport=="object"||t.proxyTransport&&typeof t.proxyTransport=="object"||t.extensionTransport&&typeof t.extensionTransport=="object"||t.unrealTransport&&typeof t.unrealTransport=="object")&&(t.windowTransport&&t.windowTransport.enabled||t.proxyTransport&&t.proxyTransport.enabled||t.extensionTransport&&t.extensionTransport.enabled||t.unrealTransport&&t.unrealTransport.enabled)}class y1{constructor(...e){var r=this;this.messageProviders=void 0,this.provider=void 0,this.register=()=>{if(this.messageProviders.length===1){this.provider=this.messageProviders[0],this.provider.register();return}this.messageProviders.forEach(n=>{n.register(),n.once("open",()=>{this.provider||(this.provider=n,this.messageProviders.forEach(i=>{this.provider!==i&&i.unregister()}))})})},this.unregister=()=>{this.messageProviders.forEach(n=>n.unregister()),this.provider=void 0},this.openWallet=(n,i,s)=>{if(this.provider){this.provider.openWallet(n,i,s);return}this.messageProviders.forEach(o=>o.openWallet(n,i,s))},this.sendAsync=async function(n,i,s){if(r.provider){r.provider.sendAsync(n,i,s);return}throw new Error("impossible state, wallet must be opened first")},this.sendMessageRequest=async function(n){if(r.provider)return r.provider.sendMessageRequest(n);throw new Error("impossible state, wallet must be opened first")},this.waitUntilOpened=async function(){return r.provider?r.provider.waitUntilOpened():Promise.race(r.messageProviders.map(n=>n.waitUntilOpened()))},this.waitUntilConnected=async function(){if(r.provider)return r.provider.waitUntilConnected();throw new Error("impossible state, wallet must be opened first")},this.messageProviders=e,this.provider=void 0}static new(e){var r,n,i,s;const o=new y1;if((r=e.windowTransport)!=null&&r.enabled&&typeof window=="object"&&e.walletAppURL){const a=new rA(e.walletAppURL);o.add(a)}if((n=e.proxyTransport)!=null&&n.enabled){const a=new Xk(e.proxyTransport.appPort);o.add(a)}if((i=e.extensionTransport)!=null&&i.enabled){const a=new tA(e.extensionTransport.runtime);o.add(a)}if((s=e.unrealTransport)!=null&&s.enabled&&e.windowTransport&&e.walletAppURL){const a=new eA(e.walletAppURL);o.add(a)}return o.register(),o}add(...e){this.messageProviders.push(...e)}closeWallet(){this.provider&&this.provider.closeWallet()}isOpened(){return this.provider?this.provider.isOpened():!1}isConnected(){return this.provider?this.provider.isConnected():!1}on(e,r){if(this.provider){this.provider.on(e,r);return}this.messageProviders.forEach(n=>{n.on(e,r)})}once(e,r){if(this.provider){this.provider.once(e,r);return}this.messageProviders.forEach(n=>{n.once(e,r)})}emit(e,...r){if(this.provider)return this.provider.emit(e,...r);for(let n=0;nzJ(t,i))}function zJ(t,e){if(e.to.toLowerCase()===t.toLowerCase()&&e.data){const r=X(e.data);if(r.length>=4&&!VJ(r))throw new Error("self calls are forbidden")}if(e.delegateCall)throw new Error("delegate calls are forbidden")}function VJ(t){const e=new ir(mr.mainModule.abi);try{return e.decodeFunctionData("createContract",t),!0}catch{return!1}}const HJ=1e4;class WJ{constructor(e,r,n){var i=this;this.account=void 0,this.signerReadyCallbacks=[],this.prompter=void 0,this.networks=void 0,this._openIntent=void 0,this._connectOptions=void 0,this.events=new h1.EventEmitter2,this.onConnectOptionsChange=void 0,this.promptConnect=async function(s){if(!s&&!i._connectOptions)throw new Error("prompter connect options are empty");if(!i.prompter)return i.connect(s);const o=await i.prompter.promptConnect(s||i._connectOptions).catch(l=>({connected:!1})),a=o;return a.connected&&!a.session&&(a.session=await i.walletSession(s==null?void 0:s.networkId)),o},this.sendAsync=async function(s,o,a){const l={jsonrpc:"2.0",id:s.id,result:null};await i.getAccount();try{var c;if((!i.account||i.account===null)&&!qJ.includes(s.method))throw Vk;const u=i.account;if(!u)throw new Error("WalletRequestHandler: wallet account is not configured");const h=(c=i.account)==null?void 0:c.providerFor(a??i.defaultChainId());if(!h)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${a}`);const y=h instanceof $a?h:void 0;switch(s.method){case"net_version":{if(!y)throw new Error("Account provider doesn't support send method");const g=await y.send("net_version",[]);l.result=g;break}case"eth_chainId":{if(!y)throw new Error("Account provider doesn't support send method");const g=await y.send("eth_chainId",[]);l.result=g;break}case"eth_accounts":{const g=u.address;l.result=[g];break}case"eth_getBalance":{const[g,p]=s.params,k=await h.getBalance(g,p);l.result=k.toHexString();break}case"sequence_sign":case"personal_sign":case"eth_sign":{let g;switch(s.method){case"sequence_sign":case"personal_sign":{const[E,A]=s.params;g=E;break}case"eth_sign":{const[E,A]=s.params;g=A;break}}let p="";const k=v1(g),w=s.method==="sequence_sign";if(i.prompter===null?p=await u.signMessage(k,a??i.defaultChainId(),w?"eip6492":"ignore"):p=await i.prompter.promptSignMessage({chainId:a,message:k,eip6492:w},i.connectOptions),p&&p.length>0)l.result=p;else throw new Error("declined by user");break}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[g,p]=s.params;let k;if(typeof p=="string")try{k=JSON.parse(p)}catch(A){console.warn("walletRequestHandler: error parsing typedData",A)}else k=p;if(!k||!k.domain||!k.types||!k.message)throw new Error("invalid typedData object");let w="";const E=s.method==="sequence_signTypedData_v4";if(i.prompter===null?w=await u.signTypedData(k.domain,k.types,k.message,a??i.defaultChainId(),E?"eip6492":"ignore"):w=await i.prompter.promptSignMessage({chainId:a,typedData:k,eip6492:E},i.connectOptions),w&&w.length>0)l.result=w;else throw new Error("declined by user");break}case"eth_sendTransaction":{const g=UJ(s.params[0]).map(k=>("gas"in k&&k.gasLimit===void 0&&(k.gasLimit=k.gas,delete k.gas),k));b5(u.address,g);let p="";if(i.prompter===null){var f;const k=await u.sendTransaction(g,a??i.defaultChainId());p=(f=k==null?void 0:k.hash)!=null?f:""}else p=await i.prompter.promptSendTransaction(g,a,i.connectOptions);if(p)l.result=p;else throw new Error("declined by user");break}case"eth_signTransaction":{const[g]=s.params;if(Se(g.from)!==u.address)throw new Error("sender address does not match wallet");b5(u.address,g),i.prompter===null?l.result=await u.signTransactions(g,a??i.defaultChainId()):l.result=await i.prompter.promptSignTransaction(g,a,i.connectOptions);break}case"eth_sendRawTransaction":{if(ce.transaction.isSignedTransactionBundle(s.params[0])){const g=V.from(s.params[0].chainId).toNumber(),p=await u.relayer(g).relay(s.params[0]);l.result=p.hash}else{const g=await h.sendTransaction(s.params[0]);l.result=g.hash}break}case"eth_getTransactionCount":{const g=Se(s.params[0]),p=s.params[1],k=await h.getTransactionCount(g,p);l.result=V.from(k).toHexString();break}case"eth_blockNumber":{l.result=await h.getBlockNumber();break}case"eth_getBlockByNumber":{l.result=await h.getBlock(s.params[0]);break}case"eth_getBlockByHash":{l.result=await h.getBlock(s.params[0]);break}case"eth_getTransactionByHash":{l.result=await h.getTransaction(s.params[0]);break}case"eth_call":{const[g,p]=s.params;l.result=await h.call(g,p);break}case"eth_getCode":{const[g,p]=s.params;l.result=await h.getCode(g,p);break}case"eth_estimateGas":{const[g]=s.params;l.result=await h.estimateGas(g);break}case"eth_gasPrice":{const g=await h.getGasPrice();l.result=g.toHexString();break}case"wallet_switchEthereumChain":{const[g]=s.params;if(!g.chainId||g.chainId.length===0)throw new Error("invalid chainId");const p=V.from(g.chainId);i.setDefaultChainId(p.toNumber()),l.result=null;break}case"sequence_getWalletContext":{l.result=u.contexts;break}case"sequence_getWalletConfig":{const[g]=s.params;g?l.result=[(await u.status(g)).onChain.config]:l.result=await Promise.all(u.networks.map(async function(p){return(await u.status(p.chainId)).onChain.config}));break}case"sequence_getWalletState":{const[g]=s.params;g?l.result=[w5(g,await u.status(g))]:l.result=await Promise.all(u.networks.map(async function(p){const k=await u.status(p.chainId);return w5(p.chainId,k)}));break}case"sequence_getNetworks":{l.result=await i.getNetworks(!0);break}case"sequence_isSequence":{l.result=!0;break}case"sequence_updateConfig":throw new Error("sequence_updateConfig method is not allowed from a dapp");case"sequence_publishConfig":throw new Error("sequence_publishConfig method is not allowed from a dapp");case"sequence_gasRefundOptions":break;case"sequence_getNonce":break;case"sequence_relay":break;case"sequence_setDefaultNetwork":{const[g]=s.params;if(!g)throw new Error("invalid request, method argument defaultChainId cannot be empty");i.setDefaultChainId(g),l.result=await i.getNetworks(!0);break}default:{if(!y)throw new Error("Account provider doesn't support send method");const g=await y.send(s.method,s.params);l.result=g}}}catch(u){ye.error(u),l.result=null,l.error=rn({},new Error(u),{code:4001})}o(void 0,l)},this.isSignedIn=async function(){return await i.signerReady(),!!i.account},this.getAccount=async function(){if(await i.signerReady(),i.account===void 0)throw new Error("signerReady failed resolve");return i.account},this.account=e,this.prompter=r,this.networks=n}defaultChainId(){var e,r;return(e=(r=this.prompter)==null?void 0:r.getDefaultChainId())!=null?e:this.networks[0].chainId}async signIn(e,r={}){this.setAccount(e);const{connect:n,defaultNetworkId:i}=r;if(n){const a=this._connectOptions;let l;if(this.prompter!==null){var s;l=await((s=this.prompter)==null?void 0:s.promptSignInConnect(a))}else l=await this.connect(a);this.notifyConnect(l),(!a||a.keepWalletOpened!==!0)&&this.notifyClose()}if(i&&this.defaultChainId()!==i){var o;await((o=this.prompter)==null?void 0:o.promptChangeNetwork(i))}}signOut(){this.account&&this.notifyDisconnect(),this.setAccount(null)}signerReset(){this.account=void 0}signerReady(e=HJ){return new Promise((r,n)=>{this.account!==void 0?r():(setTimeout(()=>{this.account===void 0&&(this.signerReadyCallbacks=[],n("signerReady timed out"))},e),this.signerReadyCallbacks.push(r))})}async connect(e){var r,n;if(!this.account)return{connected:!1,chainId:"0x0",error:"unable to connect without signed in account"};const i=(r=(n=e==null?void 0:e.networkId)!=null?n:this.defaultChainId())!=null?r:te.MAINNET,s=Ix(i).chainId,o={connected:!0,chainId:ni(s)};if(e&&e.authorize){const a={app:e.app,origin:e.origin,expiry:e.expiry,nonce:e.authorizeNonce};try{o.proof=await ak(this.account,s,a)}catch(l){return ye.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${l.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${l.message}`}}}return o.session=this.walletSession(s),o}sendMessageRequest(e){return new Promise(r=>{this.sendAsync(e.data,(n,i)=>{const s=rn({},e,{data:i});r(s)},e.chainId)})}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}async getAddress(){var e,r;return(e=(r=this.account)==null?void 0:r.address)!=null?e:""}get openIntent(){return this._openIntent}setOpenIntent(e){this._openIntent=e}get connectOptions(){return this._connectOptions}setConnectOptions(e){var r;this._connectOptions=e,(r=this.onConnectOptionsChange)==null||r.call(this,e)}async setDefaultChainId(e){var r;return await((r=this.prompter)==null?void 0:r.promptChangeNetwork(e)),this.defaultChainId()}async getNetworks(e){return this.account?e?this.account.networks.map(r=>{const n=rn({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(ye.warn("signer not set: getNetworks is returning an empty list"),[])}walletSession(e){if(!this.account)return;const r={walletContext:this.account.contexts,accountAddress:this.account.address,networks:this.account.networks.map(i=>rn({},i,{provider:void 0,relayer:void 0}))};if(e){const i=ii(r.networks,e);if(i){var n;(n=r.networks)==null||n.forEach(s=>delete s.isDefaultChain),i.isDefaultChain=!0}}return r}notifyConnect(e,r){var n;if(console.log("emit connect",e),this.events.emit("connect",e),(n=e.session)!=null&&n.accountAddress){var i;this.events.emit("accountsChanged",[(i=e.session)==null?void 0:i.accountAddress],r)}}notifyDisconnect(e){this.events.emit("accountsChanged",[],e),this.events.emit("disconnect",void 0,e)}notifyChainChanged(e,r){this.events.emit("chainChanged",ni(e),r)}async notifyNetworks(e){const r=e||await this.getNetworks(!0);if(this.events.emit("networks",r),r.length>0){const n=r.find(i=>i.chainId===this.defaultChainId());n&&this.events.emit("chainChanged",ni(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){ye.warn("signer not set: skipping to notify wallet context");return}const e=this.account.contexts;this.events.emit("walletContext",e)}notifyClose(e){this.events.emit("close",e)}setAccount(e){if(this.account=e,e!==void 0){for(let r=0;rl.canOnchainValidate||l.original.version===2&&n,o=await r.status(i);if(s(o))return!0;if(await e.promptConfirmWalletDeploy(i,this.connectOptions)){const l=await r.status(i);return s(l)?!0:(ye.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function w5(t,e){return{context:e.original.context,config:e.onChain.config,address:ce.context.addressOf(e.original.context,e.original.imageHash),chainId:t,deployed:e.onChain.deployed,imageHash:e.imageHash,lastImageHash:e.onChain.imageHash,published:!0,status:e}}const qJ=["net_version","eth_chainId","eth_getBalance","eth_getTransactionCount","eth_blockNumber","eth_getBlockByNumber","eth_getBlockByHash","eth_getTransactionByHash","eth_getCode","eth_estimateGas","eth_gasPrice","sequence_getWalletContext","sequence_getNetworks","sequence_setDefaultNetwork"];class mc{get utils(){return this.provider.utils}constructor(e,r){this.client=e,this.provider=r,this.singleNetworkSigners={},this._isSigner=!0,this._isSequenceSigner=!0}async getAddress(){return this.client.getAddress()}connect(e){if(!xc.is(e))throw new Error("SequenceSigner can only be connected to a SequenceProvider");return new mc(this.client,e)}getSigner(e){if(!e)return this;const r=this.provider.toChainId(e);return this.singleNetworkSigners[r]||(this.singleNetworkSigners[r]=new tb(this.client,this.provider,r)),this.singleNetworkSigners[r]}useChainId(e){return this.provider.toChainId(e)||this.client.getChainId()}async signMessage(e,r){const{eip6492:n=!0}=r||{},i=this.useChainId(r==null?void 0:r.chainId);return this.client.signMessage(e,{eip6492:n,chainId:i})}async signTypedData(e,r,n,i){const{eip6492:s=!0}=i||{},o=this.useChainId(i==null?void 0:i.chainId);return this.client.signTypedData({domain:e,types:r,message:n},{eip6492:s,chainId:o})}getProvider(e){return this.provider.getProvider(e)}async sendTransaction(e,r){const n=this.useChainId(r==null?void 0:r.chainId),i=await Qk(e),s=await this.client.sendTransaction(i,{chainId:n}),o=this.getProvider(n);try{return await Zo(async function(){const a=await o.getTransaction(s);return a?o._wrapTransaction(a,s):void 0},{onceBlock:o})}catch(a){throw a.transactionHash=s,a}}async getWalletConfig(e){const r=this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}getNetworks(){return this.client.getNetworks()}async getBalance(e,r){return this.getProvider(r==null?void 0:r.chainId).getBalance(this.getAddress(),e)}async estimateGas(e,r){return this.getProvider(r==null?void 0:r.chainId).estimateGas(e)}async call(e,r,n){return this.getProvider(n==null?void 0:n.chainId).call(e,r)}getChainId(){return Promise.resolve(this.client.getChainId())}async getGasPrice(e){return this.getProvider(e==null?void 0:e.chainId).getGasPrice()}async getFeeData(e){return this.getProvider(e==null?void 0:e.chainId).getFeeData()}async resolveName(e){const r=await this.provider.resolveName(e);if(r===null)throw new Error(`ENS name not found: ${e}`);return r}_checkProvider(e){}populateTransaction(e){throw new Error("SequenceSigner does not support populateTransaction")}checkTransaction(e){throw new Error("SequenceSigner does not support checkTransaction")}getTransactionCount(e){throw new Error("SequenceSigner does not support getTransactionCount")}signTransaction(e){throw new Error("SequenceWallet does not support signTransaction, use sendTransaction instead.")}static is(e){return e&&typeof e=="object"&&e._isSequenceSigner===!0}}class tb extends mc{constructor(e,r,n){super(e,r.getProvider(n)),this.chainId=n,this._isSingleNetworkSequenceSigner=!0}_useChainId(e){const r=this.provider.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This signer only supports the network ${this.chainId}, but ${r} was requested.`);return r||this.provider.toChainId(this.chainId)}useChainId(e){return this._useChainId(e)}getChainId(){return Promise.resolve(this.provider.toChainId(this.chainId))}getProvider(e){return super.getProvider(this._useChainId(e))}getSigner(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceSigner===!0}}class GJ{constructor(e){if(this.signer=e,tb.is(e))throw new Error("WalletUtils does not support SingleNetworkSequenceSigner")}signMessage(e,r,n){return this.signer.signMessage(e,{chainId:r,eip6492:n})}signTypedData(e,r,n,i,s){return this.signer.signTypedData(e,r,n,{chainId:i,eip6492:s})}async isValidSignature(e,r,n,i){return ec(e,r,n,this.signer.getProvider(i))}async isValidMessageSignature(e,r,n,i){const s=this.signer.getProvider(i),o=v1(r),a=_x(o);return ec(e,a,n,s)}isValidTypedDataSignature(e,r,n,i){return this.isValidSignature(e,Eu(r),n,i)}}class xc extends wx{constructor(e,r,n=Ql){super(e.getChainId()),this.client=e,this.providerFor=r,this.networks=n,this.singleNetworkProviders={},this._isSequenceProvider=!0,this.utils=void 0,this.signer=void 0,e.onConnect(i=>{this.emit("connect",i)}),e.onDisconnect(i=>{this.emit("disconnect",i)}),e.onDefaultChainIdChanged(i=>{this.emit("chainChanged",i)}),e.onAccountsChanged(i=>{this.emit("accountsChanged",i)}),this.signer=new mc(this.client,this),this.utils=new GJ(this.signer)}getSigner(e){return this.signer.getSigner(e)}connect(e){return this.client.connect(e)}disconnect(){return this.client.disconnect()}isConnected(){return this.client.isConnected()}getSession(){return this.client.getSession()}listAccounts(){return[this.client.getAddress()]}getAddress(){return this.client.getAddress()}getNetworks(){return this.client.getNetworks()}getChainId(){return this.client.getChainId()}setDefaultChainId(e){return this.client.setDefaultChainId(this.toChainId(e))}isOpened(){return this.client.isOpened()}closeWallet(){return this.client.closeWallet()}getWalletContext(){return this.client.getWalletContext()}async getWalletConfig(e){const r=await this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}authorize(e){return this.client.connect(rn({},e,{authorize:!0}))}async openWallet(e,r){return await this.client.openWallet(e,r),!0}toChainId(e){if(e===void 0)return;const r=ii(this.networks,e);if(!r)throw new Error(`Unsupported network ${e}`);return r.chainId}async useChainId(e){return this.toChainId(e)||this.client.getChainId()}getProvider(e){if(!e)return this;const r=this.toChainId(e);return this.singleNetworkProviders[r]||(this.singleNetworkProviders[r]=new sA(this.client,this.providerFor,r)),this.singleNetworkProviders[r]}async _getSubprovider(e){const r=await this.useChainId(e),n=this.providerFor(r);if(!n)throw new Error(`Unsupported network ${r}`);return n}async perform(e,r){var n;if(e==="eth_chainId")return ni(await this.useChainId());if(e==="eth_accounts")return[this.client.getAddress()];if(e==="wallet_switchEthereumChain"){const o=r[0],a=iA(o);return this.setDefaultChainId(a)}if(e==="eth_sendTransaction"||e==="eth_sign"||e==="eth_signTypedData"||e==="eth_signTypedData_v4"||e==="personal_sign"||e==="sequence_sign"||e==="sequence_signTypedData_v4")return this.client.send({method:e,params:r},this.getChainId());const i=await this._getSubprovider(),s=(n=i.prepareRequest(e,r))!=null?n:[e,r];return i.send(s[0],s[1])}send(e,r){return this.perform(e,r)}request(e){return this.perform(e.method,e.params)}async detectNetwork(){const e=this.client.getChainId(),r=ii(this.networks,e);if(!r)throw new Error(`Unknown network ${e}`);return r}async waitForTransaction(e,r,n,i){return(await this._getSubprovider(i==null?void 0:i.chainId)).waitForTransaction(e,r,n)}async getBlockNumber(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getBlockNumber()}async getGasPrice(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getGasPrice()}async getBalance(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getBalance(e,r)}async getTransactionCount(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getTransactionCount(e,r)}async getCode(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getCode(e,r)}async getStorageAt(e,r,n,i){return(await this._getSubprovider(i==null?void 0:i.chainId)).getStorageAt(e,r,n)}async call(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).call(e,r)}async estimateGas(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).estimateGas(e)}async getBlock(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getBlock(e)}async getTransaction(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getTransaction(e)}async getLogs(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getLogs(e)}async supportsENS(){return(await this.getNetworks()).some(r=>r.chainId===1)}async getResolver(e){return await this.supportsENS()?(await this._getSubprovider(1)).getResolver(e):null}async resolveName(e){return qE(await e)?e:await this.supportsENS()?(await this._getSubprovider(1)).resolveName(e):null}async lookupAddress(e){return await this.supportsENS()?(await this._getSubprovider(1)).lookupAddress(e):null}async getAvatar(e){return await this.supportsENS()?(await this._getSubprovider(1)).getAvatar(e):null}}xc.is=t=>t&&typeof t=="object"&&t._isSequenceProvider===!0;function iA(t){return typeof t=="object"?iA(t.chainId):V.from(t).toNumber()}class sA extends xc{constructor(e,r,n){super(e,r),this.chainId=n,this._isSingleNetworkSequenceProvider=!0}_useChainId(e){const r=this.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This provider only supports the network ${this.chainId}, but ${r} was requested.`);return r||super.toChainId(this.chainId)}useChainId(e){return Promise.resolve(this._useChainId(e))}getChainId(){return super.toChainId(this.chainId)}async getNetwork(){const e=await this.client.getNetworks(),r=ii(e,this.chainId);if(!r)throw new Error(`Unsupported network ${this.chainId}`);return r}getProvider(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}getSigner(e){return super.getSigner(this._useChainId(e))}setDefaultChainId(e){throw new Error(`This provider only supports the network ${this.chainId}; use the parent provider to switch networks.`)}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceProvider===!0}}class KJ extends CJ{}const JJ=(t,e)=>{e||(e="https://nodes.sequence.app");const r=!t,n={};return t&&(n.headers={"X-Access-Key":t}),new KJ(e,n,{noop:r,defaultEnabled:!0,privacy:{userIdHash:!0,userAgentSalt:!1},initProps:()=>Yi()?{origin:window.location.origin}:{}})};var YJ={name:"@0xsequence/provider",version:"1.9.1",description:"provider sub-package for Sequence",repository:"https://github.com/0xsequence/sequence.js/tree/master/packages/provider",source:"src/index.ts",main:"dist/0xsequence-provider.cjs.js",module:"dist/0xsequence-provider.esm.js",author:"Horizon Blockchain Games",license:"Apache-2.0",scripts:{test:"pnpm test:concurrently 'pnpm test:run'","test:run":"pnpm test:file tests/**/*.spec.ts","test:file":"NODE_OPTIONS='--import tsx' mocha --timeout 30000",typecheck:"tsc --noEmit","test:concurrently":"concurrently -k --success first 'pnpm start:hardhat1' 'pnpm start:hardhat2'","start:hardhat1":"pnpm start:hardhat1:verbose > /dev/null 2>&1","start:hardhat2":"pnpm start:hardhat2:verbose > /dev/null 2>&1","start:hardhat1:verbose":"hardhat node --config hardhat1.config.js --hostname 0.0.0.0 --port 9595","start:hardhat2:verbose":"hardhat node --config hardhat2.config.js --hostname 0.0.0.0 --port 8595"},dependencies:{"@0xsequence/abi":"workspace:*","@0xsequence/account":"workspace:*","@0xsequence/auth":"workspace:*","@0xsequence/core":"workspace:*","@0xsequence/migration":"workspace:*","@0xsequence/network":"workspace:*","@0xsequence/relayer":"workspace:*","@0xsequence/utils":"workspace:*","@0xsequence/wallet":"workspace:*","@databeat/tracker":"^0.9.1",eventemitter2:"^6.4.5","webextension-polyfill":"^0.10.0"},peerDependencies:{ethers:">=5.5 < 6"},devDependencies:{"@types/webextension-polyfill":"^0.10.0",ethers:"^5.7.2",hardhat:"^2.12.2"},files:["src","dist"]};class ca{constructor(e){this.store=e}connectedSession(){const e=this.getSession();if(e&&e.accountAddress&&e.walletContext&&e.networks)return{accountAddress:e.accountAddress,walletContext:e.walletContext,networks:e.networks};throw new Error("Sequence session not connected")}hasSession(){var e;return((e=this.getSession())==null?void 0:e.accountAddress)!==void 0}setSession(e){return this.store.setItem(ca.SESSION_LOCALSTORE_KEY,JSON.stringify(e))}getSession(){const e=this.store.getItem(ca.SESSION_LOCALSTORE_KEY);if(e)return JSON.parse(e)}async clearSession(){return this.store.removeItem(ca.SESSION_LOCALSTORE_KEY)}}ca.SESSION_LOCALSTORE_KEY="@sequence.session";class fa{constructor(e,r=1){this.store=e,this.startingChainId=r,this.callbacks=[],e.onItemChange(fa.SESSION_CHAIN_ID_KEY,n=>{if(n){const i=parseInt(n);this.callbacks.forEach(s=>s(i))}})}onDefaultChainIdChanged(e){return this.callbacks.push(e),()=>{this.callbacks=this.callbacks.filter(r=>r!==e)}}setDefaultChainId(e){e!==this.getDefaultChainId()&&this.store.setItem(fa.SESSION_CHAIN_ID_KEY,e.toString())}getDefaultChainId(){const e=this.store.getItem(fa.SESSION_CHAIN_ID_KEY);return!e||e.length===0?this.startingChainId:parseInt(e)}}fa.SESSION_CHAIN_ID_KEY="@sequence.session.defaultChainId";class rb{constructor(e,r,n){var i,s;if(this.session=void 0,this.defaultChainId=void 0,this.callbacks={},this.transport=void 0,this.defaultEIP6492=void 0,this.projectAccessKey=void 0,this.analytics=void 0,nA(e))this.transport=y1.new(e);else if(Uk(e))this.transport=e;else throw new Error("Invalid transport");const o=n==null?void 0:n.defaultChainId;if(this.defaultEIP6492=(i=n==null?void 0:n.defaultEIP6492)!=null?i:!1,this.session=new ca(r),this.defaultChainId=new fa(r,o),this.transport.on("accountsChanged",c=>{var f;c.length>1&&console.warn("SequenceClient: wallet-webapp returned more than one account"),(f=this.callbacks.accountsChanged)==null||f.forEach(u=>u(c))}),this.transport.on("connect",c=>{var f;const u=ni(this.getChainId());(f=this.callbacks.connect)==null||f.forEach(h=>h(rn({},c,{chainId:u})))}),this.transport.on("disconnect",(c,f)=>{var u;(u=this.callbacks.disconnect)==null||u.forEach(h=>h(c,f))}),this.transport.on("networks",c=>{var f;(f=this.callbacks.networks)==null||f.forEach(u=>u(c))}),this.transport.on("walletContext",c=>{var f;(f=this.callbacks.walletContext)==null||f.forEach(u=>u(c))}),this.transport.on("open",c=>{var f;(f=this.callbacks.open)==null||f.forEach(u=>u(c))}),this.transport.on("close",()=>{var c;(c=this.callbacks.close)==null||c.forEach(f=>f())}),this.transport.on("chainChanged",(c,f)=>{var u;(u=this.callbacks.chainChanged)==null||u.forEach(h=>h(c,f))}),this.defaultChainId.onDefaultChainIdChanged(c=>{var f;const u=ni(c);(f=this.callbacks.chainChanged)==null||f.forEach(h=>h(u))}),n!=null&&n.projectAccessKey&&(this.projectAccessKey=n.projectAccessKey),this.projectAccessKey&&n!=null&&n.analytics&&(this.analytics=JJ(this.projectAccessKey)),(s=this.session.getSession())!=null&&s.accountAddress){var a,l;(a=this.analytics)==null||a.identify((l=this.session.getSession())==null||(l=l.accountAddress)==null?void 0:l.toLowerCase())}}registerCallback(e,r){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(r),()=>{this.callbacks[e]=this.callbacks[e].filter(n=>n!==r)}}onOpen(e){return this.registerCallback("open",e)}onClose(e){return this.registerCallback("close",e)}onConnect(e){return this.registerCallback("connect",e)}onDisconnect(e){return this.registerCallback("disconnect",e)}onNetworks(e){return this.registerCallback("networks",e)}onAccountsChanged(e){return this.registerCallback("accountsChanged",e)}onWalletContext(e){return this.registerCallback("walletContext",e)}onChainChanged(e){return this.registerCallback("chainChanged",e)}onDefaultChainIdChanged(e){return this.registerCallback("chainChanged",e)}getChainId(){return this.defaultChainId.getDefaultChainId()}setDefaultChainId(e){return this.defaultChainId.setDefaultChainId(e)}async openWallet(e,r){return this.transport.openWallet(e,r,this.getChainId()),await this.transport.waitUntilOpened(),this.isOpened()}closeWallet(){return this.transport.closeWallet()}isOpened(){return this.transport.isOpened()}isConnected(){return this.session.hasSession()}getSession(){return this.session.getSession()}getAddress(){return this.session.connectedSession().accountAddress}async connect(e){if((e==null?void 0:e.authorizeVersion)===void 0&&(e.authorizeVersion=2),(e==null?void 0:e.refresh)===!0&&this.disconnect(),e.projectAccessKey=this.projectAccessKey,e&&e.authorize){if(!e.app)throw new Error("connecting with 'authorize' option also requires 'app' to be set");e.authorizeVersion===void 0&&(e.authorizeVersion=2)}await this.openWallet(void 0,{type:"connect",options:rn({},e,{networkId:this.getChainId(),clientVersion:YJ.version})});const r=await this.transport.waitUntilConnected().catch(s=>s instanceof Error?{connected:!1,error:s.message}:{connected:!1,error:JSON.stringify(s)});if(r.chainId&&(r.chainId=V.from(r.chainId).toString()),r.connected){var n;if(!r.session)throw new Error("impossible state, connect response is missing session");if(this.session.setSession(r.session),(n=r.session)!=null&&n.accountAddress){var i;(i=this.analytics)==null||i.identify(r.session.accountAddress.toLowerCase())}}return r}disconnect(){var e;return this.isOpened()&&this.closeWallet(),(e=this.analytics)==null||e.reset(),this.session.clearSession()}send(e,r){return e.method=this.mapSignMethod(e.method),new Promise((n,i)=>{this.transport.sendAsync(e,(s,o)=>{s?i(s):o===void 0?i(new Error(`Got undefined response for request: ${e}`)):typeof o=="object"&&o.error?i(o.error):typeof o=="object"&&o.result?n(o.result):i(new Error(`Got invalid response for request: ${e}`))},r||this.getChainId())})}async getNetworks(e){const r=this.session.connectedSession();return e&&(r.networks=await this.send({method:"sequence_getNetworks"}),this.session.setSession(r)),r.networks}signMethod(e){return(e==null?void 0:e.eip6492)===void 0?"personal_sign":e.eip6492?"sequence_sign":"legacy_sign"}signTypedDataMethod(e){return(e==null?void 0:e.eip6492)===void 0?"eth_signTypedData_v4":e.eip6492?"sequence_signTypedData_v4":"legacy_signTypedData_v4"}mapSignMethod(e){return e==="personal_sign"?this.defaultEIP6492?"sequence_sign":"personal_sign":e==="eth_signTypedData_v4"?this.defaultEIP6492?"sequence_signTypedData_v4":"eth_signTypedData_v4":e==="legacy_sign"?"personal_sign":e==="legacy_signTypedData_v4"?"eth_signTypedData_v4":e}async signMessage(e,r){var n;const i=this.signMethod(r);return(n=this.analytics)==null||n.track({event:"SIGN_MESSAGE_REQUEST",props:{chainId:`${(r==null?void 0:r.chainId)||this.getChainId()}`}}),this.send({method:i,params:[e,this.getAddress()]},r==null?void 0:r.chainId)}async signTypedData(e,r){var n;const i=this.signTypedDataMethod(r),s=er.getPayload(e.domain,e.types,e.message);return(n=this.analytics)==null||n.track({event:"SIGN_TYPED_DATA_REQUEST",props:{chainId:`${(r==null?void 0:r.chainId)||this.getChainId()}`}}),this.send({method:i,params:[this.getAddress(),s]},(r==null?void 0:r.chainId)||e.domain.chainId&&V.from(e.domain.chainId).toNumber()||this.getChainId())}async sendTransaction(e,r){var n;const i=Array.isArray(e)?e:[e],s=FJ(i);return(n=this.analytics)==null||n.track({event:"SEND_TRANSACTION_REQUEST",props:{chainId:`${(r==null?void 0:r.chainId)||this.getChainId()}`}}),this.send({method:"eth_sendTransaction",params:[s]},r==null?void 0:r.chainId)}async getWalletContext(){return this.send({method:"sequence_getWalletContext"})}async getOnchainWalletConfig(e){const r=await this.send({method:"sequence_getWalletConfig",params:[(e==null?void 0:e.chainId)||this.getChainId()]},e==null?void 0:e.chainId);return Array.isArray(r)?r[0]:r}}const sg={transports:{walletAppURL:"https://sequence.app",windowTransport:{enabled:!0},proxyTransport:{enabled:!1}},defaultNetwork:1,analytics:!0};let wi;const oA=(t,e)=>{var r,n,i;if(!t||typeof t!="string")throw new Error("Please pass a projectAccessKey in initWallet.");if(wi)return wi;const s=rn({},sg,e,{transports:rn({},sg.transports,e==null?void 0:e.transports)}),o={},a=(r=(n=s.networks)==null?void 0:n.filter(y=>{y.rpcUrl!==void 0&&y.chainId!==void 0&&Ql.find(g=>g.chainId===y.chainId)}))!=null?r:[],l=Ql.map(y=>{var g;const p=(g=s.networks)==null?void 0:g.find(k=>k.chainId===y.chainId);return p?rn({},y,p):y}).concat(a).map(y=>(y.rpcUrl=y.rpcUrl+`/${t}`,y)),c=y=>{if(!o[y]){var g;const p=(g=l.find(E=>E.chainId===y))==null?void 0:g.rpcUrl;if(!p)throw new Error(`no rpcUrl found for chainId: ${y}`);const k=new $a(p),w=new Rx([eS,Z9,new Mx],new Z0(k));o[y]=new PH(w,y)}return o[y]},f=s.defaultNetwork?(i=ii(l,s.defaultNetwork))==null?void 0:i.chainId:void 0;if(!f&&s.defaultNetwork)throw new Error(`defaultNetwork not found for chainId: ${s.defaultNetwork}`);const u=s.localStorage||dh(),h=new rb(s.transports,u,{defaultChainId:f,defaultEIP6492:s.defaultEIP6492,projectAccessKey:t,analytics:s.analytics});return wi=new xc(h,c),wi},aA=()=>{wi&&(wi.client.closeWallet(),wi.client.transport.unregister(),wi=void 0)},lA=()=>{if(!wi)throw new Error("Wallet has not been initialized, call sequence.initWallet(config) first.");return wi},QJ=Object.freeze(Object.defineProperty({__proto__:null,BaseInjectedTransport:LJ,BaseProviderTransport:Pu,BaseWalletTransport:Iu,CHANNEL_ID:eb,DefaultChainIdTracker:fa,DefaultProviderConfig:sg,ErrSignedInRequired:Vk,EventType:Pe,ExtensionMessageHandler:BJ,ExtensionMessageProvider:tA,InitState:Mt,LocalStorage:au,MemoryItemStore:Yk,MuxMessageProvider:y1,OpenState:kn,PROVIDER_OPEN_TIMEOUT:Zx,ProviderError:zk,ProxyMessageChannel:NJ,ProxyMessageChannelPort:ig,ProxyMessageHandler:$J,ProxyMessageProvider:Xk,SequenceClient:rb,SequenceClientSession:ca,SequenceProvider:xc,SequenceSigner:mc,SingleNetworkSequenceProvider:sA,SingleNetworkSequenceSigner:tb,UnrealMessageHandler:DJ,UnrealMessageProvider:eA,WalletRequestHandler:WJ,WindowMessageHandler:jJ,WindowMessageProvider:rA,WindowSessionParams:Tu,getWallet:lA,initWallet:oA,isBrowserExtension:uh,isMuxTransportTemplate:nA,isProviderTransport:Uk,isUnityPlugin:Kk,isValidMessageSignature:qk,isValidSignature:ec,isValidTypedDataSignature:Gk,isWalletUpToDate:Jk,messageToBytes:Wk,nextMessageIdx:Hk,prefixEIP191Message:v1,resolveArrayProperties:Qk,trimEIP191Prefix:OJ,unregisterWallet:aA,useBestStore:dh},Symbol.toStringTag,{value:"Module"}));function Lr(t,e){return e.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(n){if(n!=="default"&&!(n in t)){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(t)}var XJ=Lr({__proto__:null},[nW]),ZJ=Lr({__proto__:null},[fW]),eY=Lr({__proto__:null},[AK]),tY=Lr({__proto__:null},[RK]),rY=Lr({__proto__:null},[NG]),nY=Lr({__proto__:null},[VG]),iY=Lr({__proto__:null},[FK]),sY=Lr({__proto__:null},[sq]),oY=Lr({__proto__:null},[QJ]),aY=Lr({__proto__:null},[yG]);const lY=ce.transaction;var cY=Object.freeze({__proto__:null,transactions:lY}),fY=Lr({__proto__:null,isValidSignature:ec,isValidMessageSignature:qk,isValidTypedDataSignature:Gk,isWalletUpToDate:Jk},[HW]),uY=Lr({__proto__:null},[Kq]),dY=Lr({__proto__:null},[pG]),hY=Lr({__proto__:null},[EK]),vY=Lr({__proto__:null},[eG]),yY=Lr({__proto__:null},[EG]),Ge=Object.freeze({__proto__:null,abi:XJ,api:ZJ,auth:eY,guard:tY,indexer:rY,metadata:nY,multicall:iY,network:sY,provider:oY,relayer:aY,transactions:cY,utils:fY,core:uY,signhub:dY,sessions:hY,migration:vY,account:yY,initWallet:oA,getWallet:lA,unregisterWallet:aA,SequenceProvider:xc,SequenceClient:rb,SequenceSigner:mc});const C5=[{constant:!1,inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}];var pY="_1e9z9271";const gY=({message:t,loading:e})=>{const r=()=>t?` +...`:"...";return ae.jsx(fN,{label:"Console",defaultOpen:!0,children:ae.jsxs(ue,{as:"pre",style:{fontFamily:"monospace",whiteSpace:"break-spaces",overflowWrap:"anywhere"},children:[t,e&&r(),ae.jsx(ue,{className:pY,display:"inline-block",fontSize:"large",lineHeight:"4",style:{top:"-4px",position:"relative"},children:"_"})]})})};var mY="_1q07ov40";const Uo=t=>{const{label:e,children:r,style:n,className:i}=t;return ae.jsxs(ue,{marginTop:"10",marginBottom:"8",marginX:"0",width:"full",className:i,style:n,children:[e&&ae.jsx(ue,{marginBottom:"2",children:ae.jsx(xY,{children:e})}),ae.jsx(ue,{className:mY,children:lr.Children.map(r,(s,o)=>ae.jsx(ue,{children:s},o))})]})},xY=t=>ae.jsx(Wt,{variant:"normal",fontWeight:"medium",color:"text50",children:t.children}),bY=()=>{const t=window.localStorage.getItem("defaultChainId");return t==null?null:Number(t)},wY="/demo-dapp/assets/logo-BCgqmGQR.svg",E5="/demo-dapp/assets/skyweaver-banner-AE_YELV0.png",CY="/demo-dapp/assets/skyweaver-banner-large-7dnVV5Hh.png",S5="AQAAAAAAAAbvrgpWEC2Aefg5qYStQmwjBpA";$9({logLevel:"DEBUG"});const cA=[{name:"production",walletUrl:"https://sequence.app"},{name:"development",walletUrl:"https://dev.sequence.app"},{name:"local",walletUrl:"http://localhost:3333"}],EY="https://api.sequence.app",k5=bY()||te.MAINNET,yl=new URLSearchParams(window.location.search),fA=yl.get("env")??"production",SY=cA.find(t=>t.name===fA),pl=yl.get("walletAppURL")??SY.walletUrl;pl&&pl.length>0?Ge.initWallet(S5,{defaultNetwork:k5,transports:{walletAppURL:pl}}):Ge.initWallet(S5,{defaultNetwork:k5,transports:{walletAppURL:pl}});const kY=()=>{const[t,e]=S.useState(null),[r,n]=S.useState(null),[i,s]=S.useState(!1),[o,a]=S.useState(!1),l=Ge.getWallet().getProvider(),[c,f]=S.useState(l.getChainId()),[u,h]=S.useState(!1),[y,g]=S.useState(!1);S.useMemo(()=>{l.on("chainChanged",L=>{f(V.from(L).toNumber())})},[]),S.useEffect(()=>{a(l.isConnected())},[l]),S.useEffect(()=>{m()},[o]),S.useEffect(()=>{l.client.onOpen(()=>{console.log("wallet window opened")}),l.client.onClose(()=>{console.log("wallet window closed")})},[l]);const p={app:"Demo Dapp",askForEmail:!0},k=async(L={app:"Demo dapp"})=>{if(o){$(),_("Wallet already connected!"),s(!1);return}L={...p,...L,settings:{...p.settings,...L.settings}};try{$(),_("Connecting");const ne=Ge.getWallet(),Y=await ne.connect(L);if(L.authorize&&Y.connected){let ie=yl.get("apiUrl");(!ie||ie.length===0)&&(ie=EY);const pe=new Ge.api.SequenceAPIClient(ie),{isValid:ve}=await pe.isValidETHAuthProof({chainId:Y.chainId,walletAddress:Y.session.accountAddress,ethAuthProofString:Y.proof.proofString});_(`isValid (API)?: ${ve}`)}if(L.authorize){const ie=new Q0;if(Y.proof){const pe=await ie.decodeProof(Y.proof.proofString,!0),ve=await ne.utils.isValidTypedDataSignature(ne.getAddress(),Y.proof.typedData,pe.signature,V.from(Y.chainId).toNumber());_(`connected using chainId: ${V.from(Y.chainId).toString()}`),_(`isValid (client)?: ${ve}`)}}s(!1),Y.connected?(_("Wallet connected!"),_(`shared email: ${Y.email}`),a(!0)):_("Failed to connect wallet - "+Y.error)}catch(ne){console.error(ne),N()}},w=()=>{Ge.getWallet().disconnect(),m(),a(!1)},E=()=>{Ge.getWallet().openWallet()},A=()=>{const L=Ge.getWallet(),Y={type:"openWithOptions",options:{app:"Demo Dapp",settings:{theme:"light",includedPaymentProviders:["moonpay","ramp"],defaultFundingCurrency:"eth",defaultPurchaseAmount:400,lockFundingCurrencyToDefault:!1}}};L.openWallet("wallet/add-funds",Y)},I=()=>{Ge.getWallet().closeWallet()},M=async()=>{$();const L=Ge.getWallet();_(`isConnected?: ${L.isConnected()}`),s(!1)},j=async()=>{$();const L=Ge.getWallet();_(`isOpened?: ${L.isOpened()}`),s(!1)},z=async()=>{try{$();const L=l.getChainId();_(`top chainId: ${L}`);const Y=l.getProvider().getChainId();_(`provider.getChainId(): ${Y}`);const pe=await l.getSigner().getChainId();_(`signer.getChainId(): ${pe}`),s(!1)}catch(L){console.error(L),N()}},F=async()=>{try{$();const L=Ge.getWallet(),ne=L.getAddress();_(`getAddress(): ${ne}`);const ie=L.getProvider().listAccounts();_(`accounts: ${JSON.stringify(ie)}`),s(!1)}catch(L){console.error(L),N()}},q=async()=>{try{$();const L=Ge.getWallet(),ne=L.getProvider(),Y=L.getAddress(),ie=await ne.getBalance(Y);_(`balance check 1: ${ie.toString()}`);const ve=await L.getSigner().getBalance();_(`balance check 2: ${ve.toString()}`),s(!1)}catch(L){console.error(L),N()}},G=async()=>{try{$();const ne=await Ge.getWallet().getNetworks();_(`networks: ${JSON.stringify(ne,null,2)}`),s(!1)}catch(L){console.error(L),N()}},Z=async()=>{try{$();const L=Ge.getWallet();_("signing message...");const ne=L.getSigner(),Y=`1915 Robert Frost The Road Not Taken Two roads diverged in a yellow wood, @@ -165,6 +165,6 @@ Two roads diverged in a wood, and I— I took the one less traveled by, And that has made all the difference. -☁ ☀ ☂`,oe=await V.signMessage(W);m(`signature: ${oe}`);const re=await j.utils.isValidMessageSignature(j.getAddress(),W,oe,await V.getChainId());if(m(`isValid?: ${re}`),!re)throw new Error("sig invalid");s(!1)}catch(j){console.error(j),N()}},ie=async()=>{try{d();const j=Je.getWallet();m("signing typedData...");const V={types:{Person:[{name:"name",type:"string"},{name:"wallet",type:"address"}],Mail:[{name:"from",type:"Person"},{name:"to",type:"Person"},{name:"cc",type:"Person[]"},{name:"contents",type:"string"},{name:"attachements",type:"string[]"}]},primaryType:"Mail",domain:{name:"Ether Mail",version:"1",chainId:1,verifyingContract:"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"},message:{from:{name:"Cow",wallet:"0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826"},to:{name:"Bob",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"},cc:[{name:"Dev Team",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"},{name:"Accounting",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"}],contents:"Hello, Bob!",attachements:["cat.png","dog.png"]}},W=j.getSigner(),oe=await W.signTypedData(V.domain,V.types,V.message);m(`signature: ${oe}`);const re=await j.utils.isValidTypedDataSignature(j.getAddress(),V,oe,await W.getChainId());m(`isValid?: ${re}`),s(!1)}catch(j){console.error(j),N()}},D=async()=>{try{d();const j=Je.getWallet(),V="0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",W=new ir(["function withdraw(uint256 amount)"]),oe={to:V,data:W.encodeFunctionData("withdraw",["1000000000000000000"])},ae=await j.getProvider().estimateGas(oe);m(`estimated gas needed for wmatic withdrawal : ${ae.toString()}`),s(!1)}catch(j){console.error(j),N()}},v=async j=>{try{d();const V=Je.getWallet();j=j||V.getSigner(),m(`Transfer txn on ${j.getChainId()} chainId`);const W=await j.getAddress(),oe={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:W,value:Op("1.234"),data:"0x"},re={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:W,value:Op("0.4242"),data:"0x"},ae=j.provider,Le=await ae.getBalance(W);m(`balance of ${W}, before: ${Le}`);const Ee=await j.sendTransaction([oe,re]);m(`txnResponse: ${JSON.stringify(Ee)}`);const Ce=await ae.getBalance(W);m(`balance of ${W}, after: ${Ce}`),s(!1)}catch(V){console.error(V),N()}},C=async j=>{try{d();const V=Je.getWallet();j=j||V.getSigner();const W=await j.getAddress(),oe=J0("1",1),ae={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x07865c6e87b9f70255377e024ace6630c1eaa37f",value:0,data:new ir(C5).encodeFunctionData("transfer",[W,oe.toHexString()])},Le=await j.sendTransaction([ae],{chainId:ee.SEPOLIA});m(`txnResponse: ${JSON.stringify(Le)}`),s(!1)}catch(V){console.error(V),N()}},P=async j=>{try{d();const V=Je.getWallet();j=j||V.getSigner();const W=await j.getAddress(),oe=J0("0.05",18),ae={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",value:0,data:new ir(C5).encodeFunctionData("transfer",[W,oe.toHexString()])},Le=await j.sendTransaction([ae]);m(`txnResponse: ${JSON.stringify(Le)}`),s(!1)}catch(V){console.error(V),N()}},O=async()=>{try{const j=Je.getWallet(),V=j.getChainId()===ee.ARBITRUM?ee.OPTIMISM:ee.ARBITRUM;v(j.getSigner(V))}catch(j){console.error(j),N()}},b=async()=>{try{d(),m("TODO"),s(!1)}catch(j){console.error(j),N()}},_=async j=>{try{d();const V=Je.getWallet();j=j||V.getSigner();const W=["function balanceOf(address owner) view returns (uint256)","function decimals() view returns (uint8)","function symbol() view returns (string)","function transfer(address to, uint amount) returns (bool)","event Transfer(address indexed from, address indexed to, uint amount)"],oe="0x2791bca1f2de4661ed88a30c99a7a9449aa84174",re=new Na(oe,W,j),ae=await re.symbol();m(`Token symbol: ${ae}`);const Le=await re.balanceOf(await j.getAddress());m(`Token Balance: ${Le.toString()}`),s(!1)}catch(V){console.error(V),N()}},R=async()=>{try{d();const j=Je.getWallet(),W=await j.getSigner().getAddress(),re=(await j.getNetworks()).find(Ce=>Ce.chainId===ee.POLYGON);if(!re)throw new Error("Could not find Polygon network in networks list");const ae=new Je.indexer.SequenceIndexer(re.indexerUrl),Le=await ae.getTokenBalances({accountAddress:W,includeMetadata:!0});m(`tokens in your account: ${JSON.stringify(Le)}`);const Ee=await ae.getTokenBalances({accountAddress:W,includeMetadata:!0,contractAddress:"0x631998e91476DA5B870D741192fc5Cbc55F5a52E"});m(`skyweaver collectibles in your account: ${JSON.stringify(Ee)}`),s(!1)}catch(j){console.error(j),N()}},m=(j,V=!1)=>(console.log(j),e(V?j:W=>`${W} +☁ ☀ ☂`,ie=await ne.signMessage(Y);_(`signature: ${ie}`);const pe=await L.utils.isValidMessageSignature(L.getAddress(),Y,ie,await ne.getChainId());if(_(`isValid?: ${pe}`),!pe)throw new Error("sig invalid");s(!1)}catch(L){console.error(L),N()}},oe=async()=>{try{$();const L=Ge.getWallet();_("signing message...");const ne=L.getSigner(),Y=Q(Ue("Hello, world!")),ie=await ne.signMessage(Y);_(`signature: ${ie}`);const pe=await L.utils.isValidMessageSignature(L.getAddress(),Y,ie,await ne.getChainId());if(_(`isValid?: ${pe}`),!pe)throw new Error("sig invalid");s(!1)}catch(L){console.error(L),N()}},D=async()=>{try{$();const L=Ge.getWallet();_("signing message...");const ne=L.getSigner(),Y=Ue("Hello, world!"),ie=await ne.signMessage(Y);_(`signature: ${ie}`);const pe=await L.utils.isValidMessageSignature(L.getAddress(),Y,ie,await ne.getChainId());if(_(`isValid?: ${pe}`),!pe)throw new Error("sig invalid");s(!1)}catch(L){console.error(L),N()}},v=async()=>{try{$();const L=Ge.getWallet();_("signing typedData...");const ne={types:{Person:[{name:"name",type:"string"},{name:"wallet",type:"address"}],Mail:[{name:"from",type:"Person"},{name:"to",type:"Person"},{name:"cc",type:"Person[]"},{name:"contents",type:"string"},{name:"attachements",type:"string[]"}]},primaryType:"Mail",domain:{name:"Ether Mail",version:"1",chainId:1,verifyingContract:"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"},message:{from:{name:"Cow",wallet:"0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826"},to:{name:"Bob",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"},cc:[{name:"Dev Team",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"},{name:"Accounting",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"}],contents:"Hello, Bob!",attachements:["cat.png","dog.png"]}},Y=L.getSigner(),ie=await Y.signTypedData(ne.domain,ne.types,ne.message);_(`signature: ${ie}`);const pe=await L.utils.isValidTypedDataSignature(L.getAddress(),ne,ie,await Y.getChainId());_(`isValid?: ${pe}`),s(!1)}catch(L){console.error(L),N()}},C=async()=>{try{$();const L=Ge.getWallet(),ne="0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",Y=new ir(["function withdraw(uint256 amount)"]),ie={to:ne,data:Y.encodeFunctionData("withdraw",["1000000000000000000"])},ve=await L.getProvider().estimateGas(ie);_(`estimated gas needed for wmatic withdrawal : ${ve.toString()}`),s(!1)}catch(L){console.error(L),N()}},P=async L=>{try{$();const ne=Ge.getWallet();L=L||ne.getSigner(),_(`Transfer txn on ${L.getChainId()} chainId`);const Y=await L.getAddress(),ie={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:Y,value:Op("1.234"),data:"0x"},pe={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:Y,value:Op("0.4242"),data:"0x"},ve=L.provider,me=await ve.getBalance(Y);_(`balance of ${Y}, before: ${me}`);const He=await L.sendTransaction([ie,pe]);_(`txnResponse: ${JSON.stringify(He)}`);const Le=await ve.getBalance(Y);_(`balance of ${Y}, after: ${Le}`),s(!1)}catch(ne){console.error(ne),N()}},O=async L=>{try{$();const ne=Ge.getWallet();L=L||ne.getSigner();const Y=await L.getAddress(),ie=J0("1",1),ve={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x07865c6e87b9f70255377e024ace6630c1eaa37f",value:0,data:new ir(C5).encodeFunctionData("transfer",[Y,ie.toHexString()])},me=await L.sendTransaction([ve],{chainId:te.SEPOLIA});_(`txnResponse: ${JSON.stringify(me)}`),s(!1)}catch(ne){console.error(ne),N()}},x=async L=>{try{$();const ne=Ge.getWallet();L=L||ne.getSigner();const Y=await L.getAddress(),ie=J0("0.05",18),ve={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",value:0,data:new ir(C5).encodeFunctionData("transfer",[Y,ie.toHexString()])},me=await L.sendTransaction([ve]);_(`txnResponse: ${JSON.stringify(me)}`),s(!1)}catch(ne){console.error(ne),N()}},T=async()=>{try{const L=Ge.getWallet(),ne=L.getChainId()===te.ARBITRUM?te.OPTIMISM:te.ARBITRUM;P(L.getSigner(ne))}catch(L){console.error(L),N()}},R=async()=>{try{$(),_("TODO"),s(!1)}catch(L){console.error(L),N()}},b=async L=>{try{$();const ne=Ge.getWallet();L=L||ne.getSigner();const Y=["function balanceOf(address owner) view returns (uint256)","function decimals() view returns (uint8)","function symbol() view returns (string)","function transfer(address to, uint amount) returns (bool)","event Transfer(address indexed from, address indexed to, uint amount)"],ie="0x2791bca1f2de4661ed88a30c99a7a9449aa84174",pe=new Na(ie,Y,L),ve=await pe.symbol();_(`Token symbol: ${ve}`);const me=await pe.balanceOf(await L.getAddress());_(`Token Balance: ${me.toString()}`),s(!1)}catch(ne){console.error(ne),N()}},d=async()=>{try{$();const L=Ge.getWallet(),Y=await L.getSigner().getAddress(),pe=(await L.getNetworks()).find(Le=>Le.chainId===te.POLYGON);if(!pe)throw new Error("Could not find Polygon network in networks list");const ve=new Ge.indexer.SequenceIndexer(pe.indexerUrl),me=await ve.getTokenBalances({accountAddress:Y,includeMetadata:!0});_(`tokens in your account: ${JSON.stringify(me)}`);const He=await ve.getTokenBalances({accountAddress:Y,includeMetadata:!0,contractAddress:"0x631998e91476DA5B870D741192fc5Cbc55F5a52E"});_(`skyweaver collectibles in your account: ${JSON.stringify(He)}`),s(!1)}catch(L){console.error(L),N()}},_=(L,ne=!1)=>(console.log(L),e(ne?L:Y=>`${Y} -${j}`)),d=()=>{s(!0)},T=()=>{s(!1),e(o?"Status: Wallet is connected :)":"Status: Wallet not connected. Please connect wallet first.")},N=()=>{s(!1),e("An error occurred")},x=[ee.RINKEBY,ee.HARDHAT,ee.HARDHAT_2,ee.KOVAN,ee.ROPSTEN,ee.HOMEVERSE_TESTNET,ee.BASE_GOERLI],$=Object.values(Je.network.networks).filter(j=>j.type===je.MAINNET).sort((j,V)=>j.chainId-V.chainId),L=Object.values(Je.network.networks).filter(j=>j.type===je.TESTNET).sort((j,V)=>j.chainId-V.chainId),U=[...$,...L].filter(j=>!j.deprecated&&!x.includes(j.chainId));S.useEffect(()=>{r&&!u&&(console.log(r),k({app:"Demo Dapp",authorize:!0,settings:{signInWithEmail:r,theme:"dark",bannerUrl:`${window.location.origin}${E5}`}}),n(null))},[r,u]);const G=j=>(j=j.trim(),!!/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/.test(j));return se.jsxs(ue,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[se.jsx(ue,{marginBottom:"10",children:se.jsx("a",{href:"https://sequence.xyz/",target:"_blank",rel:"noopener",children:se.jsx(ZC,{height:"6",alt:"logo",src:wY})})}),se.jsx(ue,{children:se.jsx(Wt,{variant:"normal",color:"text100",fontWeight:"bold",children:"Demo Dapp"})}),se.jsx(ue,{marginTop:"1",marginBottom:"4",children:se.jsx(Wt,{variant:"normal",color:"text80",children:"A dapp example on how to use the Sequence Wallet. This covers how to connect, sign messages and send transctions."})}),se.jsxs(pO,{background:"backgroundMuted",alignItems:"center",gap:"3",children:[se.jsx(HO,{}),se.jsx(Wt,{variant:"normal",color:"text80",children:"Please open your browser dev inspector to view output of functions below."})]}),se.jsx(mw,{background:"buttonGlass"}),se.jsx(ue,{marginBottom:"4",children:se.jsx(Gw,{name:"environment",label:"Environment",labelLocation:"top",onValueChange:j=>{yl.set("env",j),yl.delete("walletAppURL"),window.location.search=yl.toString()},value:fA,options:[...Object.values(cA).map(j=>({label:se.jsx(ue,{alignItems:"center",gap:"2",children:se.jsx(Wt,{capitalize:!0,children:j.name})}),value:String(j.name)}))]})}),se.jsxs(ue,{marginBottom:"4",children:[se.jsx(Wt,{as:"div",variant:"small",color:"text100",children:"Wallet URL"}),se.jsx("a",{href:pl,target:"_blank",rel:"noopener",children:se.jsxs(ue,{gap:"1",marginTop:"1",alignItems:"center",children:[se.jsx(Wt,{as:"div",variant:"normal",color:"text80",children:pl}),se.jsx(FO,{})]})})]}),se.jsx(mw,{background:"buttonGlass"}),se.jsx(ue,{marginBottom:"4",children:se.jsx(Gw,{name:"chainId",label:"Network",labelLocation:"top",onValueChange:j=>l.setDefaultChainId(Number(j)),value:String(c),options:[...Object.values(U).map(j=>({label:se.jsxs(ue,{alignItems:"center",gap:"2",children:[se.jsx(bj,{src:j.logoURI,size:"sm"}),se.jsx(Wt,{children:j.title})]}),value:String(j.chainId)}))]})}),se.jsxs(Uo,{label:"Connection",children:[se.jsx(Ge,{width:"full",shape:"square",onClick:()=>k(),label:"Connect"}),se.jsx(Ge,{width:"full",shape:"square",onClick:()=>k({app:"Demo Dapp",authorize:!0}),label:"Connect & Auth"}),se.jsx(Ge,{width:"full",shape:"square",onClick:()=>k({app:"Demo Dapp",authorize:!0,settings:{theme:"dark",bannerUrl:`${window.location.origin}${CY}`,bannerSize:"medium",includedPaymentProviders:["moonpay"],defaultFundingCurrency:"matic",defaultPurchaseAmount:111}}),label:"Connect with Settings"}),se.jsx(Ge,{width:"full",shape:"square",onClick:()=>{h(!0)},label:"Connect with Email"}),se.jsx(Ge,{width:"full",shape:"square",onClick:()=>{k({app:"Demo Dapp",authorize:!0,settings:{signInWith:"google",theme:"dark",bannerUrl:`${window.location.origin}${E5}`}})},label:"Connect with Google"}),se.jsx(Ge,{width:"full",shape:"square",onClick:()=>w(),label:"Disconnect"})]}),se.jsxs(Uo,{label:"Basics",children:[se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>E(),label:"Open Wallet"}),se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>A(),label:"Open Wallet with Settings"}),se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>I(),label:"Close Wallet"}),se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>M(),label:"Is Connected?"}),se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>B(),label:"Is Opened?"})]}),se.jsxs(Uo,{label:"State",children:[se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>z(),label:"ChainID"}),se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>J(),label:"Networks"}),se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>F(),label:"Get Accounts"}),se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>K(),label:"Get Balance"})]}),se.jsxs(Uo,{label:"Signing",children:[se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>Z(),label:"Sign Message"}),se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>ie(),label:"Sign TypedData"})]}),se.jsx(Uo,{label:"Simulation",children:se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>D(),label:"Estimate Unwrap Gas"})}),se.jsxs(Uo,{label:"Transactions",children:[se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>v(),label:"Send funds"}),se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>O(),label:"Send on L2"}),se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>P(),label:"Send DAI"}),se.jsx(Ge,{width:"full",shape:"square",disabled:!o||!0,onClick:()=>b(),label:"Send ERC-1155 Tokens"}),se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>C(),label:"Send USDC on Sepolia"})]}),se.jsxs(Uo,{label:"Various",children:[se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>_(),label:"Read Symbol and Balance"}),se.jsx(Ge,{width:"full",shape:"square",disabled:!o,onClick:()=>R(),label:"Fetch Token Balances"})]}),se.jsx(Z8,{children:u&&se.jsx(TL,{onClose:()=>h(!1),size:"sm",children:se.jsx(ue,{flexDirection:"column",justifyContent:"space-between",height:"full",padding:"16",children:se.jsxs(ue,{flexDirection:"column",children:[se.jsx(ue,{marginTop:"6",children:se.jsx(Wt,{marginTop:"5",variant:"normal",color:"text80",children:"Auto-email login, please specify the email address"})}),se.jsx(ue,{marginTop:"4",children:se.jsx(qm,{onChange:j=>{n(j.target.value)}})}),y?se.jsx(ue,{marginTop:"6",children:se.jsx(Wt,{marginTop:"5",variant:"normal",color:"warning",children:"please input an email with correct format"})}):null,se.jsx(ue,{gap:"2",marginY:"4",children:se.jsx(Ge,{variant:"primary",label:"Login",onClick:()=>{G(r)?(g(!1),h(!1)):g(!0)},"data-id":"login"})})]})})})}),se.jsx(gY,{message:t,loading:i})]})},AY=lr.memo(kY),_Y=IE(document.getElementById("root"));_Y.render(se.jsx(lr.StrictMode,{children:se.jsx(CL,{children:se.jsx(AY,{})})})); +${L}`)),$=()=>{s(!0)},m=()=>{s(!1),e(o?"Status: Wallet is connected :)":"Status: Wallet not connected. Please connect wallet first.")},N=()=>{s(!1),e("An error occurred")},B=[te.RINKEBY,te.HARDHAT,te.HARDHAT_2,te.KOVAN,te.ROPSTEN,te.HOMEVERSE_TESTNET,te.BASE_GOERLI],U=Object.values(Ge.network.networks).filter(L=>L.type===Fe.MAINNET).sort((L,ne)=>L.chainId-ne.chainId),W=Object.values(Ge.network.networks).filter(L=>L.type===Fe.TESTNET).sort((L,ne)=>L.chainId-ne.chainId),ee=[...U,...W].filter(L=>!L.deprecated&&!B.includes(L.chainId));S.useEffect(()=>{r&&!u&&(console.log(r),k({app:"Demo Dapp",authorize:!0,settings:{signInWithEmail:r,theme:"dark",bannerUrl:`${window.location.origin}${E5}`}}),n(null))},[r,u]);const K=L=>(L=L.trim(),!!/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/.test(L));return ae.jsxs(ue,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[ae.jsx(ue,{marginBottom:"10",children:ae.jsx("a",{href:"https://sequence.xyz/",target:"_blank",rel:"noopener",children:ae.jsx(ZC,{height:"6",alt:"logo",src:wY})})}),ae.jsx(ue,{children:ae.jsx(Wt,{variant:"normal",color:"text100",fontWeight:"bold",children:"Demo Dapp"})}),ae.jsx(ue,{marginTop:"1",marginBottom:"4",children:ae.jsx(Wt,{variant:"normal",color:"text80",children:"A dapp example on how to use the Sequence Wallet. This covers how to connect, sign messages and send transctions."})}),ae.jsxs(pO,{background:"backgroundMuted",alignItems:"center",gap:"3",children:[ae.jsx(HO,{}),ae.jsx(Wt,{variant:"normal",color:"text80",children:"Please open your browser dev inspector to view output of functions below."})]}),ae.jsx(mw,{background:"buttonGlass"}),ae.jsx(ue,{marginBottom:"4",children:ae.jsx(Gw,{name:"environment",label:"Environment",labelLocation:"top",onValueChange:L=>{yl.set("env",L),yl.delete("walletAppURL"),window.location.search=yl.toString()},value:fA,options:[...Object.values(cA).map(L=>({label:ae.jsx(ue,{alignItems:"center",gap:"2",children:ae.jsx(Wt,{capitalize:!0,children:L.name})}),value:String(L.name)}))]})}),ae.jsxs(ue,{marginBottom:"4",children:[ae.jsx(Wt,{as:"div",variant:"small",color:"text100",children:"Wallet URL"}),ae.jsx("a",{href:pl,target:"_blank",rel:"noopener",children:ae.jsxs(ue,{gap:"1",marginTop:"1",alignItems:"center",children:[ae.jsx(Wt,{as:"div",variant:"normal",color:"text80",children:pl}),ae.jsx(FO,{})]})})]}),ae.jsx(mw,{background:"buttonGlass"}),ae.jsx(ue,{marginBottom:"4",children:ae.jsx(Gw,{name:"chainId",label:"Network",labelLocation:"top",onValueChange:L=>l.setDefaultChainId(Number(L)),value:String(c),options:[...Object.values(ee).map(L=>({label:ae.jsxs(ue,{alignItems:"center",gap:"2",children:[ae.jsx(bj,{src:L.logoURI,size:"sm"}),ae.jsx(Wt,{children:L.title})]}),value:String(L.chainId)}))]})}),ae.jsxs(Uo,{label:"Connection",children:[ae.jsx(ze,{width:"full",shape:"square",onClick:()=>k(),label:"Connect"}),ae.jsx(ze,{width:"full",shape:"square",onClick:()=>k({app:"Demo Dapp",authorize:!0}),label:"Connect & Auth"}),ae.jsx(ze,{width:"full",shape:"square",onClick:()=>k({app:"Demo Dapp",authorize:!0,settings:{theme:"dark",bannerUrl:`${window.location.origin}${CY}`,bannerSize:"medium",includedPaymentProviders:["moonpay"],defaultFundingCurrency:"matic",defaultPurchaseAmount:111}}),label:"Connect with Settings"}),ae.jsx(ze,{width:"full",shape:"square",onClick:()=>{h(!0)},label:"Connect with Email"}),ae.jsx(ze,{width:"full",shape:"square",onClick:()=>{k({app:"Demo Dapp",authorize:!0,settings:{signInWith:"google",theme:"dark",bannerUrl:`${window.location.origin}${E5}`}})},label:"Connect with Google"}),ae.jsx(ze,{width:"full",shape:"square",onClick:()=>w(),label:"Disconnect"})]}),ae.jsxs(Uo,{label:"Basics",children:[ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>E(),label:"Open Wallet"}),ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>A(),label:"Open Wallet with Settings"}),ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>I(),label:"Close Wallet"}),ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>M(),label:"Is Connected?"}),ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>j(),label:"Is Opened?"})]}),ae.jsxs(Uo,{label:"State",children:[ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>z(),label:"ChainID"}),ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>G(),label:"Networks"}),ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>F(),label:"Get Accounts"}),ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>q(),label:"Get Balance"})]}),ae.jsxs(Uo,{label:"Signing",children:[ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>Z(),label:"Sign Message (String)"}),ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>oe(),label:"Sign Message (Hex)"}),ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>D(),label:"Sign Message (Bytes)"}),ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>v(),label:"Sign TypedData"})]}),ae.jsx(Uo,{label:"Simulation",children:ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>C(),label:"Estimate Unwrap Gas"})}),ae.jsxs(Uo,{label:"Transactions",children:[ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>P(),label:"Send funds"}),ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>T(),label:"Send on L2"}),ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>x(),label:"Send DAI"}),ae.jsx(ze,{width:"full",shape:"square",disabled:!o||!0,onClick:()=>R(),label:"Send ERC-1155 Tokens"}),ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>O(),label:"Send USDC on Sepolia"})]}),ae.jsxs(Uo,{label:"Various",children:[ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>b(),label:"Read Symbol and Balance"}),ae.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>d(),label:"Fetch Token Balances"})]}),ae.jsx(Z8,{children:u&&ae.jsx(TB,{onClose:()=>h(!1),size:"sm",children:ae.jsx(ue,{flexDirection:"column",justifyContent:"space-between",height:"full",padding:"16",children:ae.jsxs(ue,{flexDirection:"column",children:[ae.jsx(ue,{marginTop:"6",children:ae.jsx(Wt,{marginTop:"5",variant:"normal",color:"text80",children:"Auto-email login, please specify the email address"})}),ae.jsx(ue,{marginTop:"4",children:ae.jsx(qm,{onChange:L=>{n(L.target.value)}})}),y?ae.jsx(ue,{marginTop:"6",children:ae.jsx(Wt,{marginTop:"5",variant:"normal",color:"warning",children:"please input an email with correct format"})}):null,ae.jsx(ue,{gap:"2",marginY:"4",children:ae.jsx(ze,{variant:"primary",label:"Login",onClick:()=>{K(r)?(g(!1),h(!1)):g(!0)},"data-id":"login"})})]})})})}),ae.jsx(gY,{message:t,loading:i})]})},AY=lr.memo(kY),_Y=IE(document.getElementById("root"));_Y.render(ae.jsx(lr.StrictMode,{children:ae.jsx(CB,{children:ae.jsx(AY,{})})})); diff --git a/index.html b/index.html index 66537e3..95d00d3 100644 --- a/index.html +++ b/index.html @@ -25,7 +25,7 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Sequence | Demo Dapp - +