From 3f0415a37a6958fe8563c16e8fc2969818bb0e83 Mon Sep 17 00:00:00 2001 From: corbanbrook Date: Wed, 27 Mar 2024 19:07:54 +0000 Subject: [PATCH] Build: (6ff2653) Updating sequence.js to v1.9.12 --- assets/index-BTcEoAyt.js | 170 +++++++++++++++++++++++++++++++++++++++ assets/index-CbnjMph8.js | 170 --------------------------------------- index.html | 2 +- 3 files changed, 171 insertions(+), 171 deletions(-) create mode 100644 assets/index-BTcEoAyt.js delete mode 100644 assets/index-CbnjMph8.js diff --git a/assets/index-BTcEoAyt.js b/assets/index-BTcEoAyt.js new file mode 100644 index 0000000..3120142 --- /dev/null +++ b/assets/index-BTcEoAyt.js @@ -0,0 +1,170 @@ +var UA=Object.defineProperty;var zA=(t,e,r)=>e in t?UA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var De=(t,e,r)=>(zA(t,typeof e!="symbol"?e+"":e,r),r);function VA(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 q5=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 qA(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 H5={exports:{}},bh={},W5={exports:{}},Me={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var du=Symbol.for("react.element"),HA=Symbol.for("react.portal"),WA=Symbol.for("react.fragment"),GA=Symbol.for("react.strict_mode"),KA=Symbol.for("react.profiler"),JA=Symbol.for("react.provider"),YA=Symbol.for("react.context"),QA=Symbol.for("react.forward_ref"),XA=Symbol.for("react.suspense"),ZA=Symbol.for("react.memo"),e_=Symbol.for("react.lazy"),pb=Symbol.iterator;function t_(t){return t===null||typeof t!="object"?null:(t=pb&&t[pb]||t["@@iterator"],typeof t=="function"?t:null)}var G5={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},K5=Object.assign,J5={};function rc(t,e,r){this.props=t,this.context=e,this.refs=J5,this.updater=r||G5}rc.prototype.isReactComponent={};rc.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")};rc.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Y5(){}Y5.prototype=rc.prototype;function yg(t,e,r){this.props=t,this.context=e,this.refs=J5,this.updater=r||G5}var pg=yg.prototype=new Y5;pg.constructor=yg;K5(pg,rc.prototype);pg.isPureReactComponent=!0;var gb=Array.isArray,Q5=Object.prototype.hasOwnProperty,gg={current:null},X5={key:!0,ref:!0,__self:!0,__source:!0};function Z5(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)Q5.call(e,n)&&!X5.hasOwnProperty(n)&&(i[n]=e[n]);var a=arguments.length-2;if(a===1)i.children=r;else if(1>>1,d=x[b];if(0>>1;b<_;){var $=2*(b+1)-1,m=x[$],O=$+1,B=x[O];if(0>i(m,R))Oi(B,m)?(x[b]=B,x[O]=R,b=O):(x[b]=m,x[$]=R,b=$);else if(Oi(B,R))x[b]=B,x[O]=R,b=O;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&&N(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&&!ee());){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&&N(I,$.startTime-T),_=!1}return _}finally{u=null,h=R,y=!1}}var j=!1,z=null,F=-1,W=5,G=-1;function ee(){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,N(I,R-b))):(x.sortIndex=d,e(l,x),g||y||(g=!0,P(M))),x},t.unstable_shouldYield=ee,t.unstable_wrapCallback=function(x){var T=h;return function(){var R=h;h=T;try{return x.apply(this,arguments)}finally{h=R}}}})(n3);r3.exports=n3;var h_=r3.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var i3=S,mn=h_;function se(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"),ny=Object.prototype.hasOwnProperty,v_=/^[: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]*$/,xb={},bb={};function y_(t){return ny.call(bb,t)?!0:ny.call(xb,t)?!1:v_.test(t)?bb[t]=!0:(xb[t]=!0,!1)}function p_(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 g_(t,e,r,n){if(e===null||typeof e>"u"||p_(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 Qr(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 _r={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){_r[t]=new Qr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];_r[e]=new Qr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){_r[t]=new Qr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){_r[t]=new Qr(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){_r[t]=new Qr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){_r[t]=new Qr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){_r[t]=new Qr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){_r[t]=new Qr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){_r[t]=new Qr(t,5,!1,t.toLowerCase(),null,!1,!1)});var xg=/[\-:]([a-z])/g;function bg(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(xg,bg);_r[e]=new Qr(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(xg,bg);_r[e]=new Qr(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(xg,bg);_r[e]=new Qr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){_r[t]=new Qr(t,1,!1,t.toLowerCase(),null,!1,!1)});_r.xlinkHref=new Qr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){_r[t]=new Qr(t,1,!1,t.toLowerCase(),null,!0,!0)});function wg(t,e,r,n){var i=_r.hasOwnProperty(e)?_r[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{j1=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?zc(t):""}function m_(t){switch(t.tag){case 5:return zc(t.type);case 16:return zc("Lazy");case 13:return zc("Suspense");case 19:return zc("SuspenseList");case 0:case 2:case 15:return t=F1(t.type,!1),t;case 11:return t=F1(t.type.render,!1),t;case 1:return t=F1(t.type,!0),t;default:return""}}function ay(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 iy:return"Profiler";case Cg:return"StrictMode";case sy:return"Suspense";case oy:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case a3:return(t.displayName||"Context")+".Consumer";case o3:return(t._context.displayName||"Context")+".Provider";case Eg:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Sg:return e=t.displayName||null,e!==null?e:ay(t.type)||"Memo";case Is:e=t._payload,t=t._init;try{return ay(t(e))}catch{}}return null}function x_(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 ay(e);case 8:return e===Cg?"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 c3(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function b_(t){var e=c3(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 Lu(t){t._valueTracker||(t._valueTracker=b_(t))}function f3(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=c3(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function t0(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 ly(t,e){var r=e.checked;return zt({},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 u3(t,e){e=e.checked,e!=null&&wg(t,"checked",e,!1)}function cy(t,e){u3(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")?fy(t,e.type,r):e.hasOwnProperty("defaultValue")&&fy(t,e.type,no(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Eb(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 fy(t,e,r){(e!=="number"||t0(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Vc=Array.isArray;function gl(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=ju.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Pf(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Yc={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},w_=["Webkit","ms","Moz","O"];Object.keys(Yc).forEach(function(t){w_.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Yc[e]=Yc[t]})});function y3(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Yc.hasOwnProperty(t)&&Yc[t]?(""+e).trim():e+"px"}function p3(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=y3(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var C_=zt({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 hy(t,e){if(e){if(C_[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 vy(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 yy=null;function kg(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var py=null,ml=null,xl=null;function Ab(t){if(t=yu(t)){if(typeof py!="function")throw Error(se(280));var e=t.stateNode;e&&(e=kh(e),py(t.stateNode,t.type,e))}}function g3(t){ml?xl?xl.push(t):xl=[t]:ml=t}function m3(){if(ml){var t=ml,e=xl;if(xl=ml=null,Ab(t),e)for(t=0;t>>=0,t===0?32:31-(N_(t)/O_|0)|0}var Fu=64,Uu=4194304;function qc(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 s0(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=qc(a):(s&=o,s!==0&&(n=qc(s)))}else o=r&~i,o!==0?n=qc(o):s!==0&&(n=qc(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 hu(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ri(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=Xc),$b=" ",Db=!1;function L3(t,e){switch(t){case"keyup":return dT.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function j3(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var el=!1;function vT(t,e){switch(t){case"compositionend":return j3(e);case"keypress":return e.which!==32?null:(Db=!0,$b);case"textInput":return t=e.data,t===$b&&Db?null:t;default:return null}}function yT(t,e){if(el)return t==="compositionend"||!Ng&&L3(t,e)?(t=D3(),Sd=Ig=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=Fb(r)}}function V3(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?V3(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function q3(){for(var t=window,e=t0();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=t0(t.document)}return e}function Og(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 ST(t){var e=q3(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&V3(r.ownerDocument.documentElement,r)){if(n!==null&&Og(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=Ub(r,s);var o=Ub(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,Cy=null,ef=null,Ey=!1;function zb(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ey||tl==null||tl!==t0(n)||(n=tl,"selectionStart"in n&&Og(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}),ef&&$f(ef,n)||(ef=n,n=l0(Cy,"onSelect"),0il||(t.current=Py[il],Py[il]=null,il--)}function rt(t,e){il++,Py[il]=t.current,t.current=e}var io={},Br=go(io),sn=go(!1),da=io;function $l(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 on(t){return t=t.childContextTypes,t!=null}function f0(){Nt(sn),Nt(Br)}function Jb(t,e,r){if(Br.current!==io)throw Error(se(168));rt(Br,e),rt(sn,r)}function Z3(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,x_(t)||"Unknown",i));return zt({},r,n)}function u0(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||io,da=Br.current,rt(Br,t),rt(sn,sn.current),!0}function Yb(t,e,r){var n=t.stateNode;if(!n)throw Error(se(169));r?(t=Z3(t,e,da),n.__reactInternalMemoizedMergedChildContext=t,Nt(sn),Nt(Br),rt(Br,t)):Nt(sn),rt(sn,r)}var Hi=null,Ah=!1,ev=!1;function e4(t){Hi===null?Hi=[t]:Hi.push(t)}function DT(t){Ah=!0,e4(t)}function mo(){if(!ev&&Hi!==null){ev=!0;var t=0,e=Ge;try{var r=Hi;for(Ge=1;t>=o,i-=o,Ji=1<<32-ri(e)+i|r<F?(W=z,z=null):W=z.sibling;var G=h(w,z,A[F],I);if(G===null){z===null&&(z=W);break}t&&z&&G.alternate===null&&e(w,z),E=s(G,E,F),j===null?M=G:j.sibling=G,j=G,z=W}if(F===A.length)return r(w,z),Dt&&Vo(w,F),M;if(z===null){for(;FF?(W=z,z=null):W=z.sibling;var ee=h(w,z,G.value,I);if(ee===null){z===null&&(z=W);break}t&&z&&ee.alternate===null&&e(w,z),E=s(ee,E,F),j===null?M=ee:j.sibling=ee,j=ee,z=W}if(G.done)return r(w,z),Dt&&Vo(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 Dt&&Vo(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)}),Dt&&Vo(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 Bu: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&&n2(M)===j.type){r(w,j.sibling),E=i(j,A.props),E.ref=_c(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=na(A.props.children,w.mode,I,A.key),E.return=w,w=E):(I=Md(A.type,A.key,A.props,null,w.mode,I),I.ref=_c(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=lv(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(Vc(A))return g(w,E,A,I);if(Cc(A))return p(w,E,A,I);Ku(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=av(A,w.mode,I),E.return=w,w=E),o(w)):r(w,E)}return k}var Bl=l4(!0),c4=l4(!1),pu={},Si=go(pu),jf=go(pu),Ff=go(pu);function Xo(t){if(t===pu)throw Error(se(174));return t}function Vg(t,e){switch(rt(Ff,e),rt(jf,t),rt(Si,pu),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:dy(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=dy(e,t)}Nt(Si),rt(Si,e)}function Ll(){Nt(Si),Nt(jf),Nt(Ff)}function f4(t){Xo(Ff.current);var e=Xo(Si.current),r=dy(e,t.type);e!==r&&(rt(jf,t),rt(Si,r))}function qg(t){jf.current===t&&(Nt(Si),Nt(jf))}var Ft=go(0);function g0(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 tv=[];function Hg(){for(var t=0;tr?r:4,t(!0);var n=rv.transition;rv.transition={};try{t(!1),e()}finally{Ge=r,rv.transition=n}}function A4(){return On().memoizedState}function FT(t,e,r){var n=Js(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},_4(t))T4(e,r);else if(r=i4(t,e,r,n),r!==null){var i=Gr();ni(r,t,n,i),P4(r,e,n)}}function UT(t,e,r){var n=Js(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(_4(t))T4(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,oi(a,o)){var l=e.interleaved;l===null?(i.next=i,Ug(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=i4(t,e,i,n),r!==null&&(i=Gr(),ni(r,t,n,i),P4(r,e,n))}}function _4(t){var e=t.alternate;return t===Ut||e!==null&&e===Ut}function T4(t,e){tf=m0=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function P4(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,_g(t,r)}}var x0={readContext:Nn,useCallback:Pr,useContext:Pr,useEffect:Pr,useImperativeHandle:Pr,useInsertionEffect:Pr,useLayoutEffect:Pr,useMemo:Pr,useReducer:Pr,useRef:Pr,useState:Pr,useDebugValue:Pr,useDeferredValue:Pr,useTransition:Pr,useMutableSource:Pr,useSyncExternalStore:Pr,useId:Pr,unstable_isNewReconciler:!1},zT={readContext:Nn,useCallback:function(t,e){return di().memoizedState=[t,e===void 0?null:e],t},useContext:Nn,useEffect:s2,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Td(4194308,4,w4.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Td(4194308,4,t,e)},useInsertionEffect:function(t,e){return Td(4,2,t,e)},useMemo:function(t,e){var r=di();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=di();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,Ut,t),[n.memoizedState,t]},useRef:function(t){var e=di();return t={current:t},e.memoizedState=t},useState:i2,useDebugValue:Yg,useDeferredValue:function(t){return di().memoizedState=t},useTransition:function(){var t=i2(!1),e=t[0];return t=jT.bind(null,t[1]),di().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Ut,i=di();if(Dt){if(r===void 0)throw Error(se(407));r=r()}else{if(r=e(),gr===null)throw Error(se(349));va&30||h4(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,s2(y4.bind(null,n,s,t),[t]),n.flags|=2048,Vf(9,v4.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=di(),e=gr.identifierPrefix;if(Dt){var r=Yi,n=Ji;r=(n&~(1<<32-ri(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Uf++,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[pi]=e,t[Lf]=n,L4(t,e,!1,!1),e.stateNode=t;e:{switch(o=vy(r,n),r){case"dialog":Rt("cancel",t),Rt("close",t),i=n;break;case"iframe":case"object":case"embed":Rt("load",t),i=n;break;case"video":case"audio":for(i=0;iFl&&(e.flags|=128,n=!0,Tc(s,!1),e.lanes=4194304)}else{if(!n)if(t=g0(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Tc(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Dt)return Ir(e),null}else 2*Zt()-s.renderingStartTime>Fl&&r!==1073741824&&(e.flags|=128,n=!0,Tc(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=Ft.current,rt(Ft,n?r&1|2:r&1),e):(Ir(e),null);case 22:case 23:return rm(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?un&1073741824&&(Ir(e),e.subtreeFlags&6&&(e.flags|=8192)):Ir(e),null;case 24:return null;case 25:return null}throw Error(se(156,e.tag))}function YT(t,e){switch(Dg(e),e.tag){case 1:return on(e.type)&&f0(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ll(),Nt(sn),Nt(Br),Hg(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return qg(e),null;case 13:if(Nt(Ft),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(se(340));Dl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Nt(Ft),null;case 4:return Ll(),null;case 10:return Fg(e.type._context),null;case 22:case 23:return rm(),null;case 24:return null;default:return null}}var Yu=!1,Mr=!1,QT=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 Uy(t,e,r){try{r()}catch(n){Ht(t,e,n)}}var v2=!1;function XT(t,e){if(Sy=o0,t=q3(),Og(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(ky={focusedElem:t,selectionRange:r},o0=!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:Kn(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=v2,v2=!1,g}function rf(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&&Uy(e,r,s)}i=i.next}while(i!==n)}}function Ph(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 zy(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 U4(t){var e=t.alternate;e!==null&&(t.alternate=null,U4(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[pi],delete e[Lf],delete e[Ty],delete e[OT],delete e[$T])),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 z4(t){return t.tag===5||t.tag===3||t.tag===4}function y2(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||z4(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 Vy(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=c0));else if(n!==4&&(t=t.child,t!==null))for(Vy(t,e,r),t=t.sibling;t!==null;)Vy(t,e,r),t=t.sibling}function qy(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(qy(t,e,r),t=t.sibling;t!==null;)qy(t,e,r),t=t.sibling}var wr=null,Yn=!1;function Es(t,e,r){for(r=r.child;r!==null;)V4(t,e,r),r=r.sibling}function V4(t,e,r){if(Ei&&typeof Ei.onCommitFiberUnmount=="function")try{Ei.onCommitFiberUnmount(wh,r)}catch{}switch(r.tag){case 5:Mr||ll(r,e);case 6:var n=wr,i=Yn;wr=null,Es(t,e,r),wr=n,Yn=i,wr!==null&&(Yn?(t=wr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):wr.removeChild(r.stateNode));break;case 18:wr!==null&&(Yn?(t=wr,r=r.stateNode,t.nodeType===8?Z1(t.parentNode,r):t.nodeType===1&&Z1(t,r),Nf(t)):Z1(wr,r.stateNode));break;case 4:n=wr,i=Yn,wr=r.stateNode.containerInfo,Yn=!0,Es(t,e,r),wr=n,Yn=i;break;case 0:case 11:case 14:case 15:if(!Mr&&(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)&&Uy(r,e,o),i=i.next}while(i!==n)}Es(t,e,r);break;case 1:if(!Mr&&(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?(Mr=(n=Mr)||r.memoizedState!==null,Es(t,e,r),Mr=n):Es(t,e,r);break;default:Es(t,e,r)}}function p2(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new QT),e.forEach(function(n){var i=aP.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Fn(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*eP(n/1960))-n,10t?16:t,Bs===null)var n=!1;else{if(t=Bs,Bs=null,C0=0,je&6)throw Error(se(331));var i=je;for(je|=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()-em?ra(t,0):Zg|=r),an(t,e)}function Q4(t,e){e===0&&(t.mode&1?(e=Uu,Uu<<=1,!(Uu&130023424)&&(Uu=4194304)):e=1);var r=Gr();t=ns(t,e),t!==null&&(hu(t,e,r),an(t,r))}function oP(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),Q4(t,r)}function aP(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),Q4(t,r)}var X4;X4=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||sn.current)rn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return rn=!1,KT(t,e,r);rn=!!(t.flags&131072)}else rn=!1,Dt&&e.flags&1048576&&t4(e,h0,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Pd(t,e),t=e.pendingProps;var i=$l(e,Br.current);wl(e,r),i=Gg(null,e,n,t,i,r);var s=Kg();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,on(n)?(s=!0,u0(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,zg(e),i.updater=_h,e.stateNode=i,i._reactInternals=e,Oy(e,n,t,r),e=By(null,e,n,!0,s,r)):(e.tag=0,Dt&&s&&$g(e),qr(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Pd(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=cP(n),t=Kn(n,t),i){case 0:e=Dy(null,e,n,t,r);break e;case 1:e=u2(null,e,n,t,r);break e;case 11:e=c2(null,e,n,t,r);break e;case 14:e=f2(null,e,n,Kn(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:Kn(n,i),Dy(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Kn(n,i),u2(t,e,n,i,r);case 3:e:{if($4(e),t===null)throw Error(se(387));n=e.pendingProps,s=e.memoizedState,i=s.element,s4(t,e),p0(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=jl(Error(se(423)),e),e=d2(t,e,n,r,i);break e}else if(n!==i){i=jl(Error(se(424)),e),e=d2(t,e,n,r,i);break e}else for(yn=Ws(e.stateNode.containerInfo.firstChild),pn=e,Dt=!0,Qn=null,r=c4(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Dl(),n===i){e=is(t,e,r);break e}qr(t,e,n,r)}e=e.child}return e;case 5:return f4(e),t===null&&Ry(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,Ay(n,i)?o=null:s!==null&&Ay(n,s)&&(e.flags|=32),O4(t,e),qr(t,e,o,r),e.child;case 6:return t===null&&Ry(e),null;case 13:return D4(t,e,r);case 4:return Vg(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Bl(e,null,n,r):qr(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Kn(n,i),c2(t,e,n,i,r);case 7:return qr(t,e,e.pendingProps,r),e.child;case 8:return qr(t,e,e.pendingProps.children,r),e.child;case 12:return qr(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,rt(v0,n._currentValue),n._currentValue=o,s!==null)if(oi(s.value,o)){if(s.children===i.children&&!sn.current){e=is(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=Zi(-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),My(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),My(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}qr(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,wl(e,r),i=Nn(i),n=n(i),e.flags|=1,qr(t,e,n,r),e.child;case 14:return n=e.type,i=Kn(n,e.pendingProps),i=Kn(n.type,i),f2(t,e,n,i,r);case 15:return M4(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Kn(n,i),Pd(t,e),e.tag=1,on(n)?(t=!0,u0(e)):t=!1,wl(e,r),a4(e,n,i),Oy(e,n,i,r),By(null,e,n,!0,t,r);case 19:return B4(t,e,r);case 22:return N4(t,e,r)}throw Error(se(156,e.tag))};function Z4(t,e){return k3(t,e)}function lP(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 In(t,e,r,n){return new lP(t,e,r,n)}function im(t){return t=t.prototype,!(!t||!t.isReactComponent)}function cP(t){if(typeof t=="function")return im(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Eg)return 11;if(t===Sg)return 14}return 2}function Ys(t,e){var r=t.alternate;return r===null?(r=In(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 Md(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")im(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Za:return na(r.children,i,s,e);case Cg:o=8,i|=8;break;case iy:return t=In(12,r,e,i|2),t.elementType=iy,t.lanes=s,t;case sy:return t=In(13,r,e,i),t.elementType=sy,t.lanes=s,t;case oy:return t=In(19,r,e,i),t.elementType=oy,t.lanes=s,t;case l3:return Rh(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case o3:o=10;break e;case a3:o=9;break e;case Eg:o=11;break e;case Sg:o=14;break e;case Is:o=16,n=null;break e}throw Error(se(130,t==null?t:typeof t,""))}return e=In(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function na(t,e,r,n){return t=In(7,t,n,e),t.lanes=r,t}function Rh(t,e,r,n){return t=In(22,t,n,e),t.elementType=l3,t.lanes=r,t.stateNode={isHidden:!1},t}function av(t,e,r){return t=In(6,t,null,e),t.lanes=r,t}function lv(t,e,r){return e=In(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function fP(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=z1(0),this.expirationTimes=z1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=z1(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function sm(t,e,r,n,i,s,o,a,l){return t=new fP(t,e,r,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=In(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},zg(s),t}function uP(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n8)}catch(t){console.error(t)}}n8(),t3.exports=wn;var xo=t3.exports;const pP=yo(xo),cm=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Dh=S.createContext({});function gP(){return S.useContext(Dh).visualElement}const gu=S.createContext(null),Bh=typeof document<"u",k0=Bh?S.useLayoutEffect:S.useEffect,i8=S.createContext({strict:!1});function mP(t,e,r,n){const i=gP(),s=S.useContext(i8),o=S.useContext(gu),a=S.useContext(cm).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 k0(()=>{c&&c.render()}),(window.HandoffAppearAnimations?k0:S.useEffect)(()=>{c&&c.animationState&&c.animationState.animateChanges()}),c}function fl(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function xP(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 Hf(t){return typeof t=="string"||Array.isArray(t)}function Lh(t){return typeof t=="object"&&typeof t.start=="function"}const bP=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function jh(t){return Lh(t.animate)||bP.some(e=>Hf(t[e]))}function s8(t){return!!(jh(t)||t.variants)}function wP(t,e){if(jh(t)){const{initial:r,animate:n}=t;return{initial:r===!1||Hf(r)?r:void 0,animate:Hf(n)?n:void 0}}return t.inherit!==!1?e:{}}function CP(t){const{initial:e,animate:r}=wP(t,S.useContext(Dh));return S.useMemo(()=>({initial:e,animate:r}),[S2(e),S2(r)])}function S2(t){return Array.isArray(t)?t.join(" "):t}const ji=t=>({isEnabled:e=>t.some(r=>!!e[r])}),Wf={measureLayout:ji(["layout","layoutId","drag"]),animation:ji(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:ji(["exit"]),drag:ji(["drag","dragControls"]),focus:ji(["whileFocus"]),hover:ji(["whileHover","onHoverStart","onHoverEnd"]),tap:ji(["whileTap","onTap","onTapStart","onTapCancel"]),pan:ji(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:ji(["whileInView","onViewportEnter","onViewportLeave"])};function EP(t){for(const e in t)e==="projectionNodeConstructor"?Wf.projectionNodeConstructor=t[e]:Wf[e].Component=t[e]}function Fh(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const of={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let SP=1;function kP(){return Fh(()=>{if(of.hasEverUpdated)return SP++})}const fm=S.createContext({});class AP extends fr.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}}const o8=S.createContext({}),_P=Symbol.for("motionComponentSymbol");function TP({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:i,Component:s}){t&&EP(t);function o(l,c){const f={...S.useContext(cm),...l,layoutId:PP(l)},{isStatic:u}=f;let h=null;const y=CP(l),g=u?void 0:kP(),p=i(l,u);if(!u&&Bh){y.visualElement=mP(s,p,f,e);const k=S.useContext(i8).strict,w=S.useContext(o8);y.visualElement&&(h=y.visualElement.loadFeatures(f,k,t,g,r||Wf.projectionNodeConstructor,w))}return S.createElement(AP,{visualElement:y.visualElement,props:f},h,S.createElement(Dh.Provider,{value:y},n(s,l,g,xP(p,y.visualElement,c),p,u,y.visualElement)))}const a=S.forwardRef(o);return a[_P]=s,a}function PP({layoutId:t}){const e=S.useContext(fm).id;return e&&t!==void 0?e+"-"+t:t}function IP(t){function e(n,i={}){return TP(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 RP=["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 um(t){return typeof t!="string"||t.includes("-")?!1:!!(RP.indexOf(t)>-1||/[A-Z]/.test(t))}const A0={};function MP(t){Object.assign(A0,t)}const _0=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],sc=new Set(_0);function a8(t,{layout:e,layoutId:r}){return sc.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!A0[t]||t==="opacity")}const ln=t=>!!(t!=null&&t.getVelocity),NP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},OP=(t,e)=>_0.indexOf(t)-_0.indexOf(e);function $P({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},i,s){let o="";e.sort(OP);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 l8(t){return t.startsWith("--")}const DP=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Ul=(t,e,r)=>Math.min(Math.max(r,t),e),_a={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},af={..._a,transform:t=>Ul(0,1,t)},Zu={..._a,default:1},lf=t=>Math.round(t*1e5)/1e5,Gf=/(-)?([\d]*\.?[\d])+/g,Jy=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,BP=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function mu(t){return typeof t=="string"}const xu=t=>({test:e=>mu(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ts=xu("deg"),ki=xu("%"),ye=xu("px"),LP=xu("vh"),jP=xu("vw"),k2={...ki,parse:t=>ki.parse(t)/100,transform:t=>ki.transform(t*100)},A2={..._a,transform:Math.round},c8={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:Zu,scaleX:Zu,scaleY:Zu,scaleZ:Zu,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:af,originX:k2,originY:k2,originZ:ye,zIndex:A2,fillOpacity:af,strokeOpacity:af,numOctaves:A2};function dm(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(l8(h)){s[h]=y;continue}const g=c8[h],p=DP(y,g);if(sc.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=$P(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 hm=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function f8(t,e,r){for(const n in e)!ln(e[n])&&!a8(n,r)&&(t[n]=e[n])}function FP({transformTemplate:t},e,r){return S.useMemo(()=>{const n=hm();return dm(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function UP(t,e,r){const n=t.style||{},i={};return f8(i,n,t),Object.assign(i,FP(t,e,r)),t.transformValues?t.transformValues(i):i}function zP(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 VP=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 T0(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||VP.has(t)}let u8=t=>!T0(t);function qP(t){t&&(u8=e=>e.startsWith("on")?!T0(e):t(e))}try{qP(require("@emotion/is-prop-valid").default)}catch{}function HP(t,e,r){const n={};for(const i in t)i==="values"&&typeof t.values=="object"||(u8(i)||r===!0&&T0(i)||!e&&!T0(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}function _2(t,e,r){return typeof t=="string"?t:ye.transform(e+r*t)}function WP(t,e,r){const n=_2(e,t.x,t.width),i=_2(r,t.y,t.height);return`${n} ${i}`}const GP={offset:"stroke-dashoffset",array:"stroke-dasharray"},KP={offset:"strokeDashoffset",array:"strokeDasharray"};function JP(t,e,r=1,n=0,i=!0){t.pathLength=1;const s=i?GP:KP;t[s.offset]=ye.transform(-n);const o=ye.transform(e),a=ye.transform(r);t[s.array]=`${o} ${a}`}function vm(t,{attrX:e,attrY:r,originX:n,originY:i,pathLength:s,pathSpacing:o=1,pathOffset:a=0,...l},c,f,u){if(dm(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=WP(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&&JP(h,s,o,a,!1)}const d8=()=>({...hm(),attrs:{}}),ym=t=>typeof t=="string"&&t.toLowerCase()==="svg";function YP(t,e,r,n){const i=S.useMemo(()=>{const s=d8();return vm(s,e,{enableHardwareAcceleration:!1},ym(n),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};f8(s,t.style,t),i.style={...s,...i.style}}return i}function QP(t=!1){return(r,n,i,s,{latestValues:o},a)=>{const c=(um(r)?YP:zP)(n,o,a,r),u={...HP(n,typeof r=="string",t),...c,ref:s},{children:h}=n,y=S.useMemo(()=>ln(h)?h.get():h,[h]);return i&&(u["data-projection-id"]=i),S.createElement(r,{...u,children:y})}}const pm=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function h8(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 v8=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 y8(t,e,r,n){h8(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(v8.has(i)?i:pm(i),e.attrs[i])}function gm(t,e){const{style:r}=t,n={};for(const i in r)(ln(r[i])||e.style&&ln(e.style[i])||a8(i,t))&&(n[i]=r[i]);return n}function p8(t,e){const r=gm(t,e);for(const n in t)if(ln(t[n])||ln(e[n])){const i=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[i]=t[n]}return r}function mm(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 P0=t=>Array.isArray(t),XP=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),ZP=t=>P0(t)?t[t.length-1]||0:t;function Nd(t){const e=ln(t)?t.get():t;return XP(e)?e.toValue():e}function eI({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,i,s){const o={latestValues:tI(n,i,s,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const g8=t=>(e,r)=>{const n=S.useContext(Dh),i=S.useContext(gu),s=()=>eI(t,e,n,i);return r?s():Fh(s)};function tI(t,e,r,n){const i={},s=n(t,{});for(const h in s)i[h]=Nd(s[h]);let{initial:o,animate:a}=t;const l=jh(t),c=s8(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"&&!Lh(u)&&(Array.isArray(u)?u:[u]).forEach(y=>{const g=mm(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 rI={useVisualState:g8({scrapeMotionValuesFromProps:p8,createRenderState:d8,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}}vm(r,n,{enableHardwareAcceleration:!1},ym(e.tagName),t.transformTemplate),y8(e,r)}})},nI={useVisualState:g8({scrapeMotionValuesFromProps:gm,createRenderState:hm})};function iI(t,{forwardMotionProps:e=!1},r,n,i){return{...um(t)?rI:nI,preloadedFeatures:r,useRender:QP(e),createVisualElement:n,projectionNodeConstructor:i,Component:t}}var tt;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(tt||(tt={}));function ia(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function I0(t,e,r,n){S.useEffect(()=>{const i=t.current;if(r&&i)return ia(i,e,r,n)},[t,e,r,n])}function sI({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(tt.Focus,!0),r.current=!0)},[n]),s=S.useCallback(()=>{!r.current||!n||(n.setActive(tt.Focus,!1),r.current=!1)},[n]);I0(e,"focus",t?i:void 0),I0(e,"blur",t?s:void 0)}const m8=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Uh(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const x8=t=>e=>m8(e)&&t(e,Uh(e));function El(t,e,r,n){return ia(t,e,x8(r),n)}function R0(t,e,r,n){return I0(t,e,r&&x8(r),n)}function b8(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const T2=b8("dragHorizontal"),P2=b8("dragVertical");function w8(t){let e=!1;if(t==="y")e=P2();else if(t==="x")e=T2();else{const r=T2(),n=P2();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function C8(){const t=w8(!0);return t?(t(),!1):!0}function I2(t,e,r,n){return(i,s)=>{i.type==="touch"||C8()||(r&&t.animationState&&t.animationState.setActive(tt.Hover,e),n&&n(i,s))}}function oI({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){R0(n,"pointerenter",S.useMemo(()=>t||r?I2(n,!0,!!r,t):void 0,[t,!!r,n]),{passive:!t}),R0(n,"pointerleave",S.useMemo(()=>e||r?I2(n,!1,!!r,e):void 0,[t,!!r,n]),{passive:!e})}const E8=(t,e)=>e?t===e?!0:E8(t,e.parentElement):!1;function xm(t){return S.useEffect(()=>()=>t(),[])}const aI=(t,e)=>r=>e(t(r)),zh=(...t)=>t.reduce(aI);function cv(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,Uh(r))}function lI({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(tt.Tap,!1),!C8()}function h(E,A){var I,M,j,z;u()&&(E8(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(tt.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=zh(El(window,"pointerup",h,c),El(window,"pointercancel",y,c)),g(E,A))},p);R0(i,"pointerdown",o?k:void 0,c);const w=S.useCallback(()=>{const E=ia(i.current,"keydown",I=>{I.key!=="Enter"||a.current||(a.current=!0,l.current=ia(i.current,"keyup",()=>{I.key!=="Enter"||!u()||cv("up",i.getProps().onTap)},c),cv("down",g))}),A=ia(i.current,"blur",()=>{E(),A(),a.current&&cv("cancel",y)})},p);I0(i,"focus",o?w:void 0),xm(f)}const Yy=new WeakMap,fv=new WeakMap,cI=t=>{const e=Yy.get(t.target);e&&e(t)},fI=t=>{t.forEach(cI)};function uI({root:t,...e}){const r=t||document;fv.has(r)||fv.set(r,{});const n=fv.get(r),i=JSON.stringify(e);return n[i]||(n[i]=new IntersectionObserver(fI,{root:t,...e})),n[i]}function dI(t,e,r){const n=uI(e);return Yy.set(t,r),n.observe(t),()=>{Yy.delete(t),n.unobserve(t)}}function hI({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"?pI:yI)(o,s.current,t,i)}const vI={some:0,all:1};function yI(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:vI[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(tt.InView,f);const u=r.getProps(),h=f?u.onViewportEnter:u.onViewportLeave;h&&h(c)};return dI(r.current,a,l)},[t,n,i,s])}function pI(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(tt.InView,!0)})},[t])}const Ls=t=>e=>(t(e),null),gI={inView:Ls(hI),tap:Ls(lI),focus:Ls(sI),hover:Ls(oI)};function S8(){const t=S.useContext(gu);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 k8(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),xI=t=>/^0[^.\s]+$/.test(t),es={delta:0,timestamp:0},A8=1/60*1e3,bI=typeof performance<"u"?()=>performance.now():()=>Date.now(),_8=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(bI()),A8);function wI(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]=wI(()=>Kf=!0),t),{}),$r=bu.reduce((t,e)=>{const r=Vh[e];return t[e]=(n,i=!1,s=!1)=>(Kf||SI(),r.schedule(n,i,s)),t},{}),so=bu.reduce((t,e)=>(t[e]=Vh[e].cancel,t),{}),uv=bu.reduce((t,e)=>(t[e]=()=>Vh[e].process(es),t),{}),EI=t=>Vh[t].process(es),T8=t=>{Kf=!1,es.delta=Qy?A8:Math.max(Math.min(t-es.timestamp,CI),1),es.timestamp=t,Xy=!0,bu.forEach(EI),Xy=!1,Kf&&(Qy=!1,_8(T8))},SI=()=>{Kf=!0,Qy=!0,Xy||_8(T8)};function bm(t,e){t.indexOf(e)===-1&&t.push(e)}function wm(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class Cm{constructor(){this.subscriptions=[]}add(e){return bm(this.subscriptions,e),()=>wm(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 AI{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}=es;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,$r.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=()=>$r.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=kI(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new Cm);const n=this.events[e].add(r);return e==="change"?()=>{n(),$r.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?Em(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 zl(t,e){return new AI(t,e)}const Sm=(t,e)=>r=>!!(mu(r)&&BP.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),P8=(t,e,r)=>n=>{if(!mu(n))return n;const[i,s,o,a]=n.match(Gf);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},_I=t=>Ul(0,255,t),dv={..._a,transform:t=>Math.round(_I(t))},Zo={test:Sm("rgb","red"),parse:P8("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+dv.transform(t)+", "+dv.transform(e)+", "+dv.transform(r)+", "+lf(af.transform(n))+")"};function TI(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 Zy={test:Sm("#"),parse:TI,transform:Zo.transform},ul={test:Sm("hsl","hue"),parse:P8("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+ki.transform(lf(e))+", "+ki.transform(lf(r))+", "+lf(af.transform(n))+")"},Vr={test:t=>Zo.test(t)||Zy.test(t)||ul.test(t),parse:t=>Zo.test(t)?Zo.parse(t):ul.test(t)?ul.parse(t):Zy.parse(t),transform:t=>mu(t)?t:t.hasOwnProperty("red")?Zo.transform(t):ul.transform(t)},I8="${c}",R8="${n}";function PI(t){var e,r;return isNaN(t)&&mu(t)&&(((e=t.match(Gf))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(Jy))===null||r===void 0?void 0:r.length)||0)>0}function M0(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const i=t.match(Jy);i&&(r=i.length,t=t.replace(Jy,I8),e.push(...i.map(Vr.parse)));const s=t.match(Gf);return s&&(n=s.length,t=t.replace(Gf,R8),e.push(...s.map(_a.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function M8(t){return M0(t).values}function N8(t){const{values:e,numColors:r,tokenised:n}=M0(t),i=e.length;return s=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function RI(t){const e=M8(t);return N8(t)(e.map(II))}const oo={test:PI,parse:M8,createTransformer:N8,getAnimatableNone:RI},MI=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(Gf)||[];if(!n)return t;const i=r.replace(n,"");let s=MI.has(e)?1:0;return n!==r&&(s*=100),e+"("+s+i+")"}const OI=/([a-z-]*)\(.*?\)/g,ep={...oo,getAnimatableNone:t=>{const e=t.match(OI);return e?e.map(NI).join(" "):t}},$I={...c8,color:Vr,backgroundColor:Vr,outlineColor:Vr,fill:Vr,stroke:Vr,borderColor:Vr,borderTopColor:Vr,borderRightColor:Vr,borderBottomColor:Vr,borderLeftColor:Vr,filter:ep,WebkitFilter:ep},km=t=>$I[t];function Am(t,e){var r;let n=km(t);return n!==ep&&(n=oo),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const O8=t=>e=>e.test(t),DI={test:t=>t==="auto",parse:t=>t},$8=[_a,ye,ki,Ts,jP,LP,DI],Ic=t=>$8.find(O8(t)),BI=[...$8,Vr,oo],LI=t=>BI.find(O8(t));function jI(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 qh(t,e,r){const n=t.getProps();return mm(n,e,r!==void 0?r:n.custom,jI(t),FI(t))}function UI(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,zl(r))}function zI(t,e){const r=qh(t,e);let{transitionEnd:n={},transition:i={},...s}=r?t.makeTargetAnimatable(r,!1):{};s={...s,...n};for(const o in s){const a=ZP(s[o]);UI(t,o,a)}}function VI(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,KI={current:!1},_m=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Tm=t=>e=>1-t(1-e),Pm=t=>t*t,JI=Tm(Pm),Im=_m(Pm),Jt=(t,e,r)=>-r*t+r*e+t;function hv(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 YI({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=hv(l,a,t+1/3),s=hv(l,a,t),o=hv(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}const vv=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},QI=[Zy,Zo,ul],XI=t=>QI.find(e=>e.test(t));function R2(t){const e=XI(t);let r=e.parse(t);return e===ul&&(r=YI(r)),r}const D8=(t,e)=>{const r=R2(t),n=R2(e),i={...r};return s=>(i.red=vv(r.red,n.red,s),i.green=vv(r.green,n.green,s),i.blue=vv(r.blue,n.blue,s),i.alpha=Jt(r.alpha,n.alpha,s),Zo.transform(i))};function B8(t,e){return typeof t=="number"?r=>Jt(t,e,r):Vr.test(t)?D8(t,e):j8(t,e)}const L8=(t,e)=>{const r=[...t],n=r.length,i=t.map((s,o)=>B8(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]=B8(t[i],e[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}},j8=(t,e)=>{const r=oo.createTransformer(e),n=M0(t),i=M0(e);return n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?zh(L8(n.values,i.values),r):o=>`${o>0?e:t}`},$0=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},M2=(t,e)=>r=>Jt(t,e,r);function eR(t){return typeof t=="number"?M2:typeof t=="string"?Vr.test(t)?D8:j8:Array.isArray(t)?L8:typeof t=="object"?ZI:M2}function tR(t,e,r){const n=[],i=r||eR(t[0]),s=t.length-1;for(let o=0;ot[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=tR(e,n,i),a=o.length,l=c=>{let f=0;if(a>1)for(;fl(Ul(t[0],t[s-1],c)):l}const Rm=t=>t,U8=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,rR=1e-7,nR=12;function iR(t,e,r,n,i){let s,o,a=0;do o=e+(r-e)/2,s=U8(o,n,i)-t,s>0?r=o:e=o;while(Math.abs(s)>rR&&++aiR(s,0,1,t,r);return s=>s===0||s===1?s:U8(i(s),e,n)}const V8=t=>1-Math.sin(Math.acos(t)),Mm=Tm(V8),sR=_m(Mm),q8=z8(.33,1.53,.69,.99),Nm=Tm(q8),oR=_m(Nm),aR=t=>(t*=2)<1?.5*Nm(t):.5*(2-Math.pow(2,-10*(t-1))),lR={linear:Rm,easeIn:Pm,easeInOut:Im,easeOut:JI,circIn:V8,circInOut:sR,circOut:Mm,backIn:Nm,backInOut:oR,backOut:q8,anticipate:aR},N2=t=>{if(Array.isArray(t)){O0(t.length===4);const[e,r,n,i]=t;return z8(e,r,n,i)}else if(typeof t=="string")return lR[t];return t},cR=t=>Array.isArray(t)&&typeof t[0]!="number";function fR(t,e){return t.map(()=>e||Im).splice(0,t.length-1)}function uR(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function dR(t,e){return t.map(r=>r*e)}function tp({keyframes:t,ease:e=Im,times:r,duration:n=300}){t=[...t];const i=cR(e)?e.map(N2):N2(e),s={done:!1,value:t[0]},o=dR(r&&r.length===t.length?r:uR(t),n);function a(){return F8(o,t,{ease:Array.isArray(i)?i:fR(t,i)})}let l=a();return{next:c=>(s.value=l(c),s.done=c>=n,s),flipTarget:()=>{t.reverse(),l=a()}}}const yv=.001,hR=.01,vR=10,yR=.05,pR=1;function gR({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s,o=1-e;o=Ul(yR,pR,o),t=Ul(hR,vR,t/1e3),o<1?(i=c=>{const f=c*o,u=f*t,h=f-r,y=rp(c,o),g=Math.exp(-u);return yv-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=rp(Math.pow(c,2),o);return(-i(c)+yv>0?-1:1)*((h-y)*g)/p}):(i=c=>{const f=Math.exp(-c*t),u=(c-r)*t+1;return-yv+f*u},s=c=>{const f=Math.exp(-c*t),u=(r-c)*(t*t);return f*u});const a=5/t,l=xR(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 mR=12;function xR(t,e,r){let n=r;for(let i=1;it[r]!==void 0)}function CR(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!O2(t,wR)&&O2(t,bR)){const r=gR(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const ER=5;function H8({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}=CR(n);let y=SR,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=rp(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-ER);A=Em(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()}}}H8.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const SR=t=>0;function kR({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 AR={decay:kR,keyframes:tp,tween:tp,spring:H8};function W8(t,e,r=0){return t-e-r}function _R(t,e=0,r=0,n=!0){return n?W8(e+-t,e,r):e-(t-e)+r}function TR(t,e,r,n){return n?t>=e+r:t<=-r}const PR=t=>{const e=({delta:r})=>t(r);return{start:()=>$r.update(e,!0),stop:()=>so.update(e)}};function D0({duration:t,driver:e=PR,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=AR[o.length>2?"keyframes":y]||tp,W=o[0],G=o[o.length-1];let ee={done:!1,value:W};!((k=(p=F).needsInterpolation)===null||k===void 0)&&k.call(p,W,G)&&(z=F8([0,100],[W,G],{clamp:!1}),o=[0,100]);const oe=F({...g,duration:t,keyframes:o});function D(){A++,i==="reverse"?(j=A%2===0,r=_R(r,I,s,j)):(r=W8(r,I,s),i==="mirror"&&oe.flipTarget()),M=!1,u&&u()}function v(){E&&E.stop(),f&&f()}function C(N){j||(N=-N),r+=N,M||(ee=oe.next(Math.max(0,r)),z&&(ee.value=z(ee.value)),M=j?ee.done:r<=0),h&&h(ee.value),M&&(A===0&&(I=I!==void 0?I:r),A{c&&c(),E&&E.stop()},set currentTime(N){r=w,C(N)},sample:N=>{r=w;const x=t&&typeof t=="number"?Math.max(t*.5,50):50;let T=0;for(C(0);T<=N;){const R=N-T;C(Math.min(R,x)),T+=x}return ee}}}function IR(t){return!t||Array.isArray(t)||typeof t=="string"&&G8[t]}const Wc=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,G8={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wc([0,.65,.55,1]),circOut:Wc([.55,0,1,.45]),backIn:Wc([.31,.01,.66,-.59]),backOut:Wc([.33,1.53,.69,.99])};function RR(t){if(t)return Array.isArray(t)?Wc(t):G8[t]}function MR(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:RR(a),fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const $2={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},pv={},K8={};for(const t in $2)K8[t]=()=>(pv[t]===void 0&&(pv[t]=$2[t]()),pv[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 OR=new Set(["opacity"]),ed=10;function $R(t,e,{onUpdate:r,onComplete:n,...i}){if(!(K8.waapi()&&OR.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"||!IR(i.ease)){if(i.repeat===1/0)return;const u=D0({...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+=ed;o=y,a=g-ed,c="linear"}const f=MR(t.owner.current,e,o,{...i,delay:-l,duration:a,ease:c});return f.onfinish=()=>{t.set(NR(o,i)),$r.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=D0({...i,autoplay:!1});t.setWithVelocity(h.sample(u-ed).value,h.sample(u).value,ed)}$r.update(()=>f.cancel())}}}function J8(t,e){const r=performance.now(),n=({timestamp:i})=>{const s=i-r;s>=e&&(so.read(n),t(s-e))};return $r.read(n,!0),()=>so.read(n)}function DR({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const i=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:J8(i,-e)}:i()}function BR({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 W=G=>{z=F,F=G,e=Em(G-z,es.delta),(j===1&&G>M||j===-1&&Gp==null?void 0:p.stop()}}const jo=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),td=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),gv=()=>({type:"keyframes",ease:"linear",duration:.3}),LR={type:"keyframes",duration:.8},D2={x:jo,y:jo,z:jo,rotate:jo,rotateX:jo,rotateY:jo,rotateZ:jo,scaleX:td,scaleY:td,scale:td,opacity:gv,backgroundColor:gv,color:gv,default:td},jR=(t,{keyframes:e})=>e.length>2?LR:(D2[t]||D2.default)(e[1]),np=(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 B2(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function L2(t){return typeof t=="number"?0:Am("",t)}function Y8(t,e){return t[e]||t.default||t}function UR(t,e,r,n){const i=np(e,r);let s=n.from!==void 0?n.from:t.get();return s==="none"&&i&&typeof r=="string"?s=Am(e,r):B2(s)&&typeof r=="string"?s=L2(r):!Array.isArray(r)&&B2(r)&&typeof s=="string"&&(r=L2(s)),Array.isArray(r)?(r[0]===null&&(r[0]=s),r):[s,r]}const Om=(t,e,r,n={})=>i=>{const s=Y8(n,t)||{},o=s.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Od(o);const l=UR(e,t,r,s),c=l[0],f=l[l.length-1],u=np(t,c),h=np(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||KI.current||s.type===!1)return DR(y);if(s.type==="inertia")return BR(y);FR(s)||(y={...y,...jR(t,y)}),y.duration&&(y.duration=Od(y.duration)),y.repeatDelay&&(y.repeatDelay=Od(y.repeatDelay));const g=e.owner,p=g&&g.current;if(g&&p instanceof HTMLElement&&!(g!=null&&g.getProps().onUpdate)){const k=$R(e,t,y);if(k)return k}return D0(y)};function zR(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const i=e.map(s=>ip(t,s,r));n=Promise.all(i)}else if(typeof e=="string")n=ip(t,e,r);else{const i=typeof e=="function"?qh(t,e,r.custom):e;n=Q8(t,i,r)}return n.then(()=>t.notify("AnimationComplete",e))}function ip(t,e,r={}){var n;const i=qh(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(s=r.transitionOverride);const o=i?()=>Q8(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 VR(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 Q8(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&&HR(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,$r))}let k=y.start(Om(h,y,g,t.shouldReduceMotion&&sc.has(h)?{type:!1}:p));N0(c)&&(c.add(h),k=k.then(()=>c.remove(h))),f.push(k)}return Promise.all(f).then(()=>{a&&zI(t,a)})}function VR(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(qR).forEach((c,f)=>{c.notify("AnimationStart",e),o.push(ip(c,e,{...s,delay:r+l(f)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function qR(t,e){return t.sortNodePosition(e)}function HR({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const $m=[tt.Animate,tt.InView,tt.Focus,tt.Hover,tt.Tap,tt.Drag,tt.Exit],WR=[...$m].reverse(),GR=$m.length;function KR(t){return e=>Promise.all(e.map(({animation:r,options:n})=>zR(t,r,n)))}function JR(t){let e=KR(t);const r=QR();let n=!0;const i=(l,c)=>{const f=qh(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 ee=G.reduce(i,{});j===!1&&(ee={});const{prevResolvedValues:oe={}}=A,D={...oe,...ee},v=C=>{W=!0,y.delete(C),A.needsAnimating[C]=!0};for(const C in D){const P=ee[C],N=oe[C];g.hasOwnProperty(C)||(P!==N?P0(P)&&P0(N)?!k8(P,N)||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=ee,A.isActive&&(g={...g,...ee}),n&&t.blockInitialAnimation&&(W=!1),W&&!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 YR(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!k8(e,t):!1}function Fo(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function QR(){return{[tt.Animate]:Fo(!0),[tt.InView]:Fo(),[tt.Hover]:Fo(),[tt.Tap]:Fo(),[tt.Drag]:Fo(),[tt.Focus]:Fo(),[tt.Exit]:Fo()}}const XR={animation:Ls(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=JR(t)),Lh(e)&&S.useEffect(()=>e.subscribe(t),[e])}),exit:Ls(t=>{const{custom:e,visualElement:r}=t,[n,i]=S8(),s=S.useContext(gu);S.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(tt.Exit,!n,{custom:s&&s.custom||e});o&&!n&&o.then(i)},[n])})},j2=(t,e)=>Math.abs(t-e);function ZR(t,e){const r=j2(t.x,e.x),n=j2(t.y,e.y);return Math.sqrt(r**2+n**2)}class X8{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=xv(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,u=ZR(c.offset,{x:0,y:0})>=3;if(!f&&!u)return;const{point:h}=c,{timestamp:y}=es;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=mv(f,this.transformPagePoint),$r.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:h}=this.handlers,y=xv(c.type==="pointercancel"?this.lastMoveEventInfo:mv(f,this.transformPagePoint),this.history);this.startEvent&&u&&u(c,y),h&&h(c,y)},!m8(e))return;this.handlers=r,this.transformPagePoint=n;const i=Uh(e),s=mv(i,this.transformPagePoint),{point:o}=s,{timestamp:a}=es;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=r;l&&l(e,xv(s,this.history)),this.removeListeners=zh(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 mv(t,e){return e?{point:e(t.point)}:t}function F2(t,e){return{x:t.x-e.x,y:t.y-e.y}}function xv({point:t},e){return{point:t,delta:F2(t,Z8(e)),offset:F2(t,eM(e)),velocity:tM(e,.1)}}function eM(t){return t[0]}function Z8(t){return t[t.length-1]}function tM(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const i=Z8(t);for(;r>=0&&(n=t[r],!(i.timestamp-n.timestamp>Od(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 xn(t){return t.max-t.min}function sp(t,e=0,r=.01){return Math.abs(t-e)<=r}function U2(t,e,r,n=.5){t.origin=n,t.originPoint=Jt(e.min,e.max,t.origin),t.scale=xn(r)/xn(e),(sp(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Jt(r.min,r.max,t.origin)-t.originPoint,(sp(t.translate)||isNaN(t.translate))&&(t.translate=0)}function cf(t,e,r,n){U2(t.x,e.x,r.x,n==null?void 0:n.originX),U2(t.y,e.y,r.y,n==null?void 0:n.originY)}function z2(t,e,r){t.min=r.min+e.min,t.max=t.min+xn(e)}function rM(t,e,r){z2(t.x,e.x,r.x),z2(t.y,e.y,r.y)}function V2(t,e,r){t.min=e.min-r.min,t.max=t.min+xn(e)}function ff(t,e,r){V2(t.x,e.x,r.x),V2(t.y,e.y,r.y)}function nM(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?Jt(r,t,n.max):Math.min(t,r)),t}function q2(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 iM(t,{top:e,left:r,bottom:n,right:i}){return{x:q2(t.x,r,i),y:q2(t.y,e,n)}}function H2(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=$0(e.min,e.max-n,t.min):n>i&&(r=$0(t.min,t.max-i,e.min)),Ul(0,1,r)}function aM(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 op=.35;function lM(t=op){return t===!1?t=0:t===!0&&(t=op),{x:W2(t,"left","right"),y:W2(t,"top","bottom")}}function W2(t,e,r){return{min:G2(t,e),max:G2(t,r)}}function G2(t,e){return typeof t=="number"?t:t[e]||0}const K2=()=>({translate:0,scale:1,origin:0,originPoint:0}),uf=()=>({x:K2(),y:K2()}),J2=()=>({min:0,max:0}),lr=()=>({x:J2(),y:J2()});function hi(t){return[t("x"),t("y")]}function eC({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function cM({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function fM(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 bv(t){return t===void 0||t===1}function ap({scale:t,scaleX:e,scaleY:r}){return!bv(t)||!bv(e)||!bv(r)}function Ho(t){return ap(t)||tC(t)||t.z||t.rotate||t.rotateX||t.rotateY}function tC(t){return Y2(t.x)||Y2(t.y)}function Y2(t){return t&&t!=="0%"}function B0(t,e,r){const n=t-r,i=e*n;return r+i}function Q2(t,e,r,n,i){return i!==void 0&&(t=B0(t,i,n)),B0(t,r,n)+e}function lp(t,e=0,r=1,n,i){t.min=Q2(t.min,e,r,n,i),t.max=Q2(t.max,e,r,n,i)}function rC(t,{x:e,y:r}){lp(t.x,e.translate,e.scale,e.originPoint),lp(t.y,r.translate,r.scale,r.originPoint)}function uM(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 Z2(t,e,[r,n,i]){const s=e[i]!==void 0?e[i]:.5,o=Jt(t.min,t.max,s);lp(t,e[r],e[n],o,e.scale)}const dM=["x","scaleX","originX"],hM=["y","scaleY","originY"];function dl(t,e){Z2(t.x,e,dM),Z2(t.y,e,hM)}function nC(t,e){return eC(fM(t.getBoundingClientRect(),e))}function vM(t,e,r){const n=nC(t,r),{scroll:i}=e;return i&&(Ms(n.x,i.offset.x),Ms(n.y,i.offset.y)),n}const yM=new WeakMap;class pM{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=lr(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(Uh(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=w8(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),hi(y=>{var g,p;let k=this.getAxisMotionValue(y).get()||0;if(ki.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=xn(w)*(parseFloat(k)/100))}this.originPoint[y]=k}),h==null||h(a,l),(c=this.visualElement.animationState)===null||c===void 0||c.setActive(tt.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=gM(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 X8(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(tt.Drag,!1)}updateAxis(e,r,n){const{drag:i}=this.getProps();if(!n||!rd(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=nM(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=iM(n.layoutBox,e):this.constraints=!1,this.elastic=lM(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&hi(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=aM(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=vM(n,i.root,this.visualElement.getTransformPagePoint());let o=sM(i.layout.layoutBox,s);if(r){const a=r(cM(o));this.hasMutatedConstraints=!!a,a&&(o=eC(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=hi(f=>{if(!rd(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(Om(e,n,0,r))}stopAnimation(){hi(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){hi(r=>{const{drag:n}=this.getProps();if(!rd(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]-Jt(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};hi(a=>{const l=this.getAxisMotionValue(a);if(l){const c=l.get();s[a]=oM({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(),hi(a=>{if(!rd(a,r,null))return;const l=this.getAxisMotionValue(a),{min:c,max:f}=this.constraints[a];l.set(Jt(c,f,s[a]))})}addListeners(){var e;if(!this.visualElement.current)return;yM.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=ia(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f})=>{this.isDragging&&f&&(hi(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=op,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function rd(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function gM(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function mM(t){const{dragControls:e,visualElement:r}=t,n=Fh(()=>new pM(r));S.useEffect(()=>e&&e.subscribe(n),[n,e]),S.useEffect(()=>n.addListeners(),[n])}function xM({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:i}){const s=t||e||r||n,o=S.useRef(null),{transformPagePoint:a}=S.useContext(cm),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 X8(f,l,{transformPagePoint:a})}R0(i,"pointerdown",s&&c),xm(()=>o.current&&o.current.end())}const bM={pan:Ls(xM),drag:Ls(mM)};function cp(t){return typeof t=="string"&&t.startsWith("var(--")}const iC=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function wM(t){const e=iC.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function fp(t,e,r=1){const[n,i]=wM(t);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);return s?s.trim():cp(i)?fp(i,e,r+1):i}function CM(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(!cp(s))return;const o=fp(s,n);o&&i.set(o)});for(const i in e){const s=e[i];if(!cp(s))continue;const o=fp(s,n);o&&(e[i]=o,r&&r[i]===void 0&&(r[i]=s))}return{target:e,transitionEnd:r}}const EM=new Set(["width","height","top","left","right","bottom","x","y"]),sC=t=>EM.has(t),SM=t=>Object.keys(t).some(sC),ew=t=>t===_a||t===ye;var tw;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(tw||(tw={}));const rw=(t,e)=>parseFloat(t.split(", ")[e]),nw=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return rw(i[1],e);{const s=n.match(/^matrix\((.+)\)$/);return s?rw(s[1],t):0}},kM=new Set(["x","y","z"]),AM=_0.filter(t=>!kM.has(t));function _M(t){const e=[];return AM.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 iw={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:nw(4,13),y:nw(5,14)},TM=(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]=iw[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]=iw[c](l,s)}),t},PM=(t,e,r={},n={})=>{e={...e},n={...n};const i=Object.keys(e).filter(sC);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=Ic(f);const h=e[l];let y;if(P0(h)){const g=h.length,p=h[0]===null?1:0;f=h[p],u=Ic(f);for(let k=p;k=0?window.pageYOffset:null,c=TM(e,t,a);return s.length&&s.forEach(([f,u])=>{t.getValue(f).set(u)}),t.render(),Bh&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:e,transitionEnd:n}};function IM(t,e,r,n){return SM(e)?PM(t,e,r,n):{target:e,transitionEnd:n}}const RM=(t,e,r,n)=>{const i=CM(t,e,n);return e=i.target,n=i.transitionEnd,IM(t,e,r,n)},up={current:null},oC={current:!1};function MM(){if(oC.current=!0,!!Bh)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>up.current=t.matches;t.addListener(e),e()}else up.current=!1}function NM(t,e,r){const{willChange:n}=e;for(const i in e){const s=e[i],o=r[i];if(ln(s))t.addValue(i,s),N0(n)&&n.add(i);else if(ln(o))t.addValue(i,zl(s,{owner:t})),N0(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,zl(a!==void 0?a:s,{owner:t}))}}for(const i in r)e[i]===void 0&&t.removeValue(i);return e}const aC=Object.keys(Wf),OM=aC.length,sw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class $M{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=()=>$r.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=jh(r),this.isVariantNode=s8(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&&ln(u)&&(u.set(o[f],!1),N0(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)),oC.current||MM(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:up.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=sc.has(e),i=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&$r.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):lr()}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=zl(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=mm(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&&!ln(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 Cm),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}}const lC=["initial",...$m],DM=lC.length;class cC extends $M{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=HI(n,e||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),o&&(o=i(o))),s){VI(this,n,o);const a=RM(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function BM(t){return window.getComputedStyle(t)}class LM extends cC{readValueFromInstance(e,r){if(sc.has(r)){const n=km(r);return n&&n.default||0}else{const n=BM(e),i=(l8(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return nC(e,r)}build(e,r,n,i){dm(e,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,r){return gm(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ln(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,i){h8(e,r,n,i)}}class jM extends cC{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return sc.has(r)?((n=km(r))===null||n===void 0?void 0:n.default)||0:(r=v8.has(r)?r:pm(r),e.getAttribute(r))}measureInstanceViewportBox(){return lr()}scrapeMotionValuesFromProps(e,r){return p8(e,r)}build(e,r,n,i){vm(e,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,r,n,i){y8(e,r,n,i)}mount(e){this.isSVGTag=ym(e.tagName),super.mount(e)}}const FM=(t,e)=>um(t)?new jM(e,{enableHardwareAcceleration:!1}):new LM(e,{enableHardwareAcceleration:!0});function ow(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Rc={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ye.test(t))t=parseFloat(t);else return t;const r=ow(t,e.target.x),n=ow(t,e.target.y);return`${r}% ${n}%`}},aw="_$css",UM={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,i=t.includes("var("),s=[];i&&(t=t.replace(iC,y=>(s.push(y),aw)));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=Jt(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(aw,()=>{const g=s[y];return y++,g})}return h}};class zM extends fr.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=e;MP(qM),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()})),of.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()||$r.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 VM(t){const[e,r]=S8(),n=S.useContext(fm);return fr.createElement(zM,{...t,layoutGroup:n,switchLayoutGroup:S.useContext(o8),isPresent:e,safeToRemove:r})}const qM={borderRadius:{...Rc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Rc,borderTopRightRadius:Rc,borderBottomLeftRadius:Rc,borderBottomRightRadius:Rc,boxShadow:UM},HM={measureLayout:VM};function WM(t,e,r={}){const n=ln(t)?t:zl(t);return n.start(Om("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const fC=["TopLeft","TopRight","BottomLeft","BottomRight"],GM=fC.length,lw=t=>typeof t=="string"?parseFloat(t):t,cw=t=>typeof t=="number"||ye.test(t);function KM(t,e,r,n,i,s){i?(t.opacity=Jt(0,r.opacity!==void 0?r.opacity:1,JM(n)),t.opacityExit=Jt(e.opacity!==void 0?e.opacity:1,0,YM(n))):s&&(t.opacity=Jt(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r($0(t,e,n))}function uw(t,e){t.min=e.min,t.max=e.max}function Un(t,e){uw(t.x,e.x),uw(t.y,e.y)}function dw(t,e,r,n,i){return t-=e,t=B0(t,1/r,n),i!==void 0&&(t=B0(t,1/i,n)),t}function QM(t,e=0,r=1,n=.5,i,s=t,o=t){if(ki.test(e)&&(e=parseFloat(e),e=Jt(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=Jt(s.min,s.max,n);t===s&&(a-=e),t.min=dw(t.min,e,r,a,i),t.max=dw(t.max,e,r,a,i)}function hw(t,e,[r,n,i],s,o){QM(t,e[r],e[n],e[i],e.scale,s,o)}const XM=["x","scaleX","originX"],ZM=["y","scaleY","originY"];function vw(t,e,r,n){hw(t.x,e,XM,r==null?void 0:r.x,n==null?void 0:n.x),hw(t.y,e,ZM,r==null?void 0:r.y,n==null?void 0:n.y)}function yw(t){return t.translate===0&&t.scale===1}function dC(t){return yw(t.x)&&yw(t.y)}function hC(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 pw(t){return xn(t.x)/xn(t.y)}class eN{constructor(){this.members=[]}add(e){bm(this.members,e),e.scheduleRender()}remove(e){if(wm(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 gw(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 tN=(t,e)=>t.depth-e.depth;class rN{constructor(){this.children=[],this.isDirty=!1}add(e){bm(this.children,e),this.isDirty=!0}remove(e){wm(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(tN),this.isDirty=!1,this.children.forEach(e)}}const mw=["","X","Y","Z"],xw=1e3;let nN=0;function vC({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=nN++,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(oN),this.nodes.forEach(cN),this.nodes.forEach(fN)},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=J8(y,250),of.hasAnimatedSinceResize&&(of.hasAnimatedSinceResize=!1,this.nodes.forEach(ww))})}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:yN,{onLayoutAnimationStart:j,onLayoutAnimationComplete:z}=u.getProps(),F=!this.targetLayout||!hC(this.targetLayout,p)||g,W=!y&&g;if(this.options.layoutRoot||!((E=this.resumeFrom)===null||E===void 0)&&E.instance||W||y&&(F||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,W);const G={...Y8(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&&ww(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(uN),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)&&(ff(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),hN(this.relativeTarget,this.relativeTargetOrigin,g,I)),p&&(this.animationValues=h,KM(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=$r.update(()=>{of.hasAnimatedSinceResize=!0,this.currentAnimation=WM(0,xw,{...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,xw),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&&yC(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||lr();const u=xn(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const h=xn(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}Un(a,l),dl(a,f),cf(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){var l,c,f;this.sharedNodes.has(o)||this.sharedNodes.set(o,new eN),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(bw),this.root.sharedNodes.clear()}}}function iN(t){t.updateLayout()}function sN(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"?hi(y=>{const g=l?i.measuredBox[y]:i.layoutBox[y],p=xn(g);g.min=s[y].min,g.max=g.min+p}):yC(a,i.layoutBox,s)&&hi(y=>{const g=l?i.measuredBox[y]:i.layoutBox[y],p=xn(s[y]);g.max=g.min+p});const c=uf();cf(c,s,i.layoutBox);const f=uf();l?cf(f,t.applyTransform(o,!0),i.measuredBox):cf(f,s,i.layoutBox);const u=!dC(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=lr();ff(k,i.layoutBox,g.layoutBox);const w=lr();ff(w,s,p.layoutBox),hC(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 oN(t){t.isProjectionDirty||(t.isProjectionDirty=!!(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=!!(t.parent&&t.parent.isTransformDirty))}function aN(t){t.clearSnapshot()}function bw(t){t.clearMeasurements()}function lN(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ww(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function cN(t){t.resolveTargetDelta()}function fN(t){t.calcProjection()}function uN(t){t.resetRotation()}function dN(t){t.removeLeadSnapshot()}function Cw(t,e,r){t.translate=Jt(e.translate,0,r),t.scale=Jt(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function Ew(t,e,r,n){t.min=Jt(e.min,r.min,n),t.max=Jt(e.max,r.max,n)}function hN(t,e,r,n){Ew(t.x,e.x,r.x,n),Ew(t.y,e.y,r.y,n)}function vN(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const yN={duration:.45,ease:[.4,0,.1,1]};function pN(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 Sw(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function gN(t){Sw(t.x),Sw(t.y)}function yC(t,e,r){return t==="position"||t==="preserve-aspect"&&!sp(pw(e),pw(r),.2)}const mN=vC({attachResizeListener:(t,e)=>ia(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),wv={current:void 0},xN=vC({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!wv.current){const t=new mN(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),wv.current=t}return wv.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),bN={...XR,...gI,...bM,...HM},Sl=IP((t,e)=>iI(t,e,bN,FM,xN));function pC(){const t=S.useRef(!1);return k0(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function wN(){const t=pC(),[e,r]=S.useState(0),n=S.useCallback(()=>{t.current&&r(e+1)},[e]);return[S.useCallback(()=>$r.postRender(n),[n]),e]}class CN 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 EN({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; + height: ${o}px !important; + top: ${a}px !important; + left: ${l}px !important; + } + `),()=>{document.head.removeChild(c)}},[e]),S.createElement(CN,{isPresent:e,childRef:n,sizeRef:i},S.cloneElement(t,{ref:n}))}const Cv=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:s,mode:o})=>{const a=Fh(SN),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(EN,{isPresent:r},t)),S.createElement(gu.Provider,{value:c},t)};function SN(){return new Map}const Wa=t=>t.key||"";function kN(t,e){t.forEach(r=>{const n=Wa(r);e.set(n,r)})}function AN(t){const e=[];return S.Children.forEach(t,r=>{S.isValidElement(r)&&e.push(r)}),e}const gC=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{i&&(o="wait");let[a]=wN();const l=S.useContext(fm).forceRender;l&&(a=l);const c=pC(),f=AN(t);let u=f;const h=new Set,y=S.useRef(u),g=S.useRef(new Map).current,p=S.useRef(!0);if(k0(()=>{p.current=!1,kN(f,g),y.current=u}),xm(()=>{p.current=!0,g.clear(),h.clear()}),p.current)return S.createElement(S.Fragment,null,u.map(A=>S.createElement(Cv,{key:Wa(A),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:s,mode:o},A)));u=[...u];const k=y.current.map(Wa),w=f.map(Wa),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(Cv,{key:Wa(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(Cv,{key:Wa(A),isPresent:!0,presenceAffectsLayout:s,mode:o},A)}),S.createElement(S.Fragment,null,h.size?u:u.map(A=>S.cloneElement(A)))},mC={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"},_N={...mC,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)"},TN={...mC,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)"},PN={dark:_N,light:TN},IN={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 kw={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 RN(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 MN(t){var e=RN(t,"string");return typeof e=="symbol"?e:String(e)}function NN(t,e,r){return e=MN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Aw(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 Ev(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=Ev({},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?Ev(Ev({},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,DN=function(){return ON($N)(...arguments)},xC=DN({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 BN=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],dp=t=>(t.display||(t.display=Object.keys(t).some(e=>BN.includes(e))?"flex":void 0),xC(t));dp.properties=xC.properties;function bC(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e{const{as:r="div",sx:n={},className:i,...s}=t,o={},a={};for(const c in s)dp.properties.has(c)?o[c]=s[c]:a[c]=s[c];const l=dp({...o,...n});return S.createElement(r,{className:fn(l,i),...a,ref:e})});var wC={exports:{}},Mc={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var _w;function LN(){if(_w)return Mc;_w=1;var t=fr,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 Mc.Fragment=r,Mc.jsx=o,Mc.jsxs=o,Mc}wC.exports=LN();var J=wC.exports;function jN(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 FN(t){var e=jN(t,"string");return typeof e=="symbol"?e:String(e)}function UN(t,e,r){return e=FN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Tw(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},Vt=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)zN(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 Iw(t.variantClassNames,r=>Iw(r,n=>n.split(" ")[0]))}},e};Vt({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"_2q9vfj8 _2q9vfj0 fyvr11ot",warning:"_2q9vfj9 _2q9vfj1 fyvr11oz",success:"_2q9vfja _2q9vfj2 fyvr11oh",error:"_2q9vfjb _2q9vfj3 fyvr11on"},size:{sm:"_2q9vfjc _1qxj1ib9 _1qxj1ibf _1qxj1ib5 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 _2q9vfj4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"_2q9vfjd _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _2q9vfj5 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"_2q9vfje _1qxj1ib9 _1qxj1ibd _1qxj1ib3 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc _2q9vfj6 fyvr1ww fyvr1ys fyvr144 fyvr1eg"}},defaultVariants:{},compoundVariants:[]});const Rw=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 VN=Vt({defaultClassName:"_1qxj1ib9",variantClassNames:{variant:{inherit:"_1qxj1iba _1qxj1ib0 fyvr11mu fyvr11e4 fyvr11gg fyvr11fg fyvr11ew",xlarge:"_1qxj1ibb _1qxj1ib1 fyvr11mv fyvr11es fyvr11gc fyvr11fk fyvr11fc",large:"_1qxj1ibc _1qxj1ib2 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8",medium:"_1qxj1ibd _1qxj1ib3 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc",normal:"_1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",small:"_1qxj1ibf _1qxj1ib5 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4",xsmall:"_1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc",code:"_1qxj1ibh _1qxj1ib7 fyvr11mw fyvr11eg fyvr11g0 fyvr11fk fyvr11f0"},ellipsis:{true:"_1qxj1ibi _1qxj1ib8 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=IN[n];return J.jsx(ue,{as:r,className:fn(i,VN({hidden:s,ellipsis:c,italic:o,underline:a,uppercase:f,capitalize:u})),ref:e,...y,...h,children:l})});var qN=Vt({defaultClassName:"_140wn8ng _140wn8n0 fyvr11ls fyvr11m8 fyvr11n7 fyvr11ko fyvr11h0",variantClassNames:{variant:{base:"_140wn8nh",feature:"_140wn8ni _140wn8n1 fyvr11ph fyvr12o5",primary:"_140wn8nj _140wn8n2 fyvr11pb fyvr12o5",glass:"_140wn8nk _140wn8n3 fyvr11tt fyvr12rt",emphasis:"_140wn8nl _140wn8n4 fyvr11tz fyvr12rt",raised:"_140wn8nm _140wn8n5 fyvr11tn fyvr12rt",danger:"_140wn8nn _140wn8n6 fyvr11on fyvr12o5",text:"_140wn8no _1qxj1ib9 _1qxj1ibf _1qxj1ib5 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 _140wn8n7 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11ob fyvr12s5"},shape:{circle:"_140wn8np _140wn8n8 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"_140wn8nq _140wn8n9 fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"_140wn8nr _140wn8na fyvr12ut fyvr12vh",false:"_140wn8ns _140wn8nb fyvr12uz fyvr12vt fyvr12vr"},size:{xs:"_140wn8nt _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc _140wn8nc fyvr1ws fyvr1yo",sm:"_140wn8nu _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8nd fyvr1ww fyvr1ys",md:"_140wn8nv _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8ne fyvr1x0 fyvr1yw",lg:"_140wn8nw _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8nf 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 We=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:fn(i,qN({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 HN=Vt({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"rhmai64 rhmai60 fyvr12vr fyvr12uz"},disabled:{true:"rhmai65"},outlined:{true:"rhmai66 rhmai61 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12n5 fyvr12ft fyvr1215 fyvr128h fyvr12nh fyvr12g5 fyvr121h fyvr128t"},blur:{true:"rhmai67 rhmai62 fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const WN=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:fn(r,HN({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 Yt(){return Yt=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>GN(r,e))}function Ot(...t){return S.useCallback(CC(...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,KN(i,...e)]}function KN(...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 me(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 $n(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 ga({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=JN({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=$n(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 JN({defaultProp:t,onChange:e}){const r=S.useState(t),[n]=r,i=S.useRef(n),s=$n(e);return S.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}function Dm(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 bn=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{};function Bm(t){const[e,r]=S.useState(void 0);return bn(()=>{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 YN(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=QN(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 QN(t){const[e,r]=S.useState(),n=S.useRef({}),i=S.useRef(t),s=S.useRef("none"),o=t?"mounted":"unmounted",[a,l]=YN(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const c=nd(n.current);s.current=a==="mounted"?c:"none"},[a]),bn(()=>{const c=n.current,f=i.current;if(f!==t){const h=s.current,y=nd(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]),bn(()=>{if(e){const c=u=>{const y=nd(n.current).includes(u.animationName);u.target===e&&y&&xo.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(s.current=nd(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 nd(t){return(t==null?void 0:t.animationName)||"none"}function be(){return be=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(ZN);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(hp,be({},n,{ref:e}),S.isValidElement(o)?S.cloneElement(o,void 0,a):null)}return S.createElement(hp,be({},n,{ref:e}),r)});Vl.displayName="Slot";const hp=S.forwardRef((t,e)=>{const{children:r,...n}=t;return S.isValidElement(r)?S.cloneElement(r,{...eO(n,r.props),ref:e?CC(e,r.ref):r.ref}):S.Children.count(r)>1?S.Children.only(null):null});hp.displayName="SlotClone";const XN=({children:t})=>S.createElement(S.Fragment,null,t);function ZN(t){return S.isValidElement(t)&&t.type===XN}function eO(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 tO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Fe=tO.reduce((t,e)=>{const r=S.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?Vl:e;return S.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),S.createElement(a,Yt({},o,{ref:i}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function Lm(t,e){t&&xo.flushSync(()=>t.dispatchEvent(e))}const EC="Checkbox",[rO,hQ]=Lr(EC),[nO,iO]=rO(EC),sO=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]=ga({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(nO,{scope:r,state:k,disabled:a},S.createElement(Fe.button,Yt({type:"button",role:"checkbox","aria-checked":sa(k)?"mixed":k,"aria-required":o,"data-state":SC(k),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:y,onKeyDown:me(t.onKeyDown,A=>{A.key==="Enter"&&A.preventDefault()}),onClick:me(t.onClick,A=>{w(I=>sa(I)?!0:!I),p&&(g.current=A.isPropagationStopped(),g.current||A.stopPropagation())})})),p&&S.createElement(lO,{control:u,bubbles:!g.current,name:n,value:l,checked:k,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),oO="CheckboxIndicator",aO=S.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...i}=t,s=iO(oO,r);return S.createElement(bo,{present:n||sa(s.state)||s.state===!0},S.createElement(Fe.span,Yt({"data-state":SC(s.state),"data-disabled":s.disabled?"":void 0},i,{ref:e,style:{pointerEvents:"none",...t.style}})))}),lO=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=S.useRef(null),o=Dm(r),a=Bm(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=sa(r),u.call(l,sa(r)?!1:r),l.dispatchEvent(h)}},[o,r,n]),S.createElement("input",Yt({type:"checkbox","aria-hidden":!0,defaultChecked:sa(r)?!1:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function sa(t){return t==="indeterminate"}function SC(t){return sa(t)?"indeterminate":t?"checked":"unchecked"}const cO=sO,fO=aO;var uO=Vt({defaultClassName:"_43lu9r4",variantClassNames:{labelLocation:{top:"_43lu9r5 _43lu9r0 fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r6 _43lu9r1 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r7 _43lu9r2 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"_43lu9r8 _43lu9r3 fyvr1188 fyvr11h0"}},defaultVariants:{},compoundVariants:[]});const oc=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:uO({labelLocation:i}),htmlFor:e,...o,children:[["left","top","hidden"].includes(i)&&a(),s,i==="right"&&a()]})};var ac=Vt({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"})}),kC=({size:t="sm",...e})=>J.jsx(ue,{as:dO,className:ac({size:t}),...e}),hO=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"})}),AC=({size:t="sm",...e})=>J.jsx(ue,{as:hO,className:ac({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:"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"})}),jm=({size:t="sm",...e})=>J.jsx(ue,{as:vO,className:ac({size:t}),...e}),yO=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"})}),pO=({size:t="sm",...e})=>J.jsx(ue,{as:yO,className:ac({size:t}),...e}),gO=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"})}),mO=({size:t="sm",...e})=>J.jsx(ue,{as:gO,className:ac({size:t}),...e}),xO=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"})}),bO=({size:t="sm",...e})=>J.jsx(ue,{as:xO,className:ac({size:t}),...e});var wO=Vt({defaultClassName:"_1c9x66f1 _1c9x66f0 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:[]}),CO=Vt({defaultClassName:"_1c9x66f5 _1c9x66f4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12rt fyvr11rz",variantClassNames:{size:{sm:"_1c9x66f6",lg:"_1c9x66f7"}},defaultVariants:{},compoundVariants:[]});const EO=({size:t="sm"})=>J.jsx(fO,{className:CO({size:t}),children:J.jsx(kC,{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(oc,{disabled:r,display:"flex",id:n??i,label:s,labelLocation:o,whiteSpace:"nowrap",children:J.jsx(cO,{className:wO({size:a}),disabled:r,id:n??i,name:i,ref:e,...l,children:J.jsx(EO,{})})})});fr.createContext(null);const SO=o_.useId||(()=>{});let kO=0;function Qs(t){const[e,r]=S.useState(SO());return bn(()=>{t||r(n=>n??String(kO++))},[t]),t||(e?`radix-${e}`:"")}const _C="Collapsible",[AO,vQ]=Lr(_C),[_O,Fm]=AO(_C),TO=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:s,onOpenChange:o,...a}=t,[l=!1,c]=ga({prop:n,defaultProp:i,onChange:o});return S.createElement(_O,{scope:r,disabled:s,contentId:Qs(),open:l,onOpenToggle:S.useCallback(()=>c(f=>!f),[c])},S.createElement(Fe.div,Yt({"data-state":Um(l),"data-disabled":s?"":void 0},a,{ref:e})))}),PO="CollapsibleTrigger",IO=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,i=Fm(PO,r);return S.createElement(Fe.button,Yt({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Um(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},n,{ref:e,onClick:me(t.onClick,i.onOpenToggle)}))}),TC="CollapsibleContent",RO=S.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=Fm(TC,t.__scopeCollapsible);return S.createElement(bo,{present:r||i.open},({present:s})=>S.createElement(MO,Yt({},n,{ref:e,present:s})))}),MO=S.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:i,...s}=t,o=Fm(TC,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)},[]),bn(()=>{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(Fe.div,Yt({"data-state":Um(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 Um(t){return t?"open":"closed"}const NO=TO,OO=IO,$O=RO;var Mw="64px",DO="_4j62fl0",BO="_4j62fl2 _4j62fl1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11h0 fyvr11ko fyvr11ob fyvr128 fyvr12uz fyvr11n2",LO="_4j62fl4 _4j62fl3 fyvr1ww fyvr1ys fyvr1so fyvr1v0 fyvr128",jO="_4j62fl5";const FO=t=>{const{className:e,children:r,defaultOpen:n,open:i,onOpenChange:s,label:o,...a}=t,[l,c]=S.useState(n),f=i??l,u=y=>{i===void 0&&c(y)},h=y=>{u(y),s==null||s(y)};return J.jsx(NO,{open:f,defaultOpen:n,onOpenChange:h,asChild:!0,children:J.jsxs(ue,{as:Sl.div,className:fn(e,DO),initial:{height:f?"auto":Mw},animate:{height:f?"auto":Mw},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...a,children:[J.jsxs(OO,{className:BO,children:[J.jsx(Wt,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:o}),J.jsx(ue,{as:Sl.div,position:"absolute",right:"0",marginRight:"4",initial:{rotate:f?180:0},animate:{rotate:f?180:0},transition:{ease:"linear",duration:.1},children:J.jsx(AC,{className:jO,color:"text50"})})]}),J.jsx(gC,{children:f&&J.jsx($O,{className:LO,asChild:!0,forceMount:!0,children:J.jsx(Sl.div,{initial:{opacity:f?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function Hh(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=fr.useRef(null),w=fr.useRef(new Map).current;return fr.createElement(i,{scope:g,itemMap:w,collectionRef:k},p)},a=t+"CollectionSlot",l=fr.forwardRef((y,g)=>{const{scope:p,children:k}=y,w=s(a,p),E=Ot(g,w.collectionRef);return fr.createElement(Vl,{ref:E},k)}),c=t+"CollectionItemSlot",f="data-radix-collection-item",u=fr.forwardRef((y,g)=>{const{scope:p,children:k,...w}=y,E=fr.useRef(null),A=Ot(g,E),I=s(c,p);return fr.useEffect(()=>(I.itemMap.set(E,{ref:E,...w}),()=>void I.itemMap.delete(E))),fr.createElement(Vl,{[f]:"",ref:A},k)});function h(y){const g=s(t+"CollectionConsumer",y);return fr.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 UO=S.createContext(void 0);function zm(t){const e=S.useContext(UO);return t||e||"ltr"}function zO(t,e=globalThis==null?void 0:globalThis.document){const r=$n(t);S.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const vp="dismissableLayer.update",VO="dismissableLayer.pointerDownOutside",qO="dismissableLayer.focusOutside";let Nw;const HO=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vm=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(HO),[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,j=WO(F=>{const W=F.target,G=[...f.branches].some(ee=>ee.contains(W));!M||G||(s==null||s(F),a==null||a(F),F.defaultPrevented||l==null||l())},y),z=GO(F=>{const W=F.target;[...f.branches].some(ee=>ee.contains(W))||(o==null||o(F),a==null||a(F),F.defaultPrevented||l==null||l())},y);return zO(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&&(Nw=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),Ow(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=Nw)}},[u,y,n,f]),S.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),Ow())},[u,f]),S.useEffect(()=>{const F=()=>g({});return document.addEventListener(vp,F),()=>document.removeEventListener(vp,F)},[]),S.createElement(Fe.div,be({},c,{ref:p,style:{pointerEvents:I?M?"auto":"none":void 0,...t.style},onFocusCapture:me(t.onFocusCapture,z.onFocusCapture),onBlurCapture:me(t.onBlurCapture,z.onBlurCapture),onPointerDownCapture:me(t.onPointerDownCapture,j.onPointerDownCapture)}))});function WO(t,e=globalThis==null?void 0:globalThis.document){const r=$n(t),n=S.useRef(!1),i=S.useRef(()=>{});return S.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){PC(VO,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 GO(t,e=globalThis==null?void 0:globalThis.document){const r=$n(t),n=S.useRef(!1);return S.useEffect(()=>{const i=s=>{s.target&&!n.current&&PC(qO,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 Ow(){const t=new CustomEvent(vp);document.dispatchEvent(t)}function PC(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?Lm(i,s):i.dispatchEvent(s)}const KO=Vm;let Sv=0;function IC(){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:$w()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:$w()),Sv++,()=>{Sv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Sv--}},[])}function $w(){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 kv="focusScope.autoFocusOnMount",Av="focusScope.autoFocusOnUnmount",Dw={bubbles:!1,cancelable:!0},RC=S.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=S.useState(null),c=$n(i),f=$n(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){Lw.add(y);const p=document.activeElement;if(!a.contains(p)){const w=new CustomEvent(kv,Dw);a.addEventListener(kv,c),a.dispatchEvent(w),w.defaultPrevented||(JO(e$(MC(a)),{select:!0}),document.activeElement===p&&Ps(a))}return()=>{a.removeEventListener(kv,c),setTimeout(()=>{const w=new CustomEvent(Av,Dw);a.addEventListener(Av,f),a.dispatchEvent(w),w.defaultPrevented||Ps(p??document.body,{select:!0}),a.removeEventListener(Av,f),Lw.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]=YO(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(Fe.div,be({tabIndex:-1},o,{ref:h,onKeyDown:g}))});function JO(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ps(n,{select:e}),document.activeElement!==r)return}function YO(t){const e=MC(t),r=Bw(e,t),n=Bw(e.reverse(),t);return[r,n]}function MC(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 Bw(t,e){for(const r of t)if(!QO(r,{upTo:e}))return r}function QO(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 XO(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&&XO(t)&&e&&t.select()}}const Lw=ZO();function ZO(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=jw(t,e),t.unshift(e)},remove(e){var r;t=jw(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function jw(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function e$(t){return t.filter(e=>e.tagName!=="A")}const t$=["top","right","bottom","left"],ao=Math.min,vn=Math.max,L0=Math.round,id=Math.floor,lo=t=>({x:t,y:t}),r$={left:"right",right:"left",bottom:"top",top:"bottom"},n$={start:"end",end:"start"};function yp(t,e,r){return vn(t,ao(e,r))}function ss(t,e){return typeof t=="function"?t(e):t}function os(t){return t.split("-")[0]}function lc(t){return t.split("-")[1]}function qm(t){return t==="x"?"y":"x"}function Hm(t){return t==="y"?"height":"width"}function cc(t){return["top","bottom"].includes(os(t))?"y":"x"}function Wm(t){return qm(cc(t))}function i$(t,e,r){r===void 0&&(r=!1);const n=lc(t),i=Wm(t),s=Hm(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=j0(o)),[o,j0(o)]}function s$(t){const e=j0(t);return[pp(t),e,pp(e)]}function pp(t){return t.replace(/start|end/g,e=>n$[e])}function o$(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 a$(t,e,r,n){const i=lc(t);let s=o$(os(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(pp)))),s}function j0(t){return t.replace(/left|right|bottom|top/g,e=>r$[e])}function l$(t){return{top:0,right:0,bottom:0,left:0,...t}}function NC(t){return typeof t!="number"?l$(t):{top:t,right:t,bottom:t,left:t}}function F0(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Fw(t,e,r){let{reference:n,floating:i}=t;const s=cc(e),o=Wm(e),a=Hm(o),l=os(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(lc(e)){case"start":y[o]-=h*(r&&c?-1:1);break;case"end":y[o]+=h*(r&&c?-1:1);break}return y}const c$=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}=Fw(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}=ss(t,e)||{};if(c==null)return{};const u=NC(f),h={x:r,y:n},y=Wm(i),g=Hm(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,W=z/2-p[g]/2-1,G=ao(u[w],W),ee=ao(u[E],W),oe=G,D=z-p[g]-ee,v=z/2-p[g]/2+F,C=yp(oe,v,D),P=!l.arrow&&lc(i)!=null&&v!=C&&s.reference[g]/2-(voe<=0)){var W,G;const oe=(((W=s.flip)==null?void 0:W.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 ee;const C=(ee=F.map(P=>[P.placement,P.overflows.filter(N=>N>0).reduce((N,x)=>N+x,0)]).sort((P,N)=>P[1]-N[1])[0])==null?void 0:ee[0];C&&(v=C);break}case"initialPlacement":v=a;break}if(i!==v)return{reset:{placement:v}}}return{}}}};function zw(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Vw(t){return t$.some(e=>t[e]>=0)}const u$=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...i}=ss(t,e);switch(n){case"referenceHidden":{const s=await Jf(e,{...i,elementContext:"reference"}),o=zw(s,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Vw(o)}}}case"escaped":{const s=await Jf(e,{...i,altBoundary:!0}),o=zw(s,r.floating);return{data:{escapedOffsets:o,escaped:Vw(o)}}}default:return{}}}}};async function d$(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=os(r),a=lc(r),l=cc(r)==="y",c=["left","top"].includes(o)?-1:1,f=s&&l?-1:1,u=ss(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 h$=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,i=await d$(e,t);return{x:r+i.x,y:n+i.y,data:i}}}},v$=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}=ss(t,e),c={x:r,y:n},f=await Jf(e,l),u=cc(os(i)),h=qm(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=yp(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=yp(E,g,A)}const p=a.fn({...e,[h]:y,[u]:g});return{...p,data:{x:p.x-r,y:p.y-n}}}}},y$=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}=ss(t,e),f={x:r,y:n},u=cc(i),h=qm(u);let y=f[h],g=f[u];const p=ss(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(os(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}}}},p$=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}=ss(t,e),l=await Jf(e,a),c=os(r),f=lc(r),u=cc(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=vn(l.left,0),z=vn(l.right,0),F=vn(l.top,0),W=vn(l.bottom,0);u?I=h-2*(j!==0||z!==0?j+z:vn(l.left,l.right)):A=y-2*(F!==0||W!==0?F+W:vn(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 OC(t)?(t.nodeName||"").toLowerCase():"#document"}function gn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ds(t){var e;return(e=(OC(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function OC(t){return t instanceof Node||t instanceof gn(t).Node}function as(t){return t instanceof Element||t instanceof gn(t).Element}function Ii(t){return t instanceof HTMLElement||t instanceof gn(t).HTMLElement}function qw(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof gn(t).ShadowRoot}function wu(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=Dn(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function g$(t){return["table","td","th"].includes(co(t))}function Gm(t){const e=Km(),r=Dn(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 m$(t){let e=ql(t);for(;Ii(e)&&!Wh(e);){if(Gm(e))return e;e=ql(e)}return null}function Km(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Wh(t){return["html","body","#document"].includes(co(t))}function Dn(t){return gn(t).getComputedStyle(t)}function Gh(t){return as(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ql(t){if(co(t)==="html")return t;const e=t.assignedSlot||t.parentNode||qw(t)&&t.host||ds(t);return qw(e)?e.host:e}function $C(t){const e=ql(t);return Wh(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ii(e)&&wu(e)?e:$C(e)}function Yf(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=$C(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=gn(i);return s?e.concat(o,o.visualViewport||[],wu(i)?i:[],o.frameElement&&r?Yf(o.frameElement):[]):e.concat(i,Yf(i,[],r))}function DC(t){const e=Dn(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=Ii(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=L0(r)!==s||L0(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function Jm(t){return as(t)?t:t.contextElement}function kl(t){const e=Jm(t);if(!Ii(e))return lo(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=DC(e);let o=(s?L0(r.width):r.width)/n,a=(s?L0(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const x$=lo(0);function BC(t){const e=gn(t);return!Km()||!e.visualViewport?x$:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function b$(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==gn(t)?!1:e}function ma(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=Jm(t);let o=lo(1);e&&(n?as(n)&&(o=kl(n)):o=kl(t));const a=b$(s,r,n)?BC(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=gn(s),y=n&&as(n)?gn(n):n;let g=h.frameElement;for(;g&&n&&y!==h;){const p=kl(g),k=g.getBoundingClientRect(),w=Dn(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=gn(g).frameElement}}return F0({width:f,height:u,x:l,y:c})}function w$(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=Ii(r),s=ds(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"||wu(s))&&(o=Gh(r)),Ii(r))){const c=ma(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 C$(t){return Array.from(t.getClientRects())}function LC(t){return ma(ds(t)).left+Gh(t).scrollLeft}function E$(t){const e=ds(t),r=Gh(t),n=t.ownerDocument.body,i=vn(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=vn(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+LC(t);const a=-r.scrollTop;return Dn(n).direction==="rtl"&&(o+=vn(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}function S$(t,e){const r=gn(t),n=ds(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=Km();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function k$(t,e){const r=ma(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=Ii(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 Hw(t,e,r){let n;if(e==="viewport")n=S$(t,r);else if(e==="document")n=E$(ds(t));else if(as(e))n=k$(e,r);else{const i=BC(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return F0(n)}function jC(t,e){const r=ql(t);return r===e||!as(r)||Wh(r)?!1:Dn(r).position==="fixed"||jC(r,e)}function A$(t,e){const r=e.get(t);if(r)return r;let n=Yf(t,[],!1).filter(a=>as(a)&&co(a)!=="body"),i=null;const s=Dn(t).position==="fixed";let o=s?ql(t):t;for(;as(o)&&!Wh(o);){const a=Dn(o),l=Gm(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||wu(o)&&!l&&jC(t,o))?n=n.filter(f=>f!==o):i=a,o=ql(o)}return e.set(t,n),n}function _$(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?A$(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,f)=>{const u=Hw(e,f,i);return c.top=vn(u.top,c.top),c.right=ao(u.right,c.right),c.bottom=ao(u.bottom,c.bottom),c.left=vn(u.left,c.left),c},Hw(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function T$(t){return DC(t)}function P$(t,e,r){const n=Ii(e),i=ds(e),s=r==="fixed",o=ma(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=lo(0);if(n||!n&&!s)if((co(e)!=="body"||wu(i))&&(a=Gh(e)),n){const c=ma(e,!0,s,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else i&&(l.x=LC(i));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function Ww(t,e){return!Ii(t)||Dn(t).position==="fixed"?null:e?e(t):t.offsetParent}function FC(t,e){const r=gn(t);if(!Ii(t))return r;let n=Ww(t,e);for(;n&&g$(n)&&Dn(n).position==="static";)n=Ww(n,e);return n&&(co(n)==="html"||co(n)==="body"&&Dn(n).position==="static"&&!Gm(n))?r:n||m$(t)||r}const I$=async function(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||FC,s=this.getDimensions;return{reference:P$(e,await i(r),n),floating:{x:0,y:0,...await s(r)}}};function R$(t){return Dn(t).direction==="rtl"}const M$={convertOffsetParentRelativeRectToViewportRelativeRect:w$,getDocumentElement:ds,getClippingRect:_$,getOffsetParent:FC,getElementRects:I$,getClientRects:C$,getDimensions:T$,getScale:kl,isElement:as,isRTL:R$};function N$(t,e){let r=null,n;const i=ds(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=id(f),g=id(i.clientWidth-(c+u)),p=id(i.clientHeight-(f+h)),k=id(c),E={rootMargin:-y+"px "+-g+"px "+-p+"px "+-k+"px",threshold:vn(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 O$(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=Jm(t),f=i||s?[...c?Yf(c):[],...Yf(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?ma(t):null;l&&k();function k(){const w=ma(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 $$=(t,e,r)=>{const n=new Map,i={platform:M$,...r},s={...i.platform,_c:n};return c$(t,e,{...i,platform:s})},D$=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?Uw({element:n.current,padding:i}).fn(r):{}:n?Uw({element:n,padding:i}).fn(r):{}}}};var $d=typeof document<"u"?S.useLayoutEffect:S.useEffect;function U0(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(!U0(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)&&!U0(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function UC(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Gw(t,e){const r=UC(t);return Math.round(e*r)/r}function Kw(t){const e=S.useRef(t);return $d(()=>{e.current=t}),e}function B$(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);U0(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),W=Kw(l),G=Kw(i),ee=S.useCallback(()=>{if(!j.current||!z.current)return;const P={placement:e,strategy:r,middleware:h};G.current&&(P.platform=G.current),$$(j.current,z.current,P).then(N=>{const x={...N,isPositioned:!0};oe.current&&!U0(F.current,x)&&(F.current=x,xo.flushSync(()=>{u(x)}))})},[h,e,r,G]);$d(()=>{c===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,u(P=>({...P,isPositioned:!1})))},[c]);const oe=S.useRef(!1);$d(()=>(oe.current=!0,()=>{oe.current=!1}),[]),$d(()=>{if(I&&(j.current=I),M&&(z.current=M),I&&M){if(W.current)return W.current(I,M,ee);ee()}},[I,M,ee,W]);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 N=Gw(v.floating,f.x),x=Gw(v.floating,f.y);return a?{...P,transform:"translate("+N+"px, "+x+"px)",...UC(v.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:x}},[r,a,v.floating,f.x,f.y]);return S.useMemo(()=>({...f,update:ee,refs:D,elements:v,floatingStyles:C}),[f,ee,D,v,C])}const zC="Popper",[VC,fc]=Lr(zC),[L$,qC]=VC(zC),j$=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=qC(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(Fe.div,be({},i,{ref:a}))}),HC="PopperContent",[z$,yQ]=VC(HC),V$=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=qC(HC,f),[W,G]=S.useState(null),ee=Ot(e,ie=>G(ie)),[oe,D]=S.useState(null),v=Bm(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,N=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(q$),altBoundary:R},{refs:d,floatingStyles:_,placement:$,isPositioned:m,middlewareData:O}=B$({strategy:"fixed",placement:N,whileElementsMounted:(...ie)=>O$(...ie,{animationFrame:M==="always"}),elements:{reference:F.anchor},middleware:[h$({mainAxis:h+P,alignmentAxis:g}),k&&v$({mainAxis:!0,crossAxis:!1,limiter:A==="partial"?y$():void 0,...b}),k&&f$({...b}),p$({...b,apply:({elements:ie,rects:ve,availableWidth:de,availableHeight:pe})=>{const{width:Ke,height:Ue}=ve.reference,ze=ie.floating.style;ze.setProperty("--radix-popper-available-width",`${de}px`),ze.setProperty("--radix-popper-available-height",`${pe}px`),ze.setProperty("--radix-popper-anchor-width",`${Ke}px`),ze.setProperty("--radix-popper-anchor-height",`${Ue}px`)}}),oe&&D$({element:oe,padding:p}),H$({arrowWidth:C,arrowHeight:P}),I&&u$({strategy:"referenceHidden",...b})]}),[B,U]=WC($),H=$n(j);bn(()=>{m&&(H==null||H())},[m,H]);const te=(i=O.arrow)===null||i===void 0?void 0:i.x,K=(s=O.arrow)===null||s===void 0?void 0:s.y,L=((o=O.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[ne,Q]=S.useState();return bn(()=>{W&&Q(window.getComputedStyle(W).zIndex)},[W]),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=O.transformOrigin)===null||a===void 0?void 0:a.x,(l=O.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},S.createElement(z$,{scope:f,placedSide:B,onArrowChange:D,arrowX:te,arrowY:K,shouldHideArrow:L},S.createElement(Fe.div,be({"data-side":B,"data-align":U},z,{ref:ee,style:{...z.style,animation:m?void 0:"none",opacity:(c=O.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function q$(t){return t!==null}const H$=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]=WC(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 WC(t){const[e,r="center"]=t.split("-");return[e,r]}const W$=j$,G$=U$,K$=V$,GC=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?pP.createPortal(S.createElement(Fe.div,be({},i,{ref:e})),n):null}),_v="rovingFocusGroup.onEntryFocus",J$={bubbles:!1,cancelable:!0},Ym="RovingFocusGroup",[gp,KC,Y$]=Hh(Ym),[Q$,uc]=Lr(Ym,[Y$]),[X$,Z$]=Q$(Ym),eD=S.forwardRef((t,e)=>S.createElement(gp.Provider,{scope:t.__scopeRovingFocusGroup},S.createElement(gp.Slot,{scope:t.__scopeRovingFocusGroup},S.createElement(tD,Yt({},t,{ref:e}))))),tD=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=zm(s),[g=null,p]=ga({prop:o,defaultProp:a,onChange:l}),[k,w]=S.useState(!1),E=$n(c),A=KC(r),I=S.useRef(!1),[M,j]=S.useState(0);return S.useEffect(()=>{const z=u.current;if(z)return z.addEventListener(_v,E),()=>z.removeEventListener(_v,E)},[E]),S.createElement(X$,{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(Fe.div,Yt({tabIndex:k||M===0?-1:0,"data-orientation":n},f,{ref:h,style:{outline:"none",...t.style},onMouseDown:me(t.onMouseDown,()=>{I.current=!0}),onFocus:me(t.onFocus,z=>{const F=!I.current;if(z.target===z.currentTarget&&F&&!k){const W=new CustomEvent(_v,J$);if(z.currentTarget.dispatchEvent(W),!W.defaultPrevented){const G=A().filter(C=>C.focusable),ee=G.find(C=>C.active),oe=G.find(C=>C.id===g),v=[ee,oe,...G].filter(Boolean).map(C=>C.ref.current);JC(v)}}I.current=!1}),onBlur:me(t.onBlur,()=>w(!1))})))}),rD="RovingFocusGroupItem",nD=S.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,...o}=t,a=Qs(),l=s||a,c=Z$(rD,r),f=c.currentTabStopId===l,u=KC(r),{onFocusableItemAdd:h,onFocusableItemRemove:y}=c;return S.useEffect(()=>{if(n)return h(),()=>y()},[n,h,y]),S.createElement(gp.ItemSlot,{scope:r,id:l,focusable:n,active:i},S.createElement(Fe.span,Yt({tabIndex:f?0:-1,"data-orientation":c.orientation},o,{ref:e,onMouseDown:me(t.onMouseDown,g=>{n?c.onItemFocus(l):g.preventDefault()}),onFocus:me(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:me(t.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){c.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const p=oD(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?aD(w,E+1):w.slice(E+1)}setTimeout(()=>JC(w))}})})))}),iD={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function sD(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function oD(t,e,r){const n=sD(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return iD[n]}function JC(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function aD(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const lD=eD,YC=nD;var cD=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Ba=new WeakMap,sd=new WeakMap,od={},Tv=0,QC=function(t){return t&&(t.host||QC(t.parentNode))},fD=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=QC(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})},uD=function(t,e,r,n){var i=fD(e,Array.isArray(t)?t:[t]);od[r]||(od[r]=new WeakMap);var s=od[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&&sd.set(h,!0),k===1&&h.setAttribute(r,"true"),g||h.setAttribute(n,"true")}})};return f(e),a.clear(),Tv++,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||(sd.has(u)||u.removeAttribute(n),sd.delete(u)),y||u.removeAttribute(r)}),Tv--,Tv||(Ba=new WeakMap,Ba=new WeakMap,sd=new WeakMap,od={})}},XC=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=e||cD(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),uD(n,i,r,"aria-hidden")):function(){return null}},gi=function(){return gi=Object.assign||function(e){for(var r,n=1,i=arguments.length;n"u")return TD;var e=PD(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])}},RD=rE(),MD=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(hD,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(a,"px ").concat(n,`; + } + body { + overflow: hidden `).concat(n,`; + overscroll-behavior: contain; + `).concat([e&&"position: relative ".concat(n,";"),r==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(s,`px; + padding-right: `).concat(o,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(a,"px ").concat(n,`; + `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),` + } + + .`).concat(Dd,` { + right: `).concat(a,"px ").concat(n,`; + } + + .`).concat(Bd,` { + margin-right: `).concat(a,"px ").concat(n,`; + } + + .`).concat(Dd," .").concat(Dd,` { + right: 0 `).concat(n,`; + } + + .`).concat(Bd," .").concat(Bd,` { + margin-right: 0 `).concat(n,`; + } + + body { + `).concat(vD,": ").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 ID(i)},[i]);return S.createElement(RD,{styles:MD(s,!e,i,r?"":"!important")})},mp=!1;if(typeof window<"u")try{var ad=Object.defineProperty({},"passive",{get:function(){return mp=!0,!0}});window.addEventListener("test",ad,ad),window.removeEventListener("test",ad,ad)}catch{mp=!1}var La=mp?{passive:!1}:!1,OD=function(t){return t.tagName==="TEXTAREA"},nE=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!OD(t)&&r[e]==="visible")},$D=function(t){return nE(t,"overflowY")},DD=function(t){return nE(t,"overflowX")},Jw=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=iE(t,r);if(n){var i=sE(t,r),s=i[1],o=i[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},BD=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]},iE=function(t,e){return t==="v"?$D(e):DD(e)},sE=function(t,e){return t==="v"?BD(e):LD(e)},jD=function(t,e){return t==="h"&&e==="rtl"?-1:1},FD=function(t,e,r,n,i){var s=jD(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=sE(t,a),g=y[0],p=y[1],k=y[2],w=p-k-s*g;(g||w)&&iE(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},ld=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Yw=function(t){return[t.deltaX,t.deltaY]},Qw=function(t){return t&&"current"in t?t.current:t},UD=function(t,e){return t[0]===e[0]&&t[1]===e[1]},zD=function(t){return` + .block-interactivity-`.concat(t,` {pointer-events: none;} + .allow-interactivity-`).concat(t,` {pointer-events: all;} +`)},VD=0,ja=[];function qD(t){var e=S.useRef([]),r=S.useRef([0,0]),n=S.useRef(),i=S.useState(VD++)[0],s=S.useState(function(){return rE()})[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=dD([t.lockRef.current],(t.shards||[]).map(Qw),!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=ld(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=Jw(z,j);if(!F)return!0;if(F?M=z:(M=z==="v"?"h":"v",F=Jw(z,j)),!F)return!1;if(!n.current&&"changedTouches"in p&&(A||I)&&(n.current=M),!M)return!0;var W=n.current||M;return FD(W,k,p,W==="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?Yw(k):ld(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(Qw).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=ld(p),n.current=void 0},[]),u=S.useCallback(function(p){c(p.type,Yw(p),p.target,a(p,t.lockRef.current))},[]),h=S.useCallback(function(p){c(p.type,ld(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:zD(i)}):null,y?S.createElement(ND,{gapMode:"margin"}):null)}const HD=wD(tE,qD);var oE=S.forwardRef(function(t,e){return S.createElement(Kh,gi({},t,{ref:e,sideCar:HD}))});oE.classNames=Kh.classNames;const aE=oE,WD=["Enter"," "],Jh="Menu",[GD,pQ,KD]=Hh(Jh),[Ta,lE]=Lr(Jh,[KD,fc,uc]);fc();const JD=uc();Ta(Jh);const[gQ,YD]=Ta(Jh),QD="MenuPortal";Ta(QD,{forceMount:void 0});const XD="MenuContent",[mQ,cE]=Ta(XD),xp="MenuItem",Xw="menu.itemSelect",fE=S.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...i}=t,s=S.useRef(null),o=YD(xp,t.__scopeMenu),a=cE(xp,t.__scopeMenu),l=Ot(e,s),c=S.useRef(!1),f=()=>{const u=s.current;if(!r&&u){const h=new CustomEvent(Xw,{bubbles:!0,cancelable:!0});u.addEventListener(Xw,y=>n==null?void 0:n(y),{once:!0}),Lm(u,h),h.defaultPrevented?c.current=!1:o.onClose()}};return S.createElement(ZD,be({},i,{ref:l,disabled:r,onClick:me(t.onClick,f),onPointerDown:u=>{var h;(h=t.onPointerDown)===null||h===void 0||h.call(t,u),c.current=!0},onPointerUp:me(t.onPointerUp,u=>{var h;c.current||(h=u.currentTarget)===null||h===void 0||h.click()}),onKeyDown:me(t.onKeyDown,u=>{const h=a.searchRef.current!=="";r||h&&u.key===" "||WD.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),ZD=S.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...s}=t,o=cE(xp,r),a=JD(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(YC,be({asChild:!0},a,{focusable:!n}),S.createElement(Fe.div,be({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},s,{ref:c,onPointerMove:me(t.onPointerMove,Zw(g=>{n?o.onItemLeave(g):(o.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus())})),onPointerLeave:me(t.onPointerLeave,Zw(g=>o.onItemLeave(g))),onFocus:me(t.onFocus,()=>u(!0)),onBlur:me(t.onBlur,()=>u(!1))}))))}),eB=S.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...i}=t;return S.createElement(dE,{scope:t.__scopeMenu,checked:r},S.createElement(fE,be({role:"menuitemcheckbox","aria-checked":z0(r)?"mixed":r},i,{ref:e,"data-state":Qm(r),onSelect:me(i.onSelect,()=>n==null?void 0:n(z0(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),tB="MenuRadioGroup",[xQ,rB]=Ta(tB,{value:void 0,onValueChange:()=>{}}),nB="MenuRadioItem",iB=S.forwardRef((t,e)=>{const{value:r,...n}=t,i=rB(nB,t.__scopeMenu),s=r===i.value;return S.createElement(dE,{scope:t.__scopeMenu,checked:s},S.createElement(fE,be({role:"menuitemradio","aria-checked":s},n,{ref:e,"data-state":Qm(s),onSelect:me(n.onSelect,()=>{var o;return(o=i.onValueChange)===null||o===void 0?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})))}),uE="MenuItemIndicator",[dE,sB]=Ta(uE,{checked:!1}),oB=S.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...i}=t,s=sB(uE,r);return S.createElement(bo,{present:n||z0(s.checked)||s.checked===!0},S.createElement(Fe.span,be({},i,{ref:e,"data-state":Qm(s.checked)})))}),aB="MenuSub";Ta(aB);function z0(t){return t==="indeterminate"}function Qm(t){return z0(t)?"indeterminate":t?"checked":"unchecked"}function Zw(t){return e=>e.pointerType==="mouse"?t(e):void 0}const lB=eB,cB=iB,fB=oB,hE="DropdownMenu",[uB,bQ]=Lr(hE,[lE]),Xm=lE();uB(hE);const dB=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=Xm(r);return S.createElement(lB,be({},i,n,{ref:e}))}),hB=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=Xm(r);return S.createElement(cB,be({},i,n,{ref:e}))}),vB=S.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=Xm(r);return S.createElement(fB,be({},i,n,{ref:e}))}),yB=dB,pB=hB,vE=vB;var yE="_1k2mbvi4 _1k2mbvi3 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12wk fyvr12we fyvr11h0 fyvr11ko fyvr11jw fyvr12uz fyvr11n2 fyvr11hw fyvr12rz",pE="_1k2mbvi5";const gB=({children:t})=>J.jsx(vE,{className:pE,children:t});S.forwardRef(({className:t,children:e,...r},n)=>J.jsxs(yB,{className:fn(yE,t),...r,ref:n,children:[J.jsx(gB,{children:J.jsx(kC,{size:"xs"})}),J.jsx(Wt,{variant:"small",children:e})]}));S.forwardRef(({className:t,children:e,...r},n)=>J.jsxs(pB,{className:fn(yE,t),...r,ref:n,children:[J.jsx(vE,{className:pE,children:J.jsx(Wt,{children:"ā€¢"})}),J.jsx(Wt,{variant:"small",children:e})]}));const Zm=S.forwardRef((t,e)=>{const{icon:r,size:n="md",...i}=t;return J.jsx(We,{leftIcon:r,size:n,flexShrink:"0",ref:e,...i})}),mB=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var xB="_1hq71vk1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _1hq71vk0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12n5 fyvr12ft fyvr1215 fyvr128h fyvr12nn fyvr12gb fyvr121n fyvr128z fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",bB=Vt({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"_1hq71vk6 _1hq71vk2 fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"_1hq71vk7 _1hq71vk3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"_1hq71vk8 _1hq71vk4 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]}),wB="_1hq71vka _1hq71vk9 fyvr12wh fyvr12wb fyvr11ho fyvr12vb fyvr1ko fyvr1oo fyvr1mo fyvr1qo";const CB={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=mB(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=>CB[A]).join(",");return J.jsx(oc,{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:fn(xB,bB({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:wB,cursor:"pointer",disabled:i,id:s??l,name:l,onChange:w,ref:g,type:"file",...h}),p&&J.jsx(Zm,{cursor:"pointer",icon:jm,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 EB=Vt({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const bp=1e3,Al=64,Rv=Al/2,Mv=(t,e=bp)=>t%e/(bp/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)},SB=(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%)`}},kB=(t,e)=>{const r=[];for(let n=0;n{const s=Al/10+Mv(n.r,bp*1.5/(i+1));return{...SB(n.a,n.b,n.c),x:Mv(n.x),y:Mv(n.y),r:s}})};S.memo(t=>{const{className:e,address:r,size:n="md",complexity:i=1,...s}=t,o=kB(r,i);return J.jsxs(ue,{as:"svg",className:fn(e,EB({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:Rv,cy:Rv,r:Rv})}),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 gE=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})},mE="Dialog",[xE,wQ]=Lr(mE),[AB,wo]=xE(mE),_B=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]=ga({prop:n,defaultProp:i,onChange:s});return S.createElement(AB,{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)},bE="DialogPortal",[TB,wE]=xE(bE,{forceMount:void 0}),PB=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:i}=t,s=wo(bE,e);return S.createElement(TB,{scope:e,forceMount:r},S.Children.map(n,o=>S.createElement(bo,{present:r||s.open},S.createElement(GC,{asChild:!0,container:i},o))))},wp="DialogOverlay",IB=S.forwardRef((t,e)=>{const r=wE(wp,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=wo(wp,t.__scopeDialog);return s.modal?S.createElement(bo,{present:n||s.open},S.createElement(RB,be({},i,{ref:e}))):null}),RB=S.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=wo(wp,r);return S.createElement(aE,{as:Vl,allowPinchZoom:!0,shards:[i.contentRef]},S.createElement(Fe.div,be({"data-state":EE(i.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),Qf="DialogContent",MB=S.forwardRef((t,e)=>{const r=wE(Qf,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=wo(Qf,t.__scopeDialog);return S.createElement(bo,{present:n||s.open},s.modal?S.createElement(NB,be({},i,{ref:e})):S.createElement(OB,be({},i,{ref:e})))}),NB=S.forwardRef((t,e)=>{const r=wo(Qf,t.__scopeDialog),n=S.useRef(null),i=Ot(e,r.contentRef,n);return S.useEffect(()=>{const s=n.current;if(s)return XC(s)},[]),S.createElement(CE,be({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=r.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:me(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:me(t.onFocusOutside,s=>s.preventDefault())}))}),OB=S.forwardRef((t,e)=>{const r=wo(Qf,t.__scopeDialog),n=S.useRef(!1),i=S.useRef(!1);return S.createElement(CE,be({},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()}}))}),CE=S.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=t,a=wo(Qf,r),l=S.useRef(null),c=Ot(e,l);return IC(),S.createElement(S.Fragment,null,S.createElement(RC,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s},S.createElement(Vm,be({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":EE(a.open)},o,{ref:c,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),$B="DialogClose",DB=S.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=wo($B,r);return S.createElement(Fe.button,be({type:"button"},n,{ref:e,onClick:me(t.onClick,()=>i.onOpenChange(!1))}))});function EE(t){return t?"open":"closed"}const BB=_B,LB=PB,jB=IB,FB=MB,UB=DB;var zB=Vt({defaultClassName:"_1vqx0w91 _1vqx0w90 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]}),VB=Vt({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]});const qB=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:i,...s}=t;return J.jsx(ue,{className:VB({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...s,children:J.jsx(ue,{className:zB({direction:n}),background:"backgroundPrimary",...i,children:e})})};function HB(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function WB(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 SE(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]=SE(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 e6(t,e,r){t.style.setProperty(HB(e),r)}function t6(t,e,r){if(typeof r=="object"){var n=e;SE(r,(a,l)=>{a!=null&&e6(t,WB(n,l),String(a))})}else{var i=e;for(var s in i){var o=i[s];o!=null&&e6(t,s,i[s])}}}const ex=["dark","light"],GB="dark",KB="data-theme",r6="@sequence.theme",JB=t=>ex.includes(t),YB=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),kE=t=>t?`${r6}.${t}`:r6,QB=t=>{const e=localStorage.getItem(kE(t));return e&&ex.includes(e)?e:GB},AE=S.createContext(null),XB=t=>{const[e,r]=S.useState(t.theme||QB(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&&(JB(e)?(i.setAttribute(KB,e),t6(i,kw,{colors:PN[e]})):YB(e)&&t6(i,kw,{colors:e}))},[e,t.root]);const n=S.useMemo(()=>({theme:e,root:t.root,setTheme:i=>{ex.includes(i)&&(localStorage.setItem(kE(t.scope),i),r(i))}}),[e,t.root,t.scope]);return J.jsx(AE.Provider,{value:n,children:t.children})},ZB=()=>{const t=S.useContext(AE);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t};var eL="_5b32m91 _5b32m90 fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11ni fyvr1ko fyvr1oo fyvr1qo fyvr1mo",tL="_5b32m93 _5b32m92 fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",rL=Vt({defaultClassName:"_5b32m95 _5b32m94 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"]]}),nL="_5b32m9b _5b32m9a fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11ni";const iL=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}=ZB(),h=document.querySelector(u||"body");return J.jsx(BB,{modal:!0,defaultOpen:!0,onOpenChange:o,children:J.jsx(LB,{forceMount:!0,container:h,children:J.jsxs(ue,{className:eL,children:[J.jsx(ue,{as:jB,asChild:!0,background:r,className:tL,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:rL({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(qB,{children:n}):n,s&&J.jsx(UB,{asChild:!0,children:J.jsx(Zm,{icon:jm,backdropFilter:"blur",size:"xs",className:nL,"aria-label":"Close"})})]},"modal-content")})]})})})};var sL="_1acm19y1 _1acm19y0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12rt fyvr1g0 fyvr118g",oL=Vt({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"_1acm19y6 _1acm19y2 fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"_1acm19y7 _1acm19y3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"_1acm19y8 _1acm19y4 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]}),aL=Vt({defaultClassName:"_1acm19ya _1acm19y9 fyvr1t4 fyvr1v0 fyvr12wh fyvr12wb fyvr11gw fyvr128 fyvr15o",variantClassNames:{numeric:{false:"_1acm19yb _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"_1acm19yc _1qxj1ib9 _1qxj1ibc _1qxj1ib2 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]});const tx=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(oc,{description:s,disabled:o,display:"grid",id:a??h,label:l,labelLocation:c,children:J.jsx(ue,{width:"full",children:J.jsxs(ue,{className:fn(sL,oL({borderRadius:i})),children:[f&&J.jsx(f,{size:"sm"}),J.jsx(ue,{as:r,autoComplete:n,spellCheck:"false",className:aL({numeric:p}),disabled:o,id:a??h,name:h,ref:e,type:g,...k}),u&&J.jsx(u,{size:"sm"}),y]})})})}),lL=RegExp("^\\d*(?:\\\\[.])?\\d*$");function cL(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===""||lL.test(cL(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(tx,{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})});Vt({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const _E="Progress",Yh=100,[fL,CQ]=Lr(_E),[uL,EQ]=fL(_E),dL=S.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:i,getValueLabel:s=hL,...o}=t,a=Cp(i)?i:Yh,l=TE(n,a)?n:null,c=V0(l)?s(l,a):void 0;return S.createElement(uL,{scope:r,value:l,max:a},S.createElement(Fe.div,Yt({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":V0(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":vL(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&&!Cp(n)?new Error(yL(i,r)):null},value(t,e,r){const n=t[e],i=String(n),s=Cp(t.max)?t.max:Yh;return n!=null&&!TE(n,s)?new Error(pL(i,r)):null}};function hL(t,e){return`${Math.round(t/e*100)}%`}function vL(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function V0(t){return typeof t=="number"}function Cp(t){return V0(t)&&!isNaN(t)&&t>0}function TE(t,e){return V0(t)&&!isNaN(t)&&t<=e&&t>=0}function yL(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Yh}\`.`}function pL(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 ${Yh} if no \`max\` prop is set) + - \`null\` if the progress is indeterminate. + +Defaulting to \`null\`.`}const PE="Radio",[gL,IE]=Lr(PE),[mL,xL]=gL(PE),bL=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(mL,{scope:r,checked:i,disabled:o},S.createElement(Fe.button,Yt({type:"button",role:"radio","aria-checked":i,"data-state":RE(i),"data-disabled":o?"":void 0,disabled:o,value:a},c,{ref:h,onClick:me(t.onClick,p=>{i||l==null||l(),g&&(y.current=p.isPropagationStopped(),y.current||p.stopPropagation())})})),g&&S.createElement(EL,{control:f,bubbles:!y.current,name:n,value:a,checked:i,required:s,disabled:o,style:{transform:"translateX(-100%)"}}))}),wL="RadioIndicator",CL=S.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...i}=t,s=xL(wL,r);return S.createElement(bo,{present:n||s.checked},S.createElement(Fe.span,Yt({"data-state":RE(s.checked),"data-disabled":s.disabled?"":void 0},i,{ref:e})))}),EL=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=S.useRef(null),o=Dm(r),a=Bm(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",Yt({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 RE(t){return t?"checked":"unchecked"}const SL=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ME="RadioGroup",[kL,SQ]=Lr(ME,[uc,IE]),NE=uc(),OE=IE(),[AL,_L]=kL(ME),TL=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=NE(r),g=zm(c),[p,k]=ga({prop:s,defaultProp:i,onChange:u});return S.createElement(AL,{scope:r,name:n,required:o,disabled:a,value:p,onValueChange:k},S.createElement(lD,Yt({asChild:!0},y,{orientation:l,dir:g,loop:f}),S.createElement(Fe.div,Yt({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:g},h,{ref:e}))))}),PL="RadioGroupItem",IL=S.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...i}=t,s=_L(PL,r),o=s.disabled||n,a=NE(r),l=OE(r),c=S.useRef(null),f=Ot(e,c),u=s.value===i.value,h=S.useRef(!1);return S.useEffect(()=>{const y=p=>{SL.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(YC,Yt({asChild:!0},a,{focusable:!o,active:u}),S.createElement(bL,Yt({disabled:o,required:s.required,checked:u},l,i,{name:s.name,ref:f,onCheck:()=>s.onValueChange(i.value),onKeyDown:me(y=>{y.key==="Enter"&&y.preventDefault()}),onFocus:me(i.onFocus,()=>{var y;h.current&&((y=c.current)===null||y===void 0||y.click())})})))}),RL=S.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,i=OE(r);return S.createElement(CL,Yt({},i,n,{ref:e}))}),ML=TL,NL=IL,OL=RL;var $L=Vt({defaultClassName:"io59uy3 io59uy0 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr12nb fyvr12fz fyvr121b fyvr128n fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11ob fyvr12uz fyvr12uv fyvr12vj",variantClassNames:{size:{sm:"io59uy4 io59uy1 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy5 io59uy2 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]}),DL=Vt({defaultClassName:"io59uy8 io59uy7 io59uy6 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12rt",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]});const BL=t=>{const{id:e,label:r,size:n="sm",value:i,disabled:s}=t;return J.jsx(ue,{alignItems:"center",children:J.jsx(oc,{disabled:s,display:"flex",id:e,label:r,labelLocation:"right",children:J.jsx(NL,{className:$L({size:n}),value:i,id:e,disabled:s,children:J.jsx(OL,{className:DL({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(ML,{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(BL,{id:`${s}-${f}`,label:c,size:a,value:f,disabled:u},f))})})});function n6(t,[e,r]){return Math.min(r,Math.max(e,t))}const $E=S.forwardRef((t,e)=>S.createElement(Fe.span,be({},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"],jL=[" ","Enter"],Qh="Select",[Xh,rx,FL]=Hh(Qh),[dc,kQ]=Lr(Qh,[FL,fc]),nx=fc(),[UL,Pa]=dc(Qh),[zL,VL]=dc(Qh),qL=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=nx(e),[p,k]=S.useState(null),[w,E]=S.useState(null),[A,I]=S.useState(!1),M=zm(c),[j=!1,z]=ga({prop:n,defaultProp:i,onChange:s}),[F,W]=ga({prop:o,defaultProp:a,onChange:l}),G=S.useRef(null),ee=p?!!p.closest("form"):!0,[oe,D]=S.useState(new Set),v=Array.from(oe).map(C=>C.props.value).join(";");return S.createElement(W$,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:W,open:j,onOpenChange:z,dir:M,triggerPointerDownPosRef:G,disabled:h},S.createElement(Xh.Provider,{scope:e},S.createElement(zL,{scope:t.__scopeSelect,onNativeOptionAdd:S.useCallback(C=>{D(P=>new Set(P).add(C))},[]),onNativeOptionRemove:S.useCallback(C=>{D(P=>{const N=new Set(P);return N.delete(C),N})},[])},r)),ee?S.createElement(LE,{key:v,"aria-hidden":!0,required:y,tabIndex:-1,name:f,autoComplete:u,value:F,onChange:C=>W(C.target.value),disabled:h},F===void 0?S.createElement("option",{value:""}):null,Array.from(oe)):null))},HL="SelectTrigger",WL=S.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...i}=t,s=nx(r),o=Pa(HL,r),a=o.disabled||n,l=Ot(e,o.onTriggerChange),c=rx(r),[f,u,h]=jE(g=>{const p=c().filter(E=>!E.disabled),k=p.find(E=>E.value===o.value),w=FE(p,g,k);w!==void 0&&o.onValueChange(w.value)}),y=()=>{a||(o.onOpenChange(!0),h())};return S.createElement(G$,be({asChild:!0},s),S.createElement(Fe.button,be({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":BE(o.value)?"":void 0},i,{ref:l,onClick:me(i.onClick,g=>{g.currentTarget.focus()}),onPointerDown:me(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:me(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",KL=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=Ot(e,l.onValueNodeChange);return bn(()=>{c(f)},[c,f]),S.createElement(Fe.span,be({},a,{ref:u,style:{pointerEvents:"none"}}),BE(l.value)?S.createElement(S.Fragment,null,o):s)}),JL=S.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...i}=t;return S.createElement(Fe.span,be({"aria-hidden":!0},i,{ref:e}),n||"ā–¼")}),Hl="SelectContent",YL=S.forwardRef((t,e)=>{const r=Pa(Hl,t.__scopeSelect),[n,i]=S.useState();if(bn(()=>{i(new DocumentFragment)},[]),!r.open){const s=n;return s?xo.createPortal(S.createElement(DE,{scope:t.__scopeSelect},S.createElement(Xh.Slot,{scope:t.__scopeSelect},S.createElement("div",null,t.children))),s):null}return S.createElement(QL,be({},t,{ref:e}))}),Ui=10,[DE,Zh]=dc(Hl),QL=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=Ot(e,B=>I(B)),[F,W]=S.useState(null),[G,ee]=S.useState(null),oe=rx(r),[D,v]=S.useState(!1),C=S.useRef(!1);S.useEffect(()=>{if(A)return XC(A)},[A]),IC();const P=S.useCallback(B=>{const[U,...H]=oe().map(L=>L.ref.current),[te]=H.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===te&&M&&(M.scrollTop=M.scrollHeight),L==null||L.focus(),document.activeElement!==K))return},[oe,M]),N=S.useCallback(()=>P([F,A]),[P,F,A]);S.useEffect(()=>{D&&N()},[D,N]);const{onOpenChange:x,triggerPointerDownPosRef:T}=E;S.useEffect(()=>{if(A){let B={x:0,y:0};const U=te=>{var K,L,ne,Q;B={x:Math.abs(Math.round(te.pageX)-((K=(L=T.current)===null||L===void 0?void 0:L.x)!==null&&K!==void 0?K:0)),y:Math.abs(Math.round(te.pageY)-((ne=(Q=T.current)===null||Q===void 0?void 0:Q.y)!==null&&ne!==void 0?ne:0))}},H=te=>{B.x<=10&&B.y<=10?te.preventDefault():A.contains(te.target)||x(!1),document.removeEventListener("pointermove",U),T.current=null};return T.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",H,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",H,{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]=jE(B=>{const U=oe().filter(K=>!K.disabled),H=U.find(K=>K.ref.current===document.activeElement),te=FE(U,B,H);te&&setTimeout(()=>te.ref.current.focus())}),d=S.useCallback((B,U,H)=>{const te=!C.current&&!H;(E.value!==void 0&&E.value===U||te)&&(W(B),te&&(C.current=!0))},[E.value]),_=S.useCallback(()=>A==null?void 0:A.focus(),[A]),$=S.useCallback((B,U,H)=>{const te=!C.current&&!H;(E.value!==void 0&&E.value===U||te)&&ee(B)},[E.value]),m=n==="popper"?i6:XL,O=m===i6?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:h,collisionPadding:y,sticky:g,hideWhenDetached:p,avoidCollisions:k}:{};return S.createElement(DE,{scope:r,content:A,viewport:M,onViewportChange:j,itemRefCallback:d,selectedItem:F,onItemLeave:_,itemTextRefCallback:$,focusSelectedItem:N,selectedItemText:G,position:n,isPositioned:D,searchRef:R},S.createElement(aE,{as:Vl,allowPinchZoom:!0},S.createElement(RC,{asChild:!0,trapped:E.open,onMountAutoFocus:B=>{B.preventDefault()},onUnmountAutoFocus:me(i,B=>{var U;(U=E.trigger)===null||U===void 0||U.focus({preventScroll:!0}),B.preventDefault()})},S.createElement(Vm,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:B=>B.preventDefault(),onDismiss:()=>E.onOpenChange(!1)},S.createElement(m,be({role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:B=>B.preventDefault()},w,O,{onPlaced:()=>v(!0),ref:z,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:me(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 te=oe().filter(K=>!K.disabled).map(K=>K.ref.current);if(["ArrowUp","End"].includes(B.key)&&(te=te.slice().reverse()),["ArrowUp","ArrowDown"].includes(B.key)){const K=B.target,L=te.indexOf(K);te=te.slice(L+1)}setTimeout(()=>P(te)),B.preventDefault()}})}))))))}),XL=S.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...i}=t,s=Pa(Hl,r),o=Zh(Hl,r),[a,l]=S.useState(null),[c,f]=S.useState(null),u=Ot(e,z=>f(z)),h=rx(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(),W=s.valueNode.getBoundingClientRect(),G=w.getBoundingClientRect();if(s.dir!=="rtl"){const K=G.left-F.left,L=W.left-K,ne=z.left-L,Q=z.width+ne,ie=Math.max(Q,F.width),ve=window.innerWidth-Ui,de=n6(L,[Ui,ve-ie]);a.style.minWidth=Q+"px",a.style.left=de+"px"}else{const K=F.right-G.right,L=window.innerWidth-W.right-K,ne=window.innerWidth-z.right-L,Q=z.width+ne,ie=Math.max(Q,F.width),ve=window.innerWidth-Ui,de=n6(L,[Ui,ve-ie]);a.style.minWidth=Q+"px",a.style.right=de+"px"}const ee=h(),oe=window.innerHeight-Ui*2,D=p.scrollHeight,v=window.getComputedStyle(c),C=parseInt(v.borderTopWidth,10),P=parseInt(v.paddingTop,10),N=parseInt(v.borderBottomWidth,10),x=parseInt(v.paddingBottom,10),T=C+P+D+x+N,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-Ui,m=oe-$,O=k.offsetHeight/2,B=k.offsetTop+O,U=C+P+B,H=T-U;if(U<=$){const K=k===ee[ee.length-1].ref.current;a.style.bottom="0px";const L=c.clientHeight-p.offsetTop-p.offsetHeight,ne=Math.max(m,O+(K?_:0)+L+N),Q=U+ne;a.style.height=Q+"px"}else{const K=k===ee[0].ref.current;a.style.top="0px";const ne=Math.max($,C+p.offsetTop+(K?d:0)+O)+H;a.style.height=ne+"px",p.scrollTop=U-$+p.offsetTop}a.style.margin=`${Ui}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]);bn(()=>A(),[A]);const[I,M]=S.useState();bn(()=>{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(ZL,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:y,onScrollButtonChange:j},S.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:I}},S.createElement(Fe.div,be({},i,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),i6=S.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=Ui,...s}=t,o=nx(r);return S.createElement(K$,be({},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)"}}))}),[ZL,ej]=dc(Hl,{}),s6="SelectViewport",tj=S.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=Zh(s6,r),s=ej(s6,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(Xh.Slot,{scope:r},S.createElement(Fe.div,be({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:me(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-Ui*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})}))))}),rj="SelectGroup",[nj,AQ]=dc(rj),ij=S.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=Qs();return S.createElement(nj,{scope:r,id:i},S.createElement(Fe.div,be({role:"group","aria-labelledby":i},n,{ref:e})))}),Ep="SelectItem",[sj,oj]=dc(Ep),aj=S.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=t,a=Pa(Ep,r),l=Zh(Ep,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(sj,{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(Xh.ItemSlot,{scope:r,value:n,disabled:i,textValue:f},S.createElement(Fe.div,be({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:me(o.onFocus,()=>y(!0)),onBlur:me(o.onBlur,()=>y(!1)),onPointerUp:me(o.onPointerUp,k),onPointerMove:me(o.onPointerMove,w=>{if(i){var E;(E=l.onItemLeave)===null||E===void 0||E.call(l)}else w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:me(o.onPointerLeave,w=>{if(w.currentTarget===document.activeElement){var E;(E=l.onItemLeave)===null||E===void 0||E.call(l)}}),onKeyDown:me(o.onKeyDown,w=>{var E;((E=l.searchRef)===null||E===void 0?void 0:E.current)!==""&&w.key===" "||(jL.includes(w.key)&&k(),w.key===" "&&w.preventDefault())})}))))}),cd="SelectItemText",lj=S.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,...s}=t,o=Pa(cd,r),a=Zh(cd,r),l=oj(cd,r),c=VL(cd,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 bn(()=>(p(g),()=>k(g)),[p,k,g]),S.createElement(S.Fragment,null,S.createElement(Fe.span,be({id:l.textId},s,{ref:h})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?xo.createPortal(s.children,o.valueNode):null)});function BE(t){return t===""||t===void 0}const LE=S.forwardRef((t,e)=>{const{value:r,...n}=t,i=S.useRef(null),s=Ot(e,i),o=Dm(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($E,{asChild:!0},S.createElement("select",be({},n,{ref:s,defaultValue:r})))});LE.displayName="BubbleSelect";function jE(t){const e=$n(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 FE(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=cj(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 cj(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const fj=qL,uj=WL,dj=KL,hj=JL,vj=YL,yj=tj,pj=ij,gj=aj,mj=lj;var xj="gohwum1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 gohwum0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12rt fyvr118c fyvr11jw fyvr11n2 fyvr12uz",bj=Vt({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"gohwum6 gohwum2 fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"gohwum7 gohwum3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"gohwum8 gohwum4 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]}),wj="gohwuma gohwum9 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11tt fyvr12rt fyvr11nj",Cj="gohwume _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 gohwumd fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12wk fyvr12wl fyvr12we fyvr12wf fyvr11h0 fyvr11jw fyvr11ko fyvr12uz fyvr12uv fyvr12rt fyvr12vt fyvr12vj";const Ej=S.forwardRef(({children:t,className:e,...r},n)=>J.jsx(gj,{className:fn(Cj,e),...r,ref:n,children:J.jsx(mj,{children:t})})),o6=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(oc,{disabled:n,display:"grid",id:i??l,label:s,labelLocation:a,description:o,whiteSpace:"nowrap",children:J.jsxs(fj,{disabled:n,name:l,...u,children:[J.jsxs(uj,{id:i??l,className:fn(xj,bj({borderRadius:r})),ref:e,children:[J.jsx(dj,{placeholder:f}),J.jsx(ue,{as:hj,display:"inline-flex",children:J.jsx(AC,{})})]}),J.jsx(vj,{className:wj,children:J.jsx(yj,{children:J.jsx(pj,{children:c.map(({value:h,label:y,...g})=>J.jsx(Ej,{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(Zm,{icon:jm,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return J.jsx(tx,{ref:e,name:s,leftIcon:mO,controls:r||l,placeholder:i,value:o,onChange:c=>n==null?void 0:n(c),...a})});var Sj=Vt({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:Sj({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 UE="Switch",[kj,_Q]=Lr(UE);kj(UE);Vt({defaultClassName:"nwwh3z7",variantClassNames:{variant:{pill:"nwwh3z8",line:"nwwh3z9 nwwh3z0 fyvr11g0"},active:{true:"nwwh3za nwwh3z1 fyvr12vx",false:"nwwh3zb"},disabled:{true:"nwwh3zc nwwh3z2 fyvr12vh"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"nwwh3z3 fyvr11u5 fyvr12sb"],[{active:!1,variant:"pill"},"nwwh3z4 fyvr11ob fyvr12rz"],[{active:!0,variant:"line"},"nwwh3z5 fyvr12rt"],[{active:!1,variant:"line"},"nwwh3z6 fyvr12rz"]]});const zE="Tabs",[Aj,TQ]=Lr(zE,[uc]);uc();Aj(zE);var _j="_1ppqbnx1 _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc _1ppqbnx0 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:_j,ref:e,background:"buttonGlass",...i,children:[r&&J.jsx(r,{size:"xs"}),J.jsx(Wt,{children:n})]})});const Tj="ToastProvider",[Pj,PQ,Ij]=Hh("Toast"),[VE,IQ]=Lr("Toast",[Ij]),[RQ,qE]=VE(Tj),a6="toast.viewportPause",l6="toast.viewportResume",e1="Toast",Rj="toast.swipeStart",Mj="toast.swipeMove",Nj="toast.swipeCancel",Oj="toast.swipeEnd",[$j,Dj]=VE(e1,{onClose(){}}),Bj=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=qE(e1,r),[k,w]=S.useState(null),E=Ot(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:W,onToastRemove:G}=p,ee=$n(()=>{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(ee,v))},[ee]);S.useEffect(()=>{const v=p.viewport;if(v){const C=()=>{oe(z.current),c==null||c()},P=()=>{const N=new Date().getTime()-j.current;z.current=z.current-N,window.clearTimeout(F.current),l==null||l()};return v.addEventListener(a6,P),v.addEventListener(l6,C),()=>{v.removeEventListener(a6,P),v.removeEventListener(l6,C)}}},[p.viewport,M,l,c,oe]),S.useEffect(()=>{s&&!p.isClosePausedRef.current&&oe(M)},[s,M,p.isClosePausedRef,oe]),S.useEffect(()=>(W(),()=>G()),[W,G]);const D=S.useMemo(()=>k?WE(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($j,{scope:r,onClose:ee},xo.createPortal(S.createElement(Pj.ItemSlot,{scope:r},S.createElement(KO,{asChild:!0,onEscapeKeyDown:me(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||ee(),p.isFocusedToastEscapeKeyDownRef.current=!1})},S.createElement(Fe.li,be({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:me(t.onKeyDown,v=>{v.key==="Escape"&&(a==null||a(v.nativeEvent),v.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,ee()))}),onPointerDown:me(t.onPointerDown,v=>{v.button===0&&(A.current={x:v.clientX,y:v.clientY})}),onPointerMove:me(t.onPointerMove,v=>{if(!A.current)return;const C=v.clientX-A.current.x,P=v.clientY-A.current.y,N=!!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:_};N?(I.current=_,fd(Mj,u,$,{discrete:!1})):c6(_,p.swipeDirection,d)?(I.current=_,fd(Rj,f,$,{discrete:!1}),v.target.setPointerCapture(v.pointerId)):(Math.abs(C)>d||Math.abs(P)>d)&&(A.current=null)}),onPointerUp:me(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 N=v.currentTarget,x={originalEvent:v,delta:C};c6(C,p.swipeDirection,p.swipeThreshold)?fd(Oj,y,x,{discrete:!0}):fd(Nj,h,x,{discrete:!0}),N.addEventListener("click",T=>T.preventDefault(),{once:!0})}})})))),p.viewport))):null});Bj.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${e1}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const Lj=t=>{const{__scopeToast:e,children:r,...n}=t,i=qE(e1,e),[s,o]=S.useState(!1),[a,l]=S.useState(!1);return Vj(()=>o(!0)),S.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:S.createElement(GC,{asChild:!0},S.createElement($E,n,s&&S.createElement(S.Fragment,null,i.label," ",r)))},jj="ToastAction",Fj=S.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?S.createElement(HE,{altText:r,asChild:!0},S.createElement(zj,be({},n,{ref:e}))):null});Fj.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${jj}\``)}};const Uj="ToastClose",zj=S.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,i=Dj(Uj,r);return S.createElement(HE,{asChild:!0},S.createElement(Fe.button,be({type:"button"},n,{ref:e,onClick:me(t.onClick,i.onClose)})))}),HE=S.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...i}=t;return S.createElement(Fe.div,be({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},i,{ref:e}))});function WE(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),qj(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(...WE(n))}}),e}function fd(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?Lm(i,s):i.dispatchEvent(s)}const c6=(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 Vj(t=()=>{}){const e=$n(t);bn(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function qj(t){return t.nodeType===t.ELEMENT_NODE}Vt({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});S.createContext(null);var Hj="_15pztn1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _15pztn0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12rt fyvr128 fyvr11h0",Wj="_15pztn2";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(oc,{description:s,disabled:o,display:"grid",id:a??f,label:l,labelLocation:c,children:J.jsx(ue,{as:r,autoComplete:n,spellCheck:"false",className:fn(Hj,h&&Wj),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:i,...y})})});var Gj=Vt({defaultClassName:"bnrreb5 bnrreb0 fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb6",sm:"bnrreb7",md:"bnrreb8",lg:"bnrreb9",xl:"bnrreba"},borderRadius:{circle:"bnrrebb bnrreb1 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"bnrrebc bnrreb2 fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"bnrrebd bnrreb3 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"bnrrebe bnrreb4 fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]}),Kj="bnrrebf",Jj="bnrrebh bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11sh fyvr128 fyvr15o fyvr11h0";const Yj=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:fn(r,Gj({borderRadius:e,size:a})),style:i,flexShrink:"0",...l,children:s?J.jsx(gE,{className:Kj,disableAnimation:n,src:s}):J.jsx(Wt,{className:Jj,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})}),[t1,MQ]=Lr("Tooltip",[fc]);fc();const Qj="TooltipProvider";t1(Qj);const GE="Tooltip";t1(GE);const Xj="TooltipPortal";t1(Xj,{forceMount:void 0});t1(GE,{isInside:!1});var KE,f6=xo;KE=f6.createRoot,f6.hydrateRoot;var ix={exports:{}};const Zj={},eF=Object.freeze(Object.defineProperty({__proto__:null,default:Zj},Symbol.toStringTag,{value:"Module"})),tF=qA(eF);ix.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=tF.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 N=0;v[0]==="-"&&(N++,this.negative=1),N=0;N-=3)T=v[N]|v[N-1]<<8|v[N-2]<<16,this.words[x]|=T<>>26-R&67108863,R+=24,R>=26&&(R-=26,x++);else if(P==="le")for(N=0,x=0;N>>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 N=0;N=C;N-=2)R=l(v,C,N)<=18?(x-=18,T+=1,this.words[T]|=R>>>26):x+=8;else{var b=v.length-C;for(N=b%2===0?C+1:C;N=18?(x-=18,T+=1,this.words[T]|=R>>>26):x+=8}this._strip()};function c(D,v,C,P){for(var N=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 N=0,x=0,T=0;T>>24-N&16777215,N+=2,N>=26&&(N-=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 N=this.byteLength(),x=P||Math.max(1,N);n(N<=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,N),T},s.prototype._toArrayLikeLE=function(v,C){for(var P=0,N=0,x=0,T=0;x>8&255),P>16&255),T===6?(P>24&255),N=0,T=0):(N=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),N=0,T=0):(N=R>>>24,T+=2)}if(P>=0)for(v[P--]=N;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>>N&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 N=0;Nv.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 N=0;N0&&(this.words[N]=~this.words[N]&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,N=v%26;return this._expand(P+1),C?this.words[P]=this.words[P]|1<v.length?(P=this,N=v):(P=v,N=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 N,x;P>0?(N=this,x=v):(N=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),O=Math.max(0,d-D.length+1);O<=m;O++){var B=d-O|0;N=D.words[B]|0,x=v.words[O]|0,T=N*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 N=v.words,x=C.words,T=P.words,R=0,b,d,_,$=N[0]|0,m=$&8191,O=$>>>13,B=N[1]|0,U=B&8191,H=B>>>13,te=N[2]|0,K=te&8191,L=te>>>13,ne=N[3]|0,Q=ne&8191,ie=ne>>>13,ve=N[4]|0,de=ve&8191,pe=ve>>>13,Ke=N[5]|0,Ue=Ke&8191,ze=Ke>>>13,ko=N[6]|0,nt=ko&8191,it=ko>>>13,Ao=N[7]|0,st=Ao&8191,ot=Ao>>>13,_o=N[8]|0,at=_o&8191,lt=_o>>>13,To=N[9]|0,ct=To&8191,ft=To>>>13,Po=x[0]|0,ut=Po&8191,dt=Po>>>13,Io=x[1]|0,ht=Io&8191,vt=Io>>>13,Ro=x[2]|0,yt=Ro&8191,pt=Ro>>>13,Mo=x[3]|0,gt=Mo&8191,mt=Mo>>>13,No=x[4]|0,xt=No&8191,bt=No>>>13,Oo=x[5]|0,wt=Oo&8191,Ct=Oo>>>13,$o=x[6]|0,Et=$o&8191,St=$o>>>13,Do=x[7]|0,kt=Do&8191,At=Do>>>13,Bo=x[8]|0,_t=Bo&8191,Tt=Bo>>>13,Lo=x[9]|0,Pt=Lo&8191,It=Lo>>>13;P.negative=v.negative^C.negative,P.length=19,b=Math.imul(m,ut),d=Math.imul(m,dt),d=d+Math.imul(O,ut)|0,_=Math.imul(O,dt);var ms=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(ms>>>26)|0,ms&=67108863,b=Math.imul(U,ut),d=Math.imul(U,dt),d=d+Math.imul(H,ut)|0,_=Math.imul(H,dt),b=b+Math.imul(m,ht)|0,d=d+Math.imul(m,vt)|0,d=d+Math.imul(O,ht)|0,_=_+Math.imul(O,vt)|0;var xs=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(xs>>>26)|0,xs&=67108863,b=Math.imul(K,ut),d=Math.imul(K,dt),d=d+Math.imul(L,ut)|0,_=Math.imul(L,dt),b=b+Math.imul(U,ht)|0,d=d+Math.imul(U,vt)|0,d=d+Math.imul(H,ht)|0,_=_+Math.imul(H,vt)|0,b=b+Math.imul(m,yt)|0,d=d+Math.imul(m,pt)|0,d=d+Math.imul(O,yt)|0,_=_+Math.imul(O,pt)|0;var bs=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(bs>>>26)|0,bs&=67108863,b=Math.imul(Q,ut),d=Math.imul(Q,dt),d=d+Math.imul(ie,ut)|0,_=Math.imul(ie,dt),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(H,yt)|0,_=_+Math.imul(H,pt)|0,b=b+Math.imul(m,gt)|0,d=d+Math.imul(m,mt)|0,d=d+Math.imul(O,gt)|0,_=_+Math.imul(O,mt)|0;var ws=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(ws>>>26)|0,ws&=67108863,b=Math.imul(de,ut),d=Math.imul(de,dt),d=d+Math.imul(pe,ut)|0,_=Math.imul(pe,dt),b=b+Math.imul(Q,ht)|0,d=d+Math.imul(Q,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(H,gt)|0,_=_+Math.imul(H,mt)|0,b=b+Math.imul(m,xt)|0,d=d+Math.imul(m,bt)|0,d=d+Math.imul(O,xt)|0,_=_+Math.imul(O,bt)|0;var Cs=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(Cs>>>26)|0,Cs&=67108863,b=Math.imul(Ue,ut),d=Math.imul(Ue,dt),d=d+Math.imul(ze,ut)|0,_=Math.imul(ze,dt),b=b+Math.imul(de,ht)|0,d=d+Math.imul(de,vt)|0,d=d+Math.imul(pe,ht)|0,_=_+Math.imul(pe,vt)|0,b=b+Math.imul(Q,yt)|0,d=d+Math.imul(Q,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(H,xt)|0,_=_+Math.imul(H,bt)|0,b=b+Math.imul(m,wt)|0,d=d+Math.imul(m,Ct)|0,d=d+Math.imul(O,wt)|0,_=_+Math.imul(O,Ct)|0;var E1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(E1>>>26)|0,E1&=67108863,b=Math.imul(nt,ut),d=Math.imul(nt,dt),d=d+Math.imul(it,ut)|0,_=Math.imul(it,dt),b=b+Math.imul(Ue,ht)|0,d=d+Math.imul(Ue,vt)|0,d=d+Math.imul(ze,ht)|0,_=_+Math.imul(ze,vt)|0,b=b+Math.imul(de,yt)|0,d=d+Math.imul(de,pt)|0,d=d+Math.imul(pe,yt)|0,_=_+Math.imul(pe,pt)|0,b=b+Math.imul(Q,gt)|0,d=d+Math.imul(Q,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(H,wt)|0,_=_+Math.imul(H,Ct)|0,b=b+Math.imul(m,Et)|0,d=d+Math.imul(m,St)|0,d=d+Math.imul(O,Et)|0,_=_+Math.imul(O,St)|0;var S1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(S1>>>26)|0,S1&=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(Ue,yt)|0,d=d+Math.imul(Ue,pt)|0,d=d+Math.imul(ze,yt)|0,_=_+Math.imul(ze,pt)|0,b=b+Math.imul(de,gt)|0,d=d+Math.imul(de,mt)|0,d=d+Math.imul(pe,gt)|0,_=_+Math.imul(pe,mt)|0,b=b+Math.imul(Q,xt)|0,d=d+Math.imul(Q,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(H,Et)|0,_=_+Math.imul(H,St)|0,b=b+Math.imul(m,kt)|0,d=d+Math.imul(m,At)|0,d=d+Math.imul(O,kt)|0,_=_+Math.imul(O,At)|0;var k1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(k1>>>26)|0,k1&=67108863,b=Math.imul(at,ut),d=Math.imul(at,dt),d=d+Math.imul(lt,ut)|0,_=Math.imul(lt,dt),b=b+Math.imul(st,ht)|0,d=d+Math.imul(st,vt)|0,d=d+Math.imul(ot,ht)|0,_=_+Math.imul(ot,vt)|0,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(Ue,gt)|0,d=d+Math.imul(Ue,mt)|0,d=d+Math.imul(ze,gt)|0,_=_+Math.imul(ze,mt)|0,b=b+Math.imul(de,xt)|0,d=d+Math.imul(de,bt)|0,d=d+Math.imul(pe,xt)|0,_=_+Math.imul(pe,bt)|0,b=b+Math.imul(Q,wt)|0,d=d+Math.imul(Q,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(H,kt)|0,_=_+Math.imul(H,At)|0,b=b+Math.imul(m,_t)|0,d=d+Math.imul(m,Tt)|0,d=d+Math.imul(O,_t)|0,_=_+Math.imul(O,Tt)|0;var A1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(A1>>>26)|0,A1&=67108863,b=Math.imul(ct,ut),d=Math.imul(ct,dt),d=d+Math.imul(ft,ut)|0,_=Math.imul(ft,dt),b=b+Math.imul(at,ht)|0,d=d+Math.imul(at,vt)|0,d=d+Math.imul(lt,ht)|0,_=_+Math.imul(lt,vt)|0,b=b+Math.imul(st,yt)|0,d=d+Math.imul(st,pt)|0,d=d+Math.imul(ot,yt)|0,_=_+Math.imul(ot,pt)|0,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(Ue,xt)|0,d=d+Math.imul(Ue,bt)|0,d=d+Math.imul(ze,xt)|0,_=_+Math.imul(ze,bt)|0,b=b+Math.imul(de,wt)|0,d=d+Math.imul(de,Ct)|0,d=d+Math.imul(pe,wt)|0,_=_+Math.imul(pe,Ct)|0,b=b+Math.imul(Q,Et)|0,d=d+Math.imul(Q,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,b=b+Math.imul(U,_t)|0,d=d+Math.imul(U,Tt)|0,d=d+Math.imul(H,_t)|0,_=_+Math.imul(H,Tt)|0,b=b+Math.imul(m,Pt)|0,d=d+Math.imul(m,It)|0,d=d+Math.imul(O,Pt)|0,_=_+Math.imul(O,It)|0;var _1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(_1>>>26)|0,_1&=67108863,b=Math.imul(ct,ht),d=Math.imul(ct,vt),d=d+Math.imul(ft,ht)|0,_=Math.imul(ft,vt),b=b+Math.imul(at,yt)|0,d=d+Math.imul(at,pt)|0,d=d+Math.imul(lt,yt)|0,_=_+Math.imul(lt,pt)|0,b=b+Math.imul(st,gt)|0,d=d+Math.imul(st,mt)|0,d=d+Math.imul(ot,gt)|0,_=_+Math.imul(ot,mt)|0,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(Ue,wt)|0,d=d+Math.imul(Ue,Ct)|0,d=d+Math.imul(ze,wt)|0,_=_+Math.imul(ze,Ct)|0,b=b+Math.imul(de,Et)|0,d=d+Math.imul(de,St)|0,d=d+Math.imul(pe,Et)|0,_=_+Math.imul(pe,St)|0,b=b+Math.imul(Q,kt)|0,d=d+Math.imul(Q,At)|0,d=d+Math.imul(ie,kt)|0,_=_+Math.imul(ie,At)|0,b=b+Math.imul(K,_t)|0,d=d+Math.imul(K,Tt)|0,d=d+Math.imul(L,_t)|0,_=_+Math.imul(L,Tt)|0,b=b+Math.imul(U,Pt)|0,d=d+Math.imul(U,It)|0,d=d+Math.imul(H,Pt)|0,_=_+Math.imul(H,It)|0;var T1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(T1>>>26)|0,T1&=67108863,b=Math.imul(ct,yt),d=Math.imul(ct,pt),d=d+Math.imul(ft,yt)|0,_=Math.imul(ft,pt),b=b+Math.imul(at,gt)|0,d=d+Math.imul(at,mt)|0,d=d+Math.imul(lt,gt)|0,_=_+Math.imul(lt,mt)|0,b=b+Math.imul(st,xt)|0,d=d+Math.imul(st,bt)|0,d=d+Math.imul(ot,xt)|0,_=_+Math.imul(ot,bt)|0,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(Ue,Et)|0,d=d+Math.imul(Ue,St)|0,d=d+Math.imul(ze,Et)|0,_=_+Math.imul(ze,St)|0,b=b+Math.imul(de,kt)|0,d=d+Math.imul(de,At)|0,d=d+Math.imul(pe,kt)|0,_=_+Math.imul(pe,At)|0,b=b+Math.imul(Q,_t)|0,d=d+Math.imul(Q,Tt)|0,d=d+Math.imul(ie,_t)|0,_=_+Math.imul(ie,Tt)|0,b=b+Math.imul(K,Pt)|0,d=d+Math.imul(K,It)|0,d=d+Math.imul(L,Pt)|0,_=_+Math.imul(L,It)|0;var P1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(P1>>>26)|0,P1&=67108863,b=Math.imul(ct,gt),d=Math.imul(ct,mt),d=d+Math.imul(ft,gt)|0,_=Math.imul(ft,mt),b=b+Math.imul(at,xt)|0,d=d+Math.imul(at,bt)|0,d=d+Math.imul(lt,xt)|0,_=_+Math.imul(lt,bt)|0,b=b+Math.imul(st,wt)|0,d=d+Math.imul(st,Ct)|0,d=d+Math.imul(ot,wt)|0,_=_+Math.imul(ot,Ct)|0,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(Ue,kt)|0,d=d+Math.imul(Ue,At)|0,d=d+Math.imul(ze,kt)|0,_=_+Math.imul(ze,At)|0,b=b+Math.imul(de,_t)|0,d=d+Math.imul(de,Tt)|0,d=d+Math.imul(pe,_t)|0,_=_+Math.imul(pe,Tt)|0,b=b+Math.imul(Q,Pt)|0,d=d+Math.imul(Q,It)|0,d=d+Math.imul(ie,Pt)|0,_=_+Math.imul(ie,It)|0;var I1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(I1>>>26)|0,I1&=67108863,b=Math.imul(ct,xt),d=Math.imul(ct,bt),d=d+Math.imul(ft,xt)|0,_=Math.imul(ft,bt),b=b+Math.imul(at,wt)|0,d=d+Math.imul(at,Ct)|0,d=d+Math.imul(lt,wt)|0,_=_+Math.imul(lt,Ct)|0,b=b+Math.imul(st,Et)|0,d=d+Math.imul(st,St)|0,d=d+Math.imul(ot,Et)|0,_=_+Math.imul(ot,St)|0,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,b=b+Math.imul(Ue,_t)|0,d=d+Math.imul(Ue,Tt)|0,d=d+Math.imul(ze,_t)|0,_=_+Math.imul(ze,Tt)|0,b=b+Math.imul(de,Pt)|0,d=d+Math.imul(de,It)|0,d=d+Math.imul(pe,Pt)|0,_=_+Math.imul(pe,It)|0;var R1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(R1>>>26)|0,R1&=67108863,b=Math.imul(ct,wt),d=Math.imul(ct,Ct),d=d+Math.imul(ft,wt)|0,_=Math.imul(ft,Ct),b=b+Math.imul(at,Et)|0,d=d+Math.imul(at,St)|0,d=d+Math.imul(lt,Et)|0,_=_+Math.imul(lt,St)|0,b=b+Math.imul(st,kt)|0,d=d+Math.imul(st,At)|0,d=d+Math.imul(ot,kt)|0,_=_+Math.imul(ot,At)|0,b=b+Math.imul(nt,_t)|0,d=d+Math.imul(nt,Tt)|0,d=d+Math.imul(it,_t)|0,_=_+Math.imul(it,Tt)|0,b=b+Math.imul(Ue,Pt)|0,d=d+Math.imul(Ue,It)|0,d=d+Math.imul(ze,Pt)|0,_=_+Math.imul(ze,It)|0;var M1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(M1>>>26)|0,M1&=67108863,b=Math.imul(ct,Et),d=Math.imul(ct,St),d=d+Math.imul(ft,Et)|0,_=Math.imul(ft,St),b=b+Math.imul(at,kt)|0,d=d+Math.imul(at,At)|0,d=d+Math.imul(lt,kt)|0,_=_+Math.imul(lt,At)|0,b=b+Math.imul(st,_t)|0,d=d+Math.imul(st,Tt)|0,d=d+Math.imul(ot,_t)|0,_=_+Math.imul(ot,Tt)|0,b=b+Math.imul(nt,Pt)|0,d=d+Math.imul(nt,It)|0,d=d+Math.imul(it,Pt)|0,_=_+Math.imul(it,It)|0;var N1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(N1>>>26)|0,N1&=67108863,b=Math.imul(ct,kt),d=Math.imul(ct,At),d=d+Math.imul(ft,kt)|0,_=Math.imul(ft,At),b=b+Math.imul(at,_t)|0,d=d+Math.imul(at,Tt)|0,d=d+Math.imul(lt,_t)|0,_=_+Math.imul(lt,Tt)|0,b=b+Math.imul(st,Pt)|0,d=d+Math.imul(st,It)|0,d=d+Math.imul(ot,Pt)|0,_=_+Math.imul(ot,It)|0;var O1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+(O1>>>26)|0,O1&=67108863,b=Math.imul(ct,_t),d=Math.imul(ct,Tt),d=d+Math.imul(ft,_t)|0,_=Math.imul(ft,Tt),b=b+Math.imul(at,Pt)|0,d=d+Math.imul(at,It)|0,d=d+Math.imul(lt,Pt)|0,_=_+Math.imul(lt,It)|0;var $1=(R+b|0)+((d&8191)<<13)|0;R=(_+(d>>>13)|0)+($1>>>26)|0,$1&=67108863,b=Math.imul(ct,Pt),d=Math.imul(ct,It),d=d+Math.imul(ft,Pt)|0,_=Math.imul(ft,It);var D1=(R+b|0)+((d&8191)<<13)|0;return R=(_+(d>>>13)|0)+(D1>>>26)|0,D1&=67108863,T[0]=ms,T[1]=xs,T[2]=bs,T[3]=ws,T[4]=Cs,T[5]=E1,T[6]=S1,T[7]=k1,T[8]=A1,T[9]=_1,T[10]=T1,T[11]=P1,T[12]=I1,T[13]=R1,T[14]=M1,T[15]=N1,T[16]=O1,T[17]=$1,T[18]=D1,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,N=0,x=0;x>>26)|0,N+=T>>>26,T&=67108863}C.words[x]=R,P=T,T=N}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,N=this.length+v.length;return this.length===10&&v.length===10?P=E(this,v,C):N<63?P=w(this,v,C):N<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,N=0;N>=26,P+=x/67108864|0,P+=T>>>26,this.words[N]=T&67108863}return P!==0&&(this.words[N]=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,N=0;N=0);var C=v%26,P=(v-C)/26,N=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 N;C?N=(C-C%26)/26:N=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>=N);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,N=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 N=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,N=this.clone(),x=v,T=x.words[x.length-1]|0,R=this._countBits(T);P=26-R,P!==0&&(x=x.ushln(P),N.iushln(P),T=x.words[x.length-1]|0);var b=N.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 O=(N.words[x.length+m]|0)*67108864+(N.words[x.length+m-1]|0);for(O=Math.min(O/T|0,67108863),N._ishlnsubmul(x,O,m);N.negative!==0;)O--,N.negative=0,N._ishlnsubmul(x,1,m),N.isZero()||(N.negative^=1);d&&(d.words[m]=O)}return d&&d._strip(),N._strip(),C!=="div"&&P!==0&&N.iushrn(P),{div:d||null,mod:N}},s.prototype.divmod=function(v,C,P){if(n(!v.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var N,x,T;return this.negative!==0&&v.negative===0?(T=this.neg().divmod(v,C),C!=="mod"&&(N=T.div.neg()),C!=="div"&&(x=T.mod.neg(),P&&x.negative!==0&&x.iadd(v)),{div:N,mod:x}):this.negative===0&&v.negative!==0?(T=this.divmod(v.neg(),C),C!=="mod"&&(N=T.div.neg()),{div:N,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,N=v.ushrn(1),x=v.andln(1),T=P.cmp(N);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,N=0,x=this.length-1;x>=0;x--)N=(P*N+(this.words[x]|0))%v;return C?-N:N},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,N=this.length-1;N>=0;N--){var x=(this.words[N]|0)+P*67108864;this.words[N]=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 N=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;)(N.isOdd()||x.isOdd())&&(N.iadd(d),x.isub(_)),N.iushrn(1),x.iushrn(1);for(var O=0,B=1;!(P.words[0]&B)&&O<26;++O,B<<=1);if(O>0)for(P.iushrn(O);O-- >0;)(T.isOdd()||R.isOdd())&&(T.iadd(d),R.isub(_)),T.iushrn(1),R.iushrn(1);C.cmp(P)>=0?(C.isub(P),N.isub(T),x.isub(R)):(P.isub(C),T.isub(N),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 N=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;)N.isOdd()&&N.iadd(T),N.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),N.isub(x)):(P.isub(C),x.isub(N))}var $;return C.cmpn(1)===0?$=N:$=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 N=0;C.isEven()&&P.isEven();N++)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(N)},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,N=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 N=this.words[0]|0;P=N===v?0:Nv.length)return 1;if(this.length=0;P--){var N=this.words[P]|0,x=v.words[P]|0;if(N!==x){Nx&&(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 ee(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 N=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,N=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=N}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 W;else if(v==="p25519")C=new G;else throw new Error("Unknown prime "+v);return M[v]=C,C};function ee(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}ee.prototype._verify1=function(v){n(v.negative===0,"red works only with positives"),n(v.red,"red works only with red numbers")},ee.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")},ee.prototype.imod=function(v){return this.prime?this.prime.ireduce(v)._forceRed(this):(f(v,v.umod(this.m)._forceRed(this)),v)},ee.prototype.neg=function(v){return v.isZero()?v.clone():this.m.sub(v)._forceRed(this)},ee.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)},ee.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},ee.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)},ee.prototype.isub=function(v,C){this._verify2(v,C);var P=v.isub(C);return P.cmpn(0)<0&&P.iadd(this.m),P},ee.prototype.shl=function(v,C){return this._verify1(v),this.imod(v.ushln(C))},ee.prototype.imul=function(v,C){return this._verify2(v,C),this.imod(v.imul(C))},ee.prototype.mul=function(v,C){return this._verify2(v,C),this.imod(v.mul(C))},ee.prototype.isqr=function(v){return this.imul(v,v.clone())},ee.prototype.sqr=function(v){return this.mul(v,v)},ee.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 N=this.m.subn(1),x=0;!N.isZero()&&N.andln(1)===0;)x++,N.iushrn(1);n(!N.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,N),$=this.pow(v,N.addn(1).iushrn(1)),m=this.pow(v,N),O=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!==N[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,N[R]),b=0,R=0)}d=26}return T},ee.prototype.convertTo=function(v){var C=v.umod(this.m);return C===v?C.clone():C},ee.prototype.convertFrom=function(v){var C=v.clone();return C.red=null,C},s.mont=function(v){return new oe(v)};function oe(D){ee.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,ee),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),N=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=P.isub(N).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),N=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=P.isub(N).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,q5)})(ix);var rF=ix.exports;const we=yo(rF),nF="logger/5.7.0";let u6=!1,d6=!1;const Ld={debug:1,default:2,info:2,warning:3,error:4,off:5};let h6=Ld.default,Nv=null;function iF(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if("Ć©".normalize("NFD")!=="eĢ")throw new Error("broken implementation")}catch(t){return t.message}return null}const v6=iF();var Sp;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(Sp||(Sp={}));var Jn;(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"})(Jn||(Jn={}));const y6="0123456789abcdef";let q=class ar{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();Ld[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(h6>Ld[n])&&console.log.apply(console,r)}debug(...e){this._log(ar.levels.DEBUG,e)}info(...e){this._log(ar.levels.INFO,e)}warn(...e){this._log(ar.levels.WARNING,e)}makeError(e,r,n){if(d6)return this.makeError("censored error",r,{});r||(r=ar.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+=y6[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 Jn.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 Jn.CALL_EXCEPTION:case Jn.INSUFFICIENT_FUNDS:case Jn.MISSING_NEW:case Jn.NONCE_EXPIRED:case Jn.REPLACEMENT_UNDERPRICED:case Jn.TRANSACTION_REPLACED:case Jn.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,ar.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){v6&&this.throwError("platform missing String.prototype.normalize",ar.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:v6})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,ar.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,ar.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,ar.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",ar.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",ar.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",ar.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return Nv||(Nv=new ar(nF)),Nv}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",ar.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),u6){if(!e)return;this.globalLogger().throwError("error censorship permanent",ar.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}d6=!!e,u6=!!r}static setLogLevel(e){const r=Ld[e.toLowerCase()];if(r==null){ar.globalLogger().warn("invalid log level - "+e);return}h6=r}static from(e){return new ar(e)}};q.errors=Jn;q.levels=Sp;const sF="bytes/5.7.0",qt=new q(sF);function JE(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 Ri(t){return Oe(t)&&!(t.length%2)||Co(t)}function p6(t){return typeof t=="number"&&t==t&&t%1===0}function Co(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!p6(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function Z(t,e){if(e||(e={}),typeof t=="number"){qt.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),JE(t)&&(t=t.toHexString()),Oe(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":qt.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;iZ(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 Ai(t){let e=Z(t);if(e.length===0)return e;let r=0;for(;re&&qt.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),_l(r)}function Oe(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const Ov="0123456789abcdef";function X(t,e){if(e||(e={}),typeof t=="number"){qt.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=Ov[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),JE(t))return t.toHexString();if(Oe(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":qt.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Co(t)){let r="0x";for(let n=0;n>4]+Ov[i&15]}return r}return qt.throwArgumentError("invalid hexlify value","value",t)}function Mi(t){if(typeof t!="string")t=X(t);else if(!Oe(t)||t.length%2)return null;return(t.length-2)/2}function Gt(t,e,r){return typeof t!="string"?t=X(t):(!Oe(t)||t.length%2)&&qt.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+=X(r).substring(2)}),e}function ii(t){const e=YE(X(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function YE(t){typeof t!="string"&&(t=X(t)),Oe(t)||qt.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&qt.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(Ri(t)){let r=Z(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=X(r.slice(0,32)),e.s=X(r.slice(32,64))):r.length===65?(e.r=X(r.slice(0,32)),e.s=X(r.slice(32,64)),e.v=r[64]):qt.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:qt.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=X(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=df(Z(e._vs),32);e._vs=X(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&qt.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const o=X(i);e.s==null?e.s=o:e.s!==o&&qt.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?qt.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&&qt.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Oe(e.r)?qt.throwArgumentError("signature missing or invalid r","signature",t):e.r=Ze(e.r,32),e.s==null||!Oe(e.s)?qt.throwArgumentError("signature missing or invalid s","signature",t):e.s=Ze(e.s,32);const r=Z(e.s);r[0]>=128&&qt.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=X(r);e._vs&&(Oe(e._vs)||qt.throwArgumentError("signature invalid _vs","signature",t),e._vs=Ze(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&qt.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function kp(t){return t=Ia(t),X(Xe([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const QE="bignumber/5.7.0";var Xf=we.BN;const zi=new q(QE),$v={},g6=9007199254740991;function oF(t){return t!=null&&(V.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Oe(t)||typeof t=="bigint"||Co(t))}let m6=!1;class V{constructor(e,r){e!==$v&&zi.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 Xr(Ie(this).fromTwos(e))}toTwos(e){return Xr(Ie(this).toTwos(e))}abs(){return this._hex[0]==="-"?V.from(this._hex.substring(1)):this}add(e){return Xr(Ie(this).add(Ie(e)))}sub(e){return Xr(Ie(this).sub(Ie(e)))}div(e){return V.from(e).isZero()&&Sn("division-by-zero","div"),Xr(Ie(this).div(Ie(e)))}mul(e){return Xr(Ie(this).mul(Ie(e)))}mod(e){const r=Ie(e);return r.isNeg()&&Sn("division-by-zero","mod"),Xr(Ie(this).umod(r))}pow(e){const r=Ie(e);return r.isNeg()&&Sn("negative-power","pow"),Xr(Ie(this).pow(r))}and(e){const r=Ie(e);return(this.isNegative()||r.isNeg())&&Sn("unbound-bitwise-result","and"),Xr(Ie(this).and(r))}or(e){const r=Ie(e);return(this.isNegative()||r.isNeg())&&Sn("unbound-bitwise-result","or"),Xr(Ie(this).or(r))}xor(e){const r=Ie(e);return(this.isNegative()||r.isNeg())&&Sn("unbound-bitwise-result","xor"),Xr(Ie(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&Sn("negative-width","mask"),Xr(Ie(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Sn("negative-width","shl"),Xr(Ie(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Sn("negative-width","shr"),Xr(Ie(this).shrn(e))}eq(e){return Ie(this).eq(Ie(e))}lt(e){return Ie(this).lt(Ie(e))}lte(e){return Ie(this).lte(Ie(e))}gt(e){return Ie(this).gt(Ie(e))}gte(e){return Ie(this).gte(Ie(e))}isNegative(){return this._hex[0]==="-"}isZero(){return Ie(this).isZero()}toNumber(){try{return Ie(this).toNumber()}catch{Sn("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return zi.throwError("this platform does not support BigInt",q.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?m6||(m6=!0,zi.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?zi.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",q.errors.UNEXPECTED_ARGUMENT,{}):zi.throwError("BigNumber.toString does not accept parameters",q.errors.UNEXPECTED_ARGUMENT,{})),Ie(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($v,Zf(e)):e.match(/^-?[0-9]+$/)?new V($v,Zf(new Xf(e))):zi.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Sn("underflow","BigNumber.from",e),(e>=g6||e<=-g6)&&Sn("overflow","BigNumber.from",e),V.from(String(e));const r=e;if(typeof r=="bigint")return V.from(r.toString());if(Co(r))return V.from(X(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"&&(Oe(n)||n[0]==="-"&&Oe(n.substring(1))))return V.from(n)}return zi.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Zf(t){if(typeof t!="string")return Zf(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&zi.throwArgumentError("invalid hex","value",t),t=Zf(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 Xr(t){return V.from(Zf(t))}function Ie(t){const e=V.from(t).toHexString();return e[0]==="-"?new Xf("-"+e.substring(3),16):new Xf(e.substring(2),16)}function Sn(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),zi.throwError(t,q.errors.NUMERIC_FAULT,n)}function aF(t){return new Xf(t,36).toString(16)}function lF(t){return new Xf(t,16).toString(36)}const Wr=new q(QE),hf={},XE=V.from(0),ZE=V.from(-1);function e7(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 vf="0";for(;vf.length<256;)vf+=vf;function sx(t){if(typeof t!="number")try{t=V.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+vf.substring(0,t):Wr.throwArgumentError("invalid decimal size","decimals",t)}function jd(t,e){e==null&&(e=0);const r=sx(e);t=V.from(t);const n=t.lt(XE);n&&(t=t.mul(ZE));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&&e7("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(hf,r,n,i)}}class br{constructor(e,r,n,i){e!==hf&&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=ui(this._value,this.format.decimals),n=ui(e._value,e.format.decimals);return br.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=ui(this._value,this.format.decimals),n=ui(e._value,e.format.decimals);return br.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=ui(this._value,this.format.decimals),n=ui(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=ui(this._value,this.format.decimals),n=ui(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(x6.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(x6.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"+vf.substring(0,e),this.format),i=cF.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 Ze(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&&!oF(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),br.fromString(jd(e,r),Tl.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=Tl.from(r),i=ui(e,n.decimals);!n.signed&&i.lt(XE)&&e7("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=Ze(s,n.width/8));const o=jd(i,n.decimals);return new br(hf,s,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=Tl.from(r);if(Z(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=jd(i,n.decimals);return new br(hf,s,o,n)}static from(e,r){if(typeof e=="string")return br.fromString(e,r);if(Co(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 x6=br.from(1),cF=br.from("0.5"),fF="properties/5.7.0";var uF=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 q0=new q(fF);function re(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function ei(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 et(t){return uF(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 ox(t,e){(!t||typeof t!="object")&&q0.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||q0.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function sr(t){const e={};for(const r in t)e[r]=t[r];return e}const dF={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function t7(t){if(t==null||dF[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;rNi(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&re(e,r,Ni(n))}return e}return q0.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function Ni(t){return hF(t)}class Ra{constructor(e){for(const r in e)this[r]=Ni(e[r])}}const Cu="abi/5.7.0",$e=new q(Cu),xa={};let b6={calldata:!0,memory:!0,storage:!0},vF={calldata:!0,memory:!0};function ud(t,e){if(t==="bytes"||t==="string"){if(b6[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&vF[e])return!0;return(b6[e]||e==="payable")&&$e.throwArgumentError("invalid modifier","name",e),!1}function yF(t,e){let r=t;function n(a){$e.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!==Le.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===Le.full?", ":",")+")"):r+=this.type,e!==Le.sighash&&(this.indexed===!0&&(r+=" indexed"),e===Le.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?dr.fromString(e,r):dr.fromObject(e)}static fromObject(e){return dr.isParamType(e)?e:new dr(xa,{name:e.name||null,type:Ga(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(dr.fromObject):null})}static fromString(e,r){function n(i){return dr.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(yF(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function eu(t,e){return mF(t).map(r=>dr.fromString(r,e))}class xi{constructor(e,r){e!==xa&&$e.throwError("use a static from method",q.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Fd(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return xi.isFragment(e)?e:typeof e=="string"?xi.fromString(e):xi.fromObject(e)}static fromObject(e){if(xi.isFragment(e))return e;switch(e.type){case"function":return Zn.fromObject(e);case"event":return mi.fromObject(e);case"constructor":return Xn.fromObject(e);case"error":return Gi.fromObject(e);case"fallback":case"receive":return null}return $e.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"?mi.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Zn.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Xn.fromString(e.trim()):e.split(" ")[0]==="error"?Gi.fromString(e.substring(5).trim()):$e.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class mi extends xi{format(e){if(e||(e=Le.sighash),Le[e]||$e.throwArgumentError("invalid format type","format",e),e===Le.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!==Le.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Le.full?", ":",")+") ",e!==Le.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?mi.fromString(e):mi.fromObject(e)}static fromObject(e){if(mi.isEventFragment(e))return e;e.type!=="event"&&$e.throwArgumentError("invalid event object","value",e);const r={name:tu(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(dr.fromObject):[],type:"event"};return new mi(xa,r)}static fromString(e){let r=e.match(ru);r||$e.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:$e.warn("unknown modifier: "+i)}}),mi.fromObject({name:r[1].trim(),anonymous:n,inputs:eu(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function r7(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&$e.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||$e.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=V.from(r[1]),r[0]):t}function n7(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 i7(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&&$e.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&$e.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"&&$e.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&&$e.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"&&$e.throwArgumentError("unable to determine stateMutability","value",t),e}class Xn extends xi{format(e){if(e||(e=Le.sighash),Le[e]||$e.throwArgumentError("invalid format type","format",e),e===Le.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===Le.sighash&&$e.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===Le.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?Xn.fromString(e):Xn.fromObject(e)}static fromObject(e){if(Xn.isConstructorFragment(e))return e;e.type!=="constructor"&&$e.throwArgumentError("invalid constructor object","value",e);let r=i7(e);r.constant&&$e.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(dr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?V.from(e.gas):null};return new Xn(xa,n)}static fromString(e){let r={type:"constructor"};e=r7(e,r);let n=e.match(ru);return(!n||n[1].trim()!=="constructor")&&$e.throwArgumentError("invalid constructor string","value",e),r.inputs=eu(n[2].trim(),!1),n7(n[3].trim(),r),Xn.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class Zn extends Xn{format(e){if(e||(e=Le.sighash),Le[e]||$e.throwArgumentError("invalid format type","format",e),e===Le.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!==Le.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Le.full?", ":",")+") ",e!==Le.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"?Zn.fromString(e):Zn.fromObject(e)}static fromObject(e){if(Zn.isFunctionFragment(e))return e;e.type!=="function"&&$e.throwArgumentError("invalid function object","value",e);let r=i7(e);const n={type:e.type,name:tu(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(dr.fromObject):[],outputs:e.outputs?e.outputs.map(dr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?V.from(e.gas):null};return new Zn(xa,n)}static fromString(e){let r={type:"function"};e=r7(e,r);let n=e.split(" returns ");n.length>2&&$e.throwArgumentError("invalid function string","value",e);let i=n[0].match(ru);if(i||$e.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&tu(r.name),r.inputs=eu(i[2],!1),n7(i[3].trim(),r),n.length>1){let s=n[1].match(ru);(s[1].trim()!=""||s[3].trim()!="")&&$e.throwArgumentError("unexpected tokens","value",e),r.outputs=eu(s[2],!1)}else r.outputs=[];return Zn.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function w6(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&$e.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Gi extends xi{format(e){if(e||(e=Le.sighash),Le[e]||$e.throwArgumentError("invalid format type","format",e),e===Le.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Le.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Le.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?Gi.fromString(e):Gi.fromObject(e)}static fromObject(e){if(Gi.isErrorFragment(e))return e;e.type!=="error"&&$e.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:tu(e.name),inputs:e.inputs?e.inputs.map(dr.fromObject):[]};return w6(new Gi(xa,r))}static fromString(e){let r={type:"error"},n=e.match(ru);return n||$e.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&tu(r.name),r.inputs=eu(n[2],!1),w6(Gi.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 gF=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function tu(t){return(!t||!t.match(gF))&&$e.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const ru=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function mF(t){t=t.trim();let e=[],r="",n=0;for(let i=0;ithis.wordSize&&ax.throwError("value out-of-bounds",q.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=Xe([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 H0{constructor(e,r,n,i){re(this,"_data",Z(e)),re(this,"wordSize",r||32),re(this,"_coerceFunc",n),re(this,"allowLoose",i),this._offset=0}get data(){return X(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):H0.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:ax.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 H0(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 o7={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=q5: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(m){return Object.prototype.toString.call(m)==="[object Array]"}),l&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(m){return typeof m=="object"&&m.buffer&&m.buffer.constructor===ArrayBuffer});for(var I=function(m,O,B){return function(U){return new d(m,O,m).update(U)[B]()}},M=function(m,O,B){return function(U,H){return new d(m,O,H).update(U)[B]()}},j=function(m,O,B){return function(U,H,te,K){return v["cshake"+m].update(U,H,te,K)[B]()}},z=function(m,O,B){return function(U,H,te,K){return v["kmac"+m].update(U,H,te,K)[B]()}},F=function(m,O,B,U){for(var H=0;H>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 O,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);O=!0}for(var U=this.blocks,H=this.byteCount,te=m.length,K=this.blockCount,L=0,ne=this.s,Q,ie;L>2]|=m[L]<>2]|=ie<>2]|=(192|ie>>6)<>2]|=(128|ie&63)<=57344?(U[Q>>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)<=H){for(this.start=Q-H,this.block=U[K],Q=0;Q>8,B=m&255;B>0;)H.unshift(B),m=m>>8,B=m&255,++U;return O?H.push(U):H.unshift(U),this.update(H),H.length},d.prototype.encodeString=function(m){var O,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);O=!0}var U=0,H=m.length;if(O)U=H;else for(var te=0;te=57344?U+=3:(K=65536+((K&1023)<<10|m.charCodeAt(++te)&1023),U+=4)}return U+=this.encode(U*8),this.update(m),U},d.prototype.bytepad=function(m,O){for(var B=this.encode(O),U=0;U>2]|=this.padding[O&3],this.lastByteIndex===this.byteCount)for(m[0]=m[B],O=1;O>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];te%m===0&&($(O),H=0)}return U&&(L=O[H],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,O=this.s,B=this.outputBlocks,U=this.extraBytes,H=0,te=0,K=this.outputBits>>3,L;U?L=new ArrayBuffer(B+1<<2):L=new ArrayBuffer(K);for(var ne=new Uint32Array(L);te>8&255,K[L+2]=ne>>16&255,K[L+3]=ne>>24&255;te%m===0&&$(O)}return U&&(L=te<<2,ne=O[H],K[L]=ne&255,U>1&&(K[L+1]=ne>>8&255),U>2&&(K[L+2]=ne>>16&255)),K};function _(m,O,B){d.call(this,m,O,B)}_.prototype=new d,_.prototype.finalize=function(){return this.encode(this.outputBits,!0),d.prototype.finalize.call(this)};var $=function(m){var O,B,U,H,te,K,L,ne,Q,ie,ve,de,pe,Ke,Ue,ze,ko,nt,it,Ao,st,ot,_o,at,lt,To,ct,ft,Po,ut,dt,Io,ht,vt,Ro,yt,pt,Mo,gt,mt,No,xt,bt,Oo,wt,Ct,$o,Et,St,Do,kt,At,Bo,_t,Tt,Lo,Pt,It,ms,xs,bs,ws,Cs;for(U=0;U<48;U+=2)H=m[0]^m[10]^m[20]^m[30]^m[40],te=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],Q=m[5]^m[15]^m[25]^m[35]^m[45],ie=m[6]^m[16]^m[26]^m[36]^m[46],ve=m[7]^m[17]^m[27]^m[37]^m[47],de=m[8]^m[18]^m[28]^m[38]^m[48],pe=m[9]^m[19]^m[29]^m[39]^m[49],O=de^(K<<1|L>>>31),B=pe^(L<<1|K>>>31),m[0]^=O,m[1]^=B,m[10]^=O,m[11]^=B,m[20]^=O,m[21]^=B,m[30]^=O,m[31]^=B,m[40]^=O,m[41]^=B,O=H^(ne<<1|Q>>>31),B=te^(Q<<1|ne>>>31),m[2]^=O,m[3]^=B,m[12]^=O,m[13]^=B,m[22]^=O,m[23]^=B,m[32]^=O,m[33]^=B,m[42]^=O,m[43]^=B,O=K^(ie<<1|ve>>>31),B=L^(ve<<1|ie>>>31),m[4]^=O,m[5]^=B,m[14]^=O,m[15]^=B,m[24]^=O,m[25]^=B,m[34]^=O,m[35]^=B,m[44]^=O,m[45]^=B,O=ne^(de<<1|pe>>>31),B=Q^(pe<<1|de>>>31),m[6]^=O,m[7]^=B,m[16]^=O,m[17]^=B,m[26]^=O,m[27]^=B,m[36]^=O,m[37]^=B,m[46]^=O,m[47]^=B,O=ie^(H<<1|te>>>31),B=ve^(te<<1|H>>>31),m[8]^=O,m[9]^=B,m[18]^=O,m[19]^=B,m[28]^=O,m[29]^=B,m[38]^=O,m[39]^=B,m[48]^=O,m[49]^=B,Ke=m[0],Ue=m[1],Ct=m[11]<<4|m[10]>>>28,$o=m[10]<<4|m[11]>>>28,ft=m[20]<<3|m[21]>>>29,Po=m[21]<<3|m[20]>>>29,xs=m[31]<<9|m[30]>>>23,bs=m[30]<<9|m[31]>>>23,xt=m[40]<<18|m[41]>>>14,bt=m[41]<<18|m[40]>>>14,vt=m[2]<<1|m[3]>>>31,Ro=m[3]<<1|m[2]>>>31,ze=m[13]<<12|m[12]>>>20,ko=m[12]<<12|m[13]>>>20,Et=m[22]<<10|m[23]>>>22,St=m[23]<<10|m[22]>>>22,ut=m[33]<<13|m[32]>>>19,dt=m[32]<<13|m[33]>>>19,ws=m[42]<<2|m[43]>>>30,Cs=m[43]<<2|m[42]>>>30,_t=m[5]<<30|m[4]>>>2,Tt=m[4]<<30|m[5]>>>2,yt=m[14]<<6|m[15]>>>26,pt=m[15]<<6|m[14]>>>26,nt=m[25]<<11|m[24]>>>21,it=m[24]<<11|m[25]>>>21,Do=m[34]<<15|m[35]>>>17,kt=m[35]<<15|m[34]>>>17,Io=m[45]<<29|m[44]>>>3,ht=m[44]<<29|m[45]>>>3,at=m[6]<<28|m[7]>>>4,lt=m[7]<<28|m[6]>>>4,Lo=m[17]<<23|m[16]>>>9,Pt=m[16]<<23|m[17]>>>9,Mo=m[26]<<25|m[27]>>>7,gt=m[27]<<25|m[26]>>>7,Ao=m[36]<<21|m[37]>>>11,st=m[37]<<21|m[36]>>>11,At=m[47]<<24|m[46]>>>8,Bo=m[46]<<24|m[47]>>>8,Oo=m[8]<<27|m[9]>>>5,wt=m[9]<<27|m[8]>>>5,To=m[18]<<20|m[19]>>>12,ct=m[19]<<20|m[18]>>>12,It=m[29]<<7|m[28]>>>25,ms=m[28]<<7|m[29]>>>25,mt=m[38]<<8|m[39]>>>24,No=m[39]<<8|m[38]>>>24,ot=m[48]<<14|m[49]>>>18,_o=m[49]<<14|m[48]>>>18,m[0]=Ke^~ze&nt,m[1]=Ue^~ko&it,m[10]=at^~To&ft,m[11]=lt^~ct&Po,m[20]=vt^~yt&Mo,m[21]=Ro^~pt>,m[30]=Oo^~Ct&Et,m[31]=wt^~$o&St,m[40]=_t^~Lo&It,m[41]=Tt^~Pt&ms,m[2]=ze^~nt&Ao,m[3]=ko^~it&st,m[12]=To^~ft&ut,m[13]=ct^~Po&dt,m[22]=yt^~Mo&mt,m[23]=pt^~gt&No,m[32]=Ct^~Et&Do,m[33]=$o^~St&kt,m[42]=Lo^~It&xs,m[43]=Pt^~ms&bs,m[4]=nt^~Ao&ot,m[5]=it^~st&_o,m[14]=ft^~ut&Io,m[15]=Po^~dt&ht,m[24]=Mo^~mt&xt,m[25]=gt^~No&bt,m[34]=Et^~Do&At,m[35]=St^~kt&Bo,m[44]=It^~xs&ws,m[45]=ms^~bs&Cs,m[6]=Ao^~ot&Ke,m[7]=st^~_o&Ue,m[16]=ut^~Io&at,m[17]=dt^~ht<,m[26]=mt^~xt&vt,m[27]=No^~bt&Ro,m[36]=Do^~At&Oo,m[37]=kt^~Bo&wt,m[46]=xs^~ws&_t,m[47]=bs^~Cs&Tt,m[8]=ot^~Ke&ze,m[9]=_o^~Ue&ko,m[18]=Io^~at&To,m[19]=ht^~lt&ct,m[28]=xt^~vt&yt,m[29]=bt^~Ro&pt,m[38]=At^~Oo&Ct,m[39]=Bo^~wt&$o,m[48]=ws^~_t&Lo,m[49]=Cs^~Tt&Pt,m[0]^=p[U],m[1]^=p[U+1]};if(a)t.exports=v;else for(P=0;P>=8;return e}function E6(t,e,r){let n=0;for(let i=0;ie+1+n&&vi.throwError("child data too short",q.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function l7(t,e){if(t.length===0&&vi.throwError("data too short",q.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&vi.throwError("data short segment too short",q.errors.BUFFER_OVERRUN,{});const n=E6(t,e+1,r);return e+1+r+n>t.length&&vi.throwError("data long segment too short",q.errors.BUFFER_OVERRUN,{}),S6(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&vi.throwError("data array too short",q.errors.BUFFER_OVERRUN,{}),S6(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&vi.throwError("data array too short",q.errors.BUFFER_OVERRUN,{});const n=E6(t,e+1,r);e+1+r+n>t.length&&vi.throwError("data array too short",q.errors.BUFFER_OVERRUN,{});const i=X(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&&vi.throwError("data too short",q.errors.BUFFER_OVERRUN,{});const n=X(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:X(t[e])}}function r1(t){const e=Z(t),r=l7(e,0);return r.consumed!==e.length&&vi.throwArgumentError("invalid rlp data","data",t),r.result}const CF=Object.freeze(Object.defineProperty({__proto__:null,decode:r1,encode:ba},Symbol.toStringTag,{value:"Module"})),EF="address/5.7.0",js=new q(EF);function k6(t){Oe(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=Z(ge(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 SF=9007199254740991;function kF(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const lx={};for(let t=0;t<10;t++)lx[String(t)]=String(t);for(let t=0;t<26;t++)lx[String.fromCharCode(65+t)]=String(10+t);const A6=Math.floor(kF(SF));function c7(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>lx[n]).join("");for(;e.length>=A6;){let n=e.substring(0,A6);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 Ce(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=k6(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)!==c7(t)&&js.throwArgumentError("bad icap checksum","address",t),e=aF(t.substring(4));e.length<40;)e="0"+e;e=k6("0x"+e)}else js.throwArgumentError("invalid address","address",t);return e}function f7(t){try{return Ce(t),!0}catch{}return!1}function AF(t){let e=lF(Ce(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+c7("XE00"+e)+e}function cx(t){let e=null;try{e=Ce(t.from)}catch{js.throwArgumentError("missing from address","transaction",t)}const r=Ai(Z(V.from(t.nonce).toHexString()));return Ce(Gt(ge(ba([e,r])),12))}function _F(t,e,r){return Mi(e)!==32&&js.throwArgumentError("salt must be 32 bytes","salt",e),Mi(r)!==32&&js.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),Ce(Gt(ge(Xe(["0xff",Ce(t),e,r])),12))}class TF extends hs{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=Ce(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return Ce(Ze(e.readValue().toHexString(),20))}}class PF 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(Cu);function u7(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 Ap(t.wordSize),s=new Ap(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 d7(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 IF 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===en.OVERRUN?r.length-e-1:0}function FF(t,e,r,n,i){return t===en.OVERLONG?(n.push(i),0):(n.push(65533),g7(t,e,r))}const m7=Object.freeze({error:jF,ignore:g7,replace:FF});function ux(t,e){e==null&&(e=m7.error),t=Z(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(en.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(en.BAD_PREFIX,n-1,t,r);continue}if(n-1+s>=t.length){n+=e(en.OVERRUN,n-1,t,r);continue}let a=i&(1<<8-s-1)-1;for(let l=0;l1114111){n+=e(en.OUT_OF_RANGE,n-1-s,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(en.UTF16_SURROGATE,n-1-s,t,r,a);continue}if(a<=o){n+=e(en.OVERLONG,n-1-s,t,r,a);continue}r.push(a)}}return r}function Ve(t,e=Oi.current){e!=Oi.current&&(p7.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 Z(r)}function Dv(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function UF(t,e){return'"'+ux(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?Dv(r):(r-=65536,Dv((r>>10&1023)+55296)+Dv((r&1023)+56320))}).join("")+'"'}function _p(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 _p(ux(t,e))}function G0(t,e=Oi.current){return ux(Ve(t,e))}function zF(t){const e=Ve(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return X(Xe([e,W0]).slice(0,32))}function VF(t){const e=Z(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 qF(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 x7(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 hx(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 HF=x7("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"),WF="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}],KF=dx("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"),JF=dx("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"),YF=dx("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",qF),QF=x7("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 XF(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function ZF(t){return!!hx(t,HF)}function eU(t){let e=hx(t,GF);if(e)return[t+e.s];let r=KF[t];if(r)return r;let n=JF[t];if(n)return[t+n[0]];let i=YF[t];return i||null}function tU(t){return!!hx(t,QF)}function rU(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=G0(t);e=XF(e.map(n=>{if(WF.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=eU(n);return i||[n]})),e=G0(_p(e),Oi.NFKC),e.forEach(n=>{if(tU(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(ZF(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=_p(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}class nU extends h7{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Ve(r))}decode(e){return vs(super.decode(e))}}class dd 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 u7(e,this.coders,r)}decode(e){return e.coerce(this.name,d7(e,this.coders))}}const hd=new q(Cu),iU=new RegExp(/^bytes([0-9]*)$/),sU=new RegExp(/^(u?int)([0-9]*)$/);class vx{constructor(e){re(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new TF(e.name);case"bool":return new RF(e.name);case"string":return new nU(e.name);case"bytes":return new MF(e.name);case"array":return new IF(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new dd((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new OF(e.name)}let r=e.type.match(sU);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&hd.throwArgumentError("invalid "+r[1]+" bit length","param",e),new BF(n/8,r[1]==="int",e.name)}if(r=e.type.match(iU),r){let n=parseInt(r[1]);return(n===0||n>32)&&hd.throwArgumentError("invalid bytes length","param",e),new NF(n,e.name)}return hd.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new H0(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new Ap(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(dr.from(i)));return new dd(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&hd.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(dr.from(o))),i=new dd(n,"_"),s=this._getWriter();return i.encode(s,r),s.data}decode(e,r,n){const i=e.map(o=>this._getCoder(dr.from(o)));return new dd(i,"_").decode(this._getReader(Z(r),n))}}const Jr=new vx;function Fs(t){return ge(Ve(t))}const b7="hash/5.7.0";function yx(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 aU(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,W=(W^y)<<1|y|1;E=F,A=1+W-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 cU(t){let e=0;return()=>t[e++]}function fU(t){return cU(lU(t))}function uU(t){return t&1?~t>>1:t>>1}function dU(t,e){let r=Array(t);for(let n=0;ne[o]):r}function vU(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(pU(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(gU(r,t))}return aU(w7(e))}function yU(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function C7(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function pU(t,e){let r=1+e(),n=e(),i=yU(e),s=C7(i.length,1+t,e);return w7(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 gU(t,e){let r=1+e();return C7(r,1+t,e).map(i=>[i[0],i.slice(1)])}function mU(t){let e=K0(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let c=K0(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 xU(){return fU(yx("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 n1=xU(),bU=new Set(K0(n1)),wU=new Set(K0(n1)),CU=vU(n1),EU=mU(n1),T6=45,P6=95;function E7(t){return G0(t)}function SU(t){return t.filter(e=>e!=65039)}function S7(t){for(let e of t.split(".")){let r=E7(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]===T6&&r[3]===T6)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function kU(t){return S7(AU(t,SU))}function AU(t,e){let r=E7(t).reverse(),n=[];for(;r.length;){let i=TU(r);if(i){n.push(...e(i));continue}let s=r.pop();if(bU.has(s)){n.push(s);continue}if(wU.has(s))continue;let o=CU[s];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${s.toString(16).toUpperCase()}`)}return S7(_U(String.fromCodePoint(...n)))}function _U(t){return t.normalize("NFC")}function TU(t,e){var r;let n=EU,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 PU=new q(b7),k7=new Uint8Array(32);k7.fill(0);function I6(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function gx(t){const e=Ve(kU(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(I6(e.slice(n))),r}function IU(t){try{return gx(t).length!==0}catch{}return!1}function yf(t){typeof t!="string"&&PU.throwArgumentError("invalid ENS name; not a string","name",t);let e=k7;const r=gx(t);for(;r.length;)e=ge(Xe([e,ge(r.pop())]));return X(e)}function A7(t){return X(Xe(gx(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 RU=`Ethereum Signed Message: +`;function i1(t){return typeof t=="string"&&(t=Ve(t)),ge(Xe([Ve(RU),Ve(String(t.length)),t]))}var MU=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 jt=new q(b7),_7=new Uint8Array(32);_7.fill(0);const NU=V.from(-1),T7=V.from(0),P7=V.from(1),OU=V.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function $U(t){const e=Z(t),r=e.length%32;return r?Hr([e,_7.slice(r)]):X(e)}const DU=Ze(P7.toHexString(),32),BU=Ze(T7.toHexString(),32),R6={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Bv=["name","version","chainId","verifyingContract","salt"];function M6(t){return function(e){return typeof e!="string"&&jt.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const LU={name:M6("name"),version:M6("version"),chainId:function(t){try{return V.from(t).toString()}catch{}return jt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return Ce(t).toLowerCase()}catch{}return jt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=Z(t);if(e.length!==32)throw new Error("bad length");return X(e)}catch{}return jt.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function Lv(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))&&jt.throwArgumentError("invalid numeric width","type",t);const i=OU.mask(r?n-1:n),s=r?i.add(P7).mul(NU):T7;return function(o){const a=V.from(o);return(a.lt(s)||a.gt(i))&&jt.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),Ze(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))&&jt.throwArgumentError("invalid bytes width","type",t),function(n){return Z(n).length!==r&&jt.throwArgumentError(`invalid length for ${t}`,"value",n),$U(n)}}}switch(t){case"address":return function(e){return Ze(Ce(e),32)};case"bool":return function(e){return e?DU:BU};case"bytes":return function(e){return ge(e)};case"string":return function(e){return Fs(e)}}return null}function N6(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class rr{constructor(e){re(this,"types",Object.freeze(Ni(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]&&jt.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&&jt.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!Lv(f)&&(n[f]||jt.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?jt.throwArgumentError("missing primary type","types",e):s.length>1&&jt.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]&&jt.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]=N6(a,e[a])+l.map(c=>N6(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=Lv(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&&jt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let l=a.map(s);return this._types[i]&&(l=l.map(ge)),ge(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]?ge(c):c});return o.unshift(i),Hr(o)}}return jt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||jt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return ge(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(Lv(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&&jt.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),{}):jt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new rr(e)}static getPrimaryType(e){return rr.from(e).primaryType}static hashStruct(e,r,n){return rr.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=R6[n];i||jt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>Bv.indexOf(n.name)-Bv.indexOf(i.name)),rr.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Hr(["0x1901",rr.hashDomain(e),rr.from(r).hash(n)])}static hash(e,r,n){return ge(rr.encode(e,r,n))}static resolveNames(e,r,n,i){return MU(this,void 0,void 0,function*(){e=sr(e);const s={};e.verifyingContract&&!Oe(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=rr.from(r);o.visit(n,(a,l)=>(a==="address"&&!Oe(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){rr.hashDomain(e);const i={},s=[];Bv.forEach(l=>{const c=e[l];c!=null&&(i[l]=LU[l](c),s.push({name:l,type:R6[l]}))});const o=rr.from(r),a=sr(r);return a.EIP712Domain?jt.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 X(Z(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"&&jt.throwArgumentError("invalid string","value",c),c}return jt.throwArgumentError("unsupported type","type",l)})}}}const Lt=new q(Cu);class I7 extends Ra{}class R7 extends Ra{}class jU extends Ra{}class J0 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 O6(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class or{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,re(this,"fragments",r.map(n=>xi.from(n)).filter(n=>n!=null)),re(this,"_abiCoder",ei(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){Lt.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]){Lt.warn("duplicate definition - "+s);return}i[s]=n}),this.deploy||re(this,"deploy",Xn.from({payable:!1,type:"constructor"})),re(this,"_isInterface",!0)}format(e){e||(e=Le.full),e===Le.sighash&&Lt.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===Le.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return Jr}static getAddress(e){return Ce(e)}static getSighash(e){return Gt(Fs(e.format()),0,4)}static getEventTopic(e){return Fs(e.format())}getFunction(e){if(Oe(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[Zn.fromString(e).format()];return r||Lt.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(Oe(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[mi.fromString(e).format()];return r||Lt.throwArgumentError("no matching event","signature",e),r}getError(e){if(Oe(e)){const n=ei(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[Zn.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 ei(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),ei(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=Z(r);return X(n.slice(0,4))!==this.getSighash(e)&&Lt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",X(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),X(Xe([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=Z(r);return X(n.slice(0,4))!==this.getSighash(e)&&Lt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",X(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),X(Xe([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=Z(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=X(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:X(r),errorArgs:o,errorName:a,errorSignature:l,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),X(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"?ge(X(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]),Ze(X(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(ge(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);(!Oe(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(dr.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,Xe(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 J0({_isIndexed:!0,hash:null});else if(o[y])c[y]=new J0({_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 O6(`property ${JSON.stringify(h.name)}`,g)}}):c[h.name]=g}});for(let h=0;h{throw O6(`index ${h}`,y)}})}return Object.freeze(c)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new R7({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 I7({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=X(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new jU({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 zU=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 VU=new q(UU);class qU extends Ra{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class Eo{constructor(){VU.checkAbstract(new.target,Eo),re(this,"_isProvider",!0)}getFeeData(){return zU(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield et({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 HU="abstract-signer/5.7.0";var zn=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 kn=new q(HU),WU=["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 M7{constructor(){kn.checkAbstract(new.target,M7),re(this,"_isSigner",!0)}getBalance(e){return zn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return zn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return zn(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield et(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return zn(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield et(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return zn(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 zn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return zn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return zn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return zn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)WU.indexOf(n)===-1&&kn.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=sr(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()&&kn.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return zn(this,void 0,void 0,function*(){const r=yield et(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>zn(this,void 0,void 0,function*(){if(i==null)return null;const s=yield this.resolveName(i);return s==null&&kn.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)?kn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&kn.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&&kn.throwError("network does not support EIP-1559",q.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):kn.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 kn.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]&&kn.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield et(r)})}_checkProvider(e){this.provider||kn.throwError("missing provider",q.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class mx 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(()=>{kn.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 mx(this.address,e)}}var N7={},Ne={},Eu=O7;function O7(t,e){if(!t)throw new Error(e||"Assertion failed")}O7.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var Tp={exports:{}};typeof Object.create=="function"?Tp.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Tp.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 KU=Tp.exports,JU=Eu,YU=KU;Ne.inherits=YU;function QU(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function XU(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):QU(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}Ne.htonl=$7;function ez(t,e){for(var r="",n=0;n>>0}return s}Ne.join32=tz;function rz(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}Ne.split32=rz;function nz(t,e){return t>>>e|t<<32-e}Ne.rotr32=nz;function iz(t,e){return t<>>32-e}Ne.rotl32=iz;function sz(t,e){return t+e>>>0}Ne.sum32=sz;function oz(t,e,r){return t+e+r>>>0}Ne.sum32_3=oz;function az(t,e,r,n){return t+e+r+n>>>0}Ne.sum32_4=az;function lz(t,e,r,n,i){return t+e+r+n+i>>>0}Ne.sum32_5=lz;function cz(t,e,r,n){var i=t[e],s=t[e+1],o=n+s>>>0,a=(o>>0,t[e+1]=o}Ne.sum64=cz;function fz(t,e,r,n){var i=e+n>>>0,s=(i>>0}Ne.sum64_hi=fz;function uz(t,e,r,n){var i=e+n;return i>>>0}Ne.sum64_lo=uz;function dz(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}Ne.sum64_4_hi=dz;function hz(t,e,r,n,i,s,o,a){var l=e+n+s+a;return l>>>0}Ne.sum64_4_lo=hz;function vz(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}Ne.sum64_5_hi=vz;function yz(t,e,r,n,i,s,o,a,l,c){var f=e+n+s+a+c;return f>>>0}Ne.sum64_5_lo=yz;function pz(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Ne.rotr64_hi=pz;function gz(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Ne.rotr64_lo=gz;function mz(t,e,r){return t>>>r}Ne.shr64_hi=mz;function xz(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Ne.shr64_lo=xz;var hc={},$6=Ne,bz=Eu;function s1(){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}hc.BlockHash=s1;s1.prototype.update=function(e,r){if(e=$6.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=$6.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}Li.g0_256=kz;function Az(t){return _i(t,17)^_i(t,19)^t>>>10}Li.g1_256=Az;var Wl=Ne,_z=hc,Tz=Li,jv=Wl.rotl32,Nc=Wl.sum32,Pz=Wl.sum32_5,Iz=Tz.ft_1,U7=_z.BlockHash,Rz=[1518500249,1859775393,2400959708,3395469782];function $i(){if(!(this instanceof $i))return new $i;U7.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Wl.inherits($i,U7);var Mz=$i;$i.blockSize=512;$i.outSize=160;$i.hmacStrength=80;$i.padLength=64;$i.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()),xV(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 we(l,"hex","le")}r.intFromLE=a}),Y0=En.getNAF,CV=En.getJSF,Q0=En.assert;function So(t,e){this.type=t,this.p=new we(e.p,16),this.red=e.prime?we.red(e.prime):we.mont(this.p),this.zero=new we(0).toRed(this.red),this.one=new we(1).toRed(this.red),this.two=new we(2).toRed(this.red),this.n=e.n&&new we(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=So;So.prototype.point=function(){throw new Error("Not implemented")};So.prototype.validate=function(){throw new Error("Not implemented")};So.prototype._fixedNafMul=function(e,r){Q0(e.precomputed);var n=e._getDoubles(),i=Y0(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];Q0(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};So.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]=Y0(n[g],o[g],this._bitLength),l[p]=Y0(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=CV(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][W-1>>1]:W<0&&(h=a[u][-W-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}]};jn.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}};jn.prototype.pointFromX=function(e,r){e=new we(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)};jn.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};jn.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 we(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 Tr(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 we(0)):(this.x=new we(e,16),this.y=new we(r,16),this.z=new we(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}bx(Tr,Ma.BasePoint);jn.prototype.jpoint=function(e,r,n){return new Tr(this,e,r,n)};Tr.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)};Tr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Tr.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)};Tr.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)};Tr.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}};Tr.prototype.inspect=function(){return this.isInfinity()?"":""};Tr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Ud=pc(function(t,e){var r=e;r.base=Ma,r.short=SV,r.mont=null,r.edwards=null}),zd=pc(function(t,e){var r=e,n=En.assert;function i(a){a.type==="short"?this.curve=new Ud.short(a):a.type==="edwards"?this.curve=new Ud.edwards(a):this.curve=new Ud.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:Zr.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:Zr.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:Zr.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:Zr.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:Zr.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:Zr.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:Zr.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:Zr.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=ti.toArray(t.entropy,t.entropyEnc||"hex"),r=ti.toArray(t.nonce,t.nonceEnc||"hex"),n=ti.toArray(t.pers,t.persEnc||"hex");xx(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var Z7=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=ti.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length"};var kV=En.assert;function o1(t,e){if(t instanceof o1)return t;this._importDER(t,e)||(kV(t.r&&t.s,"Signature without r or s"),this.r=new we(t.r,16),this.s=new we(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var a1=o1;function AV(){this.place=0}function zv(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 j6(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)}o1.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=j6(r),n=j6(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];Vv(i,r.length),i=i.concat(r),i.push(2),Vv(i,n.length);var s=i.concat(n),o=[48];return Vv(o,s.length),o=o.concat(s),En.encode(o,e)};var _V=function(){throw new Error("unsupported")},e9=En.assert;function Bn(t){if(!(this instanceof Bn))return new Bn(t);typeof t=="string"&&(e9(Object.prototype.hasOwnProperty.call(zd,t),"Unknown curve "+t),t=zd[t]),t instanceof zd.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 TV=Bn;Bn.prototype.keyPair=function(e){return new wx(this,e)};Bn.prototype.keyFromPrivate=function(e,r){return wx.fromPrivate(this,e,r)};Bn.prototype.keyFromPublic=function(e,r){return wx.fromPublic(this,e,r)};Bn.prototype.genKeyPair=function(e){e||(e={});for(var r=new Z7({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||_V(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new we(2));;){var s=new we(r.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}};Bn.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};Bn.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 we(e,16));for(var s=this.n.byteLength(),o=r.getPrivate().toArray("be",s),a=e.toArray("be",s),l=new Z7({hash:this.hash,entropy:o,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),c=this.n.sub(new we(1)),f=0;;f++){var u=i.k?i.k(f):new we(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 a1({r:g,s:p,recoveryParam:k})}}}}}};Bn.prototype.verify=function(e,r,n,i){e=this._truncateToN(new we(e,16)),n=this.keyFromPublic(n,i),r=new a1(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)};Bn.prototype.recoverPubKey=function(t,e,r,n){e9((3&r)===r,"The recovery param is more than two bits"),e=new a1(e,n);var i=this.n,s=new we(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)};Bn.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new a1(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 PV=pc(function(t,e){var r=e;r.version="6.5.4",r.utils=En,r.rand=function(){throw new Error("unsupported")},r.curve=Ud,r.curves=zd,r.ec=TV,r.eddsa=null}),IV=PV.ec;const RV="signing-key/5.7.0",Mp=new q(RV);let qv=null;function yi(){return qv||(qv=new IV("secp256k1")),qv}class oa{constructor(e){re(this,"curve","secp256k1"),re(this,"privateKey",X(e)),Mi(this.privateKey)!==32&&Mp.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=yi().keyFromPrivate(Z(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=yi().keyFromPublic(Z(this.publicKey)),n=yi().keyFromPublic(Z(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=yi().keyFromPrivate(Z(this.privateKey)),n=Z(e);n.length!==32&&Mp.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return Ia({recoveryParam:i.recoveryParam,r:Ze("0x"+i.r.toString(16),32),s:Ze("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=yi().keyFromPrivate(Z(this.privateKey)),n=yi().keyFromPublic(Z(Cx(e)));return Ze("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function t9(t,e){const r=Ia(e),n={r:Z(r.r),s:Z(r.s)};return"0x"+yi().recoverPubKey(Z(t),n,r.recoveryParam).encode("hex",!1)}function Cx(t,e){const r=Z(t);if(r.length===32){const n=new oa(r);return e?"0x"+yi().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?X(r):"0x"+yi().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+yi().keyFromPublic(r).getPublic(!0,"hex"):X(r)}return Mp.throwArgumentError("invalid public or private key","key","[REDACTED]")}const MV="transactions/5.7.0",Or=new q(MV);var Np;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(Np||(Np={}));function Ex(t){return t==="0x"?null:Ce(t)}function Nr(t){return t==="0x"?Bt: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"}],OV={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function Xs(t){const e=Cx(t);return Ce(Gt(ge(Gt(e,1)),12))}function Ca(t,e){return Xs(t9(Z(t),e))}function dn(t,e){const r=Ai(V.from(t).toHexString());return r.length>32&&Or.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function Hv(t,e){return{address:Ce(t),storageKeys:(e||[]).map((r,n)=>(Mi(r)!==32&&Or.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function Na(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),Hv(r[0],r[1])):Hv(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return Hv(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function r9(t){return Na(t).map(e=>[e.address,e.storageKeys])}function n9(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=[dn(t.chainId||0,"chainId"),dn(t.nonce||0,"nonce"),dn(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),dn(t.maxFeePerGas||0,"maxFeePerGas"),dn(t.gasLimit||0,"gasLimit"),t.to!=null?Ce(t.to):"0x",dn(t.value||0,"value"),t.data||"0x",r9(t.accessList||[])];if(e){const n=Ia(e);r.push(dn(n.recoveryParam,"recoveryParam")),r.push(Ai(n.r)),r.push(Ai(n.s))}return Hr(["0x02",ba(r)])}function i9(t,e){const r=[dn(t.chainId||0,"chainId"),dn(t.nonce||0,"nonce"),dn(t.gasPrice||0,"gasPrice"),dn(t.gasLimit||0,"gasLimit"),t.to!=null?Ce(t.to):"0x",dn(t.value||0,"value"),t.data||"0x",r9(t.accessList||[])];if(e){const n=Ia(e);r.push(dn(n.recoveryParam,"recoveryParam")),r.push(Ai(n.r)),r.push(Ai(n.s))}return Hr(["0x01",ba(r)])}function $V(t,e){ox(t,OV);const r=[];NV.forEach(function(o){let a=t[o.name]||[];const l={};o.numeric&&(l.hexPad="left"),a=Z(X(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=Ai(a),a.length>o.maxLength&&Or.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push(X(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Or.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!Ri(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(X(n)),r.push("0x"),r.push("0x")),!e)return ba(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(X(s)),r.push(Ai(Z(i.r))),r.push(Ai(Z(i.s))),ba(r)}function Op(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),$V(t,e);switch(t.type){case 1:return i9(t,e);case 2:return n9(t,e)}return Or.throwError(`unsupported transaction type: ${t.type}`,q.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function s9(t,e,r){try{const n=Nr(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=Ze(e[1],32),t.s=Ze(e[2],32);try{const n=ge(r(t));t.from=Ca(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function DV(t){const e=r1(t.slice(1));e.length!==9&&e.length!==12&&Or.throwArgumentError("invalid component count for transaction type: 2","payload",X(t));const r=Nr(e[2]),n=Nr(e[3]),i={type:2,chainId:Nr(e[0]).toNumber(),nonce:Nr(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Nr(e[4]),to:Ex(e[5]),value:Nr(e[6]),data:e[7],accessList:Na(e[8])};return e.length===9||(i.hash=ge(t),s9(i,e.slice(9),n9)),i}function BV(t){const e=r1(t.slice(1));e.length!==8&&e.length!==11&&Or.throwArgumentError("invalid component count for transaction type: 1","payload",X(t));const r={type:1,chainId:Nr(e[0]).toNumber(),nonce:Nr(e[1]).toNumber(),gasPrice:Nr(e[2]),gasLimit:Nr(e[3]),to:Ex(e[4]),value:Nr(e[5]),data:e[6],accessList:Na(e[7])};return e.length===8||(r.hash=ge(t),s9(r,e.slice(8),i9)),r}function LV(t){const e=r1(t);e.length!==9&&e.length!==6&&Or.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:Nr(e[0]).toNumber(),gasPrice:Nr(e[1]),gasLimit:Nr(e[2]),to:Ex(e[3]),value:Nr(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=Ze(e[7],32),r.s=Ze(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(X(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const s=ge(ba(i));try{r.from=Ca(s,{r:X(r.r),s:X(r.s),recoveryParam:n})}catch{}r.hash=ge(t)}return r.type=null,r}function o9(t){const e=Z(t);if(e[0]>127)return LV(e);switch(e[0]){case 1:return BV(e);case 2:return DV(e)}return Or.throwError(`unsupported transaction type: ${e[0]}`,q.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const jV="contracts/5.7.0";var Ea=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(jV);function X0(t,e){return Ea(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&Qt.throwArgumentError("invalid address or ENS name","name",r);try{return Ce(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 Vd(t,e,r){return Ea(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>Vd(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield X0(t,e):r.type==="tuple"?yield Vd(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Vd(t,n,r.arrayChildren))):Promise.reject(Qt.makeError("invalid value for array",q.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function l1(t,e,r){return Ea(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=sr(r.pop())),Qt.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=et({override:X0(t.signer,n.from),signer:t.signer.getAddress()}).then(c=>Ea(this,void 0,void 0,function*(){return Ce(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=X0(t.provider,n.from));const i=yield et({args:Vd(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:et(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=Na(a.accessList)),o.gasLimit==null&&e.gas!=null){let c=21e3;const f=Z(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 l1(t,e,r)}}function UV(t,e){const r=t.signer||t.provider;return function(...n){return Ea(this,void 0,void 0,function*(){r||Qt.throwError("estimate require a provider or signer",q.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield l1(t,e,n);return yield r.estimateGas(i)})}}function zV(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(s=>{let o=Ni(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 a9(t,e,r){const n=t.signer||t.provider;return function(...i){return Ea(this,void 0,void 0,function*(){let s;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const l=sr(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 l1(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 VV(t,e){return function(...r){return Ea(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 l1(t,e,r),i=yield t.signer.sendTransaction(n);return zV(t,i),i})}}function F6(t,e,r){return e.constant?a9(t,e,r):VV(t,e)}function l9(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 nu{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 qV extends nu{constructor(){super("error",null)}}class U6 extends nu{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(l9(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=s7(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class z6 extends nu{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 HV{constructor(e,r,n){re(this,"interface",ei(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)):Eo.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",X0(this.provider,e));else try{re(this,"resolvedAddress",Promise.resolve(Ce(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&&re(this,o,F6(this,a,!0)),this.functions[o]==null&&re(this.functions,o,F6(this,a,!1)),this.callStatic[o]==null&&re(this.callStatic,o,a9(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 cx(e)}static getInterface(e){return or.isInterface(e)?e:new or(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=sr(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 mx(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 J0.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 qV);if(e==="event")return this._normalizeRunningEvent(new nu("event",null));if(e==="*")return this._normalizeRunningEvent(new z6(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new U6(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 U6(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new nu(l9(r),r))}return this._normalizeRunningEvent(new z6(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=Ni(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=sr(i.filter);return typeof r=="string"&&Oe(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 Oa extends HV{}class c9{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=Z(iu(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 H6(Xe([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",X(this.depth),this.parentFingerprint,Ze(X(this.index),4),this.chainCode,this.privateKey!=null?Xe(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new hn(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(Z(this.privateKey),1),r&&(r+="'")}else n.set(Z(this.publicKey));for(let u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const i=Z(iu(Yl.sha512,this.chainCode,n)),s=i.slice(0,32),o=i.slice(32);let a=null,l=null;this.privateKey?a=yd(V.from(s).add(this.privateKey).mod(eq)):l=new oa(X(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 hn(Fa,a,l,this.fingerprint,yd(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=Z(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=Z(iu(Yl.sha512,tq,n));return new hn(Fa,yd(i.slice(0,32)),null,"0x00000000",yd(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=kx(n),e=f1(c1(e,n),n),hn._fromSeed(h9(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return hn._fromSeed(e,null)}static fromExtendedKey(e){const r=Jl.decode(e);(r.length!==82||H6(r.slice(0,78))!==e)&&su.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=X(r.slice(5,9)),s=parseInt(X(r.slice(9,13)).substring(2),16),o=X(r.slice(13,45)),a=r.slice(45,78);switch(X(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new hn(Fa,null,X(a),i,o,s,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new hn(Fa,X(a.slice(1)),null,i,o,s,n,null)}return su.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function h9(t,e){e||(e="");const r=Ve("mnemonic"+e,Oi.NFKD);return Sx(Ve(t,Oi.NFKD),r,2048,64,"sha512")}function c1(t,e){e=kx(e),su.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=Z(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=d9(o);if((Z(fs(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return X(n.slice(0,s/8))}function f1(t,e){if(e=kx(e),t=Z(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]&rq(8-n)),n+=3);const i=t.length/4,s=Z(fs(t))[0]&d9(i);return r[r.length-1]<<=i,r[r.length-1]|=s>>8-i,e.join(r.map(o=>e.getWord(o)))}function nq(t,e){try{return c1(t,e),!0}catch{}return!1}function iq(t){return(typeof t!="number"||t<0||t>=Ka||t%1)&&su.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const sq="random/5.7.0",$p=new q(sq);function oq(){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 W6=oq();let qd=W6.crypto||W6.msCrypto;(!qd||!qd.getRandomValues)&&($p.warn("WARNING: Missing strong random number source"),qd={getRandomValues:function(t){return $p.throwError("no secure random source avaialble",q.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function bi(t){(t<=0||t>1024||t%1||t!=t)&&$p.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return qd.getRandomValues(e),Z(e)}function aq(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 v9={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 O=_.charCodeAt(m++);O===37?($.push(parseInt(_.substr(m,2),16)),m+=2):$.push(O)}return s($)}function d(_){for(var $=[],m=0;m<_.length;){var O=_[m];O<128?($.push(String.fromCharCode(O)),m++):O>191&&O<224?($.push(String.fromCharCode((O&31)<<6|_[m+1]&63)),m+=2):($.push(String.fromCharCode((O&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=[],O=0;O<$.length;O+=2)m.push(parseInt($.substr(O,2),16));return m}var d="0123456789abcdef";function _($){for(var m=[],O=0;O<$.length;O++){var B=$[O];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],W=[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[O][d%4]=m[d],this._Kd[b-O][d%4]=m[d];for(var B=0,U=$,H;U<_;){if(H=m[$-1],m[0]^=h[H>>16&255]<<24^h[H>>8&255]<<16^h[H&255]<<8^h[H>>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];H=m[$/2-1],m[$/2]^=h[H&255]^h[H>>8&255]<<8^h[H>>16&255]<<16^h[H>>24&255]<<24;for(var d=$/2+1;d<$;d++)m[d]^=m[d-1]}for(var d=0,te,K;d<$&&U<_;)te=U>>2,K=U%4,this._Ke[te][K]=m[d],this._Kd[b-te][K]=m[d++],U++}for(var te=1;te>24&255]^z[H>>16&255]^F[H>>8&255]^W[H&255]},ee.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 O=1;O>24&255]^p[$[(m+1)%4]>>16&255]^k[$[(m+2)%4]>>8&255]^w[$[(m+3)%4]&255]^this._Ke[O][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},ee.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 O=1;O>24&255]^A[$[(m+3)%4]>>16&255]^I[$[(m+2)%4]>>8&255]^M[$[(m+1)%4]&255]^this._Kd[O][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 ee(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 N=function(b,d){if(!(this instanceof N))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 ee(b)};N.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,O=z,B=F,U,H,te,K,L;for(H=0;H<16;H++)te=x+H*4,W[H]=(N[te]&255)<<24|(N[te+1]&255)<<16|(N[te+2]&255)<<8|N[te+3]&255;for(H=16;H<64;H++)U=W[H-2],K=(U>>>17|U<<15)^(U>>>19|U<<13)^U>>>10,U=W[H-15],L=(U>>>7|U<<25)^(U>>>18|U<<14)^U>>>3,W[H]=(K+W[H-7]|0)+(L+W[H-16]|0)|0;for(H=0;H<64;H++)K=((($>>>6|$<<26)^($>>>11|$<<21)^($>>>25|$<<7))+($&m^~$&O)|0)+(B+(k[H]+W[H]|0)|0)|0,L=((R>>>2|R<<30)^(R>>>13|R<<19)^(R>>>22|R<<10))+(R&b^R&d^b&d)|0,B=O,O=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+O|0,F=F+B|0,x+=64,T-=64}}G(p);let ee,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),ee=oe+1;ee>>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 O=0;O<$;O++)f(F,0,W,(T+O)*G,G),o(F,G,E,ee,oe);if(T+=$,v+=$,M){const O=parseInt(1e3*v/D);if(O!==C){if(P=M(null,v/D),P)break;C=O}}if(Tb&&($=b);for(let O=0;O<$;O++){const B=(2*E-1)*16,U=F[B]&w-1;c(W,U*G,F,G),o(F,G,E,ee,oe)}if(T+=$,v+=$,M){const O=parseInt(1e3*v/D);if(O!==C){if(P=M(null,v/D),P)break;C=O}}if(T>0&255),j.push(z[O]>>8&255),j.push(z[O]>>16&255),j.push(z[O]>>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(W,G,ee){if(W)z(W);else if(ee)M&&F!==1&&M(1),j(new Uint8Array(ee));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})()})(g9);var hq=g9.exports;const Px=yo(hq);var vq=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 Dp=new q(y9);function G6(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class yq extends Ra{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function pq(t,e,r){if(Xt(t,"crypto/cipher")==="aes-128-ctr"){const i=aa(Xt(t,"crypto/cipherparams/iv")),s=new wi.Counter(i),o=new wi.ModeOfOperation.ctr(e,s);return Z(o.decrypt(r))}return null}function m9(t,e){const r=aa(Xt(t,"crypto/ciphertext"));if(X(ge(Xe([e.slice(16,32),r]))).substring(2)!==Xt(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=pq(t,e.slice(0,16),r);i||Dp.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),Ce(l)!==o)throw new Error("address mismatch")}const a={_isKeystoreAccount:!0,address:o,privateKey:X(i)};if(Xt(t,"x-ethers/version")==="0.1"){const l=aa(Xt(t,"x-ethers/mnemonicCiphertext")),c=aa(Xt(t,"x-ethers/mnemonicCounter")),f=new wi.Counter(c),u=new wi.ModeOfOperation.ctr(s,f),h=Xt(t,"x-ethers/path")||Ql,y=Xt(t,"x-ethers/locale")||"en",g=Z(u.decrypt(l));try{const p=f1(g,y),k=hn.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 yq(a)}function x9(t,e,r,n,i){return Z(Sx(t,e,r,n,i))}function gq(t,e,r,n,i){return Promise.resolve(x9(t,e,r,n,i))}function b9(t,e,r,n,i){const s=Ax(e),o=Xt(t,"crypto/kdf");if(o&&typeof o=="string"){const a=function(l,c){return Dp.throwArgumentError("invalid key-derivation function parameters",l,c)};if(o.toLowerCase()==="scrypt"){const l=aa(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=aa(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 Dp.throwArgumentError("unsupported key-derivation function","kdf",o)}function mq(t,e){const r=JSON.parse(t),n=b9(r,e,x9,Px.syncScrypt);return m9(r,n)}function xq(t,e,r){return vq(this,void 0,void 0,function*(){const n=JSON.parse(t),i=yield b9(n,e,gq,Px.scrypt,r);return m9(n,i)})}function bq(t,e,r,n){try{if(Ce(t.address)!==Xs(t.privateKey))throw new Error("address/privateKey mismatch");if(G6(t)){const k=t.mnemonic;if(hn.fromMnemonic(k.phrase,null,k.locale).derivePath(k.path||Ql).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=Z(t.privateKey),s=Ax(e);let o=null,a=null,l=null;if(G6(t)){const k=t.mnemonic;o=Z(c1(k.phrase,k.locale||"en")),a=k.path||Ql,l=k.locale||"en"}let c=r.client;c||(c="ethers.js");let f=null;r.salt?f=Z(r.salt):f=bi(32);let u=null;if(r.iv){if(u=Z(r.iv),u.length!==16)throw new Error("invalid iv")}else u=bi(16);let h=null;if(r.uuid){if(h=Z(r.uuid),h.length!==16)throw new Error("invalid uuid")}else h=bi(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)),Px.scrypt(s,f,y,g,p,64,n).then(k=>{k=Z(k);const w=k.slice(0,16),E=k.slice(16,32),A=k.slice(32,64),I=new wi.Counter(u),M=new wi.ModeOfOperation.ctr(w,I),j=Z(M.encrypt(i)),z=ge(Xe([E,j])),F={address:t.address.substring(2).toLowerCase(),id:cq(h),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:X(u).substring(2)},ciphertext:X(j).substring(2),kdf:"scrypt",kdfparams:{salt:X(f).substring(2),n:y,dklen:32,p,r:g},mac:z.substring(2)}};if(o){const W=bi(16),G=new wi.Counter(W),ee=new wi.ModeOfOperation.ctr(A,G),oe=Z(ee.encrypt(o)),D=new Date,v=D.getUTCFullYear()+"-"+$c(D.getUTCMonth()+1,2)+"-"+$c(D.getUTCDate(),2)+"T"+$c(D.getUTCHours(),2)+"-"+$c(D.getUTCMinutes(),2)+"-"+$c(D.getUTCSeconds(),2)+".0Z";F["x-ethers"]={client:c,gethFilename:"UTC--"+v+"--"+F.address,mnemonicCounter:X(W).substring(2),mnemonicCiphertext:X(oe).substring(2),path:a,locale:l,version:"0.1"}}return JSON.stringify(F)})}function wq(t,e,r){if(_x(t)){r&&r(0);const n=p9(t,e);return r&&r(1),Promise.resolve(n)}return Tx(t)?xq(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function Cq(t,e){if(_x(t))return p9(t,e);if(Tx(t))return mq(t,e);throw new Error("invalid JSON wallet")}const Eq="wallet/5.7.0";var K6=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(Eq);function Sq(t){return t!=null&&Oe(t.privateKey,32)&&t.address!=null}function kq(t){const e=t.mnemonic;return e&&e.phrase}let Aq=class Ja extends fo{constructor(e,r){if(super(),Sq(e)){const n=new oa(e.privateKey);if(re(this,"_signingKey",()=>n),re(this,"address",Xs(this.publicKey)),this.address!==Ce(e.address)&&Ua.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),kq(e)){const i=e.mnemonic;re(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||Ql,locale:i.locale||"en"}));const s=this.mnemonic,o=hn.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(oa.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 oa(e);re(this,"_signingKey",()=>n)}re(this,"_mnemonic",()=>null),re(this,"address",Xs(this.publicKey))}r&&!Eo.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 et(e).then(r=>{r.from!=null&&(Ce(r.from)!==this.address&&Ua.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(ge(Op(r)));return Op(r,n)})}signMessage(e){return K6(this,void 0,void 0,function*(){return kp(this._signingKey().signDigest(i1(e)))})}_signTypedData(e,r,n){return K6(this,void 0,void 0,function*(){const i=yield rr.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 kp(this._signingKey().signDigest(rr.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={}),bq(this,e,r,n)}static createRandom(e){let r=bi(16);e||(e={}),e.extraEntropy&&(r=Z(Gt(ge(Xe([r,e.extraEntropy])),0,16)));const n=f1(r,e.locale);return Ja.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return wq(e,r,n).then(i=>new Ja(i))}static fromEncryptedJsonSync(e,r){return new Ja(Cq(e,r))}static fromMnemonic(e,r,n){return r||(r=Ql),new Ja(hn.fromMnemonic(e,null,n).derivePath(r))}};function w9(t,e){return Ca(i1(t),e)}function _q(t,e,r,n){return Ca(rr.hash(t,e,r),n)}const Tq="networks/5.7.1",J6=new q(Tq);function Pq(t){return t&&typeof t.renetwork=="function"}function Wi(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 Wi(r)},e}function Z0(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return Z0(t,n)},r}const Y6={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Wi("homestead")},Q6={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Wi("ropsten")},X6={chainId:63,name:"classicMordor",_defaultProvider:Z0("https://www.ethercluster.com/mordor","classicMordor")},pd={unspecified:{chainId:0,name:"unspecified"},homestead:Y6,mainnet:Y6,morden:{chainId:2,name:"morden"},ropsten:Q6,testnet:Q6,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Wi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Wi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Wi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Wi("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Z0("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:X6,classicTestnet:X6,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Z0("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Wi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Wi("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 Iq(t){if(t==null)return null;if(typeof t=="number"){for(const n in pd){const i=pd[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=pd[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=pd[t.name];if(!e)return typeof t.chainId!="number"&&J6.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&J6.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(Pq(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 Rq="web/5.7.1";var Mq=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 Nq(t,e){return Mq(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:Z(new Uint8Array(i))}})}var Oq=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(Rq);function Z6(t){return new Promise(e=>{setTimeout(e,t)})}function ks(t,e){if(t==null)return null;if(typeof t=="string")return t;if(Ri(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return vs(t)}catch{}return X(t)}return t}function $q(t){return Ve(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function C9(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 "+px(Ve(w))}}t.skipFetchSetup!=null&&(c.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(c.fetchOptions=sr(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]?yx(y[3]):$q(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 Oq(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=Ve(e);const s=typeof t=="string"?{url:t}:sr(t);s.headers?Object.keys(s.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(s.headers=sr(s.headers),s.headers["content-type"]="application/json"):s.headers={"content-type":"application/json"},t=s}return C9(t,i,n)}function ea(t,e){return e||(e={}),e=sr(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 eh="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Bp={};for(var gd=0;gd>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 E9(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=E9(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+=eh.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+=eh.charAt(a)}return i}function S9(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=E9(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 Bq(){var t=S9.apply(null,arguments);if(typeof t=="object")return t}function Lq(t){var e=S9.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function u1(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=sr(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 Na(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),Oe(e))?e.toLowerCase():Dc.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 Ce(e)}callAddress(e){if(!Oe(e,32))return null;const r=Ce(Gt(e,12));return r===fx?null:r}contractAddress(e){return cx(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"||Oe(e))return ii(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return Mi(n)!==32?Dc.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(!Oe(e))throw new Error("invalid uint256");return Ze(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;Oe(n)&&(n=V.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),Oe(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 o9(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&&Dc.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):Dc.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&Dc.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 xe=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 Te=new q(Au),qq=10;function t5(t){return t==null?"null":(Mi(t)!==32&&Te.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function r5(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[t5(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return t5(e)}).join("&")}function Hq(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(),Mi(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+r5(t);if(qU.isForkEvent(t))throw Te.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+r5(t.topics||[])}throw new Error("invalid event - "+t)}function Bc(){return new Date().getTime()}function n5(t){return new Promise(e=>{setTimeout(e,t)})}const Wq=["block","network","pending","poll"];let Gq=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=Hq(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||Wq.indexOf(this.tag)>=0}};const Kq={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 Gv(t){return Ze(V.from(t).toHexString(),32)}function i5(t){return Jl.encode(Xe([t,Gt(fs(fs(t)),0,4)]))}const k9=new RegExp("^(ipfs)://(.*)$","i"),s5=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),k9,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Hd(t,e){try{return vs(ou(t,e))}catch{}return null}function ou(t,e){if(t==="0x")return null;const r=V.from(Gt(t,e,e+32)).toNumber(),n=V.from(Gt(t,r,r+32)).toNumber();return Gt(t,r+32,r+32+n)}function Kv(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Te.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function o5(t){const e=Z(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 Jq(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function A9(t){const e=[];let r=0;for(let n=0;nV.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 xe(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Hr([e,yf(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=Hr(["0x9061b923",A9([A7(this.name),n.data])]));try{let s=yield this.provider.call(n);return Z(s).length%32===4&&Te.throwError("resolver threw error",q.errors.CALL_EXCEPTION,{transaction:n,data:s}),i&&(s=ou(s,0)),s}catch(s){if(s.code===q.errors.CALL_EXCEPTION)return null;throw s}})}_fetchBytes(e,r){return xe(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?ou(n,0):null})}_getAddress(e,r){const n=Kq[String(e)];if(n==null&&Te.throwError(`unsupported coin type: ${e}`,q.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=Z(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 i5(Xe([[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 i5(Xe([[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=e5.toWords(i.slice(2));return a.unshift(o),e5.encode(n.prefix,a)}}return null}getAddress(e){return xe(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===W0?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",Gv(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&Te.throwError("invalid or unsupported coin data",q.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return xe(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 Te.throwError("invalid or unsupported content hash data",q.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return xe(this,void 0,void 0,function*(){let r=Ve(e);r=Xe([Gv(64),Gv(r.length),r]),r.length%32!==0&&(r=Xe([r,Ze("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",X(r));return n==null||n==="0x"?null:vs(n)})}}let Jv=null,Yq=1;class Ix extends Eo{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=ei(new.target,"getNetwork")(e);r?(re(this,"_network",r),this.emit("network",r,null)):Te.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return xe(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||Te.throwError("no network detected",q.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 ea(()=>this._ready().then(e=>e,e=>{if(!(e.code===q.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Jv==null&&(Jv=new fe),Jv}static getNetwork(e){return Iq(e??"homestead")}ccipReadFetch(e,r,n){return xe(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 ku({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 Te.throwError(`response not found during CCIP fetch: ${h}`,q.errors.SERVER_ERROR,{url:l,errorMessage:h});o.push(h)}return Te.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,q.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return xe(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(Bc()-s.respTime<=e)return s.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=Bc(),n=et({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=Bc();return i=V.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return xe(this,void 0,void 0,function*(){const e=Yq++,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)Te.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",Te.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 xe(this,void 0,void 0,function*(){return Te.throwError("provider does not support network detection",q.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return xe(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 n5(0),this._network;const n=Te.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=Bc();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 xe(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return xe(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=>xe(this,void 0,void 0,function*(){c||(yield n5(1e3),this.getTransactionCount(i.from).then(k=>xe(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(Te.makeError("timeout exceeded",q.errors.TIMEOUT,{timeout:n}))},n);h.unref&&h.unref(),l.push(()=>{clearTimeout(h)})}})})}getBlockNumber(){return xe(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return xe(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return V.from(e)}catch(r){return Te.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return xe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield et({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return V.from(i)}catch(s){return Te.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:s})}})}getTransactionCount(e,r){return xe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield et({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return V.from(i).toNumber()}catch(s){return Te.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:s})}})}getCode(e,r){return xe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield et({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return X(i)}catch(s){return Te.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:s})}})}getStorageAt(e,r,n){return xe(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield et({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>ii(o))}),s=yield this.perform("getStorageAt",i);try{return X(s)}catch(o){return Te.throwError("bad result from backend",q.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:s,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&Mi(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&Te.throwError("Transaction hash mismatch from Provider.sendTransaction.",q.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(s,o)=>xe(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&&Te.throwError("transaction failed",q.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return xe(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(s=>X(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 xe(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?X(s):null))}),this.formatter.transactionRequest(yield et(n))})}_getFilter(e){return xe(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 et(r))})}_call(e,r,n){return xe(this,void 0,void 0,function*(){n>=qq&&Te.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"&&Mi(s)%32===4)try{const o=Gt(s,4),a=Gt(o,0,32);V.from(a).eq(i)||Te.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=V.from(Gt(o,32,64)).toNumber(),f=V.from(Gt(o,c,c+32)).toNumber(),u=Gt(o,c+32);for(let w=0;wxe(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 xe(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return ea(()=>xe(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 xe(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return ea(()=>xe(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 xe(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield et({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 xe(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return xe(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&Te.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 xe(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 Lp(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return xe(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||Te.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"+yf(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return xe(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(Oe(e))throw n}typeof e!="string"&&Te.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return xe(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=Hd(yield this.call({to:n,data:"0x691f3431"+yf(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return xe(this,void 0,void 0,function*(){let r=null;if(Oe(e)){const s=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(s,"getAvatar");if(!o)return null;r=new Lp(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=Hd(yield this.call({to:o,data:"0x691f3431"+yf(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 Te.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 Gq(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 Vi=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 nr=new q(Au),Qq=["call","estimateGas"];function gf(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=Oe(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=gf(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return gf(JSON.parse(t),e)}catch{}return null}function _9(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const s=gf(e,!0);if(s)return s.data;nr.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=gf(e.body,!1);s==null&&(s=gf(e,!1)),s&&nr.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)&&nr.throwError("insufficient funds for intrinsic transaction cost",q.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&nr.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)&&nr.throwError("replacement fee too low",q.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&nr.throwError("legacy pre-eip-155 transactions not supported",q.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),Qq.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&nr.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 a5(t){return new Promise(function(e){setTimeout(e,t)})}function Xq(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 Lc(t){return t&&t.toLowerCase()}const jp={};class T9 extends fo{constructor(e,r,n){if(super(),e!==jp)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)):nr.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return nr.throwError("cannot alter JSON-RPC Signer connection",q.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Zq(jp,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&&nr.throwError("unknown account #"+this._index,q.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=sr(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=sr(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Vi(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&nr.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),et({tx:et(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&nr.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)&&nr.throwError("user rejected transaction",q.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),_9("sendTransaction",o,s)))})}signTransaction(e){return nr.throwError("signing transactions is unsupported",q.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Vi(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 ea(()=>Vi(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 Vi(this,void 0,void 0,function*(){const r=typeof e=="string"?Ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[X(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&nr.throwError("user rejected signing",q.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return Vi(this,void 0,void 0,function*(){const r=typeof e=="string"?Ve(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),X(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&nr.throwError("user rejected signing",q.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return Vi(this,void 0,void 0,function*(){const i=yield rr.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(rr.getPayload(i.domain,r,i.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&nr.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 Vi(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class Zq extends T9{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 eH={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 Ix{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=ei(this.constructor,"defaultUrl")()),typeof e=="string"?re(this,"connection",Object.freeze({url:e})):re(this,"connection",Object.freeze(sr(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 Vi(this,void 0,void 0,function*(){yield a5(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=ei(this.constructor,"getNetwork");try{return r(V.from(e).toNumber())}catch(n){return nr.throwError("could not detect network",q.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return nr.throwError("could not detect network",q.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new T9(jp,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:Ni(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const s=ku(this.connection,JSON.stringify(n),Xq).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",[Lc(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Lc(r.address),r.blockTag]];case"getCode":return["eth_getCode",[Lc(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Lc(r.address),Ze(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",[ei(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[ei(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=Lc(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return Vi(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=sr(r),r.transaction=sr(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&nr.throwError(e+" not implemented",q.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return _9(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 a5(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=sr(eH);if(r)for(const s in r)r[s]&&(n[s]=!0);ox(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(s){if(e[s]==null)return;const o=ii(V.from(e[s]));s==="gasLimit"&&(s="gas"),i[s]=o}),["from","to","data"].forEach(function(s){e[s]!=null&&(i[s]=X(e[s]))}),e.accessList&&(i.accessList=Na(e.accessList)),i}};var tH=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 rH=new q(Au);class th extends $a{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return tH(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||rH.throwError("no network detected",q.errors.UNKNOWN_ERROR,{}),this._network==null&&(re(this,"_network",r),this.emit("network",r,null))),r})}}const l5=new q(Au);let nH=1;function c5(t,e){const r="Web3LegacyFetcher";return function(n,i){const s={method:n,params:i,id:nH++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:Ni(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 iH(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:Ni(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 sH extends $a{constructor(e,r){e==null&&l5.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=iH(e)):e.sendAsync?i=c5(e,e.sendAsync.bind(e)):e.send?i=c5(e,e.send.bind(e)):l5.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 oH="solidity/5.7.0",aH=new RegExp("^bytes([0-9]+)$"),lH=new RegExp("^(u?int)([0-9]*)$"),cH=new RegExp("^(.*)\\[([0-9]*)\\]$"),fH="0000000000000000000000000000000000000000000000000000000000000000",Ya=new q(oH);function P9(t,e,r){switch(t){case"address":return r?df(e,32):Z(e);case"string":return Ve(e);case"bytes":return Z(e);case"bool":return e=e?"0x01":"0x00",r?df(e,32):Z(e)}let n=t.match(lH);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),df(e,i/8)}if(n=t.match(aH),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Ya.throwArgumentError("invalid bytes type","type",t),Z(e).byteLength!==i&&Ya.throwArgumentError(`invalid value for ${t}`,"value",e),r?Z((e+fH).substring(0,66)):e}if(n=t.match(cH),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(P9(i,a,!0))}),Xe(o)}return Ya.throwArgumentError("invalid type","type",t)}function _e(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(P9(n,e[i]))}),X(Xe(r))}function Zs(t,e){return ge(_e(t,e))}function uH(t,e){return fs(_e(t,e))}const dH="units/5.7.0",I9=new q(dH),R9=["wei","kwei","mwei","gwei","szabo","finney","ether"];function hH(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&I9.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 M9(t,e){if(typeof e=="string"){const r=R9.indexOf(e);r!==-1&&(e=3*r)}return jd(t,e??18)}function rh(t,e){if(typeof t!="string"&&I9.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=R9.indexOf(e);r!==-1&&(e=3*r)}return ui(t,e??18)}function vH(t){return M9(t,18)}function Fp(t){return rh(t,18)}const yH=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:vx,ConstructorFragment:Xn,ErrorFragment:Gi,EventFragment:mi,FormatTypes:Le,Fragment:xi,FunctionFragment:Zn,HDNode:hn,Indexed:J0,Interface:or,LogDescription:I7,Logger:q,ParamType:dr,RLP:CF,SigningKey:oa,get SupportedAlgorithm(){return Yl},TransactionDescription:R7,get TransactionTypes(){return Np},get UnicodeNormalizationForm(){return Oi},Utf8ErrorFuncs:m7,get Utf8ErrorReason(){return en},_TypedDataEncoder:rr,_fetchData:C9,_toEscapedUtf8String:UF,accessListify:Na,arrayify:Z,base58:Jl,base64:oU,checkProperties:ox,checkResultErrors:s7,commify:hH,computeAddress:Xs,computeHmac:iu,computePublicKey:Cx,concat:Xe,deepCopy:Ni,defaultAbiCoder:Jr,defaultPath:Ql,defineReadOnly:re,dnsEncode:A7,entropyToMnemonic:f1,fetchJson:ku,formatBytes32String:zF,formatEther:vH,formatUnits:M9,getAccountPath:iq,getAddress:Ce,getContractAddress:cx,getCreate2Address:_F,getIcapAddress:AF,getJsonWalletAddress:dq,getStatic:ei,hashMessage:i1,hexConcat:Hr,hexDataLength:Mi,hexDataSlice:Gt,hexStripZeros:YE,hexValue:ii,hexZeroPad:Ze,hexlify:X,id:Fs,isAddress:f7,isBytes:Co,isBytesLike:Ri,isHexString:Oe,isValidMnemonic:nq,isValidName:IU,joinSignature:kp,keccak256:ge,mnemonicToEntropy:c1,mnemonicToSeed:h9,namehash:yf,nameprep:rU,parseBytes32String:VF,parseEther:Fp,parseTransaction:o9,parseUnits:rh,poll:ea,randomBytes:bi,recoverAddress:Ca,recoverPublicKey:t9,resolveProperties:et,ripemd160:f9,serializeTransaction:Op,sha256:fs,sha512:KV,shallowCopy:sr,shuffled:aq,solidityKeccak256:Zs,solidityPack:_e,soliditySha256:uH,splitSignature:Ia,stripZeros:Ai,toUtf8Bytes:Ve,toUtf8CodePoints:G0,toUtf8String:vs,verifyMessage:w9,verifyTypedData:_q,zeroPad:df},Symbol.toStringTag,{value:"Module"})),pH=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var gH=Object.freeze({__proto__:null,abi:pH});const mH=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],xH={isValidSignatureBytes32:"0x1626ba7e"};var bH=Object.freeze({__proto__:null,abi:mH,returns:xH});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 CH=Object.freeze({__proto__:null,abi:wH});const EH=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var SH=Object.freeze({__proto__:null,abi:EH});const kH=[{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 AH=Object.freeze({__proto__:null,abi:kH});const _H=[{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 TH=Object.freeze({__proto__:null,abi:_H});const PH=[{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 IH=Object.freeze({__proto__:null,abi:PH});const RH=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var MH=Object.freeze({__proto__:null,abi:RH});const mr={erc6492:CH,erc5719:gH,erc1271:bH,factory:SH,mainModule:AH,mainModuleUpgradable:TH,sequenceUtils:IH,requireFreshSigner:MH},NH=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:mr},Symbol.toStringTag,{value:"Module"}));function nh(){return nh=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Ee({},n)).then(i=>Se(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Ee({},n)).then(i=>Se(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Ee({},n)).then(i=>Se(i).then(s=>({status:s.status}))),this.clock=n=>this.fetch(this.url("Clock"),Ee({},n)).then(i=>Se(i).then(s=>({serverTime:s.serverTime}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),Ee({},n)).then(i=>Se(i).then(s=>({data:s.data}))),this.getAuthToken=(n,i)=>this.fetch(this.url("GetAuthToken"),Ee(n,i)).then(s=>Se(s).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.getAuthToken2=(n,i)=>this.fetch(this.url("GetAuthToken2"),Ee(n,i)).then(s=>Se(s).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.sendPasswordlessLink=(n,i)=>this.fetch(this.url("SendPasswordlessLink"),Ee(n,i)).then(s=>Se(s).then(o=>({status:o.status}))),this.friendList=(n,i)=>this.fetch(this.url("FriendList"),Ee(n,i)).then(s=>Se(s).then(o=>({page:o.page,friends:o.friends}))),this.getFriendByAddress=(n,i)=>this.fetch(this.url("GetFriendByAddress"),Ee(n,i)).then(s=>Se(s).then(o=>({status:o.status,friend:o.friend}))),this.searchFriends=(n,i)=>this.fetch(this.url("SearchFriends"),Ee(n,i)).then(s=>Se(s).then(o=>({friends:o.friends}))),this.addFriend=(n,i)=>this.fetch(this.url("AddFriend"),Ee(n,i)).then(s=>Se(s).then(o=>({status:o.status,friend:o.friend}))),this.updateFriendNickname=(n,i)=>this.fetch(this.url("UpdateFriendNickname"),Ee(n,i)).then(s=>Se(s).then(o=>({status:o.status,friend:o.friend}))),this.removeFriend=(n,i)=>this.fetch(this.url("RemoveFriend"),Ee(n,i)).then(s=>Se(s).then(o=>({status:o.status}))),this.contractCall=(n,i)=>this.fetch(this.url("ContractCall"),Ee(n,i)).then(s=>Se(s).then(o=>({returns:o.returns}))),this.decodeContractCall=(n,i)=>this.fetch(this.url("DecodeContractCall"),Ee(n,i)).then(s=>Se(s).then(o=>({call:o.call}))),this.lookupContractCallSelectors=(n,i)=>this.fetch(this.url("LookupContractCallSelectors"),Ee(n,i)).then(s=>Se(s).then(o=>({signatures:o.signatures}))),this.userStorageFetch=(n,i)=>this.fetch(this.url("UserStorageFetch"),Ee(n,i)).then(s=>Se(s).then(o=>({object:o.object}))),this.userStorageSave=(n,i)=>this.fetch(this.url("UserStorageSave"),Ee(n,i)).then(s=>Se(s).then(o=>({ok:o.ok}))),this.userStorageDelete=(n,i)=>this.fetch(this.url("UserStorageDelete"),Ee(n,i)).then(s=>Se(s).then(o=>({ok:o.ok}))),this.userStorageFetchAll=(n,i)=>this.fetch(this.url("UserStorageFetchAll"),Ee(n,i)).then(s=>Se(s).then(o=>({objects:o.objects}))),this.getMoonpayLink=(n,i)=>this.fetch(this.url("GetMoonpayLink"),Ee(n,i)).then(s=>Se(s).then(o=>({signedUrl:o.signedUrl}))),this.getSardineClientToken=n=>this.fetch(this.url("GetSardineClientToken"),Ee({},n)).then(i=>Se(i).then(s=>({token:s.token}))),this.resolveENSAddress=(n,i)=>this.fetch(this.url("ResolveENSAddress"),Ee(n,i)).then(s=>Se(s).then(o=>({address:o.address,ok:o.ok}))),this.isValidSignature=(n,i)=>this.fetch(this.url("IsValidSignature"),Ee(n,i)).then(s=>Se(s).then(o=>({isValid:o.isValid}))),this.isValidMessageSignature=(n,i)=>this.fetch(this.url("IsValidMessageSignature"),Ee(n,i)).then(s=>Se(s).then(o=>({isValid:o.isValid}))),this.isValidTypedDataSignature=(n,i)=>this.fetch(this.url("IsValidTypedDataSignature"),Ee(n,i)).then(s=>Se(s).then(o=>({isValid:o.isValid}))),this.isValidETHAuthProof=(n,i)=>this.fetch(this.url("IsValidETHAuthProof"),Ee(n,i)).then(s=>Se(s).then(o=>({isValid:o.isValid}))),this.getCoinPrices=(n,i)=>this.fetch(this.url("GetCoinPrices"),Ee(n,i)).then(s=>Se(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getCollectiblePrices=(n,i)=>this.fetch(this.url("GetCollectiblePrices"),Ee(n,i)).then(s=>Se(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getExchangeRate=(n,i)=>this.fetch(this.url("GetExchangeRate"),Ee(n,i)).then(s=>Se(s).then(o=>({exchangeRate:o.exchangeRate}))),this.memoryStore=(n,i)=>this.fetch(this.url("MemoryStore"),Ee(n,i)).then(s=>Se(s).then(o=>({ok:o.ok}))),this.memoryLoad=(n,i)=>this.fetch(this.url("MemoryLoad"),Ee(n,i)).then(s=>Se(s).then(o=>({value:o.value}))),this.getInviteInfo=n=>this.fetch(this.url("GetInviteInfo"),Ee({},n)).then(i=>Se(i).then(s=>({inviteInfo:s.inviteInfo}))),this.isValidAccessCode=(n,i)=>this.fetch(this.url("IsValidAccessCode"),Ee(n,i)).then(s=>Se(s).then(o=>({status:o.status}))),this.internalClaimAccessCode=(n,i)=>this.fetch(this.url("InternalClaimAccessCode"),Ee(n,i)).then(s=>Se(s).then(o=>({status:o.status}))),this.blockNumberAtTime=(n,i)=>this.fetch(this.url("BlockNumberAtTime"),Ee(n,i)).then(s=>Se(s).then(o=>({blocks:o.blocks}))),this.paperSessionSecret=(n,i)=>this.fetch(this.url("PaperSessionSecret"),Ee(n,i)).then(s=>Se(s).then(o=>({secret:o.secret}))),this.paperSessionSecret2=(n,i)=>this.fetch(this.url("PaperSessionSecret2"),Ee(n,i)).then(s=>Se(s).then(o=>({secret:o.secret}))),this.linkWallet=(n,i)=>this.fetch(this.url("LinkWallet"),Ee(n,i)).then(s=>Se(s).then(o=>({status:o.status,linkedWalletAddress:o.linkedWalletAddress}))),this.getLinkedWallets=(n,i)=>this.fetch(this.url("GetLinkedWallets"),Ee(n,i)).then(s=>Se(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 Ee=(t={},e={})=>({method:"POST",headers:nh({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Se=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}),f5=typeof global=="object"?global.fetch:window.fetch;class Wd extends N9{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,f5),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=nh({},s.headers,o),f5(i,s)},this.fetch=this._fetch}}const LH=Object.freeze(Object.defineProperty({__proto__:null,API:N9,SequenceAPIClient:Wd,SortOrder:BH,WebRPCSchemaHash:DH,WebRPCSchemaVersion:$H,WebRPCVersion:OH},Symbol.toStringTag,{value:"Module"})),O9="3.7.5",jH=O9,FH=typeof atob=="function",UH=typeof btoa=="function",gc=typeof Buffer=="function",u5=typeof TextDecoder=="function"?new TextDecoder:void 0,d5=typeof TextEncoder=="function"?new TextEncoder:void 0,zH="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Gc=Array.prototype.slice.call(zH),md=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(Gc),VH=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Cr=String.fromCharCode.bind(String),h5=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),$9=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),D9=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),B9=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+=Gc[e>>18&63]+Gc[e>>12&63]+Gc[e>>6&63]+Gc[e&63]}return o?s.slice(0,o-3)+"===".substring(o):s},Rx=UH?t=>btoa(t):gc?t=>Buffer.from(t,"binary").toString("base64"):B9,Up=gc?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;ne?$9(Up(t)):Up(t),qH=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)}},HH=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,L9=t=>t.replace(HH,qH),v5=gc?t=>Buffer.from(t,"utf8").toString("base64"):d5?t=>Up(d5.encode(t)):t=>Rx(L9(t)),Il=(t,e=!1)=>e?$9(v5(t)):v5(t),y5=t=>Il(t,!0),WH=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,GH=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))}},j9=t=>t.replace(WH,GH),F9=t=>{if(t=t.replace(/\s+/g,""),!VH.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},Mx=FH?t=>atob(D9(t)):gc?t=>Buffer.from(t,"base64").toString("binary"):F9,U9=gc?t=>h5(Buffer.from(t,"base64")):t=>h5(Mx(t).split("").map(e=>e.charCodeAt(0))),z9=t=>U9(V9(t)),KH=gc?t=>Buffer.from(t,"base64").toString("utf8"):u5?t=>u5.decode(U9(t)):t=>j9(Mx(t)),V9=t=>D9(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),zp=t=>KH(V9(t)),JH=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)},q9=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),H9=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,q9(r));t("fromBase64",function(){return zp(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 z9(this)})},W9=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,q9(r));t("toBase64",function(e){return Gd(this,e)}),t("toBase64URI",function(){return Gd(this,!0)}),t("toBase64URL",function(){return Gd(this,!0)})},YH=()=>{H9(),W9()},p5={version:O9,VERSION:jH,atob:Mx,atobPolyfill:F9,btoa:Rx,btoaPolyfill:B9,fromBase64:zp,toBase64:Il,encode:Il,encodeURI:y5,encodeURL:y5,utob:L9,btou:j9,decode:zp,isValid:JH,fromUint8Array:Gd,toUint8Array:z9,extendString:H9,extendUint8Array:W9,extendBuiltins:YH};var Vp=function(){return Vp=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}(),XH=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}},ZH=function(t,e,r){return Go(void 0,void 0,void 0,function(){var n,i;return Ko(this,function(s){return n=r.messageDigest(),i=w9(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}]})})},eW=function(t,e,r){return Go(void 0,void 0,void 0,function(){var n,i,s,o,a;return Ko(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 Oa(r.address,s,t),[4,o.isValidSignature(n,Z(r.signature))];case 2:return a=l.sent(),a===tW?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},tW="0x1626ba7e",G9="1",qp="eth",rW={name:"ETHAuth",version:G9},ih=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),Go(n,void 0,void 0,function(){var o,a,l,c,f,u,h,y,g,p;return Ko(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!==qp)throw new Error("ethauth: not an ethauth proof");return h=p5.decode(c),y=JSON.parse(h),g=new Nx({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),Go(n,void 0,void 0,function(){var o,a;return Ko(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 Go(n,void 0,void 0,function(){var s,l,o,a,l;return Ko(this,function(c){switch(c.label){case 0:s=[],l=0,c.label=1;case 1:if(!(l{let e={};return t.forEach((r,n)=>e[r]=n),e})(Kc),sW=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Er=String.fromCharCode.bind(String),x5=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),J9=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),Y9=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),Q9=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+=Kc[e>>18&63]+Kc[e>>12&63]+Kc[e>>6&63]+Kc[e&63]}return o?s.slice(0,o-3)+"===".substring(o):s},Ox=typeof btoa=="function"?t=>btoa(t):mc?t=>Buffer.from(t,"binary").toString("base64"):Q9,Hp=mc?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;ne?J9(Hp(t)):Hp(t),oW=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?Er(192|e>>>6)+Er(128|e&63):Er(224|e>>>12&15)+Er(128|e>>>6&63)+Er(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return Er(240|e>>>18&7)+Er(128|e>>>12&63)+Er(128|e>>>6&63)+Er(128|e&63)}},aW=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,X9=t=>t.replace(aW,oW),b5=mc?t=>Buffer.from(t,"utf8").toString("base64"):m5?t=>Hp(m5.encode(t)):t=>Ox(X9(t)),Rl=(t,e=!1)=>e?J9(b5(t)):b5(t),w5=t=>Rl(t,!0),lW=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cW=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 Er((r>>>10)+55296)+Er((r&1023)+56320);case 3:return Er((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return Er((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},Z9=t=>t.replace(lW,cW),eS=t=>{if(t=t.replace(/\s+/g,""),!sW.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?Er(e>>16&255,e>>8&255):Er(e>>16&255,e>>8&255,e&255);return r},$x=typeof atob=="function"?t=>atob(Y9(t)):mc?t=>Buffer.from(t,"base64").toString("binary"):eS,tS=mc?t=>x5(Buffer.from(t,"base64")):t=>x5($x(t).split("").map(e=>e.charCodeAt(0))),rS=t=>tS(nS(t)),fW=mc?t=>Buffer.from(t,"base64").toString("utf8"):g5?t=>g5.decode(tS(t)):t=>Z9($x(t)),nS=t=>Y9(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),Wp=t=>fW(nS(t)),uW=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)},iS=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),sS=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,iS(r));t("fromBase64",function(){return Wp(this)}),t("toBase64",function(e){return Rl(this,e)}),t("toBase64URI",function(){return Rl(this,!0)}),t("toBase64URL",function(){return Rl(this,!0)}),t("toUint8Array",function(){return rS(this)})},oS=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,iS(r));t("toBase64",function(e){return Kd(this,e)}),t("toBase64URI",function(){return Kd(this,!0)}),t("toBase64URL",function(){return Kd(this,!0)})},dW=()=>{sS(),oS()},_u={version:K9,VERSION:nW,atob:$x,atobPolyfill:eS,btoa:Ox,btoaPolyfill:Q9,fromBase64:Wp,toBase64:Rl,encode:Rl,encodeURI:w5,encodeURL:w5,utob:X9,btou:Z9,decode:Wp,isValid:uW,fromUint8Array:Kd,toUint8Array:rS,extendString:sS,extendUint8Array:oS,extendBuiltins:dW},hW=t=>_u.encode(t,!0),Dx=t=>_u.encode(JSON.stringify(t),!0),vW=t=>{if(t!=null)return _u.decode(t)},Bx=t=>{if(t!=null)return JSON.parse(_u.decode(t))};function aS(t){return t!=null&&(V.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Oe(t)||typeof t=="bigint"||Co(t))}const Lx=t=>Z(ge(typeof t=="string"?Ve(t):t)),lS=(t,e,r)=>_e(["string","uint256","address","bytes32"],["",e,t,r]),Gp=(t,e,r)=>ge(lS(t,e,r)),cS=()=>typeof window>"u"&&typeof process=="object",yW=()=>!cS(),fS=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(_u.decode(e[1]))};function sh(){return sh=Object.assign?Object.assign.bind():function(t){for(var e=1;ehe.configure(t),au=(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 pW=class{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...i){e=`${e}:${ge(Ve(JSON.stringify(i,gW)))}`;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 gW(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function jx(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 mW(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function xW(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 Fx=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),hS=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},vS=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},yS=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},bW=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),pS=t=>{const e=sh({},t.types);return delete e.EIP712Domain,rr.hash(t.domain,e,t.message)},Tu=t=>Z(pS(t)),{defineReadOnly:wW,getStatic:CW,resolveProperties:EW,checkProperties:SW,shallowCopy:kW,deepCopy:AW}=yH,_W=t=>t.replace(/([^:]\/)\/+/g,"$1"),TW=Object.freeze(Object.defineProperty({__proto__:null,Logger:uS,PromiseCache:pW,base64Decode:vW,base64DecodeObject:Bx,base64Encode:hW,base64EncodeObject:Dx,checkProperties:SW,configureLogger:dS,deepCopy:AW,defineReadOnly:wW,encodeMessageDigest:Lx,encodeTypedDataDigest:Tu,encodeTypedDataHash:pS,getEthersConnectionInfo:au,getRandomInt:Fx,getStatic:CW,isBigNumberish:aS,isBrowser:yW,isNode:cS,jwtDecodeClaims:fS,logger:he,packMessageData:lS,promisify:jx,queryStringFromObject:mW,queryStringToObject:xW,resolveProperties:EW,sanitizeAlphanumeric:vS,sanitizeHost:yS,sanitizeNumberString:hS,shallowCopy:kW,sleep:bW,subDigestOf:Gp,urlClean:_W},Symbol.toStringTag,{value:"Module"}));function Ye(){return Ye=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:V.from(t).toNumber(),IW=t=>{if(t)return gS(t)},mS=(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(mS(t,!0,e),t),RW=(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},MW=(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)}},bS=t=>xS(wS(t)),si=(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}},NW=(t,e)=>t?t.name===e||t.chainId===e:!1,OW=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},d1=(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})):"",CS=t=>d1("https://${network}-indexer.sequence.app",{network:t}),ES=t=>d1("https://${network}-relayer.sequence.app",{network:t}),SS=t=>d1("https://nodes.sequence.app/${network}",{network:t});function Ux(t){return si(Xl,t)}function kS(t){return V.isBigNumber(t)?t:aS(t)?V.from(t):V.from(t.chainId)}const $t=t=>{const e=SS(t);return{rpcUrl:e,relayer:{url:ES(t),provider:{url:e}},indexerUrl:CS(t)}},Xl=bS([Ye({},Je[Y.POLYGON],$t("polygon"),{isDefaultChain:!0,isAuthChain:!0}),Ye({},Je[Y.MAINNET],$t("mainnet")),Ye({},Je[Y.BSC],$t("bsc")),Ye({},Je[Y.AVALANCHE],$t("avalanche")),Ye({},Je[Y.ARBITRUM],$t("arbitrum")),Ye({},Je[Y.ARBITRUM_NOVA],$t("arbitrum-nova")),Ye({},Je[Y.OPTIMISM],$t("optimism")),Ye({},Je[Y.OPTIMISM_SEPOLIA],$t("optimism-sepolia")),Ye({},Je[Y.POLYGON_ZKEVM],$t("polygon-zkevm")),Ye({},Je[Y.GNOSIS],$t("gnosis")),Ye({},Je[Y.RINKEBY],$t("rinkeby"),{disabled:!0}),Ye({},Je[Y.GOERLI],$t("goerli"),{disabled:!0}),Ye({},Je[Y.SEPOLIA],$t("sepolia")),Ye({},Je[Y.POLYGON_MUMBAI],$t("mumbai")),Ye({},Je[Y.BSC_TESTNET],$t("bsc-testnet")),Ye({},Je[Y.ARBITRUM_SEPOLIA],$t("arbitrum-sepolia")),Ye({},Je[Y.BASE],$t("base")),Ye({},Je[Y.BASE_SEPOLIA],$t("base-sepolia")),Ye({},Je[Y.HOMEVERSE],$t("homeverse")),Ye({},Je[Y.HOMEVERSE_TESTNET],$t("homeverse-testnet")),Ye({},Je[Y.XAI_SEPOLIA],$t("xai-sepolia")),Ye({},Je[Y.AVALANCHE_TESTNET],$t("avalanche-testnet")),Ye({},Je[Y.ASTAR_ZKEVM],$t("astar-zkevm")),Ye({},Je[Y.ASTAR_ZKATANA],$t("astar-zkatana")),Ye({},Je[Y.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),Ye({},Je[Y.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),Zl="2.0";class zx{constructor(e,r){this.sender=void 0,this.handler=void 0,this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=AS(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(i){r(i,void 0)}}}const AS=(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 _S(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 TS(t){return t!==void 0&&t.sendAsync!==void 0}let $W=0;class oh{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,_S(e)?this.send=e.send.bind(e):TS(e)?this.send=(n,i,s)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:Zl,id:++$W,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 DW{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 BW{constructor(e){this.sendAsyncMiddleware=void 0,this.isAllowedFunc=void 0,e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.sendAsyncMiddleware=Kp(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.sendAsyncMiddleware=Kp(this.isAllowedFunc)}}const Kp=t=>e=>(r,n,i)=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");e(r,n,i)};class Vx{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 PS{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:X(this.options.chainId)});return}break;case"eth_accounts":if(this.options.accountAddress){i(void 0,{jsonrpc:"2.0",id:o,result:[Ce(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 IS=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)},RS=t=>(e,r,n)=>{const i=n?` chainId:${n}`:"";he.info(`[provider request]${i} id:${e.id} method:${e.method} params:`,e.params),t(e,(s,o)=>{s?he.warn(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"error:",s):he.info(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"response:",o),r(s,o)},n)},LW=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:X(s)});return}e(r,n,i)},MS=["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 jW{constructor(e){this.provider=void 0,this.sendAsyncMiddleware=r=>(n,i,s)=>{if(MS.includes(n.method)){this.provider.sendAsync(n,i,s);return}r(n,i,s)},this.provider=e}}class FW{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...MS],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}he.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 NS{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 UW 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 ku(this.connection,JSON.stringify(c),zW).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 zx(i??[new PS({chainId:n}),new NS,new Vx({defaultChainId:n,blockCache:s})],new oh(this.fetch,n));this._sender=new oh(o,n)}async getNetwork(){const e=this._chainId;if(e){const r=Je[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 zW(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 VW=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:BW,CachedProvider:Vx,ChainId:Y,EagerProvider:PS,JsonRpcExternalProvider:DW,JsonRpcProvider:UW,JsonRpcRouter:zx,JsonRpcSender:oh,JsonRpcVersion:Zl,NetworkType:Be,PublicProvider:FW,SigningProvider:jW,SingleflightMiddleware:NS,allNetworks:Xl,allowProviderMiddleware:Kp,checkNetworkConfig:NW,createJsonRpcMiddlewareStack:AS,ensureUniqueNetworks:RW,ensureValidNetworks:xS,exceptionProviderMiddleware:IS,findNetworkConfig:si,findSupportedNetwork:Ux,getChainId:gS,indexerURL:CS,isJsonRpcHandler:TS,isJsonRpcProvider:_S,isNetworkConfig:PW,isValidNetworkConfig:mS,loggingProviderMiddleware:RS,maybeChainId:IW,networkProviderMiddleware:LW,networks:Je,networksIndex:OW,nodesURL:SS,relayerURL:ES,sortNetworks:wS,stringTemplate:d1,toChainIdNumber:kS,updateNetworkConfig:MW,validateAndSortNetworks:bS},Symbol.toStringTag,{value:"Module"}));function kr(){return kr=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(Hx(i))return _e(["uint8","uint8","address"],[la.Address,i.weight,i.address]);if(i.isDynamic){const s=Z(i.signature);return _e(["uint8","uint8","address","uint16","bytes"],[la.DynamicSignature,i.weight,i.address,s.length,s])}return _e(["uint8","uint8","bytes"],[la.EOASignature,i.weight,i.signature])});return _e(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function jS(t,e,r){const n=Pu(e),i=await Promise.all(t.signers.map(async s=>{if(Hx(s))return s;if(s.isDynamic){if(!s.address)throw new Error("Dynamic signature part must have address");if(!qx(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:Iu(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 mf(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=Z(l.signature);return i=i.add(a.weight),l.isDynamic||c.length!==66?kr({},a,{isDynamic:!0,signature:l.signature,address:a.address}):kr({},a,{isDynamic:!1,signature:l.signature})});return{encoded:Wx({version:1,threshold:t.threshold,signers:s}),weight:i}}const Gx={decode:t=>LS(t),encode:t=>Wx(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>jS(t,e,r),encodeSigners:(t,e,r,n)=>mf(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=Gx.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 XW=Object.freeze({__proto__:null,SignaturePartType:la,isAddressMember:Hx,isUnrecoveredSignatureMember:DS,isUnrecoveredSignature:BS,decodeSignature:LS,encodeSignature:Wx,recoverSignature:jS,encodeSigners:mf,SignatureCoder:Gx});const Kx={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>ge(Jr.encode(["bytes32","uint8","address"],[e,r.weight,r.address])),_e(["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(!Bt.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 or([...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"),[Kx.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&&!Bt.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}=mf(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}=mf(t,r,[]);if(a.gte(t.threshold))return o}return mf(t,r,[]).encoded}};var ZW=Object.freeze({__proto__:null,ConfigCoder:Kx});const FS=1,US={version:FS,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Ki=Object.freeze({__proto__:null,config:ZW,signature:XW,version:FS,DeployedWalletContext:US});const Jx="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function zS(t){return ge(VS(t))}function VS(t){return _e(["bytes32","bytes32"],[Jx,t])}function qS(t){const e=Z(t);if(e.length===64&&X(e.slice(0,32))===Jx)return X(e.slice(32,64))}function eG(t){return qS(t)!==void 0}var tG=Object.freeze({__proto__:null,SetImageHashPrefix:Jx,hashSetImageHash:zS,messageSetImageHash:VS,decodeMessageSetImageHash:qS,isMessageSetImageHash:eG});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}({}),Kt=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 ah=66;function Sa(t){return t.left!==void 0&&t.right!==void 0}function xc(t){return t.tree!==void 0}function Ru(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function lh(t){let e=Z(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 Kt.Signature:{const s=e[0],o=X(e.slice(1,ah+1));r=n(r,{signature:o,weight:s,unrecovered:!0,isDynamic:!1}),e=e.slice(ah+1)}break;case Kt.Address:{const s=e[0],o=Ce(X(e.slice(1,21)));r=n(r,{address:o,weight:s}),e=e.slice(21)}break;case Kt.DynamicSignature:{const s=e[0],o=Ce(X(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],l=X(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 Kt.Node:{const s=X(e.slice(0,32));r=n(r,{nodeHash:s}),e=e.slice(32)}break;case Kt.Branch:{const s=e[0]<<16|e[1]<<8|e[2],o=lh(e.slice(3,3+s));r=n(r,o),e=e.slice(3+s)}break;case Kt.Subdigest:{const s=X(e.slice(0,32));r=n(r,{subdigest:s}),e=e.slice(32)}break;case Kt.Nested:{const s=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],l=lh(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}: ${X(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class HS extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function ca(t,e,r){if(Sa(t)){const[n,i]=await Promise.all([ca(t.left,e,r),ca(t.right,e,r)]);return{left:n,right:i}}if(xc(t))return{weight:t.weight,threshold:t.threshold,tree:await ca(t.tree,e,r)};if(Ru(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await qx(t.address,e,t.signature,r))throw new HS(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:Iu(e,t.signature),signature:t.signature,subdigest:e};return t}const Rr={concat:(t,e)=>_e(["bytes","bytes"],[t,e]),node:t=>_e(["uint8","bytes32"],[Kt.Node,t]),branch:t=>{const e=Z(t);return _e(["uint8","uint24","bytes"],[Kt.Branch,e.length,e])},nested:(t,e,r)=>{const n=Z(r);return _e(["uint8","uint8","uint16","uint24","bytes"],[Kt.Nested,t,e,n.length,n])},subdigest:t=>_e(["uint8","bytes32"],[Kt.Subdigest,t]),signature:(t,e)=>_e(["uint8","uint8","bytes"],[Kt.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=Z(r);return _e(["uint8","uint8","address","uint24","bytes"],[Kt.DynamicSignature,t,e,n.length,n])},address:(t,e)=>_e(["uint8","uint8","address"],[Kt.Address,t,e])};function xf(t,e,r,n,i={}){const s=bf(t.tree,e,r,i);return V.from(n).isZero()?{encoded:_e(["uint8","uint16","uint32","bytes"],[pr.NoChainIdDynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:V.from(t.threshold).gt(255)?{encoded:_e(["uint8","uint16","uint32","bytes"],[pr.Dynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:{encoded:_e(["uint8","uint8","uint32","bytes"],[pr.Legacy,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}}function bf(t,e,r,n={}){const i=!n.disableTrim;if(li(t)){const s=bf(t.left,e,r),o=bf(t.right,e,r),a=Kr(t.left),l=Kr(t.right);return i&&s.weight.eq(0)&&o.weight.eq(0)&&!a&&!l?{encoded:Rr.node(Pn(t)),weight:Bt}:i&&o.weight.eq(0)&&!l?{encoded:Rr.concat(s.encoded,Rr.node(Pn(t.right))),weight:s.weight}:i&&s.weight.eq(0)&&!a?{encoded:Rr.concat(Rr.node(Pn(t.left)),Rr.branch(o.encoded)),weight:o.weight}:{encoded:Rr.concat(s.encoded,Rr.branch(o.encoded)),weight:s.weight.add(o.weight)}}if(ps(t)){const s=bf(t.tree,e,r);return i&&s.weight.eq(0)?{encoded:Rr.node(Pn(t)),weight:Bt}:{encoded:Rr.nested(t.weight,t.threshold,s.encoded),weight:s.weight}}if(gs(t))return{encoded:Rr.node(Pn(t)),weight:Bt};if(ys(t)){const s=r.includes(t.subdigest);return{encoded:Rr.subdigest(t.subdigest),weight:s?y7:Bt}}if(Kr(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:Rr.dynamicSignature(t.weight,t.address,a),weight:V.from(t.weight)}:{encoded:Rr.signature(t.weight,a),weight:V.from(t.weight)}}else return{encoded:Rr.address(t.weight,t.address),weight:Bt};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function Yx(t){return Xx(t)?Yx(t.suffix[t.suffix.length-1]):t.config}function Qx(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function Mu(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(Qx)}function WS(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function Xx(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(WS)}function h1(t){const e=Z(t),r=e[0];switch(r){case pr.Legacy:return{version:2,type:pr.Legacy,decoded:Jd(e)};case pr.Dynamic:return{version:2,type:pr.Dynamic,decoded:Jd(e.slice(1))};case pr.NoChainIdDynamic:return{version:2,type:pr.NoChainIdDynamic,decoded:Jd(e.slice(1))};case pr.Chained:return GS(e);default:throw new Error(`Invalid signature type: ${r}`)}}function Jd(t){const e=Z(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],i=lh(e.slice(6));return{threshold:r,checkpoint:n,tree:i}}function GS(t){const e=Z(t),r=e[0];if(r!==pr.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let i=1;for(;iZ(to(s))),i=_e(n.map(()=>["uint24","bytes"]).flat(),n.map(s=>[s.length,s]).flat());return _e(["uint8","bytes"],[pr.Chained,i])}function to(t){if(Ri(t))return X(t);if(Mu(t)||Xx(t))return v1(to(t),(t.suffix||[]).map(to));const e=Qx(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 Jp(e);case pr.NoChainIdDynamic:case pr.Dynamic:return _e(["uint8","bytes"],[t.type,Jp(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 Jp(t){return _e(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,wf(t.tree)])}function wf(t){if(li(t)||Sa(t)){const e=Z(wf(t.right)),r=Z(wf(t.left));return li(t.right)||Sa(t.right)?_e(["bytes","uint8","uint24","bytes"],[r,Kt.Branch,e.length,e]):_e(["bytes","bytes"],[r,e])}if(ps(t)||xc(t)){const e=Z(wf(t.tree));return _e(["uint8","uint8","uint16","uint24","bytes"],[Kt.Nested,t.weight,t.threshold,e.length,e])}if(Ru(t)||Kr(t)&&t.signature!==void 0){const e=Z(t.signature);if(t.isDynamic||e.length!==ah){if(!t.address)throw new Error("Dynamic signature leaf must have address");return _e(["uint8","uint8","address","uint24","bytes"],[Kt.DynamicSignature,t.weight,t.address,e.length,e])}else return _e(["uint8","uint8","bytes"],[Kt.Signature,t.weight,e])}if(Kr(t))return _e(["uint8","uint8","address"],[Kt.Address,t.weight,t.address]);if(gs(t))return _e(["uint8","bytes32"],[Kt.Node,t.nodeHash]);if(ys(t))return _e(["uint8","bytes32"],[Kt.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function Cf(t){return li(t)?[...Cf(t.left),...Cf(t.right)]:ps(t)?Cf(t.tree):Kr(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function Ef(t){return Sa(t)?[...Ef(t.left),...Ef(t.right)]:xc(t)?Ef(t.tree):Ru(t)?[t.signature]:[]}function Yd(t){return Sa(t)?[...Yd(t.left),...Yd(t.right)]:xc(t)?Yd(t.tree):ys(t)?[t.subdigest]:[]}async function ch(t){const e=typeof t=="string"?h1(t):t;if(Mu(e)){const n=await Promise.all([ch(kr({},e,{suffix:void 0})),...e.suffix.map(i=>ch(i))]);return v1(n[0],n.slice(1))}const{trimmed:r}=await Sf(e.decoded.tree);return to(kr({},e,{decoded:kr({},e.decoded,{tree:r})}))}async function Sf(t,e=!0){if(Sa(t)){const[r,n]=await Promise.all([Sf(t.left),Sf(t.right)]);if(r.weight===0&&n.weight===0)try{const i=await ca(t,W0,void 0);return{weight:0,trimmed:{nodeHash:Pn(i)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(xc(t)){const r=await Sf(t.tree);if(r.weight===0)try{const n=await ca(t,W0,void 0);return{weight:0,trimmed:{nodeHash:Pn(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return gs(t)&&QS(t.nodeHash)?{weight:0,trimmed:kr({},YS(t.nodeHash))}:Ru(t)||Kr(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 y1={decode:t=>h1(t),encode:t=>to(t),trim:t=>ch(t),supportsNoChainId:!0,recover:(t,e,r)=>Zx(t,e,r),encodeSigners:(t,e,r,n)=>xf(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=y1.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=Ri(t)?t:to(t),i=r.map(s=>Ri(s)?s:to(s));return v1(n,i)},hashSetImageHash:function(t){return zS(t)},signaturesOf(t){return Cf(t.tree)},signaturesOfDecoded:function(t){return Ef(t.decoded.tree)}};var rG=Object.freeze({__proto__:null,SignatureType:pr,SignaturePartType:Kt,SignaturePartTypeLength:ah,isUnrecoveredNode:Sa,isUnrecoveredNestedLeaf:xc,isUnrecoveredSignatureLeaf:Ru,decodeSignatureTree:lh,InvalidSignatureLeafError:HS,recoverTopology:ca,partEncoder:Rr,encodeSigners:xf,encodeTree:bf,deepestConfigOfSignature:Yx,isUnrecoveredSignature:Qx,isUnrecoveredChainedSignature:Mu,isSignature:WS,isChainedSignature:Xx,decodeSignature:h1,decodeSignatureBody:Jd,decodeChainedSignature:GS,setImageHashStruct:KS,recoverSignature:Zx,encodeChain:v1,encodeSignature:to,encodeSignatureBody:Jp,encodeSignatureTree:wf,signaturesOf:Cf,signaturesOfDecoded:Ef,subdigestsOfDecoded:Yd,trimSignature:ch,trimUnrecoveredTree:Sf,SignatureCoder:y1});function Kr(t){return t.address!==void 0&&t.weight!==void 0}function ys(t){return t.subdigest!==void 0&&t.address===void 0}function kf(t){return li(t)?JSON.stringify({left:kf(t.left),right:kf(t.right)}):ps(t)?JSON.stringify({weight:V.from(t.weight).toString(),threshold:V.from(t.threshold).toString(),tree:kf(t.tree)}):Kr(t)?JSON.stringify({address:t.address,weight:V.from(t.weight).toString()}):JSON.stringify(t)}function Af(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:Af(e.left),right:Af(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:Af(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 eb(t){return Kr(t)||ys(t)||ps(t)||gs(t)}function li(t){return t.left!==void 0&&t.right!==void 0}function nG(t){return li(t)||eb(t)}function JS(t){return _e(["uint96","address"],[t.weight,t.address])}function YS(t){const e=Z(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=V.from(e.slice(0,12)),n=Ce(X(e.slice(12)));return{weight:r,address:n}}function QS(t){const e=Z(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function Pn(t){if(Kr(t))return JS(t);if(ys(t))return Zs(["string","bytes32"],[`Sequence static digest: +`,t.subdigest]);if(ps(t)){const e=Pn(t.tree);return Zs(["string","bytes32","uint256","uint256"],[`Sequence nested config: +`,e,t.threshold,t.weight])}return gs(t)?t.nodeHash:Zs(["bytes32","bytes32"],[Pn(t.left),Pn(t.right)])}function iG(t){const e=[];let r=t;for(;!eb(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function sG(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function tb(t){return Zs(["bytes32","uint256"],[Zs(["bytes32","uint256"],[Pn(t.tree),t.threshold]),t.checkpoint])}function XS(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function Ml(t){return Kr(t)||ys(t)?[t]:ps(t)?[{threshold:t.threshold,weight:t.weight,members:Ml(t.tree)}]:gs(t)?[]:[...Ml(t.left),...Ml(t.right)]}function Yp(t){return gs(t)?!0:li(t)?Yp(t.left)||Yp(t.right):!1}function oG(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:Ml(t.tree)}}const ZS=(t,e)=>t.map(r=>XS(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function rb(t){if(t.length===0)throw new Error("Empty members array");return ZS(t,rb).reduce((r,n)=>({left:r,right:n}))}function nb(t){if(t.length===0)throw new Error("Empty members array");const e=ZS(t,nb);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 ib(t){return t.length>8?nb(t):rb(t)}function ek(t,e=ib){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function fh(t,e){return ys(t)?t.subdigest===e:li(t)?fh(t.left,e)||fh(t.right,e):!1}function Qp(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();ps(n)?e.push(n.tree):li(n)?(e.push(n.left),e.push(n.right)):Kr(n)&&r.add({address:n.address,weight:V.from(n.weight).toNumber()})}return Array.from(r)}function uh(t){return li(t)?uh(t.left)&&uh(t.right):!gs(t)}const p1={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>tb(t),hasSubdigest:(t,e)=>fh(t.tree,e),checkpointOf:t=>V.from(t.checkpoint),signersOf:t=>Qp(t.tree),fromSimple:t=>{var e;return ek(kr({},t,{members:[...t.signers,...((e=t.subdigests)!=null?e:[]).map(r=>({subdigest:r}))]}))},isComplete:t=>uh(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new or(mr.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[p1.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,i;const s=new or(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(!Bt.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(!Bt.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:kf(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:Af(e.tree)}},editConfig:function(t,e){var r,n;const i=Ml(t.tree);if(e.add)for(const s of e.add)i.find(o=>Kr(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=>Kr(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:ib(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}=xf(t,r,[],0);if(a.gte(t.threshold))return o}const n=Qp(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}=xf(t,r,[],0);if(a.gte(t.threshold))return o}return xf(t,r,[],0).encoded}};var aG=Object.freeze({__proto__:null,isSignerLeaf:Kr,isSubdigestLeaf:ys,topologyToJSON:kf,topologyFromJSON:Af,isNestedLeaf:ps,isNodeLeaf:gs,isLeaf:eb,isNode:li,isTopology:nG,encodeSignerLeaf:JS,decodeSignerLeaf:YS,isEncodedSignerLeaf:QS,hashNode:Pn,leftFace:iG,isWalletConfig:sG,imageHash:tb,isSimpleNestedMember:XS,topologyToMembers:Ml,hasUnknownNodes:Yp,toSimpleWalletConfig:oG,legacyTopologyBuilder:rb,merkleTopologyBuilder:nb,optimized2SignersTopologyBuilder:ib,toWalletConfig:ek,hasSubdigest:fh,signersOf:Qp,isComplete:uh,ConfigCoder:p1}),lG=Object.freeze({__proto__:null});const cG={config:p1,signature:y1},tk=2,rk={version:tk,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Pe=Object.freeze({__proto__:null,config:aG,signature:rG,context:lG,chained:tG,coders:cG,version:tk,DeployedWalletContext:rk});function Xp(t,e){const r=ge(_e(["bytes","bytes32"],[t.walletCreationCode,Ze(t.mainModule,32)])),n=ge(_e(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return Ce(Gt(n,12))}async function fG(t,e,r,n,i,s){return(await Promise.all(vk.map(async a=>{try{const l=a.signature.SignatureCoder.decode(X(r)),c=await a.signature.SignatureCoder.recover(l,{address:t,digest:X(e),chainId:n},i),f=a.config.ConfigCoder.imageHashOf(c.config);if(Xp(s[a.version],f).toLowerCase()===t.toLowerCase())return!0;const h=await a.signature.SignatureCoder.recover(l,{address:t,digest:X(e),chainId:n},i),y=a.config.ConfigCoder.imageHashOf(h.config);return Xp(s[a.version],y).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function uG(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 dG(t){const e=Object.keys(t).length;return t[e]}const hG={1:US,2:rk};var vG=Object.freeze({__proto__:null,addressOf:Xp,isValidCounterfactual:fG,isValidVersionedContext:uG,latestContext:dG,defaultContexts:hG});const g1=`tuple( + bool delegateCall, + bool revertOnError, + uint256 gasLimit, + address target, + uint256 value, + bytes data +)[]`;function yG(t,e,r,n){return kr({},t,{chainId:r,intent:{id:n,wallet:e}})}function pG(t){return ge(Jr.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function gG(t){const e=Jr.decode(["uint256",g1],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function nk(t,e){return Jr.encode(["uint256",g1],[t,lu(e)])}function ik(t,e){return ge(nk(t,e))}function mG(t,e,r,n){return Pu({address:t,chainId:e,digest:ik(r,n)})}function xG(t,e,r){return Pu({address:t,chainId:e,digest:ge(Jr.encode(["string",g1],["guest:",lu(r)]))})}function sk(t,e){return e.map(r=>sb(t,r))}function sb(t,e){if(e.to&&e.to!==fx)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 or(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 m1(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function ok(t){return t.every(m1)}function lu(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:e.gasLimit!==void 0?e.gasLimit:Bt,target:(r=e.to)!=null?r:fx,value:e.value!==void 0?e.value:Bt,data:e.data!==void 0?e.data:[]}})}function bG(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function wG(t,e){const r=V.from(t),n=V.from(e),i=v7.pow(V.from(96));if(!n.div(i).eq(Bt))throw new Error("Space already encoded");return n.add(r.mul(i))}function CG(t){const e=V.from(t),r=v7.pow(V.from(96));return[e.div(r),e.mod(r)]}function EG(t,e){return Array.isArray(e)?ok(e)?e:sk(t,e).map(n=>n.transaction):m1(e)?[e]:[sb(t,e).transaction]}function ak(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&&m1(r),!0)}function lk(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&ak(t)}function SG(t){const e=new or(mr.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),lk(t)?[lu(t.transactions),t.nonce,t.signature]:[lu(t.transactions),0,[]])}const ck="0x61c2926c",fk=`tuple( + bool delegateCall, + bool revertOnError, + uint256 gasLimit, + address target, + uint256 value, + bytes data +)[]`,Zp=(t,e)=>{const r=[],n=new or(mr.mainModule.abi);for(const i of e){const s=Z(i.data||"0x");if(i.to===t&&X(s.slice(0,4))===ck){const o=s.slice(4),a=Jr.decode([fk],o)[0];r.push(...Zp(i.to,a.map(l=>kr({},l,{to:l.target}))))}else try{const o=n.decodeFunctionData("execute",s)[0],a=Zp(t,o.map(l=>kr({},l,{to:l.target})));r.push(...a)}catch{r.push(i)}}return r};var kG=Object.freeze({__proto__:null,MetaTransactionsType:g1,intendTransactionBundle:yG,intendedTransactionID:pG,unpackMetaTransactionsData:gG,packMetaTransactionsData:nk,digestOfTransactions:ik,subdigestOfTransactions:mG,subdigestOfGuestModuleTransactions:xG,toSequenceTransactions:sk,toSequenceTransaction:sb,isSequenceTransaction:m1,hasSequenceTransactions:ok,sequenceTxAbiEncode:lu,fromTxAbiEncode:bG,encodeNonce:wG,decodeNonce:CG,fromTransactionish:EG,isTransactionBundle:ak,isSignedTransactionBundle:lk,encodeBundleExecData:SG,selfExecuteSelector:ck,selfExecuteAbi:fk,unwind:Zp});const uk="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",AG="0x6492649264926492649264926492649264926492649264926492649264926492";async function dk(t,e,r,n){return await t.call({data:Xe([uk,new vx().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}var _G=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:uk,EIP_6492_SUFFIX:AG,validateEIP6492Offchain:dk});class TG{constructor(e){this.provider=e,this.isDeployedCache=new Set}module(e){return new Oa(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=>Z(i))).length!==0;return n&&this.isDeployedCache.add(e),n}async implementation(e){const r=Jr.encode(["address"],[e]),n=await this.provider.getStorageAt(e,r).then(i=>Z(i));if(n.length===20)return Ce(X(n));if(n.length===32)return Jr.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 dk(this.provider,e,r,n)}}var PG=Object.freeze({__proto__:null,OnChainReader:TG});function IG(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var ce=Object.freeze({__proto__:null,config:qW,signature:HW,context:vG,signer:QW,EIP1271:KW,transaction:kG,reader:PG,EIP6492:_G,isWalletSignRequestMetadata:IG});const eg=[{config:Kx,signature:Gx},{config:p1,signature:y1}];function hk(t){const e=t-1;if(e<0||e>=eg.length)throw new Error(`No coder for version: ${t}`);return eg[e]}function RG(t){return hk(t)}var Sr=Object.freeze({__proto__:null,ALL_CODERS:eg,coderFor:hk,genericCoderFor:RG});const vk=[Ki,Pe],MG=Object.freeze(Object.defineProperty({__proto__:null,allVersions:vk,commons:ce,universal:Sr,v1:Ki,v2:Pe},Symbol.toStringTag,{value:"Module"}));function NG(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;fZ(s).length===0))return C5;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 Oa(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 he.error(`giving up after ${h} failed attempts${u?`: ${u}`:""}`,y),y;he.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 FG(t){return t.signer!==void 0&&fo.isSigner(t.signer)}class UG extends xk{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&&he.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 zG="v1",VG="v0.4.1",qG="13cf0e854e8127ae83218cc188ef0e7456241c96";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}({}),HG=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}({}),WG=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),GG=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class bk{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Relayer/",this.ping=n=>this.fetch(this.url("Ping"),qe({},n)).then(i=>He(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),qe({},n)).then(i=>He(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),qe({},n)).then(i=>He(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),qe({},n)).then(i=>He(i).then(s=>({data:s.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),qe({},n)).then(i=>He(i).then(s=>({chainID:s.chainID}))),this.sendMetaTxn=(n,i)=>this.fetch(this.url("SendMetaTxn"),qe(n,i)).then(s=>He(s).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,i)=>this.fetch(this.url("GetMetaTxnNonce"),qe(n,i)).then(s=>He(s).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,i)=>this.fetch(this.url("GetMetaTxnReceipt"),qe(n,i)).then(s=>He(s).then(o=>({receipt:o.receipt}))),this.simulate=(n,i)=>this.fetch(this.url("Simulate"),qe(n,i)).then(s=>He(s).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,i)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),qe(n,i)).then(s=>He(s).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),qe({},n)).then(i=>He(i).then(s=>({isFeeRequired:s.isFeeRequired,tokens:s.tokens}))),this.feeOptions=(n,i)=>this.fetch(this.url("FeeOptions"),qe(n,i)).then(s=>He(s).then(o=>({options:o.options,sponsored:o.sponsored,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,i)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),qe(n,i)).then(s=>He(s).then(o=>({options:o.options}))),this.getMetaTransactions=(n,i)=>this.fetch(this.url("GetMetaTransactions"),qe(n,i)).then(s=>He(s).then(o=>({page:o.page,transactions:o.transactions}))),this.sentTransactions=(n,i)=>this.fetch(this.url("SentTransactions"),qe(n,i)).then(s=>He(s).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,i)=>this.fetch(this.url("PendingTransactions"),qe(n,i)).then(s=>He(s).then(o=>({page:o.page,transactions:o.transactions}))),this.getGasTank=(n,i)=>this.fetch(this.url("GetGasTank"),qe(n,i)).then(s=>He(s).then(o=>({gasTank:o.gasTank}))),this.addGasTank=(n,i)=>this.fetch(this.url("AddGasTank"),qe(n,i)).then(s=>He(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.updateGasTank=(n,i)=>this.fetch(this.url("UpdateGasTank"),qe(n,i)).then(s=>He(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.getGasSponsor=(n,i)=>this.fetch(this.url("GetGasSponsor"),qe(n,i)).then(s=>He(s).then(o=>({gasSponsor:o.gasSponsor}))),this.listGasSponsors=(n,i)=>this.fetch(this.url("ListGasSponsors"),qe(n,i)).then(s=>He(s).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,i)=>this.fetch(this.url("AddGasSponsor"),qe(n,i)).then(s=>He(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,i)=>this.fetch(this.url("UpdateGasSponsor"),qe(n,i)).then(s=>He(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.removeGasSponsor=(n,i)=>this.fetch(this.url("RemoveGasSponsor"),qe(n,i)).then(s=>He(s).then(o=>({status:o.status}))),this.reportGasSponsorUsage=(n,i)=>this.fetch(this.url("ReportGasSponsorUsage"),qe(n,i)).then(s=>He(s).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.nextGasTankBalanceAdjustmentNonce=(n,i)=>this.fetch(this.url("NextGasTankBalanceAdjustmentNonce"),qe(n,i)).then(s=>He(s).then(o=>({nonce:o.nonce}))),this.adjustGasTankBalance=(n,i)=>this.fetch(this.url("AdjustGasTankBalance"),qe(n,i)).then(s=>He(s).then(o=>({status:o.status,adjustment:o.adjustment}))),this.getGasTankBalanceAdjustment=(n,i)=>this.fetch(this.url("GetGasTankBalanceAdjustment"),qe(n,i)).then(s=>He(s).then(o=>({adjustment:o.adjustment}))),this.listGasTankBalanceAdjustments=(n,i)=>this.fetch(this.url("ListGasTankBalanceAdjustments"),qe(n,i)).then(s=>He(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 qe=(t={},e={})=>({method:"POST",headers:ho({},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});var ec=Object.freeze({__proto__:null,WebRPCVersion:zG,WebRPCSchemaVersion:VG,WebRPCSchemaHash:qG,ETHTxnStatus:Us,TransferType:HG,FeeTokenType:WG,SortOrder:GG,Relayer:bk});const KG=[Us.DROPPED,Us.SUCCEEDED,Us.PARTIALLY_FAILED,Us.FAILED],JG=[Us.DROPPED,Us.PARTIALLY_FAILED,Us.FAILED];function YG(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&Eo.isProvider(t.provider)}const QG=typeof global=="object"?global.fetch:window.fetch;class wk{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),QG(r,n)},this.service=new bk(e.url,this._fetch),Eo.isProvider(e.provider))this.provider=e.provider;else{const{jwtAuth:r,projectAccessKey:n}=this.options,i=au(e.provider.url,n,r);this.provider=new th(i)}}async waitReceipt(e,r=1e3,n=5,i){typeof e!="string"&&(e=ce.transaction.intendedTransactionID(e)),he.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"&&KG.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=Jr.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(", ");he.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${i}`);const s=await this.getNonce(e);if(!this.provider)throw he.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 he.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return he.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:X(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){he.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 he.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),s}async relay(e,r,n=!0){var i=this;he.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:he.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw he.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(he.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||JG.includes(a.status))throw new XG(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 XG{constructor(e){this.receipt=e}}function Ck(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 ZG=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:UG,ProviderRelayer:xk,ProviderRelayerDefaults:mk,RpcRelayer:wk,RpcRelayerProto:ec,isLocalRelayerOptions:FG,isProviderRelayerOptions:jG,isRelayer:Ck,isRpcRelayerOptions:YG,proto:ec},Symbol.toStringTag,{value:"Module"}));function Ek(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 Sk{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 sg=Object.freeze({__proto__:null,isSapientSigner:Ek,SignerWrapper:Sk});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 kk(t){return t===void 0||t.state===zs.INITIAL||t.state===zs.SIGNING}class x1{constructor(e,r=x1.randomTag()){this.tag=r,this.observers=[],this.signers=[],this.count=0,this.setSigners(e)}static randomTag(){return`default-${X(bi(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>Ek(r)?r:new Sk(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])=>kk(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;pet(e))):et(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=Z(n.suffix),s=_e(["bytes","bytes"],[n.signature,i]);e.set(r,{signature:s,isDynamic:i.length!==1||i[0]!==2})}}return e};class cu extends fo{constructor(e){if(Bt.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 cu(Ns({},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=cu.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(Ns({},r,{chainId:this.chainId,intent:{id:X(bi(32)),wallet:this.address}}))}}static buildDeployTransaction(e,r){const n=new or(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=Gp(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=Ns({},r,{digest:e,chainId:this.chainId,address:this.address,config:this.config}),s=Z(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=Ns({},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(ge(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(X(bi(12)));return ce.transaction.encodeNonce(e,0)}async signTransactions(e,r,n){const i=await E5(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=Ns({digest:a,transactions:s},n),c=await this.signDigest(a,l);return{intent:{id:Gp(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 E5(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 Ns({},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 qi(){return qi=Object.assign?Object.assign.bind():function(t){for(var e=1;etK(t[e])):!1}function nK(t){if(!t)return[];const e=V.from(t.value);switch(t.token.type){case ec.FeeTokenType.UNKNOWN:return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.to,value:e.toHexString(),data:[]}];case ec.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 or([{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 iK{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===ec.FeeTokenType.UNKNOWN){if((await this.getBalance()).gte(V.from(i.value)))return i}else if(i.token.contractAddress&&i.token.type===ec.FeeTokenType.ERC20_TOKEN&&(await new Oa(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=rK(e)?await et(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,...nK(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 sK{async isDeployed(e){return!1}async implementation(e){}async imageHash(e){}async nonce(e,r){return Bt}async isValidSignature(e,r,n){throw new Error("Method not supported.")}}class Qi{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=Ce(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||ig.DefaultMigrations,this.migrator=new ng.Migrator(e.tracker,this.migrations,this.contexts)}getSigner(e,r){return new iK(this,e,r)}static async new(e){var r;const i=new ng.Migrator(e.tracker,(r=e.migrations)!=null?r:ig.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 Qi({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 th(au(r.rpcUrl,this.projectAccessKey,this.jwt),{name:"",chainId:V.from(e).toNumber()})}reader(e){return Bt.eq(e)?new sK: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 Ck(r.relayer)?r.relayer:new wk(qi({},r.relayer,this.projectAccessKey?{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=Sr.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,i){const s=Bt.eq(e);return new cu({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=>yk.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=Sr.coderFor(y).config.checkpointOf(w);return{original:qi({},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=ge(Ve(`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=Bt.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:X(e),chainId:0,address:this.address}),n=X(r),i=this.coders.config.fromSimple({threshold:32768,checkpoint:0,signers:[],subdigests:[n]}),s=new or(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=Jr.encode(["address","bytes","bytes"],[i.entrypoint,ce.transaction.encodeBundleExecData(i),e]);return _e(["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,qi({},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=cu.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(qi({},i,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(ge(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 qi({},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=Sr.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=X(bi(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 qi({},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=Tu({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=Sr.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 Sr.genericCoderFor(l.version).config.signersOf(l).map(u=>qi({},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=>Sr.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}Sr.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 oK(t){return t instanceof Qi}const aK=Object.freeze(Object.defineProperty({__proto__:null,Account:Qi,isAccount:oK},Symbol.toStringTag,{value:"Module"}));function dh(){return dh=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),er({},n)).then(i=>tr(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),er({},n)).then(i=>tr(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),er({},n)).then(i=>tr(i).then(s=>({status:s.status}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),er({},n)).then(i=>tr(i).then(s=>({chainID:s.chainID}))),this.getEtherBalance=(n,i)=>this.fetch(this.url("GetEtherBalance"),er(n,i)).then(s=>tr(s).then(o=>({balance:o.balance}))),this.getTokenBalances=(n,i)=>this.fetch(this.url("GetTokenBalances"),er(n,i)).then(s=>tr(s).then(o=>({page:o.page,balances:o.balances}))),this.getTokenSupplies=(n,i)=>this.fetch(this.url("GetTokenSupplies"),er(n,i)).then(s=>tr(s).then(o=>({page:o.page,contractType:o.contractType,tokenIDs:o.tokenIDs}))),this.getTokenSuppliesMap=(n,i)=>this.fetch(this.url("GetTokenSuppliesMap"),er(n,i)).then(s=>tr(s).then(o=>({supplies:o.supplies}))),this.getBalanceUpdates=(n,i)=>this.fetch(this.url("GetBalanceUpdates"),er(n,i)).then(s=>tr(s).then(o=>({page:o.page,balances:o.balances}))),this.getTransactionHistory=(n,i)=>this.fetch(this.url("GetTransactionHistory"),er(n,i)).then(s=>tr(s).then(o=>({page:o.page,transactions:o.transactions}))),this.syncBalance=(n,i)=>this.fetch(this.url("SyncBalance"),er(n,i)).then(s=>tr(s).then(o=>({}))),this.fetchTransactionReceipt=(n,i)=>this.fetch(this.url("FetchTransactionReceipt"),er(n,i)).then(s=>tr(s).then(o=>({receipt:o.receipt}))),this.getOrderbookOrders=(n,i)=>this.fetch(this.url("GetOrderbookOrders"),er(n,i)).then(s=>tr(s).then(o=>({page:o.page,orders:o.orders}))),this.getTopOrders=(n,i)=>this.fetch(this.url("GetTopOrders"),er(n,i)).then(s=>tr(s).then(o=>({orders:o.orders}))),this.fetchTransactionReceiptWithFilter=(n,i)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),er(n,i)).then(s=>tr(s).then(o=>({receipt:o.receipt}))),this.getAllWebhookListeners=(n,i)=>this.fetch(this.url("GetAllWebhookListeners"),er(n,i)).then(s=>tr(s).then(o=>({listeners:o.listeners}))),this.getWebhookListener=(n,i)=>this.fetch(this.url("GetWebhookListener"),er(n,i)).then(s=>tr(s).then(o=>({listener:o.listener}))),this.addWebhookListener=(n,i)=>this.fetch(this.url("AddWebhookListener"),er(n,i)).then(s=>tr(s).then(o=>({status:o.status,listener:o.listener}))),this.updateWebhookListener=(n,i)=>this.fetch(this.url("UpdateWebhookListener"),er(n,i)).then(s=>tr(s).then(o=>({status:o.status}))),this.removeWebhookListener=(n,i)=>this.fetch(this.url("RemoveWebhookListener"),er(n,i)).then(s=>tr(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 er=(t={},e={})=>({method:"POST",headers:dh({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),tr=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}),k5=typeof global=="object"?global.fetch:window.fetch;class _k extends Ak{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,k5),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=dh({},s.headers,o),k5(i,s)},this.fetch=this._fetch}}const xK=Object.freeze(Object.defineProperty({__proto__:null,ContractType:uK,EventLogDataType:hK,EventLogType:dK,Indexer:Ak,OrderStatus:vK,SequenceIndexer:_k,SortOrder:mK,TransactionStatus:pK,TransactionType:gK,TxnTransferType:yK,WebRPCSchemaHash:fK,WebRPCSchemaVersion:cK,WebRPCVersion:lK},Symbol.toStringTag,{value:"Module"}));function fu(){return fu=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),ke({},n)).then(i=>Ae(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),ke({},n)).then(i=>Ae(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),ke({},n)).then(i=>Ae(i).then(s=>({status:s.status}))),this.getTokenMetadata=(n,i)=>this.fetch(this.url("GetTokenMetadata"),ke(n,i)).then(s=>Ae(s).then(o=>({tokenMetadata:o.tokenMetadata}))),this.refreshTokenMetadata=(n,i)=>this.fetch(this.url("RefreshTokenMetadata"),ke(n,i)).then(s=>Ae(s).then(o=>({taskId:o.taskId}))),this.enqueueTokensForRefresh=(n,i)=>this.fetch(this.url("EnqueueTokensForRefresh"),ke(n,i)).then(s=>Ae(s).then(o=>({taskId:o.taskId}))),this.getTokenRefreshStatus=(n,i)=>this.fetch(this.url("GetTokenRefreshStatus"),ke(n,i)).then(s=>Ae(s).then(o=>({status:o.status}))),this.getTokenRefreshResult=(n,i)=>this.fetch(this.url("GetTokenRefreshResult"),ke(n,i)).then(s=>Ae(s).then(o=>({status:o.status,tokens:o.tokens,failureReasons:o.failureReasons}))),this.cancelRefreshJob=(n,i)=>this.fetch(this.url("CancelRefreshJob"),ke(n,i)).then(s=>Ae(s).then(o=>({ok:o.ok}))),this.getTokenMetadataBatch=(n,i)=>this.fetch(this.url("GetTokenMetadataBatch"),ke(n,i)).then(s=>Ae(s).then(o=>({contractTokenMetadata:o.contractTokenMetadata}))),this.searchTokenMetadata=(n,i)=>this.fetch(this.url("SearchTokenMetadata"),ke(n,i)).then(s=>Ae(s).then(o=>({page:o.page,tokenMetadata:o.tokenMetadata}))),this.searchTokenIDs=(n,i)=>this.fetch(this.url("SearchTokenIDs"),ke(n,i)).then(s=>Ae(s).then(o=>({page:o.page,tokenIds:o.tokenIds}))),this.tokenCollectionFilters=(n,i)=>this.fetch(this.url("TokenCollectionFilters"),ke(n,i)).then(s=>Ae(s).then(o=>({filters:o.filters}))),this.getContractInfo=(n,i)=>this.fetch(this.url("GetContractInfo"),ke(n,i)).then(s=>Ae(s).then(o=>({contractInfo:o.contractInfo}))),this.getContractInfoBatch=(n,i)=>this.fetch(this.url("GetContractInfoBatch"),ke(n,i)).then(s=>Ae(s).then(o=>({contractInfoMap:o.contractInfoMap}))),this.searchContractInfo=(n,i)=>this.fetch(this.url("SearchContractInfo"),ke(n,i)).then(s=>Ae(s).then(o=>({contractInfoList:o.contractInfoList}))),this.searchContractInfoBatch=(n,i)=>this.fetch(this.url("SearchContractInfoBatch"),ke(n,i)).then(s=>Ae(s).then(o=>({contractInfoByChain:o.contractInfoByChain}))),this.searchMetadata=(n,i)=>this.fetch(this.url("SearchMetadata"),ke(n,i)).then(s=>Ae(s).then(o=>({tokenMetadata:o.tokenMetadata,contractInfo:o.contractInfo}))),this.getNiftyswapTokenQuantity=(n,i)=>this.fetch(this.url("GetNiftyswapTokenQuantity"),ke(n,i)).then(s=>Ae(s).then(o=>({quantity:o.quantity}))),this.getNiftyswapUnitPrices=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPrices"),ke(n,i)).then(s=>Ae(s).then(o=>({prices:o.prices}))),this.getNiftyswapUnitPricesWithQuantities=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPricesWithQuantities"),ke(n,i)).then(s=>Ae(s).then(o=>({prices:o.prices}))),this.addContractToMintMonitor=(n,i)=>this.fetch(this.url("AddContractToMintMonitor"),ke(n,i)).then(s=>Ae(s).then(o=>({ok:o.ok}))),this.removeContractFromMintMonitor=(n,i)=>this.fetch(this.url("RemoveContractFromMintMonitor"),ke(n,i)).then(s=>Ae(s).then(o=>({ok:o.ok}))),this.mintMonitorJobStatus=(n,i)=>this.fetch(this.url("MintMonitorJobStatus"),ke(n,i)).then(s=>Ae(s).then(o=>({task:o.task}))),this.mintMonitorTriggerJob=(n,i)=>this.fetch(this.url("MintMonitorTriggerJob"),ke(n,i)).then(s=>Ae(s).then(o=>({ok:o.ok}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}class Pk{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Collections/",this.createCollection=(n,i)=>this.fetch(this.url("CreateCollection"),ke(n,i)).then(s=>Ae(s).then(o=>({collection:o.collection}))),this.getCollection=(n,i)=>this.fetch(this.url("GetCollection"),ke(n,i)).then(s=>Ae(s).then(o=>({collection:o.collection}))),this.listCollections=(n,i)=>this.fetch(this.url("ListCollections"),ke(n,i)).then(s=>Ae(s).then(o=>({page:o.page,collections:o.collections}))),this.updateCollection=(n,i)=>this.fetch(this.url("UpdateCollection"),ke(n,i)).then(s=>Ae(s).then(o=>({collection:o.collection}))),this.deleteCollection=(n,i)=>this.fetch(this.url("DeleteCollection"),ke(n,i)).then(s=>Ae(s).then(o=>({status:o.status}))),this.publishCollection=(n,i)=>this.fetch(this.url("PublishCollection"),ke(n,i)).then(s=>Ae(s).then(o=>({collection:o.collection}))),this.unpublishCollection=(n,i)=>this.fetch(this.url("UnpublishCollection"),ke(n,i)).then(s=>Ae(s).then(o=>({collection:o.collection}))),this.createToken=(n,i)=>this.fetch(this.url("CreateToken"),ke(n,i)).then(s=>Ae(s).then(o=>({token:o.token,assets:o.assets}))),this.getToken=(n,i)=>this.fetch(this.url("GetToken"),ke(n,i)).then(s=>Ae(s).then(o=>({token:o.token,assets:o.assets}))),this.listTokens=(n,i)=>this.fetch(this.url("ListTokens"),ke(n,i)).then(s=>Ae(s).then(o=>({page:o.page,tokens:o.tokens}))),this.updateToken=(n,i)=>this.fetch(this.url("UpdateToken"),ke(n,i)).then(s=>Ae(s).then(o=>({token:o.token}))),this.deleteToken=(n,i)=>this.fetch(this.url("DeleteToken"),ke(n,i)).then(s=>Ae(s).then(o=>({status:o.status}))),this.createAsset=(n,i)=>this.fetch(this.url("CreateAsset"),ke(n,i)).then(s=>Ae(s).then(o=>({asset:o.asset}))),this.getAsset=(n,i)=>this.fetch(this.url("GetAsset"),ke(n,i)).then(s=>Ae(s).then(o=>({asset:o.asset}))),this.updateAsset=(n,i)=>this.fetch(this.url("UpdateAsset"),ke(n,i)).then(s=>Ae(s).then(o=>({asset:o.asset}))),this.deleteAsset=(n,i)=>this.fetch(this.url("DeleteAsset"),ke(n,i)).then(s=>Ae(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 ke=(t={},e={})=>({method:"POST",headers:fu({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Ae=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}),hh=typeof global=="object"?global.fetch:window.fetch;class Ik extends Tk{constructor(e="https://metadata.sequence.app",r,n){super(e.endsWith("/")?e.slice(0,-1):e,hh),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=fu({},s.headers,o),hh(i,s)},this.fetch=this._fetch}}class _K extends Pk{constructor(e="https://metadata.sequence.app",r){super(e.endsWith("/")?e.slice(0,-1):e,hh),this.jwtAuth=r,this._fetch=(n,i)=>{const s={},o=this.jwtAuth;return o&&o.length>0&&(s.Authorization=`BEARER ${o}`),i.headers=fu({},i.headers,s),hh(n,i)},this.fetch=this._fetch}}const TK=Object.freeze(Object.defineProperty({__proto__:null,Collections:Pk,ContractType:EK,Metadata:Tk,PropertyType:SK,SequenceCollections:_K,SequenceMetadata:Ik,SwapType:kK,TaskStatus:AK,WebRPCSchemaHash:CK,WebRPCSchemaVersion:wK,WebRPCVersion:bK},Symbol.toStringTag,{value:"Module"}));function PK(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function IK(t){return t.startsWith("ipfs://")}class RK{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 NK(MK(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=X(await(i||new OK).resolve(o));if(!a||a==="")throw new Error("EIP5719 - Empty alternative signature");if(a===X(n))throw new Error("EIP5719 - Alternative signature is invalid or the same");return Rk(t,e,r,a,i,s+1)}class OK{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.gateway=e,this.uri=n=>IK(n)?PK(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 $K=(t,e)=>e.some(r=>t instanceof r);let A5,_5;function DK(){return A5||(A5=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function BK(){return _5||(_5=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Mk=new WeakMap,og=new WeakMap,Nk=new WeakMap,Yv=new WeakMap,ob=new WeakMap;function LK(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&&Mk.set(r,t)}).catch(()=>{}),ob.set(e,t),e}function jK(t){if(og.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)});og.set(t,e)}let ag={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return og.get(t);if(e==="objectStoreNames")return t.objectStoreNames||Nk.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 FK(t){ag=t(ag)}function UK(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(Qv(this),e,...r);return Nk.set(n,e.sort?e.sort():[e]),ro(n)}:BK().includes(t)?function(...e){return t.apply(Qv(this),e),ro(Mk.get(this))}:function(...e){return ro(t.apply(Qv(this),e))}}function zK(t){return typeof t=="function"?UK(t):(t instanceof IDBTransaction&&jK(t),$K(t,DK())?new Proxy(t,ag):t)}function ro(t){if(t instanceof IDBRequest)return LK(t);if(Yv.has(t))return Yv.get(t);const e=zK(t);return e!==t&&(Yv.set(t,e),ob.set(e,t)),e}const Qv=t=>ob.get(t);function VK(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 qK=["get","getKey","getAll","getAllKeys","count"],HK=["put","add","delete","clear"],Xv=new Map;function T5(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Xv.get(e))return Xv.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=HK.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||qK.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 Xv.set(e,s),s}FK(t=>({...t,get:(e,r,n)=>T5(e,r)||t.get(e,r,n),has:(e,r)=>!!T5(e,r)||t.has(e,r)}));class WK{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 GK=Object.freeze({__proto__:null,ConfigTracker:WK});class KK{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),Fr(e,"? "),Fr(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),Fr(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),Fr(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),Fr(e,"? "),Fr(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),Fr(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),Fr(e,"? "),Fr(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),Fr(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),Fr(e,"? "),Fr(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,i){return console.debug("? getMigration"),Fr({address:e,fromImageHash:r,fromVersion:n,chainId:i},"? "),Fr(await this.tracker.getMigration(e,r,n,i),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),Fr({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function Fr(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 JK=Object.freeze({__proto__:null,DebugConfigTracker:KK});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 Nl(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=>Nl(i)):typeof n=="object"&&n!==null?e[r]=Nl(n):e[r]=n}return e}class YK{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=>Nl(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=>Nl(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=>Nl(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 VK(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 $k(t){return t.left!==void 0&&t.right!==void 0}function Dk(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function lg(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var QK=Object.freeze({__proto__:null,isPlainNode:$k,isPlainNested:Dk,isPlainV2Config:lg,MemoryTrackerStore:Ok,recreateBigNumbers:Nl,IndexedDBStore:YK});class ab{constructor(e,r=new Ok,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($k(o)){const[a,l]=await Promise.all([i.loadTopology(o.left),i.loadTopology(o.right)]);return{left:a,right:l}}return Dk(o)?{weight:V.from(o.weight),threshold:V.from(o.threshold),tree:await i.loadTopology(o.tree)}:o},this.saveTopology=async function(s){if(Pe.config.isNodeLeaf(s))return;const o=Pe.config.hashNode(s);if(Pe.config.isNode(s)){const a=i.saveTopology(s.left),l=i.saveTopology(s.right),c=i.store.saveV2Node(o,{left:Pe.config.hashNode(s.left),right:Pe.config.hashNode(s.right)});await Promise.all([a,l,c]);return}if(Pe.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:Pe.config.hashNode(s.tree)});await Promise.all([a,l]);return}if(Pe.config.isSignerLeaf(s))return i.store.saveV2Node(o,{address:s.address,weight:s.weight});if(Pe.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(Ki.config.ConfigCoder.isWalletConfig(o)){const a=Ki.config.ConfigCoder.imageHashOf(o);return i.store.saveConfig(a,o)}if(Pe.config.ConfigCoder.isWalletConfig(o)){const a=Pe.config.ConfigCoder.imageHashOf(o);if(Pe.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&&!lg(a))return i.configOfImageHashCache[s.imageHash]=a,a;if(lg(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=Sr.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=Pe.signature.SignatureCoder.decode(s.signature),a=Sr.genericCoderFor(s.nextConfig.version).config.imageHashOf(s.nextConfig),l=Pe.chained.messageSetImageHash(a),c=ge(l),f={message:l,address:s.wallet,chainId:0,digest:c},u=i.savePayload({payload:f}),h=i.saveWalletConfig({config:s.nextConfig}),y=await Pe.signature.SignatureCoder.recover(o,f,i.provider),g=Pe.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||!Pe.config.ConfigCoder.isWalletConfig(c))return[];const f=Pe.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:Pe.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||!Pe.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 ee=await i.store.loadSignatureOfSubdigest(G,z.subdigest);if(!ee)return[G,void 0];const oe=X(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(G,z.subdigest,ee):ee),D=ce.signer.tryRecoverSigner(z.subdigest,oe)!==G;return[G,{isDynamic:D,signature:oe}]}))).filter(G=>!!G[1]));if(F.size===0)continue;const W=Pe.signature.SignatureCoder.encodeSigners(c,F,[],0);W.weight.lt(c.threshold)||(p={nextImageHash:j,checkpoint:V.from(I.checkpoint),signature:W.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:X(h)}})}return l},this.cachedEIP5719=new RK(e)}async saveMigration(e,r,n){const i=r.fromVersion;if(i!==1)throw new Error("Migration not supported");if(!Pe.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:s,address:o}=gk.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(Pe.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=ge(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=Ki.signature.SignatureCoder.decode(r.tx.signature),g=await Ki.signature.SignatureCoder.recover(y,c,this.provider),p=Ki.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=Sr.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=X(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 XK=Object.freeze({__proto__:null,LocalConfigTracker:ab});let Zv=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class ZK{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Sessions/",this.ping=n=>this.fetch(this.url("Ping"),qn({},n)).then(i=>Hn(i).then(s=>({}))),this.config=(n,i)=>this.fetch(this.url("Config"),qn(n,i)).then(s=>Hn(s).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,i)=>this.fetch(this.url("Wallets"),qn(n,i)).then(s=>Hn(s).then(o=>({wallets:o.wallets}))),this.deployHash=(n,i)=>this.fetch(this.url("DeployHash"),qn(n,i)).then(s=>Hn(s).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,i)=>this.fetch(this.url("ConfigUpdates"),qn(n,i)).then(s=>Hn(s).then(o=>({updates:o.updates}))),this.migrations=(n,i)=>this.fetch(this.url("Migrations"),qn(n,i)).then(s=>Hn(s).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,i)=>this.fetch(this.url("SaveConfig"),qn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveWallet=(n,i)=>this.fetch(this.url("SaveWallet"),qn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveSignature=(n,i)=>this.fetch(this.url("SaveSignature"),qn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveSignerSignatures=(n,i)=>this.fetch(this.url("SaveSignerSignatures"),qn(n,i)).then(s=>Hn(s).then(o=>({}))),this.saveMigration=(n,i)=>this.fetch(this.url("SaveMigration"),qn(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 qn=(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 eJ{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=void 0,this.sessions=new ZK(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(ey(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=Sr.genericCoderFor(r.version).config.imageHashOf(r),i=Pe.signature.setImageHashStruct(n),s=ge(i);await this.sessions.saveSignature({wallet:e.wallet,digest:s,chainID:"0",signature:e.signature,toConfig:bd(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 tJ(r,n)}catch(r){if(ey(r))return;throw r}}async saveWalletConfig(e){const r=bd(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(ey(r))return;throw r}}async saveCounterfactualWallet(e){const r=bd(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 Zv.EIP712:a+=X(ce.signer.SigType.EIP712).slice(2);break;case Zv.EthSign:a+=X(ce.signer.SigType.ETH_SIGN).slice(2);break;case Zv.EIP1271:a+=X(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:bd(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(rJ),nonce:vl(r.tx.nonce),signature:r.tx.signature,chainID:vl(r.tx.chainId)})}}function bd(t){switch(t.version){case 1:if(Ki.config.ConfigCoder.isWalletConfig(t))return{threshold:ta(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:ta(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(Pe.config.ConfigCoder.isWalletConfig(t))return{threshold:ta(t.threshold),checkpoint:ta(t.checkpoint),tree:Qd(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function Qd(t){return Pe.config.isNode(t)?{left:Qd(t.left),right:Qd(t.right)}:Pe.config.isSignerLeaf(t)?{weight:ta(t.weight),address:t.address}:Pe.config.isNestedLeaf(t)?{weight:ta(t.weight),threshold:ta(t.threshold),tree:Qd(t.tree)}:Pe.config.isNodeLeaf(t)?{node:t.nodeHash}:vo({},t)}function tJ(t,e){switch(t){case 1:return vo({},e,{version:t});case 2:return vo({},e,{version:t,tree:Xd(e.tree)});default:throw new Error(`unknown version ${t}`)}}function Xd(t){switch(typeof t){case"object":const e=vo({},t);return e.left!==void 0&&(e.left=Xd(e.left)),e.right!==void 0&&(e.right=Xd(e.right)),e.tree!==void 0&&(e.tree=Xd(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 rJ(t){return{to:t.to,value:t.value!==void 0?vl(t.value):void 0,data:t.data!==void 0?X(t.data):void 0,gasLimit:t.gasLimit!==void 0?vl(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function ta(t){return V.from(t).toNumber()}function vl(t){return V.from(t).toString()}function ey(t){return typeof t=="object"&&t.status===404}var nJ=Object.freeze({__proto__:null,RemoteConfigTracker:eJ});function cg(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 Jc(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class iJ{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 cg(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:Sr.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 ab(void 0),s=await Jc(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 cg(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 Jc(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 Jc(this.trackers.map(l=>l.loadPresignedConfiguration(e)),[]),s=(await Jc(n.map(async function(l){const c=l[l.length-1],f=await r.configOfImageHash({imageHash:c.nextImageHash});if(f)return{checkpoint:Sr.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 sJ{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 P5{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...i){e=`${e}:${ge(Ve(JSON.stringify(i,oJ)))}`;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 oJ(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function aJ(t){return t instanceof Bk}class Bk{constructor(e,r=50,n=!1){this.tracker=e,this.window=r,this.verbose=n,this.cache=new P5}invalidateCache(){this.cache=new P5}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 ab&&this.tracker.updateProvider(e)}}var lb=Object.freeze({__proto__:null,debug:JK,local:XK,remote:nJ,stores:QK,raceUntil:cg,allSafe:Jc,MultipleTracker:iJ,CachedTracker:sJ,isDedupedTracker:aJ,DedupedTracker:Bk});const lJ=Object.freeze(Object.defineProperty({__proto__:null,tracker:GK,trackers:lb},Symbol.toStringTag,{value:"Module"})),Lk=60*60*24*7,cJ=60;class I5{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:Lk,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 Wd(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 ih,n=V.from(this.settings.sequenceApiChainId),i=si(this.account.networks,n);if(!i)throw Error("No network found");return r.chainId=n.toNumber(),r.provider=new th(au(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 Wd(r,void 0,n)}return this.apiClient}async getMetadataClient(e=!0){if(!this.metadataClient){const r=(await this.getJWT(e)).token;this.metadataClient=new Ik(this.settings.sequenceMetadataUrl,void 0,r)}return this.metadataClient}async getIndexerClient(e,r=!0){const n=si(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 _k(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 jk=async(t,e,r)=>{const n=Ce(await t.getAddress());if(!n||n===""||n==="0x")throw Fk;const i=new Nx;if(i.address=n,!r||!r.app||r.app==="")throw new cb("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):Lk);const s=i.messageTypedData(),o=kS(e);i.signature=await(t instanceof Qi?t.signTypedData(s.domain,s.types,s.message,o,"eip6492"):t.signTypedData(s.domain,s.types,s.message,o));const l=await new ih().encodeProof(i,!0);return{typedData:s,proofString:l}};class cb extends Error{constructor(e){super(e),this.name="AuthError"}}const Fk=new cb("auth error: account address is empty");function Jo(){return Jo=Object.assign?Object.assign.bind():function(t){for(var e=1;eG.wallet));let F;if(z){if(u==null||u(z),F=new Qi({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=>fg.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||(N=>N));if(C.some(N=>fg.includes(N)))throw Error(`Failed to sign migrations on ${C.join(", ")}`);lb.isDedupedTracker(A)&&A.invalidateCache();let P;if([P,G]=await Promise.all([F.isMigratedAllChains().then(N=>N.migratedAllChains),F.status(M)]),!P)throw Error("Failed to migrate account")}}G.onChain.version!==G.version&&await F.doBootstrap(M,void 0,G);const ee=G.config,oe=F.coders.config.editConfig(ee,{add:c,threshold:l});if(F.coders.config.imageHashOf(ee)!==F.coders.config.imageHashOf(oe)){const D=F.coders.config.editConfig(oe,{checkpoint:F.coders.config.checkpointOf(ee).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 Qi.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(ee=>ee.wallet===F.address))throw Error("Account not found on tracker")}let W;return I&&(W=new I5(F,I),W.auth(),W.onAuth(G=>{G.status==="fulfilled"&&F.setJwt(G.value)})),new _f(E,w,F,W)}static async load(e){const{dump:r,settings:n,editConfigOnMigration:i,onMigration:s,orchestrator:o}=e,{contexts:a,networks:l,tracker:c,services:f}=Jo({},Zd,n);let u;if(Uk(r)){var h,y,g;const I=r.config.address||ce.context.addressOf(a[1],Ki.config.ConfigCoder.imageHashOf(Jo({},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(zk(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)}},uJ=Object.freeze(Object.defineProperty({__proto__:null,AuthError:cb,CRITICAL_CHAINS:fg,ErrAccountIsRequired:Fk,Session:_f,SessionSettingsDefault:Zd,ValidateSequenceWalletProof:fJ,isSessionDumpV1:Uk,isSessionDumpV2:zk,signAuthorization:jk},Symbol.toStringTag,{value:"Module"}));function vh(){return vh=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Ur({},n)).then(i=>zr(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Ur({},n)).then(i=>zr(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Ur({},n)).then(i=>zr(i).then(s=>({status:s.status}))),this.getSignerConfig=(n,i)=>this.fetch(this.url("GetSignerConfig"),Ur(n,i)).then(s=>zr(s).then(o=>({signerConfig:o.signerConfig}))),this.sign=(n,i)=>this.fetch(this.url("Sign"),Ur(n,i)).then(s=>zr(s).then(o=>({sig:o.sig}))),this.signWith=(n,i)=>this.fetch(this.url("SignWith"),Ur(n,i)).then(s=>zr(s).then(o=>({sig:o.sig}))),this.authMethods=(n,i)=>this.fetch(this.url("AuthMethods"),Ur(n,i)).then(s=>zr(s).then(o=>({methods:o.methods,active:o.active}))),this.setPIN=(n,i)=>this.fetch(this.url("SetPIN"),Ur(n,i)).then(s=>zr(s).then(o=>({}))),this.resetPIN=(n,i)=>this.fetch(this.url("ResetPIN"),Ur(n,i)).then(s=>zr(s).then(o=>({}))),this.createTOTP=(n,i)=>this.fetch(this.url("CreateTOTP"),Ur(n,i)).then(s=>zr(s).then(o=>({uri:o.uri}))),this.commitTOTP=(n,i)=>this.fetch(this.url("CommitTOTP"),Ur(n,i)).then(s=>zr(s).then(o=>({codes:o.codes}))),this.resetTOTP=(n,i)=>this.fetch(this.url("ResetTOTP"),Ur(n,i)).then(s=>zr(s).then(o=>({}))),this.reset2FA=(n,i)=>this.fetch(this.url("Reset2FA"),Ur(n,i)).then(s=>zr(s).then(o=>({}))),this.recoveryCodes=(n,i)=>this.fetch(this.url("RecoveryCodes"),Ur(n,i)).then(s=>zr(s).then(o=>({codes:o.codes}))),this.resetRecoveryCodes=(n,i)=>this.fetch(this.url("ResetRecoveryCodes"),Ur(n,i)).then(s=>zr(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 Ur=(t={},e={})=>({method:"POST",headers:vh({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),zr=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}),hJ=typeof global=="object"?global.fetch:window.fetch;class vJ{constructor(e,r,n=!1){this.address=e,this.url=r,this.appendSuffix=n,this.guard=void 0,this.guard=new dJ(r,hJ)}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=Sr.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:X(e),auxData:this.packMsgAndSig(r.address,r.digest,o,r.chainId),chainId:V.from(r.chainId).toNumber()},token:i?{id:yh.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 ug(e);r=await this.guard.authMethods({proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}return vh({},r,{methods:r.methods.map(yJ)})}async setPin(e,r){const n=await jc(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 jc(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 jc(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 ug(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 jc(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 jc(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 Jr.encode(["address","uint256","bytes","bytes"],[e,i,r,n])}suffix(){return this.appendSuffix?[3]:[]}}let yh=function(t){return t.PIN="PIN",t.TOTP="TOTP",t}({});function yJ(t){switch(t){case yh.PIN:case yh.TOTP:return t;default:throw new Error(`unknown auth method '${t}'`)}}function Vk(t){return"signerAddress"in t&&typeof t.signerAddress=="string"}async function ug(t){if(Vk(t))return t;{const e=sg.isSapientSigner(t.signer)?t.signer:new sg.SignerWrapper(t.signer),r=await e.getAddress(),n=new Date,i=qk(t.walletAddress,n),s=Tu(i);return{walletAddress:t.walletAddress,timestamp:n,signerAddress:r,signature:X(await e.sign(s,{}))}}}async function jc(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 qk(t,e){return{domain:Wk,types:{AuthMethods:[{name:"wallet",type:"address"},{name:"timestamp",type:"string"}]},message:{wallet:Ce(t),timestamp:Gk(e)}}}function Hk(t){return{domain:Wk,types:{AuthUpdate:[{name:"timestamp",type:"string"}]},message:{timestamp:Gk(t)}}}const Wk={name:"Sequence Guard",version:"1",chainId:1};function Gk(t){return t.toUTCString().replace("GMT","UTC")}const pJ=Object.freeze(Object.defineProperty({__proto__:null,AuthMethod:yh,GuardSigner:vJ,getAuthUpdateProofTypedData:Hk,getOwnershipProofTypedData:qk,isSignedOwnershipProof:Vk,signOwnershipProof:ug},Symbol.toStringTag,{value:"Module"}));function ph(){return ph=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]=R5(a,y=>{try{if(y.next!==i)return!1;switch(y.request.method){case cr.ethCall:if(y.request.params[0].from||y.request.params[0].gasPrice||y.request.params[0].value)return!1;case cr.ethGetBalance:case cr.ethGetCode:const g=mJ(y.request.params[1]);if(s===void 0&&(s=g),!xJ(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 cr.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 cr.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 cr.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]=R5(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=Fx(),u=await gJ(jx(i)({id:f,jsonrpc:Zl,method:cr.ethCall,params:[{to:r.options.contract,value:0,data:c},V.isBigNumber(s)?s.toNumber():s]}),y=>({jsonrpc:Zl,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 cr.ethCall:y.callback(void 0,{jsonrpc:y.request.jsonrpc,id:y.request.id,result:h[1][g]});break;case cr.ethGetCode:y.callback(void 0,{jsonrpc:y.request.jsonrpc,id:y.request.id,result:Jr.decode(["bytes"],h[1][g])[0]});break;case cr.ethGetBalance:y.callback(void 0,{jsonrpc:y.request.jsonrpc,id:y.request.id,result:Jr.decode(["uint256"],h[1][g])[0]});break}})},this.options=e?ph({},Mn.DefaultOptions,e):Mn.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&&Mn.isMulticallOptions(e.options)}static isMulticallOptions(e){return e!==void 0&&e.batchSize!==void 0&&e.timeWindow!==void 0&&e.contract!==void 0}}Mn.DefaultOptions=ph({},bJ);const Kk=["getNetwork","getBlockNumber","getGasPrice","getTransactionCount","getStorageAt","sendTransaction","estimateGas","getBlock","getTransaction","getTransactionReceipt","getLogs","emit","litenerCount","addListener","removeListener","waitForTransaction","detectNetwork","getBlockWithTransactions"];class wJ extends Ix{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 Lp(n,o.address,o.name):null}return s.getResolver(await i)},this.next=async function(i,s){try{switch(i.method){case cr.ethCall:n.callback(i,s,await n.provider.call(i.params[0],i.params[1]));break;case cr.ethGetCode:n.callback(i,s,await n.provider.getCode(i.params[0],i.params[1]));break;case cr.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=Mn.isMulticall(r)?r:new Mn(r),Kk.forEach(i=>{e[i]!==void 0&&(this[i]=(...s)=>e[i](...s))})}callback(e,r,n,i){r(i,{jsonrpc:Zl,id:e.id,result:n,error:i})}async call(e,r){return this.rpcCall(cr.ethCall,e,r)}async getCode(e,r){return this.rpcCall(cr.ethGetCode,e,r)}async getBalance(e,r){return this.rpcCall(cr.ethGetBalance,e,r)}async rpcCall(e,...r){const n=Fx();return(await jx(this.multicall.handle)(this.next,{jsonrpc:Zl,id:n,method:e,params:r})).result}}class CJ{constructor(e,r){if(this.provider=e,this.multicall=void 0,this.multicall=Mn.isMulticall(r)?r:new Mn(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 EJ=t=>e=>{const r=Mn.isMulticall(t)?t:new Mn(t);return(n,i)=>r.handle(e,n,i)};var SJ=Object.freeze({__proto__:null,ProxyMethods:Kk,MulticallProvider:wJ,MulticallExternalProvider:CJ,multicallMiddleware:EJ});const kJ=Object.freeze(Object.defineProperty({__proto__:null,Multicall:Mn,providers:SJ},Symbol.toStringTag,{value:"Module"}));var Jk={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(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=_[O],$.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,O,B;function U(te){throw Error('Invalid "'+m+'" option value'+(te?". Reason: "+te:""))}for(var H=0;H<$;H++){if(m=_[H],!b&&!n.call(T,m))throw Error('Unknown "'+m+'" option');O=x[m],O!==r&&(B=R[m],d[m]=B?B(O,U):O)}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 _,O=R;O-- >0;)if(m===x[O])return _;$(T)}}var M=I(["function"]),j=I(["object","function"]);function z(x,T,R){var b,d,_=0,$,m=new x(function(O,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 H(){d&&(d=null),_&&(clearTimeout(_),_=0)}var te=function(L){H(),O(L)},K=function(L){H(),B(L)};b?T(te,K,U):(d=[function(L){K(L||Error("canceled"))}],T(te,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(O){if(d){for(var B=d.length,U=1;U0;)K=pe[m],K!=="_listeners"&&(Ke=W(x,T,R[K],b+1,d),Ke&&(te?te.push.apply(te,Ke):te=Ke));return te}else if(ve==="**"){for(ie=b+1===d||b+2===d&&de==="*",ie&&R._listeners&&(te=W(x,T,R,d,d)),pe=u(R),m=pe.length;m-- >0;)K=pe[m],K!=="_listeners"&&(K==="*"||K==="**"?(R[K]._listeners&&!ie&&(Ke=W(x,T,R[K],d,d),Ke&&(te?te.push.apply(te,Ke):te=Ke)),Ke=W(x,T,R[K],b,d)):K===de?Ke=W(x,T,R[K],b+2,d):Ke=W(x,T,R[K],b,d),Ke&&(te?te.push.apply(te,Ke):te=Ke));return te}else R[ve]&&(te=W(x,T,R[ve],b+1,d));if(L=R["*"],L&&W(x,T,L,b+1,d),ne=R["**"],ne)if(b0;)K=pe[m],K!=="_listeners"&&(K===de?W(x,T,ne[K],b+2,d):K===ve?W(x,T,ne[K],b+1,d):(Q={},Q[K]=ne[K],W(x,T,{"**":Q},b+1,d)));else ne._listeners?W(x,T,ne,d,d):ne["*"]&&ne["*"]._listeners&&W(x,T,ne["*"],d,d);return te}function G(x,T,R){var b=0,d=0,_,$=this.delimiter,m=$.length,O;if(typeof x=="string")if((_=x.indexOf($))!==-1){O=new Array(5);do O[b++]=x.slice(d,_),d=_+m;while((_=x.indexOf($,d))!==-1);O[b++]=x.slice(d)}else O=[x],b=1;else O=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 ee(x,T,R,b){for(var d=u(x),_=d.length,$,m,O,B=x._listeners,U;_-- >0;)m=d[_],$=x[m],m==="_listeners"?O=R:O=R?R.concat(m):[m],U=b||typeof m=="symbol",B&&T.push(U?O:O.join(this.delimiter)),typeof $=="object"&&ee.call(this,$,T,O,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,O=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,H=this.event;return d?_?Promise.resolve():new Promise(function(te){f(te)}).then(function(){return U.event=H,m.apply(U,B)}):(_?process.nextTick:f)(function(){U.event=H,m.apply(U,B)})},T._async=!0,T._origin=O}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),O;m===-1?O=new w(b,x,R):O=b._observers[m];for(var B=u(_),U=B.length,H,te=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(O-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=W.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=[],O=typeof x=="string"?x.split(this.delimiter):x.slice();return W.call(this,m,O,$,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?ee.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 W.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 O=T.filter;if(!(O&&!O.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 O=function(){B&&x.removeListener("error",B),d(p.apply(null,arguments))},B;T!=="error"&&(B=function(U){x.removeListener(T,O),_(U)},x.once("error",B)),$(function(){B&&x.removeListener("error",B),x.removeListener(T,O)}),x.once(T,O)},{timeout:R.timeout,overload:R.overload})}var N=C.prototype;Object.defineProperties(C,{defaultMaxListeners:{get:function(){return N._maxListeners},set:function(x){if(typeof x!="number"||x<0||Number.isNaN(x))throw TypeError("n must be a non-negative number");N._maxListeners=x},enumerable:!0},once:{value:P,writable:!0,configurable:!0}}),Object.defineProperties(N,{_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})()})(Jk);var b1=Jk.exports;function AJ(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function fb(t,...e){if(!AJ(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function M5(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 _J(t,e){fb(t);const r=e.outputLen;if(t.lengthnew DataView(t.buffer,t.byteOffset,t.byteLength),fi=(t,e)=>t<<32-e|t>>>e;new Uint8Array(new Uint32Array([287454020]).buffer)[0];const TJ=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function PJ(t){fb(t);let e="";for(let r=0;rt().update(Yk(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function NJ(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)}const OJ=(t,e,r)=>t&e^~t&r,$J=(t,e,r)=>t&e^t&r^e&r;class DJ extends RJ{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=ty(this.buffer)}update(e){M5(this);const{view:r,buffer:n,blockLen:i}=this;e=Yk(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;u>>3,p=fi(y,17)^fi(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=fi(a,6)^fi(a,11)^fi(a,25),y=f+h+OJ(a,l,c)+BJ[u]+_s[u]|0,p=(fi(n,2)^fi(n,13)^fi(n,22))+$J(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 jJ=MJ(()=>new LJ);var FJ=class{constructor(t,e){De(this,"hostname");De(this,"fetch");De(this,"path","/rpc/Databeat/");De(this,"ping",(t,e)=>this.fetch(this.url("Ping"),Fc({},t,e)).then(r=>Uc(r).then(n=>({status:n.status})),r=>{throw Qa.new({cause:`fetch(): ${r.message||""}`})}));De(this,"version",(t,e)=>this.fetch(this.url("Version"),Fc({},t,e)).then(r=>Uc(r).then(n=>({version:n.version})),r=>{throw Qa.new({cause:`fetch(): ${r.message||""}`})}));De(this,"runtimeStatus",(t,e)=>this.fetch(this.url("RuntimeStatus"),Fc({},t,e)).then(r=>Uc(r).then(n=>({status:n.status})),r=>{throw Qa.new({cause:`fetch(): ${r.message||""}`})}));De(this,"tick",(t,e,r)=>this.fetch(this.url("Tick"),Fc(t,e,r)).then(n=>Uc(n).then(i=>({ok:i.ok})),n=>{throw Qa.new({cause:`fetch(): ${n.message||""}`})}));De(this,"rawEvents",(t,e,r)=>this.fetch(this.url("RawEvents"),Fc(t,e,r)).then(n=>Uc(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}},Fc=(t={},e={},r=null)=>({method:"POST",headers:{...e,"Content-Type":"application/json"},body:JSON.stringify(t||{}),signal:r}),Uc=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let i="";throw n instanceof Error&&(i=n.message),nA.new({status:t.status,cause:`JSON.parse(): ${i}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(nY[n]||vr).new(r)}return r}),vr=class Qk extends Error{constructor(r,n,i,s,o){super(i);De(this,"name");De(this,"code");De(this,"message");De(this,"status");De(this,"cause");De(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,Qk.prototype)}static new(r){return new this(r.error,r.code,r.message||r.msg,r.status,r.cause)}},UJ=class Xk extends vr{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Xk.prototype)}},Qa=class Zk extends vr{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,Zk.prototype)}},zJ=class eA extends vr{constructor(e="WebrpcBadRoute",r=-2,n="bad route",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,eA.prototype)}},VJ=class tA extends vr{constructor(e="WebrpcBadMethod",r=-3,n="bad method",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,tA.prototype)}},qJ=class rA extends vr{constructor(e="WebrpcBadRequest",r=-4,n="bad request",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,rA.prototype)}},nA=class iA extends vr{constructor(e="WebrpcBadResponse",r=-5,n="bad response",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,iA.prototype)}},HJ=class sA extends vr{constructor(e="WebrpcServerPanic",r=-6,n="server panic",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,sA.prototype)}},WJ=class oA extends vr{constructor(e="WebrpcInternalError",r=-7,n="internal error",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,oA.prototype)}},GJ=class aA extends vr{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,aA.prototype)}},KJ=class lA extends vr{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,lA.prototype)}},JJ=class cA extends vr{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,cA.prototype)}},YJ=class fA extends vr{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,fA.prototype)}},QJ=class uA extends vr{constructor(e="PermissionDenied",r=2e3,n="Permission denied",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,uA.prototype)}},XJ=class dA extends vr{constructor(e="SessionExpired",r=2001,n="Session expired",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,dA.prototype)}},ZJ=class hA extends vr{constructor(e="NotFound",r=3e3,n="Resource not found",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,hA.prototype)}},eY=class vA extends vr{constructor(e="InvalidAppKey",r=4e3,n="Invalid app key",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,vA.prototype)}},tY=class yA extends vr{constructor(e="QueryFailed",r=4001,n="DB query failed",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,yA.prototype)}},rY=class pA extends vr{constructor(e="InvalidProjectId",r=4002,n="Invalid project id",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,pA.prototype)}},nY={0:UJ,[-1]:Qa,[-2]:zJ,[-3]:VJ,[-4]:qJ,[-5]:nA,[-6]:HJ,[-7]:WJ,[-8]:GJ,[-9]:KJ,[-10]:JJ,1e3:YJ,2e3:QJ,2001:XJ,3e3:ZJ,4e3:eY,4001:tY,4002:rY},iY=class extends FJ{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);De(this,"_globalFetch");De(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}},N5=150,Uo={defaultEnabled:!0,noop:!1,privacy:{userIdHash:!0,userAgentSalt:!1},userIdentTracking:!1,strictMode:!1,flushInterval:500,initProps:()=>({})},sY=class{constructor(t,e,r){De(this,"rpc");De(this,"auth");De(this,"options");De(this,"enabled");De(this,"ident");De(this,"userId");De(this,"sessionId");De(this,"allowUserTracking");De(this,"projectId");De(this,"queue");De(this,"flushTimeout");De(this,"defaultProps");De(this,"previousPageKey");De(this,"ts");De(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}`)}});De(this,"dedupedQueue",()=>{const t=new Map;for(let e=0;eN5&&(this.queue=this.queue.splice(this.queue.length-N5)),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=$5(),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=dg();if(!(t==null||t.id===null))return this.ts=t.ts,this.ts}enable(){if(!gA(this.auth)){this.enabled=!1;return}Xi()&&(this.enabled=!0,this.ts=Va({on:this.enabled,id:this.userId,it:this.ident,ut:this.allowUserTracking}),this.identify())}disable(){Xi()&&(this.enabled=!1,this.ts=Va({on:this.enabled,id:this.userId,it:this.ident,ut:this.allowUserTracking}))}},Xi=()=>typeof window=="object"&&typeof window.localStorage=="object"&&typeof window.localStorage.getItem=="function"&&typeof window.localStorage.setItem=="function",O5=(t,e)=>{if(!gA(e))return!1;if(!Xi())return!0;const r=dg();return r===null?t??!0:r.on},gA=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)},$5=()=>{try{return window.location.pathname}catch{return""}},oY=()=>{if(!Xi())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},gh="_dbeat",dg=()=>{try{return JSON.parse(window.localStorage.getItem(gh))}catch{return null}},Va=t=>{try{return t.ts||(t.ts=Math.floor(Date.now()/1e3)),window.localStorage.setItem(gh,JSON.stringify(t)),t.ts}catch{return}},aY=(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 Xi()&&r.privacy.userAgentSalt===!0&&(t=t+":"+navigator.userAgent),r.privacy.extraSalt&&r.privacy.extraSalt.length>0&&(t=t+":"+r.privacy.extraSalt),{userId:PJ(jJ(t)).substring(0,50),ident:1};throw new Error("invalid configuration")},lY=()=>{if(Xi()&&typeof window.sessionStorage=="object"&&typeof window.sessionStorage.getItem=="function"&&typeof window.sessionStorage.setItem=="function"){const e=window.sessionStorage.getItem(gh);if(e&&e.length>0)return e;{const r=D5(16);return window.sessionStorage.setItem(gh,r),r}}else return D5(16)},D5=t=>{let e="";for(let r=0;r++cY;class Ou{constructor(){var e=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.state=void 0,this.confirmationOnly=!1,this.events=new b1.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===An.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:wA(),type:Re.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):(he.debug("pushing to pending requests",r),e.pendingMessageRequests.push(r))})},this.waitUntilOpened=async function(r=ub){let n=!1;return Promise.race([new Promise((i,s)=>{const o=setTimeout(()=>{clearTimeout(o),n||(e.state=An.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=An.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===An.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===Re.INIT){he.debug("MessageProvider, received INIT message",e);const{nonce:l}=e.data;if(!l||l.length==0){he.error("invalid init nonce");return}this._init=Mt.OK,this.sendMessage({idx:-1,type:Re.INIT,data:{sessionId:this._sessionId,nonce:l}})}if(this._init!==Mt.OK)return;he.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===Re.OPEN&&!this.isOpened()){var s,o;if(this._sessionId&&this._sessionId!==((s=e.data)==null?void 0:s.sessionId)){he.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 he.error(l),this.close(),l}this.state=An.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===Re.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===Re.ACCOUNTS_CHANGED){this.accountsChangedPayload={accounts:[]},e.data&&e.data.length>0?(this.accountsChangedPayload={accounts:[Ce(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===Re.CHAIN_CHANGED){this.events.emit("chainChanged",e.data,e.origin);return}if(e.type===Re.NETWORKS){this.networksPayload=e.data,this.events.emit("networks",this.networksPayload);return}if(e.type===Re.WALLET_CONTEXT){this.walletContextPayload=e.data,this.events.emit("walletContext",this.walletContextPayload);return}e.type===Re.CLOSE&&this.state!==An.CLOSED&&this.close(e.data),e.type===Re.CONNECT&&(this.connectPayload=e.data,this.events.emit("connect",this.connectPayload)),e.type===Re.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!==An.CLOSED&&(this.state=An.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,he.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(nn({},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 fY(t){return uY.some(e=>e.predicate(t))}const uY=[{name:"Decentraland Exception",predicate:hY},{name:"0x v3 Exception",predicate:vY}],dY=/^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 hY(t){try{const e=vs(t);return dY.test(e)}catch{return!1}}function vY(t){const e=new or(yY);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const yY=[{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"}],e0=Ve(`Ethereum Signed Message: +`),db=t=>Ri(t)?Z(t):Ve(t),w1=t=>{const e=db(t);return fY(e)?e:Xe([e0,Ve(String(e.length)),e])},pY=t=>{if(JSON.stringify(t.slice(0,e0.length))!==JSON.stringify(e0))return t;const e=t.slice(e0.length),r=String(e.length).length;let n,i;try{i=Number(vs(e.slice(0,r)))}catch{i=Number(X(e.slice(0,r)))}return i>e.length||!Number.isInteger(i)?n=r-1:n=r,e.slice(n)},tc=async(t,e,r,n)=>new ce.reader.OnChainReader(n).isValidSignature(t,e,r),CA=async(t,e,r,n)=>{const i=w1(e),s=Lx(i);return tc(t,s,r,n)},EA=(t,e,r,n)=>tc(t,Tu(e),r,n),mh=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",SA=()=>!!navigator.userAgent.match(/UnitySequence/i),kA=t=>t.onChain.deployed&&t.fullyMigrated;class AA{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 uu{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(this.callbacks=[],!uu.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 xh(){return uu.isAvailable()?new uu:new AA}async function _A(t){return Array.isArray(t)?Promise.all(t.map(e=>et(e))):et(t)}const B5="@sequence.transportSession";class $u{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===Re.INIT)if(r.isValidInitAck(n))r._initCallback&&r._initCallback();else{r._initCallback&&r._initCallback("invalid init");return}return}switch(i.type){case Re.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 Re.CLOSE:return r._init!==Mt.OK,void 0;case Re.MESSAGE:{const s=await r.walletRequestHandler.sendMessageRequest(i);r.sendMessage(s),s.data.error;return}default:he.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=hS(n),r.saveTransportSession({sessionId:n,intent:i,networkId:s})),r.walletRequestHandler.setOpenIntent(i),await r.init();let o;try{if(s){const a=Ux(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(!mh()&&l.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&l!=null&&l.origin?a.origin=yS(l.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=vS(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){he.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=>{xh().setItem(B5,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=xh().getItem(B5);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(ii(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:Re.OPEN,data:{chainId:r,sessionId:n,session:i,error:s}})}notifyClose(e){this.sendMessage({idx:-1,type:Re.CLOSE,data:e?{error:e}:null})}notifyConnect(e){this.sendMessage({idx:-1,type:Re.CONNECT,data:e})}notifyDisconnect(e,r){this.sendMessage({idx:-1,type:Re.DISCONNECT,data:e?{error:e}:null,origin:r})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:Re.ACCOUNTS_CHANGED,data:e,origin:r})}notifyChainChanged(e,r){this.sendMessage({idx:-1,type:Re.CHAIN_CHANGED,data:e,origin:r})}notifyNetworks(e){this.sendMessage({idx:-1,type:Re.NETWORKS,data:e})}notifyWalletContext(e){this.sendMessage({idx:-1,type:Re.WALLET_CONTEXT,data:e})}isValidInitAck(e){if(this._init===Mt.OK)return he.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==Re.INIT)return he.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(he.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(he.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(()=>{he.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},ub/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:Re.INIT,data:{nonce:this._initNonce}}),this._init=Mt.SENT_NONCE})}}class gY{constructor(){this.app=void 0,this.wallet=void 0;const e=new hg,r=new hg;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class hg{constructor(){this.conn=void 0,this.events=new b1.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 TA extends Ou{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===An.CLOSED){this.state=An.OPENING;const s=`${performance.now()}`;this._sessionId=s,this.sendMessage({idx:-1,type:Re.OPEN,data:{path:r,intent:n,networkId:i,sessionId:s}})}},this.state=An.CLOSED,this.port=e,!e)throw new Error("port argument cannot be empty");this._init=Mt.OK}closeWallet(){this.sendMessage({idx:-1,type:Re.CLOSE,data:null}),this.close()}sendMessage(e){if(!e.idx)throw new Error("message idx is empty");this.port.sendMessage(e)}}class mY extends $u{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 PA(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}: ${ry(i)}`)},console.warn=(...i)=>{n.warnfromjs(`${t}: ${ry(i)}`)},console.error=(...i)=>{n.errorfromjs(`${t}: ${ry(i)}`)},window.logsOverriddenForUnreal=!0}}function ry(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let qa;class IA extends Ou{constructor(e){super(),this.walletURL=void 0,this.register=()=>{var r;PA("dapp"),qa&&(qa.unregister(),qa=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),qa=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r;this._registered=!1,this.closeWallet(),qa===this&&(qa=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 Nu;r&&(s.pathname=r.toLowerCase()),this._init=Mt.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",Dx(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 xY extends $u{constructor(e){super(e),this.onMessageFromUnreal=r=>{he.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new Nu(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:Bx(n.get("intent"))}},this._init=Mt.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;PA("wallet");const{search:n}=new URL(e||window.location.href);let i=this.getUnrealTransportSession(n);if(!!i.sessionId||(i=await this.getCachedTransportSession()),!i){he.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}`;he.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}`;he.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!==Re.INIT&&this._init!==Mt.OK){he.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 hb="sequence-extension-message-handler";class bY extends $u{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:hb})}sendMessage(e){he.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class RA extends Ou{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===hb&&(this._init=Mt.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class wY extends b1.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;he.info("[received message]",n);const i=n.idx,s=this.responseCallbacks.get(i);switch(i&&this.responseCallbacks.delete(i),n.type){case Re.MESSAGE:if(s)this.emit(Re.MESSAGE,n),s(n.data.error,n);else throw new Error("impossible state");break;case Re.DISCONNECT:case Re.ACCOUNTS_CHANGED:case Re.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 Ha;class MA extends Ou{constructor(e){super(),this.walletURL=void 0,this.walletWindow=void 0,this.register=()=>{Ha&&(Ha.unregister(),Ha=this),window.addEventListener("message",this.onWindowEvent),Ha=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(),Ha===this&&(Ha=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 Nu;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}),!mh()&&!SA()&&n.options&&(n.options.origin=window.location.origin)),o.set("intent",Dx(n))),i&&o.set("net",`${i}`);let a,l;mh()?(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){he.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 CY extends $u{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(he.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)){he.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(i)},this.getWindowTransportSession=n=>{const i=new Nu(n);return{sessionId:i.get("sid"),networkId:i.get("net"),intent:Bx(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){he.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}`;he.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}`;he.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===Re.INIT?this.postMessage(r,!0):this.postMessage(r)}get isPopup(){return this._isPopup}postMessage(e,r=!1){if(r!==!0&&this._init!==Mt.OK){he.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):he.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 C1{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 C1;if((r=e.windowTransport)!=null&&r.enabled&&typeof window=="object"&&e.walletAppURL){const a=new MA(e.walletAppURL);o.add(a)}if((n=e.proxyTransport)!=null&&n.enabled){const a=new TA(e.proxyTransport.appPort);o.add(a)}if((i=e.extensionTransport)!=null&&i.enabled){const a=new RA(e.extensionTransport.runtime);o.add(a)}if((s=e.unrealTransport)!=null&&s.enabled&&e.windowTransport&&e.walletAppURL){const a=new IA(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;nkY(t,i))}function kY(t,e){if(e.to.toLowerCase()===t.toLowerCase()&&e.data){const r=Z(e.data);if(r.length>=4&&!AY(r))throw new Error("self calls are forbidden")}if(e.delegateCall)throw new Error("delegate calls are forbidden")}function AY(t){const e=new or(mr.mainModule.abi);try{return e.decodeFunctionData("createContract",t),!0}catch{return!1}}const _Y=1e4;class TY{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 b1.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)&&!PY.includes(s.method))throw bA;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=w1(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=SY(s.params[0]).map(k=>("gas"in k&&k.gasLimit===void 0&&(k.gasLimit=k.gas,delete k.gas),k));L5(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(Ce(g.from)!==u.address)throw new Error("sender address does not match wallet");L5(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=Ce(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=[j5(g,await u.status(g))]:l.result=await Promise.all(u.networks.map(async function(p){const k=await u.status(p.chainId);return j5(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){he.error(u),l.result=null,l.error=nn({},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=_Y){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:Y.MAINNET,s=Ux(i).chainId,o={connected:!0,chainId:ii(s)};if(e&&e.authorize){const a={app:e.app,origin:e.origin,expiry:e.expiry,nonce:e.authorizeNonce};try{o.proof=await jk(this.account,s,a)}catch(l){return he.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=nn({},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=nn({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(he.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=>nn({},i,{provider:void 0,relayer:void 0}))};if(e){const i=si(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",ii(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",ii(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){he.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:(he.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function j5(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 PY=["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 bc{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(!wc.is(e))throw new Error("SequenceSigner can only be connected to a SequenceProvider");return new bc(this.client,e)}getSigner(e){if(!e)return this;const r=this.provider.toChainId(e);return this.singleNetworkSigners[r]||(this.singleNetworkSigners[r]=new vb(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 _A(e),s=await this.client.sendTransaction(i,{chainId:n}),o=this.getProvider(n);try{return await ea(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 vb extends bc{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 IY{constructor(e){if(this.signer=e,vb.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 tc(e,r,n,this.signer.getProvider(i))}async isValidMessageSignature(e,r,n,i){const s=this.signer.getProvider(i),o=w1(r),a=Lx(o);return tc(e,a,n,s)}isValidTypedDataSignature(e,r,n,i){return this.isValidSignature(e,Tu(r),n,i)}}class wc extends Ix{constructor(e,r,n=Xl){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 bc(this.client,this),this.utils=new IY(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(nn({},e,{authorize:!0}))}async openWallet(e,r){return await this.client.openWallet(e,r),!0}toChainId(e){if(e===void 0)return;const r=si(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 $A(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 ii(await this.useChainId());if(e==="eth_accounts")return[this.client.getAddress()];if(e==="wallet_switchEthereumChain"){const o=r[0],a=OA(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=si(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 f7(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}}wc.is=t=>t&&typeof t=="object"&&t._isSequenceProvider===!0;function OA(t){return typeof t=="object"?OA(t.chainId):V.from(t).toNumber()}class $A extends wc{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=si(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 RY extends sY{}const MY=(t,e)=>{e||(e="https://nodes.sequence.app");const r=!t,n={};return t&&(n.headers={"X-Access-Key":t}),new RY(e,n,{noop:r,defaultEnabled:!0,privacy:{userIdHash:!0,userAgentSalt:!1},initProps:()=>Xi()?{origin:window.location.origin}:{}})};var NY={name:"@0xsequence/provider",version:"1.9.12",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.20.1"},files:["src","dist"]};class fa{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(fa.SESSION_LOCALSTORE_KEY,JSON.stringify(e))}getSession(){const e=this.store.getItem(fa.SESSION_LOCALSTORE_KEY);if(e)return JSON.parse(e)}async clearSession(){return this.store.removeItem(fa.SESSION_LOCALSTORE_KEY)}}fa.SESSION_LOCALSTORE_KEY="@sequence.session";class ua{constructor(e,r=1){this.store=e,this.startingChainId=r,this.callbacks=[],e.onItemChange(ua.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(ua.SESSION_CHAIN_ID_KEY,e.toString())}getDefaultChainId(){const e=this.store.getItem(ua.SESSION_CHAIN_ID_KEY);return!e||e.length===0?this.startingChainId:parseInt(e)}}ua.SESSION_CHAIN_ID_KEY="@sequence.session.defaultChainId";class yb{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=C1.new(e);else if(mA(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 fa(r),this.defaultChainId=new ua(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=ii(this.getChainId());(f=this.callbacks.connect)==null||f.forEach(h=>h(nn({},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=ii(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=MY(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:nn({},e,{networkId:this.getChainId(),clientVersion:NY.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()}`}}),e=X(db(e)),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=rr.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=EY(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 vg={transports:{walletAppURL:"https://sequence.app",windowTransport:{enabled:!0},proxyTransport:{enabled:!1}},defaultNetwork:1,analytics:!0};let Ci;const DA=(t,e)=>{var r,n,i;if(!t||typeof t!="string")throw new Error("Please pass a projectAccessKey in initWallet.");if(Ci)return Ci;const s=nn({},vg,e,{transports:nn({},vg.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&&Xl.find(g=>g.chainId===y.chainId)}))!=null?r:[],l=Xl.map(y=>{var g;const p=(g=s.networks)==null?void 0:g.find(k=>k.chainId===y.chainId);return p?nn({},y,p):y}).concat(a).map(y=>(y.rpcUrl.includes(t)||(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 zx([RS,IS,new Vx],new oh(k));o[y]=new sH(w,y)}return o[y]},f=s.defaultNetwork?(i=si(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||xh(),h=new yb(s.transports,u,{defaultChainId:f,defaultEIP6492:s.defaultEIP6492,projectAccessKey:t,analytics:s.analytics});return Ci=new wc(h,c),Ci},BA=()=>{Ci&&(Ci.client.closeWallet(),Ci.client.transport.unregister(),Ci=void 0)},LA=()=>{if(!Ci)throw new Error("Wallet has not been initialized, call sequence.initWallet(config) first.");return Ci},OY=Object.freeze(Object.defineProperty({__proto__:null,BaseInjectedTransport:wY,BaseProviderTransport:Ou,BaseWalletTransport:$u,CHANNEL_ID:hb,DefaultChainIdTracker:ua,DefaultProviderConfig:vg,ErrSignedInRequired:bA,EventType:Re,ExtensionMessageHandler:bY,ExtensionMessageProvider:RA,InitState:Mt,LocalStorage:uu,MemoryItemStore:AA,MuxMessageProvider:C1,OpenState:An,PROVIDER_OPEN_TIMEOUT:ub,ProviderError:xA,ProxyMessageChannel:gY,ProxyMessageChannelPort:hg,ProxyMessageHandler:mY,ProxyMessageProvider:TA,SequenceClient:yb,SequenceClientSession:fa,SequenceProvider:wc,SequenceSigner:bc,SingleNetworkSequenceProvider:$A,SingleNetworkSequenceSigner:vb,UnrealMessageHandler:xY,UnrealMessageProvider:IA,WalletRequestHandler:TY,WindowMessageHandler:CY,WindowMessageProvider:MA,WindowSessionParams:Nu,getWallet:LA,initWallet:DA,isBrowserExtension:mh,isMuxTransportTemplate:NA,isProviderTransport:mA,isUnityPlugin:SA,isValidMessageSignature:CA,isValidSignature:tc,isValidTypedDataSignature:EA,isWalletUpToDate:kA,messageToBytes:db,nextMessageIdx:wA,prefixEIP191Message:w1,resolveArrayProperties:_A,trimEIP191Prefix:pY,unregisterWallet:BA,useBestStore:xh},Symbol.toStringTag,{value:"Module"}));function jr(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 $Y=jr({__proto__:null},[NH]),DY=jr({__proto__:null},[LH]),BY=jr({__proto__:null},[uJ]),LY=jr({__proto__:null},[pJ]),jY=jr({__proto__:null},[xK]),FY=jr({__proto__:null},[TK]),UY=jr({__proto__:null},[kJ]),zY=jr({__proto__:null},[VW]),VY=jr({__proto__:null},[OY]),qY=jr({__proto__:null},[ZG]);const HY=ce.transaction;var WY=Object.freeze({__proto__:null,transactions:HY}),GY=jr({__proto__:null,isValidSignature:tc,isValidMessageSignature:CA,isValidTypedDataSignature:EA,isWalletUpToDate:kA},[TW]),KY=jr({__proto__:null},[MG]),JY=jr({__proto__:null},[eK]),YY=jr({__proto__:null},[lJ]),QY=jr({__proto__:null},[LG]),XY=jr({__proto__:null},[aK]),Qe=Object.freeze({__proto__:null,abi:$Y,api:DY,auth:BY,guard:LY,indexer:jY,metadata:FY,multicall:UY,network:zY,provider:VY,relayer:qY,transactions:WY,utils:GY,core:KY,signhub:JY,sessions:YY,migration:QY,account:XY,initWallet:DA,getWallet:LA,unregisterWallet:BA,SequenceProvider:wc,SequenceClient:yb,SequenceSigner:bc});const F5=[{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 ZY="_1e9z9271";const eQ=({message:t,loading:e})=>{const r=()=>t?` +...`:"...";return ae.jsx(FO,{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:ZY,display:"inline-block",fontSize:"large",lineHeight:"4",style:{top:"-4px",position:"relative"},children:"_"})]})})};var tQ="_1q07ov40";const zo=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(rQ,{children:e})}),ae.jsx(ue,{className:tQ,children:fr.Children.map(r,(s,o)=>ae.jsx(ue,{children:s},o))})]})},rQ=t=>ae.jsx(Wt,{variant:"normal",fontWeight:"medium",color:"text50",children:t.children}),nQ=()=>{const t=window.localStorage.getItem("defaultChainId");return t==null?null:Number(t)},iQ="/demo-dapp/assets/logo-EKCqYZBG.svg",U5="/demo-dapp/assets/skyweaver-banner-AT9gQtXT.png",sQ="/demo-dapp/assets/skyweaver-banner-large-Dt2dVXke.png",z5="AQAAAAAAAAbvrgpWEC2Aefg5qYStQmwjBpA";dS({logLevel:"DEBUG"});const jA=[{name:"production",walletUrl:"https://sequence.app"},{name:"development",walletUrl:"https://dev.sequence.app"},{name:"local",walletUrl:"http://localhost:3333"}],oQ="https://api.sequence.app",V5=nQ()||Y.MAINNET,yl=new URLSearchParams(window.location.search),FA=yl.get("env")??"production",aQ=jA.find(t=>t.name===FA),pl=yl.get("walletAppURL")??aQ.walletUrl;pl&&pl.length>0?Qe.initWallet(z5,{defaultNetwork:V5,transports:{walletAppURL:pl}}):Qe.initWallet(z5,{defaultNetwork:V5,transports:{walletAppURL:pl}});const lQ=()=>{const[t,e]=S.useState(null),[r,n]=S.useState(null),[i,s]=S.useState(!1),[o,a]=S.useState(!1),l=Qe.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=Qe.getWallet(),Q=await ne.connect(L);if(L.authorize&&Q.connected){let ie=yl.get("apiUrl");(!ie||ie.length===0)&&(ie=oQ);const ve=new Qe.api.SequenceAPIClient(ie),{isValid:de}=await ve.isValidETHAuthProof({chainId:Q.chainId,walletAddress:Q.session.accountAddress,ethAuthProofString:Q.proof.proofString});_(`isValid (API)?: ${de}`)}if(L.authorize){const ie=new ih;if(Q.proof){const ve=await ie.decodeProof(Q.proof.proofString,!0),de=await ne.utils.isValidTypedDataSignature(ne.getAddress(),Q.proof.typedData,ve.signature,V.from(Q.chainId).toNumber());_(`connected using chainId: ${V.from(Q.chainId).toString()}`),_(`isValid (client)?: ${de}`)}}s(!1),Q.connected?(_("Wallet connected!"),_(`shared email: ${Q.email}`),a(!0)):_("Failed to connect wallet - "+Q.error)}catch(ne){console.error(ne),O()}},w=()=>{Qe.getWallet().disconnect(),m(),a(!1)},E=()=>{Qe.getWallet().openWallet()},A=()=>{const L=Qe.getWallet(),Q={type:"openWithOptions",options:{app:"Demo Dapp",settings:{theme:"light",includedPaymentProviders:["moonpay","ramp"],defaultFundingCurrency:"eth",defaultPurchaseAmount:400,lockFundingCurrencyToDefault:!1}}};L.openWallet("wallet/add-funds",Q)},I=()=>{Qe.getWallet().closeWallet()},M=async()=>{$();const L=Qe.getWallet();_(`isConnected?: ${L.isConnected()}`),s(!1)},j=async()=>{$();const L=Qe.getWallet();_(`isOpened?: ${L.isOpened()}`),s(!1)},z=async()=>{try{$();const L=l.getChainId();_(`top chainId: ${L}`);const Q=l.getProvider().getChainId();_(`provider.getChainId(): ${Q}`);const ve=await l.getSigner().getChainId();_(`signer.getChainId(): ${ve}`),s(!1)}catch(L){console.error(L),O()}},F=async()=>{try{$();const L=Qe.getWallet(),ne=L.getAddress();_(`getAddress(): ${ne}`);const ie=L.getProvider().listAccounts();_(`accounts: ${JSON.stringify(ie)}`),s(!1)}catch(L){console.error(L),O()}},W=async()=>{try{$();const L=Qe.getWallet(),ne=L.getProvider(),Q=L.getAddress(),ie=await ne.getBalance(Q);_(`balance check 1: ${ie.toString()}`);const de=await L.getSigner().getBalance();_(`balance check 2: ${de.toString()}`),s(!1)}catch(L){console.error(L),O()}},G=async()=>{try{$();const ne=await Qe.getWallet().getNetworks();_(`networks: ${JSON.stringify(ne,null,2)}`),s(!1)}catch(L){console.error(L),O()}},ee=async()=>{try{$();const L=Qe.getWallet();_("signing message...");const ne=L.getSigner(),Q=`1915 Robert Frost +The Road Not Taken + +Two roads diverged in a yellow wood, +And sorry I could not travel both +And be one traveler, long I stood +And looked down one as far as I could +To where it bent in the undergrowth + +Then took the other, as just as fair, +And having perhaps the better claim, +Because it was grassy and wanted wear +Though as for that the passing there +Had worn them really about the same, + +And both that morning equally lay +In leaves no step had trodden black. +Oh, I kept the first for another day! +Yet knowing how way leads on to way, +I doubted if I should ever come back. + +I shall be telling this with a sigh +Somewhere ages and ages hence: +Two roads diverged in a wood, and Iā€” +I took the one less traveled by, +And that has made all the difference. + +ā˜ ā˜€ ā˜‚`,ie=await ne.signMessage(Q);_(`signature: ${ie}`);const ve=await L.utils.isValidMessageSignature(L.getAddress(),Q,ie,await ne.getChainId());if(_(`isValid?: ${ve}`),!ve)throw new Error("sig invalid");s(!1)}catch(L){console.error(L),O()}},oe=async()=>{try{$();const L=Qe.getWallet();_("signing message...");const ne=L.getSigner(),Q=X(Ve("Hello, world!")),ie=await ne.signMessage(Q);_(`signature: ${ie}`);const ve=await L.utils.isValidMessageSignature(L.getAddress(),Q,ie,await ne.getChainId());if(_(`isValid?: ${ve}`),!ve)throw new Error("sig invalid");s(!1)}catch(L){console.error(L),O()}},D=async()=>{try{$();const L=Qe.getWallet();_("signing message...");const ne=L.getSigner(),Q=Ve("Hello, world!"),ie=await ne.signMessage(Q);_(`signature: ${ie}`);const ve=await L.utils.isValidMessageSignature(L.getAddress(),Q,ie,await ne.getChainId());if(_(`isValid?: ${ve}`),!ve)throw new Error("sig invalid");s(!1)}catch(L){console.error(L),O()}},v=async()=>{try{$();const L=Qe.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"]}},Q=L.getSigner(),ie=await Q.signTypedData(ne.domain,ne.types,ne.message);_(`signature: ${ie}`);const ve=await L.utils.isValidTypedDataSignature(L.getAddress(),ne,ie,await Q.getChainId());_(`isValid?: ${ve}`),s(!1)}catch(L){console.error(L),O()}},C=async()=>{try{$();const L=Qe.getWallet(),ne="0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",Q=new or(["function withdraw(uint256 amount)"]),ie={to:ne,data:Q.encodeFunctionData("withdraw",["1000000000000000000"])},de=await L.getProvider().estimateGas(ie);_(`estimated gas needed for wmatic withdrawal : ${de.toString()}`),s(!1)}catch(L){console.error(L),O()}},P=async L=>{try{$();const ne=Qe.getWallet();L=L||ne.getSigner(),_(`Transfer txn on ${L.getChainId()} chainId`);const Q=await L.getAddress(),ie={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:Q,value:Fp("1.234"),data:"0x"},ve={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:Q,value:Fp("0.4242"),data:"0x"},de=L.provider,pe=await de.getBalance(Q);_(`balance of ${Q}, before: ${pe}`);const Ke=await L.sendTransaction([ie,ve]);_(`txnResponse: ${JSON.stringify(Ke)}`);const Ue=await de.getBalance(Q);_(`balance of ${Q}, after: ${Ue}`),s(!1)}catch(ne){console.error(ne),O()}},N=async L=>{try{$();const ne=Qe.getWallet();L=L||ne.getSigner();const Q=await L.getAddress(),ie=rh("1",1),de={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x07865c6e87b9f70255377e024ace6630c1eaa37f",value:0,data:new or(F5).encodeFunctionData("transfer",[Q,ie.toHexString()])},pe=await L.sendTransaction([de],{chainId:Y.SEPOLIA});_(`txnResponse: ${JSON.stringify(pe)}`),s(!1)}catch(ne){console.error(ne),O()}},x=async L=>{try{$();const ne=Qe.getWallet();L=L||ne.getSigner();const Q=await L.getAddress(),ie=rh("0.05",18),de={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",value:0,data:new or(F5).encodeFunctionData("transfer",[Q,ie.toHexString()])},pe=await L.sendTransaction([de]);_(`txnResponse: ${JSON.stringify(pe)}`),s(!1)}catch(ne){console.error(ne),O()}},T=async()=>{try{const L=Qe.getWallet(),ne=L.getChainId()===Y.ARBITRUM?Y.OPTIMISM:Y.ARBITRUM;P(L.getSigner(ne))}catch(L){console.error(L),O()}},R=async()=>{try{$(),_("TODO"),s(!1)}catch(L){console.error(L),O()}},b=async L=>{try{$();const ne=Qe.getWallet();L=L||ne.getSigner();const Q=["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",ve=new Oa(ie,Q,L),de=await ve.symbol();_(`Token symbol: ${de}`);const pe=await ve.balanceOf(await L.getAddress());_(`Token Balance: ${pe.toString()}`),s(!1)}catch(ne){console.error(ne),O()}},d=async()=>{try{$();const L=Qe.getWallet(),Q=await L.getSigner().getAddress(),ve=(await L.getNetworks()).find(Ue=>Ue.chainId===Y.POLYGON);if(!ve)throw new Error("Could not find Polygon network in networks list");const de=new Qe.indexer.SequenceIndexer(ve.indexerUrl),pe=await de.getTokenBalances({accountAddress:Q,includeMetadata:!0});_(`tokens in your account: ${JSON.stringify(pe)}`);const Ke=await de.getTokenBalances({accountAddress:Q,includeMetadata:!0,contractAddress:"0x631998e91476DA5B870D741192fc5Cbc55F5a52E"});_(`skyweaver collectibles in your account: ${JSON.stringify(Ke)}`),s(!1)}catch(L){console.error(L),O()}},_=(L,ne=!1)=>(console.log(L),e(ne?L:Q=>`${Q} + +${L}`)),$=()=>{s(!0)},m=()=>{s(!1),e(o?"Status: Wallet is connected :)":"Status: Wallet not connected. Please connect wallet first.")},O=()=>{s(!1),e("An error occurred")},B=[Y.RINKEBY,Y.HARDHAT,Y.HARDHAT_2,Y.KOVAN,Y.ROPSTEN,Y.HOMEVERSE_TESTNET,Y.BASE_GOERLI],U=Object.values(Qe.network.networks).filter(L=>L.type===Be.MAINNET).sort((L,ne)=>L.chainId-ne.chainId),H=Object.values(Qe.network.networks).filter(L=>L.type===Be.TESTNET).sort((L,ne)=>L.chainId-ne.chainId),te=[...U,...H].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}${U5}`}}),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(gE,{height:"6",alt:"logo",src:iQ})})}),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(WN,{background:"backgroundMuted",alignItems:"center",gap:"3",children:[ae.jsx(bO,{}),ae.jsx(Wt,{variant:"normal",color:"text80",children:"Please open your browser dev inspector to view output of functions below."})]}),ae.jsx(Rw,{background:"buttonGlass"}),ae.jsx(ue,{marginBottom:"4",children:ae.jsx(o6,{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(jA).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(pO,{})]})})]}),ae.jsx(Rw,{background:"buttonGlass"}),ae.jsx(ue,{marginBottom:"4",children:ae.jsx(o6,{name:"chainId",label:"Network",labelLocation:"top",onValueChange:L=>l.setDefaultChainId(Number(L)),value:String(c),options:[...Object.values(te).map(L=>({label:ae.jsxs(ue,{alignItems:"center",gap:"2",children:[ae.jsx(Yj,{src:L.logoURI,size:"sm"}),ae.jsx(Wt,{children:L.title})]}),value:String(L.chainId)}))]})}),ae.jsxs(zo,{label:"Connection",children:[ae.jsx(We,{width:"full",shape:"square",onClick:()=>k(),label:"Connect"}),ae.jsx(We,{width:"full",shape:"square",onClick:()=>k({app:"Demo Dapp",authorize:!0}),label:"Connect & Auth"}),ae.jsx(We,{width:"full",shape:"square",onClick:()=>k({app:"Demo Dapp",authorize:!0,settings:{theme:"dark",bannerUrl:`${window.location.origin}${sQ}`,bannerSize:"medium",includedPaymentProviders:["moonpay"],defaultFundingCurrency:"matic",defaultPurchaseAmount:111}}),label:"Connect with Settings"}),ae.jsx(We,{width:"full",shape:"square",onClick:()=>{h(!0)},label:"Connect with Email"}),ae.jsx(We,{width:"full",shape:"square",onClick:()=>{k({app:"Demo Dapp",authorize:!0,settings:{signInWith:"google",theme:"dark",bannerUrl:`${window.location.origin}${U5}`}})},label:"Connect with Google"}),ae.jsx(We,{width:"full",shape:"square",onClick:()=>w(),label:"Disconnect"})]}),ae.jsxs(zo,{label:"Basics",children:[ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>E(),label:"Open Wallet"}),ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>A(),label:"Open Wallet with Settings"}),ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>I(),label:"Close Wallet"}),ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>M(),label:"Is Connected?"}),ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>j(),label:"Is Opened?"})]}),ae.jsxs(zo,{label:"State",children:[ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>z(),label:"ChainID"}),ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>G(),label:"Networks"}),ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>F(),label:"Get Accounts"}),ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>W(),label:"Get Balance"})]}),ae.jsxs(zo,{label:"Signing",children:[ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>ee(),label:"Sign Message (String)"}),ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>oe(),label:"Sign Message (Hex)"}),ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>D(),label:"Sign Message (Bytes)"}),ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>v(),label:"Sign TypedData"})]}),ae.jsx(zo,{label:"Simulation",children:ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>C(),label:"Estimate Unwrap Gas"})}),ae.jsxs(zo,{label:"Transactions",children:[ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>P(),label:"Send funds"}),ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>T(),label:"Send on L2"}),ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>x(),label:"Send DAI"}),ae.jsx(We,{width:"full",shape:"square",disabled:!o||!0,onClick:()=>R(),label:"Send ERC-1155 Tokens"}),ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>N(),label:"Send USDC on Sepolia"})]}),ae.jsxs(zo,{label:"Various",children:[ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>b(),label:"Read Symbol and Balance"}),ae.jsx(We,{width:"full",shape:"square",disabled:!o,onClick:()=>d(),label:"Fetch Token Balances"})]}),ae.jsx(gC,{children:u&&ae.jsx(iL,{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(tx,{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(We,{variant:"primary",label:"Login",onClick:()=>{K(r)?(g(!1),h(!1)):g(!0)},"data-id":"login"})})]})})})}),ae.jsx(eQ,{message:t,loading:i})]})},cQ=fr.memo(lQ),fQ=KE(document.getElementById("root"));fQ.render(ae.jsx(fr.StrictMode,{children:ae.jsx(XB,{children:ae.jsx(cQ,{})})})); diff --git a/assets/index-CbnjMph8.js b/assets/index-CbnjMph8.js deleted file mode 100644 index acefe32..0000000 --- a/assets/index-CbnjMph8.js +++ /dev/null @@ -1,170 +0,0 @@ -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 - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var 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(1>>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,W=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 - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var F5=S,gn=BA;function se(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,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 H5(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function qA(t){var e=H5(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=qA(t))}function W5(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=H5(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},HA=["Webkit","ms","Moz","O"];Object.keys(Gc).forEach(function(t){HA.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 WA=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(WA[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?(W=z,z=null):W=z.sibling;var G=h(w,z,A[F],I);if(G===null){z===null&&(z=W);break}t&&z&&G.alternate===null&&e(w,z),E=s(G,E,F),j===null?M=G:j.sibling=G,j=G,z=W}if(F===A.length)return r(w,z),$t&&zo(w,F),M;if(z===null){for(;FF?(W=z,z=null):W=z.sibling;var Z=h(w,z,G.value,I);if(Z===null){z===null&&(z=W);break}t&&z&&Z.alternate===null&&e(w,z),E=s(Z,E,F),j===null?M=Z:j.sibling=Z,j=Z,z=W}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&&qb(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=q3(!0),H3=q3(!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 W3(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=Wr();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=Wr(),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:Wb,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:Hb,useDebugValue:Ug,useDeferredValue:function(t){return ui().memoizedState=t},useTransition:function(){var t=Hb(!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,Wb(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":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 Hu=!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){qt(t,e,n)}else r.current=null}function Ny(t,e,r){try{r()}catch(n){qt(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){qt(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?W1(t.parentNode,r):t.nodeType===1&&W1(t,r),If(t)):W1(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){qt(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()-Hg?ta(t,0):qg|=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=Wr();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=Ws(e.stateNode.containerInfo.firstChild),yn=e,$t=!0,Yn=null,r=H3(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 W3(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 q5: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=q5,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 qT=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function Mh(t){return Rh(t.animate)||qT.some(e=>zf(t[e]))}function U4(t){return!!(Mh(t)||t.variants)}function HT(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 WT(t){const{initial:e,animate:r}=HT(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=WT(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 q4(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,qf=/(-)?([\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},H4={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(q4(h)){s[h]=y;continue}const g=H4[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 W4(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 W4(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={};W4(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,qP=typeof performance<"u"?()=>performance.now():()=>Date.now(),c8=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(qP()),l8);function HP(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]=HP(()=>Hf=!0),t),{}),Nr=pu.reduce((t,e)=>{const r=Dh[e];return t[e]=(n,i=!1,s=!1)=>(Hf||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=>{Hf=!1,Xi.delta=qy?l8:Math.max(Math.min(t-Xi.timestamp,WP),1),Xi.timestamp=t,Hy=!0,pu.forEach(GP),Hy=!1,Hf&&(qy=!1,c8(f8))},KP=()=>{Hf=!0,qy=!0,Hy||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(qf);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 Wy={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)||Wy.test(t)||ul.test(t),parse:t=>Xo.test(t)?Xo.parse(t):ul.test(t)?ul.parse(t):Wy.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(qf))===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(qf);return s&&(n=s.length,t=t.replace(qf,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(qf)||[];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={...H4,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=[Wy,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 WI(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!w2(t,HI)&&w2(t,qI)){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}=WI(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,W=o[0],G=o[o.length-1];let Z={done:!1,value:W};!((k=(p=F).needsInterpolation)===null||k===void 0)&&k.call(p,W,G)&&(z=C8([0,100],[W,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 qc=([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:qc([0,.65,.55,1]),circOut:qc([.55,0,1,.45]),backIn:qc([.31,.01,.66,-.59]),backOut:qc([.33,1.53,.69,.99])};function tR(t){if(t)return Array.isArray(t)?qc(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 W=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=>{W=!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&&(W=!1),W&&!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 qo(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 qR={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 HR(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]=HR(t);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);return s?s.trim():rp(i)?np(i,e,r+1):i}function WR(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]),q2=(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 H2={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:q2(4,13),y:q2(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]=H2[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]=H2[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=WR(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,W2=["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 q8=["initial",...Am],oM=q8.length;class H8 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 H8{readValueFromInstance(e,r){if(ic.has(r)){const n=pm(r);return n&&n.default||0}else{const n=aM(e),i=(q4(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 H8{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 W8=["TopLeft","TopRight","BottomLeft","BottomRight"],gM=W8.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,W=!y&&g;if(this.options.layoutRoot||!((E=this.resumeFrom)===null||E===void 0)&&E.instance||W||y&&(F||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,W);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"}),qM={...CR,...UP,...qR,...yM},Sl=eP((t,e)=>TP(t,e,qM,fM,VM));function X8(){const t=S.useRef(!1);return m0(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function HM(){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 WM 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; - height: ${o}px !important; - top: ${a}px !important; - left: ${l}px !important; - } - `),()=>{document.head.removeChild(c)}},[e]),S.createElement(WM,{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 Wa=t=>t.key||"";function JM(t,e){t.forEach(r=>{const n=Wa(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]=HM();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:Wa(A),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:s,mode:o},A)));u=[...u];const k=y.current.map(Wa),w=f.map(Wa),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:Wa(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:Wa(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 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)){var i=t.length;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 - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var 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:"_2q9vfj8 _2q9vfj0 fyvr11ot",warning:"_2q9vfj9 _2q9vfj1 fyvr11oz",success:"_2q9vfja _2q9vfj2 fyvr11oh",error:"_2q9vfjb _2q9vfj3 fyvr11on"},size:{sm:"_2q9vfjc _1qxj1ib9 _1qxj1ibf _1qxj1ib5 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 _2q9vfj4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"_2q9vfjd _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _2q9vfj5 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"_2q9vfje _1qxj1ib9 _1qxj1ibd _1qxj1ib3 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc _2q9vfj6 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:"_1qxj1iba _1qxj1ib0 fyvr11mu fyvr11e4 fyvr11gg fyvr11fg fyvr11ew",xlarge:"_1qxj1ibb _1qxj1ib1 fyvr11mv fyvr11es fyvr11gc fyvr11fk fyvr11fc",large:"_1qxj1ibc _1qxj1ib2 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8",medium:"_1qxj1ibd _1qxj1ib3 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc",normal:"_1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",small:"_1qxj1ibf _1qxj1ib5 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4",xsmall:"_1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc",code:"_1qxj1ibh _1qxj1ib7 fyvr11mw fyvr11eg fyvr11g0 fyvr11fk fyvr11f0"},ellipsis:{true:"_1qxj1ibi _1qxj1ib8 fyvr11ls fyvr11m8 fyvr11n7 fyvr11mx"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const Ht=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 _140wn8n0 fyvr11ls fyvr11m8 fyvr11n7 fyvr11ko fyvr11h0",variantClassNames:{variant:{base:"_140wn8nh",feature:"_140wn8ni _140wn8n1 fyvr11ph fyvr12o5",primary:"_140wn8nj _140wn8n2 fyvr11pb fyvr12o5",glass:"_140wn8nk _140wn8n3 fyvr11tt fyvr12rt",emphasis:"_140wn8nl _140wn8n4 fyvr11tz fyvr12rt",raised:"_140wn8nm _140wn8n5 fyvr11tn fyvr12rt",danger:"_140wn8nn _140wn8n6 fyvr11on fyvr12o5",text:"_140wn8no _1qxj1ib9 _1qxj1ibf _1qxj1ib5 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 _140wn8n7 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11ob fyvr12s5"},shape:{circle:"_140wn8np _140wn8n8 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"_140wn8nq _140wn8n9 fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"_140wn8nr _140wn8na fyvr12ut fyvr12vh",false:"_140wn8ns _140wn8nb fyvr12uz fyvr12vt fyvr12vr"},size:{xs:"_140wn8nt _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc _140wn8nc fyvr1ws fyvr1yo",sm:"_140wn8nu _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8nd fyvr1ww fyvr1ys",md:"_140wn8nv _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8ne fyvr1x0 fyvr1yw",lg:"_140wn8nw _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8nf 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(Ht,{children:c})]}),u&&J.jsx(u,{size:M})]})})});var yO=zt({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"rhmai64 rhmai60 fyvr12vr fyvr12uz"},disabled:{true:"rhmai65"},outlined:{true:"rhmai66 rhmai61 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12n5 fyvr12ft fyvr1215 fyvr128h fyvr12nh fyvr12g5 fyvr121h fyvr128t"},blur:{true:"rhmai67 rhmai62 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:"_43lu9r5 _43lu9r0 fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r6 _43lu9r1 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r7 _43lu9r2 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"_43lu9r8 _43lu9r3 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(Ht,{variant:"small",color:"text100",hidden:i==="hidden",children:r}),n&&J.jsx(Ht,{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"})}),qO=({size:t="sm",...e})=>J.jsx(ue,{as:VO,className:oc({size:t}),...e});var HO=zt({defaultClassName:"_1c9x66f1 _1c9x66f0 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:[]}),WO=zt({defaultClassName:"_1c9x66f5 _1c9x66f4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12rt fyvr11rz",variantClassNames:{size:{sm:"_1c9x66f6",lg:"_1c9x66f7"}},defaultVariants:{},compoundVariants:[]});const GO=({size:t="sm"})=>J.jsx(NO,{className:WO({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:HO({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="_4j62fl0",aN="_4j62fl2 _4j62fl1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11h0 fyvr11ko fyvr11ob fyvr128 fyvr12uz fyvr11n2",lN="_4j62fl4 _4j62fl3 fyvr1ww fyvr1ys fyvr1so fyvr1v0 fyvr128",cN="_4j62fl5";const fN=t=>{const{className:e,children:r,defaultOpen:n,open:i,onOpenChange:s,label:o,...a}=t,[l,c]=S.useState(n),f=i??l,u=y=>{i===void 0&&c(y)},h=y=>{u(y),s==null||s(y)};return J.jsx(nN,{open:f,defaultOpen:n,onOpenChange:h,asChild:!0,children:J.jsxs(ue,{as:Sl.div,className:cn(e,oN),initial:{height:f?"auto":xw},animate:{height:f?"auto":xw},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...a,children:[J.jsxs(iN,{className:aN,children:[J.jsx(Ht,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:o}),J.jsx(ue,{as:Sl.div,position:"absolute",right:"0",marginRight:"4",initial:{rotate:f?180:0},animate:{rotate:f?180:0},transition:{ease:"linear",duration:.1},children:J.jsx(lC,{className:cN,color:"text50"})})]}),J.jsx(Z8,{children:f&&J.jsx(sN,{className:lN,asChild:!0,forceMount:!0,children:J.jsx(Sl.div,{initial:{opacity:f?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 W=F.target,G=[...f.branches].some(Z=>Z.contains(W));!M||G||(s==null||s(F),a==null||a(F),F.defaultPrevented||l==null||l())},y),z=gN(F=>{const W=F.target;[...f.branches].some(Z=>Z.contains(W))||(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,W=z/2-p[g]/2-1,G=ao(u[w],W),Z=ao(u[E],W),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 W,G;const oe=(((W=s.flip)==null?void 0:W.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 Wf(e,{...i,elementContext:"reference"}),o=Pw(s,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Iw(o)}}}case"escaped":{const s=await Wf(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 Wf(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 Wf(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),W=hn(l.bottom,0);u?I=h-2*(j!==0||z!==0?j+z:hn(l.left,l.right)):A=y-2*(F!==0||W!==0?F+W: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 qN(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=qN(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 HN(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 WN(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:HN,getDocumentElement:us,getClippingRect:QN,getOffsetParent:CC,getElementRects:e$,getClientRects:WN,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),W=$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(W.current)return W.current(I,M,Z);Z()}},[I,M,Z,W]);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),[W,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:qe,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",`${qe}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($),H=Nn(j);xn(()=>{m&&(H==null||H())},[m,H]);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(()=>{W&&Y(window.getComputedStyle(W).zIndex)},[W]),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 W=new CustomEvent(bv,x$);if(z.currentTarget.dispatchEvent(W),!W.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,`; - } - body { - overflow: hidden `).concat(n,`; - overscroll-behavior: contain; - `).concat([e&&"position: relative ".concat(n,";"),r==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(s,`px; - padding-right: `).concat(o,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(a,"px ").concat(n,`; - `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),` - } - - .`).concat(Id,` { - right: `).concat(a,"px ").concat(n,`; - } - - .`).concat(Rd,` { - margin-right: `).concat(a,"px ").concat(n,`; - } - - .`).concat(Id," .").concat(Id,` { - right: 0 `).concat(n,`; - } - - .`).concat(Rd," .").concat(Rd,` { - margin-right: 0 `).concat(n,`; - } - - body { - `).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 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 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 W=n.current||M;return fD(W,k,p,W==="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=H$(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,qC]=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,HC]=Ta(CD),dp="MenuItem",jw="menu.itemSelect",WC=S.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...i}=t,s=S.useRef(null),o=bD(dp,t.__scopeMenu),a=HC(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=HC(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(WC,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(WC,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,[qC]),Vm=qC();$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="_1k2mbvi4 _1k2mbvi3 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12wk fyvr12we fyvr11h0 fyvr11ko fyvr11jw fyvr12uz fyvr11n2 fyvr11hw fyvr12rz",XC="_1k2mbvi5";const UD=({children:t})=>J.jsx(YC,{className:XC,children:t});S.forwardRef(({className:t,children:e,...r},n)=>J.jsxs(jD,{className:cn(QC,t),...r,ref:n,children:[J.jsx(UD,{children:J.jsx(aC,{size:"xs"})}),J.jsx(Ht,{variant:"small",children:e})]}));S.forwardRef(({className:t,children:e,...r},n)=>J.jsxs(FD,{className:cn(QC,t),...r,ref:n,children:[J.jsx(YC,{className:XC,children:J.jsx(Ht,{children:"ā€¢"})}),J.jsx(Ht,{variant:"small",children:e})]}));const qm=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="_1hq71vk1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _1hq71vk0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12n5 fyvr12ft fyvr1215 fyvr128h fyvr12nn fyvr12gb fyvr121n fyvr128z fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",qD=zt({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"_1hq71vk6 _1hq71vk2 fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"_1hq71vk7 _1hq71vk3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"_1hq71vk8 _1hq71vk4 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]}),HD="_1hq71vka _1hq71vk9 fyvr12wh fyvr12wb fyvr11ho fyvr12vb fyvr1ko fyvr1oo fyvr1mo fyvr1qo";const WD={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=>WD[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(VD,qD({borderRadius:r})),children:[p?J.jsxs(ue,{flexDirection:"row",gap:"2",alignItems:"center",minWidth:"0",children:[J.jsx(Ht,{ellipsis:!0,children:p.name}),J.jsxs(Ht,{color:"text50",variant:"xsmall",whiteSpace:"nowrap",children:[p.size.toFixed(2)," kb"]})]}):J.jsx(Ht,{ellipsis:!0,children:f}),J.jsx(ue,{accept:E,as:"input",className:HD,cursor:"pointer",disabled:i,id:s??l,name:l,onChange:w,ref:g,type:"file",...h}),p&&J.jsx(qm,{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),Ho=(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:Ho(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:"_1vqx0w91 _1vqx0w90 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]}),hB=zt({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]});const vB=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:i,...s}=t;return J.jsx(ue,{className:hB({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...s,children:J.jsx(ue,{className:dB({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 Hm=["dark","light"],gB="dark",mB="data-theme",Vw="@sequence.theme",xB=t=>Hm.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&&Hm.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=>{Hm.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="_5b32m91 _5b32m90 fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11ni fyvr1ko fyvr1oo fyvr1qo fyvr1mo",kB="_5b32m93 _5b32m92 fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",AB=zt({defaultClassName:"_5b32m95 _5b32m94 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"]]}),_B="_5b32m9b _5b32m9a fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11ni";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:SB,children:[J.jsx(ue,{as:cB,asChild:!0,background:r,className:kB,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:AB({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(qm,{icon:Im,backdropFilter:"blur",size:"xs",className:_B,"aria-label":"Close"})})]},"modal-content")})]})})})};var PB="_1acm19y1 _1acm19y0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12rt fyvr1g0 fyvr118g",IB=zt({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"_1acm19y6 _1acm19y2 fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"_1acm19y7 _1acm19y3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"_1acm19y8 _1acm19y4 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]}),RB=zt({defaultClassName:"_1acm19ya _1acm19y9 fyvr1t4 fyvr1v0 fyvr12wh fyvr12wb fyvr11gw fyvr128 fyvr15o",variantClassNames:{numeric:{false:"_1acm19yb _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"_1acm19yc _1qxj1ib9 _1qxj1ibc _1qxj1ib2 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]});const Wm=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(PB,IB({borderRadius:i})),children:[f&&J.jsx(f,{size:"sm"}),J.jsx(ue,{as:r,autoComplete:n,spellCheck:"false",className:RB({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(Wm,{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",[UB,dE]=Br(uE),[zB,VB]=UB(uE),qB=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%)"}}))}),HB="RadioIndicator",WB=S.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...i}=t,s=VB(HB,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(qB,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(WB,Jt({},i,n,{ref:e}))}),rL=XB,nL=eL,iL=tL;var sL=zt({defaultClassName:"io59uy3 io59uy0 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr12nb fyvr12fz fyvr121b fyvr128n fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11ob fyvr12uz fyvr12uv fyvr12vj",variantClassNames:{size:{sm:"io59uy4 io59uy1 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy5 io59uy2 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]}),oL=zt({defaultClassName:"io59uy8 io59uy7 io59uy6 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12rt",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},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:sL({size:n}),value:i,id:e,disabled:s,children:J.jsx(iL,{className:oL({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 qw(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"],qh="Select",[Hh,Gm,fL]=Lh(qh),[uc,zY]=Br(qh,[fL,cc]),Km=cc(),[uL,Pa]=uc(qh),[dL,hL]=uc(qh),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,W]=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:W,open:j,onOpenChange:z,dir:M,triggerPointerDownPosRef:G,disabled:h},S.createElement(Hh.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=>W(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||"ā–¼")}),ql="SelectContent",bL=S.forwardRef((t,e)=>{const r=Pa(ql,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(Hh.Slot,{scope:t.__scopeSelect},S.createElement("div",null,t.children))),s):null}return S.createElement(wL,Ce({},t,{ref:e}))}),ji=10,[mE,Wh]=uc(ql),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(ql,r),[A,I]=S.useState(null),[M,j]=S.useState(null),z=Nt(e,B=>I(B)),[F,W]=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,...H]=oe().map(L=>L.ref.current),[ee]=H.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))}},H=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",H,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",H,{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),H=U.find(K=>K.ref.current===document.activeElement),ee=CE(U,B,H);ee&&setTimeout(()=>ee.ref.current.focus())}),d=S.useCallback((B,U,H)=>{const ee=!C.current&&!H;(E.value!==void 0&&E.value===U||ee)&&(W(B),ee&&(C.current=!0))},[E.value]),_=S.useCallback(()=>A==null?void 0:A.focus(),[A]),$=S.useCallback((B,U,H)=>{const ee=!C.current&&!H;(E.value!==void 0&&E.value===U||ee)&&Z(B)},[E.value]),m=n==="popper"?Hw:CL,N=m===Hw?{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(ql,r),o=Wh(ql,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(),W=s.valueNode.getBoundingClientRect(),G=w.getBoundingClientRect();if(s.dir!=="rtl"){const K=G.left-F.left,L=W.left-K,ne=z.left-L,Y=z.width+ne,ie=Math.max(Y,F.width),pe=window.innerWidth-ji,ve=qw(L,[ji,pe-ie]);a.style.minWidth=Y+"px",a.style.left=ve+"px"}else{const K=F.right-G.right,L=window.innerWidth-W.right-K,ne=window.innerWidth-z.right-L,Y=z.width+ne,ie=Math.max(Y,F.width),pe=window.innerWidth-ji,ve=qw(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,H=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)+H;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}}))))}),Hw=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(ql,{}),Ww="SelectViewport",kL=S.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=Wh(Ww,r),s=SL(Ww,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(Hh.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=Wh(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(Hh.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=Wh(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="gohwum1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 gohwum0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12rt fyvr118c fyvr11jw fyvr11n2 fyvr12uz",qL=zt({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"gohwum6 gohwum2 fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"gohwum7 gohwum3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"gohwum8 gohwum4 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]}),HL="gohwuma gohwum9 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11tt fyvr12rt fyvr11nj",WL="gohwume _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 gohwumd fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12wk fyvr12wl fyvr12we fyvr12wf fyvr11h0 fyvr11jw fyvr11ko fyvr12uz fyvr12uv fyvr12rt fyvr12vt fyvr12vj";const GL=S.forwardRef(({children:t,className:e,...r},n)=>J.jsx(UL,{className:cn(WL,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(VL,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:HL,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(qm,{icon:Im,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return J.jsx(Wm,{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,qY]=Br(EE);JL(EE);zt({defaultClassName:"nwwh3z7",variantClassNames:{variant:{pill:"nwwh3z8",line:"nwwh3z9 nwwh3z0 fyvr11g0"},active:{true:"nwwh3za nwwh3z1 fyvr12vx",false:"nwwh3zb"},disabled:{true:"nwwh3zc nwwh3z2 fyvr12vh"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"nwwh3z3 fyvr11u5 fyvr12sb"],[{active:!1,variant:"pill"},"nwwh3z4 fyvr11ob fyvr12rz"],[{active:!0,variant:"line"},"nwwh3z5 fyvr12rt"],[{active:!1,variant:"line"},"nwwh3z6 fyvr12rz"]]});const SE="Tabs",[YL,HY]=Br(SE,[fc]);fc();YL(SE);var QL="_1ppqbnx1 _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc _1ppqbnx0 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(Ht,{children:n})]})});const XL="ToastProvider",[ZL,WY,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:W,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(()=>(W(),()=>G()),[W,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="_15pztn1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _15pztn0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12rt fyvr128 fyvr11h0",pj="_15pztn2";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(yj,h&&pj),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:i,...y})})});var gj=zt({defaultClassName:"bnrreb5 bnrreb0 fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb6",sm:"bnrreb7",md:"bnrreb8",lg:"bnrreb9",xl:"bnrreba"},borderRadius:{circle:"bnrrebb bnrreb1 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"bnrrebc bnrreb2 fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"bnrrebd bnrreb3 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"bnrrebe bnrreb4 fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]}),mj="bnrrebf",xj="bnrrebh bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11sh fyvr128 fyvr15o fyvr11h0";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,gj({borderRadius:e,size:a})),style:i,flexShrink:"0",...l,children:s?J.jsx(ZC,{className:mj,disableAnimation:n,src:s}):J.jsx(Ht,{className:xj,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,H=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,qe=O[5]|0,Le=qe&8191,je=qe>>>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(H,at)|0,_=Math.imul(H,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(H,ct)|0,_=_+Math.imul(H,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(H,ut)|0,_=_+Math.imul(H,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(H,ht)|0,_=_+Math.imul(H,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(H,yt)|0,_=_+Math.imul(H,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(H,gt)|0,_=_+Math.imul(H,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(H,xt)|0,_=_+Math.imul(H,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(H,wt)|0,_=_+Math.imul(H,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(H,Et)|0,_=_+Math.imul(H,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(H,kt)|0,_=_+Math.imul(H,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 W;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")!=="eĢ")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 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 Wt(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 qr(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 q(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",q.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",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,{})),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,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 Hr=new q(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),Hr.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=V.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+uf.substring(0,t):Hr.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&&Hr.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&&Hr.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&&Hr.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&Hr.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&&Hr.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&&Hr.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)&&Hr.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&&Hr.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!==q.errors.INVALID_ARGUMENT)throw n}return Hr.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 q(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 q(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",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 Hi.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"?Hi.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",q.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 Hi 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"?Hi.fromString(e):Hi.fromObject(e)}static fromObject(e){if(Hi.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 Hi(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(Hi.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",q.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",q.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(m){return Object.prototype.toString.call(m)==="[object Array]"}),l&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(m){return typeof m=="object"&&m.buffer&&m.buffer.constructor===ArrayBuffer});for(var I=function(m,N,B){return function(U){return new d(m,N,m).update(U)[B]()}},M=function(m,N,B){return function(U,H){return new d(m,N,H).update(U)[B]()}},j=function(m,N,B){return function(U,H,ee,K){return v["cshake"+m].update(U,H,ee,K)[B]()}},z=function(m,N,B){return function(U,H,ee,K){return v["kmac"+m].update(U,H,ee,K)[B]()}},F=function(m,N,B,U){for(var H=0;H>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,H=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)<=H){for(this.start=Y-H,this.block=U[K],Y=0;Y>8,B=m&255;B>0;)H.unshift(B),m=m>>8,B=m&255,++U;return N?H.push(U):H.unshift(U),this.update(H),H.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,H=m.length;if(N)U=H;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),H=0)}return U&&(L=N[H],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,H=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[H],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,H,ee,K,L,ne,Y,ie,pe,ve,me,qe,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)H=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=H^(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^(H<<1|ee>>>31),B=pe^(ee<<1|H>>>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,qe=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]=qe^~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&qe,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^~qe&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",q.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function qE(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=qE(e,0);return r.consumed!==e.length&&hi.throwArgumentError("invalid rlp data","data",t),r.result}const Wj=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){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 HE(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)!==HE(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 WE(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"+HE("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(Wt(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(Wt(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 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 e9=Object.freeze({error:cF,ignore:ZE,replace:fF});function rx(t,e){e==null&&(e=e9.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 t9(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=t9("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=t9("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 q(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",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 xe(Ue(t))}const r9="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,W=(W^y)<<1|y|1;E=F,A=1+W-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(n9(e))}function jF(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function i9(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=i9(i.length,1+t,e);return n9(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 i9(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(),qF=new Set(U0(Yh)),HF=new Set(U0(Yh)),WF=LF(Yh),GF=zF(Yh),y6=45,p6=95;function s9(t){return F0(t)}function KF(t){return t.filter(e=>e!=65039)}function o9(t){for(let e of t.split(".")){let r=s9(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 o9(YF(t,KF))}function YF(t,e){let r=s9(t).reverse(),n=[];for(;r.length;){let i=XF(r);if(i){n.push(...e(i));continue}let s=r.pop();if(qF.has(s)){n.push(s);continue}if(HF.has(s))continue;let o=WF[s];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${s.toString(16).toUpperCase()}`)}return o9(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(r9),a9=new Uint8Array(32);a9.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=a9;const r=lx(t);for(;r.length;)e=xe(Ke([e,xe(r.pop())]));return Q(e)}function l9(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 q(r9),c9=new Uint8Array(32);c9.fill(0);const nU=V.from(-1),f9=V.from(0),u9=V.from(1),iU=V.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function sU(t){const e=X(t),r=e.length%32;return r?qr([e,c9.slice(r)]):Q(e)}const oU=Je(u9.toHexString(),32),aU=Je(f9.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(u9).mul(nU):f9;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(qr(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),qr(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 qr(["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 q(mu);class d9 extends Ra{}class h9 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 Wt(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,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&&Bt.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"?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",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,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 h9({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 d9({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),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 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 v9{constructor(){Sn.checkAbstract(new.target,v9),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",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 Ye(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(),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,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 y9={},Me={},xu=p9;function p9(t,e){if(!t)throw new Error(e||"Assertion failed")}p9.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=g9;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,qU=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 Hl=Me,QU=dc,XU=Di,Mv=Hl.rotl32,Rc=Hl.sum32,ZU=Hl.sum32_5,ez=XU.ft_1,E9=QU.BlockHash,tz=[1518500249,1859775393,2400959708,3395469782];function Oi(){if(!(this instanceof Oi))return new Oi;E9.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Hl.inherits(Oi,E9);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,Wz=Cn.getJSF,q0=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){q0(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];q0(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=Wz(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][W-1>>1]:W<0&&(h=a[u][-W-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 $9=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")},D9=Cn.assert;function Dn(t){if(!(this instanceof Dn))return new Dn(t);typeof t=="string"&&(D9(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 $9({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 $9({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){D9((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 q(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 B9(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: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(Wt(xe(Wt(e,1)),12))}function wa(t,e){return Xs(B9(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 L9(t){return Oa(t).map(e=>[e.address,e.storageKeys])}function j9(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",L9(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 qr(["0x02",xa(r)])}function F9(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",L9(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 qr(["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 F9(t,e);case 2:return j9(t,e)}return Or.throwError(`unsupported transaction type: ${t.type}`,q.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function U9(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),U9(i,e.slice(9),j9)),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),U9(r,e.slice(8),F9)),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 z9(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 H0(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",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 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 H0(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",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=Ye({override:H0(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",q.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),c.override})):n.from=t.signer.getAddress():n.from&&(n.from=H0(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(",")}`,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 V9(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?V9(t,e,r):hV(t,e)}function q9(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(q9(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",H0(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",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&&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,V9(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",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&&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(q9(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"&&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 H9{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(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(J9(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 J9(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=K9(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]&K9(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 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",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 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 Y9={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],W=[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=$,H;U<_;){if(H=m[$-1],m[0]^=h[H>>16&255]<<24^h[H>>8&255]<<16^h[H&255]<<8^h[H>>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];H=m[$/2-1],m[$/2]^=h[H&255]^h[H>>8&255]<<8^h[H>>16&255]<<16^h[H>>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[H>>16&255]^F[H>>8&255]^W[H&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,H,ee,K,L;for(H=0;H<16;H++)ee=x+H*4,W[H]=(O[ee]&255)<<24|(O[ee+1]&255)<<16|(O[ee+2]&255)<<8|O[ee+3]&255;for(H=16;H<64;H++)U=W[H-2],K=(U>>>17|U<<15)^(U>>>19|U<<13)^U>>>10,U=W[H-15],L=(U>>>7|U<<25)^(U>>>18|U<<14)^U>>>3,W[H]=(K+W[H-7]|0)+(L+W[H-16]|0)|0;for(H=0;H<64;H++)K=((($>>>6|$<<26)^($>>>11|$<<21)^($>>>25|$<<7))+($&m^~$&N)|0)+(B+(k[H]+W[H]|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,W,(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(W,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(W,G,Z){if(W)z(W);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})()})(Z9);var BV=Z9.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 q(Q9);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 e7(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",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),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!==q.errors.INVALID_ARGUMENT||p.argument!=="wordlist")throw p}}return new jV(a)}function t7(t,e,r,n,i){return X(yx(t,e,r,n,i))}function UV(t,e,r,n,i){return Promise.resolve(t7(t,e,r,n,i))}function r7(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=r7(r,e,t7,bx.syncScrypt);return e7(r,n)}function VV(t,e,r){return LV(this,void 0,void 0,function*(){const n=JSON.parse(t),i=yield r7(n,e,UV,bx.scrypt,r);return e7(n,i)})}function qV(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 W=xi(16),G=new bi.Counter(W),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(W).substring(2),mnemonicCiphertext:Q(oe).substring(2),path:a,locale:l,version:"0.1"}}return JSON.stringify(F)})}function HV(t,e,r){if(mx(t)){r&&r(0);const n=X9(t,e);return r&&r(1),Promise.resolve(n)}return xx(t)?VV(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function WV(t,e){if(mx(t))return X9(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&&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",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={}),qV(this,e,r,n)}static createRandom(e){let r=xi(16);e||(e={}),e.extraEntropy&&(r=X(Wt(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 HV(e,r,n).then(i=>new Ja(i))}static fromEncryptedJsonSync(e,r){return new Ja(WV(e,r))}static fromMnemonic(e,r,n){return r||(r=Yl),new Ja(dn.fromMnemonic(e,null,n).derivePath(r))}};function n7(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 qi(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 qi(r)},e}function W0(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return W0(t,n)},r}const B6={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:qi("homestead")},L6={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:qi("ropsten")},j6={chainId:63,name:"classicMordor",_defaultProvider:W0("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:qi("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:qi("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:qi("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:qi("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:W0("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:j6,classicTestnet:j6,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:W0("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:qi("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:qi("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 eq(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 tq="web/5.7.1";var rq=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 nq(t,e){return rq(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 iq=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 Hn=new q(tq);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 sq(t){return Ue(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function i7(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;Hn.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;Hn.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)&&Hn.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&&Hn.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(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]):sq(y[3])};let E=w.body;return r&&(E=r(w.body,w)),Promise.resolve(E)}catch(w){Hn.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(Hn.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 iq(this,void 0,void 0,function*(){for(let w=0;w=300)&&(p.cancel(),Hn.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){Hn.throwError("invalid JSON",q.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 i7(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 s7(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=s7(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 o7(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=s7(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 aq(){var t=o7.apply(null,arguments);if(typeof t=="object")return t}function lq(t){var e=o7.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(Wt(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 z9(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 q(Cu),vq=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 yq(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 q6(t){return new Promise(e=>{setTimeout(e,t)})}const pq=["block","network","pending","poll"];let gq=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=yq(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||pq.indexOf(this.tag)>=0}};const mq={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 H6(t){return Kl.encode(Ke([t,Wt(cs(cs(t)),0,4)]))}const a7=new RegExp("^(ipfs)://(.*)$","i"),W6=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),a7,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(Wt(t,e,e+32)).toNumber(),n=V.from(Wt(t,r,r+32)).toNumber();return Wt(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 xq(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function l7(t){const e=[];let r=0;for(let n=0;nV.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 we(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:qr([e,df(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=qr(["0x9061b923",l7([l9(this.name),n.data])]));try{let s=yield this.provider.call(n);return X(s).length%32===4&&Ae.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 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=mq[String(e)];if(n==null&&Ae.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 H6(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 H6(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===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&&Ae.throwError("invalid or unsupported coin data",q.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",q.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,bq=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",q.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===q.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return zv==null&&(zv=new fe),zv}static getNetwork(e){return eq(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}`,q.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(", ")}`,q.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=bq++,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",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 we(this,void 0,void 0,function*(){return Ae.throwError("provider does not support network detection",q.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 q6(0),this._network;const n=Ae.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 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 q6(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",q.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",q.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",q.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",q.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",q.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",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&&Ae.throwError("Transaction hash mismatch from Provider.sendTransaction.",q.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",q.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>=vq&&Ae.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=Wt(s,4),a=Wt(o,0,32);V.from(a).eq(i)||Ae.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=V.from(Wt(o,32,64)).toNumber(),f=V.from(Wt(o,c,c+32)).toNumber(),u=Wt(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",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 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!==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 Ae.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 gq(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),wq=["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 c7(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}),wq.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 Cq(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 f7 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",q.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Eq(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}))),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",q.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),c7("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"?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",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"?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",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 Eq extends f7{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 Sq={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",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 f7(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),Cq).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",q.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return c7(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(Sq);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 kq=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 Aq=new q(Cu);class K0 extends $a{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return kq(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||Aq.throwError("no network detected",q.errors.UNKNOWN_ERROR,{}),this._network==null&&(re(this,"_network",r),this.emit("network",r,null))),r})}}const J6=new q(Cu);let _q=1;function Y6(t,e){const r="Web3LegacyFetcher";return function(n,i){const s={method:n,params:i,id:_q++,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 Tq(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 Pq 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=Tq(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 Iq="solidity/5.7.0",Rq=new RegExp("^bytes([0-9]+)$"),Mq=new RegExp("^(u?int)([0-9]*)$"),Oq=new RegExp("^(.*)\\[([0-9]*)\\]$"),Nq="0000000000000000000000000000000000000000000000000000000000000000",Ya=new q(Iq);function u7(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(Mq);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(Rq),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+Nq).substring(0,66)):e}if(n=t.match(Oq),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(u7(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(u7(n,e[i]))}),Q(Ke(r))}function Zs(t,e){return xe(ke(t,e))}function $q(t,e){return cs(ke(t,e))}const Dq="units/5.7.0",d7=new q(Dq),h7=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Bq(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&d7.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 v7(t,e){if(typeof e=="string"){const r=h7.indexOf(e);r!==-1&&(e=3*r)}return Od(t,e??18)}function J0(t,e){if(typeof t!="string"&&d7.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=h7.indexOf(e);r!==-1&&(e=3*r)}return fi(t,e??18)}function Lq(t){return v7(t,18)}function Op(t){return J0(t,18)}const jq=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:sx,ConstructorFragment:Qn,ErrorFragment:Hi,EventFragment:gi,FormatTypes:$e,Fragment:mi,FunctionFragment:Xn,HDNode:dn,Indexed:z0,Interface:ir,LogDescription:d9,Logger:q,ParamType:fr,RLP:Wj,SigningKey:sa,get SupportedAlgorithm(){return Jl},TransactionDescription:h9,get TransactionTypes(){return Ap},get UnicodeNormalizationForm(){return Mi},Utf8ErrorFuncs:e9,get Utf8ErrorReason(){return Zr},_TypedDataEncoder:er,_fetchData:i7,_toEscapedUtf8String:uF,accessListify:Oa,arrayify:X,base58:Kl,base64:IF,checkProperties:Qm,checkResultErrors:UE,commify:Bq,computeAddress:Xs,computeHmac:tu,computePublicKey:hx,concat:Ke,deepCopy:Ri,defaultAbiCoder:Kr,defaultPath:Yl,defineReadOnly:re,dnsEncode:l9,entropyToMnemonic:n1,fetchJson:wu,formatBytes32String:dF,formatEther:Lq,formatUnits:v7,getAccountPath:TV,getAddress:Se,getContractAddress:ex,getCreate2Address:Qj,getIcapAddress:Yj,getJsonWalletAddress:DV,getStatic:Zn,hashMessage:Qh,hexConcat:qr,hexDataLength:Ii,hexDataSlice:Wt,hexStripZeros:ME,hexValue:ni,hexZeroPad:Je,hexlify:Q,id:Fs,isAddress:WE,isBytes:ds,isBytesLike:os,isHexString:Ie,isValidMnemonic:_V,isValidName:eU,joinSignature:mp,keccak256:xe,mnemonicToEntropy:r1,mnemonicToSeed:J9,namehash:df,nameprep:AF,parseBytes32String:hF,parseEther:Op,parseTransaction:z9,parseUnits:J0,poll:Zo,randomBytes:xi,recoverAddress:wa,recoverPublicKey:B9,resolveProperties:Ye,ripemd160:W9,serializeTransaction:_p,sha256:cs,sha512:mV,shallowCopy:nr,shuffled:RV,solidityKeccak256:Zs,solidityPack:ke,soliditySha256:$q,splitSignature:Ia,stripZeros:ki,toUtf8Bytes:Ue,toUtf8CodePoints:F0,toUtf8String:vs,verifyMessage:n7,verifyTypedData:QV,zeroPad:cf},Symbol.toStringTag,{value:"Module"})),Fq=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var Uq=Object.freeze({__proto__:null,abi:Fq});const zq=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],Vq={isValidSignatureBytes32:"0x1626ba7e"};var qq=Object.freeze({__proto__:null,abi:zq,returns:Vq});const Hq=[{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 Wq=Object.freeze({__proto__:null,abi:Hq});const Gq=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var Kq=Object.freeze({__proto__:null,abi:Gq});const Jq=[{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 Yq=Object.freeze({__proto__:null,abi:Jq});const Qq=[{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 Xq=Object.freeze({__proto__:null,abi:Qq});const Zq=[{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 eH=Object.freeze({__proto__:null,abi:Zq});const tH=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var rH=Object.freeze({__proto__:null,abi:tH});const mr={erc6492:Wq,erc5719:Uq,erc1271:qq,factory:Kq,mainModule:Yq,mainModuleUpgradable:Xq,sequenceUtils:eH,requireFreshSigner:rH},nH=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 y7{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 fH=Object.freeze(Object.defineProperty({__proto__:null,API:y7,SequenceAPIClient:Fd,SmartRampOrderStatus:aH,SmartRampTxnStatus:lH,SortOrder:cH,WebRPCSchemaHash:oH,WebRPCSchemaVersion:sH,WebRPCVersion:iH},Symbol.toStringTag,{value:"Module"})),p7="3.7.5",uH=p7,dH=typeof atob=="function",hH=typeof btoa=="function",pc=typeof Buffer=="function",X6=typeof TextDecoder=="function"?new TextDecoder:void 0,Z6=typeof TextEncoder=="function"?new TextEncoder:void 0,vH="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Hc=Array.prototype.slice.call(vH),hd=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(Hc),yH=/^(?:[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)),g7=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),m7=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),x7=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+=Hc[e>>18&63]+Hc[e>>12&63]+Hc[e>>6&63]+Hc[e&63]}return o?s.slice(0,o-3)+"===".substring(o):s},Cx=hH?t=>btoa(t):pc?t=>Buffer.from(t,"binary").toString("base64"):x7,Np=pc?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;ne?g7(Np(t)):Np(t),pH=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)}},gH=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,b7=t=>t.replace(gH,pH),t5=pc?t=>Buffer.from(t,"utf8").toString("base64"):Z6?t=>Np(Z6.encode(t)):t=>Cx(b7(t)),Il=(t,e=!1)=>e?g7(t5(t)):t5(t),r5=t=>Il(t,!0),mH=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,xH=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))}},w7=t=>t.replace(mH,xH),C7=t=>{if(t=t.replace(/\s+/g,""),!yH.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=dH?t=>atob(m7(t)):pc?t=>Buffer.from(t,"base64").toString("binary"):C7,E7=pc?t=>e5(Buffer.from(t,"base64")):t=>e5(Ex(t).split("").map(e=>e.charCodeAt(0))),S7=t=>E7(k7(t)),bH=pc?t=>Buffer.from(t,"base64").toString("utf8"):X6?t=>X6.decode(E7(t)):t=>w7(Ex(t)),k7=t=>m7(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),$p=t=>bH(k7(t)),wH=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)},A7=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),_7=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,A7(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 S7(this)})},T7=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,A7(r));t("toBase64",function(e){return Ud(this,e)}),t("toBase64URI",function(){return Ud(this,!0)}),t("toBase64URL",function(){return Ud(this,!0)})},CH=()=>{_7(),T7()},Ea={version:p7,VERSION:uH,atob:Ex,atobPolyfill:C7,btoa:Cx,btoaPolyfill:x7,fromBase64:$p,toBase64:Il,encode:Il,encodeURI:r5,encodeURL:r5,utob:b7,btou:w7,decode:$p,isValid:wH,fromUint8Array:Ud,toUint8Array:S7,extendString:_7,extendUint8Array:T7,extendBuiltins:CH};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}(),SH=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}},kH=function(t,e,r){return Wo(void 0,void 0,void 0,function(){var n,i;return Go(this,function(s){return n=r.messageDigest(),i=n7(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}]})})},AH=function(t,e,r){return Wo(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===_H?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},_H="0x1626ba7e",P7="1",Bp="eth",TH={name:"ETHAuth",version:P7},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),Wo(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),Wo(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 Wo(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),IH=t=>{if(t!=null)return Ea.decode(t)},Ax=t=>{if(t!=null)return JSON.parse(Ea.decode(t))};function I7(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)),R7=(t,e,r)=>ke(["string","uint256","address","bytes32"],["",e,t,r]),Lp=(t,e,r)=>xe(R7(t,e,r)),M7=()=>typeof window>"u"&&typeof process=="object",RH=()=>!M7(),O7=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 MH=class{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...i){e=`${e}:${xe(Ue(JSON.stringify(i,OH)))}`;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 OH(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 NH(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function $H(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),D7=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},B7=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},L7=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},DH=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),j7=t=>{const e=X0({},t.types);return delete e.EIP712Domain,er.hash(t.domain,e,t.message)},Eu=t=>X(j7(t)),{defineReadOnly:BH,getStatic:LH,resolveProperties:jH,checkProperties:FH,shallowCopy:UH,deepCopy:zH}=jq,VH=t=>t.replace(/([^:]\/)\/+/g,"$1"),qH=Object.freeze(Object.defineProperty({__proto__:null,Logger:N7,PromiseCache:MH,base64Decode:IH,base64DecodeObject:Ax,base64Encode:PH,base64EncodeObject:kx,checkProperties:FH,configureLogger:$7,deepCopy:zH,defineReadOnly:BH,encodeMessageDigest:_x,encodeTypedDataDigest:Eu,encodeTypedDataHash:j7,getEthersConnectionInfo:iu,getRandomInt:Px,getStatic:LH,isBigNumberish:I7,isBrowser:RH,isNode:M7,jwtDecodeClaims:O7,logger:ye,packMessageData:R7,promisify:Tx,queryStringFromObject:NH,queryStringToObject:$H,resolveProperties:jH,sanitizeAlphanumeric:B7,sanitizeHost:L7,sanitizeNumberString:D7,shallowCopy:UH,sleep:DH,subDigestOf:Lp,urlClean:VH},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(),WH=t=>{if(t)return F7(t)},U7=(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(U7(t,!0,e),t),GH=(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},KH=(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)}},V7=t=>z7(q7(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}},JH=(t,e)=>t?t.name===e||t.chainId===e:!1,YH=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})):"",H7=t=>s1("https://${network}-indexer.sequence.app",{network:t}),W7=t=>s1("https://${network}-relayer.sequence.app",{network:t}),G7=t=>s1("https://nodes.sequence.app/${network}",{network:t});function Ix(t){return ii(Ql,t)}function K7(t){return V.isBigNumber(t)?t:I7(t)?V.from(t):V.from(t.chainId)}const Yt=t=>{const e=G7(t);return{rpcUrl:e,relayer:{url:W7(t),provider:{url:e}},indexerUrl:H7(t)}},Ql=V7([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=J7(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(i){r(i,void 0)}}}const J7=(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 Y7(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 Q7(t){return t!==void 0&&t.sendAsync!==void 0}let QH=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,Y7(e)?this.send=e.send.bind(e):Q7(e)?this.send=(n,i,s)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:Xl,id:++QH,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 XH{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 ZH{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 X7{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 Z7=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)},eW=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 tW{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 rW{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 nW 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),iW).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 X7({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 iW(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 sW=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:ZH,CachedProvider:Mx,ChainId:te,EagerProvider:X7,JsonRpcExternalProvider:XH,JsonRpcProvider:nW,JsonRpcRouter:Rx,JsonRpcSender:Z0,JsonRpcVersion:Xl,NetworkType:Fe,PublicProvider:rW,SigningProvider:tW,SingleflightMiddleware:rS,allNetworks:Ql,allowProviderMiddleware:jp,checkNetworkConfig:JH,createJsonRpcMiddlewareStack:J7,ensureUniqueNetworks:GH,ensureValidNetworks:z7,exceptionProviderMiddleware:Z7,findNetworkConfig:ii,findSupportedNetwork:Ix,getChainId:F7,indexerURL:H7,isJsonRpcHandler:Q7,isJsonRpcProvider:Y7,isNetworkConfig:HH,isValidNetworkConfig:U7,loggingProviderMiddleware:eS,maybeChainId:WH,networkProviderMiddleware:eW,networks:It,networksIndex:YH,nodesURL:G7,relayerURL:W7,sortNetworks:q7,stringTemplate:s1,toChainIdNumber:K7,updateNetworkConfig:KH,validateAndSortNetworks:V7},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 vW=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 yW=Object.freeze({__proto__:null,ConfigCoder:Bx});const cS=1,fS={version:cS,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Wi=Object.freeze({__proto__:null,config:yW,signature:vW,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 pW(t){return hS(t)!==void 0}var gW=Object.freeze({__proto__:null,SetImageHashPrefix:Lx,hashSetImageHash:uS,messageSetImageHash:dS,decodeMessageSetImageHash:hS,isMessageSetImageHash:pW});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 mW=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 xW(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 bW(t){const e=[];let r=t;for(;!Vx(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function wW(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function qx(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 CW(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 Hx(t){if(t.length===0)throw new Error("Empty members array");return CS(t,Hx).reduce((r,n)=>({left:r,right:n}))}function Wx(t){if(t.length===0)throw new Error("Empty members array");const e=CS(t,Wx);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?Wx(t):Hx(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=>qx(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 EW=Object.freeze({__proto__:null,isSignerLeaf:Gr,isSubdigestLeaf:ys,topologyToJSON:Cf,topologyFromJSON:Ef,isNestedLeaf:ps,isNodeLeaf:gs,isLeaf:Vx,isNode:ai,isTopology:xW,encodeSignerLeaf:mS,decodeSignerLeaf:xS,isEncodedSignerLeaf:bS,hashNode:Tn,leftFace:bW,isWalletConfig:wW,imageHash:qx,isSimpleNestedMember:wS,topologyToMembers:Rl,hasUnknownNodes:Up,toSimpleWalletConfig:CW,legacyTopologyBuilder:Hx,merkleTopologyBuilder:Wx,optimized2SignersTopologyBuilder:Gx,toWalletConfig:ES,hasSubdigest:nh,signersOf:zp,isComplete:ih,ConfigCoder:c1}),SW=Object.freeze({__proto__:null});const kW={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:EW,signature:mW,context:SW,chained:gW,coders:kW,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(Wt(n,12))}async function AW(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 _W(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 TW(t){const e=Object.keys(t).length;return t[e]}const PW={1:fS,2:kS};var IW=Object.freeze({__proto__:null,addressOf:Vp,isValidCounterfactual:AW,isValidVersionedContext:_W,latestContext:TW,defaultContexts:PW});const f1=`tuple( - bool delegateCall, - bool revertOnError, - uint256 gasLimit, - address target, - uint256 value, - bytes data -)[]`;function RW(t,e,r,n){return Sr({},t,{chainId:r,intent:{id:n,wallet:e}})}function MW(t){return xe(Kr.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function OW(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 NW(t,e,r,n){return Su({address:t,chainId:e,digest:_S(r,n)})}function $W(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 DW(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function BW(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 LW(t){const e=V.from(t),r=YE.pow(V.from(96));return[e.div(r),e.mod(r)]}function jW(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 FW(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 -)[]`,qp=(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(...qp(i.to,a.map(l=>Sr({},l,{to:l.target}))))}else try{const o=n.decodeFunctionData("execute",s)[0],a=qp(t,o.map(l=>Sr({},l,{to:l.target})));r.push(...a)}catch{r.push(i)}}return r};var UW=Object.freeze({__proto__:null,MetaTransactionsType:f1,intendTransactionBundle:RW,intendedTransactionID:MW,unpackMetaTransactionsData:OW,packMetaTransactionsData:AS,digestOfTransactions:_S,subdigestOfTransactions:NW,subdigestOfGuestModuleTransactions:$W,toSequenceTransactions:TS,toSequenceTransaction:Kx,isSequenceTransaction:u1,hasSequenceTransactions:PS,sequenceTxAbiEncode:su,fromTxAbiEncode:DW,encodeNonce:BW,decodeNonce:LW,fromTransactionish:jW,isTransactionBundle:IS,isSignedTransactionBundle:RS,encodeBundleExecData:FW,selfExecuteSelector:MS,selfExecuteAbi:OS,unwind:qp});const NS="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",zW="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 VW=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:NS,EIP_6492_SUFFIX:zW,validateEIP6492Offchain:$S});class qW{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 HW=Object.freeze({__proto__:null,OnChainReader:qW});function WW(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var ce=Object.freeze({__proto__:null,config:oW,signature:aW,context:IW,signer:hW,EIP1271:fW,transaction:UW,reader:HW,EIP6492:VW,isWalletSignRequestMetadata:WW});const Hp=[{config:Bx,signature:Dx},{config:c1,signature:l1}];function DS(t){const e=t-1;if(e<0||e>=Hp.length)throw new Error(`No coder for version: ${t}`);return Hp[e]}function GW(t){return DS(t)}var Er=Object.freeze({__proto__:null,ALL_CODERS:Hp,coderFor:DS,genericCoderFor:GW});const BS=[Wi,_e],KW=Object.freeze(Object.defineProperty({__proto__:null,allVersions:BS,commons:ce,universal:Er,v1:Wi,v2:_e},Symbol.toStringTag,{value:"Module"}));function JW(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"),He({},n)).then(i=>We(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),He({},n)).then(i=>We(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),He({},n)).then(i=>We(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),He({},n)).then(i=>We(i).then(s=>({data:s.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),He({},n)).then(i=>We(i).then(s=>({chainID:s.chainID}))),this.sendMetaTxn=(n,i)=>this.fetch(this.url("SendMetaTxn"),He(n,i)).then(s=>We(s).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,i)=>this.fetch(this.url("GetMetaTxnNonce"),He(n,i)).then(s=>We(s).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,i)=>this.fetch(this.url("GetMetaTxnReceipt"),He(n,i)).then(s=>We(s).then(o=>({receipt:o.receipt}))),this.simulate=(n,i)=>this.fetch(this.url("Simulate"),He(n,i)).then(s=>We(s).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,i)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),He(n,i)).then(s=>We(s).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),He({},n)).then(i=>We(i).then(s=>({isFeeRequired:s.isFeeRequired,tokens:s.tokens}))),this.feeOptions=(n,i)=>this.fetch(this.url("FeeOptions"),He(n,i)).then(s=>We(s).then(o=>({options:o.options,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,i)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),He(n,i)).then(s=>We(s).then(o=>({options:o.options}))),this.sentTransactions=(n,i)=>this.fetch(this.url("SentTransactions"),He(n,i)).then(s=>We(s).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,i)=>this.fetch(this.url("PendingTransactions"),He(n,i)).then(s=>We(s).then(o=>({page:o.page,transactions:o.transactions}))),this.getGasTank=(n,i)=>this.fetch(this.url("GetGasTank"),He(n,i)).then(s=>We(s).then(o=>({gasTank:o.gasTank}))),this.addGasTank=(n,i)=>this.fetch(this.url("AddGasTank"),He(n,i)).then(s=>We(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.updateGasTank=(n,i)=>this.fetch(this.url("UpdateGasTank"),He(n,i)).then(s=>We(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.getGasSponsor=(n,i)=>this.fetch(this.url("GetGasSponsor"),He(n,i)).then(s=>We(s).then(o=>({gasSponsor:o.gasSponsor}))),this.listGasSponsors=(n,i)=>this.fetch(this.url("ListGasSponsors"),He(n,i)).then(s=>We(s).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,i)=>this.fetch(this.url("AddGasSponsor"),He(n,i)).then(s=>We(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,i)=>this.fetch(this.url("UpdateGasSponsor"),He(n,i)).then(s=>We(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.removeGasSponsor=(n,i)=>this.fetch(this.url("RemoveGasSponsor"),He(n,i)).then(s=>We(s).then(o=>({status:o.status}))),this.reportGasSponsorUsage=(n,i)=>this.fetch(this.url("ReportGasSponsorUsage"),He(n,i)).then(s=>We(s).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.nextGasTankBalanceAdjustmentNonce=(n,i)=>this.fetch(this.url("NextGasTankBalanceAdjustmentNonce"),He(n,i)).then(s=>We(s).then(o=>({nonce:o.nonce}))),this.adjustGasTankBalance=(n,i)=>this.fetch(this.url("AdjustGasTankBalance"),He(n,i)).then(s=>We(s).then(o=>({status:o.status,adjustment:o.adjustment}))),this.getGasTankBalanceAdjustment=(n,i)=>this.fetch(this.url("GetGasTankBalanceAdjustment"),He(n,i)).then(s=>We(s).then(o=>({adjustment:o.adjustment}))),this.listGasTankBalanceAdjustments=(n,i)=>this.fetch(this.url("ListGasTankBalanceAdjustments"),He(n,i)).then(s=>We(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 He=(t={},e={})=>({method:"POST",headers:ho({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),We=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 qS{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 HS(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:qS,RpcRelayerProto:Zl,isLocalRelayerOptions:rG,isProviderRelayerOptions:tG,isRelayer:HS,isRpcRelayerOptions:dG,proto:Zl},Symbol.toStringTag,{value:"Module"}));function WS(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:WS,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=>WS(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 HS(r.relayer)?r.relayer:new qS(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 qG(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function HG(t){return t.startsWith("ipfs://")}class WG{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=>HG(n)?qG(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(qv(this),e,...r);return tk.set(n,e.sort?e.sort():[e]),ro(n)}:XG().includes(t)?function(...e){return t.apply(qv(this),e),ro(ek.get(this))}:function(...e){return ro(t.apply(qv(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 qv=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"],Hv=new Map;function f5(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Hv.get(e))return Hv.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 Hv.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(Wi.config.ConfigCoder.isWalletConfig(o)){const a=Wi.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 W=_e.signature.SignatureCoder.encodeSigners(c,F,[],0);W.weight.lt(c.threshold)||(p={nextImageHash:j,checkpoint:V.from(I.checkpoint),signature:W.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 WG(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=Wi.signature.SignatureCoder.decode(r.tx.signature),g=await Wi.signature.SignatureCoder.recover(y,c,this.provider),p=Wi.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 Wv=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=>qn(i).then(s=>({}))),this.config=(n,i)=>this.fetch(this.url("Config"),Vn(n,i)).then(s=>qn(s).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,i)=>this.fetch(this.url("Wallets"),Vn(n,i)).then(s=>qn(s).then(o=>({wallets:o.wallets}))),this.deployHash=(n,i)=>this.fetch(this.url("DeployHash"),Vn(n,i)).then(s=>qn(s).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,i)=>this.fetch(this.url("ConfigUpdates"),Vn(n,i)).then(s=>qn(s).then(o=>({updates:o.updates}))),this.migrations=(n,i)=>this.fetch(this.url("Migrations"),Vn(n,i)).then(s=>qn(s).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,i)=>this.fetch(this.url("SaveConfig"),Vn(n,i)).then(s=>qn(s).then(o=>({}))),this.saveWallet=(n,i)=>this.fetch(this.url("SaveWallet"),Vn(n,i)).then(s=>qn(s).then(o=>({}))),this.saveSignature=(n,i)=>this.fetch(this.url("SaveSignature"),Vn(n,i)).then(s=>qn(s).then(o=>({}))),this.saveSignerSignatures=(n,i)=>this.fetch(this.url("SaveSignerSignatures"),Vn(n,i)).then(s=>qn(s).then(o=>({}))),this.saveMigration=(n,i)=>this.fetch(this.url("SaveMigration"),Vn(n,i)).then(s=>qn(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||{})}),qn=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 Wv.EIP712:a+=Q(ce.signer.SigType.EIP712).slice(2);break;case Wv.EthSign:a+=Q(ce.signer.SigType.ETH_SIGN).slice(2);break;case Wv.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(Wi.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:qd(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function qd(t){return _e.config.isNode(t)?{left:qd(t.left),right:qd(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:qd(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:Hd(e.tree)});default:throw new Error(`unknown version ${t}`)}}function Hd(t){switch(typeof t){case"object":const e=vo({},t);return e.left!==void 0&&(e.left=Hd(e.left)),e.right!==void 0&&(e.right=Hd(e.right)),e.tree!==void 0&&(e.tree=Hd(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 Wc(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 Wc(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 Wc(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 Wc(this.trackers.map(l=>l.loadPresignedConfiguration(e)),[]),s=(await Wc(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:Wc,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=K7(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 W;return I&&(W=new d5(F,I),W.auth(),W.onAuth(G=>{G.status==="fulfilled"&&F.setJwt(G.value)})),new Sf(E,w,F,W)}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({},Wd,n);let u;if(ck(r)){var h,y,g;const I=r.config.address||ce.context.addressOf(a[1],Wi.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:Wd,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(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 H=0;H<$;H++){if(m=_[H],!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 H(){d&&(d=null),_&&(clearTimeout(_),_=0)}var ee=function(L){H(),N(L)},K=function(L){H(),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"&&(qe=W(x,T,R[K],b+1,d),qe&&(ee?ee.push.apply(ee,qe):ee=qe));return ee}else if(pe==="**"){for(ie=b+1===d||b+2===d&&ve==="*",ie&&R._listeners&&(ee=W(x,T,R,d,d)),me=u(R),m=me.length;m-- >0;)K=me[m],K!=="_listeners"&&(K==="*"||K==="**"?(R[K]._listeners&&!ie&&(qe=W(x,T,R[K],d,d),qe&&(ee?ee.push.apply(ee,qe):ee=qe)),qe=W(x,T,R[K],b,d)):K===ve?qe=W(x,T,R[K],b+2,d):qe=W(x,T,R[K],b,d),qe&&(ee?ee.push.apply(ee,qe):ee=qe));return ee}else R[pe]&&(ee=W(x,T,R[pe],b+1,d));if(L=R["*"],L&&W(x,T,L,b+1,d),ne=R["**"],ne)if(b0;)K=me[m],K!=="_listeners"&&(K===ve?W(x,T,ne[K],b+2,d):K===pe?W(x,T,ne[K],b+1,d):(Y={},Y[K]=ne[K],W(x,T,{"**":Y},b+1,d)));else ne._listeners?W(x,T,ne,d,d):ne["*"]&&ne["*"]._listeners&&W(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,H=this.event;return d?_?Promise.resolve():new Promise(function(ee){f(ee)}).then(function(){return U.event=H,m.apply(U,B)}):(_?process.nextTick:f)(function(){U.event=H,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,H,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=W.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 W.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 W.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,qK=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!qK)throw new Error("Non little-endian hardware is not supported");const HK=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function WK(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:WK(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:qk(),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: -`),Hk=t=>ds(t)||Ie(t)?X(t):Ue(t),v1=t=>{const e=Hk(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),Wk=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=D7(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=L7(l.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=B7(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 qa;class eA extends Pu{constructor(e){super(),this.walletURL=void 0,this.register=()=>{var r;Zk("dapp"),qa&&(qa.unregister(),qa=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),qa=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r;this._registered=!1,this.closeWallet(),qa===this&&(qa=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 Ha;class rA extends Pu{constructor(e){super(),this.walletURL=void 0,this.walletWindow=void 0,this.register=()=>{Ha&&(Ha.unregister(),Ha=this),window.addEventListener("message",this.onWindowEvent),Ha=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(),Ha===this&&(Ha=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 qJ=1e4;class HJ{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)&&!WJ.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=qJ){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 WJ=["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 WE(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,Z7,new Mx],new Z0(k));o[y]=new Pq(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:HJ,WindowMessageHandler:jJ,WindowMessageProvider:rA,WindowSessionParams:Tu,getWallet:lA,initWallet:oA,isBrowserExtension:uh,isMuxTransportTemplate:nA,isProviderTransport:Uk,isUnityPlugin:Kk,isValidMessageSignature:Wk,isValidSignature:ec,isValidTypedDataSignature:Gk,isWalletUpToDate:Jk,messageToBytes:Hk,nextMessageIdx:qk,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},[nH]),ZJ=Lr({__proto__:null},[fH]),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},[sW]),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:Wk,isValidTypedDataSignature:Gk,isWalletUpToDate:Jk},[qH]),uY=Lr({__proto__:null},[KW]),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(Ht,{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-EKCqYZBG.svg",E5="/demo-dapp/assets/skyweaver-banner-AT9gQtXT.png",CY="/demo-dapp/assets/skyweaver-banner-large-Dt2dVXke.png",S5="AQAAAAAAAAbvrgpWEC2Aefg5qYStQmwjBpA";$7({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()}},W=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, -And sorry I could not travel both -And be one traveler, long I stood -And looked down one as far as I could -To where it bent in the undergrowth - -Then took the other, as just as fair, -And having perhaps the better claim, -Because it was grassy and wanted wear -Though as for that the passing there -Had worn them really about the same, - -And both that morning equally lay -In leaves no step had trodden black. -Oh, I kept the first for another day! -Yet knowing how way leads on to way, -I doubted if I should ever come back. - -I shall be telling this with a sigh -Somewhere ages and ages hence: -Two roads diverged in a wood, and Iā€” -I took the one less traveled by, -And that has made all the difference. - -ā˜ ā˜€ ā˜‚`,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 qe=await L.sendTransaction([ie,pe]);_(`txnResponse: ${JSON.stringify(qe)}`);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 qe=await ve.getTokenBalances({accountAddress:Y,includeMetadata:!0,contractAddress:"0x631998e91476DA5B870D741192fc5Cbc55F5a52E"});_(`skyweaver collectibles in your account: ${JSON.stringify(qe)}`),s(!1)}catch(L){console.error(L),N()}},_=(L,ne=!1)=>(console.log(L),e(ne?L:Y=>`${Y} - -${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),H=Object.values(Ge.network.networks).filter(L=>L.type===Fe.TESTNET).sort((L,ne)=>L.chainId-ne.chainId),ee=[...U,...H].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(Ht,{variant:"normal",color:"text100",fontWeight:"bold",children:"Demo Dapp"})}),ae.jsx(ue,{marginTop:"1",marginBottom:"4",children:ae.jsx(Ht,{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(qO,{}),ae.jsx(Ht,{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(Ht,{capitalize:!0,children:L.name})}),value:String(L.name)}))]})}),ae.jsxs(ue,{marginBottom:"4",children:[ae.jsx(Ht,{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(Ht,{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(Ht,{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:()=>W(),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(Ht,{marginTop:"5",variant:"normal",color:"text80",children:"Auto-email login, please specify the email address"})}),ae.jsx(ue,{marginTop:"4",children:ae.jsx(Wm,{onChange:L=>{n(L.target.value)}})}),y?ae.jsx(ue,{marginTop:"6",children:ae.jsx(Ht,{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 efe7763..92ede17 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 - +