From ef4d5b521a9954aba62dc51843871244ea2d210a Mon Sep 17 00:00:00 2001 From: corbanbrook Date: Thu, 18 Apr 2024 20:19:15 +0000 Subject: [PATCH] Build: (5cedd80) Updating examples to point to v2.2.0 --- ...owser-external_commonjs-proxy-BL634x_A.js} | 2 +- assets/{ccip-BdSioHbo.js => ccip-BckqeGfk.js} | 2 +- assets/index-BQEVheXL.js | 392 --------------- .../{index-dDhnp42S.js => index-CBhwD3XA.js} | 2 +- .../{index-DZ3j0VOg.js => index-D3eN1ASu.js} | 2 +- .../{index-DyNK9CaR.js => index-D4Oq7CAa.js} | 4 +- assets/index-DWoPfkS0.js | 475 ++++++++++++++++++ ...ex.es-DhIOr3n6.js => index.es-nspLMTrL.js} | 6 +- index.html | 2 +- 9 files changed, 485 insertions(+), 402 deletions(-) rename assets/{___vite-browser-external_commonjs-proxy-CJWxu3iC.js => ___vite-browser-external_commonjs-proxy-BL634x_A.js} (98%) rename assets/{ccip-BdSioHbo.js => ccip-BckqeGfk.js} (97%) delete mode 100644 assets/index-BQEVheXL.js rename assets/{index-dDhnp42S.js => index-CBhwD3XA.js} (99%) rename assets/{index-DZ3j0VOg.js => index-D3eN1ASu.js} (99%) rename assets/{index-DyNK9CaR.js => index-D4Oq7CAa.js} (98%) create mode 100644 assets/index-DWoPfkS0.js rename assets/{index.es-DhIOr3n6.js => index.es-nspLMTrL.js} (99%) diff --git a/assets/___vite-browser-external_commonjs-proxy-CJWxu3iC.js b/assets/___vite-browser-external_commonjs-proxy-BL634x_A.js similarity index 98% rename from assets/___vite-browser-external_commonjs-proxy-CJWxu3iC.js rename to assets/___vite-browser-external_commonjs-proxy-BL634x_A.js index 9dffaf06..c755faf2 100644 --- a/assets/___vite-browser-external_commonjs-proxy-CJWxu3iC.js +++ b/assets/___vite-browser-external_commonjs-proxy-BL634x_A.js @@ -1 +1 @@ -import{a as j,g as C}from"./index-BQEVheXL.js";var p={exports:{}},a=typeof Reflect=="object"?Reflect:null,h=a&&typeof a.apply=="function"?a.apply:function(e,n,r){return Function.prototype.apply.call(e,n,r)},l;a&&typeof a.ownKeys=="function"?l=a.ownKeys:Object.getOwnPropertySymbols?l=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:l=function(e){return Object.getOwnPropertyNames(e)};function N(t){console&&console.warn&&console.warn(t)}var L=Number.isNaN||function(e){return e!==e};function o(){o.init.call(this)}p.exports=o;p.exports.once=P;o.EventEmitter=o;o.prototype._events=void 0;o.prototype._eventsCount=0;o.prototype._maxListeners=void 0;var m=10;function v(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return m},set:function(t){if(typeof t!="number"||t<0||L(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");m=t}});o.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};o.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||L(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function y(t){return t._maxListeners===void 0?o.defaultMaxListeners:t._maxListeners}o.prototype.getMaxListeners=function(){return y(this)};o.prototype.emit=function(e){for(var n=[],r=1;r0&&(s=n[0]),s instanceof Error)throw s;var u=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var c=f[e];if(c===void 0)return!1;if(typeof c=="function")h(c,this,n);else for(var d=c.length,O=E(c,d),r=0;r0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,N(u)}return t}o.prototype.addListener=function(e,n){return g(this,e,n,!1)};o.prototype.on=o.prototype.addListener;o.prototype.prependListener=function(e,n){return g(this,e,n,!0)};function R(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=R.bind(r);return i.listener=n,r.wrapFn=i,i}o.prototype.once=function(e,n){return v(n),this.on(e,_(this,e,n)),this};o.prototype.prependOnceListener=function(e,n){return v(n),this.prependListener(e,_(this,e,n)),this};o.prototype.removeListener=function(e,n){var r,i,f,s,u;if(v(n),i=this._events,i===void 0)return this;if(r=i[e],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||n));else if(typeof r!="function"){for(f=-1,s=r.length-1;s>=0;s--)if(r[s]===n||r[s].listener===n){u=r[s].listener,f=s;break}if(f<0)return this;f===0?r.shift():M(r,f),r.length===1&&(i[e]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",e,u||n)}return this};o.prototype.off=o.prototype.removeListener;o.prototype.removeAllListeners=function(e){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[e]),this;if(arguments.length===0){var f=Object.keys(r),s;for(i=0;i=0;i--)this.removeListener(e,n[i]);return this};function w(t,e,n){var r=t._events;if(r===void 0)return[];var i=r[e];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?A(i):E(i,i.length)}o.prototype.listeners=function(e){return w(this,e,!0)};o.prototype.rawListeners=function(e){return w(this,e,!1)};o.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):b.call(t,e)};o.prototype.listenerCount=b;function b(t){var e=this._events;if(e!==void 0){var n=e[t];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]};function E(t,e){for(var n=new Array(e),r=0;r0&&(s=n[0]),s instanceof Error)throw s;var u=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var c=f[e];if(c===void 0)return!1;if(typeof c=="function")h(c,this,n);else for(var d=c.length,O=E(c,d),r=0;r0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,N(u)}return t}o.prototype.addListener=function(e,n){return g(this,e,n,!1)};o.prototype.on=o.prototype.addListener;o.prototype.prependListener=function(e,n){return g(this,e,n,!0)};function R(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=R.bind(r);return i.listener=n,r.wrapFn=i,i}o.prototype.once=function(e,n){return v(n),this.on(e,_(this,e,n)),this};o.prototype.prependOnceListener=function(e,n){return v(n),this.prependListener(e,_(this,e,n)),this};o.prototype.removeListener=function(e,n){var r,i,f,s,u;if(v(n),i=this._events,i===void 0)return this;if(r=i[e],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||n));else if(typeof r!="function"){for(f=-1,s=r.length-1;s>=0;s--)if(r[s]===n||r[s].listener===n){u=r[s].listener,f=s;break}if(f<0)return this;f===0?r.shift():M(r,f),r.length===1&&(i[e]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",e,u||n)}return this};o.prototype.off=o.prototype.removeListener;o.prototype.removeAllListeners=function(e){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[e]),this;if(arguments.length===0){var f=Object.keys(r),s;for(i=0;i=0;i--)this.removeListener(e,n[i]);return this};function w(t,e,n){var r=t._events;if(r===void 0)return[];var i=r[e];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?A(i):E(i,i.length)}o.prototype.listeners=function(e){return w(this,e,!0)};o.prototype.rawListeners=function(e){return w(this,e,!1)};o.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):b.call(t,e)};o.prototype.listenerCount=b;function b(t){var e=this._events;if(e!==void 0){var n=e[t];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]};function E(t,e){for(var n=new Array(e),r=0;r` ${w(u)}`)],` Sender: ${d}`,` Data: ${o}`,` Callback selector: ${e}`,` Extra data: ${c}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class M extends l{constructor({result:e,url:a}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${w(a)}`,`Response: ${y(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class R extends l{constructor({sender:e,to:a}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${a}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function $(n,e){if(!p(n))throw new h({address:n});if(!p(e))throw new h({address:e});return n.toLowerCase()===e.toLowerCase()}const v="0x556f1830",S={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function C(n,{blockNumber:e,blockTag:a,data:o,to:c}){const{args:d}=g({data:o,abi:[S]}),[r,i,u,t,s]=d;try{if(!$(c,r))throw new R({sender:r,to:c});const f=await A({data:u,sender:r,urls:i}),{data:b}=await k(n,{blockNumber:e,blockTag:a,data:O([t,L([{type:"bytes"},{type:"bytes"}],[f,s])]),to:c});return b}catch(f){throw new x({callbackSelector:t,cause:f,data:o,extraData:s,sender:r,urls:i})}}async function A({data:n,sender:e,urls:a}){var c;let o=new Error("An unknown error occurred.");for(let d=0;d` ${w(u)}`)],` Sender: ${d}`,` Data: ${o}`,` Callback selector: ${e}`,` Extra data: ${c}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class M extends l{constructor({result:e,url:a}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${w(a)}`,`Response: ${y(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class R extends l{constructor({sender:e,to:a}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${a}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function $(n,e){if(!p(n))throw new h({address:n});if(!p(e))throw new h({address:e});return n.toLowerCase()===e.toLowerCase()}const v="0x556f1830",S={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function C(n,{blockNumber:e,blockTag:a,data:o,to:c}){const{args:d}=g({data:o,abi:[S]}),[r,i,u,t,s]=d;try{if(!$(c,r))throw new R({sender:r,to:c});const f=await A({data:u,sender:r,urls:i}),{data:b}=await k(n,{blockNumber:e,blockTag:a,data:O([t,L([{type:"bytes"},{type:"bytes"}],[f,s])]),to:c});return b}catch(f){throw new x({callbackSelector:t,cause:f,data:o,extraData:s,sender:r,urls:i})}}async function A({data:n,sender:e,urls:a}){var c;let o=new Error("An unknown error occurred.");for(let d=0;de in t?kW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var dt=(t,e,r)=>(AW(t,typeof e!="symbol"?e+"":e,r),r);function _W(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 vi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ii(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function kr(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 zI={exports:{}},Ag={},qI={exports:{}},ot={};/** - * @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 j1=Symbol.for("react.element"),PW=Symbol.for("react.portal"),IW=Symbol.for("react.fragment"),TW=Symbol.for("react.strict_mode"),OW=Symbol.for("react.profiler"),RW=Symbol.for("react.provider"),$W=Symbol.for("react.context"),MW=Symbol.for("react.forward_ref"),NW=Symbol.for("react.suspense"),DW=Symbol.for("react.memo"),LW=Symbol.for("react.lazy"),D9=Symbol.iterator;function jW(t){return t===null||typeof t!="object"?null:(t=D9&&t[D9]||t["@@iterator"],typeof t=="function"?t:null)}var WI={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},HI=Object.assign,VI={};function kd(t,e,r){this.props=t,this.context=e,this.refs=VI,this.updater=r||WI}kd.prototype.isReactComponent={};kd.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")};kd.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function GI(){}GI.prototype=kd.prototype;function sE(t,e,r){this.props=t,this.context=e,this.refs=VI,this.updater=r||WI}var oE=sE.prototype=new GI;oE.constructor=sE;HI(oE,kd.prototype);oE.isPureReactComponent=!0;var L9=Array.isArray,KI=Object.prototype.hasOwnProperty,aE={current:null},YI={key:!0,ref:!0,__self:!0,__source:!0};function QI(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)KI.call(e,n)&&!YI.hasOwnProperty(n)&&(i[n]=e[n]);var a=arguments.length-2;if(a===1)i.children=r;else if(1>>1,C=A[I];if(0>>1;Ii(_,B))Wi(V,_)?(A[I]=V,A[W]=B,I=W):(A[I]=_,A[q]=B,I=q);else if(Wi(V,B))A[I]=V,A[W]=B,I=W;else break e}}return O}function i(A,O){var B=A.sortIndex-O.sortIndex;return B!==0?B:A.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var c=[],l=[],u=1,f=null,d=3,h=!1,p=!1,m=!1,v=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(A){for(var O=r(l);O!==null;){if(O.callback===null)n(l);else if(O.startTime<=A)n(l),O.sortIndex=O.expirationTime,e(c,O);else break;O=r(l)}}function S(A){if(m=!1,E(A),!p)if(r(c)!==null)p=!0,N(P);else{var O=r(l);O!==null&&M(S,O.startTime-A)}}function P(A,O){p=!1,m&&(m=!1,y(j),j=-1),h=!0;var B=d;try{for(E(O),f=r(c);f!==null&&(!(f.expirationTime>O)||A&&!Y());){var I=f.callback;if(typeof I=="function"){f.callback=null,d=f.priorityLevel;var C=I(f.expirationTime<=O);O=t.unstable_now(),typeof C=="function"?f.callback=C:f===r(c)&&n(c),E(O)}else n(c);f=r(c)}if(f!==null)var D=!0;else{var q=r(l);q!==null&&M(S,q.startTime-O),D=!1}return D}finally{f=null,d=B,h=!1}}var R=!1,L=null,j=-1,H=5,K=-1;function Y(){return!(t.unstable_now()-KA||125I?(A.sortIndex=B,e(l,A),r(c)===null&&A===r(l)&&(m?(y(j),j=-1):m=!0,M(S,B-I))):(A.sortIndex=C,e(c,A),p||h||(p=!0,N(P))),A},t.unstable_shouldYield=Y,t.unstable_wrapCallback=function(A){var O=d;return function(){var B=d;d=O;try{return A.apply(this,arguments)}finally{d=B}}}})(tT);eT.exports=tT;var YW=eT.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 rT=w,ki=YW;function me(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"),Ww=Object.prototype.hasOwnProperty,QW=/^[: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]*$/,B9={},F9={};function JW(t){return Ww.call(F9,t)?!0:Ww.call(B9,t)?!1:QW.test(t)?F9[t]=!0:(B9[t]=!0,!1)}function XW(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 ZW(t,e,r,n){if(e===null||typeof e>"u"||XW(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 Wn(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 fn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){fn[t]=new Wn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];fn[e]=new Wn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){fn[t]=new Wn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){fn[t]=new Wn(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){fn[t]=new Wn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){fn[t]=new Wn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){fn[t]=new Wn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){fn[t]=new Wn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){fn[t]=new Wn(t,5,!1,t.toLowerCase(),null,!1,!1)});var lE=/[\-:]([a-z])/g;function uE(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(lE,uE);fn[e]=new Wn(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(lE,uE);fn[e]=new Wn(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(lE,uE);fn[e]=new Wn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){fn[t]=new Wn(t,1,!1,t.toLowerCase(),null,!1,!1)});fn.xlinkHref=new Wn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){fn[t]=new Wn(t,1,!1,t.toLowerCase(),null,!0,!0)});function fE(t,e,r,n){var i=fn.hasOwnProperty(e)?fn[e]:null;(i!==null?i.type!==0:n||!(2a||i[o]!==s[a]){var c=` -`+i[o].replace(" at new "," at ");return t.displayName&&c.includes("")&&(c=c.replace("",t.displayName)),c}while(1<=o&&0<=a);break}}}finally{V2=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Lh(t):""}function eH(t){switch(t.tag){case 5:return Lh(t.type);case 16:return Lh("Lazy");case 13:return Lh("Suspense");case 19:return Lh("SuspenseList");case 0:case 2:case 15:return t=G2(t.type,!1),t;case 11:return t=G2(t.type.render,!1),t;case 1:return t=G2(t.type,!0),t;default:return""}}function Kw(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 cf:return"Fragment";case af:return"Portal";case Hw:return"Profiler";case dE:return"StrictMode";case Vw:return"Suspense";case Gw:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case sT:return(t.displayName||"Context")+".Consumer";case iT:return(t._context.displayName||"Context")+".Provider";case hE:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case pE:return e=t.displayName||null,e!==null?e:Kw(t.type)||"Memo";case rc:e=t._payload,t=t._init;try{return Kw(t(e))}catch{}}return null}function tH(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 Kw(e);case 8:return e===dE?"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 Rc(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function aT(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function rH(t){var e=aT(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 Rp(t){t._valueTracker||(t._valueTracker=rH(t))}function cT(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=aT(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function kv(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 Yw(t,e){var r=e.checked;return yr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function z9(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Rc(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 lT(t,e){e=e.checked,e!=null&&fE(t,"checked",e,!1)}function Qw(t,e){lT(t,e);var r=Rc(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")?Jw(t,e.type,r):e.hasOwnProperty("defaultValue")&&Jw(t,e.type,Rc(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function q9(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 Jw(t,e,r){(e!=="number"||kv(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var jh=Array.isArray;function If(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=$p.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function S0(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Wh={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},nH=["Webkit","ms","Moz","O"];Object.keys(Wh).forEach(function(t){nH.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Wh[e]=Wh[t]})});function hT(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Wh.hasOwnProperty(t)&&Wh[t]?(""+e).trim():e+"px"}function pT(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=hT(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var iH=yr({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 e5(t,e){if(e){if(iH[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(me(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(me(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(me(61))}if(e.style!=null&&typeof e.style!="object")throw Error(me(62))}}function t5(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 r5=null;function mE(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var n5=null,Tf=null,Of=null;function V9(t){if(t=U1(t)){if(typeof n5!="function")throw Error(me(280));var e=t.stateNode;e&&(e=Og(e),n5(t.stateNode,t.type,e))}}function mT(t){Tf?Of?Of.push(t):Of=[t]:Tf=t}function vT(){if(Tf){var t=Tf,e=Of;if(Of=Tf=null,V9(t),e)for(t=0;t>>=0,t===0?32:31-(mH(t)/vH|0)|0}var Mp=64,Np=4194304;function Bh(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 Iv(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=Bh(a):(s&=o,s!==0&&(n=Bh(s)))}else o=r&~i,o!==0?n=Bh(o):s!==0&&(n=Bh(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 B1(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ts(e),t[e]=r}function xH(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=Vh),t7=" ",r7=!1;function DT(t,e){switch(t){case"keyup":return KH.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function LT(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var lf=!1;function QH(t,e){switch(t){case"compositionend":return LT(e);case"keypress":return e.which!==32?null:(r7=!0,t7);case"textInput":return t=e.data,t===t7&&r7?null:t;default:return null}}function JH(t,e){if(lf)return t==="compositionend"||!CE&&DT(t,e)?(t=MT(),Lm=xE=lc=null,lf=!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=o7(r)}}function UT(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?UT(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function zT(){for(var t=window,e=kv();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=kv(t.document)}return e}function SE(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 oV(t){var e=zT(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&UT(r.ownerDocument.documentElement,r)){if(n!==null&&SE(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=a7(r,s);var o=a7(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,uf=null,l5=null,Kh=null,u5=!1;function c7(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;u5||uf==null||uf!==kv(n)||(n=uf,"selectionStart"in n&&SE(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}),Kh&&T0(Kh,n)||(Kh=n,n=Rv(l5,"onSelect"),0hf||(t.current=v5[hf],v5[hf]=null,hf--)}function Dt(t,e){hf++,v5[hf]=t.current,t.current=e}var $c={},Pn=el($c),ri=el(!1),Jl=$c;function Jf(t,e){var r=t.type.contextTypes;if(!r)return $c;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 ni(t){return t=t.childContextTypes,t!=null}function Mv(){or(ri),or(Pn)}function m7(t,e,r){if(Pn.current!==$c)throw Error(me(168));Dt(Pn,e),Dt(ri,r)}function JT(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(me(108,tH(t)||"Unknown",i));return yr({},r,n)}function Nv(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||$c,Jl=Pn.current,Dt(Pn,t),Dt(ri,ri.current),!0}function v7(t,e,r){var n=t.stateNode;if(!n)throw Error(me(169));r?(t=JT(t,e,Jl),n.__reactInternalMemoizedMergedChildContext=t,or(ri),or(Pn),Dt(Pn,t)):or(ri),Dt(ri,r)}var Uo=null,Rg=!1,ax=!1;function XT(t){Uo===null?Uo=[t]:Uo.push(t)}function gV(t){Rg=!0,XT(t)}function tl(){if(!ax&&Uo!==null){ax=!0;var t=0,e=_t;try{var r=Uo;for(_t=1;t>=o,i-=o,Ho=1<<32-Ts(e)+i|r<j?(H=L,L=null):H=L.sibling;var K=d(y,L,E[j],S);if(K===null){L===null&&(L=H);break}t&&L&&K.alternate===null&&e(y,L),b=s(K,b,j),R===null?P=K:R.sibling=K,R=K,L=H}if(j===E.length)return r(y,L),cr&&Cl(y,j),P;if(L===null){for(;jj?(H=L,L=null):H=L.sibling;var Y=d(y,L,K.value,S);if(Y===null){L===null&&(L=H);break}t&&L&&Y.alternate===null&&e(y,L),b=s(Y,b,j),R===null?P=Y:R.sibling=Y,R=Y,L=H}if(K.done)return r(y,L),cr&&Cl(y,j),P;if(L===null){for(;!K.done;j++,K=E.next())K=f(y,K.value,S),K!==null&&(b=s(K,b,j),R===null?P=K:R.sibling=K,R=K);return cr&&Cl(y,j),P}for(L=n(y,L);!K.done;j++,K=E.next())K=h(L,y,j,K.value,S),K!==null&&(t&&K.alternate!==null&&L.delete(K.key===null?j:K.key),b=s(K,b,j),R===null?P=K:R.sibling=K,R=K);return t&&L.forEach(function(Q){return e(y,Q)}),cr&&Cl(y,j),P}function v(y,b,E,S){if(typeof E=="object"&&E!==null&&E.type===cf&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case Op:e:{for(var P=E.key,R=b;R!==null;){if(R.key===P){if(P=E.type,P===cf){if(R.tag===7){r(y,R.sibling),b=i(R,E.props.children),b.return=y,y=b;break e}}else if(R.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===rc&&C7(P)===R.type){r(y,R.sibling),b=i(R,E.props),b.ref=uh(y,R,E),b.return=y,y=b;break e}r(y,R);break}else e(y,R);R=R.sibling}E.type===cf?(b=ql(E.props.children,y.mode,S,E.key),b.return=y,y=b):(S=Hm(E.type,E.key,E.props,null,y.mode,S),S.ref=uh(y,b,E),S.return=y,y=S)}return o(y);case af:e:{for(R=E.key;b!==null;){if(b.key===R)if(b.tag===4&&b.stateNode.containerInfo===E.containerInfo&&b.stateNode.implementation===E.implementation){r(y,b.sibling),b=i(b,E.children||[]),b.return=y,y=b;break e}else{r(y,b);break}else e(y,b);b=b.sibling}b=mx(E,y.mode,S),b.return=y,y=b}return o(y);case rc:return R=E._init,v(y,b,R(E._payload),S)}if(jh(E))return p(y,b,E,S);if(sh(E))return m(y,b,E,S);zp(y,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,b!==null&&b.tag===6?(r(y,b.sibling),b=i(b,E),b.return=y,y=b):(r(y,b),b=px(E,y.mode,S),b.return=y,y=b),o(y)):r(y,b)}return v}var Zf=oO(!0),aO=oO(!1),z1={},ho=el(z1),M0=el(z1),N0=el(z1);function Ll(t){if(t===z1)throw Error(me(174));return t}function $E(t,e){switch(Dt(N0,e),Dt(M0,t),Dt(ho,z1),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Zw(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Zw(e,t)}or(ho),Dt(ho,e)}function ed(){or(ho),or(M0),or(N0)}function cO(t){Ll(N0.current);var e=Ll(ho.current),r=Zw(e,t.type);e!==r&&(Dt(M0,t),Dt(ho,r))}function ME(t){M0.current===t&&(or(ho),or(M0))}var pr=el(0);function Uv(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 cx=[];function NE(){for(var t=0;tr?r:4,t(!0);var n=lx.transition;lx.transition={};try{t(!1),e()}finally{_t=r,lx.transition=n}}function SO(){return rs().memoizedState}function EV(t,e,r){var n=wc(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},kO(t))AO(e,r);else if(r=rO(t,e,r,n),r!==null){var i=Fn();Os(r,t,n,i),_O(r,e,n)}}function CV(t,e,r){var n=wc(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(kO(t))AO(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,Ms(a,o)){var c=e.interleaved;c===null?(i.next=i,OE(e)):(i.next=c.next,c.next=i),e.interleaved=i;return}}catch{}finally{}r=rO(t,e,i,n),r!==null&&(i=Fn(),Os(r,t,n,i),_O(r,e,n))}}function kO(t){var e=t.alternate;return t===vr||e!==null&&e===vr}function AO(t,e){Yh=zv=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function _O(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,yE(t,r)}}var qv={readContext:ts,useCallback:vn,useContext:vn,useEffect:vn,useImperativeHandle:vn,useInsertionEffect:vn,useLayoutEffect:vn,useMemo:vn,useReducer:vn,useRef:vn,useState:vn,useDebugValue:vn,useDeferredValue:vn,useTransition:vn,useMutableSource:vn,useSyncExternalStore:vn,useId:vn,unstable_isNewReconciler:!1},SV={readContext:ts,useCallback:function(t,e){return Ys().memoizedState=[t,e===void 0?null:e],t},useContext:ts,useEffect:k7,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Um(4194308,4,bO.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Um(4194308,4,t,e)},useInsertionEffect:function(t,e){return Um(4,2,t,e)},useMemo:function(t,e){var r=Ys();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Ys();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=EV.bind(null,vr,t),[n.memoizedState,t]},useRef:function(t){var e=Ys();return t={current:t},e.memoizedState=t},useState:S7,useDebugValue:FE,useDeferredValue:function(t){return Ys().memoizedState=t},useTransition:function(){var t=S7(!1),e=t[0];return t=wV.bind(null,t[1]),Ys().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=vr,i=Ys();if(cr){if(r===void 0)throw Error(me(407));r=r()}else{if(r=e(),Xr===null)throw Error(me(349));Zl&30||fO(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,k7(hO.bind(null,n,s,t),[t]),n.flags|=2048,j0(9,dO.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=Ys(),e=Xr.identifierPrefix;if(cr){var r=Vo,n=Ho;r=(n&~(1<<32-Ts(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=D0++,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[io]=e,t[$0]=n,DO(t,e,!1,!1),e.stateNode=t;e:{switch(o=t5(r,n),r){case"dialog":tr("cancel",t),tr("close",t),i=n;break;case"iframe":case"object":case"embed":tr("load",t),i=n;break;case"video":case"audio":for(i=0;ird&&(e.flags|=128,n=!0,fh(s,!1),e.lanes=4194304)}else{if(!n)if(t=Uv(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),fh(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!cr)return yn(e),null}else 2*Or()-s.renderingStartTime>rd&&r!==1073741824&&(e.flags|=128,n=!0,fh(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=Or(),e.sibling=null,r=pr.current,Dt(pr,n?r&1|2:r&1),e):(yn(e),null);case 22:case 23:return VE(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?pi&1073741824&&(yn(e),e.subtreeFlags&6&&(e.flags|=8192)):yn(e),null;case 24:return null;case 25:return null}throw Error(me(156,e.tag))}function RV(t,e){switch(AE(e),e.tag){case 1:return ni(e.type)&&Mv(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return ed(),or(ri),or(Pn),NE(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return ME(e),null;case 13:if(or(pr),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(me(340));Xf()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return or(pr),null;case 4:return ed(),null;case 10:return TE(e.type._context),null;case 22:case 23:return VE(),null;case 24:return null;default:return null}}var Wp=!1,wn=!1,$V=typeof WeakSet=="function"?WeakSet:Set,xe=null;function yf(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){br(t,e,n)}else r.current=null}function P5(t,e,r){try{r()}catch(n){br(t,e,n)}}var M7=!1;function MV(t,e){if(f5=Tv,t=zT(),SE(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,c=-1,l=0,u=0,f=t,d=null;t:for(;;){for(var h;f!==r||i!==0&&f.nodeType!==3||(a=o+i),f!==s||n!==0&&f.nodeType!==3||(c=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===t)break t;if(d===r&&++l===i&&(a=o),d===s&&++u===n&&(c=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}r=a===-1||c===-1?null:{start:a,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(d5={focusedElem:t,selectionRange:r},Tv=!1,xe=e;xe!==null;)if(e=xe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,xe=t;else for(;xe!==null;){e=xe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,v=p.memoizedState,y=e.stateNode,b=y.getSnapshotBeforeUpdate(e.elementType===e.type?m:Es(e.type,m),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var E=e.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(me(163))}}catch(S){br(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,xe=t;break}xe=e.return}return p=M7,M7=!1,p}function Qh(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&&P5(e,r,s)}i=i.next}while(i!==n)}}function Ng(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 I5(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 BO(t){var e=t.alternate;e!==null&&(t.alternate=null,BO(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[io],delete e[$0],delete e[m5],delete e[vV],delete e[yV])),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 FO(t){return t.tag===5||t.tag===3||t.tag===4}function N7(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||FO(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 T5(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=$v));else if(n!==4&&(t=t.child,t!==null))for(T5(t,e,r),t=t.sibling;t!==null;)T5(t,e,r),t=t.sibling}function O5(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(O5(t,e,r),t=t.sibling;t!==null;)O5(t,e,r),t=t.sibling}var rn=null,Ss=!1;function Wa(t,e,r){for(r=r.child;r!==null;)UO(t,e,r),r=r.sibling}function UO(t,e,r){if(fo&&typeof fo.onCommitFiberUnmount=="function")try{fo.onCommitFiberUnmount(_g,r)}catch{}switch(r.tag){case 5:wn||yf(r,e);case 6:var n=rn,i=Ss;rn=null,Wa(t,e,r),rn=n,Ss=i,rn!==null&&(Ss?(t=rn,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):rn.removeChild(r.stateNode));break;case 18:rn!==null&&(Ss?(t=rn,r=r.stateNode,t.nodeType===8?ox(t.parentNode,r):t.nodeType===1&&ox(t,r),P0(t)):ox(rn,r.stateNode));break;case 4:n=rn,i=Ss,rn=r.stateNode.containerInfo,Ss=!0,Wa(t,e,r),rn=n,Ss=i;break;case 0:case 11:case 14:case 15:if(!wn&&(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)&&P5(r,e,o),i=i.next}while(i!==n)}Wa(t,e,r);break;case 1:if(!wn&&(yf(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){br(r,e,a)}Wa(t,e,r);break;case 21:Wa(t,e,r);break;case 22:r.mode&1?(wn=(n=wn)||r.memoizedState!==null,Wa(t,e,r),wn=n):Wa(t,e,r);break;default:Wa(t,e,r)}}function D7(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new $V),e.forEach(function(n){var i=qV.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function ps(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=Or()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*DV(n/1960))-n,10t?16:t,uc===null)var n=!1;else{if(t=uc,uc=null,Vv=0,pt&6)throw Error(me(331));var i=pt;for(pt|=4,xe=t.current;xe!==null;){var s=xe,o=s.child;if(xe.flags&16){var a=s.deletions;if(a!==null){for(var c=0;cOr()-WE?zl(t,0):qE|=r),ii(t,e)}function YO(t,e){e===0&&(t.mode&1?(e=Np,Np<<=1,!(Np&130023424)&&(Np=4194304)):e=1);var r=Fn();t=aa(t,e),t!==null&&(B1(t,e,r),ii(t,r))}function zV(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),YO(t,r)}function qV(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(me(314))}n!==null&&n.delete(e),YO(t,r)}var QO;QO=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||ri.current)Xn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Xn=!1,TV(t,e,r);Xn=!!(t.flags&131072)}else Xn=!1,cr&&e.flags&1048576&&ZT(e,Lv,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;zm(t,e),t=e.pendingProps;var i=Jf(e,Pn.current);$f(e,r),i=LE(null,e,n,t,i,r);var s=jE();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,ni(n)?(s=!0,Nv(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,RE(e),i.updater=$g,e.stateNode=i,i._reactInternals=e,w5(e,n,t,r),e=S5(null,e,n,!0,s,r)):(e.tag=0,cr&&s&&kE(e),Dn(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(zm(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=HV(n),t=Es(n,t),i){case 0:e=C5(null,e,n,t,r);break e;case 1:e=O7(null,e,n,t,r);break e;case 11:e=I7(null,e,n,t,r);break e;case 14:e=T7(null,e,n,Es(n.type,t),r);break e}throw Error(me(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Es(n,i),C5(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Es(n,i),O7(t,e,n,i,r);case 3:e:{if($O(e),t===null)throw Error(me(387));n=e.pendingProps,s=e.memoizedState,i=s.element,nO(t,e),Fv(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=td(Error(me(423)),e),e=R7(t,e,n,r,i);break e}else if(n!==i){i=td(Error(me(424)),e),e=R7(t,e,n,r,i);break e}else for(xi=gc(e.stateNode.containerInfo.firstChild),wi=e,cr=!0,ks=null,r=aO(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Xf(),n===i){e=ca(t,e,r);break e}Dn(t,e,n,r)}e=e.child}return e;case 5:return cO(e),t===null&&g5(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,h5(n,i)?o=null:s!==null&&h5(n,s)&&(e.flags|=32),RO(t,e),Dn(t,e,o,r),e.child;case 6:return t===null&&g5(e),null;case 13:return MO(t,e,r);case 4:return $E(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Zf(e,null,n,r):Dn(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Es(n,i),I7(t,e,n,i,r);case 7:return Dn(t,e,e.pendingProps,r),e.child;case 8:return Dn(t,e,e.pendingProps.children,r),e.child;case 12:return Dn(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,Dt(jv,n._currentValue),n._currentValue=o,s!==null)if(Ms(s.value,o)){if(s.children===i.children&&!ri.current){e=ca(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 c=a.firstContext;c!==null;){if(c.context===n){if(s.tag===1){c=Xo(-1,r&-r),c.tag=2;var l=s.updateQueue;if(l!==null){l=l.shared;var u=l.pending;u===null?c.next=c:(c.next=u.next,u.next=c),l.pending=c}}s.lanes|=r,c=s.alternate,c!==null&&(c.lanes|=r),b5(s.return,r,e),a.lanes|=r;break}c=c.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(me(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),b5(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}Dn(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,$f(e,r),i=ts(i),n=n(i),e.flags|=1,Dn(t,e,n,r),e.child;case 14:return n=e.type,i=Es(n,e.pendingProps),i=Es(n.type,i),T7(t,e,n,i,r);case 15:return TO(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Es(n,i),zm(t,e),e.tag=1,ni(n)?(t=!0,Nv(e)):t=!1,$f(e,r),sO(e,n,i),w5(e,n,i,r),S5(null,e,n,!0,t,r);case 19:return NO(t,e,r);case 22:return OO(t,e,r)}throw Error(me(156,e.tag))};function JO(t,e){return CT(t,e)}function WV(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 Qi(t,e,r,n){return new WV(t,e,r,n)}function KE(t){return t=t.prototype,!(!t||!t.isReactComponent)}function HV(t){if(typeof t=="function")return KE(t)?1:0;if(t!=null){if(t=t.$$typeof,t===hE)return 11;if(t===pE)return 14}return 2}function Ec(t,e){var r=t.alternate;return r===null?(r=Qi(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 Hm(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")KE(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case cf:return ql(r.children,i,s,e);case dE:o=8,i|=8;break;case Hw:return t=Qi(12,r,e,i|2),t.elementType=Hw,t.lanes=s,t;case Vw:return t=Qi(13,r,e,i),t.elementType=Vw,t.lanes=s,t;case Gw:return t=Qi(19,r,e,i),t.elementType=Gw,t.lanes=s,t;case oT:return Lg(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case iT:o=10;break e;case sT:o=9;break e;case hE:o=11;break e;case pE:o=14;break e;case rc:o=16,n=null;break e}throw Error(me(130,t==null?t:typeof t,""))}return e=Qi(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function ql(t,e,r,n){return t=Qi(7,t,n,e),t.lanes=r,t}function Lg(t,e,r,n){return t=Qi(22,t,n,e),t.elementType=oT,t.lanes=r,t.stateNode={isHidden:!1},t}function px(t,e,r){return t=Qi(6,t,null,e),t.lanes=r,t}function mx(t,e,r){return e=Qi(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function VV(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=Y2(0),this.expirationTimes=Y2(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Y2(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function YE(t,e,r,n,i,s,o,a,c){return t=new VV(t,e,r,a,c),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Qi(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},RE(s),t}function GV(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tR)}catch(t){console.error(t)}}tR(),ZI.exports=Ti;var Us=ZI.exports;const XV=Ii(Us);var W7=Us;qw.createRoot=W7.createRoot,qw.hydrateRoot=W7.hydrateRoot;const ZV=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var eG=Object.freeze({__proto__:null,abi:ZV});const tG=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],rG={isValidSignatureBytes32:"0x1626ba7e"};var nG=Object.freeze({__proto__:null,abi:tG,returns:rG});const iG=[{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 sG=Object.freeze({__proto__:null,abi:iG});const oG=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var aG=Object.freeze({__proto__:null,abi:oG});const cG=[{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 lG=Object.freeze({__proto__:null,abi:cG});const uG=[{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 fG=Object.freeze({__proto__:null,abi:uG});const dG=[{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 hG=Object.freeze({__proto__:null,abi:dG});const pG=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var mG=Object.freeze({__proto__:null,abi:pG});const Zr={erc6492:sG,erc5719:eG,erc1271:nG,factory:aG,mainModule:lG,mainModuleUpgradable:fG,sequenceUtils:hG,requireFreshSigner:mG},vG=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:Zr},Symbol.toStringTag,{value:"Module"})),Un=globalThis||void 0||self;function Yv(){return Yv=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Ve({},n)).then(i=>Ge(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Ve({},n)).then(i=>Ge(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Ve({},n)).then(i=>Ge(i).then(s=>({status:s.status}))),this.clock=n=>this.fetch(this.url("Clock"),Ve({},n)).then(i=>Ge(i).then(s=>({serverTime:s.serverTime}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),Ve({},n)).then(i=>Ge(i).then(s=>({data:s.data}))),this.getAuthToken=(n,i)=>this.fetch(this.url("GetAuthToken"),Ve(n,i)).then(s=>Ge(s).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.getAuthToken2=(n,i)=>this.fetch(this.url("GetAuthToken2"),Ve(n,i)).then(s=>Ge(s).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.sendPasswordlessLink=(n,i)=>this.fetch(this.url("SendPasswordlessLink"),Ve(n,i)).then(s=>Ge(s).then(o=>({status:o.status}))),this.friendList=(n,i)=>this.fetch(this.url("FriendList"),Ve(n,i)).then(s=>Ge(s).then(o=>({page:o.page,friends:o.friends}))),this.getFriendByAddress=(n,i)=>this.fetch(this.url("GetFriendByAddress"),Ve(n,i)).then(s=>Ge(s).then(o=>({status:o.status,friend:o.friend}))),this.searchFriends=(n,i)=>this.fetch(this.url("SearchFriends"),Ve(n,i)).then(s=>Ge(s).then(o=>({friends:o.friends}))),this.addFriend=(n,i)=>this.fetch(this.url("AddFriend"),Ve(n,i)).then(s=>Ge(s).then(o=>({status:o.status,friend:o.friend}))),this.updateFriendNickname=(n,i)=>this.fetch(this.url("UpdateFriendNickname"),Ve(n,i)).then(s=>Ge(s).then(o=>({status:o.status,friend:o.friend}))),this.removeFriend=(n,i)=>this.fetch(this.url("RemoveFriend"),Ve(n,i)).then(s=>Ge(s).then(o=>({status:o.status}))),this.contractCall=(n,i)=>this.fetch(this.url("ContractCall"),Ve(n,i)).then(s=>Ge(s).then(o=>({returns:o.returns}))),this.decodeContractCall=(n,i)=>this.fetch(this.url("DecodeContractCall"),Ve(n,i)).then(s=>Ge(s).then(o=>({call:o.call}))),this.lookupContractCallSelectors=(n,i)=>this.fetch(this.url("LookupContractCallSelectors"),Ve(n,i)).then(s=>Ge(s).then(o=>({signatures:o.signatures}))),this.userStorageFetch=(n,i)=>this.fetch(this.url("UserStorageFetch"),Ve(n,i)).then(s=>Ge(s).then(o=>({object:o.object}))),this.userStorageSave=(n,i)=>this.fetch(this.url("UserStorageSave"),Ve(n,i)).then(s=>Ge(s).then(o=>({ok:o.ok}))),this.userStorageDelete=(n,i)=>this.fetch(this.url("UserStorageDelete"),Ve(n,i)).then(s=>Ge(s).then(o=>({ok:o.ok}))),this.userStorageFetchAll=(n,i)=>this.fetch(this.url("UserStorageFetchAll"),Ve(n,i)).then(s=>Ge(s).then(o=>({objects:o.objects}))),this.getMoonpayLink=(n,i)=>this.fetch(this.url("GetMoonpayLink"),Ve(n,i)).then(s=>Ge(s).then(o=>({signedUrl:o.signedUrl}))),this.getSardineClientToken=n=>this.fetch(this.url("GetSardineClientToken"),Ve({},n)).then(i=>Ge(i).then(s=>({token:s.token}))),this.resolveENSAddress=(n,i)=>this.fetch(this.url("ResolveENSAddress"),Ve(n,i)).then(s=>Ge(s).then(o=>({address:o.address,ok:o.ok}))),this.isValidSignature=(n,i)=>this.fetch(this.url("IsValidSignature"),Ve(n,i)).then(s=>Ge(s).then(o=>({isValid:o.isValid}))),this.isValidMessageSignature=(n,i)=>this.fetch(this.url("IsValidMessageSignature"),Ve(n,i)).then(s=>Ge(s).then(o=>({isValid:o.isValid}))),this.isValidTypedDataSignature=(n,i)=>this.fetch(this.url("IsValidTypedDataSignature"),Ve(n,i)).then(s=>Ge(s).then(o=>({isValid:o.isValid}))),this.isValidETHAuthProof=(n,i)=>this.fetch(this.url("IsValidETHAuthProof"),Ve(n,i)).then(s=>Ge(s).then(o=>({isValid:o.isValid}))),this.getCoinPrices=(n,i)=>this.fetch(this.url("GetCoinPrices"),Ve(n,i)).then(s=>Ge(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getCollectiblePrices=(n,i)=>this.fetch(this.url("GetCollectiblePrices"),Ve(n,i)).then(s=>Ge(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getExchangeRate=(n,i)=>this.fetch(this.url("GetExchangeRate"),Ve(n,i)).then(s=>Ge(s).then(o=>({exchangeRate:o.exchangeRate}))),this.memoryStore=(n,i)=>this.fetch(this.url("MemoryStore"),Ve(n,i)).then(s=>Ge(s).then(o=>({ok:o.ok}))),this.memoryLoad=(n,i)=>this.fetch(this.url("MemoryLoad"),Ve(n,i)).then(s=>Ge(s).then(o=>({value:o.value}))),this.getInviteInfo=n=>this.fetch(this.url("GetInviteInfo"),Ve({},n)).then(i=>Ge(i).then(s=>({inviteInfo:s.inviteInfo}))),this.isValidAccessCode=(n,i)=>this.fetch(this.url("IsValidAccessCode"),Ve(n,i)).then(s=>Ge(s).then(o=>({status:o.status}))),this.internalClaimAccessCode=(n,i)=>this.fetch(this.url("InternalClaimAccessCode"),Ve(n,i)).then(s=>Ge(s).then(o=>({status:o.status}))),this.blockNumberAtTime=(n,i)=>this.fetch(this.url("BlockNumberAtTime"),Ve(n,i)).then(s=>Ge(s).then(o=>({blocks:o.blocks}))),this.paperSessionSecret=(n,i)=>this.fetch(this.url("PaperSessionSecret"),Ve(n,i)).then(s=>Ge(s).then(o=>({secret:o.secret}))),this.paperSessionSecret2=(n,i)=>this.fetch(this.url("PaperSessionSecret2"),Ve(n,i)).then(s=>Ge(s).then(o=>({secret:o.secret}))),this.linkWallet=(n,i)=>this.fetch(this.url("LinkWallet"),Ve(n,i)).then(s=>Ge(s).then(o=>({status:o.status,linkedWalletAddress:o.linkedWalletAddress}))),this.getLinkedWallets=(n,i)=>this.fetch(this.url("GetLinkedWallets"),Ve(n,i)).then(s=>Ge(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 Ve=(t={},e={})=>({method:"POST",headers:Yv({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Ge=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}),H7=typeof Un=="object"?Un.fetch:window.fetch;class Zh extends rR{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,H7),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(i,s)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),s.headers=Yv({},s.headers,o),H7(i,s)},this.fetch=this._fetch}}const wG=Object.freeze(Object.defineProperty({__proto__:null,API:rR,SequenceAPIClient:Zh,SortOrder:xG,WebRPCSchemaHash:bG,WebRPCSchemaVersion:gG,WebRPCVersion:yG},Symbol.toStringTag,{value:"Module"}));var ZE={exports:{}},Kr={},zg={};zg.byteLength=SG;zg.toByteArray=AG;zg.fromByteArray=IG;var so=[],ji=[],EG=typeof Uint8Array<"u"?Uint8Array:Array,vx="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Nu=0,CG=vx.length;Nu0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function SG(t){var e=nR(t),r=e[0],n=e[1];return(r+n)*3/4-n}function kG(t,e,r){return(e+r)*3/4-r}function AG(t){var e,r=nR(t),n=r[0],i=r[1],s=new EG(kG(t,n,i)),o=0,a=i>0?n-4:n,c;for(c=0;c>16&255,s[o++]=e>>8&255,s[o++]=e&255;return i===2&&(e=ji[t.charCodeAt(c)]<<2|ji[t.charCodeAt(c+1)]>>4,s[o++]=e&255),i===1&&(e=ji[t.charCodeAt(c)]<<10|ji[t.charCodeAt(c+1)]<<4|ji[t.charCodeAt(c+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function _G(t){return so[t>>18&63]+so[t>>12&63]+so[t>>6&63]+so[t&63]}function PG(t,e,r){for(var n,i=[],s=e;sa?a:o+s));return n===1?(e=t[r-1],i.push(so[e>>2]+so[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(so[e>>10]+so[e>>4&63]+so[e<<2&63]+"=")),i.join("")}var e8={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */e8.read=function(t,e,r,n,i){var s,o,a=i*8-n-1,c=(1<>1,u=-7,f=r?i-1:0,d=r?-1:1,h=t[e+f];for(f+=d,s=h&(1<<-u)-1,h>>=-u,u+=a;u>0;s=s*256+t[e+f],f+=d,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=n;u>0;o=o*256+t[e+f],f+=d,u-=8);if(s===0)s=1-l;else{if(s===c)return o?NaN:(h?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-l}return(h?-1:1)*o*Math.pow(2,s-n)};e8.write=function(t,e,r,n,i,s){var o,a,c,l=s*8-i-1,u=(1<>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:s-1,p=n?1:-1,m=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+f>=1?e+=d/c:e+=d*Math.pow(2,1-f),e*c>=2&&(o++,c/=2),o+f>=u?(a=0,o=u):o+f>=1?(a=(e*c-1)*Math.pow(2,i),o=o+f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+h]=a&255,h+=p,a/=256,i-=8);for(o=o<0;t[r+h]=o&255,h+=p,o/=256,l-=8);t[r+h-p]|=m*128};/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */(function(t){const e=zg,r=e8,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=P,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:s,ArrayBuffer:o,SharedArrayBuffer:a}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{const U=new s(1),T={foo:function(){return 42}};return Object.setPrototypeOf(T,s.prototype),Object.setPrototypeOf(U,T),U.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function l(U){if(U>i)throw new RangeError('The value "'+U+'" is invalid for option "size"');const T=new s(U);return Object.setPrototypeOf(T,u.prototype),T}function u(U,T,$){if(typeof U=="number"){if(typeof T=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(U)}return f(U,T,$)}u.poolSize=8192;function f(U,T,$){if(typeof U=="string")return m(U,T);if(o.isView(U))return y(U);if(U==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U);if(Ze(U,o)||U&&Ze(U.buffer,o)||typeof a<"u"&&(Ze(U,a)||U&&Ze(U.buffer,a)))return b(U,T,$);if(typeof U=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const G=U.valueOf&&U.valueOf();if(G!=null&&G!==U)return u.from(G,T,$);const Z=E(U);if(Z)return Z;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof U[Symbol.toPrimitive]=="function")return u.from(U[Symbol.toPrimitive]("string"),T,$);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U)}u.from=function(U,T,$){return f(U,T,$)},Object.setPrototypeOf(u.prototype,s.prototype),Object.setPrototypeOf(u,s);function d(U){if(typeof U!="number")throw new TypeError('"size" argument must be of type number');if(U<0)throw new RangeError('The value "'+U+'" is invalid for option "size"')}function h(U,T,$){return d(U),U<=0?l(U):T!==void 0?typeof $=="string"?l(U).fill(T,$):l(U).fill(T):l(U)}u.alloc=function(U,T,$){return h(U,T,$)};function p(U){return d(U),l(U<0?0:S(U)|0)}u.allocUnsafe=function(U){return p(U)},u.allocUnsafeSlow=function(U){return p(U)};function m(U,T){if((typeof T!="string"||T==="")&&(T="utf8"),!u.isEncoding(T))throw new TypeError("Unknown encoding: "+T);const $=R(U,T)|0;let G=l($);const Z=G.write(U,T);return Z!==$&&(G=G.slice(0,Z)),G}function v(U){const T=U.length<0?0:S(U.length)|0,$=l(T);for(let G=0;G=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return U|0}function P(U){return+U!=U&&(U=0),u.alloc(+U)}u.isBuffer=function(T){return T!=null&&T._isBuffer===!0&&T!==u.prototype},u.compare=function(T,$){if(Ze(T,s)&&(T=u.from(T,T.offset,T.byteLength)),Ze($,s)&&($=u.from($,$.offset,$.byteLength)),!u.isBuffer(T)||!u.isBuffer($))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(T===$)return 0;let G=T.length,Z=$.length;for(let re=0,ce=Math.min(G,Z);reZ.length?(u.isBuffer(ce)||(ce=u.from(ce)),ce.copy(Z,re)):s.prototype.set.call(Z,ce,re);else if(u.isBuffer(ce))ce.copy(Z,re);else throw new TypeError('"list" argument must be an Array of Buffers');re+=ce.length}return Z};function R(U,T){if(u.isBuffer(U))return U.length;if(o.isView(U)||Ze(U,o))return U.byteLength;if(typeof U!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof U);const $=U.length,G=arguments.length>2&&arguments[2]===!0;if(!G&&$===0)return 0;let Z=!1;for(;;)switch(T){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":return ct(U).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $*2;case"hex":return $>>>1;case"base64":return yt(U).length;default:if(Z)return G?-1:ct(U).length;T=(""+T).toLowerCase(),Z=!0}}u.byteLength=R;function L(U,T,$){let G=!1;if((T===void 0||T<0)&&(T=0),T>this.length||(($===void 0||$>this.length)&&($=this.length),$<=0)||($>>>=0,T>>>=0,$<=T))return"";for(U||(U="utf8");;)switch(U){case"hex":return C(this,T,$);case"utf8":case"utf-8":return M(this,T,$);case"ascii":return B(this,T,$);case"latin1":case"binary":return I(this,T,$);case"base64":return N(this,T,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,T,$);default:if(G)throw new TypeError("Unknown encoding: "+U);U=(U+"").toLowerCase(),G=!0}}u.prototype._isBuffer=!0;function j(U,T,$){const G=U[T];U[T]=U[$],U[$]=G}u.prototype.swap16=function(){const T=this.length;if(T%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let $=0;$$&&(T+=" ... "),""},n&&(u.prototype[n]=u.prototype.inspect),u.prototype.compare=function(T,$,G,Z,re){if(Ze(T,s)&&(T=u.from(T,T.offset,T.byteLength)),!u.isBuffer(T))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof T);if($===void 0&&($=0),G===void 0&&(G=T?T.length:0),Z===void 0&&(Z=0),re===void 0&&(re=this.length),$<0||G>T.length||Z<0||re>this.length)throw new RangeError("out of range index");if(Z>=re&&$>=G)return 0;if(Z>=re)return-1;if($>=G)return 1;if($>>>=0,G>>>=0,Z>>>=0,re>>>=0,this===T)return 0;let ce=re-Z,Le=G-$;const Oe=Math.min(ce,Le),_e=this.slice(Z,re),Et=T.slice($,G);for(let Se=0;Se2147483647?$=2147483647:$<-2147483648&&($=-2147483648),$=+$,De($)&&($=Z?0:U.length-1),$<0&&($=U.length+$),$>=U.length){if(Z)return-1;$=U.length-1}else if($<0)if(Z)$=0;else return-1;if(typeof T=="string"&&(T=u.from(T,G)),u.isBuffer(T))return T.length===0?-1:K(U,T,$,G,Z);if(typeof T=="number")return T=T&255,typeof s.prototype.indexOf=="function"?Z?s.prototype.indexOf.call(U,T,$):s.prototype.lastIndexOf.call(U,T,$):K(U,[T],$,G,Z);throw new TypeError("val must be string, number or Buffer")}function K(U,T,$,G,Z){let re=1,ce=U.length,Le=T.length;if(G!==void 0&&(G=String(G).toLowerCase(),G==="ucs2"||G==="ucs-2"||G==="utf16le"||G==="utf-16le")){if(U.length<2||T.length<2)return-1;re=2,ce/=2,Le/=2,$/=2}function Oe(Et,Se){return re===1?Et[Se]:Et.readUInt16BE(Se*re)}let _e;if(Z){let Et=-1;for(_e=$;_ece&&($=ce-Le),_e=$;_e>=0;_e--){let Et=!0;for(let Se=0;SeZ&&(G=Z)):G=Z;const re=T.length;G>re/2&&(G=re/2);let ce;for(ce=0;ce>>0,isFinite(G)?(G=G>>>0,Z===void 0&&(Z="utf8")):(Z=G,G=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const re=this.length-$;if((G===void 0||G>re)&&(G=re),T.length>0&&(G<0||$<0)||$>this.length)throw new RangeError("Attempt to write outside buffer bounds");Z||(Z="utf8");let ce=!1;for(;;)switch(Z){case"hex":return Y(this,T,$,G);case"utf8":case"utf-8":return Q(this,T,$,G);case"ascii":case"latin1":case"binary":return F(this,T,$,G);case"base64":return x(this,T,$,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,T,$,G);default:if(ce)throw new TypeError("Unknown encoding: "+Z);Z=(""+Z).toLowerCase(),ce=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function N(U,T,$){return T===0&&$===U.length?e.fromByteArray(U):e.fromByteArray(U.slice(T,$))}function M(U,T,$){$=Math.min(U.length,$);const G=[];let Z=T;for(;Z<$;){const re=U[Z];let ce=null,Le=re>239?4:re>223?3:re>191?2:1;if(Z+Le<=$){let Oe,_e,Et,Se;switch(Le){case 1:re<128&&(ce=re);break;case 2:Oe=U[Z+1],(Oe&192)===128&&(Se=(re&31)<<6|Oe&63,Se>127&&(ce=Se));break;case 3:Oe=U[Z+1],_e=U[Z+2],(Oe&192)===128&&(_e&192)===128&&(Se=(re&15)<<12|(Oe&63)<<6|_e&63,Se>2047&&(Se<55296||Se>57343)&&(ce=Se));break;case 4:Oe=U[Z+1],_e=U[Z+2],Et=U[Z+3],(Oe&192)===128&&(_e&192)===128&&(Et&192)===128&&(Se=(re&15)<<18|(Oe&63)<<12|(_e&63)<<6|Et&63,Se>65535&&Se<1114112&&(ce=Se))}}ce===null?(ce=65533,Le=1):ce>65535&&(ce-=65536,G.push(ce>>>10&1023|55296),ce=56320|ce&1023),G.push(ce),Z+=Le}return O(G)}const A=4096;function O(U){const T=U.length;if(T<=A)return String.fromCharCode.apply(String,U);let $="",G=0;for(;GG)&&($=G);let Z="";for(let re=T;re<$;++re)Z+=He[U[re]];return Z}function D(U,T,$){const G=U.slice(T,$);let Z="";for(let re=0;reG&&(T=G),$<0?($+=G,$<0&&($=0)):$>G&&($=G),$$)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(T,$,G){T=T>>>0,$=$>>>0,G||q(T,$,this.length);let Z=this[T],re=1,ce=0;for(;++ce<$&&(re*=256);)Z+=this[T+ce]*re;return Z},u.prototype.readUintBE=u.prototype.readUIntBE=function(T,$,G){T=T>>>0,$=$>>>0,G||q(T,$,this.length);let Z=this[T+--$],re=1;for(;$>0&&(re*=256);)Z+=this[T+--$]*re;return Z},u.prototype.readUint8=u.prototype.readUInt8=function(T,$){return T=T>>>0,$||q(T,1,this.length),this[T]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(T,$){return T=T>>>0,$||q(T,2,this.length),this[T]|this[T+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(T,$){return T=T>>>0,$||q(T,2,this.length),this[T]<<8|this[T+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(T,$){return T=T>>>0,$||q(T,4,this.length),(this[T]|this[T+1]<<8|this[T+2]<<16)+this[T+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(T,$){return T=T>>>0,$||q(T,4,this.length),this[T]*16777216+(this[T+1]<<16|this[T+2]<<8|this[T+3])},u.prototype.readBigUInt64LE=Tt(function(T){T=T>>>0,Ne(T,"offset");const $=this[T],G=this[T+7];($===void 0||G===void 0)&&ke(T,this.length-8);const Z=$+this[++T]*2**8+this[++T]*2**16+this[++T]*2**24,re=this[++T]+this[++T]*2**8+this[++T]*2**16+G*2**24;return BigInt(Z)+(BigInt(re)<>>0,Ne(T,"offset");const $=this[T],G=this[T+7];($===void 0||G===void 0)&&ke(T,this.length-8);const Z=$*2**24+this[++T]*2**16+this[++T]*2**8+this[++T],re=this[++T]*2**24+this[++T]*2**16+this[++T]*2**8+G;return(BigInt(Z)<>>0,$=$>>>0,G||q(T,$,this.length);let Z=this[T],re=1,ce=0;for(;++ce<$&&(re*=256);)Z+=this[T+ce]*re;return re*=128,Z>=re&&(Z-=Math.pow(2,8*$)),Z},u.prototype.readIntBE=function(T,$,G){T=T>>>0,$=$>>>0,G||q(T,$,this.length);let Z=$,re=1,ce=this[T+--Z];for(;Z>0&&(re*=256);)ce+=this[T+--Z]*re;return re*=128,ce>=re&&(ce-=Math.pow(2,8*$)),ce},u.prototype.readInt8=function(T,$){return T=T>>>0,$||q(T,1,this.length),this[T]&128?(255-this[T]+1)*-1:this[T]},u.prototype.readInt16LE=function(T,$){T=T>>>0,$||q(T,2,this.length);const G=this[T]|this[T+1]<<8;return G&32768?G|4294901760:G},u.prototype.readInt16BE=function(T,$){T=T>>>0,$||q(T,2,this.length);const G=this[T+1]|this[T]<<8;return G&32768?G|4294901760:G},u.prototype.readInt32LE=function(T,$){return T=T>>>0,$||q(T,4,this.length),this[T]|this[T+1]<<8|this[T+2]<<16|this[T+3]<<24},u.prototype.readInt32BE=function(T,$){return T=T>>>0,$||q(T,4,this.length),this[T]<<24|this[T+1]<<16|this[T+2]<<8|this[T+3]},u.prototype.readBigInt64LE=Tt(function(T){T=T>>>0,Ne(T,"offset");const $=this[T],G=this[T+7];($===void 0||G===void 0)&&ke(T,this.length-8);const Z=this[T+4]+this[T+5]*2**8+this[T+6]*2**16+(G<<24);return(BigInt(Z)<>>0,Ne(T,"offset");const $=this[T],G=this[T+7];($===void 0||G===void 0)&&ke(T,this.length-8);const Z=($<<24)+this[++T]*2**16+this[++T]*2**8+this[++T];return(BigInt(Z)<>>0,$||q(T,4,this.length),r.read(this,T,!0,23,4)},u.prototype.readFloatBE=function(T,$){return T=T>>>0,$||q(T,4,this.length),r.read(this,T,!1,23,4)},u.prototype.readDoubleLE=function(T,$){return T=T>>>0,$||q(T,8,this.length),r.read(this,T,!0,52,8)},u.prototype.readDoubleBE=function(T,$){return T=T>>>0,$||q(T,8,this.length),r.read(this,T,!1,52,8)};function _(U,T,$,G,Z,re){if(!u.isBuffer(U))throw new TypeError('"buffer" argument must be a Buffer instance');if(T>Z||TU.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(T,$,G,Z){if(T=+T,$=$>>>0,G=G>>>0,!Z){const Le=Math.pow(2,8*G)-1;_(this,T,$,G,Le,0)}let re=1,ce=0;for(this[$]=T&255;++ce>>0,G=G>>>0,!Z){const Le=Math.pow(2,8*G)-1;_(this,T,$,G,Le,0)}let re=G-1,ce=1;for(this[$+re]=T&255;--re>=0&&(ce*=256);)this[$+re]=T/ce&255;return $+G},u.prototype.writeUint8=u.prototype.writeUInt8=function(T,$,G){return T=+T,$=$>>>0,G||_(this,T,$,1,255,0),this[$]=T&255,$+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(T,$,G){return T=+T,$=$>>>0,G||_(this,T,$,2,65535,0),this[$]=T&255,this[$+1]=T>>>8,$+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(T,$,G){return T=+T,$=$>>>0,G||_(this,T,$,2,65535,0),this[$]=T>>>8,this[$+1]=T&255,$+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(T,$,G){return T=+T,$=$>>>0,G||_(this,T,$,4,4294967295,0),this[$+3]=T>>>24,this[$+2]=T>>>16,this[$+1]=T>>>8,this[$]=T&255,$+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(T,$,G){return T=+T,$=$>>>0,G||_(this,T,$,4,4294967295,0),this[$]=T>>>24,this[$+1]=T>>>16,this[$+2]=T>>>8,this[$+3]=T&255,$+4};function W(U,T,$,G,Z){ve(T,G,Z,U,$,7);let re=Number(T&BigInt(4294967295));U[$++]=re,re=re>>8,U[$++]=re,re=re>>8,U[$++]=re,re=re>>8,U[$++]=re;let ce=Number(T>>BigInt(32)&BigInt(4294967295));return U[$++]=ce,ce=ce>>8,U[$++]=ce,ce=ce>>8,U[$++]=ce,ce=ce>>8,U[$++]=ce,$}function V(U,T,$,G,Z){ve(T,G,Z,U,$,7);let re=Number(T&BigInt(4294967295));U[$+7]=re,re=re>>8,U[$+6]=re,re=re>>8,U[$+5]=re,re=re>>8,U[$+4]=re;let ce=Number(T>>BigInt(32)&BigInt(4294967295));return U[$+3]=ce,ce=ce>>8,U[$+2]=ce,ce=ce>>8,U[$+1]=ce,ce=ce>>8,U[$]=ce,$+8}u.prototype.writeBigUInt64LE=Tt(function(T,$=0){return W(this,T,$,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=Tt(function(T,$=0){return V(this,T,$,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(T,$,G,Z){if(T=+T,$=$>>>0,!Z){const Oe=Math.pow(2,8*G-1);_(this,T,$,G,Oe-1,-Oe)}let re=0,ce=1,Le=0;for(this[$]=T&255;++re>0)-Le&255;return $+G},u.prototype.writeIntBE=function(T,$,G,Z){if(T=+T,$=$>>>0,!Z){const Oe=Math.pow(2,8*G-1);_(this,T,$,G,Oe-1,-Oe)}let re=G-1,ce=1,Le=0;for(this[$+re]=T&255;--re>=0&&(ce*=256);)T<0&&Le===0&&this[$+re+1]!==0&&(Le=1),this[$+re]=(T/ce>>0)-Le&255;return $+G},u.prototype.writeInt8=function(T,$,G){return T=+T,$=$>>>0,G||_(this,T,$,1,127,-128),T<0&&(T=255+T+1),this[$]=T&255,$+1},u.prototype.writeInt16LE=function(T,$,G){return T=+T,$=$>>>0,G||_(this,T,$,2,32767,-32768),this[$]=T&255,this[$+1]=T>>>8,$+2},u.prototype.writeInt16BE=function(T,$,G){return T=+T,$=$>>>0,G||_(this,T,$,2,32767,-32768),this[$]=T>>>8,this[$+1]=T&255,$+2},u.prototype.writeInt32LE=function(T,$,G){return T=+T,$=$>>>0,G||_(this,T,$,4,2147483647,-2147483648),this[$]=T&255,this[$+1]=T>>>8,this[$+2]=T>>>16,this[$+3]=T>>>24,$+4},u.prototype.writeInt32BE=function(T,$,G){return T=+T,$=$>>>0,G||_(this,T,$,4,2147483647,-2147483648),T<0&&(T=4294967295+T+1),this[$]=T>>>24,this[$+1]=T>>>16,this[$+2]=T>>>8,this[$+3]=T&255,$+4},u.prototype.writeBigInt64LE=Tt(function(T,$=0){return W(this,T,$,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=Tt(function(T,$=0){return V(this,T,$,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function J(U,T,$,G,Z,re){if($+G>U.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function ee(U,T,$,G,Z){return T=+T,$=$>>>0,Z||J(U,T,$,4),r.write(U,T,$,G,23,4),$+4}u.prototype.writeFloatLE=function(T,$,G){return ee(this,T,$,!0,G)},u.prototype.writeFloatBE=function(T,$,G){return ee(this,T,$,!1,G)};function se(U,T,$,G,Z){return T=+T,$=$>>>0,Z||J(U,T,$,8),r.write(U,T,$,G,52,8),$+8}u.prototype.writeDoubleLE=function(T,$,G){return se(this,T,$,!0,G)},u.prototype.writeDoubleBE=function(T,$,G){return se(this,T,$,!1,G)},u.prototype.copy=function(T,$,G,Z){if(!u.isBuffer(T))throw new TypeError("argument should be a Buffer");if(G||(G=0),!Z&&Z!==0&&(Z=this.length),$>=T.length&&($=T.length),$||($=0),Z>0&&Z=this.length)throw new RangeError("Index out of range");if(Z<0)throw new RangeError("sourceEnd out of bounds");Z>this.length&&(Z=this.length),T.length-$>>0,G=G===void 0?this.length:G>>>0,T||(T=0);let re;if(typeof T=="number")for(re=$;re2**32?Z=be(String($)):typeof $=="bigint"&&(Z=String($),($>BigInt(2)**BigInt(32)||$<-(BigInt(2)**BigInt(32)))&&(Z=be(Z)),Z+="n"),G+=` It must be ${T}. Received ${Z}`,G},RangeError);function be(U){let T="",$=U.length;const G=U[0]==="-"?1:0;for(;$>=G+4;$-=3)T=`_${U.slice($-3,$)}${T}`;return`${U.slice(0,$)}${T}`}function he(U,T,$){Ne(T,"offset"),(U[T]===void 0||U[T+$]===void 0)&&ke(T,U.length-($+1))}function ve(U,T,$,G,Z,re){if(U>$||U3?T===0||T===BigInt(0)?Le=`>= 0${ce} and < 2${ce} ** ${(re+1)*8}${ce}`:Le=`>= -(2${ce} ** ${(re+1)*8-1}${ce}) and < 2 ** ${(re+1)*8-1}${ce}`:Le=`>= ${T}${ce} and <= ${$}${ce}`,new ie.ERR_OUT_OF_RANGE("value",Le,U)}he(G,Z,re)}function Ne(U,T){if(typeof U!="number")throw new ie.ERR_INVALID_ARG_TYPE(T,"number",U)}function ke(U,T,$){throw Math.floor(U)!==U?(Ne(U,$),new ie.ERR_OUT_OF_RANGE($||"offset","an integer",U)):T<0?new ie.ERR_BUFFER_OUT_OF_BOUNDS:new ie.ERR_OUT_OF_RANGE($||"offset",`>= ${$?1:0} and <= ${T}`,U)}const Ae=/[^+/0-9A-Za-z-_]/g;function Xe(U){if(U=U.split("=")[0],U=U.trim().replace(Ae,""),U.length<2)return"";for(;U.length%4!==0;)U=U+"=";return U}function ct(U,T){T=T||1/0;let $;const G=U.length;let Z=null;const re=[];for(let ce=0;ce55295&&$<57344){if(!Z){if($>56319){(T-=3)>-1&&re.push(239,191,189);continue}else if(ce+1===G){(T-=3)>-1&&re.push(239,191,189);continue}Z=$;continue}if($<56320){(T-=3)>-1&&re.push(239,191,189),Z=$;continue}$=(Z-55296<<10|$-56320)+65536}else Z&&(T-=3)>-1&&re.push(239,191,189);if(Z=null,$<128){if((T-=1)<0)break;re.push($)}else if($<2048){if((T-=2)<0)break;re.push($>>6|192,$&63|128)}else if($<65536){if((T-=3)<0)break;re.push($>>12|224,$>>6&63|128,$&63|128)}else if($<1114112){if((T-=4)<0)break;re.push($>>18|240,$>>12&63|128,$>>6&63|128,$&63|128)}else throw new Error("Invalid code point")}return re}function Qe(U){const T=[];for(let $=0;$>8,Z=$%256,re.push(Z),re.push(G);return re}function yt(U){return e.toByteArray(Xe(U))}function ge(U,T,$,G){let Z;for(Z=0;Z=T.length||Z>=U.length);++Z)T[Z+$]=U[Z];return Z}function Ze(U,T){return U instanceof T||U!=null&&U.constructor!=null&&U.constructor.name!=null&&U.constructor.name===T.name}function De(U){return U!==U}const He=function(){const U="0123456789abcdef",T=new Array(256);for(let $=0;$<16;++$){const G=$*16;for(let Z=0;Z<16;++Z)T[G+Z]=U[$]+U[Z]}return T}();function Tt(U){return typeof BigInt>"u"?mt:U}function mt(){throw new Error("BigInt not supported")}})(Kr);const rl=Kr.Buffer,TG=Kr.Blob,OG=Kr.BlobOptions,RG=Kr.Buffer,$G=Kr.File,MG=Kr.FileOptions,NG=Kr.INSPECT_MAX_BYTES,DG=Kr.SlowBuffer,LG=Kr.TranscodeEncoding,jG=Kr.atob,BG=Kr.btoa,FG=Kr.constants,UG=Kr.isAscii,zG=Kr.isUtf8,qG=Kr.kMaxLength,WG=Kr.kStringMaxLength,HG=Kr.resolveObjectURL,VG=Kr.transcode,GG=Object.freeze(Object.defineProperty({__proto__:null,Blob:TG,BlobOptions:OG,Buffer:RG,File:$G,FileOptions:MG,INSPECT_MAX_BYTES:NG,SlowBuffer:DG,TranscodeEncoding:LG,atob:jG,btoa:BG,constants:FG,default:rl,isAscii:UG,isUtf8:zG,kMaxLength:qG,kStringMaxLength:WG,resolveObjectURL:HG,transcode:VG},Symbol.toStringTag,{value:"Module"})),KG=kr(GG);ZE.exports;(function(t){(function(e,r){function n(F,x){if(!F)throw new Error(x||"Assertion failed")}function i(F,x){F.super_=x;var k=function(){};k.prototype=x.prototype,F.prototype=new k,F.prototype.constructor=F}function s(F,x,k){if(s.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((x==="le"||x==="be")&&(k=x,x=10),this._init(F||0,x||10,k||"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=KG.Buffer}catch{}s.isBN=function(x){return x instanceof s?!0:x!==null&&typeof x=="object"&&x.constructor.wordSize===s.wordSize&&Array.isArray(x.words)},s.max=function(x,k){return x.cmp(k)>0?x:k},s.min=function(x,k){return x.cmp(k)<0?x:k},s.prototype._init=function(x,k,N){if(typeof x=="number")return this._initNumber(x,k,N);if(typeof x=="object")return this._initArray(x,k,N);k==="hex"&&(k=16),n(k===(k|0)&&k>=2&&k<=36),x=x.toString().replace(/\s+/g,"");var M=0;x[0]==="-"&&(M++,this.negative=1),M=0;M-=3)O=x[M]|x[M-1]<<8|x[M-2]<<16,this.words[A]|=O<>>26-B&67108863,B+=24,B>=26&&(B-=26,A++);else if(N==="le")for(M=0,A=0;M>>26-B&67108863,B+=24,B>=26&&(B-=26,A++);return this._strip()};function a(F,x){var k=F.charCodeAt(x);if(k>=48&&k<=57)return k-48;if(k>=65&&k<=70)return k-55;if(k>=97&&k<=102)return k-87;n(!1,"Invalid character in "+F)}function c(F,x,k){var N=a(F,k);return k-1>=x&&(N|=a(F,k-1)<<4),N}s.prototype._parseHex=function(x,k,N){this.length=Math.ceil((x.length-k)/6),this.words=new Array(this.length);for(var M=0;M=k;M-=2)B=c(x,k,M)<=18?(A-=18,O+=1,this.words[O]|=B>>>26):A+=8;else{var I=x.length-k;for(M=I%2===0?k+1:k;M=18?(A-=18,O+=1,this.words[O]|=B>>>26):A+=8}this._strip()};function l(F,x,k,N){for(var M=0,A=0,O=Math.min(F.length,k),B=x;B=49?A=I-49+10:I>=17?A=I-17+10:A=I,n(I>=0&&A1&&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")]=f}catch{s.prototype.inspect=f}else s.prototype.inspect=f;function f(){return(this.red?""}var d=["","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"],h=[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],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(x,k){x=x||10,k=k|0||1;var N;if(x===16||x==="hex"){N="";for(var M=0,A=0,O=0;O>>24-M&16777215,M+=2,M>=26&&(M-=26,O--),A!==0||O!==this.length-1?N=d[6-I.length]+I+N:N=I+N}for(A!==0&&(N=A.toString(16)+N);N.length%k!==0;)N="0"+N;return this.negative!==0&&(N="-"+N),N}if(x===(x|0)&&x>=2&&x<=36){var C=h[x],D=p[x];N="";var q=this.clone();for(q.negative=0;!q.isZero();){var _=q.modrn(D).toString(x);q=q.idivn(D),q.isZero()?N=_+N:N=d[C-_.length]+_+N}for(this.isZero()&&(N="0"+N);N.length%k!==0;)N="0"+N;return this.negative!==0&&(N="-"+N),N}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var x=this.words[0];return this.length===2?x+=this.words[1]*67108864:this.length===3&&this.words[2]===1?x+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-x:x},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(x,k){return this.toArrayLike(o,x,k)}),s.prototype.toArray=function(x,k){return this.toArrayLike(Array,x,k)};var m=function(x,k){return x.allocUnsafe?x.allocUnsafe(k):new x(k)};s.prototype.toArrayLike=function(x,k,N){this._strip();var M=this.byteLength(),A=N||Math.max(1,M);n(M<=A,"byte array longer than desired length"),n(A>0,"Requested array length <= 0");var O=m(x,A),B=k==="le"?"LE":"BE";return this["_toArrayLike"+B](O,M),O},s.prototype._toArrayLikeLE=function(x,k){for(var N=0,M=0,A=0,O=0;A>8&255),N>16&255),O===6?(N>24&255),M=0,O=0):(M=B>>>24,O+=2)}if(N=0&&(x[N--]=B>>8&255),N>=0&&(x[N--]=B>>16&255),O===6?(N>=0&&(x[N--]=B>>24&255),M=0,O=0):(M=B>>>24,O+=2)}if(N>=0)for(x[N--]=M;N>=0;)x[N--]=0},Math.clz32?s.prototype._countBits=function(x){return 32-Math.clz32(x)}:s.prototype._countBits=function(x){var k=x,N=0;return k>=4096&&(N+=13,k>>>=13),k>=64&&(N+=7,k>>>=7),k>=8&&(N+=4,k>>>=4),k>=2&&(N+=2,k>>>=2),N+k},s.prototype._zeroBits=function(x){if(x===0)return 26;var k=x,N=0;return k&8191||(N+=13,k>>>=13),k&127||(N+=7,k>>>=7),k&15||(N+=4,k>>>=4),k&3||(N+=2,k>>>=2),k&1||N++,N},s.prototype.bitLength=function(){var x=this.words[this.length-1],k=this._countBits(x);return(this.length-1)*26+k};function v(F){for(var x=new Array(F.bitLength()),k=0;k>>M&1}return x}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var x=0,k=0;kx.length?this.clone().ior(x):x.clone().ior(this)},s.prototype.uor=function(x){return this.length>x.length?this.clone().iuor(x):x.clone().iuor(this)},s.prototype.iuand=function(x){var k;this.length>x.length?k=x:k=this;for(var N=0;Nx.length?this.clone().iand(x):x.clone().iand(this)},s.prototype.uand=function(x){return this.length>x.length?this.clone().iuand(x):x.clone().iuand(this)},s.prototype.iuxor=function(x){var k,N;this.length>x.length?(k=this,N=x):(k=x,N=this);for(var M=0;Mx.length?this.clone().ixor(x):x.clone().ixor(this)},s.prototype.uxor=function(x){return this.length>x.length?this.clone().iuxor(x):x.clone().iuxor(this)},s.prototype.inotn=function(x){n(typeof x=="number"&&x>=0);var k=Math.ceil(x/26)|0,N=x%26;this._expand(k),N>0&&k--;for(var M=0;M0&&(this.words[M]=~this.words[M]&67108863>>26-N),this._strip()},s.prototype.notn=function(x){return this.clone().inotn(x)},s.prototype.setn=function(x,k){n(typeof x=="number"&&x>=0);var N=x/26|0,M=x%26;return this._expand(N+1),k?this.words[N]=this.words[N]|1<x.length?(N=this,M=x):(N=x,M=this);for(var A=0,O=0;O>>26;for(;A!==0&&O>>26;if(this.length=N.length,A!==0)this.words[this.length]=A,this.length++;else if(N!==this)for(;Ox.length?this.clone().iadd(x):x.clone().iadd(this)},s.prototype.isub=function(x){if(x.negative!==0){x.negative=0;var k=this.iadd(x);return x.negative=1,k._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(x),this.negative=1,this._normSign();var N=this.cmp(x);if(N===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,A;N>0?(M=this,A=x):(M=x,A=this);for(var O=0,B=0;B>26,this.words[B]=k&67108863;for(;O!==0&&B>26,this.words[B]=k&67108863;if(O===0&&B>>26,q=I&67108863,_=Math.min(C,x.length-1),W=Math.max(0,C-F.length+1);W<=_;W++){var V=C-W|0;M=F.words[V]|0,A=x.words[W]|0,O=M*A+q,D+=O/67108864|0,q=O&67108863}k.words[C]=q|0,I=D|0}return I!==0?k.words[C]=I|0:k.length--,k._strip()}var b=function(x,k,N){var M=x.words,A=k.words,O=N.words,B=0,I,C,D,q=M[0]|0,_=q&8191,W=q>>>13,V=M[1]|0,J=V&8191,ee=V>>>13,se=M[2]|0,ie=se&8191,ae=se>>>13,be=M[3]|0,he=be&8191,ve=be>>>13,Ne=M[4]|0,ke=Ne&8191,Ae=Ne>>>13,Xe=M[5]|0,ct=Xe&8191,Qe=Xe>>>13,hs=M[6]|0,yt=hs&8191,ge=hs>>>13,Ze=M[7]|0,De=Ze&8191,He=Ze>>>13,Tt=M[8]|0,mt=Tt&8191,U=Tt>>>13,T=M[9]|0,$=T&8191,G=T>>>13,Z=A[0]|0,re=Z&8191,ce=Z>>>13,Le=A[1]|0,Oe=Le&8191,_e=Le>>>13,Et=A[2]|0,Se=Et&8191,Ft=Et>>>13,hl=A[3]|0,Ut=hl&8191,zt=hl>>>13,pl=A[4]|0,qt=pl&8191,Wt=pl>>>13,ml=A[5]|0,Ht=ml&8191,Vt=ml>>>13,vl=A[6]|0,Gt=vl&8191,Kt=vl>>>13,yl=A[7]|0,Yt=yl&8191,Qt=yl>>>13,gl=A[8]|0,Jt=gl&8191,Xt=gl>>>13,bl=A[9]|0,Zt=bl&8191,er=bl>>>13;N.negative=x.negative^k.negative,N.length=19,I=Math.imul(_,re),C=Math.imul(_,ce),C=C+Math.imul(W,re)|0,D=Math.imul(W,ce);var Ba=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,I=Math.imul(J,re),C=Math.imul(J,ce),C=C+Math.imul(ee,re)|0,D=Math.imul(ee,ce),I=I+Math.imul(_,Oe)|0,C=C+Math.imul(_,_e)|0,C=C+Math.imul(W,Oe)|0,D=D+Math.imul(W,_e)|0;var Fa=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,I=Math.imul(ie,re),C=Math.imul(ie,ce),C=C+Math.imul(ae,re)|0,D=Math.imul(ae,ce),I=I+Math.imul(J,Oe)|0,C=C+Math.imul(J,_e)|0,C=C+Math.imul(ee,Oe)|0,D=D+Math.imul(ee,_e)|0,I=I+Math.imul(_,Se)|0,C=C+Math.imul(_,Ft)|0,C=C+Math.imul(W,Se)|0,D=D+Math.imul(W,Ft)|0;var Ua=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+(Ua>>>26)|0,Ua&=67108863,I=Math.imul(he,re),C=Math.imul(he,ce),C=C+Math.imul(ve,re)|0,D=Math.imul(ve,ce),I=I+Math.imul(ie,Oe)|0,C=C+Math.imul(ie,_e)|0,C=C+Math.imul(ae,Oe)|0,D=D+Math.imul(ae,_e)|0,I=I+Math.imul(J,Se)|0,C=C+Math.imul(J,Ft)|0,C=C+Math.imul(ee,Se)|0,D=D+Math.imul(ee,Ft)|0,I=I+Math.imul(_,Ut)|0,C=C+Math.imul(_,zt)|0,C=C+Math.imul(W,Ut)|0,D=D+Math.imul(W,zt)|0;var za=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+(za>>>26)|0,za&=67108863,I=Math.imul(ke,re),C=Math.imul(ke,ce),C=C+Math.imul(Ae,re)|0,D=Math.imul(Ae,ce),I=I+Math.imul(he,Oe)|0,C=C+Math.imul(he,_e)|0,C=C+Math.imul(ve,Oe)|0,D=D+Math.imul(ve,_e)|0,I=I+Math.imul(ie,Se)|0,C=C+Math.imul(ie,Ft)|0,C=C+Math.imul(ae,Se)|0,D=D+Math.imul(ae,Ft)|0,I=I+Math.imul(J,Ut)|0,C=C+Math.imul(J,zt)|0,C=C+Math.imul(ee,Ut)|0,D=D+Math.imul(ee,zt)|0,I=I+Math.imul(_,qt)|0,C=C+Math.imul(_,Wt)|0,C=C+Math.imul(W,qt)|0,D=D+Math.imul(W,Wt)|0;var qa=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+(qa>>>26)|0,qa&=67108863,I=Math.imul(ct,re),C=Math.imul(ct,ce),C=C+Math.imul(Qe,re)|0,D=Math.imul(Qe,ce),I=I+Math.imul(ke,Oe)|0,C=C+Math.imul(ke,_e)|0,C=C+Math.imul(Ae,Oe)|0,D=D+Math.imul(Ae,_e)|0,I=I+Math.imul(he,Se)|0,C=C+Math.imul(he,Ft)|0,C=C+Math.imul(ve,Se)|0,D=D+Math.imul(ve,Ft)|0,I=I+Math.imul(ie,Ut)|0,C=C+Math.imul(ie,zt)|0,C=C+Math.imul(ae,Ut)|0,D=D+Math.imul(ae,zt)|0,I=I+Math.imul(J,qt)|0,C=C+Math.imul(J,Wt)|0,C=C+Math.imul(ee,qt)|0,D=D+Math.imul(ee,Wt)|0,I=I+Math.imul(_,Ht)|0,C=C+Math.imul(_,Vt)|0,C=C+Math.imul(W,Ht)|0,D=D+Math.imul(W,Vt)|0;var T2=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+(T2>>>26)|0,T2&=67108863,I=Math.imul(yt,re),C=Math.imul(yt,ce),C=C+Math.imul(ge,re)|0,D=Math.imul(ge,ce),I=I+Math.imul(ct,Oe)|0,C=C+Math.imul(ct,_e)|0,C=C+Math.imul(Qe,Oe)|0,D=D+Math.imul(Qe,_e)|0,I=I+Math.imul(ke,Se)|0,C=C+Math.imul(ke,Ft)|0,C=C+Math.imul(Ae,Se)|0,D=D+Math.imul(Ae,Ft)|0,I=I+Math.imul(he,Ut)|0,C=C+Math.imul(he,zt)|0,C=C+Math.imul(ve,Ut)|0,D=D+Math.imul(ve,zt)|0,I=I+Math.imul(ie,qt)|0,C=C+Math.imul(ie,Wt)|0,C=C+Math.imul(ae,qt)|0,D=D+Math.imul(ae,Wt)|0,I=I+Math.imul(J,Ht)|0,C=C+Math.imul(J,Vt)|0,C=C+Math.imul(ee,Ht)|0,D=D+Math.imul(ee,Vt)|0,I=I+Math.imul(_,Gt)|0,C=C+Math.imul(_,Kt)|0,C=C+Math.imul(W,Gt)|0,D=D+Math.imul(W,Kt)|0;var O2=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+(O2>>>26)|0,O2&=67108863,I=Math.imul(De,re),C=Math.imul(De,ce),C=C+Math.imul(He,re)|0,D=Math.imul(He,ce),I=I+Math.imul(yt,Oe)|0,C=C+Math.imul(yt,_e)|0,C=C+Math.imul(ge,Oe)|0,D=D+Math.imul(ge,_e)|0,I=I+Math.imul(ct,Se)|0,C=C+Math.imul(ct,Ft)|0,C=C+Math.imul(Qe,Se)|0,D=D+Math.imul(Qe,Ft)|0,I=I+Math.imul(ke,Ut)|0,C=C+Math.imul(ke,zt)|0,C=C+Math.imul(Ae,Ut)|0,D=D+Math.imul(Ae,zt)|0,I=I+Math.imul(he,qt)|0,C=C+Math.imul(he,Wt)|0,C=C+Math.imul(ve,qt)|0,D=D+Math.imul(ve,Wt)|0,I=I+Math.imul(ie,Ht)|0,C=C+Math.imul(ie,Vt)|0,C=C+Math.imul(ae,Ht)|0,D=D+Math.imul(ae,Vt)|0,I=I+Math.imul(J,Gt)|0,C=C+Math.imul(J,Kt)|0,C=C+Math.imul(ee,Gt)|0,D=D+Math.imul(ee,Kt)|0,I=I+Math.imul(_,Yt)|0,C=C+Math.imul(_,Qt)|0,C=C+Math.imul(W,Yt)|0,D=D+Math.imul(W,Qt)|0;var R2=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+(R2>>>26)|0,R2&=67108863,I=Math.imul(mt,re),C=Math.imul(mt,ce),C=C+Math.imul(U,re)|0,D=Math.imul(U,ce),I=I+Math.imul(De,Oe)|0,C=C+Math.imul(De,_e)|0,C=C+Math.imul(He,Oe)|0,D=D+Math.imul(He,_e)|0,I=I+Math.imul(yt,Se)|0,C=C+Math.imul(yt,Ft)|0,C=C+Math.imul(ge,Se)|0,D=D+Math.imul(ge,Ft)|0,I=I+Math.imul(ct,Ut)|0,C=C+Math.imul(ct,zt)|0,C=C+Math.imul(Qe,Ut)|0,D=D+Math.imul(Qe,zt)|0,I=I+Math.imul(ke,qt)|0,C=C+Math.imul(ke,Wt)|0,C=C+Math.imul(Ae,qt)|0,D=D+Math.imul(Ae,Wt)|0,I=I+Math.imul(he,Ht)|0,C=C+Math.imul(he,Vt)|0,C=C+Math.imul(ve,Ht)|0,D=D+Math.imul(ve,Vt)|0,I=I+Math.imul(ie,Gt)|0,C=C+Math.imul(ie,Kt)|0,C=C+Math.imul(ae,Gt)|0,D=D+Math.imul(ae,Kt)|0,I=I+Math.imul(J,Yt)|0,C=C+Math.imul(J,Qt)|0,C=C+Math.imul(ee,Yt)|0,D=D+Math.imul(ee,Qt)|0,I=I+Math.imul(_,Jt)|0,C=C+Math.imul(_,Xt)|0,C=C+Math.imul(W,Jt)|0,D=D+Math.imul(W,Xt)|0;var $2=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+($2>>>26)|0,$2&=67108863,I=Math.imul($,re),C=Math.imul($,ce),C=C+Math.imul(G,re)|0,D=Math.imul(G,ce),I=I+Math.imul(mt,Oe)|0,C=C+Math.imul(mt,_e)|0,C=C+Math.imul(U,Oe)|0,D=D+Math.imul(U,_e)|0,I=I+Math.imul(De,Se)|0,C=C+Math.imul(De,Ft)|0,C=C+Math.imul(He,Se)|0,D=D+Math.imul(He,Ft)|0,I=I+Math.imul(yt,Ut)|0,C=C+Math.imul(yt,zt)|0,C=C+Math.imul(ge,Ut)|0,D=D+Math.imul(ge,zt)|0,I=I+Math.imul(ct,qt)|0,C=C+Math.imul(ct,Wt)|0,C=C+Math.imul(Qe,qt)|0,D=D+Math.imul(Qe,Wt)|0,I=I+Math.imul(ke,Ht)|0,C=C+Math.imul(ke,Vt)|0,C=C+Math.imul(Ae,Ht)|0,D=D+Math.imul(Ae,Vt)|0,I=I+Math.imul(he,Gt)|0,C=C+Math.imul(he,Kt)|0,C=C+Math.imul(ve,Gt)|0,D=D+Math.imul(ve,Kt)|0,I=I+Math.imul(ie,Yt)|0,C=C+Math.imul(ie,Qt)|0,C=C+Math.imul(ae,Yt)|0,D=D+Math.imul(ae,Qt)|0,I=I+Math.imul(J,Jt)|0,C=C+Math.imul(J,Xt)|0,C=C+Math.imul(ee,Jt)|0,D=D+Math.imul(ee,Xt)|0,I=I+Math.imul(_,Zt)|0,C=C+Math.imul(_,er)|0,C=C+Math.imul(W,Zt)|0,D=D+Math.imul(W,er)|0;var M2=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+(M2>>>26)|0,M2&=67108863,I=Math.imul($,Oe),C=Math.imul($,_e),C=C+Math.imul(G,Oe)|0,D=Math.imul(G,_e),I=I+Math.imul(mt,Se)|0,C=C+Math.imul(mt,Ft)|0,C=C+Math.imul(U,Se)|0,D=D+Math.imul(U,Ft)|0,I=I+Math.imul(De,Ut)|0,C=C+Math.imul(De,zt)|0,C=C+Math.imul(He,Ut)|0,D=D+Math.imul(He,zt)|0,I=I+Math.imul(yt,qt)|0,C=C+Math.imul(yt,Wt)|0,C=C+Math.imul(ge,qt)|0,D=D+Math.imul(ge,Wt)|0,I=I+Math.imul(ct,Ht)|0,C=C+Math.imul(ct,Vt)|0,C=C+Math.imul(Qe,Ht)|0,D=D+Math.imul(Qe,Vt)|0,I=I+Math.imul(ke,Gt)|0,C=C+Math.imul(ke,Kt)|0,C=C+Math.imul(Ae,Gt)|0,D=D+Math.imul(Ae,Kt)|0,I=I+Math.imul(he,Yt)|0,C=C+Math.imul(he,Qt)|0,C=C+Math.imul(ve,Yt)|0,D=D+Math.imul(ve,Qt)|0,I=I+Math.imul(ie,Jt)|0,C=C+Math.imul(ie,Xt)|0,C=C+Math.imul(ae,Jt)|0,D=D+Math.imul(ae,Xt)|0,I=I+Math.imul(J,Zt)|0,C=C+Math.imul(J,er)|0,C=C+Math.imul(ee,Zt)|0,D=D+Math.imul(ee,er)|0;var N2=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+(N2>>>26)|0,N2&=67108863,I=Math.imul($,Se),C=Math.imul($,Ft),C=C+Math.imul(G,Se)|0,D=Math.imul(G,Ft),I=I+Math.imul(mt,Ut)|0,C=C+Math.imul(mt,zt)|0,C=C+Math.imul(U,Ut)|0,D=D+Math.imul(U,zt)|0,I=I+Math.imul(De,qt)|0,C=C+Math.imul(De,Wt)|0,C=C+Math.imul(He,qt)|0,D=D+Math.imul(He,Wt)|0,I=I+Math.imul(yt,Ht)|0,C=C+Math.imul(yt,Vt)|0,C=C+Math.imul(ge,Ht)|0,D=D+Math.imul(ge,Vt)|0,I=I+Math.imul(ct,Gt)|0,C=C+Math.imul(ct,Kt)|0,C=C+Math.imul(Qe,Gt)|0,D=D+Math.imul(Qe,Kt)|0,I=I+Math.imul(ke,Yt)|0,C=C+Math.imul(ke,Qt)|0,C=C+Math.imul(Ae,Yt)|0,D=D+Math.imul(Ae,Qt)|0,I=I+Math.imul(he,Jt)|0,C=C+Math.imul(he,Xt)|0,C=C+Math.imul(ve,Jt)|0,D=D+Math.imul(ve,Xt)|0,I=I+Math.imul(ie,Zt)|0,C=C+Math.imul(ie,er)|0,C=C+Math.imul(ae,Zt)|0,D=D+Math.imul(ae,er)|0;var D2=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+(D2>>>26)|0,D2&=67108863,I=Math.imul($,Ut),C=Math.imul($,zt),C=C+Math.imul(G,Ut)|0,D=Math.imul(G,zt),I=I+Math.imul(mt,qt)|0,C=C+Math.imul(mt,Wt)|0,C=C+Math.imul(U,qt)|0,D=D+Math.imul(U,Wt)|0,I=I+Math.imul(De,Ht)|0,C=C+Math.imul(De,Vt)|0,C=C+Math.imul(He,Ht)|0,D=D+Math.imul(He,Vt)|0,I=I+Math.imul(yt,Gt)|0,C=C+Math.imul(yt,Kt)|0,C=C+Math.imul(ge,Gt)|0,D=D+Math.imul(ge,Kt)|0,I=I+Math.imul(ct,Yt)|0,C=C+Math.imul(ct,Qt)|0,C=C+Math.imul(Qe,Yt)|0,D=D+Math.imul(Qe,Qt)|0,I=I+Math.imul(ke,Jt)|0,C=C+Math.imul(ke,Xt)|0,C=C+Math.imul(Ae,Jt)|0,D=D+Math.imul(Ae,Xt)|0,I=I+Math.imul(he,Zt)|0,C=C+Math.imul(he,er)|0,C=C+Math.imul(ve,Zt)|0,D=D+Math.imul(ve,er)|0;var L2=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+(L2>>>26)|0,L2&=67108863,I=Math.imul($,qt),C=Math.imul($,Wt),C=C+Math.imul(G,qt)|0,D=Math.imul(G,Wt),I=I+Math.imul(mt,Ht)|0,C=C+Math.imul(mt,Vt)|0,C=C+Math.imul(U,Ht)|0,D=D+Math.imul(U,Vt)|0,I=I+Math.imul(De,Gt)|0,C=C+Math.imul(De,Kt)|0,C=C+Math.imul(He,Gt)|0,D=D+Math.imul(He,Kt)|0,I=I+Math.imul(yt,Yt)|0,C=C+Math.imul(yt,Qt)|0,C=C+Math.imul(ge,Yt)|0,D=D+Math.imul(ge,Qt)|0,I=I+Math.imul(ct,Jt)|0,C=C+Math.imul(ct,Xt)|0,C=C+Math.imul(Qe,Jt)|0,D=D+Math.imul(Qe,Xt)|0,I=I+Math.imul(ke,Zt)|0,C=C+Math.imul(ke,er)|0,C=C+Math.imul(Ae,Zt)|0,D=D+Math.imul(Ae,er)|0;var j2=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+(j2>>>26)|0,j2&=67108863,I=Math.imul($,Ht),C=Math.imul($,Vt),C=C+Math.imul(G,Ht)|0,D=Math.imul(G,Vt),I=I+Math.imul(mt,Gt)|0,C=C+Math.imul(mt,Kt)|0,C=C+Math.imul(U,Gt)|0,D=D+Math.imul(U,Kt)|0,I=I+Math.imul(De,Yt)|0,C=C+Math.imul(De,Qt)|0,C=C+Math.imul(He,Yt)|0,D=D+Math.imul(He,Qt)|0,I=I+Math.imul(yt,Jt)|0,C=C+Math.imul(yt,Xt)|0,C=C+Math.imul(ge,Jt)|0,D=D+Math.imul(ge,Xt)|0,I=I+Math.imul(ct,Zt)|0,C=C+Math.imul(ct,er)|0,C=C+Math.imul(Qe,Zt)|0,D=D+Math.imul(Qe,er)|0;var B2=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+(B2>>>26)|0,B2&=67108863,I=Math.imul($,Gt),C=Math.imul($,Kt),C=C+Math.imul(G,Gt)|0,D=Math.imul(G,Kt),I=I+Math.imul(mt,Yt)|0,C=C+Math.imul(mt,Qt)|0,C=C+Math.imul(U,Yt)|0,D=D+Math.imul(U,Qt)|0,I=I+Math.imul(De,Jt)|0,C=C+Math.imul(De,Xt)|0,C=C+Math.imul(He,Jt)|0,D=D+Math.imul(He,Xt)|0,I=I+Math.imul(yt,Zt)|0,C=C+Math.imul(yt,er)|0,C=C+Math.imul(ge,Zt)|0,D=D+Math.imul(ge,er)|0;var F2=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+(F2>>>26)|0,F2&=67108863,I=Math.imul($,Yt),C=Math.imul($,Qt),C=C+Math.imul(G,Yt)|0,D=Math.imul(G,Qt),I=I+Math.imul(mt,Jt)|0,C=C+Math.imul(mt,Xt)|0,C=C+Math.imul(U,Jt)|0,D=D+Math.imul(U,Xt)|0,I=I+Math.imul(De,Zt)|0,C=C+Math.imul(De,er)|0,C=C+Math.imul(He,Zt)|0,D=D+Math.imul(He,er)|0;var U2=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+(U2>>>26)|0,U2&=67108863,I=Math.imul($,Jt),C=Math.imul($,Xt),C=C+Math.imul(G,Jt)|0,D=Math.imul(G,Xt),I=I+Math.imul(mt,Zt)|0,C=C+Math.imul(mt,er)|0,C=C+Math.imul(U,Zt)|0,D=D+Math.imul(U,er)|0;var z2=(B+I|0)+((C&8191)<<13)|0;B=(D+(C>>>13)|0)+(z2>>>26)|0,z2&=67108863,I=Math.imul($,Zt),C=Math.imul($,er),C=C+Math.imul(G,Zt)|0,D=Math.imul(G,er);var q2=(B+I|0)+((C&8191)<<13)|0;return B=(D+(C>>>13)|0)+(q2>>>26)|0,q2&=67108863,O[0]=Ba,O[1]=Fa,O[2]=Ua,O[3]=za,O[4]=qa,O[5]=T2,O[6]=O2,O[7]=R2,O[8]=$2,O[9]=M2,O[10]=N2,O[11]=D2,O[12]=L2,O[13]=j2,O[14]=B2,O[15]=F2,O[16]=U2,O[17]=z2,O[18]=q2,B!==0&&(O[19]=B,N.length++),N};Math.imul||(b=y);function E(F,x,k){k.negative=x.negative^F.negative,k.length=F.length+x.length;for(var N=0,M=0,A=0;A>>26)|0,M+=O>>>26,O&=67108863}k.words[A]=B,N=O,O=M}return N!==0?k.words[A]=N:k.length--,k._strip()}function S(F,x,k){return E(F,x,k)}s.prototype.mulTo=function(x,k){var N,M=this.length+x.length;return this.length===10&&x.length===10?N=b(this,x,k):M<63?N=y(this,x,k):M<1024?N=E(this,x,k):N=S(this,x,k),N},s.prototype.mul=function(x){var k=new s(null);return k.words=new Array(this.length+x.length),this.mulTo(x,k)},s.prototype.mulf=function(x){var k=new s(null);return k.words=new Array(this.length+x.length),S(this,x,k)},s.prototype.imul=function(x){return this.clone().mulTo(x,this)},s.prototype.imuln=function(x){var k=x<0;k&&(x=-x),n(typeof x=="number"),n(x<67108864);for(var N=0,M=0;M>=26,N+=A/67108864|0,N+=O>>>26,this.words[M]=O&67108863}return N!==0&&(this.words[M]=N,this.length++),k?this.ineg():this},s.prototype.muln=function(x){return this.clone().imuln(x)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(x){var k=v(x);if(k.length===0)return new s(1);for(var N=this,M=0;M=0);var k=x%26,N=(x-k)/26,M=67108863>>>26-k<<26-k,A;if(k!==0){var O=0;for(A=0;A>>26-k}O&&(this.words[A]=O,this.length++)}if(N!==0){for(A=this.length-1;A>=0;A--)this.words[A+N]=this.words[A];for(A=0;A=0);var M;k?M=(k-k%26)/26:M=0;var A=x%26,O=Math.min((x-A)/26,this.length),B=67108863^67108863>>>A<O)for(this.length-=O,C=0;C=0&&(D!==0||C>=M);C--){var q=this.words[C]|0;this.words[C]=D<<26-A|q>>>A,D=q&B}return I&&D!==0&&(I.words[I.length++]=D),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(x,k,N){return n(this.negative===0),this.iushrn(x,k,N)},s.prototype.shln=function(x){return this.clone().ishln(x)},s.prototype.ushln=function(x){return this.clone().iushln(x)},s.prototype.shrn=function(x){return this.clone().ishrn(x)},s.prototype.ushrn=function(x){return this.clone().iushrn(x)},s.prototype.testn=function(x){n(typeof x=="number"&&x>=0);var k=x%26,N=(x-k)/26,M=1<=0);var k=x%26,N=(x-k)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=N)return this;if(k!==0&&N++,this.length=Math.min(N,this.length),k!==0){var M=67108863^67108863>>>k<=67108864;k++)this.words[k]-=67108864,k===this.length-1?this.words[k+1]=1:this.words[k+1]++;return this.length=Math.max(this.length,k+1),this},s.prototype.isubn=function(x){if(n(typeof x=="number"),n(x<67108864),x<0)return this.iaddn(-x);if(this.negative!==0)return this.negative=0,this.iaddn(x),this.negative=1,this;if(this.words[0]-=x,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var k=0;k>26)-(I/67108864|0),this.words[A+N]=O&67108863}for(;A>26,this.words[A+N]=O&67108863;if(B===0)return this._strip();for(n(B===-1),B=0,A=0;A>26,this.words[A]=O&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(x,k){var N=this.length-x.length,M=this.clone(),A=x,O=A.words[A.length-1]|0,B=this._countBits(O);N=26-B,N!==0&&(A=A.ushln(N),M.iushln(N),O=A.words[A.length-1]|0);var I=M.length-A.length,C;if(k!=="mod"){C=new s(null),C.length=I+1,C.words=new Array(C.length);for(var D=0;D=0;_--){var W=(M.words[A.length+_]|0)*67108864+(M.words[A.length+_-1]|0);for(W=Math.min(W/O|0,67108863),M._ishlnsubmul(A,W,_);M.negative!==0;)W--,M.negative=0,M._ishlnsubmul(A,1,_),M.isZero()||(M.negative^=1);C&&(C.words[_]=W)}return C&&C._strip(),M._strip(),k!=="div"&&N!==0&&M.iushrn(N),{div:C||null,mod:M}},s.prototype.divmod=function(x,k,N){if(n(!x.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var M,A,O;return this.negative!==0&&x.negative===0?(O=this.neg().divmod(x,k),k!=="mod"&&(M=O.div.neg()),k!=="div"&&(A=O.mod.neg(),N&&A.negative!==0&&A.iadd(x)),{div:M,mod:A}):this.negative===0&&x.negative!==0?(O=this.divmod(x.neg(),k),k!=="mod"&&(M=O.div.neg()),{div:M,mod:O.mod}):this.negative&x.negative?(O=this.neg().divmod(x.neg(),k),k!=="div"&&(A=O.mod.neg(),N&&A.negative!==0&&A.isub(x)),{div:O.div,mod:A}):x.length>this.length||this.cmp(x)<0?{div:new s(0),mod:this}:x.length===1?k==="div"?{div:this.divn(x.words[0]),mod:null}:k==="mod"?{div:null,mod:new s(this.modrn(x.words[0]))}:{div:this.divn(x.words[0]),mod:new s(this.modrn(x.words[0]))}:this._wordDiv(x,k)},s.prototype.div=function(x){return this.divmod(x,"div",!1).div},s.prototype.mod=function(x){return this.divmod(x,"mod",!1).mod},s.prototype.umod=function(x){return this.divmod(x,"mod",!0).mod},s.prototype.divRound=function(x){var k=this.divmod(x);if(k.mod.isZero())return k.div;var N=k.div.negative!==0?k.mod.isub(x):k.mod,M=x.ushrn(1),A=x.andln(1),O=N.cmp(M);return O<0||A===1&&O===0?k.div:k.div.negative!==0?k.div.isubn(1):k.div.iaddn(1)},s.prototype.modrn=function(x){var k=x<0;k&&(x=-x),n(x<=67108863);for(var N=(1<<26)%x,M=0,A=this.length-1;A>=0;A--)M=(N*M+(this.words[A]|0))%x;return k?-M:M},s.prototype.modn=function(x){return this.modrn(x)},s.prototype.idivn=function(x){var k=x<0;k&&(x=-x),n(x<=67108863);for(var N=0,M=this.length-1;M>=0;M--){var A=(this.words[M]|0)+N*67108864;this.words[M]=A/x|0,N=A%x}return this._strip(),k?this.ineg():this},s.prototype.divn=function(x){return this.clone().idivn(x)},s.prototype.egcd=function(x){n(x.negative===0),n(!x.isZero());var k=this,N=x.clone();k.negative!==0?k=k.umod(x):k=k.clone();for(var M=new s(1),A=new s(0),O=new s(0),B=new s(1),I=0;k.isEven()&&N.isEven();)k.iushrn(1),N.iushrn(1),++I;for(var C=N.clone(),D=k.clone();!k.isZero();){for(var q=0,_=1;!(k.words[0]&_)&&q<26;++q,_<<=1);if(q>0)for(k.iushrn(q);q-- >0;)(M.isOdd()||A.isOdd())&&(M.iadd(C),A.isub(D)),M.iushrn(1),A.iushrn(1);for(var W=0,V=1;!(N.words[0]&V)&&W<26;++W,V<<=1);if(W>0)for(N.iushrn(W);W-- >0;)(O.isOdd()||B.isOdd())&&(O.iadd(C),B.isub(D)),O.iushrn(1),B.iushrn(1);k.cmp(N)>=0?(k.isub(N),M.isub(O),A.isub(B)):(N.isub(k),O.isub(M),B.isub(A))}return{a:O,b:B,gcd:N.iushln(I)}},s.prototype._invmp=function(x){n(x.negative===0),n(!x.isZero());var k=this,N=x.clone();k.negative!==0?k=k.umod(x):k=k.clone();for(var M=new s(1),A=new s(0),O=N.clone();k.cmpn(1)>0&&N.cmpn(1)>0;){for(var B=0,I=1;!(k.words[0]&I)&&B<26;++B,I<<=1);if(B>0)for(k.iushrn(B);B-- >0;)M.isOdd()&&M.iadd(O),M.iushrn(1);for(var C=0,D=1;!(N.words[0]&D)&&C<26;++C,D<<=1);if(C>0)for(N.iushrn(C);C-- >0;)A.isOdd()&&A.iadd(O),A.iushrn(1);k.cmp(N)>=0?(k.isub(N),M.isub(A)):(N.isub(k),A.isub(M))}var q;return k.cmpn(1)===0?q=M:q=A,q.cmpn(0)<0&&q.iadd(x),q},s.prototype.gcd=function(x){if(this.isZero())return x.abs();if(x.isZero())return this.abs();var k=this.clone(),N=x.clone();k.negative=0,N.negative=0;for(var M=0;k.isEven()&&N.isEven();M++)k.iushrn(1),N.iushrn(1);do{for(;k.isEven();)k.iushrn(1);for(;N.isEven();)N.iushrn(1);var A=k.cmp(N);if(A<0){var O=k;k=N,N=O}else if(A===0||N.cmpn(1)===0)break;k.isub(N)}while(!0);return N.iushln(M)},s.prototype.invm=function(x){return this.egcd(x).a.umod(x)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(x){return this.words[0]&x},s.prototype.bincn=function(x){n(typeof x=="number");var k=x%26,N=(x-k)/26,M=1<>>26,B&=67108863,this.words[O]=B}return A!==0&&(this.words[O]=A,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(x){var k=x<0;if(this.negative!==0&&!k)return-1;if(this.negative===0&&k)return 1;this._strip();var N;if(this.length>1)N=1;else{k&&(x=-x),n(x<=67108863,"Number is too big");var M=this.words[0]|0;N=M===x?0:Mx.length)return 1;if(this.length=0;N--){var M=this.words[N]|0,A=x.words[N]|0;if(M!==A){MA&&(k=1);break}}return k},s.prototype.gtn=function(x){return this.cmpn(x)===1},s.prototype.gt=function(x){return this.cmp(x)===1},s.prototype.gten=function(x){return this.cmpn(x)>=0},s.prototype.gte=function(x){return this.cmp(x)>=0},s.prototype.ltn=function(x){return this.cmpn(x)===-1},s.prototype.lt=function(x){return this.cmp(x)===-1},s.prototype.lten=function(x){return this.cmpn(x)<=0},s.prototype.lte=function(x){return this.cmp(x)<=0},s.prototype.eqn=function(x){return this.cmpn(x)===0},s.prototype.eq=function(x){return this.cmp(x)===0},s.red=function(x){return new Y(x)},s.prototype.toRed=function(x){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),x.convertTo(this)._forceRed(x)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(x){return this.red=x,this},s.prototype.forceRed=function(x){return n(!this.red,"Already a number in reduction context"),this._forceRed(x)},s.prototype.redAdd=function(x){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,x)},s.prototype.redIAdd=function(x){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,x)},s.prototype.redSub=function(x){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,x)},s.prototype.redISub=function(x){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,x)},s.prototype.redShl=function(x){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,x)},s.prototype.redMul=function(x){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,x),this.red.mul(this,x)},s.prototype.redIMul=function(x){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,x),this.red.imul(this,x)},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(x){return n(this.red&&!x.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,x)};var P={k256:null,p224:null,p192:null,p25519:null};function R(F,x){this.name=F,this.p=new s(x,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}R.prototype._tmp=function(){var x=new s(null);return x.words=new Array(Math.ceil(this.n/13)),x},R.prototype.ireduce=function(x){var k=x,N;do this.split(k,this.tmp),k=this.imulK(k),k=k.iadd(this.tmp),N=k.bitLength();while(N>this.n);var M=N0?k.isub(this.p):k.strip!==void 0?k.strip():k._strip(),k},R.prototype.split=function(x,k){x.iushrn(this.n,0,k)},R.prototype.imulK=function(x){return x.imul(this.k)};function L(){R.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(L,R),L.prototype.split=function(x,k){for(var N=4194303,M=Math.min(x.length,9),A=0;A>>22,O=B}O>>>=22,x.words[A-10]=O,O===0&&x.length>10?x.length-=10:x.length-=9},L.prototype.imulK=function(x){x.words[x.length]=0,x.words[x.length+1]=0,x.length+=2;for(var k=0,N=0;N>>=26,x.words[N]=A,k=M}return k!==0&&(x.words[x.length++]=k),x},s._prime=function(x){if(P[x])return P[x];var k;if(x==="k256")k=new L;else if(x==="p224")k=new j;else if(x==="p192")k=new H;else if(x==="p25519")k=new K;else throw new Error("Unknown prime "+x);return P[x]=k,k};function Y(F){if(typeof F=="string"){var x=s._prime(F);this.m=x.p,this.prime=x}else n(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}Y.prototype._verify1=function(x){n(x.negative===0,"red works only with positives"),n(x.red,"red works only with red numbers")},Y.prototype._verify2=function(x,k){n((x.negative|k.negative)===0,"red works only with positives"),n(x.red&&x.red===k.red,"red works only with red numbers")},Y.prototype.imod=function(x){return this.prime?this.prime.ireduce(x)._forceRed(this):(u(x,x.umod(this.m)._forceRed(this)),x)},Y.prototype.neg=function(x){return x.isZero()?x.clone():this.m.sub(x)._forceRed(this)},Y.prototype.add=function(x,k){this._verify2(x,k);var N=x.add(k);return N.cmp(this.m)>=0&&N.isub(this.m),N._forceRed(this)},Y.prototype.iadd=function(x,k){this._verify2(x,k);var N=x.iadd(k);return N.cmp(this.m)>=0&&N.isub(this.m),N},Y.prototype.sub=function(x,k){this._verify2(x,k);var N=x.sub(k);return N.cmpn(0)<0&&N.iadd(this.m),N._forceRed(this)},Y.prototype.isub=function(x,k){this._verify2(x,k);var N=x.isub(k);return N.cmpn(0)<0&&N.iadd(this.m),N},Y.prototype.shl=function(x,k){return this._verify1(x),this.imod(x.ushln(k))},Y.prototype.imul=function(x,k){return this._verify2(x,k),this.imod(x.imul(k))},Y.prototype.mul=function(x,k){return this._verify2(x,k),this.imod(x.mul(k))},Y.prototype.isqr=function(x){return this.imul(x,x.clone())},Y.prototype.sqr=function(x){return this.mul(x,x)},Y.prototype.sqrt=function(x){if(x.isZero())return x.clone();var k=this.m.andln(3);if(n(k%2===1),k===3){var N=this.m.add(new s(1)).iushrn(2);return this.pow(x,N)}for(var M=this.m.subn(1),A=0;!M.isZero()&&M.andln(1)===0;)A++,M.iushrn(1);n(!M.isZero());var O=new s(1).toRed(this),B=O.redNeg(),I=this.m.subn(1).iushrn(1),C=this.m.bitLength();for(C=new s(2*C*C).toRed(this);this.pow(C,I).cmp(B)!==0;)C.redIAdd(B);for(var D=this.pow(C,M),q=this.pow(x,M.addn(1).iushrn(1)),_=this.pow(x,M),W=A;_.cmp(O)!==0;){for(var V=_,J=0;V.cmp(O)!==0;J++)V=V.redSqr();n(J=0;A--){for(var D=k.words[A],q=C-1;q>=0;q--){var _=D>>q&1;if(O!==M[0]&&(O=this.sqr(O)),_===0&&B===0){I=0;continue}B<<=1,B|=_,I++,!(I!==N&&(A!==0||q!==0))&&(O=this.mul(O,M[B]),I=0,B=0)}C=26}return O},Y.prototype.convertTo=function(x){var k=x.umod(this.m);return k===x?k.clone():k},Y.prototype.convertFrom=function(x){var k=x.clone();return k.red=null,k},s.mont=function(x){return new Q(x)};function Q(F){Y.call(this,F),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(Q,Y),Q.prototype.convertTo=function(x){return this.imod(x.ushln(this.shift))},Q.prototype.convertFrom=function(x){var k=this.imod(x.mul(this.rinv));return k.red=null,k},Q.prototype.imul=function(x,k){if(x.isZero()||k.isZero())return x.words[0]=0,x.length=1,x;var N=x.imul(k),M=N.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=N.isub(M).iushrn(this.shift),O=A;return A.cmp(this.m)>=0?O=A.isub(this.m):A.cmpn(0)<0&&(O=A.iadd(this.m)),O._forceRed(this)},Q.prototype.mul=function(x,k){if(x.isZero()||k.isZero())return new s(0)._forceRed(this);var N=x.mul(k),M=N.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=N.isub(M).iushrn(this.shift),O=A;return A.cmp(this.m)>=0?O=A.isub(this.m):A.cmpn(0)<0&&(O=A.iadd(this.m)),O._forceRed(this)},Q.prototype.invm=function(x){var k=this.imod(x._invmp(this.m).mul(this.r2));return k._forceRed(this)}})(t,vi)})(ZE);var YG=ZE.exports;const qe=Ii(YG),QG="logger/5.7.0";let V7=!1,G7=!1;const Vm={debug:1,default:2,info:2,warning:3,error:4,off:5};let K7=Vm.default,yx=null;function JG(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(t){return t.message}return null}const Y7=JG();var Qv;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(Qv||(Qv={}));var Bi;(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"})(Bi||(Bi={}));const Q7="0123456789abcdef";let ne=class Ur{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();Vm[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(K7>Vm[n])&&console.log.apply(console,r)}debug(...e){this._log(Ur.levels.DEBUG,e)}info(...e){this._log(Ur.levels.INFO,e)}warn(...e){this._log(Ur.levels.WARNING,e)}makeError(e,r,n){if(G7)return this.makeError("censored error",r,{});r||(r=Ur.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(c=>{const l=n[c];try{if(l instanceof Uint8Array){let u="";for(let f=0;f>4],u+=Q7[l[f]&15];i.push(c+"=Uint8Array(0x"+u+")")}else i.push(c+"="+JSON.stringify(l))}catch{i.push(c+"="+JSON.stringify(n[c].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const s=e;let o="";switch(r){case Bi.NUMERIC_FAULT:{o="NUMERIC_FAULT";const c=e;switch(c){case"overflow":case"underflow":case"division-by-zero":o+="-"+c;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case Bi.CALL_EXCEPTION:case Bi.INSUFFICIENT_FUNDS:case Bi.MISSING_NEW:case Bi.NONCE_EXPIRED:case Bi.REPLACEMENT_UNDERPRICED:case Bi.TRANSACTION_REPLACED:case Bi.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(c){a[c]=n[c]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,Ur.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){Y7&&this.throwError("platform missing String.prototype.normalize",Ur.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Y7})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,Ur.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,Ur.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,Ur.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",Ur.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",Ur.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",Ur.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return yx||(yx=new Ur(QG)),yx}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",Ur.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),V7){if(!e)return;this.globalLogger().throwError("error censorship permanent",Ur.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}G7=!!e,V7=!!r}static setLogLevel(e){const r=Vm[e.toLowerCase()];if(r==null){Ur.globalLogger().warn("invalid log level - "+e);return}K7=r}static from(e){return new Ur(e)}};ne.errors=Bi;ne.levels=Qv;const XG=Object.freeze(Object.defineProperty({__proto__:null,get ErrorCode(){return Bi},get LogLevel(){return Qv},Logger:ne},Symbol.toStringTag,{value:"Module"})),ZG="bytes/5.7.0",gr=new ne(ZG);function iR(t){return!!t.toHexString}function Nf(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return Nf(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function Ns(t){return We(t)&&!(t.length%2)||Pa(t)}function J7(t){return typeof t=="number"&&t==t&&t%1===0}function Pa(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!J7(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function fe(t,e){if(e||(e={}),typeof t=="number"){gr.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),Nf(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),iR(t)&&(t=t.toHexString()),We(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":gr.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;ife(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),Nf(n)}function Rs(t){let e=fe(t);if(e.length===0)return e;let r=0;for(;re&&gr.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),Nf(r)}function We(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const gx="0123456789abcdef";function le(t,e){if(e||(e={}),typeof t=="number"){gr.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=gx[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),iR(t))return t.toHexString();if(We(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":gr.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Pa(t)){let r="0x";for(let n=0;n>4]+gx[i&15]}return r}return gr.throwArgumentError("invalid hexlify value","value",t)}function Ds(t){if(typeof t!="string")t=le(t);else if(!We(t)||t.length%2)return null;return(t.length-2)/2}function ir(t,e,r){return typeof t!="string"?t=le(t):(!We(t)||t.length%2)&&gr.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function Cn(t){let e="0x";return t.forEach(r=>{e+=le(r).substring(2)}),e}function Zi(t){const e=t8(le(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function t8(t){typeof t!="string"&&(t=le(t)),We(t)||gr.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&gr.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function nl(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(Ns(t)){let r=fe(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=le(r.slice(0,32)),e.s=le(r.slice(32,64))):r.length===65?(e.r=le(r.slice(0,32)),e.s=le(r.slice(32,64)),e.v=r[64]):gr.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:gr.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=le(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(fe(e._vs),32);e._vs=le(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&gr.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const o=le(i);e.s==null?e.s=o:e.s!==o&&gr.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?gr.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&&gr.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!We(e.r)?gr.throwArgumentError("signature missing or invalid r","signature",t):e.r=Pt(e.r,32),e.s==null||!We(e.s)?gr.throwArgumentError("signature missing or invalid s","signature",t):e.s=Pt(e.s,32);const r=fe(e.s);r[0]>=128&&gr.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=le(r);e._vs&&(We(e._vs)||gr.throwArgumentError("signature invalid _vs","signature",t),e._vs=Pt(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&gr.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Jv(t){return t=nl(t),le(At([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const eK=Object.freeze(Object.defineProperty({__proto__:null,arrayify:fe,concat:At,hexConcat:Cn,hexDataLength:Ds,hexDataSlice:ir,hexStripZeros:t8,hexValue:Zi,hexZeroPad:Pt,hexlify:le,isBytes:Pa,isBytesLike:Ns,isHexString:We,joinSignature:Jv,splitSignature:nl,stripZeros:Rs,zeroPad:Df},Symbol.toStringTag,{value:"Module"})),sR="bignumber/5.7.0";var F0=qe.BN;const Lo=new ne(sR),bx={},X7=9007199254740991;function tK(t){return t!=null&&(te.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||We(t)||typeof t=="bigint"||Pa(t))}let Z7=!1;class te{constructor(e,r){e!==bx&&Lo.throwError("cannot call constructor directly; use BigNumber.from",ne.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Vn(it(this).fromTwos(e))}toTwos(e){return Vn(it(this).toTwos(e))}abs(){return this._hex[0]==="-"?te.from(this._hex.substring(1)):this}add(e){return Vn(it(this).add(it(e)))}sub(e){return Vn(it(this).sub(it(e)))}div(e){return te.from(e).isZero()&&Di("division-by-zero","div"),Vn(it(this).div(it(e)))}mul(e){return Vn(it(this).mul(it(e)))}mod(e){const r=it(e);return r.isNeg()&&Di("division-by-zero","mod"),Vn(it(this).umod(r))}pow(e){const r=it(e);return r.isNeg()&&Di("negative-power","pow"),Vn(it(this).pow(r))}and(e){const r=it(e);return(this.isNegative()||r.isNeg())&&Di("unbound-bitwise-result","and"),Vn(it(this).and(r))}or(e){const r=it(e);return(this.isNegative()||r.isNeg())&&Di("unbound-bitwise-result","or"),Vn(it(this).or(r))}xor(e){const r=it(e);return(this.isNegative()||r.isNeg())&&Di("unbound-bitwise-result","xor"),Vn(it(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&Di("negative-width","mask"),Vn(it(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Di("negative-width","shl"),Vn(it(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Di("negative-width","shr"),Vn(it(this).shrn(e))}eq(e){return it(this).eq(it(e))}lt(e){return it(this).lt(it(e))}lte(e){return it(this).lte(it(e))}gt(e){return it(this).gt(it(e))}gte(e){return it(this).gte(it(e))}isNegative(){return this._hex[0]==="-"}isZero(){return it(this).isZero()}toNumber(){try{return it(this).toNumber()}catch{Di("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Lo.throwError("this platform does not support BigInt",ne.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Z7||(Z7=!0,Lo.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Lo.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",ne.errors.UNEXPECTED_ARGUMENT,{}):Lo.throwError("BigNumber.toString does not accept parameters",ne.errors.UNEXPECTED_ARGUMENT,{})),it(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof te)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new te(bx,U0(e)):e.match(/^-?[0-9]+$/)?new te(bx,U0(new F0(e))):Lo.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Di("underflow","BigNumber.from",e),(e>=X7||e<=-X7)&&Di("overflow","BigNumber.from",e),te.from(String(e));const r=e;if(typeof r=="bigint")return te.from(r.toString());if(Pa(r))return te.from(le(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return te.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(We(n)||n[0]==="-"&&We(n.substring(1))))return te.from(n)}return Lo.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function U0(t){if(typeof t!="string")return U0(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Lo.throwArgumentError("invalid hex","value",t),t=U0(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 Vn(t){return te.from(U0(t))}function it(t){const e=te.from(t).toHexString();return e[0]==="-"?new F0("-"+e.substring(3),16):new F0(e.substring(2),16)}function Di(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Lo.throwError(t,ne.errors.NUMERIC_FAULT,n)}function rK(t){return new F0(t,36).toString(16)}function nK(t){return new F0(t,16).toString(36)}const jn=new ne(sR),e0={},oR=te.from(0),aR=te.from(-1);function cR(t,e,r,n){const i={fault:e,operation:r};return n!==void 0&&(i.value=n),jn.throwError(t,ne.errors.NUMERIC_FAULT,i)}let t0="0";for(;t0.length<256;)t0+=t0;function r8(t){if(typeof t!="number")try{t=te.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+t0.substring(0,t):jn.throwArgumentError("invalid decimal size","decimals",t)}function Gm(t,e){e==null&&(e=0);const r=r8(e);t=te.from(t);const n=t.lt(oR);n&&(t=t.mul(aR));let i=t.mod(r).toString();for(;i.length2&&jn.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&&cR("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?c:(typeof e[o]!==a&&jn.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&&jn.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&jn.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new Lf(e0,r,n,i)}}class tn{constructor(e,r,n,i){e!==e0&&jn.throwError("cannot use FixedNumber constructor; use FixedNumber.from",ne.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&&jn.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=Ks(this._value,this.format.decimals),n=Ks(e._value,e.format.decimals);return tn.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=Ks(this._value,this.format.decimals),n=Ks(e._value,e.format.decimals);return tn.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=Ks(this._value,this.format.decimals),n=Ks(e._value,e.format.decimals);return tn.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=Ks(this._value,this.format.decimals),n=Ks(e._value,e.format.decimals);return tn.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=tn.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(eS.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=tn.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(eS.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)&&jn.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=tn.from("1"+t0.substring(0,e),this.format),i=iK.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&&jn.throwArgumentError("invalid byte width","width",e);const r=te.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return Pt(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return tn.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!tK(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),tn.fromString(Gm(e,r),Lf.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=Lf.from(r),i=Ks(e,n.decimals);!n.signed&&i.lt(oR)&&cR("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=Pt(s,n.width/8));const o=Gm(i,n.decimals);return new tn(e0,s,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=Lf.from(r);if(fe(e).length>n.width/8)throw new Error("overflow");let i=te.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=Gm(i,n.decimals);return new tn(e0,s,o,n)}static from(e,r){if(typeof e=="string")return tn.fromString(e,r);if(Pa(e))return tn.fromBytes(e,r);try{return tn.fromValue(e,0,r)}catch(n){if(n.code!==ne.errors.INVALID_ARGUMENT)throw n}return jn.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const eS=tn.from(1),iK=tn.from("0.5"),sK="properties/5.7.0";var oK=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(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const Xv=new ne(sK);function de(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function Ji(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 It(t){return oK(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 qg(t,e){(!t||typeof t!="object")&&Xv.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||Xv.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function jt(t){const e={};for(const r in t)e[r]=t[r];return e}const aK={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function lR(t){if(t==null||aK[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;rsi(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&de(e,r,si(n))}return e}return Xv.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function si(t){return cK(t)}class il{constructor(e){for(const r in e)this[r]=si(e[r])}}const lK=Object.freeze(Object.defineProperty({__proto__:null,Description:il,checkProperties:qg,deepCopy:si,defineReadOnly:de,getStatic:Ji,resolveProperties:It,shallowCopy:jt},Symbol.toStringTag,{value:"Module"})),q1="abi/5.7.0",lt=new ne(q1),ru={};let tS={calldata:!0,memory:!0,storage:!0},uK={calldata:!0,memory:!0};function Gp(t,e){if(t==="bytes"||t==="string"){if(tS[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&uK[e])return!0;return(tS[e]||e==="payable")&<.throwArgumentError("invalid modifier","name",e),!1}function fK(t,e){let r=t;function n(a){lt.throwArgumentError(`unexpected character at position ${a}`,"param",t)}t=t.replace(/\s/g," ");function i(a){let c={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(c.indexed=!1),c}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!==ft.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===ft.full?", ":",")+")"):r+=this.type,e!==ft.sighash&&(this.indexed===!0&&(r+=" indexed"),e===ft.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?Lr.fromString(e,r):Lr.fromObject(e)}static fromObject(e){return Lr.isParamType(e)?e:new Lr(ru,{name:e.name||null,type:Xu(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(Lr.fromObject):null})}static fromString(e,r){function n(i){return Lr.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(fK(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function z0(t,e){return pK(t).map(r=>Lr.fromString(r,e))}class _s{constructor(e,r){e!==ru&<.throwError("use a static from method",ne.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Km(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return _s.isFragment(e)?e:typeof e=="string"?_s.fromString(e):_s.fromObject(e)}static fromObject(e){if(_s.isFragment(e))return e;switch(e.type){case"function":return Vi.fromObject(e);case"event":return As.fromObject(e);case"constructor":return Hi.fromObject(e);case"error":return oo.fromObject(e);case"fallback":case"receive":return null}return lt.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"?As.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Vi.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Hi.fromString(e.trim()):e.split(" ")[0]==="error"?oo.fromString(e.substring(5).trim()):lt.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class As extends _s{format(e){if(e||(e=ft.sighash),ft[e]||lt.throwArgumentError("invalid format type","format",e),e===ft.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!==ft.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ft.full?", ":",")+") ",e!==ft.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?As.fromString(e):As.fromObject(e)}static fromObject(e){if(As.isEventFragment(e))return e;e.type!=="event"&<.throwArgumentError("invalid event object","value",e);const r={name:q0(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(Lr.fromObject):[],type:"event"};return new As(ru,r)}static fromString(e){let r=e.match(W0);r||lt.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:lt.warn("unknown modifier: "+i)}}),As.fromObject({name:r[1].trim(),anonymous:n,inputs:z0(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function uR(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&<.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||lt.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=te.from(r[1]),r[0]):t}function fR(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 dR(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&<.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&<.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"&<.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&<.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"&<.throwArgumentError("unable to determine stateMutability","value",t),e}class Hi extends _s{format(e){if(e||(e=ft.sighash),ft[e]||lt.throwArgumentError("invalid format type","format",e),e===ft.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===ft.sighash&<.throwError("cannot format a constructor for sighash",ne.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===ft.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?Hi.fromString(e):Hi.fromObject(e)}static fromObject(e){if(Hi.isConstructorFragment(e))return e;e.type!=="constructor"&<.throwArgumentError("invalid constructor object","value",e);let r=dR(e);r.constant&<.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(Lr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?te.from(e.gas):null};return new Hi(ru,n)}static fromString(e){let r={type:"constructor"};e=uR(e,r);let n=e.match(W0);return(!n||n[1].trim()!=="constructor")&<.throwArgumentError("invalid constructor string","value",e),r.inputs=z0(n[2].trim(),!1),fR(n[3].trim(),r),Hi.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class Vi extends Hi{format(e){if(e||(e=ft.sighash),ft[e]||lt.throwArgumentError("invalid format type","format",e),e===ft.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!==ft.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ft.full?", ":",")+") ",e!==ft.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"?Vi.fromString(e):Vi.fromObject(e)}static fromObject(e){if(Vi.isFunctionFragment(e))return e;e.type!=="function"&<.throwArgumentError("invalid function object","value",e);let r=dR(e);const n={type:e.type,name:q0(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(Lr.fromObject):[],outputs:e.outputs?e.outputs.map(Lr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?te.from(e.gas):null};return new Vi(ru,n)}static fromString(e){let r={type:"function"};e=uR(e,r);let n=e.split(" returns ");n.length>2&<.throwArgumentError("invalid function string","value",e);let i=n[0].match(W0);if(i||lt.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&q0(r.name),r.inputs=z0(i[2],!1),fR(i[3].trim(),r),n.length>1){let s=n[1].match(W0);(s[1].trim()!=""||s[3].trim()!="")&<.throwArgumentError("unexpected tokens","value",e),r.outputs=z0(s[2],!1)}else r.outputs=[];return Vi.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function rS(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&<.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class oo extends _s{format(e){if(e||(e=ft.sighash),ft[e]||lt.throwArgumentError("invalid format type","format",e),e===ft.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==ft.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===ft.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?oo.fromString(e):oo.fromObject(e)}static fromObject(e){if(oo.isErrorFragment(e))return e;e.type!=="error"&<.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:q0(e.name),inputs:e.inputs?e.inputs.map(Lr.fromObject):[]};return rS(new oo(ru,r))}static fromString(e){let r={type:"error"},n=e.match(W0);return n||lt.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&q0(r.name),r.inputs=z0(n[2],!1),rS(oo.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function Xu(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const hK=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function q0(t){return(!t||!t.match(hK))&<.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const W0=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function pK(t){t=t.trim();let e=[],r="",n=0;for(let i=0;ithis.wordSize&&n8.throwError("value out-of-bounds",ne.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=At([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 Zv{constructor(e,r,n,i){de(this,"_data",fe(e)),de(this,"wordSize",r||32),de(this,"_coerceFunc",n),de(this,"allowLoose",i),this._offset=0}get data(){return le(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):Zv.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:n8.throwError("data out-of-bounds",ne.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new Zv(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 te.from(this.readBytes(this.wordSize))}}function mK(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var hR={exports:{}},Rr=hR.exports={},Js,Xs;function L5(){throw new Error("setTimeout has not been defined")}function j5(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Js=setTimeout:Js=L5}catch{Js=L5}try{typeof clearTimeout=="function"?Xs=clearTimeout:Xs=j5}catch{Xs=j5}})();function pR(t){if(Js===setTimeout)return setTimeout(t,0);if((Js===L5||!Js)&&setTimeout)return Js=setTimeout,setTimeout(t,0);try{return Js(t,0)}catch{try{return Js.call(null,t,0)}catch{return Js.call(this,t,0)}}}function vK(t){if(Xs===clearTimeout)return clearTimeout(t);if((Xs===j5||!Xs)&&clearTimeout)return Xs=clearTimeout,clearTimeout(t);try{return Xs(t)}catch{try{return Xs.call(null,t)}catch{return Xs.call(this,t)}}}var Go=[],jf=!1,jl,Ym=-1;function yK(){!jf||!jl||(jf=!1,jl.length?Go=jl.concat(Go):Ym=-1,Go.length&&mR())}function mR(){if(!jf){var t=pR(yK);jf=!0;for(var e=Go.length;e;){for(jl=Go,Go=[];++Ym1)for(var r=1;r>5,this.byteCount=this.blockCount<<2,this.outputBlocks=V>>5,this.extraBytes=(V&31)>>3;for(var J=0;J<50;++J)this.s[J]=0}C.prototype.update=function(_){if(this.finalized)throw new Error(r);var W,V=typeof _;if(V!=="string"){if(V==="object"){if(_===null)throw new Error(e);if(c&&_.constructor===ArrayBuffer)_=new Uint8Array(_);else if(!Array.isArray(_)&&(!c||!ArrayBuffer.isView(_)))throw new Error(e)}else throw new Error(e);W=!0}for(var J=this.blocks,ee=this.byteCount,se=_.length,ie=this.blockCount,ae=0,be=this.s,he,ve;ae>2]|=_[ae]<>2]|=ve<>2]|=(192|ve>>6)<>2]|=(128|ve&63)<=57344?(J[he>>2]|=(224|ve>>12)<>2]|=(128|ve>>6&63)<>2]|=(128|ve&63)<>2]|=(240|ve>>18)<>2]|=(128|ve>>12&63)<>2]|=(128|ve>>6&63)<>2]|=(128|ve&63)<=ee){for(this.start=he-ee,this.block=J[ie],he=0;he>8,V=_&255;V>0;)ee.unshift(V),_=_>>8,V=_&255,++J;return W?ee.push(J):ee.unshift(J),this.update(ee),ee.length},C.prototype.encodeString=function(_){var W,V=typeof _;if(V!=="string"){if(V==="object"){if(_===null)throw new Error(e);if(c&&_.constructor===ArrayBuffer)_=new Uint8Array(_);else if(!Array.isArray(_)&&(!c||!ArrayBuffer.isView(_)))throw new Error(e)}else throw new Error(e);W=!0}var J=0,ee=_.length;if(W)J=ee;else for(var se=0;se<_.length;++se){var ie=_.charCodeAt(se);ie<128?J+=1:ie<2048?J+=2:ie<55296||ie>=57344?J+=3:(ie=65536+((ie&1023)<<10|_.charCodeAt(++se)&1023),J+=4)}return J+=this.encode(J*8),this.update(_),J},C.prototype.bytepad=function(_,W){for(var V=this.encode(W),J=0;J<_.length;++J)V+=this.encodeString(_[J]);var ee=W-V%W,se=[];return se.length=ee,this.update(se),this},C.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var _=this.blocks,W=this.lastByteIndex,V=this.blockCount,J=this.s;if(_[W>>2]|=this.padding[W&3],this.lastByteIndex===this.byteCount)for(_[0]=_[V],W=1;W>4&15]+l[ae&15]+l[ae>>12&15]+l[ae>>8&15]+l[ae>>20&15]+l[ae>>16&15]+l[ae>>28&15]+l[ae>>24&15];se%_===0&&(q(W),ee=0)}return J&&(ae=W[ee],ie+=l[ae>>4&15]+l[ae&15],J>1&&(ie+=l[ae>>12&15]+l[ae>>8&15]),J>2&&(ie+=l[ae>>20&15]+l[ae>>16&15])),ie},C.prototype.arrayBuffer=function(){this.finalize();var _=this.blockCount,W=this.s,V=this.outputBlocks,J=this.extraBytes,ee=0,se=0,ie=this.outputBits>>3,ae;J?ae=new ArrayBuffer(V+1<<2):ae=new ArrayBuffer(ie);for(var be=new Uint32Array(ae);se>8&255,ie[ae+2]=be>>16&255,ie[ae+3]=be>>24&255;se%_===0&&q(W)}return J&&(ae=se<<2,be=W[ee],ie[ae]=be&255,J>1&&(ie[ae+1]=be>>8&255),J>2&&(ie[ae+2]=be>>16&255)),ie};function D(_,W,V){C.call(this,_,W,V)}D.prototype=new C,D.prototype.finalize=function(){return this.encode(this.outputBits,!0),C.prototype.finalize.call(this)};var q=function(_){var W,V,J,ee,se,ie,ae,be,he,ve,Ne,ke,Ae,Xe,ct,Qe,hs,yt,ge,Ze,De,He,Tt,mt,U,T,$,G,Z,re,ce,Le,Oe,_e,Et,Se,Ft,hl,Ut,zt,pl,qt,Wt,ml,Ht,Vt,vl,Gt,Kt,yl,Yt,Qt,gl,Jt,Xt,bl,Zt,er,Ba,Fa,Ua,za,qa;for(J=0;J<48;J+=2)ee=_[0]^_[10]^_[20]^_[30]^_[40],se=_[1]^_[11]^_[21]^_[31]^_[41],ie=_[2]^_[12]^_[22]^_[32]^_[42],ae=_[3]^_[13]^_[23]^_[33]^_[43],be=_[4]^_[14]^_[24]^_[34]^_[44],he=_[5]^_[15]^_[25]^_[35]^_[45],ve=_[6]^_[16]^_[26]^_[36]^_[46],Ne=_[7]^_[17]^_[27]^_[37]^_[47],ke=_[8]^_[18]^_[28]^_[38]^_[48],Ae=_[9]^_[19]^_[29]^_[39]^_[49],W=ke^(ie<<1|ae>>>31),V=Ae^(ae<<1|ie>>>31),_[0]^=W,_[1]^=V,_[10]^=W,_[11]^=V,_[20]^=W,_[21]^=V,_[30]^=W,_[31]^=V,_[40]^=W,_[41]^=V,W=ee^(be<<1|he>>>31),V=se^(he<<1|be>>>31),_[2]^=W,_[3]^=V,_[12]^=W,_[13]^=V,_[22]^=W,_[23]^=V,_[32]^=W,_[33]^=V,_[42]^=W,_[43]^=V,W=ie^(ve<<1|Ne>>>31),V=ae^(Ne<<1|ve>>>31),_[4]^=W,_[5]^=V,_[14]^=W,_[15]^=V,_[24]^=W,_[25]^=V,_[34]^=W,_[35]^=V,_[44]^=W,_[45]^=V,W=be^(ke<<1|Ae>>>31),V=he^(Ae<<1|ke>>>31),_[6]^=W,_[7]^=V,_[16]^=W,_[17]^=V,_[26]^=W,_[27]^=V,_[36]^=W,_[37]^=V,_[46]^=W,_[47]^=V,W=ve^(ee<<1|se>>>31),V=Ne^(se<<1|ee>>>31),_[8]^=W,_[9]^=V,_[18]^=W,_[19]^=V,_[28]^=W,_[29]^=V,_[38]^=W,_[39]^=V,_[48]^=W,_[49]^=V,Xe=_[0],ct=_[1],Vt=_[11]<<4|_[10]>>>28,vl=_[10]<<4|_[11]>>>28,G=_[20]<<3|_[21]>>>29,Z=_[21]<<3|_[20]>>>29,Fa=_[31]<<9|_[30]>>>23,Ua=_[30]<<9|_[31]>>>23,qt=_[40]<<18|_[41]>>>14,Wt=_[41]<<18|_[40]>>>14,_e=_[2]<<1|_[3]>>>31,Et=_[3]<<1|_[2]>>>31,Qe=_[13]<<12|_[12]>>>20,hs=_[12]<<12|_[13]>>>20,Gt=_[22]<<10|_[23]>>>22,Kt=_[23]<<10|_[22]>>>22,re=_[33]<<13|_[32]>>>19,ce=_[32]<<13|_[33]>>>19,za=_[42]<<2|_[43]>>>30,qa=_[43]<<2|_[42]>>>30,Jt=_[5]<<30|_[4]>>>2,Xt=_[4]<<30|_[5]>>>2,Se=_[14]<<6|_[15]>>>26,Ft=_[15]<<6|_[14]>>>26,yt=_[25]<<11|_[24]>>>21,ge=_[24]<<11|_[25]>>>21,yl=_[34]<<15|_[35]>>>17,Yt=_[35]<<15|_[34]>>>17,Le=_[45]<<29|_[44]>>>3,Oe=_[44]<<29|_[45]>>>3,mt=_[6]<<28|_[7]>>>4,U=_[7]<<28|_[6]>>>4,bl=_[17]<<23|_[16]>>>9,Zt=_[16]<<23|_[17]>>>9,hl=_[26]<<25|_[27]>>>7,Ut=_[27]<<25|_[26]>>>7,Ze=_[36]<<21|_[37]>>>11,De=_[37]<<21|_[36]>>>11,Qt=_[47]<<24|_[46]>>>8,gl=_[46]<<24|_[47]>>>8,ml=_[8]<<27|_[9]>>>5,Ht=_[9]<<27|_[8]>>>5,T=_[18]<<20|_[19]>>>12,$=_[19]<<20|_[18]>>>12,er=_[29]<<7|_[28]>>>25,Ba=_[28]<<7|_[29]>>>25,zt=_[38]<<8|_[39]>>>24,pl=_[39]<<8|_[38]>>>24,He=_[48]<<14|_[49]>>>18,Tt=_[49]<<14|_[48]>>>18,_[0]=Xe^~Qe&yt,_[1]=ct^~hs&ge,_[10]=mt^~T&G,_[11]=U^~$&Z,_[20]=_e^~Se&hl,_[21]=Et^~Ft&Ut,_[30]=ml^~Vt&Gt,_[31]=Ht^~vl&Kt,_[40]=Jt^~bl&er,_[41]=Xt^~Zt&Ba,_[2]=Qe^~yt&Ze,_[3]=hs^~ge&De,_[12]=T^~G&re,_[13]=$^~Z&ce,_[22]=Se^~hl&zt,_[23]=Ft^~Ut&pl,_[32]=Vt^~Gt&yl,_[33]=vl^~Kt&Yt,_[42]=bl^~er&Fa,_[43]=Zt^~Ba&Ua,_[4]=yt^~Ze&He,_[5]=ge^~De&Tt,_[14]=G^~re&Le,_[15]=Z^~ce&Oe,_[24]=hl^~zt&qt,_[25]=Ut^~pl&Wt,_[34]=Gt^~yl&Qt,_[35]=Kt^~Yt&gl,_[44]=er^~Fa&za,_[45]=Ba^~Ua&qa,_[6]=Ze^~He&Xe,_[7]=De^~Tt&ct,_[16]=re^~Le&mt,_[17]=ce^~Oe&U,_[26]=zt^~qt&_e,_[27]=pl^~Wt&Et,_[36]=yl^~Qt&ml,_[37]=Yt^~gl&Ht,_[46]=Fa^~za&Jt,_[47]=Ua^~qa&Xt,_[8]=He^~Xe&Qe,_[9]=Tt^~ct&hs,_[18]=Le^~mt&T,_[19]=Oe^~U&$,_[28]=qt^~_e&Se,_[29]=Wt^~Et&Ft,_[38]=Qt^~ml&Vt,_[39]=gl^~Ht&vl,_[48]=za^~Jt&bl,_[49]=qa^~Xt&Zt,_[0]^=m[J],_[1]^=m[J+1]};if(a)t.exports=x;else for(N=0;N>=8;return e}function iS(t,e,r){let n=0;for(let i=0;ie+1+n&&Zs.throwError("child data too short",ne.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function bR(t,e){if(t.length===0&&Zs.throwError("data too short",ne.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&Zs.throwError("data short segment too short",ne.errors.BUFFER_OVERRUN,{});const n=iS(t,e+1,r);return e+1+r+n>t.length&&Zs.throwError("data long segment too short",ne.errors.BUFFER_OVERRUN,{}),sS(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&Zs.throwError("data array too short",ne.errors.BUFFER_OVERRUN,{}),sS(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&Zs.throwError("data array too short",ne.errors.BUFFER_OVERRUN,{});const n=iS(t,e+1,r);e+1+r+n>t.length&&Zs.throwError("data array too short",ne.errors.BUFFER_OVERRUN,{});const i=le(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&&Zs.throwError("data too short",ne.errors.BUFFER_OVERRUN,{});const n=le(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:le(t[e])}}function Wg(t){const e=fe(t),r=bR(e,0);return r.consumed!==e.length&&Zs.throwArgumentError("invalid rlp data","data",t),r.result}const xR=Object.freeze(Object.defineProperty({__proto__:null,decode:Wg,encode:nu},Symbol.toStringTag,{value:"Module"})),CK="address/5.7.0",fc=new ne(CK);function oS(t){We(t,20)||fc.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=fe(Te(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 SK=9007199254740991;function kK(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const s8={};for(let t=0;t<10;t++)s8[String(t)]=String(t);for(let t=0;t<26;t++)s8[String.fromCharCode(65+t)]=String(10+t);const aS=Math.floor(kK(SK));function wR(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>s8[n]).join("");for(;e.length>=aS;){let n=e.substring(0,aS);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 Ue(t){let e=null;if(typeof t!="string"&&fc.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=oS(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&fc.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)!==wR(t)&&fc.throwArgumentError("bad icap checksum","address",t),e=rK(t.substring(4));e.length<40;)e="0"+e;e=oS("0x"+e)}else fc.throwArgumentError("invalid address","address",t);return e}function o8(t){try{return Ue(t),!0}catch{}return!1}function ER(t){let e=nK(Ue(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+wR("XE00"+e)+e}function Hg(t){let e=null;try{e=Ue(t.from)}catch{fc.throwArgumentError("missing from address","transaction",t)}const r=Rs(fe(te.from(t.nonce).toHexString()));return Ue(ir(Te(nu([e,r])),12))}function CR(t,e,r){return Ds(e)!==32&&fc.throwArgumentError("salt must be 32 bytes","salt",e),Ds(r)!==32&&fc.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),Ue(ir(Te(At(["0xff",Ue(t),e,r])),12))}const AK=Object.freeze(Object.defineProperty({__proto__:null,getAddress:Ue,getContractAddress:Hg,getCreate2Address:CR,getIcapAddress:ER,isAddress:o8},Symbol.toStringTag,{value:"Module"}));class _K extends Ia{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=Ue(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return Ue(Pt(e.readValue().toHexString(),20))}}class PK extends Ia{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 bf=new ne(q1);function SR(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let c={};n=e.map(l=>{const u=l.localName;return u||bf.throwError("cannot encode object for signature with missing names",ne.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),c[u]&&bf.throwError("cannot encode object for signature with duplicate names",ne.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),c[u]=!0,r[u]})}else bf.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&bf.throwArgumentError("types/value length mismatch","tuple",r);let i=new D5(t.wordSize),s=new D5(t.wordSize),o=[];e.forEach((c,l)=>{let u=n[l];if(c.dynamic){let f=s.length;c.encode(s,u);let d=i.writeUpdatableValue();o.push(h=>{d(h+f)})}else c.encode(i,u)}),o.forEach(c=>{c(i.length)});let a=t.appendWriter(i);return a+=t.appendWriter(s),a}function kR(t,e){let r=[],n=t.subReader(0);e.forEach(s=>{let o=null;if(s.dynamic){let a=t.readValue(),c=n.subReader(a.toNumber());try{o=s.decode(c)}catch(l){if(l.code===ne.errors.BUFFER_OVERRUN)throw l;o=l,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(t)}catch(a){if(a.code===ne.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 c=r[o];c instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw c}}):r[a]=c});for(let s=0;s{throw o}})}return Object.freeze(r)}class IK extends Ia{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&&bf.throwError("insufficient data length",ne.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let i=0;i>6===2;o++)s++;return s}return t===Ln.OVERRUN?r.length-e-1:0}function BK(t,e,r,n,i){return t===Ln.OVERLONG?(n.push(i),0):(n.push(65533),TR(t,e,r))}const a8=Object.freeze({error:jK,ignore:TR,replace:BK});function c8(t,e){e==null&&(e=a8.error),t=fe(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(Ln.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Ln.BAD_PREFIX,n-1,t,r);continue}if(n-1+s>=t.length){n+=e(Ln.OVERRUN,n-1,t,r);continue}let a=i&(1<<8-s-1)-1;for(let c=0;c1114111){n+=e(Ln.OUT_OF_RANGE,n-1-s,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(Ln.UTF16_SURROGATE,n-1-s,t,r,a);continue}if(a<=o){n+=e(Ln.OVERLONG,n-1-s,t,r,a);continue}r.push(a)}}return r}function Ct(t,e=Ls.current){e!=Ls.current&&(IR.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 fe(r)}function xx(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function OR(t,e){return'"'+c8(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?xx(r):(r-=65536,xx((r>>10&1023)+55296)+xx((r&1023)+56320))}).join("")+'"'}function B5(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function cs(t,e){return B5(c8(t,e))}function H0(t,e=Ls.current){return c8(Ct(t,e))}function RR(t){const e=Ct(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return le(At([e,ey]).slice(0,32))}function $R(t){const e=fe(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 cs(e.slice(0,r))}function FK(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 MR(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 u8(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 UK=MR("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"),zK="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),qK=[{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}],WK=l8("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"),HK=l8("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"),VK=l8("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",FK),GK=MR("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 KK(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function YK(t){return!!u8(t,UK)}function QK(t){let e=u8(t,qK);if(e)return[t+e.s];let r=WK[t];if(r)return r;let n=HK[t];if(n)return[t+n[0]];let i=VK[t];return i||null}function JK(t){return!!u8(t,GK)}function NR(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=H0(t);e=KK(e.map(n=>{if(zK.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=QK(n);return i||[n]})),e=H0(B5(e),Ls.NFKC),e.forEach(n=>{if(JK(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(YK(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=B5(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}const XK=Object.freeze(Object.defineProperty({__proto__:null,get UnicodeNormalizationForm(){return Ls},Utf8ErrorFuncs:a8,get Utf8ErrorReason(){return Ln},_toEscapedUtf8String:OR,formatBytes32String:RR,nameprep:NR,parseBytes32String:$R,toUtf8Bytes:Ct,toUtf8CodePoints:H0,toUtf8String:cs},Symbol.toStringTag,{value:"Module"}));class ZK extends AR{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Ct(r))}decode(e){return cs(super.decode(e))}}class Kp extends Ia{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 SR(e,this.coders,r)}decode(e){return e.coerce(this.name,kR(e,this.coders))}}const Yp=new ne(q1),eY=new RegExp(/^bytes([0-9]*)$/),tY=new RegExp(/^(u?int)([0-9]*)$/);class Vg{constructor(e){de(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new _K(e.name);case"bool":return new TK(e.name);case"string":return new ZK(e.name);case"bytes":return new OK(e.name);case"array":return new IK(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Kp((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new $K(e.name)}let r=e.type.match(tY);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&Yp.throwArgumentError("invalid "+r[1]+" bit length","param",e),new DK(n/8,r[1]==="int",e.name)}if(r=e.type.match(eY),r){let n=parseInt(r[1]);return(n===0||n>32)&&Yp.throwArgumentError("invalid bytes length","param",e),new RK(n,e.name)}return Yp.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new Zv(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new D5(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(Lr.from(i)));return new Kp(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&Yp.throwError("types/values length mismatch",ne.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(Lr.from(o))),i=new Kp(n,"_"),s=this._getWriter();return i.encode(s,r),s.data}decode(e,r,n){const i=e.map(o=>this._getCoder(Lr.from(o)));return new Kp(i,"_").decode(this._getReader(fe(r),n))}}const In=new Vg;function Ko(t){return Te(Ct(t))}const DR="hash/5.7.0";function f8(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 rY(t){const e={};for(let r=0;r>--c&1}const f=31,d=Math.pow(2,f),h=d>>>1,p=h>>1,m=d-1;let v=0;for(let P=0;P1;){let K=R+L>>>1;P>>1|u(),j=j<<1^h,H=(H^h)<<1|h|1;b=j,E=1+H-j}let S=n-4;return y.map(P=>{switch(P-S){case 3:return S+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return S+256+(t[a++]<<8|t[a++]);case 1:return S+t[a++];default:return P-1}})}function iY(t){let e=0;return()=>t[e++]}function sY(t){return iY(nY(t))}function oY(t){return t&1?~t>>1:t>>1}function aY(t,e){let r=Array(t);for(let n=0;ne[o]):r}function lY(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(fY(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(dY(r,t))}return rY(jR(e))}function uY(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function BR(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function fY(t,e){let r=1+e(),n=e(),i=uY(e),s=BR(i.length,1+t,e);return jR(s.map((o,a)=>{const c=o[0],l=o.slice(1);return Array(i[a]).fill(void 0).map((u,f)=>{let d=f*n;return[c+f*r,l.map(h=>h+d)]})}))}function dY(t,e){let r=1+e();return BR(r,1+t,e).map(i=>[i[0],i.slice(1)])}function hY(t){let e=ty(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let l=ty(t,e);if(l.length==0)break;n.push({set:new Set(l),node:r()})}n.sort((l,u)=>u.set.size-l.set.size);let i=t(),s=i%3;i=i/3|0;let o=!!(i&1);i>>=1;let a=i==1,c=i==2;return{branches:n,valid:s,fe0f:o,save:a,check:c}}}function pY(){return sY(f8("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 Gg=pY(),mY=new Set(ty(Gg)),vY=new Set(ty(Gg)),yY=lY(Gg),gY=hY(Gg),lS=45,uS=95;function FR(t){return H0(t)}function bY(t){return t.filter(e=>e!=65039)}function UR(t){for(let e of t.split(".")){let r=FR(e);try{for(let n=r.lastIndexOf(uS)-1;n>=0;n--)if(r[n]!==uS)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===lS&&r[3]===lS)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function xY(t){return UR(wY(t,bY))}function wY(t,e){let r=FR(t).reverse(),n=[];for(;r.length;){let i=CY(r);if(i){n.push(...e(i));continue}let s=r.pop();if(mY.has(s)){n.push(s);continue}if(vY.has(s))continue;let o=yY[s];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${s.toString(16).toUpperCase()}`)}return UR(EY(String.fromCodePoint(...n)))}function EY(t){return t.normalize("NFC")}function CY(t,e){var r;let n=gY,i,s,o=[],a=t.length;for(e&&(e.length=0);a;){let c=t[--a];if(n=(r=n.branches.find(l=>l.set.has(c)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)s=c;else if(n.check&&c===s)break;o.push(c),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 SY=new ne(DR),zR=new Uint8Array(32);zR.fill(0);function fS(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function Kg(t){const e=Ct(xY(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(fS(e.slice(n))),r}function kY(t){return Kg(t).map(e=>cs(e)).join(".")}function qR(t){try{return Kg(t).length!==0}catch{}return!1}function Bf(t){typeof t!="string"&&SY.throwArgumentError("invalid ENS name; not a string","name",t);let e=zR;const r=Kg(t);for(;r.length;)e=Te(At([e,Te(r.pop())]));return le(e)}function h8(t){return le(At(Kg(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 WR=`Ethereum Signed Message: -`;function W1(t){return typeof t=="string"&&(t=Ct(t)),Te(At([Ct(WR),Ct(String(t.length)),t]))}var AY=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(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const dr=new ne(DR),HR=new Uint8Array(32);HR.fill(0);const _Y=te.from(-1),VR=te.from(0),GR=te.from(1),PY=te.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function IY(t){const e=fe(t),r=e.length%32;return r?Cn([e,HR.slice(r)]):le(e)}const TY=Pt(GR.toHexString(),32),OY=Pt(VR.toHexString(),32),dS={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},wx=["name","version","chainId","verifyingContract","salt"];function hS(t){return function(e){return typeof e!="string"&&dr.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const RY={name:hS("name"),version:hS("version"),chainId:function(t){try{return te.from(t).toString()}catch{}return dr.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return Ue(t).toLowerCase()}catch{}return dr.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=fe(t);if(e.length!==32)throw new Error("bad length");return le(e)}catch{}return dr.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function Ex(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))&&dr.throwArgumentError("invalid numeric width","type",t);const i=PY.mask(r?n-1:n),s=r?i.add(GR).mul(_Y):VR;return function(o){const a=te.from(o);return(a.lt(s)||a.gt(i))&&dr.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),Pt(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))&&dr.throwArgumentError("invalid bytes width","type",t),function(n){return fe(n).length!==r&&dr.throwArgumentError(`invalid length for ${t}`,"value",n),IY(n)}}}switch(t){case"address":return function(e){return Pt(Ue(e),32)};case"bool":return function(e){return e?TY:OY};case"bytes":return function(e){return Te(e)};case"string":return function(e){return Ko(e)}}return null}function pS(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class Pr{constructor(e){de(this,"types",Object.freeze(si(e))),de(this,"_encoderCache",{}),de(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],i[a]={}});for(const a in e){const c={};e[a].forEach(l=>{c[l.name]&&dr.throwArgumentError(`duplicate variable name ${JSON.stringify(l.name)} in ${JSON.stringify(a)}`,"types",e),c[l.name]=!0;const u=l.type.match(/^([^\x5b]*)(\x5b|$)/)[1];u===a&&dr.throwArgumentError(`circular type reference to ${JSON.stringify(u)}`,"types",e),!Ex(u)&&(n[u]||dr.throwArgumentError(`unknown type ${JSON.stringify(u)}`,"types",e),n[u].push(a),r[a][u]=!0)})}const s=Object.keys(n).filter(a=>n[a].length===0);s.length===0?dr.throwArgumentError("missing primary type","types",e):s.length>1&&dr.throwArgumentError(`ambiguous primary types or unused types: ${s.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),de(this,"primaryType",s[0]);function o(a,c){c[a]&&dr.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),c[a]=!0,Object.keys(r[a]).forEach(l=>{n[l]&&(o(l,c),Object.keys(c).forEach(u=>{i[u][l]=!0}))}),delete c[a]}o(this.primaryType,{});for(const a in i){const c=Object.keys(i[a]);c.sort(),this._types[a]=pS(a,e[a])+c.map(l=>pS(l,e[l])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=Ex(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&&dr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let c=a.map(s);return this._types[i]&&(c=c.map(Te)),Te(Cn(c))}}const n=this.types[e];if(n){const i=Ko(this._types[e]);return s=>{const o=n.map(({name:a,type:c})=>{const l=this.getEncoder(c)(s[a]);return this._types[c]?Te(l):l});return o.unshift(i),Cn(o)}}return dr.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||dr.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Te(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(Ex(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&&dr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(c=>this._visit(o,c,n))}const s=this.types[e];return s?s.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,r[a],n),o),{}):dr.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Pr(e)}static getPrimaryType(e){return Pr.from(e).primaryType}static hashStruct(e,r,n){return Pr.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=dS[n];i||dr.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>wx.indexOf(n.name)-wx.indexOf(i.name)),Pr.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Cn(["0x1901",Pr.hashDomain(e),Pr.from(r).hash(n)])}static hash(e,r,n){return Te(Pr.encode(e,r,n))}static resolveNames(e,r,n,i){return AY(this,void 0,void 0,function*(){e=jt(e);const s={};e.verifyingContract&&!We(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=Pr.from(r);o.visit(n,(a,c)=>(a==="address"&&!We(c,20)&&(s[c]="0x"),c));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,c)=>a==="address"&&s[c]?s[c]:c),{domain:e,value:n}})}static getPayload(e,r,n){Pr.hashDomain(e);const i={},s=[];wx.forEach(c=>{const l=e[c];l!=null&&(i[c]=RY[c](l),s.push({name:c,type:dS[c]}))});const o=Pr.from(r),a=jt(r);return a.EIP712Domain?dr.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,(c,l)=>{if(c.match(/^bytes(\d*)/))return le(fe(l));if(c.match(/^u?int/))return te.from(l).toString();switch(c){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return typeof l!="string"&&dr.throwArgumentError("invalid string","value",l),l}return dr.throwArgumentError("unsupported type","type",c)})}}}const $Y=Object.freeze(Object.defineProperty({__proto__:null,_TypedDataEncoder:Pr,dnsEncode:h8,ensNormalize:kY,hashMessage:W1,id:Ko,isValidName:qR,messagePrefix:WR,namehash:Bf},Symbol.toStringTag,{value:"Module"})),fr=new ne(q1);class p8 extends il{}class m8 extends il{}class MY extends il{}class V0 extends il{static isIndexed(e){return!!(e&&e._isIndexed)}}const NY={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function mS(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class Sr{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,de(this,"fragments",r.map(n=>_s.from(n)).filter(n=>n!=null)),de(this,"_abiCoder",Ji(new.target,"getAbiCoder")()),de(this,"functions",{}),de(this,"errors",{}),de(this,"events",{}),de(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){fr.warn("duplicate definition - constructor");return}de(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]){fr.warn("duplicate definition - "+s);return}i[s]=n}),this.deploy||de(this,"deploy",Hi.from({payable:!1,type:"constructor"})),de(this,"_isInterface",!0)}format(e){e||(e=ft.full),e===ft.sighash&&fr.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===ft.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return In}static getAddress(e){return Ue(e)}static getSighash(e){return ir(Ko(e.format()),0,4)}static getEventTopic(e){return Ko(e.format())}getFunction(e){if(We(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];fr.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?fr.throwArgumentError("no matching function","name",n):i.length>1&&fr.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[Vi.fromString(e).format()];return r||fr.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(We(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];fr.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?fr.throwArgumentError("no matching event","name",n):i.length>1&&fr.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[As.fromString(e).format()];return r||fr.throwArgumentError("no matching event","signature",e),r}getError(e){if(We(e)){const n=Ji(this.constructor,"getSighash");for(const i in this.errors){const s=this.errors[i];if(e===n(s))return this.errors[i]}fr.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?fr.throwArgumentError("no matching error","name",n):i.length>1&&fr.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[Vi.fromString(e).format()];return r||fr.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 Ji(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),Ji(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=fe(r);return le(n.slice(0,4))!==this.getSighash(e)&&fr.throwArgumentError(`data signature does not match error ${e.name}.`,"data",le(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),le(At([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=fe(r);return le(n.slice(0,4))!==this.getSighash(e)&&fr.throwArgumentError(`data signature does not match function ${e.name}.`,"data",le(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),le(At([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=fe(r),i=null,s="",o=null,a=null,c=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const l=le(n.slice(0,4)),u=NY[l];if(u)o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,c=u.signature,u.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 f=this.getError(l);o=this._abiCoder.decode(f.inputs,n.slice(4)),a=f.name,c=f.format()}catch{}break}}return fr.throwError("call revert exception"+s,ne.errors.CALL_EXCEPTION,{method:e.format(),data:le(r),errorArgs:o,errorName:a,errorSignature:c,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),le(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&fr.throwError("too many arguments for "+e.format(),ne.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(s,o)=>s.type==="string"?Ko(o):s.type==="bytes"?Te(le(o)):(s.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),s.type.match(/^u?int/)&&(o=te.from(o).toHexString()),s.type==="address"&&this._abiCoder.encode(["address"],[o]),Pt(le(o),32));for(r.forEach((s,o)=>{let a=e.inputs[o];if(!a.indexed){s!=null&&fr.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"?fr.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,s):Array.isArray(s)?n.push(s.map(c=>i(a,c))):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&&fr.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const c=r[a];if(o.indexed)if(o.type==="string")n.push(Ko(c));else if(o.type==="bytes")n.push(Te(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([o.type],[c]))}else i.push(o),s.push(c)}),{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 d=this.getEventTopic(e);(!We(n[0],32)||n[0].toLowerCase()!==d)&&fr.throwError("fragment/topic mismatch",ne.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:d,value:n[0]}),n=n.slice(1)}let i=[],s=[],o=[];e.inputs.forEach((d,h)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(i.push(Lr.fromObject({type:"bytes32",name:d.name})),o.push(!0)):(i.push(d),o.push(!1)):(s.push(d),o.push(!1))});let a=n!=null?this._abiCoder.decode(i,At(n)):null,c=this._abiCoder.decode(s,r,!0),l=[],u=0,f=0;e.inputs.forEach((d,h)=>{if(d.indexed)if(a==null)l[h]=new V0({_isIndexed:!0,hash:null});else if(o[h])l[h]=new V0({_isIndexed:!0,hash:a[f++]});else try{l[h]=a[f++]}catch(p){l[h]=p}else try{l[h]=c[u++]}catch(p){l[h]=p}if(d.name&&l[d.name]==null){const p=l[h];p instanceof Error?Object.defineProperty(l,d.name,{enumerable:!0,get:()=>{throw mS(`property ${JSON.stringify(d.name)}`,p)}}):l[d.name]=p}});for(let d=0;d{throw mS(`index ${d}`,h)}})}return Object.freeze(l)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new m8({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:te.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new p8({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=le(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new MY({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 DY=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:Vg,ConstructorFragment:Hi,ErrorFragment:oo,EventFragment:As,FormatTypes:ft,Fragment:_s,FunctionFragment:Vi,Indexed:V0,Interface:Sr,LogDescription:p8,ParamType:Lr,TransactionDescription:m8,checkResultErrors:i8,defaultAbiCoder:In},Symbol.toStringTag,{value:"Module"})),LY="abstract-provider/5.7.0";var jY=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(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const BY=new ne(LY);class FY extends il{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class Oa{constructor(){BY.checkAbstract(new.target,Oa),de(this,"_isProvider",!0)}getFeeData(){return jY(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield It({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=te.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 UY="abstract-signer/5.7.0";var ms=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(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const Li=new ne(UY),zY=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],qY=[ne.errors.INSUFFICIENT_FUNDS,ne.errors.NONCE_EXPIRED,ne.errors.REPLACEMENT_UNDERPRICED];let Mc=class KR{constructor(){Li.checkAbstract(new.target,KR),de(this,"_isSigner",!0)}getBalance(e){return ms(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return ms(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return ms(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield It(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return ms(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield It(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return ms(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 ms(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return ms(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return ms(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return ms(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)zY.indexOf(n)===-1&&Li.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=jt(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()&&Li.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return ms(this,void 0,void 0,function*(){const r=yield It(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>ms(this,void 0,void 0,function*(){if(i==null)return null;const s=yield this.resolveName(i);return s==null&&Li.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)?Li.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&Li.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&&Li.throwError("network does not support EIP-1559",ne.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):Li.throwError("failed to get consistent fee data",ne.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(qY.indexOf(i.code)>=0)throw i;return Li.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ne.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]&&Li.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield It(r)})}_checkProvider(e){this.provider||Li.throwError("missing provider",ne.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class v8 extends Mc{constructor(e,r){super(),de(this,"address",e),de(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{Li.throwError(e,ne.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 v8(this.address,e)}}var YR={},at={},H1=QR;function QR(t,e){if(!t)throw new Error(e||"Assertion failed")}QR.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var F5={exports:{}};typeof Object.create=="function"?F5.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:F5.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 WY=F5.exports,HY=H1,VY=WY;at.inherits=VY;function GY(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function KY(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):GY(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}at.htonl=JR;function QY(t,e){for(var r="",n=0;n>>0}return s}at.join32=JY;function XY(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}at.split32=XY;function ZY(t,e){return t>>>e|t<<32-e}at.rotr32=ZY;function eQ(t,e){return t<>>32-e}at.rotl32=eQ;function tQ(t,e){return t+e>>>0}at.sum32=tQ;function rQ(t,e,r){return t+e+r>>>0}at.sum32_3=rQ;function nQ(t,e,r,n){return t+e+r+n>>>0}at.sum32_4=nQ;function iQ(t,e,r,n,i){return t+e+r+n+i>>>0}at.sum32_5=iQ;function sQ(t,e,r,n){var i=t[e],s=t[e+1],o=n+s>>>0,a=(o>>0,t[e+1]=o}at.sum64=sQ;function oQ(t,e,r,n){var i=e+n>>>0,s=(i>>0}at.sum64_hi=oQ;function aQ(t,e,r,n){var i=e+n;return i>>>0}at.sum64_lo=aQ;function cQ(t,e,r,n,i,s,o,a){var c=0,l=e;l=l+n>>>0,c+=l>>0,c+=l>>0,c+=l>>0}at.sum64_4_hi=cQ;function lQ(t,e,r,n,i,s,o,a){var c=e+n+s+a;return c>>>0}at.sum64_4_lo=lQ;function uQ(t,e,r,n,i,s,o,a,c,l){var u=0,f=e;f=f+n>>>0,u+=f>>0,u+=f>>0,u+=f>>0,u+=f>>0}at.sum64_5_hi=uQ;function fQ(t,e,r,n,i,s,o,a,c,l){var u=e+n+s+a+l;return u>>>0}at.sum64_5_lo=fQ;function dQ(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}at.rotr64_hi=dQ;function hQ(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}at.rotr64_lo=hQ;function pQ(t,e,r){return t>>>r}at.shr64_hi=pQ;function mQ(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}at.shr64_lo=mQ;var Pd={},vS=at,vQ=H1;function Yg(){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}Pd.BlockHash=Yg;Yg.prototype.update=function(e,r){if(e=vS.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=vS.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}Oo.g0_256=wQ;function EQ(t){return po(t,17)^po(t,19)^t>>>10}Oo.g1_256=EQ;var nd=at,CQ=Pd,SQ=Oo,Cx=nd.rotl32,hh=nd.sum32,kQ=nd.sum32_5,AQ=SQ.ft_1,n$=CQ.BlockHash,_Q=[1518500249,1859775393,2400959708,3395469782];function Eo(){if(!(this instanceof Eo))return new Eo;n$.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}nd.inherits(Eo,n$);var PQ=Eo;Eo.blockSize=512;Eo.outSize=160;Eo.hmacStrength=80;Eo.padLength=64;Eo.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()),mJ(e.length<=this.blockSize);for(var r=e.length;r>8,d=u&255;f?c.push(f,d):c.push(d)}return c}r.toArray=n;function i(o){return o.length===1?"0"+o:o}r.zero2=i;function s(o){for(var a="",c=0;c(d>>1)-1?m=(d>>1)-v:m=v,h.isubn(m)):m=0,f[p]=m,h.iushrn(1)}return f}r.getNAF=n;function i(c,l){var u=[[],[]];c=c.clone(),l=l.clone();for(var f=0,d=0,h;c.cmpn(-f)>0||l.cmpn(-d)>0;){var p=c.andln(3)+f&3,m=l.andln(3)+d&3;p===3&&(p=-1),m===3&&(m=-1);var v;p&1?(h=c.andln(7)+f&7,(h===3||h===5)&&m===2?v=-p:v=p):v=0,u[0].push(v);var y;m&1?(h=l.andln(7)+d&7,(h===3||h===5)&&p===2?y=-m:y=m):y=0,u[1].push(y),2*f===v+1&&(f=1-f),2*d===y+1&&(d=1-d),c.iushrn(1),l.iushrn(1)}return u}r.getJSF=i;function s(c,l,u){var f="_"+l;c.prototype[l]=function(){return this[f]!==void 0?this[f]:this[f]=u.call(this)}}r.cachedProperty=s;function o(c){return typeof c=="string"?r.toArray(c,"hex"):c}r.parseBytes=o;function a(c){return new qe(c,"hex","le")}r.intFromLE=a}),ry=Ri.getNAF,gJ=Ri.getJSF,ny=Ri.assert;function sl(t,e){this.type=t,this.p=new qe(e.p,16),this.red=e.prime?qe.red(e.prime):qe.mont(this.p),this.zero=new qe(0).toRed(this.red),this.one=new qe(1).toRed(this.red),this.two=new qe(2).toRed(this.red),this.n=e.n&&new qe(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 Cu=sl;sl.prototype.point=function(){throw new Error("Not implemented")};sl.prototype.validate=function(){throw new Error("Not implemented")};sl.prototype._fixedNafMul=function(e,r){ny(e.precomputed);var n=e._getDoubles(),i=ry(r,1,this._bitLength),s=(1<=a;l--)c=(c<<1)+i[l];o.push(c)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),d=s;d>0;d--){for(a=0;a=0;c--){for(var l=0;c>=0&&o[c]===0;c--)l++;if(c>=0&&l++,a=a.dblp(l),c<0)break;var u=o[c];ny(u!==0),e.type==="affine"?u>0?a=a.mixedAdd(s[u-1>>1]):a=a.mixedAdd(s[-u-1>>1].neg()):u>0?a=a.add(s[u-1>>1]):a=a.add(s[-u-1>>1].neg())}return e.type==="affine"?a.toP():a};sl.prototype._wnafMulAdd=function(e,r,n,i,s){var o=this._wnafT1,a=this._wnafT2,c=this._wnafT3,l=0,u,f,d;for(u=0;u=1;u-=2){var p=u-1,m=u;if(o[p]!==1||o[m]!==1){c[p]=ry(n[p],o[p],this._bitLength),c[m]=ry(n[m],o[m],this._bitLength),l=Math.max(c[p].length,l),l=Math.max(c[m].length,l);continue}var v=[r[p],null,null,r[m]];r[p].y.cmp(r[m].y)===0?(v[1]=r[p].add(r[m]),v[2]=r[p].toJ().mixedAdd(r[m].neg())):r[p].y.cmp(r[m].y.redNeg())===0?(v[1]=r[p].toJ().mixedAdd(r[m]),v[2]=r[p].add(r[m].neg())):(v[1]=r[p].toJ().mixedAdd(r[m]),v[2]=r[p].toJ().mixedAdd(r[m].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],b=gJ(n[p],n[m]);for(l=Math.max(b[0].length,l),c[p]=new Array(l),c[m]=new Array(l),f=0;f=0;u--){for(var L=0;u>=0;){var j=!0;for(f=0;f=0&&L++,P=P.dblp(L),u<0)break;for(f=0;f0?d=a[f][H-1>>1]:H<0&&(d=a[f][-H-1>>1].neg()),d.type==="affine"?P=P.mixedAdd(d):P=P.add(d))}}for(u=0;u=Math.ceil((e.bitLength()+1)/r.step):!1};ls.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&&(h=l,p=u),f.negative&&(f=f.neg(),d=d.neg()),h.negative&&(h=h.neg(),p=p.neg()),[{a:f,b:d},{a:h,b:p}]};us.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),c=o.mul(i.a),l=s.mul(n.b),u=o.mul(i.b),f=e.sub(a).sub(c),d=l.add(u).neg();return{k1:f,k2:d}};us.prototype.pointFromX=function(e,r){e=new qe(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)};us.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};us.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,o=0;o":""};en.prototype.isInfinity=function(){return this.inf};en.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)};en.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)};en.prototype.getX=function(){return this.x.fromRed()};en.prototype.getY=function(){return this.y.fromRed()};en.prototype.mul=function(e){return e=new qe(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)};en.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)};en.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)};en.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)};en.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};en.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 hn(t,e,r,n){Cu.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new qe(0)):(this.x=new qe(e,16),this.y=new qe(r,16),this.z=new qe(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}g8(hn,Cu.BasePoint);us.prototype.jpoint=function(e,r,n){return new hn(this,e,r,n)};hn.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)};hn.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};hn.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)),c=i.redSub(s),l=o.redSub(a);if(c.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=c.redSqr(),f=u.redMul(c),d=i.redMul(u),h=l.redSqr().redIAdd(f).redISub(d).redISub(d),p=l.redMul(d.redISub(h)).redISub(o.redMul(f)),m=this.z.redMul(e.z).redMul(c);return this.curve.jpoint(h,p,m)};hn.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),c=s.redSub(o);if(a.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),u=l.redMul(a),f=n.redMul(l),d=c.redSqr().redIAdd(u).redISub(f).redISub(f),h=c.redMul(f.redISub(d)).redISub(s.redMul(u)),p=this.z.redMul(a);return this.curve.jpoint(d,h,p)};hn.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}};hn.prototype.inspect=function(){return this.isInfinity()?"":""};hn.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Qm=Od(function(t,e){var r=e;r.base=Cu,r.short=xJ,r.mont=null,r.edwards=null}),Jm=Od(function(t,e){var r=e,n=Ri.assert;function i(a){a.type==="short"?this.curve=new Qm.short(a):a.type==="edwards"?this.curve=new Qm.edwards(a):this.curve=new Qm.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,c){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var l=new i(c);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:l}),l}})}s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Yn.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:Yn.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:Yn.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:Yn.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:Yn.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:Yn.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:Yn.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:Yn.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function Nc(t){if(!(this instanceof Nc))return new Nc(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=Ps.toArray(t.entropy,t.entropyEnc||"hex"),r=Ps.toArray(t.nonce,t.nonceEnc||"hex"),n=Ps.toArray(t.pers,t.persEnc||"hex");y8(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var m$=Nc;Nc.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};Nc.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=Ps.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length"};var wJ=Ri.assert;function Qg(t,e){if(t instanceof Qg)return t;this._importDER(t,e)||(wJ(t.r&&t.s,"Signature without r or s"),this.r=new qe(t.r,16),this.s=new qe(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Jg=Qg;function EJ(){this.place=0}function Ax(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 xS(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)}Qg.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=xS(r),n=xS(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];_x(i,r.length),i=i.concat(r),i.push(2),_x(i,n.length);var s=i.concat(n),o=[48];return _x(o,s.length),o=o.concat(s),Ri.encode(o,e)};var CJ=function(){throw new Error("unsupported")},v$=Ri.assert;function ns(t){if(!(this instanceof ns))return new ns(t);typeof t=="string"&&(v$(Object.prototype.hasOwnProperty.call(Jm,t),"Unknown curve "+t),t=Jm[t]),t instanceof Jm.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 SJ=ns;ns.prototype.keyPair=function(e){return new b8(this,e)};ns.prototype.keyFromPrivate=function(e,r){return b8.fromPrivate(this,e,r)};ns.prototype.keyFromPublic=function(e,r){return b8.fromPublic(this,e,r)};ns.prototype.genKeyPair=function(e){e||(e={});for(var r=new m$({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||CJ(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new qe(2));;){var s=new qe(r.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}};ns.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};ns.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 qe(e,16));for(var s=this.n.byteLength(),o=r.getPrivate().toArray("be",s),a=e.toArray("be",s),c=new m$({hash:this.hash,entropy:o,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),l=this.n.sub(new qe(1)),u=0;;u++){var f=i.k?i.k(u):new qe(c.generate(this.n.byteLength()));if(f=this._truncateToN(f,!0),!(f.cmpn(1)<=0||f.cmp(l)>=0)){var d=this.g.mul(f);if(!d.isInfinity()){var h=d.getX(),p=h.umod(this.n);if(p.cmpn(0)!==0){var m=f.invm(this.n).mul(p.mul(r.getPrivate()).iadd(e));if(m=m.umod(this.n),m.cmpn(0)!==0){var v=(d.getY().isOdd()?1:0)|(h.cmp(p)!==0?2:0);return i.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),v^=1),new Jg({r:p,s:m,recoveryParam:v})}}}}}};ns.prototype.verify=function(e,r,n,i){e=this._truncateToN(new qe(e,16)),n=this.keyFromPublic(n,i),r=new Jg(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),c=a.mul(e).umod(this.n),l=a.mul(s).umod(this.n),u;return this.curve._maxwellTrick?(u=this.g.jmulAdd(c,n.getPublic(),l),u.isInfinity()?!1:u.eqXToP(s)):(u=this.g.mulAdd(c,n.getPublic(),l),u.isInfinity()?!1:u.getX().umod(this.n).cmp(s)===0)};ns.prototype.recoverPubKey=function(t,e,r,n){v$((3&r)===r,"The recovery param is more than two bits"),e=new Jg(e,n);var i=this.n,s=new qe(t),o=e.r,a=e.s,c=r&1,l=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");l?o=this.curve.pointFromX(o.add(this.curve.n),c):o=this.curve.pointFromX(o,c);var u=e.r.invm(i),f=i.sub(s).mul(u).umod(i),d=a.mul(u).umod(i);return this.g.mulAdd(f,o,d)};ns.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Jg(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 kJ=Od(function(t,e){var r=e;r.version="6.5.4",r.utils=Ri,r.rand=function(){throw new Error("unsupported")},r.curve=Qm,r.curves=Jm,r.ec=SJ,r.eddsa=null}),AJ=kJ.ec;const _J="signing-key/5.7.0",W5=new ne(_J);let Px=null;function eo(){return Px||(Px=new AJ("secp256k1")),Px}class Cc{constructor(e){de(this,"curve","secp256k1"),de(this,"privateKey",le(e)),Ds(this.privateKey)!==32&&W5.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=eo().keyFromPrivate(fe(this.privateKey));de(this,"publicKey","0x"+r.getPublic(!1,"hex")),de(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),de(this,"_isSigningKey",!0)}_addPoint(e){const r=eo().keyFromPublic(fe(this.publicKey)),n=eo().keyFromPublic(fe(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=eo().keyFromPrivate(fe(this.privateKey)),n=fe(e);n.length!==32&&W5.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return nl({recoveryParam:i.recoveryParam,r:Pt("0x"+i.r.toString(16),32),s:Pt("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=eo().keyFromPrivate(fe(this.privateKey)),n=eo().keyFromPublic(fe(Xg(e)));return Pt("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function x8(t,e){const r=nl(e),n={r:fe(r.r),s:fe(r.s)};return"0x"+eo().recoverPubKey(fe(t),n,r.recoveryParam).encode("hex",!1)}function Xg(t,e){const r=fe(t);if(r.length===32){const n=new Cc(r);return e?"0x"+eo().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?le(r):"0x"+eo().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+eo().keyFromPublic(r).getPublic(!0,"hex"):le(r)}return W5.throwArgumentError("invalid public or private key","key","[REDACTED]")}const PJ=Object.freeze(Object.defineProperty({__proto__:null,SigningKey:Cc,computePublicKey:Xg,recoverPublicKey:x8},Symbol.toStringTag,{value:"Module"})),IJ="transactions/5.7.0",Sn=new ne(IJ);var iy;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(iy||(iy={}));function w8(t){return t==="0x"?null:Ue(t)}function En(t){return t==="0x"?lr:te.from(t)}const TJ=[{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"}],OJ={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function Zo(t){const e=Xg(t);return Ue(ir(Te(ir(e,1)),12))}function Dc(t,e){return Zo(x8(fe(t),e))}function mi(t,e){const r=Rs(te.from(t).toHexString());return r.length>32&&Sn.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function Ix(t,e){return{address:Ue(t),storageKeys:(e||[]).map((r,n)=>(Ds(r)!==32&&Sn.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function ol(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Sn.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),Ix(r[0],r[1])):Ix(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return Ix(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function y$(t){return ol(t).map(e=>[e.address,e.storageKeys])}function g$(t,e){if(t.gasPrice!=null){const n=te.from(t.gasPrice),i=te.from(t.maxFeePerGas||0);n.eq(i)||Sn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[mi(t.chainId||0,"chainId"),mi(t.nonce||0,"nonce"),mi(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),mi(t.maxFeePerGas||0,"maxFeePerGas"),mi(t.gasLimit||0,"gasLimit"),t.to!=null?Ue(t.to):"0x",mi(t.value||0,"value"),t.data||"0x",y$(t.accessList||[])];if(e){const n=nl(e);r.push(mi(n.recoveryParam,"recoveryParam")),r.push(Rs(n.r)),r.push(Rs(n.s))}return Cn(["0x02",nu(r)])}function b$(t,e){const r=[mi(t.chainId||0,"chainId"),mi(t.nonce||0,"nonce"),mi(t.gasPrice||0,"gasPrice"),mi(t.gasLimit||0,"gasLimit"),t.to!=null?Ue(t.to):"0x",mi(t.value||0,"value"),t.data||"0x",y$(t.accessList||[])];if(e){const n=nl(e);r.push(mi(n.recoveryParam,"recoveryParam")),r.push(Rs(n.r)),r.push(Rs(n.s))}return Cn(["0x01",nu(r)])}function RJ(t,e){qg(t,OJ);const r=[];TJ.forEach(function(o){let a=t[o.name]||[];const c={};o.numeric&&(c.hexPad="left"),a=fe(le(a,c)),o.length&&a.length!==o.length&&a.length>0&&Sn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=Rs(a),a.length>o.maxLength&&Sn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push(le(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Sn.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!Ns(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(le(n)),r.push("0x"),r.push("0x")),!e)return nu(r);const i=nl(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&&Sn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==s&&Sn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(le(s)),r.push(Rs(fe(i.r))),r.push(Rs(fe(i.s))),nu(r)}function sy(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Sn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),RJ(t,e);switch(t.type){case 1:return b$(t,e);case 2:return g$(t,e)}return Sn.throwError(`unsupported transaction type: ${t.type}`,ne.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function x$(t,e,r){try{const n=En(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Sn.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=Pt(e[1],32),t.s=Pt(e[2],32);try{const n=Te(r(t));t.from=Dc(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function $J(t){const e=Wg(t.slice(1));e.length!==9&&e.length!==12&&Sn.throwArgumentError("invalid component count for transaction type: 2","payload",le(t));const r=En(e[2]),n=En(e[3]),i={type:2,chainId:En(e[0]).toNumber(),nonce:En(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:En(e[4]),to:w8(e[5]),value:En(e[6]),data:e[7],accessList:ol(e[8])};return e.length===9||(i.hash=Te(t),x$(i,e.slice(9),g$)),i}function MJ(t){const e=Wg(t.slice(1));e.length!==8&&e.length!==11&&Sn.throwArgumentError("invalid component count for transaction type: 1","payload",le(t));const r={type:1,chainId:En(e[0]).toNumber(),nonce:En(e[1]).toNumber(),gasPrice:En(e[2]),gasLimit:En(e[3]),to:w8(e[4]),value:En(e[5]),data:e[6],accessList:ol(e[7])};return e.length===8||(r.hash=Te(t),x$(r,e.slice(8),b$)),r}function NJ(t){const e=Wg(t);e.length!==9&&e.length!==6&&Sn.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:En(e[0]).toNumber(),gasPrice:En(e[1]),gasLimit:En(e[2]),to:w8(e[3]),value:En(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=te.from(e[6]).toNumber()}catch{return r}if(r.r=Pt(e[7],32),r.s=Pt(e[8],32),te.from(r.r).isZero()&&te.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(le(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const s=Te(nu(i));try{r.from=Dc(s,{r:le(r.r),s:le(r.s),recoveryParam:n})}catch{}r.hash=Te(t)}return r.type=null,r}function E8(t){const e=fe(t);if(e[0]>127)return NJ(e);switch(e[0]){case 1:return MJ(e);case 2:return $J(e)}return Sn.throwError(`unsupported transaction type: ${e[0]}`,ne.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const DJ=Object.freeze(Object.defineProperty({__proto__:null,get TransactionTypes(){return iy},accessListify:ol,computeAddress:Zo,parse:E8,recoverAddress:Dc,serialize:sy},Symbol.toStringTag,{value:"Module"})),LJ="contracts/5.7.0";var su=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(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const Ir=new ne(LJ);function oy(t,e){return su(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&Ir.throwArgumentError("invalid address or ENS name","name",r);try{return Ue(r)}catch{}t||Ir.throwError("a provider or signer is needed to resolve ENS names",ne.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&Ir.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function Xm(t,e,r){return su(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>Xm(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield oy(t,e):r.type==="tuple"?yield Xm(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Xm(t,n,r.arrayChildren))):Promise.reject(Ir.makeError("invalid value for array",ne.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Zg(t,e,r){return su(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=jt(r.pop())),Ir.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=It({override:oy(t.signer,n.from),signer:t.signer.getAddress()}).then(l=>su(this,void 0,void 0,function*(){return Ue(l.signer)!==l.override&&Ir.throwError("Contract with a Signer cannot override from",ne.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),l.override})):n.from=t.signer.getAddress():n.from&&(n.from=oy(t.provider,n.from));const i=yield It({args:Xm(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:It(n)||{}}),s=t.interface.encodeFunctionData(e,i.args),o={data:s,to:i.address},a=i.overrides;if(a.nonce!=null&&(o.nonce=te.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=te.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=te.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=te.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=te.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=ol(a.accessList)),o.gasLimit==null&&e.gas!=null){let l=21e3;const u=fe(s);for(let f=0;fn[l]!=null);return c.length&&Ir.throwError(`cannot override ${c.map(l=>JSON.stringify(l)).join(",")}`,ne.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:c}),o})}function jJ(t,e){return function(...r){return Zg(t,e,r)}}function BJ(t,e){const r=t.signer||t.provider;return function(...n){return su(this,void 0,void 0,function*(){r||Ir.throwError("estimate require a provider or signer",ne.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield Zg(t,e,n);return yield r.estimateGas(i)})}}function FJ(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(s=>{let o=si(s),a=null;try{a=t.interface.parseLog(s)}catch{}return a&&(o.args=a.args,o.decode=(c,l)=>t.interface.decodeEventLog(a.eventFragment,c,l),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 w$(t,e,r){const n=t.signer||t.provider;return function(...i){return su(this,void 0,void 0,function*(){let s;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const c=jt(i.pop());c.blockTag!=null&&(s=yield c.blockTag),delete c.blockTag,i.push(c)}t.deployTransaction!=null&&(yield t._deployed(s));const o=yield Zg(t,e,i),a=yield n.call(o,s);try{let c=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(c=c[0]),c}catch(c){throw c.code===ne.errors.CALL_EXCEPTION&&(c.address=t.address,c.args=i,c.transaction=o),c}})}}function UJ(t,e){return function(...r){return su(this,void 0,void 0,function*(){t.signer||Ir.throwError("sending a transaction requires a signer",ne.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield Zg(t,e,r),i=yield t.signer.sendTransaction(n);return FJ(t,i),i})}}function wS(t,e,r){return e.constant?w$(t,e,r):UJ(t,e)}function E$(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 G0{constructor(e,r){de(this,"tag",e),de(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 zJ extends G0{constructor(){super("error",null)}}class ES extends G0{constructor(e,r,n,i){const s={address:e};let o=r.getEventTopic(n);i?(o!==i[0]&&Ir.throwArgumentError("topic mismatch","topics",i),s.topics=i.slice()):s.topics=[o],super(E$(s),s),de(this,"address",e),de(this,"interface",r),de(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=i8(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class CS extends G0{constructor(e,r){super("*",{address:e}),de(this,"address",e),de(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 qJ{constructor(e,r,n){de(this,"interface",Ji(new.target,"getInterface")(r)),n==null?(de(this,"provider",null),de(this,"signer",null)):Mc.isSigner(n)?(de(this,"provider",n.provider||null),de(this,"signer",n)):Oa.isProvider(n)?(de(this,"provider",n),de(this,"signer",null)):Ir.throwArgumentError("invalid signer or provider","signerOrProvider",n),de(this,"callStatic",{}),de(this,"estimateGas",{}),de(this,"functions",{}),de(this,"populateTransaction",{}),de(this,"filters",{});{const o={};Object.keys(this.interface.events).forEach(a=>{const c=this.interface.events[a];de(this.filters,a,(...l)=>({address:this.address,topics:this.interface.encodeFilterTopics(c,l)})),o[c.name]||(o[c.name]=[]),o[c.name].push(a)}),Object.keys(o).forEach(a=>{const c=o[a];c.length===1?de(this.filters,a,this.filters[c[0]]):Ir.warn(`Duplicate definition of ${a} (${c.join(", ")})`)})}if(de(this,"_runningEvents",{}),de(this,"_wrappedEmits",{}),e==null&&Ir.throwArgumentError("invalid contract address or ENS name","addressOrName",e),de(this,"address",e),this.provider)de(this,"resolvedAddress",oy(this.provider,e));else try{de(this,"resolvedAddress",Promise.resolve(Ue(e)))}catch{Ir.throwError("provider is required to use ENS name as contract address",ne.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]){Ir.warn(`Duplicate ABI entry for ${JSON.stringify(o)}`);return}s[o]=!0;{const c=a.name;i[`%${c}`]||(i[`%${c}`]=[]),i[`%${c}`].push(o)}this[o]==null&&de(this,o,wS(this,a,!0)),this.functions[o]==null&&de(this.functions,o,wS(this,a,!1)),this.callStatic[o]==null&&de(this.callStatic,o,w$(this,a,!0)),this.populateTransaction[o]==null&&de(this.populateTransaction,o,jJ(this,a)),this.estimateGas[o]==null&&de(this.estimateGas,o,BJ(this,a))}),Object.keys(i).forEach(o=>{const a=i[o];if(a.length>1)return;o=o.substring(1);const c=a[0];try{this[o]==null&&de(this,o,this[c])}catch{}this.functions[o]==null&&de(this.functions,o,this.functions[c]),this.callStatic[o]==null&&de(this.callStatic,o,this.callStatic[c]),this.populateTransaction[o]==null&&de(this.populateTransaction,o,this.populateTransaction[c]),this.estimateGas[o]==null&&de(this.estimateGas,o,this.estimateGas[c])})}static getContractAddress(e){return Hg(e)}static getInterface(e){return Sr.isInterface(e)?e:new Sr(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"&&Ir.throwError("contract not deployed",ne.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Ir.throwError("sending a transactions require a signer",ne.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=jt(e||{});return["from","to"].forEach(function(n){r[n]!=null&&Ir.throwError("cannot override "+n,ne.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new v8(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&de(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return V0.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 zJ);if(e==="event")return this._normalizeRunningEvent(new G0("event",null));if(e==="*")return this._normalizeRunningEvent(new CS(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new ES(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 ES(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new G0(E$(r),r))}return this._normalizeRunningEvent(new CS(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=si(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||Ir.throwError("events require a provider or a signer with a provider",ne.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=jt(i.filter);return typeof r=="string"&&We(r,32)?(n!=null&&Ir.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 Rd extends qJ{}class C8{constructor(e){de(this,"alphabet",e),de(this,"base",e.length),de(this,"_alphabetMap",{}),de(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,c[e.length+1]=f>>16&255,c[e.length+2]=f>>8&255,c[e.length+3]=f&255;let d=fe(od(i,t,c));s||(s=d.length,u=new Uint8Array(s),o=Math.ceil(n/s),l=n-(o-1)*s),u.set(d);for(let m=1;m=256)throw new Error("Depth too large!");return AS(At([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",le(this.depth),this.parentFingerprint,Pt(le(this.index),4),this.chainCode,this.privateKey!=null?At(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Qn(Du,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&~Zu));const n=new Uint8Array(37);if(e&Zu){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(fe(this.privateKey),1),r&&(r+="'")}else n.set(fe(this.publicKey));for(let f=24;f>=0;f-=8)n[33+(f>>3)]=e>>24-f&255;const i=fe(od(au.sha512,this.chainCode,n)),s=i.slice(0,32),o=i.slice(32);let a=null,c=null;this.privateKey?a=Jp(te.from(s).add(this.privateKey).mod(eX)):c=new Cc(le(s))._addPoint(this.publicKey);let l=r;const u=this.mnemonic;return u&&(l=Object.freeze({phrase:u.phrase,path:r,locale:u.locale||"en"})),new Qn(Du,a,c,this.fingerprint,Jp(o),e,this.depth+1,l)}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=Zu)throw new Error("invalid path index - "+s);n=n._derive(Zu+o)}else if(s.match(/^[0-9]+$/)){const o=parseInt(s);if(o>=Zu)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=fe(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=fe(od(au.sha512,tX,n));return new Qn(Du,Jp(i.slice(0,32)),null,"0x00000000",Jp(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=A8(n),e=K1(G1(e,n),n),Qn._fromSeed(_8(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Qn._fromSeed(e,null)}static fromExtendedKey(e){const r=ou.decode(e);(r.length!==82||AS(r.slice(0,78))!==e)&&K0.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=le(r.slice(5,9)),s=parseInt(le(r.slice(9,13)).substring(2),16),o=le(r.slice(13,45)),a=r.slice(45,78);switch(le(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Qn(Du,null,le(a),i,o,s,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new Qn(Du,le(a.slice(1)),null,i,o,s,n,null)}return K0.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function _8(t,e){e||(e="");const r=Ct("mnemonic"+e,Ls.NFKD);return k8(Ct(t,Ls.NFKD),r,2048,64,"sha512")}function G1(t,e){e=A8(e),K0.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=fe(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let l=0;l>3]|=1<<7-i%8),i++}const s=32*r.length/3,o=r.length/3,a=k$(o);if((fe(ko(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return le(n.slice(0,s/8))}function K1(t,e){if(e=A8(e),t=fe(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]&rX(8-n)),n+=3);const i=t.length/4,s=fe(ko(t))[0]&k$(i);return r[r.length-1]<<=i,r[r.length-1]|=s>>8-i,e.join(r.map(o=>e.getWord(o)))}function A$(t,e){try{return G1(t,e),!0}catch{}return!1}function _$(t){return(typeof t!="number"||t<0||t>=Zu||t%1)&&K0.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const nX=Object.freeze(Object.defineProperty({__proto__:null,HDNode:Qn,defaultPath:cu,entropyToMnemonic:K1,getAccountPath:_$,isValidMnemonic:A$,mnemonicToEntropy:G1,mnemonicToSeed:_8},Symbol.toStringTag,{value:"Module"})),iX="random/5.7.0",H5=new ne(iX);function sX(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Un<"u")return Un;throw new Error("unable to locate global object")}const _S=sX();let Zm=_S.crypto||_S.msCrypto;(!Zm||!Zm.getRandomValues)&&(H5.warn("WARNING: Missing strong random number source"),Zm={getRandomValues:function(t){return H5.throwError("no secure random source avaialble",ne.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Is(t){(t<=0||t>1024||t%1||t!=t)&&H5.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return Zm.getRandomValues(e),fe(e)}function P8(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}const oX=Object.freeze(Object.defineProperty({__proto__:null,randomBytes:Is,shuffled:P8},Symbol.toStringTag,{value:"Module"}));var P$={exports:{}};(function(t,e){(function(r){function n(I){return parseInt(I)===I}function i(I){if(!n(I.length))return!1;for(var C=0;C255)return!1;return!0}function s(I,C){if(I.buffer&&ArrayBuffer.isView(I)&&I.name==="Uint8Array")return C&&(I.slice?I=I.slice():I=Array.prototype.slice.call(I)),I;if(Array.isArray(I)){if(!i(I))throw new Error("Array contains invalid value: "+I);return new Uint8Array(I)}if(n(I.length)&&i(I))return new Uint8Array(I);throw new Error("unsupported array-like object")}function o(I){return new Uint8Array(I)}function a(I,C,D,q,_){(q!=null||_!=null)&&(I.slice?I=I.slice(q,_):I=Array.prototype.slice.call(I,q,_)),C.set(I,D)}var c=function(){function I(D){var q=[],_=0;for(D=encodeURI(D);_191&&W<224?(q.push(String.fromCharCode((W&31)<<6|D[_+1]&63)),_+=2):(q.push(String.fromCharCode((W&15)<<12|(D[_+1]&63)<<6|D[_+2]&63)),_+=3)}return q.join("")}return{toBytes:I,fromBytes:C}}(),l=function(){function I(q){for(var _=[],W=0;W>4]+C[V&15])}return _.join("")}return{toBytes:I,fromBytes:D}}(),u={16:10,24:12,32:14},f=[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],d=[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],h=[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],p=[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],m=[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],v=[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],y=[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],b=[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],E=[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],S=[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],P=[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],R=[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],L=[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],j=[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],H=[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 K(I){for(var C=[],D=0;D>2,this._Ke[W][C%4]=_[C],this._Kd[I-W][C%4]=_[C];for(var V=0,J=q,ee;J>16&255]<<24^d[ee>>8&255]<<16^d[ee&255]<<8^d[ee>>24&255]^f[V]<<24,V+=1,q!=8)for(var C=1;C>8&255]<<8^d[ee>>16&255]<<16^d[ee>>24&255]<<24;for(var C=q/2+1;C>2,ie=J%4,this._Ke[se][ie]=_[C],this._Kd[I-se][ie]=_[C++],J++}for(var se=1;se>24&255]^L[ee>>16&255]^j[ee>>8&255]^H[ee&255]},Y.prototype.encrypt=function(I){if(I.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var C=this._Ke.length-1,D=[0,0,0,0],q=K(I),_=0;_<4;_++)q[_]^=this._Ke[0][_];for(var W=1;W>24&255]^m[q[(_+1)%4]>>16&255]^v[q[(_+2)%4]>>8&255]^y[q[(_+3)%4]&255]^this._Ke[W][_];q=D.slice()}for(var V=o(16),J,_=0;_<4;_++)J=this._Ke[C][_],V[4*_]=(d[q[_]>>24&255]^J>>24)&255,V[4*_+1]=(d[q[(_+1)%4]>>16&255]^J>>16)&255,V[4*_+2]=(d[q[(_+2)%4]>>8&255]^J>>8)&255,V[4*_+3]=(d[q[(_+3)%4]&255]^J)&255;return V},Y.prototype.decrypt=function(I){if(I.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var C=this._Kd.length-1,D=[0,0,0,0],q=K(I),_=0;_<4;_++)q[_]^=this._Kd[0][_];for(var W=1;W>24&255]^E[q[(_+3)%4]>>16&255]^S[q[(_+2)%4]>>8&255]^P[q[(_+1)%4]&255]^this._Kd[W][_];q=D.slice()}for(var V=o(16),J,_=0;_<4;_++)J=this._Kd[C][_],V[4*_]=(h[q[_]>>24&255]^J>>24)&255,V[4*_+1]=(h[q[(_+3)%4]>>16&255]^J>>16)&255,V[4*_+2]=(h[q[(_+2)%4]>>8&255]^J>>8)&255,V[4*_+3]=(h[q[(_+1)%4]&255]^J)&255;return V};var Q=function(I){if(!(this instanceof Q))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Y(I)};Q.prototype.encrypt=function(I){if(I=s(I),I.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var C=o(I.length),D=o(16),q=0;q=0;--C)this._counter[C]=I%256,I=I>>8},N.prototype.setBytes=function(I){if(I=s(I,!0),I.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=I},N.prototype.increment=function(){for(var I=15;I>=0;I--)if(this._counter[I]===255)this._counter[I]=0;else{this._counter[I]++;break}};var M=function(I,C){if(!(this instanceof M))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",C instanceof N||(C=new N(C)),this._counter=C,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Y(I)};M.prototype.encrypt=function(I){for(var C=s(I,!0),D=0;D16)throw new Error("PKCS#7 padding byte out of range");for(var D=I.length-C,q=0;q=64;){let B=y,I=b,C=E,D=S,q=P,_=R,W=L,V=j,J,ee,se,ie,ae;for(ee=0;ee<16;ee++)se=A+ee*4,H[ee]=(M[se]&255)<<24|(M[se+1]&255)<<16|(M[se+2]&255)<<8|M[se+3]&255;for(ee=16;ee<64;ee++)J=H[ee-2],ie=(J>>>17|J<<15)^(J>>>19|J<<13)^J>>>10,J=H[ee-15],ae=(J>>>7|J<<25)^(J>>>18|J<<14)^J>>>3,H[ee]=(ie+H[ee-7]|0)+(ae+H[ee-16]|0)|0;for(ee=0;ee<64;ee++)ie=(((q>>>6|q<<26)^(q>>>11|q<<21)^(q>>>25|q<<7))+(q&_^~q&W)|0)+(V+(v[ee]+H[ee]|0)|0)|0,ae=((B>>>2|B<<30)^(B>>>13|B<<19)^(B>>>22|B<<10))+(B&I^B&C^I&C)|0,V=W,W=_,_=q,q=D+ie|0,D=C,C=I,I=B,B=ie+ae|0;y=y+B|0,b=b+I|0,E=E+C|0,S=S+D|0,P=P+q|0,R=R+_|0,L=L+W|0,j=j+V|0,A+=64,O-=64}}K(m);let Y,Q=m.length%64,F=m.length/536870912|0,x=m.length<<3,k=Q<56?56:120,N=m.slice(m.length-Q,m.length);for(N.push(128),Y=Q+1;Y>>24&255),N.push(F>>>16&255),N.push(F>>>8&255),N.push(F>>>0&255),N.push(x>>>24&255),N.push(x>>>16&255),N.push(x>>>8&255),N.push(x>>>0&255),K(N),[y>>>24&255,y>>>16&255,y>>>8&255,y>>>0&255,b>>>24&255,b>>>16&255,b>>>8&255,b>>>0&255,E>>>24&255,E>>>16&255,E>>>8&255,E>>>0&255,S>>>24&255,S>>>16&255,S>>>8&255,S>>>0&255,P>>>24&255,P>>>16&255,P>>>8&255,P>>>0&255,R>>>24&255,R>>>16&255,R>>>8&255,R>>>0&255,L>>>24&255,L>>>16&255,L>>>8&255,L>>>0&255,j>>>24&255,j>>>16&255,j>>>8&255,j>>>0&255]}function s(m,v,y){m=m.length<=64?m:i(m);const b=64+v.length+4,E=new Array(b),S=new Array(64);let P,R=[];for(P=0;P<64;P++)E[P]=54;for(P=0;P=b-4;j--){if(E[j]++,E[j]<=255)return;E[j]=0}}for(;y>=32;)L(),R=R.concat(i(S.concat(i(E)))),y-=32;return y>0&&(L(),R=R.concat(i(S.concat(i(E))).slice(0,y))),R}function o(m,v,y,b,E){let S;for(u(m,(2*y-1)*16,E,0,16),S=0;S<2*y;S++)l(m,S*16,E,16),c(E,b),u(E,0,m,v+S*16,16);for(S=0;S>>32-v}function c(m,v){u(m,0,v,0,16);for(let y=8;y>0;y-=2)v[4]^=a(v[0]+v[12],7),v[8]^=a(v[4]+v[0],9),v[12]^=a(v[8]+v[4],13),v[0]^=a(v[12]+v[8],18),v[9]^=a(v[5]+v[1],7),v[13]^=a(v[9]+v[5],9),v[1]^=a(v[13]+v[9],13),v[5]^=a(v[1]+v[13],18),v[14]^=a(v[10]+v[6],7),v[2]^=a(v[14]+v[10],9),v[6]^=a(v[2]+v[14],13),v[10]^=a(v[6]+v[2],18),v[3]^=a(v[15]+v[11],7),v[7]^=a(v[3]+v[15],9),v[11]^=a(v[7]+v[3],13),v[15]^=a(v[11]+v[7],18),v[1]^=a(v[0]+v[3],7),v[2]^=a(v[1]+v[0],9),v[3]^=a(v[2]+v[1],13),v[0]^=a(v[3]+v[2],18),v[6]^=a(v[5]+v[4],7),v[7]^=a(v[6]+v[5],9),v[4]^=a(v[7]+v[6],13),v[5]^=a(v[4]+v[7],18),v[11]^=a(v[10]+v[9],7),v[8]^=a(v[11]+v[10],9),v[9]^=a(v[8]+v[11],13),v[10]^=a(v[9]+v[8],18),v[12]^=a(v[15]+v[14],7),v[13]^=a(v[12]+v[15],9),v[14]^=a(v[13]+v[12],13),v[15]^=a(v[14]+v[13],18);for(let y=0;y<16;++y)m[y]+=v[y]}function l(m,v,y,b){for(let E=0;E=256)return!1}return!0}function d(m,v){if(typeof m!="number"||m%1)throw new Error("invalid "+v);return m}function h(m,v,y,b,E,S,P){if(y=d(y,"N"),b=d(b,"r"),E=d(E,"p"),S=d(S,"dkLen"),y===0||y&y-1)throw new Error("N must be power of 2");if(y>2147483647/128/b)throw new Error("N too large");if(b>2147483647/128/E)throw new Error("r too large");if(!f(m))throw new Error("password must be an array or buffer");if(m=Array.prototype.slice.call(m),!f(v))throw new Error("salt must be an array or buffer");v=Array.prototype.slice.call(v);let R=s(m,v,E*128*b);const L=new Uint32Array(E*32*b);for(let q=0;qI&&(q=I);for(let W=0;WI&&(q=I);for(let W=0;W>0&255),R.push(L[W]>>8&255),R.push(L[W]>>16&255),R.push(L[W]>>24&255);const _=s(m,R,S);return P&&P(null,1,_),_}P&&C(D)};if(!P)for(;;){const q=D();if(q!=null)return q}D()}const p={scrypt:function(m,v,y,b,E,S,P){return new Promise(function(R,L){let j=0;P&&P(0),h(m,v,y,b,E,S,function(H,K,Y){if(H)L(H);else if(Y)P&&j!==1&&P(1),R(new Uint8Array(Y));else if(P&&K!==j)return j=K,P(K)})})},syncScrypt:function(m,v,y,b,E,S){return new Uint8Array(h(m,v,y,b,E,S))}};t.exports=p})()})(O$);var fX=O$.exports;const O8=Ii(fX);var dX=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(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const V5=new ne(I$);function PS(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class hX extends il{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function pX(t,e,r){if(Tr(t,"crypto/cipher")==="aes-128-ctr"){const i=Wl(Tr(t,"crypto/cipherparams/iv")),s=new co.Counter(i),o=new co.ModeOfOperation.ctr(e,s);return fe(o.decrypt(r))}return null}function R$(t,e){const r=Wl(Tr(t,"crypto/ciphertext"));if(le(Te(At([e.slice(16,32),r]))).substring(2)!==Tr(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const i=pX(t,e.slice(0,16),r);i||V5.throwError("unsupported cipher",ne.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const s=e.slice(32,64),o=Zo(i);if(t.address){let c=t.address.toLowerCase();if(c.substring(0,2)!=="0x"&&(c="0x"+c),Ue(c)!==o)throw new Error("address mismatch")}const a={_isKeystoreAccount:!0,address:o,privateKey:le(i)};if(Tr(t,"x-ethers/version")==="0.1"){const c=Wl(Tr(t,"x-ethers/mnemonicCiphertext")),l=Wl(Tr(t,"x-ethers/mnemonicCounter")),u=new co.Counter(l),f=new co.ModeOfOperation.ctr(s,u),d=Tr(t,"x-ethers/path")||cu,h=Tr(t,"x-ethers/locale")||"en",p=fe(f.decrypt(c));try{const m=K1(p,h),v=Qn.fromMnemonic(m,null,h).derivePath(d);if(v.privateKey!=a.privateKey)throw new Error("mnemonic mismatch");a.mnemonic=v.mnemonic}catch(m){if(m.code!==ne.errors.INVALID_ARGUMENT||m.argument!=="wordlist")throw m}}return new hX(a)}function $$(t,e,r,n,i){return fe(k8(t,e,r,n,i))}function mX(t,e,r,n,i){return Promise.resolve($$(t,e,r,n,i))}function M$(t,e,r,n,i){const s=I8(e),o=Tr(t,"crypto/kdf");if(o&&typeof o=="string"){const a=function(c,l){return V5.throwArgumentError("invalid key-derivation function parameters",c,l)};if(o.toLowerCase()==="scrypt"){const c=Wl(Tr(t,"crypto/kdfparams/salt")),l=parseInt(Tr(t,"crypto/kdfparams/n")),u=parseInt(Tr(t,"crypto/kdfparams/r")),f=parseInt(Tr(t,"crypto/kdfparams/p"));(!l||!u||!f)&&a("kdf",o),l&l-1&&a("N",l);const d=parseInt(Tr(t,"crypto/kdfparams/dklen"));return d!==32&&a("dklen",d),n(s,c,l,u,f,64,i)}else if(o.toLowerCase()==="pbkdf2"){const c=Wl(Tr(t,"crypto/kdfparams/salt"));let l=null;const u=Tr(t,"crypto/kdfparams/prf");u==="hmac-sha256"?l="sha256":u==="hmac-sha512"?l="sha512":a("prf",u);const f=parseInt(Tr(t,"crypto/kdfparams/c")),d=parseInt(Tr(t,"crypto/kdfparams/dklen"));return d!==32&&a("dklen",d),r(s,c,f,d,l)}}return V5.throwArgumentError("unsupported key-derivation function","kdf",o)}function N$(t,e){const r=JSON.parse(t),n=M$(r,e,$$,O8.syncScrypt);return R$(r,n)}function D$(t,e,r){return dX(this,void 0,void 0,function*(){const n=JSON.parse(t),i=yield M$(n,e,mX,O8.scrypt,r);return R$(n,i)})}function L$(t,e,r,n){try{if(Ue(t.address)!==Zo(t.privateKey))throw new Error("address/privateKey mismatch");if(PS(t)){const v=t.mnemonic;if(Qn.fromMnemonic(v.phrase,null,v.locale).derivePath(v.path||cu).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(v){return Promise.reject(v)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});const i=fe(t.privateKey),s=I8(e);let o=null,a=null,c=null;if(PS(t)){const v=t.mnemonic;o=fe(G1(v.phrase,v.locale||"en")),a=v.path||cu,c=v.locale||"en"}let l=r.client;l||(l="ethers.js");let u=null;r.salt?u=fe(r.salt):u=Is(32);let f=null;if(r.iv){if(f=fe(r.iv),f.length!==16)throw new Error("invalid iv")}else f=Is(16);let d=null;if(r.uuid){if(d=fe(r.uuid),d.length!==16)throw new Error("invalid uuid")}else d=Is(16);let h=1<<17,p=8,m=1;return r.scrypt&&(r.scrypt.N&&(h=r.scrypt.N),r.scrypt.r&&(p=r.scrypt.r),r.scrypt.p&&(m=r.scrypt.p)),O8.scrypt(s,u,h,p,m,64,n).then(v=>{v=fe(v);const y=v.slice(0,16),b=v.slice(16,32),E=v.slice(32,64),S=new co.Counter(f),P=new co.ModeOfOperation.ctr(y,S),R=fe(P.encrypt(i)),L=Te(At([b,R])),j={address:t.address.substring(2).toLowerCase(),id:cX(d),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:le(f).substring(2)},ciphertext:le(R).substring(2),kdf:"scrypt",kdfparams:{salt:le(u).substring(2),n:h,dklen:32,p:m,r:p},mac:L.substring(2)}};if(o){const H=Is(16),K=new co.Counter(H),Y=new co.ModeOfOperation.ctr(E,K),Q=fe(Y.encrypt(o)),F=new Date,x=F.getUTCFullYear()+"-"+mh(F.getUTCMonth()+1,2)+"-"+mh(F.getUTCDate(),2)+"T"+mh(F.getUTCHours(),2)+"-"+mh(F.getUTCMinutes(),2)+"-"+mh(F.getUTCSeconds(),2)+".0Z";j["x-ethers"]={client:l,gethFilename:"UTC--"+x+"--"+j.address,mnemonicCounter:le(H).substring(2),mnemonicCiphertext:le(Q).substring(2),path:a,locale:c,version:"0.1"}}return JSON.stringify(j)})}function j$(t,e,r){if(eb(t)){r&&r(0);const n=T8(t,e);return r&&r(1),Promise.resolve(n)}return tb(t)?D$(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function B$(t,e){if(eb(t))return T8(t,e);if(tb(t))return N$(t,e);throw new Error("invalid JSON wallet")}const vX=Object.freeze(Object.defineProperty({__proto__:null,decryptCrowdsale:T8,decryptJsonWallet:j$,decryptJsonWalletSync:B$,decryptKeystore:D$,decryptKeystoreSync:N$,encryptKeystore:L$,getJsonWalletAddress:T$,isCrowdsaleWallet:eb,isKeystoreWallet:tb},Symbol.toStringTag,{value:"Module"})),yX="wallet/5.7.0";var IS=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(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const Lu=new ne(yX);function gX(t){return t!=null&&We(t.privateKey,32)&&t.address!=null}function bX(t){const e=t.mnemonic;return e&&e.phrase}let F$=class ef extends Mc{constructor(e,r){if(super(),gX(e)){const n=new Cc(e.privateKey);if(de(this,"_signingKey",()=>n),de(this,"address",Zo(this.publicKey)),this.address!==Ue(e.address)&&Lu.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),bX(e)){const i=e.mnemonic;de(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||cu,locale:i.locale||"en"}));const s=this.mnemonic,o=Qn.fromMnemonic(s.phrase,null,s.locale).derivePath(s.path);Zo(o.privateKey)!==this.address&&Lu.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else de(this,"_mnemonic",()=>null)}else{if(Cc.isSigningKey(e))e.curve!=="secp256k1"&&Lu.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),de(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new Cc(e);de(this,"_signingKey",()=>n)}de(this,"_mnemonic",()=>null),de(this,"address",Zo(this.publicKey))}r&&!Oa.isProvider(r)&&Lu.throwArgumentError("invalid provider","provider",r),de(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 ef(this,e)}signTransaction(e){return It(e).then(r=>{r.from!=null&&(Ue(r.from)!==this.address&&Lu.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(Te(sy(r)));return sy(r,n)})}signMessage(e){return IS(this,void 0,void 0,function*(){return Jv(this._signingKey().signDigest(W1(e)))})}_signTypedData(e,r,n){return IS(this,void 0,void 0,function*(){const i=yield Pr.resolveNames(e,r,n,s=>(this.provider==null&&Lu.throwError("cannot resolve ENS names without a provider",ne.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:s}),this.provider.resolveName(s)));return Jv(this._signingKey().signDigest(Pr.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={}),L$(this,e,r,n)}static createRandom(e){let r=Is(16);e||(e={}),e.extraEntropy&&(r=fe(ir(Te(At([r,e.extraEntropy])),0,16)));const n=K1(r,e.locale);return ef.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return j$(e,r,n).then(i=>new ef(i))}static fromEncryptedJsonSync(e,r){return new ef(B$(e,r))}static fromMnemonic(e,r,n){return r||(r=cu),new ef(Qn.fromMnemonic(e,null,n).derivePath(r))}};function R8(t,e){return Dc(W1(t),e)}function U$(t,e,r,n){return Dc(Pr.hash(t,e,r),n)}const xX=Object.freeze(Object.defineProperty({__proto__:null,Wallet:F$,verifyMessage:R8,verifyTypedData:U$},Symbol.toStringTag,{value:"Module"})),wX="networks/5.7.1",TS=new ne(wX);function EX(t){return t&&typeof t.renetwork=="function"}function zo(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 zo(r)},e}function ay(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return ay(t,n)},r}const OS={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:zo("homestead")},RS={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:zo("ropsten")},$S={chainId:63,name:"classicMordor",_defaultProvider:ay("https://www.ethercluster.com/mordor","classicMordor")},Xp={unspecified:{chainId:0,name:"unspecified"},homestead:OS,mainnet:OS,morden:{chainId:2,name:"morden"},ropsten:RS,testnet:RS,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:zo("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:zo("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:zo("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:zo("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:ay("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:$S,classicTestnet:$S,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:ay("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:zo("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:zo("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 CX(t){if(t==null)return null;if(typeof t=="number"){for(const n in Xp){const i=Xp[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=Xp[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=Xp[t.name];if(!e)return typeof t.chainId!="number"&&TS.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&TS.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(EX(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 SX="web/5.7.1";var kX=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(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};function AX(t,e){return kX(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:fe(new Uint8Array(i))}})}var _X=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(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const xs=new ne(SX);function MS(t){return new Promise(e=>{setTimeout(e,t)})}function Va(t,e){if(t==null)return null;if(typeof t=="string")return t;if(Ns(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return cs(t)}catch{}return le(t)}return t}function PX(t){return Ct(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function $8(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;xs.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;xs.assertArgument(s>0&&s%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",s);const o=typeof t=="object"?!!t.errorPassThrough:!1,a={};let c=null;const l={method:"GET"};let u=!1,f=2*60*1e3;if(typeof t=="string")c=t;else if(typeof t=="object"){if((t==null||t.url==null)&&xs.throwArgumentError("missing URL","connection.url",t),c=t.url,typeof t.timeout=="number"&&t.timeout>0&&(f=t.timeout),t.headers)for(const y in t.headers)a[y.toLowerCase()]={key:y,value:String(t.headers[y])},["if-none-match","if-modified-since"].indexOf(y.toLowerCase())>=0&&(u=!0);if(l.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){c.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&xs.throwError("basic authentication requires a secure https url",ne.errors.INVALID_ARGUMENT,{argument:"url",url:c,user:t.user,password:"[REDACTED]"});const y=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+d8(Ct(y))}}t.skipFetchSetup!=null&&(l.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(l.fetchOptions=jt(t.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),h=c?c.match(d):null;if(h)try{const y={statusCode:200,statusMessage:"OK",headers:{"content-type":h[1]||"text/plain"},body:h[2]?f8(h[3]):PX(h[3])};let b=y.body;return r&&(b=r(y.body,y)),Promise.resolve(b)}catch(y){xs.throwError("processing response error",ne.errors.SERVER_ERROR,{body:Va(h[1],h[2]),error:y,requestBody:null,requestMethod:"GET",url:c})}e&&(l.method="POST",l.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 p={};Object.keys(a).forEach(y=>{const b=a[y];p[b.key]=b.value}),l.headers=p;const m=function(){let y=null;return{promise:new Promise(function(S,P){f&&(y=setTimeout(()=>{y!=null&&(y=null,P(xs.makeError("timeout",ne.errors.TIMEOUT,{requestBody:Va(l.body,p["content-type"]),requestMethod:l.method,timeout:f,url:c})))},f))}),cancel:function(){y!=null&&(clearTimeout(y),y=null)}}}(),v=function(){return _X(this,void 0,void 0,function*(){for(let y=0;y=300)&&(m.cancel(),xs.throwError("bad response",ne.errors.SERVER_ERROR,{status:b.statusCode,headers:b.headers,body:Va(E,b.headers?b.headers["content-type"]:null),requestBody:Va(l.body,p["content-type"]),requestMethod:l.method,url:c})),r)try{const S=yield r(E,b);return m.cancel(),S}catch(S){if(S.throttleRetry&&y{let a=null;if(s!=null)try{a=JSON.parse(cs(s))}catch(c){xs.throwError("invalid JSON",ne.errors.SERVER_ERROR,{body:s,error:c})}return r&&(a=r(a,o)),a},i=null;if(e!=null){i=Ct(e);const s=typeof t=="string"?{url:t}:jt(t);s.headers?Object.keys(s.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(s.headers=jt(s.headers),s.headers["content-type"]="application/json"):s.headers={"content-type":"application/json"},t=s}return $8(t,i,n)}function Yo(t,e){return e||(e={}),e=jt(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 c=0;function l(){return t().then(function(u){if(u!==void 0)o()&&r(u);else if(e.oncePoll)e.oncePoll.once("poll",l);else if(e.onceBlock)e.onceBlock.once("block",l);else if(!s){if(c++,c>a){o()&&n(new Error("retry limit reached"));return}let f=e.interval*parseInt(String(Math.random()*Math.pow(2,c)));fe.ceiling&&(f=e.ceiling),setTimeout(l,f)}return null},function(u){o()&&n(u)})}l()})}const IX=Object.freeze(Object.defineProperty({__proto__:null,_fetchData:$8,fetchJson:$d,poll:Yo},Symbol.toStringTag,{value:"Module"}));var cy="qpzry9x8gf2tvdw0s3jn54khce6mua7l",G5={};for(var Zp=0;Zp>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 z$(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=Ff(e)^n>>5}for(e=Ff(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=z$(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=Ff(n)^o,i+=cy.charAt(o)}for(s=0;s<6;++s)n=Ff(n);for(n^=1,s=0;s<6;++s){var a=n>>(5-s)*5&31;i+=cy.charAt(a)}return i}function q$(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=z$(s);if(typeof a=="string")return a;for(var c=[],l=0;l=o.length)&&c.push(f)}return a!==1?"Invalid checksum for "+t:{prefix:s,words:c}}function OX(){var t=q$.apply(null,arguments);if(typeof t=="object")return t}function RX(t){var e=q$.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function rb(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(f,!0);return e.transaction={hash:o,type:l,accessList:Ee.allowNull(this.accessList.bind(this),null),blockHash:Ee.allowNull(o,null),blockNumber:Ee.allowNull(c,null),transactionIndex:Ee.allowNull(c,null),confirmations:Ee.allowNull(c,null),from:r,gasPrice:Ee.allowNull(n),maxPriorityFeePerGas:Ee.allowNull(n),maxFeePerGas:Ee.allowNull(n),gasLimit:n,to:Ee.allowNull(r,null),value:n,nonce:c,data:s,r:Ee.allowNull(this.uint256),s:Ee.allowNull(this.uint256),v:Ee.allowNull(c),creates:Ee.allowNull(r,null),raw:Ee.allowNull(s)},e.transactionRequest={from:Ee.allowNull(r),nonce:Ee.allowNull(c),gasLimit:Ee.allowNull(n),gasPrice:Ee.allowNull(n),maxPriorityFeePerGas:Ee.allowNull(n),maxFeePerGas:Ee.allowNull(n),to:Ee.allowNull(r),value:Ee.allowNull(n),data:Ee.allowNull(u),type:Ee.allowNull(c),accessList:Ee.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:c,blockNumber:c,transactionHash:o,address:r,topics:Ee.arrayOf(o),data:s,logIndex:c,blockHash:o},e.receipt={to:Ee.allowNull(this.address,null),from:Ee.allowNull(this.address,null),contractAddress:Ee.allowNull(r,null),transactionIndex:c,root:Ee.allowNull(a),gasUsed:n,logsBloom:Ee.allowNull(s),blockHash:o,transactionHash:o,logs:Ee.arrayOf(this.receiptLog.bind(this)),blockNumber:c,confirmations:Ee.allowNull(c,null),cumulativeGasUsed:n,effectiveGasPrice:Ee.allowNull(n),status:Ee.allowNull(c),type:l},e.block={hash:Ee.allowNull(o),parentHash:o,number:c,timestamp:c,nonce:Ee.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:Ee.allowNull(r),extraData:s,transactions:Ee.allowNull(Ee.arrayOf(o)),baseFeePerGas:Ee.allowNull(n)},e.blockWithTransactions=jt(e.block),e.blockWithTransactions.transactions=Ee.allowNull(Ee.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:Ee.allowNull(i,void 0),toBlock:Ee.allowNull(i,void 0),blockHash:Ee.allowNull(o,void 0),address:Ee.allowNull(r,void 0),topics:Ee.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:Ee.allowNull(c),blockHash:Ee.allowNull(o),transactionIndex:c,removed:Ee.allowNull(this.boolean.bind(this)),address:r,data:Ee.allowFalsish(s,"0x"),topics:Ee.arrayOf(o),transactionHash:o,logIndex:c},e}accessList(e){return ol(e||[])}number(e){return e==="0x"?0:te.from(e).toNumber()}type(e){return e==="0x"||e==null?0:te.from(e).toNumber()}bigNumber(e){return te.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),We(e))?e.toLowerCase():vh.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 Ue(e)}callAddress(e){if(!We(e,32))return null;const r=Ue(ir(e,12));return r===$t?null:r}contractAddress(e){return Hg(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"||We(e))return Zi(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return Ds(n)!==32?vh.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=te.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!We(e))throw new Error("invalid uint256");return Pt(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=Ee.check(r,e);return i._difficulty=n==null?null:te.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return Ee.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&te.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=Ee.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;We(n)&&(n=te.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),We(n)&&(n=te.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 E8(e)}receiptLog(e){return Ee.check(this.formats.receiptLog,e)}receipt(e){const r=Ee.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=te.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&vh.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):vh.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&vh.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 Ee.check(this.formats.filter,e)}filterLog(e){return Ee.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}}}function jX(t){return t&&typeof t.isCommunityResource=="function"}function DS(t){return jX(t)&&t.isCommunityResource()}var Fe=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(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const et=new ne(Md),BX=10;function LS(t){return t==null?"null":(Ds(t)!==32&&et.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function jS(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[LS(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return LS(e)}).join("&")}function FX(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 ju(t){if(typeof t=="string"){if(t=t.toLowerCase(),Ds(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+jS(t);if(FY.isForkEvent(t))throw et.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+jS(t.topics||[])}throw new Error("invalid event - "+t)}function yh(){return new Date().getTime()}function BS(t){return new Promise(e=>{setTimeout(e,t)})}const UX=["block","network","pending","poll"];let zX=class{constructor(e,r,n){de(this,"tag",e),de(this,"listener",r),de(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=FX(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||UX.indexOf(this.tag)>=0}};const qX={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 Ox(t){return Pt(te.from(t).toHexString(),32)}function FS(t){return ou.encode(At([t,ir(ko(ko(t)),0,4)]))}const W$=new RegExp("^(ipfs)://(.*)$","i"),US=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),W$,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function ev(t,e){try{return cs(Y0(t,e))}catch{}return null}function Y0(t,e){if(t==="0x")return null;const r=te.from(ir(t,e,e+32)).toNumber(),n=te.from(ir(t,r,r+32)).toNumber();return ir(t,r+32,r+32+n)}function Rx(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):et.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function zS(t){const e=fe(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 WX(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function H$(t){const e=[];let r=0;for(let n=0;nte.from(e).eq(1)).catch(e=>{if(e.code===ne.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return Fe(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Cn([e,Bf(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=Cn(["0x9061b923",H$([h8(this.name),n.data])]));try{let s=yield this.provider.call(n);return fe(s).length%32===4&&et.throwError("resolver threw error",ne.errors.CALL_EXCEPTION,{transaction:n,data:s}),i&&(s=Y0(s,0)),s}catch(s){if(s.code===ne.errors.CALL_EXCEPTION)return null;throw s}})}_fetchBytes(e,r){return Fe(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?Y0(n,0):null})}_getAddress(e,r){const n=qX[String(e)];if(n==null&&et.throwError(`unsupported coin type: ${e}`,ne.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=fe(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 FS(At([[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 FS(At([[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=NS.toWords(i.slice(2));return a.unshift(o),NS.encode(n.prefix,a)}}return null}getAddress(e){return Fe(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===ey?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===ne.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",Ox(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&et.throwError("invalid or unsupported coin data",ne.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return Fe(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[c])}return et.throwError("invalid or unsupported content hash data",ne.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return Fe(this,void 0,void 0,function*(){let r=Ct(e);r=At([Ox(64),Ox(r.length),r]),r.length%32!==0&&(r=At([r,Pt("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",le(r));return n==null||n==="0x"?null:cs(n)})}}let $x=null,HX=1;class nb extends Oa{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),de(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=Ji(new.target,"getNetwork")(e);r?(de(this,"_network",r),this.emit("network",r,null)):et.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Fe(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||et.throwError("no network detected",ne.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:de(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return Yo(()=>this._ready().then(e=>e,e=>{if(!(e.code===ne.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return $x==null&&($x=new Ee),$x}static getNetwork(e){return CX(e??"homestead")}ccipReadFetch(e,r,n){return Fe(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}),f=yield $d({url:l,errorPassThrough:!0},u,(h,p)=>(h.status=p.statusCode,h));if(f.data)return f.data;const d=f.message||"unknown error";if(f.status>=400&&f.status<500)return et.throwError(`response not found during CCIP fetch: ${d}`,ne.errors.SERVER_ERROR,{url:c,errorMessage:d});o.push(d)}return et.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,ne.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return Fe(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(yh()-s.respTime<=e)return s.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=yh(),n=It({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=yh();return i=te.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return Fe(this,void 0,void 0,function*(){const e=HX++,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)et.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",et.makeError("network block skew detected",ne.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(c=>{i._inflight=!1,c.length!==0&&c.forEach(l=>{l.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=l.blockNumber),this._emitted["b:"+l.blockHash]=l.blockNumber,this._emitted["t:"+l.transactionHash]=l.blockNumber,this.emit(s,l)})}).catch(c=>{this.emit("error",c),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 Fe(this,void 0,void 0,function*(){return et.throwError("provider does not support network detection",ne.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return Fe(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 BS(0),this._network;const n=et.makeError("underlying network changed",ne.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=yh();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 Fe(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return Fe(this,void 0,void 0,function*(){const s=yield this.getTransactionReceipt(e);return(s?s.confirmations:0)>=r?s:new Promise((o,a)=>{const c=[];let l=!1;const u=function(){return l?!0:(l=!0,c.forEach(d=>{d()}),!1)},f=d=>{d.confirmations{this.removeListener(e,f)}),i){let d=i.startBlock,h=null;const p=m=>Fe(this,void 0,void 0,function*(){l||(yield BS(1e3),this.getTransactionCount(i.from).then(v=>Fe(this,void 0,void 0,function*(){if(!l){if(v<=i.nonce)d=m;else{{const y=yield this.getTransaction(e);if(y&&y.blockNumber!=null)return}for(h==null&&(h=d-3,h{l||this.once("block",p)}))});if(l)return;this.once("block",p),c.push(()=>{this.removeListener("block",p)})}if(typeof n=="number"&&n>0){const d=setTimeout(()=>{u()||a(et.makeError("timeout exceeded",ne.errors.TIMEOUT,{timeout:n}))},n);d.unref&&d.unref(),c.push(()=>{clearTimeout(d)})}})})}getBlockNumber(){return Fe(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return Fe(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return te.from(e)}catch(r){return et.throwError("bad result from backend",ne.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return Fe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield It({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return te.from(i)}catch(s){return et.throwError("bad result from backend",ne.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:s})}})}getTransactionCount(e,r){return Fe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield It({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return te.from(i).toNumber()}catch(s){return et.throwError("bad result from backend",ne.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:s})}})}getCode(e,r){return Fe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield It({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return le(i)}catch(s){return et.throwError("bad result from backend",ne.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:s})}})}getStorageAt(e,r,n){return Fe(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield It({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>Zi(o))}),s=yield this.perform("getStorageAt",i);try{return le(s)}catch(o){return et.throwError("bad result from backend",ne.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:s,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&Ds(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&et.throwError("Transaction hash mismatch from Provider.sendTransaction.",ne.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(s,o)=>Fe(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 c=yield this._waitForTransaction(e.hash,s,o,a);return c==null&&s===0?null:(this._emitted["t:"+e.hash]=c.blockNumber,c.status===0&&et.throwError("transaction failed",ne.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:c}),c)}),i}sendTransaction(e){return Fe(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(s=>le(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 Fe(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?te.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?le(s):null))}),this.formatter.transactionRequest(yield It(n))})}_getFilter(e){return Fe(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 It(r))})}_call(e,r,n){return Fe(this,void 0,void 0,function*(){n>=BX&&et.throwError("CCIP read exceeded maximum redirections",ne.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"&&Ds(s)%32===4)try{const o=ir(s,4),a=ir(o,0,32);te.from(a).eq(i)||et.throwError("CCIP Read sender did not match",ne.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:s});const c=[],l=te.from(ir(o,32,64)).toNumber(),u=te.from(ir(o,l,l+32)).toNumber(),f=ir(o,l+32);for(let y=0;yFe(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 c=0;cthis._wrapTransaction(c)),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 Fe(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return Yo(()=>Fe(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 Fe(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return Yo(()=>Fe(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 Fe(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield It({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),Ee.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return Fe(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return Fe(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&et.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 Fe(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 K5(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return Fe(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||et.throwError("network does not support ENS",ne.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Bf(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return Fe(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(We(e))throw n}typeof e!="string"&&et.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return Fe(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=ev(yield this.call({to:n,data:"0x691f3431"+Bf(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return Fe(this,void 0,void 0,function*(){let r=null;if(We(e)){const s=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(s,"getAvatar");if(!o)return null;r=new K5(this,o,s);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==ne.errors.CALL_EXCEPTION)throw a}try{const a=ev(yield this.call({to:o,data:"0x691f3431"+Bf(s).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==ne.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 et.throwError(e+" not implemented",ne.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 zX(ju(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=ju(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=ju(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=ju(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=ju(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=ju(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var jo=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(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const Dr=new ne(Md),VX=["call","estimateGas"];function n0(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=We(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=n0(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return n0(JSON.parse(t),e)}catch{}return null}function V$(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const s=n0(e,!0);if(s)return s.data;Dr.throwError("missing revert data in call exception; Transaction reverted without a reason string",ne.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let s=n0(e.body,!1);s==null&&(s=n0(e,!1)),s&&Dr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ne.errors.UNPREDICTABLE_GAS_LIMIT,{reason:s.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===ne.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)&&Dr.throwError("insufficient funds for intrinsic transaction cost",ne.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&Dr.throwError("nonce has already been used",ne.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Dr.throwError("replacement fee too low",ne.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&Dr.throwError("legacy pre-eip-155 transactions not supported",ne.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),VX.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Dr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ne.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function qS(t){return new Promise(function(e){setTimeout(e,t)})}function GX(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 gh(t){return t&&t.toLowerCase()}const Y5={};class G$ extends Mc{constructor(e,r,n){if(super(),e!==Y5)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");de(this,"provider",r),n==null&&(n=0),typeof n=="string"?(de(this,"_address",this.provider.formatter.address(n)),de(this,"_index",null)):typeof n=="number"?(de(this,"_index",n),de(this,"_address",null)):Dr.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Dr.throwError("cannot alter JSON-RPC Signer connection",ne.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new KX(Y5,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&&Dr.throwError("unknown account #"+this._index,ne.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=jt(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=jt(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>jo(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&Dr.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),It({tx:It(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Dr.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)&&Dr.throwError("user rejected transaction",ne.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),V$("sendTransaction",o,s)))})}signTransaction(e){return Dr.throwError("signing transactions is unsupported",ne.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return jo(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 Yo(()=>jo(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 jo(this,void 0,void 0,function*(){const r=typeof e=="string"?Ct(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[le(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Dr.throwError("user rejected signing",ne.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return jo(this,void 0,void 0,function*(){const r=typeof e=="string"?Ct(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),le(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Dr.throwError("user rejected signing",ne.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return jo(this,void 0,void 0,function*(){const i=yield Pr.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(Pr.getPayload(i.domain,r,i.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&Dr.throwError("user rejected signing",ne.errors.ACTION_REJECTED,{action:"_signTypedData",from:s,messageData:{domain:i.domain,types:r,value:i.value}}),o}})}unlock(e){return jo(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class KX extends G${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 YX={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let fa=class extends nb{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=Ji(this.constructor,"defaultUrl")()),typeof e=="string"?de(this,"connection",Object.freeze({url:e})):de(this,"connection",Object.freeze(jt(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 jo(this,void 0,void 0,function*(){yield qS(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=Ji(this.constructor,"getNetwork");try{return r(te.from(e).toNumber())}catch(n){return Dr.throwError("could not detect network",ne.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Dr.throwError("could not detect network",ne.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new G$(Y5,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:si(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const s=$d(this.connection,JSON.stringify(n),GX).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",[gh(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[gh(r.address),r.blockTag]];case"getCode":return["eth_getCode",[gh(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[gh(r.address),Pt(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",[Ji(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[Ji(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=gh(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return jo(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&te.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=yield this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(r=jt(r),r.transaction=jt(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&Dr.throwError(e+" not implemented",ne.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return V$(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(c){return e.emit("pending",c),null})})}),o.then(function(){return qS(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=jt(YX);if(r)for(const s in r)r[s]&&(n[s]=!0);qg(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(s){if(e[s]==null)return;const o=Zi(te.from(e[s]));s==="gasLimit"&&(s="gas"),i[s]=o}),["from","to","data"].forEach(function(s){e[s]!=null&&(i[s]=le(e[s]))}),e.accessList&&(i.accessList=ol(e.accessList)),i}};var QX=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(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const JX=new ne(Md);class ly extends fa{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return QX(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||JX.throwError("no network detected",ne.errors.UNKNOWN_ERROR,{}),this._network==null&&(de(this,"_network",r),this.emit("network",r,null))),r})}}var uy=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(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const Il=new ne(Md);function em(){return new Date().getTime()}function WS(t){let e=null;for(let r=0;re?null:(n+i)/2}function xf(t){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return JSON.stringify(t);if(typeof t=="string")return t;if(te.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map(e=>xf(e)));if(typeof t=="object"){const e=Object.keys(t);return e.sort(),"{"+e.map(r=>{let n=t[r];return typeof n=="function"?n="[function]":n=xf(n),JSON.stringify(r)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof t)}let XX=1;function VS(t){let e=null,r=null,n=new Promise(o=>{e=function(){r&&(clearTimeout(r),r=null),o()},r=setTimeout(e,t)});const i=o=>(n=n.then(o),n);function s(){return n}return{cancel:e,getPromise:s,wait:i}}const ZX=[ne.errors.CALL_EXCEPTION,ne.errors.INSUFFICIENT_FUNDS,ne.errors.NONCE_EXPIRED,ne.errors.REPLACEMENT_UNDERPRICED,ne.errors.UNPREDICTABLE_GAS_LIMIT],eZ=["address","args","errorArgs","errorSignature","method","transaction"];function tm(t,e){const r={weight:t.weight};return Object.defineProperty(r,"provider",{get:()=>t.provider}),t.start&&(r.start=t.start),e&&(r.duration=e-t.start),t.done&&(t.error?r.error=t.error:r.result=t.result||null),r}function tZ(t,e){return function(r){const n={};r.forEach(s=>{const o=t(s.result);n[o]||(n[o]={count:0,result:s.result}),n[o].count++});const i=Object.keys(n);for(let s=0;s=e)return o.result}}}function rZ(t,e,r){let n=xf;switch(e){case"getBlockNumber":return function(i){const s=i.map(a=>a.result);let o=HS(i.map(a=>a.result),2);if(o!=null)return o=Math.ceil(o),s.indexOf(o+1)>=0&&o++,o>=t._highestBlockNumber&&(t._highestBlockNumber=o),t._highestBlockNumber};case"getGasPrice":return function(i){const s=i.map(o=>o.result);return s.sort(),s[Math.floor(s.length/2)]};case"getEtherPrice":return function(i){return HS(i.map(s=>s.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(i){return i==null?null:(i=jt(i),i.confirmations=-1,xf(i))};break;case"getBlock":r.includeTransactions?n=function(i){return i==null?null:(i=jt(i),i.transactions=i.transactions.map(s=>(s=jt(s),s.confirmations=-1,s)),xf(i))}:n=function(i){return i==null?null:xf(i)};break;default:throw new Error("unknown method: "+e)}return tZ(n,t.quorum)}function bh(t,e){return uy(this,void 0,void 0,function*(){const r=t.provider;return r.blockNumber!=null&&r.blockNumber>=e||e===-1?r:Yo(()=>new Promise((n,i)=>{setTimeout(function(){return r.blockNumber>=e?n(r):t.cancelled?n(null):n(void 0)},0)}),{oncePoll:r})})}function nZ(t,e,r,n){return uy(this,void 0,void 0,function*(){let i=t.provider;switch(r){case"getBlockNumber":case"getGasPrice":return i[r]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&We(n.blockTag)&&(i=yield bh(t,e)),i[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&We(n.blockTag)&&(i=yield bh(t,e)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&We(n.blockTag)&&(i=yield bh(t,e)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&We(n.blockTag)&&(i=yield bh(t,e)),r==="call"&&n.blockTag?i[r](n.transaction,n.blockTag):i[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[r](n.transactionHash);case"getLogs":{let s=n.filter;return(s.fromBlock&&We(s.fromBlock)||s.toBlock&&We(s.toBlock))&&(i=yield bh(t,e)),i.getLogs(s)}}return Il.throwError("unknown method error",ne.errors.UNKNOWN_ERROR,{method:r,params:n})})}class iZ extends nb{constructor(e,r){e.length===0&&Il.throwArgumentError("missing providers","providers",e);const n=e.map((o,a)=>{if(Oa.isProvider(o)){const u=DS(o)?2e3:750;return Object.freeze({provider:o,weight:1,stallTimeout:u,priority:1})}const c=jt(o);c.priority==null&&(c.priority=1),c.stallTimeout==null&&(c.stallTimeout=DS(o)?2e3:750),c.weight==null&&(c.weight=1);const l=c.weight;return(l%1||l>512||l<1)&&Il.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${a}].weight`,l),Object.freeze(c)}),i=n.reduce((o,a)=>o+a.weight,0);r==null?r=i/2:r>i&&Il.throwArgumentError("quorum will always fail; larger than total weight","quorum",r);let s=WS(n.map(o=>o.provider.network));s==null&&(s=new Promise((o,a)=>{setTimeout(()=>{this.detectNetwork().then(o,a)},0)})),super(s),de(this,"providerConfigs",Object.freeze(n)),de(this,"quorum",r),this._highestBlockNumber=-1}detectNetwork(){return uy(this,void 0,void 0,function*(){const e=yield Promise.all(this.providerConfigs.map(r=>r.provider.getNetwork()));return WS(e)})}perform(e,r){return uy(this,void 0,void 0,function*(){if(e==="sendTransaction"){const c=yield Promise.all(this.providerConfigs.map(l=>l.provider.sendTransaction(r.signedTransaction).then(u=>u.hash,u=>u)));for(let l=0;lc.priority-l.priority);const s=this._highestBlockNumber;let o=0,a=!0;for(;;){const c=em();let l=i.filter(h=>h.runner&&c-h.starth+p.weight,0);for(;l{h.staller=null}),h.runner=nZ(h,s,e,r).then(m=>{h.done=!0,h.result=m,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:p,backend:tm(h,em()),request:{method:e,params:si(r)},provider:this})},m=>{h.done=!0,h.error=m,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:p,backend:tm(h,em()),request:{method:e,params:si(r)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:p,backend:tm(h,null),request:{method:e,params:si(r)},provider:this}),l+=h.weight}const u=[];i.forEach(h=>{h.done||!h.runner||(u.push(h.runner),h.staller&&u.push(h.staller.getPromise()))}),u.length&&(yield Promise.race(u));const f=i.filter(h=>h.done&&h.error==null);if(f.length>=this.quorum){const h=n(f);if(h!==void 0)return i.forEach(p=>{p.staller&&p.staller.cancel(),p.cancelled=!0}),h;a||(yield VS(100).getPromise()),a=!1}const d=i.reduce((h,p)=>{if(!p.done||p.error==null)return h;const m=p.error.code;return ZX.indexOf(m)>=0&&(h[m]||(h[m]={error:p.error,weight:0}),h[m].weight+=p.weight),h},{});if(Object.keys(d).forEach(h=>{const p=d[h];if(p.weight{y.staller&&y.staller.cancel(),y.cancelled=!0});const m=p.error,v={};eZ.forEach(y=>{m[y]!=null&&(v[y]=m[y])}),Il.throwError(m.reason||m.message,h,v)}),i.filter(h=>!h.done).length===0)break}return i.forEach(c=>{c.staller&&c.staller.cancel(),c.cancelled=!0}),Il.throwError("failed to meet quorum",ne.errors.SERVER_ERROR,{method:e,params:r,results:i.map(c=>tm(c)),provider:this})})}}const GS=new ne(Md);let sZ=1;function KS(t,e){const r="Web3LegacyFetcher";return function(n,i){const s={method:n,params:i,id:sZ++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:si(s),provider:this}),e(s,(c,l)=>{if(c)return this.emit("debug",{action:"response",fetcher:r,error:c,request:s,provider:this}),a(c);if(this.emit("debug",{action:"response",fetcher:r,request:s,response:l,provider:this}),l.error){const u=new Error(l.error.message);return u.code=l.error.code,u.data=l.error.data,a(u)}o(l.result)})})}}function oZ(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:si(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 K$ extends fa{constructor(e,r){e==null&&GS.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=oZ(e)):e.sendAsync?i=KS(e,e.sendAsync.bind(e)):e.send?i=KS(e,e.send.bind(e)):GS.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),de(this,"jsonRpcFetchFunc",i),de(this,"provider",s)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const aZ="solidity/5.7.0",cZ=new RegExp("^bytes([0-9]+)$"),lZ=new RegExp("^(u?int)([0-9]*)$"),uZ=new RegExp("^(.*)\\[([0-9]*)\\]$"),fZ="0000000000000000000000000000000000000000000000000000000000000000",tf=new ne(aZ);function Y$(t,e,r){switch(t){case"address":return r?Df(e,32):fe(e);case"string":return Ct(e);case"bytes":return fe(e);case"bool":return e=e?"0x01":"0x00",r?Df(e,32):fe(e)}let n=t.match(lZ);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&tf.throwArgumentError("invalid number type","type",t),r&&(i=256),e=te.from(e).toTwos(i),Df(e,i/8)}if(n=t.match(cZ),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&tf.throwArgumentError("invalid bytes type","type",t),fe(e).byteLength!==i&&tf.throwArgumentError(`invalid value for ${t}`,"value",e),r?fe((e+fZ).substring(0,66)):e}if(n=t.match(uZ),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&tf.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(Y$(i,a,!0))}),At(o)}return tf.throwArgumentError("invalid type","type",t)}function Je(t,e){t.length!=e.length&&tf.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(Y$(n,e[i]))}),le(At(r))}function ea(t,e){return Te(Je(t,e))}function Q$(t,e){return ko(Je(t,e))}const dZ=Object.freeze(Object.defineProperty({__proto__:null,keccak256:ea,pack:Je,sha256:Q$},Symbol.toStringTag,{value:"Module"})),hZ="units/5.7.0",J$=new ne(hZ),X$=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Z$(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&J$.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 Rt(t,e){if(typeof e=="string"){const r=X$.indexOf(e);r!==-1&&(e=3*r)}return Gm(t,e??18)}function da(t,e){if(typeof t!="string"&&J$.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=X$.indexOf(e);r!==-1&&(e=3*r)}return Ks(t,e??18)}function eM(t){return Rt(t,18)}function tM(t){return da(t,18)}const pZ=Object.freeze(Object.defineProperty({__proto__:null,commify:Z$,formatEther:eM,formatUnits:Rt,parseEther:tM,parseUnits:da},Symbol.toStringTag,{value:"Module"})),mZ=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:Vg,ConstructorFragment:Hi,ErrorFragment:oo,EventFragment:As,FormatTypes:ft,Fragment:_s,FunctionFragment:Vi,HDNode:Qn,Indexed:V0,Interface:Sr,LogDescription:p8,Logger:ne,ParamType:Lr,RLP:xR,SigningKey:Cc,get SupportedAlgorithm(){return au},TransactionDescription:m8,get TransactionTypes(){return iy},get UnicodeNormalizationForm(){return Ls},Utf8ErrorFuncs:a8,get Utf8ErrorReason(){return Ln},_TypedDataEncoder:Pr,_fetchData:$8,_toEscapedUtf8String:OR,accessListify:ol,arrayify:fe,base58:ou,base64:LR,checkProperties:qg,checkResultErrors:i8,commify:Z$,computeAddress:Zo,computeHmac:od,computePublicKey:Xg,concat:At,deepCopy:si,defaultAbiCoder:In,defaultPath:cu,defineReadOnly:de,dnsEncode:h8,entropyToMnemonic:K1,fetchJson:$d,formatBytes32String:RR,formatEther:eM,formatUnits:Rt,getAccountPath:_$,getAddress:Ue,getContractAddress:Hg,getCreate2Address:CR,getIcapAddress:ER,getJsonWalletAddress:T$,getStatic:Ji,hashMessage:W1,hexConcat:Cn,hexDataLength:Ds,hexDataSlice:ir,hexStripZeros:t8,hexValue:Zi,hexZeroPad:Pt,hexlify:le,id:Ko,isAddress:o8,isBytes:Pa,isBytesLike:Ns,isHexString:We,isValidMnemonic:A$,isValidName:qR,joinSignature:Jv,keccak256:Te,mnemonicToEntropy:G1,mnemonicToSeed:_8,namehash:Bf,nameprep:NR,parseBytes32String:$R,parseEther:tM,parseTransaction:E8,parseUnits:da,poll:Yo,randomBytes:Is,recoverAddress:Dc,recoverPublicKey:x8,resolveProperties:It,ripemd160:S8,serializeTransaction:sy,sha256:ko,sha512:C$,shallowCopy:jt,shuffled:P8,solidityKeccak256:ea,solidityPack:Je,soliditySha256:Q$,splitSignature:nl,stripZeros:Rs,toUtf8Bytes:Ct,toUtf8CodePoints:H0,toUtf8String:cs,verifyMessage:R8,verifyTypedData:U$,zeroPad:Df},Symbol.toStringTag,{value:"Module"})),rM="3.7.6",vZ=rM,yZ=typeof atob=="function",gZ=typeof btoa=="function",Nd=typeof rl=="function",YS=typeof TextDecoder=="function"?new TextDecoder:void 0,QS=typeof TextEncoder=="function"?new TextEncoder:void 0,bZ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Uh=Array.prototype.slice.call(bZ),rm=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(Uh),xZ=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,nn=String.fromCharCode.bind(String),JS=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),nM=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),iM=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),sM=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+=Uh[e>>18&63]+Uh[e>>12&63]+Uh[e>>6&63]+Uh[e&63]}return o?s.slice(0,o-3)+"===".substring(o):s},M8=gZ?t=>btoa(t):Nd?t=>rl.from(t,"binary").toString("base64"):sM,Q5=Nd?t=>rl.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;ne?nM(Q5(t)):Q5(t),wZ=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?nn(192|e>>>6)+nn(128|e&63):nn(224|e>>>12&15)+nn(128|e>>>6&63)+nn(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return nn(240|e>>>18&7)+nn(128|e>>>12&63)+nn(128|e>>>6&63)+nn(128|e&63)}},EZ=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,oM=t=>t.replace(EZ,wZ),XS=Nd?t=>rl.from(t,"utf8").toString("base64"):QS?t=>Q5(QS.encode(t)):t=>M8(oM(t)),Uf=(t,e=!1)=>e?nM(XS(t)):XS(t),ZS=t=>Uf(t,!0),CZ=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,SZ=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 nn((r>>>10)+55296)+nn((r&1023)+56320);case 3:return nn((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return nn((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},aM=t=>t.replace(CZ,SZ),cM=t=>{if(t=t.replace(/\s+/g,""),!xZ.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?nn(e>>16&255,e>>8&255):nn(e>>16&255,e>>8&255,e&255);return r},N8=yZ?t=>atob(iM(t)):Nd?t=>rl.from(t,"base64").toString("binary"):cM,lM=Nd?t=>JS(rl.from(t,"base64")):t=>JS(N8(t).split("").map(e=>e.charCodeAt(0))),uM=t=>lM(fM(t)),kZ=Nd?t=>rl.from(t,"base64").toString("utf8"):YS?t=>YS.decode(lM(t)):t=>aM(N8(t)),fM=t=>iM(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),J5=t=>kZ(fM(t)),AZ=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)},dM=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),hM=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,dM(r));t("fromBase64",function(){return J5(this)}),t("toBase64",function(e){return Uf(this,e)}),t("toBase64URI",function(){return Uf(this,!0)}),t("toBase64URL",function(){return Uf(this,!0)}),t("toUint8Array",function(){return uM(this)})},pM=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,dM(r));t("toBase64",function(e){return tv(this,e)}),t("toBase64URI",function(){return tv(this,!0)}),t("toBase64URL",function(){return tv(this,!0)})},_Z=()=>{hM(),pM()},lu={version:rM,VERSION:vZ,atob:N8,atobPolyfill:cM,btoa:M8,btoaPolyfill:sM,fromBase64:J5,toBase64:Uf,encode:Uf,encodeURI:ZS,encodeURL:ZS,utob:oM,btou:aM,decode:J5,isValid:AZ,fromUint8Array:tv,toUint8Array:uM,extendString:hM,extendUint8Array:pM,extendBuiltins:_Z};var X5=function(){return X5=Object.assign||function(e){for(var r,n=1,i=arguments.length;n0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[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}(),IZ=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}},TZ=function(t,e,r){return Tl(void 0,void 0,void 0,function(){var n,i;return Ol(this,function(s){return n=r.messageDigest(),i=R8(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}]})})},OZ=function(t,e,r){return Tl(void 0,void 0,void 0,function(){var n,i,s,o,a;return Ol(this,function(c){switch(c.label){case 0:return!t||t===void 0?[2,{isValid:!1}]:(n=r.messageDigest(),[4,t.getCode(r.address)]);case 1:if(i=c.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 Rd(r.address,s,t),[4,o.isValidSignature(n,fe(r.signature))];case 2:return a=c.sent(),a===RZ?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},RZ="0x1626ba7e",mM="1",Z5="eth",$Z={name:"ETHAuth",version:mM},Q0=function(){function t(){for(var e=[],r=0;r0&&(c+="."+i.extra),[2,c]}})})},this.decodeProof=function(i,s){return s===void 0&&(s=!1),Tl(n,void 0,void 0,function(){var o,a,c,l,u,f,d,h,p,m;return Ol(this,function(v){switch(v.label){case 0:if(o=i.split("."),o.length<4||o.length>5)throw new Error("ethauth: invalid proof string");if(a=o[0],c=o[1],l=o[2],u=o[3],f=o[4],a!==Z5)throw new Error("ethauth: not an ethauth proof");return d=lu.decode(l),h=JSON.parse(d),p=new ib({address:c,claims:h,signature:u,extra:f}),[4,this.validateProof(p,s)];case 1:if(m=v.sent(),!m)throw new Error("ethauth: proof is invalid");return[2,p]}})})},this.validateProof=function(i,s){return s===void 0&&(s=!1),Tl(n,void 0,void 0,function(){var o,a;return Ol(this,function(c){switch(c.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=c.sent(),a!==!0)throw new Error("ethauth: proof signature is invalid");c.label=2;case 2:return[2,!0]}})})},this.validateProofSignature=function(i){return Tl(n,void 0,void 0,function(){var s,c,o,a,c;return Ol(this,function(l){switch(l.label){case 0:s=[],c=0,l.label=1;case 1:if(!(clu.encode(t,!0),D8=t=>lu.encode(JSON.stringify(t),!0),NZ=t=>{if(t!=null)return lu.decode(t)},L8=t=>{if(t!=null)return JSON.parse(lu.decode(t))};function vM(t){return t!=null&&(te.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||We(t)||typeof t=="bigint"||Pa(t))}const j8=t=>fe(Te(typeof t=="string"?Ct(t):t)),yM=(t,e,r)=>Je(["string","uint256","address","bytes32"],["",e,t,r]),e6=(t,e,r)=>Te(yM(t,e,r)),gM=()=>typeof window>"u"&&typeof sn=="object",DZ=()=>!gM(),bM=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(lu.decode(e[1]))};function fy(){return fy=Object.assign?Object.assign.bind():function(t){for(var e=1;eCe.configure(t),J0=(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 jZ=class{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...i){e=`${e}:${Te(Ct(JSON.stringify(i,BZ)))}`;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 BZ(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function B8(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 FZ(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function UZ(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 F8=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),wM=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},EM=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},CM=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},zZ=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),SM=t=>{const e=fy({},t.types);return delete e.EIP712Domain,Pr.hash(t.domain,e,t.message)},Y1=t=>fe(SM(t)),{defineReadOnly:qZ,getStatic:WZ,resolveProperties:HZ,checkProperties:VZ,shallowCopy:GZ,deepCopy:KZ}=mZ,YZ=t=>t.replace(/([^:]\/)\/+/g,"$1"),QZ=Object.freeze(Object.defineProperty({__proto__:null,Logger:xM,PromiseCache:jZ,base64Decode:NZ,base64DecodeObject:L8,base64Encode:MZ,base64EncodeObject:D8,checkProperties:VZ,configureLogger:LZ,deepCopy:KZ,defineReadOnly:qZ,encodeMessageDigest:j8,encodeTypedDataDigest:Y1,encodeTypedDataHash:SM,getEthersConnectionInfo:J0,getRandomInt:F8,getStatic:WZ,isBigNumberish:vM,isBrowser:DZ,isNode:gM,jwtDecodeClaims:bM,logger:Ce,packMessageData:yM,promisify:B8,queryStringFromObject:FZ,queryStringToObject:UZ,resolveProperties:HZ,sanitizeAlphanumeric:EM,sanitizeHost:CM,sanitizeNumberString:wM,shallowCopy:GZ,sleep:zZ,subDigestOf:e6,urlClean:YZ},Symbol.toStringTag,{value:"Module"}));function gt(){return gt=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:te.from(t).toNumber(),XZ=t=>{if(t)return kM(t)},AM=(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(l=>l.chainId).sort(),s=i.filter((l,u)=>i.indexOf(l)!==u);if(s.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${s}`);return!1}n.forEach(l=>l.name=l.name.toLowerCase());const o=n.map(l=>l.name).sort(),a=o.filter((l,u)=>o.indexOf(l)!==u);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let c=!1;for(let l=0;l(AM(t,!0,e),t),ZZ=(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},eee=(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)}},PM=t=>_M(IM(t)),$s=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=te.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(te.isBigNumber(e)){const r=e.toNumber();return t.find(n=>n.chainId===r)}else return}},tee=(t,e)=>t?t.name===e||t.chainId===e:!1,ree=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},sb=(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})):"",U8=t=>sb("https://${network}-indexer.sequence.app",{network:t}),TM=t=>sb("https://${network}-relayer.sequence.app",{network:t}),OM=t=>sb("https://nodes.sequence.app/${network}",{network:t});function z8(t){return $s(ad,t)}function RM(t){return te.isBigNumber(t)?t:vM(t)?te.from(t):te.from(t.chainId)}const Ot=t=>{const e=OM(t);return{rpcUrl:e,relayer:{url:TM(t),provider:{url:e}},indexerUrl:U8(t)}},ad=PM([gt({},ht[ue.POLYGON],Ot("polygon"),{isDefaultChain:!0,isAuthChain:!0}),gt({},ht[ue.MAINNET],Ot("mainnet")),gt({},ht[ue.BSC],Ot("bsc")),gt({},ht[ue.AVALANCHE],Ot("avalanche")),gt({},ht[ue.ARBITRUM],Ot("arbitrum")),gt({},ht[ue.ARBITRUM_NOVA],Ot("arbitrum-nova")),gt({},ht[ue.OPTIMISM],Ot("optimism")),gt({},ht[ue.OPTIMISM_SEPOLIA],Ot("optimism-sepolia")),gt({},ht[ue.POLYGON_ZKEVM],Ot("polygon-zkevm")),gt({},ht[ue.GNOSIS],Ot("gnosis")),gt({},ht[ue.RINKEBY],Ot("rinkeby"),{disabled:!0}),gt({},ht[ue.GOERLI],Ot("goerli"),{disabled:!0}),gt({},ht[ue.SEPOLIA],Ot("sepolia")),gt({},ht[ue.POLYGON_MUMBAI],Ot("mumbai"),{disabled:!0}),gt({},ht[ue.POLYGON_AMOY],Ot("amoy")),gt({},ht[ue.BSC_TESTNET],Ot("bsc-testnet")),gt({},ht[ue.ARBITRUM_SEPOLIA],Ot("arbitrum-sepolia")),gt({},ht[ue.BASE],Ot("base")),gt({},ht[ue.BASE_SEPOLIA],Ot("base-sepolia")),gt({},ht[ue.HOMEVERSE],Ot("homeverse")),gt({},ht[ue.HOMEVERSE_TESTNET],Ot("homeverse-testnet")),gt({},ht[ue.XAI],Ot("xai")),gt({},ht[ue.XAI_SEPOLIA],Ot("xai-sepolia")),gt({},ht[ue.AVALANCHE_TESTNET],Ot("avalanche-testnet")),gt({},ht[ue.ASTAR_ZKEVM],Ot("astar-zkevm")),gt({},ht[ue.ASTAR_ZKYOTO],Ot("astar-zkyoto")),gt({},ht[ue.XR_SEPOLIA],Ot("xr-sepolia")),gt({},ht[ue.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),gt({},ht[ue.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),cd="2.0";class q8{constructor(e,r){this.sender=void 0,this.handler=void 0,this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=$M(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(i){r(i,void 0)}}}const $M=(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 MM(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 NM(t){return t!==void 0&&t.sendAsync!==void 0}let nee=0;class dy{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,MM(e)?this.send=e.send.bind(e):NM(e)?this.send=(n,i,s)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:cd,id:++nee,method:n,params:i},(c,l)=>{c?a(c):o(l?l.result:void 0)},s||this.defaultChainId)}):this.send=e,this.request=(n,i)=>this.send(n.method,n.params,i)}}class iee{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 see{constructor(e){this.sendAsyncMiddleware=void 0,this.isAllowedFunc=void 0,e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.sendAsyncMiddleware=t6(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.sendAsyncMiddleware=t6(this.isAllowedFunc)}}const t6=t=>e=>(r,n,i)=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");e(r,n,i)};class W8{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,c)=>{if((this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method))&&a&&a.result&&this.shouldCacheResponse(n,a)){const l=this.cacheKey(n.method,n.params,c||this.defaultChainId);this.cachableJsonRpcMethods.includes(n.method)?this.setCacheValue(l,a.result):this.setCacheByBlockValue(l,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 DM{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:le(this.options.chainId)});return}break;case"eth_accounts":if(this.options.accountAddress){i(void 0,{jsonrpc:"2.0",id:o,result:[Ue(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 LM=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)},jM=t=>(e,r,n)=>{const i=n?` chainId:${n}`:"";Ce.info(`[provider request]${i} id:${e.id} method:${e.method} params:`,e.params),t(e,(s,o)=>{s?Ce.warn(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"error:",s):Ce.info(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"response:",o),r(s,o)},n)},oee=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:le(s)});return}e(r,n,i)},BM=["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 aee{constructor(e){this.provider=void 0,this.sendAsyncMiddleware=r=>(n,i,s)=>{if(BM.includes(n.method)){this.provider.sendAsync(n,i,s);return}r(n,i,s)},this.provider=e}}class cee{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...BM],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}Ce.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 fa(e))}}class FM{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,c)=>{n(o,a);for(let l=0;l{let i="";return n?i=`${n}:${e}:`:i=`:${e}:`,!r||r.length===0?i+"[]":i+JSON.stringify(r)},this.inflight={}}}class lee extends fa{constructor(e,r){super(e,r==null?void 0:r.chainId),this._chainId=void 0,this._sender=void 0,this.send=(a,c)=>this._sender.send(a,c),this.fetch=(a,c)=>{const l={method:a,params:c,id:this._nextId++,jsonrpc:"2.0"};return $d(this.connection,JSON.stringify(l),uee).then(f=>f,f=>{throw f})};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 q8(i??[new DM({chainId:n}),new FM,new W8({defaultChainId:n,blockCache:s})],new dy(this.fetch,n));this._sender=new dy(o,n)}async getNetwork(){const e=this._chainId;if(e){const r=ht[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=te.from(r).toNumber(),this.getNetwork()}}}function uee(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 fee=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:see,CachedProvider:W8,ChainId:ue,EagerProvider:DM,JsonRpcExternalProvider:iee,JsonRpcProvider:lee,JsonRpcRouter:q8,JsonRpcSender:dy,JsonRpcVersion:cd,NetworkType:ut,PublicProvider:cee,SigningProvider:aee,SingleflightMiddleware:FM,allNetworks:ad,allowProviderMiddleware:t6,checkNetworkConfig:tee,createJsonRpcMiddlewareStack:$M,ensureUniqueNetworks:ZZ,ensureValidNetworks:_M,exceptionProviderMiddleware:LM,findNetworkConfig:$s,findSupportedNetwork:z8,getChainId:kM,indexerURL:U8,isJsonRpcHandler:NM,isJsonRpcProvider:MM,isNetworkConfig:JZ,isValidNetworkConfig:AM,loggingProviderMiddleware:jM,maybeChainId:XZ,networkProviderMiddleware:oee,networks:ht,networksIndex:ree,nodesURL:OM,relayerURL:TM,sortNetworks:IM,stringTemplate:sb,toChainIdNumber:RM,updateNetworkConfig:eee,validateAndSortNetworks:PM},Symbol.toStringTag,{value:"Module"}));function cn(){return cn=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(V8(i))return Je(["uint8","uint8","address"],[Hl.Address,i.weight,i.address]);if(i.isDynamic){const s=fe(i.signature);return Je(["uint8","uint8","address","uint16","bytes"],[Hl.DynamicSignature,i.weight,i.address,s.length,s])}return Je(["uint8","uint8","bytes"],[Hl.EOASignature,i.weight,i.signature])});return Je(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function VM(t,e,r){const n=Q1(e),i=await Promise.all(t.signers.map(async s=>{if(V8(s))return s;if(s.isDynamic){if(!s.address)throw new Error("Dynamic signature part must have address");if(!H8(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:J1(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 i0(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let i=te.from(0);const s=t.signers.map(a=>{if(!e.has(a.address))return a;const c=e.get(a.address),l=fe(c.signature);return i=i.add(a.weight),c.isDynamic||l.length!==66?cn({},a,{isDynamic:!0,signature:c.signature,address:a.address}):cn({},a,{isDynamic:!1,signature:c.signature})});return{encoded:G8({version:1,threshold:t.threshold,signers:s}),weight:i}}const K8={decode:t=>HM(t),encode:t=>G8(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>VM(t,e,r),encodeSigners:(t,e,r,n)=>i0(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=K8.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 xee=Object.freeze({__proto__:null,SignaturePartType:Hl,isAddressMember:V8,isUnrecoveredSignatureMember:qM,isUnrecoveredSignature:WM,decodeSignature:HM,encodeSignature:G8,recoverSignature:VM,encodeSigners:i0,SignatureCoder:K8});const Y8={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>Te(In.encode(["bytes32","uint8","address"],[e,r.weight,r.address])),Je(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>te.from(0),signersOf:t=>t.signers.map(e=>({address:e.address,weight:te.from(e.weight).toNumber()})),fromSimple:t=>{if(!lr.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 Sr([...Zr.mainModule.abi,...Zr.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"),[Y8.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:te.from(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:te.from(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:te.from(n.weight),address:n.address}));return{version:e.version,threshold:te.from(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&!lr.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}=i0(t,r,[]);if(a.gte(t.threshold))return o}const n=t.signers;for(const{address:i}of n.sort(({weight:s},{weight:o})=>te.from(s).sub(o).toNumber())){r.set(i,{signature:"0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02",isDynamic:!1});const{encoded:o,weight:a}=i0(t,r,[]);if(a.gte(t.threshold))return o}return i0(t,r,[]).encoded}};var wee=Object.freeze({__proto__:null,ConfigCoder:Y8});const GM=1,KM={version:GM,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Wo=Object.freeze({__proto__:null,config:wee,signature:xee,version:GM,DeployedWalletContext:KM});const Q8="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function YM(t){return Te(QM(t))}function QM(t){return Je(["bytes32","bytes32"],[Q8,t])}function JM(t){const e=fe(t);if(e.length===64&&le(e.slice(0,32))===Q8)return le(e.slice(32,64))}function Eee(t){return JM(t)!==void 0}var Cee=Object.freeze({__proto__:null,SetImageHashPrefix:Q8,hashSetImageHash:YM,messageSetImageHash:QM,decodeMessageSetImageHash:JM,isMessageSetImageHash:Eee});let Jr=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),xr=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 hy=66;function uu(t){return t.left!==void 0&&t.right!==void 0}function Dd(t){return t.tree!==void 0}function X1(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function py(t){let e=fe(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 xr.Signature:{const s=e[0],o=le(e.slice(1,hy+1));r=n(r,{signature:o,weight:s,unrecovered:!0,isDynamic:!1}),e=e.slice(hy+1)}break;case xr.Address:{const s=e[0],o=Ue(le(e.slice(1,21)));r=n(r,{address:o,weight:s}),e=e.slice(21)}break;case xr.DynamicSignature:{const s=e[0],o=Ue(le(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],c=le(e.slice(24,24+a));r=n(r,{address:o,signature:c,weight:s,unrecovered:!0,isDynamic:!0}),e=e.slice(24+a)}break;case xr.Node:{const s=le(e.slice(0,32));r=n(r,{nodeHash:s}),e=e.slice(32)}break;case xr.Branch:{const s=e[0]<<16|e[1]<<8|e[2],o=py(e.slice(3,3+s));r=n(r,o),e=e.slice(3+s)}break;case xr.Subdigest:{const s=le(e.slice(0,32));r=n(r,{subdigest:s}),e=e.slice(32)}break;case xr.Nested:{const s=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],c=py(e.slice(6,6+a));r=n(r,{weight:s,threshold:o,tree:c}),e=e.slice(6+a)}break;default:throw new Error(`Unknown signature part type: ${i}: ${le(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class XM extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function Vl(t,e,r){if(uu(t)){const[n,i]=await Promise.all([Vl(t.left,e,r),Vl(t.right,e,r)]);return{left:n,right:i}}if(Dd(t))return{weight:t.weight,threshold:t.threshold,tree:await Vl(t.tree,e,r)};if(X1(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await H8(t.address,e,t.signature,r))throw new XM(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:J1(e,t.signature),signature:t.signature,subdigest:e};return t}const gn={concat:(t,e)=>Je(["bytes","bytes"],[t,e]),node:t=>Je(["uint8","bytes32"],[xr.Node,t]),branch:t=>{const e=fe(t);return Je(["uint8","uint24","bytes"],[xr.Branch,e.length,e])},nested:(t,e,r)=>{const n=fe(r);return Je(["uint8","uint8","uint16","uint24","bytes"],[xr.Nested,t,e,n.length,n])},subdigest:t=>Je(["uint8","bytes32"],[xr.Subdigest,t]),signature:(t,e)=>Je(["uint8","uint8","bytes"],[xr.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=fe(r);return Je(["uint8","uint8","address","uint24","bytes"],[xr.DynamicSignature,t,e,n.length,n])},address:(t,e)=>Je(["uint8","uint8","address"],[xr.Address,t,e])};function s0(t,e,r,n,i={}){const s=o0(t.tree,e,r,i);return te.from(n).isZero()?{encoded:Je(["uint8","uint16","uint32","bytes"],[Jr.NoChainIdDynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:te.from(t.threshold).gt(255)?{encoded:Je(["uint8","uint16","uint32","bytes"],[Jr.Dynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:{encoded:Je(["uint8","uint8","uint32","bytes"],[Jr.Legacy,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}}function o0(t,e,r,n={}){const i=!n.disableTrim;if(Bs(t)){const s=o0(t.left,e,r),o=o0(t.right,e,r),a=zn(t.left),c=zn(t.right);return i&&s.weight.eq(0)&&o.weight.eq(0)&&!a&&!c?{encoded:gn.node(Gi(t)),weight:lr}:i&&o.weight.eq(0)&&!c?{encoded:gn.concat(s.encoded,gn.node(Gi(t.right))),weight:s.weight}:i&&s.weight.eq(0)&&!a?{encoded:gn.concat(gn.node(Gi(t.left)),gn.branch(o.encoded)),weight:o.weight}:{encoded:gn.concat(s.encoded,gn.branch(o.encoded)),weight:s.weight.add(o.weight)}}if($a(t)){const s=o0(t.tree,e,r);return i&&s.weight.eq(0)?{encoded:gn.node(Gi(t)),weight:lr}:{encoded:gn.nested(t.weight,t.threshold,s.encoded),weight:s.weight}}if(Ma(t))return{encoded:gn.node(Gi(t)),weight:lr};if(Ra(t)){const s=r.includes(t.subdigest);return{encoded:gn.subdigest(t.subdigest),weight:s?PR:lr}}if(zn(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:gn.dynamicSignature(t.weight,t.address,a),weight:te.from(t.weight)}:{encoded:gn.signature(t.weight,a),weight:te.from(t.weight)}}else return{encoded:gn.address(t.weight,t.address),weight:lr};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function J8(t){return Z8(t)?J8(t.suffix[t.suffix.length-1]):t.config}function X8(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function Z1(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(X8)}function ZM(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function Z8(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(ZM)}function ob(t){const e=fe(t),r=e[0];switch(r){case Jr.Legacy:return{version:2,type:Jr.Legacy,decoded:rv(e)};case Jr.Dynamic:return{version:2,type:Jr.Dynamic,decoded:rv(e.slice(1))};case Jr.NoChainIdDynamic:return{version:2,type:Jr.NoChainIdDynamic,decoded:rv(e.slice(1))};case Jr.Chained:return eN(e);default:throw new Error(`Invalid signature type: ${r}`)}}function rv(t){const e=fe(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],i=py(e.slice(6));return{threshold:r,checkpoint:n,tree:i}}function eN(t){const e=fe(t),r=e[0];if(r!==Jr.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let i=1;for(;ife(kc(s))),i=Je(n.map(()=>["uint24","bytes"]).flat(),n.map(s=>[s.length,s]).flat());return Je(["uint8","bytes"],[Jr.Chained,i])}function kc(t){if(Ns(t))return le(t);if(Z1(t)||Z8(t))return ab(kc(t),(t.suffix||[]).map(kc));const e=X8(t)?t.decoded:t.config;switch(t.type){case Jr.Legacy:if(te.from(e.threshold).gt(255))throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return r6(e);case Jr.NoChainIdDynamic:case Jr.Dynamic:return Je(["uint8","bytes"],[t.type,r6(e)]);case Jr.Chained:throw new Error("Unreachable code: Chained signature should be handled above");default:throw new Error(`Invalid signature type: ${t.type}`)}}function r6(t){return Je(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,a0(t.tree)])}function a0(t){if(Bs(t)||uu(t)){const e=fe(a0(t.right)),r=fe(a0(t.left));return Bs(t.right)||uu(t.right)?Je(["bytes","uint8","uint24","bytes"],[r,xr.Branch,e.length,e]):Je(["bytes","bytes"],[r,e])}if($a(t)||Dd(t)){const e=fe(a0(t.tree));return Je(["uint8","uint8","uint16","uint24","bytes"],[xr.Nested,t.weight,t.threshold,e.length,e])}if(X1(t)||zn(t)&&t.signature!==void 0){const e=fe(t.signature);if(t.isDynamic||e.length!==hy){if(!t.address)throw new Error("Dynamic signature leaf must have address");return Je(["uint8","uint8","address","uint24","bytes"],[xr.DynamicSignature,t.weight,t.address,e.length,e])}else return Je(["uint8","uint8","bytes"],[xr.Signature,t.weight,e])}if(zn(t))return Je(["uint8","uint8","address"],[xr.Address,t.weight,t.address]);if(Ma(t))return Je(["uint8","bytes32"],[xr.Node,t.nodeHash]);if(Ra(t))return Je(["uint8","bytes32"],[xr.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function c0(t){return Bs(t)?[...c0(t.left),...c0(t.right)]:$a(t)?c0(t.tree):zn(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function l0(t){return uu(t)?[...l0(t.left),...l0(t.right)]:Dd(t)?l0(t.tree):X1(t)?[t.signature]:[]}function nv(t){return uu(t)?[...nv(t.left),...nv(t.right)]:Dd(t)?nv(t.tree):Ra(t)?[t.subdigest]:[]}async function my(t){const e=typeof t=="string"?ob(t):t;if(Z1(e)){const n=await Promise.all([my(cn({},e,{suffix:void 0})),...e.suffix.map(i=>my(i))]);return ab(n[0],n.slice(1))}const{trimmed:r}=await u0(e.decoded.tree);return kc(cn({},e,{decoded:cn({},e.decoded,{tree:r})}))}async function u0(t,e=!0){if(uu(t)){const[r,n]=await Promise.all([u0(t.left),u0(t.right)]);if(r.weight===0&&n.weight===0)try{const i=await Vl(t,ey,void 0);return{weight:0,trimmed:{nodeHash:Gi(i)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(Dd(t)){const r=await u0(t.tree);if(r.weight===0)try{const n=await Vl(t,ey,void 0);return{weight:0,trimmed:{nodeHash:Gi(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return Ma(t)&&iN(t.nodeHash)?{weight:0,trimmed:cn({},nN(t.nodeHash))}:X1(t)||zn(t)&&t.signature!==void 0?{weight:te.from(t.weight).toNumber(),trimmed:t}:!e&&Ra(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const cb={decode:t=>ob(t),encode:t=>kc(t),trim:t=>my(t),supportsNoChainId:!0,recover:(t,e,r)=>eC(t,e,r),encodeSigners:(t,e,r,n)=>s0(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=cb.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=Ns(t)?t:kc(t),i=r.map(s=>Ns(s)?s:kc(s));return ab(n,i)},hashSetImageHash:function(t){return YM(t)},signaturesOf(t){return c0(t.tree)},signaturesOfDecoded:function(t){return l0(t.decoded.tree)}};var See=Object.freeze({__proto__:null,SignatureType:Jr,SignaturePartType:xr,SignaturePartTypeLength:hy,isUnrecoveredNode:uu,isUnrecoveredNestedLeaf:Dd,isUnrecoveredSignatureLeaf:X1,decodeSignatureTree:py,InvalidSignatureLeafError:XM,recoverTopology:Vl,partEncoder:gn,encodeSigners:s0,encodeTree:o0,deepestConfigOfSignature:J8,isUnrecoveredSignature:X8,isUnrecoveredChainedSignature:Z1,isSignature:ZM,isChainedSignature:Z8,decodeSignature:ob,decodeSignatureBody:rv,decodeChainedSignature:eN,setImageHashStruct:tN,recoverSignature:eC,encodeChain:ab,encodeSignature:kc,encodeSignatureBody:r6,encodeSignatureTree:a0,signaturesOf:c0,signaturesOfDecoded:l0,subdigestsOfDecoded:nv,trimSignature:my,trimUnrecoveredTree:u0,SignatureCoder:cb});function zn(t){return t.address!==void 0&&t.weight!==void 0}function Ra(t){return t.subdigest!==void 0&&t.address===void 0}function f0(t){return Bs(t)?JSON.stringify({left:f0(t.left),right:f0(t.right)}):$a(t)?JSON.stringify({weight:te.from(t.weight).toString(),threshold:te.from(t.threshold).toString(),tree:f0(t.tree)}):zn(t)?JSON.stringify({address:t.address,weight:te.from(t.weight).toString()}):JSON.stringify(t)}function d0(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:d0(e.left),right:d0(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:te.from(e.weight),threshold:te.from(e.threshold),tree:d0(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:te.from(e.weight)}:e}function $a(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function Ma(t){return t.nodeHash!==void 0}function tC(t){return zn(t)||Ra(t)||$a(t)||Ma(t)}function Bs(t){return t.left!==void 0&&t.right!==void 0}function kee(t){return Bs(t)||tC(t)}function rN(t){return Je(["uint96","address"],[t.weight,t.address])}function nN(t){const e=fe(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=te.from(e.slice(0,12)),n=Ue(le(e.slice(12)));return{weight:r,address:n}}function iN(t){const e=fe(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function Gi(t){if(zn(t))return rN(t);if(Ra(t))return ea(["string","bytes32"],[`Sequence static digest: -`,t.subdigest]);if($a(t)){const e=Gi(t.tree);return ea(["string","bytes32","uint256","uint256"],[`Sequence nested config: -`,e,t.threshold,t.weight])}return Ma(t)?t.nodeHash:ea(["bytes32","bytes32"],[Gi(t.left),Gi(t.right)])}function Aee(t){const e=[];let r=t;for(;!tC(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function _ee(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function rC(t){return ea(["bytes32","uint256"],[ea(["bytes32","uint256"],[Gi(t.tree),t.threshold]),t.checkpoint])}function sN(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function zf(t){return zn(t)||Ra(t)?[t]:$a(t)?[{threshold:t.threshold,weight:t.weight,members:zf(t.tree)}]:Ma(t)?[]:[...zf(t.left),...zf(t.right)]}function n6(t){return Ma(t)?!0:Bs(t)?n6(t.left)||n6(t.right):!1}function Pee(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:zf(t.tree)}}const oN=(t,e)=>t.map(r=>sN(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function nC(t){if(t.length===0)throw new Error("Empty members array");return oN(t,nC).reduce((r,n)=>({left:r,right:n}))}function iC(t){if(t.length===0)throw new Error("Empty members array");const e=oN(t,iC);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 sC(t){return t.length>8?iC(t):nC(t)}function aN(t,e=sC){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function vy(t,e){return Ra(t)?t.subdigest===e:Bs(t)?vy(t.left,e)||vy(t.right,e):!1}function i6(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();$a(n)?e.push(n.tree):Bs(n)?(e.push(n.left),e.push(n.right)):zn(n)&&r.add({address:n.address,weight:te.from(n.weight).toNumber()})}return Array.from(r)}function yy(t){return Bs(t)?yy(t.left)&&yy(t.right):!Ma(t)}const lb={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>rC(t),hasSubdigest:(t,e)=>vy(t.tree,e),checkpointOf:t=>te.from(t.checkpoint),signersOf:t=>i6(t.tree),fromSimple:t=>{var e;return aN(cn({},t,{members:[...t.signers,...((e=t.subdigests)!=null?e:[]).map(r=>({subdigest:r}))]}))},isComplete:t=>yy(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new Sr(Zr.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[lb.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,i;const s=new Sr(Zr.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(!lr.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(!lr.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:te.from(t.threshold).toString(),checkpoint:te.from(t.checkpoint).toString(),tree:f0(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:te.from(e.threshold),checkpoint:te.from(e.checkpoint),tree:d0(e.tree)}},editConfig:function(t,e){var r,n;const i=zf(t.tree);if(e.add)for(const s of e.add)i.find(o=>zn(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=>zn(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:sC(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}=s0(t,r,[],0);if(a.gte(t.threshold))return o}const n=i6(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}=s0(t,r,[],0);if(a.gte(t.threshold))return o}return s0(t,r,[],0).encoded}};var Iee=Object.freeze({__proto__:null,isSignerLeaf:zn,isSubdigestLeaf:Ra,topologyToJSON:f0,topologyFromJSON:d0,isNestedLeaf:$a,isNodeLeaf:Ma,isLeaf:tC,isNode:Bs,isTopology:kee,encodeSignerLeaf:rN,decodeSignerLeaf:nN,isEncodedSignerLeaf:iN,hashNode:Gi,leftFace:Aee,isWalletConfig:_ee,imageHash:rC,isSimpleNestedMember:sN,topologyToMembers:zf,hasUnknownNodes:n6,toSimpleWalletConfig:Pee,legacyTopologyBuilder:nC,merkleTopologyBuilder:iC,optimized2SignersTopologyBuilder:sC,toWalletConfig:aN,hasSubdigest:vy,signersOf:i6,isComplete:yy,ConfigCoder:lb}),Tee=Object.freeze({__proto__:null});const Oee={config:lb,signature:cb},cN=2,lN={version:cN,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var rt=Object.freeze({__proto__:null,config:Iee,signature:See,context:Tee,chained:Cee,coders:Oee,version:cN,DeployedWalletContext:lN});function s6(t,e){const r=Te(Je(["bytes","bytes32"],[t.walletCreationCode,Pt(t.mainModule,32)])),n=Te(Je(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return Ue(ir(n,12))}async function Ree(t,e,r,n,i,s){return(await Promise.all(wN.map(async a=>{try{const c=a.signature.SignatureCoder.decode(le(r)),l=await a.signature.SignatureCoder.recover(c,{address:t,digest:le(e),chainId:n},i),u=a.config.ConfigCoder.imageHashOf(l.config);if(s6(s[a.version],u).toLowerCase()===t.toLowerCase())return!0;const d=await a.signature.SignatureCoder.recover(c,{address:t,digest:le(e),chainId:n},i),h=a.config.ConfigCoder.imageHashOf(d.config);return s6(s[a.version],h).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function $ee(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 Mee(t){const e=Object.keys(t).length;return t[e]}const Nee={1:KM,2:lN};var Dee=Object.freeze({__proto__:null,addressOf:s6,isValidCounterfactual:Ree,isValidVersionedContext:$ee,latestContext:Mee,defaultContexts:Nee});const ub=`tuple( - bool delegateCall, - bool revertOnError, - uint256 gasLimit, - address target, - uint256 value, - bytes data -)[]`;function Lee(t,e,r,n){return cn({},t,{chainId:r,intent:{id:n,wallet:e}})}function jee(t){return Te(In.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function Bee(t){const e=In.decode(["uint256",ub],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function uN(t,e){return In.encode(["uint256",ub],[t,X0(e)])}function fN(t,e){return Te(uN(t,e))}function Fee(t,e,r,n){return Q1({address:t,chainId:e,digest:fN(r,n)})}function Uee(t,e,r){return Q1({address:t,chainId:e,digest:Te(In.encode(["string",ub],["guest:",X0(r)]))})}function dN(t,e){return e.map(r=>oC(t,r))}function oC(t,e){if(e.to&&e.to!==$t)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 Sr(Zr.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 fb(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function hN(t){return t.every(fb)}function X0(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:e.gasLimit!==void 0?e.gasLimit:lr,target:(r=e.to)!=null?r:$t,value:e.value!==void 0?e.value:lr,data:e.data!==void 0?e.data:[]}})}function zee(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function qee(t,e){const r=te.from(t),n=te.from(e),i=_R.pow(te.from(96));if(!n.div(i).eq(lr))throw new Error("Space already encoded");return n.add(r.mul(i))}function Wee(t){const e=te.from(t),r=_R.pow(te.from(96));return[e.div(r),e.mod(r)]}function Hee(t,e){return Array.isArray(e)?hN(e)?e:dN(t,e).map(n=>n.transaction):fb(e)?[e]:[oC(t,e).transaction]}function pN(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&&fb(r),!0)}function mN(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&pN(t)}function Vee(t){const e=new Sr(Zr.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),mN(t)?[X0(t.transactions),t.nonce,t.signature]:[X0(t.transactions),0,[]])}const vN="0x61c2926c",yN=`tuple( - bool delegateCall, - bool revertOnError, - uint256 gasLimit, - address target, - uint256 value, - bytes data -)[]`,o6=(t,e)=>{const r=[],n=new Sr(Zr.mainModule.abi);for(const i of e){const s=fe(i.data||"0x");if(i.to===t&&le(s.slice(0,4))===vN){const o=s.slice(4),a=In.decode([yN],o)[0];r.push(...o6(i.to,a.map(c=>cn({},c,{to:c.target}))))}else try{const o=n.decodeFunctionData("execute",s)[0],a=o6(t,o.map(c=>cn({},c,{to:c.target})));r.push(...a)}catch{r.push(i)}}return r};var Gee=Object.freeze({__proto__:null,MetaTransactionsType:ub,intendTransactionBundle:Lee,intendedTransactionID:jee,unpackMetaTransactionsData:Bee,packMetaTransactionsData:uN,digestOfTransactions:fN,subdigestOfTransactions:Fee,subdigestOfGuestModuleTransactions:Uee,toSequenceTransactions:dN,toSequenceTransaction:oC,isSequenceTransaction:fb,hasSequenceTransactions:hN,sequenceTxAbiEncode:X0,fromTxAbiEncode:zee,encodeNonce:qee,decodeNonce:Wee,fromTransactionish:Hee,isTransactionBundle:pN,isSignedTransactionBundle:mN,encodeBundleExecData:Vee,selfExecuteSelector:vN,selfExecuteAbi:yN,unwind:o6});const gN="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",Kee="0x6492649264926492649264926492649264926492649264926492649264926492";async function bN(t,e,r,n){return await t.call({data:At([gN,new Vg().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}var Yee=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:gN,EIP_6492_SUFFIX:Kee,validateEIP6492Offchain:bN});class Qee{constructor(e){this.provider=e,this.isDeployedCache=new Set}module(e){return new Rd(e,[...Zr.mainModuleUpgradable.abi,...Zr.mainModule.abi,...Zr.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(i=>fe(i))).length!==0;return n&&this.isDeployedCache.add(e),n}async implementation(e){const r=In.encode(["address"],[e]),n=await this.provider.getStorageAt(e,r).then(i=>fe(i));if(n.length===20)return Ue(le(n));if(n.length===32)return In.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 bN(this.provider,e,r,n)}}var Jee=Object.freeze({__proto__:null,OnChainReader:Qee});function Xee(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var we=Object.freeze({__proto__:null,config:dee,signature:hee,context:Dee,signer:bee,EIP1271:vee,transaction:Gee,reader:Jee,EIP6492:Yee,isWalletSignRequestMetadata:Xee});const a6=[{config:Y8,signature:K8},{config:lb,signature:cb}];function xN(t){const e=t-1;if(e<0||e>=a6.length)throw new Error(`No coder for version: ${t}`);return a6[e]}function Zee(t){return xN(t)}var on=Object.freeze({__proto__:null,ALL_CODERS:a6,coderFor:xN,genericCoderFor:Zee});const wN=[Wo,rt],ete=Object.freeze(Object.defineProperty({__proto__:null,allVersions:wN,commons:we,universal:on,v1:Wo,v2:rt},Symbol.toStringTag,{value:"Module"}));function tte(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 c=Object.values(this.contexts),l=[];for(let u=1;ufe(s).length===0))return ek;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:te.from(i).toNumber(),gasLimit:te.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 Rd(e,Zr.mainModule.abi,this.provider).readNonce(r,{blockTag:n});return we.transaction.encodeNonce(r,s)}async wait(e,r,n=this.waitPollRate,i=5){var s=this;typeof e!="string"&&(e=we.transaction.intendedTransactionID(e));let o=!1;const a=async function(u,f){let d=0;for(;!o;){try{return await u()}catch(h){if(d++,i!==void 0&&d>=i)throw Ce.error(`giving up after ${d} failed attempts${f?`: ${f}`:""}`,h),h;Ce.warn(`attempt #${d} failed${f?`: ${f}`:""}`,h)}n>0&&await new Promise(h=>setTimeout(h,n))}throw new Error(`timed out after ${d} failed attempts${f?`: ${f}`:""}`)},c=async function(){let u=s.fromBlockLog;if(u<0&&(u=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number")+u),typeof e!="string")throw new Error("impossible");const f=e.replace("0x","");for(;!o;){const d=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number"),h=await a(()=>s.provider.getLogs({fromBlock:Math.max(0,u-s.deltaBlocksLog),toBlock:d,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,u-s.deltaBlocksLog)} to ${d}`);u=d;const m=(await Promise.all(h.map(v=>a(()=>s.provider.getTransactionReceipt(v.transactionHash),`unable to get receipt for transaction ${v.transactionHash}`)))).find(v=>v.logs.find(y=>y.topics.length===0&&y.data.replace("0x","")===f||y.topics.length===1&&y.topics[0]==="0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7"&&y.data.length>=64&&y.data.replace("0x","").startsWith(f)));if(m)return Lc({receipt:m},await a(()=>s.provider.getTransaction(m.transactionHash),`unable to get transaction ${m.transactionHash}`));o||await new Promise(v=>setTimeout(v,n))}throw new Error(`Timeout waiting for transaction receipt ${e}`)};return r!==void 0?Promise.race([c(),new Promise((l,u)=>setTimeout(()=>{o=!0,u(`Timeout waiting for transaction receipt ${e}`)},r))]):c()}}function cte(t){return t.signer!==void 0&&Mc.isSigner(t.signer)}class lte extends AN{constructor(e){if(super(Mc.isSigner(e)?{provider:e.provider}:Lc({},e,{provider:e.signer.provider})),this.signer=void 0,this.txnOptions=void 0,this.signer=Mc.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&&Ce.warn("LocalRelayer doesn't accept fee quotes");const i=we.transaction.encodeBundleExecData(e),s=this.signer.sendTransaction(Lc({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 ute="v1",fte="v0.4.1",dte="13cf0e854e8127ae83218cc188ef0e7456241c96";let dc=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}({}),hte=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}({}),pte=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),mte=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class _N{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Relayer/",this.ping=n=>this.fetch(this.url("Ping"),St({},n)).then(i=>kt(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),St({},n)).then(i=>kt(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),St({},n)).then(i=>kt(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),St({},n)).then(i=>kt(i).then(s=>({data:s.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),St({},n)).then(i=>kt(i).then(s=>({chainID:s.chainID}))),this.sendMetaTxn=(n,i)=>this.fetch(this.url("SendMetaTxn"),St(n,i)).then(s=>kt(s).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,i)=>this.fetch(this.url("GetMetaTxnNonce"),St(n,i)).then(s=>kt(s).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,i)=>this.fetch(this.url("GetMetaTxnReceipt"),St(n,i)).then(s=>kt(s).then(o=>({receipt:o.receipt}))),this.simulate=(n,i)=>this.fetch(this.url("Simulate"),St(n,i)).then(s=>kt(s).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,i)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),St(n,i)).then(s=>kt(s).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),St({},n)).then(i=>kt(i).then(s=>({isFeeRequired:s.isFeeRequired,tokens:s.tokens}))),this.feeOptions=(n,i)=>this.fetch(this.url("FeeOptions"),St(n,i)).then(s=>kt(s).then(o=>({options:o.options,sponsored:o.sponsored,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,i)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),St(n,i)).then(s=>kt(s).then(o=>({options:o.options}))),this.getMetaTransactions=(n,i)=>this.fetch(this.url("GetMetaTransactions"),St(n,i)).then(s=>kt(s).then(o=>({page:o.page,transactions:o.transactions}))),this.sentTransactions=(n,i)=>this.fetch(this.url("SentTransactions"),St(n,i)).then(s=>kt(s).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,i)=>this.fetch(this.url("PendingTransactions"),St(n,i)).then(s=>kt(s).then(o=>({page:o.page,transactions:o.transactions}))),this.getGasTank=(n,i)=>this.fetch(this.url("GetGasTank"),St(n,i)).then(s=>kt(s).then(o=>({gasTank:o.gasTank}))),this.addGasTank=(n,i)=>this.fetch(this.url("AddGasTank"),St(n,i)).then(s=>kt(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.updateGasTank=(n,i)=>this.fetch(this.url("UpdateGasTank"),St(n,i)).then(s=>kt(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.getGasSponsor=(n,i)=>this.fetch(this.url("GetGasSponsor"),St(n,i)).then(s=>kt(s).then(o=>({gasSponsor:o.gasSponsor}))),this.listGasSponsors=(n,i)=>this.fetch(this.url("ListGasSponsors"),St(n,i)).then(s=>kt(s).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,i)=>this.fetch(this.url("AddGasSponsor"),St(n,i)).then(s=>kt(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,i)=>this.fetch(this.url("UpdateGasSponsor"),St(n,i)).then(s=>kt(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.removeGasSponsor=(n,i)=>this.fetch(this.url("RemoveGasSponsor"),St(n,i)).then(s=>kt(s).then(o=>({status:o.status}))),this.reportGasSponsorUsage=(n,i)=>this.fetch(this.url("ReportGasSponsorUsage"),St(n,i)).then(s=>kt(s).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.nextGasTankBalanceAdjustmentNonce=(n,i)=>this.fetch(this.url("NextGasTankBalanceAdjustmentNonce"),St(n,i)).then(s=>kt(s).then(o=>({nonce:o.nonce}))),this.adjustGasTankBalance=(n,i)=>this.fetch(this.url("AdjustGasTankBalance"),St(n,i)).then(s=>kt(s).then(o=>({status:o.status,adjustment:o.adjustment}))),this.getGasTankBalanceAdjustment=(n,i)=>this.fetch(this.url("GetGasTankBalanceAdjustment"),St(n,i)).then(s=>kt(s).then(o=>({adjustment:o.adjustment}))),this.listGasTankBalanceAdjustments=(n,i)=>this.fetch(this.url("ListGasTankBalanceAdjustments"),St(n,i)).then(s=>kt(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 St=(t={},e={})=>({method:"POST",headers:Lc({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),kt=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 ld=Object.freeze({__proto__:null,WebRPCVersion:ute,WebRPCSchemaVersion:fte,WebRPCSchemaHash:dte,ETHTxnStatus:dc,TransferType:hte,FeeTokenType:pte,SortOrder:mte,Relayer:_N});const vte=[dc.DROPPED,dc.SUCCEEDED,dc.PARTIALLY_FAILED,dc.FAILED],yte=[dc.DROPPED,dc.PARTIALLY_FAILED,dc.FAILED];function gte(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&Oa.isProvider(t.provider)}const bte=typeof Un=="object"?Un.fetch:window.fetch;class PN{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=Lc({},n.headers,i),bte(r,n)},this.service=new _N(e.url,this._fetch),Oa.isProvider(e.provider))this.provider=e.provider;else{const{jwtAuth:r,projectAccessKey:n}=this.options,i=J0(e.provider.url,n,r);this.provider=new ly(i)}}async waitReceipt(e,r=1e3,n=5,i){typeof e!="string"&&(e=we.transaction.intendedTransactionID(e)),Ce.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"&&vte.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=In.encode([we.transaction.MetaTransactionsType],[we.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(c=>c.symbol).join(", ");Ce.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${i}`);const s=await this.getNonce(e);if(!this.provider)throw Ce.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:we.transaction.encodeBundleExecData({entrypoint:e,transactions:r,nonce:s})});return Ce.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return Ce.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:le(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){Ce.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?te.from(r).toHexString():void 0,i=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),s=te.from(i.nonce),[o,a]=we.transaction.decodeNonce(s);return Ce.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),s}async relay(e,r,n=!0){var i=this;Ce.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:Ce.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw Ce.warn("[rpc-relayer/relay] provider not set, failed relay"),new Error("provider is not set");const o=we.transaction.encodeBundleExecData(e),a=await this.service.sendMetaTxn({call:{walletAddress:e.intent.wallet,contract:e.entrypoint,input:o},quote:s});if(Ce.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(a)}`),n)return this.wait(e.intent.id);{const c={hash:e.intent.id,confirmations:0,from:e.intent.wallet,wait:u=>Promise.reject(new Error("impossible"))},l=async function(f){var d;if(!i.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const h=await i.wait(e.intent.id),p=(d=h.receipt)==null?void 0:d.transactionHash;if(!p)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(c,h),i.provider.waitForTransaction(p,f)};return c.wait=l,c}}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((l,u)=>setTimeout(()=>{o=!0,u(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,i));if(!a.txnReceipt||yte.includes(a.status))throw new xte(a);const c=JSON.parse(a.txnReceipt);return{blockHash:c.blockHash,blockNumber:te.from(c.blockNumber).toNumber(),confirmations:1,from:typeof e=="string"?void 0:e.intent.wallet,hash:c.transactionHash,raw:a.txnReceipt,receipt:c,wait:async function(l){return s.provider.waitForTransaction(c.transactionHash,l)}}}}class xte{constructor(e){this.receipt=e}}function IN(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 wte=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:lte,ProviderRelayer:AN,ProviderRelayerDefaults:kN,RpcRelayer:PN,RpcRelayerProto:ld,isLocalRelayerOptions:cte,isProviderRelayerOptions:ate,isRelayer:IN,isRpcRelayerOptions:gte,proto:ld},Symbol.toStringTag,{value:"Module"}));function TN(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 ON{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 d6=Object.freeze({__proto__:null,isSapientSigner:TN,SignerWrapper:ON});let hc=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 RN(t){return t===void 0||t.state===hc.INITIAL||t.state===hc.SIGNING}class db{constructor(e,r=db.randomTag()){this.tag=r,this.observers=[],this.signers=[],this.count=0,this.setSigners(e)}static randomTag(){return`default-${le(Is(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>TN(r)?r:new ON(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:c}=e,l={ended:!1,message:s,signers:{}};let u=o??{};const f=m=>{u=m,r.notifyObservers(n,l,u)},d=()=>{try{r.notifyObservers(n,l,u);const m=Object.entries(l.signers).filter(([v,y])=>RN(y));if(a&&a(l,f)||m.length===0){l.ended=!0,i(l),r.notifyObservers(n,l,u);return}}catch(m){console.error("Error while notifying observers",m)}};let h=r.signers;if(c){const m=await Promise.all(r.signers.map(async function(v){return v.getAddress()}));h=r.signers.filter((v,y)=>c.includes(m[y]))}const p=await Promise.allSettled(h.map(async function(m){const v=await m.getAddress();l.signers[v]={state:hc.SIGNING,request:m.sign(s,o??{}).then(y=>{const b=m.suffix();return l.signers[v]={state:hc.SIGNED,signature:y,suffix:b},d(),y}).catch(y=>{throw l.signers[v]={state:hc.ERROR,error:y},d(),y})}}));for(let m=0;mIt(e))):It(t)}const rk=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(n.state===hc.SIGNED){const i=fe(n.suffix),s=Je(["bytes","bytes"],[n.signature,i]);e.set(r,{signature:s,isDynamic:i.length!==1||i[0]!==2})}}return e};class Z0 extends Mc{constructor(e){if(lr.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=we.context.addressOf(e.context,e.coders.config.imageHashOf(e.config));return new Z0(ic({},e,{address:r}))}reader(){if(this._reader)return this._reader;if(!this.provider)throw new Error("Wallet status provider requires a provider");return new we.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:we.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(we.context.addressOf(this.context,r)!==this.address)throw new Error(`First address of config ${r} doesn't match wallet address ${this.address}`);const n=Z0.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(ic({},r,{chainId:this.chainId,intent:{id:le(Is(32)),wallet:this.address}}))}}static buildDeployTransaction(e,r){const n=new Sr(Zr.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=e6(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=ic({},r,{digest:e,chainId:this.chainId,address:this.address,config:this.config}),s=fe(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(c=>c.address),message:s,metadata:i,callback:(c,l)=>{const u=rk(c),f=ic({},i,{parts:u});return l(f),this.coders.signature.hasEnoughSigningPower(this.config,u)}}),a=rk(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(Te(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=te.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 we.transaction.encodeNonce(r,n)}randomNonce(){const e=te.from(le(Is(12)));return we.transaction.encodeNonce(e,0)}async signTransactions(e,r,n){const i=await tk(e),s=we.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=we.transaction.digestOfTransactions(o,s),c=ic({digest:a,transactions:s},n),l=await this.signDigest(a,c);return{intent:{id:e6(this.address,this.chainId,a),wallet:this.address},chainId:this.chainId,transactions:s,entrypoint:this.address,nonce:o,signature:l}}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 tk(e),n=we.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 c=o.gasLimit?te.from(o.gasLimit).toNumber():s[a].gasLimit;return ic({},o,s[a],{gasLimit:c})})}connect(e,r){return this.provider=e,this.relayer=r,this}signTransaction(e){throw new Error("Method not implemented.")}}function Bo(){return Bo=Object.assign?Object.assign.bind():function(t){for(var e=1;eCte(t[e])):!1}function kte(t){if(!t)return[];const e=te.from(t.value);switch(t.token.type){case ld.FeeTokenType.UNKNOWN:return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.to,value:e.toHexString(),data:[]}];case ld.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 Sr([{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 Ate{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===ld.FeeTokenType.UNKNOWN){if((await this.getBalance()).gte(te.from(i.value)))return i}else if(i.token.contractAddress&&i.token.type===ld.FeeTokenType.ERC20_TOKEN&&(await new Rd(i.token.contractAddress,n,this.provider).balanceOf(this.account.address)).gte(te.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 c=Ste(e)?await It(e):e,l=await this.account.prepareTransactions({txs:c,chainId:this.chainId,stubSignatureOverrides:(n=(i=this.options)==null?void 0:i.stubSignatureOverrides)!=null?n:new Map,simulateForFeeOptions:r==null?void 0:r.simulateForFeeOptions}),f=await((s=(o=this.options)==null?void 0:o.selectFee)!=null?s:this.defaultSelectFee.bind(this))(c,l.feeOptions),d=[...l.transactions,...kte(f)];return this.account.sendTransaction(d,this.chainId,l.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(te.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 _te{async isDeployed(e){return!1}async implementation(e){}async imageHash(e){}async nonce(e,r){return lr}async isValidSignature(e,r,n){throw new Error("Method not supported.")}}class Qo{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=Ue(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||f6.DefaultMigrations,this.migrator=new u6.Migrator(e.tracker,this.migrations,this.contexts)}getSigner(e,r){return new Ate(this,e,r)}static async new(e){var r;const i=new u6.Migrator(e.tracker,(r=e.migrations)!=null?r:f6.DefaultMigrations,e.contexts).lastMigration(),s=i.configCoder,o=s.fromSimple(e.config),a=s.imageHashOf(o),c=e.contexts[i.version],l=we.context.addressOf(c,a);return await e.tracker.saveCounterfactualWallet({config:o,context:Object.values(e.contexts)}),new Qo({address:l,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=te.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 ly(J0(r.rpcUrl,this.projectAccessKey,this.jwt),{name:"",chainId:te.from(e).toNumber()})}reader(e){return lr.eq(e)?new _te:new we.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 IN(r.relayer)?r.relayer:new PN(Bo({},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=on.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,i){const s=lr.eq(e);return new Z0({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(P=>{if(!P)throw new Error(`Counterfactual imageHash not found for wallet ${this.address}`);return P}),o=s.then(P=>EN.counterfactualVersion(this.address,P.imageHash,Object.values(this.contexts))),a=async function(){if(!await i)return o;const R=await n.reader(e).implementation(n.address);if(!R)throw new Error(`Implementation not found for wallet ${n.address}`);const L=Object.values(n.contexts);for(let j=0;j0?m[m.length-1].nextImageHash:d,y=await this.tracker.configOfImageHash({imageHash:v});if(!y)throw new Error(`Config not found for imageHash ${v}`);const b=await i,E=await s,S=on.coderFor(h).config.checkpointOf(y);return{original:Bo({},E,{version:await o}),onChain:{imageHash:f,config:await l,version:u,deployed:b},fullyMigrated:h===this.version,signedMigrations:p,version:h,presignedConfigurations:m,imageHash:v,config:y,checkpoint:S,canOnchainValidate:u===this.version&&b}}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 we.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:c}=a?o:e[0],l={entrypoint:c,chainId:n,intent:(s=e[0])==null?void 0:s.intent,transactions:[...o.transactions,...e.map(u=>({to:u.entrypoint,data:we.transaction.encodeBundleExecData(u),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}))]};if(!r.onChain.deployed){const u=we.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,n,l.transactions);l.intent===void 0?l.intent={id:u,wallet:this.address}:l.intent.id=u}return l}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=Te(Ct(`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=lr.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 l=await this.walletForStatus(r,a).signDigest(e,s),u=n?this.decorateSignature(l,a):l;if(!a.canOnchainValidate)switch(i){case"ignore":return u;case"eip6492":return this.buildEIP6492Signature(await u,a,r)}return u}buildOnChainSignature(e){const r=we.signature.subdigestOf({digest:le(e),chainId:0,address:this.address}),n=le(r),i=this.coders.config.fromSimple({threshold:32768,checkpoint:0,signers:[],subdigests:[n]}),s=new Sr(Zr.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=In.encode(["address","bytes","bytes"],[i.entrypoint,we.transaction.encodeBundleExecData(i),e]);return Je(["bytes","bytes32"],[s,we.EIP6492.EIP_6492_SUFFIX])}async editConfig(e){const r=await this.status(0).then(i=>i.config),n=this.coders.config.editConfig(r,Bo({},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 c=Z0.buildDeployTransaction(e.original.context,e.original.imageHash);s.push(...c.transactions)}s.length,s.push(...e.signedMigrations.map(c=>({to:c.tx.entrypoint,data:we.transaction.encodeBundleExecData(c.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const o=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:we.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(Bo({},i,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(Te(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"},c=i!=null&&i.serial?{serial:!0}:(i==null?void 0:i.nonceSpace)!==void 0?{space:i.nonceSpace}:void 0,l=await o.signTransactions(e,c,a);return Bo({},l,{signature:await this.decorateSignature(l.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=on.coderFor(s.version).config,c=a.imageHashOf(s),l=await this.tracker.configOfImageHash({imageHash:c,noCache:!0});if(!l||a.imageHashOf(l)!==c)throw Error(`Reverse lookup failed for imageHash ${c}`);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),c=await this.predecorateTransactions(e,o,r),l=we.transaction.fromTransactionish(this.address,c),u=a.coders.config.buildStubSignature(a.config,n),f=le(Is(32)),d={chainId:r,intent:{id:f,wallet:this.address},signature:u,transactions:l,entrypoint:this.address,nonce:0},h=await this.decorateTransactions(d,o),p=we.transaction.encodeBundleExecData(h),m=await this.relayer(r).getFeeOptionsRaw(h.entrypoint,p,s);return Bo({},m,{decorated:h})}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=we.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),c=i?e:await this.predecorateTransactions(e,a,r),u=we.transaction.fromTransactionish(this.address,c).length>0?await this.signTransactions(c,r,void 0,o):void 0,f=await this.orchestrator.predecorateSignedTransactions({chainId:r}),d=[];return u!==void 0&&u.transactions.length>0&&d.push(u),d.push(...f.filter(h=>h.transactions.length>0)),this.sendSignedTransactions(d,r,n,void 0,s)}async signTypedData(e,r,n,i,s="ignore"){const o=Y1({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 f=r(o.signedMigrations);if(f){const{toVersion:d,toConfig:h}=f;a=on.genericCoderFor(d).config.imageHashOf(h)}}a||(a=o.onChain.imageHash);const c=await e.tracker.configOfImageHash({imageHash:a});if(!c)throw new Error(`unable to find config for image hash ${a}`);return on.genericCoderFor(c.version).config.signersOf(c).map(f=>Bo({},f,{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=>on.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...s.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,c){const l=c===o.length-1,u=await e.tracker.configOfImageHash({imageHash:a});if(!u){console.warn(`AllSigners may be incomplete, config not found for imageHash ${a}`);return}on.genericCoderFor(u.version).config.signersOf(u).forEach(h=>{const p=r.find(m=>m.address===h.address&&m.network===i);if(p&&l&&p.flaggedForRemoval){p.flaggedForRemoval=!1;return}p||r.push({address:h.address,weight:h.weight,network:i,flaggedForRemoval:!l})})}))})),r}}function Pte(t){return t instanceof Qo}const Ite=Object.freeze(Object.defineProperty({__proto__:null,Account:Qo,isAccount:Pte},Symbol.toStringTag,{value:"Module"}));function gy(){return gy=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),$r({},n)).then(i=>Mr(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),$r({},n)).then(i=>Mr(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),$r({},n)).then(i=>Mr(i).then(s=>({status:s.status}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),$r({},n)).then(i=>Mr(i).then(s=>({chainID:s.chainID}))),this.getEtherBalance=(n,i)=>this.fetch(this.url("GetEtherBalance"),$r(n,i)).then(s=>Mr(s).then(o=>({balance:o.balance}))),this.getTokenBalances=(n,i)=>this.fetch(this.url("GetTokenBalances"),$r(n,i)).then(s=>Mr(s).then(o=>({page:o.page,balances:o.balances}))),this.getTokenSupplies=(n,i)=>this.fetch(this.url("GetTokenSupplies"),$r(n,i)).then(s=>Mr(s).then(o=>({page:o.page,contractType:o.contractType,tokenIDs:o.tokenIDs}))),this.getTokenSuppliesMap=(n,i)=>this.fetch(this.url("GetTokenSuppliesMap"),$r(n,i)).then(s=>Mr(s).then(o=>({supplies:o.supplies}))),this.getBalanceUpdates=(n,i)=>this.fetch(this.url("GetBalanceUpdates"),$r(n,i)).then(s=>Mr(s).then(o=>({page:o.page,balances:o.balances}))),this.getTransactionHistory=(n,i)=>this.fetch(this.url("GetTransactionHistory"),$r(n,i)).then(s=>Mr(s).then(o=>({page:o.page,transactions:o.transactions}))),this.syncBalance=(n,i)=>this.fetch(this.url("SyncBalance"),$r(n,i)).then(s=>Mr(s).then(o=>({}))),this.fetchTransactionReceipt=(n,i)=>this.fetch(this.url("FetchTransactionReceipt"),$r(n,i)).then(s=>Mr(s).then(o=>({receipt:o.receipt}))),this.getOrderbookOrders=(n,i)=>this.fetch(this.url("GetOrderbookOrders"),$r(n,i)).then(s=>Mr(s).then(o=>({page:o.page,orders:o.orders}))),this.getTopOrders=(n,i)=>this.fetch(this.url("GetTopOrders"),$r(n,i)).then(s=>Mr(s).then(o=>({orders:o.orders}))),this.fetchTransactionReceiptWithFilter=(n,i)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),$r(n,i)).then(s=>Mr(s).then(o=>({receipt:o.receipt}))),this.getAllWebhookListeners=(n,i)=>this.fetch(this.url("GetAllWebhookListeners"),$r(n,i)).then(s=>Mr(s).then(o=>({listeners:o.listeners}))),this.getWebhookListener=(n,i)=>this.fetch(this.url("GetWebhookListener"),$r(n,i)).then(s=>Mr(s).then(o=>({listener:o.listener}))),this.addWebhookListener=(n,i)=>this.fetch(this.url("AddWebhookListener"),$r(n,i)).then(s=>Mr(s).then(o=>({status:o.status,listener:o.listener}))),this.updateWebhookListener=(n,i)=>this.fetch(this.url("UpdateWebhookListener"),$r(n,i)).then(s=>Mr(s).then(o=>({status:o.status}))),this.removeWebhookListener=(n,i)=>this.fetch(this.url("RemoveWebhookListener"),$r(n,i)).then(s=>Mr(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 $r=(t={},e={})=>({method:"POST",headers:gy({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Mr=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}),nk=typeof Un=="object"?Un.fetch:window.fetch;class aC extends $N{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,nk),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(i,s)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),s.headers=gy({},s.headers,o),nk(i,s)},this.fetch=this._fetch}}const Bte=Object.freeze(Object.defineProperty({__proto__:null,ContractType:Ki,EventLogDataType:Mte,EventLogType:$te,Indexer:$N,OrderStatus:Nte,SequenceIndexer:aC,SortOrder:jte,TransactionStatus:Dte,TransactionType:Lte,TxnTransferType:xn,WebRPCSchemaHash:Rte,WebRPCSchemaVersion:Ote,WebRPCVersion:Tte},Symbol.toStringTag,{value:"Module"}));function e1(){return e1=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Ke({},n)).then(i=>Ye(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Ke({},n)).then(i=>Ye(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Ke({},n)).then(i=>Ye(i).then(s=>({status:s.status}))),this.getTokenMetadata=(n,i)=>this.fetch(this.url("GetTokenMetadata"),Ke(n,i)).then(s=>Ye(s).then(o=>({tokenMetadata:o.tokenMetadata}))),this.refreshTokenMetadata=(n,i)=>this.fetch(this.url("RefreshTokenMetadata"),Ke(n,i)).then(s=>Ye(s).then(o=>({taskId:o.taskId}))),this.enqueueTokensForRefresh=(n,i)=>this.fetch(this.url("EnqueueTokensForRefresh"),Ke(n,i)).then(s=>Ye(s).then(o=>({taskId:o.taskId}))),this.getTokenRefreshStatus=(n,i)=>this.fetch(this.url("GetTokenRefreshStatus"),Ke(n,i)).then(s=>Ye(s).then(o=>({status:o.status}))),this.getTokenRefreshResult=(n,i)=>this.fetch(this.url("GetTokenRefreshResult"),Ke(n,i)).then(s=>Ye(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=>Ye(s).then(o=>({ok:o.ok}))),this.getTokenMetadataBatch=(n,i)=>this.fetch(this.url("GetTokenMetadataBatch"),Ke(n,i)).then(s=>Ye(s).then(o=>({contractTokenMetadata:o.contractTokenMetadata}))),this.searchTokenMetadata=(n,i)=>this.fetch(this.url("SearchTokenMetadata"),Ke(n,i)).then(s=>Ye(s).then(o=>({page:o.page,tokenMetadata:o.tokenMetadata}))),this.searchTokenIDs=(n,i)=>this.fetch(this.url("SearchTokenIDs"),Ke(n,i)).then(s=>Ye(s).then(o=>({page:o.page,tokenIds:o.tokenIds}))),this.tokenCollectionFilters=(n,i)=>this.fetch(this.url("TokenCollectionFilters"),Ke(n,i)).then(s=>Ye(s).then(o=>({filters:o.filters}))),this.getContractInfo=(n,i)=>this.fetch(this.url("GetContractInfo"),Ke(n,i)).then(s=>Ye(s).then(o=>({contractInfo:o.contractInfo}))),this.getContractInfoBatch=(n,i)=>this.fetch(this.url("GetContractInfoBatch"),Ke(n,i)).then(s=>Ye(s).then(o=>({contractInfoMap:o.contractInfoMap}))),this.searchContractInfo=(n,i)=>this.fetch(this.url("SearchContractInfo"),Ke(n,i)).then(s=>Ye(s).then(o=>({contractInfoList:o.contractInfoList}))),this.searchContractInfoBatch=(n,i)=>this.fetch(this.url("SearchContractInfoBatch"),Ke(n,i)).then(s=>Ye(s).then(o=>({contractInfoByChain:o.contractInfoByChain}))),this.searchMetadata=(n,i)=>this.fetch(this.url("SearchMetadata"),Ke(n,i)).then(s=>Ye(s).then(o=>({tokenMetadata:o.tokenMetadata,contractInfo:o.contractInfo}))),this.getNiftyswapTokenQuantity=(n,i)=>this.fetch(this.url("GetNiftyswapTokenQuantity"),Ke(n,i)).then(s=>Ye(s).then(o=>({quantity:o.quantity}))),this.getNiftyswapUnitPrices=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPrices"),Ke(n,i)).then(s=>Ye(s).then(o=>({prices:o.prices}))),this.getNiftyswapUnitPricesWithQuantities=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPricesWithQuantities"),Ke(n,i)).then(s=>Ye(s).then(o=>({prices:o.prices}))),this.addContractToMintMonitor=(n,i)=>this.fetch(this.url("AddContractToMintMonitor"),Ke(n,i)).then(s=>Ye(s).then(o=>({ok:o.ok}))),this.removeContractFromMintMonitor=(n,i)=>this.fetch(this.url("RemoveContractFromMintMonitor"),Ke(n,i)).then(s=>Ye(s).then(o=>({ok:o.ok}))),this.mintMonitorJobStatus=(n,i)=>this.fetch(this.url("MintMonitorJobStatus"),Ke(n,i)).then(s=>Ye(s).then(o=>({task:o.task}))),this.mintMonitorTriggerJob=(n,i)=>this.fetch(this.url("MintMonitorTriggerJob"),Ke(n,i)).then(s=>Ye(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 NN{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=>Ye(s).then(o=>({collection:o.collection}))),this.getCollection=(n,i)=>this.fetch(this.url("GetCollection"),Ke(n,i)).then(s=>Ye(s).then(o=>({collection:o.collection}))),this.listCollections=(n,i)=>this.fetch(this.url("ListCollections"),Ke(n,i)).then(s=>Ye(s).then(o=>({page:o.page,collections:o.collections}))),this.updateCollection=(n,i)=>this.fetch(this.url("UpdateCollection"),Ke(n,i)).then(s=>Ye(s).then(o=>({collection:o.collection}))),this.deleteCollection=(n,i)=>this.fetch(this.url("DeleteCollection"),Ke(n,i)).then(s=>Ye(s).then(o=>({status:o.status}))),this.publishCollection=(n,i)=>this.fetch(this.url("PublishCollection"),Ke(n,i)).then(s=>Ye(s).then(o=>({collection:o.collection}))),this.unpublishCollection=(n,i)=>this.fetch(this.url("UnpublishCollection"),Ke(n,i)).then(s=>Ye(s).then(o=>({collection:o.collection}))),this.createToken=(n,i)=>this.fetch(this.url("CreateToken"),Ke(n,i)).then(s=>Ye(s).then(o=>({token:o.token,assets:o.assets}))),this.getToken=(n,i)=>this.fetch(this.url("GetToken"),Ke(n,i)).then(s=>Ye(s).then(o=>({token:o.token,assets:o.assets}))),this.listTokens=(n,i)=>this.fetch(this.url("ListTokens"),Ke(n,i)).then(s=>Ye(s).then(o=>({page:o.page,tokens:o.tokens}))),this.updateToken=(n,i)=>this.fetch(this.url("UpdateToken"),Ke(n,i)).then(s=>Ye(s).then(o=>({token:o.token}))),this.deleteToken=(n,i)=>this.fetch(this.url("DeleteToken"),Ke(n,i)).then(s=>Ye(s).then(o=>({status:o.status}))),this.createAsset=(n,i)=>this.fetch(this.url("CreateAsset"),Ke(n,i)).then(s=>Ye(s).then(o=>({asset:o.asset}))),this.getAsset=(n,i)=>this.fetch(this.url("GetAsset"),Ke(n,i)).then(s=>Ye(s).then(o=>({asset:o.asset}))),this.updateAsset=(n,i)=>this.fetch(this.url("UpdateAsset"),Ke(n,i)).then(s=>Ye(s).then(o=>({asset:o.asset}))),this.deleteAsset=(n,i)=>this.fetch(this.url("DeleteAsset"),Ke(n,i)).then(s=>Ye(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:e1({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Ye=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}),by=typeof Un=="object"?Un.fetch:window.fetch;class cC extends MN{constructor(e="https://metadata.sequence.app",r,n){super(e.endsWith("/")?e.slice(0,-1):e,by),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(i,s)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),s.headers=e1({},s.headers,o),by(i,s)},this.fetch=this._fetch}}class Gte extends NN{constructor(e="https://metadata.sequence.app",r){super(e.endsWith("/")?e.slice(0,-1):e,by),this.jwtAuth=r,this._fetch=(n,i)=>{const s={},o=this.jwtAuth;return o&&o.length>0&&(s.Authorization=`BEARER ${o}`),i.headers=e1({},i.headers,s),by(n,i)},this.fetch=this._fetch}}const Kte=Object.freeze(Object.defineProperty({__proto__:null,Collections:NN,ContractType:qte,Metadata:MN,PropertyType:Wte,SequenceCollections:Gte,SequenceMetadata:cC,SwapType:Hte,TaskStatus:Vte,WebRPCSchemaHash:zte,WebRPCSchemaVersion:Ute,WebRPCVersion:Fte},Symbol.toStringTag,{value:"Module"}));function Yte(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function Qte(t){return t.startsWith("ipfs://")}class Jte{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(we.signer.canRecover(n)){const c=we.signer.recoverSigner(r,n);if(c&&c.toLowerCase()===t.toLowerCase())return n}try{if(await we.signer.isValidSignature(t,r,n,e))return n}catch{}const o=await Zte(Xte(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=le(await(i||new ere).resolve(o));if(!a||a==="")throw new Error("EIP5719 - Empty alternative signature");if(a===le(n))throw new Error("EIP5719 - Alternative signature is invalid or the same");return DN(t,e,r,a,i,s+1)}class ere{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.gateway=e,this.uri=n=>Qte(n)?Yte(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 tre=(t,e)=>e.some(r=>t instanceof r);let ik,sk;function rre(){return ik||(ik=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function nre(){return sk||(sk=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const LN=new WeakMap,h6=new WeakMap,jN=new WeakMap,Mx=new WeakMap,lC=new WeakMap;function ire(t){const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{r(Ac(t.result)),i()},o=()=>{n(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&LN.set(r,t)}).catch(()=>{}),lC.set(e,t),e}function sre(t){if(h6.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)});h6.set(t,e)}let p6={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return h6.get(t);if(e==="objectStoreNames")return t.objectStoreNames||jN.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ac(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 ore(t){p6=t(p6)}function are(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(Nx(this),e,...r);return jN.set(n,e.sort?e.sort():[e]),Ac(n)}:nre().includes(t)?function(...e){return t.apply(Nx(this),e),Ac(LN.get(this))}:function(...e){return Ac(t.apply(Nx(this),e))}}function cre(t){return typeof t=="function"?are(t):(t instanceof IDBTransaction&&sre(t),tre(t,rre())?new Proxy(t,p6):t)}function Ac(t){if(t instanceof IDBRequest)return ire(t);if(Mx.has(t))return Mx.get(t);const e=cre(t);return e!==t&&(Mx.set(t,e),lC.set(e,t)),e}const Nx=t=>lC.get(t);function lre(t,e,{blocked:r,upgrade:n,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=Ac(o);return n&&o.addEventListener("upgradeneeded",c=>{n(Ac(o.result),c.oldVersion,c.newVersion,Ac(o.transaction),c)}),r&&o.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),a.then(c=>{s&&c.addEventListener("close",()=>s()),i&&c.addEventListener("versionchange",l=>i(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}const ure=["get","getKey","getAll","getAllKeys","count"],fre=["put","add","delete","clear"],Dx=new Map;function ok(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Dx.get(e))return Dx.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=fre.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||ure.includes(r)))return;const s=async function(o,...a){const c=this.transaction(o,i?"readwrite":"readonly");let l=c.store;return n&&(l=l.index(a.shift())),(await Promise.all([l[r](...a),i&&c.done]))[0]};return Dx.set(e,s),s}ore(t=>({...t,get:(e,r,n)=>ok(e,r)||t.get(e,r,n),has:(e,r)=>!!ok(e,r)||t.has(e,r)}));class dre{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 hre=Object.freeze({__proto__:null,ConfigTracker:dre});class pre{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),Rn(e,"? "),Rn(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),Rn(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),Rn(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),Rn(e,"? "),Rn(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),Rn(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),Rn(e,"? "),Rn(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),Rn(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),Rn(e,"? "),Rn(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,i){return console.debug("? getMigration"),Rn({address:e,fromImageHash:r,fromVersion:n,chainId:i},"? "),Rn(await this.tracker.getMigration(e,r,n,i),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),Rn({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function Rn(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 mre=Object.freeze({__proto__:null,DebugConfigTracker:pre});function jc(){return jc=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 qf(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]=te.from(n):Array.isArray(n)?e[r]=n.map(i=>qf(i)):typeof n=="object"&&n!==null?e[r]=qf(n):e[r]=n}return e}class vre{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=>qf(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=>qf(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=>qf(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(c=>({subdigest:c.subdigest,toImageHash:c.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 lre(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 FN(t){return t.left!==void 0&&t.right!==void 0}function UN(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function m6(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var yre=Object.freeze({__proto__:null,isPlainNode:FN,isPlainNested:UN,isPlainV2Config:m6,MemoryTrackerStore:BN,recreateBigNumbers:qf,IndexedDBStore:vre});class uC{constructor(e,r=new BN,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(FN(o)){const[a,c]=await Promise.all([i.loadTopology(o.left),i.loadTopology(o.right)]);return{left:a,right:c}}return UN(o)?{weight:te.from(o.weight),threshold:te.from(o.threshold),tree:await i.loadTopology(o.tree)}:o},this.saveTopology=async function(s){if(rt.config.isNodeLeaf(s))return;const o=rt.config.hashNode(s);if(rt.config.isNode(s)){const a=i.saveTopology(s.left),c=i.saveTopology(s.right),l=i.store.saveV2Node(o,{left:rt.config.hashNode(s.left),right:rt.config.hashNode(s.right)});await Promise.all([a,c,l]);return}if(rt.config.isNestedLeaf(s)){const a=i.saveTopology(s.tree),c=i.store.saveV2Node(o,{weight:te.from(s.weight).toString(),threshold:te.from(s.threshold).toString(),tree:rt.config.hashNode(s.tree)});await Promise.all([a,c]);return}if(rt.config.isSignerLeaf(s))return i.store.saveV2Node(o,{address:s.address,weight:s.weight});if(rt.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(Wo.config.ConfigCoder.isWalletConfig(o)){const a=Wo.config.ConfigCoder.imageHashOf(o);return i.store.saveConfig(a,o)}if(rt.config.ConfigCoder.isWalletConfig(o)){const a=rt.config.ConfigCoder.imageHashOf(o);if(rt.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&&!m6(a))return i.configOfImageHashCache[s.imageHash]=a,a;if(m6(a)){const c={version:2,threshold:te.from(a.threshold),checkpoint:te.from(a.checkpoint),tree:await i.loadTopology(a.tree)};return i.configOfImageHashCache[s.imageHash]=c,c}throw new Error(`Unknown config type: ${a}`)}},this.saveCounterfactualWallet=async function(s){const{config:o,context:a}=s,c=on.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([i.saveWalletConfig({config:o}),...a.map(l=>{const u=we.context.addressOf(l,c);return i.store.saveCounterfactualWallet(u,c,l)})])},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=we.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=rt.signature.SignatureCoder.decode(s.signature),a=on.genericCoderFor(s.nextConfig.version).config.imageHashOf(s.nextConfig),c=rt.chained.messageSetImageHash(a),l=Te(c),u={message:c,address:s.wallet,chainId:0,digest:l},f=i.savePayload({payload:u}),d=i.saveWalletConfig({config:s.nextConfig}),h=await rt.signature.SignatureCoder.recover(o,u,i.provider),p=rt.signature.signaturesOf(h.config.tree);await Promise.all([f,d,i.saveWalletConfig({config:h.config}),...p.map(m=>i.store.saveSignatureOfSubdigest(m.address,h.subdigest,m.signature))])},this.loadPresignedConfiguration=async function(s){const{wallet:o,fromImageHash:a,longestPath:c}=s,l=await i.configOfImageHash({imageHash:a});if(!l||!rt.config.ConfigCoder.isWalletConfig(l))return[];const u=rt.config.signersOf(l.tree).map(E=>E.address),f=await Promise.all(u.map(E=>i.store.loadSubdigestsOfSigner(E))),d=[...new Set(f.flat())],p=(await Promise.all([...new Set(d)].map(async function(E){return jc({},await i.payloadOfSubdigest({subdigest:E}),{subdigest:E})}))).filter(E=>(E==null?void 0:E.message)&&(E==null?void 0:E.address)&&E.address===o).map(E=>({payload:E,nextImageHash:rt.chained.decodeMessageSetImageHash(E.message)})).filter(E=>E==null?void 0:E.nextImageHash);let m;const y=(await Promise.all(p.map(async function({nextImageHash:E,payload:S}){const P=await i.configOfImageHash({imageHash:E});if(!P||!rt.config.isWalletConfig(P))return;const R=te.from(P.checkpoint);return{nextConfig:P,nextCheckpoint:R,nextImageHash:E,payload:S}}))).filter(E=>E!==void 0).filter(E=>E.nextCheckpoint.gt(l.checkpoint)).sort((E,S)=>E.nextCheckpoint.gt(S.nextCheckpoint)?c?1:-1:c?-1:1);for(const E of y){const{nextConfig:S,nextCheckpoint:P,nextImageHash:R,payload:L}=E;if(m){const K=m.checkpoint;if(c){if(P.gte(K))continue}else if(P.lte(K))continue}const j=new Map((await Promise.all(u.map(async function(K){const Y=await i.store.loadSignatureOfSubdigest(K,L.subdigest);if(!Y)return[K,void 0];const Q=le(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(K,L.subdigest,Y):Y),F=we.signer.tryRecoverSigner(L.subdigest,Q)!==K;return[K,{isDynamic:F,signature:Q}]}))).filter(K=>!!K[1]));if(j.size===0)continue;const H=rt.signature.SignatureCoder.encodeSigners(l,j,[],0);H.weight.lt(l.threshold)||(m={nextImageHash:R,checkpoint:te.from(S.checkpoint),signature:H.encoded})}if(!m)return[];const b=await i.loadPresignedConfiguration({wallet:o,fromImageHash:m.nextImageHash,longestPath:c});return[{wallet:o,nextImageHash:m.nextImageHash,signature:m.signature},...b]},this.saveWitnesses=async function(s){const o={digest:s.digest,address:s.wallet,chainId:s.chainId},a=we.signature.subdigestOf(o);await Promise.all([i.savePayload({payload:o}),...s.signatures.filter(c=>we.signer.canRecover(c)).map(c=>{const l=we.signer.recoverSigner(a,c);return i.store.saveSignatureOfSubdigest(l,a,c)})])},this.walletsOfSigner=async function(s){const o=await i.store.loadSubdigestsOfSigner(s.signer),a=await Promise.all(o.map(l=>i.payloadOfSubdigest({subdigest:l}))).then(l=>l.filter(u=>u!==void 0)),c=[];for(const l of a){const u=l.address;if(c.find(h=>h.wallet===u))continue;const f=we.signature.subdigestOf(l),d=await i.store.loadSignatureOfSubdigest(s.signer,f);d&&c.push({wallet:u,proof:{digest:l.digest,chainId:te.from(l.chainId),signature:le(d)}})}return c},this.cachedEIP5719=new Jte(e)}async saveMigration(e,r,n){const i=r.fromVersion;if(i!==1)throw new Error("Migration not supported");if(!rt.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:s,address:o}=SN.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(rt.config.ConfigCoder.imageHashOf(r.toConfig)!=s)throw new Error("Invalid migration transaction - config");const a=we.transaction.packMetaTransactionsData(r.tx.nonce,r.tx.transactions),c=Te(a),l={chainId:r.tx.chainId,message:a,address:e,digest:c},u=we.signature.subdigestOf(l),f=this.savePayload({payload:l}),d=this.saveWalletConfig({config:r.toConfig}),h=Wo.signature.SignatureCoder.decode(r.tx.signature),p=await Wo.signature.SignatureCoder.recover(h,l,this.provider),m=Wo.signature.SignatureCoder.signaturesOf(p.config);await Promise.all([f,d,this.saveWalletConfig({config:p.config}),this.store.saveMigrationsSubdigest(e,i,i+1,u,s),...m.map(v=>this.store.saveSignatureOfSubdigest(v.address,p.subdigest,v.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)]),c=on.coderFor(n);return!o||!c.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(u){const{subdigest:f,toImageHash:d}=u,h=await s.payloadOfSubdigest({subdigest:f});if(!h||!h.message||!te.from(i).eq(h.chainId))return;const p=c.config.signersOf(o).map(E=>E.address),m=new Map((await Promise.all(p.map(async function(E){const S=await s.store.loadSignatureOfSubdigest(E,f);if(!S)return[E,void 0];const P=le(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(E,f,S):S),R=we.signer.tryRecoverSigner(f,P)!==E;return[E,{isDynamic:R,signature:P}]}))).filter(E=>!!E[1])),v=c.signature.encodeSigners(o,m,[],i);if(!v||v.weightu.filter(f=>f!==void 0)))[0]}updateProvider(e){this.provider=e}}var gre=Object.freeze({__proto__:null,LocalConfigTracker:uC});let Lx=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class bre{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Sessions/",this.ping=n=>this.fetch(this.url("Ping"),ys({},n)).then(i=>gs(i).then(s=>({}))),this.config=(n,i)=>this.fetch(this.url("Config"),ys(n,i)).then(s=>gs(s).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,i)=>this.fetch(this.url("Wallets"),ys(n,i)).then(s=>gs(s).then(o=>({wallets:o.wallets}))),this.deployHash=(n,i)=>this.fetch(this.url("DeployHash"),ys(n,i)).then(s=>gs(s).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,i)=>this.fetch(this.url("ConfigUpdates"),ys(n,i)).then(s=>gs(s).then(o=>({updates:o.updates}))),this.migrations=(n,i)=>this.fetch(this.url("Migrations"),ys(n,i)).then(s=>gs(s).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,i)=>this.fetch(this.url("SaveConfig"),ys(n,i)).then(s=>gs(s).then(o=>({}))),this.saveWallet=(n,i)=>this.fetch(this.url("SaveWallet"),ys(n,i)).then(s=>gs(s).then(o=>({}))),this.saveSignature=(n,i)=>this.fetch(this.url("SaveSignature"),ys(n,i)).then(s=>gs(s).then(o=>({}))),this.saveSignerSignatures=(n,i)=>this.fetch(this.url("SaveSignerSignatures"),ys(n,i)).then(s=>gs(s).then(o=>({}))),this.saveMigration=(n,i)=>this.fetch(this.url("SaveMigration"),ys(n,i)).then(s=>gs(s).then(o=>({}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const ys=(t={},e={})=>({method:"POST",headers:jc({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),gs=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 xre{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=void 0,this.sessions=new bre(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(jx(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=on.genericCoderFor(r.version).config.imageHashOf(r),i=rt.signature.setImageHashStruct(n),s=Te(i);await this.sessions.saveSignature({wallet:e.wallet,digest:s,chainID:"0",signature:e.signature,toConfig:nm(r)})}async saveWitnesses(e){let r=e.signatures;this.onlyRecoverable&&(r=r.filter(n=>we.signer.canRecover(n))),await this.sessions.saveSignerSignatures({wallet:e.wallet,digest:e.digest,chainID:wf(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return wre(r,n)}catch(r){if(jx(r))return;throw r}}async saveWalletConfig(e){const r=nm(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(jx(r))return;throw r}}async saveCounterfactualWallet(e){const r=nm(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 Lx.EIP712:a+=le(we.signer.SigType.EIP712).slice(2);break;case Lx.EthSign:a+=le(we.signer.SigType.ETH_SIGN).slice(2);break;case Lx.EIP1271:a+=le(we.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:i,signature:a,chainId:te.from(s)}}})}async getMigration(e,r,n,i){var s=this;const o=wf(i),{migrations:a}=await this.sessions.migrations({wallet:e,fromVersion:n,fromImageHash:r,chainID:o}),c=async function(f){const d=a[f];if(d){const h=Object.keys(d).map(Number).sort((p,m)=>m-p);for(const p of h)for(const[m,v]of Object.entries(d[p]))try{const y=await s.configOfImageHash({imageHash:m});if(y)return{fromVersion:n,toVersion:p,toConfig:y,tx:{entrypoint:v.executor,transactions:v.transactions,nonce:v.nonce,signature:v.signature,chainId:f,intent:{id:we.transaction.subdigestOfTransactions(e,f,v.nonce,v.transactions),wallet:e}}}}catch(y){console.error(y)}}},l=await c(o);if(l)return l;for(const u in a)if(u!==o){const f=await c(u);if(f)return f}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:nm(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(Ere),nonce:wf(r.tx.nonce),signature:r.tx.signature,chainID:wf(r.tx.chainId)})}}function nm(t){switch(t.version){case 1:if(Wo.config.ConfigCoder.isWalletConfig(t))return{threshold:Bl(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:Bl(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(rt.config.ConfigCoder.isWalletConfig(t))return{threshold:Bl(t.threshold),checkpoint:Bl(t.checkpoint),tree:iv(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function iv(t){return rt.config.isNode(t)?{left:iv(t.left),right:iv(t.right)}:rt.config.isSignerLeaf(t)?{weight:Bl(t.weight),address:t.address}:rt.config.isNestedLeaf(t)?{weight:Bl(t.weight),threshold:Bl(t.threshold),tree:iv(t.tree)}:rt.config.isNodeLeaf(t)?{node:t.nodeHash}:jc({},t)}function wre(t,e){switch(t){case 1:return jc({},e,{version:t});case 2:return jc({},e,{version:t,tree:sv(e.tree)});default:throw new Error(`unknown version ${t}`)}}function sv(t){switch(typeof t){case"object":const e=jc({},t);return e.left!==void 0&&(e.left=sv(e.left)),e.right!==void 0&&(e.right=sv(e.right)),e.tree!==void 0&&(e.tree=sv(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 Ere(t){return{to:t.to,value:t.value!==void 0?wf(t.value):void 0,data:t.data!==void 0?le(t.data):void 0,gasLimit:t.gasLimit!==void 0?wf(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function Bl(t){return te.from(t).toNumber()}function wf(t){return te.from(t).toString()}function jx(t){return typeof t=="object"&&t.status===404}var Cre=Object.freeze({__proto__:null,RemoteConfigTracker:xre});function v6(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 zh(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class Sre{constructor(e){this.trackers=e}async configOfImageHash(e){const r=this.trackers.map(async function(a,c){return{res:await a.configOfImageHash(e),i:c}}),n=await v6(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:on.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 uC(void 0),s=await zh(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 v6(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 zh(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:c,signature:l}})=>{const u=`${o}-${a}-${c}`;let f=s.get(u);f||(f={wallet:o,digest:a,chainId:c,signatures:[]},s.set(u,f)),f.signatures.push(l)}),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 zh(this.trackers.map(c=>c.loadPresignedConfiguration(e)),[]),s=(await zh(n.map(async function(c){const l=c[c.length-1],u=await r.configOfImageHash({imageHash:l.nextImageHash});if(u)return{checkpoint:on.genericCoderFor(u.version).config.checkpointOf(u),result:c}}),void 0)).reduce((c,l)=>l&&(!c||l.checkpoint.gt(c.checkpoint))?l:c);if(!s)return[];const o=new Map,a=c=>(o.has(c)||o.set(c,this.configOfImageHash({imageHash:c})),o.get(c));return s.result.forEach(async function(c){const l=await a(c.nextImageHash);l&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:l,signature:c.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 kre{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.lengthf&&(!u||f.checkpoint.gt(u.checkpoint))?f:u))==null?void 0:c.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 ak{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...i){e=`${e}:${Te(Ct(JSON.stringify(i,Are)))}`;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 Are(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function _re(t){return t instanceof zN}class zN{constructor(e,r=50,n=!1){this.tracker=e,this.window=r,this.verbose=n,this.cache=new ak}invalidateCache(){this.cache=new ak}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 uC&&this.tracker.updateProvider(e)}}var fC=Object.freeze({__proto__:null,debug:mre,local:gre,remote:Cre,stores:yre,raceUntil:v6,allSafe:zh,MultipleTracker:Sre,CachedTracker:kre,isDedupedTracker:_re,DedupedTracker:zN});const Pre=Object.freeze(Object.defineProperty({__proto__:null,tracker:hre,trackers:fC},Symbol.toStringTag,{value:"Module"})),qN=60*60*24*7,Ire=60;class ck{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:qN,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 Zh(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 l=this.status.jwt,u=await l.token;if(this.now(){throw this.status.jwt=void 0,l}),expiration:o};return this.status.jwt=a,a.token.then(l=>{this.onAuthCallbacks.forEach(u=>{try{u({status:"fulfilled",value:l})}catch{}})}).catch(l=>{this.onAuthCallbacks.forEach(u=>{try{u({status:"rejected",reason:l})}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=te.from(this.settings.sequenceApiChainId),i=$s(this.account.networks,n);if(!i)throw Error("No network found");return r.chainId=n.toNumber(),r.provider=new ly(J0(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 Zh(r,void 0,n)}return this.apiClient}async getMetadataClient(e=!0){if(!this.metadataClient){const r=(await this.getJWT(e)).token;this.metadataClient=new cC(this.settings.sequenceMetadataUrl,void 0,r)}return this.metadataClient}async getIndexerClient(e,r=!0){const n=$s(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 aC(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 c=this.proofStrings.get(e);if(this.now()(r.signature=c,n.encodeProof(r,!0))).catch(c=>{throw this.proofStrings.delete(e),c}),expiration:o};return this.proofStrings.set(e,a),a}}const WN=async(t,e,r)=>{const n=Ue(await t.getAddress());if(!n||n===""||n==="0x")throw HN;const i=new ib;if(i.address=n,!r||!r.app||r.app==="")throw new dC("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):qN);const s=i.messageTypedData(),o=RM(e);i.signature=await(t instanceof Qo?t.signTypedData(s.domain,s.types,s.message,o,"eip6492"):t.signTypedData(s.domain,s.types,s.message,o));const c=await new Q0().encodeProof(i,!0);return{typedData:s,proofString:c}};class dC extends Error{constructor(e){super(e),this.name="AuthError"}}const HN=new dC("auth error: account address is empty");function Rl(){return Rl=Object.assign?Object.assign.bind():function(t){for(var e=1;eK.wallet));let j;if(L){if(f==null||f(L),j=new Qo({address:L,tracker:E,networks:b,contexts:y,orchestrator:m,projectAccessKey:v}),l&&l.length>0){let K=await j.status(P);if(K.original.version!==K.version||j.version!==K.version){const{migratedAllChains:F,failedChains:x}=await j.isMigratedAllChains();if(x.some(k=>y6.includes(k)))throw Error(`Failed to fetch account status on ${x.join(", ")}`);if(!F){if(p&&!await p(j))throw Error("Migration cancelled, cannot open session");const{failedChains:k}=await j.signAllMigrations(h||(M=>M));if(k.some(M=>y6.includes(M)))throw Error(`Failed to sign migrations on ${k.join(", ")}`);fC.isDedupedTracker(E)&&E.invalidateCache();let N;if([N,K]=await Promise.all([j.isMigratedAllChains().then(M=>M.migratedAllChains),j.status(P)]),!N)throw Error("Failed to migrate account")}}K.onChain.version!==K.version&&await j.doBootstrap(P,void 0,K);const Y=K.config,Q=j.coders.config.editConfig(Y,{add:l,threshold:c});if(j.coders.config.imageHashOf(Y)!==j.coders.config.imageHashOf(Q)){const F=j.coders.config.editConfig(Q,{checkpoint:j.coders.config.checkpointOf(Y).add(1)});await j.updateConfig(F)}}}else{if(!l||l.length===0)throw Error("Cannot create new account without signers");if(!c)throw Error("Cannot create new account without threshold");if(j=await Qo.new({config:{threshold:c,checkpoint:0,signers:l},tracker:E,contexts:y,orchestrator:m,networks:b,projectAccessKey:v}),f==null||f(j.address),await j.publishWitness(),!(await E.walletsOfSigner({signer:a,noCache:!0})).some(Y=>Y.wallet===j.address))throw Error("Account not found on tracker")}let H;return S&&(H=new ck(j,S),H.auth(),H.onAuth(K=>{K.status==="fulfilled"&&j.setJwt(K.value)})),new h0(b,y,j,H)}static async load(e){const{dump:r,settings:n,editConfigOnMigration:i,onMigration:s,orchestrator:o}=e,{contexts:a,networks:c,tracker:l,services:u}=Rl({},ov,n);let f;if(VN(r)){var d,h,p;const S=r.config.address||we.context.addressOf(a[1],Wo.config.ConfigCoder.imageHashOf(Rl({},r.config,{version:1}))),P=((d=(h=r.jwt)==null?void 0:h.expiration)!=null?d:0)R.migratedAllChains)){if(s&&!await s(f))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await f.signAllMigrations(i),!await f.isMigratedAllChains().then(R=>R.migratedAllChains))throw Error("Failed to migrate account")}}else if(GN(r)){var m,v,y;const S=((m=(v=r.jwt)==null?void 0:v.expiration)!=null?m:0)async(n,i,s)=>{const o=s.messageDigest();return{isValid:await t(i).isValidSignature(s.address,o,s.signature)}},Ore=Object.freeze(Object.defineProperty({__proto__:null,AuthError:dC,CRITICAL_CHAINS:y6,ErrAccountIsRequired:HN,Session:h0,SessionSettingsDefault:ov,ValidateSequenceWalletProof:Tre,isSessionDumpV1:VN,isSessionDumpV2:GN,signAuthorization:WN},Symbol.toStringTag,{value:"Module"}));function xy(){return xy=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),$n({},n)).then(i=>Mn(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),$n({},n)).then(i=>Mn(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),$n({},n)).then(i=>Mn(i).then(s=>({status:s.status}))),this.getSignerConfig=(n,i)=>this.fetch(this.url("GetSignerConfig"),$n(n,i)).then(s=>Mn(s).then(o=>({signerConfig:o.signerConfig}))),this.sign=(n,i)=>this.fetch(this.url("Sign"),$n(n,i)).then(s=>Mn(s).then(o=>({sig:o.sig}))),this.signWith=(n,i)=>this.fetch(this.url("SignWith"),$n(n,i)).then(s=>Mn(s).then(o=>({sig:o.sig}))),this.authMethods=(n,i)=>this.fetch(this.url("AuthMethods"),$n(n,i)).then(s=>Mn(s).then(o=>({methods:o.methods,active:o.active}))),this.setPIN=(n,i)=>this.fetch(this.url("SetPIN"),$n(n,i)).then(s=>Mn(s).then(o=>({}))),this.resetPIN=(n,i)=>this.fetch(this.url("ResetPIN"),$n(n,i)).then(s=>Mn(s).then(o=>({}))),this.createTOTP=(n,i)=>this.fetch(this.url("CreateTOTP"),$n(n,i)).then(s=>Mn(s).then(o=>({uri:o.uri}))),this.commitTOTP=(n,i)=>this.fetch(this.url("CommitTOTP"),$n(n,i)).then(s=>Mn(s).then(o=>({codes:o.codes}))),this.resetTOTP=(n,i)=>this.fetch(this.url("ResetTOTP"),$n(n,i)).then(s=>Mn(s).then(o=>({}))),this.reset2FA=(n,i)=>this.fetch(this.url("Reset2FA"),$n(n,i)).then(s=>Mn(s).then(o=>({}))),this.recoveryCodes=(n,i)=>this.fetch(this.url("RecoveryCodes"),$n(n,i)).then(s=>Mn(s).then(o=>({codes:o.codes}))),this.resetRecoveryCodes=(n,i)=>this.fetch(this.url("ResetRecoveryCodes"),$n(n,i)).then(s=>Mn(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 $n=(t={},e={})=>({method:"POST",headers:xy({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Mn=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}),$re=typeof Un=="object"?Un.fetch:window.fetch;class Mre{constructor(e,r,n=!1){this.address=e,this.url=r,this.appendSuffix=n,this.guard=void 0,this.guard=new Rre(r,$re)}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(!we.isWalletSignRequestMetadata(r))throw new Error("expected sequence signature request metadata");const i=r.guardTotpCode,s=on.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:le(e),auxData:this.packMsgAndSig(r.address,r.digest,o,r.chainId),chainId:te.from(r.chainId).toNumber()},token:i?{id:wy.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 g6(e);r=await this.guard.authMethods({proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}return xy({},r,{methods:r.methods.map(Nre)})}async setPin(e,r){const n=await xh(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 xh(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 xh(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 g6(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 xh(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 xh(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 In.encode(["address","uint256","bytes","bytes"],[e,i,r,n])}suffix(){return this.appendSuffix?[3]:[]}}let wy=function(t){return t.PIN="PIN",t.TOTP="TOTP",t}({});function Nre(t){switch(t){case wy.PIN:case wy.TOTP:return t;default:throw new Error(`unknown auth method '${t}'`)}}function KN(t){return"signerAddress"in t&&typeof t.signerAddress=="string"}async function g6(t){if(KN(t))return t;{const e=d6.isSapientSigner(t.signer)?t.signer:new d6.SignerWrapper(t.signer),r=await e.getAddress(),n=new Date,i=YN(t.walletAddress,n),s=Y1(i);return{walletAddress:t.walletAddress,timestamp:n,signerAddress:r,signature:le(await e.sign(s,{}))}}}async function xh(t){if("wallet"in t){var e;const r=new Date,n=QN(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 YN(t,e){return{domain:JN,types:{AuthMethods:[{name:"wallet",type:"address"},{name:"timestamp",type:"string"}]},message:{wallet:Ue(t),timestamp:XN(e)}}}function QN(t){return{domain:JN,types:{AuthUpdate:[{name:"timestamp",type:"string"}]},message:{timestamp:XN(t)}}}const JN={name:"Sequence Guard",version:"1",chainId:1};function XN(t){return t.toUTCString().replace("GMT","UTC")}const Dre=Object.freeze(Object.defineProperty({__proto__:null,AuthMethod:wy,GuardSigner:Mre,getAuthUpdateProofTypedData:QN,getOwnershipProofTypedData:YN,isSignedOwnershipProof:KN,signOwnershipProof:g6},Symbol.toStringTag,{value:"Module"}));function Ey(){return Ey=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,c]=lk(a,h=>{try{if(h.next!==i)return!1;switch(h.request.method){case qr.ethCall:if(h.request.params[0].from||h.request.params[0].gasPrice||h.request.params[0].value)return!1;case qr.ethGetBalance:case qr.ethGetCode:const p=jre(h.request.params[1]);if(s===void 0&&(s=p),!Bre(p,s))return!1}return!0}catch{return!1}});if(c.length!==0&&(r.options.verbose&&console.log("Forwarding incompatible calls",c.length),r.forward(c),a.length===0)){r.options.verbose&&console.log("Skip multicall, all calls are incompatible");return}let o=a.map(h=>{try{switch(h.request.method){case qr.ethCall:return{delegateCall:!1,revertOnError:!1,target:h.request.params[0].to,data:h.request.params[0].data,gasLimit:h.request.params[0].gas?h.request.params[0].gas:0,value:0};case qr.ethGetCode:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callCode"),[h.request.params[0]])};case qr.ethGetBalance:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callBalanceOf"),[h.request.params[0]])};default:return null}}catch{return null}});var[a,c]=lk(a,(h,p)=>o[p]!==void 0);if(o=o.filter(h=>h),c.length!==0&&(r.options.verbose&&console.log("Forwarding calls on error",c.length),r.forward(c),a.length===0)){r.options.verbose&&console.log("Skip multicall, all calls had encoding errors");return}let l;try{r.options.verbose&&console.log("Encoding multicall"),l=r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("multiCall"),[o])}catch(h){r.options.verbose&&console.warn("Error encoding multicall, forwarding one by one",h),r.forward(a);return}const u=F8(),f=await Lre(B8(i)({id:u,jsonrpc:cd,method:qr.ethCall,params:[{to:r.options.contract,value:0,data:l},te.isBigNumber(s)?s.toNumber():s]}),h=>({jsonrpc:cd,id:u,result:void 0,error:h}));if(f.error)return r.options.verbose&&console.warn("Error calling multicall, forwarding one by one",f.error),r.forward(a);let d;try{d=r.multicallInterface.decodeFunctionResult(r.multicallInterface.getFunction("multiCall"),f.result)}catch(h){r.options.verbose&&console.warn("Error decoding multicall result, forwarding one by one",h),r.forward(a);return}r.options.verbose&&console.log("Got response for",a.length),a.forEach((h,p)=>{if(!d[0][p])r.options.verbose&&console.warn(`Multicall error for ${h.request.method} not found`),r.forward(h);else switch(h.request.method){case qr.ethCall:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:d[1][p]});break;case qr.ethGetCode:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:In.decode(["bytes"],d[1][p])[0]});break;case qr.ethGetBalance:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:In.decode(["uint256"],d[1][p])[0]});break}})},this.options=e?Ey({},es.DefaultOptions,e):es.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&&es.isMulticallOptions(e.options)}static isMulticallOptions(e){return e!==void 0&&e.batchSize!==void 0&&e.timeWindow!==void 0&&e.contract!==void 0}}es.DefaultOptions=Ey({},Fre);const ZN=["getNetwork","getBlockNumber","getGasPrice","getTransactionCount","getStorageAt","sendTransaction","estimateGas","getBlock","getTransaction","getTransactionReceipt","getLogs","emit","litenerCount","addListener","removeListener","waitForTransaction","detectNetwork","getBlockWithTransactions"];class Ure extends nb{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 K5(n,o.address,o.name):null}return s.getResolver(await i)},this.next=async function(i,s){try{switch(i.method){case qr.ethCall:n.callback(i,s,await n.provider.call(i.params[0],i.params[1]));break;case qr.ethGetCode:n.callback(i,s,await n.provider.getCode(i.params[0],i.params[1]));break;case qr.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=es.isMulticall(r)?r:new es(r),ZN.forEach(i=>{e[i]!==void 0&&(this[i]=(...s)=>e[i](...s))})}callback(e,r,n,i){r(i,{jsonrpc:cd,id:e.id,result:n,error:i})}async call(e,r){return this.rpcCall(qr.ethCall,e,r)}async getCode(e,r){return this.rpcCall(qr.ethGetCode,e,r)}async getBalance(e,r){return this.rpcCall(qr.ethGetBalance,e,r)}async rpcCall(e,...r){const n=F8();return(await B8(this.multicall.handle)(this.next,{jsonrpc:cd,id:n,method:e,params:r})).result}}class zre{constructor(e,r){if(this.provider=e,this.multicall=void 0,this.multicall=es.isMulticall(r)?r:new es(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 qre=t=>e=>{const r=es.isMulticall(t)?t:new es(t);return(n,i)=>r.handle(e,n,i)};var Wre=Object.freeze({__proto__:null,ProxyMethods:ZN,MulticallProvider:Ure,MulticallExternalProvider:zre,multicallMiddleware:qre});const Hre=Object.freeze(Object.defineProperty({__proto__:null,Multicall:es,providers:Wre},Symbol.toStringTag,{value:"Module"}));var eD={exports:{}};(function(t,e){(function(r){var n=Object.hasOwnProperty,i=Array.isArray?Array.isArray:function(O){return Object.prototype.toString.call(O)==="[object Array]"},s=10,o=typeof sn=="object"&&typeof sn.nextTick=="function",a=typeof Symbol=="function",c=typeof Reflect=="object",l=typeof setImmediate=="function",u=l?setImmediate:setTimeout,f=a?c&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(A){var O=Object.getOwnPropertyNames(A);return O.push.apply(O,Object.getOwnPropertySymbols(A)),O}:Object.keys;function d(){this._events={},this._conf&&h.call(this,this._conf)}function h(A){A&&(this._conf=A,A.delimiter&&(this.delimiter=A.delimiter),A.maxListeners!==r&&(this._maxListeners=A.maxListeners),A.wildcard&&(this.wildcard=A.wildcard),A.newListener&&(this._newListener=A.newListener),A.removeListener&&(this._removeListener=A.removeListener),A.verboseMemoryLeak&&(this.verboseMemoryLeak=A.verboseMemoryLeak),A.ignoreErrors&&(this.ignoreErrors=A.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function p(A,O){var B="(node) warning: possible EventEmitter memory leak detected. "+A+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(B+=" Event name: "+O+"."),typeof sn<"u"&&sn.emitWarning){var I=new Error(B);I.name="MaxListenersExceededWarning",I.emitter=this,I.count=A,sn.emitWarning(I)}else console.error(B),console.trace&&console.trace()}var m=function(A,O,B){var I=arguments.length;switch(I){case 0:return[];case 1:return[A];case 2:return[A,O];case 3:return[A,O,B];default:for(var C=new Array(I);I--;)C[I]=arguments[I];return C}};function v(A,O){for(var B={},I,C=A.length,D=O?O.length:0,q=0;q0;)A=D[W],q.call(_,A,B[A]);this._listeners={},this._listenersCount=0,V()}}});function b(A,O,B,I){var C=Object.assign({},O);if(!A)return C;if(typeof A!="object")throw TypeError("options must be an object");var D=Object.keys(A),q=D.length,_,W,V;function J(se){throw Error('Invalid "'+_+'" option value'+(se?". Reason: "+se:""))}for(var ee=0;ee0;)if(_===A[W])return D;q(O)}}var P=S(["function"]),R=S(["object","function"]);function L(A,O,B){var I,C,D=0,q,_=new A(function(W,V,J){B=b(B,{timeout:0,overload:!1},{timeout:function(ae,be){return ae*=1,(typeof ae!="number"||ae<0||!Number.isFinite(ae))&&be("timeout must be a positive number"),ae}}),I=!B.overload&&typeof A.prototype.cancel=="function"&&typeof J=="function";function ee(){C&&(C=null),D&&(clearTimeout(D),D=0)}var se=function(ae){ee(),W(ae)},ie=function(ae){ee(),V(ae)};I?O(se,ie,J):(C=[function(ae){ie(ae||Error("canceled"))}],O(se,ie,function(ae){if(q)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof ae!="function")throw TypeError("onCancel callback must be a function");C.push(ae)}),q=!0),B.timeout>0&&(D=setTimeout(function(){var ae=Error("timeout");ae.code="ETIMEDOUT",D=0,_.cancel(ae),V(ae)},B.timeout))});return I||(_.cancel=function(W){if(C){for(var V=C.length,J=1;J0;)ie=Ae[_],ie!=="_listeners"&&(Xe=H(A,O,B[ie],I+1,C),Xe&&(se?se.push.apply(se,Xe):se=Xe));return se}else if(Ne==="**"){for(ve=I+1===C||I+2===C&&ke==="*",ve&&B._listeners&&(se=H(A,O,B,C,C)),Ae=f(B),_=Ae.length;_-- >0;)ie=Ae[_],ie!=="_listeners"&&(ie==="*"||ie==="**"?(B[ie]._listeners&&!ve&&(Xe=H(A,O,B[ie],C,C),Xe&&(se?se.push.apply(se,Xe):se=Xe)),Xe=H(A,O,B[ie],I,C)):ie===ke?Xe=H(A,O,B[ie],I+2,C):Xe=H(A,O,B[ie],I,C),Xe&&(se?se.push.apply(se,Xe):se=Xe));return se}else B[Ne]&&(se=H(A,O,B[Ne],I+1,C));if(ae=B["*"],ae&&H(A,O,ae,I+1,C),be=B["**"],be)if(I0;)ie=Ae[_],ie!=="_listeners"&&(ie===ke?H(A,O,be[ie],I+2,C):ie===Ne?H(A,O,be[ie],I+1,C):(he={},he[ie]=be[ie],H(A,O,{"**":he},I+1,C)));else be._listeners?H(A,O,be,C,C):be["*"]&&be["*"]._listeners&&H(A,O,be["*"],C,C);return se}function K(A,O,B){var I=0,C=0,D,q=this.delimiter,_=q.length,W;if(typeof A=="string")if((D=A.indexOf(q))!==-1){W=new Array(5);do W[I++]=A.slice(C,D),C=D+_;while((D=A.indexOf(q,C))!==-1);W[I++]=A.slice(C)}else W=[A],I=1;else W=A,I=A.length;if(I>1){for(D=0;D+10&&V._listeners.length>this._maxListeners&&(V._listeners.warned=!0,p.call(this,V._listeners.length,J))):V._listeners=O,!0;return!0}function Y(A,O,B,I){for(var C=f(A),D=C.length,q,_,W,V=A._listeners,J;D-- >0;)_=C[D],q=A[_],_==="_listeners"?W=B:W=B?B.concat(_):[_],J=I||typeof _=="symbol",V&&O.push(J?W:W.join(this.delimiter)),typeof q=="object"&&Y.call(this,q,O,W,J);return O}function Q(A){for(var O=f(A),B=O.length,I,C,D;B-- >0;)C=O[B],I=A[C],I&&(D=!0,C!=="_listeners"&&!Q(I)&&delete A[C]);return D}function F(A,O,B){this.emitter=A,this.event=O,this.listener=B}F.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function x(A,O,B){if(B===!0)C=!0;else if(B===!1)I=!0;else{if(!B||typeof B!="object")throw TypeError("options should be an object or true");var I=B.async,C=B.promisify,D=B.nextTick,q=B.objectify}if(I||D||C){var _=O,W=O._origin||O;if(D&&!o)throw Error("process.nextTick is not supported");C===r&&(C=O.constructor.name==="AsyncFunction"),O=function(){var V=arguments,J=this,ee=this.event;return C?D?Promise.resolve():new Promise(function(se){u(se)}).then(function(){return J.event=ee,_.apply(J,V)}):(D?sn.nextTick:u)(function(){J.event=ee,_.apply(J,V)})},O._async=!0,O._origin=W}return[O,q?new F(this,A,O):this]}function k(A){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,h.call(this,A)}k.EventEmitter2=k,k.prototype.listenTo=function(A,O,B){if(typeof A!="object")throw TypeError("target musts be an object");var I=this;B=b(B,{on:r,off:r,reducers:r},{on:P,off:P,reducers:R});function C(D){if(typeof D!="object")throw TypeError("events must be an object");var q=B.reducers,_=j.call(I,A),W;_===-1?W=new y(I,A,B):W=I._observers[_];for(var V=f(D),J=V.length,ee,se=typeof q=="function",ie=0;ie0;)C=B[I],(!A||C._target===A)&&(C.unsubscribe(O),D=!0);return D},k.prototype.delimiter=".",k.prototype.setMaxListeners=function(A){A!==r&&(this._maxListeners=A,this._conf||(this._conf={}),this._conf.maxListeners=A)},k.prototype.getMaxListeners=function(){return this._maxListeners},k.prototype.event="",k.prototype.once=function(A,O,B){return this._once(A,O,!1,B)},k.prototype.prependOnceListener=function(A,O,B){return this._once(A,O,!0,B)},k.prototype._once=function(A,O,B,I){return this._many(A,1,O,B,I)},k.prototype.many=function(A,O,B,I){return this._many(A,O,B,!1,I)},k.prototype.prependMany=function(A,O,B,I){return this._many(A,O,B,!0,I)},k.prototype._many=function(A,O,B,I,C){var D=this;if(typeof B!="function")throw new Error("many only accepts instances of Function");function q(){return--O===0&&D.off(A,q),B.apply(this,arguments)}return q._origin=B,this._on(A,q,I,C)},k.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||d.call(this);var A=arguments[0],O,B=this.wildcard,I,C,D,q,_;if(A==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(B&&(O=A,A!=="newListener"&&A!=="removeListener"&&typeof A=="object")){if(C=A.length,a){for(D=0;D3)for(I=new Array(W-1),q=1;q3)for(C=new Array(V-1),_=1;_0&&this._events[A].length>this._maxListeners&&(this._events[A].warned=!0,p.call(this,this._events[A].length,A))):this._events[A]=O,C)},k.prototype.off=function(A,O){if(typeof O!="function")throw new Error("removeListener only takes instances of Function");var B,I=[];if(this.wildcard){var C=typeof A=="string"?A.split(this.delimiter):A.slice();if(I=H.call(this,null,C,this.listenerTree,0),!I)return this}else{if(!this._events[A])return this;B=this._events[A],I.push({_listeners:B})}for(var D=0;D0){for(I=this._all,O=0,B=I.length;O0;)I=O[B[D]],typeof I=="function"?C.push(I):C.push.apply(C,I);return C}else{if(this.wildcard){if(q=this.listenerTree,!q)return[];var _=[],W=typeof A=="string"?A.split(this.delimiter):A.slice();return H.call(this,_,W,q,0),_}return O?(I=O[A],I?typeof I=="function"?[I]:I:[]):[]}},k.prototype.eventNames=function(A){var O=this._events;return this.wildcard?Y.call(this,this.listenerTree,[],null,A):O?f(O):[]},k.prototype.listenerCount=function(A){return this.listeners(A).length},k.prototype.hasListeners=function(A){if(this.wildcard){var O=[],B=typeof A=="string"?A.split(this.delimiter):A.slice();return H.call(this,O,B,this.listenerTree,0),O.length>0}var I=this._events,C=this._all;return!!(C&&C.length||I&&(A===r?f(I).length:I[A]))},k.prototype.listenersAny=function(){return this._all?this._all:[]},k.prototype.waitFor=function(A,O){var B=this,I=typeof O;return I==="number"?O={timeout:O}:I==="function"&&(O={filter:O}),O=b(O,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:P,Promise:E}),L(O.Promise,function(C,D,q){function _(){var W=O.filter;if(!(W&&!W.apply(B,arguments)))if(B.off(A,_),O.handleError){var V=arguments[0];V?D(V):C(m.apply(null,arguments).slice(1))}else C(m.apply(null,arguments))}q(function(){B.off(A,_)}),B._on(A,_,!1)},{timeout:O.timeout,overload:O.overload})};function N(A,O,B){B=b(B,{Promise,timeout:0,overload:!1},{Promise:E});var I=B.Promise;return L(I,function(C,D,q){var _;if(typeof A.addEventListener=="function"){_=function(){C(m.apply(null,arguments))},q(function(){A.removeEventListener(O,_)}),A.addEventListener(O,_,{once:!0});return}var W=function(){V&&A.removeListener("error",V),C(m.apply(null,arguments))},V;O!=="error"&&(V=function(J){A.removeListener(O,W),D(J)},A.once("error",V)),q(function(){V&&A.removeListener("error",V),A.removeListener(O,W)}),A.once(O,W)},{timeout:B.timeout,overload:B.overload})}var M=k.prototype;Object.defineProperties(k,{defaultMaxListeners:{get:function(){return M._maxListeners},set:function(A){if(typeof A!="number"||A<0||Number.isNaN(A))throw TypeError("n must be a non-negative number");M._maxListeners=A},enumerable:!0},once:{value:N,writable:!0,configurable:!0}}),Object.defineProperties(M,{_maxListeners:{value:s,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof r=="function"&&r.amd?r(function(){return k}):t.exports=k})()})(eD);var hb=eD.exports;function Vre(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function Gre(t,...e){if(!Vre(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 uk(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 Kre(t,e){Gre(t);const r=e.outputLen;if(t.lengthnew DataView(t.buffer,t.byteOffset,t.byteLength),Hs=(t,e)=>t<<32-e|t>>>e,Yre=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Yre)throw new Error("Non little-endian hardware is not supported");const Qre=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Jre(t){if(!tD(t))throw new Error("Uint8Array expected");let e="";for(let r=0;rt().update(rD(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function tne(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),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}class rne extends Zre{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=Bx(this.buffer)}update(e){uk(this);const{view:r,buffer:n,blockLen:i}=this;e=rD(e);const s=e.length;for(let o=0;oi-o&&(this.process(n,0),o=0);for(let f=o;fu.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;ft&e^~t&r,ine=(t,e,r)=>t&e^t&r^e&r,sne=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]),Ga=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ka=new Uint32Array(64);class one extends rne{constructor(){super(64,32,8,!1),this.A=Ga[0]|0,this.B=Ga[1]|0,this.C=Ga[2]|0,this.D=Ga[3]|0,this.E=Ga[4]|0,this.F=Ga[5]|0,this.G=Ga[6]|0,this.H=Ga[7]|0}get(){const{A:e,B:r,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[e,r,n,i,s,o,a,c]}set(e,r,n,i,s,o,a,c){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=c|0}process(e,r){for(let f=0;f<16;f++,r+=4)Ka[f]=e.getUint32(r,!1);for(let f=16;f<64;f++){const d=Ka[f-15],h=Ka[f-2],p=Hs(d,7)^Hs(d,18)^d>>>3,m=Hs(h,17)^Hs(h,19)^h>>>10;Ka[f]=m+Ka[f-7]+p+Ka[f-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:l,H:u}=this;for(let f=0;f<64;f++){const d=Hs(a,6)^Hs(a,11)^Hs(a,25),h=u+d+nne(a,c,l)+sne[f]+Ka[f]|0,m=(Hs(n,2)^Hs(n,13)^Hs(n,22))+ine(n,i,s)|0;u=l,l=c,c=a,a=o+h|0,o=s,s=i,i=n,n=h+m|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,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,i,s,o,a,c,l,u)}roundClean(){Ka.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const ane=ene(()=>new one);var cne=class{constructor(t,e){dt(this,"hostname");dt(this,"fetch");dt(this,"path","/rpc/Databeat/");dt(this,"ping",(t,e)=>this.fetch(this.url("Ping"),wh({},t,e)).then(r=>Eh(r).then(n=>({status:n.status})),r=>{throw rf.new({cause:`fetch(): ${r.message||""}`})}));dt(this,"version",(t,e)=>this.fetch(this.url("Version"),wh({},t,e)).then(r=>Eh(r).then(n=>({version:n.version})),r=>{throw rf.new({cause:`fetch(): ${r.message||""}`})}));dt(this,"runtimeStatus",(t,e)=>this.fetch(this.url("RuntimeStatus"),wh({},t,e)).then(r=>Eh(r).then(n=>({status:n.status})),r=>{throw rf.new({cause:`fetch(): ${r.message||""}`})}));dt(this,"tick",(t,e,r)=>this.fetch(this.url("Tick"),wh(t,e,r)).then(n=>Eh(n).then(i=>({ok:i.ok})),n=>{throw rf.new({cause:`fetch(): ${n.message||""}`})}));dt(this,"rawEvents",(t,e,r)=>this.fetch(this.url("RawEvents"),wh(t,e,r)).then(n=>Eh(n).then(i=>({ok:i.ok})),n=>{throw rf.new({cause:`fetch(): ${n.message||""}`})}));this.hostname=t,this.fetch=(r,n)=>e(r,n)}url(t){return this.hostname+this.path+t}},wh=(t={},e={},r=null)=>({method:"POST",headers:{...e,"Content-Type":"application/json"},body:JSON.stringify(t||{}),signal:r}),Eh=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let i="";throw n instanceof Error&&(i=n.message),lD.new({status:t.status,cause:`JSON.parse(): ${i}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(kne[n]||Yr).new(r)}return r}),Yr=class nD extends Error{constructor(r,n,i,s,o){super(i);dt(this,"name");dt(this,"code");dt(this,"message");dt(this,"status");dt(this,"cause");dt(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,nD.prototype)}static new(r){return new this(r.error,r.code,r.message||r.msg,r.status,r.cause)}},lne=class iD extends Yr{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,iD.prototype)}},rf=class sD extends Yr{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,sD.prototype)}},une=class oD extends Yr{constructor(e="WebrpcBadRoute",r=-2,n="bad route",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,oD.prototype)}},fne=class aD extends Yr{constructor(e="WebrpcBadMethod",r=-3,n="bad method",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,aD.prototype)}},dne=class cD extends Yr{constructor(e="WebrpcBadRequest",r=-4,n="bad request",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,cD.prototype)}},lD=class uD extends Yr{constructor(e="WebrpcBadResponse",r=-5,n="bad response",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,uD.prototype)}},hne=class fD extends Yr{constructor(e="WebrpcServerPanic",r=-6,n="server panic",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,fD.prototype)}},pne=class dD extends Yr{constructor(e="WebrpcInternalError",r=-7,n="internal error",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,dD.prototype)}},mne=class hD extends Yr{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,hD.prototype)}},vne=class pD extends Yr{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,pD.prototype)}},yne=class mD extends Yr{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,mD.prototype)}},gne=class vD extends Yr{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,vD.prototype)}},bne=class yD extends Yr{constructor(e="PermissionDenied",r=2e3,n="Permission denied",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,yD.prototype)}},xne=class gD extends Yr{constructor(e="SessionExpired",r=2001,n="Session expired",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,gD.prototype)}},wne=class bD extends Yr{constructor(e="NotFound",r=3e3,n="Resource not found",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,bD.prototype)}},Ene=class xD extends Yr{constructor(e="InvalidAppKey",r=4e3,n="Invalid app key",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,xD.prototype)}},Cne=class wD extends Yr{constructor(e="QueryFailed",r=4001,n="DB query failed",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,wD.prototype)}},Sne=class ED extends Yr{constructor(e="InvalidProjectId",r=4002,n="Invalid project id",i=0,s){super(e,r,n,i,s),Object.setPrototypeOf(this,ED.prototype)}},kne={0:lne,[-1]:rf,[-2]:une,[-3]:fne,[-4]:dne,[-5]:lD,[-6]:hne,[-7]:pne,[-8]:mne,[-9]:vne,[-10]:yne,1e3:gne,2e3:bne,2001:xne,3e3:wne,4e3:Ene,4001:Cne,4002:Sne},Ane=class extends cne{constructor(e,r){const n=typeof Un=="object"?Un.fetch.bind(Un):window.fetch.bind(window);super(e.endsWith("/")?e.slice(0,-1):e,n);dt(this,"_globalFetch");dt(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}},fk=150,xl={defaultEnabled:!0,noop:!1,privacy:{userIdHash:!0,userAgentSalt:!1},userIdentTracking:!1,strictMode:!1,flushInterval:500,initProps:()=>({})},_ne=class{constructor(t,e,r){dt(this,"rpc");dt(this,"auth");dt(this,"options");dt(this,"enabled");dt(this,"ident");dt(this,"userId");dt(this,"sessionId");dt(this,"allowUserTracking");dt(this,"projectId");dt(this,"queue");dt(this,"flushTimeout");dt(this,"defaultProps");dt(this,"previousPageKey");dt(this,"ts");dt(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}`)}});dt(this,"dedupedQueue",()=>{const t=new Map;for(let e=0;efk&&(this.queue=this.queue.splice(this.queue.length-fk)),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=hk(),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=b6();if(!(t==null||t.id===null))return this.ts=t.ts,this.ts}enable(){if(!CD(this.auth)){this.enabled=!1;return}Jo()&&(this.enabled=!0,this.ts=Bu({on:this.enabled,id:this.userId,it:this.ident,ut:this.allowUserTracking}),this.identify())}disable(){Jo()&&(this.enabled=!1,this.ts=Bu({on:this.enabled,id:this.userId,it:this.ident,ut:this.allowUserTracking}))}},Jo=()=>typeof window=="object"&&typeof window.localStorage=="object"&&typeof window.localStorage.getItem=="function"&&typeof window.localStorage.setItem=="function",dk=(t,e)=>{if(!CD(e))return!1;if(!Jo())return!0;const r=b6();return r===null?t??!0:r.on},CD=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)},hk=()=>{try{return window.location.pathname}catch{return""}},Pne=()=>{if(!Jo())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},Cy="_dbeat",b6=()=>{try{return JSON.parse(window.localStorage.getItem(Cy))}catch{return null}},Bu=t=>{try{return t.ts||(t.ts=Math.floor(Date.now()/1e3)),window.localStorage.setItem(Cy,JSON.stringify(t)),t.ts}catch{return}},Ine=(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 Jo()&&r.privacy.userAgentSalt===!0&&(t=t+":"+navigator.userAgent),r.privacy.extraSalt&&r.privacy.extraSalt.length>0&&(t=t+":"+r.privacy.extraSalt),{userId:Jre(ane(t)).substring(0,50),ident:1};throw new Error("invalid configuration")},Tne=()=>{if(Jo()&&typeof window.sessionStorage=="object"&&typeof window.sessionStorage.getItem=="function"&&typeof window.sessionStorage.setItem=="function"){const e=window.sessionStorage.getItem(Cy);if(e&&e.length>0)return e;{const r=pk(16);return window.sessionStorage.setItem(Cy,r),r}}else return pk(16)},pk=t=>{let e="";for(let r=0;r[Te(Ct(t)).slice(0,10),t]));function x6(t,e){const r=we.transaction.fromTransactionish(t,e);we.transaction.unwind(t,r).forEach(i=>Rne(t,i))}function Rne(t,e){if(e.to.toLowerCase()===t.toLowerCase()&&e.data){const r=fe(e.data);if(r.length>=4&&!$ne(r))throw new Error("self calls are forbidden")}if(e.delegateCall)throw new Error("delegate calls are forbidden");if(e.data){const n=le(e.data).slice(0,10),i=One.get(n);if(i){const s=i.slice(0,i.indexOf("("));throw new Error(`${s} calls are forbidden`)}}}function $ne(t){const e=new Sr(Zr.mainModule.abi);try{return e.decodeFunctionData("createContract",t),!0}catch{return!1}}function Zn(){return Zn=Object.assign?Object.assign.bind():function(t){for(var e=1;e++Mne;class tp{constructor(){var e=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.state=void 0,this.confirmationOnly=!1,this.events=new hb.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===Fi.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:_D(),type:st.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,c)=>{if(a)i(a);else if(c)n(c);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):(Ce.debug("pushing to pending requests",r),e.pendingMessageRequests.push(r))})},this.waitUntilOpened=async function(r=hC){let n=!1;return Promise.race([new Promise((i,s)=>{const o=setTimeout(()=>{clearTimeout(o),n||(e.state=Fi.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=Fi.CLOSED,this._registered=!1,this._init=nr.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===Fi.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===st.INIT){Ce.debug("MessageProvider, received INIT message",e);const{nonce:c}=e.data;if(!c||c.length==0){Ce.error("invalid init nonce");return}this._init=nr.OK,this.sendMessage({idx:-1,type:st.INIT,data:{sessionId:this._sessionId,nonce:c}})}if(this._init!==nr.OK)return;Ce.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===st.OPEN&&!this.isOpened()){var s,o;if(this._sessionId&&this._sessionId!==((s=e.data)==null?void 0:s.sessionId)){Ce.debug("open event received from wallet, but does not match sessionId",this._sessionId);return}if((o=e.data)!=null&&o.error){var a;const c=new Error(`opening wallet failed: received ${(a=e.data)==null?void 0:a.error}`);throw Ce.error(c),this.close(),c}this.state=Fi.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(l){r.sendMessage(l)});return}if(e.type===st.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===st.ACCOUNTS_CHANGED){this.accountsChangedPayload={accounts:[]},e.data&&e.data.length>0?(this.accountsChangedPayload={accounts:[Ue(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===st.CHAIN_CHANGED){this.events.emit("chainChanged",e.data,e.origin);return}if(e.type===st.NETWORKS){this.networksPayload=e.data,this.events.emit("networks",this.networksPayload);return}if(e.type===st.WALLET_CONTEXT){this.walletContextPayload=e.data,this.events.emit("walletContext",this.walletContextPayload);return}e.type===st.CLOSE&&this.state!==Fi.CLOSED&&this.close(e.data),e.type===st.CONNECT&&(this.connectPayload=e.data,this.events.emit("connect",this.connectPayload)),e.type===st.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!==Fi.CLOSED&&(this.state=Fi.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,Ce.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(Zn({},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 Nne(t){return Dne.some(e=>e.predicate(t))}const Dne=[{name:"Decentraland Exception",predicate:jne},{name:"0x v3 Exception",predicate:Bne}],Lne=/^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 jne(t){try{const e=cs(t);return Lne.test(e)}catch{return!1}}function Bne(t){const e=new Sr(Fne);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const Fne=[{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"}],av=Ct(`Ethereum Signed Message: -`),pC=t=>Ns(t)?fe(t):Ct(t),pb=t=>{const e=pC(t);return Nne(e)?e:At([av,Ct(String(e.length)),e])},Une=t=>{if(JSON.stringify(t.slice(0,av.length))!==JSON.stringify(av))return t;const e=t.slice(av.length),r=String(e.length).length;let n,i;try{i=Number(cs(e.slice(0,r)))}catch{i=Number(le(e.slice(0,r)))}return i>e.length||!Number.isInteger(i)?n=r-1:n=r,e.slice(n)},ud=async(t,e,r,n)=>new we.reader.OnChainReader(n).isValidSignature(t,e,r),PD=async(t,e,r,n)=>{const i=pb(e),s=j8(i);return ud(t,s,r,n)},ID=(t,e,r,n)=>ud(t,Y1(e),r,n),Sy=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",TD=()=>!!navigator.userAgent.match(/UnitySequence/i),OD=t=>t.onChain.deployed&&t.fullyMigrated;class RD{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 t1{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(this.callbacks=[],!t1.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 ky(){return t1.isAvailable()?new t1:new RD}async function $D(t){return Array.isArray(t)?Promise.all(t.map(e=>It(e))):It(t)}const mk="@sequence.transportSession";class rp{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!==nr.OK){if(i.type===st.INIT)if(r.isValidInitAck(n))r._initCallback&&r._initCallback();else{r._initCallback&&r._initCallback("invalid init");return}return}switch(i.type){case st.OPEN:{if(r._init!==nr.OK)return;const s={sessionId:i.data.sessionId,intent:i.data.intent,networkId:i.data.networkId};await r.open(s);return}case st.CLOSE:return r._init!==nr.OK,void 0;case st.MESSAGE:{const s=await r.walletRequestHandler.sendMessageRequest(i);r.sendMessage(s),s.data.error;return}default:Ce.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=wM(n),r.saveTransportSession({sessionId:n,intent:i,networkId:s})),r.walletRequestHandler.setOpenIntent(i),await r.init();let o;try{if(s){const a=z8(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,c=a;if(r.appOrigin&&c!=null&&c.origin){if(!Sy()&&c.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&c!=null&&c.origin?a.origin=CM(c.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=EM(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){Ce.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=>{ky().setItem(mk,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=ky().getItem(mk);try{return n?JSON.parse(n):null}catch{return console.error(`unable to parse transport session: ${n}`),null}},this.walletRequestHandler=e,this._init=nr.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(Zi(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:st.OPEN,data:{chainId:r,sessionId:n,session:i,error:s}})}notifyClose(e){this.sendMessage({idx:-1,type:st.CLOSE,data:e?{error:e}:null})}notifyConnect(e){this.sendMessage({idx:-1,type:st.CONNECT,data:e})}notifyDisconnect(e,r){this.sendMessage({idx:-1,type:st.DISCONNECT,data:e?{error:e}:null,origin:r})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:st.ACCOUNTS_CHANGED,data:e,origin:r})}notifyChainChanged(e,r){this.sendMessage({idx:-1,type:st.CHAIN_CHANGED,data:e,origin:r})}notifyNetworks(e){this.sendMessage({idx:-1,type:st.NETWORKS,data:e})}notifyWalletContext(e){this.sendMessage({idx:-1,type:st.WALLET_CONTEXT,data:e})}isValidInitAck(e){if(this._init===nr.OK)return Ce.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==st.INIT)return Ce.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(Ce.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(Ce.error("invalid init ack match"),!1):!0}init(){return new Promise((e,r)=>{if(this._init===nr.OK){e();return}if(this._init!==nr.NIL||this._initCallback){r("transport init is in progress");return}const n=setTimeout(()=>{Ce.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},hC/2);this._initCallback=i=>{this._initCallback=void 0,clearTimeout(n),i?r(i):(this._init=nr.OK,e())},this._initNonce=`${performance.now()}`,this.sendMessage({idx:-1,type:st.INIT,data:{nonce:this._initNonce}}),this._init=nr.SENT_NONCE})}}class zne{constructor(){this.app=void 0,this.wallet=void 0;const e=new w6,r=new w6;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class w6{constructor(){this.conn=void 0,this.events=new hb.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 MD extends tp{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===Fi.CLOSED){this.state=Fi.OPENING;const s=`${performance.now()}`;this._sessionId=s,this.sendMessage({idx:-1,type:st.OPEN,data:{path:r,intent:n,networkId:i,sessionId:s}})}},this.state=Fi.CLOSED,this.port=e,!e)throw new Error("port argument cannot be empty");this._init=nr.OK}closeWallet(){this.sendMessage({idx:-1,type:st.CLOSE,data:null}),this.close()}sendMessage(e){if(!e.idx)throw new Error("message idx is empty");this.port.sendMessage(e)}}class qne extends rp{constructor(e,r){super(e),this.port=void 0,this.port=r,this._init=nr.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 ND(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}: ${Fx(i)}`)},console.warn=(...i)=>{n.warnfromjs(`${t}: ${Fx(i)}`)},console.error=(...i)=>{n.errorfromjs(`${t}: ${Fx(i)}`)},window.logsOverriddenForUnreal=!0}}function Fx(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let Fu;class DD extends tp{constructor(e){super(),this.walletURL=void 0,this.register=()=>{var r;ND("dapp"),Fu&&(Fu.unregister(),Fu=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),Fu=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r;this._registered=!1,this.closeWallet(),Fu===this&&(Fu=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 ep;r&&(s.pathname=r.toLowerCase()),this._init=nr.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",D8(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 Wne extends rp{constructor(e){super(e),this.onMessageFromUnreal=r=>{Ce.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new ep(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:L8(n.get("intent"))}},this._init=nr.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;ND("wallet");const{search:n}=new URL(e||window.location.href);let i=this.getUnrealTransportSession(n);if(!!i.sessionId||(i=await this.getCachedTransportSession()),!i){Ce.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 c=`failed to open to network ${(a=i)==null?void 0:a.networkId}`;Ce.error(c),this.notifyClose({message:c}),window.close()}}).catch(o=>{var a;const c=`failed to open to network ${(a=i)==null?void 0:a.networkId}, due to: ${o}`;Ce.error(c),this.notifyClose({message:c}),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!==st.INIT&&this._init!==nr.OK){Ce.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 mC="sequence-extension-message-handler";class Hne extends rp{constructor(e,r){super(e),this.runtime=r,this.port=void 0,this._init=nr.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:mC})}sendMessage(e){Ce.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class LD extends tp{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===mC&&(this._init=nr.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class Vne extends hb.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;Ce.info("[received message]",n);const i=n.idx,s=this.responseCallbacks.get(i);switch(i&&this.responseCallbacks.delete(i),n.type){case st.MESSAGE:if(s)this.emit(st.MESSAGE,n),s(n.data.error,n);else throw new Error("impossible state");break;case st.DISCONNECT:case st.ACCOUNTS_CHANGED:case st.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=(c,l)=>{if(c)s(c);else if(l)i(l);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 Uu;class jD extends tp{constructor(e){super(),this.walletURL=void 0,this.walletWindow=void 0,this.register=()=>{Uu&&(Uu.unregister(),Uu=this),window.addEventListener("message",this.onWindowEvent),Uu=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(),Uu===this&&(Uu=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 ep;r&&r!==""&&(s.pathname=r.toLowerCase()),this._init=nr.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&(n.type==="connect"&&(n.options||(n.options={app:window.location.origin}),!Sy()&&!TD()&&n.options&&(n.options.origin=window.location.origin)),o.set("intent",D8(n))),i&&o.set("net",`${i}`);let a,c;Sy()?(a=[450,750],c=[Math.abs(window.screen.width/2-a[0]/2),Math.abs(window.screen.height/2-a[1]/2)]):(a=[450,750],c=[Math.abs(window.screenX+window.innerWidth/2-a[0]/2),Math.abs(window.screenY+window.innerHeight/2-a[1]/2)]);const l=`toolbar=0,location=0,menubar=0,scrollbars=yes,status=yes,width=${a[0]},height=${a[1]},left=${c[0]},top=${c[1]}`;s.search=o.toString(),this.walletWindow=window.open(s.href,"sequence.app",l)},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){Ce.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 Gne extends rp{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(Ce.debug("RECEIVED MESSAGE",i),r._init!==nr.OK&&r.isValidInitAck(i)&&(r.appOrigin=n.origin),r._init===nr.OK&&(!r.appOrigin||r.appOrigin.length<8)){Ce.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(i)},this.getWindowTransportSession=n=>{const i=new ep(n);return{sessionId:i.get("sid"),networkId:i.get("net"),intent:L8(i.get("intent"))}},this._init=nr.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){Ce.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 c;const l=`failed to open to network ${(c=s)==null?void 0:c.networkId}`;Ce.error(l),this.notifyClose({message:l}),window.close()}}).catch(a=>{var c;const l=`failed to open to network ${(c=s)==null?void 0:c.networkId}, due to: ${a}`;Ce.error(l),this.notifyClose({message:l}),window.close()})}unregister(){window.removeEventListener("message",this.onWindowEvent),this._registered=!1}sendMessage(e){const r=JSON.stringify(e);e.type===st.INIT?this.postMessage(r,!0):this.postMessage(r)}get isPopup(){return this._isPopup}postMessage(e,r=!1){if(r!==!0&&this._init!==nr.OK){Ce.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):Ce.error("unable to postMessage as parentOrigin is invalid")}}function BD(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 mb{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 mb;if((r=e.windowTransport)!=null&&r.enabled&&typeof window=="object"&&e.walletAppURL){const a=new jD(e.walletAppURL);o.add(a)}if((n=e.proxyTransport)!=null&&n.enabled){const a=new MD(e.proxyTransport.appPort);o.add(a)}if((i=e.extensionTransport)!=null&&i.enabled){const a=new LD(e.extensionTransport.runtime);o.add(a)}if((s=e.unrealTransport)!=null&&s.enabled&&e.windowTransport&&e.walletAppURL){const a=new DD(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;n({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 c={jsonrpc:"2.0",id:s.id,result:null};await i.getAccount();try{var l;if((!i.account||i.account===null)&&!Xne.includes(s.method))throw AD;const f=i.account;if(!f)throw new Error("WalletRequestHandler: wallet account is not configured");const d=(l=i.account)==null?void 0:l.providerFor(a??i.defaultChainId());if(!d)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${a}`);const h=d instanceof fa?d:void 0;switch(s.method){case"net_version":{if(!h)throw new Error("Account provider doesn't support send method");const p=await h.send("net_version",[]);c.result=p;break}case"eth_chainId":{if(!h)throw new Error("Account provider doesn't support send method");const p=await h.send("eth_chainId",[]);c.result=p;break}case"eth_accounts":{const p=f.address;c.result=[p];break}case"eth_getBalance":{const[p,m]=s.params,v=await d.getBalance(p,m);c.result=v.toHexString();break}case"sequence_sign":case"personal_sign":case"eth_sign":{let p;switch(s.method){case"sequence_sign":case"personal_sign":{const[b,E]=s.params;p=b;break}case"eth_sign":{const[b,E]=s.params;p=E;break}}let m="";const v=pb(p),y=s.method==="sequence_sign";if(i.prompter===null?m=await f.signMessage(v,a??i.defaultChainId(),y?"eip6492":"ignore"):m=await i.prompter.promptSignMessage({chainId:a,message:v,eip6492:y},i.connectOptions),m&&m.length>0)c.result=m;else throw new Error("declined by user");break}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[p,m]=s.params;let v;if(typeof m=="string")try{v=JSON.parse(m)}catch(E){console.warn("walletRequestHandler: error parsing typedData",E)}else v=m;if(!v||!v.domain||!v.types||!v.message)throw new Error("invalid typedData object");let y="";const b=s.method==="sequence_signTypedData_v4";if(i.prompter===null?y=await f.signTypedData(v.domain,v.types,v.message,a??i.defaultChainId(),b?"eip6492":"ignore"):y=await i.prompter.promptSignMessage({chainId:a,typedData:v,eip6492:b},i.connectOptions),y&&y.length>0)c.result=y;else throw new Error("declined by user");break}case"eth_sendTransaction":{const p=Yne(s.params[0]).map(v=>("gas"in v&&v.gasLimit===void 0&&(v.gasLimit=v.gas,delete v.gas),v));x6(f.address,p);let m="";if(i.prompter===null){var u;const v=await f.sendTransaction(p,a??i.defaultChainId());m=(u=v==null?void 0:v.hash)!=null?u:""}else m=await i.prompter.promptSendTransaction(p,a,i.connectOptions);if(m)c.result=m;else throw new Error("declined by user");break}case"eth_signTransaction":{const[p]=s.params;if(Ue(p.from)!==f.address)throw new Error("sender address does not match wallet");x6(f.address,p),i.prompter===null?c.result=await f.signTransactions(p,a??i.defaultChainId()):c.result=await i.prompter.promptSignTransaction(p,a,i.connectOptions);break}case"eth_sendRawTransaction":{if(we.transaction.isSignedTransactionBundle(s.params[0])){const p=te.from(s.params[0].chainId).toNumber(),m=await f.relayer(p).relay(s.params[0]);c.result=m.hash}else{const p=await d.sendTransaction(s.params[0]);c.result=p.hash}break}case"eth_getTransactionCount":{const p=Ue(s.params[0]),m=s.params[1],v=await d.getTransactionCount(p,m);c.result=te.from(v).toHexString();break}case"eth_blockNumber":{c.result=await d.getBlockNumber();break}case"eth_getBlockByNumber":{c.result=await d.getBlock(s.params[0]);break}case"eth_getBlockByHash":{c.result=await d.getBlock(s.params[0]);break}case"eth_getTransactionByHash":{c.result=await d.getTransaction(s.params[0]);break}case"eth_call":{const[p,m]=s.params;c.result=await d.call(p,m);break}case"eth_getCode":{const[p,m]=s.params;c.result=await d.getCode(p,m);break}case"eth_estimateGas":{const[p]=s.params;c.result=await d.estimateGas(p);break}case"eth_gasPrice":{const p=await d.getGasPrice();c.result=p.toHexString();break}case"wallet_switchEthereumChain":{const[p]=s.params;if(!p.chainId||p.chainId.length===0)throw new Error("invalid chainId");const m=te.from(p.chainId);i.setDefaultChainId(m.toNumber()),c.result=null;break}case"sequence_getWalletContext":{c.result=f.contexts;break}case"sequence_getWalletConfig":{const[p]=s.params;p?c.result=[(await f.status(p)).onChain.config]:c.result=await Promise.all(f.networks.map(async function(m){return(await f.status(m.chainId)).onChain.config}));break}case"sequence_getWalletState":{const[p]=s.params;p?c.result=[vk(p,await f.status(p))]:c.result=await Promise.all(f.networks.map(async function(m){const v=await f.status(m.chainId);return vk(m.chainId,v)}));break}case"sequence_getNetworks":{c.result=await i.getNetworks(!0);break}case"sequence_isSequence":{c.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[p]=s.params;if(!p)throw new Error("invalid request, method argument defaultChainId cannot be empty");i.setDefaultChainId(p),c.result=await i.getNetworks(!0);break}default:{if(!h)throw new Error("Account provider doesn't support send method");const p=await h.send(s.method,s.params);c.result=p}}}catch(f){Ce.error(f),c.result=null,c.error=Zn({},new Error(f),{code:4001})}o(void 0,c)},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 c;if(this.prompter!==null){var s;c=await((s=this.prompter)==null?void 0:s.promptSignInConnect(a))}else c=await this.connect(a);this.notifyConnect(c),(!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=Qne){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:ue.MAINNET,s=z8(i).chainId,o={connected:!0,chainId:Zi(s)};if(e&&e.authorize){const a={app:e.app,origin:e.origin,expiry:e.expiry,nonce:e.authorizeNonce};try{o.proof=await WN(this.account,s,a)}catch(c){return Ce.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${c.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${c.message}`}}}return o.session=this.walletSession(s),o}sendMessageRequest(e){return new Promise(r=>{this.sendAsync(e.data,(n,i)=>{const s=Zn({},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=Zn({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(Ce.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=>Zn({},i,{provider:void 0,relayer:void 0}))};if(e){const i=$s(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",Zi(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",Zi(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){Ce.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;rc.canOnchainValidate||c.original.version===2&&n,o=await r.status(i);if(s(o))return!0;if(await e.promptConfirmWalletDeploy(i,this.connectOptions)){const c=await r.status(i);return s(c)?!0:(Ce.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function vk(t,e){return{context:e.original.context,config:e.onChain.config,address:we.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 Xne=["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 Ld{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(!jd.is(e))throw new Error("SequenceSigner can only be connected to a SequenceProvider");return new Ld(this.client,e)}getSigner(e){if(!e)return this;const r=this.provider.toChainId(e);return this.singleNetworkSigners[r]||(this.singleNetworkSigners[r]=new vC(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 $D(e),s=await this.client.sendTransaction(i,{chainId:n}),o=this.getProvider(n);try{return await Yo(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 vC extends Ld{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 Zne{constructor(e){if(this.signer=e,vC.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 ud(e,r,n,this.signer.getProvider(i))}async isValidMessageSignature(e,r,n,i){const s=this.signer.getProvider(i),o=pb(r),a=j8(o);return ud(e,a,n,s)}isValidTypedDataSignature(e,r,n,i){return this.isValidSignature(e,Y1(r),n,i)}}class jd extends nb{constructor(e,r,n=ad){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 Ld(this.client,this),this.utils=new Zne(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(Zn({},e,{authorize:!0}))}async openWallet(e,r){return await this.client.openWallet(e,r),!0}toChainId(e){if(e===void 0)return;const r=$s(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 UD(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 Zi(await this.useChainId());if(e==="eth_accounts")return[this.client.getAddress()];if(e==="wallet_switchEthereumChain"){const o=r[0],a=FD(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=$s(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 o8(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}}jd.is=t=>t&&typeof t=="object"&&t._isSequenceProvider===!0;function FD(t){return typeof t=="object"?FD(t.chainId):te.from(t).toNumber()}class UD extends jd{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=$s(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 eie extends _ne{}const tie=(t,e)=>{e||(e="https://nodes.sequence.app");const r=!t,n={};return t&&(n.headers={"X-Access-Key":t}),new eie(e,n,{noop:r,defaultEnabled:!0,privacy:{userIdHash:!0,userAgentSalt:!1},initProps:()=>Jo()?{origin:window.location.origin}:{}})};var rie={name:"@0xsequence/provider",version:"1.9.19",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 Gl{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(Gl.SESSION_LOCALSTORE_KEY,JSON.stringify(e))}getSession(){const e=this.store.getItem(Gl.SESSION_LOCALSTORE_KEY);if(e)return JSON.parse(e)}async clearSession(){return this.store.removeItem(Gl.SESSION_LOCALSTORE_KEY)}}Gl.SESSION_LOCALSTORE_KEY="@sequence.session";class Kl{constructor(e,r=1){this.store=e,this.startingChainId=r,this.callbacks=[],e.onItemChange(Kl.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(Kl.SESSION_CHAIN_ID_KEY,e.toString())}getDefaultChainId(){const e=this.store.getItem(Kl.SESSION_CHAIN_ID_KEY);return!e||e.length===0?this.startingChainId:parseInt(e)}}Kl.SESSION_CHAIN_ID_KEY="@sequence.session.defaultChainId";class yC{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,BD(e))this.transport=mb.new(e);else if(SD(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 Gl(r),this.defaultChainId=new Kl(r,o),this.transport.on("accountsChanged",l=>{var u;l.length>1&&console.warn("SequenceClient: wallet-webapp returned more than one account"),(u=this.callbacks.accountsChanged)==null||u.forEach(f=>f(l))}),this.transport.on("connect",l=>{var u;const f=Zi(this.getChainId());(u=this.callbacks.connect)==null||u.forEach(d=>d(Zn({},l,{chainId:f})))}),this.transport.on("disconnect",(l,u)=>{var f;(f=this.callbacks.disconnect)==null||f.forEach(d=>d(l,u))}),this.transport.on("networks",l=>{var u;(u=this.callbacks.networks)==null||u.forEach(f=>f(l))}),this.transport.on("walletContext",l=>{var u;(u=this.callbacks.walletContext)==null||u.forEach(f=>f(l))}),this.transport.on("open",l=>{var u;(u=this.callbacks.open)==null||u.forEach(f=>f(l))}),this.transport.on("close",()=>{var l;(l=this.callbacks.close)==null||l.forEach(u=>u())}),this.transport.on("chainChanged",(l,u)=>{var f;(f=this.callbacks.chainChanged)==null||f.forEach(d=>d(l,u))}),this.defaultChainId.onDefaultChainIdChanged(l=>{var u;const f=Zi(l);(u=this.callbacks.chainChanged)==null||u.forEach(d=>d(f))}),n!=null&&n.projectAccessKey&&(this.projectAccessKey=n.projectAccessKey),this.projectAccessKey&&n!=null&&n.analytics&&(this.analytics=tie(this.projectAccessKey)),(s=this.session.getSession())!=null&&s.accountAddress){var a,c;(a=this.analytics)==null||a.identify((c=this.session.getSession())==null||(c=c.accountAddress)==null?void 0:c.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:Zn({},e,{networkId:this.getChainId(),clientVersion:rie.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=te.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=le(pC(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=Pr.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&&te.from(e.domain.chainId).toNumber()||this.getChainId())}async sendTransaction(e,r){var n;const i=Array.isArray(e)?e:[e],s=Kne(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 E6={transports:{walletAppURL:"https://sequence.app",windowTransport:{enabled:!0},proxyTransport:{enabled:!1}},defaultNetwork:1,analytics:!0};let lo;const zD=(t,e)=>{var r,n,i;if(!t||typeof t!="string")throw new Error("Please pass a projectAccessKey in initWallet.");if(lo)return lo;const s=Zn({},E6,e,{transports:Zn({},E6.transports,e==null?void 0:e.transports)}),o={},a=(r=(n=s.networks)==null?void 0:n.filter(h=>{h.rpcUrl!==void 0&&h.chainId!==void 0&&ad.find(p=>p.chainId===h.chainId)}))!=null?r:[],c=ad.map(h=>{var p;const m=(p=s.networks)==null?void 0:p.find(v=>v.chainId===h.chainId);return m?Zn({},h,m):h}).concat(a).map(h=>(h.rpcUrl.includes(t)||(h.rpcUrl=h.rpcUrl+`/${t}`),h)),l=h=>{if(!o[h]){var p;const m=(p=c.find(b=>b.chainId===h))==null?void 0:p.rpcUrl;if(!m)throw new Error(`no rpcUrl found for chainId: ${h}`);const v=new fa(m),y=new q8([jM,LM,new W8],new dy(v));o[h]=new K$(y,h)}return o[h]},u=s.defaultNetwork?(i=$s(c,s.defaultNetwork))==null?void 0:i.chainId:void 0;if(!u&&s.defaultNetwork)throw new Error(`defaultNetwork not found for chainId: ${s.defaultNetwork}`);const f=s.localStorage||ky(),d=new yC(s.transports,f,{defaultChainId:u,defaultEIP6492:s.defaultEIP6492,projectAccessKey:t,analytics:s.analytics});return lo=new jd(d,l),lo},qD=()=>{lo&&(lo.client.closeWallet(),lo.client.transport.unregister(),lo=void 0)},WD=()=>{if(!lo)throw new Error("Wallet has not been initialized, call sequence.initWallet(config) first.");return lo},nie=Object.freeze(Object.defineProperty({__proto__:null,BaseInjectedTransport:Vne,BaseProviderTransport:tp,BaseWalletTransport:rp,CHANNEL_ID:mC,DefaultChainIdTracker:Kl,DefaultProviderConfig:E6,ErrSignedInRequired:AD,EventType:st,ExtensionMessageHandler:Hne,ExtensionMessageProvider:LD,InitState:nr,LocalStorage:t1,MemoryItemStore:RD,MuxMessageProvider:mb,OpenState:Fi,PROVIDER_OPEN_TIMEOUT:hC,ProviderError:kD,ProxyMessageChannel:zne,ProxyMessageChannelPort:w6,ProxyMessageHandler:qne,ProxyMessageProvider:MD,SequenceClient:yC,SequenceClientSession:Gl,SequenceProvider:jd,SequenceSigner:Ld,SingleNetworkSequenceProvider:UD,SingleNetworkSequenceSigner:vC,UnrealMessageHandler:Wne,UnrealMessageProvider:DD,WalletRequestHandler:Jne,WindowMessageHandler:Gne,WindowMessageProvider:jD,WindowSessionParams:ep,getWallet:WD,initWallet:zD,isBrowserExtension:Sy,isMuxTransportTemplate:BD,isProviderTransport:SD,isUnityPlugin:TD,isValidMessageSignature:PD,isValidSignature:ud,isValidTypedDataSignature:ID,isWalletUpToDate:OD,messageToBytes:pC,nextMessageIdx:_D,prefixEIP191Message:pb,resolveArrayProperties:$D,trimEIP191Prefix:Une,unregisterWallet:qD,useBestStore:ky,validateTransactionRequest:x6},Symbol.toStringTag,{value:"Module"}));function Tn(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 iie=Tn({__proto__:null},[vG]),sie=Tn({__proto__:null},[wG]),oie=Tn({__proto__:null},[Ore]),aie=Tn({__proto__:null},[Dre]),cie=Tn({__proto__:null},[Bte]),lie=Tn({__proto__:null},[Kte]),uie=Tn({__proto__:null},[Hre]),fie=Tn({__proto__:null},[fee]),die=Tn({__proto__:null},[nie]),hie=Tn({__proto__:null},[wte]);const pie=we.transaction;var mie=Object.freeze({__proto__:null,transactions:pie}),vie=Tn({__proto__:null,isValidSignature:ud,isValidMessageSignature:PD,isValidTypedDataSignature:ID,isWalletUpToDate:OD},[QZ]),yie=Tn({__proto__:null},[ete]),gie=Tn({__proto__:null},[Ete]),bie=Tn({__proto__:null},[Pre]),xie=Tn({__proto__:null},[ote]),wie=Tn({__proto__:null},[Ite]),fu=Object.freeze({__proto__:null,abi:iie,api:sie,auth:oie,guard:aie,indexer:cie,metadata:lie,multicall:uie,network:fie,provider:die,relayer:hie,transactions:mie,utils:vie,core:yie,signhub:gie,sessions:bie,migration:xie,account:wie,initWallet:zD,getWallet:WD,unregisterWallet:qD,SequenceProvider:jd,SequenceClient:yC,SequenceSigner:Ld});const HD="%[a-f0-9]{2}",yk=new RegExp("("+HD+")|([^%]+?)","gi"),gk=new RegExp("("+HD+")+","gi");function C6(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;const r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],C6(r),C6(n))}function Eie(t){try{return decodeURIComponent(t)}catch{let e=t.match(yk)||[];for(let r=1;rt==null,_ie=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),S6=Symbol("encodeFragmentIdentifier");function Pie(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{const i=r.length;return n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Nr(e,t),"[",i,"]"].join("")]:[...r,[Nr(e,t),"[",Nr(i,t),"]=",Nr(n,t)].join("")]};case"bracket":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Nr(e,t),"[]"].join("")]:[...r,[Nr(e,t),"[]=",Nr(n,t)].join("")];case"colon-list-separator":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Nr(e,t),":list="].join("")]:[...r,[Nr(e,t),":list=",Nr(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e=t.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,i)=>i===void 0||t.skipNull&&i===null||t.skipEmptyString&&i===""?n:(i=i===null?"":i,n.length===0?[[Nr(r,t),e,Nr(i,t)].join("")]:[[n,Nr(i,t)].join(t.arrayFormatSeparator)])}default:return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,Nr(e,t)]:[...r,[Nr(e,t),"=",Nr(n,t)].join("")]}}function Iie(t){let e;switch(t.arrayFormat){case"index":return(r,n,i)=>{if(e=/\[(\d*)]$/.exec(r),r=r.replace(/\[\d*]$/,""),!e){i[r]=n;return}i[r]===void 0&&(i[r]={}),i[r][e[1]]=n};case"bracket":return(r,n,i)=>{if(e=/(\[])$/.exec(r),r=r.replace(/\[]$/,""),!e){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[...i[r],n]};case"colon-list-separator":return(r,n,i)=>{if(e=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!e){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[...i[r],n]};case"comma":case"separator":return(r,n,i)=>{const s=typeof n=="string"&&n.includes(t.arrayFormatSeparator),o=typeof n=="string"&&!s&&qo(n,t).includes(t.arrayFormatSeparator);n=o?qo(n,t):n;const a=s||o?n.split(t.arrayFormatSeparator).map(c=>qo(c,t)):n===null?n:qo(n,t);i[r]=a};case"bracket-separator":return(r,n,i)=>{const s=/(\[])$/.test(r);if(r=r.replace(/\[]$/,""),!s){i[r]=n&&qo(n,t);return}const o=n===null?[]:n.split(t.arrayFormatSeparator).map(a=>qo(a,t));if(i[r]===void 0){i[r]=o;return}i[r]=[...i[r],...o]};default:return(r,n,i)=>{if(i[r]===void 0){i[r]=n;return}i[r]=[...[i[r]].flat(),n]}}}function GD(t){if(typeof t!="string"||t.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Nr(t,e){return e.encode?e.strict?_ie(t):encodeURIComponent(t):t}function qo(t,e){return e.decode?Sie(t):t}function KD(t){return Array.isArray(t)?t.sort():typeof t=="object"?KD(Object.keys(t)).sort((e,r)=>Number(e)-Number(r)).map(e=>t[e]):t}function YD(t){const e=t.indexOf("#");return e!==-1&&(t=t.slice(0,e)),t}function Tie(t){let e="";const r=t.indexOf("#");return r!==-1&&(e=t.slice(r)),e}function bk(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?t=Number(t):e.parseBooleans&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")&&(t=t.toLowerCase()==="true"),t}function gC(t){t=YD(t);const e=t.indexOf("?");return e===-1?"":t.slice(e+1)}function bC(t,e){e={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...e},GD(e.arrayFormatSeparator);const r=Iie(e),n=Object.create(null);if(typeof t!="string"||(t=t.trim().replace(/^[?#&]/,""),!t))return n;for(const i of t.split("&")){if(i==="")continue;const s=e.decode?i.replace(/\+/g," "):i;let[o,a]=VD(s,"=");o===void 0&&(o=s),a=a===void 0?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?a:qo(a,e),r(qo(o,e),a,n)}for(const[i,s]of Object.entries(n))if(typeof s=="object"&&s!==null)for(const[o,a]of Object.entries(s))s[o]=bk(a,e);else n[i]=bk(s,e);return e.sort===!1?n:(e.sort===!0?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((i,s)=>{const o=n[s];return i[s]=o&&typeof o=="object"&&!Array.isArray(o)?KD(o):o,i},Object.create(null))}function QD(t,e){if(!t)return"";e={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...e},GD(e.arrayFormatSeparator);const r=o=>e.skipNull&&Aie(t[o])||e.skipEmptyString&&t[o]==="",n=Pie(e),i={};for(const[o,a]of Object.entries(t))r(o)||(i[o]=a);const s=Object.keys(i);return e.sort!==!1&&s.sort(e.sort),s.map(o=>{const a=t[o];return a===void 0?"":a===null?Nr(o,e):Array.isArray(a)?a.length===0&&e.arrayFormat==="bracket-separator"?Nr(o,e)+"[]":a.reduce(n(o),[]).join("&"):Nr(o,e)+"="+Nr(a,e)}).filter(o=>o.length>0).join("&")}function JD(t,e){var i;e={decode:!0,...e};let[r,n]=VD(t,"#");return r===void 0&&(r=t),{url:((i=r==null?void 0:r.split("?"))==null?void 0:i[0])??"",query:bC(gC(t),e),...e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:qo(n,e)}:{}}}function XD(t,e){e={encode:!0,strict:!0,[S6]:!0,...e};const r=YD(t.url).split("?")[0]||"",n=gC(t.url),i={...bC(n,{sort:!1}),...t.query};let s=QD(i,e);s&&(s=`?${s}`);let o=Tie(t.url);if(t.fragmentIdentifier){const a=new URL(r);a.hash=t.fragmentIdentifier,o=e[S6]?a.hash:`#${t.fragmentIdentifier}`}return`${r}${s}${o}`}function ZD(t,e,r){r={parseFragmentIdentifier:!0,[S6]:!1,...r};const{url:n,query:i,fragmentIdentifier:s}=JD(t,r);return XD({url:n,query:kie(i,e),fragmentIdentifier:s},r)}function Oie(t,e,r){const n=Array.isArray(e)?i=>!e.includes(i):(i,s)=>!e(i,s);return ZD(t,n,r)}const eL=Object.freeze(Object.defineProperty({__proto__:null,exclude:Oie,extract:gC,parse:bC,parseUrl:JD,pick:ZD,stringify:QD,stringifyUrl:XD},Symbol.toStringTag,{value:"Module"})),xC=w.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),vb=w.createContext({});function Rie(){return w.useContext(vb).visualElement}const np=w.createContext(null),yb=typeof document<"u",Ay=yb?w.useLayoutEffect:w.useEffect,tL=w.createContext({strict:!1});function $ie(t,e,r,n){const i=Rie(),s=w.useContext(tL),o=w.useContext(np),a=w.useContext(xC).reducedMotion,c=w.useRef();n=n||s.renderer,!c.current&&n&&(c.current=n(t,{visualState:e,parent:i,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const l=c.current;return Ay(()=>{l&&l.render()}),(window.HandoffAppearAnimations?Ay:w.useEffect)(()=>{l&&l.animationState&&l.animationState.animateChanges()}),l}function Ef(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Mie(t,e,r){return w.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):Ef(r)&&(r.current=n))},[e])}function r1(t){return typeof t=="string"||Array.isArray(t)}function gb(t){return typeof t=="object"&&typeof t.start=="function"}const Nie=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function bb(t){return gb(t.animate)||Nie.some(e=>r1(t[e]))}function rL(t){return!!(bb(t)||t.variants)}function Die(t,e){if(bb(t)){const{initial:r,animate:n}=t;return{initial:r===!1||r1(r)?r:void 0,animate:r1(n)?n:void 0}}return t.inherit!==!1?e:{}}function Lie(t){const{initial:e,animate:r}=Die(t,w.useContext(vb));return w.useMemo(()=>({initial:e,animate:r}),[xk(e),xk(r)])}function xk(t){return Array.isArray(t)?t.join(" "):t}const Mo=t=>({isEnabled:e=>t.some(r=>!!e[r])}),n1={measureLayout:Mo(["layout","layoutId","drag"]),animation:Mo(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Mo(["exit"]),drag:Mo(["drag","dragControls"]),focus:Mo(["whileFocus"]),hover:Mo(["whileHover","onHoverStart","onHoverEnd"]),tap:Mo(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Mo(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Mo(["whileInView","onViewportEnter","onViewportLeave"])};function jie(t){for(const e in t)e==="projectionNodeConstructor"?n1.projectionNodeConstructor=t[e]:n1[e].Component=t[e]}function xb(t){const e=w.useRef(null);return e.current===null&&(e.current=t()),e.current}const p0={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Bie=1;function Fie(){return xb(()=>{if(p0.hasEverUpdated)return Bie++})}const wC=w.createContext({});class Uie extends g.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}}const nL=w.createContext({}),zie=Symbol.for("motionComponentSymbol");function qie({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:i,Component:s}){t&&jie(t);function o(c,l){const u={...w.useContext(xC),...c,layoutId:Wie(c)},{isStatic:f}=u;let d=null;const h=Lie(c),p=f?void 0:Fie(),m=i(c,f);if(!f&&yb){h.visualElement=$ie(s,m,u,e);const v=w.useContext(tL).strict,y=w.useContext(nL);h.visualElement&&(d=h.visualElement.loadFeatures(u,v,t,p,r||n1.projectionNodeConstructor,y))}return w.createElement(Uie,{visualElement:h.visualElement,props:u},d,w.createElement(vb.Provider,{value:h},n(s,c,p,Mie(m,h.visualElement,l),m,f,h.visualElement)))}const a=w.forwardRef(o);return a[zie]=s,a}function Wie({layoutId:t}){const e=w.useContext(wC).id;return e&&t!==void 0?e+"-"+t:t}function Hie(t){function e(n,i={}){return qie(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 Vie=["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 EC(t){return typeof t!="string"||t.includes("-")?!1:!!(Vie.indexOf(t)>-1||/[A-Z]/.test(t))}const _y={};function Gie(t){Object.assign(_y,t)}const Py=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Bd=new Set(Py);function iL(t,{layout:e,layoutId:r}){return Bd.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!_y[t]||t==="opacity")}const li=t=>!!(t!=null&&t.getVelocity),Kie={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Yie=(t,e)=>Py.indexOf(t)-Py.indexOf(e);function Qie({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},i,s){let o="";e.sort(Yie);for(const a of e)o+=`${Kie[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 sL(t){return t.startsWith("--")}const Jie=(t,e)=>e&&typeof t=="number"?e.transform(t):t,fd=(t,e,r)=>Math.min(Math.max(r,t),e),Su={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},m0={...Su,transform:t=>fd(0,1,t)},im={...Su,default:1},v0=t=>Math.round(t*1e5)/1e5,i1=/(-)?([\d]*\.?[\d])+/g,k6=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Xie=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ip(t){return typeof t=="string"}const sp=t=>({test:e=>ip(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ya=sp("deg"),yo=sp("%"),Ie=sp("px"),Zie=sp("vh"),ese=sp("vw"),wk={...yo,parse:t=>yo.parse(t)/100,transform:t=>yo.transform(t*100)},Ek={...Su,transform:Math.round},oL={borderWidth:Ie,borderTopWidth:Ie,borderRightWidth:Ie,borderBottomWidth:Ie,borderLeftWidth:Ie,borderRadius:Ie,radius:Ie,borderTopLeftRadius:Ie,borderTopRightRadius:Ie,borderBottomRightRadius:Ie,borderBottomLeftRadius:Ie,width:Ie,maxWidth:Ie,height:Ie,maxHeight:Ie,size:Ie,top:Ie,right:Ie,bottom:Ie,left:Ie,padding:Ie,paddingTop:Ie,paddingRight:Ie,paddingBottom:Ie,paddingLeft:Ie,margin:Ie,marginTop:Ie,marginRight:Ie,marginBottom:Ie,marginLeft:Ie,rotate:Ya,rotateX:Ya,rotateY:Ya,rotateZ:Ya,scale:im,scaleX:im,scaleY:im,scaleZ:im,skew:Ya,skewX:Ya,skewY:Ya,distance:Ie,translateX:Ie,translateY:Ie,translateZ:Ie,x:Ie,y:Ie,z:Ie,perspective:Ie,transformPerspective:Ie,opacity:m0,originX:wk,originY:wk,originZ:Ie,zIndex:Ek,fillOpacity:m0,strokeOpacity:m0,numOctaves:Ek};function CC(t,e,r,n){const{style:i,vars:s,transform:o,transformKeys:a,transformOrigin:c}=t;a.length=0;let l=!1,u=!1,f=!0;for(const d in e){const h=e[d];if(sL(d)){s[d]=h;continue}const p=oL[d],m=Jie(h,p);if(Bd.has(d)){if(l=!0,o[d]=m,a.push(d),!f)continue;h!==(p.default||0)&&(f=!1)}else d.startsWith("origin")?(u=!0,c[d]=m):i[d]=m}if(e.transform||(l||n?i.transform=Qie(t,r,f,n):i.transform&&(i.transform="none")),u){const{originX:d="50%",originY:h="50%",originZ:p=0}=c;i.transformOrigin=`${d} ${h} ${p}`}}const SC=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function aL(t,e,r){for(const n in e)!li(e[n])&&!iL(n,r)&&(t[n]=e[n])}function tse({transformTemplate:t},e,r){return w.useMemo(()=>{const n=SC();return CC(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function rse(t,e,r){const n=t.style||{},i={};return aL(i,n,t),Object.assign(i,tse(t,e,r)),t.transformValues?t.transformValues(i):i}function nse(t,e,r){const n={},i=rse(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"}`),n.style=i,n}const ise=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 Iy(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||ise.has(t)}let cL=t=>!Iy(t);function sse(t){t&&(cL=e=>e.startsWith("on")?!Iy(e):t(e))}try{sse(require("@emotion/is-prop-valid").default)}catch{}function ose(t,e,r){const n={};for(const i in t)i==="values"&&typeof t.values=="object"||(cL(i)||r===!0&&Iy(i)||!e&&!Iy(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}function Ck(t,e,r){return typeof t=="string"?t:Ie.transform(e+r*t)}function ase(t,e,r){const n=Ck(e,t.x,t.width),i=Ck(r,t.y,t.height);return`${n} ${i}`}const cse={offset:"stroke-dashoffset",array:"stroke-dasharray"},lse={offset:"strokeDashoffset",array:"strokeDasharray"};function use(t,e,r=1,n=0,i=!0){t.pathLength=1;const s=i?cse:lse;t[s.offset]=Ie.transform(-n);const o=Ie.transform(e),a=Ie.transform(r);t[s.array]=`${o} ${a}`}function kC(t,{attrX:e,attrY:r,originX:n,originY:i,pathLength:s,pathSpacing:o=1,pathOffset:a=0,...c},l,u,f){if(CC(t,c,l,f),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:p}=t;d.transform&&(p&&(h.transform=d.transform),delete d.transform),p&&(n!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=ase(p,n!==void 0?n:.5,i!==void 0?i:.5)),e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),s!==void 0&&use(d,s,o,a,!1)}const lL=()=>({...SC(),attrs:{}}),AC=t=>typeof t=="string"&&t.toLowerCase()==="svg";function fse(t,e,r,n){const i=w.useMemo(()=>{const s=lL();return kC(s,e,{enableHardwareAcceleration:!1},AC(n),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};aL(s,t.style,t),i.style={...s,...i.style}}return i}function dse(t=!1){return(r,n,i,s,{latestValues:o},a)=>{const l=(EC(r)?fse:nse)(n,o,a,r),f={...ose(n,typeof r=="string",t),...l,ref:s},{children:d}=n,h=w.useMemo(()=>li(d)?d.get():d,[d]);return i&&(f["data-projection-id"]=i),w.createElement(r,{...f,children:h})}}const _C=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function uL(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 fL=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 dL(t,e,r,n){uL(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(fL.has(i)?i:_C(i),e.attrs[i])}function PC(t,e){const{style:r}=t,n={};for(const i in r)(li(r[i])||e.style&&li(e.style[i])||iL(i,t))&&(n[i]=r[i]);return n}function hL(t,e){const r=PC(t,e);for(const n in t)if(li(t[n])||li(e[n])){const i=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[i]=t[n]}return r}function IC(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 Ty=t=>Array.isArray(t),hse=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),pse=t=>Ty(t)?t[t.length-1]||0:t;function cv(t){const e=li(t)?t.get():t;return hse(e)?e.toValue():e}function mse({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,i,s){const o={latestValues:vse(n,i,s,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const pL=t=>(e,r)=>{const n=w.useContext(vb),i=w.useContext(np),s=()=>mse(t,e,n,i);return r?s():xb(s)};function vse(t,e,r,n){const i={},s=n(t,{});for(const d in s)i[d]=cv(s[d]);let{initial:o,animate:a}=t;const c=bb(t),l=rL(t);e&&l&&!c&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=r?r.initial===!1:!1;u=u||o===!1;const f=u?a:o;return f&&typeof f!="boolean"&&!gb(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const p=IC(t,h);if(!p)return;const{transitionEnd:m,transition:v,...y}=p;for(const b in y){let E=y[b];if(Array.isArray(E)){const S=u?E.length-1:0;E=E[S]}E!==null&&(i[b]=E)}for(const b in m)i[b]=m[b]}),i}const yse={useVisualState:pL({scrapeMotionValuesFromProps:hL,createRenderState:lL,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}}kC(r,n,{enableHardwareAcceleration:!1},AC(e.tagName),t.transformTemplate),dL(e,r)}})},gse={useVisualState:pL({scrapeMotionValuesFromProps:PC,createRenderState:SC})};function bse(t,{forwardMotionProps:e=!1},r,n,i){return{...EC(t)?yse:gse,preloadedFeatures:r,useRender:dse(e),createVisualElement:n,projectionNodeConstructor:i,Component:t}}var Nt;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(Nt||(Nt={}));function wb(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function A6(t,e,r,n){w.useEffect(()=>{const i=t.current;if(r&&i)return wb(i,e,r,n)},[t,e,r,n])}function xse({whileFocus:t,visualElement:e}){const{animationState:r}=e,n=w.useCallback(()=>{r&&r.setActive(Nt.Focus,!0)},[r]),i=w.useCallback(()=>{r&&r.setActive(Nt.Focus,!1)},[r]);A6(e,"focus",t?n:void 0),A6(e,"blur",t?i:void 0)}const mL=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function TC(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const vL=t=>e=>mL(e)&&t(e,TC(e));function Wf(t,e,r,n){return wb(t,e,vL(r),n)}function Oy(t,e,r,n){return A6(t,e,r&&vL(r),n)}function yL(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const Sk=yL("dragHorizontal"),kk=yL("dragVertical");function gL(t){let e=!1;if(t==="y")e=kk();else if(t==="x")e=Sk();else{const r=Sk(),n=kk();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function bL(){const t=gL(!0);return t?(t(),!1):!0}function Ak(t,e,r,n){return(i,s)=>{i.type==="touch"||bL()||(r&&t.animationState&&t.animationState.setActive(Nt.Hover,e),n&&n(i,s))}}function wse({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){Oy(n,"pointerenter",w.useMemo(()=>t||r?Ak(n,!0,!!r,t):void 0,[t,!!r,n]),{passive:!t}),Oy(n,"pointerleave",w.useMemo(()=>e||r?Ak(n,!1,!!r,e):void 0,[t,!!r,n]),{passive:!e})}const xL=(t,e)=>e?t===e?!0:xL(t,e.parentElement):!1;function OC(t){return w.useEffect(()=>()=>t(),[])}const Ese=(t,e)=>r=>e(t(r)),Eb=(...t)=>t.reduce(Ese);function Cse({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:i,...s}){const o=t||e||r||n,a=w.useRef(!1),c=w.useRef(null),l={passive:!(e||t||r||s.onPointerDown)};function u(){c.current&&c.current(),c.current=null}function f(){return u(),a.current=!1,i.getProps().whileTap&&i.animationState&&i.animationState.setActive(Nt.Tap,!1),!bL()}function d(m,v){var y,b,E,S;f()&&(xL(i.current,m.target)?(S=(E=i.getProps()).onTap)===null||S===void 0||S.call(E,m,v):(b=(y=i.getProps()).onTapCancel)===null||b===void 0||b.call(y,m,v))}function h(m,v){var y,b;f()&&((b=(y=i.getProps()).onTapCancel)===null||b===void 0||b.call(y,m,v))}const p=w.useCallback((m,v)=>{var y;if(u(),a.current)return;a.current=!0,c.current=Eb(Wf(window,"pointerup",d,l),Wf(window,"pointercancel",h,l));const b=i.getProps();b.whileTap&&i.animationState&&i.animationState.setActive(Nt.Tap,!0),(y=b.onTapStart)===null||y===void 0||y.call(b,m,v)},[!!e,i]);Oy(i,"pointerdown",o?p:void 0,l),OC(u)}const _6=new WeakMap,Ux=new WeakMap,Sse=t=>{const e=_6.get(t.target);e&&e(t)},kse=t=>{t.forEach(Sse)};function Ase({root:t,...e}){const r=t||document;Ux.has(r)||Ux.set(r,{});const n=Ux.get(r),i=JSON.stringify(e);return n[i]||(n[i]=new IntersectionObserver(kse,{root:t,...e})),n[i]}function _se(t,e,r){const n=Ase(e);return _6.set(t,r),n.observe(t),()=>{_6.delete(t),n.unobserve(t)}}function Pse({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:i={}}){const s=w.useRef({hasEnteredView:!1,isInView:!1});let o=!!(e||r||n);i.once&&s.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?Ose:Tse)(o,s.current,t,i)}const Ise={some:0,all:1};function Tse(t,e,r,{root:n,margin:i,amount:s="some",once:o}){w.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:i,threshold:typeof s=="number"?s:Ise[s]},c=l=>{const{isIntersecting:u}=l;if(e.isInView===u||(e.isInView=u,o&&!u&&e.hasEnteredView))return;u&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(Nt.InView,u);const f=r.getProps(),d=u?f.onViewportEnter:f.onViewportLeave;d&&d(l)};return _se(r.current,a,c)},[t,n,i,s])}function Ose(t,e,r,{fallback:n=!0}){w.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:i}=r.getProps();i&&i(null),r.animationState&&r.animationState.setActive(Nt.InView,!0)})},[t])}const pc=t=>e=>(t(e),null),Rse={inView:pc(Pse),tap:pc(Cse),focus:pc(xse),hover:pc(wse)};function wL(){const t=w.useContext(np);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,i=w.useId();return w.useEffect(()=>n(i),[]),!e&&r?[!1,()=>r&&r(i)]:[!0]}function EL(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),Mse=t=>/^0[^.\s]+$/.test(t),ta={delta:0,timestamp:0},CL=1/60*1e3,Nse=typeof performance<"u"?()=>performance.now():()=>Date.now(),SL=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Nse()),CL);function Dse(t){let e=[],r=[],n=0,i=!1,s=!1;const o=new WeakSet,a={schedule:(c,l=!1,u=!1)=>{const f=u&&i,d=f?e:r;return l&&o.add(c),d.indexOf(c)===-1&&(d.push(c),f&&i&&(n=e.length)),c},cancel:c=>{const l=r.indexOf(c);l!==-1&&r.splice(l,1),o.delete(c)},process:c=>{if(i){s=!0;return}if(i=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let l=0;l(t[e]=Dse(()=>s1=!0),t),{}),_n=op.reduce((t,e)=>{const r=Cb[e];return t[e]=(n,i=!1,s=!1)=>(s1||Bse(),r.schedule(n,i,s)),t},{}),Bc=op.reduce((t,e)=>(t[e]=Cb[e].cancel,t),{}),zx=op.reduce((t,e)=>(t[e]=()=>Cb[e].process(ta),t),{}),jse=t=>Cb[t].process(ta),kL=t=>{s1=!1,ta.delta=P6?CL:Math.max(Math.min(t-ta.timestamp,Lse),1),ta.timestamp=t,I6=!0,op.forEach(jse),I6=!1,s1&&(P6=!1,SL(kL))},Bse=()=>{s1=!0,P6=!0,I6||SL(kL)};function RC(t,e){t.indexOf(e)===-1&&t.push(e)}function $C(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class MC{constructor(){this.subscriptions=[]}add(e){return RC(this.subscriptions,e),()=>$C(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 Use{constructor(e,r={}){this.version="8.5.5",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}=ta;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,_n.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=()=>_n.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=Fse(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new MC);const n=this.events[e].add(r);return e==="change"?()=>{n(),_n.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?NC(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 dd(t,e){return new Use(t,e)}const DC=(t,e)=>r=>!!(ip(r)&&Xie.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),AL=(t,e,r)=>n=>{if(!ip(n))return n;const[i,s,o,a]=n.match(i1);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},zse=t=>fd(0,255,t),qx={...Su,transform:t=>Math.round(zse(t))},Fl={test:DC("rgb","red"),parse:AL("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+qx.transform(t)+", "+qx.transform(e)+", "+qx.transform(r)+", "+v0(m0.transform(n))+")"};function qse(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 T6={test:DC("#"),parse:qse,transform:Fl.transform},Cf={test:DC("hsl","hue"),parse:AL("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+yo.transform(v0(e))+", "+yo.transform(v0(r))+", "+v0(m0.transform(n))+")"},Nn={test:t=>Fl.test(t)||T6.test(t)||Cf.test(t),parse:t=>Fl.test(t)?Fl.parse(t):Cf.test(t)?Cf.parse(t):T6.parse(t),transform:t=>ip(t)?t:t.hasOwnProperty("red")?Fl.transform(t):Cf.transform(t)},_L="${c}",PL="${n}";function Wse(t){var e,r;return isNaN(t)&&ip(t)&&(((e=t.match(i1))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(k6))===null||r===void 0?void 0:r.length)||0)>0}function Ry(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const i=t.match(k6);i&&(r=i.length,t=t.replace(k6,_L),e.push(...i.map(Nn.parse)));const s=t.match(i1);return s&&(n=s.length,t=t.replace(i1,PL),e.push(...s.map(Su.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function IL(t){return Ry(t).values}function TL(t){const{values:e,numColors:r,tokenised:n}=Ry(t),i=e.length;return s=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function Vse(t){const e=IL(t);return TL(t)(e.map(Hse))}const Fc={test:Wse,parse:IL,createTransformer:TL,getAnimatableNone:Vse},Gse=new Set(["brightness","contrast","saturate","opacity"]);function Kse(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(i1)||[];if(!n)return t;const i=r.replace(n,"");let s=Gse.has(e)?1:0;return n!==r&&(s*=100),e+"("+s+i+")"}const Yse=/([a-z-]*)\(.*?\)/g,O6={...Fc,getAnimatableNone:t=>{const e=t.match(Yse);return e?e.map(Kse).join(" "):t}},Qse={...oL,color:Nn,backgroundColor:Nn,outlineColor:Nn,fill:Nn,stroke:Nn,borderColor:Nn,borderTopColor:Nn,borderRightColor:Nn,borderBottomColor:Nn,borderLeftColor:Nn,filter:O6,WebkitFilter:O6},LC=t=>Qse[t];function jC(t,e){var r;let n=LC(t);return n!==O6&&(n=Fc),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const OL=t=>e=>e.test(t),Jse={test:t=>t==="auto",parse:t=>t},RL=[Su,Ie,yo,Ya,ese,Zie,Jse],Ch=t=>RL.find(OL(t)),Xse=[...RL,Nn,Fc],Zse=t=>Xse.find(OL(t));function eoe(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function toe(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function Sb(t,e,r){const n=t.getProps();return IC(n,e,r!==void 0?r:n.custom,eoe(t),toe(t))}function roe(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,dd(r))}function noe(t,e){const r=Sb(t,e);let{transitionEnd:n={},transition:i={},...s}=r?t.makeTargetAnimatable(r,!1):{};s={...s,...n};for(const o in s){const a=pse(s[o]);roe(t,o,a)}}function ioe(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,loe={current:!1},BC=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,FC=t=>e=>1-t(1-e),UC=t=>t*t,uoe=FC(UC),zC=BC(UC),Er=(t,e,r)=>-r*t+r*e+t;function Wx(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 foe({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,c=2*r-a;i=Wx(c,a,t+1/3),s=Wx(c,a,t),o=Wx(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}const Hx=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},doe=[T6,Fl,Cf],hoe=t=>doe.find(e=>e.test(t));function _k(t){const e=hoe(t);let r=e.parse(t);return e===Cf&&(r=foe(r)),r}const $L=(t,e)=>{const r=_k(t),n=_k(e),i={...r};return s=>(i.red=Hx(r.red,n.red,s),i.green=Hx(r.green,n.green,s),i.blue=Hx(r.blue,n.blue,s),i.alpha=Er(r.alpha,n.alpha,s),Fl.transform(i))};function ML(t,e){return typeof t=="number"?r=>Er(t,e,r):Nn.test(t)?$L(t,e):DL(t,e)}const NL=(t,e)=>{const r=[...t],n=r.length,i=t.map((s,o)=>ML(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]=ML(t[i],e[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}},DL=(t,e)=>{const r=Fc.createTransformer(e),n=Ry(t),i=Ry(e);return n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?Eb(NL(n.values,i.values),r):o=>`${o>0?e:t}`},Ny=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},Pk=(t,e)=>r=>Er(t,e,r);function moe(t){return typeof t=="number"?Pk:typeof t=="string"?Nn.test(t)?$L:DL:Array.isArray(t)?NL:typeof t=="object"?poe:Pk}function voe(t,e,r){const n=[],i=r||moe(t[0]),s=t.length-1;for(let o=0;ot[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=voe(e,n,i),a=o.length,c=l=>{let u=0;if(a>1)for(;uc(fd(t[0],t[s-1],l)):c}const qC=t=>t,jL=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,yoe=1e-7,goe=12;function boe(t,e,r,n,i){let s,o,a=0;do o=e+(r-e)/2,s=jL(o,n,i)-t,s>0?r=o:e=o;while(Math.abs(s)>yoe&&++aboe(s,0,1,t,r);return s=>s===0||s===1?s:jL(i(s),e,n)}const FL=t=>1-Math.sin(Math.acos(t)),WC=FC(FL),xoe=BC(WC),UL=BL(.33,1.53,.69,.99),HC=FC(UL),woe=BC(HC),Eoe=t=>(t*=2)<1?.5*HC(t):.5*(2-Math.pow(2,-10*(t-1))),Coe={linear:qC,easeIn:UC,easeInOut:zC,easeOut:uoe,circIn:FL,circInOut:xoe,circOut:WC,backIn:HC,backInOut:woe,backOut:UL,anticipate:Eoe},Ik=t=>{if(Array.isArray(t)){My(t.length===4);const[e,r,n,i]=t;return BL(e,r,n,i)}else if(typeof t=="string")return Coe[t];return t},Soe=t=>Array.isArray(t)&&typeof t[0]!="number";function koe(t,e){return t.map(()=>e||zC).splice(0,t.length-1)}function Aoe(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function _oe(t,e){return t.map(r=>r*e)}function R6({keyframes:t,ease:e=zC,times:r,duration:n=300}){t=[...t];const i=Soe(e)?e.map(Ik):Ik(e),s={done:!1,value:t[0]},o=_oe(r&&r.length===t.length?r:Aoe(t),n);function a(){return LL(o,t,{ease:Array.isArray(i)?i:koe(t,i)})}let c=a();return{next:l=>(s.value=c(l),s.done=l>=n,s),flipTarget:()=>{t.reverse(),c=a()}}}const Vx=.001,Poe=.01,Ioe=10,Toe=.05,Ooe=1;function Roe({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s,o=1-e;o=fd(Toe,Ooe,o),t=fd(Poe,Ioe,t/1e3),o<1?(i=l=>{const u=l*o,f=u*t,d=u-r,h=$6(l,o),p=Math.exp(-f);return Vx-d/h*p},s=l=>{const f=l*o*t,d=f*r+r,h=Math.pow(o,2)*Math.pow(l,2)*t,p=Math.exp(-f),m=$6(Math.pow(l,2),o);return(-i(l)+Vx>0?-1:1)*((d-h)*p)/m}):(i=l=>{const u=Math.exp(-l*t),f=(l-r)*t+1;return-Vx+u*f},s=l=>{const u=Math.exp(-l*t),f=(r-l)*(t*t);return u*f});const a=5/t,c=Moe(i,s,a);if(t=t*1e3,isNaN(c))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:o*2*Math.sqrt(n*l),duration:t}}}const $oe=12;function Moe(t,e,r){let n=r;for(let i=1;i<$oe;i++)n=n-t(n)/e(n);return n}function $6(t,e){return t*Math.sqrt(1-e*e)}const Noe=["duration","bounce"],Doe=["stiffness","damping","mass"];function Tk(t,e){return e.some(r=>t[r]!==void 0)}function Loe(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Tk(t,Doe)&&Tk(t,Noe)){const r=Roe(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const joe=5;function zL({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:c,mass:l,velocity:u,duration:f,isResolvedFromDuration:d}=Loe(n);let h=Boe,p=u?-(u/1e3):0;const m=c/(2*Math.sqrt(a*l));function v(){const y=s-i,b=Math.sqrt(a/l)/1e3,E=Math.abs(y)<5;if(r||(r=E?.01:2),e||(e=E?.005:.5),m<1){const S=$6(b,m);h=P=>{const R=Math.exp(-m*b*P);return s-R*((p+m*b*y)/S*Math.sin(S*P)+y*Math.cos(S*P))}}else if(m===1)h=S=>s-Math.exp(-b*S)*(y+(p+b*y)*S);else{const S=b*Math.sqrt(m*m-1);h=P=>{const R=Math.exp(-m*b*P),L=Math.min(S*P,300);return s-R*((p+m*b*y)*Math.sinh(L)+S*y*Math.cosh(L))/S}}}return v(),{next:y=>{const b=h(y);if(d)o.done=y>=f;else{let E=p;if(y!==0)if(m<1){const R=Math.max(0,y-joe);E=NC(b-h(R),y-R)}else E=0;const S=Math.abs(E)<=r,P=Math.abs(s-b)<=e;o.done=S&&P}return o.value=o.done?s:b,o},flipTarget:()=>{p=-p,[i,s]=[s,i],v()}}}zL.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const Boe=t=>0;function Foe({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 c=r*e;const l=o+c,u=s===void 0?l:s(l);return u!==l&&(c=u-o),{next:f=>{const d=-c*Math.exp(-f/n);return a.done=!(d>i||d<-i),a.value=a.done?u:u+d,a},flipTarget:()=>{}}}const Uoe={decay:Foe,keyframes:R6,tween:R6,spring:zL};function qL(t,e,r=0){return t-e-r}function zoe(t,e=0,r=0,n=!0){return n?qL(e+-t,e,r):e-(t-e)+r}function qoe(t,e,r,n){return n?t>=e+r:t<=-r}const Woe=t=>{const e=({delta:r})=>t(r);return{start:()=>_n.update(e,!0),stop:()=>Bc.update(e)}};function Dy({duration:t,driver:e=Woe,elapsed:r=0,repeat:n=0,repeatType:i="loop",repeatDelay:s=0,keyframes:o,autoplay:a=!0,onPlay:c,onStop:l,onComplete:u,onRepeat:f,onUpdate:d,type:h="keyframes",...p}){var m,v;const y=r;let b,E=0,S=t,P=!1,R=!0,L;const j=Uoe[o.length>2?"keyframes":h]||R6,H=o[0],K=o[o.length-1];let Y={done:!1,value:H};!((v=(m=j).needsInterpolation)===null||v===void 0)&&v.call(m,H,K)&&(L=LL([0,100],[H,K],{clamp:!1}),o=[0,100]);const Q=j({...p,duration:t,keyframes:o});function F(){E++,i==="reverse"?(R=E%2===0,r=zoe(r,S,s,R)):(r=qL(r,S,s),i==="mirror"&&Q.flipTarget()),P=!1,f&&f()}function x(){b&&b.stop(),u&&u()}function k(M){R||(M=-M),r+=M,P||(Y=Q.next(Math.max(0,r)),L&&(Y.value=L(Y.value)),P=R?Y.done:r<=0),d&&d(Y.value),P&&(E===0&&(S=S!==void 0?S:r),E{l&&l(),b&&b.stop()},set currentTime(M){r=y,k(M)},sample:M=>{r=y;const A=t&&typeof t=="number"?Math.max(t*.5,50):50;let O=0;for(k(0);O<=M;){const B=M-O;k(Math.min(B,A)),O+=A}return Y}}}function Hoe(t){return!t||Array.isArray(t)||typeof t=="string"&&WL[t]}const qh=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,WL={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:qh([0,.65,.55,1]),circOut:qh([.55,0,1,.45]),backIn:qh([.31,.01,.66,-.59]),backOut:qh([.33,1.53,.69,.99])};function Voe(t){if(t)return Array.isArray(t)?qh(t):WL[t]}function Goe(t,e,r,{delay:n=0,duration:i,repeat:s=0,repeatType:o="loop",ease:a,times:c}={}){return t.animate({[e]:r,offset:c},{delay:n,duration:i,easing:Voe(a),fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const Ok={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Gx={},HL={};for(const t in Ok)HL[t]=()=>(Gx[t]===void 0&&(Gx[t]=Ok[t]()),Gx[t]);function Koe(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const Yoe=new Set(["opacity"]),sm=10;function Qoe(t,e,{onUpdate:r,onComplete:n,...i}){if(!(HL.waapi()&&Yoe.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:c=0,ease:l}=i;if(i.type==="spring"||!Hoe(i.ease)){if(i.repeat===1/0)return;const f=Dy({...i,elapsed:0});let d={done:!1,value:o[0]};const h=[];let p=0;for(;!d.done&&p<2e4;)d=f.sample(p),h.push(d.value),p+=sm;o=h,a=p-sm,l="linear"}const u=Goe(t.owner.current,e,o,{...i,delay:-c,duration:a,ease:l});return u.onfinish=()=>{t.set(Koe(o,i)),_n.update(()=>u.cancel()),n&&n()},{get currentTime(){return u.currentTime||0},set currentTime(f){u.currentTime=f},stop:()=>{const{currentTime:f}=u;if(f){const d=Dy({...i,autoplay:!1});t.setWithVelocity(d.sample(f-sm).value,d.sample(f).value,sm)}_n.update(()=>u.cancel())}}}function VL(t,e){const r=performance.now(),n=({timestamp:i})=>{const s=i-r;s>=e&&(Bc.read(n),t(s-e))};return _n.read(n,!0),()=>Bc.read(n)}function Joe({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const i=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:VL(i,-e)}:i()}function Xoe({keyframes:t,velocity:e=0,min:r,max:n,power:i=.8,timeConstant:s=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:c=1,modifyTarget:l,driver:u,onUpdate:f,onComplete:d,onStop:h}){const p=t[0];let m;function v(S){return r!==void 0&&Sn}function y(S){return r===void 0?n:n===void 0||Math.abs(r-S){var R;f==null||f(P),(R=S.onUpdate)===null||R===void 0||R.call(S,P)},onComplete:d,onStop:h})}function E(S){b({type:"spring",stiffness:o,damping:a,restDelta:c,...S})}if(v(p))E({velocity:e,keyframes:[p,y(p)]});else{let S=i*e+p;typeof l<"u"&&(S=l(S));const P=y(S),R=P===r?-1:1;let L,j;const H=K=>{L=j,j=K,e=NC(K-L,ta.delta),(R===1&&K>P||R===-1&&Km==null?void 0:m.stop()}}const wl=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),om=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Kx=()=>({type:"keyframes",ease:"linear",duration:.3}),Zoe={type:"keyframes",duration:.8},Rk={x:wl,y:wl,z:wl,rotate:wl,rotateX:wl,rotateY:wl,rotateZ:wl,scaleX:om,scaleY:om,scale:om,opacity:Kx,backgroundColor:Kx,color:Kx,default:om},eae=(t,{keyframes:e})=>e.length>2?Zoe:(Rk[t]||Rk.default)(e[1]),M6=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Fc.test(e)&&!e.startsWith("url("));function tae({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}function $k(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function Mk(t){return typeof t=="number"?0:jC("",t)}function GL(t,e){return t[e]||t.default||t}function rae(t,e,r,n){const i=M6(e,r);let s=n.from!==void 0?n.from:t.get();return s==="none"&&i&&typeof r=="string"?s=jC(e,r):$k(s)&&typeof r=="string"?s=Mk(r):!Array.isArray(r)&&$k(r)&&typeof s=="string"&&(r=Mk(s)),Array.isArray(r)?(r[0]===null&&(r[0]=s),r):[s,r]}const VC=(t,e,r,n={})=>i=>{const s=GL(n,t)||{},o=s.delay||n.delay||0;let{elapsed:a=0}=n;a=a-lv(o);const c=rae(e,t,r,s),l=c[0],u=c[c.length-1],f=M6(t,l),d=M6(t,u);let h={keyframes:c,velocity:e.getVelocity(),...s,elapsed:a,onUpdate:v=>{e.set(v),s.onUpdate&&s.onUpdate(v)},onComplete:()=>{i(),s.onComplete&&s.onComplete()}};if(!f||!d||loe.current||s.type===!1)return Joe(h);if(s.type==="inertia")return Xoe(h);tae(s)||(h={...h,...eae(t,h)}),h.duration&&(h.duration=lv(h.duration)),h.repeatDelay&&(h.repeatDelay=lv(h.repeatDelay));const p=e.owner,m=p&&p.current;if(p&&m instanceof HTMLElement&&!(p!=null&&p.getProps().onUpdate)){const v=Qoe(e,t,h);if(v)return v}return Dy(h)};function nae(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const i=e.map(s=>N6(t,s,r));n=Promise.all(i)}else if(typeof e=="string")n=N6(t,e,r);else{const i=typeof e=="function"?Sb(t,e,r.custom):e;n=KL(t,i,r)}return n.then(()=>t.notify("AnimationComplete",e))}function N6(t,e,r={}){var n;const i=Sb(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(s=r.transitionOverride);const o=i?()=>KL(t,i,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=s;return iae(t,e,u+l,f,d,r)}:()=>Promise.resolve(),{when:c}=s;if(c){const[l,u]=c==="beforeChildren"?[o,a]:[a,o];return l().then(u)}else return Promise.all([o(),a(r.delay)])}function KL(t,e,{delay:r=0,transitionOverride:n,type:i}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...c}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");n&&(o=n);const u=[],f=i&&((s=t.animationState)===null||s===void 0?void 0:s.getState()[i]);for(const d in c){const h=t.getValue(d),p=c[d];if(!h||p===void 0||f&&oae(f,d))continue;const m={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!h.hasAnimated){const y=t.getProps()[coe];y&&(m.elapsed=window.HandoffAppearAnimations(y,d,h,_n))}let v=h.start(VC(d,h,p,t.shouldReduceMotion&&Bd.has(d)?{type:!1}:m));$y(l)&&(l.add(d),v=v.then(()=>l.remove(d))),u.push(v)}return Promise.all(u).then(()=>{a&&noe(t,a)})}function iae(t,e,r=0,n=0,i=1,s){const o=[],a=(t.variantChildren.size-1)*n,c=i===1?(l=0)=>l*n:(l=0)=>a-l*n;return Array.from(t.variantChildren).sort(sae).forEach((l,u)=>{l.notify("AnimationStart",e),o.push(N6(l,e,{...s,delay:r+c(u)}).then(()=>l.notify("AnimationComplete",e)))}),Promise.all(o)}function sae(t,e){return t.sortNodePosition(e)}function oae({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const GC=[Nt.Animate,Nt.InView,Nt.Focus,Nt.Hover,Nt.Tap,Nt.Drag,Nt.Exit],aae=[...GC].reverse(),cae=GC.length;function lae(t){return e=>Promise.all(e.map(({animation:r,options:n})=>nae(t,r,n)))}function uae(t){let e=lae(t);const r=dae();let n=!0;const i=(c,l)=>{const u=Sb(t,l);if(u){const{transition:f,transitionEnd:d,...h}=u;c={...c,...h,...d}}return c};function s(c){e=c(t)}function o(c,l){const u=t.getProps(),f=t.getVariantContext(!0)||{},d=[],h=new Set;let p={},m=1/0;for(let y=0;ym&&P;const K=Array.isArray(S)?S:[S];let Y=K.reduce(i,{});R===!1&&(Y={});const{prevResolvedValues:Q={}}=E,F={...Q,...Y},x=k=>{H=!0,h.delete(k),E.needsAnimating[k]=!0};for(const k in F){const N=Y[k],M=Q[k];p.hasOwnProperty(k)||(N!==M?Ty(N)&&Ty(M)?!EL(N,M)||j?x(k):E.protectedKeys[k]=!0:N!==void 0?x(k):h.add(k):N!==void 0&&h.has(k)?x(k):E.protectedKeys[k]=!0)}E.prevProp=S,E.prevResolvedValues=Y,E.isActive&&(p={...p,...Y}),n&&t.blockInitialAnimation&&(H=!1),H&&!L&&d.push(...K.map(k=>({animation:k,options:{type:b,...c}})))}if(h.size){const y={};h.forEach(b=>{const E=t.getBaseTarget(b);E!==void 0&&(y[b]=E)}),d.push({animation:y})}let v=!!d.length;return n&&u.initial===!1&&!t.manuallyAnimateOnMount&&(v=!1),n=!1,v?e(d):Promise.resolve()}function a(c,l,u){var f;if(r[c].isActive===l)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(c,l)}),r[c].isActive=l;const d=o(u,c);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>r}}function fae(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!EL(e,t):!1}function El(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function dae(){return{[Nt.Animate]:El(!0),[Nt.InView]:El(),[Nt.Hover]:El(),[Nt.Tap]:El(),[Nt.Drag]:El(),[Nt.Focus]:El(),[Nt.Exit]:El()}}const hae={animation:pc(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=uae(t)),gb(e)&&w.useEffect(()=>e.subscribe(t),[e])}),exit:pc(t=>{const{custom:e,visualElement:r}=t,[n,i]=wL(),s=w.useContext(np);w.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(Nt.Exit,!n,{custom:s&&s.custom||e});o&&!n&&o.then(i)},[n])})},Nk=(t,e)=>Math.abs(t-e);function pae(t,e){const r=Nk(t.x,e.x),n=Nk(t.y,e.y);return Math.sqrt(r**2+n**2)}class YL{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 l=Qx(this.lastMoveEventInfo,this.history),u=this.startEvent!==null,f=pae(l.offset,{x:0,y:0})>=3;if(!u&&!f)return;const{point:d}=l,{timestamp:h}=ta;this.history.push({...d,timestamp:h});const{onStart:p,onMove:m}=this.handlers;u||(p&&p(this.lastMoveEvent,l),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,l)},this.handlePointerMove=(l,u)=>{this.lastMoveEvent=l,this.lastMoveEventInfo=Yx(u,this.transformPagePoint),_n.update(this.updatePoint,!0)},this.handlePointerUp=(l,u)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:d}=this.handlers,h=Qx(l.type==="pointercancel"?this.lastMoveEventInfo:Yx(u,this.transformPagePoint),this.history);this.startEvent&&f&&f(l,h),d&&d(l,h)},!mL(e))return;this.handlers=r,this.transformPagePoint=n;const i=TC(e),s=Yx(i,this.transformPagePoint),{point:o}=s,{timestamp:a}=ta;this.history=[{...o,timestamp:a}];const{onSessionStart:c}=r;c&&c(e,Qx(s,this.history)),this.removeListeners=Eb(Wf(window,"pointermove",this.handlePointerMove),Wf(window,"pointerup",this.handlePointerUp),Wf(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Bc.update(this.updatePoint)}}function Yx(t,e){return e?{point:e(t.point)}:t}function Dk(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Qx({point:t},e){return{point:t,delta:Dk(t,QL(e)),offset:Dk(t,mae(e)),velocity:vae(e,.1)}}function mae(t){return t[0]}function QL(t){return t[t.length-1]}function vae(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const i=QL(t);for(;r>=0&&(n=t[r],!(i.timestamp-n.timestamp>lv(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 Ai(t){return t.max-t.min}function D6(t,e=0,r=.01){return Math.abs(t-e)<=r}function Lk(t,e,r,n=.5){t.origin=n,t.originPoint=Er(e.min,e.max,t.origin),t.scale=Ai(r)/Ai(e),(D6(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Er(r.min,r.max,t.origin)-t.originPoint,(D6(t.translate)||isNaN(t.translate))&&(t.translate=0)}function y0(t,e,r,n){Lk(t.x,e.x,r.x,n==null?void 0:n.originX),Lk(t.y,e.y,r.y,n==null?void 0:n.originY)}function jk(t,e,r){t.min=r.min+e.min,t.max=t.min+Ai(e)}function yae(t,e,r){jk(t.x,e.x,r.x),jk(t.y,e.y,r.y)}function Bk(t,e,r){t.min=e.min-r.min,t.max=t.min+Ai(e)}function g0(t,e,r){Bk(t.x,e.x,r.x),Bk(t.y,e.y,r.y)}function gae(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?Er(r,t,n.max):Math.min(t,r)),t}function Fk(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 bae(t,{top:e,left:r,bottom:n,right:i}){return{x:Fk(t.x,r,i),y:Fk(t.y,e,n)}}function Uk(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=Ny(e.min,e.max-n,t.min):n>i&&(r=Ny(t.min,t.max-i,e.min)),fd(0,1,r)}function Eae(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 L6=.35;function Cae(t=L6){return t===!1?t=0:t===!0&&(t=L6),{x:zk(t,"left","right"),y:zk(t,"top","bottom")}}function zk(t,e,r){return{min:qk(t,e),max:qk(t,r)}}function qk(t,e){return typeof t=="number"?t:t[e]||0}const Wk=()=>({translate:0,scale:1,origin:0,originPoint:0}),b0=()=>({x:Wk(),y:Wk()}),Hk=()=>({min:0,max:0}),zr=()=>({x:Hk(),y:Hk()});function Qs(t){return[t("x"),t("y")]}function JL({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function Sae({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function kae(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 Jx(t){return t===void 0||t===1}function j6({scale:t,scaleX:e,scaleY:r}){return!Jx(t)||!Jx(e)||!Jx(r)}function kl(t){return j6(t)||XL(t)||t.z||t.rotate||t.rotateX||t.rotateY}function XL(t){return Vk(t.x)||Vk(t.y)}function Vk(t){return t&&t!=="0%"}function Ly(t,e,r){const n=t-r,i=e*n;return r+i}function Gk(t,e,r,n,i){return i!==void 0&&(t=Ly(t,i,n)),Ly(t,r,n)+e}function B6(t,e=0,r=1,n,i){t.min=Gk(t.min,e,r,n,i),t.max=Gk(t.max,e,r,n,i)}function ZL(t,{x:e,y:r}){B6(t.x,e.translate,e.scale,e.originPoint),B6(t.y,r.translate,r.scale,r.originPoint)}function Aae(t,e,r,n=!1){var i,s;const o=r.length;if(!o)return;e.x=e.y=1;let a,c;for(let l=0;l1.0000000000001||t<.999999999999?t:1}function sc(t,e){t.min=t.min+e,t.max=t.max+e}function Yk(t,e,[r,n,i]){const s=e[i]!==void 0?e[i]:.5,o=Er(t.min,t.max,s);B6(t,e[r],e[n],o,e.scale)}const _ae=["x","scaleX","originX"],Pae=["y","scaleY","originY"];function Sf(t,e){Yk(t.x,e,_ae),Yk(t.y,e,Pae)}function ej(t,e){return JL(kae(t.getBoundingClientRect(),e))}function Iae(t,e,r){const n=ej(t,r),{scroll:i}=e;return i&&(sc(n.x,i.offset.x),sc(n.y,i.offset.y)),n}const Tae=new WeakMap;class Oae{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=zr(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(TC(a,"page").point)},i=(a,c)=>{var l;const{drag:u,dragPropagation:f,onDragStart:d}=this.getProps();u&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=gL(u),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qs(h=>{var p,m;let v=this.getAxisMotionValue(h).get()||0;if(yo.test(v)){const y=(m=(p=this.visualElement.projection)===null||p===void 0?void 0:p.layout)===null||m===void 0?void 0:m.layoutBox[h];y&&(v=Ai(y)*(parseFloat(v)/100))}this.originPoint[h]=v}),d==null||d(a,c),(l=this.visualElement.animationState)===null||l===void 0||l.setActive(Nt.Drag,!0))},s=(a,c)=>{const{dragPropagation:l,dragDirectionLock:u,onDirectionLock:f,onDrag:d}=this.getProps();if(!l&&!this.openGlobalLock)return;const{offset:h}=c;if(u&&this.currentDirection===null){this.currentDirection=Rae(h),this.currentDirection!==null&&(f==null||f(this.currentDirection));return}this.updateAxis("x",c.point,h),this.updateAxis("y",c.point,h),this.visualElement.render(),d==null||d(a,c)},o=(a,c)=>this.stop(a,c);this.panSession=new YL(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(Nt.Drag,!1)}updateAxis(e,r,n){const{drag:i}=this.getProps();if(!n||!am(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=gae(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&&Ef(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=bae(n.layoutBox,e):this.constraints=!1,this.elastic=Cae(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Qs(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=Eae(n.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!Ef(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=Iae(n,i.root,this.visualElement.getTransformPagePoint());let o=xae(i.layout.layoutBox,s);if(r){const a=r(Sae(o));this.hasMutatedConstraints=!!a,a&&(o=JL(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=Qs(u=>{if(!am(u,r,this.currentDirection))return;let f=(c==null?void 0:c[u])||{};o&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:n?e[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(l).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(VC(e,n,0,r))}stopAnimation(){Qs(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){Qs(r=>{const{drag:n}=this.getProps();if(!am(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]-Er(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Ef(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Qs(a=>{const c=this.getAxisMotionValue(a);if(c){const l=c.get();s[a]=wae({min:l,max:l},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(),Qs(a=>{if(!am(a,r,null))return;const c=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];c.set(Er(l,u,s[a]))})}addListeners(){var e;if(!this.visualElement.current)return;Tae.set(this.visualElement,this);const r=this.visualElement.current,n=Wf(r,"pointerdown",l=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();Ef(l)&&(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=wb(window,"resize",()=>this.scalePositionWithinConstraints()),c=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Qs(f=>{const d=this.getAxisMotionValue(f);d&&(this.originPoint[f]+=l[f].translate,d.set(d.get()+l[f].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),c==null||c()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=L6,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function am(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function Rae(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function $ae(t){const{dragControls:e,visualElement:r}=t,n=xb(()=>new Oae(r));w.useEffect(()=>e&&e.subscribe(n),[n,e]),w.useEffect(()=>n.addListeners(),[n])}function Mae({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:i}){const s=t||e||r||n,o=w.useRef(null),{transformPagePoint:a}=w.useContext(xC),c={onSessionStart:n,onStart:e,onMove:t,onEnd:(u,f)=>{o.current=null,r&&r(u,f)}};w.useEffect(()=>{o.current!==null&&o.current.updateHandlers(c)});function l(u){o.current=new YL(u,c,{transformPagePoint:a})}Oy(i,"pointerdown",s&&l),OC(()=>o.current&&o.current.end())}const Nae={pan:pc(Mae),drag:pc($ae)};function F6(t){return typeof t=="string"&&t.startsWith("var(--")}const tj=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Dae(t){const e=tj.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function U6(t,e,r=1){const[n,i]=Dae(t);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);return s?s.trim():F6(i)?U6(i,e,r+1):i}function Lae(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(!F6(s))return;const o=U6(s,n);o&&i.set(o)});for(const i in e){const s=e[i];if(!F6(s))continue;const o=U6(s,n);o&&(e[i]=o,r&&r[i]===void 0&&(r[i]=s))}return{target:e,transitionEnd:r}}const jae=new Set(["width","height","top","left","right","bottom","x","y"]),rj=t=>jae.has(t),Bae=t=>Object.keys(t).some(rj),Qk=t=>t===Su||t===Ie;var Jk;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(Jk||(Jk={}));const Xk=(t,e)=>parseFloat(t.split(", ")[e]),Zk=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return Xk(i[1],e);{const s=n.match(/^matrix\((.+)\)$/);return s?Xk(s[1],t):0}},Fae=new Set(["x","y","z"]),Uae=Py.filter(t=>!Fae.has(t));function zae(t){const e=[];return Uae.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 eA={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:Zk(4,13),y:Zk(5,14)},qae=(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(l=>{a[l]=eA[l](n,s)}),e.render();const c=e.measureViewportBox();return r.forEach(l=>{const u=e.getValue(l);u&&u.jump(a[l]),t[l]=eA[l](c,s)}),t},Wae=(t,e,r={},n={})=>{e={...e},n={...n};const i=Object.keys(e).filter(rj);let s=[],o=!1;const a=[];if(i.forEach(c=>{const l=t.getValue(c);if(!t.hasValue(c))return;let u=r[c],f=Ch(u);const d=e[c];let h;if(Ty(d)){const p=d.length,m=d[0]===null?1:0;u=d[m],f=Ch(u);for(let v=m;v=0?window.pageYOffset:null,l=qae(e,t,a);return s.length&&s.forEach(([u,f])=>{t.getValue(u).set(f)}),t.render(),yb&&c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:n}}else return{target:e,transitionEnd:n}};function Hae(t,e,r,n){return Bae(e)?Wae(t,e,r,n):{target:e,transitionEnd:n}}const Vae=(t,e,r,n)=>{const i=Lae(t,e,n);return e=i.target,n=i.transitionEnd,Hae(t,e,r,n)},z6={current:null},nj={current:!1};function Gae(){if(nj.current=!0,!!yb)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>z6.current=t.matches;t.addListener(e),e()}else z6.current=!1}function Kae(t,e,r){const{willChange:n}=e;for(const i in e){const s=e[i],o=r[i];if(li(s))t.addValue(i,s),$y(n)&&n.add(i);else if(li(o))t.addValue(i,dd(s,{owner:t})),$y(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,dd(a!==void 0?a:s,{owner:t}))}}for(const i in r)e[i]===void 0&&t.removeValue(i);return e}const ij=Object.keys(n1),Yae=ij.length,tA=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Qae{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=()=>_n.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=bb(r),this.isVariantNode=rL(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...l}=this.scrapeMotionValuesFromProps(r,{});for(const u in l){const f=l[u];o[u]!==void 0&&li(f)&&(f.set(o[u],!1),$y(c)&&c.add(u))}}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)),nj.current||Gae(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:z6.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(),Bc.update(this.notifyUpdate),Bc.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=Bd.has(e),i=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&_n.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 c=[];for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:h,layoutRoot:p})}return c}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):zr()}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=dd(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=IC(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&&!li(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 MC),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}}const sj=["initial",...GC],Jae=sj.length;class oj extends Qae{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=ooe(n,e||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),o&&(o=i(o))),s){ioe(this,n,o);const a=Vae(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function Xae(t){return window.getComputedStyle(t)}class Zae extends oj{readValueFromInstance(e,r){if(Bd.has(r)){const n=LC(r);return n&&n.default||0}else{const n=Xae(e),i=(sL(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return ej(e,r)}build(e,r,n,i){CC(e,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,r){return PC(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;li(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,i){uL(e,r,n,i)}}class ece extends oj{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return Bd.has(r)?((n=LC(r))===null||n===void 0?void 0:n.default)||0:(r=fL.has(r)?r:_C(r),e.getAttribute(r))}measureInstanceViewportBox(){return zr()}scrapeMotionValuesFromProps(e,r){return hL(e,r)}build(e,r,n,i){kC(e,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,r,n,i){dL(e,r,n,i)}mount(e){this.isSVGTag=AC(e.tagName),super.mount(e)}}const tce=(t,e)=>EC(t)?new ece(e,{enableHardwareAcceleration:!1}):new Zae(e,{enableHardwareAcceleration:!0});function rA(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Sh={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Ie.test(t))t=parseFloat(t);else return t;const r=rA(t,e.target.x),n=rA(t,e.target.y);return`${r}% ${n}%`}},nA="_$css",rce={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,i=t.includes("var("),s=[];i&&(t=t.replace(tj,h=>(s.push(h),nA)));const o=Fc.parse(t);if(o.length>5)return n;const a=Fc.createTransformer(t),c=typeof o[0]!="number"?1:0,l=r.x.scale*e.x,u=r.y.scale*e.y;o[0+c]/=l,o[1+c]/=u;const f=Er(l,u,.5);typeof o[2+c]=="number"&&(o[2+c]/=f),typeof o[3+c]=="number"&&(o[3+c]/=f);let d=a(o);if(i){let h=0;d=d.replace(nA,()=>{const p=s[h];return h++,p})}return d}};class nce extends g.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=e;Gie(sce),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()})),p0.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()||_n.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 ice(t){const[e,r]=wL(),n=w.useContext(wC);return g.createElement(nce,{...t,layoutGroup:n,switchLayoutGroup:w.useContext(nL),isPresent:e,safeToRemove:r})}const sce={borderRadius:{...Sh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Sh,borderTopRightRadius:Sh,borderBottomLeftRadius:Sh,borderBottomRightRadius:Sh,boxShadow:rce},oce={measureLayout:ice};function ace(t,e,r={}){const n=li(t)?t:dd(t);return n.start(VC("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const aj=["TopLeft","TopRight","BottomLeft","BottomRight"],cce=aj.length,iA=t=>typeof t=="string"?parseFloat(t):t,sA=t=>typeof t=="number"||Ie.test(t);function lce(t,e,r,n,i,s){i?(t.opacity=Er(0,r.opacity!==void 0?r.opacity:1,uce(n)),t.opacityExit=Er(e.opacity!==void 0?e.opacity:1,0,fce(n))):s&&(t.opacity=Er(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(Ny(t,e,n))}function aA(t,e){t.min=e.min,t.max=e.max}function bs(t,e){aA(t.x,e.x),aA(t.y,e.y)}function cA(t,e,r,n,i){return t-=e,t=Ly(t,1/r,n),i!==void 0&&(t=Ly(t,1/i,n)),t}function dce(t,e=0,r=1,n=.5,i,s=t,o=t){if(yo.test(e)&&(e=parseFloat(e),e=Er(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=Er(s.min,s.max,n);t===s&&(a-=e),t.min=cA(t.min,e,r,a,i),t.max=cA(t.max,e,r,a,i)}function lA(t,e,[r,n,i],s,o){dce(t,e[r],e[n],e[i],e.scale,s,o)}const hce=["x","scaleX","originX"],pce=["y","scaleY","originY"];function uA(t,e,r,n){lA(t.x,e,hce,r==null?void 0:r.x,n==null?void 0:n.x),lA(t.y,e,pce,r==null?void 0:r.y,n==null?void 0:n.y)}function fA(t){return t.translate===0&&t.scale===1}function lj(t){return fA(t.x)&&fA(t.y)}function uj(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 dA(t){return Ai(t.x)/Ai(t.y)}class mce{constructor(){this.members=[]}add(e){RC(this.members,e),e.scheduleRender()}remove(e){if($C(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 hA(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:c,rotateX:l,rotateY:u}=r;c&&(n+=`rotate(${c}deg) `),l&&(n+=`rotateX(${l}deg) `),u&&(n+=`rotateY(${u}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 vce=(t,e)=>t.depth-e.depth;class yce{constructor(){this.children=[],this.isDirty=!1}add(e){RC(this.children,e),this.isDirty=!0}remove(e){$C(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(vce),this.isDirty=!1,this.children.forEach(e)}}const pA=["","X","Y","Z"],mA=1e3;let gce=0;function fj({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o,a={},c=e==null?void 0:e()){this.id=gce++,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(wce),this.nodes.forEach(Sce),this.nodes.forEach(kce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let l=0;lthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=VL(h,250),p0.hasAnimatedSinceResize&&(p0.hasAnimatedSinceResize=!1,this.nodes.forEach(yA))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:m})=>{var v,y,b,E,S;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const P=(y=(v=this.options.transition)!==null&&v!==void 0?v:f.getDefaultTransition())!==null&&y!==void 0?y:Tce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:L}=f.getProps(),j=!this.targetLayout||!uj(this.targetLayout,m)||p,H=!h&&p;if(this.options.layoutRoot||!((b=this.resumeFrom)===null||b===void 0)&&b.instance||H||h&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,H);const K={...GL(P,"layout"),onPlay:R,onComplete:L};(f.shouldReduceMotion||this.options.layoutRoot)&&(K.delay=0,K.type=!1),this.startAnimation(K)}else!h&&this.animationProgress===0&&yA(this),this.isLead()&&((S=(E=this.options).onExitComplete)===null||S===void 0||S.call(E));this.targetLayout=m})}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,Bc.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(Ace),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,c,l;if(this.root.isUpdateBlocked()){(c=(a=this.options).onExitComplete)===null||c===void 0||c.call(a);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{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 c=0;c{var E;const S=b/1e3;gA(h.x,o.x,S),gA(h.y,o.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((E=this.relativeParent)===null||E===void 0)&&E.layout)&&(g0(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Pce(this.relativeTarget,this.relativeTargetOrigin,p,S)),m&&(this.animationValues=d,lce(d,f,this.latestValues,S,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((c=this.resumingFrom.currentAnimation)===null||c===void 0||c.stop()),this.pendingAnimation&&(Bc.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_n.update(()=>{p0.hasAnimatedSinceResize=!0,this.currentAnimation=ace(0,mA,{...o,onUpdate:l=>{var u;this.mixTargetDelta(l),(u=o.onUpdate)===null||u===void 0||u.call(o,l)},onComplete:()=>{var l;(l=o.onComplete)===null||l===void 0||l.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,mA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&dj(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||zr();const f=Ai(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const d=Ai(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+d}bs(a,c),Sf(a,u),y0(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){var c,l,u;this.sharedNodes.has(o)||this.sharedNodes.set(o,new mce),this.sharedNodes.get(o).add(a),a.promote({transition:(c=a.options.initialPromotionConfig)===null||c===void 0?void 0:c.transition,preserveFollowOpacity:(u=(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.shouldPreserveFollowOpacity)===null||u===void 0?void 0:u.call(l,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:c}={}){const l=this.getStack();l&&l.promote(this,c),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:c}=o;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const l={};for(let u=0;u{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(vA),this.root.sharedNodes.clear()}}}function bce(t){t.updateLayout()}function xce(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,c=i.source!==t.layout.source;a==="size"?Qs(h=>{const p=c?i.measuredBox[h]:i.layoutBox[h],m=Ai(p);p.min=s[h].min,p.max=p.min+m}):dj(a,i.layoutBox,s)&&Qs(h=>{const p=c?i.measuredBox[h]:i.layoutBox[h],m=Ai(s[h]);p.max=p.min+m});const l=b0();y0(l,s,i.layoutBox);const u=b0();c?y0(u,t.applyTransform(o,!0),i.measuredBox):y0(u,s,i.layoutBox);const f=!lj(l);let d=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:m}=h;if(p&&m){const v=zr();g0(v,i.layoutBox,p.layoutBox);const y=zr();g0(y,s,m.layoutBox),uj(v,y)||(d=!0),h.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=v,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:f,hasRelativeTargetChanged:d})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function wce(t){t.isProjectionDirty||(t.isProjectionDirty=!!(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=!!(t.parent&&t.parent.isTransformDirty))}function Ece(t){t.clearSnapshot()}function vA(t){t.clearMeasurements()}function Cce(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function yA(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function Sce(t){t.resolveTargetDelta()}function kce(t){t.calcProjection()}function Ace(t){t.resetRotation()}function _ce(t){t.removeLeadSnapshot()}function gA(t,e,r){t.translate=Er(e.translate,0,r),t.scale=Er(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function bA(t,e,r,n){t.min=Er(e.min,r.min,n),t.max=Er(e.max,r.max,n)}function Pce(t,e,r,n){bA(t.x,e.x,r.x,n),bA(t.y,e.y,r.y,n)}function Ice(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Tce={duration:.45,ease:[.4,0,.1,1]};function Oce(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 xA(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function Rce(t){xA(t.x),xA(t.y)}function dj(t,e,r){return t==="position"||t==="preserve-aspect"&&!D6(dA(e),dA(r),.2)}const $ce=fj({attachResizeListener:(t,e)=>wb(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Xx={current:void 0},Mce=fj({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Xx.current){const t=new $ce(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Xx.current=t}return Xx.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Nce={...hae,...Rse,...Nae,...oce},_c=Hie((t,e)=>bse(t,e,Nce,tce,Mce));function hj(){const t=w.useRef(!1);return Ay(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Dce(){const t=hj(),[e,r]=w.useState(0),n=w.useCallback(()=>{t.current&&r(e+1)},[e]);return[w.useCallback(()=>_n.postRender(n),[n]),e]}class Lce extends w.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 jce({children:t,isPresent:e}){const r=w.useId(),n=w.useRef(null),i=w.useRef({width:0,height:0,top:0,left:0});return w.useInsertionEffect(()=>{const{width:s,height:o,top:a,left:c}=i.current;if(e||!n.current||!s||!o)return;n.current.dataset.motionPopId=r;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` - [data-motion-pop-id="${r}"] { - position: absolute !important; - width: ${s}px !important; - height: ${o}px !important; - top: ${a}px !important; - left: ${c}px !important; - } - `),()=>{document.head.removeChild(l)}},[e]),w.createElement(Lce,{isPresent:e,childRef:n,sizeRef:i},w.cloneElement(t,{ref:n}))}const Zx=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:s,mode:o})=>{const a=xb(Bce),c=w.useId(),l=w.useMemo(()=>({id:c,initial:e,isPresent:r,custom:i,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;n&&n()},register:u=>(a.set(u,!1),()=>a.delete(u))}),s?void 0:[r]);return w.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[r]),w.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=w.createElement(jce,{isPresent:r},t)),w.createElement(np.Provider,{value:l},t)};function Bce(){return new Map}const nf=t=>t.key||"";function Fce(t,e){t.forEach(r=>{const n=nf(r);e.set(n,r)})}function Uce(t){const e=[];return w.Children.forEach(t,r=>{w.isValidElement(r)&&e.push(r)}),e}const hd=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{i&&(o="wait");let[a]=Dce();const c=w.useContext(wC).forceRender;c&&(a=c);const l=hj(),u=Uce(t);let f=u;const d=new Set,h=w.useRef(f),p=w.useRef(new Map).current,m=w.useRef(!0);if(Ay(()=>{m.current=!1,Fce(u,p),h.current=f}),OC(()=>{m.current=!0,p.clear(),d.clear()}),m.current)return w.createElement(w.Fragment,null,f.map(E=>w.createElement(Zx,{key:nf(E),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:s,mode:o},E)));f=[...f];const v=h.current.map(nf),y=u.map(nf),b=v.length;for(let E=0;E{if(y.indexOf(E)!==-1)return;const S=p.get(E);if(!S)return;const P=v.indexOf(E),R=()=>{p.delete(E),d.delete(E);const L=h.current.findIndex(j=>j.key===E);if(h.current.splice(L,1),!d.size){if(h.current=u,l.current===!1)return;a(),n&&n()}};f.splice(P,0,w.createElement(Zx,{key:nf(S),isPresent:!1,onExitComplete:R,custom:e,presenceAffectsLayout:s,mode:o},S))}),f=f.map(E=>{const S=E.key;return d.has(S)?E:w.createElement(Zx,{key:nf(E),isPresent:!0,presenceAffectsLayout:s,mode:o},E)}),w.createElement(w.Fragment,null,d.size?f:f.map(E=>w.cloneElement(E)))};var q6=function(t,e){return q6=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},q6(t,e)};function pj(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");q6(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Yi=function(){return Yi=Object.assign||function(e){for(var r,n=1,i=arguments.length;n=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function vj(t,e){return function(r,n){e(r,n,t)}}function zce(t,e,r,n,i,s){function o(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var a=n.kind,c=a==="getter"?"get":a==="setter"?"set":"value",l=!e&&t?n.static?t:t.prototype:null,u=e||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),f,d=!1,h=r.length-1;h>=0;h--){var p={};for(var m in n)p[m]=m==="access"?{}:n[m];for(var m in n.access)p.access[m]=n.access[m];p.addInitializer=function(y){if(d)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(y||null))};var v=(0,r[h])(a==="accessor"?{get:u.get,set:u.set}:u[c],p);if(a==="accessor"){if(v===void 0)continue;if(v===null||typeof v!="object")throw new TypeError("Object expected");(f=o(v.get))&&(u.get=f),(f=o(v.set))&&(u.set=f),(f=o(v.init))&&i.unshift(f)}else(f=o(v))&&(a==="field"?i.unshift(f):u[c]=f)}l&&Object.defineProperty(l,n.name,u),d=!0}function qce(t,e,r){for(var n=arguments.length>2,i=0;i0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function KC(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function wj(){for(var t=[],e=0;e1||a(d,h)})})}function a(d,h){try{c(n[d](h))}catch(p){f(s[0][3],p)}}function c(d){d.value instanceof pd?Promise.resolve(d.value.v).then(l,u):f(s[0][2],d)}function l(d){a("next",d)}function u(d){a("throw",d)}function f(d,h){d(h),s.shift(),s.length&&a(s[0][0],s[0][1])}}function Sj(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(o){return(r=!r)?{value:pd(t[i](o)),done:!1}:s?s(o):o}:s}}function kj(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof jy=="function"?jy(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,c){o=t[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(l){s({value:l,done:a})},o)}}function Aj(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var Vce=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function _j(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Ab(e,t,r);return Vce(e,t),e}function Pj(t){return t&&t.__esModule?t:{default:t}}function Ij(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function Tj(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}function Oj(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}function Rj(t,e,r){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose]}if(typeof n!="function")throw new TypeError("Object not disposable.");t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}var Gce=typeof SuppressedError=="function"?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};function $j(t){function e(n){t.error=t.hasError?new Gce(n,t.error,"An error was suppressed during disposal."):n,t.hasError=!0}function r(){for(;t.stack.length;){var n=t.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,function(s){return e(s),r()})}catch(s){e(s)}}if(t.hasError)throw t.error}return r()}const Kce={__extends:pj,__assign:Yi,__rest:kb,__decorate:mj,__param:vj,__metadata:yj,__awaiter:gj,__generator:bj,__createBinding:Ab,__exportStar:xj,__values:jy,__read:KC,__spread:wj,__spreadArrays:Ej,__spreadArray:YC,__await:pd,__asyncGenerator:Cj,__asyncDelegator:Sj,__asyncValues:kj,__makeTemplateObject:Aj,__importStar:_j,__importDefault:Pj,__classPrivateFieldGet:Ij,__classPrivateFieldSet:Tj,__classPrivateFieldIn:Oj,__addDisposableResource:Rj,__disposeResources:$j},KAe=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:Rj,get __assign(){return Yi},__asyncDelegator:Sj,__asyncGenerator:Cj,__asyncValues:kj,__await:pd,__awaiter:gj,__classPrivateFieldGet:Ij,__classPrivateFieldIn:Oj,__classPrivateFieldSet:Tj,__createBinding:Ab,__decorate:mj,__disposeResources:$j,__esDecorate:zce,__exportStar:xj,__extends:pj,__generator:bj,__importDefault:Pj,__importStar:_j,__makeTemplateObject:Aj,__metadata:yj,__param:vj,__propKey:Wce,__read:KC,__rest:kb,__runInitializers:qce,__setFunctionName:Hce,__spread:wj,__spreadArray:YC,__spreadArrays:Ej,__values:jy,default:Kce},Symbol.toStringTag,{value:"Module"})),Mj={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"},Yce={...Mj,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)"},Qce={...Mj,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)"},Jce={dark:Yce,light:Qce},Xce={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"}},wA={sm:0,md:480,lg:769,xl:1281};var EA={colors:{black:"var(--seq-colors-black)",white:"var(--seq-colors-white)",inherit:"var(--seq-colors-inherit)",transparent:"var(--seq-colors-transparent)",positive:"var(--seq-colors-positive)",negative:"var(--seq-colors-negative)",info:"var(--seq-colors-info)",warning:"var(--seq-colors-warning)",gradientBackdrop:"var(--seq-colors-gradient-backdrop)",gradientPrimary:"var(--seq-colors-gradient-primary)",gradientSecondary:"var(--seq-colors-gradient-secondary)",arbitrumDark:"var(--seq-colors-arbitrum-dark)",arbitrumLight:"var(--seq-colors-arbitrum-light)",avalanceDark:"var(--seq-colors-avalance-dark)",avalanceLight:"var(--seq-colors-avalance-light)",bscDark:"var(--seq-colors-bsc-dark)",bscLight:"var(--seq-colors-bsc-light)",ethereumDark:"var(--seq-colors-ethereum-dark)",ethereumLight:"var(--seq-colors-ethereum-light)",gnosisDark:"var(--seq-colors-gnosis-dark)",gnosisLight:"var(--seq-colors-gnosis-light)",polygonDark:"var(--seq-colors-polygon-dark)",polygonLight:"var(--seq-colors-polygon-light)",text100:"var(--seq-colors-text100)",text80:"var(--seq-colors-text80)",text50:"var(--seq-colors-text50)",textInverse100:"var(--seq-colors-text-inverse100)",backgroundPrimary:"var(--seq-colors-background-primary)",backgroundSecondary:"var(--seq-colors-background-secondary)",backgroundContrast:"var(--seq-colors-background-contrast)",backgroundMuted:"var(--seq-colors-background-muted)",backgroundControl:"var(--seq-colors-background-control)",backgroundInverse:"var(--seq-colors-background-inverse)",backgroundBackdrop:"var(--seq-colors-background-backdrop)",backgroundOverlay:"var(--seq-colors-background-overlay)",backgroundRaised:"var(--seq-colors-background-raised)",buttonGlass:"var(--seq-colors-button-glass)",buttonEmphasis:"var(--seq-colors-button-emphasis)",buttonInverse:"var(--seq-colors-button-inverse)",borderNormal:"var(--seq-colors-border-normal)",borderFocus:"var(--seq-colors-border-focus)"}},Re={blur:{blur:"var(--seq-blur-blur)",none:"var(--seq-blur-none)"},borderWidths:{none:"var(--seq-border-widths-none)",thin:"var(--seq-border-widths-thin)",thick:"var(--seq-border-widths-thick)"},fonts:{inherit:"var(--seq-fonts-inherit)",body:"var(--seq-fonts-body)",mono:"var(--seq-fonts-mono)"},fontSizes:{inherit:"var(--seq-font-sizes-inherit)",xsmall:"var(--seq-font-sizes-xsmall)",small:"var(--seq-font-sizes-small)",normal:"var(--seq-font-sizes-normal)",medium:"var(--seq-font-sizes-medium)",large:"var(--seq-font-sizes-large)",xlarge:"var(--seq-font-sizes-xlarge)"},fontWeights:{inherit:"var(--seq-font-weights-inherit)",normal:"var(--seq-font-weights-normal)",medium:"var(--seq-font-weights-medium)",semibold:"var(--seq-font-weights-semibold)",bold:"var(--seq-font-weights-bold)"},letterSpacings:{inherit:"var(--seq-letter-spacings-inherit)",none:"var(--seq-letter-spacings-none)",normal:"var(--seq-letter-spacings-normal)",wide:"var(--seq-letter-spacings-wide)"},lineHeights:{4:"var(--seq-line-heights-4)",5:"var(--seq-line-heights-5)",6:"var(--seq-line-heights-6)",7:"var(--seq-line-heights-7)",9:"var(--seq-line-heights-9)",inherit:"var(--seq-line-heights-inherit)"},opacity:{0:"var(--seq-opacity-0)",50:"var(--seq-opacity-50)",80:"var(--seq-opacity-80)",100:"var(--seq-opacity-100)"},radii:{none:"var(--seq-radii-none)",xs:"var(--seq-radii-xs)",sm:"var(--seq-radii-sm)",md:"var(--seq-radii-md)",lg:"var(--seq-radii-lg)",circle:"var(--seq-radii-circle)"},space:{0:"var(--seq-space-0)",1:"var(--seq-space-1)",2:"var(--seq-space-2)",3:"var(--seq-space-3)",4:"var(--seq-space-4)",5:"var(--seq-space-5)",6:"var(--seq-space-6)",7:"var(--seq-space-7)",8:"var(--seq-space-8)",9:"var(--seq-space-9)",10:"var(--seq-space-10)",12:"var(--seq-space-12)",14:"var(--seq-space-14)",16:"var(--seq-space-16)","0.25":"var(--seq-space-0_25)","0.5":"var(--seq-space-0_5)","1.5":"var(--seq-space-1_5)"},colors:{black:"var(--seq-colors-black)",white:"var(--seq-colors-white)",inherit:"var(--seq-colors-inherit)",transparent:"var(--seq-colors-transparent)",positive:"var(--seq-colors-positive)",negative:"var(--seq-colors-negative)",info:"var(--seq-colors-info)",warning:"var(--seq-colors-warning)",gradientBackdrop:"var(--seq-colors-gradient-backdrop)",gradientPrimary:"var(--seq-colors-gradient-primary)",gradientSecondary:"var(--seq-colors-gradient-secondary)",arbitrumDark:"var(--seq-colors-arbitrum-dark)",arbitrumLight:"var(--seq-colors-arbitrum-light)",avalanceDark:"var(--seq-colors-avalance-dark)",avalanceLight:"var(--seq-colors-avalance-light)",bscDark:"var(--seq-colors-bsc-dark)",bscLight:"var(--seq-colors-bsc-light)",ethereumDark:"var(--seq-colors-ethereum-dark)",ethereumLight:"var(--seq-colors-ethereum-light)",gnosisDark:"var(--seq-colors-gnosis-dark)",gnosisLight:"var(--seq-colors-gnosis-light)",polygonDark:"var(--seq-colors-polygon-dark)",polygonLight:"var(--seq-colors-polygon-light)",text100:"var(--seq-colors-text100)",text80:"var(--seq-colors-text80)",text50:"var(--seq-colors-text50)",textInverse100:"var(--seq-colors-text-inverse100)",backgroundPrimary:"var(--seq-colors-background-primary)",backgroundSecondary:"var(--seq-colors-background-secondary)",backgroundContrast:"var(--seq-colors-background-contrast)",backgroundMuted:"var(--seq-colors-background-muted)",backgroundControl:"var(--seq-colors-background-control)",backgroundInverse:"var(--seq-colors-background-inverse)",backgroundBackdrop:"var(--seq-colors-background-backdrop)",backgroundOverlay:"var(--seq-colors-background-overlay)",backgroundRaised:"var(--seq-colors-background-raised)",buttonGlass:"var(--seq-colors-button-glass)",buttonEmphasis:"var(--seq-colors-button-emphasis)",buttonInverse:"var(--seq-colors-button-inverse)",borderNormal:"var(--seq-colors-border-normal)",borderFocus:"var(--seq-colors-border-focus)"}};function Zce(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 ele(t){var e=Zce(t,"string");return typeof e=="symbol"?e:String(e)}function tle(t,e,r){return e=ele(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function CA(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 ew(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nc.styles)),s=Object.keys(i),o=s.filter(c=>"mappings"in i[c]),a=c=>{var l=[],u={},f=ew({},c),d=!1;for(var h of o){var p=c[h];if(p!=null){var m=i[h];d=!0;for(var v of m.mappings)u[v]=p,f[v]==null&&delete f[v]}}var y=d?ew(ew({},u),f):c,b=function(){var R=y[E],L=i[E];try{if(L.mappings)return"continue";if(typeof R=="string"||typeof R=="number")l.push(L.values[R].defaultClass);else if(Array.isArray(R))for(var j=0;jt,ile=function(){return rle(nle)(...arguments)},Nj=ile({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"}}},textDecoration:{values:{none:{defaultClass:"fyvr11n2"},underline:{defaultClass:"fyvr11n3"}}},userSelect:{values:{none:{defaultClass:"fyvr11n4"},text:{defaultClass:"fyvr11n5"},all:{defaultClass:"fyvr11n6"},auto:{defaultClass:"fyvr11n7"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11n8"},nowrap:{defaultClass:"fyvr11n9"},initial:{defaultClass:"fyvr11na"},inherit:{defaultClass:"fyvr11nb"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11nc"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11nd"},"break-word":{defaultClass:"fyvr11ne"},initial:{defaultClass:"fyvr11nf"},inherit:{defaultClass:"fyvr11ng"}}},zIndex:{values:{0:{defaultClass:"fyvr11nh"},1:{defaultClass:"fyvr11ni"},10:{defaultClass:"fyvr11nj"},20:{defaultClass:"fyvr11nk"},30:{defaultClass:"fyvr11nl"},40:{defaultClass:"fyvr11nm"},50:{defaultClass:"fyvr11nn"},"-1":{defaultClass:"fyvr11no"},auto:{defaultClass:"fyvr11np"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11nq"},"16/9":{defaultClass:"fyvr11nr"},"4/3":{defaultClass:"fyvr11ns"},"3/1":{defaultClass:"fyvr11nt"},auto:{defaultClass:"fyvr11nu"}}}}},{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:"fyvr11nv",active:"fyvr11nw",disabled:"fyvr11nx",focus:"fyvr11ny",hover:"fyvr11nz",checked:"fyvr11o0"},defaultClass:"fyvr11nv"},white:{conditions:{base:"fyvr11o1",active:"fyvr11o2",disabled:"fyvr11o3",focus:"fyvr11o4",hover:"fyvr11o5",checked:"fyvr11o6"},defaultClass:"fyvr11o1"},inherit:{conditions:{base:"fyvr11o7",active:"fyvr11o8",disabled:"fyvr11o9",focus:"fyvr11oa",hover:"fyvr11ob",checked:"fyvr11oc"},defaultClass:"fyvr11o7"},transparent:{conditions:{base:"fyvr11od",active:"fyvr11oe",disabled:"fyvr11of",focus:"fyvr11og",hover:"fyvr11oh",checked:"fyvr11oi"},defaultClass:"fyvr11od"},positive:{conditions:{base:"fyvr11oj",active:"fyvr11ok",disabled:"fyvr11ol",focus:"fyvr11om",hover:"fyvr11on",checked:"fyvr11oo"},defaultClass:"fyvr11oj"},negative:{conditions:{base:"fyvr11op",active:"fyvr11oq",disabled:"fyvr11or",focus:"fyvr11os",hover:"fyvr11ot",checked:"fyvr11ou"},defaultClass:"fyvr11op"},info:{conditions:{base:"fyvr11ov",active:"fyvr11ow",disabled:"fyvr11ox",focus:"fyvr11oy",hover:"fyvr11oz",checked:"fyvr11p0"},defaultClass:"fyvr11ov"},warning:{conditions:{base:"fyvr11p1",active:"fyvr11p2",disabled:"fyvr11p3",focus:"fyvr11p4",hover:"fyvr11p5",checked:"fyvr11p6"},defaultClass:"fyvr11p1"},gradientBackdrop:{conditions:{base:"fyvr11p7",active:"fyvr11p8",disabled:"fyvr11p9",focus:"fyvr11pa",hover:"fyvr11pb",checked:"fyvr11pc"},defaultClass:"fyvr11p7"},gradientPrimary:{conditions:{base:"fyvr11pd",active:"fyvr11pe",disabled:"fyvr11pf",focus:"fyvr11pg",hover:"fyvr11ph",checked:"fyvr11pi"},defaultClass:"fyvr11pd"},gradientSecondary:{conditions:{base:"fyvr11pj",active:"fyvr11pk",disabled:"fyvr11pl",focus:"fyvr11pm",hover:"fyvr11pn",checked:"fyvr11po"},defaultClass:"fyvr11pj"},arbitrumDark:{conditions:{base:"fyvr11pp",active:"fyvr11pq",disabled:"fyvr11pr",focus:"fyvr11ps",hover:"fyvr11pt",checked:"fyvr11pu"},defaultClass:"fyvr11pp"},arbitrumLight:{conditions:{base:"fyvr11pv",active:"fyvr11pw",disabled:"fyvr11px",focus:"fyvr11py",hover:"fyvr11pz",checked:"fyvr11q0"},defaultClass:"fyvr11pv"},avalanceDark:{conditions:{base:"fyvr11q1",active:"fyvr11q2",disabled:"fyvr11q3",focus:"fyvr11q4",hover:"fyvr11q5",checked:"fyvr11q6"},defaultClass:"fyvr11q1"},avalanceLight:{conditions:{base:"fyvr11q7",active:"fyvr11q8",disabled:"fyvr11q9",focus:"fyvr11qa",hover:"fyvr11qb",checked:"fyvr11qc"},defaultClass:"fyvr11q7"},bscDark:{conditions:{base:"fyvr11qd",active:"fyvr11qe",disabled:"fyvr11qf",focus:"fyvr11qg",hover:"fyvr11qh",checked:"fyvr11qi"},defaultClass:"fyvr11qd"},bscLight:{conditions:{base:"fyvr11qj",active:"fyvr11qk",disabled:"fyvr11ql",focus:"fyvr11qm",hover:"fyvr11qn",checked:"fyvr11qo"},defaultClass:"fyvr11qj"},ethereumDark:{conditions:{base:"fyvr11qp",active:"fyvr11qq",disabled:"fyvr11qr",focus:"fyvr11qs",hover:"fyvr11qt",checked:"fyvr11qu"},defaultClass:"fyvr11qp"},ethereumLight:{conditions:{base:"fyvr11qv",active:"fyvr11qw",disabled:"fyvr11qx",focus:"fyvr11qy",hover:"fyvr11qz",checked:"fyvr11r0"},defaultClass:"fyvr11qv"},gnosisDark:{conditions:{base:"fyvr11r1",active:"fyvr11r2",disabled:"fyvr11r3",focus:"fyvr11r4",hover:"fyvr11r5",checked:"fyvr11r6"},defaultClass:"fyvr11r1"},gnosisLight:{conditions:{base:"fyvr11r7",active:"fyvr11r8",disabled:"fyvr11r9",focus:"fyvr11ra",hover:"fyvr11rb",checked:"fyvr11rc"},defaultClass:"fyvr11r7"},polygonDark:{conditions:{base:"fyvr11rd",active:"fyvr11re",disabled:"fyvr11rf",focus:"fyvr11rg",hover:"fyvr11rh",checked:"fyvr11ri"},defaultClass:"fyvr11rd"},polygonLight:{conditions:{base:"fyvr11rj",active:"fyvr11rk",disabled:"fyvr11rl",focus:"fyvr11rm",hover:"fyvr11rn",checked:"fyvr11ro"},defaultClass:"fyvr11rj"},text100:{conditions:{base:"fyvr11rp",active:"fyvr11rq",disabled:"fyvr11rr",focus:"fyvr11rs",hover:"fyvr11rt",checked:"fyvr11ru"},defaultClass:"fyvr11rp"},text80:{conditions:{base:"fyvr11rv",active:"fyvr11rw",disabled:"fyvr11rx",focus:"fyvr11ry",hover:"fyvr11rz",checked:"fyvr11s0"},defaultClass:"fyvr11rv"},text50:{conditions:{base:"fyvr11s1",active:"fyvr11s2",disabled:"fyvr11s3",focus:"fyvr11s4",hover:"fyvr11s5",checked:"fyvr11s6"},defaultClass:"fyvr11s1"},textInverse100:{conditions:{base:"fyvr11s7",active:"fyvr11s8",disabled:"fyvr11s9",focus:"fyvr11sa",hover:"fyvr11sb",checked:"fyvr11sc"},defaultClass:"fyvr11s7"},backgroundPrimary:{conditions:{base:"fyvr11sd",active:"fyvr11se",disabled:"fyvr11sf",focus:"fyvr11sg",hover:"fyvr11sh",checked:"fyvr11si"},defaultClass:"fyvr11sd"},backgroundSecondary:{conditions:{base:"fyvr11sj",active:"fyvr11sk",disabled:"fyvr11sl",focus:"fyvr11sm",hover:"fyvr11sn",checked:"fyvr11so"},defaultClass:"fyvr11sj"},backgroundContrast:{conditions:{base:"fyvr11sp",active:"fyvr11sq",disabled:"fyvr11sr",focus:"fyvr11ss",hover:"fyvr11st",checked:"fyvr11su"},defaultClass:"fyvr11sp"},backgroundMuted:{conditions:{base:"fyvr11sv",active:"fyvr11sw",disabled:"fyvr11sx",focus:"fyvr11sy",hover:"fyvr11sz",checked:"fyvr11t0"},defaultClass:"fyvr11sv"},backgroundControl:{conditions:{base:"fyvr11t1",active:"fyvr11t2",disabled:"fyvr11t3",focus:"fyvr11t4",hover:"fyvr11t5",checked:"fyvr11t6"},defaultClass:"fyvr11t1"},backgroundInverse:{conditions:{base:"fyvr11t7",active:"fyvr11t8",disabled:"fyvr11t9",focus:"fyvr11ta",hover:"fyvr11tb",checked:"fyvr11tc"},defaultClass:"fyvr11t7"},backgroundBackdrop:{conditions:{base:"fyvr11td",active:"fyvr11te",disabled:"fyvr11tf",focus:"fyvr11tg",hover:"fyvr11th",checked:"fyvr11ti"},defaultClass:"fyvr11td"},backgroundOverlay:{conditions:{base:"fyvr11tj",active:"fyvr11tk",disabled:"fyvr11tl",focus:"fyvr11tm",hover:"fyvr11tn",checked:"fyvr11to"},defaultClass:"fyvr11tj"},backgroundRaised:{conditions:{base:"fyvr11tp",active:"fyvr11tq",disabled:"fyvr11tr",focus:"fyvr11ts",hover:"fyvr11tt",checked:"fyvr11tu"},defaultClass:"fyvr11tp"},buttonGlass:{conditions:{base:"fyvr11tv",active:"fyvr11tw",disabled:"fyvr11tx",focus:"fyvr11ty",hover:"fyvr11tz",checked:"fyvr11u0"},defaultClass:"fyvr11tv"},buttonEmphasis:{conditions:{base:"fyvr11u1",active:"fyvr11u2",disabled:"fyvr11u3",focus:"fyvr11u4",hover:"fyvr11u5",checked:"fyvr11u6"},defaultClass:"fyvr11u1"},buttonInverse:{conditions:{base:"fyvr11u7",active:"fyvr11u8",disabled:"fyvr11u9",focus:"fyvr11ua",hover:"fyvr11ub",checked:"fyvr11uc"},defaultClass:"fyvr11u7"},borderNormal:{conditions:{base:"fyvr11ud",active:"fyvr11ue",disabled:"fyvr11uf",focus:"fyvr11ug",hover:"fyvr11uh",checked:"fyvr11ui"},defaultClass:"fyvr11ud"},borderFocus:{conditions:{base:"fyvr11uj",active:"fyvr11uk",disabled:"fyvr11ul",focus:"fyvr11um",hover:"fyvr11un",checked:"fyvr11uo"},defaultClass:"fyvr11uj"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11up",active:"fyvr11uq",disabled:"fyvr11ur",focus:"fyvr11us",hover:"fyvr11ut",checked:"fyvr11uu"},defaultClass:"fyvr11up"},white:{conditions:{base:"fyvr11uv",active:"fyvr11uw",disabled:"fyvr11ux",focus:"fyvr11uy",hover:"fyvr11uz",checked:"fyvr11v0"},defaultClass:"fyvr11uv"},inherit:{conditions:{base:"fyvr11v1",active:"fyvr11v2",disabled:"fyvr11v3",focus:"fyvr11v4",hover:"fyvr11v5",checked:"fyvr11v6"},defaultClass:"fyvr11v1"},transparent:{conditions:{base:"fyvr11v7",active:"fyvr11v8",disabled:"fyvr11v9",focus:"fyvr11va",hover:"fyvr11vb",checked:"fyvr11vc"},defaultClass:"fyvr11v7"},positive:{conditions:{base:"fyvr11vd",active:"fyvr11ve",disabled:"fyvr11vf",focus:"fyvr11vg",hover:"fyvr11vh",checked:"fyvr11vi"},defaultClass:"fyvr11vd"},negative:{conditions:{base:"fyvr11vj",active:"fyvr11vk",disabled:"fyvr11vl",focus:"fyvr11vm",hover:"fyvr11vn",checked:"fyvr11vo"},defaultClass:"fyvr11vj"},info:{conditions:{base:"fyvr11vp",active:"fyvr11vq",disabled:"fyvr11vr",focus:"fyvr11vs",hover:"fyvr11vt",checked:"fyvr11vu"},defaultClass:"fyvr11vp"},warning:{conditions:{base:"fyvr11vv",active:"fyvr11vw",disabled:"fyvr11vx",focus:"fyvr11vy",hover:"fyvr11vz",checked:"fyvr11w0"},defaultClass:"fyvr11vv"},gradientBackdrop:{conditions:{base:"fyvr11w1",active:"fyvr11w2",disabled:"fyvr11w3",focus:"fyvr11w4",hover:"fyvr11w5",checked:"fyvr11w6"},defaultClass:"fyvr11w1"},gradientPrimary:{conditions:{base:"fyvr11w7",active:"fyvr11w8",disabled:"fyvr11w9",focus:"fyvr11wa",hover:"fyvr11wb",checked:"fyvr11wc"},defaultClass:"fyvr11w7"},gradientSecondary:{conditions:{base:"fyvr11wd",active:"fyvr11we",disabled:"fyvr11wf",focus:"fyvr11wg",hover:"fyvr11wh",checked:"fyvr11wi"},defaultClass:"fyvr11wd"},arbitrumDark:{conditions:{base:"fyvr11wj",active:"fyvr11wk",disabled:"fyvr11wl",focus:"fyvr11wm",hover:"fyvr11wn",checked:"fyvr11wo"},defaultClass:"fyvr11wj"},arbitrumLight:{conditions:{base:"fyvr11wp",active:"fyvr11wq",disabled:"fyvr11wr",focus:"fyvr11ws",hover:"fyvr11wt",checked:"fyvr11wu"},defaultClass:"fyvr11wp"},avalanceDark:{conditions:{base:"fyvr11wv",active:"fyvr11ww",disabled:"fyvr11wx",focus:"fyvr11wy",hover:"fyvr11wz",checked:"fyvr11x0"},defaultClass:"fyvr11wv"},avalanceLight:{conditions:{base:"fyvr11x1",active:"fyvr11x2",disabled:"fyvr11x3",focus:"fyvr11x4",hover:"fyvr11x5",checked:"fyvr11x6"},defaultClass:"fyvr11x1"},bscDark:{conditions:{base:"fyvr11x7",active:"fyvr11x8",disabled:"fyvr11x9",focus:"fyvr11xa",hover:"fyvr11xb",checked:"fyvr11xc"},defaultClass:"fyvr11x7"},bscLight:{conditions:{base:"fyvr11xd",active:"fyvr11xe",disabled:"fyvr11xf",focus:"fyvr11xg",hover:"fyvr11xh",checked:"fyvr11xi"},defaultClass:"fyvr11xd"},ethereumDark:{conditions:{base:"fyvr11xj",active:"fyvr11xk",disabled:"fyvr11xl",focus:"fyvr11xm",hover:"fyvr11xn",checked:"fyvr11xo"},defaultClass:"fyvr11xj"},ethereumLight:{conditions:{base:"fyvr11xp",active:"fyvr11xq",disabled:"fyvr11xr",focus:"fyvr11xs",hover:"fyvr11xt",checked:"fyvr11xu"},defaultClass:"fyvr11xp"},gnosisDark:{conditions:{base:"fyvr11xv",active:"fyvr11xw",disabled:"fyvr11xx",focus:"fyvr11xy",hover:"fyvr11xz",checked:"fyvr11y0"},defaultClass:"fyvr11xv"},gnosisLight:{conditions:{base:"fyvr11y1",active:"fyvr11y2",disabled:"fyvr11y3",focus:"fyvr11y4",hover:"fyvr11y5",checked:"fyvr11y6"},defaultClass:"fyvr11y1"},polygonDark:{conditions:{base:"fyvr11y7",active:"fyvr11y8",disabled:"fyvr11y9",focus:"fyvr11ya",hover:"fyvr11yb",checked:"fyvr11yc"},defaultClass:"fyvr11y7"},polygonLight:{conditions:{base:"fyvr11yd",active:"fyvr11ye",disabled:"fyvr11yf",focus:"fyvr11yg",hover:"fyvr11yh",checked:"fyvr11yi"},defaultClass:"fyvr11yd"},text100:{conditions:{base:"fyvr11yj",active:"fyvr11yk",disabled:"fyvr11yl",focus:"fyvr11ym",hover:"fyvr11yn",checked:"fyvr11yo"},defaultClass:"fyvr11yj"},text80:{conditions:{base:"fyvr11yp",active:"fyvr11yq",disabled:"fyvr11yr",focus:"fyvr11ys",hover:"fyvr11yt",checked:"fyvr11yu"},defaultClass:"fyvr11yp"},text50:{conditions:{base:"fyvr11yv",active:"fyvr11yw",disabled:"fyvr11yx",focus:"fyvr11yy",hover:"fyvr11yz",checked:"fyvr11z0"},defaultClass:"fyvr11yv"},textInverse100:{conditions:{base:"fyvr11z1",active:"fyvr11z2",disabled:"fyvr11z3",focus:"fyvr11z4",hover:"fyvr11z5",checked:"fyvr11z6"},defaultClass:"fyvr11z1"},backgroundPrimary:{conditions:{base:"fyvr11z7",active:"fyvr11z8",disabled:"fyvr11z9",focus:"fyvr11za",hover:"fyvr11zb",checked:"fyvr11zc"},defaultClass:"fyvr11z7"},backgroundSecondary:{conditions:{base:"fyvr11zd",active:"fyvr11ze",disabled:"fyvr11zf",focus:"fyvr11zg",hover:"fyvr11zh",checked:"fyvr11zi"},defaultClass:"fyvr11zd"},backgroundContrast:{conditions:{base:"fyvr11zj",active:"fyvr11zk",disabled:"fyvr11zl",focus:"fyvr11zm",hover:"fyvr11zn",checked:"fyvr11zo"},defaultClass:"fyvr11zj"},backgroundMuted:{conditions:{base:"fyvr11zp",active:"fyvr11zq",disabled:"fyvr11zr",focus:"fyvr11zs",hover:"fyvr11zt",checked:"fyvr11zu"},defaultClass:"fyvr11zp"},backgroundControl:{conditions:{base:"fyvr11zv",active:"fyvr11zw",disabled:"fyvr11zx",focus:"fyvr11zy",hover:"fyvr11zz",checked:"fyvr1200"},defaultClass:"fyvr11zv"},backgroundInverse:{conditions:{base:"fyvr1201",active:"fyvr1202",disabled:"fyvr1203",focus:"fyvr1204",hover:"fyvr1205",checked:"fyvr1206"},defaultClass:"fyvr1201"},backgroundBackdrop:{conditions:{base:"fyvr1207",active:"fyvr1208",disabled:"fyvr1209",focus:"fyvr120a",hover:"fyvr120b",checked:"fyvr120c"},defaultClass:"fyvr1207"},backgroundOverlay:{conditions:{base:"fyvr120d",active:"fyvr120e",disabled:"fyvr120f",focus:"fyvr120g",hover:"fyvr120h",checked:"fyvr120i"},defaultClass:"fyvr120d"},backgroundRaised:{conditions:{base:"fyvr120j",active:"fyvr120k",disabled:"fyvr120l",focus:"fyvr120m",hover:"fyvr120n",checked:"fyvr120o"},defaultClass:"fyvr120j"},buttonGlass:{conditions:{base:"fyvr120p",active:"fyvr120q",disabled:"fyvr120r",focus:"fyvr120s",hover:"fyvr120t",checked:"fyvr120u"},defaultClass:"fyvr120p"},buttonEmphasis:{conditions:{base:"fyvr120v",active:"fyvr120w",disabled:"fyvr120x",focus:"fyvr120y",hover:"fyvr120z",checked:"fyvr1210"},defaultClass:"fyvr120v"},buttonInverse:{conditions:{base:"fyvr1211",active:"fyvr1212",disabled:"fyvr1213",focus:"fyvr1214",hover:"fyvr1215",checked:"fyvr1216"},defaultClass:"fyvr1211"},borderNormal:{conditions:{base:"fyvr1217",active:"fyvr1218",disabled:"fyvr1219",focus:"fyvr121a",hover:"fyvr121b",checked:"fyvr121c"},defaultClass:"fyvr1217"},borderFocus:{conditions:{base:"fyvr121d",active:"fyvr121e",disabled:"fyvr121f",focus:"fyvr121g",hover:"fyvr121h",checked:"fyvr121i"},defaultClass:"fyvr121d"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr121j",active:"fyvr121k",disabled:"fyvr121l",focus:"fyvr121m",hover:"fyvr121n",checked:"fyvr121o"},defaultClass:"fyvr121j"},dashed:{conditions:{base:"fyvr121p",active:"fyvr121q",disabled:"fyvr121r",focus:"fyvr121s",hover:"fyvr121t",checked:"fyvr121u"},defaultClass:"fyvr121p"},dotted:{conditions:{base:"fyvr121v",active:"fyvr121w",disabled:"fyvr121x",focus:"fyvr121y",hover:"fyvr121z",checked:"fyvr1220"},defaultClass:"fyvr121v"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr1221",active:"fyvr1222",disabled:"fyvr1223",focus:"fyvr1224",hover:"fyvr1225",checked:"fyvr1226"},defaultClass:"fyvr1221"},white:{conditions:{base:"fyvr1227",active:"fyvr1228",disabled:"fyvr1229",focus:"fyvr122a",hover:"fyvr122b",checked:"fyvr122c"},defaultClass:"fyvr1227"},inherit:{conditions:{base:"fyvr122d",active:"fyvr122e",disabled:"fyvr122f",focus:"fyvr122g",hover:"fyvr122h",checked:"fyvr122i"},defaultClass:"fyvr122d"},transparent:{conditions:{base:"fyvr122j",active:"fyvr122k",disabled:"fyvr122l",focus:"fyvr122m",hover:"fyvr122n",checked:"fyvr122o"},defaultClass:"fyvr122j"},positive:{conditions:{base:"fyvr122p",active:"fyvr122q",disabled:"fyvr122r",focus:"fyvr122s",hover:"fyvr122t",checked:"fyvr122u"},defaultClass:"fyvr122p"},negative:{conditions:{base:"fyvr122v",active:"fyvr122w",disabled:"fyvr122x",focus:"fyvr122y",hover:"fyvr122z",checked:"fyvr1230"},defaultClass:"fyvr122v"},info:{conditions:{base:"fyvr1231",active:"fyvr1232",disabled:"fyvr1233",focus:"fyvr1234",hover:"fyvr1235",checked:"fyvr1236"},defaultClass:"fyvr1231"},warning:{conditions:{base:"fyvr1237",active:"fyvr1238",disabled:"fyvr1239",focus:"fyvr123a",hover:"fyvr123b",checked:"fyvr123c"},defaultClass:"fyvr1237"},gradientBackdrop:{conditions:{base:"fyvr123d",active:"fyvr123e",disabled:"fyvr123f",focus:"fyvr123g",hover:"fyvr123h",checked:"fyvr123i"},defaultClass:"fyvr123d"},gradientPrimary:{conditions:{base:"fyvr123j",active:"fyvr123k",disabled:"fyvr123l",focus:"fyvr123m",hover:"fyvr123n",checked:"fyvr123o"},defaultClass:"fyvr123j"},gradientSecondary:{conditions:{base:"fyvr123p",active:"fyvr123q",disabled:"fyvr123r",focus:"fyvr123s",hover:"fyvr123t",checked:"fyvr123u"},defaultClass:"fyvr123p"},arbitrumDark:{conditions:{base:"fyvr123v",active:"fyvr123w",disabled:"fyvr123x",focus:"fyvr123y",hover:"fyvr123z",checked:"fyvr1240"},defaultClass:"fyvr123v"},arbitrumLight:{conditions:{base:"fyvr1241",active:"fyvr1242",disabled:"fyvr1243",focus:"fyvr1244",hover:"fyvr1245",checked:"fyvr1246"},defaultClass:"fyvr1241"},avalanceDark:{conditions:{base:"fyvr1247",active:"fyvr1248",disabled:"fyvr1249",focus:"fyvr124a",hover:"fyvr124b",checked:"fyvr124c"},defaultClass:"fyvr1247"},avalanceLight:{conditions:{base:"fyvr124d",active:"fyvr124e",disabled:"fyvr124f",focus:"fyvr124g",hover:"fyvr124h",checked:"fyvr124i"},defaultClass:"fyvr124d"},bscDark:{conditions:{base:"fyvr124j",active:"fyvr124k",disabled:"fyvr124l",focus:"fyvr124m",hover:"fyvr124n",checked:"fyvr124o"},defaultClass:"fyvr124j"},bscLight:{conditions:{base:"fyvr124p",active:"fyvr124q",disabled:"fyvr124r",focus:"fyvr124s",hover:"fyvr124t",checked:"fyvr124u"},defaultClass:"fyvr124p"},ethereumDark:{conditions:{base:"fyvr124v",active:"fyvr124w",disabled:"fyvr124x",focus:"fyvr124y",hover:"fyvr124z",checked:"fyvr1250"},defaultClass:"fyvr124v"},ethereumLight:{conditions:{base:"fyvr1251",active:"fyvr1252",disabled:"fyvr1253",focus:"fyvr1254",hover:"fyvr1255",checked:"fyvr1256"},defaultClass:"fyvr1251"},gnosisDark:{conditions:{base:"fyvr1257",active:"fyvr1258",disabled:"fyvr1259",focus:"fyvr125a",hover:"fyvr125b",checked:"fyvr125c"},defaultClass:"fyvr1257"},gnosisLight:{conditions:{base:"fyvr125d",active:"fyvr125e",disabled:"fyvr125f",focus:"fyvr125g",hover:"fyvr125h",checked:"fyvr125i"},defaultClass:"fyvr125d"},polygonDark:{conditions:{base:"fyvr125j",active:"fyvr125k",disabled:"fyvr125l",focus:"fyvr125m",hover:"fyvr125n",checked:"fyvr125o"},defaultClass:"fyvr125j"},polygonLight:{conditions:{base:"fyvr125p",active:"fyvr125q",disabled:"fyvr125r",focus:"fyvr125s",hover:"fyvr125t",checked:"fyvr125u"},defaultClass:"fyvr125p"},text100:{conditions:{base:"fyvr125v",active:"fyvr125w",disabled:"fyvr125x",focus:"fyvr125y",hover:"fyvr125z",checked:"fyvr1260"},defaultClass:"fyvr125v"},text80:{conditions:{base:"fyvr1261",active:"fyvr1262",disabled:"fyvr1263",focus:"fyvr1264",hover:"fyvr1265",checked:"fyvr1266"},defaultClass:"fyvr1261"},text50:{conditions:{base:"fyvr1267",active:"fyvr1268",disabled:"fyvr1269",focus:"fyvr126a",hover:"fyvr126b",checked:"fyvr126c"},defaultClass:"fyvr1267"},textInverse100:{conditions:{base:"fyvr126d",active:"fyvr126e",disabled:"fyvr126f",focus:"fyvr126g",hover:"fyvr126h",checked:"fyvr126i"},defaultClass:"fyvr126d"},backgroundPrimary:{conditions:{base:"fyvr126j",active:"fyvr126k",disabled:"fyvr126l",focus:"fyvr126m",hover:"fyvr126n",checked:"fyvr126o"},defaultClass:"fyvr126j"},backgroundSecondary:{conditions:{base:"fyvr126p",active:"fyvr126q",disabled:"fyvr126r",focus:"fyvr126s",hover:"fyvr126t",checked:"fyvr126u"},defaultClass:"fyvr126p"},backgroundContrast:{conditions:{base:"fyvr126v",active:"fyvr126w",disabled:"fyvr126x",focus:"fyvr126y",hover:"fyvr126z",checked:"fyvr1270"},defaultClass:"fyvr126v"},backgroundMuted:{conditions:{base:"fyvr1271",active:"fyvr1272",disabled:"fyvr1273",focus:"fyvr1274",hover:"fyvr1275",checked:"fyvr1276"},defaultClass:"fyvr1271"},backgroundControl:{conditions:{base:"fyvr1277",active:"fyvr1278",disabled:"fyvr1279",focus:"fyvr127a",hover:"fyvr127b",checked:"fyvr127c"},defaultClass:"fyvr1277"},backgroundInverse:{conditions:{base:"fyvr127d",active:"fyvr127e",disabled:"fyvr127f",focus:"fyvr127g",hover:"fyvr127h",checked:"fyvr127i"},defaultClass:"fyvr127d"},backgroundBackdrop:{conditions:{base:"fyvr127j",active:"fyvr127k",disabled:"fyvr127l",focus:"fyvr127m",hover:"fyvr127n",checked:"fyvr127o"},defaultClass:"fyvr127j"},backgroundOverlay:{conditions:{base:"fyvr127p",active:"fyvr127q",disabled:"fyvr127r",focus:"fyvr127s",hover:"fyvr127t",checked:"fyvr127u"},defaultClass:"fyvr127p"},backgroundRaised:{conditions:{base:"fyvr127v",active:"fyvr127w",disabled:"fyvr127x",focus:"fyvr127y",hover:"fyvr127z",checked:"fyvr1280"},defaultClass:"fyvr127v"},buttonGlass:{conditions:{base:"fyvr1281",active:"fyvr1282",disabled:"fyvr1283",focus:"fyvr1284",hover:"fyvr1285",checked:"fyvr1286"},defaultClass:"fyvr1281"},buttonEmphasis:{conditions:{base:"fyvr1287",active:"fyvr1288",disabled:"fyvr1289",focus:"fyvr128a",hover:"fyvr128b",checked:"fyvr128c"},defaultClass:"fyvr1287"},buttonInverse:{conditions:{base:"fyvr128d",active:"fyvr128e",disabled:"fyvr128f",focus:"fyvr128g",hover:"fyvr128h",checked:"fyvr128i"},defaultClass:"fyvr128d"},borderNormal:{conditions:{base:"fyvr128j",active:"fyvr128k",disabled:"fyvr128l",focus:"fyvr128m",hover:"fyvr128n",checked:"fyvr128o"},defaultClass:"fyvr128j"},borderFocus:{conditions:{base:"fyvr128p",active:"fyvr128q",disabled:"fyvr128r",focus:"fyvr128s",hover:"fyvr128t",checked:"fyvr128u"},defaultClass:"fyvr128p"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128v",active:"fyvr128w",disabled:"fyvr128x",focus:"fyvr128y",hover:"fyvr128z",checked:"fyvr1290"},defaultClass:"fyvr128v"},dashed:{conditions:{base:"fyvr1291",active:"fyvr1292",disabled:"fyvr1293",focus:"fyvr1294",hover:"fyvr1295",checked:"fyvr1296"},defaultClass:"fyvr1291"},dotted:{conditions:{base:"fyvr1297",active:"fyvr1298",disabled:"fyvr1299",focus:"fyvr129a",hover:"fyvr129b",checked:"fyvr129c"},defaultClass:"fyvr1297"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr129d",active:"fyvr129e",disabled:"fyvr129f",focus:"fyvr129g",hover:"fyvr129h",checked:"fyvr129i"},defaultClass:"fyvr129d"},white:{conditions:{base:"fyvr129j",active:"fyvr129k",disabled:"fyvr129l",focus:"fyvr129m",hover:"fyvr129n",checked:"fyvr129o"},defaultClass:"fyvr129j"},inherit:{conditions:{base:"fyvr129p",active:"fyvr129q",disabled:"fyvr129r",focus:"fyvr129s",hover:"fyvr129t",checked:"fyvr129u"},defaultClass:"fyvr129p"},transparent:{conditions:{base:"fyvr129v",active:"fyvr129w",disabled:"fyvr129x",focus:"fyvr129y",hover:"fyvr129z",checked:"fyvr12a0"},defaultClass:"fyvr129v"},positive:{conditions:{base:"fyvr12a1",active:"fyvr12a2",disabled:"fyvr12a3",focus:"fyvr12a4",hover:"fyvr12a5",checked:"fyvr12a6"},defaultClass:"fyvr12a1"},negative:{conditions:{base:"fyvr12a7",active:"fyvr12a8",disabled:"fyvr12a9",focus:"fyvr12aa",hover:"fyvr12ab",checked:"fyvr12ac"},defaultClass:"fyvr12a7"},info:{conditions:{base:"fyvr12ad",active:"fyvr12ae",disabled:"fyvr12af",focus:"fyvr12ag",hover:"fyvr12ah",checked:"fyvr12ai"},defaultClass:"fyvr12ad"},warning:{conditions:{base:"fyvr12aj",active:"fyvr12ak",disabled:"fyvr12al",focus:"fyvr12am",hover:"fyvr12an",checked:"fyvr12ao"},defaultClass:"fyvr12aj"},gradientBackdrop:{conditions:{base:"fyvr12ap",active:"fyvr12aq",disabled:"fyvr12ar",focus:"fyvr12as",hover:"fyvr12at",checked:"fyvr12au"},defaultClass:"fyvr12ap"},gradientPrimary:{conditions:{base:"fyvr12av",active:"fyvr12aw",disabled:"fyvr12ax",focus:"fyvr12ay",hover:"fyvr12az",checked:"fyvr12b0"},defaultClass:"fyvr12av"},gradientSecondary:{conditions:{base:"fyvr12b1",active:"fyvr12b2",disabled:"fyvr12b3",focus:"fyvr12b4",hover:"fyvr12b5",checked:"fyvr12b6"},defaultClass:"fyvr12b1"},arbitrumDark:{conditions:{base:"fyvr12b7",active:"fyvr12b8",disabled:"fyvr12b9",focus:"fyvr12ba",hover:"fyvr12bb",checked:"fyvr12bc"},defaultClass:"fyvr12b7"},arbitrumLight:{conditions:{base:"fyvr12bd",active:"fyvr12be",disabled:"fyvr12bf",focus:"fyvr12bg",hover:"fyvr12bh",checked:"fyvr12bi"},defaultClass:"fyvr12bd"},avalanceDark:{conditions:{base:"fyvr12bj",active:"fyvr12bk",disabled:"fyvr12bl",focus:"fyvr12bm",hover:"fyvr12bn",checked:"fyvr12bo"},defaultClass:"fyvr12bj"},avalanceLight:{conditions:{base:"fyvr12bp",active:"fyvr12bq",disabled:"fyvr12br",focus:"fyvr12bs",hover:"fyvr12bt",checked:"fyvr12bu"},defaultClass:"fyvr12bp"},bscDark:{conditions:{base:"fyvr12bv",active:"fyvr12bw",disabled:"fyvr12bx",focus:"fyvr12by",hover:"fyvr12bz",checked:"fyvr12c0"},defaultClass:"fyvr12bv"},bscLight:{conditions:{base:"fyvr12c1",active:"fyvr12c2",disabled:"fyvr12c3",focus:"fyvr12c4",hover:"fyvr12c5",checked:"fyvr12c6"},defaultClass:"fyvr12c1"},ethereumDark:{conditions:{base:"fyvr12c7",active:"fyvr12c8",disabled:"fyvr12c9",focus:"fyvr12ca",hover:"fyvr12cb",checked:"fyvr12cc"},defaultClass:"fyvr12c7"},ethereumLight:{conditions:{base:"fyvr12cd",active:"fyvr12ce",disabled:"fyvr12cf",focus:"fyvr12cg",hover:"fyvr12ch",checked:"fyvr12ci"},defaultClass:"fyvr12cd"},gnosisDark:{conditions:{base:"fyvr12cj",active:"fyvr12ck",disabled:"fyvr12cl",focus:"fyvr12cm",hover:"fyvr12cn",checked:"fyvr12co"},defaultClass:"fyvr12cj"},gnosisLight:{conditions:{base:"fyvr12cp",active:"fyvr12cq",disabled:"fyvr12cr",focus:"fyvr12cs",hover:"fyvr12ct",checked:"fyvr12cu"},defaultClass:"fyvr12cp"},polygonDark:{conditions:{base:"fyvr12cv",active:"fyvr12cw",disabled:"fyvr12cx",focus:"fyvr12cy",hover:"fyvr12cz",checked:"fyvr12d0"},defaultClass:"fyvr12cv"},polygonLight:{conditions:{base:"fyvr12d1",active:"fyvr12d2",disabled:"fyvr12d3",focus:"fyvr12d4",hover:"fyvr12d5",checked:"fyvr12d6"},defaultClass:"fyvr12d1"},text100:{conditions:{base:"fyvr12d7",active:"fyvr12d8",disabled:"fyvr12d9",focus:"fyvr12da",hover:"fyvr12db",checked:"fyvr12dc"},defaultClass:"fyvr12d7"},text80:{conditions:{base:"fyvr12dd",active:"fyvr12de",disabled:"fyvr12df",focus:"fyvr12dg",hover:"fyvr12dh",checked:"fyvr12di"},defaultClass:"fyvr12dd"},text50:{conditions:{base:"fyvr12dj",active:"fyvr12dk",disabled:"fyvr12dl",focus:"fyvr12dm",hover:"fyvr12dn",checked:"fyvr12do"},defaultClass:"fyvr12dj"},textInverse100:{conditions:{base:"fyvr12dp",active:"fyvr12dq",disabled:"fyvr12dr",focus:"fyvr12ds",hover:"fyvr12dt",checked:"fyvr12du"},defaultClass:"fyvr12dp"},backgroundPrimary:{conditions:{base:"fyvr12dv",active:"fyvr12dw",disabled:"fyvr12dx",focus:"fyvr12dy",hover:"fyvr12dz",checked:"fyvr12e0"},defaultClass:"fyvr12dv"},backgroundSecondary:{conditions:{base:"fyvr12e1",active:"fyvr12e2",disabled:"fyvr12e3",focus:"fyvr12e4",hover:"fyvr12e5",checked:"fyvr12e6"},defaultClass:"fyvr12e1"},backgroundContrast:{conditions:{base:"fyvr12e7",active:"fyvr12e8",disabled:"fyvr12e9",focus:"fyvr12ea",hover:"fyvr12eb",checked:"fyvr12ec"},defaultClass:"fyvr12e7"},backgroundMuted:{conditions:{base:"fyvr12ed",active:"fyvr12ee",disabled:"fyvr12ef",focus:"fyvr12eg",hover:"fyvr12eh",checked:"fyvr12ei"},defaultClass:"fyvr12ed"},backgroundControl:{conditions:{base:"fyvr12ej",active:"fyvr12ek",disabled:"fyvr12el",focus:"fyvr12em",hover:"fyvr12en",checked:"fyvr12eo"},defaultClass:"fyvr12ej"},backgroundInverse:{conditions:{base:"fyvr12ep",active:"fyvr12eq",disabled:"fyvr12er",focus:"fyvr12es",hover:"fyvr12et",checked:"fyvr12eu"},defaultClass:"fyvr12ep"},backgroundBackdrop:{conditions:{base:"fyvr12ev",active:"fyvr12ew",disabled:"fyvr12ex",focus:"fyvr12ey",hover:"fyvr12ez",checked:"fyvr12f0"},defaultClass:"fyvr12ev"},backgroundOverlay:{conditions:{base:"fyvr12f1",active:"fyvr12f2",disabled:"fyvr12f3",focus:"fyvr12f4",hover:"fyvr12f5",checked:"fyvr12f6"},defaultClass:"fyvr12f1"},backgroundRaised:{conditions:{base:"fyvr12f7",active:"fyvr12f8",disabled:"fyvr12f9",focus:"fyvr12fa",hover:"fyvr12fb",checked:"fyvr12fc"},defaultClass:"fyvr12f7"},buttonGlass:{conditions:{base:"fyvr12fd",active:"fyvr12fe",disabled:"fyvr12ff",focus:"fyvr12fg",hover:"fyvr12fh",checked:"fyvr12fi"},defaultClass:"fyvr12fd"},buttonEmphasis:{conditions:{base:"fyvr12fj",active:"fyvr12fk",disabled:"fyvr12fl",focus:"fyvr12fm",hover:"fyvr12fn",checked:"fyvr12fo"},defaultClass:"fyvr12fj"},buttonInverse:{conditions:{base:"fyvr12fp",active:"fyvr12fq",disabled:"fyvr12fr",focus:"fyvr12fs",hover:"fyvr12ft",checked:"fyvr12fu"},defaultClass:"fyvr12fp"},borderNormal:{conditions:{base:"fyvr12fv",active:"fyvr12fw",disabled:"fyvr12fx",focus:"fyvr12fy",hover:"fyvr12fz",checked:"fyvr12g0"},defaultClass:"fyvr12fv"},borderFocus:{conditions:{base:"fyvr12g1",active:"fyvr12g2",disabled:"fyvr12g3",focus:"fyvr12g4",hover:"fyvr12g5",checked:"fyvr12g6"},defaultClass:"fyvr12g1"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12g7",active:"fyvr12g8",disabled:"fyvr12g9",focus:"fyvr12ga",hover:"fyvr12gb",checked:"fyvr12gc"},defaultClass:"fyvr12g7"},dashed:{conditions:{base:"fyvr12gd",active:"fyvr12ge",disabled:"fyvr12gf",focus:"fyvr12gg",hover:"fyvr12gh",checked:"fyvr12gi"},defaultClass:"fyvr12gd"},dotted:{conditions:{base:"fyvr12gj",active:"fyvr12gk",disabled:"fyvr12gl",focus:"fyvr12gm",hover:"fyvr12gn",checked:"fyvr12go"},defaultClass:"fyvr12gj"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12gp",active:"fyvr12gq",disabled:"fyvr12gr",focus:"fyvr12gs",hover:"fyvr12gt",checked:"fyvr12gu"},defaultClass:"fyvr12gp"},white:{conditions:{base:"fyvr12gv",active:"fyvr12gw",disabled:"fyvr12gx",focus:"fyvr12gy",hover:"fyvr12gz",checked:"fyvr12h0"},defaultClass:"fyvr12gv"},inherit:{conditions:{base:"fyvr12h1",active:"fyvr12h2",disabled:"fyvr12h3",focus:"fyvr12h4",hover:"fyvr12h5",checked:"fyvr12h6"},defaultClass:"fyvr12h1"},transparent:{conditions:{base:"fyvr12h7",active:"fyvr12h8",disabled:"fyvr12h9",focus:"fyvr12ha",hover:"fyvr12hb",checked:"fyvr12hc"},defaultClass:"fyvr12h7"},positive:{conditions:{base:"fyvr12hd",active:"fyvr12he",disabled:"fyvr12hf",focus:"fyvr12hg",hover:"fyvr12hh",checked:"fyvr12hi"},defaultClass:"fyvr12hd"},negative:{conditions:{base:"fyvr12hj",active:"fyvr12hk",disabled:"fyvr12hl",focus:"fyvr12hm",hover:"fyvr12hn",checked:"fyvr12ho"},defaultClass:"fyvr12hj"},info:{conditions:{base:"fyvr12hp",active:"fyvr12hq",disabled:"fyvr12hr",focus:"fyvr12hs",hover:"fyvr12ht",checked:"fyvr12hu"},defaultClass:"fyvr12hp"},warning:{conditions:{base:"fyvr12hv",active:"fyvr12hw",disabled:"fyvr12hx",focus:"fyvr12hy",hover:"fyvr12hz",checked:"fyvr12i0"},defaultClass:"fyvr12hv"},gradientBackdrop:{conditions:{base:"fyvr12i1",active:"fyvr12i2",disabled:"fyvr12i3",focus:"fyvr12i4",hover:"fyvr12i5",checked:"fyvr12i6"},defaultClass:"fyvr12i1"},gradientPrimary:{conditions:{base:"fyvr12i7",active:"fyvr12i8",disabled:"fyvr12i9",focus:"fyvr12ia",hover:"fyvr12ib",checked:"fyvr12ic"},defaultClass:"fyvr12i7"},gradientSecondary:{conditions:{base:"fyvr12id",active:"fyvr12ie",disabled:"fyvr12if",focus:"fyvr12ig",hover:"fyvr12ih",checked:"fyvr12ii"},defaultClass:"fyvr12id"},arbitrumDark:{conditions:{base:"fyvr12ij",active:"fyvr12ik",disabled:"fyvr12il",focus:"fyvr12im",hover:"fyvr12in",checked:"fyvr12io"},defaultClass:"fyvr12ij"},arbitrumLight:{conditions:{base:"fyvr12ip",active:"fyvr12iq",disabled:"fyvr12ir",focus:"fyvr12is",hover:"fyvr12it",checked:"fyvr12iu"},defaultClass:"fyvr12ip"},avalanceDark:{conditions:{base:"fyvr12iv",active:"fyvr12iw",disabled:"fyvr12ix",focus:"fyvr12iy",hover:"fyvr12iz",checked:"fyvr12j0"},defaultClass:"fyvr12iv"},avalanceLight:{conditions:{base:"fyvr12j1",active:"fyvr12j2",disabled:"fyvr12j3",focus:"fyvr12j4",hover:"fyvr12j5",checked:"fyvr12j6"},defaultClass:"fyvr12j1"},bscDark:{conditions:{base:"fyvr12j7",active:"fyvr12j8",disabled:"fyvr12j9",focus:"fyvr12ja",hover:"fyvr12jb",checked:"fyvr12jc"},defaultClass:"fyvr12j7"},bscLight:{conditions:{base:"fyvr12jd",active:"fyvr12je",disabled:"fyvr12jf",focus:"fyvr12jg",hover:"fyvr12jh",checked:"fyvr12ji"},defaultClass:"fyvr12jd"},ethereumDark:{conditions:{base:"fyvr12jj",active:"fyvr12jk",disabled:"fyvr12jl",focus:"fyvr12jm",hover:"fyvr12jn",checked:"fyvr12jo"},defaultClass:"fyvr12jj"},ethereumLight:{conditions:{base:"fyvr12jp",active:"fyvr12jq",disabled:"fyvr12jr",focus:"fyvr12js",hover:"fyvr12jt",checked:"fyvr12ju"},defaultClass:"fyvr12jp"},gnosisDark:{conditions:{base:"fyvr12jv",active:"fyvr12jw",disabled:"fyvr12jx",focus:"fyvr12jy",hover:"fyvr12jz",checked:"fyvr12k0"},defaultClass:"fyvr12jv"},gnosisLight:{conditions:{base:"fyvr12k1",active:"fyvr12k2",disabled:"fyvr12k3",focus:"fyvr12k4",hover:"fyvr12k5",checked:"fyvr12k6"},defaultClass:"fyvr12k1"},polygonDark:{conditions:{base:"fyvr12k7",active:"fyvr12k8",disabled:"fyvr12k9",focus:"fyvr12ka",hover:"fyvr12kb",checked:"fyvr12kc"},defaultClass:"fyvr12k7"},polygonLight:{conditions:{base:"fyvr12kd",active:"fyvr12ke",disabled:"fyvr12kf",focus:"fyvr12kg",hover:"fyvr12kh",checked:"fyvr12ki"},defaultClass:"fyvr12kd"},text100:{conditions:{base:"fyvr12kj",active:"fyvr12kk",disabled:"fyvr12kl",focus:"fyvr12km",hover:"fyvr12kn",checked:"fyvr12ko"},defaultClass:"fyvr12kj"},text80:{conditions:{base:"fyvr12kp",active:"fyvr12kq",disabled:"fyvr12kr",focus:"fyvr12ks",hover:"fyvr12kt",checked:"fyvr12ku"},defaultClass:"fyvr12kp"},text50:{conditions:{base:"fyvr12kv",active:"fyvr12kw",disabled:"fyvr12kx",focus:"fyvr12ky",hover:"fyvr12kz",checked:"fyvr12l0"},defaultClass:"fyvr12kv"},textInverse100:{conditions:{base:"fyvr12l1",active:"fyvr12l2",disabled:"fyvr12l3",focus:"fyvr12l4",hover:"fyvr12l5",checked:"fyvr12l6"},defaultClass:"fyvr12l1"},backgroundPrimary:{conditions:{base:"fyvr12l7",active:"fyvr12l8",disabled:"fyvr12l9",focus:"fyvr12la",hover:"fyvr12lb",checked:"fyvr12lc"},defaultClass:"fyvr12l7"},backgroundSecondary:{conditions:{base:"fyvr12ld",active:"fyvr12le",disabled:"fyvr12lf",focus:"fyvr12lg",hover:"fyvr12lh",checked:"fyvr12li"},defaultClass:"fyvr12ld"},backgroundContrast:{conditions:{base:"fyvr12lj",active:"fyvr12lk",disabled:"fyvr12ll",focus:"fyvr12lm",hover:"fyvr12ln",checked:"fyvr12lo"},defaultClass:"fyvr12lj"},backgroundMuted:{conditions:{base:"fyvr12lp",active:"fyvr12lq",disabled:"fyvr12lr",focus:"fyvr12ls",hover:"fyvr12lt",checked:"fyvr12lu"},defaultClass:"fyvr12lp"},backgroundControl:{conditions:{base:"fyvr12lv",active:"fyvr12lw",disabled:"fyvr12lx",focus:"fyvr12ly",hover:"fyvr12lz",checked:"fyvr12m0"},defaultClass:"fyvr12lv"},backgroundInverse:{conditions:{base:"fyvr12m1",active:"fyvr12m2",disabled:"fyvr12m3",focus:"fyvr12m4",hover:"fyvr12m5",checked:"fyvr12m6"},defaultClass:"fyvr12m1"},backgroundBackdrop:{conditions:{base:"fyvr12m7",active:"fyvr12m8",disabled:"fyvr12m9",focus:"fyvr12ma",hover:"fyvr12mb",checked:"fyvr12mc"},defaultClass:"fyvr12m7"},backgroundOverlay:{conditions:{base:"fyvr12md",active:"fyvr12me",disabled:"fyvr12mf",focus:"fyvr12mg",hover:"fyvr12mh",checked:"fyvr12mi"},defaultClass:"fyvr12md"},backgroundRaised:{conditions:{base:"fyvr12mj",active:"fyvr12mk",disabled:"fyvr12ml",focus:"fyvr12mm",hover:"fyvr12mn",checked:"fyvr12mo"},defaultClass:"fyvr12mj"},buttonGlass:{conditions:{base:"fyvr12mp",active:"fyvr12mq",disabled:"fyvr12mr",focus:"fyvr12ms",hover:"fyvr12mt",checked:"fyvr12mu"},defaultClass:"fyvr12mp"},buttonEmphasis:{conditions:{base:"fyvr12mv",active:"fyvr12mw",disabled:"fyvr12mx",focus:"fyvr12my",hover:"fyvr12mz",checked:"fyvr12n0"},defaultClass:"fyvr12mv"},buttonInverse:{conditions:{base:"fyvr12n1",active:"fyvr12n2",disabled:"fyvr12n3",focus:"fyvr12n4",hover:"fyvr12n5",checked:"fyvr12n6"},defaultClass:"fyvr12n1"},borderNormal:{conditions:{base:"fyvr12n7",active:"fyvr12n8",disabled:"fyvr12n9",focus:"fyvr12na",hover:"fyvr12nb",checked:"fyvr12nc"},defaultClass:"fyvr12n7"},borderFocus:{conditions:{base:"fyvr12nd",active:"fyvr12ne",disabled:"fyvr12nf",focus:"fyvr12ng",hover:"fyvr12nh",checked:"fyvr12ni"},defaultClass:"fyvr12nd"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12nj",active:"fyvr12nk",disabled:"fyvr12nl",focus:"fyvr12nm",hover:"fyvr12nn",checked:"fyvr12no"},defaultClass:"fyvr12nj"},dashed:{conditions:{base:"fyvr12np",active:"fyvr12nq",disabled:"fyvr12nr",focus:"fyvr12ns",hover:"fyvr12nt",checked:"fyvr12nu"},defaultClass:"fyvr12np"},dotted:{conditions:{base:"fyvr12nv",active:"fyvr12nw",disabled:"fyvr12nx",focus:"fyvr12ny",hover:"fyvr12nz",checked:"fyvr12o0"},defaultClass:"fyvr12nv"}}},border:{values:{none:{conditions:{base:"fyvr12o1",active:"fyvr12o2",disabled:"fyvr12o3",focus:"fyvr12o4",hover:"fyvr12o5",checked:"fyvr12o6"},defaultClass:"fyvr12o1"}}},color:{values:{black:{conditions:{base:"fyvr12o7",active:"fyvr12o8",disabled:"fyvr12o9",focus:"fyvr12oa",hover:"fyvr12ob",checked:"fyvr12oc"},defaultClass:"fyvr12o7"},white:{conditions:{base:"fyvr12od",active:"fyvr12oe",disabled:"fyvr12of",focus:"fyvr12og",hover:"fyvr12oh",checked:"fyvr12oi"},defaultClass:"fyvr12od"},inherit:{conditions:{base:"fyvr12oj",active:"fyvr12ok",disabled:"fyvr12ol",focus:"fyvr12om",hover:"fyvr12on",checked:"fyvr12oo"},defaultClass:"fyvr12oj"},transparent:{conditions:{base:"fyvr12op",active:"fyvr12oq",disabled:"fyvr12or",focus:"fyvr12os",hover:"fyvr12ot",checked:"fyvr12ou"},defaultClass:"fyvr12op"},positive:{conditions:{base:"fyvr12ov",active:"fyvr12ow",disabled:"fyvr12ox",focus:"fyvr12oy",hover:"fyvr12oz",checked:"fyvr12p0"},defaultClass:"fyvr12ov"},negative:{conditions:{base:"fyvr12p1",active:"fyvr12p2",disabled:"fyvr12p3",focus:"fyvr12p4",hover:"fyvr12p5",checked:"fyvr12p6"},defaultClass:"fyvr12p1"},info:{conditions:{base:"fyvr12p7",active:"fyvr12p8",disabled:"fyvr12p9",focus:"fyvr12pa",hover:"fyvr12pb",checked:"fyvr12pc"},defaultClass:"fyvr12p7"},warning:{conditions:{base:"fyvr12pd",active:"fyvr12pe",disabled:"fyvr12pf",focus:"fyvr12pg",hover:"fyvr12ph",checked:"fyvr12pi"},defaultClass:"fyvr12pd"},gradientBackdrop:{conditions:{base:"fyvr12pj",active:"fyvr12pk",disabled:"fyvr12pl",focus:"fyvr12pm",hover:"fyvr12pn",checked:"fyvr12po"},defaultClass:"fyvr12pj"},gradientPrimary:{conditions:{base:"fyvr12pp",active:"fyvr12pq",disabled:"fyvr12pr",focus:"fyvr12ps",hover:"fyvr12pt",checked:"fyvr12pu"},defaultClass:"fyvr12pp"},gradientSecondary:{conditions:{base:"fyvr12pv",active:"fyvr12pw",disabled:"fyvr12px",focus:"fyvr12py",hover:"fyvr12pz",checked:"fyvr12q0"},defaultClass:"fyvr12pv"},arbitrumDark:{conditions:{base:"fyvr12q1",active:"fyvr12q2",disabled:"fyvr12q3",focus:"fyvr12q4",hover:"fyvr12q5",checked:"fyvr12q6"},defaultClass:"fyvr12q1"},arbitrumLight:{conditions:{base:"fyvr12q7",active:"fyvr12q8",disabled:"fyvr12q9",focus:"fyvr12qa",hover:"fyvr12qb",checked:"fyvr12qc"},defaultClass:"fyvr12q7"},avalanceDark:{conditions:{base:"fyvr12qd",active:"fyvr12qe",disabled:"fyvr12qf",focus:"fyvr12qg",hover:"fyvr12qh",checked:"fyvr12qi"},defaultClass:"fyvr12qd"},avalanceLight:{conditions:{base:"fyvr12qj",active:"fyvr12qk",disabled:"fyvr12ql",focus:"fyvr12qm",hover:"fyvr12qn",checked:"fyvr12qo"},defaultClass:"fyvr12qj"},bscDark:{conditions:{base:"fyvr12qp",active:"fyvr12qq",disabled:"fyvr12qr",focus:"fyvr12qs",hover:"fyvr12qt",checked:"fyvr12qu"},defaultClass:"fyvr12qp"},bscLight:{conditions:{base:"fyvr12qv",active:"fyvr12qw",disabled:"fyvr12qx",focus:"fyvr12qy",hover:"fyvr12qz",checked:"fyvr12r0"},defaultClass:"fyvr12qv"},ethereumDark:{conditions:{base:"fyvr12r1",active:"fyvr12r2",disabled:"fyvr12r3",focus:"fyvr12r4",hover:"fyvr12r5",checked:"fyvr12r6"},defaultClass:"fyvr12r1"},ethereumLight:{conditions:{base:"fyvr12r7",active:"fyvr12r8",disabled:"fyvr12r9",focus:"fyvr12ra",hover:"fyvr12rb",checked:"fyvr12rc"},defaultClass:"fyvr12r7"},gnosisDark:{conditions:{base:"fyvr12rd",active:"fyvr12re",disabled:"fyvr12rf",focus:"fyvr12rg",hover:"fyvr12rh",checked:"fyvr12ri"},defaultClass:"fyvr12rd"},gnosisLight:{conditions:{base:"fyvr12rj",active:"fyvr12rk",disabled:"fyvr12rl",focus:"fyvr12rm",hover:"fyvr12rn",checked:"fyvr12ro"},defaultClass:"fyvr12rj"},polygonDark:{conditions:{base:"fyvr12rp",active:"fyvr12rq",disabled:"fyvr12rr",focus:"fyvr12rs",hover:"fyvr12rt",checked:"fyvr12ru"},defaultClass:"fyvr12rp"},polygonLight:{conditions:{base:"fyvr12rv",active:"fyvr12rw",disabled:"fyvr12rx",focus:"fyvr12ry",hover:"fyvr12rz",checked:"fyvr12s0"},defaultClass:"fyvr12rv"},text100:{conditions:{base:"fyvr12s1",active:"fyvr12s2",disabled:"fyvr12s3",focus:"fyvr12s4",hover:"fyvr12s5",checked:"fyvr12s6"},defaultClass:"fyvr12s1"},text80:{conditions:{base:"fyvr12s7",active:"fyvr12s8",disabled:"fyvr12s9",focus:"fyvr12sa",hover:"fyvr12sb",checked:"fyvr12sc"},defaultClass:"fyvr12s7"},text50:{conditions:{base:"fyvr12sd",active:"fyvr12se",disabled:"fyvr12sf",focus:"fyvr12sg",hover:"fyvr12sh",checked:"fyvr12si"},defaultClass:"fyvr12sd"},textInverse100:{conditions:{base:"fyvr12sj",active:"fyvr12sk",disabled:"fyvr12sl",focus:"fyvr12sm",hover:"fyvr12sn",checked:"fyvr12so"},defaultClass:"fyvr12sj"},backgroundPrimary:{conditions:{base:"fyvr12sp",active:"fyvr12sq",disabled:"fyvr12sr",focus:"fyvr12ss",hover:"fyvr12st",checked:"fyvr12su"},defaultClass:"fyvr12sp"},backgroundSecondary:{conditions:{base:"fyvr12sv",active:"fyvr12sw",disabled:"fyvr12sx",focus:"fyvr12sy",hover:"fyvr12sz",checked:"fyvr12t0"},defaultClass:"fyvr12sv"},backgroundContrast:{conditions:{base:"fyvr12t1",active:"fyvr12t2",disabled:"fyvr12t3",focus:"fyvr12t4",hover:"fyvr12t5",checked:"fyvr12t6"},defaultClass:"fyvr12t1"},backgroundMuted:{conditions:{base:"fyvr12t7",active:"fyvr12t8",disabled:"fyvr12t9",focus:"fyvr12ta",hover:"fyvr12tb",checked:"fyvr12tc"},defaultClass:"fyvr12t7"},backgroundControl:{conditions:{base:"fyvr12td",active:"fyvr12te",disabled:"fyvr12tf",focus:"fyvr12tg",hover:"fyvr12th",checked:"fyvr12ti"},defaultClass:"fyvr12td"},backgroundInverse:{conditions:{base:"fyvr12tj",active:"fyvr12tk",disabled:"fyvr12tl",focus:"fyvr12tm",hover:"fyvr12tn",checked:"fyvr12to"},defaultClass:"fyvr12tj"},backgroundBackdrop:{conditions:{base:"fyvr12tp",active:"fyvr12tq",disabled:"fyvr12tr",focus:"fyvr12ts",hover:"fyvr12tt",checked:"fyvr12tu"},defaultClass:"fyvr12tp"},backgroundOverlay:{conditions:{base:"fyvr12tv",active:"fyvr12tw",disabled:"fyvr12tx",focus:"fyvr12ty",hover:"fyvr12tz",checked:"fyvr12u0"},defaultClass:"fyvr12tv"},backgroundRaised:{conditions:{base:"fyvr12u1",active:"fyvr12u2",disabled:"fyvr12u3",focus:"fyvr12u4",hover:"fyvr12u5",checked:"fyvr12u6"},defaultClass:"fyvr12u1"},buttonGlass:{conditions:{base:"fyvr12u7",active:"fyvr12u8",disabled:"fyvr12u9",focus:"fyvr12ua",hover:"fyvr12ub",checked:"fyvr12uc"},defaultClass:"fyvr12u7"},buttonEmphasis:{conditions:{base:"fyvr12ud",active:"fyvr12ue",disabled:"fyvr12uf",focus:"fyvr12ug",hover:"fyvr12uh",checked:"fyvr12ui"},defaultClass:"fyvr12ud"},buttonInverse:{conditions:{base:"fyvr12uj",active:"fyvr12uk",disabled:"fyvr12ul",focus:"fyvr12um",hover:"fyvr12un",checked:"fyvr12uo"},defaultClass:"fyvr12uj"},borderNormal:{conditions:{base:"fyvr12up",active:"fyvr12uq",disabled:"fyvr12ur",focus:"fyvr12us",hover:"fyvr12ut",checked:"fyvr12uu"},defaultClass:"fyvr12up"},borderFocus:{conditions:{base:"fyvr12uv",active:"fyvr12uw",disabled:"fyvr12ux",focus:"fyvr12uy",hover:"fyvr12uz",checked:"fyvr12v0"},defaultClass:"fyvr12uv"}}},cursor:{values:{default:{conditions:{base:"fyvr12v1",active:"fyvr12v2",disabled:"fyvr12v3",focus:"fyvr12v4",hover:"fyvr12v5",checked:"fyvr12v6"},defaultClass:"fyvr12v1"},pointer:{conditions:{base:"fyvr12v7",active:"fyvr12v8",disabled:"fyvr12v9",focus:"fyvr12va",hover:"fyvr12vb",checked:"fyvr12vc"},defaultClass:"fyvr12v7"},text:{conditions:{base:"fyvr12vd",active:"fyvr12ve",disabled:"fyvr12vf",focus:"fyvr12vg",hover:"fyvr12vh",checked:"fyvr12vi"},defaultClass:"fyvr12vd"}}},opacity:{values:{0:{conditions:{base:"fyvr12vj",active:"fyvr12vk",disabled:"fyvr12vl",focus:"fyvr12vm",hover:"fyvr12vn",checked:"fyvr12vo"},defaultClass:"fyvr12vj"},50:{conditions:{base:"fyvr12vp",active:"fyvr12vq",disabled:"fyvr12vr",focus:"fyvr12vs",hover:"fyvr12vt",checked:"fyvr12vu"},defaultClass:"fyvr12vp"},80:{conditions:{base:"fyvr12vv",active:"fyvr12vw",disabled:"fyvr12vx",focus:"fyvr12vy",hover:"fyvr12vz",checked:"fyvr12w0"},defaultClass:"fyvr12vv"},100:{conditions:{base:"fyvr12w1",active:"fyvr12w2",disabled:"fyvr12w3",focus:"fyvr12w4",hover:"fyvr12w5",checked:"fyvr12w6"},defaultClass:"fyvr12w1"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12w7",active:"fyvr12w8",disabled:"fyvr12w9",focus:"fyvr12wa",hover:"fyvr12wb",checked:"fyvr12wc"},defaultClass:"fyvr12w7"},auto:{conditions:{base:"fyvr12wd",active:"fyvr12we",disabled:"fyvr12wf",focus:"fyvr12wg",hover:"fyvr12wh",checked:"fyvr12wi"},defaultClass:"fyvr12wd"}}},outline:{values:{none:{conditions:{base:"fyvr12wj",active:"fyvr12wk",disabled:"fyvr12wl",focus:"fyvr12wm",hover:"fyvr12wn",checked:"fyvr12wo"},defaultClass:"fyvr12wj"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12wp",active:"fyvr12wq",disabled:"fyvr12wr",focus:"fyvr12ws",hover:"fyvr12wt",checked:"fyvr12wu"},defaultClass:"fyvr12wp"}}}}});const sle=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],W6=t=>(t.display||(t.display=Object.keys(t).some(e=>sle.includes(e))?"flex":void 0),Nj(t));W6.properties=Nj.properties;function Dj(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 l in s)W6.properties.has(l)?o[l]=s[l]:a[l]=s[l];const c=W6({...o,...n});return w.createElement(r,{className:fi(c,i),...a,ref:e})});var Lj={exports:{}},kh={};/** - * @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 SA;function ole(){if(SA)return kh;SA=1;var t=g,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,c,l){var u,f={},d=null,h=null;l!==void 0&&(d=""+l),c.key!==void 0&&(d=""+c.key),c.ref!==void 0&&(h=c.ref);for(u in c)n.call(c,u)&&!s.hasOwnProperty(u)&&(f[u]=c[u]);if(a&&a.defaultProps)for(u in c=a.defaultProps,c)f[u]===void 0&&(f[u]=c[u]);return{$$typeof:e,type:a,key:d,ref:h,props:f,_owner:i.current}}return kh.Fragment=r,kh.jsx=o,kh.jsxs=o,kh}Lj.exports=ole();var X=Lj.exports;function ale(t,e){if(typeof t!="object"||!t)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 cle(t){var e=ale(t,"string");return typeof e=="symbol"?e:String(e)}function lle(t,e,r){return e=cle(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kA(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 AA(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},Ar=t=>{var e=r=>{var n=t.defaultClassName,i=AA(AA({},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 c=a;typeof c=="boolean"&&(c=c===!0?"true":"false");var l=t.variantClassNames[s][c];l&&(n+=" "+l)}}for(var[u,f]of t.compoundVariants)ule(u,i,t.defaultVariants)&&(n+=" "+f);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return _A(t.variantClassNames,r=>_A(r,n=>n.split(" ")[0]))}},e};Ar({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"_2q9vfj8 _2q9vfj0 fyvr11ov",warning:"_2q9vfj9 _2q9vfj1 fyvr11p1",success:"_2q9vfja _2q9vfj2 fyvr11oj",error:"_2q9vfjb _2q9vfj3 fyvr11op"},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 o1=t=>{const{color:e="borderNormal",marginY:r="4",...n}=t;return X.jsx(z,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var jj=Ar({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 fyvr11n9 fyvr11mx"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const oe=w.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:i,hidden:s,italic:o,underline:a,children:c,ellipsis:l,uppercase:u,capitalize:f,...d}=t,h=Xce[n];return X.jsx(z,{as:r,className:fi(i,jj({hidden:s,ellipsis:l,italic:o,underline:a,uppercase:u,capitalize:f})),ref:e,...h,...d,children:c})});var fle=Ar({defaultClassName:"_140wn8ni _140wn8n0 fyvr11ls fyvr11m8 fyvr11n9 fyvr11ko fyvr12o1 fyvr11n2 fyvr11h0",variantClassNames:{variant:{base:"_140wn8nj _140wn8n1 fyvr11od fyvr12s1",ghost:"_140wn8nk _140wn8n2 fyvr11od fyvr12s1",feature:"_140wn8nl _140wn8n3 fyvr11pj fyvr12od",primary:"_140wn8nm _140wn8n4 fyvr11pd fyvr12od",glass:"_140wn8nn _140wn8n5 fyvr11tv fyvr12s1",emphasis:"_140wn8no _140wn8n6 fyvr11u1 fyvr12s1",raised:"_140wn8np _140wn8n7 fyvr11tp fyvr12s1",danger:"_140wn8nq _140wn8n8 fyvr11op fyvr12od",text:"_140wn8nr _1qxj1ib9 _1qxj1ibf _1qxj1ib5 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 _140wn8n9 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11od fyvr12sd"},shape:{circle:"_140wn8ns _140wn8na fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"_140wn8nt _140wn8nb fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"_140wn8nu _140wn8nc fyvr12v1 fyvr12vp",false:"_140wn8nv _140wn8nd fyvr12v7 fyvr12w1 fyvr12vz"},size:{xs:"_140wn8nw _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc _140wn8ne fyvr1ws fyvr1yo",sm:"_140wn8nx _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8nf fyvr1ww fyvr1ys",md:"_140wn8ny _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8ng fyvr1x0 fyvr1yw",lg:"_140wn8nz _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8nh fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8n10"},hasLeftIcon:{true:"_140wn8n11"},hasRightIcon:{true:"_140wn8n12"},activeOutline:{light:"_140wn8n13",bold:"_140wn8n14"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8n15"],[{iconOnly:!0,size:"sm"},"_140wn8n16"],[{iconOnly:!0,size:"md"},"_140wn8n17"],[{iconOnly:!0,size:"lg"},"_140wn8n18"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n19"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n1a"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n1b"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n1c"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n1d"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n1e"]]});const nt=w.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:i,disabled:s=!1,display:o="inline-flex",fontWeight:a="bold",pending:c=!1,label:l,leftIcon:u,rightIcon:f,size:d="md",variant:h="glass",width:p="fit",shape:m="circle",type:v="button",...y}=t,b=u!==void 0&&l!==void 0,E=f!==void 0&&l!==void 0,S=u!==void 0&&l===void 0,P=d==="xs"?"xs":"sm";return X.jsx(z,{as:r,className:fi(i,fle({activeOutline:n,disabled:s||c,hasLeftIcon:b,hasRightIcon:E,iconOnly:S,size:h==="text"?void 0:d,shape:h==="text"?void 0:m,variant:h})),disabled:s||c,display:o,fontWeight:a,ref:e,type:v,width:p,...y,children:S?X.jsx(u,{size:P}):X.jsxs(z,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[X.jsxs(z,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[u&&X.jsx(u,{size:P}),X.jsx(oe,{children:l})]}),f&&X.jsx(f,{size:P})]})})});var dle=Ar({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"rhmai64 rhmai60 fyvr12vz fyvr12v7"},disabled:{true:"rhmai65"},outlined:{true:"rhmai66 rhmai61 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12n7 fyvr12fv fyvr1217 fyvr128j fyvr12nj fyvr12g7 fyvr121j fyvr128v"},blur:{true:"rhmai67 rhmai62 fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const un=w.forwardRef((t,e)=>{const{className:r,children:n,clickable:i,outlined:s,disabled:o,blur:a,width:c="full",...l}=t;return X.jsx(z,{className:fi(r,dle({clickable:i,outlined:s,disabled:o,blur:a})),background:s?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:c,ref:e,...l,children:n})});function wt(){return wt=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>hle(r,e))}function Bt(...t){return w.useCallback(Bj(...t),t)}function On(t,e=[]){let r=[];function n(s,o){const a=w.createContext(o),c=r.length;r=[...r,o];function l(f){const{scope:d,children:h,...p}=f,m=(d==null?void 0:d[t][c])||a,v=w.useMemo(()=>p,Object.values(p));return w.createElement(m.Provider,{value:v},h)}function u(f,d){const h=(d==null?void 0:d[t][c])||a,p=w.useContext(h);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return l.displayName=s+"Provider",[l,u]}const i=()=>{const s=r.map(o=>w.createContext(o));return function(a){const c=(a==null?void 0:a[t])||s;return w.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return i.scopeName=t,[n,ple(i,...e)]}function ple(...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:c,scopeName:l})=>{const f=c(s)[`__scope${l}`];return{...a,...f}},{});return w.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Pe(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 is(t){const e=w.useRef(t);return w.useEffect(()=>{e.current=t}),w.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function ha({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=mle({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=is(r),c=w.useCallback(l=>{if(s){const f=typeof l=="function"?l(t):l;f!==t&&a(f)}else i(l)},[s,t,i,a]);return[o,c]}function mle({defaultProp:t,onChange:e}){const r=w.useState(t),[n]=r,i=w.useRef(n),s=is(e);return w.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}function _b(t){const e=w.useRef({value:t,previous:t});return w.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const _i=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{};function Pb(t){const[e,r]=w.useState(void 0);return _i(()=>{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 c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.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 vle(t,e){return w.useReducer((r,n)=>{const i=e[r][n];return i??r},t)}const Na=t=>{const{present:e,children:r}=t,n=yle(e),i=typeof r=="function"?r({present:n.isPresent}):w.Children.only(r),s=Bt(n.ref,i.ref);return typeof r=="function"||n.isPresent?w.cloneElement(i,{ref:s}):null};Na.displayName="Presence";function yle(t){const[e,r]=w.useState(),n=w.useRef({}),i=w.useRef(t),s=w.useRef("none"),o=t?"mounted":"unmounted",[a,c]=vle(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const l=cm(n.current);s.current=a==="mounted"?l:"none"},[a]),_i(()=>{const l=n.current,u=i.current;if(u!==t){const d=s.current,h=cm(l);t?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,c]),_i(()=>{if(e){const l=f=>{const h=cm(n.current).includes(f.animationName);f.target===e&&h&&Us.flushSync(()=>c("ANIMATION_END"))},u=f=>{f.target===e&&(s.current=cm(n.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:w.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function cm(t){return(t==null?void 0:t.animationName)||"none"}function ze(){return ze=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,i=w.Children.toArray(r),s=i.find(ble);if(s){const o=s.props.children,a=i.map(c=>c===s?w.Children.count(o)>1?w.Children.only(null):w.isValidElement(o)?o.props.children:null:c);return w.createElement(H6,ze({},n,{ref:e}),w.isValidElement(o)?w.cloneElement(o,void 0,a):null)}return w.createElement(H6,ze({},n,{ref:e}),r)});md.displayName="Slot";const H6=w.forwardRef((t,e)=>{const{children:r,...n}=t;return w.isValidElement(r)?w.cloneElement(r,{...xle(n,r.props),ref:e?Bj(e,r.ref):r.ref}):w.Children.count(r)>1?w.Children.only(null):null});H6.displayName="SlotClone";const gle=({children:t})=>w.createElement(w.Fragment,null,t);function ble(t){return w.isValidElement(t)&&t.type===gle}function xle(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 wle=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],tt=wle.reduce((t,e)=>{const r=w.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?md:e;return w.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),w.createElement(a,wt({},o,{ref:i}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function QC(t,e){t&&Us.flushSync(()=>t.dispatchEvent(e))}const Fj="Checkbox",[Ele,YAe]=On(Fj),[Cle,Sle]=Ele(Fj),kle=w.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:c="on",onCheckedChange:l,...u}=t,[f,d]=w.useState(null),h=Bt(e,E=>d(E)),p=w.useRef(!1),m=f?!!f.closest("form"):!0,[v=!1,y]=ha({prop:i,defaultProp:s,onChange:l}),b=w.useRef(v);return w.useEffect(()=>{const E=f==null?void 0:f.form;if(E){const S=()=>y(b.current);return E.addEventListener("reset",S),()=>E.removeEventListener("reset",S)}},[f,y]),w.createElement(Cle,{scope:r,state:v,disabled:a},w.createElement(tt.button,wt({type:"button",role:"checkbox","aria-checked":Yl(v)?"mixed":v,"aria-required":o,"data-state":Uj(v),"data-disabled":a?"":void 0,disabled:a,value:c},u,{ref:h,onKeyDown:Pe(t.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Pe(t.onClick,E=>{y(S=>Yl(S)?!0:!S),m&&(p.current=E.isPropagationStopped(),p.current||E.stopPropagation())})})),m&&w.createElement(Ple,{control:f,bubbles:!p.current,name:n,value:c,checked:v,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),Ale="CheckboxIndicator",_le=w.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...i}=t,s=Sle(Ale,r);return w.createElement(Na,{present:n||Yl(s.state)||s.state===!0},w.createElement(tt.span,wt({"data-state":Uj(s.state),"data-disabled":s.disabled?"":void 0},i,{ref:e,style:{pointerEvents:"none",...t.style}})))}),Ple=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=w.useRef(null),o=_b(r),a=Pb(e);return w.useEffect(()=>{const c=s.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});c.indeterminate=Yl(r),f.call(c,Yl(r)?!1:r),c.dispatchEvent(d)}},[o,r,n]),w.createElement("input",wt({type:"checkbox","aria-hidden":!0,defaultChecked:Yl(r)?!1:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Yl(t){return t==="indeterminate"}function Uj(t){return Yl(t)?"indeterminate":t?"checked":"unchecked"}const Ile=kle,Tle=_le;var Ole=Ar({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 ku=t=>{const{id:e,label:r,description:n,labelLocation:i="top",children:s,...o}=t,a=()=>r||n?X.jsxs(z,{flexDirection:"column",gap:"0.5",children:[r&&X.jsx(oe,{variant:"small",color:"text100",hidden:i==="hidden",children:r}),n&&X.jsx(oe,{variant:"small",color:"text50",hidden:i==="hidden",children:n})]}):null;return X.jsxs(z,{as:"label",className:Ole({labelLocation:i}),htmlFor:e,...o,children:[["left","top","hidden"].includes(i)&&a(),s,i==="right"&&a()]})};var _r=Ar({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const Rle=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.168 9.25V2.929h-1.5V9.25h-6.32v1.5h6.32v6.321h1.5V10.75h6.321v-1.5h-6.32Z",clipRule:"evenodd"})}),$le=({size:t="sm",...e})=>X.jsx(z,{as:Rle,className:_r({size:t}),...e}),Mle=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.888 14.47 1.06 1.06L17.48 10l-5.53-5.53-1.06 1.06 3.719 3.72H4.418v1.5h10.19l-3.72 3.72Z",clipRule:"evenodd"})}),V6=({size:t="sm",...e})=>X.jsx(z,{as:Mle,className:_r({size:t}),...e}),Nle=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),Fd=({size:t="sm",...e})=>X.jsx(z,{as:Nle,className:_r({size:t}),...e}),Dle=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.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"})}),JC=({size:t="sm",...e})=>X.jsx(z,{as:Dle,className:_r({size:t}),...e}),Lle=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m12.888 3.47 1.06 1.06L8.48 10l5.47 5.47-1.061 1.06L6.358 10l6.53-6.53Z",clipRule:"evenodd"})}),Ib=({size:t="sm",...e})=>X.jsx(z,{as:Lle,className:_r({size:t}),...e}),jle=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m7.949 16.53-1.061-1.06 5.47-5.47-5.47-5.47 1.06-1.06L14.48 10l-6.53 6.53Z",clipRule:"evenodd"})}),go=({size:t="sm",...e})=>X.jsx(z,{as:jle,className:_r({size:t}),...e}),Ble=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.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"})}),Au=({size:t="sm",...e})=>X.jsx(z,{as:Ble,className:_r({size:t}),...e}),Fle=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.918 4.5h-6V6h4.5v6.5h1.5v-8Zm-1.5 9.5v3h-9V6h3V3h9v11h-3Zm-7.5 1.5v-8h6v8h-6Z",clipRule:"evenodd"})}),Tb=({size:t="sm",...e})=>X.jsx(z,{as:Fle,className:_r({size:t}),...e}),Ule=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M5 6.714 3.618 3.547H2.5L4.158 7.02H2.98v.69h1.494v.663H2.981v.69h1.494v1.484h1.036V9.063h1.46v-.69h-1.46v-.66l.001-.003h1.46v-.69h-1.13L7.5 3.547H6.383L5 6.714Zm4.747 8.232v-.788a2.887 2.887 0 0 1-1.04-.249 2.04 2.04 0 0 1-.863-.727 2.213 2.213 0 0 1-.344-1.125h1.017c.02.26.098.476.236.65.14.171.319.299.535.383.144.054.297.09.46.109V10.81l-.319-.093c-.538-.157-.964-.388-1.28-.693-.312-.304-.469-.707-.469-1.209 0-.415.105-.777.315-1.086.21-.31.495-.55.853-.72.273-.133.573-.215.9-.246v-.817h.537v.81c.365.023.692.106.981.249.35.17.626.406.827.706.201.298.306.64.315 1.027h-.978a1.04 1.04 0 0 0-.433-.774 1.47 1.47 0 0 0-.712-.264v2.253l.283.079c.214.056.434.132.659.228a2.6 2.6 0 0 1 .627.38c.192.157.347.351.466.583.12.232.18.51.18.834 0 .407-.098.77-.295 1.086a2.006 2.006 0 0 1-.85.749c-.304.15-.66.239-1.07.265v.79h-.538Zm1.024-1.877c-.148.064-.31.106-.486.128v-2.23c.216.064.41.136.584.218.193.089.345.201.457.337.113.136.17.31.17.524 0 .234-.065.44-.194.615-.129.174-.306.31-.531.408ZM9.747 7.706v2.095a4.605 4.605 0 0 1-.246-.086 2.195 2.195 0 0 1-.4-.207 1.038 1.038 0 0 1-.299-.313.847.847 0 0 1-.111-.443.94.94 0 0 1 .164-.545c.112-.162.268-.288.47-.38.126-.059.267-.099.422-.12Zm7.677 10.086h-4.9v-.897h.34a.342.342 0 0 0 .29-.186c.068-.117.114-.254.137-.411.023-.16.032-.304.028-.432l-.027-.779H12.5v-.896h.76l-.043-1.262c-.018-.472.073-.866.273-1.183.203-.317.473-.555.809-.715.335-.16.697-.24 1.084-.24.346 0 .656.056.931.166.278.11.511.26.7.452.191.188.328.404.41.647.081.243.097.498.048.766l-1.01-.156c.023-.22-.014-.403-.11-.55a.891.891 0 0 0-.395-.33 1.31 1.31 0 0 0-1.102.024c-.177.09-.322.227-.434.411-.11.185-.164.42-.164.708l.048 1.261h1.649v.897H14.34l.029.752c.014.29-.025.55-.116.78-.04.1-.096.193-.166.276h3.337v.897Z",clipRule:"evenodd"})}),zle=({size:t="sm",...e})=>X.jsx(z,{as:Ule,className:_r({size:t}),...e}),qle=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.jsx("path",{fill:"currentColor",d:"m5.285 12.883 6.53-6.53 2.254 2.253-6.531 6.531-2.878.618.625-2.872ZM14.674 8.001l-2.253-2.253 1.502-1.503L16.176 6.5 14.674 8Z"})}),Wle=({size:t="sm",...e})=>X.jsx(z,{as:qle,className:_r({size:t}),...e}),Hle=t=>X.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[X.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,d:"M10.906 8.966c1.459 1.316 1.459 3.45 0 4.765l-2.53 2.282c-1.459 1.316-3.824 1.316-5.282 0-1.459-1.315-1.459-3.449 0-4.764l1.265-1.142"}),X.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,d:"M8.094 11c-1.459-1.316-1.459-3.449 0-4.765l2.53-2.282c1.459-1.316 3.823-1.316 5.282 0s1.459 3.449 0 4.765l-1.265 1.14"})]}),Vle=({size:t="sm",...e})=>X.jsx(z,{as:Hle,className:_r({size:t}),...e}),Gle=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.918 14.994v.752A7.003 7.003 0 0 1 6.968 5.05a7.003 7.003 0 0 1 8.95-.796v.752a4.979 4.979 0 0 0-3.293 1.459 5 5 0 0 0 3.293 8.53Zm-4.353-.398c.329.329.684.615 1.059.859a5.5 5.5 0 1 1 0-10.91 6.5 6.5 0 0 0-1.06 10.051Z",clipRule:"evenodd"})}),Kle=({size:t="sm",...e})=>X.jsx(z,{as:Gle,className:_r({size:t}),...e}),Yle=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.283 6.175a4.643 4.643 0 1 0-6.566 6.567l-.708.707a5.644 5.644 0 1 1 7.982 0l-.708-.707a4.644 4.644 0 0 0 0-6.567Zm-5.097 1.47a2.565 2.565 0 0 1 3.628 3.627l.707.707a3.565 3.565 0 1 0-5.042 0l.707-.707a2.565 2.565 0 0 1 0-3.627ZM10 10.959a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm0 .667-1.5 6h3l-1.5-6Z",clipRule:"evenodd"})}),Qle=({size:t="sm",...e})=>X.jsx(z,{as:Yle,className:_r({size:t}),...e}),Jle=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.418 3.6h-2.5v2.5h2.5V3.6Zm0-1.5h1.5v5.5h-5.5V2.1h4Zm0 12h-2.5v2.5h2.5v-2.5Zm0-1.5h1.5v5.5h-5.5v-5.5h4Zm8-9h2.5v2.5h-2.5V3.6Zm4-1.5h-5.5v5.5h5.5V2.1Zm-1.5 12h-2.5v2.5h2.5v-2.5Zm0-1.5h1.5v5.5h-5.5v-5.5h4ZM9.668 2.1v7.25h-7.25v1.5h8.75V2.1h-1.5Zm1.5 10.5v5.5h-1.5v-5.5h1.5Zm1.75-1.75h5.5v-1.5h-5.5v1.5Z",clipRule:"evenodd"})}),Xle=({size:t="sm",...e})=>X.jsx(z,{as:Jle,className:_r({size:t}),...e}),Zle=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.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"})}),Ob=({size:t="sm",...e})=>X.jsx(z,{as:Zle,className:_r({size:t}),...e}),eue=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.529 15.925 9.419 11 4.493 8.89 2.418 8l2.142-.714 11.08-3.693L17.418 3l-.593 1.779-3.693 11.08L12.418 18l-.89-2.075Zm-1.71-6.386L6.635 8.175l6.82-2.273-3.638 3.637Zm1.06 1.061 1.364 3.183 2.273-6.82L10.88 10.6Z",clipRule:"evenodd"})}),Rb=({size:t="sm",...e})=>X.jsx(z,{as:eue,className:_r({size:t}),...e}),tue=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.775 5.204a5.465 5.465 0 0 0-1.341-.537L11 2.5H9l-.443 2.214c-.444.128-.866.31-1.257.54L5.404 3.99 3.99 5.404l1.283 1.925c-.212.38-.38.787-.497 1.216L2.5 9v2l2.276.455c.118.429.285.836.497 1.216L3.99 14.596l1.414 1.414L7.3 14.746c.391.23.813.412 1.257.54L9 17.5h2l.434-2.167c.474-.12.925-.302 1.341-.537l1.821 1.214 1.414-1.414-1.195-1.793c.253-.427.45-.891.581-1.382L17.5 11V9l-2.104-.42a5.467 5.467 0 0 0-.581-1.383l1.195-1.793-1.414-1.414-1.82 1.214Zm-.59 2.692a2.976 2.976 0 1 0-4.208 4.208 2.976 2.976 0 0 0 4.209-4.208Z",clipRule:"evenodd"})}),zj=({size:t="sm",...e})=>X.jsx(z,{as:tue,className:_r({size:t}),...e}),rue=t=>X.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[X.jsx("path",{fill:"currentColor",d:"M4 6.234a.5.5 0 0 0-.5.5v8a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5V10.5L14 9v5.734a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h5.769l-1.516 1.5H4Z"}),X.jsx("path",{stroke:"currentColor",strokeWidth:1.25,d:"M11 3h5v5"}),X.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m16 3-8 8"})]}),nue=({size:t="sm",...e})=>X.jsx(z,{as:rue,className:_r({size:t}),...e}),iue=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.418 3.25h-5.75v13.5h5.75v-1.5h-4.25V4.75h4.25v-1.5Zm4.53 11.28-1.06-1.06 2.72-2.72h-8.19v-1.5h8.19l-2.72-2.72 1.06-1.06L18.48 10l-4.53 4.53Z",clipRule:"evenodd"})}),qj=({size:t="sm",...e})=>X.jsx(z,{as:iue,className:_r({size:t}),...e}),sue=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.539 10.75H4.298v-1.5h12.24v1.5Z",clipRule:"evenodd"})}),oue=({size:t="sm",...e})=>X.jsx(z,{as:sue,className:_r({size:t}),...e}),aue=t=>X.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[X.jsx("path",{fill:"currentColor",d:"M4.633 10.75a5.878 5.878 0 0 1 .008-1.5H2.202v1.5h2.431ZM5.814 6.456A5.854 5.854 0 0 1 6.88 5.401L5.139 3.66l-1.06 1.06 1.735 1.736ZM4.078 15.28l1.711-1.711c.306.398.662.755 1.058 1.063L5.14 16.34l-1.06-1.06ZM9.668 15.802v2.414h1.5V15.8a5.876 5.876 0 0 1-1.5.003ZM13.98 14.623l1.718 1.717 1.06-1.06-1.721-1.723c-.305.4-.66.758-1.056 1.066ZM16.184 10.75h2.45v-1.5h-2.457a5.882 5.882 0 0 1 .007 1.5ZM15.012 6.467l1.747-1.747-1.061-1.06-1.75 1.75c.399.305.756.66 1.064 1.057ZM11.168 4.258V1.784h-1.5v2.472a5.875 5.875 0 0 1 1.5.002Z"}),X.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.418 12.504a2.504 2.504 0 1 0 0-5.008 2.504 2.504 0 0 0 0 5.008Zm0 1.5a4.004 4.004 0 1 0 0-8.008 4.004 4.004 0 0 0 0 8.008Z",clipRule:"evenodd"})]}),cue=({size:t="sm",...e})=>X.jsx(z,{as:aue,className:_r({size:t}),...e}),lue=t=>X.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:X.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"})}),Wj=({size:t="sm",...e})=>X.jsx(z,{as:lue,className:_r({size:t}),...e});var uue=Ar({defaultClassName:"_1c9x66f1 _1c9x66f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12nd fyvr12g1 fyvr121d fyvr128p fyvr12nj fyvr12g7 fyvr121j fyvr128v fyvr11h0 fyvr11ko fyvr11jg fyvr11od fyvr12w1 fyvr12vz fyvr12vr fyvr12v7 fyvr12v3",variantClassNames:{size:{sm:"_1c9x66f2",lg:"_1c9x66f3"}},defaultVariants:{},compoundVariants:[]}),fue="_1c9x66f4 fyvr12s1 fyvr11h0 fyvr11ko fyvr11jg fyvr128 fyvr15o";const due=({size:t="sm"})=>X.jsx(Tle,{className:fue,children:X.jsx(Fd,{size:t==="lg"?"sm":"xs"})});w.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:i,label:s="",labelLocation:o="left",size:a="sm",...c}=t;return X.jsx(ku,{disabled:r,display:"flex",id:n??i,label:s,labelLocation:o,whiteSpace:"nowrap",children:X.jsx(Ile,{className:uue({size:a}),disabled:r,id:n??i,name:i,ref:e,...c,children:X.jsx(due,{size:a})})})});g.createContext(null);const hue=JI.useId||(()=>{});let pue=0;function ra(t){const[e,r]=w.useState(hue());return _i(()=>{t||r(n=>n??String(pue++))},[t]),t||(e?`radix-${e}`:"")}const Hj="Collapsible",[mue,QAe]=On(Hj),[vue,XC]=mue(Hj),yue=w.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:s,onOpenChange:o,...a}=t,[c=!1,l]=ha({prop:n,defaultProp:i,onChange:o});return w.createElement(vue,{scope:r,disabled:s,contentId:ra(),open:c,onOpenToggle:w.useCallback(()=>l(u=>!u),[l])},w.createElement(tt.div,wt({"data-state":ZC(c),"data-disabled":s?"":void 0},a,{ref:e})))}),gue="CollapsibleTrigger",bue=w.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,i=XC(gue,r);return w.createElement(tt.button,wt({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":ZC(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},n,{ref:e,onClick:Pe(t.onClick,i.onOpenToggle)}))}),Vj="CollapsibleContent",xue=w.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=XC(Vj,t.__scopeCollapsible);return w.createElement(Na,{present:r||i.open},({present:s})=>w.createElement(wue,wt({},n,{ref:e,present:s})))}),wue=w.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:i,...s}=t,o=XC(Vj,r),[a,c]=w.useState(n),l=w.useRef(null),u=Bt(e,l),f=w.useRef(0),d=f.current,h=w.useRef(0),p=h.current,m=o.open||a,v=w.useRef(m),y=w.useRef();return w.useEffect(()=>{const b=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(b)},[]),_i(()=>{const b=l.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const E=b.getBoundingClientRect();f.current=E.height,h.current=E.width,v.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),c(n)}},[o.open,n]),w.createElement(tt.div,wt({"data-state":ZC(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m},s,{ref:u,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...t.style}}),m&&i)});function ZC(t){return t?"open":"closed"}const Eue=yue,Cue=bue,Sue=xue;var PA="64px",kue="_4j62fl0",Aue="_4j62fl2 _4j62fl1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11h0 fyvr11ko fyvr11od fyvr128 fyvr12v7 fyvr11n4",_ue="_4j62fl4 _4j62fl3 fyvr1ww fyvr1ys fyvr1so fyvr1v0 fyvr128",Pue="_4j62fl5";const Iue=t=>{const{className:e,children:r,defaultOpen:n,open:i,onOpenChange:s,label:o,...a}=t,[c,l]=w.useState(n),u=i??c,f=h=>{i===void 0&&l(h)},d=h=>{f(h),s==null||s(h)};return X.jsx(Eue,{open:u,defaultOpen:n,onOpenChange:d,asChild:!0,children:X.jsxs(z,{as:_c.div,className:fi(e,kue),initial:{height:u?"auto":PA},animate:{height:u?"auto":PA},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...a,children:[X.jsxs(Cue,{className:Aue,children:[X.jsx(oe,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:o}),X.jsx(z,{as:_c.div,position:"absolute",right:"0",marginRight:"4",initial:{rotate:u?180:0},animate:{rotate:u?180:0},transition:{ease:"linear",duration:.1},children:X.jsx(JC,{className:Pue,color:"text50"})})]}),X.jsx(hd,{children:u&&X.jsx(Sue,{className:_ue,asChild:!0,forceMount:!0,children:X.jsx(_c.div,{initial:{opacity:u?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function $b(t){const e=t+"CollectionProvider",[r,n]=On(e),[i,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:p,children:m}=h,v=g.useRef(null),y=g.useRef(new Map).current;return g.createElement(i,{scope:p,itemMap:y,collectionRef:v},m)},a=t+"CollectionSlot",c=g.forwardRef((h,p)=>{const{scope:m,children:v}=h,y=s(a,m),b=Bt(p,y.collectionRef);return g.createElement(md,{ref:b},v)}),l=t+"CollectionItemSlot",u="data-radix-collection-item",f=g.forwardRef((h,p)=>{const{scope:m,children:v,...y}=h,b=g.useRef(null),E=Bt(p,b),S=s(l,m);return g.useEffect(()=>(S.itemMap.set(b,{ref:b,...y}),()=>void S.itemMap.delete(b))),g.createElement(md,{[u]:"",ref:E},v)});function d(h){const p=s(t+"CollectionConsumer",h);return g.useCallback(()=>{const v=p.collectionRef.current;if(!v)return[];const y=Array.from(v.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((S,P)=>y.indexOf(S.ref.current)-y.indexOf(P.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},d,n]}const Tue=w.createContext(void 0);function Mb(t){const e=w.useContext(Tue);return t||e||"ltr"}function Oue(t,e=globalThis==null?void 0:globalThis.document){const r=is(t);w.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const G6="dismissableLayer.update",Rue="dismissableLayer.pointerDownOutside",$ue="dismissableLayer.focusOutside";let IA;const Mue=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),e4=w.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:c,...l}=t,u=w.useContext(Mue),[f,d]=w.useState(null),h=(r=f==null?void 0:f.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,p]=w.useState({}),m=Bt(e,j=>d(j)),v=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),E=f?v.indexOf(f):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,P=E>=b,R=Nue(j=>{const H=j.target,K=[...u.branches].some(Y=>Y.contains(H));!P||K||(s==null||s(j),a==null||a(j),j.defaultPrevented||c==null||c())},h),L=Due(j=>{const H=j.target;[...u.branches].some(Y=>Y.contains(H))||(o==null||o(j),a==null||a(j),j.defaultPrevented||c==null||c())},h);return Oue(j=>{E===u.layers.size-1&&(i==null||i(j),!j.defaultPrevented&&c&&(j.preventDefault(),c()))},h),w.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(IA=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),TA(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=IA)}},[f,h,n,u]),w.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),TA())},[f,u]),w.useEffect(()=>{const j=()=>p({});return document.addEventListener(G6,j),()=>document.removeEventListener(G6,j)},[]),w.createElement(tt.div,ze({},l,{ref:m,style:{pointerEvents:S?P?"auto":"none":void 0,...t.style},onFocusCapture:Pe(t.onFocusCapture,L.onFocusCapture),onBlurCapture:Pe(t.onBlurCapture,L.onBlurCapture),onPointerDownCapture:Pe(t.onPointerDownCapture,R.onPointerDownCapture)}))});function Nue(t,e=globalThis==null?void 0:globalThis.document){const r=is(t),n=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let c=function(){Gj(Rue,r,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=c,e.addEventListener("click",i.current,{once:!0})):c()}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 Due(t,e=globalThis==null?void 0:globalThis.document){const r=is(t),n=w.useRef(!1);return w.useEffect(()=>{const i=s=>{s.target&&!n.current&&Gj($ue,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 TA(){const t=new CustomEvent(G6);document.dispatchEvent(t)}function Gj(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?QC(i,s):i.dispatchEvent(s)}const Lue=e4;let tw=0;function Kj(){w.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:OA()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:OA()),tw++,()=>{tw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),tw--}},[])}function OA(){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 rw="focusScope.autoFocusOnMount",nw="focusScope.autoFocusOnUnmount",RA={bubbles:!1,cancelable:!0},Yj=w.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,c]=w.useState(null),l=is(i),u=is(s),f=w.useRef(null),d=Bt(e,m=>c(m)),h=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(n){let m=function(E){if(h.paused||!a)return;const S=E.target;a.contains(S)?f.current=S:Qa(f.current,{select:!0})},v=function(E){if(h.paused||!a)return;const S=E.relatedTarget;S!==null&&(a.contains(S)||Qa(f.current,{select:!0}))},y=function(E){if(document.activeElement===document.body)for(const P of E)P.removedNodes.length>0&&Qa(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const b=new MutationObserver(y);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),b.disconnect()}}},[n,a,h.paused]),w.useEffect(()=>{if(a){MA.add(h);const m=document.activeElement;if(!a.contains(m)){const y=new CustomEvent(rw,RA);a.addEventListener(rw,l),a.dispatchEvent(y),y.defaultPrevented||(jue(que(Qj(a)),{select:!0}),document.activeElement===m&&Qa(a))}return()=>{a.removeEventListener(rw,l),setTimeout(()=>{const y=new CustomEvent(nw,RA);a.addEventListener(nw,u),a.dispatchEvent(y),y.defaultPrevented||Qa(m??document.body,{select:!0}),a.removeEventListener(nw,u),MA.remove(h)},0)}}},[a,l,u,h]);const p=w.useCallback(m=>{if(!r&&!n||h.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const b=m.currentTarget,[E,S]=Bue(b);E&&S?!m.shiftKey&&y===S?(m.preventDefault(),r&&Qa(E,{select:!0})):m.shiftKey&&y===E&&(m.preventDefault(),r&&Qa(S,{select:!0})):y===b&&m.preventDefault()}},[r,n,h.paused]);return w.createElement(tt.div,ze({tabIndex:-1},o,{ref:d,onKeyDown:p}))});function jue(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Qa(n,{select:e}),document.activeElement!==r)return}function Bue(t){const e=Qj(t),r=$A(e,t),n=$A(e.reverse(),t);return[r,n]}function Qj(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 $A(t,e){for(const r of t)if(!Fue(r,{upTo:e}))return r}function Fue(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 Uue(t){return t instanceof HTMLInputElement&&"select"in t}function Qa(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&Uue(t)&&e&&t.select()}}const MA=zue();function zue(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=NA(t,e),t.unshift(e)},remove(e){var r;t=NA(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function NA(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function que(t){return t.filter(e=>e.tagName!=="A")}const Wue=["top","right","bottom","left"],Uc=Math.min,yi=Math.max,By=Math.round,lm=Math.floor,zc=t=>({x:t,y:t}),Hue={left:"right",right:"left",bottom:"top",top:"bottom"},Vue={start:"end",end:"start"};function K6(t,e,r){return yi(t,Uc(e,r))}function pa(t,e){return typeof t=="function"?t(e):t}function ma(t){return t.split("-")[0]}function Ud(t){return t.split("-")[1]}function t4(t){return t==="x"?"y":"x"}function r4(t){return t==="y"?"height":"width"}function zd(t){return["top","bottom"].includes(ma(t))?"y":"x"}function n4(t){return t4(zd(t))}function Gue(t,e,r){r===void 0&&(r=!1);const n=Ud(t),i=n4(t),s=r4(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Fy(o)),[o,Fy(o)]}function Kue(t){const e=Fy(t);return[Y6(t),e,Y6(e)]}function Y6(t){return t.replace(/start|end/g,e=>Vue[e])}function Yue(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 Que(t,e,r,n){const i=Ud(t);let s=Yue(ma(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Y6)))),s}function Fy(t){return t.replace(/left|right|bottom|top/g,e=>Hue[e])}function Jue(t){return{top:0,right:0,bottom:0,left:0,...t}}function Jj(t){return typeof t!="number"?Jue(t):{top:t,right:t,bottom:t,left:t}}function Uy(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function DA(t,e,r){let{reference:n,floating:i}=t;const s=zd(e),o=n4(e),a=r4(o),c=ma(e),l=s==="y",u=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,d=n[a]/2-i[a]/2;let h;switch(c){case"top":h={x:u,y:n.y-i.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-i.width,y:f};break;default:h={x:n.x,y:n.y}}switch(Ud(e)){case"start":h[o]-=d*(r&&l?-1:1);break;case"end":h[o]+=d*(r&&l?-1:1);break}return h}const Xue=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=DA(l,n,c),d=n,h={},p=0;for(let m=0;m({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:c}=e,{element:l,padding:u=0}=pa(t,e)||{};if(l==null)return{};const f=Jj(u),d={x:r,y:n},h=n4(i),p=r4(h),m=await o.getDimensions(l),v=h==="y",y=v?"top":"left",b=v?"bottom":"right",E=v?"clientHeight":"clientWidth",S=s.reference[p]+s.reference[h]-d[h]-s.floating[p],P=d[h]-s.reference[h],R=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let L=R?R[E]:0;(!L||!await(o.isElement==null?void 0:o.isElement(R)))&&(L=a.floating[E]||s.floating[p]);const j=S/2-P/2,H=L/2-m[p]/2-1,K=Uc(f[y],H),Y=Uc(f[b],H),Q=K,F=L-m[p]-Y,x=L/2-m[p]/2+j,k=K6(Q,x,F),N=!c.arrow&&Ud(i)!=null&&x!=k&&s.reference[p]/2-(xQ<=0)){var H,K;const Q=(((H=s.flip)==null?void 0:H.index)||0)+1,F=P[Q];if(F)return{data:{index:Q,overflows:j},reset:{placement:F}};let x=(K=j.filter(k=>k.overflows[0]<=0).sort((k,N)=>k.overflows[1]-N.overflows[1])[0])==null?void 0:K.placement;if(!x)switch(h){case"bestFit":{var Y;const k=(Y=j.map(N=>[N.placement,N.overflows.filter(M=>M>0).reduce((M,A)=>M+A,0)]).sort((N,M)=>N[1]-M[1])[0])==null?void 0:Y[0];k&&(x=k);break}case"initialPlacement":x=a;break}if(i!==x)return{reset:{placement:x}}}return{}}}};function jA(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function BA(t){return Wue.some(e=>t[e]>=0)}const efe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...i}=pa(t,e);switch(n){case"referenceHidden":{const s=await a1(e,{...i,elementContext:"reference"}),o=jA(s,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:BA(o)}}}case"escaped":{const s=await a1(e,{...i,altBoundary:!0}),o=jA(s,r.floating);return{data:{escapedOffsets:o,escaped:BA(o)}}}default:return{}}}}};async function tfe(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=ma(r),a=Ud(r),c=zd(r)==="y",l=["left","top"].includes(o)?-1:1,u=s&&c?-1:1,f=pa(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),c?{x:h*u,y:d*l}:{x:d*l,y:h*u}}const rfe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,i=await tfe(e,t);return{x:r+i.x,y:n+i.y,data:i}}}},nfe=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:v=>{let{x:y,y:b}=v;return{x:y,y:b}}},...c}=pa(t,e),l={x:r,y:n},u=await a1(e,c),f=zd(ma(i)),d=t4(f);let h=l[d],p=l[f];if(s){const v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",b=h+u[v],E=h-u[y];h=K6(b,h,E)}if(o){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=p+u[v],E=p-u[y];p=K6(b,p,E)}const m=a.fn({...e,[d]:h,[f]:p});return{...m,data:{x:m.x-r,y:m.y-n}}}}},ife=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:c=!0,crossAxis:l=!0}=pa(t,e),u={x:r,y:n},f=zd(i),d=t4(f);let h=u[d],p=u[f];const m=pa(a,e),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const E=d==="y"?"height":"width",S=s.reference[d]-s.floating[E]+v.mainAxis,P=s.reference[d]+s.reference[E]-v.mainAxis;hP&&(h=P)}if(l){var y,b;const E=d==="y"?"width":"height",S=["top","left"].includes(ma(i)),P=s.reference[f]-s.floating[E]+(S&&((y=o.offset)==null?void 0:y[f])||0)+(S?0:v.crossAxis),R=s.reference[f]+s.reference[E]+(S?0:((b=o.offset)==null?void 0:b[f])||0)-(S?v.crossAxis:0);pR&&(p=R)}return{[d]:h,[f]:p}}}},sfe=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}=pa(t,e),c=await a1(e,a),l=ma(r),u=Ud(r),f=zd(r)==="y",{width:d,height:h}=n.floating;let p,m;l==="top"||l==="bottom"?(p=l,m=u===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(m=l,p=u==="end"?"top":"bottom");const v=h-c[p],y=d-c[m],b=!e.middlewareData.shift;let E=v,S=y;if(f){const R=d-c.left-c.right;S=u||b?Uc(y,R):R}else{const R=h-c.top-c.bottom;E=u||b?Uc(v,R):R}if(b&&!u){const R=yi(c.left,0),L=yi(c.right,0),j=yi(c.top,0),H=yi(c.bottom,0);f?S=d-2*(R!==0||L!==0?R+L:yi(c.left,c.right)):E=h-2*(j!==0||H!==0?j+H:yi(c.top,c.bottom))}await o({...e,availableWidth:S,availableHeight:E});const P=await i.getDimensions(s.floating);return d!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function qc(t){return Xj(t)?(t.nodeName||"").toLowerCase():"#document"}function Ei(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Da(t){var e;return(e=(Xj(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xj(t){return t instanceof Node||t instanceof Ei(t).Node}function va(t){return t instanceof Element||t instanceof Ei(t).Element}function Ao(t){return t instanceof HTMLElement||t instanceof Ei(t).HTMLElement}function FA(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ei(t).ShadowRoot}function ap(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=ss(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function ofe(t){return["table","td","th"].includes(qc(t))}function i4(t){const e=s4(),r=ss(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 afe(t){let e=vd(t);for(;Ao(e)&&!Nb(e);){if(i4(e))return e;e=vd(e)}return null}function s4(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Nb(t){return["html","body","#document"].includes(qc(t))}function ss(t){return Ei(t).getComputedStyle(t)}function Db(t){return va(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function vd(t){if(qc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||FA(t)&&t.host||Da(t);return FA(e)?e.host:e}function Zj(t){const e=vd(t);return Nb(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ao(e)&&ap(e)?e:Zj(e)}function c1(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=Zj(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=Ei(i);return s?e.concat(o,o.visualViewport||[],ap(i)?i:[],o.frameElement&&r?c1(o.frameElement):[]):e.concat(i,c1(i,[],r))}function eB(t){const e=ss(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=Ao(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=By(r)!==s||By(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function o4(t){return va(t)?t:t.contextElement}function Hf(t){const e=o4(t);if(!Ao(e))return zc(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=eB(e);let o=(s?By(r.width):r.width)/n,a=(s?By(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const cfe=zc(0);function tB(t){const e=Ei(t);return!s4()||!e.visualViewport?cfe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function lfe(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Ei(t)?!1:e}function du(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=o4(t);let o=zc(1);e&&(n?va(n)&&(o=Hf(n)):o=Hf(t));const a=lfe(s,r,n)?tB(s):zc(0);let c=(i.left+a.x)/o.x,l=(i.top+a.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(s){const d=Ei(s),h=n&&va(n)?Ei(n):n;let p=d.frameElement;for(;p&&n&&h!==d;){const m=Hf(p),v=p.getBoundingClientRect(),y=ss(p),b=v.left+(p.clientLeft+parseFloat(y.paddingLeft))*m.x,E=v.top+(p.clientTop+parseFloat(y.paddingTop))*m.y;c*=m.x,l*=m.y,u*=m.x,f*=m.y,c+=b,l+=E,p=Ei(p).frameElement}}return Uy({width:u,height:f,x:c,y:l})}function ufe(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=Ao(r),s=Da(r);if(r===s)return e;let o={scrollLeft:0,scrollTop:0},a=zc(1);const c=zc(0);if((i||!i&&n!=="fixed")&&((qc(r)!=="body"||ap(s))&&(o=Db(r)),Ao(r))){const l=du(r);a=Hf(r),c.x=l.x+r.clientLeft,c.y=l.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+c.x,y:e.y*a.y-o.scrollTop*a.y+c.y}}function ffe(t){return Array.from(t.getClientRects())}function rB(t){return du(Da(t)).left+Db(t).scrollLeft}function dfe(t){const e=Da(t),r=Db(t),n=t.ownerDocument.body,i=yi(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=yi(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+rB(t);const a=-r.scrollTop;return ss(n).direction==="rtl"&&(o+=yi(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}function hfe(t,e){const r=Ei(t),n=Da(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,c=0;if(i){s=i.width,o=i.height;const l=s4();(!l||l&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:s,height:o,x:a,y:c}}function pfe(t,e){const r=du(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=Ao(t)?Hf(t):zc(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,c=i*s.x,l=n*s.y;return{width:o,height:a,x:c,y:l}}function UA(t,e,r){let n;if(e==="viewport")n=hfe(t,r);else if(e==="document")n=dfe(Da(t));else if(va(e))n=pfe(e,r);else{const i=tB(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return Uy(n)}function nB(t,e){const r=vd(t);return r===e||!va(r)||Nb(r)?!1:ss(r).position==="fixed"||nB(r,e)}function mfe(t,e){const r=e.get(t);if(r)return r;let n=c1(t,[],!1).filter(a=>va(a)&&qc(a)!=="body"),i=null;const s=ss(t).position==="fixed";let o=s?vd(t):t;for(;va(o)&&!Nb(o);){const a=ss(o),c=i4(o);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||ap(o)&&!c&&nB(t,o))?n=n.filter(u=>u!==o):i=a,o=vd(o)}return e.set(t,n),n}function vfe(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?mfe(e,this._c):[].concat(r),n],a=o[0],c=o.reduce((l,u)=>{const f=UA(e,u,i);return l.top=yi(f.top,l.top),l.right=Uc(f.right,l.right),l.bottom=Uc(f.bottom,l.bottom),l.left=yi(f.left,l.left),l},UA(e,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function yfe(t){return eB(t)}function gfe(t,e,r){const n=Ao(e),i=Da(e),s=r==="fixed",o=du(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const c=zc(0);if(n||!n&&!s)if((qc(e)!=="body"||ap(i))&&(a=Db(e)),n){const l=du(e,!0,s,e);c.x=l.x+e.clientLeft,c.y=l.y+e.clientTop}else i&&(c.x=rB(i));return{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function zA(t,e){return!Ao(t)||ss(t).position==="fixed"?null:e?e(t):t.offsetParent}function iB(t,e){const r=Ei(t);if(!Ao(t))return r;let n=zA(t,e);for(;n&&ofe(n)&&ss(n).position==="static";)n=zA(n,e);return n&&(qc(n)==="html"||qc(n)==="body"&&ss(n).position==="static"&&!i4(n))?r:n||afe(t)||r}const bfe=async function(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||iB,s=this.getDimensions;return{reference:gfe(e,await i(r),n),floating:{x:0,y:0,...await s(r)}}};function xfe(t){return ss(t).direction==="rtl"}const wfe={convertOffsetParentRelativeRectToViewportRelativeRect:ufe,getDocumentElement:Da,getClippingRect:vfe,getOffsetParent:iB,getElementRects:bfe,getClientRects:ffe,getDimensions:yfe,getScale:Hf,isElement:va,isRTL:xfe};function Efe(t,e){let r=null,n;const i=Da(t);function s(){clearTimeout(n),r&&r.disconnect(),r=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const{left:l,top:u,width:f,height:d}=t.getBoundingClientRect();if(a||e(),!f||!d)return;const h=lm(u),p=lm(i.clientWidth-(l+f)),m=lm(i.clientHeight-(u+d)),v=lm(l),b={rootMargin:-h+"px "+-p+"px "+-m+"px "+-v+"px",threshold:yi(0,Uc(1,c))||1};let E=!0;function S(P){const R=P[0].intersectionRatio;if(R!==c){if(!E)return o();R?o(!1,R):n=setTimeout(()=>{o(!1,1e-7)},100)}E=!1}try{r=new IntersectionObserver(S,{...b,root:i.ownerDocument})}catch{r=new IntersectionObserver(S,b)}r.observe(t)}return o(!0),s}function Cfe(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:c=!1}=n,l=o4(t),u=i||s?[...l?c1(l):[],...c1(e)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const f=l&&a?Efe(l,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(y=>{let[b]=y;b&&b.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(e)})),r()}),l&&!c&&h.observe(l),h.observe(e));let p,m=c?du(t):null;c&&v();function v(){const y=du(t);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&r(),m=y,p=requestAnimationFrame(v)}return r(),()=>{u.forEach(y=>{i&&y.removeEventListener("scroll",r),s&&y.removeEventListener("resize",r)}),f&&f(),h&&h.disconnect(),h=null,c&&cancelAnimationFrame(p)}}const Sfe=(t,e,r)=>{const n=new Map,i={platform:wfe,...r},s={...i.platform,_c:n};return Xue(t,e,{...i,platform:s})},kfe=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?LA({element:n.current,padding:i}).fn(r):{}:n?LA({element:n,padding:i}).fn(r):{}}}};var uv=typeof document<"u"?w.useLayoutEffect:w.useEffect;function zy(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(!zy(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)&&!zy(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function sB(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function qA(t,e){const r=sB(t);return Math.round(e*r)/r}function WA(t){const e=w.useRef(t);return uv(()=>{e.current=t}),e}function Afe(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:c,open:l}=t,[u,f]=w.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=w.useState(n);zy(d,n)||h(n);const[p,m]=w.useState(null),[v,y]=w.useState(null),b=w.useCallback(N=>{N!=R.current&&(R.current=N,m(N))},[m]),E=w.useCallback(N=>{N!==L.current&&(L.current=N,y(N))},[y]),S=s||p,P=o||v,R=w.useRef(null),L=w.useRef(null),j=w.useRef(u),H=WA(c),K=WA(i),Y=w.useCallback(()=>{if(!R.current||!L.current)return;const N={placement:e,strategy:r,middleware:d};K.current&&(N.platform=K.current),Sfe(R.current,L.current,N).then(M=>{const A={...M,isPositioned:!0};Q.current&&!zy(j.current,A)&&(j.current=A,Us.flushSync(()=>{f(A)}))})},[d,e,r,K]);uv(()=>{l===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,f(N=>({...N,isPositioned:!1})))},[l]);const Q=w.useRef(!1);uv(()=>(Q.current=!0,()=>{Q.current=!1}),[]),uv(()=>{if(S&&(R.current=S),P&&(L.current=P),S&&P){if(H.current)return H.current(S,P,Y);Y()}},[S,P,Y,H]);const F=w.useMemo(()=>({reference:R,floating:L,setReference:b,setFloating:E}),[b,E]),x=w.useMemo(()=>({reference:S,floating:P}),[S,P]),k=w.useMemo(()=>{const N={position:r,left:0,top:0};if(!x.floating)return N;const M=qA(x.floating,u.x),A=qA(x.floating,u.y);return a?{...N,transform:"translate("+M+"px, "+A+"px)",...sB(x.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:A}},[r,a,x.floating,u.x,u.y]);return w.useMemo(()=>({...u,update:Y,refs:F,elements:x,floatingStyles:k}),[u,Y,F,x,k])}const oB="Popper",[aB,qd]=On(oB),[_fe,cB]=aB(oB),Pfe=t=>{const{__scopePopper:e,children:r}=t,[n,i]=w.useState(null);return w.createElement(_fe,{scope:e,anchor:n,onAnchorChange:i},r)},Ife="PopperAnchor",Tfe=w.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...i}=t,s=cB(Ife,r),o=w.useRef(null),a=Bt(e,o);return w.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:w.createElement(tt.div,ze({},i,{ref:a}))}),lB="PopperContent",[Ofe,JAe]=aB(lB),Rfe=w.forwardRef((t,e)=>{var r,n,i,s,o,a,c,l;const{__scopePopper:u,side:f="bottom",sideOffset:d=0,align:h="center",alignOffset:p=0,arrowPadding:m=0,avoidCollisions:v=!0,collisionBoundary:y=[],collisionPadding:b=0,sticky:E="partial",hideWhenDetached:S=!1,updatePositionStrategy:P="optimized",onPlaced:R,...L}=t,j=cB(lB,u),[H,K]=w.useState(null),Y=Bt(e,ve=>K(ve)),[Q,F]=w.useState(null),x=Pb(Q),k=(r=x==null?void 0:x.width)!==null&&r!==void 0?r:0,N=(n=x==null?void 0:x.height)!==null&&n!==void 0?n:0,M=f+(h!=="center"?"-"+h:""),A=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},O=Array.isArray(y)?y:[y],B=O.length>0,I={padding:A,boundary:O.filter($fe),altBoundary:B},{refs:C,floatingStyles:D,placement:q,isPositioned:_,middlewareData:W}=Afe({strategy:"fixed",placement:M,whileElementsMounted:(...ve)=>Cfe(...ve,{animationFrame:P==="always"}),elements:{reference:j.anchor},middleware:[rfe({mainAxis:d+N,alignmentAxis:p}),v&&nfe({mainAxis:!0,crossAxis:!1,limiter:E==="partial"?ife():void 0,...I}),v&&Zue({...I}),sfe({...I,apply:({elements:ve,rects:Ne,availableWidth:ke,availableHeight:Ae})=>{const{width:Xe,height:ct}=Ne.reference,Qe=ve.floating.style;Qe.setProperty("--radix-popper-available-width",`${ke}px`),Qe.setProperty("--radix-popper-available-height",`${Ae}px`),Qe.setProperty("--radix-popper-anchor-width",`${Xe}px`),Qe.setProperty("--radix-popper-anchor-height",`${ct}px`)}}),Q&&kfe({element:Q,padding:m}),Mfe({arrowWidth:k,arrowHeight:N}),S&&efe({strategy:"referenceHidden",...I})]}),[V,J]=uB(q),ee=is(R);_i(()=>{_&&(ee==null||ee())},[_,ee]);const se=(i=W.arrow)===null||i===void 0?void 0:i.x,ie=(s=W.arrow)===null||s===void 0?void 0:s.y,ae=((o=W.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[be,he]=w.useState();return _i(()=>{H&&he(window.getComputedStyle(H).zIndex)},[H]),w.createElement("div",{ref:C.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:_?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:be,"--radix-popper-transform-origin":[(a=W.transformOrigin)===null||a===void 0?void 0:a.x,(c=W.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:t.dir},w.createElement(Ofe,{scope:u,placedSide:V,onArrowChange:F,arrowX:se,arrowY:ie,shouldHideArrow:ae},w.createElement(tt.div,ze({"data-side":V,"data-align":J},L,{ref:Y,style:{...L.style,animation:_?void 0:"none",opacity:(l=W.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))});function $fe(t){return t!==null}const Mfe=t=>({name:"transformOrigin",options:t,fn(e){var r,n,i,s,o;const{placement:a,rects:c,middlewareData:l}=e,f=((r=l.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=f?0:t.arrowWidth,h=f?0:t.arrowHeight,[p,m]=uB(a),v={start:"0%",center:"50%",end:"100%"}[m],y=((n=(i=l.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+d/2,b=((s=(o=l.arrow)===null||o===void 0?void 0:o.y)!==null&&s!==void 0?s:0)+h/2;let E="",S="";return p==="bottom"?(E=f?v:`${y}px`,S=`${-h}px`):p==="top"?(E=f?v:`${y}px`,S=`${c.floating.height+h}px`):p==="right"?(E=`${-h}px`,S=f?v:`${b}px`):p==="left"&&(E=`${c.floating.width+h}px`,S=f?v:`${b}px`),{data:{x:E,y:S}}}});function uB(t){const[e,r="center"]=t.split("-");return[e,r]}const Nfe=Pfe,Dfe=Tfe,Lfe=Rfe,fB=w.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?XV.createPortal(w.createElement(tt.div,ze({},i,{ref:e})),n):null}),iw="rovingFocusGroup.onEntryFocus",jfe={bubbles:!1,cancelable:!0},a4="RovingFocusGroup",[Q6,dB,Bfe]=$b(a4),[Ffe,Wd]=On(a4,[Bfe]),[Ufe,zfe]=Ffe(a4),qfe=w.forwardRef((t,e)=>w.createElement(Q6.Provider,{scope:t.__scopeRovingFocusGroup},w.createElement(Q6.Slot,{scope:t.__scopeRovingFocusGroup},w.createElement(Wfe,wt({},t,{ref:e}))))),Wfe=w.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:l,...u}=t,f=w.useRef(null),d=Bt(e,f),h=Mb(s),[p=null,m]=ha({prop:o,defaultProp:a,onChange:c}),[v,y]=w.useState(!1),b=is(l),E=dB(r),S=w.useRef(!1),[P,R]=w.useState(0);return w.useEffect(()=>{const L=f.current;if(L)return L.addEventListener(iw,b),()=>L.removeEventListener(iw,b)},[b]),w.createElement(Ufe,{scope:r,orientation:n,dir:h,loop:i,currentTabStopId:p,onItemFocus:w.useCallback(L=>m(L),[m]),onItemShiftTab:w.useCallback(()=>y(!0),[]),onFocusableItemAdd:w.useCallback(()=>R(L=>L+1),[]),onFocusableItemRemove:w.useCallback(()=>R(L=>L-1),[])},w.createElement(tt.div,wt({tabIndex:v||P===0?-1:0,"data-orientation":n},u,{ref:d,style:{outline:"none",...t.style},onMouseDown:Pe(t.onMouseDown,()=>{S.current=!0}),onFocus:Pe(t.onFocus,L=>{const j=!S.current;if(L.target===L.currentTarget&&j&&!v){const H=new CustomEvent(iw,jfe);if(L.currentTarget.dispatchEvent(H),!H.defaultPrevented){const K=E().filter(k=>k.focusable),Y=K.find(k=>k.active),Q=K.find(k=>k.id===p),x=[Y,Q,...K].filter(Boolean).map(k=>k.ref.current);hB(x)}}S.current=!1}),onBlur:Pe(t.onBlur,()=>y(!1))})))}),Hfe="RovingFocusGroupItem",Vfe=w.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,...o}=t,a=ra(),c=s||a,l=zfe(Hfe,r),u=l.currentTabStopId===c,f=dB(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=l;return w.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),w.createElement(Q6.ItemSlot,{scope:r,id:c,focusable:n,active:i},w.createElement(tt.span,wt({tabIndex:u?0:-1,"data-orientation":l.orientation},o,{ref:e,onMouseDown:Pe(t.onMouseDown,p=>{n?l.onItemFocus(c):p.preventDefault()}),onFocus:Pe(t.onFocus,()=>l.onItemFocus(c)),onKeyDown:Pe(t.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){l.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const m=Yfe(p,l.orientation,l.dir);if(m!==void 0){p.preventDefault();let y=f().filter(b=>b.focusable).map(b=>b.ref.current);if(m==="last")y.reverse();else if(m==="prev"||m==="next"){m==="prev"&&y.reverse();const b=y.indexOf(p.currentTarget);y=l.loop?Qfe(y,b+1):y.slice(b+1)}setTimeout(()=>hB(y))}})})))}),Gfe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Kfe(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function Yfe(t,e,r){const n=Kfe(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Gfe[n]}function hB(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function Qfe(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const pB=qfe,c4=Vfe;var Jfe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},zu=new WeakMap,um=new WeakMap,fm={},sw=0,mB=function(t){return t&&(t.host||mB(t.parentNode))},Xfe=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=mB(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})},Zfe=function(t,e,r,n){var i=Xfe(e,Array.isArray(t)?t:[t]);fm[r]||(fm[r]=new WeakMap);var s=fm[r],o=[],a=new Set,c=new Set(i),l=function(f){!f||a.has(f)||(a.add(f),l(f.parentNode))};i.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))u(d);else{var h=d.getAttribute(n),p=h!==null&&h!=="false",m=(zu.get(d)||0)+1,v=(s.get(d)||0)+1;zu.set(d,m),s.set(d,v),o.push(d),m===1&&p&&um.set(d,!0),v===1&&d.setAttribute(r,"true"),p||d.setAttribute(n,"true")}})};return u(e),a.clear(),sw++,function(){o.forEach(function(f){var d=zu.get(f)-1,h=s.get(f)-1;zu.set(f,d),s.set(f,h),d||(um.has(f)||f.removeAttribute(n),um.delete(f)),h||f.removeAttribute(r)}),sw--,sw||(zu=new WeakMap,zu=new WeakMap,um=new WeakMap,fm={})}},vB=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=e||Jfe(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),Zfe(n,i,r,"aria-hidden")):function(){return null}},ao=function(){return ao=Object.assign||function(e){for(var r,n=1,i=arguments.length;n"u")return vde;var e=yde(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])}},bde=xB(),xde=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(tde,` { - 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(fv,` { - right: `).concat(a,"px ").concat(n,`; - } - - .`).concat(dv,` { - margin-right: `).concat(a,"px ").concat(n,`; - } - - .`).concat(fv," .").concat(fv,` { - right: 0 `).concat(n,`; - } - - .`).concat(dv," .").concat(dv,` { - margin-right: 0 `).concat(n,`; - } - - body { - `).concat(rde,": ").concat(a,`px; - } -`)},wde=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,s=w.useMemo(function(){return gde(i)},[i]);return w.createElement(bde,{styles:xde(s,!e,i,r?"":"!important")})},J6=!1;if(typeof window<"u")try{var dm=Object.defineProperty({},"passive",{get:function(){return J6=!0,!0}});window.addEventListener("test",dm,dm),window.removeEventListener("test",dm,dm)}catch{J6=!1}var qu=J6?{passive:!1}:!1,Ede=function(t){return t.tagName==="TEXTAREA"},wB=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!Ede(t)&&r[e]==="visible")},Cde=function(t){return wB(t,"overflowY")},Sde=function(t){return wB(t,"overflowX")},HA=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=EB(t,r);if(n){var i=CB(t,r),s=i[1],o=i[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},kde=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},Ade=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},EB=function(t,e){return t==="v"?Cde(e):Sde(e)},CB=function(t,e){return t==="v"?kde(e):Ade(e)},_de=function(t,e){return t==="h"&&e==="rtl"?-1:1},Pde=function(t,e,r,n,i){var s=_de(t,window.getComputedStyle(e).direction),o=s*n,a=r.target,c=e.contains(a),l=!1,u=o>0,f=0,d=0;do{var h=CB(t,a),p=h[0],m=h[1],v=h[2],y=m-v-s*p;(p||y)&&EB(t,a)&&(f+=y,d+=p),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(u&&(i&&f===0||!i&&o>f)||!u&&(i&&d===0||!i&&-o>d))&&(l=!0),l},hm=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},VA=function(t){return[t.deltaX,t.deltaY]},GA=function(t){return t&&"current"in t?t.current:t},Ide=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Tde=function(t){return` - .block-interactivity-`.concat(t,` {pointer-events: none;} - .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},Ode=0,Wu=[];function Rde(t){var e=w.useRef([]),r=w.useRef([0,0]),n=w.useRef(),i=w.useState(Ode++)[0],s=w.useState(function(){return xB()})[0],o=w.useRef(t);w.useEffect(function(){o.current=t},[t]),w.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var m=ede([t.lockRef.current],(t.shards||[]).map(GA),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=w.useCallback(function(m,v){if("touches"in m&&m.touches.length===2)return!o.current.allowPinchZoom;var y=hm(m),b=r.current,E="deltaX"in m?m.deltaX:b[0]-y[0],S="deltaY"in m?m.deltaY:b[1]-y[1],P,R=m.target,L=Math.abs(E)>Math.abs(S)?"h":"v";if("touches"in m&&L==="h"&&R.type==="range")return!1;var j=HA(L,R);if(!j)return!0;if(j?P=L:(P=L==="v"?"h":"v",j=HA(L,R)),!j)return!1;if(!n.current&&"changedTouches"in m&&(E||S)&&(n.current=P),!P)return!0;var H=n.current||P;return Pde(H,v,m,H==="h"?E:S,!0)},[]),c=w.useCallback(function(m){var v=m;if(!(!Wu.length||Wu[Wu.length-1]!==s)){var y="deltaY"in v?VA(v):hm(v),b=e.current.filter(function(P){return P.name===v.type&&P.target===v.target&&Ide(P.delta,y)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var E=(o.current.shards||[]).map(GA).filter(Boolean).filter(function(P){return P.contains(v.target)}),S=E.length>0?a(v,E[0]):!o.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),l=w.useCallback(function(m,v,y,b){var E={name:m,delta:v,target:y,should:b};e.current.push(E),setTimeout(function(){e.current=e.current.filter(function(S){return S!==E})},1)},[]),u=w.useCallback(function(m){r.current=hm(m),n.current=void 0},[]),f=w.useCallback(function(m){l(m.type,VA(m),m.target,a(m,t.lockRef.current))},[]),d=w.useCallback(function(m){l(m.type,hm(m),m.target,a(m,t.lockRef.current))},[]);w.useEffect(function(){return Wu.push(s),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,qu),document.addEventListener("touchmove",c,qu),document.addEventListener("touchstart",u,qu),function(){Wu=Wu.filter(function(m){return m!==s}),document.removeEventListener("wheel",c,qu),document.removeEventListener("touchmove",c,qu),document.removeEventListener("touchstart",u,qu)}},[]);var h=t.removeScrollBar,p=t.inert;return w.createElement(w.Fragment,null,p?w.createElement(s,{styles:Tde(i)}):null,h?w.createElement(wde,{gapMode:"margin"}):null)}const $de=lde(bB,Rde);var SB=w.forwardRef(function(t,e){return w.createElement(Lb,ao({},t,{ref:e,sideCar:$de}))});SB.classNames=Lb.classNames;const kB=SB,Mde=["Enter"," "],jb="Menu",[Nde,XAe,Dde]=$b(jb),[_u,AB]=On(jb,[Dde,qd,Wd]);qd();const Lde=Wd();_u(jb);const[ZAe,jde]=_u(jb),Bde="MenuPortal";_u(Bde,{forceMount:void 0});const Fde="MenuContent",[e_e,_B]=_u(Fde),X6="MenuItem",KA="menu.itemSelect",PB=w.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...i}=t,s=w.useRef(null),o=jde(X6,t.__scopeMenu),a=_B(X6,t.__scopeMenu),c=Bt(e,s),l=w.useRef(!1),u=()=>{const f=s.current;if(!r&&f){const d=new CustomEvent(KA,{bubbles:!0,cancelable:!0});f.addEventListener(KA,h=>n==null?void 0:n(h),{once:!0}),QC(f,d),d.defaultPrevented?l.current=!1:o.onClose()}};return w.createElement(Ude,ze({},i,{ref:c,disabled:r,onClick:Pe(t.onClick,u),onPointerDown:f=>{var d;(d=t.onPointerDown)===null||d===void 0||d.call(t,f),l.current=!0},onPointerUp:Pe(t.onPointerUp,f=>{var d;l.current||(d=f.currentTarget)===null||d===void 0||d.click()}),onKeyDown:Pe(t.onKeyDown,f=>{const d=a.searchRef.current!=="";r||d&&f.key===" "||Mde.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})}))}),Ude=w.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...s}=t,o=_B(X6,r),a=Lde(r),c=w.useRef(null),l=Bt(e,c),[u,f]=w.useState(!1),[d,h]=w.useState("");return w.useEffect(()=>{const p=c.current;if(p){var m;h(((m=p.textContent)!==null&&m!==void 0?m:"").trim())}},[s.children]),w.createElement(Nde.ItemSlot,{scope:r,disabled:n,textValue:i??d},w.createElement(c4,ze({asChild:!0},a,{focusable:!n}),w.createElement(tt.div,ze({role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},s,{ref:l,onPointerMove:Pe(t.onPointerMove,YA(p=>{n?o.onItemLeave(p):(o.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus())})),onPointerLeave:Pe(t.onPointerLeave,YA(p=>o.onItemLeave(p))),onFocus:Pe(t.onFocus,()=>f(!0)),onBlur:Pe(t.onBlur,()=>f(!1))}))))}),zde=w.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...i}=t;return w.createElement(TB,{scope:t.__scopeMenu,checked:r},w.createElement(PB,ze({role:"menuitemcheckbox","aria-checked":qy(r)?"mixed":r},i,{ref:e,"data-state":l4(r),onSelect:Pe(i.onSelect,()=>n==null?void 0:n(qy(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),qde="MenuRadioGroup",[t_e,Wde]=_u(qde,{value:void 0,onValueChange:()=>{}}),Hde="MenuRadioItem",Vde=w.forwardRef((t,e)=>{const{value:r,...n}=t,i=Wde(Hde,t.__scopeMenu),s=r===i.value;return w.createElement(TB,{scope:t.__scopeMenu,checked:s},w.createElement(PB,ze({role:"menuitemradio","aria-checked":s},n,{ref:e,"data-state":l4(s),onSelect:Pe(n.onSelect,()=>{var o;return(o=i.onValueChange)===null||o===void 0?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})))}),IB="MenuItemIndicator",[TB,Gde]=_u(IB,{checked:!1}),Kde=w.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...i}=t,s=Gde(IB,r);return w.createElement(Na,{present:n||qy(s.checked)||s.checked===!0},w.createElement(tt.span,ze({},i,{ref:e,"data-state":l4(s.checked)})))}),Yde="MenuSub";_u(Yde);function qy(t){return t==="indeterminate"}function l4(t){return qy(t)?"indeterminate":t?"checked":"unchecked"}function YA(t){return e=>e.pointerType==="mouse"?t(e):void 0}const Qde=zde,Jde=Vde,Xde=Kde,OB="DropdownMenu",[Zde,r_e]=On(OB,[AB]),u4=AB();Zde(OB);const ehe=w.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=u4(r);return w.createElement(Qde,ze({},i,n,{ref:e}))}),the=w.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=u4(r);return w.createElement(Jde,ze({},i,n,{ref:e}))}),rhe=w.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=u4(r);return w.createElement(Xde,ze({},i,n,{ref:e}))}),nhe=ehe,ihe=the,RB=rhe;var $B="_1k2mbvi4 _1k2mbvi3 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12ws fyvr12wm fyvr11h0 fyvr11ko fyvr11jw fyvr12v7 fyvr11n4 fyvr11hw fyvr12s7",MB="_1k2mbvi5";const she=({children:t})=>X.jsx(RB,{className:MB,children:t});w.forwardRef(({className:t,children:e,...r},n)=>X.jsxs(nhe,{className:fi($B,t),...r,ref:n,children:[X.jsx(she,{children:X.jsx(Fd,{size:"xs"})}),X.jsx(oe,{variant:"small",children:e})]}));w.forwardRef(({className:t,children:e,...r},n)=>X.jsxs(ihe,{className:fi($B,t),...r,ref:n,children:[X.jsx(RB,{className:MB,children:X.jsx(oe,{children:"•"})}),X.jsx(oe,{variant:"small",children:e})]}));const _o=w.forwardRef((t,e)=>{const{icon:r,size:n="md",...i}=t;return X.jsx(nt,{leftIcon:r,size:n,flexShrink:"0",ref:e,...i})}),ohe=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var ahe="_1hq71vk1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _1hq71vk0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12n7 fyvr12fv fyvr1217 fyvr128j fyvr12np fyvr12gd fyvr121p fyvr1291 fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",che=Ar({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:[]}),lhe="_1hq71vka _1hq71vk9 fyvr12wp fyvr12wj fyvr11ho fyvr12vj fyvr1ko fyvr1oo fyvr1mo fyvr1qo";const uhe={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};w.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:i=!1,id:s,label:o="",labelLocation:a="hidden",name:c,onValueChange:l,placeholder:u="Upload a file",validExtensions:f,...d}=t,h=w.useRef(null),p=ohe(h,e),[m,v]=w.useState(null),y=E=>{const S=E.currentTarget.files;if(!S||!S[0])return;const P=S[0],R=P.name,L=P.size/1e3;v({name:R,size:L,extension:R.split(".").pop()??""}),l==null||l(P)},b=f.map(E=>uhe[E]).join(",");return X.jsx(ku,{description:n,disabled:i,display:"grid",id:s??c,label:o,labelLocation:a,children:X.jsxs(z,{width:"full",minWidth:"0",justifyContent:m?"space-between":"flex-start",gap:"2",color:m?"text100":"text50",className:fi(ahe,che({borderRadius:r})),children:[m?X.jsxs(z,{flexDirection:"row",gap:"2",alignItems:"center",minWidth:"0",children:[X.jsx(oe,{ellipsis:!0,children:m.name}),X.jsxs(oe,{color:"text50",variant:"xsmall",whiteSpace:"nowrap",children:[m.size.toFixed(2)," kb"]})]}):X.jsx(oe,{ellipsis:!0,children:u}),X.jsx(z,{accept:b,as:"input",className:lhe,cursor:"pointer",disabled:i,id:s??c,name:c,onChange:y,ref:p,type:"file",...d}),m&&X.jsx(_o,{cursor:"pointer",icon:Au,size:"xs",onClick:E=>{var S;E.preventDefault(),E.stopPropagation(),(S=h.current)!=null&&S.value&&(h.current.value=""),l==null||l(null),v(null)},zIndex:"10"})]})})});var fhe=Ar({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const Z6=1e3,Vf=64,cw=Vf/2,lw=(t,e=Z6)=>t%e/(Z6/Vf),Al=(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)},dhe=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),i=t%360,s=(t+120)%360,o=r%360;return{id:Al(n),a:`hsl(${i}deg 100% 40%)`,b:`hsl(${s}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},hhe=(t,e)=>{const r=[];for(let n=0;n{const s=Vf/10+lw(n.r,Z6*1.5/(i+1));return{...dhe(n.a,n.b,n.c),x:lw(n.x),y:lw(n.y),r:s}})},Pu=w.memo(t=>{const{className:e,address:r,size:n="md",complexity:i=1,...s}=t,o=hhe(r,i);return X.jsxs(z,{as:"svg",className:fi(e,fhe({size:n})),viewBox:`0 0 ${Vf} ${Vf}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...s,children:[X.jsxs("defs",{children:[X.jsx("clipPath",{id:"circle-clip",children:X.jsx("circle",{cx:cw,cy:cw,r:cw})}),X.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[X.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),X.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),X.jsx("feGaussianBlur",{stdDeviation:Vf/10,result:"effect1_foregroundBlur"})]}),X.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[X.jsx("stop",{offset:"0",stopColor:o[0].c}),X.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>X.jsxs(w.Fragment,{children:[X.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[X.jsx("stop",{offset:"0",stopColor:a.a}),X.jsx("stop",{offset:"1",stopColor:a.b})]}),X.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[X.jsx("stop",{offset:"0",stopColor:a.c}),X.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),X.jsxs("g",{clipPath:"url(#circle-clip)",children:[X.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),X.jsx("g",{filter:"url(#blur)",children:o.map(a=>X.jsxs(w.Fragment,{children:[X.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),X.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})}),ar=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[i,s]=w.useState(!1),o=a=>{s(!0),r==null||r(a)};return X.jsx(z,{as:_c.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:i?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},NB="Dialog",[DB,n_e]=On(NB),[phe,al]=DB(NB),mhe=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:o=!0}=t,a=w.useRef(null),c=w.useRef(null),[l=!1,u]=ha({prop:n,defaultProp:i,onChange:s});return w.createElement(phe,{scope:e,triggerRef:a,contentRef:c,contentId:ra(),titleId:ra(),descriptionId:ra(),open:l,onOpenChange:u,onOpenToggle:w.useCallback(()=>u(f=>!f),[u]),modal:o},r)},LB="DialogPortal",[vhe,jB]=DB(LB,{forceMount:void 0}),yhe=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:i}=t,s=al(LB,e);return w.createElement(vhe,{scope:e,forceMount:r},w.Children.map(n,o=>w.createElement(Na,{present:r||s.open},w.createElement(fB,{asChild:!0,container:i},o))))},e3="DialogOverlay",ghe=w.forwardRef((t,e)=>{const r=jB(e3,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=al(e3,t.__scopeDialog);return s.modal?w.createElement(Na,{present:n||s.open},w.createElement(bhe,ze({},i,{ref:e}))):null}),bhe=w.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=al(e3,r);return w.createElement(kB,{as:md,allowPinchZoom:!0,shards:[i.contentRef]},w.createElement(tt.div,ze({"data-state":FB(i.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),l1="DialogContent",xhe=w.forwardRef((t,e)=>{const r=jB(l1,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=al(l1,t.__scopeDialog);return w.createElement(Na,{present:n||s.open},s.modal?w.createElement(whe,ze({},i,{ref:e})):w.createElement(Ehe,ze({},i,{ref:e})))}),whe=w.forwardRef((t,e)=>{const r=al(l1,t.__scopeDialog),n=w.useRef(null),i=Bt(e,r.contentRef,n);return w.useEffect(()=>{const s=n.current;if(s)return vB(s)},[]),w.createElement(BB,ze({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Pe(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=r.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:Pe(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:Pe(t.onFocusOutside,s=>s.preventDefault())}))}),Ehe=w.forwardRef((t,e)=>{const r=al(l1,t.__scopeDialog),n=w.useRef(!1),i=w.useRef(!1);return w.createElement(BB,ze({},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 c=s.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}}))}),BB=w.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=t,a=al(l1,r),c=w.useRef(null),l=Bt(e,c);return Kj(),w.createElement(w.Fragment,null,w.createElement(Yj,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s},w.createElement(e4,ze({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":FB(a.open)},o,{ref:l,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),Che="DialogClose",She=w.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=al(Che,r);return w.createElement(tt.button,ze({type:"button"},n,{ref:e,onClick:Pe(t.onClick,()=>i.onOpenChange(!1))}))});function FB(t){return t?"open":"closed"}const khe=mhe,Ahe=yhe,_he=ghe,Phe=xhe,Ihe=She;var The=Ar({defaultClassName:"_1vqx0w91 _1vqx0w90 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]}),Ohe=Ar({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]});const UB=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:i,...s}=t;return X.jsx(z,{className:Ohe({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...s,children:X.jsx(z,{className:The({direction:n}),background:"backgroundPrimary",...i,children:e})})};function Rhe(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function $he(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 zB(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]=zB(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 QA(t,e,r){t.style.setProperty(Rhe(e),r)}function JA(t,e,r){if(typeof r=="object"){var n=e;zB(r,(a,c)=>{a!=null&&QA(t,$he(n,c),String(a))})}else{var i=e;for(var s in i){var o=i[s];o!=null&&QA(t,s,i[s])}}}const f4=["dark","light"],Mhe="dark",Nhe="data-theme",XA="@sequence.theme",Dhe=t=>f4.includes(t),Lhe=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),qB=t=>t?`${XA}.${t}`:XA,jhe=t=>{const e=localStorage.getItem(qB(t));return e&&f4.includes(e)?e:Mhe},WB=w.createContext(null),Bb=t=>{const[e,r]=w.useState(t.theme||jhe(t.scope));w.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),w.useEffect(()=>{t.theme&&r(t.theme)},[t.theme]),w.useEffect(()=>{const i=document.querySelector(t.root||":root");i&&(Dhe(e)?(i.setAttribute(Nhe,e),JA(i,EA,{colors:Jce[e]})):Lhe(e)&&JA(i,EA,{colors:e}))},[e,t.root]);const n=w.useMemo(()=>({theme:e,root:t.root,setTheme:i=>{f4.includes(i)&&(localStorage.setItem(qB(t.scope),i),r(i))}}),[e,t.root,t.scope]);return X.jsx(WB.Provider,{value:n,children:t.children})},cp=()=>{const t=w.useContext(WB);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t};var Bhe="_5b32m91 _5b32m90 fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11nk fyvr1ko fyvr1oo fyvr1qo fyvr1mo",Fhe="_5b32m93 _5b32m92 fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",Uhe=Ar({defaultClassName:"_5b32m95 _5b32m94 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12ws fyvr12wm fyvr11h0 fyvr11i4 fyvr11hs fyvr11sd fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]}),zhe="_5b32m9b _5b32m9a fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11nk";const Wy=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:i=!1,isDismissible:s=!0,onClose:o,scroll:a=!0,size:c="lg",overlayProps:l,contentProps:u}=t,{root:f}=cp(),d=document.querySelector(f||"body");return X.jsx(khe,{modal:!0,defaultOpen:!0,onOpenChange:o,children:X.jsx(Ahe,{forceMount:!0,container:d,children:X.jsxs(z,{className:Bhe,children:[X.jsx(z,{as:_he,asChild:!0,background:r,className:Fhe,forceMount:!0,children:X.jsx(_c.div,{initial:i?!1:{opacity:0},animate:i?!1:{opacity:1},exit:i?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...l},"modal-overlay")}),X.jsx(Phe,{asChild:!0,className:Uhe({autoHeight:e,size:c}),forceMount:!0,onEscapeKeyDown:h=>{s?o==null||o():h.preventDefault()},onInteractOutside:h=>{s||h.preventDefault()},children:X.jsxs(_c.div,{initial:i?!1:{y:"100%",opacity:c==="sm"?0:1},animate:i?!1:{y:0,opacity:1},exit:i?void 0:{y:"100%",opacity:c==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...u,children:[a?X.jsx(UB,{children:n}):n,s&&X.jsx(Ihe,{asChild:!0,children:X.jsx(_o,{icon:Au,backdropFilter:"blur",size:"xs",className:zhe,"aria-label":"Close"})})]},"modal-content")})]})})})};var qhe="_1acm19y1 _1acm19y0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11od fyvr12s1 fyvr1g0 fyvr118g",Whe=Ar({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:[]}),Hhe=Ar({defaultClassName:"_1acm19ya _1acm19y9 fyvr1wg fyvr1yc fyvr1t4 fyvr1v0 fyvr12wp fyvr12wj fyvr11gw fyvr11od fyvr12s1 fyvr12o1 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 cl=w.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",leftIcon:u,rightIcon:f,name:d,controls:h,type:p="text",numeric:m=!1,...v}=t;return X.jsx(ku,{description:s,disabled:o,display:"grid",id:a??d,label:c,labelLocation:l,children:X.jsx(z,{width:"full",children:X.jsxs(z,{className:fi(qhe,Whe({borderRadius:i})),children:[u&&X.jsx(u,{size:"sm"}),X.jsx(z,{as:r,autoComplete:n,spellCheck:"false",className:Hhe({numeric:m}),disabled:o,id:a??d,name:d,ref:e,type:p,...v}),f&&X.jsx(f,{size:"sm"}),h]})})})}),Vhe=RegExp("^\\d*(?:\\\\[.])?\\d*$");function Ghe(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const HB=w.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:i,onBlur:s,...o}=t,a=l=>{let{value:u}=l.target;u=u.replace(/,/g,"."),u.startsWith(".")&&(u="0"+u),u.startsWith("0")&&(u=u.replace(/^0+(?=\d)/,"")),(u===""||Vhe.test(Ghe(u)))&&(i==null||i({...l,target:{...l.target,value:u}}))},c=l=>{const{value:u}=l.target;let f=u;f.endsWith(".")&&(f=f.slice(0,-1)),f.endsWith(".0")&&(f=f.slice(0,-2)),f==="0"&&(f=""),s==null||s(l),f!==u&&(i==null||i({...l,target:{...l.target,value:f}}))};return X.jsx(cl,{name:r,onChange:a,onBlur:c,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})});Ar({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const VB="Progress",Fb=100,[Khe,i_e]=On(VB),[Yhe,s_e]=Khe(VB),Qhe=w.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:i,getValueLabel:s=Jhe,...o}=t,a=t3(i)?i:Fb,c=GB(n,a)?n:null,l=Hy(c)?s(c,a):void 0;return w.createElement(Yhe,{scope:r,value:c,max:a},w.createElement(tt.div,wt({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Hy(c)?c:void 0,"aria-valuetext":l,role:"progressbar","data-state":Xhe(c,a),"data-value":c??void 0,"data-max":a},o,{ref:e})))});Qhe.propTypes={max(t,e,r){const n=t[e],i=String(n);return n&&!t3(n)?new Error(Zhe(i,r)):null},value(t,e,r){const n=t[e],i=String(n),s=t3(t.max)?t.max:Fb;return n!=null&&!GB(n,s)?new Error(e0e(i,r)):null}};function Jhe(t,e){return`${Math.round(t/e*100)}%`}function Xhe(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function Hy(t){return typeof t=="number"}function t3(t){return Hy(t)&&!isNaN(t)&&t>0}function GB(t,e){return Hy(t)&&!isNaN(t)&&t<=e&&t>=0}function Zhe(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Fb}\`.`}function e0e(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 ${Fb} if no \`max\` prop is set) - - \`null\` if the progress is indeterminate. - -Defaulting to \`null\`.`}const KB="Radio",[t0e,YB]=On(KB),[r0e,n0e]=t0e(KB),i0e=w.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:c,...l}=t,[u,f]=w.useState(null),d=Bt(e,m=>f(m)),h=w.useRef(!1),p=u?!!u.closest("form"):!0;return w.createElement(r0e,{scope:r,checked:i,disabled:o},w.createElement(tt.button,wt({type:"button",role:"radio","aria-checked":i,"data-state":QB(i),"data-disabled":o?"":void 0,disabled:o,value:a},l,{ref:d,onClick:Pe(t.onClick,m=>{i||c==null||c(),p&&(h.current=m.isPropagationStopped(),h.current||m.stopPropagation())})})),p&&w.createElement(a0e,{control:u,bubbles:!h.current,name:n,value:a,checked:i,required:s,disabled:o,style:{transform:"translateX(-100%)"}}))}),s0e="RadioIndicator",o0e=w.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...i}=t,s=n0e(s0e,r);return w.createElement(Na,{present:n||s.checked},w.createElement(tt.span,wt({"data-state":QB(s.checked),"data-disabled":s.disabled?"":void 0},i,{ref:e})))}),a0e=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=w.useRef(null),o=_b(r),a=Pb(e);return w.useEffect(()=>{const c=s.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(d)}},[o,r,n]),w.createElement("input",wt({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 QB(t){return t?"checked":"unchecked"}const c0e=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],JB="RadioGroup",[l0e,o_e]=On(JB,[Wd,YB]),XB=Wd(),ZB=YB(),[u0e,f0e]=l0e(JB),d0e=w.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:c,dir:l,loop:u=!0,onValueChange:f,...d}=t,h=XB(r),p=Mb(l),[m,v]=ha({prop:s,defaultProp:i,onChange:f});return w.createElement(u0e,{scope:r,name:n,required:o,disabled:a,value:m,onValueChange:v},w.createElement(pB,wt({asChild:!0},h,{orientation:c,dir:p,loop:u}),w.createElement(tt.div,wt({role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":a?"":void 0,dir:p},d,{ref:e}))))}),h0e="RadioGroupItem",p0e=w.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...i}=t,s=f0e(h0e,r),o=s.disabled||n,a=XB(r),c=ZB(r),l=w.useRef(null),u=Bt(e,l),f=s.value===i.value,d=w.useRef(!1);return w.useEffect(()=>{const h=m=>{c0e.includes(m.key)&&(d.current=!0)},p=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",p)}},[]),w.createElement(c4,wt({asChild:!0},a,{focusable:!o,active:f}),w.createElement(i0e,wt({disabled:o,required:s.required,checked:f},c,i,{name:s.name,ref:u,onCheck:()=>s.onValueChange(i.value),onKeyDown:Pe(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Pe(i.onFocus,()=>{var h;d.current&&((h=l.current)===null||h===void 0||h.click())})})))}),m0e=w.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,i=ZB(r);return w.createElement(o0e,wt({},i,n,{ref:e}))}),v0e=d0e,y0e=p0e,g0e=m0e;var b0e=Ar({defaultClassName:"io59uy3 io59uy0 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1so fyvr1uk fyvr1wg fyvr1yc fyvr12nd fyvr12g1 fyvr121d fyvr128p fyvr12nj fyvr12g7 fyvr121j fyvr128v fyvr11od fyvr12v7 fyvr12v3 fyvr12vz fyvr12vr",variantClassNames:{size:{sm:"io59uy4 io59uy1 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy5 io59uy2 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]}),x0e=Ar({defaultClassName:"io59uy8 io59uy7 io59uy6 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12s1",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]});const w0e=t=>{const{id:e,label:r,size:n="sm",value:i,disabled:s}=t;return X.jsx(z,{alignItems:"center",children:X.jsx(ku,{disabled:s,display:"flex",id:e,label:r,labelLocation:"right",children:X.jsx(y0e,{className:b0e({size:n}),value:i,id:e,disabled:s,children:X.jsx(g0e,{className:x0e({size:n})})})})})};w.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:i="2",name:s,options:o,size:a="sm",...c}=t;return X.jsx(v0e,{disabled:n,name:s,ref:e,...c,children:X.jsx(z,{flexDirection:r,gap:i,children:o.map(({label:l,value:u,disabled:f})=>X.jsx(w0e,{id:`${s}-${u}`,label:l,size:a,value:u,disabled:f},u))})})});function ZA(t,[e,r]){return Math.min(r,Math.max(e,t))}const eF=w.forwardRef((t,e)=>w.createElement(tt.span,ze({},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}}))),E0e=[" ","Enter","ArrowUp","ArrowDown"],C0e=[" ","Enter"],Ub="Select",[zb,d4,S0e]=$b(Ub),[Hd,a_e]=On(Ub,[S0e,qd]),h4=qd(),[k0e,Iu]=Hd(Ub),[A0e,_0e]=Hd(Ub),P0e=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:c,dir:l,name:u,autoComplete:f,disabled:d,required:h}=t,p=h4(e),[m,v]=w.useState(null),[y,b]=w.useState(null),[E,S]=w.useState(!1),P=Mb(l),[R=!1,L]=ha({prop:n,defaultProp:i,onChange:s}),[j,H]=ha({prop:o,defaultProp:a,onChange:c}),K=w.useRef(null),Y=m?!!m.closest("form"):!0,[Q,F]=w.useState(new Set),x=Array.from(Q).map(k=>k.props.value).join(";");return w.createElement(Nfe,p,w.createElement(k0e,{required:h,scope:e,trigger:m,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:E,onValueNodeHasChildrenChange:S,contentId:ra(),value:j,onValueChange:H,open:R,onOpenChange:L,dir:P,triggerPointerDownPosRef:K,disabled:d},w.createElement(zb.Provider,{scope:e},w.createElement(A0e,{scope:t.__scopeSelect,onNativeOptionAdd:w.useCallback(k=>{F(N=>new Set(N).add(k))},[]),onNativeOptionRemove:w.useCallback(k=>{F(N=>{const M=new Set(N);return M.delete(k),M})},[])},r)),Y?w.createElement(nF,{key:x,"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:f,value:j,onChange:k=>H(k.target.value),disabled:d},j===void 0?w.createElement("option",{value:""}):null,Array.from(Q)):null))},I0e="SelectTrigger",T0e=w.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...i}=t,s=h4(r),o=Iu(I0e,r),a=o.disabled||n,c=Bt(e,o.onTriggerChange),l=d4(r),[u,f,d]=iF(p=>{const m=l().filter(b=>!b.disabled),v=m.find(b=>b.value===o.value),y=sF(m,p,v);y!==void 0&&o.onValueChange(y.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return w.createElement(Dfe,ze({asChild:!0},s),w.createElement(tt.button,ze({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":rF(o.value)?"":void 0},i,{ref:c,onClick:Pe(i.onClick,p=>{p.currentTarget.focus()}),onPointerDown:Pe(i.onPointerDown,p=>{const m=p.target;m.hasPointerCapture(p.pointerId)&&m.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&(h(),o.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)},p.preventDefault())}),onKeyDown:Pe(i.onKeyDown,p=>{const m=u.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&f(p.key),!(m&&p.key===" ")&&E0e.includes(p.key)&&(h(),p.preventDefault())})})))}),O0e="SelectValue",R0e=w.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,children:s,placeholder:o="",...a}=t,c=Iu(O0e,r),{onValueNodeHasChildrenChange:l}=c,u=s!==void 0,f=Bt(e,c.onValueNodeChange);return _i(()=>{l(u)},[l,u]),w.createElement(tt.span,ze({},a,{ref:f,style:{pointerEvents:"none"}}),rF(c.value)?w.createElement(w.Fragment,null,o):s)}),$0e=w.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...i}=t;return w.createElement(tt.span,ze({"aria-hidden":!0},i,{ref:e}),n||"▼")}),yd="SelectContent",M0e=w.forwardRef((t,e)=>{const r=Iu(yd,t.__scopeSelect),[n,i]=w.useState();if(_i(()=>{i(new DocumentFragment)},[]),!r.open){const s=n;return s?Us.createPortal(w.createElement(tF,{scope:t.__scopeSelect},w.createElement(zb.Slot,{scope:t.__scopeSelect},w.createElement("div",null,t.children))),s):null}return w.createElement(N0e,ze({},t,{ref:e}))}),Fo=10,[tF,qb]=Hd(yd),N0e=w.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:m,avoidCollisions:v,...y}=t,b=Iu(yd,r),[E,S]=w.useState(null),[P,R]=w.useState(null),L=Bt(e,V=>S(V)),[j,H]=w.useState(null),[K,Y]=w.useState(null),Q=d4(r),[F,x]=w.useState(!1),k=w.useRef(!1);w.useEffect(()=>{if(E)return vB(E)},[E]),Kj();const N=w.useCallback(V=>{const[J,...ee]=Q().map(ae=>ae.ref.current),[se]=ee.slice(-1),ie=document.activeElement;for(const ae of V)if(ae===ie||(ae==null||ae.scrollIntoView({block:"nearest"}),ae===J&&P&&(P.scrollTop=0),ae===se&&P&&(P.scrollTop=P.scrollHeight),ae==null||ae.focus(),document.activeElement!==ie))return},[Q,P]),M=w.useCallback(()=>N([j,E]),[N,j,E]);w.useEffect(()=>{F&&M()},[F,M]);const{onOpenChange:A,triggerPointerDownPosRef:O}=b;w.useEffect(()=>{if(E){let V={x:0,y:0};const J=se=>{var ie,ae,be,he;V={x:Math.abs(Math.round(se.pageX)-((ie=(ae=O.current)===null||ae===void 0?void 0:ae.x)!==null&&ie!==void 0?ie:0)),y:Math.abs(Math.round(se.pageY)-((be=(he=O.current)===null||he===void 0?void 0:he.y)!==null&&be!==void 0?be:0))}},ee=se=>{V.x<=10&&V.y<=10?se.preventDefault():E.contains(se.target)||A(!1),document.removeEventListener("pointermove",J),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",J),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",ee,{capture:!0})}}},[E,A,O]),w.useEffect(()=>{const V=()=>A(!1);return window.addEventListener("blur",V),window.addEventListener("resize",V),()=>{window.removeEventListener("blur",V),window.removeEventListener("resize",V)}},[A]);const[B,I]=iF(V=>{const J=Q().filter(ie=>!ie.disabled),ee=J.find(ie=>ie.ref.current===document.activeElement),se=sF(J,V,ee);se&&setTimeout(()=>se.ref.current.focus())}),C=w.useCallback((V,J,ee)=>{const se=!k.current&&!ee;(b.value!==void 0&&b.value===J||se)&&(H(V),se&&(k.current=!0))},[b.value]),D=w.useCallback(()=>E==null?void 0:E.focus(),[E]),q=w.useCallback((V,J,ee)=>{const se=!k.current&&!ee;(b.value!==void 0&&b.value===J||se)&&Y(V)},[b.value]),_=n==="popper"?e_:D0e,W=_===e_?{side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:m,avoidCollisions:v}:{};return w.createElement(tF,{scope:r,content:E,viewport:P,onViewportChange:R,itemRefCallback:C,selectedItem:j,onItemLeave:D,itemTextRefCallback:q,focusSelectedItem:M,selectedItemText:K,position:n,isPositioned:F,searchRef:B},w.createElement(kB,{as:md,allowPinchZoom:!0},w.createElement(Yj,{asChild:!0,trapped:b.open,onMountAutoFocus:V=>{V.preventDefault()},onUnmountAutoFocus:Pe(i,V=>{var J;(J=b.trigger)===null||J===void 0||J.focus({preventScroll:!0}),V.preventDefault()})},w.createElement(e4,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:V=>V.preventDefault(),onDismiss:()=>b.onOpenChange(!1)},w.createElement(_,ze({role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:V=>V.preventDefault()},y,W,{onPlaced:()=>x(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Pe(y.onKeyDown,V=>{const J=V.ctrlKey||V.altKey||V.metaKey;if(V.key==="Tab"&&V.preventDefault(),!J&&V.key.length===1&&I(V.key),["ArrowUp","ArrowDown","Home","End"].includes(V.key)){let se=Q().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(V.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(V.key)){const ie=V.target,ae=se.indexOf(ie);se=se.slice(ae+1)}setTimeout(()=>N(se)),V.preventDefault()}})}))))))}),D0e=w.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...i}=t,s=Iu(yd,r),o=qb(yd,r),[a,c]=w.useState(null),[l,u]=w.useState(null),f=Bt(e,L=>u(L)),d=d4(r),h=w.useRef(!1),p=w.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=o,E=w.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&m&&v&&y){const L=s.trigger.getBoundingClientRect(),j=l.getBoundingClientRect(),H=s.valueNode.getBoundingClientRect(),K=y.getBoundingClientRect();if(s.dir!=="rtl"){const ie=K.left-j.left,ae=H.left-ie,be=L.left-ae,he=L.width+be,ve=Math.max(he,j.width),Ne=window.innerWidth-Fo,ke=ZA(ae,[Fo,Ne-ve]);a.style.minWidth=he+"px",a.style.left=ke+"px"}else{const ie=j.right-K.right,ae=window.innerWidth-H.right-ie,be=window.innerWidth-L.right-ae,he=L.width+be,ve=Math.max(he,j.width),Ne=window.innerWidth-Fo,ke=ZA(ae,[Fo,Ne-ve]);a.style.minWidth=he+"px",a.style.right=ke+"px"}const Y=d(),Q=window.innerHeight-Fo*2,F=m.scrollHeight,x=window.getComputedStyle(l),k=parseInt(x.borderTopWidth,10),N=parseInt(x.paddingTop,10),M=parseInt(x.borderBottomWidth,10),A=parseInt(x.paddingBottom,10),O=k+N+F+A+M,B=Math.min(v.offsetHeight*5,O),I=window.getComputedStyle(m),C=parseInt(I.paddingTop,10),D=parseInt(I.paddingBottom,10),q=L.top+L.height/2-Fo,_=Q-q,W=v.offsetHeight/2,V=v.offsetTop+W,J=k+N+V,ee=O-J;if(J<=q){const ie=v===Y[Y.length-1].ref.current;a.style.bottom="0px";const ae=l.clientHeight-m.offsetTop-m.offsetHeight,be=Math.max(_,W+(ie?D:0)+ae+M),he=J+be;a.style.height=he+"px"}else{const ie=v===Y[0].ref.current;a.style.top="0px";const be=Math.max(q,k+m.offsetTop+(ie?C:0)+W)+ee;a.style.height=be+"px",m.scrollTop=J-q+m.offsetTop}a.style.margin=`${Fo}px 0`,a.style.minHeight=B+"px",a.style.maxHeight=Q+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,s.trigger,s.valueNode,a,l,m,v,y,s.dir,n]);_i(()=>E(),[E]);const[S,P]=w.useState();_i(()=>{l&&P(window.getComputedStyle(l).zIndex)},[l]);const R=w.useCallback(L=>{L&&p.current===!0&&(E(),b==null||b(),p.current=!1)},[E,b]);return w.createElement(L0e,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:R},w.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S}},w.createElement(tt.div,ze({},i,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),e_=w.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=Fo,...s}=t,o=h4(r);return w.createElement(Lfe,ze({},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)"}}))}),[L0e,j0e]=Hd(yd,{}),t_="SelectViewport",B0e=w.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=qb(t_,r),s=j0e(t_,r),o=Bt(e,i.onViewportChange),a=w.useRef(0);return w.createElement(w.Fragment,null,w.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}"}}),w.createElement(zb.Slot,{scope:r},w.createElement(tt.div,ze({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:Pe(n.onScroll,c=>{const l=c.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:f}=s;if(f!=null&&f.current&&u){const d=Math.abs(a.current-l.scrollTop);if(d>0){const h=window.innerHeight-Fo*2,p=parseFloat(u.style.minHeight),m=parseFloat(u.style.height),v=Math.max(p,m);if(v0?E:0,u.style.justifyContent="flex-end")}}}a.current=l.scrollTop})}))))}),F0e="SelectGroup",[U0e,c_e]=Hd(F0e),z0e=w.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=ra();return w.createElement(U0e,{scope:r,id:i},w.createElement(tt.div,ze({role:"group","aria-labelledby":i},n,{ref:e})))}),r3="SelectItem",[q0e,W0e]=Hd(r3),H0e=w.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=t,a=Iu(r3,r),c=qb(r3,r),l=a.value===n,[u,f]=w.useState(s??""),[d,h]=w.useState(!1),p=Bt(e,y=>{var b;return(b=c.itemRefCallback)===null||b===void 0?void 0:b.call(c,y,n,i)}),m=ra(),v=()=>{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 w.createElement(q0e,{scope:r,value:n,disabled:i,textId:m,isSelected:l,onItemTextChange:w.useCallback(y=>{f(b=>{var E;return b||((E=y==null?void 0:y.textContent)!==null&&E!==void 0?E:"").trim()})},[])},w.createElement(zb.ItemSlot,{scope:r,value:n,disabled:i,textValue:u},w.createElement(tt.div,ze({role:"option","aria-labelledby":m,"data-highlighted":d?"":void 0,"aria-selected":l&&d,"data-state":l?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},o,{ref:p,onFocus:Pe(o.onFocus,()=>h(!0)),onBlur:Pe(o.onBlur,()=>h(!1)),onPointerUp:Pe(o.onPointerUp,v),onPointerMove:Pe(o.onPointerMove,y=>{if(i){var b;(b=c.onItemLeave)===null||b===void 0||b.call(c)}else y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Pe(o.onPointerLeave,y=>{if(y.currentTarget===document.activeElement){var b;(b=c.onItemLeave)===null||b===void 0||b.call(c)}}),onKeyDown:Pe(o.onKeyDown,y=>{var b;((b=c.searchRef)===null||b===void 0?void 0:b.current)!==""&&y.key===" "||(C0e.includes(y.key)&&v(),y.key===" "&&y.preventDefault())})}))))}),pm="SelectItemText",V0e=w.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,...s}=t,o=Iu(pm,r),a=qb(pm,r),c=W0e(pm,r),l=_0e(pm,r),[u,f]=w.useState(null),d=Bt(e,y=>f(y),c.onItemTextChange,y=>{var b;return(b=a.itemTextRefCallback)===null||b===void 0?void 0:b.call(a,y,c.value,c.disabled)}),h=u==null?void 0:u.textContent,p=w.useMemo(()=>w.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},h),[c.disabled,c.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=l;return _i(()=>(m(p),()=>v(p)),[m,v,p]),w.createElement(w.Fragment,null,w.createElement(tt.span,ze({id:c.textId},s,{ref:d})),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Us.createPortal(s.children,o.valueNode):null)});function rF(t){return t===""||t===void 0}const nF=w.forwardRef((t,e)=>{const{value:r,...n}=t,i=w.useRef(null),s=Bt(e,i),o=_b(r);return w.useEffect(()=>{const a=i.current,c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==r&&u){const f=new Event("change",{bubbles:!0});u.call(a,r),a.dispatchEvent(f)}},[o,r]),w.createElement(eF,{asChild:!0},w.createElement("select",ze({},n,{ref:s,defaultValue:r})))});nF.displayName="BubbleSelect";function iF(t){const e=is(t),r=w.useRef(""),n=w.useRef(0),i=w.useCallback(o=>{const a=r.current+o;e(a),function c(l){r.current=l,window.clearTimeout(n.current),l!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(a)},[e]),s=w.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,s]}function sF(t,e,r){const i=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,s=r?t.indexOf(r):-1;let o=G0e(t,Math.max(s,0));i.length===1&&(o=o.filter(l=>l!==r));const c=o.find(l=>l.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function G0e(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const K0e=P0e,Y0e=T0e,Q0e=R0e,J0e=$0e,X0e=M0e,Z0e=B0e,e1e=z0e,t1e=H0e,r1e=V0e;var n1e="gohwum1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 gohwum0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11od fyvr11hc fyvr11f4 fyvr12s1 fyvr118c fyvr11jw fyvr11n4 fyvr12v7 fyvr12o1",i1e=Ar({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:[]}),s1e="gohwuma gohwum9 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11tv fyvr12s1 fyvr11nl",o1e="gohwume _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 gohwumd fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12ws fyvr12wt fyvr12wm fyvr12wn fyvr11h0 fyvr11jw fyvr11ko fyvr12v7 fyvr12v3 fyvr12s1 fyvr12w1 fyvr12vr";const a1e=w.forwardRef(({children:t,className:e,...r},n)=>X.jsx(t1e,{className:fi(o1e,e),...r,ref:n,children:X.jsx(r1e,{children:t})})),c1e=w.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:i,label:s="",description:o,labelLocation:a="hidden",name:c,options:l,placeholder:u,...f}=t;return X.jsx(ku,{disabled:n,display:"grid",id:i??c,label:s,labelLocation:a,description:o,whiteSpace:"nowrap",children:X.jsxs(K0e,{disabled:n,name:c,...f,children:[X.jsxs(Y0e,{id:i??c,className:fi(n1e,i1e({borderRadius:r})),ref:e,children:[X.jsx(Q0e,{placeholder:u}),X.jsx(z,{as:J0e,display:"inline-flex",children:X.jsx(JC,{})})]}),X.jsx(X0e,{className:s1e,children:X.jsx(Z0e,{children:X.jsx(e1e,{children:l.map(({value:d,label:h,...p})=>X.jsx(a1e,{value:d,...p,children:h},d))})})})]})})});w.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:i="Search",name:s="search",value:o,...a}=t,c=o?X.jsx(_o,{icon:Au,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return X.jsx(cl,{ref:e,name:s,leftIcon:Ob,controls:r||c,placeholder:i,value:o,onChange:l=>n==null?void 0:n(l),...a})});var l1e=Ar({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});const Wc=w.forwardRef((t,e)=>{const{size:r="md",...n}=t;return X.jsx(z,{className:l1e({size:r}),color:"text50",ref:e,...n,children:X.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[X.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),X.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});w.forwardRef(({children:t},e)=>X.jsx(z,{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 oF="Switch",[u1e,l_e]=On(oF),[f1e,d1e]=u1e(oF),h1e=w.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:c="on",onCheckedChange:l,...u}=t,[f,d]=w.useState(null),h=Bt(e,b=>d(b)),p=w.useRef(!1),m=f?!!f.closest("form"):!0,[v=!1,y]=ha({prop:i,defaultProp:s,onChange:l});return w.createElement(f1e,{scope:r,checked:v,disabled:a},w.createElement(tt.button,wt({type:"button",role:"switch","aria-checked":v,"aria-required":o,"data-state":aF(v),"data-disabled":a?"":void 0,disabled:a,value:c},u,{ref:h,onClick:Pe(t.onClick,b=>{y(E=>!E),m&&(p.current=b.isPropagationStopped(),p.current||b.stopPropagation())})})),m&&w.createElement(v1e,{control:f,bubbles:!p.current,name:n,value:c,checked:v,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),p1e="SwitchThumb",m1e=w.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,i=d1e(p1e,r);return w.createElement(tt.span,wt({"data-state":aF(i.checked),"data-disabled":i.disabled?"":void 0},n,{ref:e}))}),v1e=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=w.useRef(null),o=_b(r),a=Pb(e);return w.useEffect(()=>{const c=s.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(d)}},[o,r,n]),w.createElement("input",wt({type:"checkbox","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function aF(t){return t?"checked":"unchecked"}const y1e=h1e,g1e=m1e;var b1e="_1lp2u8e1 _1lp2u8e0 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1ss fyvr1uo fyvr1wk fyvr1yg fyvr11t1 fyvr11hw fyvr12v7 fyvr12o1",x1e="_1lp2u8e3 _1lp2u8e2 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ho fyvr1ko fyvr1oo fyvr1k fyvr140 fyvr11o1";const n3=t=>{const{disabled:e,label:r,labelLocation:n="left",description:i,id:s,name:o,...a}=t;return X.jsx(ku,{disabled:e,display:"flex",id:s??o,label:r,labelLocation:n,description:i,whiteSpace:"nowrap",children:X.jsx(y1e,{className:b1e,disabled:e,...a,children:X.jsx(z,{position:"relative",width:"full",height:"full",children:X.jsx(g1e,{className:x1e})})})})};Ar({defaultClassName:"nwwh3z8",variantClassNames:{variant:{pill:"nwwh3z9",line:"nwwh3za nwwh3z1 fyvr11g0"},active:{true:"nwwh3zb nwwh3z2 fyvr12w5",false:"nwwh3zc"},disabled:{true:"nwwh3zd nwwh3z3 fyvr12vp"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"nwwh3z4 fyvr11u7 fyvr12sj"],[{active:!1,variant:"pill"},"nwwh3z5 fyvr11od fyvr12s7"],[{active:!0,variant:"line"},"nwwh3z6 fyvr12s1"],[{active:!1,variant:"line"},"nwwh3z7 fyvr12s7"]]});const cF="Tabs",[w1e,u_e]=On(cF,[Wd]),lF=Wd(),[E1e,p4]=w1e(cF),C1e=w.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:s,orientation:o="horizontal",dir:a,activationMode:c="automatic",...l}=t,u=Mb(a),[f,d]=ha({prop:n,onChange:i,defaultProp:s});return w.createElement(E1e,{scope:r,baseId:ra(),value:f,onValueChange:d,orientation:o,dir:u,activationMode:c},w.createElement(tt.div,wt({dir:u,"data-orientation":o},l,{ref:e})))}),S1e="TabsList",k1e=w.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...i}=t,s=p4(S1e,r),o=lF(r);return w.createElement(pB,wt({asChild:!0},o,{orientation:s.orientation,dir:s.dir,loop:n}),w.createElement(tt.div,wt({role:"tablist","aria-orientation":s.orientation},i,{ref:e})))}),A1e="TabsTrigger",_1e=w.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...s}=t,o=p4(A1e,r),a=lF(r),c=uF(o.baseId,n),l=fF(o.baseId,n),u=n===o.value;return w.createElement(c4,wt({asChild:!0},a,{focusable:!i,active:u}),w.createElement(tt.button,wt({type:"button",role:"tab","aria-selected":u,"aria-controls":l,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c},s,{ref:e,onMouseDown:Pe(t.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?o.onValueChange(n):f.preventDefault()}),onKeyDown:Pe(t.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(n)}),onFocus:Pe(t.onFocus,()=>{const f=o.activationMode!=="manual";!u&&!i&&f&&o.onValueChange(n)})})))}),P1e="TabsContent",I1e=w.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:i,children:s,...o}=t,a=p4(P1e,r),c=uF(a.baseId,n),l=fF(a.baseId,n),u=n===a.value,f=w.useRef(u);return w.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),w.createElement(Na,{present:i||u},({present:d})=>w.createElement(tt.div,wt({"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!d,id:l,tabIndex:0},o,{ref:e,style:{...t.style,animationDuration:f.current?"0s":void 0}}),d&&s))});function uF(t,e){return`${t}-trigger-${e}`}function fF(t,e){return`${t}-content-${e}`}const T1e=C1e,O1e=k1e,R1e=_1e;var $1e="_10c8o0n1 _10c8o0n0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr11h0 fyvr11hw fyvr128 fyvr11sj fyvr14o",M1e="_10c8o0n3 _10c8o0n2 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr12wp fyvr12wj fyvr128 fyvr15o fyvr12v7 fyvr11hw fyvr11od fyvr11n4 fyvr12s7",N1e="_10c8o0n5 _10c8o0n4 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ho fyvr1ko fyvr1oo fyvr14c fyvr11tv fyvr12w7";const D1e=t=>{const{tabs:e,value:r}=t;if(!e.length)return null;const n=100/e.length,i=e.findIndex(s=>s.value===r);return X.jsxs(O1e,{className:$1e,style:{outline:void 0},children:[X.jsx(z,{display:"flex",position:"absolute",inset:"2",height:"8",children:X.jsx("div",{className:N1e,style:{width:`${n}%`,transform:`translateX(${i*100}%)`}})}),e.map(s=>X.jsx(R1e,{className:M1e,value:s.value,children:X.jsx(oe,{variant:"normal",fontWeight:"bold",children:s.label})},s.value))]})},L1e=T1e,r_=I1e;var j1e="_1ppqbnx1 _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc _1ppqbnx0 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n9";w.forwardRef((t,e)=>{const{icon:r,label:n,...i}=t;return X.jsxs(z,{className:j1e,ref:e,background:"buttonGlass",color:"text80",...i,children:[r&&X.jsx(r,{size:"xs"}),X.jsx(oe,{children:n})]})});const B1e="ToastProvider",[F1e,f_e,U1e]=$b("Toast"),[dF,d_e]=On("Toast",[U1e]),[h_e,hF]=dF(B1e),n_="toast.viewportPause",i_="toast.viewportResume",Wb="Toast",z1e="toast.swipeStart",q1e="toast.swipeMove",W1e="toast.swipeCancel",H1e="toast.swipeEnd",[V1e,G1e]=dF(Wb,{onClose(){}}),K1e=w.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:d,onSwipeEnd:h,...p}=t,m=hF(Wb,r),[v,y]=w.useState(null),b=Bt(e,x=>y(x)),E=w.useRef(null),S=w.useRef(null),P=i||m.duration,R=w.useRef(0),L=w.useRef(P),j=w.useRef(0),{onToastAdd:H,onToastRemove:K}=m,Y=is(()=>{var x;(v==null?void 0:v.contains(document.activeElement))&&((x=m.viewport)===null||x===void 0||x.focus()),o()}),Q=w.useCallback(x=>{!x||x===1/0||(window.clearTimeout(j.current),R.current=new Date().getTime(),j.current=window.setTimeout(Y,x))},[Y]);w.useEffect(()=>{const x=m.viewport;if(x){const k=()=>{Q(L.current),l==null||l()},N=()=>{const M=new Date().getTime()-R.current;L.current=L.current-M,window.clearTimeout(j.current),c==null||c()};return x.addEventListener(n_,N),x.addEventListener(i_,k),()=>{x.removeEventListener(n_,N),x.removeEventListener(i_,k)}}},[m.viewport,P,c,l,Q]),w.useEffect(()=>{s&&!m.isClosePausedRef.current&&Q(P)},[s,P,m.isClosePausedRef,Q]),w.useEffect(()=>(H(),()=>K()),[H,K]);const F=w.useMemo(()=>v?mF(v):null,[v]);return m.viewport?w.createElement(w.Fragment,null,F&&w.createElement(Y1e,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},F),w.createElement(V1e,{scope:r,onClose:Y},Us.createPortal(w.createElement(F1e.ItemSlot,{scope:r},w.createElement(Lue,{asChild:!0,onEscapeKeyDown:Pe(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||Y(),m.isFocusedToastEscapeKeyDownRef.current=!1})},w.createElement(tt.li,ze({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection},p,{ref:b,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Pe(t.onKeyDown,x=>{x.key==="Escape"&&(a==null||a(x.nativeEvent),x.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,Y()))}),onPointerDown:Pe(t.onPointerDown,x=>{x.button===0&&(E.current={x:x.clientX,y:x.clientY})}),onPointerMove:Pe(t.onPointerMove,x=>{if(!E.current)return;const k=x.clientX-E.current.x,N=x.clientY-E.current.y,M=!!S.current,A=["left","right"].includes(m.swipeDirection),O=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,B=A?O(0,k):0,I=A?0:O(0,N),C=x.pointerType==="touch"?10:2,D={x:B,y:I},q={originalEvent:x,delta:D};M?(S.current=D,mm(q1e,f,q,{discrete:!1})):s_(D,m.swipeDirection,C)?(S.current=D,mm(z1e,u,q,{discrete:!1}),x.target.setPointerCapture(x.pointerId)):(Math.abs(k)>C||Math.abs(N)>C)&&(E.current=null)}),onPointerUp:Pe(t.onPointerUp,x=>{const k=S.current,N=x.target;if(N.hasPointerCapture(x.pointerId)&&N.releasePointerCapture(x.pointerId),S.current=null,E.current=null,k){const M=x.currentTarget,A={originalEvent:x,delta:k};s_(k,m.swipeDirection,m.swipeThreshold)?mm(H1e,h,A,{discrete:!0}):mm(W1e,d,A,{discrete:!0}),M.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})))),m.viewport))):null});K1e.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${Wb}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const Y1e=t=>{const{__scopeToast:e,children:r,...n}=t,i=hF(Wb,e),[s,o]=w.useState(!1),[a,c]=w.useState(!1);return epe(()=>o(!0)),w.useEffect(()=>{const l=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:w.createElement(fB,{asChild:!0},w.createElement(eF,n,s&&w.createElement(w.Fragment,null,i.label," ",r)))},Q1e="ToastAction",J1e=w.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?w.createElement(pF,{altText:r,asChild:!0},w.createElement(Z1e,ze({},n,{ref:e}))):null});J1e.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${Q1e}\``)}};const X1e="ToastClose",Z1e=w.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,i=G1e(X1e,r);return w.createElement(pF,{asChild:!0},w.createElement(tt.button,ze({type:"button"},n,{ref:e,onClick:Pe(t.onClick,i.onClose)})))}),pF=w.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...i}=t;return w.createElement(tt.div,ze({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},i,{ref:e}))});function mF(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),tpe(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(...mF(n))}}),e}function mm(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?QC(i,s):i.dispatchEvent(s)}const s_=(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 epe(t=()=>{}){const e=is(t);_i(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function tpe(t){return t.nodeType===t.ELEMENT_NODE}Ar({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});w.createContext(null);var rpe="_15pztn1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _15pztn0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11od fyvr12s1 fyvr12o1 fyvr12wj fyvr128 fyvr11h0",npe="_15pztn2";w.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",name:u,rows:f,resize:d=!1,...h}=t;return X.jsx(ku,{description:s,disabled:o,display:"grid",id:a??u,label:c,labelLocation:l,children:X.jsx(z,{as:r,autoComplete:n,spellCheck:"false",className:fi(rpe,d&&npe),disabled:o,id:a??u,name:u,ref:e,rows:f,borderRadius:i,...h})})});var ipe=Ar({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:[]}),spe="bnrrebf",ope="bnrrebh bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11sj fyvr128 fyvr15o fyvr11h0";w.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:i,src:s,symbol:o,size:a="md",...c}=t;return X.jsx(z,{className:fi(r,ipe({borderRadius:e,size:a})),style:i,flexShrink:"0",...c,children:s?X.jsx(ar,{className:spe,disableAnimation:n,src:s}):X.jsx(oe,{className:ope,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})});const[Hb,p_e]=On("Tooltip",[qd]);qd();const ape="TooltipProvider";Hb(ape);const vF="Tooltip";Hb(vF);const cpe="TooltipPortal";Hb(cpe,{forceMount:void 0});Hb(vF,{isInside:!1});const yF=(t,e={})=>{const r=new Map().set("isMobile",`@media screen and (max-width: ${wA.lg-1}px)`).set("isDesktop",`@media screen and (min-width: ${wA.lg}px)`);if(!t.startsWith("@media")){const c=r.get(t);if(!c||c==="")throw new Error(`useMediaQuery failed to get breakpoint from theme for: ${t}`);t=c}const n=t.replace(/^@media( ?)/m,""),i=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:s=!1}=e,[o,a]=w.useState(()=>i?window.matchMedia(n).matches:s);return w.useEffect(()=>{let c=!0;if(!i)return;const l=window.matchMedia(n),u=()=>{c&&a(l.matches)};return u(),l.addListener(u),()=>{c=!1,l.removeListener(u)}},[n,i]),o};function lpe(t={}){const{nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n}=t,[i,s]=w.useState(!1),o=w.useRef(r);o.current=r;const a=w.useRef(n);return a.current=n,w.useEffect(()=>{const c=document.createElement("script");return c.src="https://accounts.google.com/gsi/client",c.async=!0,c.defer=!0,c.nonce=e,c.onload=()=>{var l;s(!0),(l=o.current)===null||l===void 0||l.call(o)},c.onerror=()=>{var l;s(!1),(l=a.current)===null||l===void 0||l.call(a)},document.body.appendChild(c),()=>{document.body.removeChild(c)}},[e]),i}const gF=w.createContext(null);function upe({clientId:t,nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n,children:i}){const s=lpe({nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n}),o=w.useMemo(()=>({clientId:t,scriptLoadedSuccessfully:s}),[t,s]);return g.createElement(gF.Provider,{value:o},i)}function fpe(){const t=w.useContext(gF);if(!t)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return t}function dpe(t){var e;return(e=t==null?void 0:t.clientId)!==null&&e!==void 0?e:t==null?void 0:t.client_id}const hpe={large:40,medium:32,small:20};function ppe({onSuccess:t,onError:e,useOneTap:r,promptMomentNotification:n,type:i="standard",theme:s="outline",size:o="large",text:a,shape:c,logo_alignment:l,width:u,locale:f,click_listener:d,containerProps:h,...p}){const m=w.useRef(null),{clientId:v,scriptLoadedSuccessfully:y}=fpe(),b=w.useRef(t);b.current=t;const E=w.useRef(e);E.current=e;const S=w.useRef(n);return S.current=n,w.useEffect(()=>{var P,R,L,j,H,K,Y,Q,F;if(y)return(L=(R=(P=window==null?void 0:window.google)===null||P===void 0?void 0:P.accounts)===null||R===void 0?void 0:R.id)===null||L===void 0||L.initialize({client_id:v,callback:x=>{var k;if(!(x!=null&&x.credential))return(k=E.current)===null||k===void 0?void 0:k.call(E);const{credential:N,select_by:M}=x;b.current({credential:N,clientId:dpe(x),select_by:M})},...p}),(K=(H=(j=window==null?void 0:window.google)===null||j===void 0?void 0:j.accounts)===null||H===void 0?void 0:H.id)===null||K===void 0||K.renderButton(m.current,{type:i,theme:s,size:o,text:a,shape:c,logo_alignment:l,width:u,locale:f,click_listener:d}),r&&((F=(Q=(Y=window==null?void 0:window.google)===null||Y===void 0?void 0:Y.accounts)===null||Q===void 0?void 0:Q.id)===null||F===void 0||F.prompt(S.current)),()=>{var x,k,N;r&&((N=(k=(x=window==null?void 0:window.google)===null||x===void 0?void 0:x.accounts)===null||k===void 0?void 0:k.id)===null||N===void 0||N.cancel())}},[v,y,r,i,s,o,a,c,l,u,f]),g.createElement("div",{...h,ref:m,style:{height:hpe[o],...h==null?void 0:h.style}})}const mpe="2.7.9",vpe=t=>t,m4=t=>t,ype=()=>`viem@${mpe}`;let ye=class i3 extends Error{constructor(e,r={}){var s;super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:ype()});const n=r.cause instanceof i3?r.cause.details:(s=r.cause)!=null&&s.message?r.cause.message:r.details,i=r.cause instanceof i3&&r.cause.docsPath||r.docsPath;this.message=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: https://viem.sh${i}${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(` -`),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.shortMessage=e}walk(e){return bF(this,e)}};function bF(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t?bF(t.cause,e):e?null:t}class gpe extends ye{constructor({max:e,min:r,signed:n,size:i,value:s}){super(`Number "${s}" is not in safe ${i?`${i*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class bpe extends ye{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidBytesBooleanError"})}}class xpe extends ye{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}class wpe extends ye{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}class xF extends ye{constructor({offset:e,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}class wF extends ye{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}class o_ extends ye{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${r} ${n} long, but is ${e} ${n} long.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidBytesLengthError"})}}function Vd(t,{dir:e,size:r=32}={}){return typeof t=="string"?Pc(t,{dir:e,size:r}):Epe(t,{dir:e,size:r})}function Pc(t,{dir:e,size:r=32}={}){if(r===null)return t;const n=t.replace("0x","");if(n.length>r*2)throw new wF({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](r*2,"0")}`}function Epe(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new wF({size:t.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let i=0;i=No.zero&&t<=No.nine)return t-No.zero;if(t>=No.A&&t<=No.F)return t-(No.A-10);if(t>=No.a&&t<=No.f)return t-(No.a-10)}function lp(t,e={}){let r=t;e.size&&(fs(r,{size:e.size}),r=Vd(r,{dir:"right",size:e.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);const i=n.length/2,s=new Uint8Array(i);for(let o=0,a=0;oe)throw new wpe({givenSize:Gr(t),maxSize:e})}function c_(t,e){const r=typeof e=="string"?{to:e}:e,n=r.to;return n==="number"?ya(t,r):n==="bigint"?up(t,r):n==="string"?_pe(t,r):n==="boolean"?Ape(t,r):lp(t,r)}function up(t,e={}){const{signed:r}=e;e.size&&fs(t,{size:e.size});const n=BigInt(t);if(!r)return n;const i=(t.length-2)/2,s=(1n<e.toString(16).padStart(2,"0"));function La(t,e={}){return typeof t=="number"||typeof t=="bigint"?Me(t,e):typeof t=="string"?v4(t,e):typeof t=="boolean"?EF(t,e):Fs(t,e)}function EF(t,e={}){const r=`0x${Number(t)}`;return typeof e.size=="number"?(fs(r,{size:e.size}),Vd(r,{size:e.size})):r}function Fs(t,e={}){let r="";for(let i=0;is||ia):void 0}]},{retryCount:0})}function ga(t,{includeName:e=!1}={}){if(t.type!=="function"&&t.type!=="event"&&t.type!=="error")throw new qpe(t.type);return`${t.name}(${Vb(t.inputs,{includeName:e})})`}function Vb(t,{includeName:e=!1}={}){return t?t.map(r=>Ope(r,{includeName:e})).join(e?", ":","):""}function Ope(t,{includeName:e}){return t.type.startsWith("tuple")?`(${Vb(t.components,{includeName:e})})${t.type.slice(5)}`:t.type+(e&&t.name?` ${t.name}`:"")}class Rpe extends ye{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` -`),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class l_ extends ye{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` -`),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}class CF extends ye{constructor({data:e,params:r,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(` -`),{metaMessages:[`Params: (${Vb(r,{includeName:!0})})`,`Data: ${e} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=r,this.size=n}}class Gb extends ye{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class $pe extends ye{constructor({expectedLength:e,givenLength:r,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${r}`].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}class Mpe extends ye{constructor({expectedSize:e,value:r}){super(`Size of bytes "${r}" (bytes${Gr(r)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class Npe extends ye{constructor({expectedLength:e,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${r}`].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}class SF extends ye{constructor(e,{docsPath:r}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class Dpe extends ye{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}class kF extends ye{constructor(e,{docsPath:r}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}class u_ extends ye{constructor(e,{docsPath:r}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}class Vy extends ye{constructor(e,{docsPath:r}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}class Lpe extends ye{constructor(e,{docsPath:r}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}class jpe extends ye{constructor(e,r){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${ga(e.abiItem)}\`, and`,`\`${r.type}\` in \`${ga(r.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItemAmbiguityError"})}}class Bpe extends ye{constructor({expectedSize:e,givenSize:r}){super(`Expected bytes${e}, got bytes${r}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}class u1 extends ye{constructor({abiItem:e,data:r,params:n,size:i}){super([`Data size of ${i} bytes is too small for non-indexed event parameters.`].join(` -`),{metaMessages:[`Params: (${Vb(n,{includeName:!0})})`,`Data: ${r} (${i} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=r,this.params=n,this.size=i}}class Kb extends ye{constructor({abiItem:e,param:r}){super([`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${ga(e,{includeName:!0})}".`].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class Fpe extends ye{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class Upe extends ye{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class zpe extends ye{constructor(e){super([`Value "${e}" is not a valid array.`].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class qpe extends ye{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}function ba(t){return typeof t[0]=="string"?y4(t):Wpe(t)}function Wpe(t){let e=0;for(const i of t)e+=i.length;const r=new Uint8Array(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return r}function y4(t){return`0x${t.reduce((e,r)=>e+r.replace("0x",""),"")}`}class gd extends ye{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}const Hpe=/^0x[a-fA-F0-9]{40}$/;function xa(t){return Hpe.test(t)}function Gy(t,e,r,{strict:n}={}){return Po(t,{strict:!1})?Vpe(t,e,r,{strict:n}):PF(t,e,r,{strict:n})}function AF(t,e){if(typeof e=="number"&&e>0&&e>Gr(t)-1)throw new xF({offset:e,position:"start",size:Gr(t)})}function _F(t,e,r){if(typeof e=="number"&&typeof r=="number"&&Gr(t)!==r-e)throw new xF({offset:r,position:"end",size:Gr(t)})}function PF(t,e,r,{strict:n}={}){AF(t,e);const i=t.slice(e,r);return n&&_F(i,e,r),i}function Vpe(t,e,r,{strict:n}={}){AF(t,e);const i=`0x${t.replace("0x","").slice((e??0)*2,(r??t.length)*2)}`;return n&&_F(i,e,r),i}function fp(t,e){if(t.length!==e.length)throw new Npe({expectedLength:t.length,givenLength:e.length});const r=Gpe({params:t,values:e}),n=b4(r);return n.length===0?"0x":n}function Gpe({params:t,values:e}){const r=[];for(let n=0;n0?ba([a,o]):a}}if(i)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:ba(s.map(({encoded:o})=>o))}}function Qpe(t,{param:e}){const[,r]=e.type.split("bytes"),n=Gr(t);if(!r){let i=t;return n%32!==0&&(i=Pc(i,{dir:"right",size:Math.ceil((t.length-2)/2/32)*32})),{dynamic:!0,encoded:ba([Pc(Me(n,{size:32})),i])}}if(n!==parseInt(r))throw new Mpe({expectedSize:parseInt(r),value:t});return{dynamic:!1,encoded:Pc(t,{dir:"right"})}}function Jpe(t){return{dynamic:!1,encoded:Pc(EF(t))}}function Xpe(t,{signed:e}){return{dynamic:!1,encoded:Me(t,{size:32,signed:e})}}function Zpe(t){const e=v4(t),r=Math.ceil(Gr(e)/32),n=[];for(let i=0;ii))}}function x4(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}const uw="/docs/contract/encodeDeployData";function IF(t){const{abi:e,args:r,bytecode:n}=t;if(!r||r.length===0)return n;const i=e.find(o=>"type"in o&&o.type==="constructor");if(!i)throw new Rpe({docsPath:uw});if(!("inputs"in i))throw new l_({docsPath:uw});if(!i.inputs||i.inputs.length===0)throw new l_({docsPath:uw});const s=fp(i.inputs,r);return y4([n,s])}function $i(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}class Yb extends ye{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join(` -`),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}class s3 extends ye{constructor({blockNumber:e,chain:r,contract:n}){super(`Chain "${r.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class tme extends ye{constructor({chain:e,currentChainId:r}){super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${e.id} – ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class rme extends ye{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class TF extends ye{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}function OF({chain:t,currentChainId:e}){if(!t)throw new rme;if(e!==t.id)throw new tme({chain:t,currentChainId:e})}const nme={gwei:9,wei:18},ime={ether:-9,wei:9};function RF(t,e){let r=t.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(e,"0");let[i,s]=[r.slice(0,r.length-e),r.slice(r.length-e)];return s=s.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${s?`.${s}`:""}`}function oi(t,e="wei"){return RF(t,ime[e])}class kf extends ye{constructor({cause:e,message:r}={}){var i;const n=(i=r==null?void 0:r.replace("execution reverted: ",""))==null?void 0:i.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(kf,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(kf,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class Ky extends ye{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${oi(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(Ky,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class o3 extends ye{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${oi(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(o3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class a3 extends ye{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(a3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class c3 extends ye{constructor({cause:e,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` -`),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(c3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class l3 extends ye{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(l3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class u3 extends ye{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` -`),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(u3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class f3 extends ye{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(f3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class d3 extends ye{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(d3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class h3 extends ye{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(h3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class Yy extends ye{constructor({cause:e,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${oi(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${oi(n)} gwei`:""}).`].join(` -`),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(Yy,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class Qb extends ye{constructor({cause:e}){super(`An error occurred while executing: ${e==null?void 0:e.shortMessage}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}function w4(t,e="wei"){return RF(t,nme[e])}function dp(t){const e=Object.entries(t).map(([n,i])=>i===void 0||i===!1?null:[n,i]).filter(Boolean),r=e.reduce((n,[i])=>Math.max(n,i.length),0);return e.map(([n,i])=>` ${`${n}:`.padEnd(r+1)} ${i}`).join(` -`)}class sme extends ye{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class ome extends ye{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",dp(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class ame extends ye{constructor(e,{account:r,docsPath:n,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d}){var p;const h=dp({chain:i&&`${i==null?void 0:i.name} (id: ${i==null?void 0:i.id})`,from:r==null?void 0:r.address,to:f,value:typeof d<"u"&&`${w4(d)} ${((p=i==null?void 0:i.nativeCurrency)==null?void 0:p.symbol)||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${oi(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${oi(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${oi(l)} gwei`,nonce:u});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",h].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}class $F extends ye{constructor({blockHash:e,blockNumber:r,blockTag:n,hash:i,index:s}){let o="Transaction";n&&s!==void 0&&(o=`Transaction at block time "${n}" at index "${s}"`),e&&s!==void 0&&(o=`Transaction at block hash "${e}" at index "${s}"`),r&&s!==void 0&&(o=`Transaction at block number "${r}" at index "${s}"`),i&&(o=`Transaction with hash "${i}"`),super(`${o} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class MF extends ye{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class cme extends ye{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}const ai=(t,e,r)=>JSON.stringify(t,(n,i)=>{const s=typeof i=="bigint"?i.toString():i;return typeof e=="function"?e(n,s):s},r);class x0 extends ye{constructor({body:e,details:r,headers:n,status:i,url:s}){super("HTTP request failed.",{details:r,metaMessages:[i&&`Status: ${i}`,`URL: ${m4(s)}`,e&&`Request body: ${ai(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=i,this.url=s}}class E4 extends ye{constructor({body:e,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${m4(n)}`,`Request body: ${ai(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code}}class f_ extends ye{constructor({body:e,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${m4(r)}`,`Request body: ${ai(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}const lme=-1;class di extends ye{constructor(e,{code:r,docsPath:n,metaMessages:i,shortMessage:s}){super(s,{cause:e,docsPath:n,metaMessages:i||(e==null?void 0:e.metaMessages)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof E4?e.code:r??lme}}class Gd extends di{constructor(e,r){super(e,r),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}}class f1 extends di{constructor(e){super(e,{code:f1.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(f1,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class d1 extends di{constructor(e){super(e,{code:d1.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(d1,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class h1 extends di{constructor(e){super(e,{code:h1.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(h1,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class p1 extends di{constructor(e){super(e,{code:p1.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` -`)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(p1,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class pu extends di{constructor(e){super(e,{code:pu.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(pu,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class mu extends di{constructor(e){super(e,{code:mu.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` -`)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(mu,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class m1 extends di{constructor(e){super(e,{code:m1.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(m1,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class Tc extends di{constructor(e){super(e,{code:Tc.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(Tc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class v1 extends di{constructor(e){super(e,{code:v1.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(v1,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class y1 extends di{constructor(e){super(e,{code:y1.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(y1,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class bd extends di{constructor(e){super(e,{code:bd.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(bd,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class g1 extends di{constructor(e){super(e,{code:g1.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(g1,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Mt extends Gd{constructor(e){super(e,{code:Mt.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(Mt,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class b1 extends Gd{constructor(e){super(e,{code:b1.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(b1,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class x1 extends Gd{constructor(e){super(e,{code:x1.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(x1,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class w1 extends Gd{constructor(e){super(e,{code:w1.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(w1,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class E1 extends Gd{constructor(e){super(e,{code:E1.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(E1,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class os extends Gd{constructor(e){super(e,{code:os.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(os,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class ume extends di{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}function C4(t,e){const r=(t.details||"").toLowerCase(),n=t instanceof ye?t.walk(i=>i.code===kf.code):t;return n instanceof ye?new kf({cause:t,message:n.details}):kf.nodeMessage.test(r)?new kf({cause:t,message:t.details}):Ky.nodeMessage.test(r)?new Ky({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):o3.nodeMessage.test(r)?new o3({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):a3.nodeMessage.test(r)?new a3({cause:t,nonce:e==null?void 0:e.nonce}):c3.nodeMessage.test(r)?new c3({cause:t,nonce:e==null?void 0:e.nonce}):l3.nodeMessage.test(r)?new l3({cause:t,nonce:e==null?void 0:e.nonce}):u3.nodeMessage.test(r)?new u3({cause:t}):f3.nodeMessage.test(r)?new f3({cause:t,gas:e==null?void 0:e.gas}):d3.nodeMessage.test(r)?new d3({cause:t,gas:e==null?void 0:e.gas}):h3.nodeMessage.test(r)?new h3({cause:t}):Yy.nodeMessage.test(r)?new Yy({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas,maxPriorityFeePerGas:e==null?void 0:e.maxPriorityFeePerGas}):new Qb({cause:t})}function fme(t,{docsPath:e,...r}){const n=(()=>{const i=C4(t,r);return i instanceof Qb?t:i})();return new ame(n,{docsPath:e,...r})}function S4(t,{format:e}){if(!e)return{};const r={};function n(s){const o=Object.keys(s);for(const a of o)a in t&&(r[a]=t[a]),s[a]&&typeof s[a]=="object"&&!Array.isArray(s[a])&&n(s[a])}const i=e(t||{});return n(i),r}const dme={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3"};function Jb(t){return{...t,gas:typeof t.gas<"u"?Me(t.gas):void 0,gasPrice:typeof t.gasPrice<"u"?Me(t.gasPrice):void 0,maxFeePerGas:typeof t.maxFeePerGas<"u"?Me(t.maxFeePerGas):void 0,maxPriorityFeePerGas:typeof t.maxPriorityFeePerGas<"u"?Me(t.maxPriorityFeePerGas):void 0,nonce:typeof t.nonce<"u"?Me(t.nonce):void 0,type:typeof t.type<"u"?dme[t.type]:void 0,value:typeof t.value<"u"?Me(t.value):void 0}}function $e(t,e,r){return n=>{var i;return((i=t[e.name||r])==null?void 0:i.call(t,n))??e(t,n)}}function hp(t){const{account:e,gasPrice:r,maxFeePerGas:n,maxPriorityFeePerGas:i,to:s}=t,o=e?$i(e):void 0;if(o&&!xa(o.address))throw new gd({address:o.address});if(s&&!xa(s))throw new gd({address:s});if(typeof r<"u"&&(typeof n<"u"||typeof i<"u"))throw new sme;if(n&&n>2n**256n-1n)throw new Ky({maxFeePerGas:n});if(i&&n&&i>n)throw new Yy({maxFeePerGas:n,maxPriorityFeePerGas:i})}async function C1(t){const e=await t.request({method:"eth_chainId"});return ya(e)}class hme extends ye{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}}class k4 extends ye{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}}class pme extends ye{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${oi(e)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}}class NF extends ye{constructor({blockHash:e,blockNumber:r}){let n="Block";e&&(n=`Block at hash "${e}"`),r&&(n=`Block at number "${r}"`),super(`${n} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}const DF={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844"};function LF(t){const e={...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,chainId:t.chainId?ya(t.chainId):void 0,gas:t.gas?BigInt(t.gas):void 0,gasPrice:t.gasPrice?BigInt(t.gasPrice):void 0,maxFeePerBlobGas:t.maxFeePerBlobGas?BigInt(t.maxFeePerBlobGas):void 0,maxFeePerGas:t.maxFeePerGas?BigInt(t.maxFeePerGas):void 0,maxPriorityFeePerGas:t.maxPriorityFeePerGas?BigInt(t.maxPriorityFeePerGas):void 0,nonce:t.nonce?ya(t.nonce):void 0,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,type:t.type?DF[t.type]:void 0,typeHex:t.type?t.type:void 0,value:t.value?BigInt(t.value):void 0,v:t.v?BigInt(t.v):void 0};return e.yParity=(()=>{if(t.yParity)return Number(t.yParity);if(typeof e.v=="bigint"){if(e.v===0n||e.v===27n)return 0;if(e.v===1n||e.v===28n)return 1;if(e.v>=35n)return e.v%2n===0n?1:0}})(),e.type==="legacy"&&(delete e.accessList,delete e.maxFeePerBlobGas,delete e.maxFeePerGas,delete e.maxPriorityFeePerGas,delete e.yParity),e.type==="eip2930"&&(delete e.maxFeePerBlobGas,delete e.maxFeePerGas,delete e.maxPriorityFeePerGas),e.type==="eip1559"&&delete e.maxFeePerBlobGas,e}function jF(t){var r;const e=(r=t.transactions)==null?void 0:r.map(n=>typeof n=="string"?n:LF(n));return{...t,baseFeePerGas:t.baseFeePerGas?BigInt(t.baseFeePerGas):null,blobGasUsed:t.blobGasUsed?BigInt(t.blobGasUsed):void 0,difficulty:t.difficulty?BigInt(t.difficulty):void 0,excessBlobGas:t.excessBlobGas?BigInt(t.excessBlobGas):void 0,gasLimit:t.gasLimit?BigInt(t.gasLimit):void 0,gasUsed:t.gasUsed?BigInt(t.gasUsed):void 0,hash:t.hash?t.hash:null,logsBloom:t.logsBloom?t.logsBloom:null,nonce:t.nonce?t.nonce:null,number:t.number?BigInt(t.number):null,size:t.size?BigInt(t.size):void 0,timestamp:t.timestamp?BigInt(t.timestamp):void 0,transactions:e,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}async function Hc(t,{blockHash:e,blockNumber:r,blockTag:n,includeTransactions:i}={}){var u,f,d;const s=n??"latest",o=i??!1,a=r!==void 0?Me(r):void 0;let c=null;if(e?c=await t.request({method:"eth_getBlockByHash",params:[e,o]}):c=await t.request({method:"eth_getBlockByNumber",params:[a||s,o]}),!c)throw new NF({blockHash:e,blockNumber:r});return(((d=(f=(u=t.chain)==null?void 0:u.formatters)==null?void 0:f.block)==null?void 0:d.format)||jF)(c)}async function A4(t){const e=await t.request({method:"eth_gasPrice"});return BigInt(e)}async function mme(t,e){return BF(t,e)}async function BF(t,e){var s,o,a;const{block:r,chain:n=t.chain,request:i}=e||{};if(typeof((s=n==null?void 0:n.fees)==null?void 0:s.defaultPriorityFee)=="function"){const c=r||await $e(t,Hc,"getBlock")({});return n.fees.defaultPriorityFee({block:c,client:t,request:i})}if(typeof((o=n==null?void 0:n.fees)==null?void 0:o.defaultPriorityFee)<"u")return(a=n==null?void 0:n.fees)==null?void 0:a.defaultPriorityFee;try{const c=await t.request({method:"eth_maxPriorityFeePerGas"});return up(c)}catch{const[c,l]=await Promise.all([r?Promise.resolve(r):$e(t,Hc,"getBlock")({}),$e(t,A4,"getGasPrice")({})]);if(typeof c.baseFeePerGas!="bigint")throw new k4;const u=l-c.baseFeePerGas;return u<0n?0n:u}}async function vme(t,e){return p3(t,e)}async function p3(t,e){var d,h;const{block:r,chain:n=t.chain,request:i,type:s="eip1559"}=e||{},o=await(async()=>{var p,m;return typeof((p=n==null?void 0:n.fees)==null?void 0:p.baseFeeMultiplier)=="function"?n.fees.baseFeeMultiplier({block:r,client:t,request:i}):((m=n==null?void 0:n.fees)==null?void 0:m.baseFeeMultiplier)??1.2})();if(o<1)throw new hme;const c=10**(((d=o.toString().split(".")[1])==null?void 0:d.length)??0),l=p=>p*BigInt(Math.ceil(o*c))/BigInt(c),u=r||await $e(t,Hc,"getBlock")({});if(typeof((h=n==null?void 0:n.fees)==null?void 0:h.estimateFeesPerGas)=="function")return n.fees.estimateFeesPerGas({block:r,client:t,multiply:l,request:i,type:s});if(s==="eip1559"){if(typeof u.baseFeePerGas!="bigint")throw new k4;const p=typeof(i==null?void 0:i.maxPriorityFeePerGas)=="bigint"?i.maxPriorityFeePerGas:await BF(t,{block:u,chain:n,request:i}),m=l(u.baseFeePerGas);return{maxFeePerGas:(i==null?void 0:i.maxFeePerGas)??m+p,maxPriorityFeePerGas:p}}return{gasPrice:(i==null?void 0:i.gasPrice)??l(await $e(t,A4,"getGasPrice")({}))}}class yme extends ye{constructor(e,{account:r,docsPath:n,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d}){var p;const h=dp({from:r==null?void 0:r.address,to:f,value:typeof d<"u"&&`${w4(d)} ${((p=i==null?void 0:i.nativeCurrency)==null?void 0:p.symbol)||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${oi(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${oi(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${oi(l)} gwei`,nonce:u});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}function gme(t,{docsPath:e,...r}){const n=(()=>{const i=C4(t,r);return i instanceof Qb?t:i})();return new yme(n,{docsPath:e,...r})}async function Xb(t,e){var i,s,o;const r=e.account??t.account,n=r?$i(r):void 0;try{const{accessList:a,blockNumber:c,blockTag:l,data:u,gas:f,gasPrice:d,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:m,to:v,value:y,...b}=(n==null?void 0:n.type)==="local"?await Zb(t,e):e,S=(c?Me(c):void 0)||l;hp(e);const P=(o=(s=(i=t.chain)==null?void 0:i.formatters)==null?void 0:s.transactionRequest)==null?void 0:o.format,L=(P||Jb)({...S4(b,{format:P}),from:n==null?void 0:n.address,accessList:a,data:u,gas:f,gasPrice:d,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:m,to:v,value:y}),j=await t.request({method:"eth_estimateGas",params:S?[L,S]:[L]});return BigInt(j)}catch(a){throw gme(a,{...e,account:n,chain:t.chain})}}async function FF(t,{address:e,blockTag:r="latest",blockNumber:n}){const i=await t.request({method:"eth_getTransactionCount",params:[e,n?Me(n):r]});return ya(i)}function bme(t){if(t.type)return t.type;if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")return"eip1559";if(typeof t.gasPrice<"u")return typeof t.accessList<"u"?"eip2930":"legacy";throw new ome({transaction:t})}async function Zb(t,e){const{account:r=t.account,chain:n,gas:i,nonce:s,parameters:o=["fees","gas","nonce","type"],type:a}=e,c=r?$i(r):void 0,l=await $e(t,Hc,"getBlock")({blockTag:"latest"}),u={...e,...c?{from:c==null?void 0:c.address}:{}};if(o.includes("nonce")&&typeof s>"u"&&c&&(u.nonce=await $e(t,FF,"getTransactionCount")({address:c.address,blockTag:"pending"})),(o.includes("fees")||o.includes("type"))&&typeof a>"u")try{u.type=bme(u)}catch{u.type=typeof l.baseFeePerGas=="bigint"?"eip1559":"legacy"}if(o.includes("fees"))if(u.type==="eip1559"){const{maxFeePerGas:f,maxPriorityFeePerGas:d}=await p3(t,{block:l,chain:n,request:u});if(typeof e.maxPriorityFeePerGas>"u"&&e.maxFeePerGas&&e.maxFeePerGas"u"&&(u.gas=await $e(t,Xb,"estimateGas")({...u,account:c?{address:c.address,type:"json-rpc"}:void 0})),hp(u),delete u.parameters,u}async function _4(t,{serializedTransaction:e}){return t.request({method:"eth_sendRawTransaction",params:[e]},{retryCount:0})}async function e2(t,e){var m,v,y,b;const{account:r=t.account,chain:n=t.chain,accessList:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d,...h}=e;if(!r)throw new Yb({docsPath:"/docs/actions/wallet/sendTransaction"});const p=$i(r);try{hp(e);let E;if(n!==null&&(E=await $e(t,C1,"getChainId")({}),OF({currentChainId:E,chain:n})),p.type==="local"){const L=await $e(t,Zb,"prepareTransactionRequest")({account:p,accessList:i,chain:n,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d,...h});E||(E=await $e(t,C1,"getChainId")({}));const j=(m=n==null?void 0:n.serializers)==null?void 0:m.transaction,H=await p.signTransaction({...L,chainId:E},{serializer:j});return await $e(t,_4,"sendRawTransaction")({serializedTransaction:H})}const S=(b=(y=(v=t.chain)==null?void 0:v.formatters)==null?void 0:y.transactionRequest)==null?void 0:b.format,R=(S||Jb)({...S4(h,{format:S}),accessList:i,data:s,from:p.address,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d});return await t.request({method:"eth_sendTransaction",params:[R]},{retryCount:0})}catch(E){throw fme(E,{...e,account:p,chain:e.chain||void 0})}}function xme(t,e){const{abi:r,args:n,bytecode:i,...s}=e,o=IF({abi:r,args:n,bytecode:i});return e2(t,{...s,data:o})}const m3=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],UF=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],zF=[...UF,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],wme=[...UF,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],d_=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],h_=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],Eme=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}];function p_(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function qF(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function m_(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 Cme(t,e){qF(t);const r=e.outputLen;if(t.length>v_&vm)}:{h:Number(t>>v_&vm)|0,l:Number(t&vm)|0}}function kme(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;it<>>32-r,_me=(t,e,r)=>e<>>32-r,Pme=(t,e,r)=>e<>>64-r,Ime=(t,e,r)=>t<>>64-r;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Tme=t=>t instanceof Uint8Array,Ome=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),Rme=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Rme)throw new Error("Non little-endian hardware is not supported");function $me(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function WF(t){if(typeof t=="string"&&(t=$me(t)),!Tme(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}class Mme{clone(){return this._cloneInto()}}function Nme(t){const e=n=>t().update(WF(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}const[HF,VF,GF]=[[],[],[]],Dme=BigInt(0),Ah=BigInt(1),Lme=BigInt(2),jme=BigInt(7),Bme=BigInt(256),Fme=BigInt(113);for(let t=0,e=Ah,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],HF.push(2*(5*n+r)),VF.push((t+1)*(t+2)/2%64);let i=Dme;for(let s=0;s<7;s++)e=(e<>jme)*Fme)%Bme,e&Lme&&(i^=Ah<<(Ah<r>32?Pme(t,e,r):Ame(t,e,r),g_=(t,e,r)=>r>32?Ime(t,e,r):_me(t,e,r);function qme(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],f=y_(l,u,1)^r[a],d=g_(l,u,1)^r[a+1];for(let h=0;h<50;h+=10)t[o+h]^=f,t[o+h+1]^=d}let i=t[2],s=t[3];for(let o=0;o<24;o++){const a=VF[o],c=y_(i,s,a),l=g_(i,s,a),u=HF[o];i=t[u],s=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=Ume[n],t[1]^=zme[n]}r.fill(0)}class P4 extends Mme{constructor(e,r,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,p_(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Ome(this.state)}keccak(){qme(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){m_(this);const{blockLen:r,state:n}=this;e=WF(e);const i=e.length;for(let s=0;s=n&&this.keccak();const o=Math.min(n-this.posOut,s-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return p_(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Cme(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new P4(r,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}}const Wme=(t,e,r)=>Nme(()=>new P4(e,t,r)),Hme=Wme(1,136,256/8);function ei(t,e){const r=e||"hex",n=Hme(Po(t,{strict:!1})?hu(t):t);return r==="bytes"?n:La(n)}function I4(t,e){const r=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),n=ei(na(r),"bytes"),i=(e?r.substring(`${e}0x`.length):r).split("");for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&i[s]&&(i[s]=i[s].toUpperCase()),(n[s>>1]&15)>=8&&i[s+1]&&(i[s+1]=i[s+1].toUpperCase());return`0x${i.join("")}`}function ti(t,e){if(!xa(t))throw new gd({address:t});return I4(t,e)}class b_ extends ye{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NegativeOffsetError"})}}class KF extends ye{constructor({length:e,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PositionOutOfBoundsError"})}}class Vme extends ye{constructor({count:e,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RecursiveReadLimitExceededError"})}}const Gme={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:1/0,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new Vme({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new KF({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new b_({offset:t});const e=this.position-t;this.assertPosition(e),this.position=e},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new b_({offset:t});const e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){const r=e??this.position;return this.assertPosition(r+t-1),this.bytes.subarray(r,r+t)},inspectUint8(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){const e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){const e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){const e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const t=this.inspectByte();return this.position++,t},readBytes(t,e){this.assertReadLimit(),this._touch();const r=this.inspectBytes(t);return this.position+=e??t,r},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},setPosition(t){const e=this.position;return this.assertPosition(t),this.position=t,()=>this.position=e},_touch(){if(this.recursiveReadLimit===1/0)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function Kme(t,{recursiveReadLimit:e=8192}={}){const r=Object.create(Gme);return r.bytes=t,r.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=e,r}function Yme(t,e={}){typeof e.size<"u"&&fs(t,{size:e.size});const r=Fs(t,e);return up(r,e)}function Qme(t,e={}){let r=t;if(typeof e.size<"u"&&(fs(r,{size:e.size}),r=Ic(r)),r.length>1||r[0]>1)throw new bpe(r);return!!r[0]}function ia(t,e={}){typeof e.size<"u"&&fs(t,{size:e.size});const r=Fs(t,e);return ya(r,e)}function Jme(t,e={}){let r=t;return typeof e.size<"u"&&(fs(r,{size:e.size}),r=Ic(r,{dir:"right"})),new TextDecoder().decode(r)}function t2(t,e){const r=typeof e=="string"?lp(e):e,n=Kme(r);if(Gr(r)===0&&t.length>0)throw new Gb;if(Gr(e)&&Gr(e)<32)throw new CF({data:typeof e=="string"?e:Fs(e),params:t,size:Gr(e)});let i=0;const s=[];for(let o=0;o48?Yme(i,{signed:r}):ia(i,{signed:r}),32]}function nve(t,e,{staticPosition:r}){const n=e.components.length===0||e.components.some(({name:o})=>!o),i=n?[]:{};let s=0;if(S1(e)){const o=ia(t.readBytes(v3)),a=r+o;for(let c=0;c(\[(\d*)\])*)$/;function y3(t){let e=t.type;if(w_.test(t.type)&&"components"in t){e="(";const r=t.components.length;for(let i=0;iei(hu(t));function cve(t){return ave(t)}function lve(t){let e=!0,r="",n=0,i="",s=!1;for(let o=0;o{const e=typeof t=="string"?t:ove(t);return lve(e)};function YF(t){return cve(uve(t))}const T4=YF,O4=t=>Gy(YF(t),0,4);function pp(t){const{abi:e,args:r=[],name:n}=t,i=Po(n,{strict:!1}),s=e.filter(a=>i?a.type==="function"?O4(a)===n:a.type==="event"?T4(a)===n:!1:"name"in a&&a.name===n);if(s.length===0)return;if(s.length===1)return s[0];let o;for(const a of s){if(!("inputs"in a))continue;if(!r||r.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==r.length)continue;if(r.every((l,u)=>{const f="inputs"in a&&a.inputs[u];return f?g3(l,f):!1})){if(o&&"inputs"in o&&o.inputs){const l=QF(a.inputs,o.inputs,r);if(l)throw new jpe({abiItem:a,type:l[0]},{abiItem:o,type:l[1]})}o=a}}return o||s[0]}function g3(t,e){const r=typeof t,n=e.type;switch(n){case"address":return xa(t);case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in e?Object.values(e.components).every((i,s)=>g3(Object.values(t)[s],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(t)&&t.every(i=>g3(i,{...e,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function QF(t,e,r){for(const n in t){const i=t[n],s=e[n];if(i.type==="tuple"&&s.type==="tuple"&&"components"in i&&"components"in s)return QF(i.components,s.components,r[n]);const o=[i.type,s.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")||o.includes("address")&&o.includes("bytes")?xa(r[n]):!1)return o}}const fw="/docs/contract/decodeFunctionResult";function Kd(t){const{abi:e,args:r,functionName:n,data:i}=t;let s=e[0];if(n){const a=pp({abi:e,args:r,name:n});if(!a)throw new Vy(n,{docsPath:fw});s=a}if(s.type!=="function")throw new Vy(void 0,{docsPath:fw});if(!s.outputs)throw new Lpe(s.name,{docsPath:fw});const o=t2(s.outputs,i);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}const E_="/docs/contract/encodeFunctionData";function ll(t){const{abi:e,args:r,functionName:n}=t;let i=e[0];if(n){const c=pp({abi:e,args:r,name:n});if(!c)throw new Vy(n,{docsPath:E_});i=c}if(i.type!=="function")throw new Vy(void 0,{docsPath:E_});const s=ga(i),o=O4(s),a="inputs"in i&&i.inputs?fp(i.inputs,r??[]):void 0;return y4([o,a??"0x"])}function Yd({blockNumber:t,chain:e,contract:r}){var i;const n=(i=e==null?void 0:e.contracts)==null?void 0:i[r];if(!n)throw new s3({chain:e,contract:{name:r}});if(t&&n.blockCreated&&n.blockCreated>t)throw new s3({blockNumber:t,chain:e,contract:{name:r,blockCreated:n.blockCreated}});return n.address}const JF={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},fve={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},dve={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function hve(t){const{abi:e,data:r}=t,n=Gy(r,0,4);if(n==="0x")throw new Gb;const s=[...e||[],fve,dve].find(o=>o.type==="error"&&n===O4(ga(o)));if(!s)throw new SF(n,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?t2(s.inputs,Gy(r,4)):void 0,errorName:s.name}}function XF({abiItem:t,args:e,includeFunctionName:r=!0,includeName:n=!1}){if("name"in t&&"inputs"in t&&t.inputs)return`${r?t.name:""}(${t.inputs.map((i,s)=>`${n&&i.name?`${i.name}: `:""}${typeof e[s]=="object"?ai(e[s]):e[s]}`).join(", ")})`}class pve extends ye{constructor({address:e}){super(`State for account "${e}" is set multiple times.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountStateConflictError"})}}class mve extends ye{constructor(){super("state and stateDiff are set on the same account."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"StateAssignmentConflictError"})}}function C_(t){return t.reduce((e,{slot:r,value:n})=>`${e} ${r}: ${n} -`,"")}function vve(t){return t.reduce((e,{address:r,...n})=>{let i=`${e} ${r}: -`;return n.nonce&&(i+=` nonce: ${n.nonce} -`),n.balance&&(i+=` balance: ${n.balance} -`),n.code&&(i+=` code: ${n.code} -`),n.state&&(i+=` state: -`,i+=C_(n.state)),n.stateDiff&&(i+=` stateDiff: -`,i+=C_(n.stateDiff)),i},` State Override: -`).slice(0,-1)}class ZF extends ye{constructor(e,{account:r,docsPath:n,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d,stateOverride:h}){var v;const p=r?$i(r):void 0;let m=dp({from:p==null?void 0:p.address,to:f,value:typeof d<"u"&&`${w4(d)} ${((v=i==null?void 0:i.nativeCurrency)==null?void 0:v.symbol)||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${oi(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${oi(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${oi(l)} gwei`,nonce:u});h&&(m+=` -${vve(h)}`),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",m].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}class yve extends ye{constructor(e,{abi:r,args:n,contractAddress:i,docsPath:s,functionName:o,sender:a}){const c=pp({abi:r,args:n,name:o}),l=c?XF({abiItem:c,args:n,includeFunctionName:!1,includeName:!1}):void 0,u=c?ga(c,{includeName:!0}):void 0,f=dp({address:i&&vpe(i),function:u,args:l&&l!=="()"&&`${[...Array((o==null?void 0:o.length)??0).keys()].map(()=>" ").join("")}${l}`,sender:a});super(e.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:e,docsPath:s,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",f].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=r,this.args=n,this.cause=e,this.contractAddress=i,this.functionName=o,this.sender=a}}class b3 extends ye{constructor({abi:e,data:r,functionName:n,message:i}){let s,o,a,c;if(r&&r!=="0x")try{o=hve({abi:e,data:r});const{abiItem:u,errorName:f,args:d}=o;if(f==="Error")c=d[0];else if(f==="Panic"){const[h]=d;c=JF[h]}else{const h=u?ga(u,{includeName:!0}):void 0,p=u&&d?XF({abiItem:u,args:d,includeFunctionName:!1,includeName:!1}):void 0;a=[h?`Error: ${h}`:"",p&&p!=="()"?` ${[...Array((f==null?void 0:f.length)??0).keys()].map(()=>" ").join("")}${p}`:""]}}catch(u){s=u}else i&&(c=i);let l;s instanceof SF&&(l=s.signature,a=[`Unable to decode signature "${l}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${l}.`]),super(c&&c!=="execution reverted"||l?[`The contract function "${n}" reverted with the following ${l?"signature":"reason"}:`,c||l].join(` -`):`The contract function "${n}" reverted.`,{cause:s,metaMessages:a}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=o,this.reason=c,this.signature=l}}class gve extends ye{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class R4 extends ye{constructor({data:e,message:r}){super(r||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}function $4(t,e){var n,i,s,o,a,c;if(!(t instanceof ye))return!1;const r=t.walk(l=>l instanceof b3);return r instanceof b3?!!(((n=r.data)==null?void 0:n.errorName)==="ResolverNotFound"||((i=r.data)==null?void 0:i.errorName)==="ResolverWildcardNotSupported"||((s=r.data)==null?void 0:s.errorName)==="ResolverNotContract"||((o=r.data)==null?void 0:o.errorName)==="ResolverError"||((a=r.data)==null?void 0:a.errorName)==="HttpError"||(c=r.reason)!=null&&c.includes("Wildcard on non-extended resolvers is not supported")||e==="reverse"&&r.reason===JF[50]):!1}function eU(t){if(t.length!==66||t.indexOf("[")!==0||t.indexOf("]")!==65)return null;const e=`0x${t.slice(1,65)}`;return Po(e)?e:null}function hv(t){let e=new Uint8Array(32).fill(0);if(!t)return Fs(e);const r=t.split(".");for(let n=r.length-1;n>=0;n-=1){const i=eU(r[n]),s=i?hu(i):ei(na(r[n]),"bytes");e=ei(ba([e,s]),"bytes")}return Fs(e)}function bve(t){return`[${t.slice(2)}]`}function xve(t){const e=new Uint8Array(32).fill(0);return t?eU(t)||ei(na(t)):Fs(e)}function r2(t){const e=t.replace(/^\.|\.$/gm,"");if(e.length===0)return new Uint8Array(1);const r=new Uint8Array(na(e).byteLength+2);let n=0;const i=e.split(".");for(let s=0;s255&&(o=na(bve(xve(i[s])))),r[n]=o.length,r.set(o,n+1),n+=o.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}const wve=3;function k1(t,{abi:e,address:r,args:n,docsPath:i,functionName:s,sender:o}){const{code:a,data:c,message:l,shortMessage:u}=t instanceof R4?t:t instanceof ye?t.walk(d=>"data"in d)||t.walk():{},f=t instanceof Gb?new gve({functionName:s}):[wve,pu.code].includes(a)&&(c||l||u)?new b3({abi:e,data:typeof c=="object"?c.data:c,functionName:s,message:u??l}):t;return new yve(f,{abi:e,args:n,contractAddress:r,docsPath:i,functionName:s,sender:o})}const Eve="modulepreload",Cve=function(t,e){return new URL(t,e).href},S_={},M4=function(e,r,n){let i=Promise.resolve();if(r&&r.length>0){const s=document.getElementsByTagName("link");i=Promise.all(r.map(o=>{if(o=Cve(o,n),o in S_)return;S_[o]=!0;const a=o.endsWith(".css"),c=a?'[rel="stylesheet"]':"";if(!!n)for(let f=s.length-1;f>=0;f--){const d=s[f];if(d.href===o&&(!a||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${c}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":Eve,a||(u.as="script",u.crossOrigin=""),u.href=o,document.head.appendChild(u),a)return new Promise((f,d)=>{u.addEventListener("load",f),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${o}`)))})}))}return i.then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})},Sve="0x82ad56cb";function kve(t,{docsPath:e,...r}){const n=(()=>{const i=C4(t,r);return i instanceof Qb?t:i})();return new ZF(n,{docsPath:e,...r})}const dw=new Map;function tU({fn:t,id:e,shouldSplitBatch:r,wait:n=0,sort:i}){const s=async()=>{const u=c();o();const f=u.map(({args:d})=>d);f.length!==0&&t(f).then(d=>{var h;i&&Array.isArray(d)&&d.sort(i);for(let p=0;p{var h;for(let p=0;pdw.delete(e),a=()=>c().map(({args:u})=>u),c=()=>dw.get(e)||[],l=u=>dw.set(e,[...c(),u]);return{flush:o,async schedule(u){const f={},d=new Promise((m,v)=>{f.resolve=m,f.reject=v});return(r==null?void 0:r([...a(),u]))&&s(),c().length>0?(l({args:u,pendingPromise:f}),d):(l({args:u,pendingPromise:f}),setTimeout(s,n),d)}}}async function n2(t,e){var b,E,S,P;const{account:r=t.account,batch:n=!!((b=t.batch)!=null&&b.multicall),blockNumber:i,blockTag:s="latest",accessList:o,data:a,gas:c,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:d,to:h,value:p,stateOverride:m,...v}=e,y=r?$i(r):void 0;try{hp(e);const L=(i?Me(i):void 0)||s,j=Tve(m),H=(P=(S=(E=t.chain)==null?void 0:E.formatters)==null?void 0:S.transactionRequest)==null?void 0:P.format,Y=(H||Jb)({...S4(v,{format:H}),from:y==null?void 0:y.address,accessList:o,data:a,gas:c,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:d,to:h,value:p});if(n&&Ave({request:Y})&&!j)try{return await _ve(t,{...Y,blockNumber:i,blockTag:s})}catch(F){if(!(F instanceof TF)&&!(F instanceof s3))throw F}const Q=await t.request({method:"eth_call",params:j?[Y,L,j]:[Y,L]});return Q==="0x"?{data:void 0}:{data:Q}}catch(R){const L=Pve(R),{offchainLookup:j,offchainLookupSignature:H}=await M4(()=>import("./ccip-BdSioHbo.js"),__vite__mapDeps([]),import.meta.url);if((L==null?void 0:L.slice(0,10))===H&&h)return{data:await j(t,{data:L,to:h})};throw kve(R,{...e,account:y,chain:t.chain})}}function Ave({request:t}){const{data:e,to:r,...n}=t;return!(!e||e.startsWith(Sve)||!r||Object.values(n).filter(i=>typeof i<"u").length>0)}async function _ve(t,e){var m;const{batchSize:r=1024,wait:n=0}=typeof((m=t.batch)==null?void 0:m.multicall)=="object"?t.batch.multicall:{},{blockNumber:i,blockTag:s="latest",data:o,multicallAddress:a,to:c}=e;let l=a;if(!l){if(!t.chain)throw new TF;l=Yd({blockNumber:i,chain:t.chain,contract:"multicall3"})}const f=(i?Me(i):void 0)||s,{schedule:d}=tU({id:`${t.uid}.${f}`,wait:n,shouldSplitBatch(v){return v.reduce((b,{data:E})=>b+(E.length-2),0)>r*2},fn:async v=>{const y=v.map(S=>({allowFailure:!0,callData:S.data,target:S.to})),b=ll({abi:m3,args:[y],functionName:"aggregate3"}),E=await t.request({method:"eth_call",params:[{data:b,to:l},f]});return Kd({abi:m3,args:[y],functionName:"aggregate3",data:E||"0x"})}}),[{returnData:h,success:p}]=await d({data:o,to:c});if(!p)throw new R4({data:h});return h==="0x"?{data:void 0}:{data:h}}function Pve(t){if(!(t instanceof ye))return;const e=t.walk();return typeof e.data=="object"?e.data.data:e.data}function k_(t){if(!(!t||t.length===0))return t.reduce((e,{slot:r,value:n})=>{if(r.length!==66)throw new o_({size:r.length,targetSize:66,type:"hex"});if(n.length!==66)throw new o_({size:n.length,targetSize:66,type:"hex"});return e[r]=n,e},{})}function Ive(t){const{balance:e,nonce:r,state:n,stateDiff:i,code:s}=t,o={};if(s!==void 0&&(o.code=s),e!==void 0&&(o.balance=Me(e,{size:32})),r!==void 0&&(o.nonce=Me(r,{size:8})),n!==void 0&&(o.state=k_(n)),i!==void 0){if(o.state)throw new mve;o.stateDiff=k_(i)}return o}function Tve(t){if(!t)return;const e={};for(const{address:r,...n}of t){if(!xa(r))throw new gd({address:r});if(e[r])throw new pve({address:r});e[r]=Ive(n)}return e}async function Vc(t,e){const{abi:r,address:n,args:i,functionName:s,...o}=e,a=ll({abi:r,args:i,functionName:s});try{const{data:c}=await $e(t,n2,"call")({...o,data:a,to:n});return Kd({abi:r,args:i,functionName:s,data:c||"0x"})}catch(c){throw k1(c,{abi:r,address:n,args:i,docsPath:"/docs/contract/readContract",functionName:s})}}async function Ove(t,{blockNumber:e,blockTag:r,coinType:n,name:i,gatewayUrls:s,strict:o,universalResolverAddress:a}){let c=a;if(!c){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");c=Yd({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const l=ll({abi:h_,functionName:"addr",...n!=null?{args:[hv(i),BigInt(n)]}:{args:[hv(i)]}}),u={address:c,abi:zF,functionName:"resolve",args:[La(r2(i)),l],blockNumber:e,blockTag:r},f=$e(t,Vc,"readContract"),d=s?await f({...u,args:[...u.args,s]}):await f(u);if(d[0]==="0x")return null;const h=Kd({abi:h_,args:n!=null?[hv(i),BigInt(n)]:void 0,functionName:"addr",data:d[0]});return h==="0x"||Ic(h)==="0x00"?null:h}catch(l){if(o)throw l;if($4(l,"resolve"))return null;throw l}}class Rve extends ye{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class Ph extends ye{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class N4 extends ye{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class $ve extends ye{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}const Mve=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,Nve=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,Dve=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,Lve=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function jve(t){try{const e=await fetch(t,{method:"HEAD"});if(e.status===200){const r=e.headers.get("content-type");return r==null?void 0:r.startsWith("image/")}return!1}catch(e){return typeof e=="object"&&typeof e.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(r=>{const n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=t})}}function A_(t,e){return t?t.endsWith("/")?t.slice(0,-1):t:e}function rU({uri:t,gatewayUrls:e}){const r=Dve.test(t);if(r)return{uri:t,isOnChain:!0,isEncoded:r};const n=A_(e==null?void 0:e.ipfs,"https://ipfs.io"),i=A_(e==null?void 0:e.arweave,"https://arweave.net"),s=t.match(Mve),{protocol:o,subpath:a,target:c,subtarget:l=""}=(s==null?void 0:s.groups)||{},u=o==="ipns:/"||a==="ipns/",f=o==="ipfs:/"||a==="ipfs/"||Nve.test(t);if(t.startsWith("http")&&!u&&!f){let h=t;return e!=null&&e.arweave&&(h=t.replace(/https:\/\/arweave.net/g,e==null?void 0:e.arweave)),{uri:h,isOnChain:!1,isEncoded:!1}}if((u||f)&&c)return{uri:`${n}/${u?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if(o==="ar:/"&&c)return{uri:`${i}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let d=t.replace(Lve,"");if(d.startsWith("i.json());return await D4({gatewayUrls:t,uri:nU(r)})}catch{throw new N4({uri:e})}}async function D4({gatewayUrls:t,uri:e}){const{uri:r,isOnChain:n}=rU({uri:e,gatewayUrls:t});if(n||await jve(r))return r;throw new N4({uri:e})}function Fve(t){let e=t;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[r,n,i]=e.split("/"),[s,o]=r.split(":"),[a,c]=n.split(":");if(!s||s.toLowerCase()!=="eip155")throw new Ph({reason:"Only EIP-155 supported"});if(!o)throw new Ph({reason:"Chain ID not found"});if(!c)throw new Ph({reason:"Contract address not found"});if(!i)throw new Ph({reason:"Token ID not found"});if(!a)throw new Ph({reason:"ERC namespace not found"});return{chainID:parseInt(o),namespace:a.toLowerCase(),contractAddress:c,tokenID:i}}async function Uve(t,{nft:e}){if(e.namespace==="erc721")return Vc(t,{address:e.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(e.tokenID)]});if(e.namespace==="erc1155")return Vc(t,{address:e.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(e.tokenID)]});throw new $ve({namespace:e.namespace})}async function zve(t,{gatewayUrls:e,record:r}){return/eip155:/i.test(r)?qve(t,{gatewayUrls:e,record:r}):D4({uri:r,gatewayUrls:e})}async function qve(t,{gatewayUrls:e,record:r}){const n=Fve(r),i=await Uve(t,{nft:n}),{uri:s,isOnChain:o,isEncoded:a}=rU({uri:i,gatewayUrls:e});if(o&&(s.includes("data:application/json;base64,")||s.startsWith("{"))){const l=a?atob(s.replace("data:application/json;base64,","")):s,u=JSON.parse(l);return D4({uri:nU(u),gatewayUrls:e})}let c=n.tokenID;return n.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),Bve({gatewayUrls:e,uri:s.replace(/(?:0x)?{id}/,c)})}async function iU(t,{blockNumber:e,blockTag:r,name:n,key:i,gatewayUrls:s,strict:o,universalResolverAddress:a}){let c=a;if(!c){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");c=Yd({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const l={address:c,abi:zF,functionName:"resolve",args:[La(r2(n)),ll({abi:d_,functionName:"text",args:[hv(n),i]})],blockNumber:e,blockTag:r},u=$e(t,Vc,"readContract"),f=s?await u({...l,args:[...l.args,s]}):await u(l);if(f[0]==="0x")return null;const d=Kd({abi:d_,functionName:"text",data:f[0]});return d===""?null:d}catch(l){if(o)throw l;if($4(l,"resolve"))return null;throw l}}async function Wve(t,{blockNumber:e,blockTag:r,assetGatewayUrls:n,name:i,gatewayUrls:s,strict:o,universalResolverAddress:a}){const c=await $e(t,iU,"getEnsText")({blockNumber:e,blockTag:r,key:"avatar",name:i,universalResolverAddress:a,gatewayUrls:s,strict:o});if(!c)return null;try{return await zve(t,{record:c,gatewayUrls:n})}catch{return null}}async function Hve(t,{address:e,blockNumber:r,blockTag:n,gatewayUrls:i,strict:s,universalResolverAddress:o}){let a=o;if(!a){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=Yd({blockNumber:r,chain:t.chain,contract:"ensUniversalResolver"})}const c=`${e.toLowerCase().substring(2)}.addr.reverse`;try{const l={address:a,abi:wme,functionName:"reverse",args:[La(r2(c))],blockNumber:r,blockTag:n},u=$e(t,Vc,"readContract"),[f,d]=i?await u({...l,args:[...l.args,i]}):await u(l);return e.toLowerCase()!==d.toLowerCase()?null:f}catch(l){if(s)throw l;if($4(l,"reverse"))return null;throw l}}async function Vve(t,{blockNumber:e,blockTag:r,name:n,universalResolverAddress:i}){let s=i;if(!s){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");s=Yd({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}const[o]=await $e(t,Vc,"readContract")({address:s,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[La(r2(n))],blockNumber:e,blockTag:r});return o}function i2(t,{method:e}){var n,i;const r={};return t.transport.type==="fallback"&&((i=(n=t.transport).onResponse)==null||i.call(n,({method:s,response:o,status:a,transport:c})=>{a==="success"&&e===s&&(r[o]=c.request)})),s=>r[s]||t.request}async function Gve(t){const e=i2(t,{method:"eth_newBlockFilter"}),r=await t.request({method:"eth_newBlockFilter"});return{id:r,request:e(r),type:"block"}}class Kve extends ye{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}const __="/docs/contract/encodeEventTopics";function mp(t){var c;const{abi:e,eventName:r,args:n}=t;let i=e[0];if(r){const l=pp({abi:e,name:r});if(!l)throw new u_(r,{docsPath:__});i=l}if(i.type!=="event")throw new u_(void 0,{docsPath:__});const s=ga(i),o=T4(s);let a=[];if(n&&"inputs"in i){const l=(c=i.inputs)==null?void 0:c.filter(f=>"indexed"in f&&f.indexed),u=Array.isArray(n)?n:Object.values(n).length>0?(l==null?void 0:l.map(f=>n[f.name]))??[]:[];u.length>0&&(a=(l==null?void 0:l.map((f,d)=>Array.isArray(u[d])?u[d].map((h,p)=>P_({param:f,value:u[d][p]})):u[d]?P_({param:f,value:u[d]}):null))??[])}return[o,...a]}function P_({param:t,value:e}){if(t.type==="string"||t.type==="bytes")return ei(hu(e));if(t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/))throw new Kve(t.type);return fp([t],[e])}async function sU(t,e){const{address:r,abi:n,args:i,eventName:s,fromBlock:o,strict:a,toBlock:c}=e,l=i2(t,{method:"eth_newFilter"}),u=s?mp({abi:n,args:i,eventName:s}):void 0,f=await t.request({method:"eth_newFilter",params:[{address:r,fromBlock:typeof o=="bigint"?Me(o):o,toBlock:typeof c=="bigint"?Me(c):c,topics:u}]});return{abi:n,args:i,eventName:s,id:f,request:l(f),strict:!!a,type:"event"}}async function oU(t,{address:e,args:r,event:n,events:i,fromBlock:s,strict:o,toBlock:a}={}){const c=i??(n?[n]:void 0),l=i2(t,{method:"eth_newFilter"});let u=[];c&&(u=[c.flatMap(d=>mp({abi:[d],eventName:d.name,args:r}))],n&&(u=u[0]));const f=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof s=="bigint"?Me(s):s,toBlock:typeof a=="bigint"?Me(a):a,...u.length?{topics:u}:{}}]});return{abi:c,args:r,eventName:n?n.name:void 0,fromBlock:s,id:f,request:l(f),strict:!!o,toBlock:a,type:"event"}}async function aU(t){const e=i2(t,{method:"eth_newPendingTransactionFilter"}),r=await t.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:e(r),type:"transaction"}}async function Yve(t,e){const{abi:r,address:n,args:i,functionName:s,...o}=e,a=ll({abi:r,args:i,functionName:s});try{return await $e(t,Xb,"estimateGas")({data:a,to:n,...o})}catch(c){const l=o.account?$i(o.account):void 0;throw k1(c,{abi:r,address:n,args:i,docsPath:"/docs/contract/estimateContractGas",functionName:s,sender:l==null?void 0:l.address})}}async function Qve(t,{address:e,blockNumber:r,blockTag:n="latest"}){const i=r?Me(r):void 0,s=await t.request({method:"eth_getBalance",params:[e,i||n]});return BigInt(s)}const Jve=new Map,Xve=new Map;function Zve(t){const e=(i,s)=>({clear:()=>s.delete(i),get:()=>s.get(i),set:o=>s.set(i,o)}),r=e(t,Jve),n=e(t,Xve);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function eye(t,{cacheKey:e,cacheTime:r=1/0}){const n=Zve(e),i=n.response.get();if(i&&r>0&&new Date().getTime()-i.created.getTime()`blockNumber.${t}`;async function vp(t,{cacheTime:e=t.cacheTime}={}){const r=await eye(()=>t.request({method:"eth_blockNumber"}),{cacheKey:tye(t.uid),cacheTime:e});return BigInt(r)}async function rye(t,{blockHash:e,blockNumber:r,blockTag:n="latest"}={}){const i=r!==void 0?Me(r):void 0;let s;return e?s=await t.request({method:"eth_getBlockTransactionCountByHash",params:[e]}):s=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[i||n]}),ya(s)}async function nye(t,{address:e,blockNumber:r,blockTag:n="latest"}){const i=r!==void 0?Me(r):void 0,s=await t.request({method:"eth_getCode",params:[e,i||n]});if(s!=="0x")return s}const I_="/docs/contract/decodeEventLog";function L4(t){const{abi:e,data:r,strict:n,topics:i}=t,s=n??!0,[o,...a]=i;if(!o)throw new Dpe({docsPath:I_});const c=e.find(m=>m.type==="event"&&o===T4(ga(m)));if(!(c&&"name"in c)||c.type!=="event")throw new kF(o,{docsPath:I_});const{name:l,inputs:u}=c,f=u==null?void 0:u.some(m=>!("name"in m&&m.name));let d=f?[]:{};const h=u.filter(m=>"indexed"in m&&m.indexed);for(let m=0;m!("indexed"in m&&m.indexed));if(p.length>0){if(r&&r!=="0x")try{const m=t2(p,r);if(m)if(f)d=[...d,...m];else for(let v=0;v0?d:void 0}}function iye({param:t,value:e}){return t.type==="string"||t.type==="bytes"||t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/)?e:(t2([t],e)||[])[0]}async function cU(t,e){const{abi:r,address:n,args:i,dataSuffix:s,functionName:o,...a}=e,c=a.account?$i(a.account):t.account,l=ll({abi:r,args:i,functionName:o});try{const{data:u}=await $e(t,n2,"call")({batch:!1,data:`${l}${s?s.replace("0x",""):""}`,to:n,...a,account:c}),f=Kd({abi:r,args:i,functionName:o,data:u||"0x"}),d=r.filter(h=>"name"in h&&h.name===e.functionName);return{result:f,request:{abi:d,address:n,args:i,dataSuffix:s,functionName:o,...a,account:c}}}catch(u){throw k1(u,{abi:r,address:n,args:i,docsPath:"/docs/contract/simulateContract",functionName:o,sender:c==null?void 0:c.address})}}function Gc(t,{args:e,eventName:r}={}){return{...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,logIndex:t.logIndex?Number(t.logIndex):null,transactionHash:t.transactionHash?t.transactionHash:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,...r?{args:e,eventName:r}:{}}}const hw=new Map,T_=new Map;let sye=0;function Qd(t,e,r){const n=++sye,i=()=>hw.get(t)||[],s=()=>{const u=i();hw.set(t,u.filter(f=>f.id!==n))},o=()=>{const u=T_.get(t);i().length===1&&u&&u(),s()},a=i();if(hw.set(t,[...a,{id:n,fns:e}]),a&&a.length>0)return o;const c={};for(const u in e)c[u]=(...f)=>{var h,p;const d=i();if(d.length!==0)for(const m of d)(p=(h=m.fns)[u])==null||p.call(h,...f)};const l=r(c);return typeof l=="function"&&T_.set(t,l),o}async function x3(t){return new Promise(e=>setTimeout(e,t))}function yp(t,{emitOnBegin:e,initialWaitTime:r,interval:n}){let i=!0;const s=()=>i=!1;return(async()=>{let a;e&&(a=await t({unpoll:s}));const c=await(r==null?void 0:r(a))??n;await x3(c);const l=async()=>{i&&(await t({unpoll:s}),await x3(n),l())};l()})(),s}async function s2(t,{filter:e}){const r="strict"in e&&e.strict,n=await e.request({method:"eth_getFilterChanges",params:[e.id]});if(typeof n[0]=="string")return n;const i=n.map(s=>Gc(s));return!("abi"in e)||!e.abi?i:B4({abi:e.abi,logs:i,strict:r})}async function o2(t,{filter:e}){return e.request({method:"eth_uninstallFilter",params:[e.id]})}function oye(t,e){const{abi:r,address:n,args:i,batch:s=!0,eventName:o,onError:a,onLogs:c,poll:l,pollingInterval:u=t.pollingInterval,strict:f}=e;return(typeof l<"u"?l:t.transport.type!=="webSocket")?(()=>{const m=ai(["watchContractEvent",n,i,s,t.uid,o,u]),v=f??!1;return Qd(m,{onLogs:c,onError:a},y=>{let b,E,S=!1;const P=yp(async()=>{var R;if(!S){try{E=await $e(t,sU,"createContractEventFilter")({abi:r,address:n,args:i,eventName:o,strict:v})}catch{}S=!0;return}try{let L;if(E)L=await $e(t,s2,"getFilterChanges")({filter:E});else{const j=await $e(t,vp,"getBlockNumber")({});b&&b!==j?L=await $e(t,CU,"getContractEvents")({abi:r,address:n,args:i,eventName:o,fromBlock:b+1n,toBlock:j,strict:v}):L=[],b=j}if(L.length===0)return;if(s)y.onLogs(L);else for(const j of L)y.onLogs([j])}catch(L){E&&L instanceof mu&&(S=!1),(R=y.onError)==null||R.call(y,L)}},{emitOnBegin:!0,interval:u});return async()=>{E&&await $e(t,o2,"uninstallFilter")({filter:E}),P()}})})():(()=>{let m=!0,v=()=>m=!1;return(async()=>{try{const y=o?mp({abi:r,eventName:o,args:i}):[],{unsubscribe:b}=await t.transport.subscribe({params:["logs",{address:n,topics:y}],onData(E){var P;if(!m)return;const S=E.result;try{const{eventName:R,args:L}=L4({abi:r,data:S.data,topics:S.topics,strict:f}),j=Gc(S,{args:L,eventName:R});c([j])}catch(R){let L,j;if(R instanceof u1||R instanceof Kb){if(f)return;L=R.abiItem.name,j=(P=R.abiItem.inputs)==null?void 0:P.some(K=>!("name"in K&&K.name))}const H=Gc(S,{args:j?[]:{},eventName:L});c([H])}},onError(E){a==null||a(E)}});v=b,m||v()}catch(y){a==null||a(y)}})(),v})()}async function lU(t,e){const{abi:r,address:n,args:i,dataSuffix:s,functionName:o,...a}=e,c=ll({abi:r,args:i,functionName:o});return $e(t,e2,"sendTransaction")({data:`${c}${s?s.replace("0x",""):""}`,to:n,...a})}const w3=256;let ym=w3,gm;function aye(t=11){if(!gm||ym+t>w3*2){gm="",ym=0;for(let e=0;e{const y=v(m);for(const E in h)delete y[E];const b={...m,...y};return Object.assign(b,{extend:p(b)})}}return Object.assign(h,{extend:p(h)})}function Qy(t,{delay:e=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((i,s)=>{const o=async({count:a=0}={})=>{const c=async({error:l})=>{const u=typeof e=="function"?e({count:a,error:l}):e;u&&await x3(u),o({count:a+1})};try{const l=await t();i(l)}catch(l){if(a{const{retryDelay:i=150,retryCount:s=3}={...e,...n};return Qy(async()=>{try{return await t(r)}catch(o){const a=o;switch(a.code){case f1.code:throw new f1(a);case d1.code:throw new d1(a);case h1.code:throw new h1(a);case p1.code:throw new p1(a);case pu.code:throw new pu(a);case mu.code:throw new mu(a);case m1.code:throw new m1(a);case Tc.code:throw new Tc(a);case v1.code:throw new v1(a);case y1.code:throw new y1(a);case bd.code:throw new bd(a);case g1.code:throw new g1(a);case Mt.code:throw new Mt(a);case b1.code:throw new b1(a);case x1.code:throw new x1(a);case w1.code:throw new w1(a);case E1.code:throw new E1(a);case os.code:throw new os(a);case 5e3:throw new Mt(a);default:throw o instanceof ye?o:new ume(a)}}},{delay:({count:o,error:a})=>{var c;if(a&&a instanceof x0){const l=(c=a==null?void 0:a.headers)==null?void 0:c.get("Retry-After");if(l!=null&&l.match(/\d/))return parseInt(l)*1e3}return~~(1<lye(o)})}}function lye(t){return"code"in t&&typeof t.code=="number"?t.code===-1||t.code===bd.code||t.code===pu.code:t instanceof x0&&t.status?t.status===403||t.status===408||t.status===413||t.status===429||t.status===500||t.status===502||t.status===503||t.status===504:!0}function fU({key:t,name:e,request:r,retryCount:n=3,retryDelay:i=150,timeout:s,type:o},a){return{config:{key:t,name:e,request:r,retryCount:n,retryDelay:i,timeout:s,type:o},request:cye(r,{retryCount:n,retryDelay:i}),value:a}}function dU(t,e={}){const{key:r="custom",name:n="Custom Provider",retryDelay:i}=e;return({retryCount:s})=>fU({key:r,name:n,request:t.request.bind(t),retryCount:e.retryCount??s,retryDelay:i,type:"custom"})}class uye extends ye{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}function hU(t,{errorInstance:e=new Error("timed out"),timeout:r,signal:n}){return new Promise((i,s)=>{(async()=>{let o;try{const a=new AbortController;r>0&&(o=setTimeout(()=>{n?a.abort():s(e)},r)),i(await t({signal:a==null?void 0:a.signal}))}catch(a){a.name==="AbortError"&&s(e),s(a)}finally{clearTimeout(o)}})()})}function fye(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const O_=fye();function pU(t,e={}){return{async request(r){var l;const{body:n,fetchOptions:i={},timeout:s=e.timeout??1e4}=r,{headers:o,method:a,signal:c}={...e.fetchOptions,...i};try{const u=await hU(async({signal:d})=>await fetch(t,{...i,body:Array.isArray(n)?ai(n.map(p=>({jsonrpc:"2.0",id:p.id??O_.take(),...p}))):ai({jsonrpc:"2.0",id:n.id??O_.take(),...n}),headers:{...o,"Content-Type":"application/json"},method:a||"POST",signal:c||(s>0?d:void 0)}),{errorInstance:new f_({body:n,url:t}),timeout:s,signal:!0});let f;if((l=u.headers.get("Content-Type"))!=null&&l.startsWith("application/json")?f=await u.json():f=await u.text(),!u.ok)throw new x0({body:n,details:ai(f.error)||u.statusText,headers:u.headers,status:u.status,url:t});return f}catch(u){throw u instanceof x0||u instanceof f_?u:new x0({body:n,details:u.message,url:t})}}}}function dye(t,e={}){const{batch:r,fetchOptions:n,key:i="http",name:s="HTTP JSON-RPC",retryDelay:o}=e;return({chain:a,retryCount:c,timeout:l})=>{const{batchSize:u=1e3,wait:f=0}=typeof r=="object"?r:{},d=e.retryCount??c,h=l??e.timeout??1e4,p=t||(a==null?void 0:a.rpcUrls.default.http[0]);if(!p)throw new uye;const m=pU(p,{fetchOptions:n,timeout:h});return fU({key:i,name:s,async request({method:v,params:y}){const b={method:v,params:y},{schedule:E}=tU({id:`${t}`,wait:f,shouldSplitBatch(L){return L.length>u},fn:L=>m.request({body:L}),sort:(L,j)=>L.id-j.id}),S=async L=>r?E(L):[await m.request({body:L})],[{error:P,result:R}]=await S(b);if(P)throw new E4({body:b,error:P,url:p});return R},retryCount:d,retryDelay:o,timeout:h,type:"http"},{fetchOptions:n,url:p})}}function hye(t){var e;return{baseFeePerGas:t.baseFeePerGas.map(r=>BigInt(r)),gasUsedRatio:t.gasUsedRatio,oldestBlock:BigInt(t.oldestBlock),reward:(e=t.reward)==null?void 0:e.map(r=>r.map(n=>BigInt(n)))}}async function pye(t,{blockCount:e,blockNumber:r,blockTag:n="latest",rewardPercentiles:i}){const s=r?Me(r):void 0,o=await t.request({method:"eth_feeHistory",params:[Me(e),s||n,i]});return hye(o)}async function mye(t,{filter:e}){const r=e.strict??!1,i=(await e.request({method:"eth_getFilterLogs",params:[e.id]})).map(s=>Gc(s));return e.abi?B4({abi:e.abi,logs:i,strict:r}):i}function a2(t){return{formatters:void 0,fees:void 0,serializers:void 0,...t}}const vye=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,yye=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function gye(t,{body:e,onError:r,onResponse:n}){return t.request({body:e,onError:r,onResponse:n}),t}async function bye(t,{body:e,timeout:r=1e4}){return t.requestAsync({body:e,timeout:r})}const xye={http(t,e){return pU(t).request(e)},webSocket:gye,webSocketAsync:bye};function wye(t){const{domain:e={},message:r,primaryType:n}=t,i={EIP712Domain:xU({domain:e}),...t.types};bU({domain:e,message:r,primaryType:n,types:i});const s=["0x1901"];return e&&s.push(Eye({domain:e,types:i})),n!=="EIP712Domain"&&s.push(mU({data:r,primaryType:n,types:i})),ei(ba(s))}function Eye({domain:t,types:e}){return mU({data:t,primaryType:"EIP712Domain",types:e})}function mU({data:t,primaryType:e,types:r}){const n=vU({data:t,primaryType:e,types:r});return ei(n)}function vU({data:t,primaryType:e,types:r}){const n=[{type:"bytes32"}],i=[Cye({primaryType:e,types:r})];for(const s of r[e]){const[o,a]=gU({types:r,name:s.name,type:s.type,value:t[s.name]});n.push(o),i.push(a)}return fp(n,i)}function Cye({primaryType:t,types:e}){const r=La(Sye({primaryType:t,types:e}));return ei(r)}function Sye({primaryType:t,types:e}){let r="";const n=yU({primaryType:t,types:e});n.delete(t);const i=[t,...Array.from(n).sort()];for(const s of i)r+=`${s}(${e[s].map(({name:o,type:a})=>`${a} ${o}`).join(",")})`;return r}function yU({primaryType:t,types:e},r=new Set){const n=t.match(/^\w*/u),i=n==null?void 0:n[0];if(r.has(i)||e[i]===void 0)return r;r.add(i);for(const s of e[i])yU({primaryType:s.type,types:e},r);return r}function gU({types:t,name:e,type:r,value:n}){if(t[r]!==void 0)return[{type:"bytes32"},ei(vU({data:n,primaryType:r,types:t}))];if(r==="bytes")return n=`0x${(n.length%2?"0":"")+n.slice(2)}`,[{type:"bytes32"},ei(n)];if(r==="string")return[{type:"bytes32"},ei(La(n))];if(r.lastIndexOf("]")===r.length-1){const i=r.slice(0,r.lastIndexOf("[")),s=n.map(o=>gU({name:e,type:i,types:t,value:o}));return[{type:"bytes32"},ei(fp(s.map(([o])=>o),s.map(([,o])=>o)))]}return[{type:r},n]}function bU(t){const{domain:e,message:r,primaryType:n,types:i}=t,s=(o,a)=>{for(const c of o){const{name:l,type:u}=c,f=a[l],d=u.match(yye);if(d&&(typeof f=="number"||typeof f=="bigint")){const[m,v,y]=d;Me(f,{signed:v==="int",size:parseInt(y)/8})}if(u==="address"&&typeof f=="string"&&!xa(f))throw new gd({address:f});const h=u.match(vye);if(h){const[m,v]=h;if(v&&Gr(f)!==parseInt(v))throw new Bpe({expectedSize:parseInt(v),givenSize:Gr(f)})}const p=i[u];p&&s(p,f)}};if(i.EIP712Domain&&e&&s(i.EIP712Domain,e),n!=="EIP712Domain"){const o=i[n];s(o,r)}}function xU({domain:t}){return[typeof(t==null?void 0:t.name)=="string"&&{name:"name",type:"string"},(t==null?void 0:t.version)&&{name:"version",type:"string"},typeof(t==null?void 0:t.chainId)=="number"&&{name:"chainId",type:"uint256"},(t==null?void 0:t.verifyingContract)&&{name:"verifyingContract",type:"address"},(t==null?void 0:t.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}const kye={"0x0":"reverted","0x1":"success"};function Aye(t){const e={...t,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,contractAddress:t.contractAddress?t.contractAddress:null,cumulativeGasUsed:t.cumulativeGasUsed?BigInt(t.cumulativeGasUsed):null,effectiveGasPrice:t.effectiveGasPrice?BigInt(t.effectiveGasPrice):null,gasUsed:t.gasUsed?BigInt(t.gasUsed):null,logs:t.logs?t.logs.map(r=>Gc(r)):null,to:t.to?t.to:null,transactionIndex:t.transactionIndex?ya(t.transactionIndex):null,status:t.status?kye[t.status]:null,type:t.type?DF[t.type]||t.type:null};return t.blobGasPrice&&(e.blobGasPrice=BigInt(t.blobGasPrice)),t.blobGasUsed&&(e.blobGasUsed=BigInt(t.blobGasUsed)),e}const _ye=`Ethereum Signed Message: -`;function Pye(t,e){const r=typeof t=="string"?na(t):t.raw instanceof Uint8Array?t.raw:hu(t.raw),n=na(`${_ye}${r.length}`);return ei(ba([n,r]),e)}function Iye(t){return t.map(e=>({...e,value:BigInt(e.value)}))}function Tye(t){return{...t,balance:t.balance?BigInt(t.balance):void 0,nonce:t.nonce?ya(t.nonce):void 0,storageProof:t.storageProof?Iye(t.storageProof):void 0}}async function Oye(t,{address:e,blockNumber:r,blockTag:n,storageKeys:i}){const s=n??"latest",o=r!==void 0?Me(r):void 0,a=await t.request({method:"eth_getProof",params:[e,i,o||s]});return Tye(a)}async function Rye(t,{address:e,blockNumber:r,blockTag:n="latest",slot:i}){const s=r!==void 0?Me(r):void 0;return await t.request({method:"eth_getStorageAt",params:[e,i,s||n]})}async function j4(t,{blockHash:e,blockNumber:r,blockTag:n,hash:i,index:s}){var u,f,d;const o=n||"latest",a=r!==void 0?Me(r):void 0;let c=null;if(i?c=await t.request({method:"eth_getTransactionByHash",params:[i]}):e?c=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[e,Me(s)]}):(a||o)&&(c=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||o,Me(s)]})),!c)throw new $F({blockHash:e,blockNumber:r,blockTag:o,hash:i,index:s});return(((d=(f=(u=t.chain)==null?void 0:u.formatters)==null?void 0:f.transaction)==null?void 0:d.format)||LF)(c)}async function $ye(t,{hash:e,transactionReceipt:r}){const[n,i]=await Promise.all([$e(t,vp,"getBlockNumber")({}),e?$e(t,j4,"getBlockNumber")({hash:e}):void 0]),s=(r==null?void 0:r.blockNumber)||(i==null?void 0:i.blockNumber);return s?n-s+1n:0n}async function E3(t,{hash:e}){var i,s,o;const r=await t.request({method:"eth_getTransactionReceipt",params:[e]});if(!r)throw new MF({hash:e});return(((o=(s=(i=t.chain)==null?void 0:i.formatters)==null?void 0:s.transactionReceipt)==null?void 0:o.format)||Aye)(r)}async function Mye(t,e){var v;const{allowFailure:r=!0,batchSize:n,blockNumber:i,blockTag:s,multicallAddress:o,stateOverride:a}=e,c=e.contracts,l=n??(typeof((v=t.batch)==null?void 0:v.multicall)=="object"&&t.batch.multicall.batchSize||1024);let u=o;if(!u){if(!t.chain)throw new Error("client chain not configured. multicallAddress is required.");u=Yd({blockNumber:i,chain:t.chain,contract:"multicall3"})}const f=[[]];let d=0,h=0;for(let y=0;y0&&h>l&&f[d].length>0&&(d++,h=(R.length-2)/2,f[d]=[]),f[d]=[...f[d],{allowFailure:!0,callData:R,target:E}]}catch(R){const L=k1(R,{abi:b,address:E,args:S,docsPath:"/docs/contract/multicall",functionName:P});if(!r)throw L;f[d]=[...f[d],{allowFailure:!0,callData:"0x",target:E}]}}const p=await Promise.allSettled(f.map(y=>$e(t,Vc,"readContract")({abi:m3,address:u,args:[y],blockNumber:i,blockTag:s,functionName:"aggregate3",stateOverride:a}))),m=[];for(let y=0;y{const f=ai(["watchBlockNumber",t.uid,e,r,o]);return Qd(f,{onBlockNumber:n,onError:i},d=>yp(async()=>{var h;try{const p=await $e(t,vp,"getBlockNumber")({cacheTime:0});if(c){if(p===c)return;if(p-c>1&&r)for(let m=c+1n;mc)&&(d.onBlockNumber(p,c),c=p)}catch(p){(h=d.onError)==null||h.call(d,p)}},{emitOnBegin:e,interval:o}))})():(()=>{let f=!0,d=()=>f=!1;return(async()=>{try{const{unsubscribe:h}=await t.transport.subscribe({params:["newHeads"],onData(p){var v;if(!f)return;const m=up((v=p.result)==null?void 0:v.number);n(m,c),c=m},onError(p){i==null||i(p)}});d=h,f||d()}catch(h){i==null||i(h)}})(),d})()}async function Fye(t,{confirmations:e=1,hash:r,onReplaced:n,pollingInterval:i=t.pollingInterval,retryCount:s=6,retryDelay:o=({count:c})=>~~(1<{a&&setTimeout(()=>p(new cme({hash:r})),a);const m=Qd(c,{onReplaced:n,resolve:h,reject:p},v=>{const y=$e(t,EU,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:i,async onBlockNumber(b){if(d)return;let E=b;const S=P=>{y(),P(),m()};try{if(f){if(e>1&&(!f.blockNumber||E-f.blockNumber+1nv.resolve(f));return}if(l||(d=!0,await Qy(async()=>{l=await $e(t,j4,"getTransaction")({hash:r}),l.blockNumber&&(E=l.blockNumber)},{delay:o,retryCount:s}),d=!1),f=await $e(t,E3,"getTransactionReceipt")({hash:r}),e>1&&(!f.blockNumber||E-f.blockNumber+1nv.resolve(f))}catch(P){if(P instanceof $F||P instanceof MF){if(!l){d=!1;return}try{u=l,d=!0;const R=await Qy(()=>$e(t,Hc,"getBlock")({blockNumber:E,includeTransactions:!0}),{delay:o,retryCount:s,shouldRetry:({error:H})=>H instanceof NF});d=!1;const L=R.transactions.find(({from:H,nonce:K})=>H===u.from&&K===u.nonce);if(!L||(f=await $e(t,E3,"getTransactionReceipt")({hash:L.hash}),e>1&&(!f.blockNumber||E-f.blockNumber+1n{var H;(H=v.onReplaced)==null||H.call(v,{reason:j,replacedTransaction:u,transaction:L,transactionReceipt:f}),v.resolve(f)})}catch(R){S(()=>v.reject(R))}}else S(()=>v.reject(P))}}})})})}function Uye(t,{blockTag:e="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:i,onError:s,includeTransactions:o,poll:a,pollingInterval:c=t.pollingInterval}){const l=typeof a<"u"?a:t.transport.type!=="webSocket",u=o??!1;let f;return l?(()=>{const p=ai(["watchBlocks",t.uid,r,n,u,c]);return Qd(p,{onBlock:i,onError:s},m=>yp(async()=>{var v;try{const y=await $e(t,Hc,"getBlock")({blockTag:e,includeTransactions:u});if(y.number&&(f!=null&&f.number)){if(y.number===f.number)return;if(y.number-f.number>1&&r)for(let b=(f==null?void 0:f.number)+1n;bf.number)&&(m.onBlock(y,f),f=y)}catch(y){(v=m.onError)==null||v.call(m,y)}},{emitOnBegin:n,interval:c}))})():(()=>{let p=!0,m=()=>p=!1;return(async()=>{try{const{unsubscribe:v}=await t.transport.subscribe({params:["newHeads"],onData(y){var S,P,R;if(!p)return;const E=(((R=(P=(S=t.chain)==null?void 0:S.formatters)==null?void 0:P.block)==null?void 0:R.format)||jF)(y.result);i(E,f),f=E},onError(y){s==null||s(y)}});m=v,p||m()}catch(v){s==null||s(v)}})(),m})()}function zye(t,{address:e,args:r,batch:n=!0,event:i,events:s,onError:o,onLogs:a,poll:c,pollingInterval:l=t.pollingInterval,strict:u}){const f=typeof c<"u"?c:t.transport.type!=="webSocket",d=u??!1;return f?(()=>{const m=ai(["watchEvent",e,r,n,t.uid,i,l]);return Qd(m,{onLogs:a,onError:o},v=>{let y,b,E=!1;const S=yp(async()=>{var P;if(!E){try{b=await $e(t,oU,"createEventFilter")({address:e,args:r,event:i,events:s,strict:d})}catch{}E=!0;return}try{let R;if(b)R=await $e(t,s2,"getFilterChanges")({filter:b});else{const L=await $e(t,vp,"getBlockNumber")({});y&&y!==L?R=await $e(t,F4,"getLogs")({address:e,args:r,event:i,events:s,fromBlock:y+1n,toBlock:L}):R=[],y=L}if(R.length===0)return;if(n)v.onLogs(R);else for(const L of R)v.onLogs([L])}catch(R){b&&R instanceof mu&&(E=!1),(P=v.onError)==null||P.call(v,R)}},{emitOnBegin:!0,interval:l});return async()=>{b&&await $e(t,o2,"uninstallFilter")({filter:b}),S()}})})():(()=>{let m=!0,v=()=>m=!1;return(async()=>{try{const y=s??(i?[i]:void 0);let b=[];y&&(b=[y.flatMap(S=>mp({abi:[S],eventName:S.name,args:r}))],i&&(b=b[0]));const{unsubscribe:E}=await t.transport.subscribe({params:["logs",{address:e,topics:b}],onData(S){var R;if(!m)return;const P=S.result;try{const{eventName:L,args:j}=L4({abi:y??[],data:P.data,topics:P.topics,strict:d}),H=Gc(P,{args:j,eventName:L});a([H])}catch(L){let j,H;if(L instanceof u1||L instanceof Kb){if(u)return;j=L.abiItem.name,H=(R=L.abiItem.inputs)==null?void 0:R.some(Y=>!("name"in Y&&Y.name))}const K=Gc(P,{args:H?[]:{},eventName:j});a([K])}},onError(S){o==null||o(S)}});v=E,m||v()}catch(y){o==null||o(y)}})(),v})()}function qye(t,{batch:e=!0,onError:r,onTransactions:n,poll:i,pollingInterval:s=t.pollingInterval}){return(typeof i<"u"?i:t.transport.type!=="webSocket")?(()=>{const l=ai(["watchPendingTransactions",t.uid,e,s]);return Qd(l,{onTransactions:n,onError:r},u=>{let f;const d=yp(async()=>{var h;try{if(!f)try{f=await $e(t,aU,"createPendingTransactionFilter")({});return}catch(m){throw d(),m}const p=await $e(t,s2,"getFilterChanges")({filter:f});if(p.length===0)return;if(e)u.onTransactions(p);else for(const m of p)u.onTransactions([m])}catch(p){(h=u.onError)==null||h.call(u,p)}},{emitOnBegin:!0,interval:s});return async()=>{f&&await $e(t,o2,"uninstallFilter")({filter:f}),d()}})})():(()=>{let l=!0,u=()=>l=!1;return(async()=>{try{const{unsubscribe:f}=await t.transport.subscribe({params:["newPendingTransactions"],onData(d){if(!l)return;const h=d.result;n([h])},onError(d){r==null||r(d)}});u=f,l||u()}catch(f){r==null||r(f)}})(),u})()}function Wye(t){return{call:e=>n2(t,e),createBlockFilter:()=>Gve(t),createContractEventFilter:e=>sU(t,e),createEventFilter:e=>oU(t,e),createPendingTransactionFilter:()=>aU(t),estimateContractGas:e=>Yve(t,e),estimateGas:e=>Xb(t,e),getBalance:e=>Qve(t,e),getBlock:e=>Hc(t,e),getBlockNumber:e=>vp(t,e),getBlockTransactionCount:e=>rye(t,e),getBytecode:e=>nye(t,e),getChainId:()=>C1(t),getContractEvents:e=>CU(t,e),getEnsAddress:e=>Ove(t,e),getEnsAvatar:e=>Wve(t,e),getEnsName:e=>Hve(t,e),getEnsResolver:e=>Vve(t,e),getEnsText:e=>iU(t,e),getFeeHistory:e=>pye(t,e),estimateFeesPerGas:e=>vme(t,e),getFilterChanges:e=>s2(t,e),getFilterLogs:e=>mye(t,e),getGasPrice:()=>A4(t),getLogs:e=>F4(t,e),getProof:e=>Oye(t,e),estimateMaxPriorityFeePerGas:e=>mme(t,e),getStorageAt:e=>Rye(t,e),getTransaction:e=>j4(t,e),getTransactionConfirmations:e=>$ye(t,e),getTransactionCount:e=>FF(t,e),getTransactionReceipt:e=>E3(t,e),multicall:e=>Mye(t,e),prepareTransactionRequest:e=>Zb(t,e),readContract:e=>Vc(t,e),sendRawTransaction:e=>_4(t,e),simulateContract:e=>cU(t,e),verifyMessage:e=>jye(t,e),verifyTypedData:e=>Bye(t,e),uninstallFilter:e=>o2(t,e),waitForTransactionReceipt:e=>Fye(t,e),watchBlocks:e=>Uye(t,e),watchBlockNumber:e=>EU(t,e),watchContractEvent:e=>oye(t,e),watchEvent:e=>zye(t,e),watchPendingTransactions:e=>qye(t,e)}}async function Hye(t){var r;return((r=t.account)==null?void 0:r.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"})).map(n=>I4(n))}async function Vye(t){return await t.request({method:"wallet_getPermissions"})}async function Gye(t){return(await t.request({method:"eth_requestAccounts"},{retryCount:0})).map(r=>ti(r))}async function Kye(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}async function Yye(t,{account:e=t.account,message:r}){if(!e)throw new Yb({docsPath:"/docs/actions/wallet/signMessage"});const n=$i(e);if(n.type==="local")return n.signMessage({message:r});const i=typeof r=="string"?v4(r):r.raw instanceof Uint8Array?La(r.raw):r.raw;return t.request({method:"personal_sign",params:[i,n.address]},{retryCount:0})}async function Qye(t,e){var l,u,f,d;const{account:r=t.account,chain:n=t.chain,...i}=e;if(!r)throw new Yb({docsPath:"/docs/actions/wallet/signTransaction"});const s=$i(r);hp({account:s,...e});const o=await $e(t,C1,"getChainId")({});n!==null&&OF({currentChainId:o,chain:n});const a=(n==null?void 0:n.formatters)||((l=t.chain)==null?void 0:l.formatters),c=((u=a==null?void 0:a.transactionRequest)==null?void 0:u.format)||Jb;return s.type==="local"?s.signTransaction({...i,chainId:o},{serializer:(d=(f=t.chain)==null?void 0:f.serializers)==null?void 0:d.transaction}):await t.request({method:"eth_signTransaction",params:[{...c(i),chainId:Me(o),from:s.address}]},{retryCount:0})}async function Jye(t,e){const{account:r=t.account,domain:n,message:i,primaryType:s}=e;if(!r)throw new Yb({docsPath:"/docs/actions/wallet/signTypedData"});const o=$i(r),a={EIP712Domain:xU({domain:n}),...e.types};if(bU({domain:n,message:i,primaryType:s,types:a}),o.type==="local")return o.signTypedData({domain:n,message:i,primaryType:s,types:a});const c=ai({domain:n??{},message:i,primaryType:s,types:a},(l,u)=>Po(u)?u.toLowerCase():u);return t.request({method:"eth_signTypedData_v4",params:[o.address,c]},{retryCount:0})}async function Xye(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:Me(e)}]},{retryCount:0})}async function Zye(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}function R_(t){return{addChain:e=>Tpe(t,e),deployContract:e=>xme(t,e),getAddresses:()=>Hye(t),getChainId:()=>C1(t),getPermissions:()=>Vye(t),prepareTransactionRequest:e=>Zb(t,e),requestAddresses:()=>Gye(t),requestPermissions:e=>Kye(t,e),sendRawTransaction:e=>_4(t,e),sendTransaction:e=>e2(t,e),signMessage:e=>Yye(t,e),signTransaction:e=>Qye(t,e),signTypedData:e=>Jye(t,e),switchChain:e=>Xye(t,e),watchAsset:e=>Zye(t,e),writeContract:e=>lU(t,e)}}function B4({abi:t,eventName:e,logs:r,strict:n=!0}){return r.map(i=>{var s;try{const o=L4({...i,abi:t,strict:n});return e&&!e.includes(o.eventName)?null:{...o,...i}}catch(o){let a,c;if(o instanceof kF)return null;if(o instanceof u1||o instanceof Kb){if(n)return null;a=o.abiItem.name,c=(s=o.abiItem.inputs)==null?void 0:s.some(l=>!("name"in l&&l.name))}return{...i,args:c?[]:{},eventName:a}}}).filter(Boolean)}async function F4(t,{address:e,blockHash:r,fromBlock:n,toBlock:i,event:s,events:o,args:a,strict:c}={}){const l=c??!1,u=o??(s?[s]:void 0);let f=[];u&&(f=[u.flatMap(p=>mp({abi:[p],eventName:p.name,args:a}))],s&&(f=f[0]));let d;r?d=await t.request({method:"eth_getLogs",params:[{address:e,topics:f,blockHash:r}]}):d=await t.request({method:"eth_getLogs",params:[{address:e,topics:f,fromBlock:typeof n=="bigint"?Me(n):n,toBlock:typeof i=="bigint"?Me(i):i}]});const h=d.map(p=>Gc(p));return u?B4({abi:u,logs:h,strict:l}):h}async function CU(t,e){const{abi:r,address:n,args:i,blockHash:s,eventName:o,fromBlock:a,toBlock:c,strict:l}=e,u=o?pp({abi:r,name:o}):void 0,f=u?void 0:r.filter(d=>d.type==="event");return $e(t,F4,"getLogs")({address:n,args:i,blockHash:s,event:u,events:f,fromBlock:a,toBlock:c,strict:l})}function ege(t){const e=r=>t(r.detail);return window.addEventListener("eip6963:announceProvider",e),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",e)}function tge(){const t=new Set;let e=[];const r=()=>ege(i=>{e.some(({info:s})=>s.uuid===i.info.uuid)||(e=[...e,i],t.forEach(s=>s(e,{added:[i]})))});let n=r();return{_listeners(){return t},clear(){t.forEach(i=>i([],{removed:[...e]})),e=[]},destroy(){this.clear(),t.clear(),n()},findProvider({rdns:i}){return e.find(s=>s.info.rdns===i)},getProviders(){return e},reset(){this.clear(),n(),n=r()},subscribe(i,{emitImmediately:s}={}){return t.add(i),s&&i(e,{added:e}),()=>t.delete(i)}}}var rge={BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const nge=t=>(e,r,n)=>{const i=n.subscribe;return n.subscribe=(o,a,c)=>{let l=o;if(a){const u=(c==null?void 0:c.equalityFn)||Object.is;let f=o(n.getState());l=d=>{const h=o(d);if(!u(f,h)){const p=f;a(f=h,p)}},c!=null&&c.fireImmediately&&a(f,f)}return i(l)},t(e,r,n)},ige=nge;function sge(t,e){let r;try{r=t()}catch{return}return{getItem:i=>{var s;const o=c=>c===null?null:JSON.parse(c,e==null?void 0:e.reviver),a=(s=r.getItem(i))!=null?s:null;return a instanceof Promise?a.then(o):o(a)},setItem:(i,s)=>r.setItem(i,JSON.stringify(s,e==null?void 0:e.replacer)),removeItem:i=>r.removeItem(i)}}const A1=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(n){return A1(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return A1(n)(r)}}}},oge=(t,e)=>(r,n,i)=>{let s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:v=>v,version:0,merge:(v,y)=>({...y,...v}),...e},o=!1;const a=new Set,c=new Set;let l;try{l=s.getStorage()}catch{}if(!l)return t((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...v)},n,i);const u=A1(s.serialize),f=()=>{const v=s.partialize({...n()});let y;const b=u({state:v,version:s.version}).then(E=>l.setItem(s.name,E)).catch(E=>{y=E});if(y)throw y;return b},d=i.setState;i.setState=(v,y)=>{d(v,y),f()};const h=t((...v)=>{r(...v),f()},n,i);let p;const m=()=>{var v;if(!l)return;o=!1,a.forEach(b=>b(n()));const y=((v=s.onRehydrateStorage)==null?void 0:v.call(s,n()))||void 0;return A1(l.getItem.bind(l))(s.name).then(b=>{if(b)return s.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==s.version){if(s.migrate)return s.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var E;return p=s.merge(b,(E=n())!=null?E:h),r(p,!0),f()}).then(()=>{y==null||y(p,void 0),o=!0,c.forEach(b=>b(p))}).catch(b=>{y==null||y(void 0,b)})};return i.persist={setOptions:v=>{s={...s,...v},v.getStorage&&(l=v.getStorage())},clearStorage:()=>{l==null||l.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:v=>(a.add(v),()=>{a.delete(v)}),onFinishHydration:v=>(c.add(v),()=>{c.delete(v)})},m(),p||h},age=(t,e)=>(r,n,i)=>{let s={storage:sge(()=>localStorage),partialize:m=>m,version:0,merge:(m,v)=>({...v,...m}),...e},o=!1;const a=new Set,c=new Set;let l=s.storage;if(!l)return t((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...m)},n,i);const u=()=>{const m=s.partialize({...n()});return l.setItem(s.name,{state:m,version:s.version})},f=i.setState;i.setState=(m,v)=>{f(m,v),u()};const d=t((...m)=>{r(...m),u()},n,i);let h;const p=()=>{var m,v;if(!l)return;o=!1,a.forEach(b=>{var E;return b((E=n())!=null?E:d)});const y=((v=s.onRehydrateStorage)==null?void 0:v.call(s,(m=n())!=null?m:d))||void 0;return A1(l.getItem.bind(l))(s.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==s.version){if(s.migrate)return s.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var E;return h=s.merge(b,(E=n())!=null?E:d),r(h,!0),u()}).then(()=>{y==null||y(h,void 0),h=n(),o=!0,c.forEach(b=>b(h))}).catch(b=>{y==null||y(void 0,b)})};return i.persist={setOptions:m=>{s={...s,...m},m.storage&&(l=m.storage)},clearStorage:()=>{l==null||l.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>p(),hasHydrated:()=>o,onHydrate:m=>(a.add(m),()=>{a.delete(m)}),onFinishHydration:m=>(c.add(m),()=>{c.delete(m)})},s.skipHydration||p(),h||d},cge=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((rge?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),oge(t,e)):age(t,e),lge=cge;var uge={BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const $_=t=>{let e;const r=new Set,n=(c,l)=>{const u=typeof c=="function"?c(e):c;if(!Object.is(u,e)){const f=e;e=l??typeof u!="object"?u:Object.assign({},e,u),r.forEach(d=>d(e,f))}},i=()=>e,a={setState:n,getState:i,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{(uge?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return e=t(n,i,a),a},pw=t=>t?$_(t):$_;var SU={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,l,u){this.fn=c,this.context=l,this.once=u||!1}function s(c,l,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new i(u,f||c,d),p=r?r+l:l;return c._events[p]?c._events[p].fn?c._events[p]=[c._events[p],h]:c._events[p].push(h):(c._events[p]=h,c._eventsCount++),c}function o(c,l){--c._eventsCount===0?c._events=new n:delete c._events[l]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],u,f;if(this._eventsCount===0)return l;for(f in u=this._events)e.call(u,f)&&l.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(u)):l},a.prototype.listeners=function(l){var u=r?r+l:l,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,p=new Array(h);d{let i=n;return(i==null?void 0:i.__type)==="bigint"&&(i=BigInt(i.value)),(i==null?void 0:i.__type)==="Map"&&(i=new Map(i.value)),(e==null?void 0:e(r,i))??i})}function M_(t,e){return t.slice(0,e).join(".")||"."}function N_(t,e){const{length:r}=t;for(let n=0;n{let o=s;return typeof o=="bigint"&&(o={__type:"bigint",value:s.toString()}),o instanceof Map&&(o={__type:"Map",value:Array.from(s.entries())}),(e==null?void 0:e(i,o))??o},n),r??void 0)}function gge(t){const{deserialize:e=mge,key:r="wagmi",serialize:n=yge,storage:i=kU}=t;function s(o){return o instanceof Promise?o.then(a=>a).catch(()=>null):o}return{...i,key:r,async getItem(o,a){const c=i.getItem(`${r}.${o}`),l=await s(c);return l?e(l)??null:a??null},async setItem(o,a){const c=`${r}.${o}`;a===null?await s(i.removeItem(c)):await s(i.setItem(c,n(a)))},async removeItem(o){await s(i.removeItem(`${r}.${o}`))}}}const kU={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};const pv="2.6.5",bge=()=>`@wagmi/core@${pv}`;var AU=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Jy,_U;let Tu=class C3 extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return bge()}constructor(e,r={}){var s;super(),Jy.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const n=r.cause instanceof C3?r.cause.details:(s=r.cause)!=null&&s.message?r.cause.message:r.details,i=r.cause instanceof C3&&r.cause.docsPath||r.docsPath;this.message=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: ${this.docsBaseUrl}${i}.html${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(` -`),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.shortMessage=e}walk(e){return AU(this,Jy,"m",_U).call(this,this,e)}};Jy=new WeakSet,_U=function t(e,r){return r!=null&&r(e)?e:e.cause?AU(this,Jy,"m",t).call(this,e.cause,r):e};class vu extends Tu{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class xge extends Tu{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class PU extends Tu{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class wge extends Tu{constructor({address:e,connector:r}){super(`Account "${e}" not found for connector "${r.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class Pl extends Tu{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class Ege extends Tu{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}function Oc(t){if(typeof t=="string")return Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10);if(typeof t=="bigint")return Number(t);if(typeof t=="number")return t;throw new Error(`Cannot normalize chainId "${t}" of type "${typeof t}"`)}const Cge={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(t){return t!=null&&t.coinbaseWalletExtension?t.coinbaseWalletExtension:mv(t,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(t){return mv(t,e=>{if(!e.isMetaMask||e.isBraveWallet&&!e._events&&!e._state)return!1;const r=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPortal","isRabby","isTokenPocket","isTokenary","isZerion"];for(const n of r)if(e[n])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(t){var e,r;return(e=t==null?void 0:t.phantom)!=null&&e.ethereum?(r=t.phantom)==null?void 0:r.ethereum:mv(t,"isPhantom")}}};c2.type="injected";function c2(t={}){const{shimDisconnect:e=!0,unstable_shimAsyncInject:r}=t;function n(){const i=t.target;if(typeof i=="function"){const s=i();if(s)return s}return typeof i=="object"?i:typeof i=="string"?{...Cge[i]??{id:i,name:`${i[0].toUpperCase()}${i.slice(1)}`,provider:`is${i[0].toUpperCase()}${i.slice(1)}`}}:{id:"injected",name:"Injected",provider(s){return s==null?void 0:s.ethereum}}}return i=>({get icon(){return n().icon},get id(){return n().id},get name(){return n().name},type:c2.type,async setup(){const s=await this.getProvider();s&&t.target&&s.on("connect",this.onConnect.bind(this))},async connect({chainId:s,isReconnecting:o}={}){var l,u,f,d,h,p;const a=await this.getProvider();if(!a)throw new Pl;let c=null;if(!o&&(c=await this.getAccounts().catch(()=>null),!!(c!=null&&c.length)))try{c=(d=(f=(u=(l=(await a.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0])==null?void 0:l.caveats)==null?void 0:u[0])==null?void 0:f.value)==null?void 0:d.map(y=>ti(y))}catch(v){const y=v;if(y.code===Mt.code)throw new Mt(y);if(y.code===Tc.code)throw y}try{c!=null&&c.length||(c=(await a.request({method:"eth_requestAccounts"})).map(y=>ti(y))),a.removeListener("connect",this.onConnect.bind(this)),a.on("accountsChanged",this.onAccountsChanged.bind(this)),a.on("chainChanged",this.onChainChanged),a.on("disconnect",this.onDisconnect.bind(this));let m=await this.getChainId();if(s&&m!==s){const v=await this.switchChain({chainId:s}).catch(y=>{if(y.code===Mt.code)throw y;return{id:m}});m=(v==null?void 0:v.id)??m}return e&&(await((h=i.storage)==null?void 0:h.removeItem(`${this.id}.disconnected`)),t.target||await((p=i.storage)==null?void 0:p.setItem("injected.connected",!0))),{accounts:c,chainId:m}}catch(m){const v=m;throw v.code===Mt.code?new Mt(v):v.code===Tc.code?new Tc(v):v}},async disconnect(){var o,a;const s=await this.getProvider();if(!s)throw new Pl;s.removeListener("accountsChanged",this.onAccountsChanged.bind(this)),s.removeListener("chainChanged",this.onChainChanged),s.removeListener("disconnect",this.onDisconnect.bind(this)),s.on("connect",this.onConnect.bind(this)),e&&(await((o=i.storage)==null?void 0:o.setItem(`${this.id}.disconnected`,!0)),t.target||await((a=i.storage)==null?void 0:a.removeItem("injected.connected")))},async getAccounts(){const s=await this.getProvider();if(!s)throw new Pl;return(await s.request({method:"eth_accounts"})).map(a=>ti(a))},async getChainId(){const s=await this.getProvider();if(!s)throw new Pl;const o=await s.request({method:"eth_chainId"});return Oc(o)},async getProvider(){if(typeof window>"u")return;let s;const o=n();return typeof o.provider=="function"?s=o.provider(window):typeof o.provider=="string"?s=mv(window,o.provider):s=o.provider,s&&!s.removeListener&&("off"in s&&typeof s.off=="function"?s.removeListener=s.off:s.removeListener=()=>{}),s},async isAuthorized(){var s,o;try{if(e&&await((s=i.storage)==null?void 0:s.getItem(`${this.id}.disconnected`))||!t.target&&!await((o=i.storage)==null?void 0:o.getItem("injected.connected")))return!1;if(!await this.getProvider()){if(r!==void 0&&r!==!1){const u=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",u),!!await this.getProvider()),f=typeof r=="number"?r:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(h=>window.addEventListener("ethereum#initialized",()=>h(u()),{once:!0}))]:[],new Promise(h=>setTimeout(()=>h(u()),f))]))return!0}throw new Pl}return!!(await Qy(()=>hU(()=>this.getAccounts(),{timeout:100}))).length}catch{return!1}},async switchChain({chainId:s}){var c,l,u;const o=await this.getProvider();if(!o)throw new Pl;const a=i.chains.find(f=>f.id===s);if(!a)throw new os(new vu);try{return await Promise.all([o.request({method:"wallet_switchEthereumChain",params:[{chainId:Me(s)}]}),new Promise(f=>i.emitter.once("change",({chainId:d})=>{d===s&&f()}))]),a}catch(f){const d=f;if(d.code===4902||((l=(c=d==null?void 0:d.data)==null?void 0:c.originalError)==null?void 0:l.code)===4902)try{const{default:h,...p}=a.blockExplorers??{};let m=[];if(h&&(m=[h.url,...Object.values(p).map(y=>y.url)]),await o.request({method:"wallet_addEthereumChain",params:[{chainId:Me(s),chainName:a.name,nativeCurrency:a.nativeCurrency,rpcUrls:[((u=a.rpcUrls.default)==null?void 0:u.http[0])??""],blockExplorerUrls:m}]}),await this.getChainId()!==s)throw new Mt(new Error("User rejected switch after adding network."));return a}catch(h){throw new Mt(h)}throw d.code===Mt.code?new Mt(d):new os(d)}},async onAccountsChanged(s){var o;if(s.length===0)this.onDisconnect();else if(i.emitter.listenerCount("connect")){const a=(await this.getChainId()).toString();this.onConnect({chainId:a}),e&&await((o=i.storage)==null?void 0:o.removeItem(`${this.id}.disconnected`))}else i.emitter.emit("change",{accounts:s.map(a=>ti(a))})},onChainChanged(s){const o=Oc(s);i.emitter.emit("change",{chainId:o})},async onConnect(s){const o=await this.getAccounts();if(o.length===0)return;const a=Oc(s.chainId);i.emitter.emit("connect",{accounts:o,chainId:a});const c=await this.getProvider();c&&(c.removeListener("connect",this.onConnect.bind(this)),c.on("accountsChanged",this.onAccountsChanged.bind(this)),c.on("chainChanged",this.onChainChanged),c.on("disconnect",this.onDisconnect.bind(this)))},async onDisconnect(s){const o=await this.getProvider();s&&s.code===1013&&o&&(await this.getAccounts()).length||(i.emitter.emit("disconnect"),o&&(o.removeListener("accountsChanged",this.onAccountsChanged.bind(this)),o.removeListener("chainChanged",this.onChainChanged),o.removeListener("disconnect",this.onDisconnect.bind(this)),o.on("connect",this.onConnect.bind(this))))}})}function mv(t,e){function r(i){return typeof e=="function"?e(i):typeof e=="string"?i[e]:!0}const n=t.ethereum;if(n!=null&&n.providers)return n.providers.find(i=>r(i));if(n&&r(n))return n}const S3=256;let bm=S3,xm;function Sge(t=11){if(!xm||bm+t>S3*2){xm="",bm=0;for(let e=0;es.chains),c=pw(()=>[...s.connectors??[],...i?[]:(o==null?void 0:o.getProviders().map(u))??[]].map(l));function l(S){var L;const P=pge(Sge()),R={...S({emitter:P,chains:a.getState(),storage:r}),emitter:P,uid:P.uid};return P.on("connect",b),(L=R.setup)==null||L.call(R),R}function u(S){const{info:P}=S,R=S.provider;return c2({target:{...P,id:P.rdns,provider:R}})}const f=new Map;function d(S={}){const P=S.chainId??v.getState().chainId,R=a.getState().find(j=>j.id===P);if(S.chainId&&!R)throw new vu;{const j=f.get(v.getState().chainId);if(j&&!R)return j;if(!R)throw new vu}{const j=f.get(P);if(j)return j}let L;if(s.client)L=s.client({chain:R});else{const j=R.id,H=a.getState().map(Q=>Q.id),K={},Y=Object.entries(s);for(const[Q,F]of Y)if(!(Q==="chains"||Q==="client"||Q==="connectors"||Q==="transports"))if(typeof F=="object")if(j in F)K[Q]=F[j];else{if(H.some(k=>k in F))continue;K[Q]=F}else K[Q]=F;L=uU({...K,chain:R,batch:K.batch??{multicall:!0},transport:Q=>s.transports[j]({...Q,connectors:c})})}return f.set(P,L),L}function h(){return{chainId:a.getState()[0].id,connections:new Map,current:void 0,status:"disconnected"}}let p;const m="0.0.0-canary-";pv.startsWith(m)?p=parseInt(pv.replace(m,"")):p=parseInt(pv.split(".")[0]??"0");const v=pw(ige(r?lge(h,{migrate(S,P){if(P===p)return S;const R=h(),L=S&&typeof S=="object"&&"chainId"in S&&typeof S.chainId=="number"?S.chainId:R.chainId;return{...R,chainId:L}},name:"store",partialize(S){return{connections:{__type:"Map",value:Array.from(S.connections.entries()).map(([P,R])=>{const{id:L,name:j,type:H,uid:K}=R.connector;return[P,{...R,connector:{id:L,name:j,type:H,uid:K}}]})},chainId:S.chainId,current:S.current}},skipHydration:i,storage:r,version:p}):h));n&&v.subscribe(({connections:S,current:P})=>{var R;return P?(R=S.get(P))==null?void 0:R.chainId:void 0},S=>{if(a.getState().some(R=>R.id===S))return v.setState(R=>({...R,chainId:S??R.chainId}))}),o==null||o.subscribe(S=>{const P=new Map;for(const L of c.getState())P.set(L.id,!0);const R=[];for(const L of S){const j=l(u(L));P.has(j.id)||R.push(j)}c.setState(L=>[...L,...R],!0)});function y(S){v.setState(P=>{const R=P.connections.get(S.uid);return R?{...P,connections:new Map(P.connections).set(S.uid,{accounts:S.accounts??R.accounts,chainId:S.chainId??R.chainId,connector:R.connector})}:P})}function b(S){v.getState().status==="connecting"||v.getState().status==="reconnecting"||v.setState(P=>{const R=c.getState().find(L=>L.uid===S.uid);return R?{...P,connections:new Map(P.connections).set(S.uid,{accounts:S.accounts,chainId:S.chainId,connector:R}),current:S.uid,status:"connected"}:P})}function E(S){v.setState(P=>{const R=P.connections.get(S.uid);if(R&&(R.connector.emitter.off("change",y),R.connector.emitter.off("disconnect",E),R.connector.emitter.on("connect",b)),P.connections.delete(S.uid),P.connections.size===0)return{...P,connections:new Map,current:void 0,status:"disconnected"};const L=P.connections.values().next().value;return{...P,connections:new Map(P.connections),current:L.connector.uid}})}return{get chains(){return a.getState()},get connectors(){return c.getState()},storage:r,getClient:d,get state(){return v.getState()},setState(S){let P;typeof S=="function"?P=S(v.getState()):P=S;const R=h();typeof P!="object"&&(P=R),Object.keys(R).some(j=>!(j in P))&&(P=R),v.setState(P,!0)},subscribe(S,P,R){return v.subscribe(S,P,R?{...R,fireImmediately:R.emitImmediately}:void 0)},_internal:{mipd:o,store:v,ssr:!!i,syncConnectedChain:n,transports:s.transports,chains:{setState(S){const P=typeof S=="function"?S(a.getState()):S;if(P.length!==0)return a.setState(P,!0)},subscribe(S){return a.subscribe(S)}},connectors:{providerDetailToConnector:u,setup:l,setState(S){return c.setState(typeof S=="function"?S(c.getState()):S,!0)},subscribe(S){return c.subscribe(S)}},events:{change:y,connect:b,disconnect:E}}}}function Xy(t,e,r){const n=t[e.name??r];return typeof n=="function"?n:i=>e(t,i)}async function Age(t,e){var n;let r;if(typeof e.connector=="function"?r=t._internal.connectors.setup(e.connector):r=e.connector,r.uid===t.state.current)throw new xge;try{t.setState(o=>({...o,status:"connecting"})),r.emitter.emit("message",{type:"connecting"});const i=await r.connect({chainId:e.chainId}),s=i.accounts;return r.emitter.off("connect",t._internal.events.connect),r.emitter.on("change",t._internal.events.change),r.emitter.on("disconnect",t._internal.events.disconnect),await((n=t.storage)==null?void 0:n.setItem("recentConnectorId",r.id)),t.setState(o=>({...o,connections:new Map(o.connections).set(r.uid,{accounts:s,chainId:i.chainId,connector:r}),current:r.uid,status:"connected"})),{accounts:s,chainId:i.chainId}}catch(i){throw t.setState(s=>({...s,status:s.current?"connected":"disconnected"})),i}}async function _ge(t,e={}){var i,s;let r;if(e.connector)r=e.connector;else{const{connections:o,current:a}=t.state,c=o.get(a);r=c==null?void 0:c.connector}const n=t.state.connections;r&&(await r.disconnect(),r.emitter.off("change",t._internal.events.change),r.emitter.off("disconnect",t._internal.events.disconnect),r.emitter.on("connect",t._internal.events.connect),n.delete(r.uid)),t.setState(o=>{if(n.size===0)return{...o,connections:new Map,current:void 0,status:"disconnected"};const a=n.values().next().value;return{...o,connections:new Map(n),current:a.connector.uid}});{const o=t.state.current;if(!o)return;const a=(i=t.state.connections.get(o))==null?void 0:i.connector;if(!a)return;await((s=t.storage)==null?void 0:s.setItem("recentConnectorId",a.id))}}async function l2(t,e={}){let r;if(e.connector){const{connector:c}=e,[l,u]=await Promise.all([c.getAccounts(),c.getChainId()]);r={accounts:l,chainId:u,connector:c}}else r=t.state.connections.get(t.state.current);if(!r)throw new PU;const n=e.chainId??r.chainId,i=r.connector;if(i.getClient)return i.getClient({chainId:n});const s=$i(e.account??r.accounts[0]),o=t.chains.find(c=>c.id===n),a=await r.connector.getProvider({chainId:n});if(e.account&&!r.accounts.includes(s.address))throw new wge({address:s.address,connector:i});return uU({account:s,chain:o,name:"Connector Client",transport:c=>dU(a)({...c,retryCount:0})})}function IU(t){const e=t.state.current,r=t.state.connections.get(e),n=r==null?void 0:r.accounts,i=n==null?void 0:n[0],s=t.chains.find(a=>a.id===(r==null?void 0:r.chainId)),o=t.state.status;switch(o){case"connected":return{address:i,addresses:n,chain:s,chainId:r==null?void 0:r.chainId,connector:r==null?void 0:r.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:o};case"reconnecting":return{address:i,addresses:n,chain:s,chainId:r==null?void 0:r.chainId,connector:r==null?void 0:r.connector,isConnected:!!i,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:o};case"connecting":return{address:i,addresses:n,chain:s,chainId:r==null?void 0:r.chainId,connector:r==null?void 0:r.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:o};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:o}}}function D_(t){return t.state.chainId}function Kc(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)&&Array.isArray(e)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!Kc(t[n],e[n]))return!1;return!0}if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const i=Object.keys(t);if(r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){const s=i[n];if(s&&!Kc(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}let mw=[];function L_(t){const e=t.chains;return Kc(mw,e)?mw:(mw=e,e)}function Pge(t,e={}){let r;try{r=t.getClient(e)}catch{}return r}let wm=[];function k3(t){const e=[...t.state.connections.values()];return t.state.status==="reconnecting"||Kc(wm,e)?wm:(wm=e,e)}let vw=[];function j_(t){const e=t.connectors;return Kc(vw,e)?vw:(vw=e,e)}function A3(t,e={}){const r=Pge(t,e);return r==null?void 0:r.extend(Wye)}async function Ige(t,e={}){const r=await l2(t,e);return r.extend(R_),r.extend(R_)}let yw=!1;async function Tge(t,e={}){var l,u;if(yw)return[];yw=!0,t.setState(f=>({...f,status:f.current?"reconnecting":"connecting"}));const r=[];if((l=e.connectors)!=null&&l.length)for(const f of e.connectors){let d;typeof f=="function"?d=t._internal.connectors.setup(f):d=f,r.push(d)}else r.push(...t.connectors);let n;try{n=await((u=t.storage)==null?void 0:u.getItem("recentConnectorId"))}catch{}const i={};for(const[,f]of t.state.connections)i[f.connector.id]=1;n&&(i[n]=0);const s=Object.keys(i).length>0?[...r].sort((f,d)=>(i[f.id]??10)-(i[d.id]??10)):r;let o=!1;const a=[],c=[];for(const f of s){const d=await f.getProvider();if(!d||c.some(m=>m===d)||!await f.isAuthorized())continue;const p=await f.connect({isReconnecting:!0}).catch(()=>null);p&&(f.emitter.off("connect",t._internal.events.connect),f.emitter.on("change",t._internal.events.change),f.emitter.on("disconnect",t._internal.events.disconnect),t.setState(m=>{const v=new Map(o?m.connections:new Map).set(f.uid,{accounts:p.accounts,chainId:p.chainId,connector:f});return{...m,current:o?m.current:f.uid,connections:v}}),a.push({accounts:p.accounts,chainId:p.chainId,connector:f}),c.push(d),o=!0)}return o?t.setState(f=>({...f,status:"connected"})):t.setState(f=>({...f,connections:new Map,current:void 0,status:"disconnected"})),yw=!1,a}async function Oge(t,e){const{account:r,chainId:n,connector:i,gas:s,...o}=e;let a;typeof r=="object"&&r.type==="local"?a=t.getClient({chainId:n}):a=await l2(t,{account:r,chainId:n,connector:i});const c=await(async()=>{if(s!==null)return s===void 0?Xy(a,Xb,"estimateGas")({...o,account:r,chain:n?{id:n}:null}):s})();return await Xy(a,e2,"sendTransaction")({...o,...r?{account:r}:{},gas:c,chain:n?{id:n}:null})}async function Rge(t,e){const{abi:r,chainId:n,connector:i,...s}=e;let o;e.account?o=e.account:o=(await l2(t,{chainId:n,connector:i})).account;const a=t.getClient({chainId:n}),c=Xy(a,cU,"simulateContract"),{result:l,request:u}=await c({...s,abi:r,account:o});return{chainId:a.chain.id,result:l,request:{__mode:"prepared",...u,chainId:n}}}async function $ge(t,e){var s;const{chainId:r}=e,n=t.state.connections.get(((s=e.connector)==null?void 0:s.uid)??t.state.current);if(n){const o=n.connector;if(!o.switchChain)throw new Ege({connector:o});return await o.switchChain({chainId:r})}const i=t.chains.find(o=>o.id===r);if(!i)throw new vu;return t.setState(o=>({...o,chainId:r})),i}function Mge(t,e){const{onChange:r}=e;return t.subscribe(()=>IU(t),r,{equalityFn(n,i){const{connector:s,...o}=n,{connector:a,...c}=i;return Kc(o,c)&&(s==null?void 0:s.id)===(a==null?void 0:a.id)&&(s==null?void 0:s.uid)===(a==null?void 0:a.uid)}})}function Nge(t,e){const{onChange:r}=e;return t.subscribe(n=>n.chainId,r)}function Dge(t,e){const{onChange:r}=e;return t.subscribe(()=>k3(t),r,{equalityFn:Kc})}function Lge(t,e){const{onChange:r}=e;return t._internal.connectors.subscribe((n,i)=>{r(Object.values(n),i)})}function jge(t,e){const{onChange:r}=e;return t.subscribe(()=>A3(t),r,{equalityFn(n,i){return(n==null?void 0:n.uid)===(i==null?void 0:i.uid)}})}async function Bge(t,e){const{account:r,chainId:n,connector:i,__mode:s,...o}=e;let a;typeof r=="object"&&r.type==="local"?a=t.getClient({chainId:n}):a=await l2(t,{account:r,chainId:n,connector:i});let c;if(s==="prepared")c=o;else{const{request:f}=await Rge(t,{...o,account:r});c=f}return await Xy(a,lU,"writeContract")({...c,...r?{account:r}:{},chain:n?{id:n}:null})}U4.type="mock";function U4(t){const e=t.features??{};let r=!1,n;return i=>({id:"mock",name:"Mock Connector",type:U4.type,async setup(){n=i.chains[0].id},async connect({chainId:s}={}){if(e.connectError)throw typeof e.connectError=="boolean"?new Mt(new Error("Failed to connect.")):e.connectError;const a=await(await this.getProvider()).request({method:"eth_requestAccounts"});let c=await this.getChainId();return s&&c!==s&&(c=(await this.switchChain({chainId:s})).id),r=!0,{accounts:a,chainId:c}},async disconnect(){r=!1},async getAccounts(){if(!r)throw new PU;return(await(await this.getProvider()).request({method:"eth_accounts"})).map(a=>ti(a))},async getChainId(){const o=await(await this.getProvider()).request({method:"eth_chainId"});return c_(o,"number")},async isAuthorized(){return!e.reconnect||!r?!1:!!(await this.getAccounts()).length},async switchChain({chainId:s}){const o=await this.getProvider(),a=i.chains.find(c=>c.id===s);if(!a)throw new os(new vu);return await o.request({method:"wallet_switchEthereumChain",params:[{chainId:Me(s)}]}),a},onAccountsChanged(s){s.length===0?this.onDisconnect():i.emitter.emit("change",{accounts:s.map(o=>ti(o))})},onChainChanged(s){const o=Oc(s);i.emitter.emit("change",{chainId:o})},async onDisconnect(s){i.emitter.emit("disconnect"),r=!1},async getProvider({chainId:s}={}){const a=(i.chains.find(l=>l.id===s)??i.chains[0]).rpcUrls.default.http[0];return dU({request:async({method:l,params:u})=>{if(l==="eth_chainId")return Me(n);if(l==="eth_requestAccounts")return t.accounts;if(l==="eth_signTypedData_v4"&&e.signTypedDataError)throw typeof e.signTypedDataError=="boolean"?new Mt(new Error("Failed to sign typed data.")):e.signTypedDataError;if(l==="wallet_switchEthereumChain"){if(e.switchChainError)throw typeof e.switchChainError=="boolean"?new Mt(new Error("Failed to switch chain.")):e.switchChainError;n=c_(u[0].chainId,"number"),this.onChainChanged(n.toString());return}if(l==="personal_sign"){if(e.signMessageError)throw typeof e.signMessageError=="boolean"?new Mt(new Error("Failed to sign message.")):e.signMessageError;l="eth_sign",u=[u[1],u[0]]}const f={method:l,params:u},{error:d,result:h}=await xye.http(a,{body:f});if(d)throw new E4({body:f,error:d,url:a});return h}})({retryCount:0})}})}function Fge(t,e){const{initialState:r,reconnectOnMount:n}=e;return r&&t.setState({...r,connections:n?r.connections:new Map,status:n?"reconnecting":"disconnected"}),{async onMount(){var i;if(t._internal.ssr){await t._internal.store.persist.rehydrate();const s=(i=t._internal.mipd)==null?void 0:i.getProviders().map(t._internal.connectors.providerDetailToConnector).map(t._internal.connectors.setup);t._internal.connectors.setState(o=>[...o,...s??[]])}n?Tge(t):t.storage&&t.setState(s=>({...s,connections:new Map}))}}}function Uge(t){const{children:e,config:r,initialState:n,reconnectOnMount:i=!0}=t,{onMount:s}=Fge(r,{initialState:n,reconnectOnMount:i});r._internal.ssr||s();const o=w.useRef(!0);return w.useEffect(()=>{if(o.current&&r._internal.ssr)return s(),()=>{o.current=!1}},[]),e}const TU=w.createContext(void 0);function zge(t){const{children:e,config:r}=t,n={value:r};return w.createElement(Uge,t,w.createElement(TU.Provider,n,e))}const qge="2.5.7",Wge=()=>`wagmi@${qge}`;class Hge extends Tu{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiError"})}get docsBaseUrl(){return"https://wagmi.sh/react"}get version(){return Wge()}}class Vge extends Hge{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"https://wagmi.sh/react/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}class Jd{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const r={listener:e};return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const _1=typeof window>"u"||"Deno"in window;function Ui(){}function Gge(t,e){return typeof t=="function"?t(e):t}function _3(t){return typeof t=="number"&&t>=0&&t!==1/0}function OU(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Af(t,e,r){return gp(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function Kge(t,e,r){return gp(t)?typeof e=="function"?{...r,mutationKey:t,mutationFn:e}:{...e,mutationKey:t}:typeof t=="function"?{...e,mutationFn:t}:{...t}}function oc(t,e,r){return gp(t)?[{...e,queryKey:t},r]:[t||{},e]}function B_(t,e){const{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:o,stale:a}=t;if(gp(o)){if(n){if(e.queryHash!==z4(o,e.options))return!1}else if(!Zy(e.queryKey,o))return!1}if(r!=="all"){const c=e.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||typeof i<"u"&&i!==e.state.fetchStatus||s&&!s(e))}function F_(t,e){const{exact:r,fetching:n,predicate:i,mutationKey:s}=t;if(gp(s)){if(!e.options.mutationKey)return!1;if(r){if(Ul(e.options.mutationKey)!==Ul(s))return!1}else if(!Zy(e.options.mutationKey,s))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||i&&!i(e))}function z4(t,e){return((e==null?void 0:e.queryKeyHashFn)||Ul)(t)}function Ul(t){return JSON.stringify(t,(e,r)=>P3(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Zy(t,e){return RU(t,e)}function RU(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!RU(t[r],e[r])):!1}function $U(t,e){if(t===e)return t;const r=U_(t)&&U_(e);if(r||P3(t)&&P3(e)){const n=r?t.length:Object.keys(t).length,i=r?e:Object.keys(e),s=i.length,o=r?[]:{};let a=0;for(let c=0;c"u")return!0;const r=e.prototype;return!(!z_(r)||!r.hasOwnProperty("isPrototypeOf"))}function z_(t){return Object.prototype.toString.call(t)==="[object Object]"}function gp(t){return Array.isArray(t)}function MU(t){return new Promise(e=>{setTimeout(e,t)})}function q_(t){MU(0).then(t)}function Yge(){if(typeof AbortController=="function")return new AbortController}function I3(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?$U(t,e):e}class Qge extends Jd{constructor(){super(),this.setup=e=>{if(!_1&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const tg=new Qge,W_=["online","offline"];class Jge extends Jd{constructor(){super(),this.setup=e=>{if(!_1&&window.addEventListener){const r=()=>e();return W_.forEach(n=>{window.addEventListener(n,r,!1)}),()=>{W_.forEach(n=>{window.removeEventListener(n,r)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const rg=new Jge;function Xge(t){return Math.min(1e3*2**t,3e4)}function u2(t){return(t??"online")==="online"?rg.isOnline():!0}class NU{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function vv(t){return t instanceof NU}function DU(t){let e=!1,r=0,n=!1,i,s,o;const a=new Promise((v,y)=>{s=v,o=y}),c=v=>{n||(h(new NU(v)),t.abort==null||t.abort())},l=()=>{e=!0},u=()=>{e=!1},f=()=>!tg.isFocused()||t.networkMode!=="always"&&!rg.isOnline(),d=v=>{n||(n=!0,t.onSuccess==null||t.onSuccess(v),i==null||i(),s(v))},h=v=>{n||(n=!0,t.onError==null||t.onError(v),i==null||i(),o(v))},p=()=>new Promise(v=>{i=y=>{const b=n||!f();return b&&v(y),b},t.onPause==null||t.onPause()}).then(()=>{i=void 0,n||t.onContinue==null||t.onContinue()}),m=()=>{if(n)return;let v;try{v=t.fn()}catch(y){v=Promise.reject(y)}Promise.resolve(v).then(d).catch(y=>{var b,E;if(n)return;const S=(b=t.retry)!=null?b:3,P=(E=t.retryDelay)!=null?E:Xge,R=typeof P=="function"?P(r,y):P,L=S===!0||typeof S=="number"&&r{if(f())return p()}).then(()=>{e?h(y):m()})})};return u2(t.networkMode)?m():p().then(m),{promise:a,cancel:c,continue:()=>(i==null?void 0:i())?a:Promise.resolve(),cancelRetry:l,continueRetry:u}}const q4=console;function Zge(){let t=[],e=0,r=u=>{u()},n=u=>{u()};const i=u=>{let f;e++;try{f=u()}finally{e--,e||a()}return f},s=u=>{e?t.push(u):q_(()=>{r(u)})},o=u=>(...f)=>{s(()=>{u(...f)})},a=()=>{const u=t;t=[],u.length&&q_(()=>{n(()=>{u.forEach(f=>{r(f)})})})};return{batch:i,batchCalls:o,schedule:s,setNotifyFunction:u=>{r=u},setBatchNotifyFunction:u=>{n=u}}}const wr=Zge();class LU{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_3(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(_1?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class ebe extends LU{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||q4,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||tbe(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,r){const n=I3(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){this.dispatch({type:"setState",state:e,setStateOptions:r})}cancel(e){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(e),n?n.then(Ui).catch(Ui):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!OU(this.state.dataUpdatedAt,e)}onFocus(){var e;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,r){var n,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var s;return(s=this.retryer)==null||s.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const o=Yge(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};c(a);const l=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),u={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:l};if(c(u),(n=this.options.behavior)==null||n.onFetch(u),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=u.fetchOptions)==null?void 0:i.meta)){var f;this.dispatch({type:"fetch",meta:(f=u.fetchOptions)==null?void 0:f.meta})}const d=h=>{if(vv(h)&&h.silent||this.dispatch({type:"error",error:h}),!vv(h)){var p,m,v,y;(p=(m=this.cache.config).onError)==null||p.call(m,h,this),(v=(y=this.cache.config).onSettled)==null||v.call(y,this.state.data,h,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=DU({fn:u.fetchFn,abort:o==null?void 0:o.abort.bind(o),onSuccess:h=>{var p,m,v,y;if(typeof h>"u"){d(new Error(this.queryHash+" data is undefined"));return}this.setData(h),(p=(m=this.cache.config).onSuccess)==null||p.call(m,h,this),(v=(y=this.cache.config).onSettled)==null||v.call(y,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(h,p)=>{this.dispatch({type:"failed",failureCount:h,error:p})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var i,s;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=e.meta)!=null?i:null,fetchStatus:u2(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(s=e.dataUpdatedAt)!=null?s:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=e.error;return vv(o)&&o.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),wr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function tbe(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=typeof e<"u",n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class rbe extends Jd{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var i;const s=r.queryKey,o=(i=r.queryHash)!=null?i:z4(s,r);let a=this.get(o);return a||(a=new ebe({cache:this,logger:e.getLogger(),queryKey:s,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(a)),a}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const r=this.queriesMap[e.queryHash];r&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),r===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){wr.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=oc(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(i=>B_(n,i))}findAll(e,r){const[n]=oc(e,r);return Object.keys(n).length>0?this.queries.filter(i=>B_(n,i)):this.queries}notify(e){wr.batch(()=>{this.listeners.forEach(({listener:r})=>{r(e)})})}onFocus(){wr.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){wr.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class nbe extends LU{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||q4,this.observers=[],this.state=e.state||jU(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(r=>r!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,r;return(e=(r=this.retryer)==null?void 0:r.continue())!=null?e:this.execute()}async execute(){const e=()=>{var L;return this.retryer=DU({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(j,H)=>{this.dispatch({type:"failed",failureCount:j,error:H})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(L=this.options.retry)!=null?L:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,i,s,o,a,c,l,u;if(!r){var f,d,h,p;this.dispatch({type:"loading",variables:this.options.variables}),await((f=(d=this.mutationCache.config).onMutate)==null?void 0:f.call(d,this.state.variables,this));const j=await((h=(p=this.options).onMutate)==null?void 0:h.call(p,this.state.variables));j!==this.state.context&&this.dispatch({type:"loading",context:j,variables:this.state.variables})}const L=await e();return await((n=(i=this.mutationCache.config).onSuccess)==null?void 0:n.call(i,L,this.state.variables,this.state.context,this)),await((s=(o=this.options).onSuccess)==null?void 0:s.call(o,L,this.state.variables,this.state.context)),await((a=(c=this.mutationCache.config).onSettled)==null?void 0:a.call(c,L,null,this.state.variables,this.state.context,this)),await((l=(u=this.options).onSettled)==null?void 0:l.call(u,L,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:L}),L}catch(L){try{var m,v,y,b,E,S,P,R;throw await((m=(v=this.mutationCache.config).onError)==null?void 0:m.call(v,L,this.state.variables,this.state.context,this)),await((y=(b=this.options).onError)==null?void 0:y.call(b,L,this.state.variables,this.state.context)),await((E=(S=this.mutationCache.config).onSettled)==null?void 0:E.call(S,void 0,L,this.state.variables,this.state.context,this)),await((P=(R=this.options).onSettled)==null?void 0:P.call(R,void 0,L,this.state.variables,this.state.context)),L}finally{this.dispatch({type:"error",error:L})}}}dispatch(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!u2(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}};this.state=r(this.state),wr.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function jU(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class ibe extends Jd{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const i=new nbe({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(r),state:n,defaultOptions:r.mutationKey?e.getMutationDefaults(r.mutationKey):void 0});return this.add(i),i}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(r=>r!==e),this.notify({type:"removed",mutation:e})}clear(){wr.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(r=>F_(e,r))}findAll(e){return this.mutations.filter(r=>F_(e,r))}notify(e){wr.batch(()=>{this.listeners.forEach(({listener:r})=>{r(e)})})}resumePausedMutations(){var e;return this.resuming=((e=this.resuming)!=null?e:Promise.resolve()).then(()=>{const r=this.mutations.filter(n=>n.state.isPaused);return wr.batch(()=>r.reduce((n,i)=>n.then(()=>i.continue().catch(Ui)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function T3(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,i,s,o;const a=(e=t.fetchOptions)==null||(r=e.meta)==null?void 0:r.refetchPage,c=(n=t.fetchOptions)==null||(i=n.meta)==null?void 0:i.fetchMore,l=c==null?void 0:c.pageParam,u=(c==null?void 0:c.direction)==="forward",f=(c==null?void 0:c.direction)==="backward",d=((s=t.state.data)==null?void 0:s.pages)||[],h=((o=t.state.data)==null?void 0:o.pageParams)||[];let p=h,m=!1;const v=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>{var L;if((L=t.signal)!=null&&L.aborted)m=!0;else{var j;(j=t.signal)==null||j.addEventListener("abort",()=>{m=!0})}return t.signal}})},y=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),b=(R,L,j,H)=>(p=H?[L,...p]:[...p,L],H?[j,...R]:[...R,j]),E=(R,L,j,H)=>{if(m)return Promise.reject("Cancelled");if(typeof j>"u"&&!L&&R.length)return Promise.resolve(R);const K={queryKey:t.queryKey,pageParam:j,meta:t.options.meta};v(K);const Y=y(K);return Promise.resolve(Y).then(F=>b(R,j,F,H))};let S;if(!d.length)S=E([]);else if(u){const R=typeof l<"u",L=R?l:O3(t.options,d);S=E(d,R,L)}else if(f){const R=typeof l<"u",L=R?l:BU(t.options,d);S=E(d,R,L,!0)}else{p=[];const R=typeof t.options.getNextPageParam>"u";S=(a&&d[0]?a(d[0],0,d):!0)?E([],R,h[0]):Promise.resolve(b([],h[0],d[0]));for(let j=1;j{if(a&&d[j]?a(d[j],j,d):!0){const Y=R?h[j]:O3(t.options,H);return E(H,R,Y)}return Promise.resolve(b(H,h[j],d[j]))})}return S.then(R=>({pages:R,pageParams:p}))}}}}function O3(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function BU(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}function sbe(t,e){if(t.getNextPageParam&&Array.isArray(e)){const r=O3(t,e);return typeof r<"u"&&r!==null&&r!==!1}}function obe(t,e){if(t.getPreviousPageParam&&Array.isArray(e)){const r=BU(t,e);return typeof r<"u"&&r!==null&&r!==!1}}class W4{constructor(e={}){this.queryCache=e.queryCache||new rbe,this.mutationCache=e.mutationCache||new ibe,this.logger=e.logger||q4,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=tg.subscribe(()=>{tg.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=rg.subscribe(()=>{rg.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,r;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(e,r){const[n]=oc(e,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state.data}ensureQueryData(e,r,n){const i=Af(e,r,n),s=this.getQueryData(i.queryKey);return s?Promise.resolve(s):this.fetchQuery(i)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const i=n.data;return[r,i]})}setQueryData(e,r,n){const i=this.queryCache.find(e),s=i==null?void 0:i.state.data,o=Gge(r,s);if(typeof o>"u")return;const a=Af(e),c=this.defaultQueryOptions(a);return this.queryCache.build(this,c).setData(o,{...n,manual:!0})}setQueriesData(e,r,n){return wr.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=oc(e,r),i=this.queryCache;wr.batch(()=>{i.findAll(n).forEach(s=>{i.remove(s)})})}resetQueries(e,r,n){const[i,s]=oc(e,r,n),o=this.queryCache,a={type:"active",...i};return wr.batch(()=>(o.findAll(i).forEach(c=>{c.reset()}),this.refetchQueries(a,s)))}cancelQueries(e,r,n){const[i,s={}]=oc(e,r,n);typeof s.revert>"u"&&(s.revert=!0);const o=wr.batch(()=>this.queryCache.findAll(i).map(a=>a.cancel(s)));return Promise.all(o).then(Ui).catch(Ui)}invalidateQueries(e,r,n){const[i,s]=oc(e,r,n);return wr.batch(()=>{var o,a;if(this.queryCache.findAll(i).forEach(l=>{l.invalidate()}),i.refetchType==="none")return Promise.resolve();const c={...i,type:(o=(a=i.refetchType)!=null?a:i.type)!=null?o:"active"};return this.refetchQueries(c,s)})}refetchQueries(e,r,n){const[i,s]=oc(e,r,n),o=wr.batch(()=>this.queryCache.findAll(i).filter(c=>!c.isDisabled()).map(c=>{var l;return c.fetch(void 0,{...s,cancelRefetch:(l=s==null?void 0:s.cancelRefetch)!=null?l:!0,meta:{refetchPage:i.refetchPage}})}));let a=Promise.all(o).then(Ui);return s!=null&&s.throwOnError||(a=a.catch(Ui)),a}fetchQuery(e,r,n){const i=Af(e,r,n),s=this.defaultQueryOptions(i);typeof s.retry>"u"&&(s.retry=!1);const o=this.queryCache.build(this,s);return o.isStaleByTime(s.staleTime)?o.fetch(s):Promise.resolve(o.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(Ui).catch(Ui)}fetchInfiniteQuery(e,r,n){const i=Af(e,r,n);return i.behavior=T3(),this.fetchQuery(i)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(Ui).catch(Ui)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,r){const n=this.queryDefaults.find(i=>Ul(e)===Ul(i.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>Zy(e,n.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(e,r){const n=this.mutationDefaults.find(i=>Ul(e)===Ul(i.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>Zy(e,n.mutationKey));return r==null?void 0:r.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const r={...this.defaultOptions.queries,...this.getQueryDefaults(e==null?void 0:e.queryKey),...e,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=z4(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e==null?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class FU extends Jd{constructor(e,r){super(),this.client=e,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),H_(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return R3(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return R3(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,r){const n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),eg(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const s=this.hasListeners();s&&V_(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(r),s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const o=this.computeRefetchInterval();s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(e){const r=this.client.getQueryCache().build(this.client,e),n=this.createResult(r,e);return cbe(this,n,e)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(e){const r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...r}={}){return this.fetch({...r,meta:{refetchPage:e}})}fetchOptimistic(e){const r=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(e){var r;return this.executeFetch({...e,cancelRefetch:(r=e.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let r=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(Ui)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),_1||this.currentResult.isStale||!_3(this.options.staleTime))return;const r=OU(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(_1||this.options.enabled===!1||!_3(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||tg.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,r){const n=this.currentQuery,i=this.options,s=this.currentResult,o=this.currentResultState,a=this.currentResultOptions,c=e!==n,l=c?e.state:this.currentQueryInitialState,u=c?this.currentResult:this.previousQueryResult,{state:f}=e;let{dataUpdatedAt:d,error:h,errorUpdatedAt:p,fetchStatus:m,status:v}=f,y=!1,b=!1,E;if(r._optimisticResults){const j=this.hasListeners(),H=!j&&H_(e,r),K=j&&V_(e,n,r,i);(H||K)&&(m=u2(e.options.networkMode)?"fetching":"paused",d||(v="loading")),r._optimisticResults==="isRestoring"&&(m="idle")}if(r.keepPreviousData&&!f.dataUpdatedAt&&u!=null&&u.isSuccess&&v!=="error")E=u.data,d=u.dataUpdatedAt,v=u.status,y=!0;else if(r.select&&typeof f.data<"u")if(s&&f.data===(o==null?void 0:o.data)&&r.select===this.selectFn)E=this.selectResult;else try{this.selectFn=r.select,E=r.select(f.data),E=I3(s==null?void 0:s.data,E,r),this.selectResult=E,this.selectError=null}catch(j){this.selectError=j}else E=f.data;if(typeof r.placeholderData<"u"&&typeof E>"u"&&v==="loading"){let j;if(s!=null&&s.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData))j=s.data;else if(j=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof j<"u")try{j=r.select(j),this.selectError=null}catch(H){this.selectError=H}typeof j<"u"&&(v="success",E=I3(s==null?void 0:s.data,j,r),b=!0)}this.selectError&&(h=this.selectError,E=this.selectResult,p=Date.now(),v="error");const S=m==="fetching",P=v==="loading",R=v==="error";return{status:v,fetchStatus:m,isLoading:P,isSuccess:v==="success",isError:R,isInitialLoading:P&&S,data:E,dataUpdatedAt:d,error:h,errorUpdatedAt:p,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>l.dataUpdateCount||f.errorUpdateCount>l.errorUpdateCount,isFetching:S,isRefetching:S&&!P,isLoadingError:R&&f.dataUpdatedAt===0,isPaused:m==="paused",isPlaceholderData:b,isPreviousData:y,isRefetchError:R&&f.dataUpdatedAt!==0,isStale:H4(e,r),refetch:this.refetch,remove:this.remove}}updateResult(e){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,eg(n,r))return;this.currentResult=n;const i={cache:!0},s=()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.trackedProps.size)return!0;const c=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&c.add("error"),Object.keys(this.currentResult).some(l=>{const u=l;return this.currentResult[u]!==r[u]&&c.has(u)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),this.notify({...i,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const r={};e.type==="success"?r.onSuccess=!e.manual:e.type==="error"&&!vv(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){wr.batch(()=>{if(e.onSuccess){var r,n,i,s;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(i=(s=this.options).onSettled)==null||i.call(s,this.currentResult.data,null)}else if(e.onError){var o,a,c,l;(o=(a=this.options).onError)==null||o.call(a,this.currentResult.error),(c=(l=this.options).onSettled)==null||c.call(l,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:u})=>{u(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function abe(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function H_(t,e){return abe(t,e)||t.state.dataUpdatedAt>0&&R3(t,e,e.refetchOnMount)}function R3(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&H4(t,e)}return!1}function V_(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&H4(t,r)}function H4(t,e){return t.isStaleByTime(e.staleTime)}function cbe(t,e,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?e.isPlaceholderData:!eg(t.getCurrentResult(),e)}class lbe extends FU{constructor(e,r){super(e,r)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,r){super.setOptions({...e,behavior:T3()},r)}getOptimisticResult(e){return e.behavior=T3(),super.getOptimisticResult(e)}fetchNextPage({pageParam:e,...r}={}){return this.fetch({...r,meta:{fetchMore:{direction:"forward",pageParam:e}}})}fetchPreviousPage({pageParam:e,...r}={}){return this.fetch({...r,meta:{fetchMore:{direction:"backward",pageParam:e}}})}createResult(e,r){var n,i,s,o,a,c;const{state:l}=e,u=super.createResult(e,r),{isFetching:f,isRefetching:d}=u,h=f&&((n=l.fetchMeta)==null||(i=n.fetchMore)==null?void 0:i.direction)==="forward",p=f&&((s=l.fetchMeta)==null||(o=s.fetchMore)==null?void 0:o.direction)==="backward";return{...u,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:sbe(r,(a=l.data)==null?void 0:a.pages),hasPreviousPage:obe(r,(c=l.data)==null?void 0:c.pages),isFetchingNextPage:h,isFetchingPreviousPage:p,isRefetching:d&&!h&&!p}}}let ube=class extends Jd{constructor(e,r){super(),this.client=e,this.setOptions(r),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var r;const n=this.options;this.options=this.client.defaultMutationOptions(e),eg(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(r=this.currentMutation)==null||r.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.currentMutation)==null||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();const r={listeners:!0};e.type==="success"?r.onSuccess=!0:e.type==="error"&&(r.onError=!0),this.notify(r)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,r){return this.mutateOptions=r,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof e<"u"?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:jU(),r={...e,isLoading:e.status==="loading",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=r}notify(e){wr.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(e.onSuccess){var r,n,i,s;(r=(n=this.mutateOptions).onSuccess)==null||r.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(i=(s=this.mutateOptions).onSettled)==null||i.call(s,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var o,a,c,l;(o=(a=this.mutateOptions).onError)==null||o.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(c=(l=this.mutateOptions).onSettled)==null||c.call(l,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(({listener:u})=>{u(this.currentResult)})})}};var UU={exports:{}},zU={};/** - * @license React - * use-sync-external-store-shim.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var xd=w;function fbe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var dbe=typeof Object.is=="function"?Object.is:fbe,hbe=xd.useState,pbe=xd.useEffect,mbe=xd.useLayoutEffect,vbe=xd.useDebugValue;function ybe(t,e){var r=e(),n=hbe({inst:{value:r,getSnapshot:e}}),i=n[0].inst,s=n[1];return mbe(function(){i.value=r,i.getSnapshot=e,gw(i)&&s({inst:i})},[t,r,e]),pbe(function(){return gw(i)&&s({inst:i}),t(function(){gw(i)&&s({inst:i})})},[t]),vbe(r),r}function gw(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!dbe(t,r)}catch{return!0}}function gbe(t,e){return e()}var bbe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?gbe:ybe;zU.useSyncExternalStore=xd.useSyncExternalStore!==void 0?xd.useSyncExternalStore:bbe;UU.exports=zU;var qU=UU.exports;const WU=qU.useSyncExternalStore,G_=w.createContext(void 0),HU=w.createContext(!1);function VU(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=G_),window.ReactQueryClientContext):G_)}const V4=({context:t}={})=>{const e=w.useContext(VU(t,w.useContext(HU)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},G4=({client:t,children:e,context:r,contextSharing:n=!1})=>{w.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);const i=VU(r,n);return w.createElement(HU.Provider,{value:!r&&n},w.createElement(i.Provider,{value:t},e))},GU=w.createContext(!1),xbe=()=>w.useContext(GU);GU.Provider;function wbe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const Ebe=w.createContext(wbe()),Cbe=()=>w.useContext(Ebe);function KU(t,e){return typeof t=="function"?t(...e):!!t}const Sbe=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},kbe=t=>{w.useEffect(()=>{t.clearReset()},[t])},Abe=({result:t,errorResetBoundary:e,useErrorBoundary:r,query:n})=>t.isError&&!e.isReset()&&!t.isFetching&&KU(r,[t.error,n]),_be=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},Pbe=(t,e)=>t.isLoading&&t.isFetching&&!e,Ibe=(t,e,r)=>(t==null?void 0:t.suspense)&&Pbe(e,r),Tbe=(t,e,r)=>e.fetchOptimistic(t).then(({data:n})=>{t.onSuccess==null||t.onSuccess(n),t.onSettled==null||t.onSettled(n,null)}).catch(n=>{r.clearReset(),t.onError==null||t.onError(n),t.onSettled==null||t.onSettled(void 0,n)});function YU(t,e){const r=V4({context:t.context}),n=xbe(),i=Cbe(),s=r.defaultQueryOptions(t);s._optimisticResults=n?"isRestoring":"optimistic",s.onError&&(s.onError=wr.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=wr.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=wr.batchCalls(s.onSettled)),_be(s),Sbe(s,i),kbe(i);const[o]=w.useState(()=>new e(r,s)),a=o.getOptimisticResult(s);if(WU(w.useCallback(c=>{const l=n?()=>{}:o.subscribe(wr.batchCalls(c));return o.updateResult(),l},[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),w.useEffect(()=>{o.setOptions(s,{listeners:!1})},[s,o]),Ibe(s,a,n))throw Tbe(s,o,i);if(Abe({result:a,errorResetBoundary:i,useErrorBoundary:s.useErrorBoundary,query:o.getCurrentQuery()}))throw a.error;return s.notifyOnChangeProps?a:o.trackResult(a)}function pn(t,e,r){const n=Af(t,e,r);return YU(n,FU)}function bp(t,e,r){const n=Kge(t,e,r),i=V4({context:n.context}),[s]=w.useState(()=>new ube(i,n));w.useEffect(()=>{s.setOptions(n)},[s,n]);const o=WU(w.useCallback(c=>s.subscribe(wr.batchCalls(c)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),a=w.useCallback((c,l)=>{s.mutate(c,l).catch(Obe)},[s]);if(o.error&&KU(s.options.useErrorBoundary,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}function Obe(){}function Rbe(t,e,r){const n=Af(t,e,r);return YU(n,lbe)}function $be(t,e){const{onChange:r}=e;return t._internal.chains.subscribe((n,i)=>{r(n,i)})}function vt(t={}){const e=t.config??w.useContext(TU);if(!e)throw new Vge;return e}var QU={exports:{}},JU={};/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var f2=w,Mbe=qU;function Nbe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Dbe=typeof Object.is=="function"?Object.is:Nbe,Lbe=Mbe.useSyncExternalStore,jbe=f2.useRef,Bbe=f2.useEffect,Fbe=f2.useMemo,Ube=f2.useDebugValue;JU.useSyncExternalStoreWithSelector=function(t,e,r,n,i){var s=jbe(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=Fbe(function(){function c(h){if(!l){if(l=!0,u=h,h=n(h),i!==void 0&&o.hasValue){var p=o.value;if(i(p,h))return f=p}return f=h}if(p=f,Dbe(u,h))return p;var m=n(h);return i!==void 0&&i(p,m)?p:(u=h,f=m)}var l=!1,u,f,d=r===void 0?null:r;return[function(){return c(e())},d===null?void 0:function(){return c(d())}]},[e,r,n,i]);var a=Lbe(t,s[0],s[1]);return Bbe(function(){o.hasValue=!0,o.value=a},[a]),Ube(a),a};QU.exports=JU;var XU=QU.exports;const bw=t=>typeof t=="object"&&!Array.isArray(t);function zbe(t,e,r=e,n=Kc){const i=w.useRef([]),s=XU.useSyncExternalStoreWithSelector(t,e,r,o=>o,(o,a)=>{if(bw(o)&&bw(a)&&i.current.length){for(const c of i.current)if(!n(o[c],a[c]))return!1;return!0}return n(o,a)});if(bw(s)){const o={...s};return Object.defineProperties(o,Object.entries(o).reduce((a,[c,l])=>({...a,[c]:{configurable:!1,enumerable:!0,get:()=>(i.current.includes(c)||i.current.push(c),l)}}),{})),o}return s}function mn(t={}){const e=vt(t);return zbe(r=>Mge(e,{onChange:r}),()=>IU(e))}function qbe(t){return JSON.stringify(t,(e,r)=>Wbe(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):typeof r=="bigint"?r.toString():r)}function Wbe(t){if(!K_(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!K_(r)||!r.hasOwnProperty("isPrototypeOf"))}function K_(t){return Object.prototype.toString.call(t)==="[object Object]"}function Hbe(t){const{_defaulted:e,behavior:r,gcTime:n,initialData:i,initialDataUpdatedAt:s,maxPages:o,meta:a,networkMode:c,queryFn:l,queryHash:u,queryKey:f,queryKeyHashFn:d,retry:h,retryDelay:p,structuralSharing:m,getPreviousPageParam:v,getNextPageParam:y,initialPageParam:b,_optimisticResults:E,enabled:S,notifyOnChangeProps:P,placeholderData:R,refetchInterval:L,refetchIntervalInBackground:j,refetchOnMount:H,refetchOnReconnect:K,refetchOnWindowFocus:Y,retryOnMount:Q,select:F,staleTime:x,suspense:k,throwOnError:N,config:M,connector:A,query:O,...B}=t;return B}function Vbe(t){return{mutationFn(e){return Age(t,e)},mutationKey:["connect"]}}function Gbe(t){return{mutationFn(e){return _ge(t,e)},mutationKey:["disconnect"]}}function Kbe(t,e={}){return{gcTime:0,async queryFn({queryKey:r}){const{connector:n}=e,{connectorUid:i,scopeKey:s,...o}=r[1];return Ige(t,{...o,connector:n})},queryKey:Ybe(e)}}function Ybe(t={}){const{connector:e,...r}=t;return["walletClient",{...Hbe(r),connectorUid:e==null?void 0:e.uid}]}function Qbe(t){return{mutationFn(e){return Oge(t,e)},mutationKey:["sendTransaction"]}}function Jbe(t){return{mutationFn(e){return $ge(t,e)},mutationKey:["switchChain"]}}function Xbe(t){return{mutationFn(e){return Bge(t,e)},mutationKey:["writeContract"]}}function Zbe(t){const e=pn({...t,queryKeyHashFn:qbe});return e.queryKey=t.queryKey,e}function d2(t={}){const e=vt(t);return w.useSyncExternalStore(r=>Nge(e,{onChange:r}),()=>D_(e),()=>D_(e))}function e2e(t={}){const e=vt(t);return w.useSyncExternalStore(r=>$be(e,{onChange:r}),()=>L_(e),()=>L_(e))}function t2e(t={}){const e=vt(t);return w.useSyncExternalStore(r=>Lge(e,{onChange:r}),()=>j_(e),()=>j_(e))}function ZU(t={}){const{mutation:e}=t,r=vt(t),n=t2e({config:r}),i=Vbe(r),{mutate:s,mutateAsync:o,...a}=bp({...e,...i});return w.useEffect(()=>r.subscribe(({status:c})=>c,(c,l)=>{l==="connected"&&c==="disconnected"&&a.reset()}),[r,a]),{...a,connect:s,connectAsync:o,connectors:n}}function h2(t={}){const e=vt(t);return w.useSyncExternalStore(r=>Dge(e,{onChange:r}),()=>k3(e),()=>k3(e))}function ez(t={}){const{mutation:e}=t,r=vt(t),n=Gbe(r),{mutate:i,mutateAsync:s,...o}=bp({...e,...n});return{...o,connectors:h2({config:r}).map(a=>a.connector),disconnect:i,disconnectAsync:s}}function r2e(t={}){const e=vt(t);return XU.useSyncExternalStoreWithSelector(r=>jge(e,{onChange:r}),()=>A3(e,t),()=>A3(e,t),r=>r,(r,n)=>(r==null?void 0:r.uid)===(n==null?void 0:n.uid))}function K4(t={}){const{mutation:e}=t,r=vt(t),n=Qbe(r),{mutate:i,mutateAsync:s,...o}=bp({...e,...n});return{...o,sendTransaction:i,sendTransactionAsync:s}}function Y4(t={}){const{mutation:e}=t,r=vt(t),n=Jbe(r),{mutate:i,mutateAsync:s,...o}=bp({...e,...n});return{...o,chains:e2e({config:r}),switchChain:i,switchChainAsync:s}}function n2e(t={}){const{query:e={},...r}=t,n=vt(r),i=V4(),{address:s,connector:o,status:a}=mn(),c=d2(),{queryKey:l,...u}=Kbe(n,{...t,chainId:t.chainId??c,connector:t.connector??o}),f=!!(a!=="disconnected"&&(e.enabled??!0));return w.useEffect(()=>{s?i.invalidateQueries({queryKey:l}):i.removeQueries({queryKey:l})},[s,i]),Zbe({...e,...u,queryKey:l,enabled:f,staleTime:1/0})}function i2e(t={}){const{mutation:e}=t,r=vt(t),n=Xbe(r),{mutate:i,mutateAsync:s,...o}=bp({...e,...n});return{...o,writeContract:i,writeContractAsync:s}}class s2e extends Error{}s2e.prototype.name="InvalidTokenError";const o2e=Object.entries(ht).reduce((t,[e,r])=>(t[r.name]=r.chainId,t),{});Object.entries(o2e).reduce((t,[e,r])=>(t[r]=e,t),{});Q4.type="coinbaseWallet";function Q4(t){let r,n;return i=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",type:Q4.type,async connect({chainId:s}={}){try{const o=await this.getProvider(),a=(await o.request({method:"eth_requestAccounts"})).map(l=>ti(l));o.on("accountsChanged",this.onAccountsChanged),o.on("chainChanged",this.onChainChanged),o.on("disconnect",this.onDisconnect.bind(this));let c=await this.getChainId();if(s&&c!==s){const l=await this.switchChain({chainId:s}).catch(u=>{if(u.code===Mt.code)throw u;return{id:c}});c=(l==null?void 0:l.id)??c}return{accounts:a,chainId:c}}catch(o){throw/(user closed modal|accounts received is empty|user denied account)/i.test(o.message)?new Mt(o):o}},async disconnect(){const s=await this.getProvider();s.removeListener("accountsChanged",this.onAccountsChanged),s.removeListener("chainChanged",this.onChainChanged),s.removeListener("disconnect",this.onDisconnect.bind(this)),s.disconnect(),s.close()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(o=>ti(o))},async getChainId(){const o=await(await this.getProvider()).request({method:"eth_chainId"});return Oc(o)},async getProvider(){var s;if(!n){const{default:o}=await M4(()=>import("./index-DZ3j0VOg.js").then(d=>d.i),__vite__mapDeps([0,1]),import.meta.url);let a;typeof o!="function"&&typeof o.default=="function"?a=o.default:a=o,r=new a({reloadOnDisconnect:!1,...t});const c=(s=r.walletExtension)==null?void 0:s.getChainId(),l=i.chains.find(d=>t.chainId?d.id===t.chainId:d.id===c)||i.chains[0],u=t.chainId||(l==null?void 0:l.id),f=t.jsonRpcUrl||(l==null?void 0:l.rpcUrls.default.http[0]);n=r.makeWeb3Provider(f,u)}return n},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({chainId:s}){var l,u;const o=i.chains.find(f=>f.id===s);if(!o)throw new os(new vu);const a=await this.getProvider(),c=Me(o.id);try{return await a.request({method:"wallet_switchEthereumChain",params:[{chainId:c}]}),o}catch(f){if(f.code===4902)try{return await a.request({method:"wallet_addEthereumChain",params:[{chainId:c,chainName:o.name,nativeCurrency:o.nativeCurrency,rpcUrls:[((l=o.rpcUrls.default)==null?void 0:l.http[0])??""],blockExplorerUrls:[(u=o.blockExplorers)==null?void 0:u.default.url]}]}),o}catch(d){throw new Mt(d)}throw new os(f)}},onAccountsChanged(s){s.length===0?i.emitter.emit("disconnect"):i.emitter.emit("change",{accounts:s.map(o=>ti(o))})},onChainChanged(s){const o=Oc(s);i.emitter.emit("change",{chainId:o})},async onDisconnect(s){i.emitter.emit("disconnect");const o=await this.getProvider();o.removeListener("accountsChanged",this.onAccountsChanged),o.removeListener("chainChanged",this.onChainChanged),o.removeListener("disconnect",this.onDisconnect.bind(this))}})}J4.type="walletConnect";function J4(t){const e=t.isNewChainsStale??!0;let r,n;const i="eip155";return s=>({id:"walletConnect",name:"WalletConnect",type:J4.type,async setup(){const o=await this.getProvider().catch(()=>null);o&&(o.on("connect",this.onConnect.bind(this)),o.on("session_delete",this.onSessionDelete.bind(this)))},async connect({chainId:o,...a}={}){var c,l;try{const u=await this.getProvider();if(!u)throw new Pl;u.on("display_uri",this.onDisplayUri);let f=o;if(!f){const m=await((c=s.storage)==null?void 0:c.getItem("state"))??{};s.chains.some(y=>y.id===m.chainId)?f=m.chainId:f=(l=s.chains[0])==null?void 0:l.id}if(!f)throw new Error("No chains found on connector.");const d=await this.isChainsStale();if(u.session&&d&&await u.disconnect(),!u.session||d){const m=s.chains.filter(v=>v.id!==f).map(v=>v.id);await u.connect({optionalChains:[f,...m],..."pairingTopic"in a?{pairingTopic:a.pairingTopic}:{}}),this.setRequestedChainsIds(s.chains.map(v=>v.id))}const h=(await u.enable()).map(m=>ti(m)),p=await this.getChainId();return u.removeListener("display_uri",this.onDisplayUri),u.removeListener("connect",this.onConnect.bind(this)),u.on("accountsChanged",this.onAccountsChanged.bind(this)),u.on("chainChanged",this.onChainChanged),u.on("disconnect",this.onDisconnect.bind(this)),u.on("session_delete",this.onSessionDelete.bind(this)),{accounts:h,chainId:p}}catch(u){throw/(user rejected|connection request reset)/i.test(u==null?void 0:u.message)?new Mt(u):u}},async disconnect(){const o=await this.getProvider();try{await(o==null?void 0:o.disconnect())}catch(a){if(!/No matching key/i.test(a.message))throw a}finally{o==null||o.removeListener("accountsChanged",this.onAccountsChanged.bind(this)),o==null||o.removeListener("chainChanged",this.onChainChanged),o==null||o.removeListener("disconnect",this.onDisconnect.bind(this)),o==null||o.removeListener("session_delete",this.onSessionDelete.bind(this)),o==null||o.on("connect",this.onConnect.bind(this)),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(a=>ti(a))},async getProvider({chainId:o}={}){var c;async function a(){const l=s.chains.map(f=>f.id);if(!l.length)return;const{EthereumProvider:u}=await M4(()=>import("./index.es-DhIOr3n6.js"),__vite__mapDeps([2,1]),import.meta.url);return await u.init({...t,disableProviderPing:!0,optionalChains:l,projectId:t.projectId,rpcMap:Object.fromEntries(s.chains.map(f=>[f.id,f.rpcUrls.default.http[0]])),showQrModal:t.showQrModal??!0})}return r||(n||(n=a()),r=await n,r==null||r.events.setMaxListeners(1/0)),o&&await((c=this.switchChain)==null?void 0:c.call(this,{chainId:o})),r},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{const[o,a]=await Promise.all([this.getAccounts(),this.getProvider()]);return o.length?await this.isChainsStale()&&a.session?(await a.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({chainId:o}){var c;const a=s.chains.find(l=>l.id===o);if(!a)throw new os(new vu);try{const l=await this.getProvider(),u=this.getNamespaceChainsIds(),f=this.getNamespaceMethods();if(!u.includes(o)&&f.includes("wallet_addEthereumChain")){await l.request({method:"wallet_addEthereumChain",params:[{chainId:Me(a.id),blockExplorerUrls:[(c=a.blockExplorers)==null?void 0:c.default.url],chainName:a.name,nativeCurrency:a.nativeCurrency,rpcUrls:[...a.rpcUrls.default.http]}]});const h=await this.getRequestedChainsIds();this.setRequestedChainsIds([...h,o])}return await l.request({method:"wallet_switchEthereumChain",params:[{chainId:Me(o)}]}),a}catch(l){const u=typeof l=="string"?l:l==null?void 0:l.message;throw/user rejected request/i.test(u)?new Mt(l):new os(l)}},onAccountsChanged(o){o.length===0?this.onDisconnect():s.emitter.emit("change",{accounts:o.map(a=>ti(a))})},onChainChanged(o){const a=Oc(o);s.emitter.emit("change",{chainId:a})},async onConnect(o){const a=Oc(o.chainId),c=await this.getAccounts();s.emitter.emit("connect",{accounts:c,chainId:a})},async onDisconnect(o){this.setRequestedChainsIds([]),s.emitter.emit("disconnect");const a=await this.getProvider();a.removeListener("accountsChanged",this.onAccountsChanged.bind(this)),a.removeListener("chainChanged",this.onChainChanged),a.removeListener("disconnect",this.onDisconnect.bind(this)),a.removeListener("session_delete",this.onSessionDelete.bind(this)),a.on("connect",this.onConnect.bind(this))},onDisplayUri(o){s.emitter.emit("message",{type:"display_uri",data:o})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){var a,c,l;return r?((l=(c=(a=r.session)==null?void 0:a.namespaces[i])==null?void 0:c.chains)==null?void 0:l.map(u=>parseInt(u.split(":")[1]||"")))??[]:[]},getNamespaceMethods(){var a,c;return r?((c=(a=r.session)==null?void 0:a.namespaces[i])==null?void 0:c.methods)??[]:[]},async getRequestedChainsIds(){var o;return await((o=s.storage)==null?void 0:o.getItem(this.requestedChainsStorageKey))??[]},async isChainsStale(){if(this.getNamespaceMethods().includes("wallet_addEthereumChain")||!e)return!1;const a=s.chains.map(u=>u.id),c=this.getNamespaceChainsIds();if(c.length&&!c.some(u=>a.includes(u)))return!1;const l=await this.getRequestedChainsIds();return!a.every(u=>l.includes(u))},async setRequestedChainsIds(o){var a;await((a=s.storage)==null?void 0:a.setItem(this.requestedChainsStorageKey,o))},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}function Be(){return Be=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const e=t?"white":"black";return n=>{let i=Be({},(ds(n),n));return g.createElement(g.Fragment,null,g.createElement("svg",Be({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 29 34",fill:"none"},i),g.createElement("path",{d:"M27.702 11.5918C27.5049 11.7448 24.0243 13.7068 24.0243 18.0694C24.0243 23.1155 28.4532 24.9007 28.5858 24.9449C28.5654 25.0537 27.8822 27.3897 26.2506 29.77C24.7958 31.8646 23.2765 33.9558 20.9651 33.9558C18.6538 33.9558 18.0589 32.6127 15.3907 32.6127C12.7904 32.6127 11.8659 34 9.75169 34C7.63748 34 6.1623 32.0618 4.46618 29.6816C2.50154 26.8865 0.914185 22.5443 0.914185 18.423C0.914185 11.8128 5.21057 8.30703 9.43897 8.30703C11.6857 8.30703 13.5586 9.78278 14.9692 9.78278C16.3118 9.78278 18.4056 8.21862 20.9617 8.21862C21.9304 8.21862 25.4111 8.30703 27.702 11.5918ZM19.7483 5.42014C20.8054 4.16542 21.5532 2.42444 21.5532 0.683468C21.5532 0.442044 21.5328 0.19722 21.4886 0C19.7687 0.0646065 17.7224 1.14591 16.4886 2.57746C15.5199 3.67917 14.6157 5.42014 14.6157 7.18492C14.6157 7.45014 14.6599 7.71537 14.6803 7.80038C14.7891 7.82078 14.9658 7.84458 15.1426 7.84458C16.6857 7.84458 18.6266 6.81088 19.7483 5.42014Z",fill:e})))}},Q_=({isDarkMode:t})=>{const e=t?"#FFFFFF":"#000000";return n=>{let i=Be({},(ds(n),n));return g.createElement(g.Fragment,null,g.createElement("svg",Be({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},i),g.createElement("path",{d:"M27.166 20.8774C27.1338 17.335 30.0617 15.633 30.1936 15.5493C28.5463 13.1395 25.9852 12.8113 25.0714 12.7727C22.8932 12.5507 20.8179 14.0565 19.7111 14.0565C18.6043 14.0565 16.8991 12.8049 15.0909 12.8403C12.7131 12.8757 10.5221 14.2205 9.2962 16.3505C6.8284 20.6297 8.66557 26.9777 11.0722 30.4557C12.2498 32.1545 13.6494 34.0689 15.493 33.9981C17.2691 33.9273 17.9383 32.8495 20.0811 32.8495C22.224 32.8495 22.8289 33.9981 24.7014 33.9627C26.6094 33.9241 27.8191 32.2253 28.9871 30.5201C30.3352 28.5478 30.8918 26.6366 30.924 26.5369C30.8822 26.5208 27.2046 25.1116 27.166 20.8774Z",fill:e}),g.createElement("path",{d:"M23.6429 10.4722C24.621 9.28822 25.2806 7.64089 25.1004 6C23.6911 6.05791 21.9859 6.93949 20.9756 8.12351C20.0715 9.16917 19.2768 10.8455 19.4923 12.4542C21.0592 12.5764 22.6648 11.653 23.6429 10.4722Z",fill:e})))}};ul.type="sequence";function ul(t){var e,r,n;const{defaultNetwork:i,connect:s,walletAppURL:o}=t;let a="sequence";const c=(t==null||(e=t.connect)==null||(e=e.settings)==null?void 0:e.signInOptions)||[],l=t==null||(r=t.connect)==null||(r=r.settings)==null?void 0:r.signInWith;if(t==null||(n=t.connect)==null||(n=n.settings)==null?void 0:n.signInWithEmail)a="email";else if(l)a=l,`${l[0].toUpperCase()}${l.slice(1)}`;else if(c.length>0){const f=c[0];`${a[0].toUpperCase()}${a.slice(1)}`,a=f}return f=>({id:"sequence",name:"Sequence",type:ul.type,async setup(){const d=await this.getProvider();d.on("chainChanged",h=>{f.emitter.emit("change",{chainId:sf(h)})}),d.on("disconnect",()=>{this.onDisconnect()})},async connect(){const d=await this.getProvider();if(!d.isConnected()){var h,p;const v=localStorage.getItem(sr.Theme),y=localStorage.getItem(sr.EthAuthSettings),b=y?JSON.parse(y):{},E=Be({authorize:!0},b,s,{settings:Be({theme:v||"dark"},s==null?void 0:s.settings)}),S=await d.connect(E);if(S.error)throw new Mt(new Error(S.error));if(!S.connected)throw new Mt(new Error("Wallet connection rejected"));const P=(h=S.proof)==null?void 0:h.proofString,R=(p=S.proof)==null?void 0:p.typedData;if(P){const L=JSON.stringify({proofString:P,typedData:R});localStorage.setItem(sr.EthAuthProof,L)}}return{accounts:[...await this.getAccounts()],chainId:d.getChainId()}},async disconnect(){(await this.getProvider()).disconnect()},async getAccounts(){const d=await this.getProvider();return[ti(await d.getSigner().getAddress())]},async getProvider(){try{return fu.getWallet()}catch{const h=localStorage.getItem(sr.ProjectAccessKey);if(!h)throw"projectAccessKey not found";const p=fu.initWallet(h,{defaultNetwork:i,transports:{walletAppURL:o||"https://sequence.app"},defaultEIP6492:!0,analytics:!1}),m=await p.getChainId();return f.emitter.emit("change",{chainId:sf(m)}),p}},async isAuthorized(){try{return!!await this.getAccounts()}catch{return!1}},async switchChain({chainId:d}){const h=await this.getProvider(),p=f.chains.find(m=>m.id===d)||f.chains[0];return h.setDefaultChainId(sf(d)),f.emitter.emit("change",{chainId:d}),p},async getChainId(){return(await this.getProvider()).getChainId()},async onAccountsChanged(d){return{account:d[0]}},async onChainChanged(d){const h=await this.getProvider();f.emitter.emit("change",{chainId:sf(d)}),h.setDefaultChainId(sf(d))},async onConnect(d){},async onDisconnect(){localStorage.removeItem(sr.EthAuthProof),f.emitter.emit("disconnect")}})}function sf(t){return typeof t=="object"?sf(t.chainId):typeof t=="string"?Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10):typeof t=="bigint"?Number(t):t}const a2e=t=>({id:"apple",isSequenceBased:!0,logoDark:Y_({isDarkMode:!0}),logoLight:Y_({isDarkMode:!1}),monochromeLogoDark:Q_({isDarkMode:!0}),monochromeLogoLight:Q_({isDarkMode:!1}),name:"Apple",createConnector:()=>{var e;return ul(Be({},t,{connect:Be({},t==null?void 0:t.connect,{settings:Be({},t==null||(e=t.connect)==null?void 0:e.settings,{signInWith:"apple"})})}))}}),J_=t=>{let e=Be({},(ds(t),t));return g.createElement(g.Fragment,null,g.createElement("svg",Be({viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),g.createElement("rect",{width:"28",height:"28",fill:"#2C5FF6"}),g.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 23.8C19.4124 23.8 23.8 19.4124 23.8 14C23.8 8.58761 19.4124 4.2 14 4.2C8.58761 4.2 4.2 8.58761 4.2 14C4.2 19.4124 8.58761 23.8 14 23.8ZM11.55 10.8C11.1358 10.8 10.8 11.1358 10.8 11.55V16.45C10.8 16.8642 11.1358 17.2 11.55 17.2H16.45C16.8642 17.2 17.2 16.8642 17.2 16.45V11.55C17.2 11.1358 16.8642 10.8 16.45 10.8H11.55Z",fill:"white"})))},c2e=t=>({id:"coinbase-wallet",logoDark:J_,logoLight:J_,name:"Coinbase Wallet",createConnector:()=>Q4(Be({},t))}),X_=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let i=Be({},(ds(n),n));return g.createElement(g.Fragment,null,g.createElement("svg",Be({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35 34",fill:"none"},i),g.createElement("path",{d:"M17.0826 16.3805C17.1802 16.4598 17.32 16.4598 17.4176 16.3805L30.1401 6.04341C30.5283 5.72801 30.3053 5.09985 29.8051 5.09985H4.69499C4.19482 5.09985 3.9718 5.72801 4.35998 6.04341L17.0826 16.3805Z",fill:e}),g.createElement("path",{d:"M19.7626 19.2667L33.3838 8.19943C33.731 7.91735 34.2501 8.16441 34.2501 8.61174V24.2249C34.2501 26.5721 32.3473 28.4749 30.0001 28.4749H4.50006C2.15285 28.4749 0.250061 26.5721 0.250061 24.2249V8.61174C0.250061 8.16441 0.769134 7.91735 1.11631 8.19943L14.7375 19.2667C16.2014 20.4561 18.2987 20.4561 19.7626 19.2667Z",fill:e})))}},$3="@sequence.kit.connector.email",l2e=t=>({id:"email",isSequenceBased:!0,logoDark:X_({isDarkMode:!0}),logoLight:X_({isDarkMode:!1}),name:"Email",createConnector:()=>{var e;const r=localStorage.getItem($3);return ul(Be({},t,{connect:Be({},t==null?void 0:t.connect,{settings:Be({},t==null||(e=t.connect)==null?void 0:e.settings,{signInOptions:["email"],signInWithEmail:r||""})})}))}}),Z_=t=>{let e=Be({},(ds(t),t));return g.createElement(g.Fragment,null,g.createElement("svg",Be({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},e),g.createElement("path",{d:"M17.4214 36.9716C9.27855 35.5145 3.10712 28.4859 3.10712 20.0001C3.10712 10.5715 10.8214 2.85718 20.25 2.85718C29.6785 2.85718 37.3928 10.5715 37.3928 20.0001C37.3928 28.4859 31.2214 35.5145 23.0785 36.9716L22.1357 36.2002H18.3643L17.4214 36.9716Z",fill:"url(#paint0_linear_193_14528)"}),g.createElement("path",{d:"M26.9357 24.7999L27.7072 19.9999H23.1643V16.657C23.1643 15.2856 23.6786 14.257 25.7357 14.257H27.9643V9.88558C26.7643 9.71415 25.3929 9.54272 24.1929 9.54272C20.25 9.54272 17.5071 11.9427 17.5071 16.2285V19.9999H13.2214V24.7999H17.5071V36.8857C18.45 37.0571 19.3929 37.1429 20.3357 37.1429C21.2786 37.1429 22.2214 37.0571 23.1643 36.8857V24.7999H26.9357Z",fill:"white"}),g.createElement("defs",null,g.createElement("linearGradient",{id:"paint0_linear_193_14528",x1:"20.2508",y1:"35.9507",x2:"20.2508",y2:"2.85086",gradientUnits:"userSpaceOnUse"},g.createElement("stop",{"stop-color":"#0062E0"}),g.createElement("stop",{offset:"1","stop-color":"#19AFFF"})))))},eP=({isDarkMode:t})=>{const e=t?"#FFFFFF":"#000000";return n=>{let i=Be({},(ds(n),n));return g.createElement(g.Fragment,null,g.createElement("svg",Be({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},i),g.createElement("path",{d:"M25.8582 10.4398C24.1222 10.4398 23.6288 11.2098 23.6288 12.9073V15.709H28.246L27.791 20.2476H23.6279V34H18.1024V20.2468H14.375V15.7081H18.1042V12.9851C18.1042 8.40625 19.9399 6 25.0891 6C26.1942 6 27.5163 6.0875 28.3055 6.19775V10.459",fill:e})))}},u2e=t=>({id:"facebook",isSequenceBased:!0,logoDark:Z_,logoLight:Z_,monochromeLogoDark:eP({isDarkMode:!0}),monochromeLogoLight:eP({isDarkMode:!1}),name:"Facebook",createConnector:()=>{var e;return ul(Be({},t,{connect:Be({},t==null?void 0:t.connect,{settings:Be({},t==null||(e=t.connect)==null?void 0:e.settings,{signInWith:"facebook"})})}))}}),tP=t=>{let e=Be({},(ds(t),t));return g.createElement(g.Fragment,null,g.createElement("svg",Be({viewBox:"0 0 41 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),g.createElement("g",{id:"Frame 2114"},g.createElement("g",{id:"Group"},g.createElement("path",{id:"Vector",d:"M20.7497 16.8828V23.5218H29.9756C29.5705 25.6568 28.3548 27.4647 26.5314 28.6803L32.095 32.9972C35.3366 30.0051 37.2068 25.6102 37.2068 20.3895C37.2068 19.1739 37.0977 18.005 36.895 16.883L20.7497 16.8828Z",fill:"#4285F4"}),g.createElement("path",{id:"Vector_2",d:"M11.1424 23.2627L9.88756 24.2232L5.44592 27.6829C8.2667 33.2777 14.0481 37.1427 20.7493 37.1427C25.3778 37.1427 29.2583 35.6154 32.0947 32.9973L26.5311 28.6803C25.0038 29.7089 23.0557 30.3324 20.7493 30.3324C16.2922 30.3324 12.5053 27.3246 11.1494 23.2726L11.1424 23.2627Z",fill:"#34A853"}),g.createElement("path",{id:"Vector_3",d:"M5.44594 12.3169C4.27718 14.6233 3.60712 17.2259 3.60712 19.9999C3.60712 22.7739 4.27718 25.3765 5.44594 27.6829C5.44594 27.6984 11.1499 23.2569 11.1499 23.2569C10.8071 22.2284 10.6044 21.1375 10.6044 19.9997C10.6044 18.8619 10.8071 17.7711 11.1499 16.7425L5.44594 12.3169Z",fill:"#FBBC05"}),g.createElement("path",{id:"Vector_4",d:"M20.7497 9.6829C23.2744 9.6829 25.5185 10.5556 27.3107 12.2387L32.2198 7.32972C29.2431 4.55574 25.3783 2.85693 20.7497 2.85693C14.0484 2.85693 8.2667 6.70628 5.44592 12.3167L11.1497 16.7427C12.5055 12.6907 16.2926 9.6829 20.7497 9.6829Z",fill:"#EA4335"})))))},rP=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let i=Be({},(ds(n),n));return g.createElement("svg",Be({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},i),g.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25.8355 14.7613C24.5584 13.5329 22.9441 12.9032 21.1356 12.9032C17.9377 12.9032 15.2302 15.0813 14.2595 18.0232L14.2593 18.023C14.0142 18.7662 13.8712 19.5609 13.8712 20.3866C13.8712 21.2124 14.004 22.0072 14.2594 22.7504L14.2587 22.751H14.2595C15.2302 25.6929 17.9377 27.871 21.1356 27.871C22.7907 27.871 24.1904 27.4168 25.2939 26.6736V26.6732C26.5812 25.7958 27.4497 24.5055 27.746 22.9777H21.1355V18.3223H32.6808C32.8034 19.0758 32.875 19.85 32.875 20.6655C32.875 24.4332 31.5467 27.6126 29.2377 29.77L29.2378 29.7703C27.2148 31.6594 24.446 32.7742 21.1356 32.7742C16.3438 32.7742 12.2059 29.9871 10.1931 25.9407V25.94L10.193 25.9401C9.35521 24.2678 8.875 22.3891 8.875 20.3866C8.875 18.384 9.35521 16.5053 10.193 14.833H10.1934C12.2063 10.7869 16.344 8 21.1356 8C24.446 8 27.2148 9.22839 29.3298 11.231L25.8355 14.7613Z",fill:e}))}},f2e=t=>({id:"google",isSequenceBased:!0,logoDark:tP,logoLight:tP,monochromeLogoDark:rP({isDarkMode:!0}),monochromeLogoLight:rP({isDarkMode:!1}),name:"Google",createConnector:()=>{var e;return ul(Be({},t,{connect:Be({},t==null?void 0:t.connect,{settings:Be({},t==null||(e=t.connect)==null?void 0:e.settings,{signInWith:"google"})})}))}}),nP=t=>{let e=Be({},(ds(t),t));return g.createElement(g.Fragment,null,g.createElement("svg",Be({viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),g.createElement("rect",{width:"28",height:"28"}),g.createElement("path",{d:"M24.0891 3.1199L15.3446 9.61456L16.9617 5.7828L24.0891 3.1199Z",fill:"#E2761B",stroke:"#E2761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M3.90207 3.1199L12.5763 9.67608L11.0383 5.7828L3.90207 3.1199Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M20.9429 18.1745L18.6139 21.7426L23.597 23.1136L25.0295 18.2536L20.9429 18.1745Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M2.97929 18.2536L4.40301 23.1136L9.38607 21.7426L7.05713 18.1745L2.97929 18.2536Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M9.10483 12.1456L7.71626 14.2461L12.6642 14.4658L12.4884 9.14877L9.10483 12.1456Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M18.8864 12.1456L15.4589 9.08725L15.3446 14.4658L20.2837 14.2461L18.8864 12.1456Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M9.38606 21.7426L12.3566 20.2925L9.79033 18.2888L9.38606 21.7426Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M15.6347 20.2925L18.6139 21.7426L18.2009 18.2888L15.6347 20.2925Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M18.6139 21.7426L15.6347 20.2925L15.8719 22.2348L15.8456 23.0521L18.6139 21.7426Z",fill:"#D7C1B3",stroke:"#D7C1B3",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M9.38606 21.7426L12.1544 23.0521L12.1368 22.2348L12.3566 20.2925L9.38606 21.7426Z",fill:"#D7C1B3",stroke:"#D7C1B3",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.1984 17.0056L9.72002 16.2762L11.4689 15.4765L12.1984 17.0056Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M15.7928 17.0056L16.5223 15.4765L18.28 16.2762L15.7928 17.0056Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M9.38606 21.7426L9.80791 18.1745L7.05712 18.2536L9.38606 21.7426Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M18.1921 18.1745L18.6139 21.7426L20.9429 18.2536L18.1921 18.1745Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M20.2837 14.2461L15.3446 14.4658L15.8016 17.0057L16.5311 15.4765L18.2888 16.2762L20.2837 14.2461Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M9.72002 16.2762L11.4777 15.4765L12.1984 17.0057L12.6642 14.4658L7.71626 14.2461L9.72002 16.2762Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M7.71626 14.2461L9.79033 18.2888L9.72002 16.2762L7.71626 14.2461Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M18.2888 16.2762L18.2009 18.2888L20.2837 14.2461L18.2888 16.2762Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.6642 14.4658L12.1984 17.0057L12.7784 20.0025L12.9102 16.0565L12.6642 14.4658Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M15.3446 14.4658L15.1073 16.0477L15.2128 20.0025L15.8016 17.0057L15.3446 14.4658Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M15.8016 17.0056L15.2128 20.0025L15.6347 20.2925L18.2009 18.2888L18.2888 16.2762L15.8016 17.0056Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M9.72002 16.2762L9.79033 18.2888L12.3566 20.2925L12.7784 20.0025L12.1984 17.0056L9.72002 16.2762Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M15.8456 23.0521L15.8719 22.2348L15.6522 22.0414H12.339L12.1368 22.2348L12.1544 23.0521L9.38606 21.7426L10.3528 22.5336L12.3126 23.8958H15.6786L17.6472 22.5336L18.6139 21.7426L15.8456 23.0521Z",fill:"#C0AD9E",stroke:"#C0AD9E",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M15.6347 20.2925L15.2128 20.0025H12.7784L12.3566 20.2925L12.1368 22.2348L12.339 22.0414H15.6522L15.8719 22.2348L15.6347 20.2925Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M24.4583 10.0364L25.2053 6.45072L24.0891 3.1199L15.6347 9.39485L18.8864 12.1456L23.4827 13.4903L24.5022 12.3038L24.0628 11.9874L24.7658 11.3459L24.221 10.924L24.924 10.3879L24.4583 10.0364Z",fill:"#763D16",stroke:"#763D16",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M2.79472 6.45072L3.54174 10.0364L3.06717 10.3879L3.77024 10.924L3.23415 11.3459L3.93722 11.9874L3.4978 12.3038L4.50847 13.4903L9.10483 12.1456L12.3566 9.39485L3.90207 3.1199L2.79472 6.45072Z",fill:"#763D16",stroke:"#763D16",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M23.4827 13.4903L18.8864 12.1456L20.2837 14.2461L18.2009 18.2888L20.9429 18.2536H25.0295L23.4827 13.4903Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M9.10484 12.1456L4.50848 13.4903L2.97929 18.2536H7.05713L9.79033 18.2888L7.71626 14.2461L9.10484 12.1456Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M15.3446 14.4658L15.6347 9.39485L16.9705 5.7828H11.0383L12.3566 9.39485L12.6642 14.4658L12.7696 16.0653L12.7784 20.0025H15.2128L15.2304 16.0653L15.3446 14.4658Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"})))},d2e=()=>({id:"metamask",logoDark:nP,logoLight:nP,name:"Metamask",createConnector:()=>c2({target:"metaMask"})}),ng=t=>{let e=Be({},(ds(t),t));return g.createElement(g.Fragment,null,g.createElement("svg",Be({xmlns:"http://www.w3.org/2000/svg",style:{fill:"none"},id:"svg1316",version:"1.1",viewBox:"0 0 396 396"},e),g.createElement("g",{transform:"translate(0,38)",id:"g1256",clipPath:"url(#clip0_5_131)"},g.createElement("g",{id:"g1254",clipPath:"url(#clip1_5_131)"},g.createElement("path",{style:{fill:"#111111"},id:"path1232",d:"M 0,67.5049 V 250.165 c 0,37.282 30.1402,67.505 67.32,67.505 h 261.36 c 37.18,0 67.32,-30.223 67.32,-67.505 V 67.5049 C 396,30.223 365.86,0 328.68,0 H 67.32 C 30.1402,0 0,30.223 0,67.5049 Z"}),g.createElement("path",{style:{fill:"url(#paint0_linear_5_13"},id:"path1234",d:"M 0,67.5049 V 250.165 c 0,37.282 30.1402,67.505 67.32,67.505 h 261.36 c 37.18,0 67.32,-30.223 67.32,-67.505 V 67.5049 C 396,30.223 365.86,0 328.68,0 H 67.32 C 30.1402,0 0,30.223 0,67.5049 Z"}),g.createElement("path",{style:{fill:"url(#paint1_linear_5_131"},id:"path1236",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),g.createElement("path",{style:{fill:"url(#paint2_linear_5_131)"},id:"path1238",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),g.createElement("path",{style:{fill:"url(#paint3_linear_5_131)"},id:"path1240",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),g.createElement("path",{style:{fill:"url(#paint4_linear_5_131)"},id:"path1242",d:"m 98.9999,238.126 c 0,-10.965 -8.8648,-19.854 -19.8,-19.854 -10.9352,0 -19.8,8.889 -19.8,19.854 0,10.966 8.8648,19.855 19.8,19.855 10.9352,0 19.8,-8.889 19.8,-19.855 z"}),g.createElement("path",{style:{fill:"url(#paint5_linear_5_131)"},id:"path1244",d:"m 336.6,158.835 c 0,-10.965 -8.865,-19.854 -19.8,-19.854 -10.935,0 -19.8,8.889 -19.8,19.854 0,10.965 8.865,19.855 19.8,19.855 10.935,0 19.8,-8.89 19.8,-19.855 z"}),g.createElement("path",{style:{fill:"url(#paint6_linear_5_131)"},id:"path1246",d:"m 336.6,158.835 c 0,-10.965 -8.865,-19.854 -19.8,-19.854 -10.935,0 -19.8,8.889 -19.8,19.854 0,10.965 8.865,19.855 19.8,19.855 10.935,0 19.8,-8.89 19.8,-19.855 z"}),g.createElement("path",{style:{fill:"url(#paint7_linear_5_131)"},id:"path1248",d:"M 316.8,59.5632 H 158.4 c -10.935,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.865,19.8544 19.8,19.8544 h 158.4 c 10.935,0 19.8,-8.8892 19.8,-19.8544 0,-10.9653 -8.865,-19.8544 -19.8,-19.8544 z"}),g.createElement("path",{style:{fill:"url(#paint8_linear_5_131)"},id:"path1250",d:"M 316.8,218.272 H 158.4 c -10.935,0 -19.8,8.889 -19.8,19.854 0,10.966 8.865,19.855 19.8,19.855 h 158.4 c 10.935,0 19.8,-8.889 19.8,-19.855 0,-10.965 -8.865,-19.854 -19.8,-19.854 z"}),g.createElement("path",{style:{fill:"url(#paint9_linear_5_131)"},id:"path1252",d:"M 237.6,138.981 H 79.2 c -10.9352,0 -19.8,8.889 -19.8,19.854 0,10.965 8.8648,19.855 19.8,19.855 h 158.4 c 10.935,0 19.8,-8.89 19.8,-19.855 0,-10.965 -8.865,-19.854 -19.8,-19.854 z"}))),g.createElement("defs",{id:"defs1314"},g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"318",x2:"198",y1:"4.0585401e-05",x1:"198",id:"paint0_linear_5_131"},g.createElement("stop",{id:"stop1258",stopColor:"#1D273D"}),g.createElement("stop",{id:"stop1260",stopColor:"#0D0F13",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"63",x2:"92.5",y1:"99",x1:"65.5",id:"paint1_linear_5_131"},g.createElement("stop",{id:"stop1263",stopColor:"#4462FE"}),g.createElement("stop",{id:"stop1265",stopColor:"#7D69FA",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"97.591103",x2:"96.137703",y1:"99.291199",x1:"62.879902",id:"paint2_linear_5_131"},g.createElement("stop",{id:"stop1268",stopColor:"#3757FD"}),g.createElement("stop",{id:"stop1270",stopColor:"#6980FA",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"97.591103",x2:"96.137703",y1:"99.291199",x1:"62.879902",id:"paint3_linear_5_131"},g.createElement("stop",{id:"stop1273",stopColor:"#2447FF"}),g.createElement("stop",{id:"stop1275",stopColor:"#6980FA",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"223.5",x2:"91.5",y1:"251.5",x1:"65",id:"paint4_linear_5_131"},g.createElement("stop",{id:"stop1278",stopColor:"#BC3EE6"}),g.createElement("stop",{id:"stop1280",stopColor:"#D972F1",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"146",x2:"329.5",y1:"172",x1:"305",id:"paint5_linear_5_131"},g.createElement("stop",{id:"stop1283",stopColor:"#29BDFF"}),g.createElement("stop",{id:"stop1285",stopColor:"#96E7FB",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"176.772",x2:"334.56699",y1:"178.418",x1:"300.17999",id:"paint6_linear_5_131"},g.createElement("stop",{id:"stop1288",stopColor:"#23BBFF"}),g.createElement("stop",{id:"stop1290",stopColor:"#85E7FF",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"60",x2:"317.5",y1:"99",x1:"154.5",id:"paint7_linear_5_131"},g.createElement("stop",{id:"stop1293",stopColor:"#23BBFF"}),g.createElement("stop",{id:"stop1295",stopColor:"#85E7FF",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"218",x2:"312.5",y1:"258",x1:"156",id:"paint8_linear_5_131"},g.createElement("stop",{id:"stop1298",stopColor:"#2447FF"}),g.createElement("stop",{id:"stop1300",stopColor:"#6980FA",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"139",x2:"235.5",y1:"179",x1:"86.000099",id:"paint9_linear_5_131"},g.createElement("stop",{id:"stop1303",stopColor:"#6634FF"}),g.createElement("stop",{id:"stop1305",stopColor:"#9C6DFF",offset:"1"})),g.createElement("clipPath",{id:"clip0_5_131"},g.createElement("rect",{style:{fill:"#ffffff"},y:"0",x:"0",id:"rect1308",height:"317.67001",width:"396"})),g.createElement("clipPath",{id:"clip1_5_131"},g.createElement("rect",{style:{fill:"#ffffff"},y:"0",x:"0",id:"rect1311",height:"317.67001",width:"396"})))))},h2e=t=>({id:"mock",isSequenceBased:!0,logoDark:ng,logoLight:ng,name:"Mock",createConnector:()=>U4(t)}),p2e=t=>({id:"sequence",isSequenceBased:!0,logoDark:ng,logoLight:ng,name:"Sequence",createConnector:()=>ul(Be({},t))}),Em=({isDarkMode:t})=>{let e;return t===void 0?e="#9146FF":e=t?"white":"black",n=>(Be({},(ds(n),n)),g.createElement(g.Fragment,null,g.createElement("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 2400 2800",transform:"scale(0.80)"},g.createElement("g",null,g.createElement("g",{id:"Layer_1-2"},g.createElement("path",{fill:e,d:"M500,0L0,500v1800h600v500l500-500h400l900-900V0H500z M2200,1300l-400,400h-400l-350,350v-350H600V200h1600 V1300z"}),g.createElement("rect",{x:"1700",y:"550",fill:e,width:"200",height:"600"}),g.createElement("rect",{x:"1150",y:"550",fill:e,width:"200",height:"600"}))))))},m2e=t=>({id:"twitch",isSequenceBased:!0,logoDark:Em({}),logoLight:Em({}),monochromeLogoDark:Em({isDarkMode:!0}),monochromeLogoLight:Em({isDarkMode:!1}),name:"Twitch",createConnector:()=>{var e;return ul(Be({},t,{connect:Be({},t==null?void 0:t.connect,{settings:Be({},t==null||(e=t.connect)==null?void 0:e.settings,{signInWith:"twitch"})})}))}}),iP=t=>{let e=Be({},(ds(t),t));return g.createElement(g.Fragment,null,g.createElement("svg",Be({fill:"none",viewBox:"0 0 480 332",xmlns:"http://www.w3.org/2000/svg"},e),g.createElement("path",{d:"m126.613 93.9842c62.622-61.3123 164.152-61.3123 226.775 0l7.536 7.3788c3.131 3.066 3.131 8.036 0 11.102l-25.781 25.242c-1.566 1.533-4.104 1.533-5.67 0l-10.371-10.154c-43.687-42.7734-114.517-42.7734-158.204 0l-11.107 10.874c-1.565 1.533-4.103 1.533-5.669 0l-25.781-25.242c-3.132-3.066-3.132-8.036 0-11.102zm280.093 52.2038 22.946 22.465c3.131 3.066 3.131 8.036 0 11.102l-103.463 101.301c-3.131 3.065-8.208 3.065-11.339 0l-73.432-71.896c-.783-.767-2.052-.767-2.835 0l-73.43 71.896c-3.131 3.065-8.208 3.065-11.339 0l-103.4657-101.302c-3.1311-3.066-3.1311-8.036 0-11.102l22.9456-22.466c3.1311-3.065 8.2077-3.065 11.3388 0l73.4333 71.897c.782.767 2.051.767 2.834 0l73.429-71.897c3.131-3.065 8.208-3.065 11.339 0l73.433 71.897c.783.767 2.052.767 2.835 0l73.431-71.895c3.132-3.066 8.208-3.066 11.339 0z",fill:"#3396ff"})))},v2e=t=>({id:"wallet-connect",logoDark:iP,logoLight:iP,name:"Walletconnect",createConnector:()=>J4(Be({},t))}),y2e=({walletConnectProjectId:t,defaultChainId:e,projectAccessKey:r,appName:n})=>Uq(r,[c2e({appName:n}),l2e({defaultNetwork:e,connect:{app:n,projectAccessKey:r}}),f2e({defaultNetwork:e,connect:{app:n,projectAccessKey:r}}),u2e({defaultNetwork:e,connect:{app:n,projectAccessKey:r}}),m2e({defaultNetwork:e,connect:{app:n}}),a2e({defaultNetwork:e,connect:{app:n}}),d2e(),v2e({projectId:t}),p2e({defaultNetwork:e,connect:{app:n,projectAccessKey:r}})]);var yv={},p2={},xp={};Object.defineProperty(xp,"__esModule",{value:!0});xp.default=void 0;var g2e=w;function b2e(t){(0,g2e.useEffect)(function(){if(t){var e=document.querySelectorAll('script[src="'.concat(t,'"]'))[0];e||(e=document.createElement("script"),e.src=t,e.async=!0,document.body.appendChild(e))}},[t])}var x2e=b2e;xp.default=x2e;var wp={},m2={};Object.defineProperty(m2,"__esModule",{value:!0});m2.default=void 0;var w2e=function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{pollFrequency:1e3,retries:100,parent:window},n=r.pollFrequency,i=n===void 0?1e3:n,s=r.retries,o=s===void 0?100:s,a=r.parent,c=a===void 0?window:a;if(c&&c.hasOwnProperty(e))return Promise.resolve(c[e]);if(!o)return Promise.resolve(void 0);var l=o-1;return new Promise(function(u){return setTimeout(u,typeof i=="function"?i({retries:l}):i)}).then(function(){return t(e,{pollFrequency:i,parent:c,retries:l})})},E2e=w2e;m2.default=E2e;Object.defineProperty(wp,"__esModule",{value:!0});wp.default=void 0;var C2e=S2e(m2);function S2e(t){return t&&t.__esModule?t:{default:t}}var k2e="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js",A2e=function(e){var r=e.authOptions,n=e.onSuccess,i=e.onError;return(0,C2e.default)("AppleID").then(function(){return window.AppleID||console.error(new Error("Error loading apple script")),window.AppleID.auth.init(r),window.AppleID.auth.signIn().then(function(s){return n&&n(s),s}).catch(function(s){return i?i(s):console.error(s),null})}).catch(function(s){return i?i(s):console.error(s),null})},_2e={APPLE_SCRIPT_SRC:k2e,signIn:A2e};wp.default=_2e;Object.defineProperty(p2,"__esModule",{value:!0});p2.default=void 0;var Vs=X4(w),P2e=X4(xp),sP=X4(wp),I2e=["onSuccess","onError","skipScript","authOptions","iconProps","render","uiType","className","noDefaultStyle","buttonExtraChildren"];function X4(t){return t&&t.__esModule?t:{default:t}}function ig(){return ig=Object.assign||function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function $2e(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s=0)&&(r[i]=t[i]);return r}var M2e=` -.react-apple-signin-auth-btn { - background-color: transparent; - border: none; - padding: 0; - cursor: pointer; - border-radius: 4px; - padding: 0 8px 0 2px; - font-size: 14px; - font-size: 1em; - line-height: 1; - border: 1px solid #000; - overflow: hidden; - display: inline-flex; - justify-content: center; - align-items: center; -} -.react-apple-signin-auth-btn-light { - background-color: #FFF; - color: #000; - border-color: #000; -} -.react-apple-signin-auth-btn-dark { - background-color: #000; - color: #FFF; - border-color: #FFF; -}`.replace(/ {2}|\n/g,""),N2e=function(e){var r=e.onSuccess,n=e.onError,i=e.skipScript,s=i===void 0?!1:i,o=e.authOptions,a=e.iconProps,c=e.render,l=e.uiType,u=l===void 0?"dark":l,f=e.className,d=e.noDefaultStyle,h=d===void 0?!1:d,p=e.buttonExtraChildren,m=p===void 0?"Continue with Apple":p,v=R2e(e,I2e);(0,P2e.default)(s?null:sP.default.APPLE_SCRIPT_SRC);var y=function(S){S&&(S.preventDefault(),S.stopPropagation()),sP.default.signIn({authOptions:o,onSuccess:r,onError:n})},b=T2e({children:Vs.default.createElement(Vs.default.Fragment,null,Vs.default.createElement("svg",ig({width:"24px",height:"44px",viewBox:"0 0 24 44"},a),Vs.default.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},Vs.default.createElement("rect",{fill:u==="light"?"#FFF":"#000",x:"0",y:"0",width:"24",height:"44"}),Vs.default.createElement("path",{d:"M12.2337427,16.9879688 C12.8896607,16.9879688 13.7118677,16.5445313 14.2014966,15.9532812 C14.6449341,15.4174609 14.968274,14.6691602 14.968274,13.9208594 C14.968274,13.8192383 14.9590357,13.7176172 14.9405591,13.6344727 C14.2107349,13.6621875 13.3330982,14.1241016 12.8065162,14.7430664 C12.3907935,15.2142188 12.012024,15.9532812 12.012024,16.7108203 C12.012024,16.8216797 12.0305005,16.9325391 12.0397388,16.9694922 C12.0859302,16.9787305 12.1598365,16.9879688 12.2337427,16.9879688 Z M9.92417241,28.1662891 C10.8202857,28.1662891 11.2175318,27.5658008 12.3353638,27.5658008 C13.4716724,27.5658008 13.721106,28.1478125 14.7188404,28.1478125 C15.6980982,28.1478125 16.3540162,27.2424609 16.972981,26.3555859 C17.6658521,25.339375 17.9522388,24.3416406 17.9707154,24.2954492 C17.9060474,24.2769727 16.0306763,23.5101953 16.0306763,21.3576758 C16.0306763,19.491543 17.5088013,18.6508594 17.5919459,18.5861914 C16.612688,17.1819727 15.1253248,17.1450195 14.7188404,17.1450195 C13.6194849,17.1450195 12.7233716,17.8101758 12.1598365,17.8101758 C11.5501099,17.8101758 10.7463794,17.1819727 9.79483648,17.1819727 C7.98413335,17.1819727 6.14571538,18.6785742 6.14571538,21.5054883 C6.14571538,23.2607617 6.8293482,25.1176563 7.67003179,26.3186328 C8.39061773,27.3348438 9.01882085,28.1662891 9.92417241,28.1662891 Z",fill:u==="light"?"#000":"#FFF",fillRule:"nonzero"}))),m),onClick:y},v);return c?c(b):Vs.default.createElement(Vs.default.Fragment,null,Vs.default.createElement("button",ig({className:"".concat(h?"":"react-apple-signin-auth-btn react-apple-signin-auth-btn-".concat(u)).concat(f?" ".concat(f):""),type:"button","aria-label":"Signin with apple ID"},b)),h?null:Vs.default.createElement("style",null,M2e))},D2e=N2e;p2.default=D2e;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"appleAuthHelpers",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"useScript",{enumerable:!0,get:function(){return n.default}}),t.default=void 0;var e=i(p2),r=i(wp),n=i(xp);function i(o){return o&&o.__esModule?o:{default:o}}var s=e.default;t.default=s})(yv);function Z4(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function Cm(){}function aP(){return typeof WeakMap<"u"?new WeakMap:L2e()}function L2e(){return{add:Cm,delete:Cm,get:Cm,set:Cm,has:function(t){return!1}}}var j2e=Object.prototype.hasOwnProperty,M3=function(t,e){return j2e.call(t,e)};function xw(t,e){for(var r in e)M3(e,r)&&(t[r]=e[r]);return t}var B2e=/^[ \t]*(?:\r\n|\r|\n)/,F2e=/(?:\r\n|\r|\n)[ \t]*$/,U2e=/^(?:[\r\n]|$)/,z2e=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,q2e=/^[ \t]*[\r\n][ \t\r\n]*$/;function cP(t,e,r){var n=0,i=t[0].match(z2e);i&&(n=i[1].length);var s="(\\r\\n|\\r|\\n).{0,"+n+"}",o=new RegExp(s,"g");e&&(t=t.slice(1));var a=r.newline,c=r.trimLeadingNewline,l=r.trimTrailingNewline,u=typeof a=="string",f=t.length,d=t.map(function(h,p){return h=h.replace(o,"$1"),p===0&&c&&(h=h.replace(B2e,"")),p===f-1&&l&&(h=h.replace(F2e,"")),u&&(h=h.replace(/\r\n|\n|\r/g,function(m){return a})),h});return d}function W2e(t,e){for(var r="",n=0,i=t.length;n{},registerClassName:()=>{},onEndFileScope:()=>{},registerComposition:()=>{},markCompositionUsed:()=>{},getIdentOption:()=>"short"},gv=[V2e],Ou=()=>{if(gv.length<1)throw new Error("No adapter configured");return gv[gv.length-1]},rz=!1,G2e=t=>{rz||K2e(t)},K2e=t=>{if(!t)throw new Error('No adapter provided when calling "setAdapter"');rz=!0,gv.push(t)},v2=function(){return Ou().appendCss(...arguments)},nz=function(){return Ou().registerClassName(...arguments)},Y2e=function(){return Ou().registerComposition(...arguments)},iz=function(){return Ou().markCompositionUsed(...arguments)},Q2e=function(){for(var e,r,n=arguments.length,i=new Array(n),s=0;s{var{fileScope:e,css:r}=t,n=e.packageName?[e.packageName,e.filePath].join("/"):e.filePath,i=uP[n];if(!i){var s=document.createElement("style");e.packageName&&s.setAttribute("data-package",e.packageName),s.setAttribute("data-file",e.filePath),s.setAttribute("type","text/css"),i=uP[n]=s,document.head.appendChild(s)}i.innerHTML=r};function txe(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}/*! https://mths.be/cssesc v3.0.0 by @mathias */var rxe={},nxe=rxe.hasOwnProperty,ixe=function(e,r){if(!e)return r;var n={};for(var i in r)n[i]=nxe.call(e,i)?e[i]:r[i];return n},sxe=/[ -,\.\/:-@\[-\^`\{-~]/,oxe=/[ -,\.\/:-@\[\]\^`\{-~]/,axe=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,t9=function t(e,r){r=ixe(r,t.options),r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");for(var n=r.quotes=="double"?'"':"'",i=r.isIdentifier,s=e.charAt(0),o="",a=0,c=e.length;a126){if(u>=55296&&u<=56319&&a0;){const a=o.shift();if(a!==void 0)for(const c in r[a]){const l=r[a][c];o.push(l);let u=s[a];for(;u>0&&!(c in r[u]);)u=s[u];if(c in r[u]){const f=r[u][c];s[l]=f,n[l]=[...n[l],...n[f]]}else s[l]=0}}return{gotoFn:r,output:n,failure:s}}search(e){let r=0;const n=[];for(let i=0;i0&&!(s in this.gotoFn[r]);)r=this.failure[r];if(s in this.gotoFn[r]&&(r=this.gotoFn[r][s],this.output[r].length>0)){const o=this.output[r];n.push([i,o])}}return n}}var hr;(function(t){t.Attribute="attribute",t.Pseudo="pseudo",t.PseudoElement="pseudo-element",t.Tag="tag",t.Universal="universal",t.Adjacent="adjacent",t.Child="child",t.Descendant="descendant",t.Parent="parent",t.Sibling="sibling",t.ColumnCombinator="column-combinator"})(hr||(hr={}));var Wi;(function(t){t.Any="any",t.Element="element",t.End="end",t.Equals="equals",t.Exists="exists",t.Hyphen="hyphen",t.Not="not",t.Start="start"})(Wi||(Wi={}));const fP=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,uxe=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,fxe=new Map([[126,Wi.Element],[94,Wi.Start],[36,Wi.End],[42,Wi.Any],[33,Wi.Not],[124,Wi.Hyphen]]),dxe=new Set(["has","not","matches","is","where","host","host-context"]);function hxe(t){switch(t.type){case hr.Adjacent:case hr.Child:case hr.Descendant:case hr.Parent:case hr.Sibling:case hr.ColumnCombinator:return!0;default:return!1}}const pxe=new Set(["contains","icontains"]);function mxe(t,e,r){const n=parseInt(e,16)-65536;return n!==n||r?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320)}function Th(t){return t.replace(uxe,mxe)}function ww(t){return t===39||t===34}function dP(t){return t===32||t===9||t===10||t===12||t===13}function vxe(t){const e=[],r=sz(e,`${t}`,0);if(r0&&r0&&hxe(n[n.length-1]))throw new Error("Did not expect successive traversals.")}function l(d){if(n.length>0&&n[n.length-1].type===hr.Descendant){n[n.length-1].type=d;return}c(),n.push({type:d})}function u(d,h){n.push({type:hr.Attribute,name:d,action:h,value:i(1),namespace:null,ignoreCase:"quirks"})}function f(){if(n.length&&n[n.length-1].type===hr.Descendant&&n.pop(),n.length===0)throw new Error("Empty sub-selector");t.push(n)}if(s(0),e.length===r)return r;e:for(;r=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Wr(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}var gxe=/(\u000D|\u000C|\u000D\u000A)/g,bxe=/[\u0000\uD800-\uDFFF]/g,xxe=/(\/\*)[\s\S]*?(\*\/)/g,wxe=function(e,r){r===void 0&&(r=0),e=e.replace(gxe,` -`).replace(bxe,"�"),e=e.replace(xxe,"");for(var n=[];r"})}else if(i===34){var o=hP(e,r);if(o===null)return null;var a=Wr(o,2),c=a[0],l=a[1];n.push({type:"",value:l}),r=c}else if(i===35){if(r+1=65&&u<=90||u>=97&&u<=122||u>=128||u>=48&&u<=57||u===92&&r+2",value:l.toLowerCase(),flag:f}),r=c;continue}}}n.push({type:"",value:i})}else if(i===39){var o=hP(e,r);if(o===null)return null;var h=Wr(o,2),c=h[0],l=h[1];n.push({type:"",value:l}),r=c}else if(i===40)n.push({type:"<(-token>"});else if(i===41)n.push({type:"<)-token>"});else if(i===43){var p=Sm(e,r);if(p===null)n.push({type:"",value:i});else{var m=Wr(p,2),c=m[0],v=m[1];v[0]===""?n.push({type:"",value:v[1],unit:v[2].toLowerCase(),flag:"number"}):v[0]===""?n.push({type:v[0],value:v[1],flag:v[2]}):n.push({type:v[0],value:v[1],flag:"number"}),r=c}}else if(i===44)n.push({type:""});else if(i===45){var y=Sm(e,r);if(y!==null){var b=Wr(y,2),c=b[0],v=b[1];v[0]===""?n.push({type:"",value:v[1],unit:v[2].toLowerCase(),flag:"number"}):v[0]===""?n.push({type:v[0],value:v[1],flag:v[2]}):n.push({type:v[0],value:v[1],flag:"number"}),r=c;continue}if(r+2"}),r+=2;continue}}var o=pP(e,r);if(o!==null){var S=Wr(o,3),c=S[0],l=S[1],P=S[2];n.push({type:P,value:l}),r=c;continue}n.push({type:"",value:i})}else if(i===46){var y=Sm(e,r);if(y===null)n.push({type:"",value:i});else{var R=Wr(y,2),c=R[0],v=R[1];v[0]===""?n.push({type:"",value:v[1],unit:v[2].toLowerCase(),flag:"number"}):v[0]===""?n.push({type:v[0],value:v[1],flag:v[2]}):n.push({type:v[0],value:v[1],flag:"number"}),r=c;continue}}else if(i===58)n.push({type:""});else if(i===59)n.push({type:""});else if(i===60){if(r+3"}),r+=3;continue}}n.push({type:"",value:i})}else if(i===64){var o=n9(e,r+1);if(o!==null){var j=Wr(o,2),c=j[0],l=j[1];n.push({type:"",value:l.toLowerCase()}),r=c;continue}n.push({type:"",value:i})}else if(i===91)n.push({type:"<[-token>"});else if(i===92){var o=Ep(e,r);if(o===null)return null;var H=Wr(o,2),c=H[0],l=H[1];e=e.slice(0,r)+l+e.slice(c+1),r-=1}else if(i===93)n.push({type:"<]-token>"});else if(i===123)n.push({type:"<{-token>"});else if(i===125)n.push({type:"<}-token>"});else if(i>=48&&i<=57){var o=Sm(e,r),K=Wr(o,2),c=K[0],v=K[1];v[0]===""?n.push({type:"",value:v[1],unit:v[2].toLowerCase(),flag:"number"}):v[0]===""?n.push({type:v[0],value:v[1],flag:v[2]}):n.push({type:v[0],value:v[1],flag:"number"}),r=c}else if(i===95||i>=65&&i<=90||i>=97&&i<=122||i>=128){var o=pP(e,r);if(o===null)return null;var Y=Wr(o,3),c=Y[0],l=Y[1],P=Y[2];n.push({type:P,value:l}),r=c}else n.push({type:"",value:i})}return n.push({type:""}),n},hP=function(e,r){if(e.length<=r+1)return null;for(var n=e.charCodeAt(r),i=[],s=r+1;s=65&&i<=90||i>=97&&i<=122||i>=128)return!0;if(i===92){if(e.length<=r+2)return!1;var s=e.charCodeAt(r+2);return s!==10}else return!1}else{if(n===95||n>=65&&n<=90||n>=97&&n<=122||n>=128)return!0;if(n===92){if(e.length<=r+1)return!1;var i=e.charCodeAt(r+1);return i!==10}else return!1}},Ep=function(e,r){if(e.length<=r+1||e.charCodeAt(r)!==92)return null;var n=e.charCodeAt(r+1);if(n===10)return null;if(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102){for(var i=[n],s=Math.min(r+7,e.length),o=r+2;o=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102)i.push(a);else break}if(o",o,f]]}return s+1",o]]:[s,["",o,a]]},Exe=function(e,r){if(e.length<=r)return null;var n="integer",i=[],s=e.charCodeAt(r);for((s===43||s===45)&&(r+=1,s===45&&i.push(45));r=48&&o<=57)i.push(o),r+=1;else break}if(r+1=48&&c<=57)for(i.push(a,c),n="number",r+=2;r=48&&o<=57)i.push(o),r+=1;else break}}if(r+1=48&&c<=57;if(u||(c===43||c===45)&&l>=48&&l<=57)for(n="number",u?(i.push(69,c),r+=2):c===45?(i.push(69,45,l),r+=3):(i.push(69,l),r+=3);r=48&&o<=57)i.push(o),r+=1;else break}}}var f=String.fromCharCode.apply(null,i),d=n==="number"?parseFloat(f):parseInt(f);return d===-0&&(d=0),Number.isNaN(d)?null:[r-1,d,n]},Cxe=function(e,r){if(e.length<=r)return null;for(var n=[],i=e.charCodeAt(r);r=65&&i<=90||i>=97&&i<=122||i>=128||i>=48&&i<=57){n.push(i);continue}else{var s=Ep(e,r);if(s!==null){var o=Wr(s,2),a=o[0],c=o[1];n.push(c),r=a;continue}}break}return r===0?null:[r-1,String.fromCharCode.apply(null,n)]},n9=function(e,r){if(e.length<=r||!oz(e,r))return null;for(var n=[],i=e.charCodeAt(r);r=65&&i<=90||i>=97&&i<=122||i>=128||i>=48&&i<=57){n.push(i);continue}else{var s=Ep(e,r);if(s!==null){var o=Wr(s,2),a=o[0],c=o[1];n.push(c),r=a;continue}}break}return[r-1,String.fromCharCode.apply(null,n)]},Sxe=function(e,r){for(var n=e.charCodeAt(r);n===9||n===32||n===10;)n=e.charCodeAt(++r);for(var i=[],s=!1;rs+1){var a=e.charCodeAt(s+1);if(a===40){for(var c=2;s+c"];if(l!==9&&l!==32&&l!==10){var u=Sxe(e,s+c);if(u===null)return null;var f=Wr(u,2),d=f[0],h=f[1];return[d,h,""]}}return[s+1,o.toLowerCase(),""]}}}else if(e.length>s+1){var a=e.charCodeAt(s+1);if(a===40)return[s+1,o.toLowerCase(),""]}return[s,o.toLowerCase(),""]},kxe=function(e){for(var r=e.length-1;r>=0;r--)e[r]=Axe(e[r]);return e},Axe=function(e){if(e.mediaCondition===null)return e;var r=_xe(e.mediaCondition);return r.operator===null&&r.children.length===1&&"children"in r.children[0]&&(r=r.children[0]),{mediaPrefix:e.mediaPrefix,mediaType:e.mediaType,mediaCondition:r}},_xe=function t(e){for(var r=e.children.length-1;r>=0;r--){var n=e.children[r];if(!("context"in n)){var i=t(n);if(i.operator===null&&i.children.length===1)e.children[r]=i.children[0];else if(i.operator===e.operator&&(i.operator==="and"||i.operator==="or")){for(var s=[r,1],o=0;o"&&r[0].value==="media"){if(r[1].type!=="")throw Kn("Expected whitespace after media");n=2;for(var s=2;s"){i=s;break}else if(o.type==="")throw Kn("Expected '{' in media query but found ';'")}}return r=r.slice(n,i),Oxe(r)},Txe=function(e){for(var r=[],n=!1,i=0;i"?(n=!0,r.length>0&&(r[r.length-1].wsAfter=!0)):(r.push(og(og({},e[i]),{wsBefore:n,wsAfter:!1})),n=!1);return r},Oxe=function(e){for(var r,n,i=[[]],s=0;s"?i.push([]):i[i.length-1].push(o)}var a=i.map(Txe);if(a.length===1&&a[0].length===0)return[{mediaCondition:null,mediaPrefix:null,mediaType:"all"}];var c=a.map(function(h){return h.length===0?null:Rxe(h)}),l=[];try{for(var u=yxe(c),f=u.next();!f.done;f=u.next()){var d=f.value;d!==null&&l.push(d)}}catch(h){r={error:h}}finally{try{f&&!f.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}if(l.length===0)throw Kn("No valid media queries");return l},Rxe=function(e){var r=e[0];if(r.type==="<(-token>")try{return{mediaPrefix:null,mediaType:"all",mediaCondition:Ew(e,!0)}}catch(f){throw Kn("Expected media condition after '('",f)}else if(r.type===""){var n=null,i=void 0,s=r.value;(s==="only"||s==="not")&&(n=s);var o=n===null?0:1;if(e.length<=o)throw Kn("Expected extra token in media query");var a=e[o];if(a.type===""){var c=a.value;if(c==="all")i="all";else if(c==="print"||c==="screen")i=c;else if(c==="tty"||c==="tv"||c==="projection"||c==="handheld"||c==="braille"||c==="embossed"||c==="aural"||c==="speech")n=n==="not"?null:"not",i="all";else throw Kn("Unknown ident '".concat(c,"' in media query"))}else if(n==="not"&&a.type==="<(-token>"){var l=[{type:"<(-token>",wsBefore:!1,wsAfter:!1}];l.push.apply(l,e),l.push({type:"<)-token>",wsBefore:!1,wsAfter:!1});try{return{mediaPrefix:null,mediaType:"all",mediaCondition:Ew(l,!0)}}catch(f){throw Kn("Expected media condition after '('",f)}}else throw Kn("Invalid media query");if(o+1===e.length)return{mediaPrefix:n,mediaType:i,mediaCondition:null};if(o+4"&&u.value==="and")try{return{mediaPrefix:n,mediaType:i,mediaCondition:Ew(e.slice(o+2),!1)}}catch(f){throw Kn("Expected media condition after 'and'",f)}else throw Kn("Expected 'and' after media prefix")}else throw Kn("Expected media condition after media prefix")}else throw Kn("Expected media condition or media prefix")},Ew=function t(e,r,n){if(n===void 0&&(n=null),e.length<3||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid media condition");for(var i=e.length-1,s=0,o=0,a=0;a"?(o+=1,s=Math.max(s,o)):c.type==="<)-token>"&&(o-=1),o===0){i=a;break}}if(o!==0)throw new Error(`Mismatched parens -Invalid media condition`);var l,u=e.slice(0,i+1);if(s===1?l=$xe(u):u[1].type===""&&u[1].value==="not"?l=t(u.slice(2,-1),!0,"not"):l=t(u.slice(1,-1),!0),i===e.length-1)return{operator:n,children:[l]};var f=e[i+1];if(f.type!=="")throw new Error(`Invalid operator -Invalid media condition`);if(n!==null&&n!==f.value)throw new Error("'".concat(f.value,"' and '").concat(n,`' must not be at same level -Invalid media condition`));if(f.value==="or"&&!r)throw new Error(`Cannot use 'or' at top level of a media query -Invalid media condition`);if(f.value!=="and"&&f.value!=="or")throw new Error("Invalid operator: '".concat(f.value,`' -Invalid media condition`));var d=t(e.slice(i+2),r,f.value);return{operator:f.value,children:[l].concat(d.children)}},$xe=function(e){if(e.length<3||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid media feature");for(var r=[e[0]],n=1;n"&&i.value>0&&s.type===""&&s.value===47&&o.type===""&&o.value>0){r.push({type:"",numerator:i.value,denominator:o.value,wsBefore:i.wsBefore,wsAfter:o.wsAfter}),n+=2;continue}}r.push(e[n])}var a=r[1];if(a.type===""&&r.length===3)return{context:"boolean",feature:a.value};if(r.length===5&&r[1].type===""&&r[2].type===""){var c=r[3];if(c.type===""||c.type===""||c.type===""||c.type===""){var l=r[1].value,u=null,f=l.slice(0,4);f==="min-"?(u="min",l=l.slice(4)):f==="max-"&&(u="max",l=l.slice(4)),c.wsBefore,c.wsAfter;var d=N3(c,["wsBefore","wsAfter"]);return{context:"value",prefix:u,feature:l,value:d}}}else if(r.length>=5)try{var h=Mxe(r);return{context:"range",feature:h.featureName,range:h}}catch(p){throw Kn("Invalid media feature",p)}throw new Error("Invalid media feature")},Mxe=function(e){var r,n,i,s;if(e.length<5||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid range");var o={leftToken:null,leftOp:null,featureName:"",rightOp:null,rightToken:null},a=e[1].type===""||e[1].type===""||e[1].type===""||e[1].type===""&&e[1].value==="infinite";if(e[2].type===""){if(e[2].value===60)e[3].type===""&&e[3].value===61&&!e[3].wsBefore?o[a?"leftOp":"rightOp"]="<=":o[a?"leftOp":"rightOp"]="<";else if(e[2].value===62)e[3].type===""&&e[3].value===61&&!e[3].wsBefore?o[a?"leftOp":"rightOp"]=">=":o[a?"leftOp":"rightOp"]=">";else if(e[2].value===61)o[a?"leftOp":"rightOp"]="=";else throw new Error("Invalid range");if(a)o.leftToken=e[1];else if(e[1].type==="")o.featureName=e[1].value;else throw new Error("Invalid range");var c=2+((n=(r=o[a?"leftOp":"rightOp"])===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0),l=e[c];if(a)if(l.type===""){if(o.featureName=l.value,e.length>=7){var u=e[c+1],f=e[c+2];if(u.type===""){var d=u.value;if(d===60)f.type===""&&f.value===61&&!f.wsBefore?o.rightOp="<=":o.rightOp="<";else if(d===62)f.type===""&&f.value===61&&!f.wsBefore?o.rightOp=">=":o.rightOp=">";else throw new Error("Invalid range");var h=e[c+1+((s=(i=o.rightOp)===null||i===void 0?void 0:i.length)!==null&&s!==void 0?s:0)];o.rightToken=h}else throw new Error("Invalid range")}else if(c+2!==e.length)throw new Error("Invalid range")}else throw new Error("Invalid range");else o.rightToken=l;var p=null,m=o.leftToken,v=o.leftOp,y=o.featureName,b=o.rightOp,E=o.rightToken,S=null;if(m!==null){if(m.type===""){var P=m.type,R=m.value;R==="infinite"&&(S={type:P,value:R})}else if(m.type===""||m.type===""||m.type===""){m.wsBefore,m.wsAfter;var L=N3(m,["wsBefore","wsAfter"]);S=L}}var j=null;if(E!==null){if(E.type===""){var P=E.type,R=E.value;R==="infinite"&&(j={type:P,value:R})}else if(E.type===""||E.type===""||E.type===""){E.wsBefore,E.wsAfter;var H=N3(E,["wsBefore","wsAfter"]);j=H}}if(S!==null&&j!==null)if((v==="<"||v==="<=")&&(b==="<"||b==="<="))p={leftToken:S,leftOp:v,featureName:y,rightOp:b,rightToken:j};else if((v===">"||v===">=")&&(b===">"||b===">="))p={leftToken:S,leftOp:v,featureName:y,rightOp:b,rightToken:j};else throw new Error("Invalid range");else S===null&&v===null&&b!==null&&j!==null?p={leftToken:S,leftOp:v,featureName:y,rightOp:b,rightToken:j}:S!==null&&v!==null&&b===null&&j===null&&(p={leftToken:S,leftOp:v,featureName:y,rightOp:b,rightToken:j});return p}else throw new Error("Invalid range")};function Nxe(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 Dxe(t){var e=Nxe(t,"string");return typeof e=="symbol"?e:String(e)}function Lxe(t,e,r){return e=Dxe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mP(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 w0(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}function vP(t,e){if(t==null)return{};var r=jxe(t,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Oh(t,e){for(var r in t)e(t[r],r)}function Hu(t,e){var r={};for(var n in t)e.indexOf(n)===-1&&(r[n]=t[n]);return r}function Bxe(t,e){var r={};for(var n in t)r[e(t[n],n)]=t[n];return r}function D3(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n{var r=()=>{var i=new RegExp(".".concat(Uxe(r9(e,{isIdentifier:!0}))),"g");return t.replace(i,"&")},n;try{n=vxe(t)}catch{throw new Error("Invalid selector: ".concat(r()))}n.forEach(i=>{try{for(var s=i.length-1;s>=-1;s--){if(!i[s])throw new Error;var o=i[s];if(o.type==="child"||o.type==="parent"||o.type==="sibling"||o.type==="adjacent"||o.type==="descendant")throw new Error;if(o.type==="attribute"&&o.name==="class"&&o.value===e)return}}catch{throw new Error(to(yP||(yP=Z4([` - Invalid selector: `,` - - Style selectors must target the '&' character (along with any modifiers), e.g. `," or ",`. - - This is to ensure that each style block only affects the styling of a single class. - - If your selector is targeting another class, you should move it to the style definition for that class, e.g. given we have styles for 'parent' and 'child' elements, instead of adding a selector of `,") to 'parent', you should add ",` to 'child'). - - If your selector is targeting something global, use the 'globalStyle' function instead, e.g. if you wanted to write `,", you should instead write 'globalStyle(",`, { ... })' - `])),r(),"`${parent} &`","`${parent} &:hover`","`& ${child}`","`${parent} &`","`& h1`","`${parent} h1`"))}})};class ag{constructor(){this.ruleset=new Map,this.precedenceLookup=new Map}findOrCreateCondition(e){var r=this.ruleset.get(e);return r||(r={query:e,rules:[],children:new ag},this.ruleset.set(e,r)),r}getConditionalRulesetByPath(e){var r=this;for(var n of e){var i=r.findOrCreateCondition(n);r=i.children}return r}addRule(e,r,n){var i=this.getConditionalRulesetByPath(n),s=i.findOrCreateCondition(r);if(!s)throw new Error("Failed to add conditional rule");s.rules.push(e)}addConditionPrecedence(e,r){for(var n=this.getConditionalRulesetByPath(e),i=0;ia.has(u.query));l>-1?r.splice(l,0,c):r.push(c)};for(var[i,s]of this.precedenceLookup.entries())n(s);return r}renderToArray(){var e=[];for(var{query:r,rules:n,children:i}of this.getSortedRuleset()){var s={};for(var o of n)s[o.selector]=o.rule;Object.assign(s,...i.renderToArray()),e.push({[r]:s})}return e}}var az={":-moz-any-link":!0,":-moz-full-screen":!0,":-moz-placeholder":!0,":-moz-read-only":!0,":-moz-read-write":!0,":-ms-fullscreen":!0,":-ms-input-placeholder":!0,":-webkit-any-link":!0,":-webkit-full-screen":!0,"::-moz-color-swatch":!0,"::-moz-list-bullet":!0,"::-moz-list-number":!0,"::-moz-page-sequence":!0,"::-moz-page":!0,"::-moz-placeholder":!0,"::-moz-progress-bar":!0,"::-moz-range-progress":!0,"::-moz-range-thumb":!0,"::-moz-range-track":!0,"::-moz-scrolled-page-sequence":!0,"::-moz-selection":!0,"::-ms-backdrop":!0,"::-ms-browse":!0,"::-ms-check":!0,"::-ms-clear":!0,"::-ms-fill-lower":!0,"::-ms-fill-upper":!0,"::-ms-fill":!0,"::-ms-reveal":!0,"::-ms-thumb":!0,"::-ms-ticks-after":!0,"::-ms-ticks-before":!0,"::-ms-tooltip":!0,"::-ms-track":!0,"::-ms-value":!0,"::-webkit-backdrop":!0,"::-webkit-inner-spin-button":!0,"::-webkit-input-placeholder":!0,"::-webkit-meter-bar":!0,"::-webkit-meter-even-less-good-value":!0,"::-webkit-meter-inner-element":!0,"::-webkit-meter-optimum-value":!0,"::-webkit-meter-suboptimum-value":!0,"::-webkit-outer-spin-button":!0,"::-webkit-progress-bar":!0,"::-webkit-progress-inner-element":!0,"::-webkit-progress-inner-value":!0,"::-webkit-progress-value":!0,"::-webkit-resizer":!0,"::-webkit-scrollbar-button":!0,"::-webkit-scrollbar-corner":!0,"::-webkit-scrollbar-thumb":!0,"::-webkit-scrollbar-track-piece":!0,"::-webkit-scrollbar-track":!0,"::-webkit-scrollbar":!0,"::-webkit-search-cancel-button":!0,"::-webkit-search-results-button":!0,"::-webkit-slider-runnable-track":!0,"::-webkit-slider-thumb":!0,"::after":!0,"::backdrop":!0,"::before":!0,"::cue":!0,"::file-selector-button":!0,"::first-letter":!0,"::first-line":!0,"::grammar-error":!0,"::marker":!0,"::placeholder":!0,"::selection":!0,"::spelling-error":!0,"::target-text":!0,"::view-transition-group":!0,"::view-transition-image-pair":!0,"::view-transition-new":!0,"::view-transition-old":!0,"::view-transition":!0,":active":!0,":after":!0,":any-link":!0,":before":!0,":blank":!0,":checked":!0,":default":!0,":defined":!0,":disabled":!0,":empty":!0,":enabled":!0,":first-child":!0,":first-letter":!0,":first-line":!0,":first-of-type":!0,":first":!0,":focus-visible":!0,":focus-within":!0,":focus":!0,":fullscreen":!0,":hover":!0,":in-range":!0,":indeterminate":!0,":invalid":!0,":last-child":!0,":last-of-type":!0,":left":!0,":link":!0,":only-child":!0,":only-of-type":!0,":optional":!0,":out-of-range":!0,":placeholder-shown":!0,":read-only":!0,":read-write":!0,":required":!0,":right":!0,":root":!0,":scope":!0,":target":!0,":valid":!0,":visited":!0},qxe=Object.keys(az),Wxe=az,gP,bP=(t,e)=>new Error(to(gP||(gP=Z4([` - Invalid media query: "`,`" - - `,` - - Read more on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries - `])),t,e)),Hxe=t=>{if(t==="@media ")throw bP(t,"Query is empty");try{Pxe(t)}catch(e){throw bP(t,e.message)}},Vxe=["vars"],Gxe=["content"],cz="__DECLARATION",Kxe={animationIterationCount:!0,borderImage:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,initialLetter:!0,lineClamp:!0,lineHeight:!0,maxLines:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,WebkitLineClamp:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,maskBorder:!0,maskBorderOutset:!0,maskBorderSlice:!0,maskBorderWidth:!0,shapeImageThreshold:!0,stopOpacity:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function Yxe(t){return t.replace(/([A-Z])/g,"-$1").replace(/^ms-/,"-ms-").toLowerCase()}function Qxe(t,e,r,n){var i=t.slice(0,e),s=t.slice(r);return"".concat(i).concat(n).concat(s)}var Jxe=" ",Vu=[...qxe,"@layer","@media","@supports","@container","selectors"];class Xxe{constructor(e,r){this.rules=[],this.conditionalRulesets=[new ag],this.fontFaceRules=[],this.keyframesRules=[],this.localClassNamesMap=new Map(e.map(n=>[n,n])),this.localClassNamesSearch=new lxe(e),this.layers=new Map,this.composedClassLists=r.map(n=>{var{identifier:i,classList:s}=n;return{identifier:i,regex:RegExp("(".concat(s,")"),"g")}}).reverse()}processCssObj(e){if(e.type==="fontFace"){this.fontFaceRules.push(e.rule);return}if(e.type==="keyframes"){e.rule=Object.fromEntries(Object.entries(e.rule).map(s=>{var[o,a]=s;return[o,this.transformProperties(a)]})),this.keyframesRules.push(e);return}if(this.currConditionalRuleset=new ag,e.type==="layer"){var r="@layer ".concat(e.name);this.addLayer([r])}else{var n=Hu(e.rule,Vu);this.addRule({selector:e.selector,rule:n}),this.transformLayer(e,e.rule["@layer"]),this.transformMedia(e,e.rule["@media"]),this.transformSupports(e,e.rule["@supports"]),this.transformContainer(e,e.rule["@container"]),this.transformSimplePseudos(e,e.rule),this.transformSelectors(e,e.rule)}var i=this.conditionalRulesets[this.conditionalRulesets.length-1];i.mergeIfCompatible(this.currConditionalRuleset)||this.conditionalRulesets.push(this.currConditionalRuleset)}addConditionalRule(e,r){var n=this.transformVars(this.transformProperties(e.rule)),i=this.transformSelector(e.selector);if(!this.currConditionalRuleset)throw new Error("Couldn't add conditional rule");var s=r[r.length-1],o=r.slice(0,r.length-1);this.currConditionalRuleset.addRule({selector:i,rule:n},s,o)}addRule(e){var r=this.transformVars(this.transformProperties(e.rule)),n=this.transformSelector(e.selector);this.rules.push({selector:n,rule:r})}addLayer(e){var r=e.join(" - ");this.layers.set(r,e)}transformProperties(e){return this.transformContent(this.pixelifyProperties(e))}pixelifyProperties(e){return Oh(e,(r,n)=>{typeof r=="number"&&r!==0&&!Kxe[n]&&(e[n]="".concat(r,"px"))}),e}transformVars(e){var{vars:r}=e,n=vP(e,Vxe);return r?w0(w0({},Bxe(r,(i,s)=>txe(s))),n):n}transformContent(e){var{content:r}=e,n=vP(e,Gxe);if(typeof r>"u")return n;var i=Array.isArray(r)?r:[r];return w0({content:i.map(s=>s&&(s.includes('"')||s.includes("'")||/^([A-Za-z\-]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)(\s|$)/.test(s))?s:'"'.concat(s,'"'))},n)}transformClassname(e){return".".concat(r9(e,{isIdentifier:!0}))}transformSelector(e){var r=e,n=function(h){r=r.replace(s,()=>(iz(h),h))};for(var{identifier:i,regex:s}of this.composedClassLists)n(i);if(this.localClassNamesMap.has(r))return this.transformClassname(r);for(var o=this.localClassNamesSearch.search(r),a=r.length,c=o.length-1;c>=0;c--){var[l,[u]]=o[c],f=l-u.length+1;f>=a||(a=f,r[f-1]!=="."&&(r=Qxe(r,f,l+1,this.transformClassname(u))))}return r}transformSelectors(e,r,n){Oh(r.selectors,(i,s)=>{if(e.type!=="local")throw new Error("Selectors are not allowed within ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));var o=this.transformSelector(s.replace(RegExp("&","g"),e.selector));zxe(o,e.selector);var a={selector:o,rule:Hu(i,Vu)};n?this.addConditionalRule(a,n):this.addRule(a);var c={type:"selector",selector:o,rule:i};this.transformLayer(c,i["@layer"],n),this.transformSupports(c,i["@supports"],n),this.transformMedia(c,i["@media"],n)})}transformMedia(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var i;(i=this.currConditionalRuleset)===null||i===void 0||i.addConditionPrecedence(n,Object.keys(r).map(l=>"@media ".concat(l)));for(var[s,o]of Object.entries(r)){var a="@media ".concat(s);Hxe(a);var c=[...n,a];this.addConditionalRule({selector:e.selector,rule:Hu(o,Vu)},c),e.type==="local"&&(this.transformSimplePseudos(e,o,c),this.transformSelectors(e,o,c)),this.transformLayer(e,o["@layer"],c),this.transformSupports(e,o["@supports"],c),this.transformContainer(e,o["@container"],c)}}}transformContainer(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var i;(i=this.currConditionalRuleset)===null||i===void 0||i.addConditionPrecedence(n,Object.keys(r).map(s=>"@container ".concat(s))),Oh(r,(s,o)=>{var a="@container ".concat(o),c=[...n,a];this.addConditionalRule({selector:e.selector,rule:Hu(s,Vu)},c),e.type==="local"&&(this.transformSimplePseudos(e,s,c),this.transformSelectors(e,s,c)),this.transformLayer(e,s["@layer"],c),this.transformSupports(e,s["@supports"],c),this.transformMedia(e,s["@media"],c)})}}transformLayer(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var i;(i=this.currConditionalRuleset)===null||i===void 0||i.addConditionPrecedence(n,Object.keys(r).map(s=>"@layer ".concat(s))),Oh(r,(s,o)=>{var a=[...n,"@layer ".concat(o)];this.addLayer(a),this.addConditionalRule({selector:e.selector,rule:Hu(s,Vu)},a),e.type==="local"&&(this.transformSimplePseudos(e,s,a),this.transformSelectors(e,s,a)),this.transformMedia(e,s["@media"],a),this.transformSupports(e,s["@supports"],a),this.transformContainer(e,s["@container"],a)})}}transformSupports(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var i;(i=this.currConditionalRuleset)===null||i===void 0||i.addConditionPrecedence(n,Object.keys(r).map(s=>"@supports ".concat(s))),Oh(r,(s,o)=>{var a=[...n,"@supports ".concat(o)];this.addConditionalRule({selector:e.selector,rule:Hu(s,Vu)},a),e.type==="local"&&(this.transformSimplePseudos(e,s,a),this.transformSelectors(e,s,a)),this.transformLayer(e,s["@layer"],a),this.transformMedia(e,s["@media"],a),this.transformContainer(e,s["@container"],a)})}}transformSimplePseudos(e,r,n){for(var i of Object.keys(r))if(Wxe[i]){if(e.type!=="local")throw new Error("Simple pseudos are not valid in ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));n?this.addConditionalRule({selector:"".concat(e.selector).concat(i),rule:r[i]},n):this.addRule({conditions:n,selector:"".concat(e.selector).concat(i),rule:r[i]})}}toCss(){var e=[];for(var r of this.fontFaceRules)e.push($l({"@font-face":r}));for(var n of this.keyframesRules)e.push($l({["@keyframes ".concat(n.name)]:n.rule}));for(var i of this.layers.values()){var[s,...o]=i.reverse(),a={[s]:cz};for(var c of o)a={[c]:a};e.push($l(a))}for(var l of this.rules)e.push($l({[l.selector]:l.rule}));for(var u of this.conditionalRulesets)for(var f of u.renderToArray())e.push($l(f));return e.filter(Boolean)}}function $l(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=[],n=function(o){var a=t[o];if(a&&Array.isArray(a))r.push(...a.map(l=>$l({[o]:l},e)));else if(a&&typeof a=="object"){var c=Object.keys(a).length===0;c||r.push("".concat(e).concat(o,` { -`).concat($l(a,e+Jxe),` -`).concat(e,"}"))}else a===cz?r.push("".concat(e).concat(o,";")):r.push("".concat(e).concat(o.startsWith("--")?o:Yxe(o),": ").concat(a,";"))};for(var i of Object.keys(t))n(i);return r.join(` -`)}function Zxe(t){var{localClassNames:e,cssObjs:r,composedClassLists:n}=t,i=new Xxe(e,n);for(var s of r)i.processCssObj(s);return i.toCss()}function lz(t){for(var e=0,r,n=0,i=t.length;i>=4;++n,i-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var i9={exports:{}},Cw,xP;function ewe(){return xP||(xP=1,Cw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),Cw}var Sw,wP;function uz(){if(wP)return Sw;wP=1;const t=ewe(),e={};for(const i of Object.keys(t))e[t[i]]=i;const r={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Sw=r;for(const i of Object.keys(r)){if(!("channels"in r[i]))throw new Error("missing channels property: "+i);if(!("labels"in r[i]))throw new Error("missing channel labels property: "+i);if(r[i].labels.length!==r[i].channels)throw new Error("channel and label counts mismatch: "+i);const{channels:s,labels:o}=r[i];delete r[i].channels,delete r[i].labels,Object.defineProperty(r[i],"channels",{value:s}),Object.defineProperty(r[i],"labels",{value:o})}r.rgb.hsl=function(i){const s=i[0]/255,o=i[1]/255,a=i[2]/255,c=Math.min(s,o,a),l=Math.max(s,o,a),u=l-c;let f,d;l===c?f=0:s===l?f=(o-a)/u:o===l?f=2+(a-s)/u:a===l&&(f=4+(s-o)/u),f=Math.min(f*60,360),f<0&&(f+=360);const h=(c+l)/2;return l===c?d=0:h<=.5?d=u/(l+c):d=u/(2-l-c),[f,d*100,h*100]},r.rgb.hsv=function(i){let s,o,a,c,l;const u=i[0]/255,f=i[1]/255,d=i[2]/255,h=Math.max(u,f,d),p=h-Math.min(u,f,d),m=function(v){return(h-v)/6/p+1/2};return p===0?(c=0,l=0):(l=p/h,s=m(u),o=m(f),a=m(d),u===h?c=a-o:f===h?c=1/3+s-a:d===h&&(c=2/3+o-s),c<0?c+=1:c>1&&(c-=1)),[c*360,l*100,h*100]},r.rgb.hwb=function(i){const s=i[0],o=i[1];let a=i[2];const c=r.rgb.hsl(i)[0],l=1/255*Math.min(s,Math.min(o,a));return a=1-1/255*Math.max(s,Math.max(o,a)),[c,l*100,a*100]},r.rgb.cmyk=function(i){const s=i[0]/255,o=i[1]/255,a=i[2]/255,c=Math.min(1-s,1-o,1-a),l=(1-s-c)/(1-c)||0,u=(1-o-c)/(1-c)||0,f=(1-a-c)/(1-c)||0;return[l*100,u*100,f*100,c*100]};function n(i,s){return(i[0]-s[0])**2+(i[1]-s[1])**2+(i[2]-s[2])**2}return r.rgb.keyword=function(i){const s=e[i];if(s)return s;let o=1/0,a;for(const c of Object.keys(t)){const l=t[c],u=n(i,l);u.04045?((s+.055)/1.055)**2.4:s/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;const c=s*.4124+o*.3576+a*.1805,l=s*.2126+o*.7152+a*.0722,u=s*.0193+o*.1192+a*.9505;return[c*100,l*100,u*100]},r.rgb.lab=function(i){const s=r.rgb.xyz(i);let o=s[0],a=s[1],c=s[2];o/=95.047,a/=100,c/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,c=c>.008856?c**(1/3):7.787*c+16/116;const l=116*a-16,u=500*(o-a),f=200*(a-c);return[l,u,f]},r.hsl.rgb=function(i){const s=i[0]/360,o=i[1]/100,a=i[2]/100;let c,l,u;if(o===0)return u=a*255,[u,u,u];a<.5?c=a*(1+o):c=a+o-a*o;const f=2*a-c,d=[0,0,0];for(let h=0;h<3;h++)l=s+1/3*-(h-1),l<0&&l++,l>1&&l--,6*l<1?u=f+(c-f)*6*l:2*l<1?u=c:3*l<2?u=f+(c-f)*(2/3-l)*6:u=f,d[h]=u*255;return d},r.hsl.hsv=function(i){const s=i[0];let o=i[1]/100,a=i[2]/100,c=o;const l=Math.max(a,.01);a*=2,o*=a<=1?a:2-a,c*=l<=1?l:2-l;const u=(a+o)/2,f=a===0?2*c/(l+c):2*o/(a+o);return[s,f*100,u*100]},r.hsv.rgb=function(i){const s=i[0]/60,o=i[1]/100;let a=i[2]/100;const c=Math.floor(s)%6,l=s-Math.floor(s),u=255*a*(1-o),f=255*a*(1-o*l),d=255*a*(1-o*(1-l));switch(a*=255,c){case 0:return[a,d,u];case 1:return[f,a,u];case 2:return[u,a,d];case 3:return[u,f,a];case 4:return[d,u,a];case 5:return[a,u,f]}},r.hsv.hsl=function(i){const s=i[0],o=i[1]/100,a=i[2]/100,c=Math.max(a,.01);let l,u;u=(2-o)*a;const f=(2-o)*c;return l=o*c,l/=f<=1?f:2-f,l=l||0,u/=2,[s,l*100,u*100]},r.hwb.rgb=function(i){const s=i[0]/360;let o=i[1]/100,a=i[2]/100;const c=o+a;let l;c>1&&(o/=c,a/=c);const u=Math.floor(6*s),f=1-a;l=6*s-u,u&1&&(l=1-l);const d=o+l*(f-o);let h,p,m;switch(u){default:case 6:case 0:h=f,p=d,m=o;break;case 1:h=d,p=f,m=o;break;case 2:h=o,p=f,m=d;break;case 3:h=o,p=d,m=f;break;case 4:h=d,p=o,m=f;break;case 5:h=f,p=o,m=d;break}return[h*255,p*255,m*255]},r.cmyk.rgb=function(i){const s=i[0]/100,o=i[1]/100,a=i[2]/100,c=i[3]/100,l=1-Math.min(1,s*(1-c)+c),u=1-Math.min(1,o*(1-c)+c),f=1-Math.min(1,a*(1-c)+c);return[l*255,u*255,f*255]},r.xyz.rgb=function(i){const s=i[0]/100,o=i[1]/100,a=i[2]/100;let c,l,u;return c=s*3.2406+o*-1.5372+a*-.4986,l=s*-.9689+o*1.8758+a*.0415,u=s*.0557+o*-.204+a*1.057,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,c=Math.min(Math.max(0,c),1),l=Math.min(Math.max(0,l),1),u=Math.min(Math.max(0,u),1),[c*255,l*255,u*255]},r.xyz.lab=function(i){let s=i[0],o=i[1],a=i[2];s/=95.047,o/=100,a/=108.883,s=s>.008856?s**(1/3):7.787*s+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;const c=116*o-16,l=500*(s-o),u=200*(o-a);return[c,l,u]},r.lab.xyz=function(i){const s=i[0],o=i[1],a=i[2];let c,l,u;l=(s+16)/116,c=o/500+l,u=l-a/200;const f=l**3,d=c**3,h=u**3;return l=f>.008856?f:(l-16/116)/7.787,c=d>.008856?d:(c-16/116)/7.787,u=h>.008856?h:(u-16/116)/7.787,c*=95.047,l*=100,u*=108.883,[c,l,u]},r.lab.lch=function(i){const s=i[0],o=i[1],a=i[2];let c;c=Math.atan2(a,o)*360/2/Math.PI,c<0&&(c+=360);const u=Math.sqrt(o*o+a*a);return[s,u,c]},r.lch.lab=function(i){const s=i[0],o=i[1],c=i[2]/360*2*Math.PI,l=o*Math.cos(c),u=o*Math.sin(c);return[s,l,u]},r.rgb.ansi16=function(i,s=null){const[o,a,c]=i;let l=s===null?r.rgb.hsv(i)[2]:s;if(l=Math.round(l/50),l===0)return 30;let u=30+(Math.round(c/255)<<2|Math.round(a/255)<<1|Math.round(o/255));return l===2&&(u+=60),u},r.hsv.ansi16=function(i){return r.rgb.ansi16(r.hsv.rgb(i),i[2])},r.rgb.ansi256=function(i){const s=i[0],o=i[1],a=i[2];return s===o&&o===a?s<8?16:s>248?231:Math.round((s-8)/247*24)+232:16+36*Math.round(s/255*5)+6*Math.round(o/255*5)+Math.round(a/255*5)},r.ansi16.rgb=function(i){let s=i%10;if(s===0||s===7)return i>50&&(s+=3.5),s=s/10.5*255,[s,s,s];const o=(~~(i>50)+1)*.5,a=(s&1)*o*255,c=(s>>1&1)*o*255,l=(s>>2&1)*o*255;return[a,c,l]},r.ansi256.rgb=function(i){if(i>=232){const l=(i-232)*10+8;return[l,l,l]}i-=16;let s;const o=Math.floor(i/36)/5*255,a=Math.floor((s=i%36)/6)/5*255,c=s%6/5*255;return[o,a,c]},r.rgb.hex=function(i){const o=(((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255)).toString(16).toUpperCase();return"000000".substring(o.length)+o},r.hex.rgb=function(i){const s=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!s)return[0,0,0];let o=s[0];s[0].length===3&&(o=o.split("").map(f=>f+f).join(""));const a=parseInt(o,16),c=a>>16&255,l=a>>8&255,u=a&255;return[c,l,u]},r.rgb.hcg=function(i){const s=i[0]/255,o=i[1]/255,a=i[2]/255,c=Math.max(Math.max(s,o),a),l=Math.min(Math.min(s,o),a),u=c-l;let f,d;return u<1?f=l/(1-u):f=0,u<=0?d=0:c===s?d=(o-a)/u%6:c===o?d=2+(a-s)/u:d=4+(s-o)/u,d/=6,d%=1,[d*360,u*100,f*100]},r.hsl.hcg=function(i){const s=i[1]/100,o=i[2]/100,a=o<.5?2*s*o:2*s*(1-o);let c=0;return a<1&&(c=(o-.5*a)/(1-a)),[i[0],a*100,c*100]},r.hsv.hcg=function(i){const s=i[1]/100,o=i[2]/100,a=s*o;let c=0;return a<1&&(c=(o-a)/(1-a)),[i[0],a*100,c*100]},r.hcg.rgb=function(i){const s=i[0]/360,o=i[1]/100,a=i[2]/100;if(o===0)return[a*255,a*255,a*255];const c=[0,0,0],l=s%1*6,u=l%1,f=1-u;let d=0;switch(Math.floor(l)){case 0:c[0]=1,c[1]=u,c[2]=0;break;case 1:c[0]=f,c[1]=1,c[2]=0;break;case 2:c[0]=0,c[1]=1,c[2]=u;break;case 3:c[0]=0,c[1]=f,c[2]=1;break;case 4:c[0]=u,c[1]=0,c[2]=1;break;default:c[0]=1,c[1]=0,c[2]=f}return d=(1-o)*a,[(o*c[0]+d)*255,(o*c[1]+d)*255,(o*c[2]+d)*255]},r.hcg.hsv=function(i){const s=i[1]/100,o=i[2]/100,a=s+o*(1-s);let c=0;return a>0&&(c=s/a),[i[0],c*100,a*100]},r.hcg.hsl=function(i){const s=i[1]/100,a=i[2]/100*(1-s)+.5*s;let c=0;return a>0&&a<.5?c=s/(2*a):a>=.5&&a<1&&(c=s/(2*(1-a))),[i[0],c*100,a*100]},r.hcg.hwb=function(i){const s=i[1]/100,o=i[2]/100,a=s+o*(1-s);return[i[0],(a-s)*100,(1-a)*100]},r.hwb.hcg=function(i){const s=i[1]/100,a=1-i[2]/100,c=a-s;let l=0;return c<1&&(l=(a-c)/(1-c)),[i[0],c*100,l*100]},r.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]},r.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]},r.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]},r.gray.hsl=function(i){return[0,0,i[0]]},r.gray.hsv=r.gray.hsl,r.gray.hwb=function(i){return[0,100,i[0]]},r.gray.cmyk=function(i){return[0,0,0,i[0]]},r.gray.lab=function(i){return[i[0],0,0]},r.gray.hex=function(i){const s=Math.round(i[0]/100*255)&255,a=((s<<16)+(s<<8)+s).toString(16).toUpperCase();return"000000".substring(a.length)+a},r.rgb.gray=function(i){return[(i[0]+i[1]+i[2])/3/255*100]},Sw}var kw,EP;function twe(){if(EP)return kw;EP=1;const t=uz();function e(){const s={},o=Object.keys(t);for(let a=o.length,c=0;c1&&(c=l),o(c))};return"conversion"in o&&(a.conversion=o.conversion),a}function s(o){const a=function(...c){const l=c[0];if(l==null)return l;l.length>1&&(c=l);const u=o(c);if(typeof u=="object")for(let f=u.length,d=0;d{r[o]={},Object.defineProperty(r[o],"channels",{value:t[o].channels}),Object.defineProperty(r[o],"labels",{value:t[o].labels});const a=e(o);Object.keys(a).forEach(l=>{const u=a[l];r[o][l]=s(u),r[o][l].raw=i(u)})}),Aw=r,Aw}i9.exports;(function(t){const e=(u,f)=>(...d)=>`\x1B[${u(...d)+f}m`,r=(u,f)=>(...d)=>{const h=u(...d);return`\x1B[${38+f};5;${h}m`},n=(u,f)=>(...d)=>{const h=u(...d);return`\x1B[${38+f};2;${h[0]};${h[1]};${h[2]}m`},i=u=>u,s=(u,f,d)=>[u,f,d],o=(u,f,d)=>{Object.defineProperty(u,f,{get:()=>{const h=d();return Object.defineProperty(u,f,{value:h,enumerable:!0,configurable:!0}),h},enumerable:!0,configurable:!0})};let a;const c=(u,f,d,h)=>{a===void 0&&(a=rwe());const p=h?10:0,m={};for(const[v,y]of Object.entries(a)){const b=v==="ansi16"?"ansi":v;v===f?m[b]=u(d,p):typeof y=="object"&&(m[b]=u(y[f],p))}return m};function l(){const u=new Map,f={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};f.color.gray=f.color.blackBright,f.bgColor.bgGray=f.bgColor.bgBlackBright,f.color.grey=f.color.blackBright,f.bgColor.bgGrey=f.bgColor.bgBlackBright;for(const[d,h]of Object.entries(f)){for(const[p,m]of Object.entries(h))f[p]={open:`\x1B[${m[0]}m`,close:`\x1B[${m[1]}m`},h[p]=f[p],u.set(m[0],m[1]);Object.defineProperty(f,d,{value:h,enumerable:!1})}return Object.defineProperty(f,"codes",{value:u,enumerable:!1}),f.color.close="\x1B[39m",f.bgColor.close="\x1B[49m",o(f.color,"ansi",()=>c(e,"ansi16",i,!1)),o(f.color,"ansi256",()=>c(r,"ansi256",i,!1)),o(f.color,"ansi16m",()=>c(n,"rgb",s,!1)),o(f.bgColor,"ansi",()=>c(e,"ansi16",i,!0)),o(f.bgColor,"ansi256",()=>c(r,"ansi256",i,!0)),o(f.bgColor,"ansi16m",()=>c(n,"rgb",s,!0)),f}Object.defineProperty(t,"exports",{enumerable:!0,get:l})})(i9);var nwe=i9.exports,iwe={stdout:!1,stderr:!1};const swe=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;const i=e.length;let s=0,o="";do o+=t.substr(s,n-s)+e+r,s=n+i,n=t.indexOf(e,s);while(n!==-1);return o+=t.substr(s),o},owe=(t,e,r,n)=>{let i=0,s="";do{const o=t[n-1]==="\r";s+=t.substr(i,(o?n-1:n)-i)+e+(o?`\r -`:` -`)+r,i=n+1,n=t.indexOf(` -`,i)}while(n!==-1);return s+=t.substr(i),s};var awe={stringReplaceAll:swe,stringEncaseCRLFWithFirstIndex:owe},_w,SP;function cwe(){if(SP)return _w;SP=1;const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,e=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,r=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,n=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,i=new Map([["n",` -`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function s(l){const u=l[0]==="u",f=l[1]==="{";return u&&!f&&l.length===5||l[0]==="x"&&l.length===3?String.fromCharCode(parseInt(l.slice(1),16)):u&&f?String.fromCodePoint(parseInt(l.slice(2,-1),16)):i.get(l)||l}function o(l,u){const f=[],d=u.trim().split(/\s*,\s*/g);let h;for(const p of d){const m=Number(p);if(!Number.isNaN(m))f.push(m);else if(h=p.match(r))f.push(h[2].replace(n,(v,y,b)=>y?s(y):b));else throw new Error(`Invalid Chalk template style argument: ${p} (in style '${l}')`)}return f}function a(l){e.lastIndex=0;const u=[];let f;for(;(f=e.exec(l))!==null;){const d=f[1];if(f[2]){const h=o(d,f[2]);u.push([d].concat(h))}else u.push([d])}return u}function c(l,u){const f={};for(const h of u)for(const p of h.styles)f[p[0]]=h.inverse?null:p.slice(1);let d=l;for(const[h,p]of Object.entries(f))if(Array.isArray(p)){if(!(h in d))throw new Error(`Unknown Chalk style: ${h}`);d=p.length>0?d[h](...p):d[h]}return d}return _w=(l,u)=>{const f=[],d=[];let h=[];if(u.replace(t,(p,m,v,y,b,E)=>{if(m)h.push(s(m));else if(y){const S=h.join("");h=[],d.push(f.length===0?S:c(l,f)(S)),f.push({inverse:v,styles:a(y)})}else if(b){if(f.length===0)throw new Error("Found extraneous } in Chalk template literal");d.push(c(l,f)(h.join(""))),h=[],f.pop()}else h.push(E)}),d.push(h.join("")),f.length>0){const p=`Chalk template literal is missing ${f.length} closing bracket${f.length===1?"":"s"} (\`}\`)`;throw new Error(p)}return d.join("")},_w}const P1=nwe,{stdout:L3,stderr:j3}=iwe,{stringReplaceAll:lwe,stringEncaseCRLFWithFirstIndex:uwe}=awe,{isArray:cg}=Array,fz=["ansi","ansi","ansi256","ansi16m"],Xd=Object.create(null),fwe=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const r=L3?L3.level:0;t.level=e.level===void 0?r:e.level};class dwe{constructor(e){return dz(e)}}const dz=t=>{const e={};return fwe(e,t),e.template=(...r)=>pz(e.template,...r),Object.setPrototypeOf(e,y2.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=dwe,e.template};function y2(t){return dz(t)}for(const[t,e]of Object.entries(P1))Xd[t]={get(){const r=g2(this,s9(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Xd.visible={get(){const t=g2(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};const hz=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const t of hz)Xd[t]={get(){const{level:e}=this;return function(...r){const n=s9(P1.color[fz[e]][t](...r),P1.color.close,this._styler);return g2(this,n,this._isEmpty)}}};for(const t of hz){const e="bg"+t[0].toUpperCase()+t.slice(1);Xd[e]={get(){const{level:r}=this;return function(...n){const i=s9(P1.bgColor[fz[r]][t](...n),P1.bgColor.close,this._styler);return g2(this,i,this._isEmpty)}}}}const hwe=Object.defineProperties(()=>{},{...Xd,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),s9=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},g2=(t,e,r)=>{const n=(...i)=>cg(i[0])&&cg(i[0].raw)?kP(n,pz(n,...i)):kP(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,hwe),n._generator=t,n._styler=e,n._isEmpty=r,n},kP=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;const{openAll:n,closeAll:i}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=lwe(e,r.close,r.open),r=r.parent;const s=e.indexOf(` -`);return s!==-1&&(e=uwe(e,i,n,s)),n+e+i};let Pw;const pz=(t,...e)=>{const[r]=e;if(!cg(r)||!cg(r.raw))return e.join(" ");const n=e.slice(1),i=[r.raw[0]];for(let s=1;s{Iw.push(t)},registerClassName:t=>{_P.add(t)},registerComposition:t=>{PP.push(t)},markCompositionUsed:()=>{},onEndFileScope:t=>{var e=Zxe({localClassNames:Array.from(_P),composedClassLists:PP,cssObjs:Iw}).join(` -`);exe({fileScope:t,css:e}),Iw=[]},getIdentOption:()=>"short"};G2e(Iwe);function lg(t,e){return lg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},lg(t,e)}function Twe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lg(t,e)}function B3(){B3=function(i,s){return new r(i,void 0,s)};var t=RegExp.prototype,e=new WeakMap;function r(i,s,o){var a=new RegExp(i,s);return e.set(a,o||e.get(i)),lg(a,r.prototype)}function n(i,s){var o=e.get(s);return Object.keys(o).reduce(function(a,c){var l=o[c];if(typeof l=="number")a[c]=i[l];else{for(var u=0;i[l[u]]===void 0&&u+1]+)>/g,function(c,l){var u=o[l];return"$"+(Array.isArray(u)?u.join("$"):u)}))}if(typeof s=="function"){var a=this;return t[Symbol.replace].call(this,i,function(){var c=arguments;return typeof c[c.length-1]!="object"&&(c=[].slice.call(c)).push(n(c,a)),s.apply(this,c)})}return t[Symbol.replace].call(this,i,s)},B3.apply(this,arguments)}function Owe(t){var{debugId:e,debugFileName:r}=t,n=e?[e.replace(/\s/g,"_")]:[];if(r){var{filePath:i}=bo(),s=i.match(B3(/([^\/\\]*)?[\/\\]?([^\/\\]*)\.css\.(ts|js|tsx|jsx|cjs|mjs)$/,{dir:1,file:2}));if(s&&s.groups){var{dir:o,file:a}=s.groups;n.unshift(a&&a!=="index"?a:o)}}return n.join("_")}function IP(t){return t.match(/^[0-9]/)?"_".concat(t):t}function a9(t){var e=X2e(),{debugId:r,debugFileName:n=!0}=w0(w0({},typeof t=="string"?{debugId:t}:null),typeof t=="object"?t:null),i=Z2e().toString(36),{filePath:s,packageName:o}=bo(),a=lz(o?"".concat(o).concat(s):s),c="".concat(a).concat(i);if(e==="debug"){var l=Owe({debugId:r,debugFileName:n});return l&&(c="".concat(l,"__").concat(c)),IP(c)}if(typeof e=="function"){if(c=e({hash:c,debugId:r,filePath:s,packageName:o}),!c.match(/^[A-Z_][0-9A-Z_-]+$/i))throw new Error('Identifier function returned invalid indentifier: "'.concat(c,'"'));return c}return IP(c)}function Rwe(t,e){var r=a9(e);nz(r,bo());var n=[],i=[];for(var s of t)typeof s=="string"?n.push(s):i.push(s);var o=r;if(n.length>0&&(o="".concat(r," ").concat(Fxe(n)),Y2e({identifier:r,classList:o},bo()),i.length>0&&iz(r)),i.length>0){var a=Pwe.all(i,{arrayMerge:(c,l)=>l});v2({type:"local",selector:r,rule:a},bo())}return o}function Fr(t,e){if(Array.isArray(t))return Rwe(t,e);var r=a9(e);return nz(r,bo()),v2({type:"local",selector:r,rule:t},bo()),r}function hi(t,e){v2({type:"global",selector:t,rule:e},bo())}function c9(t,e){var r=r9(a9(e),{isIdentifier:!0});return v2({type:"keyframes",name:r,rule:t},bo()),r}function $we(t,e,r){return t===t&&(r!==void 0&&(t=t<=r?t:r),e!==void 0&&(t=t>=e?t:e)),t}var vz=$we;function Mwe(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r-1&&t%1==0&&t-1&&t%1==0&&t<=L5e}var kz=j5e,B5e=b2,F5e=kz,U5e=x2,z5e="[object Arguments]",q5e="[object Array]",W5e="[object Boolean]",H5e="[object Date]",V5e="[object Error]",G5e="[object Function]",K5e="[object Map]",Y5e="[object Number]",Q5e="[object Object]",J5e="[object RegExp]",X5e="[object Set]",Z5e="[object String]",e6e="[object WeakMap]",t6e="[object ArrayBuffer]",r6e="[object DataView]",n6e="[object Float32Array]",i6e="[object Float64Array]",s6e="[object Int8Array]",o6e="[object Int16Array]",a6e="[object Int32Array]",c6e="[object Uint8Array]",l6e="[object Uint8ClampedArray]",u6e="[object Uint16Array]",f6e="[object Uint32Array]",rr={};rr[n6e]=rr[i6e]=rr[s6e]=rr[o6e]=rr[a6e]=rr[c6e]=rr[l6e]=rr[u6e]=rr[f6e]=!0;rr[z5e]=rr[q5e]=rr[t6e]=rr[W5e]=rr[r6e]=rr[H5e]=rr[V5e]=rr[G5e]=rr[K5e]=rr[Y5e]=rr[Q5e]=rr[J5e]=rr[X5e]=rr[Z5e]=rr[e6e]=!1;function d6e(t){return U5e(t)&&F5e(t.length)&&!!rr[B5e(t)]}var h6e=d6e;function p6e(t){return function(e){return t(e)}}var m6e=p6e,fg={exports:{}};fg.exports;(function(t,e){var r=gz,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,s=i&&i.exports===n,o=s&&r.process,a=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();t.exports=a})(fg,fg.exports);var v6e=fg.exports,y6e=h6e,g6e=m6e,MP=v6e,NP=MP&&MP.isTypedArray,b6e=NP?g6e(NP):y6e,x6e=b6e,w6e=Zwe,E6e=I5e,C6e=Cz,S6e=$5e,k6e=Sz,A6e=x6e,_6e=Object.prototype,P6e=_6e.hasOwnProperty;function I6e(t,e){var r=C6e(t),n=!r&&E6e(t),i=!r&&!n&&S6e(t),s=!r&&!n&&!i&&A6e(t),o=r||n||i||s,a=o?w6e(t.length,String):[],c=a.length;for(var l in t)(e||P6e.call(t,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||s&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||k6e(l,c)))&&a.push(l);return a}var T6e=I6e,O6e=Object.prototype;function R6e(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||O6e;return t===r}var $6e=R6e;function M6e(t,e){return function(r){return t(e(r))}}var N6e=M6e,D6e=N6e,L6e=D6e(Object.keys,Object),j6e=L6e,B6e=$6e,F6e=j6e,U6e=Object.prototype,z6e=U6e.hasOwnProperty;function q6e(t){if(!B6e(t))return F6e(t);var e=[];for(var r in Object(t))z6e.call(t,r)&&r!="constructor"&&e.push(r);return e}var W6e=q6e;function H6e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var l9=H6e,V6e=b2,G6e=l9,K6e="[object AsyncFunction]",Y6e="[object Function]",Q6e="[object GeneratorFunction]",J6e="[object Proxy]";function X6e(t){if(!G6e(t))return!1;var e=V6e(t);return e==Y6e||e==Q6e||e==K6e||e==J6e}var Z6e=X6e,e3e=Z6e,t3e=kz;function r3e(t){return t!=null&&t3e(t.length)&&!e3e(t)}var Az=r3e,n3e=T6e,i3e=W6e,s3e=Az;function o3e(t){return s3e(t)?n3e(t):i3e(t)}var a3e=o3e,c3e=Jwe,l3e=a3e;function u3e(t){return t==null?[]:c3e(t,l3e(t))}var f3e=u3e,d3e=vz,h3e=yz,p3e=f3e;function m3e(t,e){var r=p3e(t);return h3e(r,d3e(e,0,r.length))}var v3e=m3e;function y3e(t,e){return t===e||t!==t&&e!==e}var g3e=y3e,b3e=g3e,x3e=Az,w3e=Sz,E3e=l9;function C3e(t,e,r){if(!E3e(r))return!1;var n=typeof e;return(n=="number"?x3e(r)&&w3e(e,r.length):n=="string"&&e in r)?b3e(r[e],t):!1}var S3e=C3e,k3e=/\s/;function A3e(t){for(var e=t.length;e--&&k3e.test(t.charAt(e)););return e}var _3e=A3e,P3e=_3e,I3e=/^\s+/;function T3e(t){return t&&t.slice(0,P3e(t)+1).replace(I3e,"")}var O3e=T3e,R3e=b2,$3e=x2,M3e="[object Symbol]";function N3e(t){return typeof t=="symbol"||$3e(t)&&R3e(t)==M3e}var D3e=N3e,L3e=O3e,DP=l9,j3e=D3e,LP=NaN,B3e=/^[-+]0x[0-9a-f]+$/i,F3e=/^0b[01]+$/i,U3e=/^0o[0-7]+$/i,z3e=parseInt;function q3e(t){if(typeof t=="number")return t;if(j3e(t))return LP;if(DP(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=DP(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=L3e(t);var r=F3e.test(t);return r||U3e.test(t)?z3e(t.slice(2),r?2:8):B3e.test(t)?LP:+t}var W3e=q3e,H3e=W3e,jP=1/0,V3e=17976931348623157e292;function G3e(t){if(!t)return t===0?t:0;if(t=H3e(t),t===jP||t===-jP){var e=t<0?-1:1;return e*V3e}return t===t?t:0}var K3e=G3e,Y3e=K3e;function Q3e(t){var e=Y3e(t),r=e%1;return e===e?r?e-r:e:0}var J3e=Q3e,X3e=Vwe,Z3e=v3e,eEe=Cz,tEe=S3e,rEe=J3e;function nEe(t,e,r){(r?tEe(t,e,r):e===void 0)?e=1:e=rEe(e);var n=eEe(t)?X3e:Z3e;return n(t,e)}var iEe=nEe;const sEe=Ii(iEe);var w2={},oEe=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],n=0;n"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=BP[e.format]||BP.default;window.clipboardData.setData(f,t)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,t);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(a),s.selectNodeContents(a),o.addRange(s);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");c=!0}catch(u){r&&console.error("unable to copy using execCommand: ",u),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),c=!0}catch(f){r&&console.error("unable to copy using clipboardData: ",f),r&&console.error("falling back to prompt"),n=lEe("message"in e?e.message:cEe),window.prompt(n,t)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(s):o.removeAllRanges()),a&&document.body.removeChild(a),i()}return c}var fEe=uEe;function F3(t){"@babel/helpers - typeof";return F3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F3(t)}Object.defineProperty(w2,"__esModule",{value:!0});w2.CopyToClipboard=void 0;var km=_z(w),dEe=_z(fEe),hEe=["text","onCopy","options","children"];function _z(t){return t&&t.__esModule?t:{default:t}}function FP(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 UP(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function mEe(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s=0)&&(r[i]=t[i]);return r}function vEe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zP(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function dg(t){return dg=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},dg(t)}function u9(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Iz=function(t){gEe(r,t);var e=bEe(r);function r(){var n;vEe(this,r);for(var i=arguments.length,s=new Array(i),o=0;oe in t?CEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,T1=(t,e)=>{for(var r in e||(e={}))Oz.call(e,r)&&qP(t,r,e[r]);if(hg)for(var r of hg(e))Rz.call(e,r)&&qP(t,r,e[r]);return t},f9=(t,e)=>{var r={};for(var n in t)Oz.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&hg)for(var n of hg(t))e.indexOf(n)<0&&Rz.call(t,n)&&(r[n]=t[n]);return r};/** - * @license QR Code generator library (TypeScript) - * Copyright (c) Project Nayuki. - * SPDX-License-Identifier: MIT - */var yu;(t=>{const e=class{constructor(c,l,u,f){if(this.version=c,this.errorCorrectionLevel=l,this.modules=[],this.isFunction=[],ce.MAX_VERSION)throw new RangeError("Version value out of range");if(f<-1||f>7)throw new RangeError("Mask value out of range");this.size=c*4+17;let d=[];for(let p=0;p7)throw new RangeError("Invalid value");let p,m;for(p=u;;p++){const E=e.getNumDataCodewords(p,l)*8,S=a.getTotalBits(c,p);if(S<=E){m=S;break}if(p>=f)throw new RangeError("Data too long")}for(const E of[e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])h&&m<=e.getNumDataCodewords(p,E)*8&&(l=E);let v=[];for(const E of c){n(E.mode.modeBits,4,v),n(E.numChars,E.mode.numCharCountBits(p),v);for(const S of E.getData())v.push(S)}s(v.length==m);const y=e.getNumDataCodewords(p,l)*8;s(v.length<=y),n(0,Math.min(4,y-v.length),v),n(0,(8-v.length%8)%8,v),s(v.length%8==0);for(let E=236;v.lengthb[S>>>3]|=E<<7-(S&7)),new e(p,l,b,d)}getModule(c,l){return 0<=c&&c>>9)*1335;const f=(l<<10|u)^21522;s(f>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,i(f,d));this.setFunctionModule(8,7,i(f,6)),this.setFunctionModule(8,8,i(f,7)),this.setFunctionModule(7,8,i(f,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,i(f,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,i(f,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,i(f,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let c=this.version;for(let u=0;u<12;u++)c=c<<1^(c>>>11)*7973;const l=this.version<<12|c;s(l>>>18==0);for(let u=0;u<18;u++){const f=i(l,u),d=this.size-11+u%3,h=Math.floor(u/3);this.setFunctionModule(d,h,f),this.setFunctionModule(h,d,f)}}drawFinderPattern(c,l){for(let u=-4;u<=4;u++)for(let f=-4;f<=4;f++){const d=Math.max(Math.abs(f),Math.abs(u)),h=c+f,p=l+u;0<=h&&h{(E!=m-d||P>=p)&&b.push(S[E])});return s(b.length==h),b}drawCodewords(c){if(c.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let l=0;for(let u=this.size-1;u>=1;u-=2){u==6&&(u=5);for(let f=0;f>>3],7-(l&7)),l++)}}s(l==c.length*8)}applyMask(c){if(c<0||c>7)throw new RangeError("Mask value out of range");for(let l=0;l5&&c++):(this.finderPenaltyAddHistory(p,m),h||(c+=this.finderPenaltyCountPatterns(m)*e.PENALTY_N3),h=this.modules[d][v],p=1);c+=this.finderPenaltyTerminateAndCount(h,p,m)*e.PENALTY_N3}for(let d=0;d5&&c++):(this.finderPenaltyAddHistory(p,m),h||(c+=this.finderPenaltyCountPatterns(m)*e.PENALTY_N3),h=this.modules[v][d],p=1);c+=this.finderPenaltyTerminateAndCount(h,p,m)*e.PENALTY_N3}for(let d=0;dh+(p?1:0),l);const u=this.size*this.size,f=Math.ceil(Math.abs(l*20-u*10)/u)-1;return s(0<=f&&f<=9),c+=f*e.PENALTY_N4,s(0<=c&&c<=2568888),c}getAlignmentPatternPositions(){if(this.version==1)return[];{const c=Math.floor(this.version/7)+2,l=this.version==32?26:Math.ceil((this.version*4+4)/(c*2-2))*2;let u=[6];for(let f=this.size-7;u.lengthe.MAX_VERSION)throw new RangeError("Version number out of range");let l=(16*c+128)*c+64;if(c>=2){const u=Math.floor(c/7)+2;l-=(25*u-10)*u-55,c>=7&&(l-=36)}return s(208<=l&&l<=29648),l}static getNumDataCodewords(c,l){return Math.floor(e.getNumRawDataModules(c)/8)-e.ECC_CODEWORDS_PER_BLOCK[l.ordinal][c]*e.NUM_ERROR_CORRECTION_BLOCKS[l.ordinal][c]}static reedSolomonComputeDivisor(c){if(c<1||c>255)throw new RangeError("Degree out of range");let l=[];for(let f=0;f0);for(const f of c){const d=f^u.shift();u.push(0),l.forEach((h,p)=>u[p]^=e.reedSolomonMultiply(h,d))}return u}static reedSolomonMultiply(c,l){if(c>>>8||l>>>8)throw new RangeError("Byte out of range");let u=0;for(let f=7;f>=0;f--)u=u<<1^(u>>>7)*285,u^=(l>>>f&1)*c;return s(u>>>8==0),u}finderPenaltyCountPatterns(c){const l=c[1];s(l<=this.size*3);const u=l>0&&c[2]==l&&c[3]==l*3&&c[4]==l&&c[5]==l;return(u&&c[0]>=l*4&&c[6]>=l?1:0)+(u&&c[6]>=l*4&&c[0]>=l?1:0)}finderPenaltyTerminateAndCount(c,l,u){return c&&(this.finderPenaltyAddHistory(l,u),l=0),l+=this.size,this.finderPenaltyAddHistory(l,u),this.finderPenaltyCountPatterns(u)}finderPenaltyAddHistory(c,l){l[0]==0&&(c+=this.size),l.pop(),l.unshift(c)}};let r=e;r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],t.QrCode=r;function n(c,l,u){if(l<0||l>31||c>>>l)throw new RangeError("Value out of range");for(let f=l-1;f>=0;f--)u.push(c>>>f&1)}function i(c,l){return(c>>>l&1)!=0}function s(c){if(!c)throw new Error("Assertion error")}const o=class{constructor(c,l,u){if(this.mode=c,this.numChars=l,this.bitData=u,l<0)throw new RangeError("Invalid argument");this.bitData=u.slice()}static makeBytes(c){let l=[];for(const u of c)n(u,8,l);return new o(o.Mode.BYTE,c.length,l)}static makeNumeric(c){if(!o.isNumeric(c))throw new RangeError("String contains non-numeric characters");let l=[];for(let u=0;u=1<{(e=>{const r=class{constructor(i,s){this.ordinal=i,this.formatBits=s}};let n=r;n.LOW=new r(0,1),n.MEDIUM=new r(1,0),n.QUARTILE=new r(2,3),n.HIGH=new r(3,2),e.Ecc=n})(t.QrCode||(t.QrCode={}))})(yu||(yu={}));(t=>{(e=>{const r=class{constructor(i,s){this.modeBits=i,this.numBitsCharCount=s}numCharCountBits(i){return this.numBitsCharCount[Math.floor((i+7)/17)]}};let n=r;n.NUMERIC=new r(1,[10,12,14]),n.ALPHANUMERIC=new r(2,[9,11,13]),n.BYTE=new r(4,[8,16,16]),n.KANJI=new r(8,[8,10,12]),n.ECI=new r(7,[0,0,0]),e.Mode=n})(t.QrSegment||(t.QrSegment={}))})(yu||(yu={}));var _f=yu;/** - * @license qrcode.react - * Copyright (c) Paul O'Shannessy - * SPDX-License-Identifier: ISC - */var $z={L:_f.QrCode.Ecc.LOW,M:_f.QrCode.Ecc.MEDIUM,Q:_f.QrCode.Ecc.QUARTILE,H:_f.QrCode.Ecc.HIGH},Mz=128,Nz="L",Dz="#FFFFFF",Lz="#000000",jz=!1,d9=4,SEe=.1;function Bz(t,e=0){const r=[];return t.forEach(function(n,i){let s=null;n.forEach(function(o,a){if(!o&&s!==null){r.push(`M${s+e} ${i+e}h${a-s}v1H${s+e}z`),s=null;return}if(a===n.length-1){if(!o)return;s===null?r.push(`M${a+e},${i+e} h1v1H${a+e}z`):r.push(`M${s+e},${i+e} h${a+1-s}v1H${s+e}z`);return}o&&s===null&&(s=a)})}),r.join("")}function Fz(t,e){return t.slice().map((r,n)=>n=e.y+e.h?r:r.map((i,s)=>s=e.x+e.w?i:!1))}function Uz(t,e,r,n){if(n==null)return null;const i=r?d9:0,s=t.length+i*2,o=Math.floor(e*SEe),a=s/e,c=(n.width||o)*a,l=(n.height||o)*a,u=n.x==null?t.length/2-c/2:n.x*a,f=n.y==null?t.length/2-l/2:n.y*a;let d=null;if(n.excavate){let h=Math.floor(u),p=Math.floor(f),m=Math.ceil(c+u-h),v=Math.ceil(l+f-p);d={x:h,y:p,w:m,h:v}}return{x:u,y:f,h:l,w:c,excavation:d}}var kEe=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}();function AEe(t){const e=t,{value:r,size:n=Mz,level:i=Nz,bgColor:s=Dz,fgColor:o=Lz,includeMargin:a=jz,style:c,imageSettings:l}=e,u=f9(e,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),f=l==null?void 0:l.src,d=w.useRef(null),h=w.useRef(null),[p,m]=w.useState(!1);w.useEffect(()=>{if(d.current!=null){const b=d.current,E=b.getContext("2d");if(!E)return;let S=_f.QrCode.encodeText(r,$z[i]).getModules();const P=a?d9:0,R=S.length+P*2,L=Uz(S,n,a,l),j=h.current,H=L!=null&&j!==null&&j.complete&&j.naturalHeight!==0&&j.naturalWidth!==0;H&&L.excavation!=null&&(S=Fz(S,L.excavation));const K=window.devicePixelRatio||1;b.height=b.width=n*K;const Y=n/R*K;E.scale(Y,Y),E.fillStyle=s,E.fillRect(0,0,R,R),E.fillStyle=o,kEe?E.fill(new Path2D(Bz(S,P))):S.forEach(function(Q,F){Q.forEach(function(x,k){x&&E.fillRect(k+P,F+P,1,1)})}),H&&E.drawImage(j,L.x+P,L.y+P,L.w,L.h)}}),w.useEffect(()=>{m(!1)},[f]);const v=T1({height:n,width:n},c);let y=null;return f!=null&&(y=g.createElement("img",{src:f,key:f,style:{display:"none"},onLoad:()=>{m(!0)},ref:h})),g.createElement(g.Fragment,null,g.createElement("canvas",T1({style:v,height:n,width:n,ref:d},u)),y)}function _Ee(t){const e=t,{value:r,size:n=Mz,level:i=Nz,bgColor:s=Dz,fgColor:o=Lz,includeMargin:a=jz,imageSettings:c}=e,l=f9(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let u=_f.QrCode.encodeText(r,$z[i]).getModules();const f=a?d9:0,d=u.length+f*2,h=Uz(u,n,a,c);let p=null;c!=null&&h!=null&&(h.excavation!=null&&(u=Fz(u,h.excavation)),p=g.createElement("image",{xlinkHref:c.src,height:h.h,width:h.w,x:h.x+f,y:h.y+f,preserveAspectRatio:"none"}));const m=Bz(u,f);return g.createElement("svg",T1({height:n,width:n,viewBox:`0 0 ${d} ${d}`},l),g.createElement("path",{fill:s,d:`M0,0 h${d}v${d}H0z`,shapeRendering:"crispEdges"}),g.createElement("path",{fill:o,d:m,shapeRendering:"crispEdges"}),p)}var PEe=t=>{const e=t,{renderAs:r}=e,n=f9(e,["renderAs"]);return r==="svg"?g.createElement(_Ee,T1({},n)):g.createElement(AEe,T1({},n))},zz={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(vi,function(){var r=1e3,n=6e4,i=36e5,s="millisecond",o="second",a="minute",c="hour",l="day",u="week",f="month",d="quarter",h="year",p="date",m="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(x){var k=["th","st","nd","rd"],N=x%100;return"["+x+(k[(N-20)%10]||k[N]||k[0])+"]"}},E=function(x,k,N){var M=String(x);return!M||M.length>=k?x:""+Array(k+1-M.length).join(N)+x},S={s:E,z:function(x){var k=-x.utcOffset(),N=Math.abs(k),M=Math.floor(N/60),A=N%60;return(k<=0?"+":"-")+E(M,2,"0")+":"+E(A,2,"0")},m:function x(k,N){if(k.date()1)return x(B[0])}else{var I=k.name;R[I]=k,A=I}return!M&&A&&(P=A),A||!M&&P},K=function(x,k){if(j(x))return x.clone();var N=typeof k=="object"?k:{};return N.date=x,N.args=arguments,new Q(N)},Y=S;Y.l=H,Y.i=j,Y.w=function(x,k){return K(x,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var Q=function(){function x(N){this.$L=H(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[L]=!0}var k=x.prototype;return k.parse=function(N){this.$d=function(M){var A=M.date,O=M.utc;if(A===null)return new Date(NaN);if(Y.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var B=A.match(v);if(B){var I=B[2]-1||0,C=(B[7]||"0").substring(0,3);return O?new Date(Date.UTC(B[1],I,B[3]||1,B[4]||0,B[5]||0,B[6]||0,C)):new Date(B[1],I,B[3]||1,B[4]||0,B[5]||0,B[6]||0,C)}}return new Date(A)}(N),this.init()},k.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},k.$utils=function(){return Y},k.isValid=function(){return this.$d.toString()!==m},k.isSame=function(N,M){var A=K(N);return this.startOf(M)<=A&&A<=this.endOf(M)},k.isAfter=function(N,M){return K(N)`Invalid value for key ${t}`,LEe=t=>`Pattern length exceeds max of ${t}.`,jEe=t=>`Missing ${t} property in key`,BEe=t=>`Property 'weight' in key '${t}' must be a positive integer`,WP=Object.prototype.hasOwnProperty;class FEe{constructor(e){this._keys=[],this._keyMap={};let r=0;e.forEach(n=>{let i=Gz(n);r+=i.weight,this._keys.push(i),this._keyMap[i.id]=i,r+=i.weight}),this._keys.forEach(n=>{n.weight/=r})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Gz(t){let e=null,r=null,n=null,i=1,s=null;if(uo(t)||wa(t))n=t,e=HP(t),r=q3(t);else{if(!WP.call(t,"name"))throw new Error(jEe("name"));const o=t.name;if(n=o,WP.call(t,"weight")&&(i=t.weight,i<=0))throw new Error(BEe(o));e=HP(o),r=q3(o),s=t.getFn}return{path:e,id:r,weight:i,src:n,getFn:s}}function HP(t){return wa(t)?t:t.split(".")}function q3(t){return wa(t)?t.join("."):t}function UEe(t,e){let r=[],n=!1;const i=(s,o,a)=>{if(gi(s))if(!o[a])r.push(s);else{let c=o[a];const l=s[c];if(!gi(l))return;if(a===o.length-1&&(uo(l)||Wz(l)||$Ee(l)))r.push(REe(l));else if(wa(l)){n=!0;for(let u=0,f=l.length;ut.score===e.score?t.idx{this._keysMap[r.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,uo(this.docs[0])?this.docs.forEach((e,r)=>{this._addString(e,r)}):this.docs.forEach((e,r)=>{this._addObject(e,r)}),this.norm.clear())}add(e){const r=this.size();uo(e)?this._addString(e,r):this._addObject(e,r)}removeAt(e){this.records.splice(e,1);for(let r=e,n=this.size();r{let o=i.getFn?i.getFn(e):this.getFn(e,i.path);if(gi(o)){if(wa(o)){let a=[];const c=[{nestedArrIndex:-1,value:o}];for(;c.length;){const{nestedArrIndex:l,value:u}=c.pop();if(gi(u))if(uo(u)&&!Tw(u)){let f={v:u,i:l,n:this.norm.get(u)};a.push(f)}else wa(u)&&u.forEach((f,d)=>{c.push({nestedArrIndex:d,value:f})})}n.$[s]=a}else if(uo(o)&&!Tw(o)){let a={v:o,n:this.norm.get(o)};n.$[s]=a}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function Kz(t,e,{getFn:r=je.getFn,fieldNormWeight:n=je.fieldNormWeight}={}){const i=new h9({getFn:r,fieldNormWeight:n});return i.setKeys(t.map(Gz)),i.setSources(e),i.create(),i}function KEe(t,{getFn:e=je.getFn,fieldNormWeight:r=je.fieldNormWeight}={}){const{keys:n,records:i}=t,s=new h9({getFn:e,fieldNormWeight:r});return s.setKeys(n),s.setIndexRecords(i),s}function Am(t,{errors:e=0,currentLocation:r=0,expectedLocation:n=0,distance:i=je.distance,ignoreLocation:s=je.ignoreLocation}={}){const o=e/t.length;if(s)return o;const a=Math.abs(n-r);return i?o+a/i:a?1:o}function YEe(t=[],e=je.minMatchCharLength){let r=[],n=-1,i=-1,s=0;for(let o=t.length;s=e&&r.push([n,i]),n=-1)}return t[s-1]&&s-n>=e&&r.push([n,s-1]),r}const Ml=32;function QEe(t,e,r,{location:n=je.location,distance:i=je.distance,threshold:s=je.threshold,findAllMatches:o=je.findAllMatches,minMatchCharLength:a=je.minMatchCharLength,includeMatches:c=je.includeMatches,ignoreLocation:l=je.ignoreLocation}={}){if(e.length>Ml)throw new Error(LEe(Ml));const u=e.length,f=t.length,d=Math.max(0,Math.min(n,f));let h=s,p=d;const m=a>1||c,v=m?Array(f):[];let y;for(;(y=t.indexOf(e,p))>-1;){let L=Am(e,{currentLocation:y,expectedLocation:d,distance:i,ignoreLocation:l});if(h=Math.min(L,h),p=y+u,m){let j=0;for(;j=K;x-=1){let k=x-1,N=r[t.charAt(k)];if(m&&(v[k]=+!!N),Q[x]=(Q[x+1]<<1|1)&N,L&&(Q[x]|=(b[x+1]|b[x])<<1|1|b[x+1]),Q[x]&P&&(E=Am(e,{errors:L,currentLocation:k,expectedLocation:d,distance:i,ignoreLocation:l}),E<=h)){if(h=E,p=k,p<=d)break;K=Math.max(1,2*d-p)}}if(Am(e,{errors:L+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:l})>h)break;b=Q}const R={isMatch:p>=0,score:Math.max(.001,E)};if(m){const L=YEe(v,a);L.length?c&&(R.indices=L):R.isMatch=!1}return R}function JEe(t){let e={};for(let r=0,n=t.length;r{this.chunks.push({pattern:d,alphabet:JEe(d),startIndex:h})},f=this.pattern.length;if(f>Ml){let d=0;const h=f%Ml,p=f-h;for(;d{const{isMatch:y,score:b,indices:E}=QEe(e,p,m,{location:i+v,distance:s,threshold:o,findAllMatches:a,minMatchCharLength:c,includeMatches:n,ignoreLocation:l});y&&(d=!0),f+=b,y&&E&&(u=[...u,...E])});let h={isMatch:d,score:d?f/this.chunks.length:1};return d&&n&&(h.indices=u),h}}class fl{constructor(e){this.pattern=e}static isMultiMatch(e){return VP(e,this.multiRegex)}static isSingleMatch(e){return VP(e,this.singleRegex)}search(){}}function VP(t,e){const r=t.match(e);return r?r[1]:null}class XEe extends fl{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const r=e===this.pattern;return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class ZEe extends fl{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class e8e extends fl{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const r=e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class t8e extends fl{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const r=!e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class r8e extends fl{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const r=e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class n8e extends fl{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const r=!e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class Qz extends fl{constructor(e,{location:r=je.location,threshold:n=je.threshold,distance:i=je.distance,includeMatches:s=je.includeMatches,findAllMatches:o=je.findAllMatches,minMatchCharLength:a=je.minMatchCharLength,isCaseSensitive:c=je.isCaseSensitive,ignoreLocation:l=je.ignoreLocation}={}){super(e),this._bitapSearch=new Yz(e,{location:r,threshold:n,distance:i,includeMatches:s,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:c,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Jz extends fl{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let r=0,n;const i=[],s=this.pattern.length;for(;(n=e.indexOf(this.pattern,r))>-1;)r=n+s,i.push([n,r-1]);const o=!!i.length;return{isMatch:o,score:o?0:1,indices:i}}}const W3=[XEe,Jz,e8e,t8e,n8e,r8e,ZEe,Qz],GP=W3.length,i8e=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,s8e="|";function o8e(t,e={}){return t.split(s8e).map(r=>{let n=r.trim().split(i8e).filter(s=>s&&!!s.trim()),i=[];for(let s=0,o=n.length;s!!(t[pg.AND]||t[pg.OR]),u8e=t=>!!t[G3.PATH],f8e=t=>!wa(t)&&Hz(t)&&!K3(t),KP=t=>({[pg.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function Xz(t,e,{auto:r=!0}={}){const n=i=>{let s=Object.keys(i);const o=u8e(i);if(!o&&s.length>1&&!K3(i))return n(KP(i));if(f8e(i)){const c=o?i[G3.PATH]:s[0],l=o?i[G3.PATTERN]:i[c];if(!uo(l))throw new Error(DEe(c));const u={keyId:q3(c),pattern:l};return r&&(u.searcher=V3(l,e)),u}let a={children:[],operator:s[0]};return s.forEach(c=>{const l=i[c];wa(l)&&l.forEach(u=>{a.children.push(n(u))})}),a};return K3(t)||(t=KP(t)),n(t)}function d8e(t,{ignoreFieldNorm:e=je.ignoreFieldNorm}){t.forEach(r=>{let n=1;r.matches.forEach(({key:i,norm:s,score:o})=>{const a=i?i.weight:null;n*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(e?1:s))}),r.score=n})}function h8e(t,e){const r=t.matches;e.matches=[],gi(r)&&r.forEach(n=>{if(!gi(n.indices)||!n.indices.length)return;const{indices:i,value:s}=n;let o={indices:i,value:s};n.key&&(o.key=n.key.src),n.idx>-1&&(o.refIndex=n.idx),e.matches.push(o)})}function p8e(t,e){e.score=t.score}function m8e(t,e,{includeMatches:r=je.includeMatches,includeScore:n=je.includeScore}={}){const i=[];return r&&i.push(h8e),n&&i.push(p8e),t.map(s=>{const{idx:o}=s,a={item:e[o],refIndex:o};return i.length&&i.forEach(c=>{c(s,a)}),a})}class Ea{constructor(e,r={},n){this.options={...je,...r},this.options.useExtendedSearch,this._keyStore=new FEe(this.options.keys),this.setCollection(e,n)}setCollection(e,r){if(this._docs=e,r&&!(r instanceof h9))throw new Error(NEe);this._myIndex=r||Kz(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){gi(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const r=[];for(let n=0,i=this._docs.length;n-1&&(c=c.slice(0,r)),m8e(c,this._docs,{includeMatches:n,includeScore:i})}_searchStringList(e){const r=V3(e,this.options),{records:n}=this._myIndex,i=[];return n.forEach(({v:s,i:o,n:a})=>{if(!gi(s))return;const{isMatch:c,score:l,indices:u}=r.searchIn(s);c&&i.push({item:s,idx:o,matches:[{score:l,value:s,norm:a,indices:u}]})}),i}_searchLogical(e){const r=Xz(e,this.options),n=(a,c,l)=>{if(!a.children){const{keyId:f,searcher:d}=a,h=this._findMatches({key:this._keyStore.get(f),value:this._myIndex.getValueForItemAtKeyId(c,f),searcher:d});return h&&h.length?[{idx:l,item:c,matches:h}]:[]}const u=[];for(let f=0,d=a.children.length;f{if(gi(a)){let l=n(r,a,c);l.length&&(s[c]||(s[c]={idx:c,item:a,matches:[]},o.push(s[c])),l.forEach(({matches:u})=>{s[c].matches.push(...u)}))}}),o}_searchObjectList(e){const r=V3(e,this.options),{keys:n,records:i}=this._myIndex,s=[];return i.forEach(({$:o,i:a})=>{if(!gi(o))return;let c=[];n.forEach((l,u)=>{c.push(...this._findMatches({key:l,value:o[u],searcher:r}))}),c.length&&s.push({idx:a,item:o,matches:c})}),s}_findMatches({key:e,value:r,searcher:n}){if(!gi(r))return[];let i=[];if(wa(r))r.forEach(({v:s,i:o,n:a})=>{if(!gi(s))return;const{isMatch:c,score:l,indices:u}=n.searchIn(s);c&&i.push({score:l,key:e,value:s,idx:o,norm:a,indices:u})});else{const{v:s,n:o}=r,{isMatch:a,score:c,indices:l}=n.searchIn(s);a&&i.push({score:c,key:e,value:s,norm:o,indices:l})}return i}}Ea.version="6.6.2";Ea.createIndex=Kz;Ea.parseIndex=KEe;Ea.config=je;Ea.parseQuery=Xz;l8e(c8e);function Zz(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;et.forEach(r=>y8e(r,e))}function Ru(...t){return w.useCallback(eq(...t),t)}function tq(t,e=[]){let r=[];function n(s,o){const a=w.createContext(o),c=r.length;r=[...r,o];function l(f){const{scope:d,children:h,...p}=f,m=(d==null?void 0:d[t][c])||a,v=w.useMemo(()=>p,Object.values(p));return w.createElement(m.Provider,{value:v},h)}function u(f,d){const h=(d==null?void 0:d[t][c])||a,p=w.useContext(h);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return l.displayName=s+"Provider",[l,u]}const i=()=>{const s=r.map(o=>w.createContext(o));return function(a){const c=(a==null?void 0:a[t])||s;return w.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return i.scopeName=t,[n,g8e(i,...e)]}function g8e(...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:c,scopeName:l})=>{const f=c(s)[`__scope${l}`];return{...a,...f}},{});return w.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}const p9=w.forwardRef((t,e)=>{const{children:r,...n}=t,i=w.Children.toArray(r),s=i.find(x8e);if(s){const o=s.props.children,a=i.map(c=>c===s?w.Children.count(o)>1?w.Children.only(null):w.isValidElement(o)?o.props.children:null:c);return w.createElement(Y3,dn({},n,{ref:e}),w.isValidElement(o)?w.cloneElement(o,void 0,a):null)}return w.createElement(Y3,dn({},n,{ref:e}),r)});p9.displayName="Slot";const Y3=w.forwardRef((t,e)=>{const{children:r,...n}=t;return w.isValidElement(r)?w.cloneElement(r,{...w8e(n,r.props),ref:e?eq(e,r.ref):r.ref}):w.Children.count(r)>1?w.Children.only(null):null});Y3.displayName="SlotClone";const b8e=({children:t})=>w.createElement(w.Fragment,null,t);function x8e(t){return w.isValidElement(t)&&t.type===b8e}function w8e(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 E8e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Cp=E8e.reduce((t,e)=>{const r=w.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?p9:e;return w.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),w.createElement(a,dn({},o,{ref:i}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function C8e(t,e){t&&Us.flushSync(()=>t.dispatchEvent(e))}function Yc(t){const e=w.useRef(t);return w.useEffect(()=>{e.current=t}),w.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function S8e(t,e=globalThis==null?void 0:globalThis.document){const r=Yc(t);w.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const Q3="dismissableLayer.update",k8e="dismissableLayer.pointerDownOutside",A8e="dismissableLayer.focusOutside";let YP;const _8e=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),P8e=w.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:c,...l}=t,u=w.useContext(_8e),[f,d]=w.useState(null),h=(r=f==null?void 0:f.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,p]=w.useState({}),m=Ru(e,j=>d(j)),v=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),E=f?v.indexOf(f):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,P=E>=b,R=I8e(j=>{const H=j.target,K=[...u.branches].some(Y=>Y.contains(H));!P||K||(s==null||s(j),a==null||a(j),j.defaultPrevented||c==null||c())},h),L=T8e(j=>{const H=j.target;[...u.branches].some(Y=>Y.contains(H))||(o==null||o(j),a==null||a(j),j.defaultPrevented||c==null||c())},h);return S8e(j=>{E===u.layers.size-1&&(i==null||i(j),!j.defaultPrevented&&c&&(j.preventDefault(),c()))},h),w.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(YP=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),QP(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=YP)}},[f,h,n,u]),w.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),QP())},[f,u]),w.useEffect(()=>{const j=()=>p({});return document.addEventListener(Q3,j),()=>document.removeEventListener(Q3,j)},[]),w.createElement(Cp.div,dn({},l,{ref:m,style:{pointerEvents:S?P?"auto":"none":void 0,...t.style},onFocusCapture:Ql(t.onFocusCapture,L.onFocusCapture),onBlurCapture:Ql(t.onBlurCapture,L.onBlurCapture),onPointerDownCapture:Ql(t.onPointerDownCapture,R.onPointerDownCapture)}))});function I8e(t,e=globalThis==null?void 0:globalThis.document){const r=Yc(t),n=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){rq(k8e,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 T8e(t,e=globalThis==null?void 0:globalThis.document){const r=Yc(t),n=w.useRef(!1);return w.useEffect(()=>{const i=s=>{s.target&&!n.current&&rq(A8e,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 QP(){const t=new CustomEvent(Q3);document.dispatchEvent(t)}function rq(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?C8e(i,s):i.dispatchEvent(s)}let Ow=0;function O8e(){w.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:JP()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:JP()),Ow++,()=>{Ow===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Ow--}},[])}function JP(){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 Rw="focusScope.autoFocusOnMount",$w="focusScope.autoFocusOnUnmount",XP={bubbles:!1,cancelable:!0},R8e=w.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,c]=w.useState(null),l=Yc(i),u=Yc(s),f=w.useRef(null),d=Ru(e,m=>c(m)),h=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(n){let m=function(E){if(h.paused||!a)return;const S=E.target;a.contains(S)?f.current=S:Ja(f.current,{select:!0})},v=function(E){if(h.paused||!a)return;const S=E.relatedTarget;S!==null&&(a.contains(S)||Ja(f.current,{select:!0}))},y=function(E){if(document.activeElement===document.body)for(const P of E)P.removedNodes.length>0&&Ja(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const b=new MutationObserver(y);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),b.disconnect()}}},[n,a,h.paused]),w.useEffect(()=>{if(a){eI.add(h);const m=document.activeElement;if(!a.contains(m)){const y=new CustomEvent(Rw,XP);a.addEventListener(Rw,l),a.dispatchEvent(y),y.defaultPrevented||($8e(j8e(nq(a)),{select:!0}),document.activeElement===m&&Ja(a))}return()=>{a.removeEventListener(Rw,l),setTimeout(()=>{const y=new CustomEvent($w,XP);a.addEventListener($w,u),a.dispatchEvent(y),y.defaultPrevented||Ja(m??document.body,{select:!0}),a.removeEventListener($w,u),eI.remove(h)},0)}}},[a,l,u,h]);const p=w.useCallback(m=>{if(!r&&!n||h.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const b=m.currentTarget,[E,S]=M8e(b);E&&S?!m.shiftKey&&y===S?(m.preventDefault(),r&&Ja(E,{select:!0})):m.shiftKey&&y===E&&(m.preventDefault(),r&&Ja(S,{select:!0})):y===b&&m.preventDefault()}},[r,n,h.paused]);return w.createElement(Cp.div,dn({tabIndex:-1},o,{ref:d,onKeyDown:p}))});function $8e(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ja(n,{select:e}),document.activeElement!==r)return}function M8e(t){const e=nq(t),r=ZP(e,t),n=ZP(e.reverse(),t);return[r,n]}function nq(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 ZP(t,e){for(const r of t)if(!N8e(r,{upTo:e}))return r}function N8e(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 D8e(t){return t instanceof HTMLInputElement&&"select"in t}function Ja(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&D8e(t)&&e&&t.select()}}const eI=L8e();function L8e(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=tI(t,e),t.unshift(e)},remove(e){var r;t=tI(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function tI(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function j8e(t){return t.filter(e=>e.tagName!=="A")}const Ed=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},B8e=JI.useId||(()=>{});let F8e=0;function U8e(t){const[e,r]=w.useState(B8e());return Ed(()=>{t||r(n=>n??String(F8e++))},[t]),t||(e?`radix-${e}`:"")}const z8e=["top","right","bottom","left"],Qc=Math.min,bi=Math.max,mg=Math.round,_m=Math.floor,Jc=t=>({x:t,y:t}),q8e={left:"right",right:"left",bottom:"top",top:"bottom"},W8e={start:"end",end:"start"};function J3(t,e,r){return bi(t,Qc(e,r))}function Ca(t,e){return typeof t=="function"?t(e):t}function Sa(t){return t.split("-")[0]}function Zd(t){return t.split("-")[1]}function m9(t){return t==="x"?"y":"x"}function v9(t){return t==="y"?"height":"width"}function eh(t){return["top","bottom"].includes(Sa(t))?"y":"x"}function y9(t){return m9(eh(t))}function H8e(t,e,r){r===void 0&&(r=!1);const n=Zd(t),i=y9(t),s=v9(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=vg(o)),[o,vg(o)]}function V8e(t){const e=vg(t);return[X3(t),e,X3(e)]}function X3(t){return t.replace(/start|end/g,e=>W8e[e])}function G8e(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 K8e(t,e,r,n){const i=Zd(t);let s=G8e(Sa(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(X3)))),s}function vg(t){return t.replace(/left|right|bottom|top/g,e=>q8e[e])}function Y8e(t){return{top:0,right:0,bottom:0,left:0,...t}}function iq(t){return typeof t!="number"?Y8e(t):{top:t,right:t,bottom:t,left:t}}function yg(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function rI(t,e,r){let{reference:n,floating:i}=t;const s=eh(e),o=y9(e),a=v9(o),c=Sa(e),l=s==="y",u=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,d=n[a]/2-i[a]/2;let h;switch(c){case"top":h={x:u,y:n.y-i.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-i.width,y:f};break;default:h={x:n.x,y:n.y}}switch(Zd(e)){case"start":h[o]-=d*(r&&l?-1:1);break;case"end":h[o]+=d*(r&&l?-1:1);break}return h}const Q8e=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=rI(l,n,c),d=n,h={},p=0;for(let m=0;m({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:c}=e,{element:l,padding:u=0}=Ca(t,e)||{};if(l==null)return{};const f=iq(u),d={x:r,y:n},h=y9(i),p=v9(h),m=await o.getDimensions(l),v=h==="y",y=v?"top":"left",b=v?"bottom":"right",E=v?"clientHeight":"clientWidth",S=s.reference[p]+s.reference[h]-d[h]-s.floating[p],P=d[h]-s.reference[h],R=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let L=R?R[E]:0;(!L||!await(o.isElement==null?void 0:o.isElement(R)))&&(L=a.floating[E]||s.floating[p]);const j=S/2-P/2,H=L/2-m[p]/2-1,K=Qc(f[y],H),Y=Qc(f[b],H),Q=K,F=L-m[p]-Y,x=L/2-m[p]/2+j,k=J3(Q,x,F),N=!c.arrow&&Zd(i)!=null&&x!==k&&s.reference[p]/2-(xQ<=0)){var H,K;const Q=(((H=s.flip)==null?void 0:H.index)||0)+1,F=P[Q];if(F)return{data:{index:Q,overflows:j},reset:{placement:F}};let x=(K=j.filter(k=>k.overflows[0]<=0).sort((k,N)=>k.overflows[1]-N.overflows[1])[0])==null?void 0:K.placement;if(!x)switch(h){case"bestFit":{var Y;const k=(Y=j.map(N=>[N.placement,N.overflows.filter(M=>M>0).reduce((M,A)=>M+A,0)]).sort((N,M)=>N[1]-M[1])[0])==null?void 0:Y[0];k&&(x=k);break}case"initialPlacement":x=a;break}if(i!==x)return{reset:{placement:x}}}return{}}}};function nI(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function iI(t){return z8e.some(e=>t[e]>=0)}const Z8e=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...i}=Ca(t,e);switch(n){case"referenceHidden":{const s=await O1(e,{...i,elementContext:"reference"}),o=nI(s,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:iI(o)}}}case"escaped":{const s=await O1(e,{...i,altBoundary:!0}),o=nI(s,r.floating);return{data:{escapedOffsets:o,escaped:iI(o)}}}default:return{}}}}};async function eCe(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=Sa(r),a=Zd(r),c=eh(r)==="y",l=["left","top"].includes(o)?-1:1,u=s&&c?-1:1,f=Ca(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),c?{x:h*u,y:d*l}:{x:d*l,y:h*u}}const tCe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:i,y:s,placement:o,middlewareData:a}=e,c=await eCe(e,t);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:o}}}}},rCe=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:v=>{let{x:y,y:b}=v;return{x:y,y:b}}},...c}=Ca(t,e),l={x:r,y:n},u=await O1(e,c),f=eh(Sa(i)),d=m9(f);let h=l[d],p=l[f];if(s){const v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",b=h+u[v],E=h-u[y];h=J3(b,h,E)}if(o){const v=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=p+u[v],E=p-u[y];p=J3(b,p,E)}const m=a.fn({...e,[d]:h,[f]:p});return{...m,data:{x:m.x-r,y:m.y-n}}}}},nCe=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:c=!0,crossAxis:l=!0}=Ca(t,e),u={x:r,y:n},f=eh(i),d=m9(f);let h=u[d],p=u[f];const m=Ca(a,e),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const E=d==="y"?"height":"width",S=s.reference[d]-s.floating[E]+v.mainAxis,P=s.reference[d]+s.reference[E]-v.mainAxis;hP&&(h=P)}if(l){var y,b;const E=d==="y"?"width":"height",S=["top","left"].includes(Sa(i)),P=s.reference[f]-s.floating[E]+(S&&((y=o.offset)==null?void 0:y[f])||0)+(S?0:v.crossAxis),R=s.reference[f]+s.reference[E]+(S?0:((b=o.offset)==null?void 0:b[f])||0)-(S?v.crossAxis:0);pR&&(p=R)}return{[d]:h,[f]:p}}}},iCe=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}=Ca(t,e),c=await O1(e,a),l=Sa(r),u=Zd(r),f=eh(r)==="y",{width:d,height:h}=n.floating;let p,m;l==="top"||l==="bottom"?(p=l,m=u===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(m=l,p=u==="end"?"top":"bottom");const v=h-c[p],y=d-c[m],b=!e.middlewareData.shift;let E=v,S=y;if(f){const R=d-c.left-c.right;S=u||b?Qc(y,R):R}else{const R=h-c.top-c.bottom;E=u||b?Qc(v,R):R}if(b&&!u){const R=bi(c.left,0),L=bi(c.right,0),j=bi(c.top,0),H=bi(c.bottom,0);f?S=d-2*(R!==0||L!==0?R+L:bi(c.left,c.right)):E=h-2*(j!==0||H!==0?j+H:bi(c.top,c.bottom))}await o({...e,availableWidth:S,availableHeight:E});const P=await i.getDimensions(s.floating);return d!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function Xc(t){return sq(t)?(t.nodeName||"").toLowerCase():"#document"}function Ci(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ja(t){var e;return(e=(sq(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function sq(t){return t instanceof Node||t instanceof Ci(t).Node}function ka(t){return t instanceof Element||t instanceof Ci(t).Element}function Io(t){return t instanceof HTMLElement||t instanceof Ci(t).HTMLElement}function sI(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ci(t).ShadowRoot}function Sp(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=as(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function sCe(t){return["table","td","th"].includes(Xc(t))}function g9(t){const e=b9(),r=as(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 oCe(t){let e=Cd(t);for(;Io(e)&&!E2(e);){if(g9(e))return e;e=Cd(e)}return null}function b9(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function E2(t){return["html","body","#document"].includes(Xc(t))}function as(t){return Ci(t).getComputedStyle(t)}function C2(t){return ka(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Cd(t){if(Xc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||sI(t)&&t.host||ja(t);return sI(e)?e.host:e}function oq(t){const e=Cd(t);return E2(e)?t.ownerDocument?t.ownerDocument.body:t.body:Io(e)&&Sp(e)?e:oq(e)}function R1(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=oq(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=Ci(i);return s?e.concat(o,o.visualViewport||[],Sp(i)?i:[],o.frameElement&&r?R1(o.frameElement):[]):e.concat(i,R1(i,[],r))}function aq(t){const e=as(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=Io(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=mg(r)!==s||mg(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function x9(t){return ka(t)?t:t.contextElement}function Kf(t){const e=x9(t);if(!Io(e))return Jc(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=aq(e);let o=(s?mg(r.width):r.width)/n,a=(s?mg(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const aCe=Jc(0);function cq(t){const e=Ci(t);return!b9()||!e.visualViewport?aCe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function cCe(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Ci(t)?!1:e}function gu(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=x9(t);let o=Jc(1);e&&(n?ka(n)&&(o=Kf(n)):o=Kf(t));const a=cCe(s,r,n)?cq(s):Jc(0);let c=(i.left+a.x)/o.x,l=(i.top+a.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(s){const d=Ci(s),h=n&&ka(n)?Ci(n):n;let p=d,m=p.frameElement;for(;m&&n&&h!==p;){const v=Kf(m),y=m.getBoundingClientRect(),b=as(m),E=y.left+(m.clientLeft+parseFloat(b.paddingLeft))*v.x,S=y.top+(m.clientTop+parseFloat(b.paddingTop))*v.y;c*=v.x,l*=v.y,u*=v.x,f*=v.y,c+=E,l+=S,p=Ci(m),m=p.frameElement}}return yg({width:u,height:f,x:c,y:l})}const lCe=[":popover-open",":modal"];function lq(t){return lCe.some(e=>{try{return t.matches(e)}catch{return!1}})}function uCe(t){let{elements:e,rect:r,offsetParent:n,strategy:i}=t;const s=i==="fixed",o=ja(n),a=e?lq(e.floating):!1;if(n===o||a&&s)return r;let c={scrollLeft:0,scrollTop:0},l=Jc(1);const u=Jc(0),f=Io(n);if((f||!f&&!s)&&((Xc(n)!=="body"||Sp(o))&&(c=C2(n)),Io(n))){const d=gu(n);l=Kf(n),u.x=d.x+n.clientLeft,u.y=d.y+n.clientTop}return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x,y:r.y*l.y-c.scrollTop*l.y+u.y}}function fCe(t){return Array.from(t.getClientRects())}function uq(t){return gu(ja(t)).left+C2(t).scrollLeft}function dCe(t){const e=ja(t),r=C2(t),n=t.ownerDocument.body,i=bi(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=bi(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+uq(t);const a=-r.scrollTop;return as(n).direction==="rtl"&&(o+=bi(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}function hCe(t,e){const r=Ci(t),n=ja(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,c=0;if(i){s=i.width,o=i.height;const l=b9();(!l||l&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:s,height:o,x:a,y:c}}function pCe(t,e){const r=gu(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=Io(t)?Kf(t):Jc(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,c=i*s.x,l=n*s.y;return{width:o,height:a,x:c,y:l}}function oI(t,e,r){let n;if(e==="viewport")n=hCe(t,r);else if(e==="document")n=dCe(ja(t));else if(ka(e))n=pCe(e,r);else{const i=cq(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return yg(n)}function fq(t,e){const r=Cd(t);return r===e||!ka(r)||E2(r)?!1:as(r).position==="fixed"||fq(r,e)}function mCe(t,e){const r=e.get(t);if(r)return r;let n=R1(t,[],!1).filter(a=>ka(a)&&Xc(a)!=="body"),i=null;const s=as(t).position==="fixed";let o=s?Cd(t):t;for(;ka(o)&&!E2(o);){const a=as(o),c=g9(o);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Sp(o)&&!c&&fq(t,o))?n=n.filter(u=>u!==o):i=a,o=Cd(o)}return e.set(t,n),n}function vCe(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?mCe(e,this._c):[].concat(r),n],a=o[0],c=o.reduce((l,u)=>{const f=oI(e,u,i);return l.top=bi(f.top,l.top),l.right=Qc(f.right,l.right),l.bottom=Qc(f.bottom,l.bottom),l.left=bi(f.left,l.left),l},oI(e,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function yCe(t){const{width:e,height:r}=aq(t);return{width:e,height:r}}function gCe(t,e,r){const n=Io(e),i=ja(e),s=r==="fixed",o=gu(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const c=Jc(0);if(n||!n&&!s)if((Xc(e)!=="body"||Sp(i))&&(a=C2(e)),n){const f=gu(e,!0,s,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else i&&(c.x=uq(i));const l=o.left+a.scrollLeft-c.x,u=o.top+a.scrollTop-c.y;return{x:l,y:u,width:o.width,height:o.height}}function aI(t,e){return!Io(t)||as(t).position==="fixed"?null:e?e(t):t.offsetParent}function dq(t,e){const r=Ci(t);if(!Io(t)||lq(t))return r;let n=aI(t,e);for(;n&&sCe(n)&&as(n).position==="static";)n=aI(n,e);return n&&(Xc(n)==="html"||Xc(n)==="body"&&as(n).position==="static"&&!g9(n))?r:n||oCe(t)||r}const bCe=async function(t){const e=this.getOffsetParent||dq,r=this.getDimensions;return{reference:gCe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await r(t.floating)}}};function xCe(t){return as(t).direction==="rtl"}const wCe={convertOffsetParentRelativeRectToViewportRelativeRect:uCe,getDocumentElement:ja,getClippingRect:vCe,getOffsetParent:dq,getElementRects:bCe,getClientRects:fCe,getDimensions:yCe,getScale:Kf,isElement:ka,isRTL:xCe};function ECe(t,e){let r=null,n;const i=ja(t);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const{left:l,top:u,width:f,height:d}=t.getBoundingClientRect();if(a||e(),!f||!d)return;const h=_m(u),p=_m(i.clientWidth-(l+f)),m=_m(i.clientHeight-(u+d)),v=_m(l),b={rootMargin:-h+"px "+-p+"px "+-m+"px "+-v+"px",threshold:bi(0,Qc(1,c))||1};let E=!0;function S(P){const R=P[0].intersectionRatio;if(R!==c){if(!E)return o();R?o(!1,R):n=setTimeout(()=>{o(!1,1e-7)},100)}E=!1}try{r=new IntersectionObserver(S,{...b,root:i.ownerDocument})}catch{r=new IntersectionObserver(S,b)}r.observe(t)}return o(!0),s}function CCe(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:c=!1}=n,l=x9(t),u=i||s?[...l?R1(l):[],...R1(e)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const f=l&&a?ECe(l,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(y=>{let[b]=y;b&&b.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var E;(E=h)==null||E.observe(e)})),r()}),l&&!c&&h.observe(l),h.observe(e));let p,m=c?gu(t):null;c&&v();function v(){const y=gu(t);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&r(),m=y,p=requestAnimationFrame(v)}return r(),()=>{var y;u.forEach(b=>{i&&b.removeEventListener("scroll",r),s&&b.removeEventListener("resize",r)}),f==null||f(),(y=h)==null||y.disconnect(),h=null,c&&cancelAnimationFrame(p)}}const SCe=rCe,kCe=X8e,ACe=iCe,_Ce=Z8e,cI=J8e,PCe=nCe,ICe=(t,e,r)=>{const n=new Map,i={platform:wCe,...r},s={...i.platform,_c:n};return Q8e(t,e,{...i,platform:s})},TCe=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?cI({element:n.current,padding:i}).fn(r):{}:n?cI({element:n,padding:i}).fn(r):{}}}};var bv=typeof document<"u"?w.useLayoutEffect:w.useEffect;function gg(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(!gg(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)&&!gg(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function hq(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function lI(t,e){const r=hq(t);return Math.round(e*r)/r}function uI(t){const e=w.useRef(t);return bv(()=>{e.current=t}),e}function OCe(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:c,open:l}=t,[u,f]=w.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=w.useState(n);gg(d,n)||h(n);const[p,m]=w.useState(null),[v,y]=w.useState(null),b=w.useCallback(M=>{M!==R.current&&(R.current=M,m(M))},[]),E=w.useCallback(M=>{M!==L.current&&(L.current=M,y(M))},[]),S=s||p,P=o||v,R=w.useRef(null),L=w.useRef(null),j=w.useRef(u),H=c!=null,K=uI(c),Y=uI(i),Q=w.useCallback(()=>{if(!R.current||!L.current)return;const M={placement:e,strategy:r,middleware:d};Y.current&&(M.platform=Y.current),ICe(R.current,L.current,M).then(A=>{const O={...A,isPositioned:!0};F.current&&!gg(j.current,O)&&(j.current=O,Us.flushSync(()=>{f(O)}))})},[d,e,r,Y]);bv(()=>{l===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,f(M=>({...M,isPositioned:!1})))},[l]);const F=w.useRef(!1);bv(()=>(F.current=!0,()=>{F.current=!1}),[]),bv(()=>{if(S&&(R.current=S),P&&(L.current=P),S&&P){if(K.current)return K.current(S,P,Q);Q()}},[S,P,Q,K,H]);const x=w.useMemo(()=>({reference:R,floating:L,setReference:b,setFloating:E}),[b,E]),k=w.useMemo(()=>({reference:S,floating:P}),[S,P]),N=w.useMemo(()=>{const M={position:r,left:0,top:0};if(!k.floating)return M;const A=lI(k.floating,u.x),O=lI(k.floating,u.y);return a?{...M,transform:"translate("+A+"px, "+O+"px)",...hq(k.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:A,top:O}},[r,a,k.floating,u.x,u.y]);return w.useMemo(()=>({...u,update:Q,refs:x,elements:k,floatingStyles:N}),[u,Q,x,k,N])}function RCe(t){const[e,r]=w.useState(void 0);return Ed(()=>{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 c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.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}const pq="Popper",[mq,vq]=tq(pq),[$Ce,yq]=mq(pq),MCe=t=>{const{__scopePopper:e,children:r}=t,[n,i]=w.useState(null);return w.createElement($Ce,{scope:e,anchor:n,onAnchorChange:i},r)},NCe="PopperAnchor",DCe=w.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...i}=t,s=yq(NCe,r),o=w.useRef(null),a=Ru(e,o);return w.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:w.createElement(Cp.div,dn({},i,{ref:a}))}),gq="PopperContent",[LCe,v_e]=mq(gq),jCe=w.forwardRef((t,e)=>{var r,n,i,s,o,a,c,l;const{__scopePopper:u,side:f="bottom",sideOffset:d=0,align:h="center",alignOffset:p=0,arrowPadding:m=0,avoidCollisions:v=!0,collisionBoundary:y=[],collisionPadding:b=0,sticky:E="partial",hideWhenDetached:S=!1,updatePositionStrategy:P="optimized",onPlaced:R,...L}=t,j=yq(gq,u),[H,K]=w.useState(null),Y=Ru(e,ve=>K(ve)),[Q,F]=w.useState(null),x=RCe(Q),k=(r=x==null?void 0:x.width)!==null&&r!==void 0?r:0,N=(n=x==null?void 0:x.height)!==null&&n!==void 0?n:0,M=f+(h!=="center"?"-"+h:""),A=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},O=Array.isArray(y)?y:[y],B=O.length>0,I={padding:A,boundary:O.filter(BCe),altBoundary:B},{refs:C,floatingStyles:D,placement:q,isPositioned:_,middlewareData:W}=OCe({strategy:"fixed",placement:M,whileElementsMounted:(...ve)=>CCe(...ve,{animationFrame:P==="always"}),elements:{reference:j.anchor},middleware:[tCe({mainAxis:d+N,alignmentAxis:p}),v&&SCe({mainAxis:!0,crossAxis:!1,limiter:E==="partial"?PCe():void 0,...I}),v&&kCe({...I}),ACe({...I,apply:({elements:ve,rects:Ne,availableWidth:ke,availableHeight:Ae})=>{const{width:Xe,height:ct}=Ne.reference,Qe=ve.floating.style;Qe.setProperty("--radix-popper-available-width",`${ke}px`),Qe.setProperty("--radix-popper-available-height",`${Ae}px`),Qe.setProperty("--radix-popper-anchor-width",`${Xe}px`),Qe.setProperty("--radix-popper-anchor-height",`${ct}px`)}}),Q&&TCe({element:Q,padding:m}),FCe({arrowWidth:k,arrowHeight:N}),S&&_Ce({strategy:"referenceHidden",...I})]}),[V,J]=bq(q),ee=Yc(R);Ed(()=>{_&&(ee==null||ee())},[_,ee]);const se=(i=W.arrow)===null||i===void 0?void 0:i.x,ie=(s=W.arrow)===null||s===void 0?void 0:s.y,ae=((o=W.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[be,he]=w.useState();return Ed(()=>{H&&he(window.getComputedStyle(H).zIndex)},[H]),w.createElement("div",{ref:C.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:_?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:be,"--radix-popper-transform-origin":[(a=W.transformOrigin)===null||a===void 0?void 0:a.x,(c=W.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:t.dir},w.createElement(LCe,{scope:u,placedSide:V,onArrowChange:F,arrowX:se,arrowY:ie,shouldHideArrow:ae},w.createElement(Cp.div,dn({"data-side":V,"data-align":J},L,{ref:Y,style:{...L.style,animation:_?void 0:"none",opacity:(l=W.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))});function BCe(t){return t!==null}const FCe=t=>({name:"transformOrigin",options:t,fn(e){var r,n,i,s,o;const{placement:a,rects:c,middlewareData:l}=e,f=((r=l.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=f?0:t.arrowWidth,h=f?0:t.arrowHeight,[p,m]=bq(a),v={start:"0%",center:"50%",end:"100%"}[m],y=((n=(i=l.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+d/2,b=((s=(o=l.arrow)===null||o===void 0?void 0:o.y)!==null&&s!==void 0?s:0)+h/2;let E="",S="";return p==="bottom"?(E=f?v:`${y}px`,S=`${-h}px`):p==="top"?(E=f?v:`${y}px`,S=`${c.floating.height+h}px`):p==="right"?(E=`${-h}px`,S=f?v:`${b}px`):p==="left"&&(E=`${c.floating.width+h}px`,S=f?v:`${b}px`),{data:{x:E,y:S}}}});function bq(t){const[e,r="center"]=t.split("-");return[e,r]}const UCe=MCe,xq=DCe,zCe=jCe;function qCe(t,e){return w.useReducer((r,n)=>{const i=e[r][n];return i??r},t)}const wq=t=>{const{present:e,children:r}=t,n=WCe(e),i=typeof r=="function"?r({present:n.isPresent}):w.Children.only(r),s=Ru(n.ref,i.ref);return typeof r=="function"||n.isPresent?w.cloneElement(i,{ref:s}):null};wq.displayName="Presence";function WCe(t){const[e,r]=w.useState(),n=w.useRef({}),i=w.useRef(t),s=w.useRef("none"),o=t?"mounted":"unmounted",[a,c]=qCe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const l=Pm(n.current);s.current=a==="mounted"?l:"none"},[a]),Ed(()=>{const l=n.current,u=i.current;if(u!==t){const d=s.current,h=Pm(l);t?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,c]),Ed(()=>{if(e){const l=f=>{const h=Pm(n.current).includes(f.animationName);f.target===e&&h&&Us.flushSync(()=>c("ANIMATION_END"))},u=f=>{f.target===e&&(s.current=Pm(n.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:w.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function Pm(t){return(t==null?void 0:t.animationName)||"none"}function HCe({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=VCe({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=Yc(r),c=w.useCallback(l=>{if(s){const f=typeof l=="function"?l(t):l;f!==t&&a(f)}else i(l)},[s,t,i,a]);return[o,c]}function VCe({defaultProp:t,onChange:e}){const r=w.useState(t),[n]=r,i=w.useRef(n),s=Yc(e);return w.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}var GCe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Gu=new WeakMap,Im=new WeakMap,Tm={},Mw=0,Eq=function(t){return t&&(t.host||Eq(t.parentNode))},KCe=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=Eq(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})},YCe=function(t,e,r,n){var i=KCe(e,Array.isArray(t)?t:[t]);Tm[r]||(Tm[r]=new WeakMap);var s=Tm[r],o=[],a=new Set,c=new Set(i),l=function(f){!f||a.has(f)||(a.add(f),l(f.parentNode))};i.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))u(d);else{var h=d.getAttribute(n),p=h!==null&&h!=="false",m=(Gu.get(d)||0)+1,v=(s.get(d)||0)+1;Gu.set(d,m),s.set(d,v),o.push(d),m===1&&p&&Im.set(d,!0),v===1&&d.setAttribute(r,"true"),p||d.setAttribute(n,"true")}})};return u(e),a.clear(),Mw++,function(){o.forEach(function(f){var d=Gu.get(f)-1,h=s.get(f)-1;Gu.set(f,d),s.set(f,h),d||(Im.has(f)||f.removeAttribute(n),Im.delete(f)),h||f.removeAttribute(r)}),Mw--,Mw||(Gu=new WeakMap,Gu=new WeakMap,Im=new WeakMap,Tm={})}},QCe=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=e||GCe(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),YCe(n,i,r,"aria-hidden")):function(){return null}},xv="right-scroll-bar-position",wv="width-before-scroll-bar",JCe="with-scroll-bars-hidden",XCe="--removed-body-scroll-bar-size";function Nw(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function ZCe(t,e){var r=w.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=e,r.facade}var fI=new WeakMap;function e4e(t,e){var r=ZCe(e||null,function(n){return t.forEach(function(i){return Nw(i,n)})});return w.useLayoutEffect(function(){var n=fI.get(r);if(n){var i=new Set(n),s=new Set(t),o=r.current;i.forEach(function(a){s.has(a)||Nw(a,null)}),s.forEach(function(a){i.has(a)||Nw(a,o)})}fI.set(r,t)},[t]),r}function t4e(t){return t}function r4e(t,e){e===void 0&&(e=t4e);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(s){var o=e(s,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(s){for(n=!0;r.length;){var o=r;r=[],o.forEach(s)}r={push:function(a){return s(a)},filter:function(){return r}}},assignMedium:function(s){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(s),o=r}var c=function(){var u=o;o=[],u.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(u){o.push(u),l()},filter:function(u){return o=o.filter(u),r}}}};return i}function n4e(t){t===void 0&&(t={});var e=r4e(null);return e.options=Yi({async:!0,ssr:!1},t),e}var Cq=function(t){var e=t.sideCar,r=kb(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return w.createElement(n,Yi({},r))};Cq.isSideCarExport=!0;function i4e(t,e){return t.useMedium(e),Cq}var Sq=n4e(),Dw=function(){},S2=w.forwardRef(function(t,e){var r=w.useRef(null),n=w.useState({onScrollCapture:Dw,onWheelCapture:Dw,onTouchMoveCapture:Dw}),i=n[0],s=n[1],o=t.forwardProps,a=t.children,c=t.className,l=t.removeScrollBar,u=t.enabled,f=t.shards,d=t.sideCar,h=t.noIsolation,p=t.inert,m=t.allowPinchZoom,v=t.as,y=v===void 0?"div":v,b=kb(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),E=d,S=e4e([r,e]),P=Yi(Yi({},b),i);return w.createElement(w.Fragment,null,u&&w.createElement(E,{sideCar:Sq,removeScrollBar:l,shards:f,noIsolation:h,inert:p,setCallbacks:s,allowPinchZoom:!!m,lockRef:r}),o?w.cloneElement(w.Children.only(a),Yi(Yi({},P),{ref:S})):w.createElement(y,Yi({},P,{className:c,ref:S}),a))});S2.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};S2.classNames={fullWidth:wv,zeroRight:xv};var s4e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function o4e(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=s4e();return e&&t.setAttribute("nonce",e),t}function a4e(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function c4e(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var l4e=function(){var t=0,e=null;return{add:function(r){t==0&&(e=o4e())&&(a4e(e,r),c4e(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},u4e=function(){var t=l4e();return function(e,r){w.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},kq=function(){var t=u4e(),e=function(r){var n=r.styles,i=r.dynamic;return t(n,i),null};return e},f4e={left:0,top:0,right:0,gap:0},Lw=function(t){return parseInt(t||"",10)||0},d4e=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[Lw(r),Lw(n),Lw(i)]},h4e=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return f4e;var e=d4e(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])}},p4e=kq(),m4e=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(JCe,` { - 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(xv,` { - right: `).concat(a,"px ").concat(n,`; - } - - .`).concat(wv,` { - margin-right: `).concat(a,"px ").concat(n,`; - } - - .`).concat(xv," .").concat(xv,` { - right: 0 `).concat(n,`; - } - - .`).concat(wv," .").concat(wv,` { - margin-right: 0 `).concat(n,`; - } - - body { - `).concat(XCe,": ").concat(a,`px; - } -`)},v4e=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,s=w.useMemo(function(){return h4e(i)},[i]);return w.createElement(p4e,{styles:m4e(s,!e,i,r?"":"!important")})},Z3=!1;if(typeof window<"u")try{var Om=Object.defineProperty({},"passive",{get:function(){return Z3=!0,!0}});window.addEventListener("test",Om,Om),window.removeEventListener("test",Om,Om)}catch{Z3=!1}var Ku=Z3?{passive:!1}:!1,y4e=function(t){return t.tagName==="TEXTAREA"},Aq=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!y4e(t)&&r[e]==="visible")},g4e=function(t){return Aq(t,"overflowY")},b4e=function(t){return Aq(t,"overflowX")},dI=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=_q(t,r);if(n){var i=Pq(t,r),s=i[1],o=i[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},x4e=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},w4e=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},_q=function(t,e){return t==="v"?g4e(e):b4e(e)},Pq=function(t,e){return t==="v"?x4e(e):w4e(e)},E4e=function(t,e){return t==="h"&&e==="rtl"?-1:1},C4e=function(t,e,r,n,i){var s=E4e(t,window.getComputedStyle(e).direction),o=s*n,a=r.target,c=e.contains(a),l=!1,u=o>0,f=0,d=0;do{var h=Pq(t,a),p=h[0],m=h[1],v=h[2],y=m-v-s*p;(p||y)&&_q(t,a)&&(f+=y,d+=p),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(u&&(i&&f===0||!i&&o>f)||!u&&(i&&d===0||!i&&-o>d))&&(l=!0),l},Rm=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},hI=function(t){return[t.deltaX,t.deltaY]},pI=function(t){return t&&"current"in t?t.current:t},S4e=function(t,e){return t[0]===e[0]&&t[1]===e[1]},k4e=function(t){return` - .block-interactivity-`.concat(t,` {pointer-events: none;} - .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},A4e=0,Yu=[];function _4e(t){var e=w.useRef([]),r=w.useRef([0,0]),n=w.useRef(),i=w.useState(A4e++)[0],s=w.useState(function(){return kq()})[0],o=w.useRef(t);w.useEffect(function(){o.current=t},[t]),w.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var m=YC([t.lockRef.current],(t.shards||[]).map(pI),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=w.useCallback(function(m,v){if("touches"in m&&m.touches.length===2)return!o.current.allowPinchZoom;var y=Rm(m),b=r.current,E="deltaX"in m?m.deltaX:b[0]-y[0],S="deltaY"in m?m.deltaY:b[1]-y[1],P,R=m.target,L=Math.abs(E)>Math.abs(S)?"h":"v";if("touches"in m&&L==="h"&&R.type==="range")return!1;var j=dI(L,R);if(!j)return!0;if(j?P=L:(P=L==="v"?"h":"v",j=dI(L,R)),!j)return!1;if(!n.current&&"changedTouches"in m&&(E||S)&&(n.current=P),!P)return!0;var H=n.current||P;return C4e(H,v,m,H==="h"?E:S,!0)},[]),c=w.useCallback(function(m){var v=m;if(!(!Yu.length||Yu[Yu.length-1]!==s)){var y="deltaY"in v?hI(v):Rm(v),b=e.current.filter(function(P){return P.name===v.type&&P.target===v.target&&S4e(P.delta,y)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var E=(o.current.shards||[]).map(pI).filter(Boolean).filter(function(P){return P.contains(v.target)}),S=E.length>0?a(v,E[0]):!o.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),l=w.useCallback(function(m,v,y,b){var E={name:m,delta:v,target:y,should:b};e.current.push(E),setTimeout(function(){e.current=e.current.filter(function(S){return S!==E})},1)},[]),u=w.useCallback(function(m){r.current=Rm(m),n.current=void 0},[]),f=w.useCallback(function(m){l(m.type,hI(m),m.target,a(m,t.lockRef.current))},[]),d=w.useCallback(function(m){l(m.type,Rm(m),m.target,a(m,t.lockRef.current))},[]);w.useEffect(function(){return Yu.push(s),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Ku),document.addEventListener("touchmove",c,Ku),document.addEventListener("touchstart",u,Ku),function(){Yu=Yu.filter(function(m){return m!==s}),document.removeEventListener("wheel",c,Ku),document.removeEventListener("touchmove",c,Ku),document.removeEventListener("touchstart",u,Ku)}},[]);var h=t.removeScrollBar,p=t.inert;return w.createElement(w.Fragment,null,p?w.createElement(s,{styles:k4e(i)}):null,h?w.createElement(v4e,{gapMode:"margin"}):null)}const P4e=i4e(Sq,_4e);var Iq=w.forwardRef(function(t,e){return w.createElement(S2,Yi({},t,{ref:e,sideCar:P4e}))});Iq.classNames=S2.classNames;const I4e=Iq,Tq="Popover",[Oq,y_e]=tq(Tq,[vq]),k2=vq(),[T4e,th]=Oq(Tq),O4e=t=>{const{__scopePopover:e,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:o=!1}=t,a=k2(e),c=w.useRef(null),[l,u]=w.useState(!1),[f=!1,d]=HCe({prop:n,defaultProp:i,onChange:s});return w.createElement(UCe,a,w.createElement(T4e,{scope:e,contentId:U8e(),triggerRef:c,open:f,onOpenChange:d,onOpenToggle:w.useCallback(()=>d(h=>!h),[d]),hasCustomAnchor:l,onCustomAnchorAdd:w.useCallback(()=>u(!0),[]),onCustomAnchorRemove:w.useCallback(()=>u(!1),[]),modal:o},r))},R4e="PopoverAnchor",$4e=w.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,i=th(R4e,r),s=k2(r),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=i;return w.useEffect(()=>(o(),()=>a()),[o,a]),w.createElement(xq,dn({},s,n,{ref:e}))}),M4e="PopoverTrigger",N4e=w.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,i=th(M4e,r),s=k2(r),o=Ru(e,i.triggerRef),a=w.createElement(Cp.button,dn({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":$q(i.open)},n,{ref:o,onClick:Ql(t.onClick,i.onOpenToggle)}));return i.hasCustomAnchor?a:w.createElement(xq,dn({asChild:!0},s),a)}),D4e="PopoverPortal",[g_e,L4e]=Oq(D4e,{forceMount:void 0}),$1="PopoverContent",j4e=w.forwardRef((t,e)=>{const r=L4e($1,t.__scopePopover),{forceMount:n=r.forceMount,...i}=t,s=th($1,t.__scopePopover);return w.createElement(wq,{present:n||s.open},s.modal?w.createElement(B4e,dn({},i,{ref:e})):w.createElement(F4e,dn({},i,{ref:e})))}),B4e=w.forwardRef((t,e)=>{const r=th($1,t.__scopePopover),n=w.useRef(null),i=Ru(e,n),s=w.useRef(!1);return w.useEffect(()=>{const o=n.current;if(o)return QCe(o)},[]),w.createElement(I4e,{as:p9,allowPinchZoom:!0},w.createElement(Rq,dn({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ql(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),s.current||(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ql(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Ql(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})))}),F4e=w.forwardRef((t,e)=>{const r=th($1,t.__scopePopover),n=w.useRef(!1),i=w.useRef(!1);return w.createElement(Rq,dn({},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 c=s.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}}))}),Rq=w.forwardRef((t,e)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...f}=t,d=th($1,r),h=k2(r);return O8e(),w.createElement(R8e,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s},w.createElement(P8e,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>d.onOpenChange(!1)},w.createElement(zCe,dn({"data-state":$q(d.open),role:"dialog",id:d.contentId},h,f,{ref:e,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))});function $q(t){return t?"open":"closed"}const U4e=O4e,z4e=$4e,q4e=N4e,W4e=j4e,Mq=()=>{const t=g.createContext(void 0);return[()=>{const r=g.useContext(t);if(!r)throw new Error("useGenericContext must be used within a Provider");return r},t.Provider]};Mq();function M1(){return M1=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}const V4e=(t,e)=>t.toLowerCase()===e.toLowerCase();var Xa=function(t){return t[t.VERY_LARGE=0]="VERY_LARGE",t[t.FRACTION=1]="FRACTION",t[t.VERY_TINY=2]="VERY_TINY",t[t.MIXED=3]="MIXED",t}(Xa||{});const G4e=t=>{if(isNaN(Number(t)))return console.error(`display format error ${t} is not a number`),"NaN";const e=Number(t);if(e===0)return"0";let r;e>1e8?r=Xa.VERY_LARGE:e<1e-10?r=Xa.VERY_TINY:e<1?r=Xa.FRACTION:r=Xa.MIXED;let n,i;switch(r){case Xa.VERY_LARGE:n="compact",i={maximumFractionDigits:4};break;case Xa.VERY_TINY:n="scientific",i={maximumFractionDigits:4};break;case Xa.FRACTION:n="standard",i={maximumSignificantDigits:4};break;default:n="standard",i={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",M1({notation:n},i)).format(e)},K4e=t=>t.charAt(0).toUpperCase()+t.slice(1),Y4e=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=ur(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:$t,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:Ki.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},Q4e=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await ur(e),n=await r.getCoinPrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},J4e=async({accountAddress:t,chainId:e,contractAddress:r},{hideUnlistedTokens:n,hideCollectibles:i,includeMetadata:s=!0,verifiedOnly:o})=>{try{const{indexerClient:a}=ur(e),c=await a.getTokenBalances(M1({accountAddress:t,includeMetadata:s,metadataOptions:{verifiedOnly:o??!0}},r?{contractAddress:r}:{}));let l=(c==null?void 0:c.balances)||[];if(n&&l.length>0){const u=await Q4e({tokens:l.map(f=>({chainId:f.chainId,contractAddress:f.contractAddress,tokenId:f.tokenID}))});l=l.filter(f=>{const d=u==null?void 0:u.find(h=>V4e(h.token.contractAddress,f.contractAddress)&&h.token.chainId===f.chainId);return f.contractType!=="ERC20"||!!d&&d.price!==null})}return i&&l.length>0&&(l=l.filter(u=>u.contractType!=="ERC721"&&u.contractType!=="ERC1155")),l}catch(a){return console.error(a),[]}},X4e=async({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})=>{try{return(await Promise.all([Y4e({accountAddress:t,chainId:e}),J4e({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})])).flat()}catch(i){return console.error(i),[]}},Z4e=async({tokens:t})=>{const{metadataClient:e}=ur(t.chainId);return(await e.getTokenMetadata({chainID:t.chainId.toString(),contractAddress:t.contractAddress,tokenIDs:t.tokenIds})).tokenMetadata},e9e=["chainIds"],Nq={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},t9e=(t,e)=>pn({queryKey:["balances",t,e],queryFn:async()=>{const{chainIds:r}=t,n=H4e(t,e9e);return(await Promise.all(r.map(s=>X4e(M1({},n,{chainId:s}),e)))).flat()},retry:!0,staleTime:Nq.oneSecond*30,enabled:t.chainIds.length>0&&!!t.accountAddress}),r9e=t=>pn({queryKey:["useTokenMetadata",t],queryFn:()=>Z4e(t),retry:!0,staleTime:Nq.oneMinute*10,enabled:!!t.tokens.chainId&&!!t.tokens.contractAddress});Mq();const n9e=({size:t=30})=>g.createElement(z,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",flexShrink:"0",style:{width:`${t}px`,height:`${t}px`}},g.createElement(oe,{variant:"large",color:"textInverse100"},"?")),i9e=({imageUrl:t,size:e=30})=>t?g.createElement(ar,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):g.createElement(n9e,{size:e}),Dq=({imageUrl:t})=>g.createElement(un,{padding:"0",aspectRatio:"1/1",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:"sm",background:"backgroundSecondary"},g.createElement(ar,{style:{height:"100%"},src:t}));Ro("packages/wallet/src/shared/Skeleton/styles.css.ts","kit");const s9e=c9({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),o9e=Fr({height:"76px",backgroundColor:"#909090",animation:`${s9e} 2s ease-in-out infinite`},"skeleton");$o();const $h=({width:t="100%",height:e="100%",borderRadius:r="md",aspectRatio:n})=>g.createElement(z,{className:o9e,borderRadius:r,aspectRatio:n,style:{width:t,height:e}});Ro("packages/wallet/src/shared/styles.css.ts","kit");Fr({":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"clickable");Fr({"> div":{overflowY:"scroll"}},"scrollbar");const Lq=Fr({},"walletContent");hi(`${Lq} + button`,{backgroundColor:"transparent"});hi(`${Lq} + button > svg`,{width:"20px",height:"20px"});$o();const a9e=({chainId:t})=>{var e;const{chains:r}=vt(),{network:n}=ur(t),i=Cr(t,r),s=zq(t),o=qq(t);return g.createElement(z,{height:"6",paddingY:"1",paddingLeft:"1.5",paddingRight:"2",gap:"1",style:{background:o},borderRadius:"xs",flexDirection:"row",justifyContent:"center",alignItems:"center",width:"fit"},g.createElement(ar,{style:{width:"14px"},src:i.logoURI}),g.createElement(oe,{fontWeight:"bold",fontSize:"xsmall",style:{color:s}},K4e((e=n.title)!=null?e:n.name)))};Ro("packages/wallet/src/shared/WalletHeader/styles.css.ts","kit");Fr({":focus-visible":{boxShadow:"none"}},"searchButton");$o();var Cs={};const c9e=kr(DY),l9e=kr(AK),u9e=kr(LR),f9e=kr(HJ),d9e=kr(eK),h9e=kr($Y),p9e=kr(nX),m9e=kr(vX),v9e=kr(wK),y9e=kr(XG),mI=kr(KJ),g9e=kr(dZ),b9e=kr(oX),x9e=kr(lK),w9e=kr(xR),E9e=kr(PJ),vI=kr(XK),C9e=kr(DJ),S9e=kr(pZ),k9e=kr(xX),A9e=kr(IX);(function(t){var e=vi&&vi.__createBinding||(Object.create?function(Y,Q,F,x){x===void 0&&(x=F),Object.defineProperty(Y,x,{enumerable:!0,get:function(){return Q[F]}})}:function(Y,Q,F,x){x===void 0&&(x=F),Y[x]=Q[F]}),r=vi&&vi.__setModuleDefault||(Object.create?function(Y,Q){Object.defineProperty(Y,"default",{enumerable:!0,value:Q})}:function(Y,Q){Y.default=Q}),n=vi&&vi.__importStar||function(Y){if(Y&&Y.__esModule)return Y;var Q={};if(Y!=null)for(var F in Y)F!=="default"&&Object.prototype.hasOwnProperty.call(Y,F)&&e(Q,Y,F);return r(Q,Y),Q};Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=t.nameprep=t.hexDataSlice=t.hexDataLength=t.hexZeroPad=t.hexValue=t.hexStripZeros=t.hexConcat=t.isHexString=t.hexlify=t.base64=t.base58=t.TransactionDescription=t.LogDescription=t.Interface=t.SigningKey=t.HDNode=t.defaultPath=t.isBytesLike=t.isBytes=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.shallowCopy=t.resolveProperties=t.getStatic=t.defineReadOnly=t.deepCopy=t.checkProperties=t.poll=t.fetchJson=t._fetchData=t.RLP=t.Logger=t.checkResultErrors=t.FormatTypes=t.ParamType=t.FunctionFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.Fragment=t.defaultAbiCoder=t.AbiCoder=void 0,t.Indexed=t.Utf8ErrorReason=t.UnicodeNormalizationForm=t.SupportedAlgorithm=t.mnemonicToSeed=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.getAccountPath=t.verifyTypedData=t.verifyMessage=t.recoverPublicKey=t.computePublicKey=t.recoverAddress=t.computeAddress=t.getJsonWalletAddress=t.TransactionTypes=t.serializeTransaction=t.parseTransaction=t.accessListify=t.joinSignature=t.splitSignature=t.soliditySha256=t.solidityKeccak256=t.solidityPack=t.shuffled=t.randomBytes=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.computeHmac=t.commify=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.isAddress=t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.getAddress=t._TypedDataEncoder=t.id=t.isValidName=t.namehash=t.hashMessage=t.dnsEncode=t.parseBytes32String=void 0;var i=c9e;Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return i.AbiCoder}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return i.checkResultErrors}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return i.ConstructorFragment}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return i.defaultAbiCoder}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return i.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return i.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return i.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return i.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return i.FunctionFragment}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return i.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return i.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return i.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return i.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return i.TransactionDescription}});var s=l9e;Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return s.getAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return s.getCreate2Address}}),Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return s.getContractAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return s.getIcapAddress}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return s.isAddress}});var o=n(u9e);t.base64=o;var a=f9e;Object.defineProperty(t,"base58",{enumerable:!0,get:function(){return a.Base58}});var c=d9e;Object.defineProperty(t,"arrayify",{enumerable:!0,get:function(){return c.arrayify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return c.concat}}),Object.defineProperty(t,"hexConcat",{enumerable:!0,get:function(){return c.hexConcat}}),Object.defineProperty(t,"hexDataSlice",{enumerable:!0,get:function(){return c.hexDataSlice}}),Object.defineProperty(t,"hexDataLength",{enumerable:!0,get:function(){return c.hexDataLength}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return c.hexlify}}),Object.defineProperty(t,"hexStripZeros",{enumerable:!0,get:function(){return c.hexStripZeros}}),Object.defineProperty(t,"hexValue",{enumerable:!0,get:function(){return c.hexValue}}),Object.defineProperty(t,"hexZeroPad",{enumerable:!0,get:function(){return c.hexZeroPad}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return c.isBytes}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return c.isBytesLike}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return c.isHexString}}),Object.defineProperty(t,"joinSignature",{enumerable:!0,get:function(){return c.joinSignature}}),Object.defineProperty(t,"zeroPad",{enumerable:!0,get:function(){return c.zeroPad}}),Object.defineProperty(t,"splitSignature",{enumerable:!0,get:function(){return c.splitSignature}}),Object.defineProperty(t,"stripZeros",{enumerable:!0,get:function(){return c.stripZeros}});var l=h9e;Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return l._TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return l.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return l.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return l.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return l.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return l.namehash}});var u=p9e;Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return u.defaultPath}}),Object.defineProperty(t,"entropyToMnemonic",{enumerable:!0,get:function(){return u.entropyToMnemonic}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return u.getAccountPath}}),Object.defineProperty(t,"HDNode",{enumerable:!0,get:function(){return u.HDNode}}),Object.defineProperty(t,"isValidMnemonic",{enumerable:!0,get:function(){return u.isValidMnemonic}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return u.mnemonicToEntropy}}),Object.defineProperty(t,"mnemonicToSeed",{enumerable:!0,get:function(){return u.mnemonicToSeed}});var f=m9e;Object.defineProperty(t,"getJsonWalletAddress",{enumerable:!0,get:function(){return f.getJsonWalletAddress}});var d=v9e;Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return d.keccak256}});var h=y9e;Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return h.Logger}});var p=mI;Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return p.computeHmac}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return p.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return p.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return p.sha512}});var m=g9e;Object.defineProperty(t,"solidityKeccak256",{enumerable:!0,get:function(){return m.keccak256}}),Object.defineProperty(t,"solidityPack",{enumerable:!0,get:function(){return m.pack}}),Object.defineProperty(t,"soliditySha256",{enumerable:!0,get:function(){return m.sha256}});var v=b9e;Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return v.randomBytes}}),Object.defineProperty(t,"shuffled",{enumerable:!0,get:function(){return v.shuffled}});var y=x9e;Object.defineProperty(t,"checkProperties",{enumerable:!0,get:function(){return y.checkProperties}}),Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return y.deepCopy}}),Object.defineProperty(t,"defineReadOnly",{enumerable:!0,get:function(){return y.defineReadOnly}}),Object.defineProperty(t,"getStatic",{enumerable:!0,get:function(){return y.getStatic}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return y.resolveProperties}}),Object.defineProperty(t,"shallowCopy",{enumerable:!0,get:function(){return y.shallowCopy}});var b=n(w9e);t.RLP=b;var E=E9e;Object.defineProperty(t,"computePublicKey",{enumerable:!0,get:function(){return E.computePublicKey}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return E.recoverPublicKey}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return E.SigningKey}});var S=vI;Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return S.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return S.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return S.parseBytes32String}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return S._toEscapedUtf8String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return S.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return S.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return S.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return S.Utf8ErrorFuncs}});var P=C9e;Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return P.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return P.computeAddress}}),Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return P.parse}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return P.recoverAddress}}),Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return P.serialize}}),Object.defineProperty(t,"TransactionTypes",{enumerable:!0,get:function(){return P.TransactionTypes}});var R=S9e;Object.defineProperty(t,"commify",{enumerable:!0,get:function(){return R.commify}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return R.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return R.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return R.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return R.parseUnits}});var L=k9e;Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return L.verifyMessage}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return L.verifyTypedData}});var j=A9e;Object.defineProperty(t,"_fetchData",{enumerable:!0,get:function(){return j._fetchData}}),Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return j.fetchJson}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return j.poll}});var H=mI;Object.defineProperty(t,"SupportedAlgorithm",{enumerable:!0,get:function(){return H.SupportedAlgorithm}});var K=vI;Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return K.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return K.Utf8ErrorReason}})})(Cs);const _9e=(t,e)=>t.toLowerCase()===e.toLowerCase();function Bn(){return Bn=Object.assign?Object.assign.bind():function(t){for(var e=1;e svg`,{width:"20px",height:"20px"});const Bq=Fr({},"googleWaasButtonContainer");hi(`${Bq}`,{width:"40px",height:"40px",overflow:"hidden",borderRadius:"4px",alignItems:"center",justifyContent:"center"});const T9e=Fr([jj({variant:"large"}),{height:"48px",width:"40px",display:"flex",justifyContent:"center",alignItems:"center",padding:"10px",border:`${Re.borderWidths.thick} solid ${Re.colors.borderNormal}`,borderRadius:Re.radii.sm,color:Re.colors.text100,background:"transparent",textAlign:"center",caretColor:"transparent",boxShadow:"none",":hover":{borderColor:Re.colors.borderFocus},":focus":{borderColor:Re.colors.borderFocus},"::selection":{background:"transparent"}}],"digitInput");$o();const O9e=({onConnect:t,connectors:e})=>{const{theme:r}=cp(),{isPending:n}=ZU();return g.createElement(z,{flexDirection:"column",gap:"2",marginTop:"5"},e.map(i=>{const s=r==="dark"?i._wallet.logoDark:i._wallet.logoLight,o=i._wallet.name,a=i._wallet.id;return g.createElement(z,{key:a,as:"button",flexDirection:"row",alignItems:"center",justifyContent:"space-between",background:"backgroundSecondary",color:"text100",borderRadius:"md",padding:"4",style:{height:"60px"},className:P9e,onClick:()=>t(i)},g.createElement(oe,{variant:"medium",color:"text100"},o,n),g.createElement(z,{justifyContent:"center",alignItems:"center",style:{backgroundColor:i._wallet.iconBackground},borderRadius:"md",className:jq},g.createElement(s,null)))}))},R9e=({config:t={}})=>{const{signIn:e={}}=t,{logoUrl:r}=e;return g.createElement(g.Fragment,null,r&&g.createElement(z,{marginTop:"5",justifyContent:"center",alignItems:"center"},g.createElement(ar,{src:r,style:{height:"110px"}})))};let sr=function(t){return t.Settings="@kit.settings",t.Theme="@kit.theme",t.EthAuthProof="@kit.ethAuthProof",t.EthAuthSettings="@kit.ethAuthSettings",t.ProjectAccessKey="@kit.projectAccessKey",t.WaasGoogleClientID="@kit.waasGoogleClientId",t.WaasGoogleIdToken="@kit.waasGoogleIdToken",t.WaasAppleClientID="@kit.waasAppleClientId",t.WaasAppleRedirectURI="@kit.waasAppleRedirectURI",t.WaasAppleIdToken="@kit.waasAppleIdToken",t.WaasSessionHash="@kit.waasSessionHash",t.WaasActiveLoginType="@kit.waasActiveLoginType",t.WaasEmailIdToken="@kit.waasEmailIdToken",t}({});const jw={showEmailInput:!0,walletAuthOptions:["sequence","sequence-waas","metamask","wallet-connect","coinbase-wallet"],socialAuthOptions:["google","facebook","twitch","apple","google-waas","apple-waas"]},Fq=60*60*24*7;function $9e(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s=0)&&(r[i]=t[i]);return r}const M9e=["createConnector"],Uq=(t,e)=>{localStorage.setItem(sr.ProjectAccessKey,t);const r=[];return e.forEach(n=>{const{createConnector:i}=n,s=$9e(n,M9e),o=Bn({},s),a=c=>{const u=i()(c);return u._wallet=Bn({},o),u};r.push(a)}),r},N9e=t=>/^\S+@\S+\.\S{2,}$/.test(t),eE={1:{name:"Ethereum",symbol:"ETH",logoURI:"https://assets.coingecko.com/coins/images/279/thumb/ethereum.png",decimals:18,blockExplorerName:"Etherscan",blockExplorerUrl:"https://etherscan.io"},5:{name:"Goerli",symbol:"ETH",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/279/thumb/ethereum.png",blockExplorerName:"Etherscan (Goerli)",blockExplorerUrl:"https://goerli.etherscan.io"},10:{name:"Optimism",symbol:"OP",logoURI:"https://assets.coingecko.com/coins/images/25244/small/Optimism.png",decimals:18,blockExplorerName:"Etherscan (Optimism)",blockExplorerUrl:"https://optimistic.etherscan.io"},56:{name:"BNB",symbol:"BNB",logoURI:"https://assets.coingecko.com/coins/images/825/thumb/bnb-icon2_2x.png",decimals:18,blockExplorerName:"BscScan",blockExplorerUrl:"https://bscscan.com"},100:{name:"Gnosis",symbol:"GNO",logoURI:"https://assets.coingecko.com/coins/images/662/small/logo_square_simple_300px.png",decimals:18,blockExplorerUrl:"https://gnosisscan.io",blockExplorerName:"Gnosis Scan"},137:{name:"Polygon",symbol:"MATIC",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"Polyscan",blockExplorerUrl:"https://polygonscan.com"},1101:{name:"Polygon zkEVM",symbol:"ETH",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"PolygonScan",blockExplorerUrl:"https://zkevm.polygonscan.com"},42161:{name:"Arbitrum",symbol:"ARB",logoURI:"https://assets.coingecko.com/asset_platforms/images/33/small/arbitrum-one.png",decimals:18,blockExplorerName:"Arbiscan",blockExplorerUrl:"https://arbiscan.io"},43114:{name:"Avalanche",symbol:"AVAX",logoURI:"https://assets.coingecko.com/coins/images/12559/small/Avalanche_Circle_RedWhite_Trans.png",decimals:18,blockExplorerName:"Snowtrace",blockExplorerUrl:"https://snowtrace.io"},80001:{name:"Mumbai",symbol:"MATIC",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"Polyscan (Mumbai)",blockExplorerUrl:"https://mumbai.polygonscan.com"}},D9e=(t,e)=>{const r=e.find(s=>s.id===t);if(r){var n,i;return{name:r.nativeCurrency.name,symbol:r.nativeCurrency.symbol,decimals:r.nativeCurrency.decimals,logoURI:eE[1].logoURI,blockExplorerName:(n=r.blockExplorers)==null?void 0:n.default.name,blockExplorerUrl:(i=r.blockExplorers)==null?void 0:i.default.url}}},Cr=(t,e)=>eE[t]||D9e(t,e)||eE[1],rh=()=>{const t=g.createContext(void 0);return[()=>{const r=g.useContext(t);if(!r)throw new Error("useGenericContext must be used within a Provider");return r},t.Provider]},xg=t=>{switch(t){case"top-right":return{top:"0px",right:"0px"};case"top-left":return{top:"0px",left:"0px"};case"top-center":return{top:"0px"};case"bottom-right":return{bottom:"0px",right:"0px"};case"bottom-left":return{bottom:"0px",left:"0px"};case"bottom-center":return{bottom:"0px"};case"middle-right":return{right:"0px"};case"middle-left":return{left:"0px"};case"center":default:return{}}},zq=(t,e="light")=>{switch(t){case 1:return"#abf";case 137:return"#c7a6ff";case 42161:return"#52A7E6";case 10:return"#DB3132";case 56:return e==="light"?"#CB9C1D":"#EEB445";case 43114:return"#E84142";case 100:return e==="light"?"#00193C":"#D8E8FF";case 5:return e==="light"?"#A77A00":"#FFA700";case 80001:return e==="light"?"#D68828":"#FFA700";default:return"#abf"}},qq=(t,e="light")=>{switch(t){case 1:return"#132362";case 137:return"#350881";case 42161:return e==="light"?"#EDF7FF":"#0C3754";case 10:return e==="light"?"#FFEAE9":"#390B0C";case 56:return e==="light"?"#FFE8AB":"#554018";case 43114:return e==="light"?"#FBDFDF":"#390B0C";case 100:return e==="light"?"#D8E8FF":"#00193C";case 5:return e==="light"?"#FFD871":"#554018";case 80001:return e==="light"?"#FFE8CD":"#554018";default:return"#132362"}};function L9e(t){var e;const{account:r,chain:n,transport:i}=t,s={chainId:n.id,name:n.name,ensAddress:(e=n.contracts)==null||(e=e.ensRegistry)==null?void 0:e.address};return new K$(i,s).getSigner(r.address)}function j9e(t){var e;const{chain:r,transport:n}=t,i={chainId:r.id,name:r.name,ensAddress:(e=r.contracts)==null||(e=e.ensRegistry)==null?void 0:e.address};return n.type==="fallback"?new iZ(n.transports.map(({value:s})=>new fa(s==null?void 0:s.url,i))):new fa(n.url,i)}const B9e=async t=>{const e=localStorage.getItem(sr.EthAuthProof);if(e)return JSON.parse(e);const r=localStorage.getItem(sr.EthAuthSettings);if(!r)throw new Error("No ETHAuth settings found");const n=JSON.parse(r),i=t.account.address,s=new ib;s.address=i,s.claims.app=n.app||"app",s.claims.ogn=n.origin,s.claims.n=n.nonce,s.setExpiryIn(n.expiry?Math.max(n.expiry,200):Fq);const o=s.messageTypedData();o.domain.verifyingContract;const c=await L9e(t)._signTypedData(o.domain,o.types,o.message);s.signature=c;const u=await new Q0().encodeProof(s,!0);return{typedData:o,proofString:u}},F9e=async(t,e,r)=>{const n=t.account.address,s=await new Q0().decodeProof(r.proofString,!0),o=j9e(e);return await fu.utils.isValidTypedDataSignature(n,r.typedData,s.signature,o)},ur=t=>{const e=ht[t];if(!e)throw"invalid network";const r=localStorage.getItem(sr.ProjectAccessKey)||void 0,n=new cC("https://metadata.sequence.app",r),i=new aC(U8(e.name),r),s=new Zh("https://api.sequence.app",r);return{network:e,metadataClient:n,indexerClient:i,apiClient:s}};function U9e({connector:t,onSuccess:e}){if(!t)return{inProgress:!1,loading:!1,error:void 0,initiateAuth:async d=>{},sendChallengeAnswer:async d=>{}};const[r,n]=w.useState(""),[i,s]=w.useState(),[o,a]=w.useState(!1),[c,l]=w.useState("");return{inProgress:o||!!c,loading:o,error:i,initiateAuth:async d=>{a(!0);try{var h;const p=t,{instance:m}=await((h=p.sequenceWaas)==null?void 0:h.email.initiateAuth({email:d}));l(m),n(d)}catch(p){s(p.message||"Unknown error")}finally{a(!1)}},sendChallengeAnswer:c?async d=>{a(!0);try{var h,p;const m=t,v=await((h=m.sequenceWaas)==null?void 0:h.getSessionHash()),{idToken:y}=await((p=m.sequenceWaas)==null?void 0:p.email.finalizeAuth({instance:c,answer:d,email:r,sessionHash:v}));e(y)}catch(m){s(m.message||"Unknown error"),a(!1)}}:void 0}}const z9e=t=>{const{value:e,digits:r=6,onChange:n,disabled:i=!1}=t,s=w.useMemo(()=>yI(0,r).map(()=>w.createRef()),[]);w.useEffect(()=>{var l;(l=s[0])==null||(l=l.current)==null||l.focus()},[]);const o=(l,u)=>{/^\d$/.test(u)||(u="");const f=[...e];if(f[l]=u,u!==""){var d;(d=s[l+1])==null||(d=d.current)==null||d.focus()}n(f)},a=(l,u)=>{var f,d;const h=s[l].current,p=(f=s[l-1])==null?void 0:f.current,m=(d=s[l+1])==null?void 0:d.current;switch(u.key){case"Backspace":u.preventDefault(),h&&(h.value="",o(l,"")),p==null||p.focus();break;case"ArrowLeft":u.preventDefault(),p==null||p.focus();break;case"ArrowRight":u.preventDefault(),m==null||m.focus();break;default:(h==null?void 0:h.value)===u.key&&(u.preventDefault(),o(l,u.key))}},c=(l,u)=>{const d=u.clipboardData.getData("text/plain").replace(/\D/g,"");if(/^\d{6}$/.test(d)){var h;(h=s[0])==null||(h=h.current)==null||h.focus(),n(d.split("")),setTimeout(()=>{var p;(p=s[s.length-1])==null||(p=p.current)==null||p.focus()})}};return g.createElement(z,{gap:"2"},yI(0,r).map(l=>g.createElement(w.Fragment,{key:l},l===r/2&&g.createElement("span",null),g.createElement(z,{as:"input",className:T9e,value:e[l]||"",ref:s[l],type:"text",inputMode:"numeric",maxLength:1,disabled:i,onFocus:u=>u.target.select(),onPaste:u=>c(l,u),onChange:u=>o(l,u.target.value),onKeyDown:u=>{a(l,u)}}))))},yI=(t,e)=>Array.from({length:e-t},(r,n)=>n+t),q9e=t=>{yv.useScript(yv.appleAuthHelpers.APPLE_SCRIPT_SRC);const{isConnected:e}=mn(),{theme:r}=cp(),{config:n={}}=t,{signIn:i={}}=n,{showEmailInput:s=jw.showEmailInput,socialAuthOptions:o=jw.socialAuthOptions,walletAuthOptions:a=jw.walletAuthOptions}=i,{openConnectModal:c,setOpenConnectModal:l}=t,[u,f]=w.useState(""),[d,h]=w.useState(!1),[p,m]=w.useState([]),{connectors:v,connect:y}=ZU(),b=v.filter(M=>!!(M!=null&&M._wallet)),[E,S]=w.useState(!1),P=b.find(M=>M._wallet.id==="mock"),R=b.find(M=>M._wallet.id.includes("email")),L=b.filter(M=>!!a.find(O=>O===M._wallet.id)).sort((M,A)=>a.indexOf(M._wallet.id)-a.indexOf(A._wallet.id)),j=b.filter(M=>!!o.find(O=>O===M._wallet.id)).sort((M,A)=>o.indexOf(M._wallet.id)-o.indexOf(A._wallet.id)),H=L.length>4,K=M=>{f(M.target.value)},{inProgress:Y,loading:Q,initiateAuth:F,sendChallengeAnswer:x}=U9e({connector:b.find(M=>M._wallet.id==="email-waas"),onSuccess:async M=>{localStorage.setItem(sr.WaasEmailIdToken,M),R&&y({connector:R})}});w.useEffect(()=>{e&&c&&l(!1)},[e,c]);const k=M=>{if(i.useMock&&P){y({connector:P});return}if(M._wallet.id==="email"){const O=prompt("Auto-email login, please specify the email address:");localStorage.setItem($3,O||"")}if(M._wallet.id==="metamask"&&typeof window<"u"){var A;if(!!!((A=window)!=null&&(A=A.ethereum)!=null&&A._metamask)){window.open("https://metamask.io/download/");return}}y({connector:M})},N=async M=>{if(M.preventDefault(),i.useMock&&P){y({connector:P});return}if(R)if(localStorage.setItem($3,u),R._wallet.id==="email-waas")try{await F(u),h(!0)}catch(A){console.log(A)}else y({connector:R})};return d?g.createElement(g.Fragment,null,g.createElement(z,{paddingY:"6",alignItems:"center",justifyContent:"center",flexDirection:"column"},g.createElement(oe,{marginTop:"5",marginBottom:"4",variant:"normal",color:"text80"},"Enter code received in email."),g.createElement(z9e,{value:p,digits:6,onChange:m}),g.createElement(z,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",style:{height:"44px"}},Q?g.createElement(Wc,null):g.createElement(nt,{variant:"primary",disabled:p.includes(""),label:"Verify",onClick:()=>x==null?void 0:x(p.join("")),"data-id":"verifyButton"})))):E?g.createElement(g.Fragment,null,g.createElement(z,{as:"button",position:"absolute",style:{top:"20px"},onClick:()=>S(!1),className:of},g.createElement(Ib,null)),g.createElement(O9e,{connectors:L,onConnect:k})):g.createElement(g.Fragment,null,g.createElement(R9e,{config:n}),g.createElement(z,{marginTop:"5"},R&&s&&g.createElement(g.Fragment,null,g.createElement("form",{onSubmit:N},g.createElement(cl,{onChange:K,value:u,name:"email",placeholder:"Enter email","data-1p-ignore":!0}),g.createElement(z,{alignItems:"center",justifyContent:"center",style:{height:"48px"}},!Y&&g.createElement(nt,{type:"submit",disabled:!N9e(u),marginTop:"4",width:"full",label:"Continue",rightIcon:go}),Y&&g.createElement(Wc,{marginTop:"4"})))),j.length>0&&g.createElement(g.Fragment,null,R&&s&&g.createElement(g.Fragment,null,g.createElement(z,{style:{marginBottom:"-4px"}},g.createElement(o1,{color:"backgroundSecondary"})),g.createElement(z,{justifyContent:"center",alignItems:"center"},g.createElement(oe,{variant:"small",color:"text50"},"or sign in via"))),g.createElement(z,{marginTop:"3",gap:"2",flexDirection:"row",justifyContent:"center",alignItems:"center",flexWrap:"wrap"},j.map(M=>{var A;const O=r==="dark"?M._wallet.monochromeLogoDark:M._wallet.monochromeLogoLight;return g.createElement(z,{key:M._wallet.id,aspectRatio:"1/1",alignItems:"center",justifyContent:"center",style:{width:"40px",height:"40px",margin:"12px 4px"}},M._wallet.id==="google-waas"&&g.createElement(z,{className:Bq},g.createElement(ppe,{type:"icon",size:"large",nonce:(A=localStorage.getItem(sr.WaasSessionHash))!=null?A:void 0,onSuccess:B=>{B.credential&&(localStorage.setItem(sr.WaasGoogleIdToken,B.credential),k(M))},onError:()=>{console.log("Login Failed")}})),M._wallet.id==="apple-waas"&&g.createElement(un,{width:"full",height:"full",padding:"2",borderRadius:"xs",className:of,justifyContent:"center",alignItems:"center",onClick:()=>{const B=localStorage.getItem(sr.WaasAppleClientID)||"",I=localStorage.getItem(sr.WaasAppleRedirectURI)||"",C=localStorage.getItem(sr.WaasSessionHash)||"";yv.appleAuthHelpers.signIn({authOptions:{clientId:B,scope:"openid email",redirectURI:I,usePopup:!0,nonce:C},onSuccess:D=>{var q;(q=D.authorization)!=null&&q.id_token?(localStorage.setItem(sr.WaasAppleIdToken,D.authorization.id_token),k(M)):console.log("Apple login error: No id_token found")},onError:D=>console.error(D)})}},g.createElement(z,{width:"12",height:"12",flexDirection:"column",alignItems:"center",justifyContent:"center"},g.createElement(O,null))),!M._wallet.id.includes("waas")&&g.createElement(un,{width:"full",height:"full",padding:"2",borderRadius:"xs",className:of,justifyContent:"center",alignItems:"center",onClick:()=>{k(M)}},g.createElement(z,{width:"16",height:"16",flexDirection:"column",alignItems:"center",justifyContent:"center"},g.createElement(O,null))))}))),L.length>0&&g.createElement(g.Fragment,null,(R&&s||j.length>0)&&g.createElement(g.Fragment,null,g.createElement(z,{style:{marginBottom:"-4px"}},g.createElement(o1,{color:"backgroundSecondary"})),g.createElement(z,{justifyContent:"center",alignItems:"center"},g.createElement(oe,{variant:"small",color:"text50"},"or select a wallet"))),g.createElement(z,{marginTop:"2",gap:"2",flexDirection:"row",justifyContent:"center",alignItems:"center"},L.map(M=>{const A=r==="dark"?M._wallet.logoDark||M._wallet.logoDark:M._wallet.logoLight||M._wallet.logoLight;return g.createElement(un,{key:M._wallet.id,style:{width:"43px",height:"43px",margin:"12px 4px"},padding:"2",borderRadius:"xs",className:of,justifyContent:"center",alignItems:"center",onClick:()=>k(M)},g.createElement(z,{width:"16",height:"16",flexDirection:"column",alignItems:"center",justifyContent:"center"},g.createElement(A,null)))})),H&&g.createElement(z,{padding:"4",marginTop:"3",background:"backgroundSecondary",width:"full",justifyContent:"space-between",alignItems:"center",borderRadius:"md",color:"text100",as:"button",className:of,onClick:()=>S(!0)},g.createElement(oe,{variant:"medium"},"More options"),g.createElement(go,null)))))};function W9e(t){if(t==null)throw new TypeError("Cannot destructure "+t)}const gI=t=>{let e=Bn({},(W9e(t),t));return g.createElement(g.Fragment,null,g.createElement("svg",Bn({xmlns:"http://www.w3.org/2000/svg",style:{fill:"none"},id:"svg1316",version:"1.1",viewBox:"0 0 396 396"},e),g.createElement("g",{transform:"translate(0,38)",id:"g1256",clipPath:"url(#clip0_5_131)"},g.createElement("g",{id:"g1254",clipPath:"url(#clip1_5_131)"},g.createElement("path",{style:{fill:"#111111"},id:"path1232",d:"M 0,67.5049 V 250.165 c 0,37.282 30.1402,67.505 67.32,67.505 h 261.36 c 37.18,0 67.32,-30.223 67.32,-67.505 V 67.5049 C 396,30.223 365.86,0 328.68,0 H 67.32 C 30.1402,0 0,30.223 0,67.5049 Z"}),g.createElement("path",{style:{fill:"url(#paint0_linear_5_13"},id:"path1234",d:"M 0,67.5049 V 250.165 c 0,37.282 30.1402,67.505 67.32,67.505 h 261.36 c 37.18,0 67.32,-30.223 67.32,-67.505 V 67.5049 C 396,30.223 365.86,0 328.68,0 H 67.32 C 30.1402,0 0,30.223 0,67.5049 Z"}),g.createElement("path",{style:{fill:"url(#paint1_linear_5_131"},id:"path1236",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),g.createElement("path",{style:{fill:"url(#paint2_linear_5_131)"},id:"path1238",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),g.createElement("path",{style:{fill:"url(#paint3_linear_5_131)"},id:"path1240",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),g.createElement("path",{style:{fill:"url(#paint4_linear_5_131)"},id:"path1242",d:"m 98.9999,238.126 c 0,-10.965 -8.8648,-19.854 -19.8,-19.854 -10.9352,0 -19.8,8.889 -19.8,19.854 0,10.966 8.8648,19.855 19.8,19.855 10.9352,0 19.8,-8.889 19.8,-19.855 z"}),g.createElement("path",{style:{fill:"url(#paint5_linear_5_131)"},id:"path1244",d:"m 336.6,158.835 c 0,-10.965 -8.865,-19.854 -19.8,-19.854 -10.935,0 -19.8,8.889 -19.8,19.854 0,10.965 8.865,19.855 19.8,19.855 10.935,0 19.8,-8.89 19.8,-19.855 z"}),g.createElement("path",{style:{fill:"url(#paint6_linear_5_131)"},id:"path1246",d:"m 336.6,158.835 c 0,-10.965 -8.865,-19.854 -19.8,-19.854 -10.935,0 -19.8,8.889 -19.8,19.854 0,10.965 8.865,19.855 19.8,19.855 10.935,0 19.8,-8.89 19.8,-19.855 z"}),g.createElement("path",{style:{fill:"url(#paint7_linear_5_131)"},id:"path1248",d:"M 316.8,59.5632 H 158.4 c -10.935,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.865,19.8544 19.8,19.8544 h 158.4 c 10.935,0 19.8,-8.8892 19.8,-19.8544 0,-10.9653 -8.865,-19.8544 -19.8,-19.8544 z"}),g.createElement("path",{style:{fill:"url(#paint8_linear_5_131)"},id:"path1250",d:"M 316.8,218.272 H 158.4 c -10.935,0 -19.8,8.889 -19.8,19.854 0,10.966 8.865,19.855 19.8,19.855 h 158.4 c 10.935,0 19.8,-8.889 19.8,-19.855 0,-10.965 -8.865,-19.854 -19.8,-19.854 z"}),g.createElement("path",{style:{fill:"url(#paint9_linear_5_131)"},id:"path1252",d:"M 237.6,138.981 H 79.2 c -10.9352,0 -19.8,8.889 -19.8,19.854 0,10.965 8.8648,19.855 19.8,19.855 h 158.4 c 10.935,0 19.8,-8.89 19.8,-19.855 0,-10.965 -8.865,-19.854 -19.8,-19.854 z"}))),g.createElement("defs",{id:"defs1314"},g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"318",x2:"198",y1:"4.0585401e-05",x1:"198",id:"paint0_linear_5_131"},g.createElement("stop",{id:"stop1258",stopColor:"#1D273D"}),g.createElement("stop",{id:"stop1260",stopColor:"#0D0F13",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"63",x2:"92.5",y1:"99",x1:"65.5",id:"paint1_linear_5_131"},g.createElement("stop",{id:"stop1263",stopColor:"#4462FE"}),g.createElement("stop",{id:"stop1265",stopColor:"#7D69FA",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"97.591103",x2:"96.137703",y1:"99.291199",x1:"62.879902",id:"paint2_linear_5_131"},g.createElement("stop",{id:"stop1268",stopColor:"#3757FD"}),g.createElement("stop",{id:"stop1270",stopColor:"#6980FA",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"97.591103",x2:"96.137703",y1:"99.291199",x1:"62.879902",id:"paint3_linear_5_131"},g.createElement("stop",{id:"stop1273",stopColor:"#2447FF"}),g.createElement("stop",{id:"stop1275",stopColor:"#6980FA",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"223.5",x2:"91.5",y1:"251.5",x1:"65",id:"paint4_linear_5_131"},g.createElement("stop",{id:"stop1278",stopColor:"#BC3EE6"}),g.createElement("stop",{id:"stop1280",stopColor:"#D972F1",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"146",x2:"329.5",y1:"172",x1:"305",id:"paint5_linear_5_131"},g.createElement("stop",{id:"stop1283",stopColor:"#29BDFF"}),g.createElement("stop",{id:"stop1285",stopColor:"#96E7FB",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"176.772",x2:"334.56699",y1:"178.418",x1:"300.17999",id:"paint6_linear_5_131"},g.createElement("stop",{id:"stop1288",stopColor:"#23BBFF"}),g.createElement("stop",{id:"stop1290",stopColor:"#85E7FF",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"60",x2:"317.5",y1:"99",x1:"154.5",id:"paint7_linear_5_131"},g.createElement("stop",{id:"stop1293",stopColor:"#23BBFF"}),g.createElement("stop",{id:"stop1295",stopColor:"#85E7FF",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"218",x2:"312.5",y1:"258",x1:"156",id:"paint8_linear_5_131"},g.createElement("stop",{id:"stop1298",stopColor:"#2447FF"}),g.createElement("stop",{id:"stop1300",stopColor:"#6980FA",offset:"1"})),g.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"139",x2:"235.5",y1:"179",x1:"86.000099",id:"paint9_linear_5_131"},g.createElement("stop",{id:"stop1303",stopColor:"#6634FF"}),g.createElement("stop",{id:"stop1305",stopColor:"#9C6DFF",offset:"1"})),g.createElement("clipPath",{id:"clip0_5_131"},g.createElement("rect",{style:{fill:"#ffffff"},y:"0",x:"0",id:"rect1308",height:"317.67001",width:"396"})),g.createElement("clipPath",{id:"clip1_5_131"},g.createElement("rect",{style:{fill:"#ffffff"},y:"0",x:"0",id:"rect1311",height:"317.67001",width:"396"})))))},[Wq,H9e]=rh(),[V9e,G9e]=rh(),[K9e,Y9e]=rh(),[Q9e,J9e]=rh();class tE{constructor(){this._resolve=()=>{},this._reject=()=>{},this._promise=new Promise((e,r)=>{this._reject=r,this._resolve=e})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}}let Qu;function X9e(t){const[e,r]=w.useState();function n(s){var o;(o=Qu)==null||o.resolve({id:s,confirmed:!0}),r(void 0),Qu=void 0}function i(s){var o;(o=Qu)==null||o.resolve({id:s,confirmed:!1}),r(void 0),Qu=void 0}return w.useEffect(()=>{async function s(){if(!t)return;const o=t.sequenceWaasProvider;o&&(o.requestConfirmationHandler={confirmSignTransactionRequest(a,c,l){const u=new tE;return r({id:a,type:"signTransaction",txs:Array.isArray(c)?c:[c],chainId:l}),Qu=u,u.promise},confirmSignMessageRequest(a,c,l){const u=new tE;return r({id:a,type:"signMessage",message:c,chainId:l}),Qu=u,u.promise}})}s()}),[e,n,i]}let Za=function(t){return t.APPROVE="approve",t.TRANSFER="transfer",t.SWAP="swap",t.AWARD_ITEM="awardItem",t.UNIMPLEMENTED="unimplemented",t.UNKNOWN="unknown",t}({});const Hq=t=>Object.fromEntries(t.map((e,r)=>[e.name&&!e.name.startsWith("unnamed")?e.name:`_${r}`,Array.isArray(e.value)&&e.type.startsWith("(")&&(e.type.endsWith(")")||e.type.endsWith(")[]"))?Hq(e.value):e.value])),Vq=(t,e,r,n)=>{const i=Hq(e.args),s=ir(n,0,4);let o=[];switch(e.signature){case"execute((bool,bool,uint256,address,uint256,bytes)[],uint256,bytes)":case"selfExecute((bool,bool,uint256,address,uint256,bytes)[])":o=e.args[0].value.map(c=>c.call?Vq(c.target,c.call,c.value,c.data):{to:c.target,signature:"",byteSignature:ir(c.data,0,4),methodName:"",args:{},objs:[],value:te.from(c.value).toString(),data:le(c.data)})}return{to:t,signature:e.signature,byteSignature:s,methodName:e.function,args:i,objs:o,value:te.from(r).toString(),data:le(n)}},Z9e=t=>t.map(e=>"target"in e?e:Bn({},e,{target:e.to})).map(e=>{var r,n,i,s,o,a;return{delegateCall:(r=e.delegateCall)!=null?r:!1,revertOnError:(n=e.revertOnError)!=null?n:!1,gasLimit:(i=e.gasLimit)!=null?i:0,target:(s=e.target)!=null?s:"0x0000000000000000000000000000000000000000",value:(o=e.value)!=null?o:0,data:(a=e.data)!=null?a:"0x"}});let Ju=function(t){return t.SEQUENCE_DEPLOY="0x32c02a14",t.SEQUENCE_PUBLISH_CONFIG="0x44d466c2",t.SEQUENCE_UPDATE_IMAGE_HASH="0x29561426",t.SEQUENCE_UPDATE_IMPLEMENTATION="0x025b22bc",t.SEQUENCE_REQUIRE_SESSION_NONCE="0x8853baa0",t.EXECUTE="0x7a9a1628",t.SELF_EXECUTE="0x61c2926c",t.APPROVE="0x095ea7b3",t.TRANSFER="0xa9059cbb",t.DEPOSIT="0xd0e30db0",t.WITHDRAW="0x2e1a7d4d",t.ERC721_SAFE_TRANSFER_FROM="0x42842e0e",t.ERC721_SAFE_TRANSFER_FROM_WITH_DATA="0xb88d4fde",t.ERC1155_SAFE_TRANSFER_FROM="0xf242432a",t.ERC1155_SAFE_BATCH_TRANSFER_FROM="0x2eb2c2d6",t.NIFTYSWAP_BUY_TOKENS="0xd93e8aaa",t.TRANSFORM_ERC20="0x415565b0",t.OUTBOUND_TRANSFER_TO="0xa44bbb15",t.CELER_SEND="0xa5977fbb",t.UNISWAPV3_MULTICALL="0x5ae401dc",t.UNISWAPV2_SWAP_EXACT_TOKENS_FOR_TOKENS="0x38ed1739",t.UNISWAPV2_SWAP_TOKENS_FOR_EXACT_TOKENS="0x8803dbee",t.UNISWAPV2_SWAP_EXACT_ETH_FOR_TOKENS="0x7ff36ab5",t.UNISWAPV2_SWAP_ETH_FOR_EXACT_TOKENS="0xfb3bdb41",t.UNISWAPV2_SWAP_TOKENS_FOR_EXACT_ETH="0x4a25d94a",t.UNISWAPV2_SWAP_EXACT_TOKENS_FOR_ETH="0x18cbafe5",t.AWARD_ITEM="0xcf378343",t}({});const e7e=async t=>{const r=new Sr(r7e).encodeFunctionData("selfExecute",[t]);try{const{apiClient:n}=ur(1),{call:i}=await n.decodeContractCall({callData:r});return Vq("",i,0,r)}catch(n){throw new Error(n)}},t7e=async(t,e)=>{const r=Z9e(e),n=(await e7e(r)).objs,i=Cs.getAddress(t);return r.map((o,a)=>{const c=n[a],l=o.data.toString(),u=te.from(o.value).toString(),f=o.target;if(l==="0x"||!l)return{signature:"",byteSignature:"",type:Za.TRANSFER,methodName:"nativeTokenTransfer",transferType:xn.SEND,contractAddress:$t,contractType:Ki.UNKNOWN,from:i,to:Cs.getAddress(o.target),tokenIds:["0"],amounts:[u],target:f,value:u};if(!c)return;const d=Cs.getAddress(o.target),h={type:Za.UNIMPLEMENTED,signature:c.signature,byteSignature:c.byteSignature,methodName:c.methodName,target:f,value:u};switch(c.byteSignature){case Ju.TRANSFER:{const{args:p}=c;return Bn({},h,{type:Za.TRANSFER,transferType:xn.SEND,contractAddress:d,contractType:Ki.ERC20,from:i,to:Cs.getAddress(p.recipient),tokenIds:["0"],amounts:[String(p.amount)]})}case Ju.ERC721_SAFE_TRANSFER_FROM:case Ju.ERC721_SAFE_TRANSFER_FROM_WITH_DATA:{const p=c.args;return Bn({},h,{type:Za.TRANSFER,transferType:xn.SEND,contractAddress:d,contractType:Ki.ERC721,from:i,to:Cs.getAddress(p.to),tokenIds:[p.tokenId],amounts:["1"]})}case Ju.ERC1155_SAFE_TRANSFER_FROM:{const p=c.args;return Bn({},h,{type:Za.TRANSFER,transferType:xn.SEND,contractAddress:d,contractType:Ki.ERC1155,from:i,to:Cs.getAddress(p._to),tokenIds:[p._id],amounts:[p._amount]})}case Ju.ERC1155_SAFE_BATCH_TRANSFER_FROM:{const{args:p}=c;return Bn({},h,{type:Za.TRANSFER,transferType:xn.SEND,contractAddress:d,contractType:Ki.ERC1155,from:i,to:Cs.getAddress(p._to),tokenIds:p._ids,amounts:p._amounts})}case Ju.AWARD_ITEM:{const{args:p}=c;return Bn({},h,{type:Za.AWARD_ITEM,contractAddress:d,to:Cs.getAddress(p._0),amount:"1"})}}}).flatMap(o=>o?[o]:[])},r7e=[{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"}],n7e=()=>g.createElement(z,{alignItems:"center",justifyContent:"space-between"},g.createElement(z,{justifyContent:"center",alignItems:"center",gap:"2"},g.createElement($h,{width:30,height:30,borderRadius:"circle"}),g.createElement(z,{flexDirection:"column",gap:"2",alignItems:"flex-start"},g.createElement($h,{width:100,height:14}),g.createElement($h,{width:75,height:14}))),g.createElement(z,{flexDirection:"column",gap:"2",alignItems:"flex-end"},g.createElement($h,{width:100,height:14}),g.createElement($h,{width:50,height:12}))),i7e=({address:t,txs:e,chainId:r})=>{vt();const[n,i]=w.useState(void 0),[s,o]=w.useState([]),[a,c]=w.useState([]),l=async()=>{const u=await t7e(t,e);i(u[0].type),u[0].type==="transfer"&&o(u),u[0].type==="awardItem"&&c(u)};if(w.useEffect(()=>{l()},[]),!n)return g.createElement(n7e,null);if(n===Za.UNKNOWN)return g.createElement(g.Fragment,null);if(s.length>=1)return g.createElement(s7e,{address:t,transferProps:s,chainId:r});if(a.length>=1)return g.createElement(o7e,{awardItemProps:a[0]})},s7e=({address:t,transferProps:e,chainId:r})=>{var n,i,s,o,a,c,l,u,f,d,h,p,m,v,y,b,E,S,P;const{chains:R}=vt(),L=(n=e[0])==null?void 0:n.contractAddress,j=(i=e[0])==null?void 0:i.to,H=L?_9e(L,$t):!0,K=((s=e[0])==null?void 0:s.contractType)===Ki.ERC1155,Y=((o=e[0])==null?void 0:o.contractType)===Ki.ERC1155||((a=e[0])==null?void 0:a.contractType)===Ki.ERC721,Q=Cr(r,R),{data:F=[],isLoading:x}=t9e({accountAddress:t,chainIds:[r],contractAddress:L},{hideUnlistedTokens:!1}),{data:k,isLoading:N}=r9e({tokens:{chainId:r,contractAddress:L,tokenIds:(c=(l=e[0])==null?void 0:l.tokenIds)!=null?c:[]}}),M=L?F.find(_=>Cs.getAddress(_.contractAddress)===Cs.getAddress(L)):void 0,A=H?Q.decimals:(M==null||(u=M.contractInfo)==null?void 0:u.decimals)||18,O=H?Q.logoURI:Y?k==null||(f=k[0])==null?void 0:f.image:M==null||(d=M.contractInfo)==null?void 0:d.logoURI,B=H?Q.name:Y?k==null||(h=k[0])==null?void 0:h.name:(M==null||(p=M.contractInfo)==null?void 0:p.name)||"",I=H?Q.symbol:Y?"":(M==null||(m=M.contractInfo)==null?void 0:m.symbol)||"",C=M!==void 0?Rt(M.balance,A):"";G4e(C);const D=(v=(y=e[0])==null||(y=y.amounts)==null?void 0:y[0])!=null?v:(b=e[0])==null?void 0:b.value,q=Y;return g.createElement(un,null,g.createElement(z,{marginBottom:"2"},g.createElement(oe,{variant:"medium",color:"text100"},a7e((E=(S=e[0])==null?void 0:S.type)!=null?E:""))),g.createElement(z,{alignItems:"flex-end",justifyContent:"space-between",marginBottom:"2"},g.createElement(z,{justifyContent:"space-between",alignItems:"center",gap:"2"},q?g.createElement(z,{style:{width:"40px"}},g.createElement(Dq,{imageUrl:O})):g.createElement(i9e,{imageUrl:O,size:40}),g.createElement(z,{flexDirection:"column",alignItems:"flex-start"},g.createElement(z,{flexDirection:"row",alignItems:"center",gap:"1"},g.createElement(oe,{variant:"medium",color:"text100"},B)),g.createElement(oe,{color:"text50",variant:"normal"}," ",`${Rt(D,K?k==null||(P=k[0])==null?void 0:P.decimals:Y?0:A)} ${I} `)))),j!==void 0&&g.createElement(z,null,g.createElement(oe,{fontSize:"normal",color:"text50"},"To"),g.createElement(z,{marginTop:"2",borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",style:{height:"52px"}},g.createElement(z,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},g.createElement(Pu,{address:j,style:{width:"20px"}}),g.createElement(oe,{color:"text100"},`0x${Gq(j.substring(2),12)}`)))))},o7e=({awardItemProps:t})=>g.createElement(un,null,g.createElement(z,{marginBottom:"2"},g.createElement(oe,{variant:"medium",color:"text100"},"Mint")),g.createElement(z,{alignItems:"flex-end",justifyContent:"space-between",marginBottom:"2"},g.createElement(z,{justifyContent:"space-between",alignItems:"center",gap:"2"},g.createElement(z,{style:{width:"40px"}},g.createElement(Dq,{imageUrl:"https://dev-metadata.sequence.app/projects/277/collections/62/tokens/0/image.jpeg"})),g.createElement(z,{flexDirection:"column",alignItems:"flex-start"},g.createElement(z,{flexDirection:"row",alignItems:"center",gap:"1"},g.createElement(oe,{variant:"medium",color:"text100"},"Waas Demo NFT")),g.createElement(oe,{color:"text50",variant:"normal"},t.amount)))),t.to!==void 0&&g.createElement(z,null,g.createElement(oe,{fontSize:"normal",color:"text50"},"To"),g.createElement(z,{marginTop:"2",borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",style:{height:"52px"}},g.createElement(z,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},g.createElement(Pu,{address:t.to,style:{width:"20px"}}),g.createElement(oe,{color:"text100"},`0x${Gq(t.to.substring(2),12)}`))))),a7e=t=>t.charAt(0).toUpperCase()+t.slice(1),Gq=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},c7e={dark:"dark",light:"light"},l7e=t=>{var e,r,n,i;const{config:s,children:o}=t,{defaultTheme:a="dark",signIn:c={},position:l="center",displayedAssets:u=[],ethAuth:f={},disableAnalytics:d=!1}=s,h=c.projectName||"app",{expiry:p=Fq,app:m=h,origin:v=location.origin,nonce:y}=f,{projectName:b}=c,[E,S]=w.useState(!1),[P,R]=w.useState(a||c7e.dark),[L,j]=w.useState(l),[H,K]=w.useState(u),[Y,Q]=w.useState(),{address:F,isConnected:x}=mn(),N=(e=h2().find(D=>D.connector.id.includes("waas")))==null?void 0:e.connector,[M,A,O]=X9e(N),B=localStorage.getItem(sr.WaasGoogleClientID)||"",I=D=>{const _=fu.initWallet(D).client.analytics;Q(_)};w.useEffect(()=>{if(!x){Y==null||Y.reset();return}F&&(Y==null||Y.identify(F.toLowerCase()))},[Y,F,x]);const C=()=>{typeof window<"u"&&window.open("https://sequence.xyz")};return w.useEffect(()=>{const D=localStorage.getItem(sr.ProjectAccessKey)||"";d||I(D)},[]),w.useEffect(()=>{P!==a&&R(a)},[a]),w.useEffect(()=>{L!==l&&j(l)},[l]),w.useEffect(()=>{typeof P=="object"||localStorage.setItem(sr.Theme,P),localStorage.setItem(sr.EthAuthSettings,JSON.stringify({expiry:p,app:m,origin:v,nonce:y}))},[P,f]),w.useEffect(()=>{K(H)},[u]),g.createElement(Y9e,{value:{theme:P,setTheme:R,position:L,setPosition:j}},g.createElement(upe,{clientId:B},g.createElement(G9e,{value:{setOpenConnectModal:S,openConnectModalState:E}},g.createElement(J9e,{value:{setDisplayedAssets:K,displayedAssets:H}},g.createElement(H9e,{value:{setAnalytics:Q,analytics:Y}},g.createElement("div",{id:"kit-provider"},g.createElement(Bb,{root:"#kit-provider",scope:"kit",theme:P},g.createElement(hd,null,E&&g.createElement(Wy,{scroll:!1,backdropColor:"backgroundBackdrop",size:"sm",contentProps:{style:Bn({maxWidth:"364px"},xg(l))},onClose:()=>S(!1)},g.createElement(z,{padding:"4",className:bg},g.createElement(z,{justifyContent:"center",color:"text100",alignItems:"center",fontWeight:"medium",style:{marginTop:"4px"}},g.createElement(oe,null,"Sign in ",b?`to ${b}`:"")),g.createElement(q9e,Bn({openConnectModal:E,setOpenConnectModal:S},t)),g.createElement(z,{onClick:C,className:of,gap:"1",marginTop:"2",flexDirection:"row",alignItems:"center",justifyContent:"center"},g.createElement(oe,{fontSize:"small",color:"text100"},"Powered by Sequence"),g.createElement(z,{height:"5",width:"5"},g.createElement(gI,null)))))),g.createElement(hd,null,M&&g.createElement(Wy,{scroll:!1,backdropColor:"backgroundBackdrop",size:"sm",contentProps:{style:Bn({maxWidth:"364px"},xg(l))},isDismissible:!1,onClose:()=>{O("")}},g.createElement(z,{paddingX:"4",paddingTop:"4",paddingBottom:"2",className:bg},g.createElement(z,{flexDirection:"column",justifyContent:"center",color:"text100",alignItems:"center",fontWeight:"medium",style:{marginTop:"4px"}},g.createElement(oe,{as:"h1",variant:"large",marginBottom:"5"},"Confirm ",M.type==="signMessage"?"signing message":"transaction"),M.type==="signMessage"&&g.createElement(z,{flexDirection:"column",width:"full"},g.createElement(oe,{fontSize:"normal",color:"text50"},"Message"),g.createElement(un,{marginTop:"2",paddingY:"6"},g.createElement(oe,{variant:"normal",marginBottom:"4"},cs((r=M.message)!=null?r:"")))),M.type==="signTransaction"&&g.createElement(z,{flexDirection:"column",width:"full"},g.createElement(i7e,{address:F??"",txs:(n=M.txs)!=null?n:[],chainId:(i=M.chainId)!=null?i:137}),g.createElement(Iue,{label:"Transaction data",marginTop:"4"},g.createElement(un,{overflowX:"scroll",marginY:"3"},g.createElement(oe,{variant:"code",marginBottom:"4"},JSON.stringify(M.txs,null,2))))),M.chainId&&g.createElement(z,{width:"full",marginTop:"3",justifyContent:"flex-end",alignItems:"center"},g.createElement(z,{width:"1/2",justifyContent:"flex-start"},g.createElement(oe,{variant:"small",color:"text50"},"Network")),g.createElement(z,{width:"1/2",justifyContent:"flex-end"},g.createElement(a9e,{chainId:M.chainId}))),g.createElement(z,{flexDirection:"row",gap:"2",width:"full",marginTop:"5"},g.createElement(nt,{width:"full",shape:"square",size:"lg",label:"Reject",onClick:()=>{O(M==null?void 0:M.id)}}),g.createElement(nt,{alignItems:"center",textAlign:"center",width:"full",shape:"square",size:"lg",label:"Confirm",variant:"primary",onClick:()=>{A(M==null?void 0:M.id)}}))),g.createElement(z,{gap:"1",marginTop:"4",flexDirection:"row",alignItems:"center",justifyContent:"center"},g.createElement(oe,{fontSize:"small",color:"text80"},"Powered by Sequence"),g.createElement(z,{height:"4",width:"4",marginTop:"1"},g.createElement(gI,null)))))))),o)))))},u7e=()=>{const{setOpenConnectModal:t,openConnectModalState:e}=V9e();return{setOpenConnectModal:t,openConnectModalState:e}},kp=()=>{const{setTheme:t,theme:e,position:r,setPosition:n}=K9e();return{setTheme:t,theme:e,position:r,setPosition:n}},f7e=()=>{const{setDisplayedAssets:t,displayedAssets:e}=Q9e();return{displayedAssets:e,setDisplayedAssets:t}};let Mh;function d7e(){var t;const r=(t=h2().find(a=>a.connector.id.includes("waas")))==null?void 0:t.connector,[n,i]=w.useState();function s(a,c){var l;(l=Mh)==null||l.resolve({id:a,feeTokenAddress:c,confirmed:!0}),i(void 0),Mh=void 0}function o(a){var c;(c=Mh)==null||c.resolve({id:a,feeTokenAddress:void 0,confirmed:!1}),i(void 0),Mh=void 0}return w.useEffect(()=>{async function a(){if(!r)return;const c=r.sequenceWaasProvider;c&&(c.feeConfirmationHandler={confirmFeeOption(l,u,f,d){const h=new tE;return i({id:l,options:u,chainId:d}),Mh=h,h.promise}})}a()}),[n,s,o]}const Kq=()=>{const t=g.createContext(void 0);return[()=>{const r=g.useContext(t);if(!r)throw new Error("useGenericContext must be used within a Provider");return r},t.Provider]},[h7e,p7e]=Kq(),Ap=()=>{const{setOpenWalletModal:t,openWalletModalState:e}=h7e();return{setOpenWalletModal:t,openWalletModalState:e}};function kn(){return kn=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}const mr=(t,e)=>t.toLowerCase()===e.toLowerCase(),w9=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},Yq=t=>`0x${w9((t==null?void 0:t.substring(2))||"",8)}`;var ec=function(t){return t[t.VERY_LARGE=0]="VERY_LARGE",t[t.FRACTION=1]="FRACTION",t[t.VERY_TINY=2]="VERY_TINY",t[t.MIXED=3]="MIXED",t}(ec||{});const Aa=t=>{if(isNaN(Number(t)))return console.error(`display format error ${t} is not a number`),"NaN";const e=Number(t);if(e===0)return"0";let r;e>1e8?r=ec.VERY_LARGE:e<1e-10?r=ec.VERY_TINY:e<1?r=ec.FRACTION:r=ec.MIXED;let n,i;switch(r){case ec.VERY_LARGE:n="compact",i={maximumFractionDigits:4};break;case ec.VERY_TINY:n="scientific",i={maximumFractionDigits:4};break;case ec.FRACTION:n="standard",i={maximumSignificantDigits:4};break;default:n="standard",i={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",kn({notation:n},i)).format(e)},m7e=t=>t.charAt(0).toUpperCase()+t.slice(1),Qq=(t,e)=>{const r=t.split(".");return r.length===1?t:`${r[0]}.${r[1].slice(0,e)}`},wg=t=>/0x[a-fA-F0-9]{40}/.test(t),v7e=t=>t>0?Re.colors.positive:t<0?Re.colors.negative:Re.colors.text50,bI=(t,e)=>{var r;const n=e.find(s=>mr(s.token.contractAddress,t.contractAddress));return n&&(n==null||(r=n.price24hChange)==null?void 0:r.value)||0},To=({balance:t,prices:e,decimals:r,conversionRate:n})=>{var i;let s=0;const o=e.find(f=>mr(f.token.contractAddress,t.contractAddress));if(!o)return"0.00";const a=((i=o.price)==null?void 0:i.value)||0,c=Rt(t.balance,r),l=parseFloat(c)*a;return s+=l,`${(s*n).toFixed(2)}`},Jq=t=>{const e=[],r=[],n=[];t.forEach(a=>{a.contractAddress===$t?e.push(a):a.contractType==="ERC20"?r.push(a):(a.contractType==="ERC721"||a.contractType==="ERC1155")&&n.push(a)});const i=e.sort((a,c)=>a.tokenID.localeCompare(c.tokenID)),s=r.sort((a,c)=>a.tokenID.localeCompare(c.tokenID)),o=n.sort((a,c)=>a.tokenID.localeCompare(c.tokenID));return{nativeTokens:i,erc20Tokens:s,collectibles:o}},Xq=t=>{const e=[];return t==null||t.pages.forEach(r=>{e.push(...r.transactions)}),e},Eg=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=ur(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:$t,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:Ki.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},E9=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await ur(e),n=await r.getCoinPrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},Cg=async({accountAddress:t,chainId:e,contractAddress:r},{hideUnlistedTokens:n,hideCollectibles:i,includeMetadata:s=!0,verifiedOnly:o})=>{try{const{indexerClient:a}=ur(e),c=await a.getTokenBalances(kn({accountAddress:t,includeMetadata:s,metadataOptions:{verifiedOnly:o??!0}},r?{contractAddress:r}:{}));let l=(c==null?void 0:c.balances)||[];if(n&&l.length>0){const u=await E9({tokens:l.map(f=>({chainId:f.chainId,contractAddress:f.contractAddress,tokenId:f.tokenID}))});l=l.filter(f=>{const d=u==null?void 0:u.find(h=>mr(h.token.contractAddress,f.contractAddress)&&h.token.chainId===f.chainId);return f.contractType!=="ERC20"||!!d&&d.price!==null})}return i&&l.length>0&&(l=l.filter(u=>u.contractType!=="ERC721"&&u.contractType!=="ERC1155")),l}catch(a){return console.error(a),[]}},y7e=async({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})=>{try{return(await Promise.all([Eg({accountAddress:t,chainId:e}),Cg({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})])).flat()}catch(i){return console.error(i),[]}},Zq=async({accountAddress:t,chainId:e,collectionAddress:r,includeMetadata:n=!0,verifiedOnly:i})=>{try{const{indexerClient:s}=await ur(e),o=await s.getTokenBalances({accountAddress:t,includeMetadata:n,contractAddress:r,metadataOptions:{verifiedOnly:i??!0}});return(o==null?void 0:o.balances)||[]}catch(s){return console.error(s),[]}},g7e=async({accountAddress:t,chainIds:e,displayAssets:r},{hideUnlistedTokens:n,hideCollectibles:i})=>{let o=[];const a=r.length>0;try{if(a){const S=r.filter(j=>mr(j.contractAddress,$t)),P=r.filter(j=>!mr(j.contractAddress,$t)),R={},L={};S.forEach(j=>{R[j.chainId]||(R[j.chainId]=[]),R[j.chainId].push(j)}),P.forEach(j=>{L[j.chainId]||(L[j.chainId]=[]),L[j.chainId].push(j)}),o=(await Promise.all([...Object.keys(R).map(j=>Eg({accountAddress:t,chainId:Number(j)})),...Object.keys(L).map(j=>L[Number(j)].map(H=>Cg({accountAddress:t,chainId:Number(j),contractAddress:H.contractAddress},{hideUnlistedTokens:n,hideCollectibles:i,includeMetadata:!1}))).flat()])).flat()}else o=(await Promise.all([...e.map(S=>Eg({accountAddress:t,chainId:S})),...e.map(S=>Cg({accountAddress:t,chainId:S},{hideUnlistedTokens:n,hideCollectibles:i,includeMetadata:!1}))])).flat();const{nativeTokens:c,erc20Tokens:l,collectibles:u}=Jq(o),f=new Promise(async(S,P)=>{if(l.length>0){const R=l.map(j=>({chainId:j.chainId,contractAddress:j.contractAddress})),L=await E9({tokens:R})||[];S(L)}else S([])}),d=u.map(async S=>a?S:await Zq({accountAddress:t,chainId:S.chainId,collectionAddress:S.contractAddress,includeMetadata:!1})),h=async()=>{const S={},P={};l.forEach(L=>{P[L.chainId]?P[L.chainId].push(L):P[L.chainId]=[L]});const R=Object.keys(P).map(async L=>{const{metadataClient:j}=ur(L),K=P[Number(L)].map(Q=>Q.contractAddress),Y=await j.getContractInfoBatch({chainID:String(L),contractAddresses:K});S[Number(L)]=Y});return await Promise.all([...R]),S},[p,m,...v]=await Promise.all([f,h(),...d]),y=l.sort((S,P)=>{var R,L;const j=p.find(A=>mr(A.token.contractAddress,S.contractAddress)),H=p.find(A=>mr(A.token.contractAddress,P.contractAddress)),K=j!=null&&j.price?j.price.value:0,Y=H!=null&&H.price?H.price.value:0,Q=(R=m[S.chainId].contractInfoMap[S.contractAddress])==null?void 0:R.decimals,F=(L=m[P.chainId].contractInfoMap[P.contractAddress])==null?void 0:L.decimals,x=Q===void 0?0:Number(Rt(S.balance,Q)),k=F===void 0?0:Number(Rt(P.balance,F)),N=x*K;return k*Y-N}),b=sEe(v.flat(),10).sort((S,P)=>S.contractAddress.localeCompare(P.contractAddress));return i?[...c.length>0?[c[0]]:[],...y.length>0?y.slice(0,11):[]]:[...c.length>0?[c[0]]:[],...y.length>0?[y[0]]:[],...b.length>0?[...b]:[]]}catch(c){return console.error(c),[]}},b7e=async({accountAddress:t,chainId:e,collectionAddress:r,tokenId:n,verifiedOnly:i})=>{const{indexerClient:s}=ur(e);return(await s.getTokenBalances({accountAddress:t,includeMetadata:!0,contractAddress:r,tokenID:n,metadataOptions:{verifiedOnly:i??!0}})).balances[0]},x7e=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await ur(e),n=await r.getCollectiblePrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},eW=async({chainId:t,contractAddress:e,accountAddress:r,tokenId:n,page:i})=>{const{indexerClient:s}=ur(t);return s.getTransactionHistory({includeMetadata:!0,page:i,filter:{accountAddress:r,contractAddress:e,tokenID:n}})},w7e=async({chainIds:t,accountAddress:e})=>(await Promise.all([...t.map(s=>eW({chainId:s,accountAddress:e,page:{page:1}}))])).map(s=>s.transactions).flat().sort((s,o)=>{const a=new Date(s.timestamp).getTime();return new Date(o.timestamp).getTime()-a}),E7e=async({toCurrency:t})=>{if(t==="USD")return 1;const{apiClient:e}=ur(137);return(await e.getExchangeRate({toCurrency:t})).exchangeRate.value},C7e=async({tokens:t})=>{const{metadataClient:e}=ur(t.chainId);return(await e.getTokenMetadata({chainID:t.chainId.toString(),contractAddress:t.contractAddress,tokenIDs:t.tokenIds})).tokenMetadata},S7e=async t=>{const{metadataClient:e}=ur(Number(t.chainID));return(await e.getContractInfo(t)).contractInfo},k7e=["chainIds"],A7e=["disabled"],Pi={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},C9=(t,e)=>pn({queryKey:["balances",t,e],queryFn:async()=>{const{chainIds:r}=t,n=A2(t,k7e);return(await Promise.all(r.map(s=>y7e(kn({},n,{chainId:s}),e)))).flat()},retry:!0,staleTime:Pi.oneSecond*30,enabled:t.chainIds.length>0&&!!t.accountAddress}),_7e=t=>pn({queryKey:["collectionBalance",t],queryFn:()=>Zq(t),retry:!0,staleTime:Pi.oneSecond*30,enabled:!!t.chainId&&!!t.accountAddress&&!!t.collectionAddress}),$u=t=>{let{disabled:e}=t,r=A2(t,A7e);return pn({queryKey:["coinPrices",r],queryFn:()=>E9(r),retry:!0,staleTime:Pi.oneSecond*30,enabled:r.tokens.length>0&&!e})},P7e=(t,e)=>pn({queryKey:["balancesAssetsSummary",t,e],queryFn:()=>g7e(t,e),retry:!0,refetchInterval:Pi.oneSecond*4,refetchOnMount:!0,staleTime:Pi.oneSecond,enabled:t.chainIds.length>0&&!!t.accountAddress}),I7e=(t,e)=>pn({queryKey:["coinBalance",t,e],queryFn:()=>mr((t==null?void 0:t.contractAddress)||"",$t)?Eg({accountAddress:t.accountAddress,chainId:t.chainId}).then(i=>i[0]):Cg(t,e).then(n=>n[0]),retry:!0,staleTime:Pi.oneSecond*30,enabled:!!t.chainId&&!!t.accountAddress}),tW=t=>pn({queryKey:["collectibleBalance",t],queryFn:()=>b7e(t),retry:!0,staleTime:Pi.oneSecond*30,enabled:!!t.chainId&&!!t.accountAddress&&!!t.collectionAddress&&!!t.tokenId}),rW=t=>pn({queryKey:["useCollectiblePrices",t],queryFn:()=>x7e(t),retry:!0,staleTime:Pi.oneMinute,enabled:t.tokens.length>0}),nW=t=>Rbe({queryKey:["transactionHistory",t],queryFn:({pageParam:e})=>eW(kn({},t,e?{page:{page:e}}:{page:{page:1}})),getNextPageParam:({page:e})=>{if(e.more)return(e==null?void 0:e.page)||1},retry:!0,staleTime:Pi.oneSecond*30,enabled:!!t.chainId&&!t.disabled&&!!t.accountAddress}),T7e=t=>pn({queryKey:["transactionHistorySummary",t],queryFn:()=>w7e(t),retry:!0,staleTime:Pi.oneSecond,refetchOnMount:!0,enabled:t.chainIds.length>0&&!!t.accountAddress}),dl=t=>pn({queryKey:["useConversionRate",t],queryFn:()=>E7e(t),retry:!0,staleTime:Pi.oneMinute*10}),O7e=t=>pn({queryKey:["useTokenMetadata",t],queryFn:()=>C7e(t),retry:!0,staleTime:Pi.oneMinute*10,enabled:!!t.tokens.chainId&&!!t.tokens.contractAddress}),R7e=t=>pn({queryKey:["useContractInfo",t],queryFn:()=>S7e(t),retry:!0,staleTime:Pi.oneMinute*10,enabled:!!t.chainID&&!!t.contractAddress}),[$7e,M7e]=Kq(),Mi=()=>{const{setHistory:t,history:e}=$7e();return{setNavigation:i=>{const s=document.getElementById("sequence-kit-wallet-content"),o=s==null?void 0:s.parentElement;o==null||o.scrollTo(0,0);const a=i.location==="home"?[]:[...e,i];t(a)},history:e,setHistory:t,goBack:()=>{const i=[...e];i.pop(),t(i)}}},N7e=[{inputs:[{internalType:"address",name:"_from",type:"address"},{internalType:"address",name:"_to",type:"address"},{internalType:"uint256[]",name:"_ids",type:"uint256[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],D7e=[{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"}],L7e=[{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],iW=[{symbol:"USD",sign:"$",name:{message:"US Dollar"},decimals:2},{symbol:"CAD",sign:"$",name:{message:"Canadian Dollar"},decimals:2},{symbol:"GBP",sign:"£",name:{message:"British Pound Sterling"},decimals:2},{symbol:"EUR",sign:"€",name:{message:"Euro"},decimals:2},{symbol:"CNY",sign:"¥",name:{message:"Chinese Yuan"},decimals:2},{symbol:"JPY",sign:"¥",name:{message:"Japanese Yen"},decimals:2},{symbol:"KRW",sign:"₩",name:{message:"South Korean Won"},decimals:2},{symbol:"SGD",sign:"$",name:{message:"Singapore Dollar"},decimals:2},{symbol:"CHF",sign:"CHF ",name:{message:"Swiss Franc"},decimals:2},{symbol:"AUD",sign:"$",name:{message:"Australian Dollar"},decimals:2},{symbol:"NZD",sign:"$",name:{message:"New Zealand Dollar"},decimals:2},{symbol:"SEK",sign:"kr ",name:{message:"Swedish Krona"},decimals:2},{symbol:"NOK",sign:"kr ",name:{message:"Norwegian Krone"},decimals:2},{symbol:"MXN",sign:"$",name:{message:"Mexican Peso"},decimals:2},{symbol:"INR",sign:"₹",name:{message:"Indian Rupee"},decimals:2},{symbol:"ZAR",sign:"R ",name:{message:"South African Rand"},decimals:2},{symbol:"TRY",sign:"₺",name:{message:"Turkish Lira"},decimals:2},{symbol:"BRL",sign:"R$",name:{message:"Brazilian Real"},decimals:2},{symbol:"DKK",sign:"kr ",name:{message:"Danish Krone"},decimals:2},{symbol:"PLN",sign:"zł ",name:{message:"Polish Zloty"},decimals:2},{symbol:"THB",sign:"฿",name:{message:"Thai Baht"},decimals:2},{symbol:"IDR",sign:"Rp",name:{message:"Indonesian Rupiah"},decimals:2}],j7e=iW[0],Ni="54px",Hn=()=>{const{chains:t}=vt(),e=()=>{let l=!0,u=!1,f=j7e,d=t.map(h=>h.id);try{const h=localStorage.getItem(sr.Settings),p=JSON.parse(h||"{}");if((p==null?void 0:p.hideUnlistedTokens)!==void 0&&(l=p==null?void 0:p.hideUnlistedTokens),(p==null?void 0:p.hideCollectibles)!==void 0&&(u=p==null?void 0:p.hideCollectibles),(p==null?void 0:p.fiatCurrency)!==void 0&&(f=p==null?void 0:p.fiatCurrency),(p==null?void 0:p.selectedNetworks)!==void 0){let m=!0;p.selectedNetworks.forEach(v=>{t.find(y=>y.id===v)===void 0&&(m=!1)}),m&&(d=p==null?void 0:p.selectedNetworks)}}catch(h){console.error(h,"Failed to fetch settings")}return{hideUnlistedTokens:l,hideCollectibles:u,fiatCurrency:f,selectedNetworks:d}},r=e(),[n,i]=w.useState(r);return kn({},n,{setFiatCurrency:l=>{const u=e(),f=kn({},u,{fiatCurrency:l});localStorage.setItem(sr.Settings,JSON.stringify(f)),i(f)},setHideCollectibles:l=>{const u=e(),f=kn({},u,{hideCollectibles:l});localStorage.setItem(sr.Settings,JSON.stringify(f)),i(f)},setHideUnlistedTokens:l=>{const u=e(),f=kn({},u,{hideUnlistedTokens:l});localStorage.setItem(sr.Settings,JSON.stringify(f)),i(f)},setSelectedNetworks:l=>{const u=e(),f=kn({},u,{selectedNetworks:l});localStorage.setItem(sr.Settings,JSON.stringify(f)),i(f)}})},B7e=({size:t=30})=>g.createElement(z,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",flexShrink:"0",style:{width:`${t}px`,height:`${t}px`}},g.createElement(oe,{variant:"large",color:"textInverse100"},"?")),bu=({imageUrl:t,size:e=30})=>t?g.createElement(ar,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):g.createElement(B7e,{size:e}),xI=({networkLogoUrl:t,logoUrl:e,tokenName:r,balance:n,balanceFiat:i,priceChangePercentage:s,symbol:o})=>{const{fiatCurrency:a}=Hn(),c=s>0?"+":"";return g.createElement(z,{background:"backgroundSecondary",width:"full",height:"full",borderRadius:"md",padding:"4",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"1"},g.createElement(z,{marginBottom:"1"},g.createElement(bu,{size:36,imageUrl:e})),g.createElement(z,{marginBottom:"3"},g.createElement(z,{flexDirection:"row",gap:"1",justifyContent:"flex-start",alignItems:"center"},g.createElement(oe,{fontWeight:"bold",whiteSpace:"nowrap",color:"text100",style:{maxWidth:"130px",textOverflow:"ellipsis",overflow:"hidden"}},r),g.createElement(bu,{size:12,imageUrl:t})),g.createElement(oe,{color:"text50",whiteSpace:"nowrap",style:{display:"block",maxWidth:"150px",textOverflow:"ellipsis",overflow:"hidden"}},`${n} ${o}`)),g.createElement(z,null,g.createElement(z,null,g.createElement(oe,{fontWeight:"bold",color:"text100"},`${a.sign}${i}`)),g.createElement(oe,{style:{color:v7e(s)}},`${c}${s.toFixed(2)}%`)))},wI=({balance:t})=>{var e;const{chains:r}=vt(),{fiatCurrency:n}=Hn(),i=mr(t.contractAddress,$t),s=Cr(t.chainId,r),{data:o=[],isLoading:a}=$u({tokens:[{chainId:t.chainId,contractAddress:t.contractAddress}]}),{data:c=1,isLoading:l}=dl({toCurrency:n.symbol}),{data:u,isLoading:f}=R7e({chainID:String(t.chainId),contractAddress:t.contractAddress});if(a||l||f)return g.createElement(z,{background:"backgroundSecondary",width:"full",height:"full",borderRadius:"md"});if(i){const P=To({balance:t,prices:o,conversionRate:c,decimals:s.decimals}),R=bI(t,o),L=Rt(t.balance,s.decimals),j=Aa(L);return g.createElement(xI,{networkLogoUrl:s.logoURI,logoUrl:s.logoURI,tokenName:s.name,balance:j,balanceFiat:P,priceChangePercentage:R,symbol:s.symbol})}const h=(e=u==null?void 0:u.decimals)!=null?e:18,p=To({balance:t,prices:o,conversionRate:c,decimals:h}),m=bI(t,o),v=Rt(t.balance,h),y=Aa(v),b=(u==null?void 0:u.name)||"Unknown",E=(u==null?void 0:u.name)||"TOKEN",S=u==null?void 0:u.logoURI;return g.createElement(xI,{networkLogoUrl:s.logoURI,logoUrl:S,tokenName:b,balance:y,balanceFiat:p,priceChangePercentage:m,symbol:E})},S9=({imageUrl:t})=>g.createElement(un,{padding:"0",aspectRatio:"1/1",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:"sm",background:"backgroundSecondary"},g.createElement(ar,{style:{height:"100%"},src:t})),F7e=({balance:t})=>{var e;const{data:r}=O7e({tokens:{chainId:t.chainId,contractAddress:t.contractAddress,tokenIds:[t.tokenID]}}),n=r==null||(e=r[0])==null?void 0:e.image;return g.createElement(S9,{imageUrl:n})};Ro("packages/wallet/src/shared/Skeleton/styles.css.ts","kit");const U7e=c9({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),z7e=Fr({height:"76px",backgroundColor:"#909090",animation:`${U7e} 2s ease-in-out infinite`},"skeleton");$o();const Lt=({width:t="100%",height:e="100%",borderRadius:r="md",aspectRatio:n})=>g.createElement(z,{className:z7e,borderRadius:r,aspectRatio:n,style:{width:t,height:e}}),q7e=()=>g.createElement(z,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${Re.space[1]}) calc(50% - ${Re.space[1]})`,gap:Re.space[2]}},Array(12).fill(null).map((t,e)=>g.createElement(z,{key:e},g.createElement(Lt,{height:"100%",width:"100%",aspectRatio:"1/1"}))));Ro("packages/wallet/src/shared/styles.css.ts","kit");const xo=Fr({":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"clickable"),W7e=Fr({"> div":{overflowY:"scroll"}},"scrollbar"),k9=Fr({},"walletContent");hi(`${k9} + button`,{backgroundColor:"transparent"});hi(`${k9} + button > svg`,{width:"20px",height:"20px"});$o();const H7e=()=>{const{address:t}=mn(),{setNavigation:e}=Mi(),{displayedAssets:r}=f7e(),{hideUnlistedTokens:n,hideCollectibles:i,selectedNetworks:s}=Hn(),{data:o=[],isLoading:a}=P7e({accountAddress:t||"",chainIds:s,displayAssets:r},{hideUnlistedTokens:n,hideCollectibles:i});if(a)return g.createElement(q7e,null);const{nativeTokens:c,erc20Tokens:l,collectibles:u}=Jq(o),f=d=>{d.contractType==="ERC1155"||d.contractType==="ERC721"?e&&e({location:"collectible-details",params:{contractAddress:d.contractAddress,chainId:d.chainId,tokenId:d.tokenID}}):d.contractType==="ERC20"?e&&e({location:"coin-details",params:{contractAddress:d.contractAddress,chainId:d.chainId}}):e&&e({location:"coin-details",params:{contractAddress:d.contractAddress,chainId:d.chainId}})};return g.createElement(z,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${Re.space[1]}) calc(50% - ${Re.space[1]})`,gap:Re.space[2]}},c.map((d,h)=>g.createElement(z,{key:h,className:xo,aspectRatio:"1/1",onClick:()=>f(d)},g.createElement(wI,{balance:d}))),l.map((d,h)=>g.createElement(z,{className:xo,key:h,aspectRatio:"1/1",onClick:()=>f(d)},g.createElement(wI,{balance:d}))),u.map((d,h)=>g.createElement(z,{className:xo,aspectRatio:"1/1",key:h,onClick:()=>f(d)},g.createElement(F7e,{balance:d}))))},zs=()=>{const[t,e]=w.useState("0px");return w.useEffect(()=>{e(navigator.userAgent.match(/chrome|chromium|crios/i)?"13px":"0px")},[]),t},V7e=()=>(zs(),g.createElement(z,{paddingX:"4",paddingBottom:"5",gap:"4",flexDirection:"column"},g.createElement(H7e,null))),G7e=()=>{const{address:t,chain:e}=mn(),{chains:r}=vt(),[n,i]=w.useState(!1),s=Cr((e==null?void 0:e.id)||1,r);w.useEffect(()=>{n&&setTimeout(()=>{i(!1)},4e3)},[n]);const o=()=>{i(!0)},a=()=>{typeof window<"u"&&window.open(`https://twitter.com/intent/tweet?text=Here%20is%20my%20address%20${t}`)};return g.createElement(z,{style:{paddingTop:Ni}},g.createElement(z,{padding:"5",paddingTop:"3",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"4"},g.createElement(z,{marginTop:"1",width:"fit",background:"white",borderRadius:"md",alignItems:"center",justifyContent:"center",padding:"4"},g.createElement(PEe,{value:t||"",size:200,bgColor:"white",fgColor:"black","data-id":"receiveQR"})),g.createElement(z,null,g.createElement(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},g.createElement(oe,{variant:"medium",color:"text100",textAlign:"center",lineHeight:"inherit",style:{fontWeight:"700"}},"My Wallet"),g.createElement(ar,{width:"5",src:s.logoURI,alt:"icon"})),g.createElement(z,{marginTop:"2",style:{maxWidth:"180px",textAlign:"center"}},g.createElement(oe,{textAlign:"center",color:"text50",style:{fontSize:"14px",maxWidth:"180px",overflowWrap:"anywhere"}},t))),g.createElement(z,{gap:"3"},g.createElement(Tz.CopyToClipboard,{text:t||""},g.createElement(nt,{onClick:o,leftIcon:Tb,label:n?"Copied!":"Copy"})),g.createElement(nt,{onClick:a,leftIcon:nue,label:"Share"})),g.createElement(z,{justifyContent:"center",alignItems:"center",style:{maxWidth:"260px",textAlign:"center"}},g.createElement(oe,{color:"text100",variant:"small",style:{maxWidth:"260px",overflowWrap:"anywhere"}},`This is a ${s.name} address. Please only send assets on the ${s.name} network.`))))},sW=({imageUrl:t,name:e,decimals:r,balance:n,symbol:i,fiatValue:s,chainId:o,showSquareImage:a})=>{const{chains:c}=vt(),{fiatCurrency:l}=Hn(),u=Rt(n,r),f=Aa(u),d=Cr(o,c);return g.createElement(z,{alignItems:"flex-end",justifyContent:"space-between"},g.createElement(z,{justifyContent:"space-between",alignItems:"center",gap:"2"},a?g.createElement(z,{style:{width:"40px"}},g.createElement(S9,{imageUrl:t})):g.createElement(bu,{imageUrl:t,size:40}),g.createElement(z,{flexDirection:"column",alignItems:"flex-start"},g.createElement(z,{flexDirection:"row",alignItems:"center",gap:"1"},g.createElement(oe,{variant:"medium",color:"text100"},e),g.createElement(bu,{imageUrl:d.logoURI,size:12})),g.createElement(oe,{color:"text50",variant:"normal"}," ",`${f} ${i} available`))),g.createElement(z,{flexDirection:"column",alignItems:"flex-end",justifyContent:"flex-end"},s&&g.createElement(oe,{variant:"normal",color:"text100"},`${l.sign}${s}`)))},K7e=({chainId:t,contractAddress:e})=>{var r,n,i,s,o;const{setNavigation:a}=Mi(),{analytics:c}=Wq(),{chains:l}=vt(),u=d2(),{address:f="",connector:d}=mn(),h=!!(d!=null&&(r=d._wallet)!=null&&r.isSequenceBased),p=u===t,m=!p&&!h,{switchChainAsync:v}=Y4(),y=w.useRef(null);Ap();const{fiatCurrency:b}=Hn(),[E,S]=w.useState("0"),[P,R]=w.useState(""),{sendTransaction:L}=K4(),[j,H]=w.useState(!1),{data:K=[],isLoading:Y}=C9({accountAddress:f,chainIds:[t],contractAddress:e},{hideUnlistedTokens:!1}),Q=Cr(t,l),F=K.find(he=>he.contractAddress===e),{data:x=[],isLoading:k}=$u({tokens:[{chainId:t,contractAddress:e}]}),{data:N=1,isLoading:M}=dl({toCurrency:b.symbol});if(Y||k||M)return null;const O=mr(e,$t),B=O?Q.decimals:(F==null||(n=F.contractInfo)==null?void 0:n.decimals)||18,I=O?Q.name:(F==null||(i=F.contractInfo)==null?void 0:i.name)||"",C=O?Q.logoURI:F==null||(s=F.contractInfo)==null?void 0:s.logoURI,D=O?Q.symbol:(F==null||(o=F.contractInfo)==null?void 0:o.symbol)||"",q=E===""?"0":E,_=da(q,B),W=To({balance:kn({},F,{balance:_.toString()}),prices:x,conversionRate:N,decimals:B}),V=_.gt((F==null?void 0:F.balance)||"0"),J=_.gt(0),ee=he=>{const{value:ve}=he.target,Ne=Qq(ve,B);S(Ne)},se=()=>{var he;(he=y.current)==null||he.focus();const ve=Rt((F==null?void 0:F.balance)||0,B).toString();S(ve)},ie=async()=>{const he=await navigator.clipboard.readText();R(he)},ae=()=>{R("")},be=async he=>{!p&&h&&await v({chainId:t}),he.preventDefault();const ve=da(q,B);if(O){var Ne;c==null||c.track({event:"SEND_TRANSACTION_REQUEST",props:{walletClient:(d==null||(Ne=d._wallet)==null?void 0:Ne.id)||"unknown",source:"sequence-kit/wallet"}}),H(!0),L({to:P,value:BigInt(ve.toString()),gas:null},{onSettled:(Ae,Xe)=>{Ae&&a({location:"home"}),H(!1)}})}else{var ke;c==null||c.track({event:"SEND_TRANSACTION_REQUEST",props:{walletClient:(d==null||(ke=d._wallet)==null?void 0:ke.id)||"unknown",source:"sequence-kit/wallet"}}),H(!0),L({to:F==null?void 0:F.contractAddress,data:new Sr(D7e).encodeFunctionData("transfer",[P,ve.toHexString()]),gas:null},{onSettled:(Ae,Xe)=>{Ae&&a({location:"home"}),H(!1)}})}};return g.createElement(z,{padding:"5",paddingTop:"3",style:{marginTop:Ni},gap:"2",flexDirection:"column",as:"form",onSubmit:be,pointerEvents:j?"none":"auto"},g.createElement(z,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},g.createElement(sW,{imageUrl:C,decimals:B,name:I,symbol:D,balance:(F==null?void 0:F.balance)||"0",fiatValue:To({balance:F,prices:x,conversionRate:N,decimals:B}),chainId:t}),g.createElement(HB,{ref:y,style:{fontSize:Re.fontSizes.xlarge,fontWeight:Re.fontWeights.bold},name:"amount",value:E,onChange:ee,controls:g.createElement(g.Fragment,null,g.createElement(oe,{variant:"small",color:"text50",whiteSpace:"nowrap"},`~${b.sign}${W}`),g.createElement(nt,{size:"xs",shape:"square",label:"Max",onClick:se,"data-id":"maxCoin",flexShrink:"0"}),g.createElement(oe,{fontSize:"xlarge",fontWeight:"bold",color:"text100"},D))}),V&&g.createElement(oe,{as:"div",variant:"normal",color:"negative",marginTop:"2"},"Insufficient Funds")),g.createElement(z,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},g.createElement(oe,{fontSize:"normal",color:"text50"},"To"),wg(P)?g.createElement(z,{borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",className:xo,onClick:ae,style:{height:"52px"}},g.createElement(z,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},g.createElement(Pu,{address:P,style:{width:"20px"}}),g.createElement(oe,{color:"text100"},`0x${w9(P.substring(2),8)}`)),g.createElement(Au,{size:"xs"})):g.createElement(cl,{value:P,onChange:he=>R(he.target.value),placeholder:`${Q.name} Address (0x...)`,name:"to-address","data-1p-ignore":!0,controls:g.createElement(nt,{size:"xs",shape:"square",label:"Paste",onClick:ie,"data-id":"to-address",flexShrink:"0",leftIcon:Tb})})),m&&g.createElement(z,{marginTop:"3"},g.createElement(oe,{variant:"small",color:"negative",marginBottom:"2"},"The wallet is connected to the wrong network. Please switch network before proceeding"),g.createElement(nt,{marginTop:"2",width:"full",variant:"primary",type:"button",label:"Switch Network",onClick:async()=>await v({chainId:t}),disabled:p,style:{height:"52px",borderRadius:Re.radii.md}})),g.createElement(z,{style:{height:"52px"},alignItems:"center",justifyContent:"center"},j?g.createElement(Wc,null):g.createElement(nt,{color:"text100",marginTop:"3",width:"full",variant:"primary",type:"submit",disabled:!J||!wg(P)||V||!p&&!h,label:"Send",rightIcon:go,style:{height:"52px",borderRadius:Re.radii.md}})))},Y7e=({chainId:t,contractAddress:e,tokenId:r})=>{var n,i,s,o,a;const{setNavigation:c}=Mi(),{analytics:l}=Wq(),{chains:u}=vt(),f=d2(),{address:d="",connector:h}=mn(),p=!!(h!=null&&(n=h._wallet)!=null&&n.isSequenceBased),m=f===t,v=!m&&!p,{switchChain:y}=Y4(),b=w.useRef(null);Ap();const[E,S]=w.useState("0"),[P,R]=w.useState(""),[L,j]=w.useState(!1),{sendTransaction:H}=K4(),[K,Y]=w.useState(!1),{data:Q,isLoading:F}=tW({accountAddress:d,chainId:t,collectionAddress:e,tokenId:r,verifiedOnly:!1}),{contractType:x}=Q;w.useEffect(()=>{Q&&(x==="ERC721"?(S("1"),j(!1)):x==="ERC1155"&&(Number(Rt((Q==null?void 0:Q.balance)||0,M))>=1&&S("1"),j(!0)))},[Q]);const k=Cr(t,u);if(F)return null;const M=(Q==null||(i=Q.tokenMetadata)==null?void 0:i.decimals)||0,A=(Q==null||(s=Q.tokenMetadata)==null?void 0:s.name)||"Unknown",O=(Q==null||(o=Q.tokenMetadata)==null?void 0:o.image)||(Q==null||(a=Q.contractInfo)==null?void 0:a.logoURI)||"",B=E===""?"0":E,I=da(B,M),C=I.gt((Q==null?void 0:Q.balance)||"0"),D=I.gt(0),q=he=>{const{value:ve}=he.target,Ne=Qq(ve,M);S(Ne)},_=()=>{var he;(he=b.current)==null||he.focus();const ve=Number(E)-1,Ne=Math.max(ve,0).toString();S(Ne)},W=()=>{var he;(he=b.current)==null||he.focus();const ve=Number(E)+1,Ne=Number(Rt((Q==null?void 0:Q.balance)||0,M)),ke=Math.min(ve,Ne).toString();S(ke)},V=()=>{var he;(he=b.current)==null||he.focus();const ve=Rt((Q==null?void 0:Q.balance)||0,M).toString();S(ve)},J=async()=>{const he=await navigator.clipboard.readText();R(he)},ee=()=>{R("")},se=async he=>{var ve,Ne;he.preventDefault(),!m&&p&&y({chainId:t});const ke=da(B,M);switch(x){case"ERC721":l==null||l.track({event:"SEND_TRANSACTION_REQUEST",props:{walletClient:(h==null||(ve=h._wallet)==null?void 0:ve.id)||"unknown",source:"sequence-kit/wallet"}}),Y(!0),H({to:Q.contractAddress,data:new Sr(L7e).encodeFunctionData("safeTransferFrom",[d,P,r]),gas:null},{onSettled:(Ae,Xe)=>{Ae&&c({location:"home"}),Y(!1)}});break;case"ERC1155":default:l==null||l.track({event:"SEND_TRANSACTION_REQUEST",props:{walletClient:(h==null||(Ne=h._wallet)==null?void 0:Ne.id)||"unknown",source:"sequence-kit/wallet"}}),Y(!0),H({to:Q.contractAddress,data:new Sr(N7e).encodeFunctionData("safeBatchTransferFrom",[d,P,[r],[ke.toHexString()],[]]),gas:null},{onSettled:(Ae,Xe)=>{Ae&&c({location:"home"}),Y(!1)}})}},ie=Rt((Q==null?void 0:Q.balance)||0,M).toString(),ae=Number(E)===0,be=Number(E)>=Number(ie);return g.createElement(z,{padding:"5",paddingTop:"3",style:{marginTop:Ni},gap:"2",flexDirection:"column",as:"form",onSubmit:se,pointerEvents:K?"none":"auto"},g.createElement(z,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},g.createElement(sW,{imageUrl:O,showSquareImage:!0,decimals:M,name:A,symbol:"",balance:(Q==null?void 0:Q.balance)||"0",chainId:t}),g.createElement(HB,{ref:b,style:{fontSize:Re.fontSizes.xlarge,fontWeight:Re.fontWeights.bold},name:"amount",value:E,onChange:q,disabled:!L,controls:g.createElement(g.Fragment,null,L&&g.createElement(z,{gap:"2"},g.createElement(nt,{disabled:ae,size:"xs",onClick:_,leftIcon:oue}),g.createElement(nt,{disabled:be,size:"xs",onClick:W,leftIcon:$le}),g.createElement(nt,{size:"xs",shape:"square",label:"Max",onClick:V,"data-id":"maxCoin",flexShrink:"0"})))}),C&&g.createElement(oe,{as:"div",variant:"normal",color:"negative",marginTop:"2"},"Insufficient Balance")),g.createElement(z,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},g.createElement(oe,{fontSize:"normal",color:"text50"},"To"),wg(P)?g.createElement(z,{borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",className:xo,onClick:ee,style:{height:"52px"}},g.createElement(z,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},g.createElement(Pu,{address:P,style:{width:"20px"}}),g.createElement(oe,{color:"text100"},`0x${w9(P.substring(2),8)}`)),g.createElement(Au,{size:"xs"})):g.createElement(cl,{value:P,onChange:he=>R(he.target.value),placeholder:`${k.name} Address (0x...)`,name:"to-address","data-1p-ignore":!0,controls:g.createElement(nt,{size:"xs",shape:"square",label:"Paste",onClick:J,"data-id":"to-address",flexShrink:"0",leftIcon:Tb})})),v&&g.createElement(z,{marginTop:"3"},g.createElement(oe,{variant:"small",color:"negative",marginBottom:"2"},"The wallet is connected to the wrong network. Please switch network before proceeding"),g.createElement(nt,{marginTop:"2",width:"full",variant:"primary",type:"button",label:"Switch Network",onClick:()=>y({chainId:t}),disabled:m,style:{height:"52px",borderRadius:Re.radii.md}})),g.createElement(z,{style:{height:"52px"},alignItems:"center",justifyContent:"center"},K?g.createElement(Wc,null):g.createElement(nt,{color:"text100",marginTop:"3",width:"full",variant:"primary",type:"submit",disabled:!D||!wg(P)||C||!m&&!p,label:"Send",rightIcon:go,style:{height:"52px",borderRadius:Re.radii.md}})))},Q7e=({transaction:t})=>{var e;const{chains:r}=vt(),{fiatCurrency:n}=Hn(),{setNavigation:i}=Mi(),s=()=>{i({location:"transaction-details",params:{transaction:t}})};let o=[];(e=t.transfers)==null||e.forEach(b=>{const E=b.contractAddress;o.includes(E)||o.push(E)});const{data:a=[],isLoading:c}=$u({tokens:o.map(b=>({contractAddress:b,chainId:t.chainId}))}),{data:l=1,isLoading:u}=dl({toCurrency:n.symbol}),f=c||u,{transfers:d}=t,h=Cr(t.chainId,r),p=b=>{switch(b){case xn.SEND:return g.createElement(V6,{style:{transform:"rotate(270deg)",width:"16px"}});case xn.RECEIVE:return g.createElement(V6,{style:{transform:"rotate(90deg)",width:"16px"}});case xn.UNKNOWN:default:return g.createElement(Wj,{style:{width:"14px"}})}},m=b=>{switch(b){case xn.SEND:return"Sent";case xn.RECEIVE:return"Received";case xn.UNKNOWN:default:return"Transacted"}},v=(b,E,S)=>{let P="";S===xn.SEND?P="-":S===xn.RECEIVE&&(P="+");let R="text50";return S===xn.SEND?R=Re.colors.negative:S===xn.RECEIVE&&(R=Re.colors.positive),g.createElement(oe,{fontWeight:"bold",fontSize:"normal",style:{color:R}},`${P}${b} ${E}`)},y=({transfer:b,isFirstItem:E})=>{const{amounts:S}=b,P=qz(t.timestamp).format("MMM DD, YYYY");return g.createElement(z,{gap:"2",width:"full",flexDirection:"column",justifyContent:"space-between"},g.createElement(z,{flexDirection:"row",justifyContent:"space-between"},g.createElement(z,{color:"text50",gap:"1",flexDirection:"row",justifyContent:"center",alignItems:"center"},p(b.transferType),g.createElement(oe,{fontWeight:"medium",fontSize:"normal",color:"text100"},m(b.transferType)),g.createElement(ar,{src:h.logoURI,width:"3"})),E&&g.createElement(z,null,g.createElement(oe,{fontWeight:"medium",fontSize:"normal",color:"text50"},P))),S.map((R,L)=>{var j,H,K,Y,Q,F;const x=Cr(t.chainId,r),k=mr(b.contractAddress,$t),N=((j=b.contractInfo)==null?void 0:j.type)==="ERC721"||((H=b.contractInfo)==null?void 0:H.type)==="ERC1155";let M;const A=(K=b.tokenIds)==null?void 0:K[L];if(N&&A){var O;M=((O=b.tokenMetadata)==null||(O=O[A])==null?void 0:O.decimals)||0}else{var B;M=k?x.decimals:(B=b.contractInfo)==null?void 0:B.decimals}const I=Rt(R,M),C=k?x.symbol:((Y=b.contractInfo)==null?void 0:Y.symbol)||"",D=k?x.logoURI:(Q=b.contractInfo)==null?void 0:Q.logoURI,q=(F=a.find(_=>mr(_.token.contractAddress,b.contractAddress)))==null||(F=F.price)==null?void 0:F.value;return g.createElement(z,{key:L,flexDirection:"row",justifyContent:"space-between"},g.createElement(z,{flexDirection:"row",gap:"2",justifyContent:"center",alignItems:"center"},D&&g.createElement(ar,{src:D,width:"5",alt:"token logo"}),v(Aa(I),C,b.transferType)),f&&g.createElement(Lt,{width:"35px",height:"20px"}),q&&g.createElement(oe,{fontWeight:"medium",fontSize:"normal",color:"text50"},`${n.sign}${(Number(I)*q*l).toFixed(2)}`))}))};return g.createElement(z,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",className:xo,onClick:()=>s()},d==null?void 0:d.map((b,E)=>g.createElement(z,{key:`${t.txnHash}-${E}`,width:"full"},y({transfer:b,isFirstItem:E===0}))))},A9=()=>{const t=()=>g.createElement(z,{flexDirection:"column",gap:"2",width:"full",justifyContent:"space-between"},g.createElement(z,{flexDirection:"row",justifyContent:"space-between"},g.createElement(Lt,{width:"65px",height:"20px"}),g.createElement(Lt,{width:"75px",height:"17px"})),g.createElement(z,{flexDirection:"row",justifyContent:"space-between"},g.createElement(Lt,{width:"120px",height:"20px"}),g.createElement(Lt,{width:"35px",height:"17px"})));return g.createElement(z,{flexDirection:"column",gap:"3"},g.createElement(Lt,{width:"70px",height:"17px"}),g.createElement(z,{flexDirection:"column",gap:"2"},Array(8).fill(null).map((e,r)=>g.createElement(z,{borderRadius:"md",padding:"4",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",background:"backgroundSecondary",key:r},t()))))},_9=({transactions:t,isLoading:e,isFetchingNextPage:r})=>{const n=[{id:"today",label:"Today"},{id:"yesterday",label:"Yesterday"},{id:"week",label:"Last Week"},{id:"month",label:"Last Month"},{id:"year",label:"Last Year"},{id:"years",label:"Past Years"}],i=w.useMemo(()=>{const a=new Date(new Date().setHours(0,0,0,0)).getTime(),c=new Date(new Date().setDate(new Date(a).getDate()-1)).getTime(),l=new Date(new Date().setDate(new Date().getDate()-7)).getTime(),u=new Date(new Date().setDate(new Date().getDate()-30)).getTime(),f=new Date(new Date().setDate(new Date().getDate()-365)).getTime(),d={today:[],yesterday:[],week:[],month:[],year:[],years:[]};return t.forEach(h=>{const p=new Date(h.timestamp).getTime();p>a?d.today.push(h):p>c?d.yesterday.push(h):p>l?d.week.push(h):p>u?d.month.push(h):p>f?d.year.push(h):d.years.push(h)}),d},[t]);if(e)return g.createElement(z,{flexDirection:"column",gap:"2"},g.createElement(A9,null));const s=({label:a})=>g.createElement(z,null,g.createElement(oe,{color:"text50",fontWeight:"medium",fontSize:"normal"},a)),o=({transactions:a})=>g.createElement(z,{flexDirection:"column",gap:"2"},a.map((c,l)=>g.createElement(z,{key:`${c.txnHash}-${l}`,flexDirection:"column",gap:"2"},g.createElement(Q7e,{transaction:c}))));return g.createElement(z,{flexDirection:"column",gap:"5"},n.map(a=>{const c=i[a.id];return c.length===0?null:g.createElement(z,{key:a.id,flexDirection:"column",gap:"3"},g.createElement(s,{label:a.label}),g.createElement(o,{transactions:c}))}),t.length===0&&g.createElement(z,{flexDirection:"column",gap:"3"},g.createElement(s,{label:"History"}),g.createElement(oe,{color:"text100"},"No Recent Transaction History Found")),r&&g.createElement(z,{margin:"4",alignItems:"center",justifyContent:"center"},g.createElement(Wc,null)))},J7e=()=>{const{selectedNetworks:t}=Hn(),{address:e}=mn();zs();const{data:r=[],isLoading:n}=T7e({accountAddress:e||"",chainIds:t});return g.createElement(z,null,g.createElement(z,{paddingX:"4",paddingBottom:"5",paddingTop:"3"},g.createElement(_9,{transactions:r,isLoading:n,isFetchingNextPage:!1})))},Sg=({balance:t})=>{var e,r;const{chains:n}=vt(),{setNavigation:i}=Mi(),s=mr(t.contractAddress,$t),o=Cr(t.chainId,n),a=s?o.logoURI:t==null||(e=t.contractInfo)==null?void 0:e.logoURI,c=s?o.name:(t==null||(r=t.contractInfo)==null?void 0:r.name)||"Unknown",l=()=>{var f,d;if(t.contractType==="ERC721"||t.contractType==="ERC1155")return t.balance;const h=s?o.decimals:t==null||(f=t.contractInfo)==null?void 0:f.decimals,p=Rt(t.balance,h||0),m=Aa(p),v=s?o.symbol:t==null||(d=t.contractInfo)==null?void 0:d.symbol;return`${m} ${v}`},u=()=>{const f=t.contractType==="ERC721"||t.contractType==="ERC1155";i(f?{location:"collection-details",params:{contractAddress:t.contractAddress,chainId:t.chainId}}:{location:"coin-details",params:{contractAddress:t.contractAddress,chainId:t.chainId}})};return g.createElement(z,{key:t.contractAddress,onClick:u,width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",className:xo},g.createElement(z,{gap:"3",flexDirection:"row",alignItems:"center",justifyContent:"center"},g.createElement(bu,{imageUrl:a,size:30}),g.createElement(z,{gap:"1",flexDirection:"row",alignItems:"center",justifyContent:"center"},g.createElement(oe,{color:"text100",fontWeight:"bold",fontSize:"normal",style:{textOverflow:"ellipsis",overflow:"hidden",maxWidth:"250px",textWrap:"nowrap"}},c),g.createElement(ar,{src:o.logoURI,alt:"network logo",style:{width:"12px",height:"12px"}}))),g.createElement(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"1"},g.createElement(oe,{color:"text50",fontWeight:"bold",fontSize:"normal"},l()),g.createElement(go,{color:"text50"})))},EI=({toLocation:t,label:e})=>{const{setNavigation:r}=Mi(),n=()=>{r(t)};return g.createElement(z,{onClick:n,width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",className:xo},g.createElement(oe,{color:"text50",fontSize:"normal",fontWeight:"medium"},e),g.createElement(z,{flexDirection:"row",justifyContent:"center",alignItems:"center"},g.createElement(oe,{color:"text50",fontSize:"normal",fontWeight:"medium"},"View all"),g.createElement(go,{color:"text50",size:"sm"})))},X7e=()=>{const{chains:t}=vt(),{fiatCurrency:e,hideUnlistedTokens:r,selectedNetworks:n}=Hn(),[i,s]=w.useState(""),{address:o}=mn();zs();const{data:a,isLoading:c}=C9({accountAddress:o||"",chainIds:n},{hideUnlistedTokens:r}),l=(a==null?void 0:a.filter(K=>K.contractType==="ERC20"||mr(K.contractAddress,$t)))||[],{data:u=[],isLoading:f}=$u({tokens:l.map(K=>({chainId:K.chainId,contractAddress:K.contractAddress}))}),{data:d=1,isLoading:h}=dl({toCurrency:e.symbol}),p=l.sort((K,Y)=>{var Q,F;return Number(To({balance:Y,prices:u,conversionRate:d,decimals:((Q=Y.contractInfo)==null?void 0:Q.decimals)||18}))-Number(To({balance:K,prices:u,conversionRate:d,decimals:((F=Y.contractInfo)==null?void 0:F.decimals)||18}))}),v=((a==null?void 0:a.filter(K=>K.contractType==="ERC721"||K.contractType==="ERC1155"))||[]).sort((K,Y)=>Number(Y.balance)-Number(K.balance)),y=c||f||h,b=v.map((K,Y)=>{var Q;return{index:Y,name:((Q=K.contractInfo)==null?void 0:Q.name)||"Unknown"}}),E=p.map((K,Y)=>{if(mr(K.contractAddress,$t)){const F=Cr(K.chainId,t);return{index:Y,name:F.name}}else{var Q;return{index:Y,name:((Q=K.contractInfo)==null?void 0:Q.name)||"Unknown"}}}),S=p.length,P=v.length,R=new Ea(E,{keys:["name"]}),L=new Ea(b,{keys:["name"]}),j=(i===""?E:R.search(i).map(K=>K.item)).slice(0,5),H=(i===""?b:L.search(i).map(K=>K.item)).slice(0,5);return g.createElement(z,{paddingX:"4",paddingBottom:"5",paddingTop:"3",flexDirection:"column",gap:"10",alignItems:"center",justifyContent:"center"},g.createElement(z,{width:"full"},g.createElement(cl,{autoFocus:!0,name:"search wallet",leftIcon:Ob,value:i,onChange:K=>s(K.target.value),placeholder:"Search your wallet","data-1p-ignore":!0})),g.createElement(z,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5"},g.createElement(EI,{toLocation:{location:"search-view-all",params:{defaultTab:"collections"}},label:`Collections (${P})`}),y?Array(5).fill(null).map((K,Y)=>g.createElement(Lt,{key:Y,width:"100%",height:"32px"})):H.length===0?g.createElement(oe,{color:"text100"},"No collections found"):H.map((K,Y)=>{const Q=v[K.index];return g.createElement(Sg,{key:Y,balance:Q})})),g.createElement(z,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5"},g.createElement(EI,{toLocation:{location:"search-view-all",params:{defaultTab:"coins"}},label:`Coins (${S})`}),y?Array(5).fill(null).map((K,Y)=>g.createElement(Lt,{key:Y,width:"100%",height:"32px"})):j.length===0?g.createElement(oe,{color:"text100"},"No coins found"):j.map((K,Y)=>{const Q=p[K.index];return g.createElement(Sg,{key:Y,balance:Q})})))},Z7e=({defaultTab:t})=>{const{chains:e}=vt(),{fiatCurrency:r,hideUnlistedTokens:n,selectedNetworks:i}=Hn(),[s,o]=w.useState(""),[a,c]=w.useState(t);zs(),w.useEffect(()=>{o("")},[a]);const{address:l}=mn(),{data:u,isLoading:f}=C9({accountAddress:l||"",chainIds:i},{hideUnlistedTokens:n}),d=(u==null?void 0:u.filter(k=>k.contractType==="ERC20"||mr(k.contractAddress,$t)))||[],{data:h=[],isLoading:p}=$u({tokens:d.map(k=>({chainId:k.chainId,contractAddress:k.contractAddress}))}),{data:m=1,isLoading:v}=dl({toCurrency:r.symbol}),y=d.sort((k,N)=>{var M,A;return Number(To({balance:N,prices:h,conversionRate:m,decimals:((M=N.contractInfo)==null?void 0:M.decimals)||18}))-Number(To({balance:k,prices:h,conversionRate:m,decimals:((A=k.contractInfo)==null?void 0:A.decimals)||18}))}),E=((u==null?void 0:u.filter(k=>k.contractType==="ERC721"||k.contractType==="ERC1155"))||[]).sort((k,N)=>Number(N.balance)-Number(k.balance)),S=y.length,P=E.length,R=f||p||v,L=E.map((k,N)=>{var M;return{index:N,name:((M=k.contractInfo)==null?void 0:M.name)||"Unknown"}}),j=y.map((k,N)=>{if(mr(k.contractAddress,$t)){const A=Cr(k.chainId,e);return{index:N,name:A.name}}else{var M;return{index:N,name:((M=k.contractInfo)==null?void 0:M.name)||"Unknown"}}}),H=new Ea(j,{keys:["name"]}),K=new Ea(L,{keys:["name"]}),Y=s===""?j:H.search(s).map(k=>k.item),Q=s===""?L:K.search(s).map(k=>k.item),F=()=>g.createElement(Lt,{width:"360px",height:"48px"}),x=()=>g.createElement(g.Fragment,null,Array(8).fill(null).map((k,N)=>g.createElement(Lt,{key:N,width:"full",height:"32px"})));return g.createElement(z,{paddingX:"4",paddingBottom:"5",paddingTop:"3",flexDirection:"column",gap:"5",alignItems:"center",justifyContent:"center"},g.createElement(z,{width:"full"},g.createElement(cl,{autoFocus:!0,name:"search wallet",leftIcon:Ob,value:s,onChange:k=>o(k.target.value),placeholder:"Search your wallet","data-1p-ignore":!0})),g.createElement(z,{width:"full"},g.createElement(L1e,{value:a,onValueChange:k=>c(k)},g.createElement(z,{marginBottom:"5"},!R&&g.createElement(D1e,{value:a,tabs:[{label:`Collections (${P})`,value:"collections"},{label:`Coins (${S})`,value:"coins"}]}),R&&g.createElement(F,null)),g.createElement(r_,{value:"collections"},g.createElement(z,{flexDirection:"column",gap:"3"},R&&g.createElement(x,null),!R&&Q.length===0&&g.createElement(oe,{color:"text100"},"No Collectibles Found"),!R&&Q.length>0&&Q.map((k,N)=>{const M=E[k.index];return g.createElement(Sg,{key:N,balance:M})}))),g.createElement(r_,{value:"coins"},g.createElement(z,{flexDirection:"column",gap:"3"},R&&g.createElement(x,null),!R&&y.length==0&&g.createElement(oe,{color:"text100"},"No Coins Found"),!R&&Y.length>0&&Y.map((k,N)=>{const M=y[k.index];return g.createElement(Sg,{key:N,balance:M})}))))))},eSe=()=>{const{setNavigation:t}=Mi(),e=()=>{t({location:"settings-general"})},r=()=>{t({location:"settings-currency"})},n=()=>{t({location:"settings-networks"})};return g.createElement(z,{style:{paddingTop:Ni}},g.createElement(z,{padding:"5",paddingTop:"3"},g.createElement(z,{flexDirection:"column",gap:"2"},g.createElement(nt,{onClick:e,leftIcon:zj,rightIcon:go,width:"full",label:"General",style:{height:"52px",borderRadius:Re.radii.md}}),g.createElement(nt,{onClick:r,leftIcon:zle,rightIcon:go,width:"full",label:"Currency",style:{height:"52px",borderRadius:Re.radii.md}}),g.createElement(nt,{onClick:n,leftIcon:Qle,rightIcon:go,width:"full",label:"Networks",style:{height:"52px",borderRadius:Re.radii.md}}))))},tSe=()=>{kp();const{hideUnlistedTokens:t,setHideUnlistedTokens:e,hideCollectibles:r,setHideCollectibles:n}=Hn(),i=()=>{e(!t)},s=()=>{n(!r)};return g.createElement(z,{style:{paddingTop:Ni}},g.createElement(z,{gap:"2",padding:"5",paddingTop:"3",flexDirection:"column"},g.createElement(un,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},g.createElement(oe,{color:"text100",fontWeight:"bold"},"Hide unlisted tokens"),g.createElement(n3,{checked:t,onCheckedChange:i})),g.createElement(un,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},g.createElement(oe,{color:"text100",fontWeight:"bold"},"Hide collectibles"),g.createElement(n3,{checked:r,onCheckedChange:s}))))},rSe=t=>{const{selected:e,className:r,squareIndicator:n=!1}=t;return g.createElement(z,{borderStyle:"solid",borderColor:n&&e?"transparent":"borderNormal",borderWidth:"thin",position:"relative",alignItems:"center",justifyContent:"center",flexShrink:"0",className:r,style:{borderRadius:n?"4px":Re.radii.circle,width:"20px",height:"20px"}},g.createElement(z,{as:_c.div,background:n?"borderNormal":"backgroundInverse",position:"absolute",color:"textInverse100",initial:{opacity:e?1:0,scale:e?1:.5},animate:{opacity:e?1:0,scale:e?1:.5},transition:{ease:"backOut"},style:{borderRadius:n?"4px":Re.radii.circle,width:n?"20px":"14px",height:n?"20px":"14px"},justifyContent:"center",alignItems:"center"},n&&g.createElement(Fd,{color:"white",style:{width:"14px",height:"14px"}})))},nSe=["value","selected","children","disabled","onClick","className","hideIndicator","squareIndicator"],oW=t=>{const{value:e,selected:r,children:n,disabled:i,onClick:s,className:o,hideIndicator:a,squareIndicator:c=!1}=t,l=A2(t,nSe);return g.createElement(un,kn({as:"button",clickable:!0,className:v8e(o),disabled:i,onClick:()=>s(e),userSelect:"none",alignItems:"center",justifyContent:"space-between",textAlign:"left",width:"full",style:{appearance:"none"}},l),n,!a&&g.createElement(rSe,{selected:r,squareIndicator:c}))},iSe=()=>{const{fiatCurrency:t,setFiatCurrency:e}=Hn();return zs(),g.createElement(z,{paddingBottom:"5",paddingX:"4",paddingTop:"3"},g.createElement(z,{flexDirection:"column",gap:"2"},iW.map(r=>g.createElement(oW,{key:r.symbol,value:r.symbol,selected:r.symbol===t.symbol,onClick:()=>e&&e(r)},g.createElement(z,{gap:"2",justifyContent:"flex-start",alignItems:"center"},g.createElement(oe,{color:"text100",fontWeight:"bold"},r.symbol),g.createElement(oe,{color:"text50"},r.name.message))))))},sSe=()=>{const{selectedNetworks:t,setSelectedNetworks:e}=Hn(),{chains:r}=vt(),n=i=>{if(t.includes(i)){if(t.length===1)return;e(t.filter(s=>s!==i))}else e([...t,i])};return g.createElement(z,{style:{paddingTop:Ni}},g.createElement(z,{padding:"5",paddingTop:"3"},g.createElement(oe,{variant:"small",color:"text50"},"Networks"),g.createElement(z,{flexDirection:"column",gap:"2"},r.map(i=>{const s=Cr(i.id,r);return g.createElement(oW,{disabled:t.length===1&&t.includes(i.id),key:i.id,selected:t.includes(i.id),onClick:()=>n(i.id),value:i.id,squareIndicator:!0},g.createElement(z,{gap:"2",justifyContent:"center",alignItems:"center"},g.createElement(ar,{width:"3",height:"3",src:s.logoURI,alt:"network"}),g.createElement(oe,{color:"text100",variant:"small"},s.name)))}))))},_p=({chainId:t})=>{var e;const{chains:r}=vt(),{network:n}=ur(t),i=Cr(t,r),s=zq(t),o=qq(t);return g.createElement(z,{height:"6",paddingY:"1",paddingLeft:"1.5",paddingRight:"2",gap:"1",style:{background:o},borderRadius:"xs",flexDirection:"row",justifyContent:"center",alignItems:"center",width:"fit"},g.createElement(ar,{style:{width:"14px"},src:i.logoURI}),g.createElement(oe,{fontWeight:"bold",fontSize:"xsmall",style:{color:s}},m7e((e=n.title)!=null?e:n.name)))},oSe=({chainId:t})=>(zs(),g.createElement(z,{style:{paddingTop:Ni}},g.createElement(z,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingX:"4",paddingTop:"0",style:{marginTop:"-20px"}},g.createElement(z,{marginBottom:"10",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column"},g.createElement(Lt,{width:"32px",height:"32px"}),g.createElement(Lt,{height:"24px",width:"70px"}),g.createElement(_p,{chainId:t})),g.createElement(z,null,g.createElement(oe,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),g.createElement(z,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},g.createElement(Lt,{width:"150px",height:"36px"}),g.createElement(Lt,{width:"33px",height:"17px"}))),g.createElement(nt,{color:"text100",marginTop:"4",marginBottom:"10",width:"full",variant:"primary",leftIcon:Rb,label:"Send",disabled:!0,onClick:()=>{}}),g.createElement(z,null,g.createElement(A9,null))))),aSe=(t,e)=>{var r;const[n,i]=w.useState(null),s=w.useMemo(()=>new IntersectionObserver(([o])=>i(o),e),[]);return w.useEffect(()=>(t.current&&s.observe(t.current),()=>{t.current&&s.disconnect()}),[t.current,s]),(r=n==null?void 0:n.isIntersecting)!=null?r:!1},aW=t=>{const{onLoad:e,hasMore:r=!0,children:n}=t,[i,s]=w.useState(0),[o,a]=w.useState(!1),c=w.useRef(null),l=aSe(c);w.useEffect(()=>{l&&r&&!o&&u()},[l]);const u=async()=>{a(!0),await e(i),s(f=>f+1),a(!1)};return g.createElement(g.Fragment,null,n,g.createElement("div",{ref:c}))},cSe=({contractAddress:t,chainId:e})=>{var r,n,i,s;const{chains:o}=vt(),{setNavigation:a}=Mi(),{fiatCurrency:c,hideUnlistedTokens:l}=Hn();zs();const{address:u}=mn(),{data:f,isLoading:d,fetchNextPage:h,hasNextPage:p,isFetchingNextPage:m}=nW({chainId:e,accountAddress:u||"",contractAddress:t}),v=Xq(f),{data:y,isLoading:b}=I7e({accountAddress:u||"",contractAddress:t,chainId:e},{hideUnlistedTokens:l}),{data:E,isLoading:S}=$u({tokens:[{chainId:e,contractAddress:t}]}),{data:P=1,isLoading:R}=dl({toCurrency:c.symbol});if(b||S||R)return g.createElement(oSe,{chainId:e});const j=mr(t,$t),H=j?Cr(e,o).logoURI:y==null||(r=y.contractInfo)==null?void 0:r.logoURI,K=j?Cr(e,o).symbol:y==null||(n=y.contractInfo)==null?void 0:n.symbol,Y=j?Cr(e,o).name:y==null||(i=y.contractInfo)==null?void 0:i.name,Q=j?Cr(e,o).decimals:y==null||(s=y.contractInfo)==null?void 0:s.decimals,F=Rt((y==null?void 0:y.balance)||"0",Q),x=Aa(F),k=y?To({balance:y,prices:E||[],conversionRate:P,decimals:Q||0}):"0",N=()=>{a({location:"send-coin",params:{chainId:e,contractAddress:t}})};return g.createElement(z,{style:{paddingTop:Ni}},g.createElement(z,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingX:"4",paddingTop:"0",style:{marginTop:"-20px"}},g.createElement(z,{marginBottom:"10",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column"},g.createElement(ar,{width:"8",src:H,alt:"logo"}),g.createElement(oe,{color:"text100",fontWeight:"bold",fontSize:"large"},Y),g.createElement(_p,{chainId:e})),g.createElement(z,null,g.createElement(oe,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),g.createElement(z,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},g.createElement(oe,{fontWeight:"bold",color:"text100",fontSize:"xlarge"},`${x} ${K}`),g.createElement(oe,{fontWeight:"medium",color:"text50",fontSize:"normal"},`${c.sign}${k}`))),g.createElement(nt,{width:"full",variant:"primary",leftIcon:Rb,color:"text100",label:"Send",onClick:N}),g.createElement(z,null,g.createElement(aW,{onLoad:()=>h(),hasMore:p},g.createElement(_9,{transactions:v,isLoading:d,isFetchingNextPage:m})))))},lSe=({chainId:t})=>(zs(),g.createElement(z,{paddingX:"4",paddingBottom:"5",paddingTop:"3",marginTop:"8",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10"},g.createElement(z,{flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"center"},g.createElement(Lt,{width:"32px",height:"32px"}),g.createElement(Lt,{width:"100px",height:"24px"}),g.createElement(_p,{chainId:t}),g.createElement(Lt,{width:"142px",height:"17px"})),g.createElement(z,{width:"full"},g.createElement(Lt,{width:"168px",height:"20px"}),g.createElement(z,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${Re.space[1]}) calc(50% - ${Re.space[1]})`,gap:Re.space[2]},width:"full",marginTop:"3"},Array(8).fill(null).map((e,r)=>g.createElement(Lt,{key:r,width:"full",aspectRatio:"1/1"})))))),uSe=({chainId:t,contractAddress:e})=>{var r;const{setNavigation:n}=Mi(),{address:i}=mn(),{data:s,isLoading:o}=_7e({chainId:t,accountAddress:i||"",collectionAddress:e});zs();const a=s==null||(r=s[0])==null?void 0:r.contractInfo,c=a==null?void 0:a.logoURI;if(o)return g.createElement(lSe,{chainId:t});const l=u=>{n&&n({location:"collectible-details",params:{contractAddress:u.contractAddress,chainId:u.chainId,tokenId:u.tokenID}})};return g.createElement(z,{paddingX:"4",paddingBottom:"5",paddingTop:"3",marginTop:"8",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10"},g.createElement(z,{flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"center"},g.createElement(bu,{imageUrl:c,size:32}),g.createElement(oe,{fontWeight:"bold",fontSize:"large",color:"text100"},(a==null?void 0:a.name)||"Unknown"),g.createElement(_p,{chainId:t}),g.createElement(oe,{fontWeight:"medium",fontSize:"normal",color:"text50"},`${(s==null?void 0:s.length)||0} Unique Collectibles`)),g.createElement(z,{width:"full"},g.createElement(oe,{fontWeight:"medium",fontSize:"normal",color:"text50"},`Owned (${(s==null?void 0:s.length)||0})`),g.createElement(z,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${Re.space[1]}) calc(50% - ${Re.space[1]})`,gap:Re.space[2]},width:"full",marginTop:"3"},s==null?void 0:s.map((u,f)=>{var d,h,p;const m=u.balance,v=(u==null||(d=u.tokenMetadata)==null?void 0:d.decimals)||0,y=Aa(Rt(m,v));return g.createElement(z,{key:f,onClick:()=>l(u),className:xo},g.createElement(z,{background:"backgroundSecondary",aspectRatio:"1/1",width:"full",borderRadius:"md",justifyContent:"center",alignItems:"center",marginBottom:"2"},g.createElement(ar,{style:{height:"100%"},src:(h=u.tokenMetadata)==null?void 0:h.image})),g.createElement(z,null,g.createElement(oe,{fontWeight:"bold",fontSize:"normal",color:"text100"},`${(p=u.tokenMetadata)==null?void 0:p.name}`)),g.createElement(z,null,g.createElement(oe,{marginTop:"1",fontWeight:"medium",fontSize:"normal",color:"text50"},y," Owned")))}))))},fSe=()=>(zs(),g.createElement(z,{style:{paddingTop:Ni}},g.createElement(z,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingX:"4",paddingTop:"0",style:{marginTop:"-20px"}},g.createElement(z,{gap:"3",alignItems:"center",justifyContent:"center",flexDirection:"column"},g.createElement(Lt,{width:"120px",height:"30px"}),g.createElement(Lt,{width:"140px",height:"40px"})),g.createElement(z,null,g.createElement(Lt,{width:"347px",height:"347px"})),g.createElement(z,null,g.createElement(z,null,g.createElement(oe,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),g.createElement(z,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},g.createElement(Lt,{width:"44px",height:"36px"}),g.createElement(Lt,{width:"34px",height:"17px"}))),g.createElement(nt,{color:"text100",marginTop:"4",width:"full",variant:"primary",leftIcon:Rb,label:"Send",onClick:()=>{}})),g.createElement(z,null,g.createElement(oe,{fontSize:"normal",color:"text50",fontWeight:"medium"},"This week"),g.createElement(A9,null))))),dSe=({contractAddress:t,chainId:e,tokenId:r})=>{var n,i,s,o,a,c;const{chains:l}=vt(),{address:u}=mn(),{fiatCurrency:f}=Hn(),{setNavigation:d}=Mi();zs();const{data:h,isLoading:p,fetchNextPage:m,hasNextPage:v,isFetchingNextPage:y}=nW({chainId:e,accountAddress:u||"",contractAddress:t,tokenId:r}),b=Xq(h),{data:E,isLoading:S}=tW({accountAddress:u||"",collectionAddress:t,chainId:e,tokenId:r,verifiedOnly:!1}),{data:P,isLoading:R}=rW({tokens:[{chainId:e,contractAddress:t,tokenId:r}]}),{data:L=1,isLoading:j}=dl({toCurrency:f.symbol});if(S||R||j)return g.createElement(fSe,null);const K=()=>{d({location:"send-collectible",params:{chainId:e,contractAddress:t,tokenId:r}})},Y=Cr(e,l),Q=E==null||(n=E.contractInfo)==null?void 0:n.logoURI,F=(E==null||(i=E.contractInfo)==null?void 0:i.name)||"Unknown Collection",x=(E==null||(s=E.tokenMetadata)==null?void 0:s.decimals)||0,k=(E==null?void 0:E.balance)||"0",N=Rt(k,x),M=Aa(Number(N)),A=E?To({balance:E,prices:P||[],conversionRate:L,decimals:x}):"0";return g.createElement(z,{style:{paddingTop:Ni}},g.createElement(z,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingX:"4",paddingTop:"0",style:{marginTop:"-20px"}},g.createElement(z,{gap:"3",alignItems:"center",justifyContent:"center",flexDirection:"column"},g.createElement(z,{flexDirection:"row",gap:"2",justifyContent:"center",alignItems:"center"},g.createElement(ar,{borderRadius:"circle",width:"8",src:Q,alt:"collection logo",style:{objectFit:"cover"}}),g.createElement(z,{gap:"1",flexDirection:"row",justifyContent:"center",alignItems:"center"},g.createElement(oe,{fontWeight:"bold",fontSize:"small",color:"text100"},F),g.createElement(ar,{width:"3",src:Y.logoURI,alt:"collection logo"}))),g.createElement(z,{flexDirection:"column",justifyContent:"center",alignItems:"center"},g.createElement(oe,{color:"text100",fontWeight:"bold",fontSize:"large"},(E==null||(o=E.tokenMetadata)==null?void 0:o.name)||"Unknown Collectible"),g.createElement(oe,{color:"text50",fontSize:"small",fontWeight:"medium"},`#${r}`))),g.createElement(z,null,g.createElement(S9,{imageUrl:E==null||(a=E.tokenMetadata)==null?void 0:a.image})),g.createElement(z,null,g.createElement(z,null,g.createElement(oe,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),g.createElement(z,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},g.createElement(oe,{fontWeight:"bold",color:"text100",fontSize:"xlarge"},M),P&&((c=P[0].price)==null?void 0:c.value)&&g.createElement(oe,{fontWeight:"medium",color:"text50",fontSize:"normal"},`${f.symbol} ${A}`))),g.createElement(nt,{color:"text100",marginTop:"4",width:"full",variant:"primary",leftIcon:Rb,label:"Send",onClick:K})),g.createElement(z,null,g.createElement(aW,{onLoad:()=>m(),hasMore:v},g.createElement(_9,{transactions:b,isLoading:p,isFetchingNextPage:y})))))},hSe=["buttonVariant","text","size"],cW=t=>{const{buttonVariant:e="icon",text:r,size:n="xs"}=t,i=A2(t,hSe),[s,o]=w.useState(!1);w.useEffect(()=>{s&&setTimeout(()=>{o(!1)},4e3)},[s]);const a=()=>{o(!0)},c=s?"Copied!":"Copy",l=e==="icon"?"rgba(0,0,0,0)":Re.colors.buttonGlass;return g.createElement(Tz.CopyToClipboard,{text:r,onCopy:a},g.createElement(_o,kn({size:n,icon:s?Fd:Tb},i,{style:kn({background:l},t==null?void 0:t.style),label:e==="with-label"?c:void 0})))},pSe=({transaction:t})=>{var e,r;const{chains:n}=vt(),{fiatCurrency:i}=Hn(),s=[],o=[];(e=t.transfers)==null||e.forEach(b=>{var E,S;if(((E=b.contractInfo)==null?void 0:E.type)==="ERC721"||((S=b.contractInfo)==null?void 0:S.type)==="ERC1155"){var P;(P=b.tokenIds)==null||P.forEach(L=>{if(!o.find(K=>{var Y;return K.chainId===t.chainId&&mr(K.contractAddress,((Y=b.contractInfo)==null?void 0:Y.address)||"")&&K.tokenId===L})){var H;o.push({chainId:t.chainId,contractAddress:((H=b.contractInfo)==null?void 0:H.address)||"",tokenId:L})}})}else{var R;const L=(b==null||(R=b.contractInfo)==null?void 0:R.address)||$t;s.find(H=>H.chainId===t.chainId&&mr(H.contractAddress,L))||s.push({chainId:t.chainId,contractAddress:L})}});const{data:a,isLoading:c}=$u({tokens:s}),{data:l,isLoading:u}=rW({tokens:o}),{data:f=1,isLoading:d}=dl({toCurrency:i.symbol}),h=s.length>0&&c||o.length>0&&u||d,p=Cr(t.chainId,n),m=qz(t.timestamp).format("ddd MMM DD YYYY, h:m:s a"),v=()=>{typeof window<"u"&&window.open(`${p.blockExplorerUrl}/tx/${t.txnHash}`,"_blank")},y=({transfer:b})=>{var E,S,P,R;const L=b.to,j=L.substring(0,10)+"..."+L.substring(b.to.length-4,b.to.length),H=mr((b==null||(E=b.contractInfo)==null?void 0:E.address)||"",$t),K=H?p.logoURI:b==null||(S=b.contractInfo)==null?void 0:S.logoURI,Y=H?p.symbol:(b==null||(P=b.contractInfo)==null?void 0:P.symbol)||"";return g.createElement(g.Fragment,null,(R=b.amounts)==null?void 0:R.map((Q,F)=>{var x,k,N,M,A;const O=b.contractType==="ERC721"||b.contractType==="ERC1155",B=((x=b.tokenIds)==null?void 0:x[F])||"0",I=(b==null||(k=b.tokenMetadata)==null||(k=k[B])==null?void 0:k.decimals)||0,C=H?p.decimals:(b==null||(N=b.contractInfo)==null?void 0:N.decimals)||0,q=Rt(Q,O?I:C),_=Aa(q),W=O?l==null||(M=l.find(J=>{var ee,se;return mr(J.token.contractAddress,((ee=b.contractInfo)==null?void 0:ee.address)||"")&&J.token.tokenId===((se=b.tokenIds)==null?void 0:se[F])&&J.token.chainId===t.chainId}))==null||(M=M.price)==null?void 0:M.value:a==null||(A=a.find(J=>{var ee;return mr(J.token.contractAddress,((ee=b.contractInfo)==null?void 0:ee.address)||$t)&&J.token.chainId===t.chainId}))==null||(A=A.price)==null?void 0:A.value,V=(parseFloat(q)*(f*(W||0))).toFixed(2);return g.createElement(z,{key:F,width:"full",flexDirection:"row",gap:"2",justifyContent:"space-between",alignItems:"center"},g.createElement(z,{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:"2",height:"12",borderRadius:"md",background:"buttonGlass",padding:"2",style:{flexBasis:"100%"}},g.createElement(bu,{imageUrl:K,size:20}),g.createElement(z,{gap:"0.5",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},g.createElement(oe,{fontWeight:"bold",fontSize:"xsmall",color:"text100"},`${_} ${Y}`),h?g.createElement(Lt,{width:"44px",height:"12px"}):g.createElement(oe,{fontWeight:"bold",fontSize:"xsmall",color:"text50"},W?`${i.sign}${V}`:""))),g.createElement(V6,{color:"text50",style:{width:"16px"}}),g.createElement(z,{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:"2",height:"12",borderRadius:"md",background:"buttonGlass",padding:"2",style:{flexBasis:"100%"}},g.createElement(Pu,{address:L,style:{width:"20px"}}),g.createElement(oe,{fontWeight:"bold",fontSize:"xsmall",color:"text100"},j)))}))};return g.createElement(z,{padding:"5",paddingTop:"3",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",marginTop:"5"},g.createElement(z,{marginTop:"6",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"1"},g.createElement(oe,{fontSize:"normal",fontWeight:"medium"},"Transaction details"),g.createElement(oe,{marginBottom:"1",fontSize:"small",fontWeight:"medium",color:"text50"},m),g.createElement(_p,{chainId:t.chainId})),g.createElement(z,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"4",width:"full",padding:"4",background:"backgroundSecondary",borderRadius:"md"},g.createElement(z,{width:"full",gap:"1",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},g.createElement(oe,{fontSize:"normal",fontWeight:"medium",color:"text50"},"Transfer"),g.createElement(ar,{width:"3",src:p.logoURI,alt:"network logo"})),(r=t.transfers)==null?void 0:r.map((b,E)=>g.createElement(z,{width:"full",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"4",key:`transfer-${E}`},g.createElement(y,{transfer:b})))),g.createElement(nt,{onClick:v,width:"full",borderRadius:"md",rightIcon:Vle,label:`View on ${p.blockExplorerName}`}),g.createElement(z,null,g.createElement(z,{width:"full",flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"flex-start"},g.createElement(o1,{width:"full",margin:"0",style:{marginBottom:"-4px"}}),g.createElement(oe,{color:"text50",fontSize:"normal",fontWeight:"medium"},"Status"),g.createElement(oe,{fontSize:"normal",fontWeight:"medium",color:"text100"},"Complete")),g.createElement(z,{width:"full",flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"flex-start"},g.createElement(o1,{width:"full",margin:"0",style:{marginBottom:"-4px"}}),g.createElement(oe,{color:"text50",fontSize:"normal",fontWeight:"medium"},"Transaction Hash"),g.createElement(oe,{color:"text100",fontSize:"normal",fontWeight:"medium",style:{overflowWrap:"anywhere"}},t.txnHash),g.createElement(cW,{marginTop:"2",buttonVariant:"with-label",text:t.txnHash}))))},mSe=w.forwardRef(({onClickAccount:t},e)=>{const{address:r}=mn();return g.createElement(z,{gap:"2",alignItems:"center"},g.createElement(z,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center"},g.createElement(z,{onClick:t,gap:"2",alignItems:"center",justifyContent:"center",className:xo,position:"relative",ref:e},g.createElement(Pu,{size:"sm",address:r||""}),g.createElement(oe,{color:"text100",fontWeight:"medium",variant:"normal"},Yq(r||"")),g.createElement(JC,{color:"text100"}))))}),vSe=w.forwardRef(({setOpenWalletDropdown:t},e)=>{const{setNavigation:r}=Mi(),{setOpenWalletModal:n}=Ap(),{address:i}=mn(),{disconnect:s}=ez(),{theme:o}=kp(),a=()=>{t(!1),r({location:"receive"})},c=()=>{t(!1),r({location:"history"})},l=()=>{t(!1),r({location:"settings"})},u=()=>{n(!1),t(!1),s()},f=()=>{switch(o){case"dark":return"rgba(38, 38, 38, 0.85)";case"light":return"rgba(217, 217, 217, 0.85)";default:return Re.colors.transparent}};return g.createElement(z,{padding:"3",ref:e,zIndex:"30",borderRadius:"md",style:{position:"relative",pointerEvents:"auto",width:"370px",backdropFilter:"blur(12.5px)",top:"16px",left:"15px",background:f()}},g.createElement(z,{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},g.createElement(z,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"3",marginLeft:"2",color:"text100"},g.createElement(Pu,{style:{width:"28px"},size:"md",address:i||""}),g.createElement(oe,{fontSize:"large",style:{fontWeight:"700"},color:"text100"},Yq(i||"")),g.createElement(cW,{buttonVariant:"icon",size:"md",text:i||"",color:"text100",style:{marginLeft:"-16px"}})),g.createElement(_o,{onClick:()=>t(!1),size:"xs",background:"buttonGlass",icon:Au})),g.createElement(z,{gap:"2",marginTop:"3",flexDirection:"column"},g.createElement(nt,{variant:"glass",style:{borderRadius:Re.radii.md},width:"full",leftIcon:Xle,label:"Receive",onClick:a}),g.createElement(nt,{style:{borderRadius:Re.radii.md},width:"full",leftIcon:Wj,label:"History",onClick:c}),g.createElement(nt,{style:{borderRadius:Re.radii.md},width:"full",leftIcon:zj,label:"Settings",onClick:l}),g.createElement(nt,{label:"Sign Out",style:{borderRadius:Re.radii.md},width:"full",leftIcon:qj,onClick:u})))});Ro("packages/wallet/src/shared/WalletHeader/styles.css.ts","kit");const ySe=Fr({":focus-visible":{boxShadow:"none"}},"searchButton");$o();const Bw=({})=>{const{openWalletModalState:t}=Ap(),[e,r]=w.useState(!1),{goBack:n,history:i,setNavigation:s}=Mi(),o=w.useRef(!1);w.useEffect(()=>{t||r(!1)},[t]),w.useEffect(()=>{e?o.current?r(!1):o.current=!0:o.current=!1},[i.length,e]);const a=()=>{r(!0)},c=()=>{n()},l=()=>{s({location:"search"})};return g.createElement(z,{as:_c.div},g.createElement(U4e,{open:e},g.createElement(z4e,null),g.createElement(z,{background:"backgroundPrimary",zIndex:"20",position:"fixed",flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"full",style:{height:Ni,paddingTop:"6px"}},i.length>0?g.createElement(_o,{onClick:c,icon:Ib,style:{backgroundColor:Re.colors.backgroundPrimary,width:"44px"}}):g.createElement(_o,{onClick:l,icon:Ob,className:ySe,style:{backgroundColor:Re.colors.backgroundPrimary,width:"44px"}}),g.createElement(q4e,{asChild:!0},g.createElement(mSe,{onClickAccount:a})),g.createElement(z,{style:{width:"44px"}})),g.createElement(hd,null,e&&g.createElement(W4e,{asChild:!0,side:"bottom",align:"start"},g.createElement(vSe,{setOpenWalletDropdown:r})))))},Gs=({secondaryText:t,primaryText:e})=>{const{goBack:r,history:n}=Mi(),i=()=>{r()};return g.createElement(z,{background:"backgroundPrimary",zIndex:"20",position:"fixed",width:"full",flexDirection:"row",alignItems:"center",justifyContent:"space-between",style:{height:Ni,paddingTop:"6px",backgroundColor:Re.colors.backgroundPrimary}},n.length>0?g.createElement(_o,{onClick:i,icon:Ib,size:"sm",style:{background:"rgba(0,0,0,0)",width:"44px"}}):g.createElement(z,null),g.createElement(z,null,g.createElement(oe,{fontWeight:"medium",variant:"small",color:"text50"},t),g.createElement(oe,{fontWeight:"medium",variant:"small",color:"text100"},e)),g.createElement(z,{style:{width:"44px"}}))},CI=t=>{const{location:e}=t;switch(e){case"send-coin":return g.createElement(K7e,{chainId:t.params.chainId,contractAddress:t.params.contractAddress});case"send-collectible":return g.createElement(Y7e,{chainId:t.params.chainId,contractAddress:t.params.contractAddress,tokenId:t.params.tokenId});case"receive":return g.createElement(G7e,null);case"history":return g.createElement(J7e,null);case"search":return g.createElement(X7e,null);case"search-view-all":return g.createElement(Z7e,{defaultTab:t.params.defaultTab});case"settings":return g.createElement(eSe,null);case"settings-general":return g.createElement(tSe,null);case"settings-currency":return g.createElement(iSe,null);case"settings-networks":return g.createElement(sSe,null);case"coin-details":return g.createElement(cSe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId});case"collectible-details":return g.createElement(dSe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId,tokenId:t.params.tokenId});case"collection-details":return g.createElement(uSe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId});case"transaction-details":return g.createElement(pSe,{transaction:t.params.transaction});case"home":default:return g.createElement(V7e,null)}},gSe=t=>{const{location:e}=t;switch(e){case"search":return g.createElement(Gs,{primaryText:"Search wallet"});case"search-view-all":return g.createElement(Gs,{secondaryText:"Search wallet / ",primaryText:"View all"});case"settings":return g.createElement(Gs,{secondaryText:"Wallet / ",primaryText:"Settings"});case"settings-general":return g.createElement(Gs,{secondaryText:"Wallet / Settings / ",primaryText:"General"});case"settings-currency":return g.createElement(Gs,{secondaryText:"Wallet / Settings / ",primaryText:"Currency"});case"settings-networks":return g.createElement(Gs,{secondaryText:"Wallet / Settings / ",primaryText:"Networks"});case"receive":return g.createElement(Gs,{secondaryText:"Wallet / ",primaryText:"Receive"});case"history":return g.createElement(Gs,{secondaryText:"Wallet / ",primaryText:"History"});case"coin-details":return g.createElement(Bw,null);case"collectible-details":return g.createElement(Bw,null);case"transaction-details":return g.createElement(Gs,{secondaryText:"",primaryText:""});case"send-collectible":case"send-coin":return g.createElement(Gs,{secondaryText:"Wallet / ",primaryText:"Send"});case"home":default:return g.createElement(Bw,null)}},bSe={location:"home"},xSe=t=>{const e=new W4;return g.createElement(G4,{client:e},g.createElement(wSe,t))},wSe=({children:t})=>{const{theme:e,position:r}=kp(),[n,i]=w.useState(!1),[s,o]=w.useState([]),a=s.length>0?s[s.length-1]:bSe,c=a.location==="home"||a.location==="collection-details"||a.location==="collectible-details"||a.location==="coin-details"||a.location==="history"||a.location==="search"||a.location==="search-view-all"||a.location==="settings-currency";return w.useEffect(()=>{n&&o([])},[n]),g.createElement(p7e,{value:{setOpenWalletModal:i,openWalletModalState:n}},g.createElement(M7e,{value:{setHistory:o,history:s}},g.createElement("div",{id:"kit-provider"},g.createElement(Bb,{root:"#kit-provider",scope:"kit",theme:e},g.createElement(hd,null,n&&g.createElement(Wy,{contentProps:{style:kn({maxWidth:"400px",height:"fit-content"},xg(r))},scroll:!1,backdropColor:"backgroundBackdrop",onClose:()=>i(!1)},g.createElement(z,{className:k9,id:"sequence-kit-wallet-content"},gSe(a),c?g.createElement(UB,{className:W7e,style:{paddingTop:Ni,height:"min(800px, 80vh)"}},CI(a)):CI(a)))))),t))};var ESe=()=>typeof window<"u"&&window.localStorage.getItem("IS_PAPER_DEV")==="true",CSe=()=>typeof window<"u"&&window.location.origin.includes("paper.xyz"),SSe=()=>typeof window<"u"&&window.location.origin.includes("thirdweb.com"),lW=()=>{var t;return ESe()?(t=window.localStorage.getItem("PAPER_DEV_URL"))!=null?t:"http://localhost:3000":CSe()||SSe()?window.location.origin:"https://withpaper.com"},uW={colorPrimary:"#cf3781",colorBackground:"#ffffff",colorText:"#1a202c",borderRadius:12,fontFamily:"Open Sans"},kSe=Object.defineProperty,ASe=Object.defineProperties,_Se=Object.getOwnPropertyDescriptors,SI=Object.getOwnPropertySymbols,PSe=Object.prototype.hasOwnProperty,ISe=Object.prototype.propertyIsEnumerable,kI=(t,e,r)=>e in t?kSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Gn=(t,e)=>{for(var r in e||(e={}))PSe.call(e,r)&&kI(t,r,e[r]);if(SI)for(var r of SI(e))ISe.call(e,r)&&kI(t,r,e[r]);return t},AI=(t,e)=>ASe(t,_Se(e)),TSe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),fW=TSe((t,e)=>{e.exports={name:"@paperxyz/js-client-sdk",description:"Paper JS SDK for Checkout Elements",version:"0.2.7",license:"Apache-2.0",main:"dist/index.js",module:"dist/index.mjs",types:"dist/index.d.ts",files:["dist/**"],bugs:{url:"https://github.com/paperxyz/js-sdk/issues"},homepage:"https://github.com/paperxyz/js-sdk",repository:{type:"git",url:"git+https://github.com/paperxyz/js-sdk.git"},author:"Paper ",scripts:{build:"tsup src/index.ts --env.NODE_ENV production","build-package-checkout":"yarn build","dev-checkout":"tsup src/index.ts --env.NODE_ENV development --watch",lint:'eslint "src/**/*.ts*"',"lint:fix":"yarn lint --fix",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",prepare:"cd ../../ && node ./scripts/postInstall && cd ./packages/js-client-sdk"},keywords:[],devDependencies:{"@paperxyz/tsconfig":"*","eslint-config-paperxyz":"*",typescript:"^4.7.4"},dependencies:{"@paperxyz/sdk-common-utilities":"*",ethers:"^5.7.2"},publishConfig:{access:"public"}}}),dW=lW(),OSe="/sdk/2022-08-12/checkout-with-card",RSe=(t=>(t.UserAbandonedCheckout="User abandoned the checkout",t.UserLoginFailed="User login failed",t.InvalidProps="The props you passed in to this component are not valid.",t.InvalidCard="The card information is invalid. Please double check that the Card, CVC, and Zip code are all correct.",t.EmailNotVerified="The email was unable to be verified.",t.NotEnoughSupply="There is not enough supply to claim.",t.AddressNotAllowed="This address is not on the allowlist.",t.NoActiveClaimPhase="There is no active claim phase at the moment.",t))(RSe||{}),$Se=(t=>(t.ErrorConnectingToWallet="Error connecting to wallet",t.ErrorSendingTransaction="Something went wrong sending transaction",t.InsufficientBalance="Insufficient ETH",t.TransactionCancelled="Transaction Cancelled",t.WrongChain="Wrong Chain Detected",t.ChainSwitchUnderway="There is a network switch already underway",t.PendingSignature="Pending Signature",t))($Se||{}),MSe=class{constructor(t){this.link=t}addStylingOptions(t){t.colorPrimary&&this.link.searchParams.set("colorPrimary",t.colorPrimary),t.colorBackground&&this.link.searchParams.set("colorBackground",t.colorBackground),t.colorText&&this.link.searchParams.set("colorText",t.colorText),t.borderRadius!==void 0&&this.link.searchParams.set("borderRadius",t.borderRadius.toString()),t.fontFamily&&this.link.searchParams.set("fontFamily",t.fontFamily),t.inputBackgroundColor&&this.link.searchParams.set("inputBackgroundColor",t.inputBackgroundColor),t.inputBorderColor&&this.link.searchParams.set("inputBorderColor",t.inputBorderColor)}addClientSecret(t){this.link.searchParams.set("sdkClientSecret",t)}addLocale(t){t&&this.link.searchParams.set("locale",t.toString())}addOTP(){this.link.searchParams.set("withOTP","true")}addAppName(t){t&&this.link.searchParams.set("appName",t)}addShowConnectWalletOptions(t){this.link.searchParams.append("showConnectWalletOptions",t.toString())}addReceivingWalletType(t){this.link.searchParams.append("walletType",t||"Preset")}addRecipientWalletAddress(t){this.link.searchParams.set("recipientWalletAddress",t)}addPayerWalletAddress(t){this.link.searchParams.append("payerWalletAddress",t)}addDate(t){this.link.searchParams.set("date",t?t.toString():Date.now().toString())}getLink(){return this.link}},NSe=({url:t,width:e=440,height:r=700})=>{if(!(window!=null&&window.top))return null;let n=window.top.outerHeight/2+window.top.screenY-r/2,i=window.top.outerWidth/2+window.top.screenX-e/2;return window.open(t,"_blank",`popup=true,width=${e},height=${r},top=${n},left=${i}`)};function _I(t,e,r){var n;(n=t.contentWindow)==null||n.postMessage(Gn({eventType:e},r),"*")}var DSe=fW(),LSe=class{constructor({elementOrId:e,onLoad:r}){this.elementOrId=e,this.onLoad=r}createPaymentElement({handler:e,link:r,iframeId:n}){let i=document.createElement("iframe");if(i.src=r.href,i.id=n,i.allow="payment",i.setAttribute("style","margin-left:auto; margin-right:auto; width:100%; height: 100%; min-height:375px; transition-property:all; transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1); transition-duration:150ms; color-scheme: light;"),i.onload=a=>{this.onLoad&&this.onLoad(a)},i.setAttribute("data-paper-sdk-version",`@paperxyz/js-client-sdk@${DSe.version}`),!this.elementOrId)return window.addEventListener("message",e(i)),i;let s=this.elementOrId;if(typeof s=="string"){let a=document.getElementById(s);if(!a)throw new Error("Invalid id given");s=a}let o=s.querySelector("#"+n);return o?(o.src===r.href||(o.src=r.href),o):(window.addEventListener("message",e(i)),s.appendChild(i))}},PI={top:"0px",left:"0px",right:"0px",bottom:"0px"},jSe=()=>({main:AI(Gn({},PI),{position:"fixed",zIndex:"10000",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"auto"}),overlay:AI(Gn({},PI),{position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.33)",pointerEvents:"auto"}),body:{background:"transparent",borderRadius:"12px",position:"relative",overflow:"hidden",width:"100%",maxWidth:"500px",height:"700px",maxHeight:"80%",animation:"pew-modal-slideIn 0.2s forwards",pointerEvents:"auto"},spinner:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0",margin:"auto",borderWidth:"3px",borderColor:"#2D3748 #2D3748 transparent transparent",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite"},iframe:{position:"relative",height:"100%",width:"100%",border:"none",background:"transparent"}}),BSe=` - @keyframes pew-modal-slideIn { - from {opacity: 0; transform: translate3d(0, 20px, 0);} - to {opacity: 1; transform: translate3d(0, 0, 0);} - } - - @keyframes pew-modal-slideOut { - from {opacity: 1; transform: translate3d(0, 0, 0);} - to {opacity: 0; transform: translate3d(0, 20px, 0);} - } - - @keyframes spin { - to { transform: rotate(360deg); } - } -`,Nh="paper-js-sdk-modal",FSe=class{constructor(t,e){this.styles=jSe(),this.container=t||document.body,e&&this.mergeStyles(e),this.main=document.createElement("div"),this.main.id=Nh,this.overlay=document.createElement("div"),this.overlay.id=`${Nh}-overlay`,this.body=document.createElement("div"),this.body.id=`${Nh}-body`,this.spinner=document.createElement("div"),this.spinner.id=`${Nh}-spinner`,this.iframe=document.createElement("iframe"),this.iframe.id=`${Nh}-iframe`,this.iframe.allow="camera; microphone; payment",this.style=document.createElement("style"),this.style.innerHTML=BSe,this.assignStyles(this.main,this.styles.main),this.assignStyles(this.overlay,this.styles.overlay),this.assignStyles(this.body,this.styles.body),this.assignStyles(this.spinner,this.styles.spinner),this.assignStyles(this.iframe,this.styles.iframe)}open({iframeUrl:t}={}){t&&(this.body.appendChild(this.spinner),this.iframe.src=t,this.iframe.onload=()=>this.body.removeChild(this.spinner),this.body.appendChild(this.iframe)),this.addAccessibility(),this.main.appendChild(this.overlay),this.main.appendChild(this.style),this.main.appendChild(this.body),this.container.appendChild(this.main),document.body.style.overflow="hidden"}close(){this.body.style.animation="pew-modal-slideOut 0.2s forwards",window.setTimeout(()=>this.main.remove(),250)}mergeStyles(t){this.styles.body=Gn(Gn({},this.styles.body),t.body||{}),this.styles.spinner=Gn(Gn({},this.styles.spinner),t.spinner||{}),this.styles.overlay=Gn(Gn({},this.styles.overlay),t.overlay||{}),this.styles.main=Gn(Gn({},this.styles.main),t.main||{}),this.styles.iframe=Gn(Gn({},this.styles.iframe),t.iframe||{})}addAccessibility(){this.main.setAttribute("aria-hidden","true"),this.overlay.setAttribute("aria-hidden","true"),this.body.setAttribute("aria-modal","true"),this.body.setAttribute("role","dialog")}assignStyles(t,e){Object.assign(t.style,e)}};function USe({sdkClientSecret:t,appName:e,options:r=Gn({},uW),locale:n,configs:i}){let s=new URL(OSe,dW),o=t;if(!o&&i&&(o=btoa(JSON.stringify(i))),!o){let c="/error?errorMessage=Must have either sdkClientSecret or configs field set. Received neither",l=lW();return new URL(c,l)}let a=new MSe(s);return a.addClientSecret(o??""),a.addStylingOptions(r),a.addLocale(n),a.addAppName(e),a.getLink()}function zSe({iframe:t,onError:e,onReview:r,onPaymentSuccess:n,onBeforeModalOpen:i,onPriceUpdate:s}){let o;return a=>{if(!a.origin.startsWith(dW))return;let{data:c}=a;switch(c.eventType){case"checkoutWithCardError":e&&e({code:c.code,error:c.error});break;case"paymentSuccess":n&&n({transactionId:c.id,id:c.id}),c.postToIframe&&_I(t,c.eventType,c);break;case"reviewComplete":r&&r({id:c.id,cardholderName:c.cardholderName});break;case"openModalWithUrl":i&&c.url&&c.url.includes("promptKYCModal")?i({url:c.url}):(o=new FSe(void 0,{body:{colorScheme:"light"}}),o.open({iframeUrl:c.url}));break;case"completedSDKModal":o.close(),c.postToIframe&&_I(t,c.eventType,c);break;case"requestedPopup":{NSe({url:c.url,width:c.width,height:c.height})||console.error("CheckoutWithCard: Unable to open popup.");break}case"sizing":t.style.height=c.height+"px",t.style.maxHeight=c.height+"px";break;case"onPriceUpdate":{s==null||s(c);break}}}}function qSe({onCloseKycModal:t,onOpenKycModal:e,sdkClientSecret:r,appName:n,elementOrId:i,onLoad:s,onError:o,locale:a,options:c,onPaymentSuccess:l,onReview:u,onBeforeModalOpen:f,onPriceUpdate:d,useAltDomain:h=!0,configs:p}){let m="checkout-with-card-iframe",v=b=>zSe({iframe:b,onCloseKycModal:t,onOpenKycModal:e,onError:o,onPaymentSuccess:l,onReview:u,onBeforeModalOpen:f,onPriceUpdate:d,useAltDomain:h}),y=USe({sdkClientSecret:r,appName:n,locale:a,options:c,useAltDomain:h,configs:p});return new LSe({onLoad:s,elementOrId:i}).createPaymentElement({handler:v,iframeId:m,link:y})}fW();function WSe(t){if(t.sheet)return t.sheet;for(var e=0;e0?an(nh,--ui):0,Sd--,jr===10&&(Sd=1,P2--),jr}function Si(){return jr=ui2||D1(jr)>3?"":" "}function nke(t,e){for(;--e&&Si()&&!(jr<48||jr>102||jr>57&&jr<65||jr>70&&jr<97););return Pp(t,Ev()+(e<6&&wo()==32&&Si()==32))}function nE(t){for(;Si();)switch(jr){case t:return ui;case 34:case 39:t!==34&&t!==39&&nE(jr);break;case 40:t===41&&nE(t);break;case 92:Si();break}return ui}function ike(t,e){for(;Si()&&t+jr!==57;)if(t+jr===84&&wo()===47)break;return"/*"+Pp(e,ui-1)+"*"+_2(t===47?t:Si())}function ske(t){for(;!D1(wo());)Si();return Pp(t,ui)}function oke(t){return gW(Sv("",null,null,null,[""],t=yW(t),0,[0],t))}function Sv(t,e,r,n,i,s,o,a,c){for(var l=0,u=0,f=o,d=0,h=0,p=0,m=1,v=1,y=1,b=0,E="",S=i,P=s,R=n,L=E;v;)switch(p=b,b=Si()){case 40:if(p!=108&&an(L,f-1)==58){rE(L+=xt(Cv(b),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:L+=Cv(b);break;case 9:case 10:case 13:case 32:L+=rke(p);break;case 92:L+=nke(Ev()-1,7);continue;case 47:switch(wo()){case 42:case 47:$m(ake(ike(Si(),Ev()),e,r),c);break;default:L+="/"}break;case 123*m:a[l++]=ro(L)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+u:y==-1&&(L=xt(L,/\f/g,"")),h>0&&ro(L)-f&&$m(h>32?TI(L+";",n,r,f-1):TI(xt(L," ","")+";",n,r,f-2),c);break;case 59:L+=";";default:if($m(R=II(L,e,r,l,u,i,a,E,S=[],P=[],f),s),b===123)if(u===0)Sv(L,e,R,R,S,s,f,a,P);else switch(d===99&&an(L,3)===110?100:d){case 100:case 108:case 109:case 115:Sv(t,R,R,n&&$m(II(t,R,R,0,0,i,a,E,i,S=[],f),P),i,P,f,a,n?S:P);break;default:Sv(L,R,R,R,[""],P,0,a,P)}}l=u=h=0,m=y=1,E=L="",f=o;break;case 58:f=1+ro(L),h=p;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&tke()==125)continue}switch(L+=_2(b),b*m){case 38:y=u>0?1:(L+="\f",-1);break;case 44:a[l++]=(ro(L)-1)*y,y=1;break;case 64:wo()===45&&(L+=Cv(Si())),d=wo(),u=f=ro(E=L+=ske(Ev())),b++;break;case 45:p===45&&ro(L)==2&&(m=0)}}return s}function II(t,e,r,n,i,s,o,a,c,l,u){for(var f=i-1,d=i===0?s:[""],h=T9(d),p=0,m=0,v=0;p0?d[y]+" "+b:xt(b,/&\f/g,d[y])))&&(c[v++]=E);return I2(t,e,r,i===0?P9:a,c,l,u)}function ake(t,e,r){return I2(t,e,r,hW,_2(eke()),N1(t,2,-2),0)}function TI(t,e,r,n){return I2(t,e,r,I9,N1(t,0,n),N1(t,n+1,-1),n)}function Yf(t,e){for(var r="",n=T9(t),i=0;i6)switch(an(t,e+1)){case 109:if(an(t,e+4)!==45)break;case 102:return xt(t,/(.+:)(.+)-([^]+)/,"$1"+bt+"$2-$3$1"+kg+(an(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~rE(t,"stretch")?bW(xt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(an(t,e+1)!==115)break;case 6444:switch(an(t,ro(t)-3-(~rE(t,"!important")&&10))){case 107:return xt(t,":",":"+bt)+t;case 101:return xt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+bt+(an(t,14)===45?"inline-":"")+"box$3$1"+bt+"$2$3$1"+bn+"$2box$3")+t}break;case 5936:switch(an(t,e+11)){case 114:return bt+t+bn+xt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return bt+t+bn+xt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return bt+t+bn+xt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return bt+t+bn+t+t}return t}var yke=function(e,r,n,i){if(e.length>-1&&!e.return)switch(e.type){case I9:e.return=bW(e.value,e.length);break;case pW:return Yf([Dh(e,{value:xt(e.value,"@","@"+bt)})],i);case P9:if(e.length)return ZSe(e.props,function(s){switch(XSe(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Yf([Dh(e,{props:[xt(s,/:(read-\w+)/,":"+kg+"$1")]})],i);case"::placeholder":return Yf([Dh(e,{props:[xt(s,/:(plac\w+)/,":"+bt+"input-$1")]}),Dh(e,{props:[xt(s,/:(plac\w+)/,":"+kg+"$1")]}),Dh(e,{props:[xt(s,/:(plac\w+)/,bn+"input-$1")]})],i)}return""})}},gke=[yke],bke=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(m){var v=m.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var i=e.stylisPlugins||gke,s={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(m){for(var v=m.getAttribute("data-emotion").split(" "),y=1;ye in t?Oke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Mke=(t,e)=>{for(var r in e||(e={}))Rke.call(e,r)&&jI(t,r,e[r]);if(LI)for(var r of LI(e))$ke.call(e,r)&&jI(t,r,e[r]);return t},Nke=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),R9=Nke((t,e)=>{e.exports={name:"@paperxyz/react-client-sdk",version:"1.1.5",description:"Paper React Client SDK for Checkout Elements",license:"Apache-2.0",main:"dist/index.js",types:"./dist/index.d.ts",type:"module",files:["dist/**"],exports:{".":{import:"./dist/index.js",types:"./dist/index.d.ts"}},bugs:{url:"https://github.com/paperxyz/js-sdk/issues"},homepage:"https://github.com/paperxyz/js-sdk",repository:{type:"git",url:"git+https://github.com/paperxyz/js-sdk.git"},author:"Paper ",keywords:[],scripts:{build:"tsup-node src/index.ts --env.NODE_ENV production --env.ESM_ONLY true ","build-package-checkout":"yarn build","dev-checkout":"tsup-node src/index.ts --env.NODE_ENV development --watch --env.ESM_ONLY true",lint:'eslint "src/**/*.ts*"',"lint:fix":"yarn lint --fix",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",prepare:"cd ../../ && node ./scripts/postInstall && cd ./packages/react-client-sdk"},peerDependencies:{react:">=16.0.0","react-dom":">=16.0.0"},devDependencies:{"@paperxyz/tsconfig":"*","@types/react":"18.0.26","eslint-config-paperxyz":"*",react:"^18.2.0","react-dom":"^18.2.0",typescript:"^4.7.4"},dependencies:{"@emotion/css":"11.10.5","@headlessui/react":"1.7.6","@paperxyz/js-client-sdk":"*","@paperxyz/sdk-common-utilities":"*"}}}),Dke=w.createContext({chainName:"Polygon",setChainName:()=>{},clientId:"",appName:""}),Lke=()=>w.useContext(Dke);qs` - opacity: 0; -`;qs` - opacity: 1; -`;var jke=qs` - position: relative; - width: 100%; - height: 100%; -`;qs` - display: grid; - position: relative; - width: 100%; -`;qs` - transition-delay: 150ms; - transition-property: opacity; - transition-duration: 75ms; -`;qs` - transition-property: opacity; - transition-duration: 150ms; -`;qs` - background-color: transparent; - grid-column-start: 1; - grid-row-start: 1; -`;var Bke=({className:t})=>pe.jsx("div",{id:"loader",className:Ike(Uke,t)}),Fke=Tke` - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -`,Uke=qs` - border: 0.15rem solid #f3f3f300; - border-top: 0.15rem solid #000000; - border-left: 0.15rem solid #000000; - border-radius: 50%; - width: 4rem; - height: 4rem; - animation: ${Fke} 1s linear infinite; -`,zke=()=>pe.jsx("div",{className:qke,children:pe.jsx(Bke,{className:Wke})}),qke=qs` - position: absolute; - top: 50%; - left: 50%; - transform: translate3d(-50%, -50%, 0); -`,Wke=qs` - color: #000000; - width: 2rem; - height: 2rem; -`,Hke=R9(),Vke=({sdkClientSecret:t,appName:e,options:r=Mke({},uW),onPaymentSuccess:n,onReview:i,onError:s,onBeforeModalOpen:o,onPriceUpdate:a,locale:c,configs:l})=>{let{appName:u}=Lke(),[f,d]=w.useState(!0),h=w.useCallback(()=>{d(!1)},[]),p=w.useRef(null),m=e||u;return w.useEffect(()=>{let v=setTimeout(()=>{d(!1)},1e3);return()=>{clearTimeout(v)}},[]),w.useEffect(()=>{p.current&&qSe({sdkClientSecret:t,appName:m,elementOrId:p.current,locale:c,onError:s,onLoad:h,onPaymentSuccess:n,onReview:i,onBeforeModalOpen:o,onPriceUpdate:a,options:r,configs:l})},[p.current]),pe.jsx(pe.Fragment,{children:pe.jsx("div",{className:jke,ref:p,"data-paper-sdk-version":`@paperxyz/react-client-sdk@${Hke.version}`,children:f&&pe.jsx(zke,{})})})};qs` - padding-top: 0.625rem; - padding-bottom: 0.625rem; - padding-left: 1.25rem; - padding-right: 1.25rem; - background-color: #1f2937; - color: #ffffff; - font-size: 0.875rem; - line-height: 1.25rem; - font-weight: 600; - justify-content: flex-start; - align-items: center; - border-radius: 0.5rem; - border: none; - cursor: pointer; -`;R9();R9();var Gke=(t=>(t.THIRDWEB_NFT_DROP_V2="THIRDWEB_NFT_DROP_V2",t.THIRDWEB_EDITION_DROP_V2="THIRDWEB_EDITION_DROP_V2",t.THIRDWEB_SIGNATURE="THIRDWEB_SIGNATURE",t.CANDY_MACHINE="CANDY_MACHINE",t.AUCTION_HOUSE="AUCTION_HOUSE",t))(Gke||{}),Kke=(t=>(t.POPUP="POPUP",t.NEW_TAB="NEW_TAB",t.MODAL="MODAL",t.DRAWER="DRAWER",t.EMBED="EMBED",t))(Kke||{});const[Yke,Qke]=rh(),Ip=()=>{const{triggerCheckout:t,closeCheckout:e,settings:r}=Yke();return{triggerCheckout:t,closeCheckout:e,settings:r}};function xu(){return xu=Object.assign?Object.assign.bind():function(t){for(var e=1;et.toLowerCase()===e.toLowerCase();var tc=function(t){return t[t.VERY_LARGE=0]="VERY_LARGE",t[t.FRACTION=1]="FRACTION",t[t.VERY_TINY=2]="VERY_TINY",t[t.MIXED=3]="MIXED",t}(tc||{});const iE=t=>{if(isNaN(Number(t)))return console.error(`display format error ${t} is not a number`),"NaN";const e=Number(t);if(e===0)return"0";let r;e>1e8?r=tc.VERY_LARGE:e<1e-10?r=tc.VERY_TINY:e<1?r=tc.FRACTION:r=tc.MIXED;let n,i;switch(r){case tc.VERY_LARGE:n="compact",i={maximumFractionDigits:4};break;case tc.VERY_TINY:n="scientific",i={maximumFractionDigits:4};break;case tc.FRACTION:n="standard",i={maximumSignificantDigits:4};break;default:n="standard",i={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",xu({notation:n},i)).format(e)},Jke=t=>t.charAt(0).toUpperCase()+t.slice(1),Xke=t=>t.chainId===1?"Ethereum":Jke(t.name),Zke=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=ur(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:$t,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:Ki.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},eAe=async({accountAddress:t,chainId:e,verifiedOnly:r})=>{try{const{indexerClient:n}=ur(e),i=await n.getTokenBalances({accountAddress:t,includeMetadata:!0,metadataOptions:{verifiedOnly:r??!0}});return(i==null?void 0:i.balances)||[]}catch(n){return console.error(n),[]}},tAe=async({accountAddress:t,chainId:e})=>{try{return(await Promise.all([Zke({accountAddress:t,chainId:e}),eAe({accountAddress:t,chainId:e})])).flat()}catch(r){return console.error(r),[]}},rAe=async({chainId:t,tokenId:e,contractAddress:r})=>{const{metadataClient:n}=ur(t);return(await n.getTokenMetadata({chainID:String(t),contractAddress:r,tokenIDs:[e]})).tokenMetadata[0]},nAe=async({chainID:t,contractAddress:e})=>{const{metadataClient:r}=ur(t);return(await r.getContractInfo({chainID:t,contractAddress:e})).contractInfo},iAe=async({chainId:t,email:e,contractAddress:r,abi:n,receiptTitle:i,collectionContractAddress:s,methodArguments:o,currency:a,currencyAmount:c,methodName:l,recipientAddress:u})=>{const{network:f,apiClient:d}=await ur(t),h=Xke(f),p=JSON.stringify(xu({title:i,email:e,limitPerTransaction:1,quantity:1,mintMethod:{args:o,payment:{currency:a,value:`${c} * $QUANTITY`},name:l},walletAddress:u},s?{contractArgs:{collectionContractAddress:s}}:{})),{secret:m}=await d.paperSessionSecret2({chainName:h,contractAddress:r,abi:n,paramsJson:p});return m},$9={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},sAe=t=>pn({queryKey:["balances",t],queryFn:()=>tAe(t),retry:!0,staleTime:10*$9.oneMinute,enabled:!!t.chainId&&!!t.accountAddress}),oAe=t=>pn({queryKey:["useTokenMetadata",t],queryFn:()=>rAe(t),retry:!0,staleTime:10*$9.oneMinute,enabled:!!t.chainId&&!!t.contractAddress}),EW=t=>pn({queryKey:["useContractInfo",t],queryFn:()=>nAe(t),retry:!0,staleTime:60*$9.oneMinute,enabled:!!t.chainID&&!!t.contractAddress}),[aAe,cAe]=rh(),lAe=({settings:t})=>{var e,r;const[n,i]=w.useState(!0),[s,o]=w.useState(((e=t.creditCardCheckout)==null?void 0:e.email)||""),[a,c]=w.useState(s),[l,u]=w.useState(null),[f,d]=w.useState(!1),{setNavigation:h}=ih(),p=()=>{n&&o(a||""),n||c(s),i(!n)},m=async()=>{d(!0);try{if(!s)throw"No email address found";if(!t.creditCardCheckout)throw"No credit card checkout settings found";const P=await iAe(xu({email:s},t.creditCardCheckout));u(P)}catch(P){console.error("Failed to fetch paper secret",P),h({location:"transaction-error",params:{error:P}})}d(!1)};w.useEffect(()=>{const P=setInterval(()=>{const R=document.getElementById("paper-js-sdk-modal");R&&(R.style.pointerEvents="visible")},100);return()=>{clearInterval(P)}},[]),w.useEffect(()=>{s!==""&&m()},[s]);const v=()=>/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/.test(a||""),y=P=>{c(P.target.value)},b=P=>{h({location:"transaction-pending",params:{transactionId:P}})},E=P=>{h({location:"transaction-error",params:{error:P}})},S=()=>n?g.createElement(z,{as:"form",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",onSubmit:p},g.createElement(z,{flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"2"},g.createElement(oe,{fontSize:"normal",fontWeight:"normal",color:"text50"},"Receipt email address"),g.createElement(cl,{autoFocus:!0,name:"email",type:"email",placeholder:"Email Address",value:a,onChange:y,"data-1p-ignore":!0})),g.createElement(nt,{size:"xs",label:"Save",leftIcon:Fd,disabled:!v(),type:"submit"})):g.createElement(z,{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},g.createElement(z,{flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"2"},g.createElement(oe,{fontSize:"normal",fontWeight:"normal",color:"text50"},"Receipt email address"),g.createElement(oe,{fontSize:"normal",fontWeight:"bold",color:"text100"},s)),g.createElement(nt,{size:"xs",label:"Edit",leftIcon:Wle,onClick:p}));return g.createElement(z,null,S(),f&&g.createElement(z,{width:"full",height:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",style:{height:"200px"}},g.createElement(Wc,{size:"lg",style:{width:"60px",height:"60px"}})),l&&!f&&g.createElement(un,{marginY:"4",flexDirection:"column"},g.createElement(Vke,{sdkClientSecret:l,appName:t==null||(r=t.creditCardCheckout)==null?void 0:r.receiptTitle,onReview:()=>{},onPaymentSuccess:P=>{b(P.id)},onError:P=>{console.error("Payment error:",P),E(P.error)},options:{colorPrimary:"#447dd1",colorText:"#ffffff",borderRadius:12}})))},M9="54px",uAe=()=>{const{settings:t}=Ip();return g.createElement(z,{paddingX:"4",paddingBottom:"8",gap:"4",flexDirection:"column",style:{marginTop:M9}},t&&g.createElement(lAe,{settings:t}))},fAe=10*1e3,dAe=()=>{const t=ih(),{params:{transactionId:e}}=t.navigation,{setNavigation:r}=t,n=`https://withpaper.com/api/v1/transaction-status/${e}`,i=async()=>{try{console.log("Polling for transaction status");const s=await fetch(n,{method:"GET",headers:{accept:"application/json"}}).then(c=>c.json()),o=s.result.status,a=s.result.transactionHash;if(console.log("transaction status poll response:",o),o==="PENDING")return;if(o==="TRANSFER_SUCCEEDED"){r&&r({location:"transaction-success",params:{transactionHash:a}});return}if(o==="TRANSFER_FAILED"||o==="PAYMENT_FAILED"){r&&r({location:"transaction-error",params:{error:new Error("Failed to transfer collectible")}});return}}catch(s){console.error("An error occurred while fetching the transaction status"),r&&r({location:"transaction-error",params:{error:s}})}};return w.useEffect(()=>{const s=setInterval(()=>{i()},fAe);return()=>{clearInterval(s)}},[]),g.createElement(z,{style:{height:"500px"}},g.createElement(z,{position:"absolute",top:"0",left:"0",width:"full",height:"full",flexDirection:"column",alignItems:"center",justifyContent:"center"},g.createElement(Wc,{size:"lg",style:{width:"60px",height:"60px"}}),g.createElement(oe,{variant:"medium",color:"text50",textAlign:"center",marginTop:"8"},"Transaction in progress. ",g.createElement("br",null),"This may take a few minutes.")))},hAe=()=>{const{closeCheckout:t,settings:e}=Ip(),n=ih().navigation;return w.useEffect(()=>{setTimeout(()=>{var i,s;t(),!(e==null||(i=e.creditCardCheckout)==null)&&i.onSuccess&&(e==null||(s=e.creditCardCheckout)==null||s.onSuccess(n.params.transactionHash))},3e3)},[]),g.createElement(z,{style:{height:"500px"}},g.createElement(z,{flexDirection:"column",alignItems:"center",position:"absolute",style:{top:"50%",right:"50%",transform:"translate(50%, -50%)"}},g.createElement(pAe,null),g.createElement(oe,{fontSize:"xlarge"},"Success!"),g.createElement(oe,{textAlign:"center",variant:"normal",color:"text80"},"The transaction was successful.")))},pAe=()=>g.createElement(z,{color:"white",background:"positive",alignItems:"center",justifyContent:"center",width:"16",height:"16",borderRadius:"circle",marginBottom:"2"},g.createElement(Fd,{size:"xl"})),mAe=()=>{const{closeCheckout:t,settings:e}=Ip(),n=ih().navigation;return w.useEffect(()=>{setTimeout(()=>{var i,s;t(),!(e==null||(i=e.creditCardCheckout)==null)&&i.onError&&(e==null||(s=e.creditCardCheckout)==null||s.onError(n.params.error))},3e3)},[]),g.createElement(z,{style:{height:"500px"}},g.createElement(z,{flexDirection:"column",alignItems:"center",position:"absolute",style:{top:"50%",right:"50%",transform:"translate(50%, -50%)"}},g.createElement(vAe,null),g.createElement(oe,{fontSize:"xlarge"},"Error"),g.createElement(oe,{textAlign:"center",variant:"normal",color:"text80"},"An error occurred while processing the transaction.")))},vAe=()=>g.createElement(z,{color:"white",alignItems:"center",justifyContent:"center",width:"16",height:"16",borderRadius:"circle",marginBottom:"2",background:"negative"},g.createElement(Au,{size:"xl"})),yAe=({size:t=30})=>g.createElement(z,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",style:{width:`${t}px`,height:`${t}px`}},g.createElement(oe,{style:{fontSize:`${t-4}px`},display:"inline-block",variant:"large",color:"textInverse100"},"?")),E0=({imageUrl:t,size:e=30})=>t?g.createElement(ar,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):g.createElement(yAe,{size:e});Ro("packages/checkout/src/shared/components/Skeleton/styles.css.ts","kit");const gAe=c9({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),bAe=Fr({height:"76px",backgroundColor:"#909090",animation:`${gAe} 2s ease-in-out infinite`},"skeleton");$o();const Pf=({width:t="100%",height:e="100%",borderRadius:r="md"})=>g.createElement(z,{className:bAe,borderRadius:r,style:{width:t,height:e}}),xAe=({contractAddress:t,tokenId:e,quantityRaw:r,chainId:n})=>{const{chains:i}=vt(),{data:s,isLoading:o}=oAe({chainId:n,contractAddress:t,tokenId:e}),{data:a,isLoading:c}=EW({chainID:String(n),contractAddress:t});if(o||c)return g.createElement(wAe,null);const u=Cr(n,[...i]),{name:f="unknown",image:d,decimals:h=0}=s||{},{logoURI:p,name:m="Unknown Collection"}=a||{},v=Rt(r,h);return g.createElement(un,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between"},g.createElement(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},g.createElement(z,{aspectRatio:"1/1",height:"full",justifyContent:"center",alignItems:"center",style:{width:"80px"}},g.createElement(ar,{src:d,borderRadius:"md",style:{height:"80px"}})),g.createElement(z,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"2"},g.createElement(z,{gap:"1",alignItems:"center"},g.createElement(E0,{size:12,imageUrl:p}),g.createElement(oe,{marginLeft:"1",fontSize:"small",color:"text80",fontWeight:"bold"},m),g.createElement(E0,{size:12,imageUrl:u.logoURI})),g.createElement(z,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",style:{width:"180px"}},g.createElement(oe,{color:"text100",fontSize:"normal",fontWeight:"normal"},f),g.createElement(oe,{color:"text50",fontSize:"normal",fontWeight:"normal"},`#${e}`)))),g.createElement(z,{height:"full",fontSize:"small",color:"text50",fontWeight:"bold"},`x${iE(v)}`))},wAe=()=>g.createElement(un,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between"},g.createElement(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},g.createElement(Pf,{height:"80px",width:"80px"}),g.createElement(z,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"2"},g.createElement(Pf,{width:"100px",height:"14px"}),g.createElement(Pf,{width:"180px",height:"34px"}))),g.createElement(Pf,{height:"14px",width:"14px"}));Ro("packages/checkout/src/views/CheckoutSelection/styles.css.ts","kit");const CW=Fr({},"insufficientBalanceButton");hi(`${CW} > div`,{justifyContent:"center"});$o();const EAe=()=>{var t,e,r,n;const{chains:i}=vt();ih();const{closeCheckout:s,settings:o}=Ip(),{address:a}=mn(),c=o==null?void 0:o.cryptoCheckout,l=!!c,{data:u,isLoading:f}=EW({contractAddress:(c==null||(t=c.coinQuantity)==null?void 0:t.contractAddress)||"",chainID:String((c==null?void 0:c.chainId)||1)}),{data:d,isLoading:h}=sAe({accountAddress:a||"",chainId:(c==null?void 0:c.chainId)||1}),p=(f||h)&&c,m=BI((c==null||(e=c.coinQuantity)==null?void 0:e.contractAddress)||"",$t),v=Cr((c==null?void 0:c.chainId)||1,i),y=m?v.decimals:(u==null?void 0:u.decimals)||0,b=m?v.symbol:(u==null?void 0:u.symbol)||"COIN",E=m?v.logoURI:(u==null?void 0:u.logoURI)||"",S=d==null?void 0:d.find(F=>{var x;return BI(F.contractAddress,(c==null||(x=c.coinQuantity)==null?void 0:x.contractAddress)||"")}),P=S?S.balance:"0",R=(c==null||(r=c.coinQuantity)==null?void 0:r.amountRequiredRaw)||"0",L=Rt(P,y),j=Rt(R,y),H=te.from(P).lt(te.from(R)),K=(o==null?void 0:o.orderSummaryItems)||[],Y=(o==null||(n=o.cryptoCheckout)==null?void 0:n.chainId)||1,Q=()=>{var F;console.log("trigger transaction");const x=o==null||(F=o.cryptoCheckout)==null?void 0:F.triggerTransaction;x&&x(),s()};return g.createElement(z,{paddingX:"5",paddingBottom:"5",style:{marginTop:M9},flexDirection:"column",gap:"3"},K.length>0&&g.createElement(g.Fragment,null,g.createElement(oe,{fontWeight:"normal",fontSize:"normal",color:"text50"},"Order summary"),g.createElement(z,{flexDirection:"column",gap:"2"},K.map((F,x)=>g.createElement(xAe,xu({key:x},F,{chainId:Y})))),g.createElement(z,{marginTop:"2"},g.createElement(o1,{color:"backgroundSecondary",style:{margin:"0px"}}))),l&&g.createElement(z,{justifyContent:"space-between",alignItems:"center"},g.createElement(oe,{fontWeight:"normal",fontSize:"normal",color:"text50"},"Total"),p?g.createElement(Pf,{width:"100px",height:"17px"}):g.createElement(z,{flexDirection:"row",gap:"1",alignItems:"center"},g.createElement(E0,{imageUrl:E,size:12}),g.createElement(oe,{fontWeight:"normal",fontSize:"normal",color:"text100"},`${iE(j)} ${b}`))),g.createElement(z,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"2"},l&&!H&&!p&&g.createElement(nt,{style:{borderRadius:Re.radii.md,height:"56px"},width:"full",leftIcon:()=>g.createElement(E0,{size:20,imageUrl:E}),variant:"primary",label:`Pay with ${b}`,rightIcon:go,onClick:Q}),l&&(H||p)&&g.createElement(nt,{className:CW,style:{borderRadius:Re.radii.md,height:"56px",justifyContent:"center"},width:"full",leftIcon:()=>g.createElement(E0,{size:20,imageUrl:E}),variant:"glass",label:`Insufficient ${b}`,onClick:Q,disabled:!0})),l&&g.createElement(z,{width:"full",justifyContent:"flex-end"},p?g.createElement(Pf,{width:"102px",height:"14px"}):g.createElement(oe,{fontWeight:"bold",fontSize:"small",color:"text50"},"Balance: ",`${iE(L)} ${b}`)))},zw=({secondaryText:t,primaryText:e,disableBack:r=!1})=>{const{goBack:n,history:i}=ih(),s=()=>{n()};return g.createElement(z,{background:"backgroundPrimary",zIndex:"20",position:"fixed",width:"full",flexDirection:"row",alignItems:"center",justifyContent:"space-between",style:{height:M9,paddingTop:"6px",backgroundColor:Re.colors.backgroundPrimary}},i.length>0&&!r?g.createElement(_o,{onClick:s,icon:Ib,size:"sm",style:{background:"rgba(0,0,0,0)",width:"44px"}}):g.createElement(z,null),g.createElement(z,null,g.createElement(oe,{fontWeight:"medium",variant:"small",color:"text50"},t),g.createElement(oe,{fontWeight:"medium",variant:"small",color:"text100"},e)),g.createElement(z,{style:{width:"44px"}}))};Ro("packages/checkout/src/shared/styles.css.ts","kit");const N9=Fr({},"walletContent");hi(`${N9} + button`,{backgroundColor:"transparent"});hi(`${N9} + button > svg`,{width:"20px",height:"20px"});$o();const SW={location:"select-method-checkout"},CAe=t=>{const e=new W4;return g.createElement(G4,{client:e},g.createElement(SAe,t))},SAe=({children:t})=>{const{theme:e,position:r}=kp(),[n,i]=w.useState(!1),[s,o]=w.useState(),[a,c]=w.useState([]),l=a.length>0?a[a.length-1]:SW,u=p=>{o(p),i(!0)},f=()=>{i(!1)},d=()=>{const{location:p}=l;switch(p){case"select-method-checkout":return g.createElement(EAe,null);case"transaction-pending":return g.createElement(dAe,null);case"transaction-success":return g.createElement(hAe,null);case"transaction-error":return g.createElement(mAe,null);case"transaction-form":default:return g.createElement(uAe,null)}},h=()=>{const{location:p}=l;switch(p){case"select-method-checkout":return g.createElement(zw,{primaryText:"Checkout"});case"transaction-success":case"transaction-error":case"transaction-pending":return g.createElement(zw,{disableBack:!0,primaryText:"Pay with credit or debit card"});case"transaction-form":default:return g.createElement(zw,{primaryText:"Pay with credit or debit card"})}};return w.useEffect(()=>{n&&c([])},[n]),g.createElement(Qke,{value:{triggerCheckout:u,closeCheckout:f,settings:s,theme:e}},g.createElement(cAe,{value:{history:a,setHistory:c}},g.createElement("div",{id:"kit-checkout"},g.createElement(Bb,{root:"#kit-checkout",scope:"kit",theme:e},g.createElement(hd,null,n&&g.createElement(Wy,{contentProps:{style:xu({maxWidth:"400px",height:"auto"},xg(r))},scroll:!1,backdropColor:"backgroundBackdrop",onClose:()=>i(!1)},g.createElement(z,{id:"sequence-kit-checkout-content",className:N9},h(),d()))))),t))},ih=()=>{const{setHistory:t,history:e}=aAe(),r=s=>{const o=document.getElementById("sequence-kit-wallet-content"),a=o==null?void 0:o.parentElement;a==null||a.scrollTo(0,0);const c=[...e,s];t(c)},n=()=>{const s=[...e];s.pop(),t(s)},i=e.length>0?e[e.length-1]:SW;return{setNavigation:r,history:e,setHistory:t,goBack:n,navigation:i}},FI="Two roads diverged in a yellow wood",kAe=[{label:"Terms",url:"https://sequence.xyz/terms"},{label:"About",url:"https://github.com/0xsequence/kit"},{label:"Blog",url:"https://sequence.xyz/blog"},{label:"Builder",url:"https://sequence.build"},{label:"Docs",url:"https://docs.sequence.xyz/wallet/connectors/kit/kit/overview"}],AAe=[{id:"discord",url:"https://discord.gg/sequence",icon:"img/social/discord.svg"},{id:"twitter",url:"https://www.twitter.com/0xsequence",icon:"img/social/twitter.svg"},{id:"youtube",url:"https://www.youtube.com/channel/UC1zHgUyV-doddTcnFNqt62Q",icon:"img/social/youtube.svg"},{id:"github",url:"https://github.com/0xsequence",icon:"img/social/github.svg"}];var UI="u3q5o00";const _Ae=()=>{const{theme:t}=cp(),e=yF("isMobile"),r=s=>{typeof window<"u"&&window.open(s)},n=()=>pe.jsx(z,{flexDirection:"row",gap:"4",children:kAe.map((s,o)=>pe.jsx(z,{onClick:()=>r(s.url),className:UI,gap:"4",children:pe.jsx(oe,{fontWeight:"normal",fontSize:"small",color:"text50",children:s.label})},o))}),i=()=>pe.jsx(z,{gap:"4",justifyContent:"center",alignItems:"center",children:AAe.map((s,o)=>pe.jsx(z,{className:UI,onClick:()=>{typeof window<"u"&&window.open(s.url)},children:pe.jsx(ar,{height:"3",src:s.icon,alt:s.id,style:{filter:t==="dark"?"invert(0)":"invert(1)"}})},o))});return e?pe.jsxs(z,{flexDirection:"column",padding:"5",gap:"2",style:{height:"60px"},position:"fixed",bottom:"0",width:"full",justifyContent:"center",alignItems:"center",children:[pe.jsx(n,{}),pe.jsx(i,{})]}):pe.jsxs(z,{padding:"5",style:{height:"60px"},position:"fixed",bottom:"0",width:"full",justifyContent:"space-between",children:[pe.jsx(n,{}),pe.jsx(i,{})]})},PAe=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},IAe=t=>`0x${PAe((t==null?void 0:t.substring(2))||"",8)}`,TAe=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"ERC721IncorrectOwner",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721InsufficientApproval",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC721InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC721InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"ERC721InvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC721InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC721InvalidSender",type:"error"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721NonexistentToken",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"_fromTokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"_toTokenId",type:"uint256"}],name:"BatchMetadataUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"_tokenId",type:"uint256"}],name:"MetadataUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"player",type:"address"},{internalType:"string",name:"tokenURI",type:"string"}],name:"awardItem",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],OAe=({title:t,description:e,secondaryDescription:r,variant:n,buttonProps:i,children:s})=>pe.jsx(z,{borderRadius:"md",background:n,children:pe.jsxs(z,{background:"backgroundOverlay",borderRadius:"md",paddingX:{sm:"4",md:"5"},paddingY:"4",width:"full",flexDirection:"column",gap:"3",children:[pe.jsxs(z,{width:"full",flexDirection:{sm:"column",md:"row"},gap:"2",justifyContent:"space-between",children:[pe.jsxs(z,{flexDirection:"column",gap:"1",children:[pe.jsx(oe,{variant:"normal",color:"text100",fontWeight:"medium",children:t}),pe.jsx(oe,{variant:"normal",color:"text50",fontWeight:"medium",children:e}),r&&pe.jsx(oe,{variant:"normal",color:"text80",fontWeight:"medium",children:r})]}),i?pe.jsx(z,{background:n,borderRadius:"sm",width:"min",height:"min",children:pe.jsx(nt,{variant:"emphasis",shape:"square",flexShrink:"0",...i})}):null]}),s]})});function RAe(){var yt;const{theme:t,setTheme:e}=cp(),{setTheme:r}=kp(),{address:n,connector:i,isConnected:s}=mn(),{setOpenConnectModal:o}=u7e(),{setOpenWalletModal:a}=Ap();Ip();const{disconnect:c}=ez(),{data:l}=n2e(),{switchChain:u}=Y4(),d=h2().find(ge=>ge.connector.id.includes("waas"))!==void 0,h=yF("isMobile"),{data:p,sendTransaction:m,isLoading:v,error:y}=K4(),{data:b,isLoading:E,writeContract:S}=i2e(),[P,R]=g.useState(!1),[L,j]=g.useState(),[H,K]=g.useState(),[Y,Q]=g.useState(),[F,x]=g.useState(),[k,N]=g.useState(localStorage.getItem("confirmationEnabled")==="true"),[M,A,O]=d7e(),[B,I]=g.useState();w.useEffect(()=>{M&&I(M.options[0].token.name)},[M]),w.useEffect(()=>{console.log(y==null?void 0:y.message)},[y]);const C=d2(),{indexerClient:D}=ur(C),[q,_]=g.useState([]),[W,V]=g.useState(void 0);w.useEffect(()=>{J()},[M]);const J=async()=>{if(M){const[ge]=await l.getAddresses(),Ze=await D.getEtherBalance({accountAddress:ge}),De=await D.getTokenBalances({accountAddress:ge});console.log("feeOptions",M.options),console.log("nativeTokenBalance",Ze),console.log("tokenBalances",De);const He=M.options.map(Tt=>{var mt;return Tt.token.contractAddress===null?{tokenName:Tt.token.name,decimals:Tt.token.decimals,balance:Ze.balance.balanceWei}:{tokenName:Tt.token.name,decimals:Tt.token.decimals,balance:((mt=De.balances.find(U=>U.contractAddress.toLowerCase()===Tt.token.contractAddress.toLowerCase()))==null?void 0:mt.balance)||"0"}});_(He)}},ee=fu.network.allNetworks.find(ge=>ge.chainId===C),se=r2e({chainId:C}),{debug:ie}=eL.parse(location.search),ae=ie==="true",be=async()=>{if(!(!l||!se))try{const ge=await B9e(l);console.log("proof:",ge);const Ze=await F9e(l,se,ge);console.log("isValid?:",Ze)}catch(ge){console.error(ge)}};w.useEffect(()=>{p&&Q(p.hash??p),b&&x(b.hash??p)},[p,b]);const he=async()=>{if(l){R(!0);try{const ge=FI,Ze=await l.signMessage({account:n||"",message:ge});console.log("address",n),console.log("signature:",Ze),console.log("chainId in homepage",C);const[De]=await l.getAddresses(),He=await se.verifyMessage({address:De,message:ge,signature:Ze});R(!1),j(He),K(Ze),console.log("isValid?",He)}catch(ge){R(!1),console.error(ge)}}},ve=async()=>{if(!l)return;const[ge]=await l.getAddresses();m({to:ge,value:"0",gas:null})},Ne=async()=>{if(!l)return;const[ge]=await l.getAddresses();S({address:"0x0d402C63cAe0200F0723B3e6fa0914627a48462E",abi:TAe,functionName:"awardItem",args:[ge,"https://dev-metadata.sequence.app/projects/277/collections/62/tokens/0.json"]})},ke=()=>{e(t==="dark"?"light":"dark"),r(t==="dark"?"light":"dark")},Ae=()=>s?pe.jsxs(z,{padding:"5",justifyContent:"space-between",children:[pe.jsxs(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:[pe.jsx(ar,{style:{width:"36px"},src:"kit-logo.svg"}),pe.jsx(ar,{style:{width:"24px",filter:t==="dark"?"invert(0)":"invert(1)"},src:"kit-logo-text.svg"})]}),pe.jsx(z,{children:pe.jsxs(z,{flexDirection:"column",children:[pe.jsxs(z,{flexDirection:"row",gap:"2",justifyContent:"flex-end",alignItems:"center",children:[pe.jsx(Qe,{}),pe.jsx(oe,{fontWeight:"medium",fontSize:"normal",color:"text100",children:h?IAe(n||""):n})]}),pe.jsx(z,{alignItems:"center",justifyContent:"flex-end",flexDirection:"row",children:pe.jsx(oe,{fontWeight:"medium",fontSize:"normal",color:"text50",children:i==null?void 0:i.name})})]})})]}):pe.jsx(z,{padding:"5",justifyContent:"flex-end",children:pe.jsx(Qe,{})}),Xe=({title:ge,description:Ze,disabled:De,isLoading:He,onClick:Tt})=>pe.jsxs(un,{style:{width:"332px"},clickable:!De,onClick:De?()=>{}:Tt,opacity:De?"50":"100",children:[pe.jsx(oe,{color:"text100",lineHeight:"5",fontSize:"normal",fontWeight:"bold",children:ge}),pe.jsx(z,{marginTop:"1",children:pe.jsx(oe,{fontWeight:"medium",lineHeight:"5",color:"text50",fontSize:"normal",children:Ze})}),He&&pe.jsx(Wc,{marginTop:"3",size:"sm",color:"text100"})]}),ct=()=>{o(!0)},Qe=()=>pe.jsx(_o,{onClick:ke,icon:t==="dark"?cue:Kle}),hs=()=>{u(C===421614?{chainId:42170}:{chainId:421614}),Q(void 0),x(void 0),j(void 0)};return pe.jsxs(z,{background:"backgroundPrimary",children:[ae&&pe.jsx(z,{justifyContent:"center",alignItems:"center",children:pe.jsx(oe,{children:"Debug mode"})}),pe.jsx(z,{style:{height:"72px"},position:"fixed",width:"full",top:"0",children:pe.jsx(Ae,{})}),pe.jsx(z,{style:h?{paddingTop:"85px",paddingBottom:"80px"}:{height:"100vh"},flexDirection:"column",justifyContent:"center",alignItems:"center",children:s?pe.jsxs(z,{flexDirection:"column",gap:"4",children:[pe.jsxs(z,{flexDirection:"column",gap:"2",children:[pe.jsx(oe,{color:"text50",fontSize:"small",fontWeight:"medium",children:"Demos"}),pe.jsx(Xe,{title:"Embedded wallet",description:"Connect a Sequence wallet to view, swap, send, and receive collections",onClick:()=>a(!0)}),pe.jsx(Xe,{title:"Send transaction",description:"Send a transaction with your wallet",isLoading:v,onClick:ve}),Y&&((p==null?void 0:p.chainId)===C||p)&&pe.jsxs(oe,{as:"a",marginLeft:"4",variant:"small",underline:!0,href:`${ee.blockExplorer.rootUrl}/tx/${p.hash??p}`,target:"_blank",rel:"noreferrer",children:["View on ",ee.blockExplorer.name]}),pe.jsx(Xe,{title:"Sign message",description:"Sign a message with your wallet",onClick:he,isLoading:P}),L&&pe.jsxs(un,{style:{width:"332px"},color:"text100",flexDirection:"column",gap:"2",children:[pe.jsx(oe,{variant:"medium",children:"Signed message:"}),pe.jsx(oe,{children:FI}),pe.jsx(oe,{variant:"medium",children:"Signature:"}),pe.jsx(oe,{variant:"code",as:"p",ellipsis:!0,children:H}),pe.jsxs(oe,{variant:"medium",children:["isValid: ",pe.jsx(oe,{variant:"code",children:L.toString()})]})]}),pe.jsx(Xe,{title:"Mint an NFT",description:"Test minting an NFT to your wallet",isLoading:E,onClick:Ne}),F&&((b==null?void 0:b.chainId)===C||b)&&pe.jsxs(oe,{as:"a",marginLeft:"4",variant:"small",underline:!0,href:`${ee.blockExplorer.rootUrl}/tx/${b.hash??b}`,target:"_blank",rel:"noreferrer",children:["View on ",ee.blockExplorer.name]}),ae&&pe.jsx(Xe,{title:"Generate EthAuth proof",description:"Generate EthAuth proof",onClick:be}),pe.jsx(Xe,{title:"Switch network",description:`Current network: ${ee.title}`,onClick:hs})]}),M&&q.length>0&&pe.jsxs(z,{marginY:"3",children:[pe.jsx(c1e,{name:"feeOption",labelLocation:"top",label:"Pick a fee option",onValueChange:ge=>{var De;const Ze=(De=M==null?void 0:M.options)==null?void 0:De.find(He=>He.token.name===ge);Ze&&(I(Ze.token.name),V(void 0))},value:B,options:[...(yt=M==null?void 0:M.options)==null?void 0:yt.map(ge=>{var Ze;return{label:pe.jsxs(z,{alignItems:"flex-start",flexDirection:"column",fontSize:"xsmall",children:[pe.jsxs(z,{flexDirection:"row",children:[pe.jsxs(oe,{children:["Fee (in ",ge.token.name,"): "]})," ",pe.jsx(oe,{children:Rt(ge.value,ge.token.decimals)})]}),pe.jsxs(z,{flexDirection:"row",children:[pe.jsxs(oe,{children:["Wallet balance for ",ge.token.name,": "]})," ",pe.jsx(oe,{children:Rt((Ze=q.find(De=>De.tokenName===ge.token.name))==null?void 0:Ze.balance,ge.token.decimals)})]})]}),value:ge.token.name}})]}),pe.jsxs(z,{marginY:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",children:[pe.jsx(nt,{onClick:()=>{var Ze,De;const ge=(Ze=M==null?void 0:M.options)==null?void 0:Ze.find(He=>He.token.name===B);if(ge.token.contractAddress!==void 0){const He=da((De=q.find(mt=>mt.tokenName===ge.token.name))==null?void 0:De.balance,ge.token.decimals),Tt=da(ge.value,ge.token.decimals);if(He&&He.lt(Tt)){V({title:"Insufficient balance",description:`You do not have enough balance to pay the fee with ${ge.token.name}, please make sure you have enough balance in your wallet for the selected fee option.`,secondaryDescription:"You can also switch network to Arbitrum Sepolia to test a gasless transaction.",variant:"warning"});return}A(M==null?void 0:M.id,ge.token.contractAddress)}},label:"Confirm fee option"}),W&&pe.jsx(z,{marginTop:"3",style:{maxWidth:"332px"},children:pe.jsx(OAe,{title:W.title,description:W.description,secondaryDescription:W.secondaryDescription,variant:W.variant,buttonProps:W.buttonProps})})]})]}),d&&pe.jsx(z,{marginY:"3",children:pe.jsxs(z,{as:"label",flexDirection:"row",alignItems:"center",justifyContent:"space-between",children:[pe.jsx(oe,{fontWeight:"semibold",variant:"small",color:"text50",children:"Confirmations"}),pe.jsx(z,{alignItems:"center",gap:"2",children:pe.jsx(n3,{name:"confirmations",checked:k,onCheckedChange:async ge=>{ge?(localStorage.setItem("confirmationEnabled","true"),N(!0)):(localStorage.removeItem("confirmationEnabled"),N(!1)),await $Ae(300),window.location.reload()}})})]})}),pe.jsx(z,{width:"full",gap:"2",flexDirection:"row",justifyContent:"flex-end",children:pe.jsx(nt,{onClick:()=>{c(),Q(void 0),x(void 0),j(void 0)},leftIcon:qj,label:"Sign out"})})]}):pe.jsx(z,{children:pe.jsxs(z,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5",children:[pe.jsxs(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:[pe.jsx(ar,{style:{width:"48px"},src:"kit-logo.svg"}),pe.jsx(ar,{style:{width:"32px",filter:t==="dark"?"invert(0)":"invert(1)"},src:"kit-logo-text.svg"})]}),pe.jsx(z,{gap:"2",flexDirection:"row",alignItems:"center",children:pe.jsx(nt,{onClick:ct,variant:"feature",label:"Connect"})})]})})}),!h&&pe.jsx(_Ae,{})]})}function $Ae(t){return new Promise(e=>setTimeout(e,t))}const MAe=a2({id:42170,name:"Arbitrum Nova",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://nova.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://nova.arbiscan.io",apiUrl:"https://api-nova.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1746963}}}),NAe=a2({id:421614,name:"Arbitrum Sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io",apiUrl:"https://sepolia.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0}),DAe=a2({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cloudflare-eth.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x8cab227b1162f03b8338331adaad7aadc83b895e",blockCreated:18958930},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),LAe=a2({id:137,name:"Polygon",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{default:{http:["https://polygon-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),jAe=new W4;function BAe(){const{debug:t}=eL.parse(location.search),e=t==="true",r=[MAe,NAe,DAe,LAe],n="AQAAAAAAAEGvyZiWA9FMslYeG_yayXaHnSI",i=[...y2e({walletConnectProjectId:"c65a6cb1aa83c4e24500130f23a437d8",defaultChainId:42170,appName:"demo app",projectAccessKey:n}),...e?Uq(n,[h2e({accounts:["0xCb88b6315507e9d8c35D81AFB7F190aB6c3227C9"]})]):[]],s={};r.forEach(c=>{const l=fu.network.findNetworkConfig(fu.network.allNetworks,c.id);l&&(s[c.id]=dye(l.rpcUrl))});const o=kge({transports:s,chains:r,connectors:i}),a={defaultTheme:"dark",signIn:{projectName:"Kit Demo",useMock:e},displayedAssets:[{contractAddress:$t,chainId:42170},{contractAddress:$t,chainId:421614},{contractAddress:"0x0d402c63cae0200f0723b3e6fa0914627a48462e",chainId:42170},{contractAddress:"0x0d402c63cae0200f0723b3e6fa0914627a48462e",chainId:421614},{contractAddress:"0x631998e91476da5b870d741192fc5cbc55f5a52e",chainId:137}]};return pe.jsx(zge,{config:o,children:pe.jsx(G4,{client:jAe,children:pe.jsx(l7e,{config:a,children:pe.jsx(xSe,{children:pe.jsx(CAe,{children:pe.jsx("div",{id:"app",children:pe.jsx(Bb,{root:"#app",scope:"app",theme:"dark",children:pe.jsx(RAe,{})})})})})})})})}const FAe=qw.createRoot(document.getElementById("root"));FAe.render(pe.jsx(g.StrictMode,{children:pe.jsx(BAe,{})}));export{rl as B,x0 as H,gd as I,M4 as _,Ii as a,YG as b,vi as c,Un as d,fge as e,ye as f,kr as g,m4 as h,WY as i,xa as j,hve as k,n2 as l,ba as m,fp as n,Po as o,sn as p,KG as r,ai as s,KAe as t}; -function __vite__mapDeps(indexes) { - if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-DZ3j0VOg.js","./___vite-browser-external_commonjs-proxy-CJWxu3iC.js","./index.es-DhIOr3n6.js"] - } - return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) -} diff --git a/assets/index-dDhnp42S.js b/assets/index-CBhwD3XA.js similarity index 99% rename from assets/index-dDhnp42S.js rename to assets/index-CBhwD3XA.js index 5cd1b4c2..151c29b3 100644 --- a/assets/index-dDhnp42S.js +++ b/assets/index-CBhwD3XA.js @@ -1,4 +1,4 @@ -import{n as _t,s as ce,T as N,t as W,a as C,o as ot,R as Uo,p as K,y as gt}from"./index-DyNK9CaR.js";import"./index-BQEVheXL.js";function jo(e,t){e.indexOf(t)===-1&&e.push(t)}const oo=(e,t,r)=>Math.min(Math.max(r,e),t),Z={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},he=e=>typeof e=="number",Et=e=>Array.isArray(e)&&!he(e[0]),Wo=(e,t,r)=>{const n=t-e;return((r-e)%n+n)%n+e};function Ho(e,t){return Et(e)?e[Wo(0,e.length,t)]:e}const no=(e,t,r)=>-r*e+r*t+e,io=()=>{},it=e=>e,pr=(e,t,r)=>t-e===0?1:(r-e)/(t-e);function so(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const o=pr(0,t,n);e.push(no(r,1,o))}}function zo(e){const t=[0];return so(t,e-1),t}function Fo(e,t=zo(e.length),r=it){const n=e.length,o=n-t.length;return o>0&&so(t,o),i=>{let s=0;for(;sArray.isArray(e)&&he(e[0]),sr=e=>typeof e=="object"&&!!e.createAnimation,Ot=e=>typeof e=="function",Zo=e=>typeof e=="string",zt={ms:e=>e*1e3,s:e=>e/1e3},lo=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Vo=1e-7,Ko=12;function qo(e,t,r,n,o){let i,s,a=0;do s=t+(r-t)/2,i=lo(s,n,o)-e,i>0?r=s:t=s;while(Math.abs(i)>Vo&&++aqo(i,0,1,e,r);return i=>i===0||i===1?i:lo(o(i),t,n)}const Yo=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);const n=r*e,o=t==="end"?Math.floor(n):Math.ceil(n);return oo(0,1,o/e)},Ar={ease:Ht(.25,.1,.25,1),"ease-in":Ht(.42,0,1,1),"ease-in-out":Ht(.42,0,.58,1),"ease-out":Ht(0,0,.58,1)},Jo=/\((.*?)\)/;function _r(e){if(Ot(e))return e;if(ao(e))return Ht(...e);if(Ar[e])return Ar[e];if(e.startsWith("steps")){const t=Jo.exec(e);if(t){const r=t[1].split(",");return Yo(parseFloat(r[0]),r[1].trim())}}return it}class co{constructor(t,r=[0,1],{easing:n,duration:o=Z.duration,delay:i=Z.delay,endDelay:s=Z.endDelay,repeat:a=Z.repeat,offset:l,direction:c="normal",autoplay:d=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=it,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((h,f)=>{this.resolve=h,this.reject=f}),n=n||Z.easing,sr(n)){const h=n.createAnimation(r);n=h.easing,r=h.keyframes||r,o=h.duration||o}this.repeat=a,this.easing=Et(n)?it:_r(n),this.updateDuration(o);const b=Fo(r,l,Et(n)?n.map(_r):it);this.tick=h=>{var f;i=i;let p=0;this.pauseTime!==void 0?p=this.pauseTime:p=(h-this.startTime)*this.rate,this.t=p,p/=1e3,p=Math.max(p-i,0),this.playState==="finished"&&this.pauseTime===void 0&&(p=this.totalDuration);const g=p/this.duration;let _=Math.floor(g),u=g%1;!u&&g>=1&&(u=1),u===1&&_--;const y=_%2;(c==="reverse"||c==="alternate"&&y||c==="alternate-reverse"&&!y)&&(u=1-u);const w=p>=this.totalDuration?1:Math.min(u,1),v=b(this.easing(w));t(v),this.pauseTime===void 0&&(this.playState==="finished"||p>=this.totalDuration+s)?(this.playState="finished",(f=this.resolve)===null||f===void 0||f.call(this,v)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},d&&this.play()}play(){const t=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(t=this.reject)===null||t===void 0||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){this.pauseTime!==void 0||this.rate===0?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}class Go{setAnimation(t){this.animation=t,t==null||t.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const Ce=new WeakMap;function ho(e){return Ce.has(e)||Ce.set(e,{transforms:[],values:new Map}),Ce.get(e)}function Qo(e,t){return e.has(t)||e.set(t,new Go),e.get(t)}const Xo=["","X","Y","Z"],tn=["translate","scale","rotate","skew"],ue={x:"translateX",y:"translateY",z:"translateZ"},Or={syntax:"",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},en={translate:{syntax:"",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:Or,scale:{syntax:"",initialValue:1,toDefaultUnit:it},skew:Or},Zt=new Map,wr=e=>`--motion-${e}`,me=["x","y","z"];tn.forEach(e=>{Xo.forEach(t=>{me.push(e+t),Zt.set(wr(e+t),en[e])})});const rn=(e,t)=>me.indexOf(e)-me.indexOf(t),on=new Set(me),uo=e=>on.has(e),nn=(e,t)=>{ue[t]&&(t=ue[t]);const{transforms:r}=ho(e);jo(r,t),e.style.transform=sn(r)},sn=e=>e.sort(rn).reduce(an,"").trim(),an=(e,t)=>`${e} ${t}(var(${wr(t)}))`,ar=e=>e.startsWith("--"),kr=new Set;function ln(e){if(!kr.has(e)){kr.add(e);try{const{syntax:t,initialValue:r}=Zt.has(e)?Zt.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:r})}catch{}}}const Ee=(e,t)=>document.createElement("div").animate(e,t),Ir={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Ee({opacity:[1]})}catch{return!1}return!0},finished:()=>!!Ee({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{Ee({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},Ae={},Ct={};for(const e in Ir)Ct[e]=()=>(Ae[e]===void 0&&(Ae[e]=Ir[e]()),Ae[e]);const cn=.015,dn=(e,t)=>{let r="";const n=Math.round(t/cn);for(let o=0;oOt(e)?Ct.linearEasing()?`linear(${dn(e,t)})`:Z.easing:ao(e)?hn(e):e,hn=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`;function un(e,t){for(let r=0;rArray.isArray(e)?e:[e];function lr(e){return ue[e]&&(e=ue[e]),uo(e)?wr(e):e}const Xt={get:(e,t)=>{t=lr(t);let r=ar(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!r&&r!==0){const n=Zt.get(t);n&&(r=n.initialValue)}return r},set:(e,t,r)=>{t=lr(t),ar(t)?e.style.setProperty(t,r):e.style[t]=r}};function mo(e,t=!0){if(!(!e||e.playState==="finished"))try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch{}}function gn(e,t){var r;let n=(t==null?void 0:t.toDefaultUnit)||it;const o=e[e.length-1];if(Zo(o)){const i=((r=o.match(/(-?[\d.]+)([a-z%]*)/))===null||r===void 0?void 0:r[2])||"";i&&(n=s=>s+i)}return n}function fn(){return window.__MOTION_DEV_TOOLS_RECORD}function pn(e,t,r,n={},o){const i=fn(),s=n.record!==!1&&i;let a,{duration:l=Z.duration,delay:c=Z.delay,endDelay:d=Z.endDelay,repeat:b=Z.repeat,easing:h=Z.easing,persist:f=!1,direction:p,offset:g,allowWebkitAcceleration:_=!1,autoplay:u=!0}=n;const y=ho(e),w=uo(t);let v=Ct.waapi();w&&nn(e,t);const E=lr(t),M=Qo(y.values,E),S=Zt.get(E);return mo(M.animation,!(sr(h)&&M.generator)&&n.record!==!1),()=>{const U=()=>{var R,Y;return(Y=(R=Xt.get(e,E))!==null&&R!==void 0?R:S==null?void 0:S.initialValue)!==null&&Y!==void 0?Y:0};let P=un(mn(r),U);const z=gn(P,S);if(sr(h)){const R=h.createAnimation(P,t!=="opacity",U,E,M);h=R.easing,P=R.keyframes||P,l=R.duration||l}if(ar(E)&&(Ct.cssRegisterProperty()?ln(E):v=!1),w&&!Ct.linearEasing()&&(Ot(h)||Et(h)&&h.some(Ot))&&(v=!1),v){S&&(P=P.map(D=>he(D)?S.toDefaultUnit(D):D)),P.length===1&&(!Ct.partialKeyframes()||s)&&P.unshift(U());const R={delay:zt.ms(c),duration:zt.ms(l),endDelay:zt.ms(d),easing:Et(h)?void 0:Tr(h,l),direction:p,iterations:b+1,fill:"both"};a=e.animate({[E]:P,offset:g,easing:Et(h)?h.map(D=>Tr(D,l)):void 0},R),a.finished||(a.finished=new Promise((D,Do)=>{a.onfinish=D,a.oncancel=Do}));const Y=P[P.length-1];a.finished.then(()=>{f||(Xt.set(e,E,Y),a.cancel())}).catch(io),_||(a.playbackRate=1.000001)}else if(o&&w)P=P.map(R=>typeof R=="string"?parseFloat(R):R),P.length===1&&P.unshift(parseFloat(U())),a=new o(R=>{Xt.set(e,E,z?z(R):R)},P,Object.assign(Object.assign({},n),{duration:l,easing:h}));else{const R=P[P.length-1];Xt.set(e,E,S&&he(R)?S.toDefaultUnit(R):R)}return s&&i(e,t,P,{duration:l,delay:c,easing:h,repeat:b,offset:g},"motion-one"),M.setAnimation(a),a&&!u&&a.pause(),a}}const wn=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function vn(e,t){var r;return typeof e=="string"?t?((r=t[e])!==null&&r!==void 0||(t[e]=document.querySelectorAll(e)),e=t[e]):e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}const bn=e=>e(),go=(e,t,r=Z.duration)=>new Proxy({animations:e.map(bn).filter(Boolean),duration:r,options:t},xn),yn=e=>e.animations[0],xn={get:(e,t)=>{const r=yn(e);switch(t){case"duration":return e.duration;case"currentTime":return zt.s((r==null?void 0:r[t])||0);case"playbackRate":case"playState":return r==null?void 0:r[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map($n)).catch(io)),e.finished;case"stop":return()=>{e.animations.forEach(n=>mo(n))};case"forEachNative":return n=>{e.animations.forEach(o=>n(o,e))};default:return typeof(r==null?void 0:r[t])>"u"?void 0:()=>e.animations.forEach(n=>n[t]())}},set:(e,t,r)=>{switch(t){case"currentTime":r=zt.ms(r);case"playbackRate":for(let n=0;ne.finished;function Cn(e,t,r){return Ot(e)?e(t,r):e}function En(e){return function(r,n,o={}){r=vn(r);const i=r.length,s=[];for(let a=0;aMath.min(Math.max(r,e),t),Z={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},he=e=>typeof e=="number",Et=e=>Array.isArray(e)&&!he(e[0]),Wo=(e,t,r)=>{const n=t-e;return((r-e)%n+n)%n+e};function Ho(e,t){return Et(e)?e[Wo(0,e.length,t)]:e}const no=(e,t,r)=>-r*e+r*t+e,io=()=>{},it=e=>e,pr=(e,t,r)=>t-e===0?1:(r-e)/(t-e);function so(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const o=pr(0,t,n);e.push(no(r,1,o))}}function zo(e){const t=[0];return so(t,e-1),t}function Fo(e,t=zo(e.length),r=it){const n=e.length,o=n-t.length;return o>0&&so(t,o),i=>{let s=0;for(;sArray.isArray(e)&&he(e[0]),sr=e=>typeof e=="object"&&!!e.createAnimation,Ot=e=>typeof e=="function",Zo=e=>typeof e=="string",zt={ms:e=>e*1e3,s:e=>e/1e3},lo=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Vo=1e-7,Ko=12;function qo(e,t,r,n,o){let i,s,a=0;do s=t+(r-t)/2,i=lo(s,n,o)-e,i>0?r=s:t=s;while(Math.abs(i)>Vo&&++aqo(i,0,1,e,r);return i=>i===0||i===1?i:lo(o(i),t,n)}const Yo=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);const n=r*e,o=t==="end"?Math.floor(n):Math.ceil(n);return oo(0,1,o/e)},Ar={ease:Ht(.25,.1,.25,1),"ease-in":Ht(.42,0,1,1),"ease-in-out":Ht(.42,0,.58,1),"ease-out":Ht(0,0,.58,1)},Jo=/\((.*?)\)/;function _r(e){if(Ot(e))return e;if(ao(e))return Ht(...e);if(Ar[e])return Ar[e];if(e.startsWith("steps")){const t=Jo.exec(e);if(t){const r=t[1].split(",");return Yo(parseFloat(r[0]),r[1].trim())}}return it}class co{constructor(t,r=[0,1],{easing:n,duration:o=Z.duration,delay:i=Z.delay,endDelay:s=Z.endDelay,repeat:a=Z.repeat,offset:l,direction:c="normal",autoplay:d=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=it,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((h,f)=>{this.resolve=h,this.reject=f}),n=n||Z.easing,sr(n)){const h=n.createAnimation(r);n=h.easing,r=h.keyframes||r,o=h.duration||o}this.repeat=a,this.easing=Et(n)?it:_r(n),this.updateDuration(o);const b=Fo(r,l,Et(n)?n.map(_r):it);this.tick=h=>{var f;i=i;let p=0;this.pauseTime!==void 0?p=this.pauseTime:p=(h-this.startTime)*this.rate,this.t=p,p/=1e3,p=Math.max(p-i,0),this.playState==="finished"&&this.pauseTime===void 0&&(p=this.totalDuration);const g=p/this.duration;let _=Math.floor(g),u=g%1;!u&&g>=1&&(u=1),u===1&&_--;const y=_%2;(c==="reverse"||c==="alternate"&&y||c==="alternate-reverse"&&!y)&&(u=1-u);const w=p>=this.totalDuration?1:Math.min(u,1),v=b(this.easing(w));t(v),this.pauseTime===void 0&&(this.playState==="finished"||p>=this.totalDuration+s)?(this.playState="finished",(f=this.resolve)===null||f===void 0||f.call(this,v)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},d&&this.play()}play(){const t=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(t=this.reject)===null||t===void 0||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){this.pauseTime!==void 0||this.rate===0?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}class Go{setAnimation(t){this.animation=t,t==null||t.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const Ce=new WeakMap;function ho(e){return Ce.has(e)||Ce.set(e,{transforms:[],values:new Map}),Ce.get(e)}function Qo(e,t){return e.has(t)||e.set(t,new Go),e.get(t)}const Xo=["","X","Y","Z"],tn=["translate","scale","rotate","skew"],ue={x:"translateX",y:"translateY",z:"translateZ"},Or={syntax:"",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},en={translate:{syntax:"",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:Or,scale:{syntax:"",initialValue:1,toDefaultUnit:it},skew:Or},Zt=new Map,wr=e=>`--motion-${e}`,me=["x","y","z"];tn.forEach(e=>{Xo.forEach(t=>{me.push(e+t),Zt.set(wr(e+t),en[e])})});const rn=(e,t)=>me.indexOf(e)-me.indexOf(t),on=new Set(me),uo=e=>on.has(e),nn=(e,t)=>{ue[t]&&(t=ue[t]);const{transforms:r}=ho(e);jo(r,t),e.style.transform=sn(r)},sn=e=>e.sort(rn).reduce(an,"").trim(),an=(e,t)=>`${e} ${t}(var(${wr(t)}))`,ar=e=>e.startsWith("--"),kr=new Set;function ln(e){if(!kr.has(e)){kr.add(e);try{const{syntax:t,initialValue:r}=Zt.has(e)?Zt.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:r})}catch{}}}const Ee=(e,t)=>document.createElement("div").animate(e,t),Ir={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Ee({opacity:[1]})}catch{return!1}return!0},finished:()=>!!Ee({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{Ee({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},Ae={},Ct={};for(const e in Ir)Ct[e]=()=>(Ae[e]===void 0&&(Ae[e]=Ir[e]()),Ae[e]);const cn=.015,dn=(e,t)=>{let r="";const n=Math.round(t/cn);for(let o=0;oOt(e)?Ct.linearEasing()?`linear(${dn(e,t)})`:Z.easing:ao(e)?hn(e):e,hn=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`;function un(e,t){for(let r=0;rArray.isArray(e)?e:[e];function lr(e){return ue[e]&&(e=ue[e]),uo(e)?wr(e):e}const Xt={get:(e,t)=>{t=lr(t);let r=ar(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!r&&r!==0){const n=Zt.get(t);n&&(r=n.initialValue)}return r},set:(e,t,r)=>{t=lr(t),ar(t)?e.style.setProperty(t,r):e.style[t]=r}};function mo(e,t=!0){if(!(!e||e.playState==="finished"))try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch{}}function gn(e,t){var r;let n=(t==null?void 0:t.toDefaultUnit)||it;const o=e[e.length-1];if(Zo(o)){const i=((r=o.match(/(-?[\d.]+)([a-z%]*)/))===null||r===void 0?void 0:r[2])||"";i&&(n=s=>s+i)}return n}function fn(){return window.__MOTION_DEV_TOOLS_RECORD}function pn(e,t,r,n={},o){const i=fn(),s=n.record!==!1&&i;let a,{duration:l=Z.duration,delay:c=Z.delay,endDelay:d=Z.endDelay,repeat:b=Z.repeat,easing:h=Z.easing,persist:f=!1,direction:p,offset:g,allowWebkitAcceleration:_=!1,autoplay:u=!0}=n;const y=ho(e),w=uo(t);let v=Ct.waapi();w&&nn(e,t);const E=lr(t),M=Qo(y.values,E),S=Zt.get(E);return mo(M.animation,!(sr(h)&&M.generator)&&n.record!==!1),()=>{const U=()=>{var R,Y;return(Y=(R=Xt.get(e,E))!==null&&R!==void 0?R:S==null?void 0:S.initialValue)!==null&&Y!==void 0?Y:0};let P=un(mn(r),U);const z=gn(P,S);if(sr(h)){const R=h.createAnimation(P,t!=="opacity",U,E,M);h=R.easing,P=R.keyframes||P,l=R.duration||l}if(ar(E)&&(Ct.cssRegisterProperty()?ln(E):v=!1),w&&!Ct.linearEasing()&&(Ot(h)||Et(h)&&h.some(Ot))&&(v=!1),v){S&&(P=P.map(D=>he(D)?S.toDefaultUnit(D):D)),P.length===1&&(!Ct.partialKeyframes()||s)&&P.unshift(U());const R={delay:zt.ms(c),duration:zt.ms(l),endDelay:zt.ms(d),easing:Et(h)?void 0:Tr(h,l),direction:p,iterations:b+1,fill:"both"};a=e.animate({[E]:P,offset:g,easing:Et(h)?h.map(D=>Tr(D,l)):void 0},R),a.finished||(a.finished=new Promise((D,Do)=>{a.onfinish=D,a.oncancel=Do}));const Y=P[P.length-1];a.finished.then(()=>{f||(Xt.set(e,E,Y),a.cancel())}).catch(io),_||(a.playbackRate=1.000001)}else if(o&&w)P=P.map(R=>typeof R=="string"?parseFloat(R):R),P.length===1&&P.unshift(parseFloat(U())),a=new o(R=>{Xt.set(e,E,z?z(R):R)},P,Object.assign(Object.assign({},n),{duration:l,easing:h}));else{const R=P[P.length-1];Xt.set(e,E,S&&he(R)?S.toDefaultUnit(R):R)}return s&&i(e,t,P,{duration:l,delay:c,easing:h,repeat:b,offset:g},"motion-one"),M.setAnimation(a),a&&!u&&a.pause(),a}}const wn=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function vn(e,t){var r;return typeof e=="string"?t?((r=t[e])!==null&&r!==void 0||(t[e]=document.querySelectorAll(e)),e=t[e]):e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}const bn=e=>e(),go=(e,t,r=Z.duration)=>new Proxy({animations:e.map(bn).filter(Boolean),duration:r,options:t},xn),yn=e=>e.animations[0],xn={get:(e,t)=>{const r=yn(e);switch(t){case"duration":return e.duration;case"currentTime":return zt.s((r==null?void 0:r[t])||0);case"playbackRate":case"playState":return r==null?void 0:r[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map($n)).catch(io)),e.finished;case"stop":return()=>{e.animations.forEach(n=>mo(n))};case"forEachNative":return n=>{e.animations.forEach(o=>n(o,e))};default:return typeof(r==null?void 0:r[t])>"u"?void 0:()=>e.animations.forEach(n=>n[t]())}},set:(e,t,r)=>{switch(t){case"currentTime":r=zt.ms(r);case"playbackRate":for(let n=0;ne.finished;function Cn(e,t,r){return Ot(e)?e(t,r):e}function En(e){return function(r,n,o={}){r=vn(r);const i=r.length,s=[];for(let a=0;an[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var xo={},Br={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.walletLogo=void 0;const Md=(e,t)=>{let r;switch(e){case"standard":return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};Wn.walletLogo=Md;var Vn={};Object.defineProperty(Vn,"__esModule",{value:!0});Vn.LINK_API_URL=void 0;Vn.LINK_API_URL="https://www.walletlink.org";var O={},Wr={},ht={};Object.defineProperty(ht,"__esModule",{value:!0});ht.errorValues=ht.standardErrorCodes=void 0;ht.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}};ht.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}};var zn={},qn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=e.getErrorCode=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=ht,r="Unspecified error message.";e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function n(h,g=r){if(h&&Number.isInteger(h)){const b=h.toString();if(d(t.errorValues,b))return t.errorValues[b].message;if(c(h))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return g}e.getMessageFromCode=n;function s(h){if(!Number.isInteger(h))return!1;const g=h.toString();return!!(t.errorValues[g]||c(h))}e.isValidCode=s;function i(h){var g;if(typeof h=="number")return h;if(o(h))return(g=h.code)!==null&&g!==void 0?g:h.errorCode}e.getErrorCode=i;function o(h){return typeof h=="object"&&h!==null&&(typeof h.code=="number"||typeof h.errorCode=="number")}function a(h,{shouldIncludeStack:g=!1}={}){const b={};if(h&&typeof h=="object"&&!Array.isArray(h)&&d(h,"code")&&s(h.code)){const R=h;b.code=R.code,R.message&&typeof R.message=="string"?(b.message=R.message,d(R,"data")&&(b.data=R.data)):(b.message=n(b.code),b.data={originalError:l(h)})}else b.code=t.standardErrorCodes.rpc.internal,b.message=u(h,"message")?h.message:r,b.data={originalError:l(h)};return g&&(b.stack=u(h,"stack")?h.stack:void 0),b}e.serialize=a;function c(h){return h>=-32099&&h<=-32e3}function l(h){return h&&typeof h=="object"&&!Array.isArray(h)?Object.assign({},h):h}function d(h,g){return Object.prototype.hasOwnProperty.call(h,g)}function u(h,g){return typeof h=="object"&&h!==null&&g in h&&typeof h[g]=="string"}})(qn);Object.defineProperty(zn,"__esModule",{value:!0});zn.standardErrors=void 0;const Se=ht,pl=qn;zn.standardErrors={rpc:{parse:e=>$e(Se.standardErrorCodes.rpc.parse,e),invalidRequest:e=>$e(Se.standardErrorCodes.rpc.invalidRequest,e),invalidParams:e=>$e(Se.standardErrorCodes.rpc.invalidParams,e),methodNotFound:e=>$e(Se.standardErrorCodes.rpc.methodNotFound,e),internal:e=>$e(Se.standardErrorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return $e(t,e)},invalidInput:e=>$e(Se.standardErrorCodes.rpc.invalidInput,e),resourceNotFound:e=>$e(Se.standardErrorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>$e(Se.standardErrorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>$e(Se.standardErrorCodes.rpc.transactionRejected,e),methodNotSupported:e=>$e(Se.standardErrorCodes.rpc.methodNotSupported,e),limitExceeded:e=>$e(Se.standardErrorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>Jt(Se.standardErrorCodes.provider.userRejectedRequest,e),unauthorized:e=>Jt(Se.standardErrorCodes.provider.unauthorized,e),unsupportedMethod:e=>Jt(Se.standardErrorCodes.provider.unsupportedMethod,e),disconnected:e=>Jt(Se.standardErrorCodes.provider.disconnected,e),chainDisconnected:e=>Jt(Se.standardErrorCodes.provider.chainDisconnected,e),unsupportedChain:e=>Jt(Se.standardErrorCodes.provider.unsupportedChain,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new ml(t,r,n)}}};function $e(e,t){const[r,n]=gl(t);return new _l(e,r||(0,pl.getMessageFromCode)(e),n)}function Jt(e,t){const[r,n]=gl(t);return new ml(e,r||(0,pl.getMessageFromCode)(e),n)}function gl(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}let _l=class extends Error{constructor(t,r,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=t,n!==void 0&&(this.data=n)}},ml=class extends _l{constructor(t,r,n){if(!Ld(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,n)}};function Ld(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}var Gn={},mr={};Object.defineProperty(mr,"__esModule",{value:!0});mr.isErrorResponse=void 0;function Pd(e){return e.errorMessage!==void 0}mr.isErrorResponse=Pd;var br={};Object.defineProperty(br,"__esModule",{value:!0});br.LIB_VERSION=void 0;br.LIB_VERSION="3.9.1";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.serializeError=void 0;const Od=mr,$d=br,Bd=ht,Dd=qn;function Fd(e,t){const r=(0,Dd.serialize)(jd(e),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",$d.LIB_VERSION),n.searchParams.set("code",r.code.toString());const s=Hd(r.data,t);return s&&n.searchParams.set("method",s),n.searchParams.set("message",r.message),Object.assign(Object.assign({},r),{docUrl:n.href})}Gn.serializeError=Fd;function jd(e){return typeof e=="string"?{message:e,code:Bd.standardErrorCodes.rpc.internal}:(0,Od.isErrorResponse)(e)?Object.assign(Object.assign({},e),{message:e.errorMessage,code:e.errorCode,data:{method:e.method}}):e}function Hd(e,t){const r=e==null?void 0:e.method;if(r)return r;if(t!==void 0){if(typeof t=="string")return t;if(Array.isArray(t)){if(t.length>0)return t[0].method}else return t.method}}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=e.serializeError=e.getMessageFromCode=e.getErrorCode=void 0;const t=ht;Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return t.standardErrorCodes}});const r=zn;Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return r.standardErrors}});const n=Gn;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}});const s=qn;Object.defineProperty(e,"getErrorCode",{enumerable:!0,get:function(){return s.getErrorCode}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return s.getMessageFromCode}})})(Wr);var be={};Object.defineProperty(be,"__esModule",{value:!0});be.ProviderType=be.RegExpString=be.IntNumber=be.BigIntString=be.AddressString=be.HexString=be.OpaqueType=void 0;function Vr(){return e=>e}be.OpaqueType=Vr;be.HexString=Vr();be.AddressString=Vr();be.BigIntString=Vr();function Ud(e){return Math.floor(e)}be.IntNumber=Ud;be.RegExpString=Vr();var ya;(function(e){e.CoinbaseWallet="CoinbaseWallet",e.MetaMask="MetaMask",e.Unselected=""})(ya||(be.ProviderType=ya={}));var Wd=F&&F.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(O,"__esModule",{value:!0});O.isMobileWeb=O.getLocation=O.isInIFrame=O.createQrUrl=O.getFavicon=O.range=O.isBigNumber=O.ensureParsedJSONObject=O.ensureBN=O.ensureRegExpString=O.ensureIntNumber=O.ensureBuffer=O.ensureAddressString=O.ensureEvenLengthHexString=O.ensureHexString=O.isHexString=O.prepend0x=O.strip0x=O.has0xPrefix=O.hexStringFromIntNumber=O.intNumberFromHexString=O.bigIntStringFromBN=O.hexStringFromBuffer=O.hexStringToUint8Array=O.uint8ArrayToHex=O.randomBytesHex=void 0;const bt=Wd(jn),Ft=Wr,je=be,bl=/^[0-9]*$/,yl=/^[a-f0-9]*$/;function Vd(e){return vl(crypto.getRandomValues(new Uint8Array(e)))}O.randomBytesHex=Vd;function vl(e){return[...e].map(t=>t.toString(16).padStart(2,"0")).join("")}O.uint8ArrayToHex=vl;function zd(e){return new Uint8Array(e.match(/.{1,2}/g).map(t=>parseInt(t,16)))}O.hexStringToUint8Array=zd;function qd(e,t=!1){const r=e.toString("hex");return(0,je.HexString)(t?`0x${r}`:r)}O.hexStringFromBuffer=qd;function Gd(e){return(0,je.BigIntString)(e.toString(10))}O.bigIntStringFromBN=Gd;function Jd(e){return(0,je.IntNumber)(new bt.default(qr(e,!1),16).toNumber())}O.intNumberFromHexString=Jd;function Zd(e){return(0,je.HexString)(`0x${new bt.default(e).toString(16)}`)}O.hexStringFromIntNumber=Zd;function To(e){return e.startsWith("0x")||e.startsWith("0X")}O.has0xPrefix=To;function Jn(e){return To(e)?e.slice(2):e}O.strip0x=Jn;function wl(e){return To(e)?`0x${e.slice(2)}`:`0x${e}`}O.prepend0x=wl;function zr(e){if(typeof e!="string")return!1;const t=Jn(e).toLowerCase();return yl.test(t)}O.isHexString=zr;function El(e,t=!1){if(typeof e=="string"){const r=Jn(e).toLowerCase();if(yl.test(r))return(0,je.HexString)(t?`0x${r}`:r)}throw Ft.standardErrors.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}O.ensureHexString=El;function qr(e,t=!1){let r=El(e,!1);return r.length%2===1&&(r=(0,je.HexString)(`0${r}`)),t?(0,je.HexString)(`0x${r}`):r}O.ensureEvenLengthHexString=qr;function Kd(e){if(typeof e=="string"){const t=Jn(e).toLowerCase();if(zr(t)&&t.length===40)return(0,je.AddressString)(wl(t))}throw Ft.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)}O.ensureAddressString=Kd;function Qd(e){if(G.isBuffer(e))return e;if(typeof e=="string"){if(zr(e)){const t=qr(e,!1);return G.from(t,"hex")}return G.from(e,"utf8")}throw Ft.standardErrors.rpc.invalidParams(`Not binary data: ${String(e)}`)}O.ensureBuffer=Qd;function Sl(e){if(typeof e=="number"&&Number.isInteger(e))return(0,je.IntNumber)(e);if(typeof e=="string"){if(bl.test(e))return(0,je.IntNumber)(Number(e));if(zr(e))return(0,je.IntNumber)(new bt.default(qr(e,!1),16).toNumber())}throw Ft.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}O.ensureIntNumber=Sl;function Yd(e){if(e instanceof RegExp)return(0,je.RegExpString)(e.toString());throw Ft.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(e)}`)}O.ensureRegExpString=Yd;function Xd(e){if(e!==null&&(bt.default.isBN(e)||Rl(e)))return new bt.default(e.toString(10),10);if(typeof e=="number")return new bt.default(Sl(e));if(typeof e=="string"){if(bl.test(e))return new bt.default(e,10);if(zr(e))return new bt.default(qr(e,!1),16)}throw Ft.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}O.ensureBN=Xd;function eh(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw Ft.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)}O.ensureParsedJSONObject=eh;function Rl(e){if(e==null||typeof e.constructor!="function")return!1;const{constructor:t}=e;return typeof t.config=="function"&&typeof t.EUCLID=="number"}O.isBigNumber=Rl;function th(e,t){return Array.from({length:t-e},(r,n)=>e+n)}O.range=th;function rh(){const e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:r}=document.location,n=e?e.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?t+n:`${t}//${r}${n}`}O.getFavicon=rh;function nh(e,t,r,n,s,i){const o=n?"parent-id":"id",a=new URLSearchParams({[o]:e,secret:t,server:r,v:s,chainId:i.toString()}).toString();return`${r}/#/link?${a}`}O.createQrUrl=nh;function Cl(){try{return window.frameElement!==null}catch{return!1}}O.isInIFrame=Cl;function sh(){try{return Cl()&&window.top?window.top.location:window.location}catch{return window.location}}O.getLocation=sh;function ih(){var e;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((e=window==null?void 0:window.navigator)===null||e===void 0?void 0:e.userAgent)}O.isMobileWeb=ih;var Zn={};Object.defineProperty(Zn,"__esModule",{value:!0});Zn.ScopedLocalStorage=void 0;class oh{constructor(t){this.scope=t}setItem(t,r){localStorage.setItem(this.scopedKey(t),r)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),r=[];for(let n=0;nlocalStorage.removeItem(n))}scopedKey(t){return`${this.scope}:${t}`}}Zn.ScopedLocalStorage=oh;var cr={},Gr={},Jr={},yr={};Object.defineProperty(yr,"__esModule",{value:!0});yr.EVENTS=void 0;yr.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};var Fe={};Object.defineProperty(Fe,"__esModule",{value:!0});Fe.RelayAbstract=Fe.APP_VERSION_KEY=Fe.LOCAL_STORAGE_ADDRESSES_KEY=Fe.WALLET_USER_NAME_KEY=void 0;const va=Wr;Fe.WALLET_USER_NAME_KEY="walletUsername";Fe.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";Fe.APP_VERSION_KEY="AppVersion";class ah{async makeEthereumJSONRPCRequest(t,r){if(!r)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(r,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{if(!n)throw va.standardErrors.rpc.parse({});const s=n,{error:i}=s;if(i)throw(0,va.serializeError)(i,t.method);return s})}}Fe.RelayAbstract=ah;var vr={},kl={exports:{}},po={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh */(function(e,t){var r=Hn,n=r.Buffer;function s(o,a){for(var c in o)a[c]=o[c]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(s(r,t),t.Buffer=i);function i(o,a,c){return n(o,a,c)}i.prototype=Object.create(n.prototype),s(n,i),i.from=function(o,a,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,c)},i.alloc=function(o,a,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var l=n(o);return a!==void 0?typeof c=="string"?l.fill(a,c):l.fill(a):l.fill(0),l},i.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},i.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}})(po,po.exports);var Et=po.exports,Il=Et.Buffer;function Kn(e,t){this._block=Il.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}Kn.prototype.update=function(e,t){typeof e=="string"&&(t=t||"utf8",e=Il.from(e,t));for(var r=this._block,n=this._blockSize,s=e.length,i=this._len,o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,s=(r-n)/4294967296;this._block.writeUInt32BE(s,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i};Kn.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var wr=Kn,ch=qe,Al=wr,lh=Et.Buffer,uh=[1518500249,1859775393,-1894007588,-899497514],dh=new Array(80);function Zr(){this.init(),this._w=dh,Al.call(this,64,56)}ch(Zr,Al);Zr.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function hh(e){return e<<5|e>>>27}function fh(e){return e<<30|e>>>2}function ph(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}Zr.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,s=this._c|0,i=this._d|0,o=this._e|0,a=0;a<16;++a)t[a]=e.readInt32BE(a*4);for(;a<80;++a)t[a]=t[a-3]^t[a-8]^t[a-14]^t[a-16];for(var c=0;c<80;++c){var l=~~(c/20),d=hh(r)+ph(l,n,s,i)+o+t[c]+uh[l]|0;o=i,i=s,s=fh(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=i+this._d|0,this._e=o+this._e|0};Zr.prototype._hash=function(){var e=lh.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var gh=Zr,_h=qe,xl=wr,mh=Et.Buffer,bh=[1518500249,1859775393,-1894007588,-899497514],yh=new Array(80);function Kr(){this.init(),this._w=yh,xl.call(this,64,56)}_h(Kr,xl);Kr.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function vh(e){return e<<1|e>>>31}function wh(e){return e<<5|e>>>27}function Eh(e){return e<<30|e>>>2}function Sh(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}Kr.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,s=this._c|0,i=this._d|0,o=this._e|0,a=0;a<16;++a)t[a]=e.readInt32BE(a*4);for(;a<80;++a)t[a]=vh(t[a-3]^t[a-8]^t[a-14]^t[a-16]);for(var c=0;c<80;++c){var l=~~(c/20),d=wh(r)+Sh(l,n,s,i)+o+t[c]+bh[l]|0;o=i,i=s,s=Eh(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=i+this._d|0,this._e=o+this._e|0};Kr.prototype._hash=function(){var e=mh.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var Rh=Kr,Ch=qe,Tl=wr,kh=Et.Buffer,Ih=[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],Ah=new Array(64);function Qr(){this.init(),this._w=Ah,Tl.call(this,64,56)}Ch(Qr,Tl);Qr.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function xh(e,t,r){return r^e&(t^r)}function Th(e,t,r){return e&t|r&(e|t)}function Nh(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function Mh(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function Lh(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function Ph(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}Qr.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,s=this._c|0,i=this._d|0,o=this._e|0,a=this._f|0,c=this._g|0,l=this._h|0,d=0;d<16;++d)t[d]=e.readInt32BE(d*4);for(;d<64;++d)t[d]=Ph(t[d-2])+t[d-7]+Lh(t[d-15])+t[d-16]|0;for(var u=0;u<64;++u){var h=l+Mh(o)+xh(o,a,c)+Ih[u]+t[u]|0,g=Nh(r)+Th(r,n,s)|0;l=c,c=a,a=o,o=i+h|0,i=s,s=n,n=r,r=h+g|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=i+this._d|0,this._e=o+this._e|0,this._f=a+this._f|0,this._g=c+this._g|0,this._h=l+this._h|0};Qr.prototype._hash=function(){var e=kh.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};var Nl=Qr,Oh=qe,$h=Nl,Bh=wr,Dh=Et.Buffer,Fh=new Array(64);function Qn(){this.init(),this._w=Fh,Bh.call(this,64,56)}Oh(Qn,$h);Qn.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};Qn.prototype._hash=function(){var e=Dh.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};var jh=Qn,Hh=qe,Ml=wr,Uh=Et.Buffer,wa=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],Wh=new Array(160);function Yr(){this.init(),this._w=Wh,Ml.call(this,128,112)}Hh(Yr,Ml);Yr.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function Ea(e,t,r){return r^e&(t^r)}function Sa(e,t,r){return e&t|r&(e|t)}function Ra(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function Ca(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function Vh(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function zh(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function qh(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function Gh(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function ve(e,t){return e>>>0>>0?1:0}Yr.prototype._update=function(e){for(var t=this._w,r=this._ah|0,n=this._bh|0,s=this._ch|0,i=this._dh|0,o=this._eh|0,a=this._fh|0,c=this._gh|0,l=this._hh|0,d=this._al|0,u=this._bl|0,h=this._cl|0,g=this._dl|0,b=this._el|0,R=this._fl|0,E=this._gl|0,_=this._hl|0,m=0;m<32;m+=2)t[m]=e.readInt32BE(m*4),t[m+1]=e.readInt32BE(m*4+4);for(;m<160;m+=2){var y=t[m-30],C=t[m-15*2+1],S=Vh(y,C),I=zh(C,y);y=t[m-2*2],C=t[m-2*2+1];var j=qh(y,C),$=Gh(C,y),N=t[m-7*2],J=t[m-7*2+1],de=t[m-16*2],oe=t[m-16*2+1],T=I+J|0,x=S+N+ve(T,I)|0;T=T+$|0,x=x+j+ve(T,$)|0,T=T+oe|0,x=x+de+ve(T,oe)|0,t[m]=x,t[m+1]=T}for(var P=0;P<160;P+=2){x=t[P],T=t[P+1];var D=Sa(r,n,s),B=Sa(d,u,h),L=Ra(r,d),H=Ra(d,r),Z=Ca(o,b),W=Ca(b,o),Y=wa[P],ce=wa[P+1],se=Ea(o,a,c),Ie=Ea(b,R,E),v=_+W|0,w=l+Z+ve(v,_)|0;v=v+Ie|0,w=w+se+ve(v,Ie)|0,v=v+ce|0,w=w+Y+ve(v,ce)|0,v=v+T|0,w=w+x+ve(v,T)|0;var A=H+B|0,U=L+D+ve(A,H)|0;l=c,_=E,c=a,E=R,a=o,R=b,b=g+v|0,o=i+w+ve(b,g)|0,i=s,g=h,s=n,h=u,n=r,u=d,d=v+A|0,r=w+U+ve(d,v)|0}this._al=this._al+d|0,this._bl=this._bl+u|0,this._cl=this._cl+h|0,this._dl=this._dl+g|0,this._el=this._el+b|0,this._fl=this._fl+R|0,this._gl=this._gl+E|0,this._hl=this._hl+_|0,this._ah=this._ah+r+ve(this._al,d)|0,this._bh=this._bh+n+ve(this._bl,u)|0,this._ch=this._ch+s+ve(this._cl,h)|0,this._dh=this._dh+i+ve(this._dl,g)|0,this._eh=this._eh+o+ve(this._el,b)|0,this._fh=this._fh+a+ve(this._fl,R)|0,this._gh=this._gh+c+ve(this._gl,E)|0,this._hh=this._hh+l+ve(this._hl,_)|0};Yr.prototype._hash=function(){var e=Uh.allocUnsafe(64);function t(r,n,s){e.writeInt32BE(r,s),e.writeInt32BE(n,s+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};var Ll=Yr,Jh=qe,Zh=Ll,Kh=wr,Qh=Et.Buffer,Yh=new Array(160);function Yn(){this.init(),this._w=Yh,Kh.call(this,128,112)}Jh(Yn,Zh);Yn.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};Yn.prototype._hash=function(){var e=Qh.allocUnsafe(48);function t(r,n,s){e.writeInt32BE(r,s),e.writeInt32BE(n,s+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};var Xh=Yn,jt=kl.exports=function(t){t=t.toLowerCase();var r=jt[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r};jt.sha=gh;jt.sha1=Rh;jt.sha224=jh;jt.sha256=Nl;jt.sha384=Xh;jt.sha512=Ll;var ef=kl.exports;Object.defineProperty(vr,"__esModule",{value:!0});vr.Session=void 0;const ka=ef,Ia=O,Aa="session:id",xa="session:secret",Ta="session:linked";class No{constructor(t,r,n,s){this._storage=t,this._id=r||(0,Ia.randomBytesHex)(16),this._secret=n||(0,Ia.randomBytesHex)(32),this._key=new ka.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!s}static load(t){const r=t.getItem(Aa),n=t.getItem(Ta),s=t.getItem(xa);return r&&s?new No(t,r,s,n==="1"):null}static hash(t){return new ka.sha256().update(t).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(t){this._linked=t,this.persistLinked()}save(){return this._storage.setItem(Aa,this._id),this._storage.setItem(xa,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(Ta,this._linked?"1":"0")}}vr.Session=No;var Xn={},es={};Object.defineProperty(es,"__esModule",{value:!0});es.Cipher=void 0;const mn=O;class tf{constructor(t){this.secret=t}async encrypt(t){const r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),s=await crypto.subtle.importKey("raw",(0,mn.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),i=new TextEncoder,o=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},s,i.encode(t)),a=16,c=o.slice(o.byteLength-a),l=o.slice(0,o.byteLength-a),d=new Uint8Array(c),u=new Uint8Array(l),h=new Uint8Array([...n,...d,...u]);return(0,mn.uint8ArrayToHex)(h)}async decrypt(t){const r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");return new Promise((n,s)=>{(async function(){const i=await crypto.subtle.importKey("raw",(0,mn.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,mn.hexStringToUint8Array)(t),a=o.slice(0,12),c=o.slice(12,28),l=o.slice(28),d=new Uint8Array([...l,...c]),u={name:"AES-GCM",iv:new Uint8Array(a)};try{const h=await window.crypto.subtle.decrypt(u,i,d),g=new TextDecoder;n(g.decode(h))}catch(h){s(h)}})()})}}es.Cipher=tf;var ts={};Object.defineProperty(ts,"__esModule",{value:!0});ts.WalletLinkHTTP=void 0;class rf{constructor(t,r,n){this.linkAPIUrl=t,this.sessionId=r;const s=`${r}:${n}`;this.auth=`Basic ${btoa(s)}`}async markUnseenEventsAsSeen(t){return Promise.all(t.map(r=>fetch(`${this.linkAPIUrl}/events/${r.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(r=>console.error("Unabled to mark event as failed:",r))}async fetchUnseenEvents(){var t;const r=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(r.ok){const{events:n,error:s}=await r.json();if(s)throw new Error(`Check unseen events failed: ${s}`);const i=(t=n==null?void 0:n.filter(o=>o.event==="Web3Response").map(o=>({type:"Event",sessionId:this.sessionId,eventId:o.id,event:o.event,data:o.data})))!==null&&t!==void 0?t:[];return this.markUnseenEventsAsSeen(i),i}throw new Error(`Check unseen events failed: ${r.status}`)}}ts.WalletLinkHTTP=rf;var lr={};Object.defineProperty(lr,"__esModule",{value:!0});lr.WalletLinkWebSocket=lr.ConnectionState=void 0;var rr;(function(e){e[e.DISCONNECTED=0]="DISCONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.CONNECTED=2]="CONNECTED"})(rr||(lr.ConnectionState=rr={}));class nf{setConnectionStateListener(t){this.connectionStateListener=t}setIncomingDataListener(t){this.incomingDataListener=t}constructor(t,r=WebSocket){this.WebSocketClass=r,this.webSocket=null,this.pendingData=[],this.url=t.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((t,r)=>{var n;let s;try{this.webSocket=s=new this.WebSocketClass(this.url)}catch(i){r(i);return}(n=this.connectionStateListener)===null||n===void 0||n.call(this,rr.CONNECTING),s.onclose=i=>{var o;this.clearWebSocket(),r(new Error(`websocket error ${i.code}: ${i.reason}`)),(o=this.connectionStateListener)===null||o===void 0||o.call(this,rr.DISCONNECTED)},s.onopen=i=>{var o;t(),(o=this.connectionStateListener)===null||o===void 0||o.call(this,rr.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(c=>this.sendData(c)),this.pendingData=[])},s.onmessage=i=>{var o,a;if(i.data==="h")(o=this.incomingDataListener)===null||o===void 0||o.call(this,{type:"Heartbeat"});else try{const c=JSON.parse(i.data);(a=this.incomingDataListener)===null||a===void 0||a.call(this,c)}catch{}}})}disconnect(){var t;const{webSocket:r}=this;if(r){this.clearWebSocket(),(t=this.connectionStateListener)===null||t===void 0||t.call(this,rr.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{r.close()}catch{}}}sendData(t){const{webSocket:r}=this;if(!r){this.pendingData.push(t),this.connect();return}r.send(t)}clearWebSocket(){const{webSocket:t}=this;t&&(this.webSocket=null,t.onclose=null,t.onerror=null,t.onmessage=null,t.onopen=null)}}lr.WalletLinkWebSocket=nf;Object.defineProperty(Xn,"__esModule",{value:!0});Xn.WalletLinkConnection=void 0;const Zt=be,sf=es,Ke=yr,Na=Fe,Kt=vr,of=ts,bn=lr,Ma=1e4,af=6e4;class cf{constructor({session:t,linkAPIUrl:r,listener:n,diagnostic:s,WebSocketClass:i=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,Zt.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=a=>{if(!a)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",l=>a.JsonRpcUrl&&this.handleChainUpdated(l,a.JsonRpcUrl)]]).forEach((l,d)=>{const u=a[d];u!==void 0&&l(u)})},this.handleDestroyed=a=>{var c,l;a==="1"&&((c=this.listener)===null||c===void 0||c.resetAndReload(),(l=this.diagnostic)===null||l===void 0||l.log(Ke.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:Kt.Session.hash(this.session.id)}))},this.handleAccountUpdated=async a=>{var c,l;try{const d=await this.cipher.decrypt(a);(c=this.listener)===null||c===void 0||c.accountUpdated(d)}catch{(l=this.diagnostic)===null||l===void 0||l.log(Ke.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(a,c)=>{var l,d;try{const u=await this.cipher.decrypt(c);(l=this.listener)===null||l===void 0||l.metadataUpdated(a,u)}catch{(d=this.diagnostic)===null||d===void 0||d.log(Ke.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:a})}},this.handleWalletUsernameUpdated=async a=>{this.handleMetadataUpdated(Na.WALLET_USER_NAME_KEY,a)},this.handleAppVersionUpdated=async a=>{this.handleMetadataUpdated(Na.APP_VERSION_KEY,a)},this.handleChainUpdated=async(a,c)=>{var l,d;try{const u=await this.cipher.decrypt(a),h=await this.cipher.decrypt(c);(l=this.listener)===null||l===void 0||l.chainUpdated(u,h)}catch{(d=this.diagnostic)===null||d===void 0||d.log(Ke.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=t,this.cipher=new sf.Cipher(t.secret),this.diagnostic=s,this.listener=n;const o=new bn.WalletLinkWebSocket(`${r}/rpc`,i);o.setConnectionStateListener(async a=>{var c;(c=this.diagnostic)===null||c===void 0||c.log(Ke.EVENTS.CONNECTED_STATE_CHANGE,{state:a,sessionIdHash:Kt.Session.hash(t.id)});let l=!1;switch(a){case bn.ConnectionState.DISCONNECTED:if(!this.destroyed){const d=async()=>{await new Promise(u=>setTimeout(u,5e3)),this.destroyed||o.connect().catch(()=>{d()})};d()}break;case bn.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),l=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},Ma),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case bn.ConnectionState.CONNECTING:break}this.connected!==l&&(this.connected=l)}),o.setIncomingDataListener(a=>{var c,l,d;switch(a.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const u=a.type==="IsLinkedOK"?a.linked:void 0;(c=this.diagnostic)===null||c===void 0||c.log(Ke.EVENTS.LINKED,{sessionIdHash:Kt.Session.hash(t.id),linked:u,type:a.type,onlineGuests:a.onlineGuests}),this.linked=u||a.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(l=this.diagnostic)===null||l===void 0||l.log(Ke.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:Kt.Session.hash(t.id),metadata_keys:a&&a.metadata?Object.keys(a.metadata):void 0}),this.handleSessionMetadataUpdated(a.metadata);break}case"Event":{this.handleIncomingEvent(a);break}}a.id!==void 0&&((d=this.requestResolutions.get(a.id))===null||d===void 0||d(a))}),this.ws=o,this.http=new of.WalletLinkHTTP(r,t.id,t.key)}connect(){var t;if(this.destroyed)throw new Error("instance is destroyed");(t=this.diagnostic)===null||t===void 0||t.log(Ke.EVENTS.STARTED_CONNECTING,{sessionIdHash:Kt.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var t;this.destroyed=!0,this.ws.disconnect(),(t=this.diagnostic)===null||t===void 0||t.log(Ke.EVENTS.DISCONNECTED,{sessionIdHash:Kt.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(t){var r,n;this._connected=t,t&&((r=this.onceConnected)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.connectedUpdated(t)}setOnceConnected(t){return new Promise(r=>{this.connected?t().then(r):this.onceConnected=()=>{t().then(r),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(t){var r,n;this._linked=t,t&&((r=this.onceLinked)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.linkedUpdated(t)}setOnceLinked(t){return new Promise(r=>{this.linked?t().then(r):this.onceLinked=()=>{t().then(r),this.onceLinked=void 0}})}async handleIncomingEvent(t){var r,n;if(!(t.type!=="Event"||t.event!=="Web3Response"))try{const s=await this.cipher.decrypt(t.data),i=JSON.parse(s);if(i.type!=="WEB3_RESPONSE")return;(r=this.listener)===null||r===void 0||r.handleWeb3ResponseMessage(i)}catch{(n=this.diagnostic)===null||n===void 0||n.log(Ke.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(t=>setTimeout(t,250));try{await this.fetchUnseenEventsAPI()}catch(t){console.error("Unable to check for unseen events",t)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(r=>this.handleIncomingEvent(r))}async setSessionMetadata(t,r){const n={type:"SetSessionConfig",id:(0,Zt.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[t]:r}};return this.setOnceConnected(async()=>{const s=await this.makeRequest(n);if(s.type==="Fail")throw new Error(s.error||"failed to set session metadata")})}async publishEvent(t,r,n=!1){const s=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},r),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),i={type:"PublishEvent",id:(0,Zt.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:t,data:s,callWebhook:n};return this.setOnceLinked(async()=>{const o=await this.makeRequest(i);if(o.type==="Fail")throw new Error(o.error||"failed to publish event");return o.eventId})}sendData(t){this.ws.sendData(JSON.stringify(t))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>Ma*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(t,r=af){const n=t.id;this.sendData(t);let s;return Promise.race([new Promise((i,o)=>{s=window.setTimeout(()=>{o(new Error(`request ${n} timed out`))},r)}),new Promise(i=>{this.requestResolutions.set(n,o=>{clearTimeout(s),i(o),this.requestResolutions.delete(n)})})])}async authenticate(){const t={type:"HostSession",id:(0,Zt.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},r=await this.makeRequest(t);if(r.type==="Fail")throw new Error(r.error||"failed to authentcate")}sendIsLinked(){const t={type:"IsLinked",id:(0,Zt.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(t)}sendGetSessionConfig(){const t={type:"GetSessionConfig",id:(0,Zt.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(t)}}Xn.WalletLinkConnection=cf;var Xr={},en={},Mo={};Object.defineProperty(Mo,"__esModule",{value:!0});Mo.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}';var lf=F&&F.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(en,"__esModule",{value:!0});en.injectCssReset=void 0;const uf=lf(Mo);function df(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(uf.default)),document.documentElement.appendChild(e)}en.injectCssReset=df;var rs={},tn,ae,Pl,Ol,At,La,$l,go,Bl,Dr={},Lo=[],hf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ns=Array.isArray;function dt(e,t){for(var r in t)e[r]=t[r];return e}function Dl(e){var t=e.parentNode;t&&t.removeChild(e)}function _o(e,t,r){var n,s,i,o={};for(i in t)i=="key"?n=t[i]:i=="ref"?s=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?tn.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return Lr(e,o,n,s,null)}function Lr(e,t,r,n,s){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:s??++Pl,__i:-1,__u:0};return s==null&&ae.vnode!=null&&ae.vnode(i),i}function ff(){return{current:null}}function rn(e){return e.children}function Pr(e,t){this.props=e,this.context=t}function ur(e,t){if(t==null)return e.__?ur(e.__,e.__i+1):null;for(var r;tr?(bo(n,t,s),s.length=n.length=0,t=void 0,At.sort(go)):t&&ae.__c&&ae.__c(t,Lo));t&&bo(n,t,s),On.__r=0}function jl(e,t,r,n,s,i,o,a,c,l,d){var u,h,g,b,R,E=n&&n.__k||Lo,_=t.length;for(r.__d=c,gf(r,t,E),c=r.__d,u=0;u<_;u++)(g=r.__k[u])!=null&&typeof g!="boolean"&&typeof g!="function"&&(h=g.__i===-1?Dr:E[g.__i]||Dr,g.__i=u,Po(e,g,h,s,i,o,a,c,l,d),b=g.__e,g.ref&&h.ref!=g.ref&&(h.ref&&Oo(h.ref,null,g),d.push(g.ref,g.__c||b,g)),R==null&&b!=null&&(R=b),65536&g.__u||h.__k===g.__k?c=Hl(g,c,e):typeof g.type=="function"&&g.__d!==void 0?c=g.__d:b&&(c=b.nextSibling),g.__d=void 0,g.__u&=-196609);r.__d=c,r.__e=R}function gf(e,t,r){var n,s,i,o,a,c=t.length,l=r.length,d=l,u=0;for(e.__k=[],n=0;n0?Lr(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s)!=null?(s.__=e,s.__b=e.__b+1,a=_f(s,r,o=n+u,d),s.__i=a,i=null,a!==-1&&(d--,(i=r[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&u--,typeof s.type!="function"&&(s.__u|=65536)):a!==o&&(a===o+1?u++:a>o?d>c-o?u+=a-o:u--:u=a(c!=null&&!(131072&c.__u)?1:0))for(;o>=0||a=0){if((c=t[o])&&!(131072&c.__u)&&s==c.key&&i===c.type)return o;o--}if(a2&&(a.children=arguments.length>3?tn.call(arguments,2):r),Lr(e.type,a,n||e.key,s||e.ref,null)}function vf(e,t){var r={__c:t="__cC"+Bl++,__:e,Consumer:function(n,s){return n.children(s)},Provider:function(n){var s,i;return this.getChildContext||(s=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&s.some(function(a){a.__e=!0,mo(a)})},this.sub=function(o){s.push(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){s.splice(s.indexOf(o),1),a&&a.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}tn=Lo.slice,ae={__e:function(e,t,r,n){for(var s,i,o;t=t.__;)if((s=t.__c)&&!s.__)try{if((i=s.constructor)&&i.getDerivedStateFromError!=null&&(s.setState(i.getDerivedStateFromError(e)),o=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,n||{}),o=s.__d),o)return s.__E=s}catch(a){e=a}throw e}},Pl=0,Ol=function(e){return e!=null&&e.constructor==null},Pr.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=dt({},this.state),typeof e=="function"&&(e=e(dt({},r),this.props)),e&&dt(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),mo(this))},Pr.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),mo(this))},Pr.prototype.render=rn,At=[],$l=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,go=function(e,t){return e.__v.__b-t.__v.__b},On.__r=0,Bl=0;const wf=Object.freeze(Object.defineProperty({__proto__:null,Component:Pr,Fragment:rn,cloneElement:yf,createContext:vf,createElement:_o,createRef:ff,h:_o,hydrate:Vl,get isValidElement(){return Ol},get options(){return ae},render:Wl,toChildArray:Ul},Symbol.toStringTag,{value:"Module"})),Ne=Ur(wf);var ss={};function zl(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t=r.__.length&&r.__.push({__V:Nn}),r.__[e]}function Gl(e){return dr=1,Jl(Kl,e)}function Jl(e,t,r){var n=Ht(ft++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Kl(void 0,t),function(a){var c=n.__N?n.__N[0]:n.__[0],l=n.t(c,a);c!==l&&(n.__N=[l,n.__[1]],n.__c.setState({}))}],n.__c=le,!le.u)){var s=function(a,c,l){if(!n.__c.__H)return!0;var d=n.__c.__H.__.filter(function(h){return!!h.__c});if(d.every(function(h){return!h.__N}))return!i||i.call(this,a,c,l);var u=!1;return d.forEach(function(h){if(h.__N){var g=h.__[0];h.__=h.__N,h.__N=void 0,g!==h.__[0]&&(u=!0)}}),!(!u&&n.__c.props===a)&&(!i||i.call(this,a,c,l))};le.u=!0;var i=le.shouldComponentUpdate,o=le.componentWillUpdate;le.componentWillUpdate=function(a,c,l){if(this.__e){var d=i;i=void 0,s(a,c,l),i=d}o&&o.call(this,a,c,l)},le.shouldComponentUpdate=s}return n.__N||n.__}function Sf(e,t){var r=Ht(ft++,3);!pe.__s&&Bo(r.__H,t)&&(r.__=e,r.i=t,le.__H.__h.push(r))}function Zl(e,t){var r=Ht(ft++,4);!pe.__s&&Bo(r.__H,t)&&(r.__=e,r.i=t,le.__h.push(r))}function Rf(e){return dr=5,$o(function(){return{current:e}},[])}function Cf(e,t,r){dr=6,Zl(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function $o(e,t){var r=Ht(ft++,7);return Bo(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function kf(e,t){return dr=8,$o(function(){return e},t)}function If(e){var t=le.context[e.__c],r=Ht(ft++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(le)),t.props.value):e.__}function Af(e,t){pe.useDebugValue&&pe.useDebugValue(t?t(e):e)}function xf(e){var t=Ht(ft++,10),r=Gl();return t.__=e,le.componentDidCatch||(le.componentDidCatch=function(n,s){t.__&&t.__(n,s),r[1](n)}),[r[0],function(){r[1](void 0)}]}function Tf(){var e=Ht(ft++,11);if(!e.__){for(var t=le.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Nf(){for(var e;e=ql.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Mn),e.__H.__h.forEach(vo),e.__H.__h=[]}catch(t){e.__H.__h=[],pe.__e(t,e.__v)}}pe.__b=function(e){le=null,Fa&&Fa(e)},pe.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Va&&Va(e,t)},pe.__r=function(e){ja&&ja(e),ft=0;var t=(le=e.__c).__H;t&&(Pi===le?(t.__h=[],le.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Nn,r.__N=r.i=void 0})):(t.__h.forEach(Mn),t.__h.forEach(vo),t.__h=[],ft=0)),Pi=le},pe.diffed=function(e){Ha&&Ha(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ql.push(t)!==1&&Da===pe.requestAnimationFrame||((Da=pe.requestAnimationFrame)||Mf)(Nf)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Nn&&(r.__=r.__V),r.i=void 0,r.__V=Nn})),Pi=le=null},pe.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Mn),r.__h=r.__h.filter(function(n){return!n.__||vo(n)})}catch(n){t.some(function(s){s.__h&&(s.__h=[])}),t=[],pe.__e(n,r.__v)}}),Ua&&Ua(e,t)},pe.unmount=function(e){Wa&&Wa(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Mn(n)}catch(s){t=s}}),r.__H=void 0,t&&pe.__e(t,r.__v))};var za=typeof requestAnimationFrame=="function";function Mf(e){var t,r=function(){clearTimeout(n),za&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);za&&(t=requestAnimationFrame(r))}function Mn(e){var t=le,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),le=t}function vo(e){var t=le;e.__c=e.__(),le=t}function Bo(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Kl(e,t){return typeof t=="function"?t(e):t}const Lf=Object.freeze(Object.defineProperty({__proto__:null,useCallback:kf,useContext:If,useDebugValue:Af,useEffect:Sf,useErrorBoundary:xf,useId:Tf,useImperativeHandle:Cf,useLayoutEffect:Zl,useMemo:$o,useReducer:Jl,useRef:Rf,useState:Gl},Symbol.toStringTag,{value:"Module"})),is=Ur(Lf);var hr={},os={};Object.defineProperty(os,"__esModule",{value:!0});os.CloseIcon=void 0;const qa=Ne;function Pf(e){return(0,qa.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),(0,qa.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}os.CloseIcon=Pf;var as={};Object.defineProperty(as,"__esModule",{value:!0});as.CoinbaseWalletRound=void 0;const vn=Ne;function Of(e){return(0,vn.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),(0,vn.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,vn.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,vn.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}as.CoinbaseWalletRound=Of;var cs={};Object.defineProperty(cs,"__esModule",{value:!0});cs.QRCodeIcon=void 0;const Ar=Ne;function $f(e){return(0,Ar.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),(0,Ar.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,Ar.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,Ar.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,Ar.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}cs.QRCodeIcon=$f;var ls={};function Ql(e){this.mode=Pe.MODE_8BIT_BYTE,this.data=e,this.parsedData=[];for(var t=0,r=this.data.length;t65536?(n[0]=240|(s&1835008)>>>18,n[1]=128|(s&258048)>>>12,n[2]=128|(s&4032)>>>6,n[3]=128|s&63):s>2048?(n[0]=224|(s&61440)>>>12,n[1]=128|(s&4032)>>>6,n[2]=128|s&63):s>128?(n[0]=192|(s&1984)>>>6,n[1]=128|s&63):n[0]=s,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}Ql.prototype={getLength:function(e){return this.parsedData.length},write:function(e){for(var t=0,r=this.parsedData.length;t=7&&this.setupTypeNumber(e),this.dataCache==null&&(this.dataCache=rt.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var r=-1;r<=7;r++)if(!(e+r<=-1||this.moduleCount<=e+r))for(var n=-1;n<=7;n++)t+n<=-1||this.moduleCount<=t+n||(0<=r&&r<=6&&(n==0||n==6)||0<=n&&n<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=n&&n<=4?this.modules[e+r][t+n]=!0:this.modules[e+r][t+n]=!1)},getBestMaskPattern:function(){for(var e=0,t=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=fe.getLostPoint(this);(r==0||e>n)&&(e=n,t=r)}return t},createMovieClip:function(e,t,r){var n=e.createEmptyMovieClip(t,r),s=1;this.make();for(var i=0;i>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(var r=0;r<18;r++){var n=!e&&(t>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},setupTypeInfo:function(e,t){for(var r=this.errorCorrectLevel<<3|t,n=fe.getBCHTypeInfo(r),s=0;s<15;s++){var i=!e&&(n>>s&1)==1;s<6?this.modules[s][8]=i:s<8?this.modules[s+1][8]=i:this.modules[this.moduleCount-15+s][8]=i}for(var s=0;s<15;s++){var i=!e&&(n>>s&1)==1;s<8?this.modules[8][this.moduleCount-s-1]=i:s<9?this.modules[8][15-s-1+1]=i:this.modules[8][15-s-1]=i}this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var r=-1,n=this.moduleCount-1,s=7,i=0,o=this.moduleCount-1;o>0;o-=2)for(o==6&&o--;;){for(var a=0;a<2;a++)if(this.modules[n][o-a]==null){var c=!1;i>>s&1)==1);var l=fe.getMask(t,n,o-a);l&&(c=!c),this.modules[n][o-a]=c,s--,s==-1&&(i++,s=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}}};rt.PAD0=236;rt.PAD1=17;rt.createData=function(e,t,r){for(var n=tt.getRSBlocks(e,t),s=new Yl,i=0;ia*8)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+a*8+")");for(s.getLengthInBits()+4<=a*8&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=a*8||(s.put(rt.PAD0,8),s.getLengthInBits()>=a*8));)s.put(rt.PAD1,8);return rt.createBytes(s,n)};rt.createBytes=function(e,t){for(var r=0,n=0,s=0,i=new Array(t.length),o=new Array(t.length),a=0;a=0?g.get(b):0}}for(var R=0,d=0;d=0;)t^=fe.G15<=0;)t^=fe.G18<>>=1;return t},getPatternPosition:function(e){return fe.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,r){switch(e){case _t.PATTERN000:return(t+r)%2==0;case _t.PATTERN001:return t%2==0;case _t.PATTERN010:return r%3==0;case _t.PATTERN011:return(t+r)%3==0;case _t.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case _t.PATTERN101:return t*r%2+t*r%3==0;case _t.PATTERN110:return(t*r%2+t*r%3)%2==0;case _t.PATTERN111:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new nr([1],0),r=0;r5&&(r+=3+i-5)}for(var n=0;n=256;)e-=255;return Ee.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var Re=0;Re<8;Re++)Ee.EXP_TABLE[Re]=1<>>7-e%8&1)==1},put:function(e,t){for(var r=0;r>>t-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Oi=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function Xl(e){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof e=="string"&&(e={content:e}),e)for(var t in e)this.options[t]=e[t];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function r(c){switch(c){case"L":return yt.L;case"M":return yt.M;case"Q":return yt.Q;case"H":return yt.H;default:throw new Error("Unknwon error correction level: "+c)}}function n(c,l){for(var d=s(c),u=1,h=0,g=0,b=Oi.length;g<=b;g++){var R=Oi[g];if(!R)throw new Error("Content too long: expected "+h+" but got "+d);switch(l){case"L":h=R[0];break;case"M":h=R[1];break;case"Q":h=R[2];break;case"H":h=R[3];break;default:throw new Error("Unknwon error correction level: "+l)}if(d<=h)break;u++}if(u>Oi.length)throw new Error("Content too long");return u}function s(c){var l=encodeURI(c).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return l.length+(l.length!=c?3:0)}var i=this.options.content,o=n(i,this.options.ecl),a=r(this.options.ecl);this.qrcode=new rt(o,a),this.qrcode.addData(i),this.qrcode.make()}Xl.prototype.svg=function(e){var t=this.options||{},r=this.qrcode.modules;typeof e>"u"&&(e={container:t.container||"svg"});for(var n=typeof t.pretty<"u"?!!t.pretty:!0,s=n?" ":"",i=n?`\r +import{c as F,b as jn,B as G,r as Hn,i as qe,g as Ur,p as ne,t as Ad,e as xd,a as Td}from"./index-DWoPfkS0.js";import{e as Un,r as fl}from"./___vite-browser-external_commonjs-proxy-BL634x_A.js";function Nd(e,t){for(var r=0;rn[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var xo={},Br={},Wn={};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.walletLogo=void 0;const Md=(e,t)=>{let r;switch(e){case"standard":return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};Wn.walletLogo=Md;var Vn={};Object.defineProperty(Vn,"__esModule",{value:!0});Vn.LINK_API_URL=void 0;Vn.LINK_API_URL="https://www.walletlink.org";var O={},Wr={},ht={};Object.defineProperty(ht,"__esModule",{value:!0});ht.errorValues=ht.standardErrorCodes=void 0;ht.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}};ht.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}};var zn={},qn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=e.getErrorCode=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=ht,r="Unspecified error message.";e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function n(h,g=r){if(h&&Number.isInteger(h)){const b=h.toString();if(d(t.errorValues,b))return t.errorValues[b].message;if(c(h))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return g}e.getMessageFromCode=n;function s(h){if(!Number.isInteger(h))return!1;const g=h.toString();return!!(t.errorValues[g]||c(h))}e.isValidCode=s;function i(h){var g;if(typeof h=="number")return h;if(o(h))return(g=h.code)!==null&&g!==void 0?g:h.errorCode}e.getErrorCode=i;function o(h){return typeof h=="object"&&h!==null&&(typeof h.code=="number"||typeof h.errorCode=="number")}function a(h,{shouldIncludeStack:g=!1}={}){const b={};if(h&&typeof h=="object"&&!Array.isArray(h)&&d(h,"code")&&s(h.code)){const R=h;b.code=R.code,R.message&&typeof R.message=="string"?(b.message=R.message,d(R,"data")&&(b.data=R.data)):(b.message=n(b.code),b.data={originalError:l(h)})}else b.code=t.standardErrorCodes.rpc.internal,b.message=u(h,"message")?h.message:r,b.data={originalError:l(h)};return g&&(b.stack=u(h,"stack")?h.stack:void 0),b}e.serialize=a;function c(h){return h>=-32099&&h<=-32e3}function l(h){return h&&typeof h=="object"&&!Array.isArray(h)?Object.assign({},h):h}function d(h,g){return Object.prototype.hasOwnProperty.call(h,g)}function u(h,g){return typeof h=="object"&&h!==null&&g in h&&typeof h[g]=="string"}})(qn);Object.defineProperty(zn,"__esModule",{value:!0});zn.standardErrors=void 0;const Se=ht,pl=qn;zn.standardErrors={rpc:{parse:e=>$e(Se.standardErrorCodes.rpc.parse,e),invalidRequest:e=>$e(Se.standardErrorCodes.rpc.invalidRequest,e),invalidParams:e=>$e(Se.standardErrorCodes.rpc.invalidParams,e),methodNotFound:e=>$e(Se.standardErrorCodes.rpc.methodNotFound,e),internal:e=>$e(Se.standardErrorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return $e(t,e)},invalidInput:e=>$e(Se.standardErrorCodes.rpc.invalidInput,e),resourceNotFound:e=>$e(Se.standardErrorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>$e(Se.standardErrorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>$e(Se.standardErrorCodes.rpc.transactionRejected,e),methodNotSupported:e=>$e(Se.standardErrorCodes.rpc.methodNotSupported,e),limitExceeded:e=>$e(Se.standardErrorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>Jt(Se.standardErrorCodes.provider.userRejectedRequest,e),unauthorized:e=>Jt(Se.standardErrorCodes.provider.unauthorized,e),unsupportedMethod:e=>Jt(Se.standardErrorCodes.provider.unsupportedMethod,e),disconnected:e=>Jt(Se.standardErrorCodes.provider.disconnected,e),chainDisconnected:e=>Jt(Se.standardErrorCodes.provider.chainDisconnected,e),unsupportedChain:e=>Jt(Se.standardErrorCodes.provider.unsupportedChain,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new ml(t,r,n)}}};function $e(e,t){const[r,n]=gl(t);return new _l(e,r||(0,pl.getMessageFromCode)(e),n)}function Jt(e,t){const[r,n]=gl(t);return new ml(e,r||(0,pl.getMessageFromCode)(e),n)}function gl(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}let _l=class extends Error{constructor(t,r,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=t,n!==void 0&&(this.data=n)}},ml=class extends _l{constructor(t,r,n){if(!Ld(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,n)}};function Ld(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}var Gn={},mr={};Object.defineProperty(mr,"__esModule",{value:!0});mr.isErrorResponse=void 0;function Pd(e){return e.errorMessage!==void 0}mr.isErrorResponse=Pd;var br={};Object.defineProperty(br,"__esModule",{value:!0});br.LIB_VERSION=void 0;br.LIB_VERSION="3.9.1";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.serializeError=void 0;const Od=mr,$d=br,Bd=ht,Dd=qn;function Fd(e,t){const r=(0,Dd.serialize)(jd(e),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");n.searchParams.set("version",$d.LIB_VERSION),n.searchParams.set("code",r.code.toString());const s=Hd(r.data,t);return s&&n.searchParams.set("method",s),n.searchParams.set("message",r.message),Object.assign(Object.assign({},r),{docUrl:n.href})}Gn.serializeError=Fd;function jd(e){return typeof e=="string"?{message:e,code:Bd.standardErrorCodes.rpc.internal}:(0,Od.isErrorResponse)(e)?Object.assign(Object.assign({},e),{message:e.errorMessage,code:e.errorCode,data:{method:e.method}}):e}function Hd(e,t){const r=e==null?void 0:e.method;if(r)return r;if(t!==void 0){if(typeof t=="string")return t;if(Array.isArray(t)){if(t.length>0)return t[0].method}else return t.method}}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=e.serializeError=e.getMessageFromCode=e.getErrorCode=void 0;const t=ht;Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return t.standardErrorCodes}});const r=zn;Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return r.standardErrors}});const n=Gn;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}});const s=qn;Object.defineProperty(e,"getErrorCode",{enumerable:!0,get:function(){return s.getErrorCode}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return s.getMessageFromCode}})})(Wr);var be={};Object.defineProperty(be,"__esModule",{value:!0});be.ProviderType=be.RegExpString=be.IntNumber=be.BigIntString=be.AddressString=be.HexString=be.OpaqueType=void 0;function Vr(){return e=>e}be.OpaqueType=Vr;be.HexString=Vr();be.AddressString=Vr();be.BigIntString=Vr();function Ud(e){return Math.floor(e)}be.IntNumber=Ud;be.RegExpString=Vr();var ya;(function(e){e.CoinbaseWallet="CoinbaseWallet",e.MetaMask="MetaMask",e.Unselected=""})(ya||(be.ProviderType=ya={}));var Wd=F&&F.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(O,"__esModule",{value:!0});O.isMobileWeb=O.getLocation=O.isInIFrame=O.createQrUrl=O.getFavicon=O.range=O.isBigNumber=O.ensureParsedJSONObject=O.ensureBN=O.ensureRegExpString=O.ensureIntNumber=O.ensureBuffer=O.ensureAddressString=O.ensureEvenLengthHexString=O.ensureHexString=O.isHexString=O.prepend0x=O.strip0x=O.has0xPrefix=O.hexStringFromIntNumber=O.intNumberFromHexString=O.bigIntStringFromBN=O.hexStringFromBuffer=O.hexStringToUint8Array=O.uint8ArrayToHex=O.randomBytesHex=void 0;const bt=Wd(jn),Ft=Wr,je=be,bl=/^[0-9]*$/,yl=/^[a-f0-9]*$/;function Vd(e){return vl(crypto.getRandomValues(new Uint8Array(e)))}O.randomBytesHex=Vd;function vl(e){return[...e].map(t=>t.toString(16).padStart(2,"0")).join("")}O.uint8ArrayToHex=vl;function zd(e){return new Uint8Array(e.match(/.{1,2}/g).map(t=>parseInt(t,16)))}O.hexStringToUint8Array=zd;function qd(e,t=!1){const r=e.toString("hex");return(0,je.HexString)(t?`0x${r}`:r)}O.hexStringFromBuffer=qd;function Gd(e){return(0,je.BigIntString)(e.toString(10))}O.bigIntStringFromBN=Gd;function Jd(e){return(0,je.IntNumber)(new bt.default(qr(e,!1),16).toNumber())}O.intNumberFromHexString=Jd;function Zd(e){return(0,je.HexString)(`0x${new bt.default(e).toString(16)}`)}O.hexStringFromIntNumber=Zd;function To(e){return e.startsWith("0x")||e.startsWith("0X")}O.has0xPrefix=To;function Jn(e){return To(e)?e.slice(2):e}O.strip0x=Jn;function wl(e){return To(e)?`0x${e.slice(2)}`:`0x${e}`}O.prepend0x=wl;function zr(e){if(typeof e!="string")return!1;const t=Jn(e).toLowerCase();return yl.test(t)}O.isHexString=zr;function El(e,t=!1){if(typeof e=="string"){const r=Jn(e).toLowerCase();if(yl.test(r))return(0,je.HexString)(t?`0x${r}`:r)}throw Ft.standardErrors.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}O.ensureHexString=El;function qr(e,t=!1){let r=El(e,!1);return r.length%2===1&&(r=(0,je.HexString)(`0${r}`)),t?(0,je.HexString)(`0x${r}`):r}O.ensureEvenLengthHexString=qr;function Kd(e){if(typeof e=="string"){const t=Jn(e).toLowerCase();if(zr(t)&&t.length===40)return(0,je.AddressString)(wl(t))}throw Ft.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(e)}`)}O.ensureAddressString=Kd;function Qd(e){if(G.isBuffer(e))return e;if(typeof e=="string"){if(zr(e)){const t=qr(e,!1);return G.from(t,"hex")}return G.from(e,"utf8")}throw Ft.standardErrors.rpc.invalidParams(`Not binary data: ${String(e)}`)}O.ensureBuffer=Qd;function Sl(e){if(typeof e=="number"&&Number.isInteger(e))return(0,je.IntNumber)(e);if(typeof e=="string"){if(bl.test(e))return(0,je.IntNumber)(Number(e));if(zr(e))return(0,je.IntNumber)(new bt.default(qr(e,!1),16).toNumber())}throw Ft.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}O.ensureIntNumber=Sl;function Yd(e){if(e instanceof RegExp)return(0,je.RegExpString)(e.toString());throw Ft.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(e)}`)}O.ensureRegExpString=Yd;function Xd(e){if(e!==null&&(bt.default.isBN(e)||Rl(e)))return new bt.default(e.toString(10),10);if(typeof e=="number")return new bt.default(Sl(e));if(typeof e=="string"){if(bl.test(e))return new bt.default(e,10);if(zr(e))return new bt.default(qr(e,!1),16)}throw Ft.standardErrors.rpc.invalidParams(`Not an integer: ${String(e)}`)}O.ensureBN=Xd;function eh(e){if(typeof e=="string")return JSON.parse(e);if(typeof e=="object")return e;throw Ft.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(e)}`)}O.ensureParsedJSONObject=eh;function Rl(e){if(e==null||typeof e.constructor!="function")return!1;const{constructor:t}=e;return typeof t.config=="function"&&typeof t.EUCLID=="number"}O.isBigNumber=Rl;function th(e,t){return Array.from({length:t-e},(r,n)=>e+n)}O.range=th;function rh(){const e=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:t,host:r}=document.location,n=e?e.getAttribute("href"):null;return!n||n.startsWith("javascript:")||n.startsWith("vbscript:")?null:n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")?n:n.startsWith("//")?t+n:`${t}//${r}${n}`}O.getFavicon=rh;function nh(e,t,r,n,s,i){const o=n?"parent-id":"id",a=new URLSearchParams({[o]:e,secret:t,server:r,v:s,chainId:i.toString()}).toString();return`${r}/#/link?${a}`}O.createQrUrl=nh;function Cl(){try{return window.frameElement!==null}catch{return!1}}O.isInIFrame=Cl;function sh(){try{return Cl()&&window.top?window.top.location:window.location}catch{return window.location}}O.getLocation=sh;function ih(){var e;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((e=window==null?void 0:window.navigator)===null||e===void 0?void 0:e.userAgent)}O.isMobileWeb=ih;var Zn={};Object.defineProperty(Zn,"__esModule",{value:!0});Zn.ScopedLocalStorage=void 0;class oh{constructor(t){this.scope=t}setItem(t,r){localStorage.setItem(this.scopedKey(t),r)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),r=[];for(let n=0;nlocalStorage.removeItem(n))}scopedKey(t){return`${this.scope}:${t}`}}Zn.ScopedLocalStorage=oh;var cr={},Gr={},Jr={},yr={};Object.defineProperty(yr,"__esModule",{value:!0});yr.EVENTS=void 0;yr.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"};var Fe={};Object.defineProperty(Fe,"__esModule",{value:!0});Fe.RelayAbstract=Fe.APP_VERSION_KEY=Fe.LOCAL_STORAGE_ADDRESSES_KEY=Fe.WALLET_USER_NAME_KEY=void 0;const va=Wr;Fe.WALLET_USER_NAME_KEY="walletUsername";Fe.LOCAL_STORAGE_ADDRESSES_KEY="Addresses";Fe.APP_VERSION_KEY="AppVersion";class ah{async makeEthereumJSONRPCRequest(t,r){if(!r)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(r,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{if(!n)throw va.standardErrors.rpc.parse({});const s=n,{error:i}=s;if(i)throw(0,va.serializeError)(i,t.method);return s})}}Fe.RelayAbstract=ah;var vr={},kl={exports:{}},po={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh */(function(e,t){var r=Hn,n=r.Buffer;function s(o,a){for(var c in o)a[c]=o[c]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(s(r,t),t.Buffer=i);function i(o,a,c){return n(o,a,c)}i.prototype=Object.create(n.prototype),s(n,i),i.from=function(o,a,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,c)},i.alloc=function(o,a,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var l=n(o);return a!==void 0?typeof c=="string"?l.fill(a,c):l.fill(a):l.fill(0),l},i.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},i.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}})(po,po.exports);var Et=po.exports,Il=Et.Buffer;function Kn(e,t){this._block=Il.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}Kn.prototype.update=function(e,t){typeof e=="string"&&(t=t||"utf8",e=Il.from(e,t));for(var r=this._block,n=this._blockSize,s=e.length,i=this._len,o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,s=(r-n)/4294967296;this._block.writeUInt32BE(s,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i};Kn.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var wr=Kn,ch=qe,Al=wr,lh=Et.Buffer,uh=[1518500249,1859775393,-1894007588,-899497514],dh=new Array(80);function Zr(){this.init(),this._w=dh,Al.call(this,64,56)}ch(Zr,Al);Zr.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function hh(e){return e<<5|e>>>27}function fh(e){return e<<30|e>>>2}function ph(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}Zr.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,s=this._c|0,i=this._d|0,o=this._e|0,a=0;a<16;++a)t[a]=e.readInt32BE(a*4);for(;a<80;++a)t[a]=t[a-3]^t[a-8]^t[a-14]^t[a-16];for(var c=0;c<80;++c){var l=~~(c/20),d=hh(r)+ph(l,n,s,i)+o+t[c]+uh[l]|0;o=i,i=s,s=fh(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=i+this._d|0,this._e=o+this._e|0};Zr.prototype._hash=function(){var e=lh.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var gh=Zr,_h=qe,xl=wr,mh=Et.Buffer,bh=[1518500249,1859775393,-1894007588,-899497514],yh=new Array(80);function Kr(){this.init(),this._w=yh,xl.call(this,64,56)}_h(Kr,xl);Kr.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function vh(e){return e<<1|e>>>31}function wh(e){return e<<5|e>>>27}function Eh(e){return e<<30|e>>>2}function Sh(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}Kr.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,s=this._c|0,i=this._d|0,o=this._e|0,a=0;a<16;++a)t[a]=e.readInt32BE(a*4);for(;a<80;++a)t[a]=vh(t[a-3]^t[a-8]^t[a-14]^t[a-16]);for(var c=0;c<80;++c){var l=~~(c/20),d=wh(r)+Sh(l,n,s,i)+o+t[c]+bh[l]|0;o=i,i=s,s=Eh(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=i+this._d|0,this._e=o+this._e|0};Kr.prototype._hash=function(){var e=mh.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};var Rh=Kr,Ch=qe,Tl=wr,kh=Et.Buffer,Ih=[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],Ah=new Array(64);function Qr(){this.init(),this._w=Ah,Tl.call(this,64,56)}Ch(Qr,Tl);Qr.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function xh(e,t,r){return r^e&(t^r)}function Th(e,t,r){return e&t|r&(e|t)}function Nh(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function Mh(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function Lh(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function Ph(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}Qr.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,s=this._c|0,i=this._d|0,o=this._e|0,a=this._f|0,c=this._g|0,l=this._h|0,d=0;d<16;++d)t[d]=e.readInt32BE(d*4);for(;d<64;++d)t[d]=Ph(t[d-2])+t[d-7]+Lh(t[d-15])+t[d-16]|0;for(var u=0;u<64;++u){var h=l+Mh(o)+xh(o,a,c)+Ih[u]+t[u]|0,g=Nh(r)+Th(r,n,s)|0;l=c,c=a,a=o,o=i+h|0,i=s,s=n,n=r,r=h+g|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=i+this._d|0,this._e=o+this._e|0,this._f=a+this._f|0,this._g=c+this._g|0,this._h=l+this._h|0};Qr.prototype._hash=function(){var e=kh.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};var Nl=Qr,Oh=qe,$h=Nl,Bh=wr,Dh=Et.Buffer,Fh=new Array(64);function Qn(){this.init(),this._w=Fh,Bh.call(this,64,56)}Oh(Qn,$h);Qn.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};Qn.prototype._hash=function(){var e=Dh.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};var jh=Qn,Hh=qe,Ml=wr,Uh=Et.Buffer,wa=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],Wh=new Array(160);function Yr(){this.init(),this._w=Wh,Ml.call(this,128,112)}Hh(Yr,Ml);Yr.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function Ea(e,t,r){return r^e&(t^r)}function Sa(e,t,r){return e&t|r&(e|t)}function Ra(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function Ca(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function Vh(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function zh(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function qh(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function Gh(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function ve(e,t){return e>>>0>>0?1:0}Yr.prototype._update=function(e){for(var t=this._w,r=this._ah|0,n=this._bh|0,s=this._ch|0,i=this._dh|0,o=this._eh|0,a=this._fh|0,c=this._gh|0,l=this._hh|0,d=this._al|0,u=this._bl|0,h=this._cl|0,g=this._dl|0,b=this._el|0,R=this._fl|0,E=this._gl|0,_=this._hl|0,m=0;m<32;m+=2)t[m]=e.readInt32BE(m*4),t[m+1]=e.readInt32BE(m*4+4);for(;m<160;m+=2){var y=t[m-30],C=t[m-15*2+1],S=Vh(y,C),I=zh(C,y);y=t[m-2*2],C=t[m-2*2+1];var j=qh(y,C),$=Gh(C,y),N=t[m-7*2],J=t[m-7*2+1],de=t[m-16*2],oe=t[m-16*2+1],T=I+J|0,x=S+N+ve(T,I)|0;T=T+$|0,x=x+j+ve(T,$)|0,T=T+oe|0,x=x+de+ve(T,oe)|0,t[m]=x,t[m+1]=T}for(var P=0;P<160;P+=2){x=t[P],T=t[P+1];var D=Sa(r,n,s),B=Sa(d,u,h),L=Ra(r,d),H=Ra(d,r),Z=Ca(o,b),W=Ca(b,o),Y=wa[P],ce=wa[P+1],se=Ea(o,a,c),Ie=Ea(b,R,E),v=_+W|0,w=l+Z+ve(v,_)|0;v=v+Ie|0,w=w+se+ve(v,Ie)|0,v=v+ce|0,w=w+Y+ve(v,ce)|0,v=v+T|0,w=w+x+ve(v,T)|0;var A=H+B|0,U=L+D+ve(A,H)|0;l=c,_=E,c=a,E=R,a=o,R=b,b=g+v|0,o=i+w+ve(b,g)|0,i=s,g=h,s=n,h=u,n=r,u=d,d=v+A|0,r=w+U+ve(d,v)|0}this._al=this._al+d|0,this._bl=this._bl+u|0,this._cl=this._cl+h|0,this._dl=this._dl+g|0,this._el=this._el+b|0,this._fl=this._fl+R|0,this._gl=this._gl+E|0,this._hl=this._hl+_|0,this._ah=this._ah+r+ve(this._al,d)|0,this._bh=this._bh+n+ve(this._bl,u)|0,this._ch=this._ch+s+ve(this._cl,h)|0,this._dh=this._dh+i+ve(this._dl,g)|0,this._eh=this._eh+o+ve(this._el,b)|0,this._fh=this._fh+a+ve(this._fl,R)|0,this._gh=this._gh+c+ve(this._gl,E)|0,this._hh=this._hh+l+ve(this._hl,_)|0};Yr.prototype._hash=function(){var e=Uh.allocUnsafe(64);function t(r,n,s){e.writeInt32BE(r,s),e.writeInt32BE(n,s+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};var Ll=Yr,Jh=qe,Zh=Ll,Kh=wr,Qh=Et.Buffer,Yh=new Array(160);function Yn(){this.init(),this._w=Yh,Kh.call(this,128,112)}Jh(Yn,Zh);Yn.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};Yn.prototype._hash=function(){var e=Qh.allocUnsafe(48);function t(r,n,s){e.writeInt32BE(r,s),e.writeInt32BE(n,s+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};var Xh=Yn,jt=kl.exports=function(t){t=t.toLowerCase();var r=jt[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r};jt.sha=gh;jt.sha1=Rh;jt.sha224=jh;jt.sha256=Nl;jt.sha384=Xh;jt.sha512=Ll;var ef=kl.exports;Object.defineProperty(vr,"__esModule",{value:!0});vr.Session=void 0;const ka=ef,Ia=O,Aa="session:id",xa="session:secret",Ta="session:linked";class No{constructor(t,r,n,s){this._storage=t,this._id=r||(0,Ia.randomBytesHex)(16),this._secret=n||(0,Ia.randomBytesHex)(32),this._key=new ka.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!s}static load(t){const r=t.getItem(Aa),n=t.getItem(Ta),s=t.getItem(xa);return r&&s?new No(t,r,s,n==="1"):null}static hash(t){return new ka.sha256().update(t).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(t){this._linked=t,this.persistLinked()}save(){return this._storage.setItem(Aa,this._id),this._storage.setItem(xa,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(Ta,this._linked?"1":"0")}}vr.Session=No;var Xn={},es={};Object.defineProperty(es,"__esModule",{value:!0});es.Cipher=void 0;const mn=O;class tf{constructor(t){this.secret=t}async encrypt(t){const r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),s=await crypto.subtle.importKey("raw",(0,mn.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),i=new TextEncoder,o=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},s,i.encode(t)),a=16,c=o.slice(o.byteLength-a),l=o.slice(0,o.byteLength-a),d=new Uint8Array(c),u=new Uint8Array(l),h=new Uint8Array([...n,...d,...u]);return(0,mn.uint8ArrayToHex)(h)}async decrypt(t){const r=this.secret;if(r.length!==64)throw Error("secret must be 256 bits");return new Promise((n,s)=>{(async function(){const i=await crypto.subtle.importKey("raw",(0,mn.hexStringToUint8Array)(r),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,mn.hexStringToUint8Array)(t),a=o.slice(0,12),c=o.slice(12,28),l=o.slice(28),d=new Uint8Array([...l,...c]),u={name:"AES-GCM",iv:new Uint8Array(a)};try{const h=await window.crypto.subtle.decrypt(u,i,d),g=new TextDecoder;n(g.decode(h))}catch(h){s(h)}})()})}}es.Cipher=tf;var ts={};Object.defineProperty(ts,"__esModule",{value:!0});ts.WalletLinkHTTP=void 0;class rf{constructor(t,r,n){this.linkAPIUrl=t,this.sessionId=r;const s=`${r}:${n}`;this.auth=`Basic ${btoa(s)}`}async markUnseenEventsAsSeen(t){return Promise.all(t.map(r=>fetch(`${this.linkAPIUrl}/events/${r.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(r=>console.error("Unabled to mark event as failed:",r))}async fetchUnseenEvents(){var t;const r=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(r.ok){const{events:n,error:s}=await r.json();if(s)throw new Error(`Check unseen events failed: ${s}`);const i=(t=n==null?void 0:n.filter(o=>o.event==="Web3Response").map(o=>({type:"Event",sessionId:this.sessionId,eventId:o.id,event:o.event,data:o.data})))!==null&&t!==void 0?t:[];return this.markUnseenEventsAsSeen(i),i}throw new Error(`Check unseen events failed: ${r.status}`)}}ts.WalletLinkHTTP=rf;var lr={};Object.defineProperty(lr,"__esModule",{value:!0});lr.WalletLinkWebSocket=lr.ConnectionState=void 0;var rr;(function(e){e[e.DISCONNECTED=0]="DISCONNECTED",e[e.CONNECTING=1]="CONNECTING",e[e.CONNECTED=2]="CONNECTED"})(rr||(lr.ConnectionState=rr={}));class nf{setConnectionStateListener(t){this.connectionStateListener=t}setIncomingDataListener(t){this.incomingDataListener=t}constructor(t,r=WebSocket){this.WebSocketClass=r,this.webSocket=null,this.pendingData=[],this.url=t.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((t,r)=>{var n;let s;try{this.webSocket=s=new this.WebSocketClass(this.url)}catch(i){r(i);return}(n=this.connectionStateListener)===null||n===void 0||n.call(this,rr.CONNECTING),s.onclose=i=>{var o;this.clearWebSocket(),r(new Error(`websocket error ${i.code}: ${i.reason}`)),(o=this.connectionStateListener)===null||o===void 0||o.call(this,rr.DISCONNECTED)},s.onopen=i=>{var o;t(),(o=this.connectionStateListener)===null||o===void 0||o.call(this,rr.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(c=>this.sendData(c)),this.pendingData=[])},s.onmessage=i=>{var o,a;if(i.data==="h")(o=this.incomingDataListener)===null||o===void 0||o.call(this,{type:"Heartbeat"});else try{const c=JSON.parse(i.data);(a=this.incomingDataListener)===null||a===void 0||a.call(this,c)}catch{}}})}disconnect(){var t;const{webSocket:r}=this;if(r){this.clearWebSocket(),(t=this.connectionStateListener)===null||t===void 0||t.call(this,rr.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{r.close()}catch{}}}sendData(t){const{webSocket:r}=this;if(!r){this.pendingData.push(t),this.connect();return}r.send(t)}clearWebSocket(){const{webSocket:t}=this;t&&(this.webSocket=null,t.onclose=null,t.onerror=null,t.onmessage=null,t.onopen=null)}}lr.WalletLinkWebSocket=nf;Object.defineProperty(Xn,"__esModule",{value:!0});Xn.WalletLinkConnection=void 0;const Zt=be,sf=es,Ke=yr,Na=Fe,Kt=vr,of=ts,bn=lr,Ma=1e4,af=6e4;class cf{constructor({session:t,linkAPIUrl:r,listener:n,diagnostic:s,WebSocketClass:i=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,Zt.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=a=>{if(!a)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",l=>a.JsonRpcUrl&&this.handleChainUpdated(l,a.JsonRpcUrl)]]).forEach((l,d)=>{const u=a[d];u!==void 0&&l(u)})},this.handleDestroyed=a=>{var c,l;a==="1"&&((c=this.listener)===null||c===void 0||c.resetAndReload(),(l=this.diagnostic)===null||l===void 0||l.log(Ke.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:Kt.Session.hash(this.session.id)}))},this.handleAccountUpdated=async a=>{var c,l;try{const d=await this.cipher.decrypt(a);(c=this.listener)===null||c===void 0||c.accountUpdated(d)}catch{(l=this.diagnostic)===null||l===void 0||l.log(Ke.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(a,c)=>{var l,d;try{const u=await this.cipher.decrypt(c);(l=this.listener)===null||l===void 0||l.metadataUpdated(a,u)}catch{(d=this.diagnostic)===null||d===void 0||d.log(Ke.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:a})}},this.handleWalletUsernameUpdated=async a=>{this.handleMetadataUpdated(Na.WALLET_USER_NAME_KEY,a)},this.handleAppVersionUpdated=async a=>{this.handleMetadataUpdated(Na.APP_VERSION_KEY,a)},this.handleChainUpdated=async(a,c)=>{var l,d;try{const u=await this.cipher.decrypt(a),h=await this.cipher.decrypt(c);(l=this.listener)===null||l===void 0||l.chainUpdated(u,h)}catch{(d=this.diagnostic)===null||d===void 0||d.log(Ke.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=t,this.cipher=new sf.Cipher(t.secret),this.diagnostic=s,this.listener=n;const o=new bn.WalletLinkWebSocket(`${r}/rpc`,i);o.setConnectionStateListener(async a=>{var c;(c=this.diagnostic)===null||c===void 0||c.log(Ke.EVENTS.CONNECTED_STATE_CHANGE,{state:a,sessionIdHash:Kt.Session.hash(t.id)});let l=!1;switch(a){case bn.ConnectionState.DISCONNECTED:if(!this.destroyed){const d=async()=>{await new Promise(u=>setTimeout(u,5e3)),this.destroyed||o.connect().catch(()=>{d()})};d()}break;case bn.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),l=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},Ma),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case bn.ConnectionState.CONNECTING:break}this.connected!==l&&(this.connected=l)}),o.setIncomingDataListener(a=>{var c,l,d;switch(a.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const u=a.type==="IsLinkedOK"?a.linked:void 0;(c=this.diagnostic)===null||c===void 0||c.log(Ke.EVENTS.LINKED,{sessionIdHash:Kt.Session.hash(t.id),linked:u,type:a.type,onlineGuests:a.onlineGuests}),this.linked=u||a.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(l=this.diagnostic)===null||l===void 0||l.log(Ke.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:Kt.Session.hash(t.id),metadata_keys:a&&a.metadata?Object.keys(a.metadata):void 0}),this.handleSessionMetadataUpdated(a.metadata);break}case"Event":{this.handleIncomingEvent(a);break}}a.id!==void 0&&((d=this.requestResolutions.get(a.id))===null||d===void 0||d(a))}),this.ws=o,this.http=new of.WalletLinkHTTP(r,t.id,t.key)}connect(){var t;if(this.destroyed)throw new Error("instance is destroyed");(t=this.diagnostic)===null||t===void 0||t.log(Ke.EVENTS.STARTED_CONNECTING,{sessionIdHash:Kt.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var t;this.destroyed=!0,this.ws.disconnect(),(t=this.diagnostic)===null||t===void 0||t.log(Ke.EVENTS.DISCONNECTED,{sessionIdHash:Kt.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(t){var r,n;this._connected=t,t&&((r=this.onceConnected)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.connectedUpdated(t)}setOnceConnected(t){return new Promise(r=>{this.connected?t().then(r):this.onceConnected=()=>{t().then(r),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(t){var r,n;this._linked=t,t&&((r=this.onceLinked)===null||r===void 0||r.call(this)),(n=this.listener)===null||n===void 0||n.linkedUpdated(t)}setOnceLinked(t){return new Promise(r=>{this.linked?t().then(r):this.onceLinked=()=>{t().then(r),this.onceLinked=void 0}})}async handleIncomingEvent(t){var r,n;if(!(t.type!=="Event"||t.event!=="Web3Response"))try{const s=await this.cipher.decrypt(t.data),i=JSON.parse(s);if(i.type!=="WEB3_RESPONSE")return;(r=this.listener)===null||r===void 0||r.handleWeb3ResponseMessage(i)}catch{(n=this.diagnostic)===null||n===void 0||n.log(Ke.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(t=>setTimeout(t,250));try{await this.fetchUnseenEventsAPI()}catch(t){console.error("Unable to check for unseen events",t)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(r=>this.handleIncomingEvent(r))}async setSessionMetadata(t,r){const n={type:"SetSessionConfig",id:(0,Zt.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[t]:r}};return this.setOnceConnected(async()=>{const s=await this.makeRequest(n);if(s.type==="Fail")throw new Error(s.error||"failed to set session metadata")})}async publishEvent(t,r,n=!1){const s=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},r),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),i={type:"PublishEvent",id:(0,Zt.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:t,data:s,callWebhook:n};return this.setOnceLinked(async()=>{const o=await this.makeRequest(i);if(o.type==="Fail")throw new Error(o.error||"failed to publish event");return o.eventId})}sendData(t){this.ws.sendData(JSON.stringify(t))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>Ma*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(t,r=af){const n=t.id;this.sendData(t);let s;return Promise.race([new Promise((i,o)=>{s=window.setTimeout(()=>{o(new Error(`request ${n} timed out`))},r)}),new Promise(i=>{this.requestResolutions.set(n,o=>{clearTimeout(s),i(o),this.requestResolutions.delete(n)})})])}async authenticate(){const t={type:"HostSession",id:(0,Zt.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},r=await this.makeRequest(t);if(r.type==="Fail")throw new Error(r.error||"failed to authentcate")}sendIsLinked(){const t={type:"IsLinked",id:(0,Zt.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(t)}sendGetSessionConfig(){const t={type:"GetSessionConfig",id:(0,Zt.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(t)}}Xn.WalletLinkConnection=cf;var Xr={},en={},Mo={};Object.defineProperty(Mo,"__esModule",{value:!0});Mo.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}';var lf=F&&F.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(en,"__esModule",{value:!0});en.injectCssReset=void 0;const uf=lf(Mo);function df(){const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(uf.default)),document.documentElement.appendChild(e)}en.injectCssReset=df;var rs={},tn,ae,Pl,Ol,At,La,$l,go,Bl,Dr={},Lo=[],hf=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ns=Array.isArray;function dt(e,t){for(var r in t)e[r]=t[r];return e}function Dl(e){var t=e.parentNode;t&&t.removeChild(e)}function _o(e,t,r){var n,s,i,o={};for(i in t)i=="key"?n=t[i]:i=="ref"?s=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?tn.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return Lr(e,o,n,s,null)}function Lr(e,t,r,n,s){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:s??++Pl,__i:-1,__u:0};return s==null&&ae.vnode!=null&&ae.vnode(i),i}function ff(){return{current:null}}function rn(e){return e.children}function Pr(e,t){this.props=e,this.context=t}function ur(e,t){if(t==null)return e.__?ur(e.__,e.__i+1):null;for(var r;tr?(bo(n,t,s),s.length=n.length=0,t=void 0,At.sort(go)):t&&ae.__c&&ae.__c(t,Lo));t&&bo(n,t,s),On.__r=0}function jl(e,t,r,n,s,i,o,a,c,l,d){var u,h,g,b,R,E=n&&n.__k||Lo,_=t.length;for(r.__d=c,gf(r,t,E),c=r.__d,u=0;u<_;u++)(g=r.__k[u])!=null&&typeof g!="boolean"&&typeof g!="function"&&(h=g.__i===-1?Dr:E[g.__i]||Dr,g.__i=u,Po(e,g,h,s,i,o,a,c,l,d),b=g.__e,g.ref&&h.ref!=g.ref&&(h.ref&&Oo(h.ref,null,g),d.push(g.ref,g.__c||b,g)),R==null&&b!=null&&(R=b),65536&g.__u||h.__k===g.__k?c=Hl(g,c,e):typeof g.type=="function"&&g.__d!==void 0?c=g.__d:b&&(c=b.nextSibling),g.__d=void 0,g.__u&=-196609);r.__d=c,r.__e=R}function gf(e,t,r){var n,s,i,o,a,c=t.length,l=r.length,d=l,u=0;for(e.__k=[],n=0;n0?Lr(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s)!=null?(s.__=e,s.__b=e.__b+1,a=_f(s,r,o=n+u,d),s.__i=a,i=null,a!==-1&&(d--,(i=r[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&u--,typeof s.type!="function"&&(s.__u|=65536)):a!==o&&(a===o+1?u++:a>o?d>c-o?u+=a-o:u--:u=a(c!=null&&!(131072&c.__u)?1:0))for(;o>=0||a=0){if((c=t[o])&&!(131072&c.__u)&&s==c.key&&i===c.type)return o;o--}if(a2&&(a.children=arguments.length>3?tn.call(arguments,2):r),Lr(e.type,a,n||e.key,s||e.ref,null)}function vf(e,t){var r={__c:t="__cC"+Bl++,__:e,Consumer:function(n,s){return n.children(s)},Provider:function(n){var s,i;return this.getChildContext||(s=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&s.some(function(a){a.__e=!0,mo(a)})},this.sub=function(o){s.push(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){s.splice(s.indexOf(o),1),a&&a.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}tn=Lo.slice,ae={__e:function(e,t,r,n){for(var s,i,o;t=t.__;)if((s=t.__c)&&!s.__)try{if((i=s.constructor)&&i.getDerivedStateFromError!=null&&(s.setState(i.getDerivedStateFromError(e)),o=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,n||{}),o=s.__d),o)return s.__E=s}catch(a){e=a}throw e}},Pl=0,Ol=function(e){return e!=null&&e.constructor==null},Pr.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=dt({},this.state),typeof e=="function"&&(e=e(dt({},r),this.props)),e&&dt(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),mo(this))},Pr.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),mo(this))},Pr.prototype.render=rn,At=[],$l=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,go=function(e,t){return e.__v.__b-t.__v.__b},On.__r=0,Bl=0;const wf=Object.freeze(Object.defineProperty({__proto__:null,Component:Pr,Fragment:rn,cloneElement:yf,createContext:vf,createElement:_o,createRef:ff,h:_o,hydrate:Vl,get isValidElement(){return Ol},get options(){return ae},render:Wl,toChildArray:Ul},Symbol.toStringTag,{value:"Module"})),Ne=Ur(wf);var ss={};function zl(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t=r.__.length&&r.__.push({__V:Nn}),r.__[e]}function Gl(e){return dr=1,Jl(Kl,e)}function Jl(e,t,r){var n=Ht(ft++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Kl(void 0,t),function(a){var c=n.__N?n.__N[0]:n.__[0],l=n.t(c,a);c!==l&&(n.__N=[l,n.__[1]],n.__c.setState({}))}],n.__c=le,!le.u)){var s=function(a,c,l){if(!n.__c.__H)return!0;var d=n.__c.__H.__.filter(function(h){return!!h.__c});if(d.every(function(h){return!h.__N}))return!i||i.call(this,a,c,l);var u=!1;return d.forEach(function(h){if(h.__N){var g=h.__[0];h.__=h.__N,h.__N=void 0,g!==h.__[0]&&(u=!0)}}),!(!u&&n.__c.props===a)&&(!i||i.call(this,a,c,l))};le.u=!0;var i=le.shouldComponentUpdate,o=le.componentWillUpdate;le.componentWillUpdate=function(a,c,l){if(this.__e){var d=i;i=void 0,s(a,c,l),i=d}o&&o.call(this,a,c,l)},le.shouldComponentUpdate=s}return n.__N||n.__}function Sf(e,t){var r=Ht(ft++,3);!pe.__s&&Bo(r.__H,t)&&(r.__=e,r.i=t,le.__H.__h.push(r))}function Zl(e,t){var r=Ht(ft++,4);!pe.__s&&Bo(r.__H,t)&&(r.__=e,r.i=t,le.__h.push(r))}function Rf(e){return dr=5,$o(function(){return{current:e}},[])}function Cf(e,t,r){dr=6,Zl(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function $o(e,t){var r=Ht(ft++,7);return Bo(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function kf(e,t){return dr=8,$o(function(){return e},t)}function If(e){var t=le.context[e.__c],r=Ht(ft++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(le)),t.props.value):e.__}function Af(e,t){pe.useDebugValue&&pe.useDebugValue(t?t(e):e)}function xf(e){var t=Ht(ft++,10),r=Gl();return t.__=e,le.componentDidCatch||(le.componentDidCatch=function(n,s){t.__&&t.__(n,s),r[1](n)}),[r[0],function(){r[1](void 0)}]}function Tf(){var e=Ht(ft++,11);if(!e.__){for(var t=le.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Nf(){for(var e;e=ql.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Mn),e.__H.__h.forEach(vo),e.__H.__h=[]}catch(t){e.__H.__h=[],pe.__e(t,e.__v)}}pe.__b=function(e){le=null,Fa&&Fa(e)},pe.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Va&&Va(e,t)},pe.__r=function(e){ja&&ja(e),ft=0;var t=(le=e.__c).__H;t&&(Pi===le?(t.__h=[],le.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Nn,r.__N=r.i=void 0})):(t.__h.forEach(Mn),t.__h.forEach(vo),t.__h=[],ft=0)),Pi=le},pe.diffed=function(e){Ha&&Ha(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ql.push(t)!==1&&Da===pe.requestAnimationFrame||((Da=pe.requestAnimationFrame)||Mf)(Nf)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Nn&&(r.__=r.__V),r.i=void 0,r.__V=Nn})),Pi=le=null},pe.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Mn),r.__h=r.__h.filter(function(n){return!n.__||vo(n)})}catch(n){t.some(function(s){s.__h&&(s.__h=[])}),t=[],pe.__e(n,r.__v)}}),Ua&&Ua(e,t)},pe.unmount=function(e){Wa&&Wa(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Mn(n)}catch(s){t=s}}),r.__H=void 0,t&&pe.__e(t,r.__v))};var za=typeof requestAnimationFrame=="function";function Mf(e){var t,r=function(){clearTimeout(n),za&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);za&&(t=requestAnimationFrame(r))}function Mn(e){var t=le,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),le=t}function vo(e){var t=le;e.__c=e.__(),le=t}function Bo(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Kl(e,t){return typeof t=="function"?t(e):t}const Lf=Object.freeze(Object.defineProperty({__proto__:null,useCallback:kf,useContext:If,useDebugValue:Af,useEffect:Sf,useErrorBoundary:xf,useId:Tf,useImperativeHandle:Cf,useLayoutEffect:Zl,useMemo:$o,useReducer:Jl,useRef:Rf,useState:Gl},Symbol.toStringTag,{value:"Module"})),is=Ur(Lf);var hr={},os={};Object.defineProperty(os,"__esModule",{value:!0});os.CloseIcon=void 0;const qa=Ne;function Pf(e){return(0,qa.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),(0,qa.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}os.CloseIcon=Pf;var as={};Object.defineProperty(as,"__esModule",{value:!0});as.CoinbaseWalletRound=void 0;const vn=Ne;function Of(e){return(0,vn.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),(0,vn.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,vn.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,vn.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}as.CoinbaseWalletRound=Of;var cs={};Object.defineProperty(cs,"__esModule",{value:!0});cs.QRCodeIcon=void 0;const Ar=Ne;function $f(e){return(0,Ar.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),(0,Ar.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,Ar.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,Ar.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,Ar.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}cs.QRCodeIcon=$f;var ls={};function Ql(e){this.mode=Pe.MODE_8BIT_BYTE,this.data=e,this.parsedData=[];for(var t=0,r=this.data.length;t65536?(n[0]=240|(s&1835008)>>>18,n[1]=128|(s&258048)>>>12,n[2]=128|(s&4032)>>>6,n[3]=128|s&63):s>2048?(n[0]=224|(s&61440)>>>12,n[1]=128|(s&4032)>>>6,n[2]=128|s&63):s>128?(n[0]=192|(s&1984)>>>6,n[1]=128|s&63):n[0]=s,this.parsedData.push(n)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}Ql.prototype={getLength:function(e){return this.parsedData.length},write:function(e){for(var t=0,r=this.parsedData.length;t=7&&this.setupTypeNumber(e),this.dataCache==null&&(this.dataCache=rt.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var r=-1;r<=7;r++)if(!(e+r<=-1||this.moduleCount<=e+r))for(var n=-1;n<=7;n++)t+n<=-1||this.moduleCount<=t+n||(0<=r&&r<=6&&(n==0||n==6)||0<=n&&n<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=n&&n<=4?this.modules[e+r][t+n]=!0:this.modules[e+r][t+n]=!1)},getBestMaskPattern:function(){for(var e=0,t=0,r=0;r<8;r++){this.makeImpl(!0,r);var n=fe.getLostPoint(this);(r==0||e>n)&&(e=n,t=r)}return t},createMovieClip:function(e,t,r){var n=e.createEmptyMovieClip(t,r),s=1;this.make();for(var i=0;i>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(var r=0;r<18;r++){var n=!e&&(t>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}},setupTypeInfo:function(e,t){for(var r=this.errorCorrectLevel<<3|t,n=fe.getBCHTypeInfo(r),s=0;s<15;s++){var i=!e&&(n>>s&1)==1;s<6?this.modules[s][8]=i:s<8?this.modules[s+1][8]=i:this.modules[this.moduleCount-15+s][8]=i}for(var s=0;s<15;s++){var i=!e&&(n>>s&1)==1;s<8?this.modules[8][this.moduleCount-s-1]=i:s<9?this.modules[8][15-s-1+1]=i:this.modules[8][15-s-1]=i}this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var r=-1,n=this.moduleCount-1,s=7,i=0,o=this.moduleCount-1;o>0;o-=2)for(o==6&&o--;;){for(var a=0;a<2;a++)if(this.modules[n][o-a]==null){var c=!1;i>>s&1)==1);var l=fe.getMask(t,n,o-a);l&&(c=!c),this.modules[n][o-a]=c,s--,s==-1&&(i++,s=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}}};rt.PAD0=236;rt.PAD1=17;rt.createData=function(e,t,r){for(var n=tt.getRSBlocks(e,t),s=new Yl,i=0;ia*8)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+a*8+")");for(s.getLengthInBits()+4<=a*8&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=a*8||(s.put(rt.PAD0,8),s.getLengthInBits()>=a*8));)s.put(rt.PAD1,8);return rt.createBytes(s,n)};rt.createBytes=function(e,t){for(var r=0,n=0,s=0,i=new Array(t.length),o=new Array(t.length),a=0;a=0?g.get(b):0}}for(var R=0,d=0;d=0;)t^=fe.G15<=0;)t^=fe.G18<>>=1;return t},getPatternPosition:function(e){return fe.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,r){switch(e){case _t.PATTERN000:return(t+r)%2==0;case _t.PATTERN001:return t%2==0;case _t.PATTERN010:return r%3==0;case _t.PATTERN011:return(t+r)%3==0;case _t.PATTERN100:return(Math.floor(t/2)+Math.floor(r/3))%2==0;case _t.PATTERN101:return t*r%2+t*r%3==0;case _t.PATTERN110:return(t*r%2+t*r%3)%2==0;case _t.PATTERN111:return(t*r%3+(t+r)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new nr([1],0),r=0;r5&&(r+=3+i-5)}for(var n=0;n=256;)e-=255;return Ee.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var Re=0;Re<8;Re++)Ee.EXP_TABLE[Re]=1<>>7-e%8&1)==1},put:function(e,t){for(var r=0;r>>t-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Oi=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function Xl(e){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof e=="string"&&(e={content:e}),e)for(var t in e)this.options[t]=e[t];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function r(c){switch(c){case"L":return yt.L;case"M":return yt.M;case"Q":return yt.Q;case"H":return yt.H;default:throw new Error("Unknwon error correction level: "+c)}}function n(c,l){for(var d=s(c),u=1,h=0,g=0,b=Oi.length;g<=b;g++){var R=Oi[g];if(!R)throw new Error("Content too long: expected "+h+" but got "+d);switch(l){case"L":h=R[0];break;case"M":h=R[1];break;case"Q":h=R[2];break;case"H":h=R[3];break;default:throw new Error("Unknwon error correction level: "+l)}if(d<=h)break;u++}if(u>Oi.length)throw new Error("Content too long");return u}function s(c){var l=encodeURI(c).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return l.length+(l.length!=c?3:0)}var i=this.options.content,o=n(i,this.options.ecl),a=r(this.options.ecl);this.qrcode=new rt(o,a),this.qrcode.addData(i),this.qrcode.make()}Xl.prototype.svg=function(e){var t=this.options||{},r=this.qrcode.modules;typeof e>"u"&&(e={container:t.container||"svg"});for(var n=typeof t.pretty<"u"?!!t.pretty:!0,s=n?" ":"",i=n?`\r `:"",o=t.width,a=t.height,c=r.length,l=o/(c+2*t.padding),d=a/(c+2*t.padding),u=typeof t.join<"u"?!!t.join:!1,h=typeof t.swap<"u"?!!t.swap:!1,g=typeof t.xmlDeclaration<"u"?!!t.xmlDeclaration:!0,b=typeof t.predefined<"u"?!!t.predefined:!1,R=b?s+''+i:"",E=s+''+i,_="",m="",y=0;y'+i:_+=s+''+i}}u&&(_=s+'');let de="";if(this.options.image!==void 0&&this.options.image.svg){const T=o*this.options.image.width/100,x=a*this.options.image.height/100,P=o/2-T/2,D=a/2-x/2;de+=``,de+=this.options.image.svg+i,de+=""}var oe="";switch(e.container){case"svg":g&&(oe+=''+i),oe+=''+i,oe+=R+E+_,oe+=de,oe+="";break;case"svg-viewbox":g&&(oe+=''+i),oe+=''+i,oe+=R+E+_,oe+=de,oe+="";break;case"g":oe+=''+i,oe+=R+E+_,oe+=de,oe+="";break;default:oe+=(R+E+_+de).replace(/^\s+/,"");break}return oe};var Bf=Xl,Df=F&&F.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ls,"__esModule",{value:!0});ls.QRCode=void 0;const Ff=Ne,Ga=is,jf=Df(Bf),Hf=e=>{const[t,r]=(0,Ga.useState)("");return(0,Ga.useEffect)(()=>{var n,s;const i=new jf.default({content:e.content,background:e.bgColor||"#ffffff",color:e.fgColor||"#000000",container:"svg",ecl:"M",width:(n=e.width)!==null&&n!==void 0?n:256,height:(s=e.height)!==null&&s!==void 0?s:256,padding:0,image:e.image}),o=G.from(i.svg(),"utf8").toString("base64");r(`data:image/svg+xml;base64,${o}`)},[e.bgColor,e.content,e.fgColor,e.height,e.image,e.width]),t?(0,Ff.h)("img",{src:t,alt:"QR Code"}):null};ls.QRCode=Hf;var us={},Do={};Object.defineProperty(Do,"__esModule",{value:!0});Do.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}";var Uf=F&&F.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(us,"__esModule",{value:!0});us.Spinner=void 0;const wn=Ne,Wf=Uf(Do),Vf=e=>{var t;const r=(t=e.size)!==null&&t!==void 0?t:64,n=e.color||"#000";return(0,wn.h)("div",{class:"-cbwsdk-spinner"},(0,wn.h)("style",null,Wf.default),(0,wn.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:r,height:r}},(0,wn.h)("circle",{style:{cx:50,cy:50,r:45,stroke:n}})))};us.Spinner=Vf;var Fo={};Object.defineProperty(Fo,"__esModule",{value:!0});Fo.default=".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}";var eu=F&&F.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hr,"__esModule",{value:!0});hr.CoinbaseWalletSteps=hr.ConnectContent=void 0;const Ot=eu(nn),ee=Ne,zf=O,qf=br,Gf=os,Jf=as,Zf=cs,Kf=ls,Qf=us,Yf=eu(Fo),$i={title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",steps:tu},Xf=e=>e==="light"?"#FFFFFF":"#0A0B0D";function e0(e){const{theme:t}=e,r=(0,zf.createQrUrl)(e.sessionId,e.sessionSecret,e.linkAPIUrl,e.isParentConnection,e.version,e.chainId),n=$i.steps;return(0,ee.h)("div",{"data-testid":"connect-content",className:(0,Ot.default)("-cbwsdk-connect-content",t)},(0,ee.h)("style",null,Yf.default),(0,ee.h)("div",{className:"-cbwsdk-connect-content-header"},(0,ee.h)("h2",{className:(0,Ot.default)("-cbwsdk-connect-content-heading",t)},"Scan to connect with our mobile app"),e.onCancel&&(0,ee.h)("button",{type:"button",className:"-cbwsdk-cancel-button",onClick:e.onCancel},(0,ee.h)(Gf.CloseIcon,{fill:t==="light"?"#0A0B0D":"#FFFFFF"}))),(0,ee.h)("div",{className:"-cbwsdk-connect-content-layout"},(0,ee.h)("div",{className:"-cbwsdk-connect-content-column-left"},(0,ee.h)(t0,{title:$i.title,description:$i.description,theme:t})),(0,ee.h)("div",{className:"-cbwsdk-connect-content-column-right"},(0,ee.h)("div",{className:"-cbwsdk-connect-content-qr-wrapper"},(0,ee.h)(Kf.QRCode,{content:r,width:200,height:200,fgColor:"#000",bgColor:"transparent"}),(0,ee.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:qf.LIB_VERSION}),(0,ee.h)("input",{type:"hidden",value:r})),(0,ee.h)(n,{theme:t}),!e.isConnected&&(0,ee.h)("div",{"data-testid":"connecting-spinner",className:(0,Ot.default)("-cbwsdk-connect-content-qr-connecting",t)},(0,ee.h)(Qf.Spinner,{size:36,color:t==="dark"?"#FFF":"#000"}),(0,ee.h)("p",null,"Connecting...")))))}hr.ConnectContent=e0;function t0({title:e,description:t,theme:r}){return(0,ee.h)("div",{className:(0,Ot.default)("-cbwsdk-connect-item",r)},(0,ee.h)("div",null,(0,ee.h)(Jf.CoinbaseWalletRound,null)),(0,ee.h)("div",{className:"-cbwsdk-connect-item-copy-wrapper"},(0,ee.h)("h3",{className:"-cbwsdk-connect-item-title"},e),(0,ee.h)("p",{className:"-cbwsdk-connect-item-description"},t)))}function tu({theme:e}){return(0,ee.h)("ol",{className:"-cbwsdk-wallet-steps"},(0,ee.h)("li",{className:(0,Ot.default)("-cbwsdk-wallet-steps-item",e)},(0,ee.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,ee.h)("li",{className:(0,Ot.default)("-cbwsdk-wallet-steps-item",e)},(0,ee.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},(0,ee.h)("span",null,"Tap ",(0,ee.h)("strong",null,"Scan")," "),(0,ee.h)("span",{className:(0,Ot.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",e)},(0,ee.h)(Zf.QRCodeIcon,{fill:Xf(e)})))))}hr.CoinbaseWalletSteps=tu;var ds={},hs={};Object.defineProperty(hs,"__esModule",{value:!0});hs.ArrowLeftIcon=void 0;const Ja=Ne;function r0(e){return(0,Ja.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},e),(0,Ja.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}hs.ArrowLeftIcon=r0;var fs={};Object.defineProperty(fs,"__esModule",{value:!0});fs.LaptopIcon=void 0;const Bi=Ne;function n0(e){return(0,Bi.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},e),(0,Bi.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,Bi.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}fs.LaptopIcon=n0;var ps={};Object.defineProperty(ps,"__esModule",{value:!0});ps.SafeIcon=void 0;const Za=Ne;function s0(e){return(0,Za.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},e),(0,Za.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}ps.SafeIcon=s0;var jo={};Object.defineProperty(jo,"__esModule",{value:!0});jo.default=".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}";var ru=F&&F.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ds,"__esModule",{value:!0});ds.TryExtensionContent=void 0;const Rt=ru(nn),me=Ne,Di=is,i0=hs,o0=fs,a0=ps,c0=ru(jo);function l0({theme:e}){const[t,r]=(0,Di.useState)(!1),n=(0,Di.useCallback)(()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")},[]),s=(0,Di.useCallback)(()=>{t?window.location.reload():(n(),r(!0))},[n,t]);return(0,me.h)("div",{class:(0,Rt.default)("-cbwsdk-try-extension",e)},(0,me.h)("style",null,c0.default),(0,me.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,me.h)("h3",{class:(0,Rt.default)("-cbwsdk-try-extension-heading",e)},"Or try the Coinbase Wallet browser extension"),(0,me.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,me.h)("button",{class:(0,Rt.default)("-cbwsdk-try-extension-cta",e),onClick:s},t?"Refresh":"Install"),(0,me.h)("div",null,!t&&(0,me.h)(i0.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:e==="light"?"#0052FF":"#588AF5"})))),(0,me.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,me.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,me.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,me.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,me.h)("span",{class:(0,Rt.default)("-cbwsdk-try-extension-list-item-icon",e)},(0,me.h)(o0.LaptopIcon,{fill:e==="light"?"#0A0B0D":"#FFFFFF"}))),(0,me.h)("div",{class:(0,Rt.default)("-cbwsdk-try-extension-list-item-copy",e)},"Connect with dapps with just one click on your desktop browser")),(0,me.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,me.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,me.h)("span",{class:(0,Rt.default)("-cbwsdk-try-extension-list-item-icon",e)},(0,me.h)(a0.SafeIcon,{fill:e==="light"?"#0A0B0D":"#FFFFFF"}))),(0,me.h)("div",{class:(0,Rt.default)("-cbwsdk-try-extension-list-item-copy",e)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}ds.TryExtensionContent=l0;var Ho={};Object.defineProperty(Ho,"__esModule",{value:!0});Ho.default=".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}";var nu=F&&F.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ss,"__esModule",{value:!0});ss.ConnectDialog=void 0;const Fi=nu(nn),Ct=Ne,ji=is,u0=hr,d0=ds,h0=nu(Ho),f0=e=>{const{isOpen:t,darkMode:r}=e,[n,s]=(0,ji.useState)(!t),[i,o]=(0,ji.useState)(!t);(0,ji.useEffect)(()=>{const c=[window.setTimeout(()=>{o(!t)},10)];return t?s(!1):c.push(window.setTimeout(()=>{s(!0)},360)),()=>{c.forEach(window.clearTimeout)}},[t]);const a=r?"dark":"light";return(0,Ct.h)("div",{class:(0,Fi.default)("-cbwsdk-connect-dialog-container",n&&"-cbwsdk-connect-dialog-container-hidden")},(0,Ct.h)("style",null,h0.default),(0,Ct.h)("div",{class:(0,Fi.default)("-cbwsdk-connect-dialog-backdrop",a,i&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,Ct.h)("div",{class:"-cbwsdk-connect-dialog"},(0,Ct.h)("div",{class:(0,Fi.default)("-cbwsdk-connect-dialog-box",i&&"-cbwsdk-connect-dialog-box-hidden")},e.connectDisabled?null:(0,Ct.h)(u0.ConnectContent,{theme:a,version:e.version,sessionId:e.sessionId,sessionSecret:e.sessionSecret,linkAPIUrl:e.linkAPIUrl,isConnected:e.isConnected,isParentConnection:e.isParentConnection,chainId:e.chainId,onCancel:e.onCancel}),(0,Ct.h)(d0.TryExtensionContent,{theme:a}))))};ss.ConnectDialog=f0;Object.defineProperty(rs,"__esModule",{value:!0});rs.LinkFlow=void 0;const Hi=Ne,p0=ss;class g0{constructor(t){this.connected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=t.darkMode,this.version=t.version,this.sessionId=t.sessionId,this.sessionSecret=t.sessionSecret,this.linkAPIUrl=t.linkAPIUrl,this.isParentConnection=t.isParentConnection}attach(t){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",t.appendChild(this.root),this.render()}setConnected(t){this.connected!==t&&(this.connected=t,this.render())}setChainId(t){this.chainId!==t&&(this.chainId=t,this.render())}detach(){var t;this.root&&((0,Hi.render)(null,this.root),(t=this.root.parentElement)===null||t===void 0||t.removeChild(this.root))}setConnectDisabled(t){this.connectDisabled=t}open(t){this.isOpen=!0,this.onCancel=t.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){this.root&&(0,Hi.render)((0,Hi.h)(p0.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.connected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}}rs.LinkFlow=g0;var Uo={},Wo={};Object.defineProperty(Wo,"__esModule",{value:!0});Wo.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}";(function(e){var t=F&&F.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.SnackbarInstance=e.SnackbarContainer=e.Snackbar=void 0;const r=t(nn),n=Ne,s=is,i=t(Wo),o="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";class c{constructor(h){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=h.darkMode}attach(h){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",h.appendChild(this.root),this.render()}presentItem(h){const g=this.nextItemKey++;return this.items.set(g,h),this.render(),()=>{this.items.delete(g),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,n.render)((0,n.h)("div",null,(0,n.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([h,g])=>(0,n.h)(e.SnackbarInstance,Object.assign({},g,{key:h}))))),this.root)}}e.Snackbar=c;const l=u=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-container")},(0,n.h)("style",null,i.default),(0,n.h)("div",{class:"-cbwsdk-snackbar"},u.children));e.SnackbarContainer=l;const d=({autoExpand:u,message:h,menuItems:g})=>{const[b,R]=(0,s.useState)(!0),[E,_]=(0,s.useState)(u??!1);(0,s.useEffect)(()=>{const y=[window.setTimeout(()=>{R(!1)},1),window.setTimeout(()=>{_(!0)},1e4)];return()=>{y.forEach(window.clearTimeout)}});const m=()=>{_(!E)};return(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance",b&&"-cbwsdk-snackbar-instance-hidden",E&&"-cbwsdk-snackbar-instance-expanded")},(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:m},(0,n.h)("img",{src:o,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},h),(0,n.h)("div",{class:"-gear-container"},!E&&(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,n.h)("img",{src:a,class:"-gear-icon",title:"Expand"}))),g&&g.length>0&&(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},g.map((y,C)=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item",y.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:y.onClick,key:C},(0,n.h)("svg",{width:y.svgWidth,height:y.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":y.defaultFillRule,"clip-rule":y.defaultClipRule,d:y.path,fill:"#AAAAAA"})),(0,n.h)("span",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item-info",y.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},y.info)))))};e.SnackbarInstance=d})(Uo);Object.defineProperty(Xr,"__esModule",{value:!0});Xr.WalletLinkRelayUI=void 0;const _0=en,m0=rs,b0=Uo;class y0{constructor(t){this.standalone=null,this.attached=!1,this.snackbar=new b0.Snackbar({darkMode:t.darkMode}),this.linkFlow=new m0.LinkFlow({darkMode:t.darkMode,version:t.version,sessionId:t.session.id,sessionSecret:t.session.secret,linkAPIUrl:t.linkAPIUrl,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const t=document.documentElement,r=document.createElement("div");r.className="-cbwsdk-css-reset",t.appendChild(r),this.linkFlow.attach(r),this.snackbar.attach(r),this.attached=!0,(0,_0.injectCssReset)()}setConnected(t){this.linkFlow.setConnected(t)}setChainId(t){this.linkFlow.setChainId(t)}setConnectDisabled(t){this.linkFlow.setConnectDisabled(t)}addEthereumChain(){}watchAsset(){}switchEthereumChain(){}requestEthereumAccounts(t){this.linkFlow.open({onCancel:t.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}showConnecting(t){let r;return t.isUnlinkedErrorState?r={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:t.onResetConnection}]}:r={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:t.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:t.onResetConnection}]},this.snackbar.presentItem(r)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(t){this.standalone=t}isStandalone(){var t;return(t=this.standalone)!==null&&t!==void 0?t:!1}}Xr.WalletLinkRelayUI=y0;Object.defineProperty(Jr,"__esModule",{value:!0});Jr.WalletLinkRelay=void 0;const Qt=Wr,v0=be,he=O,kt=yr,Ka=Fe,mt=vr,w0=Xn,It=mr,E0=Xr;class lt extends Ka.RelayAbstract{constructor(t){var r;super(),this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.linkedUpdated=o=>{var a;this.isLinked=o;const c=this.storage.getItem(Ka.LOCAL_STORAGE_ADDRESSES_KEY);if(o&&(this.session.linked=o),this.isUnlinkedErrorState=!1,c){const l=c.split(" "),d=this.storage.getItem("IsStandaloneSigning")==="true";if(l[0]!==""&&!o&&this.session.linked&&!d){this.isUnlinkedErrorState=!0;const u=this.getSessionIdHash();(a=this.diagnostic)===null||a===void 0||a.log(kt.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:u})}}},this.metadataUpdated=(o,a)=>{this.storage.setItem(o,a)},this.chainUpdated=(o,a)=>{this.chainCallbackParams.chainId===o&&this.chainCallbackParams.jsonRpcUrl===a||(this.chainCallbackParams={chainId:o,jsonRpcUrl:a},this.chainCallback&&this.chainCallback(o,a))},this.accountUpdated=o=>{this.accountsCallback&&this.accountsCallback([o]),lt.accountRequestCallbackIds.size>0&&(Array.from(lt.accountRequestCallbackIds.values()).forEach(a=>{const c={type:"WEB3_RESPONSE",id:a,response:{method:"requestEthereumAccounts",result:[o]}};this.invokeCallback(Object.assign(Object.assign({},c),{id:a}))}),lt.accountRequestCallbackIds.clear())},this.connectedUpdated=o=>{this.ui.setConnected(o)},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=t.linkAPIUrl,this.storage=t.storage,this.options=t;const{session:n,ui:s,connection:i}=this.subscribe();this._session=n,this.connection=i,this.relayEventManager=t.relayEventManager,this.diagnostic=t.diagnosticLogger,this._reloadOnDisconnect=(r=t.reloadOnDisconnect)!==null&&r!==void 0?r:!0,this.ui=s}subscribe(){const t=mt.Session.load(this.storage)||new mt.Session(this.storage).save(),{linkAPIUrl:r,diagnostic:n}=this,s=new w0.WalletLinkConnection({session:t,linkAPIUrl:r,diagnostic:n,listener:this}),{version:i,darkMode:o}=this.options,a=this.options.uiConstructor({linkAPIUrl:r,version:i,darkMode:o,session:t});return s.connect(),{session:t,ui:a,connection:s}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(t=>setTimeout(()=>t(null),1e3))]).then(()=>{var t,r;const n=this.ui.isStandalone();(t=this.diagnostic)===null||t===void 0||t.log(kt.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const s=mt.Session.load(this.storage);if((s==null?void 0:s.id)===this._session.id?this.storage.clear():s&&((r=this.diagnostic)===null||r===void 0||r.log(kt.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:mt.Session.hash(s.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0);const{session:i,ui:o,connection:a}=this.subscribe();this._session=i,this.connection=a,this.ui=o,n&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.attachUI()}).catch(t=>{var r;(r=this.diagnostic)===null||r===void 0||r.log(kt.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${t}`,sessionIdHash:this.getSessionIdHash()})})}setAppInfo(t,r){this.appName=t,this.appLogoUrl=r}getStorageItem(t){return this.storage.getItem(t)}get session(){return this._session}setStorageItem(t,r){this.storage.setItem(t,r)}signEthereumMessage(t,r,n,s){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,he.hexStringFromBuffer)(t,!0),address:r,addPrefix:n,typedDataJson:s||null}})}ethereumAddressFromSignedMessage(t,r,n){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,he.hexStringFromBuffer)(t,!0),signature:(0,he.hexStringFromBuffer)(r,!0),addPrefix:n}})}signEthereumTransaction(t){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,he.bigIntStringFromBN)(t.weiValue),data:(0,he.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,he.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.gasPriceInWei?(0,he.bigIntStringFromBN)(t.gasPriceInWei):null,maxPriorityFeePerGas:t.gasPriceInWei?(0,he.bigIntStringFromBN)(t.gasPriceInWei):null,gasLimit:t.gasLimit?(0,he.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(t){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,he.bigIntStringFromBN)(t.weiValue),data:(0,he.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,he.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.maxFeePerGas?(0,he.bigIntStringFromBN)(t.maxFeePerGas):null,maxPriorityFeePerGas:t.maxPriorityFeePerGas?(0,he.bigIntStringFromBN)(t.maxPriorityFeePerGas):null,gasLimit:t.gasLimit?(0,he.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!0}})}submitEthereumTransaction(t,r){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,he.hexStringFromBuffer)(t,!0),chainId:r}})}scanQRCode(t){return this.sendRequest({method:"scanQRCode",params:{regExp:t}})}getQRCodeUrl(){return(0,he.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(t,r){return this.sendRequest({method:"generic",params:{action:r,data:t}})}sendGenericMessage(t){return this.sendRequest(t)}sendRequest(t){let r=null;const n=(0,he.randomBytesHex)(8),s=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,t.method,o),r==null||r()};return{promise:new Promise((o,a)=>{this.ui.isStandalone()||(r=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:s,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,c=>{if(r==null||r(),(0,It.isErrorResponse)(c))return a(new Error(c.errorMessage));o(c)}),this.ui.isStandalone()?this.sendRequestStandalone(n,t):this.publishWeb3RequestEvent(n,t)}),cancel:s}}setConnectDisabled(t){this.ui.setConnectDisabled(t)}setAccountsCallback(t){this.accountsCallback=t}setChainCallback(t){this.chainCallback=t}setDappDefaultChainCallback(t){this.dappDefaultChain=t,this.ui instanceof E0.WalletLinkRelayUI&&this.ui.setChainId(t)}publishWeb3RequestEvent(t,r){var n;const s={type:"WEB3_REQUEST",id:t,request:r},i=mt.Session.load(this.storage);(n=this.diagnostic)===null||n===void 0||n.log(kt.EVENTS.WEB3_REQUEST,{eventId:s.id,method:`relay::${r.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?mt.Session.hash(i.id):"",isSessionMismatched:((i==null?void 0:i.id)!==this._session.id).toString()}),this.publishEvent("Web3Request",s,!0).then(o=>{var a;(a=this.diagnostic)===null||a===void 0||a.log(kt.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:s.id,method:`relay::${r.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?mt.Session.hash(i.id):"",isSessionMismatched:((i==null?void 0:i.id)!==this._session.id).toString()})}).catch(o=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:s.id,response:{method:r.method,errorMessage:o.message}})})}publishWeb3RequestCanceledEvent(t){const r={type:"WEB3_REQUEST_CANCELED",id:t};this.publishEvent("Web3RequestCanceled",r,!1).then()}publishEvent(t,r,n){return this.connection.publishEvent(t,r,n)}handleWeb3ResponseMessage(t){var r;const{response:n}=t;if((r=this.diagnostic)===null||r===void 0||r.log(kt.EVENTS.WEB3_RESPONSE,{eventId:t.id,method:`relay::${n.method}`,sessionIdHash:this.getSessionIdHash()}),n.method==="requestEthereumAccounts"){lt.accountRequestCallbackIds.forEach(s=>this.invokeCallback(Object.assign(Object.assign({},t),{id:s}))),lt.accountRequestCallbackIds.clear();return}this.invokeCallback(t)}handleErrorResponse(t,r,n,s){var i;const o=(i=n==null?void 0:n.message)!==null&&i!==void 0?i:(0,Qt.getMessageFromCode)(s);this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:t,response:{method:r,errorMessage:o,errorCode:s}})}invokeCallback(t){const r=this.relayEventManager.callbacks.get(t.id);r&&(r(t.response),this.relayEventManager.callbacks.delete(t.id))}requestEthereumAccounts(){const t={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},r=(0,he.randomBytesHex)(8),n=i=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,t.method,i)};return{promise:new Promise((i,o)=>{if(this.relayEventManager.callbacks.set(r,a=>{if(this.ui.hideRequestEthereumAccounts(),(0,It.isErrorResponse)(a))return o(new Error(a.errorMessage));i(a)}),this.ui.inlineAccountsResponse()){const a=c=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:r,response:{method:"requestEthereumAccounts",result:c}})};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:a})}else{const a=Qt.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>n(a)})}lt.accountRequestCallbackIds.add(r),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(r,t)}),cancel:n}}selectProvider(t){const r={method:"selectProvider",params:{providerOptions:t}},n=(0,he.randomBytesHex)(8),s=o=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,r.method,o)},i=new Promise((o,a)=>{this.relayEventManager.callbacks.set(n,d=>{if((0,It.isErrorResponse)(d))return a(new Error(d.errorMessage));o(d)});const c=d=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:v0.ProviderType.Unselected}})},l=d=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:"selectProvider",result:d}})};this.ui.selectProvider&&this.ui.selectProvider({onApprove:l,onCancel:c,providerOptions:t})});return{cancel:s,promise:i}}watchAsset(t,r,n,s,i,o){const a={method:"watchAsset",params:{type:t,options:{address:r,symbol:n,decimals:s,image:i},chainId:o}};let c=null;const l=(0,he.randomBytesHex)(8),d=h=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,a.method,h),c==null||c()};this.ui.inlineWatchAsset()||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload}));const u=new Promise((h,g)=>{this.relayEventManager.callbacks.set(l,E=>{if(c==null||c(),(0,It.isErrorResponse)(E))return g(new Error(E.errorMessage));h(E)});const b=E=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:l,response:{method:"watchAsset",result:!1}})},R=()=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:l,response:{method:"watchAsset",result:!0}})};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:R,onCancel:b,type:t,address:r,symbol:n,decimals:s,image:i,chainId:o}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(l,a)});return{cancel:d,promise:u}}addEthereumChain(t,r,n,s,i,o){const a={method:"addEthereumChain",params:{chainId:t,rpcUrls:r,blockExplorerUrls:s,chainName:i,iconUrls:n,nativeCurrency:o}};let c=null;const l=(0,he.randomBytesHex)(8),d=h=>{this.publishWeb3RequestCanceledEvent(l),this.handleErrorResponse(l,a.method,h),c==null||c()};return this.ui.inlineAddEthereumChain(t)||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:d,onResetConnection:this.resetAndReload})),{promise:new Promise((h,g)=>{this.relayEventManager.callbacks.set(l,E=>{if(c==null||c(),(0,It.isErrorResponse)(E))return g(new Error(E.errorMessage));h(E)});const b=E=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:l,response:{method:"addEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},R=E=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:l,response:{method:"addEthereumChain",result:{isApproved:!0,rpcUrl:E}}})};this.ui.inlineAddEthereumChain(t)&&this.ui.addEthereumChain({onCancel:b,onApprove:R,chainId:a.params.chainId,rpcUrls:a.params.rpcUrls,blockExplorerUrls:a.params.blockExplorerUrls,chainName:a.params.chainName,iconUrls:a.params.iconUrls,nativeCurrency:a.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(t)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(l,a)}),cancel:d}}switchEthereumChain(t,r){const n={method:"switchEthereumChain",params:Object.assign({chainId:t},{address:r})},s=(0,he.randomBytesHex)(8),i=a=>{this.publishWeb3RequestCanceledEvent(s),this.handleErrorResponse(s,n.method,a)};return{promise:new Promise((a,c)=>{this.relayEventManager.callbacks.set(s,u=>{if((0,It.isErrorResponse)(u)&&u.errorCode)return c(Qt.standardErrors.provider.custom({code:u.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,It.isErrorResponse)(u))return c(new Error(u.errorMessage));a(u)});const l=u=>{var h;if(u){const g=(h=(0,Qt.getErrorCode)(u))!==null&&h!==void 0?h:Qt.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(s,"switchEthereumChain",u instanceof Error?u:Qt.standardErrors.provider.unsupportedChain(t),g)}else this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:s,response:{method:"switchEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},d=u=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:s,response:{method:"switchEthereumChain",result:{isApproved:!0,rpcUrl:u}}})};this.ui.switchEthereumChain({onCancel:l,onApprove:d,chainId:n.params.chainId,address:n.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(s,n)}),cancel:i}}inlineAddEthereumChain(t){return this.ui.inlineAddEthereumChain(t)}getSessionIdHash(){return mt.Session.hash(this._session.id)}sendRequestStandalone(t,r){const n=i=>{this.handleErrorResponse(t,r.method,i)},s=i=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:t,response:i})};switch(r.method){case"signEthereumMessage":this.ui.signEthereumMessage({request:r,onSuccess:s,onCancel:n});break;case"signEthereumTransaction":this.ui.signEthereumTransaction({request:r,onSuccess:s,onCancel:n});break;case"submitEthereumTransaction":this.ui.submitEthereumTransaction({request:r,onSuccess:s,onCancel:n});break;case"ethereumAddressFromSignedMessage":this.ui.ethereumAddressFromSignedMessage({request:r,onSuccess:s});break;default:n();break}}}Jr.WalletLinkRelay=lt;lt.accountRequestCallbackIds=new Set;var sn={},gs={},su={};(function(e){var t=F&&F.__createBinding||(Object.create?function(n,s,i,o){o===void 0&&(o=i);var a=Object.getOwnPropertyDescriptor(s,i);(!a||("get"in a?!s.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return s[i]}}),Object.defineProperty(n,o,a)}:function(n,s,i,o){o===void 0&&(o=i),n[o]=s[i]}),r=F&&F.__exportStar||function(n,s){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(s,i)&&t(s,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Uo,e)})(su);var Vo={};Object.defineProperty(Vo,"__esModule",{value:!0});Vo.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}";var iu=F&&F.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gs,"__esModule",{value:!0});gs.RedirectDialog=void 0;const S0=iu(nn),et=Ne,R0=en,C0=su,k0=iu(Vo);class I0{constructor(){this.root=null}attach(){const t=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",t.appendChild(this.root),(0,R0.injectCssReset)()}present(t){this.render(t)}clear(){this.render(null)}render(t){this.root&&((0,et.render)(null,this.root),t&&(0,et.render)((0,et.h)(A0,Object.assign({},t,{onDismiss:()=>{this.clear()}})),this.root))}}gs.RedirectDialog=I0;const A0=({title:e,buttonText:t,darkMode:r,onButtonClick:n,onDismiss:s})=>{const i=r?"dark":"light";return(0,et.h)(C0.SnackbarContainer,{darkMode:r},(0,et.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,et.h)("style",null,k0.default),(0,et.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:s}),(0,et.h)("div",{class:(0,S0.default)("-cbwsdk-redirect-dialog-box",i)},(0,et.h)("p",null,e),(0,et.h)("button",{onClick:n},t))))};Object.defineProperty(sn,"__esModule",{value:!0});sn.MobileRelayUI=void 0;const x0=gs;class T0{constructor(t){this.attached=!1,this.darkMode=!1,this.openedWindow=null,this.redirectDialog=new x0.RedirectDialog,this.darkMode=t.darkMode}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}setConnected(t){}closeOpenedWindow(){var t;(t=this.openedWindow)===null||t===void 0||t.close(),this.openedWindow=null}redirectToCoinbaseWallet(t){const r=new URL("https://go.cb-w.com/walletlink");r.searchParams.append("redirect_url",window.location.href),t&&r.searchParams.append("wl_url",t),this.openedWindow=window.open(r.href,"cbw-opener"),this.openedWindow&&setTimeout(()=>this.closeOpenedWindow(),5e3)}openCoinbaseWalletDeeplink(t){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",darkMode:this.darkMode,onButtonClick:()=>{this.redirectToCoinbaseWallet(t)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(t)},99)}showConnecting(t){return()=>{this.closeOpenedWindow(),this.redirectDialog.clear()}}hideRequestEthereumAccounts(){this.closeOpenedWindow(),this.redirectDialog.clear()}requestEthereumAccounts(){}addEthereumChain(){}watchAsset(){}selectProvider(){}switchEthereumChain(){}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}reloadUI(){}setStandalone(){}setConnectDisabled(){}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}}sn.MobileRelayUI=T0;Object.defineProperty(Gr,"__esModule",{value:!0});Gr.MobileRelay=void 0;const N0=O,M0=Jr,Qa=sn;class L0 extends M0.WalletLinkRelay{constructor(t){var r;super(t),this._enableMobileWalletLink=(r=t.enableMobileWalletLink)!==null&&r!==void 0?r:!1}requestEthereumAccounts(){return this._enableMobileWalletLink?super.requestEthereumAccounts():{promise:new Promise(()=>{const t=(0,N0.getLocation)();t.href=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(t.href)}`}),cancel:()=>{}}}publishWeb3RequestEvent(t,r){if(super.publishWeb3RequestEvent(t,r),!(this._enableMobileWalletLink&&this.ui instanceof Qa.MobileRelayUI))return;let n=!1;switch(r.method){case"requestEthereumAccounts":case"connectAndSignIn":n=!0,this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());break;case"switchEthereumChain":return;default:n=!0,this.ui.openCoinbaseWalletDeeplink();break}n&&window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0})}handleWeb3ResponseMessage(t){super.handleWeb3ResponseMessage(t),this._enableMobileWalletLink&&this.ui instanceof Qa.MobileRelayUI&&this.ui.closeOpenedWindow()}connectAndSignIn(t){if(!this._enableMobileWalletLink)throw new Error("connectAndSignIn is supported only when enableMobileWalletLink is on");return this.sendRequest({method:"connectAndSignIn",params:{appName:this.appName,appLogoUrl:this.appLogoUrl,domain:window.location.hostname,aud:window.location.href,version:"1",type:"eip4361",nonce:t.nonce,iat:new Date().toISOString(),chainId:`eip155:${this.dappDefaultChain}`,statement:t.statement,resources:t.resources}})}}Gr.MobileRelay=L0;var wo={exports:{}},ou=Un.EventEmitter,Ui,Ya;function P0(){if(Ya)return Ui;Ya=1;function e(b,R){var E=Object.keys(b);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(b);R&&(_=_.filter(function(m){return Object.getOwnPropertyDescriptor(b,m).enumerable})),E.push.apply(E,_)}return E}function t(b){for(var R=1;R0?this.tail.next=_:this.head=_,this.tail=_,++this.length}},{key:"unshift",value:function(E){var _={data:E,next:this.head};this.length===0&&(this.tail=_),this.head=_,++this.length}},{key:"shift",value:function(){if(this.length!==0){var E=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,E}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(E){if(this.length===0)return"";for(var _=this.head,m=""+_.data;_=_.next;)m+=E+_.data;return m}},{key:"concat",value:function(E){if(this.length===0)return l.alloc(0);for(var _=l.allocUnsafe(E>>>0),m=this.head,y=0;m;)g(m.data,_,y),y+=m.data.length,m=m.next;return _}},{key:"consume",value:function(E,_){var m;return EC.length?C.length:E;if(S===C.length?y+=C:y+=C.slice(0,E),E-=S,E===0){S===C.length?(++m,_.next?this.head=_.next:this.head=this.tail=null):(this.head=_,_.data=C.slice(S));break}++m}return this.length-=m,y}},{key:"_getBuffer",value:function(E){var _=l.allocUnsafe(E),m=this.head,y=1;for(m.data.copy(_),E-=m.data.length;m=m.next;){var C=m.data,S=E>C.length?C.length:E;if(C.copy(_,_.length-E,0,S),E-=S,E===0){S===C.length?(++y,m.next?this.head=m.next:this.head=this.tail=null):(this.head=m,m.data=C.slice(S));break}++y}return this.length-=y,_}},{key:h,value:function(E,_){return u(this,t(t({},_),{},{depth:0,customInspect:!1}))}}]),b}(),Ui}function O0(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return n||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ne.nextTick(Eo,this,e)):ne.nextTick(Eo,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(i){!t&&i?r._writableState?r._writableState.errorEmitted?ne.nextTick(Ln,r):(r._writableState.errorEmitted=!0,ne.nextTick(Xa,r,i)):ne.nextTick(Xa,r,i):t?(ne.nextTick(Ln,r),t(i)):ne.nextTick(Ln,r)}),this)}function Xa(e,t){Eo(e,t),Ln(e)}function Ln(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function $0(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Eo(e,t){e.emit("error",t)}function B0(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var au={destroy:O0,undestroy:$0,errorOrDestroy:B0},Ut={};function D0(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var cu={};function Ue(e,t,r){r||(r=Error);function n(i,o,a){return typeof t=="string"?t:t(i,o,a)}var s=function(i){D0(o,i);function o(a,c,l){return i.call(this,n(a,c,l))||this}return o}(r);s.prototype.name=r.name,s.prototype.code=e,cu[e]=s}function ec(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function F0(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function j0(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function H0(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Ue("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Ue("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&F0(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var s;if(j0(e," argument"))s="The ".concat(e," ").concat(n," ").concat(ec(t,"type"));else{var i=H0(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(i," ").concat(n," ").concat(ec(t,"type"))}return s+=". Received type ".concat(typeof r),s},TypeError);Ue("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ue("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Ue("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ue("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Ue("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ue("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ue("ERR_STREAM_WRITE_AFTER_END","write after end");Ue("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ue("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Ue("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Ut.codes=cu;var U0=Ut.codes.ERR_INVALID_OPT_VALUE;function W0(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function V0(e,t,r,n){var s=W0(t,n,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var i=n?r:"highWaterMark";throw new U0(i,s)}return Math.floor(s)}return e.objectMode?16:16*1024}var lu={getHighWaterMark:V0},z0=q0;function q0(e,t){if(Wi("noDeprecation"))return e;var r=!1;function n(){if(!r){if(Wi("throwDeprecation"))throw new Error(t);Wi("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function Wi(e){try{if(!F.localStorage)return!1}catch{return!1}var t=F.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}var Vi,tc;function uu(){if(tc)return Vi;tc=1,Vi=$;function e(v){var w=this;this.next=null,this.entry=null,this.finish=function(){Ie(w,v)}}var t;$.WritableState=I;var r={deprecate:z0},n=ou,s=Hn.Buffer,i=(typeof F<"u"?F:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(v){return s.from(v)}function a(v){return s.isBuffer(v)||v instanceof i}var c=au,l=lu,d=l.getHighWaterMark,u=Ut.codes,h=u.ERR_INVALID_ARG_TYPE,g=u.ERR_METHOD_NOT_IMPLEMENTED,b=u.ERR_MULTIPLE_CALLBACK,R=u.ERR_STREAM_CANNOT_PIPE,E=u.ERR_STREAM_DESTROYED,_=u.ERR_STREAM_NULL_VALUES,m=u.ERR_STREAM_WRITE_AFTER_END,y=u.ERR_UNKNOWN_ENCODING,C=c.errorOrDestroy;qe($,n);function S(){}function I(v,w,A){t=t||fr(),v=v||{},typeof A!="boolean"&&(A=w instanceof t),this.objectMode=!!v.objectMode,A&&(this.objectMode=this.objectMode||!!v.writableObjectMode),this.highWaterMark=d(this,v,"writableHighWaterMark",A),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var U=v.decodeStrings===!1;this.decodeStrings=!U,this.defaultEncoding=v.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K){D(w,K)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=v.emitClose!==!1,this.autoDestroy=!!v.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}I.prototype.getBuffer=function(){for(var w=this.bufferedRequest,A=[];w;)A.push(w),w=w.next;return A},function(){try{Object.defineProperty(I.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var j;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(j=Function.prototype[Symbol.hasInstance],Object.defineProperty($,Symbol.hasInstance,{value:function(w){return j.call(this,w)?!0:this!==$?!1:w&&w._writableState instanceof I}})):j=function(w){return w instanceof this};function $(v){t=t||fr();var w=this instanceof t;if(!w&&!j.call($,this))return new $(v);this._writableState=new I(v,this,w),this.writable=!0,v&&(typeof v.write=="function"&&(this._write=v.write),typeof v.writev=="function"&&(this._writev=v.writev),typeof v.destroy=="function"&&(this._destroy=v.destroy),typeof v.final=="function"&&(this._final=v.final)),n.call(this)}$.prototype.pipe=function(){C(this,new R)};function N(v,w){var A=new m;C(v,A),ne.nextTick(w,A)}function J(v,w,A,U){var K;return A===null?K=new _:typeof A!="string"&&!w.objectMode&&(K=new h("chunk",["string","Buffer"],A)),K?(C(v,K),ne.nextTick(U,K),!1):!0}$.prototype.write=function(v,w,A){var U=this._writableState,K=!1,f=!U.objectMode&&a(v);return f&&!s.isBuffer(v)&&(v=o(v)),typeof w=="function"&&(A=w,w=null),f?w="buffer":w||(w=U.defaultEncoding),typeof A!="function"&&(A=S),U.ending?N(this,A):(f||J(this,U,v,A))&&(U.pendingcb++,K=oe(this,U,f,v,w,A)),K},$.prototype.cork=function(){this._writableState.corked++},$.prototype.uncork=function(){var v=this._writableState;v.corked&&(v.corked--,!v.writing&&!v.corked&&!v.bufferProcessing&&v.bufferedRequest&&H(this,v))},$.prototype.setDefaultEncoding=function(w){if(typeof w=="string"&&(w=w.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((w+"").toLowerCase())>-1))throw new y(w);return this._writableState.defaultEncoding=w,this},Object.defineProperty($.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function de(v,w,A){return!v.objectMode&&v.decodeStrings!==!1&&typeof w=="string"&&(w=s.from(w,A)),w}Object.defineProperty($.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function oe(v,w,A,U,K,f){if(!A){var p=de(w,U,K);U!==p&&(A=!0,K="buffer",U=p)}var k=w.objectMode?1:U.length;w.length+=k;var M=w.length>5===6?2:_>>4===14?3:_>>3===30?4:_>>6===2?-1:-2}function o(_,m,y){var C=m.length-1;if(C=0?(S>0&&(_.lastNeed=S-1),S):--C=0?(S>0&&(_.lastNeed=S-2),S):--C=0?(S>0&&(S===2?S=0:_.lastNeed=S-3),S):0))}function a(_,m,y){if((m[0]&192)!==128)return _.lastNeed=0,"�";if(_.lastNeed>1&&m.length>1){if((m[1]&192)!==128)return _.lastNeed=1,"�";if(_.lastNeed>2&&m.length>2&&(m[2]&192)!==128)return _.lastNeed=2,"�"}}function c(_){var m=this.lastTotal-this.lastNeed,y=a(this,_);if(y!==void 0)return y;if(this.lastNeed<=_.length)return _.copy(this.lastChar,m,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);_.copy(this.lastChar,m,0,_.length),this.lastNeed-=_.length}function l(_,m){var y=o(this,_,m);if(!this.lastNeed)return _.toString("utf8",m);this.lastTotal=y;var C=_.length-(y-this.lastNeed);return _.copy(this.lastChar,0,C),_.toString("utf8",m,C)}function d(_){var m=_&&_.length?this.write(_):"";return this.lastNeed?m+"�":m}function u(_,m){if((_.length-m)%2===0){var y=_.toString("utf16le",m);if(y){var C=y.charCodeAt(y.length-1);if(C>=55296&&C<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=_[_.length-2],this.lastChar[1]=_[_.length-1],y.slice(0,-1)}return y}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=_[_.length-1],_.toString("utf16le",m,_.length-1)}function h(_){var m=_&&_.length?this.write(_):"";if(this.lastNeed){var y=this.lastTotal-this.lastNeed;return m+this.lastChar.toString("utf16le",0,y)}return m}function g(_,m){var y=(_.length-m)%3;return y===0?_.toString("base64",m):(this.lastNeed=3-y,this.lastTotal=3,y===1?this.lastChar[0]=_[_.length-1]:(this.lastChar[0]=_[_.length-2],this.lastChar[1]=_[_.length-1]),_.toString("base64",m,_.length-y))}function b(_){var m=_&&_.length?this.write(_):"";return this.lastNeed?m+this.lastChar.toString("base64",0,3-this.lastNeed):m}function R(_){return _.toString(this.encoding)}function E(_){return _&&_.length?this.write(_):""}return qi}var ic=Ut.codes.ERR_STREAM_PREMATURE_CLOSE;function G0(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),s=0;s0)if(typeof p!="string"&&!q.objectMode&&Object.getPrototypeOf(p)!==n.prototype&&(p=i(p)),M)q.endEmitted?S(f,new _):de(f,q,p,!0);else if(q.ended)S(f,new R);else{if(q.destroyed)return!1;q.reading=!1,q.decoder&&!k?(p=q.decoder.write(p),q.objectMode||p.length!==0?de(f,q,p,!1):H(f,q)):de(f,q,p,!1)}else M||(q.reading=!1,H(f,q))}return!q.ended&&(q.length=T?f=T:(f--,f|=f>>>1,f|=f>>>2,f|=f>>>4,f|=f>>>8,f|=f>>>16,f++),f}function P(f,p){return f<=0||p.length===0&&p.ended?0:p.objectMode?1:f!==f?p.flowing&&p.length?p.buffer.head.data.length:p.length:(f>p.highWaterMark&&(p.highWaterMark=x(f)),f<=p.length?f:p.ended?p.length:(p.needReadable=!0,0))}N.prototype.read=function(f){c("read",f),f=parseInt(f,10);var p=this._readableState,k=f;if(f!==0&&(p.emittedReadable=!1),f===0&&p.needReadable&&((p.highWaterMark!==0?p.length>=p.highWaterMark:p.length>0)||p.ended))return c("read: emitReadable",p.length,p.ended),p.length===0&&p.ended?A(this):B(this),null;if(f=P(f,p),f===0&&p.ended)return p.length===0&&A(this),null;var M=p.needReadable;c("need readable",M),(p.length===0||p.length-f0?ue=w(f,p):ue=null,ue===null?(p.needReadable=p.length<=p.highWaterMark,f=0):(p.length-=f,p.awaitDrain=0),p.length===0&&(p.ended||(p.needReadable=!0),k!==f&&p.ended&&A(this)),ue!==null&&this.emit("data",ue),ue};function D(f,p){if(c("onEofChunk"),!p.ended){if(p.decoder){var k=p.decoder.end();k&&k.length&&(p.buffer.push(k),p.length+=p.objectMode?1:k.length)}p.ended=!0,p.sync?B(f):(p.needReadable=!1,p.emittedReadable||(p.emittedReadable=!0,L(f)))}}function B(f){var p=f._readableState;c("emitReadable",p.needReadable,p.emittedReadable),p.needReadable=!1,p.emittedReadable||(c("emitReadable",p.flowing),p.emittedReadable=!0,ne.nextTick(L,f))}function L(f){var p=f._readableState;c("emitReadable_",p.destroyed,p.length,p.ended),!p.destroyed&&(p.length||p.ended)&&(f.emit("readable"),p.emittedReadable=!1),p.needReadable=!p.flowing&&!p.ended&&p.length<=p.highWaterMark,v(f)}function H(f,p){p.readingMore||(p.readingMore=!0,ne.nextTick(Z,f,p))}function Z(f,p){for(;!p.reading&&!p.ended&&(p.length1&&K(M.pipes,f)!==-1)&&!kr&&(c("false write response, pause",M.awaitDrain),M.awaitDrain++),k.pause())}function zt(ot){c("onerror",ot),gt(),f.removeListener("error",zt),t(f,"error")===0&&S(f,ot)}j(f,"error",zt);function qt(){f.removeListener("finish",Gt),gt()}f.once("close",qt);function Gt(){c("onfinish"),f.removeListener("close",qt),gt()}f.once("finish",Gt);function gt(){c("unpipe"),k.unpipe(f)}return f.emit("pipe",k),M.flowing||(c("pipe resume"),k.resume()),f};function W(f){return function(){var k=f._readableState;c("pipeOnDrain",k.awaitDrain),k.awaitDrain&&k.awaitDrain--,k.awaitDrain===0&&t(f,"data")&&(k.flowing=!0,v(f))}}N.prototype.unpipe=function(f){var p=this._readableState,k={hasUnpiped:!1};if(p.pipesCount===0)return this;if(p.pipesCount===1)return f&&f!==p.pipes?this:(f||(f=p.pipes),p.pipes=null,p.pipesCount=0,p.flowing=!1,f&&f.emit("unpipe",this,k),this);if(!f){var M=p.pipes,ue=p.pipesCount;p.pipes=null,p.pipesCount=0,p.flowing=!1;for(var q=0;q0,M.flowing!==!1&&this.resume()):f==="readable"&&!M.endEmitted&&!M.readableListening&&(M.readableListening=M.needReadable=!0,M.flowing=!1,M.emittedReadable=!1,c("on readable",M.length,M.reading),M.length?B(this):M.reading||ne.nextTick(ce,this)),k},N.prototype.addListener=N.prototype.on,N.prototype.removeListener=function(f,p){var k=r.prototype.removeListener.call(this,f,p);return f==="readable"&&ne.nextTick(Y,this),k},N.prototype.removeAllListeners=function(f){var p=r.prototype.removeAllListeners.apply(this,arguments);return(f==="readable"||f===void 0)&&ne.nextTick(Y,this),p};function Y(f){var p=f._readableState;p.readableListening=f.listenerCount("readable")>0,p.resumeScheduled&&!p.paused?p.flowing=!0:f.listenerCount("data")>0&&f.resume()}function ce(f){c("readable nexttick read 0"),f.read(0)}N.prototype.resume=function(){var f=this._readableState;return f.flowing||(c("resume"),f.flowing=!f.readableListening,se(this,f)),f.paused=!1,this};function se(f,p){p.resumeScheduled||(p.resumeScheduled=!0,ne.nextTick(Ie,f,p))}function Ie(f,p){c("resume",p.reading),p.reading||f.read(0),p.resumeScheduled=!1,f.emit("resume"),v(f),p.flowing&&!p.reading&&f.read(0)}N.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function v(f){var p=f._readableState;for(c("flow",p.flowing);p.flowing&&f.read()!==null;);}N.prototype.wrap=function(f){var p=this,k=this._readableState,M=!1;f.on("end",function(){if(c("wrapped end"),k.decoder&&!k.ended){var ie=k.decoder.end();ie&&ie.length&&p.push(ie)}p.push(null)}),f.on("data",function(ie){if(c("wrapped data"),k.decoder&&(ie=k.decoder.write(ie)),!(k.objectMode&&ie==null)&&!(!k.objectMode&&(!ie||!ie.length))){var it=p.push(ie);it||(M=!0,f.pause())}});for(var ue in f)this[ue]===void 0&&typeof f[ue]=="function"&&(this[ue]=function(it){return function(){return f[it].apply(f,arguments)}}(ue));for(var q=0;q=p.length?(p.decoder?k=p.buffer.join(""):p.buffer.length===1?k=p.buffer.first():k=p.buffer.concat(p.length),p.buffer.clear()):k=p.buffer.consume(f,p.decoder),k}function A(f){var p=f._readableState;c("endReadable",p.endEmitted),p.endEmitted||(p.ended=!0,ne.nextTick(U,p,f))}function U(f,p){if(c("endReadableNT",f.endEmitted,f.length),!f.endEmitted&&f.length===0&&(f.endEmitted=!0,p.readable=!1,p.emit("end"),f.autoDestroy)){var k=p._writableState;(!k||k.autoDestroy&&k.finished)&&p.destroy()}}typeof Symbol=="function"&&(N.from=function(f,p){return C===void 0&&(C=Q0()),C(N,f,p)});function K(f,p){for(var k=0,M=f.length;k0;return l1(o,c,l,function(d){s||(s=d),d&&i.forEach(dc),!c&&(i.forEach(dc),n(s))})});return t.reduce(u1)}var f1=h1;(function(e,t){t=e.exports=hu(),t.Stream=t,t.Readable=t,t.Writable=uu(),t.Duplex=fr(),t.Transform=fu,t.PassThrough=s1,t.finished=zo,t.pipeline=f1})(wo,wo.exports);var _u=wo.exports;const{Transform:p1}=_u;var g1=e=>class mu extends p1{constructor(r,n,s,i,o){super(o),this._rate=r,this._capacity=n,this._delimitedSuffix=s,this._hashBitLength=i,this._options=o,this._state=new e,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,s){let i=null;try{this.update(r,n)}catch(o){i=o}s(i)}_flush(r){let n=null;try{this.push(this.digest())}catch(s){n=s}r(n)}update(r,n){if(!G.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return G.isBuffer(r)||(r=G.from(r,n)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(n=n.toString(r)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new mu(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const{Transform:_1}=_u;var m1=e=>class bu extends _1{constructor(r,n,s,i){super(i),this._rate=r,this._capacity=n,this._delimitedSuffix=s,this._options=i,this._state=new e,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,s){let i=null;try{this.update(r,n)}catch(o){i=o}s(i)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,n){if(!G.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return G.isBuffer(r)||(r=G.from(r,n)),this._state.absorb(r),this}squeeze(r,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let s=this._state.squeeze(r);return n!==void 0&&(s=s.toString(n)),s}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new bu(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}};const b1=g1,y1=m1;var v1=function(e){const t=b1(e),r=y1(e);return function(n,s){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new t(1152,448,null,224,s);case"keccak256":return new t(1088,512,null,256,s);case"keccak384":return new t(832,768,null,384,s);case"keccak512":return new t(576,1024,null,512,s);case"sha3-224":return new t(1152,448,6,224,s);case"sha3-256":return new t(1088,512,6,256,s);case"sha3-384":return new t(832,768,6,384,s);case"sha3-512":return new t(576,1024,6,512,s);case"shake128":return new r(1344,256,31,s);case"shake256":return new r(1088,512,31,s);default:throw new Error("Invald algorithm: "+n)}}},yu={};const hc=[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];yu.p1600=function(e){for(let t=0;t<24;++t){const r=e[0]^e[10]^e[20]^e[30]^e[40],n=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],i=e[3]^e[13]^e[23]^e[33]^e[43],o=e[4]^e[14]^e[24]^e[34]^e[44],a=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],d=e[8]^e[18]^e[28]^e[38]^e[48],u=e[9]^e[19]^e[29]^e[39]^e[49];let h=d^(s<<1|i>>>31),g=u^(i<<1|s>>>31);const b=e[0]^h,R=e[1]^g,E=e[10]^h,_=e[11]^g,m=e[20]^h,y=e[21]^g,C=e[30]^h,S=e[31]^g,I=e[40]^h,j=e[41]^g;h=r^(o<<1|a>>>31),g=n^(a<<1|o>>>31);const $=e[2]^h,N=e[3]^g,J=e[12]^h,de=e[13]^g,oe=e[22]^h,T=e[23]^g,x=e[32]^h,P=e[33]^g,D=e[42]^h,B=e[43]^g;h=s^(c<<1|l>>>31),g=i^(l<<1|c>>>31);const L=e[4]^h,H=e[5]^g,Z=e[14]^h,W=e[15]^g,Y=e[24]^h,ce=e[25]^g,se=e[34]^h,Ie=e[35]^g,v=e[44]^h,w=e[45]^g;h=o^(d<<1|u>>>31),g=a^(u<<1|d>>>31);const A=e[6]^h,U=e[7]^g,K=e[16]^h,f=e[17]^g,p=e[26]^h,k=e[27]^g,M=e[36]^h,ue=e[37]^g,q=e[46]^h,ie=e[47]^g;h=c^(r<<1|n>>>31),g=l^(n<<1|r>>>31);const it=e[8]^h,St=e[9]^g,kr=e[18]^h,_n=e[19]^g,Ir=e[28]^h,zt=e[29]^g,qt=e[38]^h,Gt=e[39]^g,gt=e[48]^h,ot=e[49]^g,Ze=b,Fs=R,js=_<<4|E>>>28,Hs=E<<4|_>>>28,Us=m<<3|y>>>29,Ws=y<<3|m>>>29,Vs=S<<9|C>>>23,zs=C<<9|S>>>23,qs=I<<18|j>>>14,Gs=j<<18|I>>>14,Js=$<<1|N>>>31,Zs=N<<1|$>>>31,Ks=de<<12|J>>>20,Qs=J<<12|de>>>20,Ys=oe<<10|T>>>22,Xs=T<<10|oe>>>22,ei=P<<13|x>>>19,ti=x<<13|P>>>19,ri=D<<2|B>>>30,ni=B<<2|D>>>30,si=H<<30|L>>>2,ii=L<<30|H>>>2,oi=Z<<6|W>>>26,ai=W<<6|Z>>>26,ci=ce<<11|Y>>>21,li=Y<<11|ce>>>21,ui=se<<15|Ie>>>17,di=Ie<<15|se>>>17,hi=w<<29|v>>>3,fi=v<<29|w>>>3,pi=A<<28|U>>>4,gi=U<<28|A>>>4,_i=f<<23|K>>>9,mi=K<<23|f>>>9,bi=p<<25|k>>>7,yi=k<<25|p>>>7,vi=M<<21|ue>>>11,wi=ue<<21|M>>>11,Ei=ie<<24|q>>>8,Si=q<<24|ie>>>8,Ri=it<<27|St>>>5,Ci=St<<27|it>>>5,ki=kr<<20|_n>>>12,Ii=_n<<20|kr>>>12,Ai=zt<<7|Ir>>>25,xi=Ir<<7|zt>>>25,Ti=qt<<8|Gt>>>24,Ni=Gt<<8|qt>>>24,Mi=gt<<14|ot>>>18,Li=ot<<14|gt>>>18;e[0]=Ze^~Ks&ci,e[1]=Fs^~Qs&li,e[10]=pi^~ki&Us,e[11]=gi^~Ii&Ws,e[20]=Js^~oi&bi,e[21]=Zs^~ai&yi,e[30]=Ri^~js&Ys,e[31]=Ci^~Hs&Xs,e[40]=si^~_i&Ai,e[41]=ii^~mi&xi,e[2]=Ks^~ci&vi,e[3]=Qs^~li&wi,e[12]=ki^~Us&ei,e[13]=Ii^~Ws&ti,e[22]=oi^~bi&Ti,e[23]=ai^~yi&Ni,e[32]=js^~Ys&ui,e[33]=Hs^~Xs&di,e[42]=_i^~Ai&Vs,e[43]=mi^~xi&zs,e[4]=ci^~vi&Mi,e[5]=li^~wi&Li,e[14]=Us^~ei&hi,e[15]=Ws^~ti&fi,e[24]=bi^~Ti&qs,e[25]=yi^~Ni&Gs,e[34]=Ys^~ui&Ei,e[35]=Xs^~di&Si,e[44]=Ai^~Vs&ri,e[45]=xi^~zs&ni,e[6]=vi^~Mi&Ze,e[7]=wi^~Li&Fs,e[16]=ei^~hi&pi,e[17]=ti^~fi&gi,e[26]=Ti^~qs&Js,e[27]=Ni^~Gs&Zs,e[36]=ui^~Ei&Ri,e[37]=di^~Si&Ci,e[46]=Vs^~ri&si,e[47]=zs^~ni&ii,e[8]=Mi^~Ze&Ks,e[9]=Li^~Fs&Qs,e[18]=hi^~pi&ki,e[19]=fi^~gi&Ii,e[28]=qs^~Js&oi,e[29]=Gs^~Zs&ai,e[38]=Ei^~Ri&js,e[39]=Si^~Ci&Hs,e[48]=ri^~si&_i,e[49]=ni^~ii&mi,e[0]^=hc[t*2],e[1]^=hc[t*2+1]}};const $n=yu;function Er(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}Er.prototype.initialize=function(e,t){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1};Er.prototype.absorb=function(e){for(let t=0;t>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&($n.p1600(this.state),this.count=0);return t};Er.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing};var w1=Er,E1=v1(w1);const S1=E1,R1=jn;function vu(e){return G.allocUnsafe(e).fill(0)}function wu(e,t,r){const n=vu(t);return e=bs(e),r?e.length"u")throw new Error("Not an array?");if(r=ku(e),r!=="dynamic"&&r!==0&&t.length>r)throw new Error("Elements exceed array size: "+r);s=[],e=e.slice(0,e.lastIndexOf("[")),typeof t=="string"&&(t=JSON.parse(t));for(i in t)s.push(Xe(e,t[i]));if(r==="dynamic"){var o=Xe("uint256",t.length);s.unshift(o)}return G.concat(s)}else{if(e==="bytes")return t=new G(t),s=G.concat([Xe("uint256",t.length),t]),t.length%32!==0&&(s=G.concat([s,$t.zeros(32-t.length%32)])),s;if(e.startsWith("bytes")){if(r=sr(e),r<1||r>32)throw new Error("Invalid bytes width: "+r);return $t.setLengthRight(t,32)}else if(e.startsWith("uint")){if(r=sr(e),r%8||r<8||r>256)throw new Error("Invalid uint width: "+r);if(n=xt(t),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());if(n<0)throw new Error("Supplied uint is negative");return n.toArrayLike(G,"be",32)}else if(e.startsWith("int")){if(r=sr(e),r%8||r<8||r>256)throw new Error("Invalid int width: "+r);if(n=xt(t),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());return n.toTwos(256).toArrayLike(G,"be",32)}else if(e.startsWith("ufixed")){if(r=fc(e),n=xt(t),n<0)throw new Error("Supplied ufixed is negative");return Xe("uint256",n.mul(new Mt(2).pow(new Mt(r[1]))))}else if(e.startsWith("fixed"))return r=fc(e),Xe("int256",xt(t).mul(new Mt(2).pow(new Mt(r[1]))))}throw new Error("Unsupported or invalid type: "+e)}function x1(e){return e==="string"||e==="bytes"||ku(e)==="dynamic"}function T1(e){return e.lastIndexOf("]")===e.length-1}function N1(e,t){var r=[],n=[],s=32*e.length;for(var i in e){var o=Cu(e[i]),a=t[i],c=Xe(o,a);x1(o)?(r.push(Xe("uint256",s)),n.push(c),s+=c.length):r.push(c)}return G.concat(r.concat(n))}function Iu(e,t){if(e.length!==t.length)throw new Error("Number of types are not matching the values");for(var r,n,s=[],i=0;i32)throw new Error("Invalid bytes width: "+r);s.push($t.setLengthRight(a,r))}else if(o.startsWith("uint")){if(r=sr(o),r%8||r<8||r>256)throw new Error("Invalid uint width: "+r);if(n=xt(a),n.bitLength()>r)throw new Error("Supplied uint exceeds width: "+r+" vs "+n.bitLength());s.push(n.toArrayLike(G,"be",r/8))}else if(o.startsWith("int")){if(r=sr(o),r%8||r<8||r>256)throw new Error("Invalid int width: "+r);if(n=xt(a),n.bitLength()>r)throw new Error("Supplied int exceeds width: "+r+" vs "+n.bitLength());s.push(n.toTwos(r).toArrayLike(G,"be",r/8))}else throw new Error("Unsupported or invalid type: "+o)}return G.concat(s)}function M1(e,t){return $t.keccak(Iu(e,t))}var L1={rawEncode:N1,solidityPack:Iu,soliditySHA3:M1};const Ve=Ru,Or=L1,Au={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},Qi={encodeData(e,t,r,n=!0){const s=["bytes32"],i=[this.hashType(e,r)];if(n){const o=(a,c,l)=>{if(r[c]!==void 0)return["bytes32",l==null?"0x0000000000000000000000000000000000000000000000000000000000000000":Ve.keccak(this.encodeData(c,l,r,n))];if(l===void 0)throw new Error(`missing value for field ${a} of type ${c}`);if(c==="bytes")return["bytes32",Ve.keccak(l)];if(c==="string")return typeof l=="string"&&(l=G.from(l,"utf8")),["bytes32",Ve.keccak(l)];if(c.lastIndexOf("]")===c.length-1){const d=c.slice(0,c.lastIndexOf("[")),u=l.map(h=>o(a,d,h));return["bytes32",Ve.keccak(Or.rawEncode(u.map(([h])=>h),u.map(([,h])=>h)))]}return[c,l]};for(const a of r[e]){const[c,l]=o(a.name,a.type,t[a.name]);s.push(c),i.push(l)}}else for(const o of r[e]){let a=t[o.name];if(a!==void 0)if(o.type==="bytes")s.push("bytes32"),a=Ve.keccak(a),i.push(a);else if(o.type==="string")s.push("bytes32"),typeof a=="string"&&(a=G.from(a,"utf8")),a=Ve.keccak(a),i.push(a);else if(r[o.type]!==void 0)s.push("bytes32"),a=Ve.keccak(this.encodeData(o.type,a,r,n)),i.push(a);else{if(o.type.lastIndexOf("]")===o.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");s.push(o.type),i.push(a)}}return Or.rawEncode(s,i)},encodeType(e,t){let r="",n=this.findTypeDependencies(e,t).filter(s=>s!==e);n=[e].concat(n.sort());for(const s of n){if(!t[s])throw new Error("No type definition specified: "+s);r+=s+"("+t[s].map(({name:o,type:a})=>a+" "+o).join(",")+")"}return r},findTypeDependencies(e,t,r=[]){if(e=e.match(/^\w*/)[0],r.includes(e)||t[e]===void 0)return r;r.push(e);for(const n of t[e])for(const s of this.findTypeDependencies(n.type,t,r))!r.includes(s)&&r.push(s);return r},hashStruct(e,t,r,n=!0){return Ve.keccak(this.encodeData(e,t,r,n))},hashType(e,t){return Ve.keccak(this.encodeType(e,t))},sanitizeData(e){const t={};for(const r in Au.properties)e[r]&&(t[r]=e[r]);return t.types&&(t.types=Object.assign({EIP712Domain:[]},t.types)),t},hash(e,t=!0){const r=this.sanitizeData(e),n=[G.from("1901","hex")];return n.push(this.hashStruct("EIP712Domain",r.domain,r.types,t)),r.primaryType!=="EIP712Domain"&&n.push(this.hashStruct(r.primaryType,r.message,r.types,t)),Ve.keccak(G.concat(n))}};var P1={TYPED_MESSAGE_SCHEMA:Au,TypedDataUtils:Qi,hashForSignTypedDataLegacy:function(e){return O1(e.data)},hashForSignTypedData_v3:function(e){return Qi.hash(e.data,!1)},hashForSignTypedData_v4:function(e){return Qi.hash(e.data)}};function O1(e){const t=new Error("Expect argument to be non-empty array");if(typeof e!="object"||!e.length)throw t;const r=e.map(function(i){return i.type==="bytes"?Ve.toBuffer(i.value):i.value}),n=e.map(function(i){return i.type}),s=e.map(function(i){if(!i.name)throw t;return i.type+" "+i.name});return Or.soliditySHA3(["bytes32","bytes32"],[Or.soliditySHA3(new Array(e.length).fill("string"),s),Or.soliditySHA3(n,r)])}var pr={};Object.defineProperty(pr,"__esModule",{value:!0});pr.filterFromParam=pr.FilterPolyfill=void 0;const tr=be,Ae=O,$1=5*60*1e3,Tt={jsonrpc:"2.0",id:0};class B1{constructor(t){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,tr.IntNumber)(1),this.REQUEST_THROTTLE_INTERVAL=1e3,this.lastFetchTimestamp=new Date(0),this.resolvers=[],this.provider=t}async newFilter(t){const r=xu(t),n=this.makeFilterId(),s=await this.setInitialCursorPosition(n,r.fromBlock);return console.info(`Installing new log filter(${n}):`,r,"initial cursor position:",s),this.logFilters.set(n,r),this.setFilterTimeout(n),(0,Ae.hexStringFromIntNumber)(n)}async newBlockFilter(){const t=this.makeFilterId(),r=await this.setInitialCursorPosition(t,"latest");return console.info(`Installing new block filter (${t}) with initial cursor position:`,r),this.blockFilters.add(t),this.setFilterTimeout(t),(0,Ae.hexStringFromIntNumber)(t)}async newPendingTransactionFilter(){const t=this.makeFilterId(),r=await this.setInitialCursorPosition(t,"latest");return console.info(`Installing new block filter (${t}) with initial cursor position:`,r),this.pendingTransactionFilters.add(t),this.setFilterTimeout(t),(0,Ae.hexStringFromIntNumber)(t)}uninstallFilter(t){const r=(0,Ae.intNumberFromHexString)(t);return console.info(`Uninstalling filter (${r})`),this.deleteFilter(r),!0}getFilterChanges(t){const r=(0,Ae.intNumberFromHexString)(t);return this.timeouts.has(r)&&this.setFilterTimeout(r),this.logFilters.has(r)?this.getLogFilterChanges(r):this.blockFilters.has(r)?this.getBlockFilterChanges(r):this.pendingTransactionFilters.has(r)?this.getPendingTransactionFilterChanges(r):Promise.resolve(En())}async getFilterLogs(t){const r=(0,Ae.intNumberFromHexString)(t),n=this.logFilters.get(r);return n?this.sendAsyncPromise(Object.assign(Object.assign({},Tt),{method:"eth_getLogs",params:[pc(n)]})):En()}makeFilterId(){return(0,tr.IntNumber)(++this.nextFilterId)}sendAsyncPromise(t){return new Promise((r,n)=>{this.provider.sendAsync(t,(s,i)=>{if(s)return n(s);if(Array.isArray(i)||i==null)return n(new Error(`unexpected response received: ${JSON.stringify(i)}`));r(i)})})}deleteFilter(t){console.info(`Deleting filter (${t})`),this.logFilters.delete(t),this.blockFilters.delete(t),this.pendingTransactionFilters.delete(t),this.cursors.delete(t),this.timeouts.delete(t)}async getLogFilterChanges(t){const r=this.logFilters.get(t),n=this.cursors.get(t);if(!n||!r)return En();const s=await this.getCurrentBlockHeight(),i=r.toBlock==="latest"?s:r.toBlock;if(n>s||n>Number(r.toBlock))return Sn();console.info(`Fetching logs from ${n} to ${i} for filter ${t}`);const o=await this.sendAsyncPromise(Object.assign(Object.assign({},Tt),{method:"eth_getLogs",params:[pc(Object.assign(Object.assign({},r),{fromBlock:n,toBlock:i}))]}));if(Array.isArray(o.result)){const a=o.result.map(l=>(0,Ae.intNumberFromHexString)(l.blockNumber||"0x0")),c=Math.max(...a);if(c&&c>n){const l=(0,tr.IntNumber)(c+1);console.info(`Moving cursor position for filter (${t}) from ${n} to ${l}`),this.cursors.set(t,l)}}return o}async getBlockFilterChanges(t){const r=this.cursors.get(t);if(!r)return En();const n=await this.getCurrentBlockHeight();if(r>n)return Sn();console.info(`Fetching blocks from ${r} to ${n} for filter (${t})`);const s=(await Promise.all((0,Ae.range)(r,n+1).map(o=>this.getBlockHashByNumber((0,tr.IntNumber)(o))))).filter(o=>!!o),i=(0,tr.IntNumber)(r+s.length);return console.info(`Moving cursor position for filter (${t}) from ${r} to ${i}`),this.cursors.set(t,i),Object.assign(Object.assign({},Tt),{result:s})}async getPendingTransactionFilterChanges(t){return Promise.resolve(Sn())}async setInitialCursorPosition(t,r){const n=await this.getCurrentBlockHeight(),s=typeof r=="number"&&r>n?r:n;return this.cursors.set(t,s),s}setFilterTimeout(t){const r=this.timeouts.get(t);r&&window.clearTimeout(r);const n=window.setTimeout(()=>{console.info(`Filter (${t}) timed out`),this.deleteFilter(t)},$1);this.timeouts.set(t,n)}async getCurrentBlockHeight(){const t=new Date;if(t.getTime()-this.lastFetchTimestamp.getTime()>this.REQUEST_THROTTLE_INTERVAL){this.lastFetchTimestamp=t;const r=await this._getCurrentBlockHeight();this.currentBlockHeight=r,this.resolvers.forEach(n=>n(r)),this.resolvers=[]}return this.currentBlockHeight?this.currentBlockHeight:new Promise(r=>this.resolvers.push(r))}async _getCurrentBlockHeight(){const{result:t}=await this.sendAsyncPromise(Object.assign(Object.assign({},Tt),{method:"eth_blockNumber",params:[]}));return(0,Ae.intNumberFromHexString)((0,Ae.ensureHexString)(t))}async getBlockHashByNumber(t){const r=await this.sendAsyncPromise(Object.assign(Object.assign({},Tt),{method:"eth_getBlockByNumber",params:[(0,Ae.hexStringFromIntNumber)(t),!1]}));return r.result&&typeof r.result.hash=="string"?(0,Ae.ensureHexString)(r.result.hash):null}}pr.FilterPolyfill=B1;function xu(e){return{fromBlock:gc(e.fromBlock),toBlock:gc(e.toBlock),addresses:e.address===void 0?null:Array.isArray(e.address)?e.address:[e.address],topics:e.topics||[]}}pr.filterFromParam=xu;function pc(e){const t={fromBlock:_c(e.fromBlock),toBlock:_c(e.toBlock),topics:e.topics};return e.addresses!==null&&(t.address=e.addresses),t}function gc(e){if(e===void 0||e==="latest"||e==="pending")return"latest";if(e==="earliest")return(0,tr.IntNumber)(0);if((0,Ae.isHexString)(e))return(0,Ae.intNumberFromHexString)(e);throw new Error(`Invalid block option: ${String(e)}`)}function _c(e){return e==="latest"?e:(0,Ae.hexStringFromIntNumber)(e)}function En(){return Object.assign(Object.assign({},Tt),{error:{code:-32e3,message:"filter not found"}})}function Sn(){return Object.assign(Object.assign({},Tt),{result:[]})}var ys={},Tu={},vs={},qo=D1;function D1(e){e=e||{};var t=e.max||Number.MAX_SAFE_INTEGER,r=typeof e.start<"u"?e.start:Math.floor(Math.random()*t);return function(){return r=r%t,r++}}const mc=(e,t)=>function(){const r=t.promiseModule,n=new Array(arguments.length);for(let s=0;s{t.errorFirst?n.push(function(o,a){if(t.multiArgs){const c=new Array(arguments.length-1);for(let l=1;l{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);const r=s=>{const i=o=>typeof o=="string"?s===o:o.test(s);return t.include?t.include.some(i):!t.exclude.some(i)};let n;typeof e=="function"?n=function(){return t.excludeMain?e.apply(this,arguments):mc(e,t).apply(this,arguments)}:n=Object.create(Object.getPrototypeOf(e));for(const s in e){const i=e[s];n[s]=typeof i=="function"&&r(s)?mc(i,t):i}return n},on={},an={};Object.defineProperty(an,"__esModule",{value:!0});const j1=Un;function bc(e,t,r){try{Reflect.apply(e,t,r)}catch(n){setTimeout(()=>{throw n})}}function H1(e){const t=e.length,r=new Array(t);for(let n=0;n0&&([o]=r),o instanceof Error)throw o;const a=new Error(`Unhandled error.${o?` (${o.message})`:""}`);throw a.context=o,a}const i=s[t];if(i===void 0)return!1;if(typeof i=="function")bc(i,this,r);else{const o=i.length,a=H1(i);for(let c=0;ce+t,yc=["sync","latest"];class G1 extends V1.default{constructor(t){super(),this._blockResetDuration=t.blockResetDuration||20*z1,this._usePastBlocks=t.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(r=>this.once("latest",r))}removeAllListeners(t){return t?super.removeAllListeners(t):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(t){yc.includes(t)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return yc.map(t=>this.listenerCount(t)).reduce(q1)}_shouldUseNewBlock(t){const r=this._currentBlock;if(!r)return!0;const n=vc(t),s=vc(r);return this._usePastBlocks&&ns}_newPotentialLatest(t){this._shouldUseNewBlock(t)&&this._setCurrentBlock(t)}_setCurrentBlock(t){const r=this._currentBlock;this._currentBlock=t,this.emit("latest",t),this.emit("sync",{oldBlock:r,newBlock:t})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}on.BaseBlockTracker=G1;function vc(e){return Number.parseInt(e,16)}var Nu={},Mu={},Ce={};class Lu extends TypeError{constructor(t,r){let n;const{message:s,explanation:i,...o}=t,{path:a}=t,c=a.length===0?s:`At path: ${a.join(".")} -- ${s}`;super(i??c),i!=null&&(this.cause=c),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...r()])}}function J1(e){return He(e)&&typeof e[Symbol.iterator]=="function"}function He(e){return typeof e=="object"&&e!=null}function wc(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function ye(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Z1(e){const{done:t,value:r}=e.next();return t?void 0:r}function K1(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:s,branch:i}=t,{type:o}=r,{refinement:a,message:c=`Expected a value of type \`${o}\`${a?` with refinement \`${a}\``:""}, but received: \`${ye(n)}\``}=e;return{value:n,type:o,refinement:a,key:s[s.length-1],path:s,branch:i,...e,message:c}}function*So(e,t,r,n){J1(e)||(e=[e]);for(const s of e){const i=K1(s,t,r,n);i&&(yield i)}}function*Go(e,t,r={}){const{path:n=[],branch:s=[e],coerce:i=!1,mask:o=!1}=r,a={path:n,branch:s};if(i&&(e=t.coercer(e,a),o&&t.type!=="type"&&He(t.schema)&&He(e)&&!Array.isArray(e)))for(const l in e)t.schema[l]===void 0&&delete e[l];let c="valid";for(const l of t.validator(e,a))l.explanation=r.message,c="not_valid",yield[l,void 0];for(let[l,d,u]of t.entries(e,a)){const h=Go(d,u,{path:l===void 0?n:[...n,l],branch:l===void 0?s:[...s,d],coerce:i,mask:o,message:r.message});for(const g of h)g[0]?(c=g[0].refinement!=null?"not_refined":"not_valid",yield[g[0],void 0]):i&&(d=g[1],l===void 0?e=d:e instanceof Map?e.set(l,d):e instanceof Set?e.add(d):He(e)&&(d!==void 0||l in e)&&(e[l]=d))}if(c!=="not_valid")for(const l of t.refiner(e,a))l.explanation=r.message,c="not_refined",yield[l,void 0];c==="valid"&&(yield[void 0,e])}class _e{constructor(t){const{type:r,schema:n,validator:s,refiner:i,coercer:o=c=>c,entries:a=function*(){}}=t;this.type=r,this.schema=n,this.entries=a,this.coercer=o,s?this.validator=(c,l)=>{const d=s(c,l);return So(d,l,this,c)}:this.validator=()=>[],i?this.refiner=(c,l)=>{const d=i(c,l);return So(d,l,this,c)}:this.refiner=()=>[]}assert(t,r){return Pu(t,this,r)}create(t,r){return Ou(t,this,r)}is(t){return Jo(t,this)}mask(t,r){return $u(t,this,r)}validate(t,r={}){return Sr(t,this,r)}}function Pu(e,t,r){const n=Sr(e,t,{message:r});if(n[0])throw n[0]}function Ou(e,t,r){const n=Sr(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function $u(e,t,r){const n=Sr(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function Jo(e,t){return!Sr(e,t)[0]}function Sr(e,t,r={}){const n=Go(e,t,r),s=Z1(n);return s[0]?[new Lu(s[0],function*(){for(const o of n)o[0]&&(yield o[0])}),void 0]:[void 0,s[1]]}function Q1(...e){const t=e[0].type==="type",r=e.map(s=>s.schema),n=Object.assign({},...r);return t?Ko(n):cn(n)}function Me(e,t){return new _e({type:e,schema:null,validator:t})}function Y1(e,t){return new _e({...e,refiner:(r,n)=>r===void 0||e.refiner(r,n),validator(r,n){return r===void 0?!0:(t(r,n),e.validator(r,n))}})}function X1(e){return new _e({type:"dynamic",schema:null,*entries(t,r){yield*e(t,r).entries(t,r)},validator(t,r){return e(t,r).validator(t,r)},coercer(t,r){return e(t,r).coercer(t,r)},refiner(t,r){return e(t,r).refiner(t,r)}})}function ep(e){let t;return new _e({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator(r,n){return t??(t=e()),t.validator(r,n)},coercer(r,n){return t??(t=e()),t.coercer(r,n)},refiner(r,n){return t??(t=e()),t.refiner(r,n)}})}function tp(e,t){const{schema:r}=e,n={...r};for(const s of t)delete n[s];switch(e.type){case"type":return Ko(n);default:return cn(n)}}function rp(e){const t=e instanceof _e?{...e.schema}:{...e};for(const r in t)t[r]=Bu(t[r]);return cn(t)}function np(e,t){const{schema:r}=e,n={};for(const s of t)n[s]=r[s];return cn(n)}function sp(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),Me(e,t)}function ip(){return Me("any",()=>!0)}function op(e){return new _e({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${ye(t)}`}})}function ap(){return Me("bigint",e=>typeof e=="bigint")}function cp(){return Me("boolean",e=>typeof e=="boolean")}function lp(){return Me("date",e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${ye(e)}`)}function up(e){const t={},r=e.map(n=>ye(n)).join();for(const n of e)t[n]=n;return new _e({type:"enums",schema:t,validator(n){return e.includes(n)||`Expected one of \`${r}\`, but received: ${ye(n)}`}})}function dp(){return Me("func",e=>typeof e=="function"||`Expected a function, but received: ${ye(e)}`)}function hp(e){return Me("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${ye(t)}`)}function fp(){return Me("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${ye(e)}`)}function pp(e){return new _e({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})}function gp(e){const t=ye(e),r=typeof e;return new _e({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${ye(n)}`}})}function _p(e,t){return new _e({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,s]of r.entries())yield[n,n,e],yield[n,s,t]},coercer(r){return r instanceof Map?new Map(r):r},validator(r){return r instanceof Map||`Expected a \`Map\` object, but received: ${ye(r)}`}})}function Zo(){return Me("never",()=>!1)}function mp(e){return new _e({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function bp(){return Me("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${ye(e)}`)}function cn(e){const t=e?Object.keys(e):[],r=Zo();return new _e({type:"object",schema:e||null,*entries(n){if(e&&He(n)){const s=new Set(Object.keys(n));for(const i of t)s.delete(i),yield[i,n[i],e[i]];for(const i of s)yield[i,n[i],r]}},validator(n){return He(n)||`Expected an object, but received: ${ye(n)}`},coercer(n){return He(n)?{...n}:n}})}function Bu(e){return new _e({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function yp(e,t){return new _e({type:"record",schema:null,*entries(r){if(He(r))for(const n in r){const s=r[n];yield[n,n,e],yield[n,s,t]}},validator(r){return He(r)||`Expected an object, but received: ${ye(r)}`}})}function vp(){return Me("regexp",e=>e instanceof RegExp)}function wp(e){return new _e({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer(t){return t instanceof Set?new Set(t):t},validator(t){return t instanceof Set||`Expected a \`Set\` object, but received: ${ye(t)}`}})}function Du(){return Me("string",e=>typeof e=="string"||`Expected a string, but received: ${ye(e)}`)}function Ep(e){const t=Zo();return new _e({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let s=0;sr.type).join(" | ");return new _e({type:"union",schema:null,coercer(r){for(const n of e){const[s,i]=n.validate(r,{coerce:!0});if(!s)return i}return r},validator(r,n){const s=[];for(const i of e){const[...o]=Go(r,i,n),[a]=o;if(a[0])for(const[c]of o)c&&s.push(c);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${ye(r)}`,...s]}})}function Fu(){return Me("unknown",()=>!0)}function Qo(e,t,r){return new _e({...e,coercer:(n,s)=>Jo(n,t)?e.coercer(r(n,s),s):e.coercer(n,s)})}function Rp(e,t,r={}){return Qo(e,Fu(),n=>{const s=typeof t=="function"?t():t;if(n===void 0)return s;if(!r.strict&&wc(n)&&wc(s)){const i={...n};let o=!1;for(const a in s)i[a]===void 0&&(i[a]=s[a],o=!0);if(o)return i}return n})}function Cp(e){return Qo(e,Du(),t=>t.trim())}function kp(e){return Wt(e,"empty",t=>{const r=ju(t);return r===0||`Expected an empty ${e.type} but received one with a size of \`${r}\``})}function ju(e){return e instanceof Map||e instanceof Set?e.size:e.length}function Ip(e,t,r={}){const{exclusive:n}=r;return Wt(e,"max",s=>n?sn?s>t:s>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${s}\``)}function xp(e){return Wt(e,"nonempty",t=>ju(t)>0||`Expected a nonempty ${e.type} but received an empty one`)}function Tp(e,t){return Wt(e,"pattern",r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`)}function Np(e,t,r=t){const n=`Expected a ${e.type}`,s=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return Wt(e,"size",i=>{if(typeof i=="number"||i instanceof Date)return t<=i&&i<=r||`${n} ${s} but received \`${i}\``;if(i instanceof Map||i instanceof Set){const{size:o}=i;return t<=o&&o<=r||`${n} with a size ${s} but received one with a size of \`${o}\``}else{const{length:o}=i;return t<=o&&o<=r||`${n} with a length ${s} but received one with a length of \`${o}\``}})}function Wt(e,t,r){return new _e({...e,*refiner(n,s){yield*e.refiner(n,s);const i=r(n,s),o=So(i,s,e,n);for(const a of o)yield{...a,refinement:t}}})}const Mp=Object.freeze(Object.defineProperty({__proto__:null,Struct:_e,StructError:Lu,any:ip,array:op,assert:Pu,assign:Q1,bigint:ap,boolean:cp,coerce:Qo,create:Ou,date:lp,defaulted:Rp,define:Me,deprecated:Y1,dynamic:X1,empty:kp,enums:up,func:dp,instance:hp,integer:fp,intersection:pp,is:Jo,lazy:ep,literal:gp,map:_p,mask:$u,max:Ip,min:Ap,never:Zo,nonempty:xp,nullable:mp,number:bp,object:cn,omit:tp,optional:Bu,partial:rp,pattern:Tp,pick:np,record:yp,refine:Wt,regexp:vp,set:wp,size:Np,string:Du,struct:sp,trimmed:Cp,tuple:Ep,type:Ko,union:Sp,unknown:Fu,validate:Sr},Symbol.toStringTag,{value:"Module"})),Vt=Ur(Mp);Object.defineProperty(Ce,"__esModule",{value:!0});Ce.assertExhaustive=Ce.assertStruct=Ce.assert=Ce.AssertionError=void 0;const Lp=Vt;function Pp(e){return typeof e=="object"&&e!==null&&"message"in e}function Op(e){var t,r;return typeof((r=(t=e==null?void 0:e.prototype)===null||t===void 0?void 0:t.constructor)===null||r===void 0?void 0:r.name)=="string"}function $p(e){const t=Pp(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}function Hu(e,t){return Op(e)?new e({message:t}):e({message:t})}class Yo extends Error{constructor(t){super(t.message),this.code="ERR_ASSERTION"}}Ce.AssertionError=Yo;function Bp(e,t="Assertion failed.",r=Yo){if(!e)throw t instanceof Error?t:Hu(r,t)}Ce.assert=Bp;function Dp(e,t,r="Assertion failed",n=Yo){try{(0,Lp.assert)(e,t)}catch(s){throw Hu(n,`${r}: ${$p(s)}.`)}}Ce.assertStruct=Dp;function Fp(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}Ce.assertExhaustive=Fp;var ln={};Object.defineProperty(ln,"__esModule",{value:!0});ln.base64=void 0;const jp=Vt,Hp=Ce,Up=(e,t={})=>{var r,n;const s=(r=t.paddingRequired)!==null&&r!==void 0?r:!1,i=(n=t.characterSet)!==null&&n!==void 0?n:"base64";let o;i==="base64"?o=String.raw`[A-Za-z0-9+\/]`:((0,Hp.assert)(i==="base64url"),o=String.raw`[-_A-Za-z0-9]`);let a;return s?a=new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):a=new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,jp.pattern)(e,a)};ln.base64=Up;var te={},un={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.StrictHexStruct=e.HexStruct=void 0;const t=Vt,r=Ce;e.HexStruct=(0,t.pattern)((0,t.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]+$/iu);function n(l){return(0,t.is)(l,e.HexStruct)}e.isHexString=n;function s(l){return(0,t.is)(l,e.StrictHexStruct)}e.isStrictHexString=s;function i(l){(0,r.assert)(n(l),"Value must be a hexadecimal string.")}e.assertIsHexString=i;function o(l){(0,r.assert)(s(l),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=o;function a(l){return l.startsWith("0x")?l:l.startsWith("0X")?`0x${l.substring(2)}`:`0x${l}`}e.add0x=a;function c(l){return l.startsWith("0x")||l.startsWith("0X")?l.substring(2):l}e.remove0x=c})(un);Object.defineProperty(te,"__esModule",{value:!0});te.createDataView=te.concatBytes=te.valueToBytes=te.stringToBytes=te.numberToBytes=te.signedBigIntToBytes=te.bigIntToBytes=te.hexToBytes=te.bytesToString=te.bytesToNumber=te.bytesToSignedBigInt=te.bytesToBigInt=te.bytesToHex=te.assertIsBytes=te.isBytes=void 0;const Oe=Ce,Ro=un,Ec=48,Sc=58,Rc=87;function Wp(){const e=[];return()=>{if(e.length===0)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}const Vp=Wp();function Xo(e){return e instanceof Uint8Array}te.isBytes=Xo;function Rr(e){(0,Oe.assert)(Xo(e),"Value must be a Uint8Array.")}te.assertIsBytes=Rr;function Uu(e){if(Rr(e),e.length===0)return"0x";const t=Vp(),r=new Array(e.length);for(let n=0;n=BigInt(0),"Value must be a non-negative bigint.");const t=e.toString(16);return ws(t)}te.bigIntToBytes=Vu;function Jp(e,t){(0,Oe.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(t*8+-1))}function Zp(e,t){(0,Oe.assert)(typeof e=="bigint","Value must be a bigint."),(0,Oe.assert)(typeof t=="number","Byte length must be a number."),(0,Oe.assert)(t>0,"Byte length must be greater than 0."),(0,Oe.assert)(Jp(e,t),"Byte length is too small to represent the given value.");let r=e;const n=new Uint8Array(t);for(let s=0;s>=BigInt(8);return n.reverse()}te.signedBigIntToBytes=Zp;function zu(e){(0,Oe.assert)(typeof e=="number","Value must be a number."),(0,Oe.assert)(e>=0,"Value must be a non-negative number."),(0,Oe.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");const t=e.toString(16);return ws(t)}te.numberToBytes=zu;function qu(e){return(0,Oe.assert)(typeof e=="string","Value must be a string."),new TextEncoder().encode(e)}te.stringToBytes=qu;function Gu(e){if(typeof e=="bigint")return Vu(e);if(typeof e=="number")return zu(e);if(typeof e=="string")return e.startsWith("0x")?ws(e):qu(e);if(Xo(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}te.valueToBytes=Gu;function Kp(e){const t=new Array(e.length);let r=0;for(let s=0;st.call(r,n,s,this))}get(t){return xe(this,We,"f").get(t)}has(t){return xe(this,We,"f").has(t)}keys(){return xe(this,We,"f").keys()}values(){return xe(this,We,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([t,r])=>`${String(t)} => ${String(r)}`).join(", ")} `:""}}`}}gr.FrozenMap=ea;class ta{constructor(t){Qe.set(this,void 0),Ku(this,Qe,new Set(t),"f"),Object.freeze(this)}get size(){return xe(this,Qe,"f").size}[(Qe=new WeakMap,Symbol.iterator)](){return xe(this,Qe,"f")[Symbol.iterator]()}entries(){return xe(this,Qe,"f").entries()}forEach(t,r){return xe(this,Qe,"f").forEach((n,s,i)=>t.call(r,n,s,this))}has(t){return xe(this,Qe,"f").has(t)}keys(){return xe(this,Qe,"f").keys()}values(){return xe(this,Qe,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(t=>String(t)).join(", ")} `:""}}`}}gr.FrozenSet=ta;Object.freeze(ea);Object.freeze(ea.prototype);Object.freeze(ta);Object.freeze(ta.prototype);var Qu={};Object.defineProperty(Qu,"__esModule",{value:!0});var Yu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=void 0;const t=Vt,r=Ce,n=()=>(0,t.define)("finite number",S=>(0,t.is)(S,(0,t.number)())&&Number.isFinite(S));e.UnsafeJsonStruct=(0,t.union)([(0,t.literal)(null),(0,t.boolean)(),n(),(0,t.string)(),(0,t.array)((0,t.lazy)(()=>e.UnsafeJsonStruct)),(0,t.record)((0,t.string)(),(0,t.lazy)(()=>e.UnsafeJsonStruct))]),e.JsonStruct=(0,t.define)("Json",(S,I)=>{function j($,N){const de=[...N.validator($,I)];return de.length>0?de:!0}try{const $=j(S,e.UnsafeJsonStruct);return $!==!0?$:j(JSON.parse(JSON.stringify(S)),e.UnsafeJsonStruct)}catch($){return $ instanceof RangeError?"Circular reference detected":!1}});function s(S){return(0,t.is)(S,e.JsonStruct)}e.isValidJson=s;function i(S){(0,r.assertStruct)(S,e.JsonStruct,"Invalid JSON value");const I=JSON.stringify(S);return new TextEncoder().encode(I).byteLength}e.getJsonSize=i,e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,t.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,t.nullable)((0,t.union)([(0,t.number)(),(0,t.string)()])),e.JsonRpcErrorStruct=(0,t.object)({code:(0,t.integer)(),message:(0,t.string)(),data:(0,t.optional)(e.JsonStruct),stack:(0,t.optional)((0,t.string)())}),e.JsonRpcParamsStruct=(0,t.optional)((0,t.union)([(0,t.record)((0,t.string)(),e.JsonStruct),(0,t.array)(e.JsonStruct)])),e.JsonRpcRequestStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:e.JsonRpcParamsStruct}),e.JsonRpcNotificationStruct=(0,t.omit)(e.JsonRpcRequestStruct,["id"]);function o(S){return(0,t.is)(S,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=o;function a(S,I){(0,r.assertStruct)(S,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",I)}e.assertIsJsonRpcNotification=a;function c(S){return(0,t.is)(S,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=c;function l(S,I){(0,r.assertStruct)(S,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",I)}e.assertIsJsonRpcRequest=l,e.PendingJsonRpcResponseStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,t.optional)((0,t.unknown)()),error:(0,t.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,t.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]);function d(S){return(0,t.is)(S,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=d;function u(S,I){(0,r.assertStruct)(S,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",I)}e.assertIsPendingJsonRpcResponse=u;function h(S){return(0,t.is)(S,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=h;function g(S,I){(0,r.assertStruct)(S,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",I)}e.assertIsJsonRpcResponse=g;function b(S){return(0,t.is)(S,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=b;function R(S,I){(0,r.assertStruct)(S,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",I)}e.assertIsJsonRpcSuccess=R;function E(S){return(0,t.is)(S,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=E;function _(S,I){(0,r.assertStruct)(S,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",I)}e.assertIsJsonRpcFailure=_;function m(S){return(0,t.is)(S,e.JsonRpcErrorStruct)}e.isJsonRpcError=m;function y(S,I){(0,r.assertStruct)(S,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",I)}e.assertIsJsonRpcError=y;function C(S){const{permitEmptyString:I,permitFractions:j,permitNull:$}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},S);return J=>!!(typeof J=="number"&&(j||Number.isInteger(J))||typeof J=="string"&&(I||J.length>0)||$&&J===null)}e.getJsonRpcIdValidator=C})(Yu);var Xu={};Object.defineProperty(Xu,"__esModule",{value:!0});var _r={},Co={exports:{}},Yi,kc;function cg(){if(kc)return Yi;kc=1;var e=1e3,t=e*60,r=t*60,n=r*24,s=n*7,i=n*365.25;Yi=function(d,u){u=u||{};var h=typeof d;if(h==="string"&&d.length>0)return o(d);if(h==="number"&&isFinite(d))return u.long?c(d):a(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function o(d){if(d=String(d),!(d.length>100)){var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d);if(u){var h=parseFloat(u[1]),g=(u[2]||"ms").toLowerCase();switch(g){case"years":case"year":case"yrs":case"yr":case"y":return h*i;case"weeks":case"week":case"w":return h*s;case"days":case"day":case"d":return h*n;case"hours":case"hour":case"hrs":case"hr":case"h":return h*r;case"minutes":case"minute":case"mins":case"min":case"m":return h*t;case"seconds":case"second":case"secs":case"sec":case"s":return h*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}}}function a(d){var u=Math.abs(d);return u>=n?Math.round(d/n)+"d":u>=r?Math.round(d/r)+"h":u>=t?Math.round(d/t)+"m":u>=e?Math.round(d/e)+"s":d+"ms"}function c(d){var u=Math.abs(d);return u>=n?l(d,u,n,"day"):u>=r?l(d,u,r,"hour"):u>=t?l(d,u,t,"minute"):u>=e?l(d,u,e,"second"):d+" ms"}function l(d,u,h,g){var b=u>=h*1.5;return Math.round(d/h)+" "+g+(b?"s":"")}return Yi}function lg(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=s,r.enabled=o,r.humanize=cg(),r.destroy=l,Object.keys(e).forEach(d=>{r[d]=e[d]}),r.names=[],r.skips=[],r.formatters={};function t(d){let u=0;for(let h=0;h{if(I==="%%")return"%";C++;const $=r.formatters[j];if(typeof $=="function"){const N=E[C];I=$.call(_,N),E.splice(C,1),C--}return I}),r.formatArgs.call(_,E),(_.log||r.log).apply(_,E)}return R.namespace=d,R.useColors=r.useColors(),R.color=r.selectColor(d),R.extend=n,R.destroy=r.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(g!==r.namespaces&&(g=r.namespaces,b=r.enabled(d)),b),set:E=>{h=E}}),typeof r.init=="function"&&r.init(R),R}function n(d,u){const h=r(this.namespace+(typeof u>"u"?":":u)+d);return h.log=this.log,h}function s(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let u;const h=(typeof d=="string"?d:"").split(/[\s,]+/),g=h.length;for(u=0;u"-"+u)].join(",");return r.enable(""),d}function o(d){if(d[d.length-1]==="*")return!0;let u,h;for(u=0,h=r.skips.length;u{let l=!1;return()=>{l||(l=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function s(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const d="color: "+this.color;l.splice(1,0,d,"color: inherit");let u=0,h=0;l[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(u++,g==="%c"&&(h=u))}),l.splice(h,0,d)}t.log=console.debug||console.log||(()=>{});function i(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function o(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof ne<"u"&&"env"in ne&&(l=r.DEBUG),l}function a(){try{return localStorage}catch{}}e.exports=ug(t);const{formatters:c}=e.exports;c.j=function(l){try{return JSON.stringify(l)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}}})(Co,Co.exports);var dg=Co.exports,hg=F&&F.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_r,"__esModule",{value:!0});_r.createModuleLogger=_r.createProjectLogger=void 0;const fg=hg(dg),pg=(0,fg.default)("metamask");function gg(e){return pg.extend(e)}_r.createProjectLogger=gg;function _g(e,t){return e.extend(t)}_r.createModuleLogger=_g;var ed={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0;function t(l){return Array.isArray(l)&&l.length>0}e.isNonEmptyArray=t;function r(l){return l==null}e.isNullOrUndefined=r;function n(l){return!!l&&typeof l=="object"&&!Array.isArray(l)}e.isObject=n;const s=(l,d)=>Object.hasOwnProperty.call(l,d);e.hasProperty=s,function(l){l[l.Null=4]="Null",l[l.Comma=1]="Comma",l[l.Wrapper=1]="Wrapper",l[l.True=4]="True",l[l.False=5]="False",l[l.Quote=1]="Quote",l[l.Colon=1]="Colon",l[l.Date=24]="Date"}(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function i(l){if(typeof l!="object"||l===null)return!1;try{let d=l;for(;Object.getPrototypeOf(d)!==null;)d=Object.getPrototypeOf(d);return Object.getPrototypeOf(l)===d}catch{return!1}}e.isPlainObject=i;function o(l){return l.charCodeAt(0)<=127}e.isASCII=o;function a(l){var d;return l.split("").reduce((h,g)=>o(g)?h+1:h+2,0)+((d=l.match(e.ESCAPE_CHARACTERS_REGEXP))!==null&&d!==void 0?d:[]).length}e.calculateStringSize=a;function c(l){return l.toString().length}e.calculateNumberSize=c})(ed);var st={};Object.defineProperty(st,"__esModule",{value:!0});st.hexToBigInt=st.hexToNumber=st.bigIntToHex=st.numberToHex=void 0;const ir=Ce,jr=un,mg=e=>((0,ir.assert)(typeof e=="number","Value must be a number."),(0,ir.assert)(e>=0,"Value must be a non-negative number."),(0,ir.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,jr.add0x)(e.toString(16)));st.numberToHex=mg;const bg=e=>((0,ir.assert)(typeof e=="bigint","Value must be a bigint."),(0,ir.assert)(e>=0,"Value must be a non-negative bigint."),(0,jr.add0x)(e.toString(16)));st.bigIntToHex=bg;const yg=e=>{(0,jr.assertIsHexString)(e);const t=parseInt(e,16);return(0,ir.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};st.hexToNumber=yg;const vg=e=>((0,jr.assertIsHexString)(e),BigInt((0,jr.add0x)(e)));st.hexToBigInt=vg;var td={};Object.defineProperty(td,"__esModule",{value:!0});var rd={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,function(i){i[i.Millisecond=1]="Millisecond",i[i.Second=1e3]="Second",i[i.Minute=6e4]="Minute",i[i.Hour=36e5]="Hour",i[i.Day=864e5]="Day",i[i.Week=6048e5]="Week",i[i.Year=31536e6]="Year"}(e.Duration||(e.Duration={}));const t=i=>Number.isInteger(i)&&i>=0,r=(i,o)=>{if(!t(i))throw new Error(`"${o}" must be a non-negative integer. Received: "${i}".`)};function n(i,o){return r(i,"count"),i*o}e.inMilliseconds=n;function s(i){return r(i,"timestamp"),Date.now()-i}e.timeSince=s})(rd);var nd={};Object.defineProperty(nd,"__esModule",{value:!0});var sd={},ko={exports:{}};const wg="2.0.0",id=256,Eg=Number.MAX_SAFE_INTEGER||9007199254740991,Sg=16,Rg=id-6,Cg=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Rs={MAX_LENGTH:id,MAX_SAFE_COMPONENT_LENGTH:Sg,MAX_SAFE_BUILD_LENGTH:Rg,MAX_SAFE_INTEGER:Eg,RELEASE_TYPES:Cg,SEMVER_SPEC_VERSION:wg,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Xi={};const kg=typeof ne=="object"&&Xi&&Xi.NODE_DEBUG&&/\bsemver\b/i.test(Xi.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Cs=kg;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:s}=Rs,i=Cs;t=e.exports={};const o=t.re=[],a=t.safeRe=[],c=t.src=[],l=t.t={};let d=0;const u="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",s],[u,n]],g=R=>{for(const[E,_]of h)R=R.split(`${E}*`).join(`${E}{0,${_}}`).split(`${E}+`).join(`${E}{1,${_}}`);return R},b=(R,E,_)=>{const m=g(E),y=d++;i(R,y,E),l[R]=y,c[y]=E,o[y]=new RegExp(E,_?"g":void 0),a[y]=new RegExp(m,_?"g":void 0)};b("NUMERICIDENTIFIER","0|[1-9]\\d*"),b("NUMERICIDENTIFIERLOOSE","\\d+"),b("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u}*`),b("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),b("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),b("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),b("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),b("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),b("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),b("BUILDIDENTIFIER",`${u}+`),b("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),b("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),b("FULL",`^${c[l.FULLPLAIN]}$`),b("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),b("LOOSE",`^${c[l.LOOSEPLAIN]}$`),b("GTLT","((?:<|>)?=?)"),b("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),b("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),b("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),b("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),b("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),b("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),b("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),b("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`),b("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`),b("COERCERTL",c[l.COERCE],!0),b("COERCERTLFULL",c[l.COERCEFULL],!0),b("LONETILDE","(?:~>?)"),b("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",b("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),b("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),b("LONECARET","(?:\\^)"),b("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",b("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),b("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),b("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),b("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),b("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",b("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),b("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),b("STAR","(<|>)?=?\\s*\\*"),b("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),b("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(ko,ko.exports);var dn=ko.exports;const Ig=Object.freeze({loose:!0}),Ag=Object.freeze({}),xg=e=>e?typeof e!="object"?Ig:e:Ag;var ra=xg;const Ic=/^[0-9]+$/,od=(e,t)=>{const r=Ic.test(e),n=Ic.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:eod(t,e);var ad={compareIdentifiers:od,rcompareIdentifiers:Tg};const Rn=Cs,{MAX_LENGTH:Ac,MAX_SAFE_INTEGER:Cn}=Rs,{safeRe:xc,t:Tc}=dn,Ng=ra,{compareIdentifiers:Yt}=ad;let Mg=class Ye{constructor(t,r){if(r=Ng(r),t instanceof Ye){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Ac)throw new TypeError(`version is longer than ${Ac} characters`);Rn("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?xc[Tc.LOOSE]:xc[Tc.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Cn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Cn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Cn||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const i=+s;if(i>=0&&i=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let i=[r,s];n===!1&&(i=[r]),Yt(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var Te=Mg;const Nc=Te,Lg=(e,t,r=!1)=>{if(e instanceof Nc)return e;try{return new Nc(e,t)}catch(n){if(!r)return null;throw n}};var Cr=Lg;const Pg=Cr,Og=(e,t)=>{const r=Pg(e,t);return r?r.version:null};var $g=Og;const Bg=Cr,Dg=(e,t)=>{const r=Bg(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var Fg=Dg;const Mc=Te,jg=(e,t,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new Mc(e instanceof Mc?e.version:e,r).inc(t,n,s).version}catch{return null}};var Hg=jg;const Lc=Cr,Ug=(e,t)=>{const r=Lc(e,null,!0),n=Lc(t,null,!0),s=r.compare(n);if(s===0)return null;const i=s>0,o=i?r:n,a=i?n:r,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c)return!a.patch&&!a.minor?"major":o.patch?"patch":o.minor?"minor":"major";const d=c?"pre":"";return r.major!==n.major?d+"major":r.minor!==n.minor?d+"minor":r.patch!==n.patch?d+"patch":"prerelease"};var Wg=Ug;const Vg=Te,zg=(e,t)=>new Vg(e,t).major;var qg=zg;const Gg=Te,Jg=(e,t)=>new Gg(e,t).minor;var Zg=Jg;const Kg=Te,Qg=(e,t)=>new Kg(e,t).patch;var Yg=Qg;const Xg=Cr,e_=(e,t)=>{const r=Xg(e,t);return r&&r.prerelease.length?r.prerelease:null};var t_=e_;const Pc=Te,r_=(e,t,r)=>new Pc(e,r).compare(new Pc(t,r));var Ge=r_;const n_=Ge,s_=(e,t,r)=>n_(t,e,r);var i_=s_;const o_=Ge,a_=(e,t)=>o_(e,t,!0);var c_=a_;const Oc=Te,l_=(e,t,r)=>{const n=new Oc(e,r),s=new Oc(t,r);return n.compare(s)||n.compareBuild(s)};var na=l_;const u_=na,d_=(e,t)=>e.sort((r,n)=>u_(r,n,t));var h_=d_;const f_=na,p_=(e,t)=>e.sort((r,n)=>f_(n,r,t));var g_=p_;const __=Ge,m_=(e,t,r)=>__(e,t,r)>0;var ks=m_;const b_=Ge,y_=(e,t,r)=>b_(e,t,r)<0;var sa=y_;const v_=Ge,w_=(e,t,r)=>v_(e,t,r)===0;var cd=w_;const E_=Ge,S_=(e,t,r)=>E_(e,t,r)!==0;var ld=S_;const R_=Ge,C_=(e,t,r)=>R_(e,t,r)>=0;var ia=C_;const k_=Ge,I_=(e,t,r)=>k_(e,t,r)<=0;var oa=I_;const A_=cd,x_=ld,T_=ks,N_=ia,M_=sa,L_=oa,P_=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return A_(e,r,n);case"!=":return x_(e,r,n);case">":return T_(e,r,n);case">=":return N_(e,r,n);case"<":return M_(e,r,n);case"<=":return L_(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};var ud=P_;const O_=Te,$_=Cr,{safeRe:kn,t:In}=dn,B_=(e,t)=>{if(e instanceof O_)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?kn[In.COERCEFULL]:kn[In.COERCE]);else{const c=t.includePrerelease?kn[In.COERCERTLFULL]:kn[In.COERCERTL];let l;for(;(l=c.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||l.index+l[0].length!==r.index+r[0].length)&&(r=l),c.lastIndex=l.index+l[1].length+l[2].length;c.lastIndex=-1}if(r===null)return null;const n=r[2],s=r[3]||"0",i=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return $_(`${n}.${s}.${i}${o}${a}`,t)};var D_=B_,eo,$c;function F_(){return $c||($c=1,eo=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}),eo}var j_=re;re.Node=Bt;re.create=re;function re(e){var t=this;if(t instanceof re||(t=new re),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(s){t.push(s)});else if(arguments.length>0)for(var r=0,n=arguments.length;r1)r=t;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;n!==null;s++)r=e(r,n.value,s),n=n.next;return r};re.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;n!==null;s--)r=e(r,n.value,s),n=n.prev;return r};re.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;r!==null;t++)e[t]=r.value,r=r.next;return e};re.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;r!==null;t++)e[t]=r.value,r=r.prev;return e};re.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new re;if(tthis.length&&(t=this.length);for(var n=0,s=this.head;s!==null&&nthis.length&&(t=this.length);for(var n=this.length,s=this.tail;s!==null&&n>t;n--)s=s.prev;for(;s!==null&&n>e;n--,s=s.prev)r.push(s.value);return r};re.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,s=this.head;s!==null&&n1;class z_{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");this[Nt]=t.max||1/0;const r=t.length||to;if(this[Xt]=typeof r!="function"?to:r,this[$r]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[Lt]=t.maxAge||0,this[at]=t.dispose,this[Bc]=t.noDisposeOnSet||!1,this[dd]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[Nt]=t||1/0,xr(this)}get max(){return this[Nt]}set allowStale(t){this[$r]=!!t}get allowStale(){return this[$r]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[Lt]=t,xr(this)}get maxAge(){return this[Lt]}set lengthCalculator(t){typeof t!="function"&&(t=to),t!==this[Xt]&&(this[Xt]=t,this[ut]=0,this[we].forEach(r=>{r.length=this[Xt](r.value,r.key),this[ut]+=r.length})),xr(this)}get lengthCalculator(){return this[Xt]}get length(){return this[ut]}get itemCount(){return this[we].length}rforEach(t,r){r=r||this;for(let n=this[we].tail;n!==null;){const s=n.prev;Dc(this,t,n,r),n=s}}forEach(t,r){r=r||this;for(let n=this[we].head;n!==null;){const s=n.next;Dc(this,t,n,r),n=s}}keys(){return this[we].toArray().map(t=>t.key)}values(){return this[we].toArray().map(t=>t.value)}reset(){this[at]&&this[we]&&this[we].length&&this[we].forEach(t=>this[at](t.key,t.value)),this[ze]=new Map,this[we]=new V_,this[ut]=0}dump(){return this[we].map(t=>Bn(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[we]}set(t,r,n){if(n=n||this[Lt],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const s=n?Date.now():0,i=this[Xt](r,t);if(this[ze].has(t)){if(i>this[Nt])return or(this,this[ze].get(t)),!1;const c=this[ze].get(t).value;return this[at]&&(this[Bc]||this[at](t,c.value)),c.now=s,c.maxAge=n,c.value=r,this[ut]+=i-c.length,c.length=i,this.get(t),xr(this),!0}const o=new q_(t,r,i,s,n);return o.length>this[Nt]?(this[at]&&this[at](t,r),!1):(this[ut]+=o.length,this[we].unshift(o),this[ze].set(t,this[we].head),xr(this),!0)}has(t){if(!this[ze].has(t))return!1;const r=this[ze].get(t).value;return!Bn(this,r)}get(t){return ro(this,t,!0)}peek(t){return ro(this,t,!1)}pop(){const t=this[we].tail;return t?(or(this,t),t.value):null}del(t){or(this,this[ze].get(t))}load(t){this.reset();const r=Date.now();for(let n=t.length-1;n>=0;n--){const s=t[n],i=s.e||0;if(i===0)this.set(s.k,s.v);else{const o=i-r;o>0&&this.set(s.k,s.v,o)}}}prune(){this[ze].forEach((t,r)=>ro(this,r,!1))}}const ro=(e,t,r)=>{const n=e[ze].get(t);if(n){const s=n.value;if(Bn(e,s)){if(or(e,n),!e[$r])return}else r&&(e[dd]&&(n.value.now=Date.now()),e[we].unshiftNode(n));return s.value}},Bn=(e,t)=>{if(!t||!t.maxAge&&!e[Lt])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[Lt]&&r>e[Lt]},xr=e=>{if(e[ut]>e[Nt])for(let t=e[we].tail;e[ut]>e[Nt]&&t!==null;){const r=t.prev;or(e,t),t=r}},or=(e,t)=>{if(t){const r=t.value;e[at]&&e[at](r.key,r.value),e[ut]-=r.length,e[ze].delete(r.key),e[we].removeNode(t)}};class q_{constructor(t,r,n,s,i){this.key=t,this.value=r,this.length=n,this.now=s,this.maxAge=i||0}}const Dc=(e,t,r,n)=>{let s=r.value;Bn(e,s)&&(or(e,r),e[$r]||(s=void 0)),s&&t.call(n,s.value,s.key,e)};var G_=z_,no,Fc;function Je(){if(Fc)return no;Fc=1;class e{constructor(x,P){if(P=n(P),x instanceof e)return x.loose===!!P.loose&&x.includePrerelease===!!P.includePrerelease?x:new e(x.raw,P);if(x instanceof s)return this.raw=x.value,this.set=[[x]],this.format(),this;if(this.options=P,this.loose=!!P.loose,this.includePrerelease=!!P.includePrerelease,this.raw=x.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(D=>this.parseRange(D.trim())).filter(D=>D.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const D=this.set[0];if(this.set=this.set.filter(B=>!b(B[0])),this.set.length===0)this.set=[D];else if(this.set.length>1){for(const B of this.set)if(B.length===1&&R(B[0])){this.set=[B];break}}}this.format()}format(){return this.range=this.set.map(x=>x.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(x){const D=((this.options.includePrerelease&&h)|(this.options.loose&&g))+":"+x,B=r.get(D);if(B)return B;const L=this.options.loose,H=L?a[c.HYPHENRANGELOOSE]:a[c.HYPHENRANGE];x=x.replace(H,de(this.options.includePrerelease)),i("hyphen replace",x),x=x.replace(a[c.COMPARATORTRIM],l),i("comparator trim",x),x=x.replace(a[c.TILDETRIM],d),i("tilde trim",x),x=x.replace(a[c.CARETTRIM],u),i("caret trim",x);let Z=x.split(" ").map(se=>_(se,this.options)).join(" ").split(/\s+/).map(se=>J(se,this.options));L&&(Z=Z.filter(se=>(i("loose invalid filter",se,this.options),!!se.match(a[c.COMPARATORLOOSE])))),i("range list",Z);const W=new Map,Y=Z.map(se=>new s(se,this.options));for(const se of Y){if(b(se))return[se];W.set(se.value,se)}W.size>1&&W.has("")&&W.delete("");const ce=[...W.values()];return r.set(D,ce),ce}intersects(x,P){if(!(x instanceof e))throw new TypeError("a Range is required");return this.set.some(D=>E(D,P)&&x.set.some(B=>E(B,P)&&D.every(L=>B.every(H=>L.intersects(H,P)))))}test(x){if(!x)return!1;if(typeof x=="string")try{x=new o(x,this.options)}catch{return!1}for(let P=0;PT.value==="<0.0.0-0",R=T=>T.value==="",E=(T,x)=>{let P=!0;const D=T.slice();let B=D.pop();for(;P&&D.length;)P=D.every(L=>B.intersects(L,x)),B=D.pop();return P},_=(T,x)=>(i("comp",T,x),T=S(T,x),i("caret",T),T=y(T,x),i("tildes",T),T=j(T,x),i("xrange",T),T=N(T,x),i("stars",T),T),m=T=>!T||T.toLowerCase()==="x"||T==="*",y=(T,x)=>T.trim().split(/\s+/).map(P=>C(P,x)).join(" "),C=(T,x)=>{const P=x.loose?a[c.TILDELOOSE]:a[c.TILDE];return T.replace(P,(D,B,L,H,Z)=>{i("tilde",T,D,B,L,H,Z);let W;return m(B)?W="":m(L)?W=`>=${B}.0.0 <${+B+1}.0.0-0`:m(H)?W=`>=${B}.${L}.0 <${B}.${+L+1}.0-0`:Z?(i("replaceTilde pr",Z),W=`>=${B}.${L}.${H}-${Z} <${B}.${+L+1}.0-0`):W=`>=${B}.${L}.${H} <${B}.${+L+1}.0-0`,i("tilde return",W),W})},S=(T,x)=>T.trim().split(/\s+/).map(P=>I(P,x)).join(" "),I=(T,x)=>{i("caret",T,x);const P=x.loose?a[c.CARETLOOSE]:a[c.CARET],D=x.includePrerelease?"-0":"";return T.replace(P,(B,L,H,Z,W)=>{i("caret",T,B,L,H,Z,W);let Y;return m(L)?Y="":m(H)?Y=`>=${L}.0.0${D} <${+L+1}.0.0-0`:m(Z)?L==="0"?Y=`>=${L}.${H}.0${D} <${L}.${+H+1}.0-0`:Y=`>=${L}.${H}.0${D} <${+L+1}.0.0-0`:W?(i("replaceCaret pr",W),L==="0"?H==="0"?Y=`>=${L}.${H}.${Z}-${W} <${L}.${H}.${+Z+1}-0`:Y=`>=${L}.${H}.${Z}-${W} <${L}.${+H+1}.0-0`:Y=`>=${L}.${H}.${Z}-${W} <${+L+1}.0.0-0`):(i("no pr"),L==="0"?H==="0"?Y=`>=${L}.${H}.${Z}${D} <${L}.${H}.${+Z+1}-0`:Y=`>=${L}.${H}.${Z}${D} <${L}.${+H+1}.0-0`:Y=`>=${L}.${H}.${Z} <${+L+1}.0.0-0`),i("caret return",Y),Y})},j=(T,x)=>(i("replaceXRanges",T,x),T.split(/\s+/).map(P=>$(P,x)).join(" ")),$=(T,x)=>{T=T.trim();const P=x.loose?a[c.XRANGELOOSE]:a[c.XRANGE];return T.replace(P,(D,B,L,H,Z,W)=>{i("xRange",T,D,B,L,H,Z,W);const Y=m(L),ce=Y||m(H),se=ce||m(Z),Ie=se;return B==="="&&Ie&&(B=""),W=x.includePrerelease?"-0":"",Y?B===">"||B==="<"?D="<0.0.0-0":D="*":B&&Ie?(ce&&(H=0),Z=0,B===">"?(B=">=",ce?(L=+L+1,H=0,Z=0):(H=+H+1,Z=0)):B==="<="&&(B="<",ce?L=+L+1:H=+H+1),B==="<"&&(W="-0"),D=`${B+L}.${H}.${Z}${W}`):ce?D=`>=${L}.0.0${W} <${+L+1}.0.0-0`:se&&(D=`>=${L}.${H}.0${W} <${L}.${+H+1}.0-0`),i("xRange return",D),D})},N=(T,x)=>(i("replaceStars",T,x),T.trim().replace(a[c.STAR],"")),J=(T,x)=>(i("replaceGTE0",T,x),T.trim().replace(a[x.includePrerelease?c.GTE0PRE:c.GTE0],"")),de=T=>(x,P,D,B,L,H,Z,W,Y,ce,se,Ie,v)=>(m(D)?P="":m(B)?P=`>=${D}.0.0${T?"-0":""}`:m(L)?P=`>=${D}.${B}.0${T?"-0":""}`:H?P=`>=${P}`:P=`>=${P}${T?"-0":""}`,m(Y)?W="":m(ce)?W=`<${+Y+1}.0.0-0`:m(se)?W=`<${Y}.${+ce+1}.0-0`:Ie?W=`<=${Y}.${ce}.${se}-${Ie}`:T?W=`<${Y}.${ce}.${+se+1}-0`:W=`<=${W}`,`${P} ${W}`.trim()),oe=(T,x,P)=>{for(let D=0;D0){const B=T[D].semver;if(B.major===x.major&&B.minor===x.minor&&B.patch===x.patch)return!0}return!1}return!0};return no}var so,jc;function Is(){if(jc)return so;jc=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(d,u){if(u=r(u),d instanceof t){if(d.loose===!!u.loose)return d;d=d.value}d=d.trim().split(/\s+/).join(" "),o("comparator",d,u),this.options=u,this.loose=!!u.loose,this.parse(d),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(d){const u=this.options.loose?n[s.COMPARATORLOOSE]:n[s.COMPARATOR],h=d.match(u);if(!h)throw new TypeError(`Invalid comparator: ${d}`);this.operator=h[1]!==void 0?h[1]:"",this.operator==="="&&(this.operator=""),h[2]?this.semver=new a(h[2],this.options.loose):this.semver=e}toString(){return this.value}test(d){if(o("Comparator.test",d,this.options.loose),this.semver===e||d===e)return!0;if(typeof d=="string")try{d=new a(d,this.options)}catch{return!1}return i(d,this.operator,this.semver,this.options)}intersects(d,u){if(!(d instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new c(d.value,u).test(this.value):d.operator===""?d.value===""?!0:new c(this.value,u).test(d.semver):(u=r(u),u.includePrerelease&&(this.value==="<0.0.0-0"||d.value==="<0.0.0-0")||!u.includePrerelease&&(this.value.startsWith("<0.0.0")||d.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&d.operator.startsWith(">")||this.operator.startsWith("<")&&d.operator.startsWith("<")||this.semver.version===d.semver.version&&this.operator.includes("=")&&d.operator.includes("=")||i(this.semver,"<",d.semver,u)&&this.operator.startsWith(">")&&d.operator.startsWith("<")||i(this.semver,">",d.semver,u)&&this.operator.startsWith("<")&&d.operator.startsWith(">")))}}so=t;const r=ra,{safeRe:n,t:s}=dn,i=ud,o=Cs,a=Te,c=Je();return so}const J_=Je(),Z_=(e,t,r)=>{try{t=new J_(t,r)}catch{return!1}return t.test(e)};var As=Z_;const K_=Je(),Q_=(e,t)=>new K_(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var Y_=Q_;const X_=Te,em=Je(),tm=(e,t,r)=>{let n=null,s=null,i=null;try{i=new em(t,r)}catch{return null}return e.forEach(o=>{i.test(o)&&(!n||s.compare(o)===-1)&&(n=o,s=new X_(n,r))}),n};var rm=tm;const nm=Te,sm=Je(),im=(e,t,r)=>{let n=null,s=null,i=null;try{i=new sm(t,r)}catch{return null}return e.forEach(o=>{i.test(o)&&(!n||s.compare(o)===1)&&(n=o,s=new nm(n,r))}),n};var om=im;const io=Te,am=Je(),Hc=ks,cm=(e,t)=>{e=new am(e,t);let r=new io("0.0.0");if(e.test(r)||(r=new io("0.0.0-0"),e.test(r)))return r;r=null;for(let n=0;n{const a=new io(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||Hc(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!r||Hc(r,i))&&(r=i)}return r&&e.test(r)?r:null};var lm=cm;const um=Je(),dm=(e,t)=>{try{return new um(e,t).range||"*"}catch{return null}};var hm=dm;const fm=Te,hd=Is(),{ANY:pm}=hd,gm=Je(),_m=As,Uc=ks,Wc=sa,mm=oa,bm=ia,ym=(e,t,r,n)=>{e=new fm(e,n),t=new gm(t,n);let s,i,o,a,c;switch(r){case">":s=Uc,i=mm,o=Wc,a=">",c=">=";break;case"<":s=Wc,i=bm,o=Uc,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(_m(e,t,n))return!1;for(let l=0;l{g.semver===pm&&(g=new hd(">=0.0.0")),u=u||g,h=h||g,s(g.semver,u.semver,n)?u=g:o(g.semver,h.semver,n)&&(h=g)}),u.operator===a||u.operator===c||(!h.operator||h.operator===a)&&i(e,h.semver))return!1;if(h.operator===c&&o(e,h.semver))return!1}return!0};var aa=ym;const vm=aa,wm=(e,t,r)=>vm(e,t,">",r);var Em=wm;const Sm=aa,Rm=(e,t,r)=>Sm(e,t,"<",r);var Cm=Rm;const Vc=Je(),km=(e,t,r)=>(e=new Vc(e,r),t=new Vc(t,r),e.intersects(t,r));var Im=km;const Am=As,xm=Ge;var Tm=(e,t,r)=>{const n=[];let s=null,i=null;const o=e.sort((d,u)=>xm(d,u,r));for(const d of o)Am(d,t,r)?(i=d,s||(s=d)):(i&&n.push([s,i]),i=null,s=null);s&&n.push([s,null]);const a=[];for(const[d,u]of n)d===u?a.push(d):!u&&d===o[0]?a.push("*"):u?d===o[0]?a.push(`<=${u}`):a.push(`${d} - ${u}`):a.push(`>=${d}`);const c=a.join(" || "),l=typeof t.raw=="string"?t.raw:String(t);return c.length{if(e===t)return!0;e=new zc(e,r),t=new zc(t,r);let n=!1;e:for(const s of e.set){for(const i of t.set){const o=Lm(s,i,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},Mm=[new ca(">=0.0.0-0")],qc=[new ca(">=0.0.0")],Lm=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===oo){if(t.length===1&&t[0].semver===oo)return!0;r.includePrerelease?e=Mm:e=qc}if(t.length===1&&t[0].semver===oo){if(r.includePrerelease)return!0;t=qc}const n=new Set;let s,i;for(const g of e)g.operator===">"||g.operator===">="?s=Gc(s,g,r):g.operator==="<"||g.operator==="<="?i=Jc(i,g,r):n.add(g.semver);if(n.size>1)return null;let o;if(s&&i){if(o=la(s.semver,i.semver,r),o>0)return null;if(o===0&&(s.operator!==">="||i.operator!=="<="))return null}for(const g of n){if(s&&!Tr(g,String(s),r)||i&&!Tr(g,String(i),r))return null;for(const b of t)if(!Tr(g,String(b),r))return!1;return!0}let a,c,l,d,u=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,h=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;u&&u.prerelease.length===1&&i.operator==="<"&&u.prerelease[0]===0&&(u=!1);for(const g of t){if(d=d||g.operator===">"||g.operator===">=",l=l||g.operator==="<"||g.operator==="<=",s){if(h&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===h.major&&g.semver.minor===h.minor&&g.semver.patch===h.patch&&(h=!1),g.operator===">"||g.operator===">="){if(a=Gc(s,g,r),a===g&&a!==s)return!1}else if(s.operator===">="&&!Tr(s.semver,String(g),r))return!1}if(i){if(u&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===u.major&&g.semver.minor===u.minor&&g.semver.patch===u.patch&&(u=!1),g.operator==="<"||g.operator==="<="){if(c=Jc(i,g,r),c===g&&c!==i)return!1}else if(i.operator==="<="&&!Tr(i.semver,String(g),r))return!1}if(!g.operator&&(i||s)&&o!==0)return!1}return!(s&&l&&!i&&o!==0||i&&d&&!s&&o!==0||h||u)},Gc=(e,t,r)=>{if(!e)return t;const n=la(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},Jc=(e,t,r)=>{if(!e)return t;const n=la(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};var Pm=Nm;const ao=dn,Zc=Rs,Om=Te,Kc=ad,$m=Cr,Bm=$g,Dm=Fg,Fm=Hg,jm=Wg,Hm=qg,Um=Zg,Wm=Yg,Vm=t_,zm=Ge,qm=i_,Gm=c_,Jm=na,Zm=h_,Km=g_,Qm=ks,Ym=sa,Xm=cd,eb=ld,tb=ia,rb=oa,nb=ud,sb=D_,ib=Is(),ob=Je(),ab=As,cb=Y_,lb=rm,ub=om,db=lm,hb=hm,fb=aa,pb=Em,gb=Cm,_b=Im,mb=Tm,bb=Pm;var yb={parse:$m,valid:Bm,clean:Dm,inc:Fm,diff:jm,major:Hm,minor:Um,patch:Wm,prerelease:Vm,compare:zm,rcompare:qm,compareLoose:Gm,compareBuild:Jm,sort:Zm,rsort:Km,gt:Qm,lt:Ym,eq:Xm,neq:eb,gte:tb,lte:rb,cmp:nb,coerce:sb,Comparator:ib,Range:ob,satisfies:ab,toComparators:cb,maxSatisfying:lb,minSatisfying:ub,minVersion:db,validRange:hb,outside:fb,gtr:pb,ltr:gb,intersects:_b,simplifyRange:mb,subset:bb,SemVer:Om,re:ao.re,src:ao.src,tokens:ao.t,SEMVER_SPEC_VERSION:Zc.SEMVER_SPEC_VERSION,RELEASE_TYPES:Zc.RELEASE_TYPES,compareIdentifiers:Kc.compareIdentifiers,rcompareIdentifiers:Kc.rcompareIdentifiers};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const t=yb,r=Vt,n=Ce;e.VersionStruct=(0,r.refine)((0,r.string)(),"Version",u=>(0,t.valid)(u)===null?`Expected SemVer version, got "${u}"`:!0),e.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",u=>(0,t.validRange)(u)===null?`Expected SemVer range, got "${u}"`:!0);function s(u){return(0,r.is)(u,e.VersionStruct)}e.isValidSemVerVersion=s;function i(u){return(0,r.is)(u,e.VersionRangeStruct)}e.isValidSemVerRange=i;function o(u){(0,n.assertStruct)(u,e.VersionStruct)}e.assertIsSemVerVersion=o;function a(u){(0,n.assertStruct)(u,e.VersionRangeStruct)}e.assertIsSemVerRange=a;function c(u,h){return(0,t.gt)(u,h)}e.gtVersion=c;function l(u,h){return(0,t.gtr)(u,h)}e.gtRange=l;function d(u,h){return(0,t.satisfies)(u,h,{includePrerelease:!0})}e.satisfiesVersionRange=d})(sd);(function(e){var t=F&&F.__createBinding||(Object.create?function(n,s,i,o){o===void 0&&(o=i);var a=Object.getOwnPropertyDescriptor(s,i);(!a||("get"in a?!s.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return s[i]}}),Object.defineProperty(n,o,a)}:function(n,s,i,o){o===void 0&&(o=i),n[o]=s[i]}),r=F&&F.__exportStar||function(n,s){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(s,i)&&t(s,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Ce,e),r(ln,e),r(te,e),r(Es,e),r(nt,e),r(gr,e),r(Qu,e),r(un,e),r(Yu,e),r(Xu,e),r(_r,e),r(ed,e),r(st,e),r(td,e),r(rd,e),r(nd,e),r(sd,e)})(Mu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createModuleLogger=e.projectLogger=void 0;const t=Mu;Object.defineProperty(e,"createModuleLogger",{enumerable:!0,get:function(){return t.createModuleLogger}}),e.projectLogger=(0,t.createProjectLogger)("eth-block-tracker")})(Nu);var fd=F&&F.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vs,"__esModule",{value:!0});vs.PollingBlockTracker=void 0;const vb=fd(qo),wb=fd(F1),Eb=on,Qc=Nu,Yc=(0,Qc.createModuleLogger)(Qc.projectLogger,"polling-block-tracker"),Sb=(0,vb.default)(),Rb=1e3;class Cb extends Eb.BaseBlockTracker{constructor(t={}){var r;if(!t.provider)throw new Error("PollingBlockTracker - no provider specified.");super(Object.assign(Object.assign({},t),{blockResetDuration:(r=t.blockResetDuration)!==null&&r!==void 0?r:t.pollingInterval})),this._provider=t.provider,this._pollingInterval=t.pollingInterval||20*Rb,this._retryTimeout=t.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=t.keepEventLoopActive===void 0?!0:t.keepEventLoopActive,this._setSkipCacheFlag=t.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var t;this._isRunning;)try{await this._updateLatestBlock();const r=Xc(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await r}catch(r){const n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block: ${(t=r.stack)!==null&&t!==void 0?t:r}`);try{this.emit("error",n)}catch{console.error(n)}const s=Xc(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await s}}async _updateLatestBlock(){const t=await this._fetchLatestBlock();this._newPotentialLatest(t)}async _fetchLatestBlock(){const t={jsonrpc:"2.0",id:Sb(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(t.skipCache=!0),Yc("Making request",t);const r=await(0,wb.default)(n=>this._provider.sendAsync(t,n))();if(Yc("Got response",r),r.error)throw new Error(`PollingBlockTracker - encountered error fetching block: ${r.error.message}`);return r.result}}vs.PollingBlockTracker=Cb;function Xc(e,t){return new Promise(r=>{const n=setTimeout(r,e);n.unref&&t&&n.unref()})}var xs={},kb=F&&F.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xs,"__esModule",{value:!0});xs.SubscribeBlockTracker=void 0;const Ib=kb(qo),Ab=on,xb=(0,Ib.default)();class Tb extends Ab.BaseBlockTracker{constructor(t={}){if(!t.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(t),this._provider=t.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{const t=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(t)}catch(t){this.emit("error",t)}}async _end(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(t){this.emit("error",t)}}_call(t,...r){return new Promise((n,s)=>{this._provider.sendAsync({id:xb(),method:t,params:r,jsonrpc:"2.0"},(i,o)=>{i?s(i):n(o.result)})})}_handleSubData(t,r){var n;r.method==="eth_subscription"&&((n=r.params)===null||n===void 0?void 0:n.subscription)===this._subscriptionId&&this._newPotentialLatest(r.params.result.number)}}xs.SubscribeBlockTracker=Tb;(function(e){var t=F&&F.__createBinding||(Object.create?function(n,s,i,o){o===void 0&&(o=i),Object.defineProperty(n,o,{enumerable:!0,get:function(){return s[i]}})}:function(n,s,i,o){o===void 0&&(o=i),n[o]=s[i]}),r=F&&F.__exportStar||function(n,s){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(s,i)&&t(s,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(vs,e),r(xs,e)})(Tu);var ua={},Ts={},hn={};Object.defineProperty(hn,"__esModule",{value:!0});hn.getUniqueId=void 0;const pd=4294967295;let co=Math.floor(Math.random()*pd);function Nb(){return co=(co+1)%pd,co}hn.getUniqueId=Nb;Object.defineProperty(Ts,"__esModule",{value:!0});Ts.createIdRemapMiddleware=void 0;const Mb=hn;function Lb(){return(e,t,r,n)=>{const s=e.id,i=Mb.getUniqueId();e.id=i,t.id=i,r(o=>{e.id=s,t.id=s,o()})}}Ts.createIdRemapMiddleware=Lb;var Ns={};Object.defineProperty(Ns,"__esModule",{value:!0});Ns.createAsyncMiddleware=void 0;function Pb(e){return async(t,r,n,s)=>{let i;const o=new Promise(d=>{i=d});let a=null,c=!1;const l=async()=>{c=!0,n(d=>{a=d,i()}),await o};try{await e(t,r,l),c?(await o,a(null)):s(null)}catch(d){a?a(d):s(d)}}}Ns.createAsyncMiddleware=Pb;var Ms={};Object.defineProperty(Ms,"__esModule",{value:!0});Ms.createScaffoldMiddleware=void 0;function Ob(e){return(t,r,n,s)=>{const i=e[t.method];return i===void 0?n():typeof i=="function"?i(t,r,n,s):(r.result=i,s())}}Ms.createScaffoldMiddleware=Ob;var fn={},da={};Object.defineProperty(da,"__esModule",{value:!0});const $b=Un;function el(e,t,r){try{Reflect.apply(e,t,r)}catch(n){setTimeout(()=>{throw n})}}function Bb(e){const t=e.length,r=new Array(t);for(let n=0;n0&&([o]=r),o instanceof Error)throw o;const a=new Error(`Unhandled error.${o?` (${o.message})`:""}`);throw a.context=o,a}const i=s[t];if(i===void 0)return!1;if(typeof i=="function")el(i,this,r);else{const o=i.length,a=Bb(i);for(let c=0;c"u"&&(n=md()),Io(e,"",0,[],void 0,0,n);var s;try{Pt.length===0?s=JSON.stringify(e,t,r):s=JSON.stringify(e,yd(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Dt.length!==0;){var i=Dt.pop();i.length===4?Object.defineProperty(i[0],i[1],i[3]):i[0][i[1]]=i[2]}}return s}function ar(e,t,r,n){var s=Object.getOwnPropertyDescriptor(n,r);s.get!==void 0?s.configurable?(Object.defineProperty(n,r,{value:e}),Dt.push([n,r,t,s])):Pt.push([t,r,e]):(n[r]=e,Dt.push([n,r,t]))}function Io(e,t,r,n,s,i,o){i+=1;var a;if(typeof e=="object"&&e!==null){for(a=0;ao.depthLimit){ar(Dn,e,t,s);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){ar(Dn,e,t,s);return}if(n.push(e),Array.isArray(e))for(a=0;at?1:0}function bd(e,t,r,n){typeof n>"u"&&(n=md());var s=Ao(e,"",0,[],void 0,0,n)||e,i;try{Pt.length===0?i=JSON.stringify(s,t,r):i=JSON.stringify(s,yd(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Dt.length!==0;){var o=Dt.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return i}function Ao(e,t,r,n,s,i,o){i+=1;var a;if(typeof e=="object"&&e!==null){for(a=0;ao.depthLimit){ar(Dn,e,t,s);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){ar(Dn,e,t,s);return}if(n.push(e),Array.isArray(e))for(a=0;a0)for(var n=0;n=1e3&&e<=4999}function Vb(e,t){if(t!=="[Circular]")return t}var ha={},wt={};Object.defineProperty(wt,"__esModule",{value:!0});wt.errorValues=wt.errorCodes=void 0;wt.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};wt.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=wt,r=vt,n=t.errorCodes.rpc.internal,s="Unspecified error message. This is a bug, please report it.",i={code:n,message:o(n)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function o(h,g=s){if(Number.isInteger(h)){const b=h.toString();if(u(t.errorValues,b))return t.errorValues[b].message;if(l(h))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return g}e.getMessageFromCode=o;function a(h){if(!Number.isInteger(h))return!1;const g=h.toString();return!!(t.errorValues[g]||l(h))}e.isValidCode=a;function c(h,{fallbackError:g=i,shouldIncludeStack:b=!1}={}){var R,E;if(!g||!Number.isInteger(g.code)||typeof g.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(h instanceof r.EthereumRpcError)return h.serialize();const _={};if(h&&typeof h=="object"&&!Array.isArray(h)&&u(h,"code")&&a(h.code)){const y=h;_.code=y.code,y.message&&typeof y.message=="string"?(_.message=y.message,u(y,"data")&&(_.data=y.data)):(_.message=o(_.code),_.data={originalError:d(h)})}else{_.code=g.code;const y=(R=h)===null||R===void 0?void 0:R.message;_.message=y&&typeof y=="string"?y:g.message,_.data={originalError:d(h)}}const m=(E=h)===null||E===void 0?void 0:E.stack;return b&&h&&m&&typeof m=="string"&&(_.stack=m),_}e.serializeError=c;function l(h){return h>=-32099&&h<=-32e3}function d(h){return h&&typeof h=="object"&&!Array.isArray(h)?Object.assign({},h):h}function u(h,g){return Object.prototype.hasOwnProperty.call(h,g)}})(ha);var Ls={};Object.defineProperty(Ls,"__esModule",{value:!0});Ls.ethErrors=void 0;const fa=vt,wd=ha,ke=wt;Ls.ethErrors={rpc:{parse:e=>Be(ke.errorCodes.rpc.parse,e),invalidRequest:e=>Be(ke.errorCodes.rpc.invalidRequest,e),invalidParams:e=>Be(ke.errorCodes.rpc.invalidParams,e),methodNotFound:e=>Be(ke.errorCodes.rpc.methodNotFound,e),internal:e=>Be(ke.errorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Be(t,e)},invalidInput:e=>Be(ke.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>Be(ke.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Be(ke.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Be(ke.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Be(ke.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Be(ke.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>Nr(ke.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>Nr(ke.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>Nr(ke.errorCodes.provider.unsupportedMethod,e),disconnected:e=>Nr(ke.errorCodes.provider.disconnected,e),chainDisconnected:e=>Nr(ke.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:n}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new fa.EthereumProviderError(t,r,n)}}};function Be(e,t){const[r,n]=Ed(t);return new fa.EthereumRpcError(e,r||wd.getMessageFromCode(e),n)}function Nr(e,t){const[r,n]=Ed(t);return new fa.EthereumProviderError(e,r||wd.getMessageFromCode(e),n)}function Ed(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=vt;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const r=ha;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=Ls;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const s=wt;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})})(gd);var zb=F&&F.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fn,"__esModule",{value:!0});fn.JsonRpcEngine=void 0;const qb=zb(da),De=gd;class ct extends qb.default{constructor(){super(),this._middleware=[]}push(t){this._middleware.push(t)}handle(t,r){if(r&&typeof r!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?r?this._handleBatch(t,r):this._handleBatch(t):r?this._handle(t,r):this._promiseHandle(t)}asMiddleware(){return async(t,r,n,s)=>{try{const[i,o,a]=await ct._runAllMiddleware(t,r,this._middleware);return o?(await ct._runReturnHandlers(a),s(i)):n(async c=>{try{await ct._runReturnHandlers(a)}catch(l){return c(l)}return c()})}catch(i){return s(i)}}}async _handleBatch(t,r){try{const n=await Promise.all(t.map(this._promiseHandle.bind(this)));return r?r(null,n):n}catch(n){if(r)return r(n);throw n}}_promiseHandle(t){return new Promise(r=>{this._handle(t,(n,s)=>{r(s)})})}async _handle(t,r){if(!t||Array.isArray(t)||typeof t!="object"){const o=new De.EthereumRpcError(De.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof t}`,{request:t});return r(o,{id:void 0,jsonrpc:"2.0",error:o})}if(typeof t.method!="string"){const o=new De.EthereumRpcError(De.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof t.method}`,{request:t});return r(o,{id:t.id,jsonrpc:"2.0",error:o})}const n=Object.assign({},t),s={id:n.id,jsonrpc:n.jsonrpc};let i=null;try{await this._processRequest(n,s)}catch(o){i=o}return i&&(delete s.result,s.error||(s.error=De.serializeError(i))),r(i,s)}async _processRequest(t,r){const[n,s,i]=await ct._runAllMiddleware(t,r,this._middleware);if(ct._checkForCompletion(t,r,s),await ct._runReturnHandlers(i),n)throw n}static async _runAllMiddleware(t,r,n){const s=[];let i=null,o=!1;for(const a of n)if([i,o]=await ct._runMiddleware(t,r,a,s),o)break;return[i,o,s.reverse()]}static _runMiddleware(t,r,n,s){return new Promise(i=>{const o=c=>{const l=c||r.error;l&&(r.error=De.serializeError(l)),i([l,!0])},a=c=>{r.error?o(r.error):(c&&(typeof c!="function"&&o(new De.EthereumRpcError(De.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof c}" for request: diff --git a/assets/index-DyNK9CaR.js b/assets/index-D4Oq7CAa.js similarity index 98% rename from assets/index-DyNK9CaR.js rename to assets/index-D4Oq7CAa.js index 4ba26774..9672fe5d 100644 --- a/assets/index-DyNK9CaR.js +++ b/assets/index-D4Oq7CAa.js @@ -1,7 +1,7 @@ -import{_ as fe}from"./index-BQEVheXL.js";const me=Symbol(),ee=Object.getPrototypeOf,G=new WeakMap,ge=e=>e&&(G.has(e)?G.get(e):ee(e)===Object.prototype||ee(e)===Array.prototype),he=e=>ge(e)&&e[me]||null,te=(e,t=!0)=>{G.set(e,t)};var z={BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const q=e=>typeof e=="object"&&e!==null,A=new WeakMap,x=new WeakSet,be=(e=Object.is,t=(n,h)=>new Proxy(n,h),s=n=>q(n)&&!x.has(n)&&(Array.isArray(n)||!(Symbol.iterator in n))&&!(n instanceof WeakMap)&&!(n instanceof WeakSet)&&!(n instanceof Error)&&!(n instanceof Number)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof RegExp)&&!(n instanceof ArrayBuffer),r=n=>{switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:throw n}},l=new WeakMap,c=(n,h,I=r)=>{const y=l.get(n);if((y==null?void 0:y[0])===h)return y[1];const v=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n));return te(v,!0),l.set(n,[h,v]),Reflect.ownKeys(n).forEach(S=>{if(Object.getOwnPropertyDescriptor(v,S))return;const E=Reflect.get(n,S),M={value:E,enumerable:!0,configurable:!0};if(x.has(E))te(E,!1);else if(E instanceof Promise)delete M.value,M.get=()=>I(E);else if(A.has(E)){const[b,H]=A.get(E);M.value=c(b,H(),I)}Object.defineProperty(v,S,M)}),Object.preventExtensions(v)},m=new WeakMap,f=[1,1],W=n=>{if(!q(n))throw new Error("object required");const h=m.get(n);if(h)return h;let I=f[0];const y=new Set,v=(a,i=++f[0])=>{I!==i&&(I=i,y.forEach(o=>o(a,i)))};let S=f[1];const E=(a=++f[1])=>(S!==a&&!y.size&&(S=a,b.forEach(([i])=>{const o=i[1](a);o>I&&(I=o)})),I),M=a=>(i,o)=>{const g=[...i];g[1]=[a,...g[1]],v(g,o)},b=new Map,H=(a,i)=>{if((z?"production":void 0)!=="production"&&b.has(a))throw new Error("prop listener already exists");if(y.size){const o=i[3](M(a));b.set(a,[i,o])}else b.set(a,[i])},Z=a=>{var i;const o=b.get(a);o&&(b.delete(a),(i=o[1])==null||i.call(o))},ue=a=>(y.add(a),y.size===1&&b.forEach(([o,g],_)=>{if((z?"production":void 0)!=="production"&&g)throw new Error("remove already exists");const R=o[3](M(_));b.set(_,[o,R])}),()=>{y.delete(a),y.size===0&&b.forEach(([o,g],_)=>{g&&(g(),b.set(_,[o]))})}),J=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n)),$=t(J,{deleteProperty(a,i){const o=Reflect.get(a,i);Z(i);const g=Reflect.deleteProperty(a,i);return g&&v(["delete",[i],o]),g},set(a,i,o,g){const _=Reflect.has(a,i),R=Reflect.get(a,i,g);if(_&&(e(R,o)||m.has(o)&&e(R,m.get(o))))return!0;Z(i),q(o)&&(o=he(o)||o);let V=o;if(o instanceof Promise)o.then(C=>{o.status="fulfilled",o.value=C,v(["resolve",[i],C])}).catch(C=>{o.status="rejected",o.reason=C,v(["reject",[i],C])});else{!A.has(o)&&s(o)&&(V=W(o));const C=!x.has(V)&&A.get(V);C&&H(i,C)}return Reflect.set(a,i,V,g),v(["set",[i],o,R]),!0}});m.set(n,$);const pe=[J,E,c,ue];return A.set($,pe),Reflect.ownKeys(n).forEach(a=>{const i=Object.getOwnPropertyDescriptor(n,a);"value"in i&&($[a]=n[a],delete i.value,delete i.writable),Object.defineProperty(J,a,i)}),$})=>[W,A,x,e,t,s,r,l,c,m,f],[ye]=be();function j(e={}){return ye(e)}function P(e,t,s){const r=A.get(e);(z?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let l;const c=[],m=r[3];let f=!1;const n=m(h=>{if(c.push(h),s){t(c.splice(0));return}l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,n()}}function ve(e,t){const s=A.get(e);(z?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[r,l,c]=s;return c(r,l(),t)}const d=j({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),de={state:d,subscribe(e){return P(d,()=>e(d))},push(e,t){e!==d.view&&(d.view=e,t&&(d.data=t),d.history.push(e))},reset(e){d.view=e,d.history=[e]},replace(e){d.history.length>1&&(d.history[d.history.length-1]=e,d.view=e)},goBack(){if(d.history.length>1){d.history.pop();const[e]=d.history.slice(-1);d.view=e}},setData(e){d.data=e}},p={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return p.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return p.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(p.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!p.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(p.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(p.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=de.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},we=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),u=j({enabled:we,userSessionId:"",events:[],connectedWalletId:void 0}),Ie={state:u,subscribe(e){return P(u.events,()=>e(ve(u.events[u.events.length-1])))},initialize(){u.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(u.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){u.connectedWalletId=e},click(e){if(u.enabled){const t={type:"CLICK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},track(e){if(u.enabled){const t={type:"TRACK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},view(e){if(u.enabled){const t={type:"VIEW",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}}},L=j({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),w={state:L,subscribe(e){return P(L,()=>e(L))},setChains(e){L.chains=e},setWalletConnectUri(e){L.walletConnectUri=e},setIsCustomDesktop(e){L.isCustomDesktop=e},setIsCustomMobile(e){L.isCustomMobile=e},setIsDataLoaded(e){L.isDataLoaded=e},setIsUiLoaded(e){L.isUiLoaded=e},setIsAuth(e){L.isAuth=e}},B=j({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),N={state:B,subscribe(e){return P(B,()=>e(B))},setConfig(e){var t,s;Ie.initialize(),w.setChains(e.chains),w.setIsAuth(!!e.enableAuthMode),w.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),w.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),p.setModalVersionInStorage(),Object.assign(B,e)}};var Le=Object.defineProperty,se=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,ne=(e,t,s)=>t in e?Le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,We=(e,t)=>{for(var s in t||(t={}))Oe.call(t,s)&&ne(e,s,t[s]);if(se)for(var s of se(t))Ee.call(t,s)&&ne(e,s,t[s]);return e};const Q="https://explorer-api.walletconnect.com",X="wcm",Y="js-2.6.2";async function K(e,t){const s=We({sdkType:X,sdkVersion:Y},t),r=new URL(e,Q);return r.searchParams.append("projectId",N.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const U={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${Q}/w3m/v1/getWalletImage/${e}?projectId=${N.state.projectId}&sdkType=${X}&sdkVersion=${Y}`},getAssetImageUrl(e){return`${Q}/w3m/v1/getAssetImage/${e}?projectId=${N.state.projectId}&sdkType=${X}&sdkVersion=${Y}`}};var Ce=Object.defineProperty,oe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Me=(e,t)=>{for(var s in t||(t={}))Ae.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))je.call(t,s)&&re(e,s,t[s]);return e};const ie=p.isMobile(),O=j({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Te={state:O,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=N.state;if(e==="NONE"||t==="ALL"&&!e)return O.recomendedWallets;if(p.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await U.getAllListings(s),l=Object.values(r);l.sort((c,m)=>{const f=e.indexOf(c.id),W=e.indexOf(m.id);return f-W}),O.recomendedWallets=l}else{const{chains:s,isAuth:r}=w.state,l=s==null?void 0:s.join(","),c=p.isArray(t),m={page:1,sdks:r?"auth_v1":void 0,entries:p.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:f}=ie?await U.getMobileListings(m):await U.getDesktopListings(m);O.recomendedWallets=Object.values(f)}return O.recomendedWallets},async getWallets(e){const t=Me({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=N.state,{recomendedWallets:l}=O;if(r==="ALL")return O.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):p.isArray(s)&&(t.excludedIds=s.join(",")),p.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),w.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:m}=e,{listings:f,total:W}=ie?await U.getMobileListings(t):await U.getDesktopListings(t),n=Object.values(f),h=m?"search":"wallets";return O[h]={listings:[...O[h].listings,...n],total:W,page:c??1},{listings:n,total:W}},getWalletImageUrl(e){return U.getWalletImageUrl(e)},getAssetImageUrl(e){return U.getAssetImageUrl(e)},resetSearch(){O.search={listings:[],total:0,page:1}}},k=j({open:!1}),F={state:k,subscribe(e){return P(k,()=>e(k))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:r}=w.state;if(p.removeWalletConnectDeepLink(),w.setWalletConnectUri(e==null?void 0:e.uri),w.setChains(e==null?void 0:e.chains),de.reset("ConnectWallet"),s&&r)k.open=!0,t();else{const l=setInterval(()=>{const c=w.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),k.open=!0,t())},200)}})},close(){k.open=!1}};var Ue=Object.defineProperty,ae=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,le=(e,t,s)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Se=(e,t)=>{for(var s in t||(t={}))De.call(t,s)&&le(e,s,t[s]);if(ae)for(var s of ae(t))Pe.call(t,s)&&le(e,s,t[s]);return e};function _e(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const T=j({themeMode:_e()?"dark":"light"}),ce={state:T,subscribe(e){return P(T,()=>e(T))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(T.themeMode=t),s&&(T.themeVariables=Se({},s))}},D=j({open:!1,message:"",variant:"success"}),$e={state:D,subscribe(e){return P(D,()=>e(D))},openToast(e,t){D.open=!0,D.message=e,D.variant=t},closeToast(){D.open=!1}};class ke{constructor(t){this.openModal=F.open,this.closeModal=F.close,this.subscribeModal=F.subscribe,this.setTheme=ce.setThemeConfig,ce.setThemeConfig(t),N.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await fe(()=>import("./index-dDhnp42S.js"),__vite__mapDeps([0,1,2]),import.meta.url);const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),w.setIsUiLoaded(!0)}}}const Ve=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:ke},Symbol.toStringTag,{value:"Module"}));export{Ie as R,de as T,p as a,Ve as i,ce as n,$e as o,w as p,F as s,Te as t,N as y}; +import{_ as fe}from"./index-DWoPfkS0.js";const me=Symbol(),ee=Object.getPrototypeOf,G=new WeakMap,ge=e=>e&&(G.has(e)?G.get(e):ee(e)===Object.prototype||ee(e)===Array.prototype),he=e=>ge(e)&&e[me]||null,te=(e,t=!0)=>{G.set(e,t)};var z={BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const q=e=>typeof e=="object"&&e!==null,A=new WeakMap,x=new WeakSet,be=(e=Object.is,t=(n,h)=>new Proxy(n,h),s=n=>q(n)&&!x.has(n)&&(Array.isArray(n)||!(Symbol.iterator in n))&&!(n instanceof WeakMap)&&!(n instanceof WeakSet)&&!(n instanceof Error)&&!(n instanceof Number)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof RegExp)&&!(n instanceof ArrayBuffer),r=n=>{switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:throw n}},l=new WeakMap,c=(n,h,I=r)=>{const y=l.get(n);if((y==null?void 0:y[0])===h)return y[1];const v=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n));return te(v,!0),l.set(n,[h,v]),Reflect.ownKeys(n).forEach(S=>{if(Object.getOwnPropertyDescriptor(v,S))return;const E=Reflect.get(n,S),M={value:E,enumerable:!0,configurable:!0};if(x.has(E))te(E,!1);else if(E instanceof Promise)delete M.value,M.get=()=>I(E);else if(A.has(E)){const[b,H]=A.get(E);M.value=c(b,H(),I)}Object.defineProperty(v,S,M)}),Object.preventExtensions(v)},m=new WeakMap,f=[1,1],W=n=>{if(!q(n))throw new Error("object required");const h=m.get(n);if(h)return h;let I=f[0];const y=new Set,v=(a,i=++f[0])=>{I!==i&&(I=i,y.forEach(o=>o(a,i)))};let S=f[1];const E=(a=++f[1])=>(S!==a&&!y.size&&(S=a,b.forEach(([i])=>{const o=i[1](a);o>I&&(I=o)})),I),M=a=>(i,o)=>{const g=[...i];g[1]=[a,...g[1]],v(g,o)},b=new Map,H=(a,i)=>{if((z?"production":void 0)!=="production"&&b.has(a))throw new Error("prop listener already exists");if(y.size){const o=i[3](M(a));b.set(a,[i,o])}else b.set(a,[i])},Z=a=>{var i;const o=b.get(a);o&&(b.delete(a),(i=o[1])==null||i.call(o))},ue=a=>(y.add(a),y.size===1&&b.forEach(([o,g],_)=>{if((z?"production":void 0)!=="production"&&g)throw new Error("remove already exists");const R=o[3](M(_));b.set(_,[o,R])}),()=>{y.delete(a),y.size===0&&b.forEach(([o,g],_)=>{g&&(g(),b.set(_,[o]))})}),J=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n)),$=t(J,{deleteProperty(a,i){const o=Reflect.get(a,i);Z(i);const g=Reflect.deleteProperty(a,i);return g&&v(["delete",[i],o]),g},set(a,i,o,g){const _=Reflect.has(a,i),R=Reflect.get(a,i,g);if(_&&(e(R,o)||m.has(o)&&e(R,m.get(o))))return!0;Z(i),q(o)&&(o=he(o)||o);let V=o;if(o instanceof Promise)o.then(C=>{o.status="fulfilled",o.value=C,v(["resolve",[i],C])}).catch(C=>{o.status="rejected",o.reason=C,v(["reject",[i],C])});else{!A.has(o)&&s(o)&&(V=W(o));const C=!x.has(V)&&A.get(V);C&&H(i,C)}return Reflect.set(a,i,V,g),v(["set",[i],o,R]),!0}});m.set(n,$);const pe=[J,E,c,ue];return A.set($,pe),Reflect.ownKeys(n).forEach(a=>{const i=Object.getOwnPropertyDescriptor(n,a);"value"in i&&($[a]=n[a],delete i.value,delete i.writable),Object.defineProperty(J,a,i)}),$})=>[W,A,x,e,t,s,r,l,c,m,f],[ye]=be();function j(e={}){return ye(e)}function P(e,t,s){const r=A.get(e);(z?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let l;const c=[],m=r[3];let f=!1;const n=m(h=>{if(c.push(h),s){t(c.splice(0));return}l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,n()}}function ve(e,t){const s=A.get(e);(z?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[r,l,c]=s;return c(r,l(),t)}const d=j({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),de={state:d,subscribe(e){return P(d,()=>e(d))},push(e,t){e!==d.view&&(d.view=e,t&&(d.data=t),d.history.push(e))},reset(e){d.view=e,d.history=[e]},replace(e){d.history.length>1&&(d.history[d.history.length-1]=e,d.view=e)},goBack(){if(d.history.length>1){d.history.pop();const[e]=d.history.slice(-1);d.view=e}},setData(e){d.data=e}},p={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return p.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return p.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(p.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!p.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(p.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(p.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(p.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=de.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},we=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),u=j({enabled:we,userSessionId:"",events:[],connectedWalletId:void 0}),Ie={state:u,subscribe(e){return P(u.events,()=>e(ve(u.events[u.events.length-1])))},initialize(){u.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(u.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){u.connectedWalletId=e},click(e){if(u.enabled){const t={type:"CLICK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},track(e){if(u.enabled){const t={type:"TRACK",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}},view(e){if(u.enabled){const t={type:"VIEW",name:e.name,userSessionId:u.userSessionId,timestamp:Date.now(),data:e};u.events.push(t)}}},L=j({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),w={state:L,subscribe(e){return P(L,()=>e(L))},setChains(e){L.chains=e},setWalletConnectUri(e){L.walletConnectUri=e},setIsCustomDesktop(e){L.isCustomDesktop=e},setIsCustomMobile(e){L.isCustomMobile=e},setIsDataLoaded(e){L.isDataLoaded=e},setIsUiLoaded(e){L.isUiLoaded=e},setIsAuth(e){L.isAuth=e}},B=j({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),N={state:B,subscribe(e){return P(B,()=>e(B))},setConfig(e){var t,s;Ie.initialize(),w.setChains(e.chains),w.setIsAuth(!!e.enableAuthMode),w.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),w.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),p.setModalVersionInStorage(),Object.assign(B,e)}};var Le=Object.defineProperty,se=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,ne=(e,t,s)=>t in e?Le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,We=(e,t)=>{for(var s in t||(t={}))Oe.call(t,s)&&ne(e,s,t[s]);if(se)for(var s of se(t))Ee.call(t,s)&&ne(e,s,t[s]);return e};const Q="https://explorer-api.walletconnect.com",X="wcm",Y="js-2.6.2";async function K(e,t){const s=We({sdkType:X,sdkVersion:Y},t),r=new URL(e,Q);return r.searchParams.append("projectId",N.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const U={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${Q}/w3m/v1/getWalletImage/${e}?projectId=${N.state.projectId}&sdkType=${X}&sdkVersion=${Y}`},getAssetImageUrl(e){return`${Q}/w3m/v1/getAssetImage/${e}?projectId=${N.state.projectId}&sdkType=${X}&sdkVersion=${Y}`}};var Ce=Object.defineProperty,oe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Me=(e,t)=>{for(var s in t||(t={}))Ae.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))je.call(t,s)&&re(e,s,t[s]);return e};const ie=p.isMobile(),O=j({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Te={state:O,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=N.state;if(e==="NONE"||t==="ALL"&&!e)return O.recomendedWallets;if(p.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await U.getAllListings(s),l=Object.values(r);l.sort((c,m)=>{const f=e.indexOf(c.id),W=e.indexOf(m.id);return f-W}),O.recomendedWallets=l}else{const{chains:s,isAuth:r}=w.state,l=s==null?void 0:s.join(","),c=p.isArray(t),m={page:1,sdks:r?"auth_v1":void 0,entries:p.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:f}=ie?await U.getMobileListings(m):await U.getDesktopListings(m);O.recomendedWallets=Object.values(f)}return O.recomendedWallets},async getWallets(e){const t=Me({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=N.state,{recomendedWallets:l}=O;if(r==="ALL")return O.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):p.isArray(s)&&(t.excludedIds=s.join(",")),p.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),w.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:m}=e,{listings:f,total:W}=ie?await U.getMobileListings(t):await U.getDesktopListings(t),n=Object.values(f),h=m?"search":"wallets";return O[h]={listings:[...O[h].listings,...n],total:W,page:c??1},{listings:n,total:W}},getWalletImageUrl(e){return U.getWalletImageUrl(e)},getAssetImageUrl(e){return U.getAssetImageUrl(e)},resetSearch(){O.search={listings:[],total:0,page:1}}},k=j({open:!1}),F={state:k,subscribe(e){return P(k,()=>e(k))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:r}=w.state;if(p.removeWalletConnectDeepLink(),w.setWalletConnectUri(e==null?void 0:e.uri),w.setChains(e==null?void 0:e.chains),de.reset("ConnectWallet"),s&&r)k.open=!0,t();else{const l=setInterval(()=>{const c=w.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),k.open=!0,t())},200)}})},close(){k.open=!1}};var Ue=Object.defineProperty,ae=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,le=(e,t,s)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Se=(e,t)=>{for(var s in t||(t={}))De.call(t,s)&&le(e,s,t[s]);if(ae)for(var s of ae(t))Pe.call(t,s)&&le(e,s,t[s]);return e};function _e(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const T=j({themeMode:_e()?"dark":"light"}),ce={state:T,subscribe(e){return P(T,()=>e(T))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(T.themeMode=t),s&&(T.themeVariables=Se({},s))}},D=j({open:!1,message:"",variant:"success"}),$e={state:D,subscribe(e){return P(D,()=>e(D))},openToast(e,t){D.open=!0,D.message=e,D.variant=t},closeToast(){D.open=!1}};class ke{constructor(t){this.openModal=F.open,this.closeModal=F.close,this.subscribeModal=F.subscribe,this.setTheme=ce.setThemeConfig,ce.setThemeConfig(t),N.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await fe(()=>import("./index-CBhwD3XA.js"),__vite__mapDeps([0,1,2]),import.meta.url);const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),w.setIsUiLoaded(!0)}}}const Ve=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:ke},Symbol.toStringTag,{value:"Module"}));export{Ie as R,de as T,p as a,Ve as i,ce as n,$e as o,w as p,F as s,Te as t,N as y}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-dDhnp42S.js","./index-BQEVheXL.js","./index-hzRzMXhE.css"] + __vite__mapDeps.viteFileDeps = ["./index-CBhwD3XA.js","./index-DWoPfkS0.js","./index-hzRzMXhE.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/assets/index-DWoPfkS0.js b/assets/index-DWoPfkS0.js new file mode 100644 index 00000000..4b0e6799 --- /dev/null +++ b/assets/index-DWoPfkS0.js @@ -0,0 +1,475 @@ +var oQ=Object.defineProperty;var aQ=(t,e,r)=>e in t?oQ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var mt=(t,e,r)=>(aQ(t,typeof e!="symbol"?e+"":e,r),r);function cQ(t,e){for(var r=0;rn[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();var ks=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Or(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 s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var MR={exports:{}},s2={},NR={exports:{}},ft={};/** + * @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 Gv=Symbol.for("react.element"),lQ=Symbol.for("react.portal"),fQ=Symbol.for("react.fragment"),uQ=Symbol.for("react.strict_mode"),dQ=Symbol.for("react.profiler"),hQ=Symbol.for("react.provider"),vQ=Symbol.for("react.context"),yQ=Symbol.for("react.forward_ref"),pQ=Symbol.for("react.suspense"),mQ=Symbol.for("react.memo"),gQ=Symbol.for("react.lazy"),PS=Symbol.iterator;function bQ(t){return t===null||typeof t!="object"?null:(t=PS&&t[PS]||t["@@iterator"],typeof t=="function"?t:null)}var jR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},DR=Object.assign,LR={};function g1(t,e,r){this.props=t,this.context=e,this.refs=LR,this.updater=r||jR}g1.prototype.isReactComponent={};g1.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")};g1.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function BR(){}BR.prototype=g1.prototype;function SE(t,e,r){this.props=t,this.context=e,this.refs=LR,this.updater=r||jR}var AE=SE.prototype=new BR;AE.constructor=SE;DR(AE,g1.prototype);AE.isPureReactComponent=!0;var IS=Array.isArray,FR=Object.prototype.hasOwnProperty,$E={current:null},zR={key:!0,ref:!0,__self:!0,__source:!0};function qR(t,e,r){var n,s={},i=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)FR.call(e,n)&&!zR.hasOwnProperty(n)&&(s[n]=e[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1>>1,E=A[P];if(0>>1;Ps(_,B))Us(W,_)?(A[P]=W,A[U]=B,P=U):(A[P]=_,A[q]=B,P=q);else if(Us(W,B))A[P]=W,A[U]=B,P=U;else break e}}return N}function s(A,N){var B=A.sortIndex-N.sortIndex;return B!==0?B:A.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var c=[],l=[],f=1,u=null,d=3,h=!1,v=!1,y=!1,m=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(A){for(var N=r(l);N!==null;){if(N.callback===null)n(l);else if(N.startTime<=A)n(l),N.sortIndex=N.expirationTime,e(c,N);else break;N=r(l)}}function k(A){if(y=!1,x(A),!v)if(r(c)!==null)v=!0,T($);else{var N=r(l);N!==null&&R(k,N.startTime-A)}}function $(A,N){v=!1,y&&(y=!1,g(D),D=-1),h=!0;var B=d;try{for(x(N),u=r(c);u!==null&&(!(u.expirationTime>N)||A&&!V());){var P=u.callback;if(typeof P=="function"){u.callback=null,d=u.priorityLevel;var E=P(u.expirationTime<=N);N=t.unstable_now(),typeof E=="function"?u.callback=E:u===r(c)&&n(c),x(N)}else n(c);u=r(c)}if(u!==null)var L=!0;else{var q=r(l);q!==null&&R(k,q.startTime-N),L=!1}return L}finally{u=null,d=B,h=!1}}var I=!1,M=null,D=-1,H=5,G=-1;function V(){return!(t.unstable_now()-GA||125P?(A.sortIndex=B,e(l,A),r(c)===null&&A===r(l)&&(y?(g(D),D=-1):y=!0,R(k,B-P))):(A.sortIndex=E,e(c,A),v||h||(v=!0,T($))),A},t.unstable_shouldYield=V,t.unstable_wrapCallback=function(A){var N=d;return function(){var B=d;d=N;try{return A.apply(this,arguments)}finally{d=B}}}})(VR);HR.exports=VR;var IQ=HR.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 GR=p,js=IQ;function me(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"),K6=Object.prototype.hasOwnProperty,TQ=/^[: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]*$/,OS={},RS={};function OQ(t){return K6.call(RS,t)?!0:K6.call(OS,t)?!1:TQ.test(t)?RS[t]=!0:(OS[t]=!0,!1)}function RQ(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 MQ(t,e,r,n){if(e===null||typeof e>"u"||RQ(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 Zn(t,e,r,n,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var gn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){gn[t]=new Zn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];gn[e]=new Zn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){gn[t]=new Zn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){gn[t]=new Zn(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){gn[t]=new Zn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){gn[t]=new Zn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){gn[t]=new Zn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){gn[t]=new Zn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){gn[t]=new Zn(t,5,!1,t.toLowerCase(),null,!1,!1)});var IE=/[\-:]([a-z])/g;function TE(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(IE,TE);gn[e]=new Zn(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(IE,TE);gn[e]=new Zn(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(IE,TE);gn[e]=new Zn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){gn[t]=new Zn(t,1,!1,t.toLowerCase(),null,!1,!1)});gn.xlinkHref=new Zn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){gn[t]=new Zn(t,1,!1,t.toLowerCase(),null,!0,!0)});function OE(t,e,r,n){var s=gn.hasOwnProperty(e)?gn[e]:null;(s!==null?s.type!==0:n||!(2a||s[o]!==i[a]){var c=` +`+s[o].replace(" at new "," at ");return t.displayName&&c.includes("")&&(c=c.replace("",t.displayName)),c}while(1<=o&&0<=a);break}}}finally{Lw=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?qh(t):""}function NQ(t){switch(t.tag){case 5:return qh(t.type);case 16:return qh("Lazy");case 13:return qh("Suspense");case 19:return qh("SuspenseList");case 0:case 2:case 15:return t=Bw(t.type,!1),t;case 11:return t=Bw(t.type.render,!1),t;case 1:return t=Bw(t.type,!0),t;default:return""}}function X6(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 Yu:return"Fragment";case Ku:return"Portal";case Y6:return"Profiler";case RE:return"StrictMode";case Q6:return"Suspense";case J6:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case QR:return(t.displayName||"Context")+".Consumer";case YR:return(t._context.displayName||"Context")+".Provider";case ME:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case NE:return e=t.displayName||null,e!==null?e:X6(t.type)||"Memo";case Ec:e=t._payload,t=t._init;try{return X6(t(e))}catch{}}return null}function jQ(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 X6(e);case 8:return e===RE?"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 el(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function XR(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function DQ(t){var e=XR(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 s=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.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 Hy(t){t._valueTracker||(t._valueTracker=DQ(t))}function ZR(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=XR(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Qm(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 Z6(t,e){var r=e.checked;return Er({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function NS(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=el(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 eM(t,e){e=e.checked,e!=null&&OE(t,"checked",e,!1)}function eC(t,e){eM(t,e);var r=el(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")?tC(t,e.type,r):e.hasOwnProperty("defaultValue")&&tC(t,e.type,el(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function jS(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 tC(t,e,r){(e!=="number"||Qm(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Uh=Array.isArray;function pd(t,e,r,n){if(t=t.options,e){e={};for(var s=0;s"+e.valueOf().toString()+"",e=Vy.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function I0(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Yh={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},LQ=["Webkit","ms","Moz","O"];Object.keys(Yh).forEach(function(t){LQ.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Yh[e]=Yh[t]})});function sM(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Yh.hasOwnProperty(t)&&Yh[t]?(""+e).trim():e+"px"}function iM(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=sM(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var BQ=Er({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 sC(t,e){if(e){if(BQ[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(me(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(me(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(me(61))}if(e.style!=null&&typeof e.style!="object")throw Error(me(62))}}function iC(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 oC=null;function jE(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var aC=null,md=null,gd=null;function BS(t){if(t=Qv(t)){if(typeof aC!="function")throw Error(me(280));var e=t.stateNode;e&&(e=l2(e),aC(t.stateNode,t.type,e))}}function oM(t){md?gd?gd.push(t):gd=[t]:md=t}function aM(){if(md){var t=md,e=gd;if(gd=md=null,BS(t),e)for(t=0;t>>=0,t===0?32:31-(QQ(t)/JQ|0)|0}var Gy=64,Ky=4194304;function Wh(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 eg(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=Wh(a):(i&=o,i!==0&&(n=Wh(i)))}else o=r&~s,o!==0?n=Wh(o):i!==0&&(n=Wh(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,i=e&-e,s>=i||s===16&&(i&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 Kv(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Hi(e),t[e]=r}function tJ(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=Jh),KS=" ",YS=!1;function $M(t,e){switch(t){case"keyup":return PJ.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _M(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Qu=!1;function TJ(t,e){switch(t){case"compositionend":return _M(e);case"keypress":return e.which!==32?null:(YS=!0,KS);case"textInput":return t=e.data,t===KS&&YS?null:t;default:return null}}function OJ(t,e){if(Qu)return t==="compositionend"||!WE&&$M(t,e)?(t=SM(),sm=zE=Ic=null,Qu=!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=ZS(r)}}function OM(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?OM(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function RM(){for(var t=window,e=Qm();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Qm(t.document)}return e}function HE(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 zJ(t){var e=RM(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&OM(r.ownerDocument.documentElement,r)){if(n!==null&&HE(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 s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!t.extend&&i>n&&(s=n,n=i,i=s),s=eA(r,i);var o=eA(r,n);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>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,Ju=null,hC=null,Zh=null,vC=!1;function tA(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;vC||Ju==null||Ju!==Qm(n)||(n=Ju,"selectionStart"in n&&HE(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}),Zh&&j0(Zh,n)||(Zh=n,n=ng(hC,"onSelect"),0ed||(t.current=xC[ed],xC[ed]=null,ed--)}function Ut(t,e){ed++,xC[ed]=t.current,t.current=e}var tl={},jn=Al(tl),us=Al(!1),Pf=tl;function Fd(t,e){var r=t.type.contextTypes;if(!r)return tl;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function ds(t){return t=t.childContextTypes,t!=null}function ig(){dr(us),dr(jn)}function cA(t,e,r){if(jn.current!==tl)throw Error(me(168));Ut(jn,e),Ut(us,r)}function qM(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in e))throw Error(me(108,jQ(t)||"Unknown",s));return Er({},r,n)}function og(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||tl,Pf=jn.current,Ut(jn,t),Ut(us,us.current),!0}function lA(t,e,r){var n=t.stateNode;if(!n)throw Error(me(169));r?(t=qM(t,e,Pf),n.__reactInternalMemoizedMergedChildContext=t,dr(us),dr(jn),Ut(jn,t)):dr(us),Ut(us,r)}var na=null,f2=!1,Zw=!1;function UM(t){na===null?na=[t]:na.push(t)}function ZJ(t){f2=!0,UM(t)}function $l(){if(!Zw&&na!==null){Zw=!0;var t=0,e=Ot;try{var r=na;for(Ot=1;t>=o,s-=o,aa=1<<32-Hi(e)+s|r<D?(H=M,M=null):H=M.sibling;var G=d(g,M,x[D],k);if(G===null){M===null&&(M=H);break}t&&M&&G.alternate===null&&e(g,M),b=i(G,b,D),I===null?$=G:I.sibling=G,I=G,M=H}if(D===x.length)return r(g,M),vr&&Ql(g,D),$;if(M===null){for(;DD?(H=M,M=null):H=M.sibling;var V=d(g,M,G.value,k);if(V===null){M===null&&(M=H);break}t&&M&&V.alternate===null&&e(g,M),b=i(V,b,D),I===null?$=V:I.sibling=V,I=V,M=H}if(G.done)return r(g,M),vr&&Ql(g,D),$;if(M===null){for(;!G.done;D++,G=x.next())G=u(g,G.value,k),G!==null&&(b=i(G,b,D),I===null?$=G:I.sibling=G,I=G);return vr&&Ql(g,D),$}for(M=n(g,M);!G.done;D++,G=x.next())G=h(M,g,D,G.value,k),G!==null&&(t&&G.alternate!==null&&M.delete(G.key===null?D:G.key),b=i(G,b,D),I===null?$=G:I.sibling=G,I=G);return t&&M.forEach(function(Q){return e(g,Q)}),vr&&Ql(g,D),$}function m(g,b,x,k){if(typeof x=="object"&&x!==null&&x.type===Yu&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Wy:e:{for(var $=x.key,I=b;I!==null;){if(I.key===$){if($=x.type,$===Yu){if(I.tag===7){r(g,I.sibling),b=s(I,x.props.children),b.return=g,g=b;break e}}else if(I.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===Ec&&pA($)===I.type){r(g,I.sibling),b=s(I,x.props),b.ref=hh(g,I,x),b.return=g,g=b;break e}r(g,I);break}else e(g,I);I=I.sibling}x.type===Yu?(b=bf(x.props.children,g.mode,k,x.key),b.return=g,g=b):(k=dm(x.type,x.key,x.props,null,g.mode,k),k.ref=hh(g,b,x),k.return=g,g=k)}return o(g);case Ku:e:{for(I=x.key;b!==null;){if(b.key===I)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){r(g,b.sibling),b=s(b,x.children||[]),b.return=g,g=b;break e}else{r(g,b);break}else e(g,b);b=b.sibling}b=a5(x,g.mode,k),b.return=g,g=b}return o(g);case Ec:return I=x._init,m(g,b,I(x._payload),k)}if(Uh(x))return v(g,b,x,k);if(ch(x))return y(g,b,x,k);tp(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(r(g,b.sibling),b=s(b,x),b.return=g,g=b):(r(g,b),b=o5(x,g.mode,k),b.return=g,g=b),o(g)):r(g,b)}return m}var qd=JM(!0),XM=JM(!1),Jv={},Po=Al(Jv),F0=Al(Jv),z0=Al(Jv);function hf(t){if(t===Jv)throw Error(me(174));return t}function e4(t,e){switch(Ut(z0,e),Ut(F0,t),Ut(Po,Jv),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:nC(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=nC(e,t)}dr(Po),Ut(Po,e)}function Ud(){dr(Po),dr(F0),dr(z0)}function ZM(t){hf(z0.current);var e=hf(Po.current),r=nC(e,t.type);e!==r&&(Ut(F0,t),Ut(Po,r))}function t4(t){F0.current===t&&(dr(Po),dr(F0))}var xr=Al(0);function dg(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 e5=[];function r4(){for(var t=0;tr?r:4,t(!0);var n=t5.transition;t5.transition={};try{t(!1),e()}finally{Ot=r,t5.transition=n}}function yN(){return vi().memoizedState}function nX(t,e,r){var n=qc(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},pN(t))mN(e,r);else if(r=GM(t,e,r,n),r!==null){var s=Kn();Vi(r,t,n,s),gN(r,e,n)}}function sX(t,e,r){var n=qc(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(pN(t))mN(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,Qi(a,o)){var c=e.interleaved;c===null?(s.next=s,XE(e)):(s.next=c.next,c.next=s),e.interleaved=s;return}}catch{}finally{}r=GM(t,e,s,n),r!==null&&(s=Kn(),Vi(r,t,n,s),gN(r,e,n))}}function pN(t){var e=t.alternate;return t===Cr||e!==null&&e===Cr}function mN(t,e){e0=hg=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function gN(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,LE(t,r)}}var vg={readContext:hi,useCallback:En,useContext:En,useEffect:En,useImperativeHandle:En,useInsertionEffect:En,useLayoutEffect:En,useMemo:En,useReducer:En,useRef:En,useState:En,useDebugValue:En,useDeferredValue:En,useTransition:En,useMutableSource:En,useSyncExternalStore:En,useId:En,unstable_isNewReconciler:!1},iX={readContext:hi,useCallback:function(t,e){return uo().memoizedState=[t,e===void 0?null:e],t},useContext:hi,useEffect:gA,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,cm(4194308,4,fN.bind(null,e,t),r)},useLayoutEffect:function(t,e){return cm(4194308,4,t,e)},useInsertionEffect:function(t,e){return cm(4,2,t,e)},useMemo:function(t,e){var r=uo();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=uo();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=nX.bind(null,Cr,t),[n.memoizedState,t]},useRef:function(t){var e=uo();return t={current:t},e.memoizedState=t},useState:mA,useDebugValue:a4,useDeferredValue:function(t){return uo().memoizedState=t},useTransition:function(){var t=mA(!1),e=t[0];return t=rX.bind(null,t[1]),uo().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Cr,s=uo();if(vr){if(r===void 0)throw Error(me(407));r=r()}else{if(r=e(),an===null)throw Error(me(349));Tf&30||rN(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,gA(sN.bind(null,n,i,t),[t]),n.flags|=2048,W0(9,nN.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=uo(),e=an.identifierPrefix;if(vr){var r=ca,n=aa;r=(n&~(1<<32-Hi(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=q0++,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[xo]=e,t[B0]=n,$N(t,e,!1,!1),e.stateNode=t;e:{switch(o=iC(r,n),r){case"dialog":ar("cancel",t),ar("close",t),s=n;break;case"iframe":case"object":case"embed":ar("load",t),s=n;break;case"video":case"audio":for(s=0;sHd&&(e.flags|=128,n=!0,vh(i,!1),e.lanes=4194304)}else{if(!n)if(t=dg(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),vh(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!vr)return kn(e),null}else 2*Br()-i.renderingStartTime>Hd&&r!==1073741824&&(e.flags|=128,n=!0,vh(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(r=i.last,r!==null?r.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Br(),e.sibling=null,r=xr.current,Ut(xr,n?r&1|2:r&1),e):(kn(e),null);case 22:case 23:return h4(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Cs&1073741824&&(kn(e),e.subtreeFlags&6&&(e.flags|=8192)):kn(e),null;case 24:return null;case 25:return null}throw Error(me(156,e.tag))}function hX(t,e){switch(GE(e),e.tag){case 1:return ds(e.type)&&ig(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ud(),dr(us),dr(jn),r4(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return t4(e),null;case 13:if(dr(xr),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(me(340));zd()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return dr(xr),null;case 4:return Ud(),null;case 10:return JE(e.type._context),null;case 22:case 23:return h4(),null;case 24:return null;default:return null}}var np=!1,_n=!1,vX=typeof WeakSet=="function"?WeakSet:Set,Ce=null;function sd(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Sr(t,e,n)}else r.current=null}function OC(t,e,r){try{r()}catch(n){Sr(t,e,n)}}var $A=!1;function yX(t,e){if(yC=tg,t=RM(),HE(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 s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,c=-1,l=0,f=0,u=t,d=null;t:for(;;){for(var h;u!==r||s!==0&&u.nodeType!==3||(a=o+s),u!==i||n!==0&&u.nodeType!==3||(c=o+n),u.nodeType===3&&(o+=u.nodeValue.length),(h=u.firstChild)!==null;)d=u,u=h;for(;;){if(u===t)break t;if(d===r&&++l===s&&(a=o),d===i&&++f===n&&(c=o),(h=u.nextSibling)!==null)break;u=d,d=u.parentNode}u=h}r=a===-1||c===-1?null:{start:a,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(pC={focusedElem:t,selectionRange:r},tg=!1,Ce=e;Ce!==null;)if(e=Ce,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Ce=t;else for(;Ce!==null;){e=Ce;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,m=v.memoizedState,g=e.stateNode,b=g.getSnapshotBeforeUpdate(e.elementType===e.type?y:Di(e.type,y),m);g.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=e.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(me(163))}}catch(k){Sr(e,e.return,k)}if(t=e.sibling,t!==null){t.return=e.return,Ce=t;break}Ce=e.return}return v=$A,$A=!1,v}function t0(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&OC(e,r,i)}s=s.next}while(s!==n)}}function h2(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 RC(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 IN(t){var e=t.alternate;e!==null&&(t.alternate=null,IN(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[xo],delete e[B0],delete e[bC],delete e[JJ],delete e[XJ])),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 TN(t){return t.tag===5||t.tag===3||t.tag===4}function _A(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||TN(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 MC(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=sg));else if(n!==4&&(t=t.child,t!==null))for(MC(t,e,r),t=t.sibling;t!==null;)MC(t,e,r),t=t.sibling}function NC(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(NC(t,e,r),t=t.sibling;t!==null;)NC(t,e,r),t=t.sibling}var un=null,Bi=!1;function fc(t,e,r){for(r=r.child;r!==null;)ON(t,e,r),r=r.sibling}function ON(t,e,r){if(_o&&typeof _o.onCommitFiberUnmount=="function")try{_o.onCommitFiberUnmount(i2,r)}catch{}switch(r.tag){case 5:_n||sd(r,e);case 6:var n=un,s=Bi;un=null,fc(t,e,r),un=n,Bi=s,un!==null&&(Bi?(t=un,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):un.removeChild(r.stateNode));break;case 18:un!==null&&(Bi?(t=un,r=r.stateNode,t.nodeType===8?Xw(t.parentNode,r):t.nodeType===1&&Xw(t,r),M0(t)):Xw(un,r.stateNode));break;case 4:n=un,s=Bi,un=r.stateNode.containerInfo,Bi=!0,fc(t,e,r),un=n,Bi=s;break;case 0:case 11:case 14:case 15:if(!_n&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&OC(r,e,o),s=s.next}while(s!==n)}fc(t,e,r);break;case 1:if(!_n&&(sd(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Sr(r,e,a)}fc(t,e,r);break;case 21:fc(t,e,r);break;case 22:r.mode&1?(_n=(n=_n)||r.memoizedState!==null,fc(t,e,r),_n=n):fc(t,e,r);break;default:fc(t,e,r)}}function PA(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new vX),e.forEach(function(n){var s=kX.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Pi(t,e){var r=e.deletions;if(r!==null)for(var n=0;ns&&(s=o),n&=~i}if(n=s,n=Br()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*mX(n/1960))-n,10t?16:t,Tc===null)var n=!1;else{if(t=Tc,Tc=null,mg=0,xt&6)throw Error(me(331));var s=xt;for(xt|=4,Ce=t.current;Ce!==null;){var i=Ce,o=i.child;if(Ce.flags&16){var a=i.deletions;if(a!==null){for(var c=0;cBr()-u4?gf(t,0):f4|=r),hs(t,e)}function FN(t,e){e===0&&(t.mode&1?(e=Ky,Ky<<=1,!(Ky&130023424)&&(Ky=4194304)):e=1);var r=Kn();t=Ea(t,e),t!==null&&(Kv(t,e,r),hs(t,r))}function EX(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),FN(t,r)}function kX(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,s=t.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(me(314))}n!==null&&n.delete(e),FN(t,r)}var zN;zN=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||us.current)as=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return as=!1,uX(t,e,r);as=!!(t.flags&131072)}else as=!1,vr&&e.flags&1048576&&WM(e,cg,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;lm(t,e),t=e.pendingProps;var s=Fd(e,jn.current);xd(e,r),s=s4(null,e,n,t,s,r);var i=i4();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,ds(n)?(i=!0,og(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,ZE(e),s.updater=u2,e.stateNode=s,s._reactInternals=e,SC(e,n,t,r),e=_C(null,e,n,!0,i,r)):(e.tag=0,vr&&i&&VE(e),Hn(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(lm(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=AX(n),t=Di(n,t),s){case 0:e=$C(null,e,n,t,r);break e;case 1:e=kA(null,e,n,t,r);break e;case 11:e=CA(null,e,n,t,r);break e;case 14:e=EA(null,e,n,Di(n.type,t),r);break e}throw Error(me(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Di(n,s),$C(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Di(n,s),kA(t,e,n,s,r);case 3:e:{if(kN(e),t===null)throw Error(me(387));n=e.pendingProps,i=e.memoizedState,s=i.element,KM(t,e),ug(e,n,null,r);var o=e.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Wd(Error(me(423)),e),e=SA(t,e,n,r,s);break e}else if(n!==s){s=Wd(Error(me(424)),e),e=SA(t,e,n,r,s);break e}else for(Is=Bc(e.stateNode.containerInfo.firstChild),Ts=e,vr=!0,Fi=null,r=XM(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(zd(),n===s){e=ka(t,e,r);break e}Hn(t,e,n,r)}e=e.child}return e;case 5:return ZM(e),t===null&&CC(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,mC(n,s)?o=null:i!==null&&mC(n,i)&&(e.flags|=32),EN(t,e),Hn(t,e,o,r),e.child;case 6:return t===null&&CC(e),null;case 13:return SN(t,e,r);case 4:return e4(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=qd(e,null,n,r):Hn(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Di(n,s),CA(t,e,n,s,r);case 7:return Hn(t,e,e.pendingProps,r),e.child;case 8:return Hn(t,e,e.pendingProps.children,r),e.child;case 12:return Hn(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,Ut(lg,n._currentValue),n._currentValue=o,i!==null)if(Qi(i.value,o)){if(i.children===s.children&&!us.current){e=ka(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var c=a.firstContext;c!==null;){if(c.context===n){if(i.tag===1){c=va(-1,r&-r),c.tag=2;var l=i.updateQueue;if(l!==null){l=l.shared;var f=l.pending;f===null?c.next=c:(c.next=f.next,f.next=c),l.pending=c}}i.lanes|=r,c=i.alternate,c!==null&&(c.lanes|=r),EC(i.return,r,e),a.lanes|=r;break}c=c.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(me(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),EC(o,r,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Hn(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,xd(e,r),s=hi(s),n=n(s),e.flags|=1,Hn(t,e,n,r),e.child;case 14:return n=e.type,s=Di(n,e.pendingProps),s=Di(n.type,s),EA(t,e,n,s,r);case 15:return wN(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Di(n,s),lm(t,e),e.tag=1,ds(n)?(t=!0,og(e)):t=!1,xd(e,r),QM(e,n,s),SC(e,n,s,r),_C(null,e,n,!0,t,r);case 19:return AN(t,e,r);case 22:return CN(t,e,r)}throw Error(me(156,e.tag))};function qN(t,e){return vM(t,e)}function SX(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 ci(t,e,r,n){return new SX(t,e,r,n)}function y4(t){return t=t.prototype,!(!t||!t.isReactComponent)}function AX(t){if(typeof t=="function")return y4(t)?1:0;if(t!=null){if(t=t.$$typeof,t===ME)return 11;if(t===NE)return 14}return 2}function Uc(t,e){var r=t.alternate;return r===null?(r=ci(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 dm(t,e,r,n,s,i){var o=2;if(n=t,typeof t=="function")y4(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Yu:return bf(r.children,s,i,e);case RE:o=8,s|=8;break;case Y6:return t=ci(12,r,e,s|2),t.elementType=Y6,t.lanes=i,t;case Q6:return t=ci(13,r,e,s),t.elementType=Q6,t.lanes=i,t;case J6:return t=ci(19,r,e,s),t.elementType=J6,t.lanes=i,t;case JR:return y2(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case YR:o=10;break e;case QR:o=9;break e;case ME:o=11;break e;case NE:o=14;break e;case Ec:o=16,n=null;break e}throw Error(me(130,t==null?t:typeof t,""))}return e=ci(o,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function bf(t,e,r,n){return t=ci(7,t,n,e),t.lanes=r,t}function y2(t,e,r,n){return t=ci(22,t,n,e),t.elementType=JR,t.lanes=r,t.stateNode={isHidden:!1},t}function o5(t,e,r){return t=ci(6,t,null,e),t.lanes=r,t}function a5(t,e,r){return e=ci(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function $X(t,e,r,n,s){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=zw(0),this.expirationTimes=zw(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zw(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function p4(t,e,r,n,s,i,o,a,c){return t=new $X(t,e,r,a,c),e===1?(e=1,i===!0&&(e|=8)):e=0,i=ci(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},ZE(i),t}function _X(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(VN)}catch(t){console.error(t)}}VN(),WR.exports=zs;var bn=WR.exports;const GN=Fs(bn);var DA=bn;G6.createRoot=DA.createRoot,G6.hydrateRoot=DA.hydrateRoot;const RX=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var MX=Object.freeze({__proto__:null,abi:RX});const NX=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],jX={isValidSignatureBytes32:"0x1626ba7e"};var DX=Object.freeze({__proto__:null,abi:NX,returns:jX});const LX=[{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 BX=Object.freeze({__proto__:null,abi:LX});const FX=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var zX=Object.freeze({__proto__:null,abi:FX});const qX=[{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 UX=Object.freeze({__proto__:null,abi:qX});const WX=[{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 HX=Object.freeze({__proto__:null,abi:WX});const VX=[{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 GX=Object.freeze({__proto__:null,abi:VX});const KX=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var YX=Object.freeze({__proto__:null,abi:KX});const cn={erc6492:BX,erc5719:MX,erc1271:DX,factory:zX,mainModule:UX,mainModuleUpgradable:HX,sequenceUtils:GX,requireFreshSigner:YX},QX=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:cn},Symbol.toStringTag,{value:"Module"})),Yn=globalThis||void 0||self;function xg(){return xg=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Je({},n)).then(s=>Xe(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),Je({},n)).then(s=>Xe(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Je({},n)).then(s=>Xe(s).then(i=>({status:i.status}))),this.clock=n=>this.fetch(this.url("Clock"),Je({},n)).then(s=>Xe(s).then(i=>({serverTime:i.serverTime}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),Je({},n)).then(s=>Xe(s).then(i=>({data:i.data}))),this.getAuthToken=(n,s)=>this.fetch(this.url("GetAuthToken"),Je(n,s)).then(i=>Xe(i).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.getAuthToken2=(n,s)=>this.fetch(this.url("GetAuthToken2"),Je(n,s)).then(i=>Xe(i).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.sendPasswordlessLink=(n,s)=>this.fetch(this.url("SendPasswordlessLink"),Je(n,s)).then(i=>Xe(i).then(o=>({status:o.status}))),this.friendList=(n,s)=>this.fetch(this.url("FriendList"),Je(n,s)).then(i=>Xe(i).then(o=>({page:o.page,friends:o.friends}))),this.getFriendByAddress=(n,s)=>this.fetch(this.url("GetFriendByAddress"),Je(n,s)).then(i=>Xe(i).then(o=>({status:o.status,friend:o.friend}))),this.searchFriends=(n,s)=>this.fetch(this.url("SearchFriends"),Je(n,s)).then(i=>Xe(i).then(o=>({friends:o.friends}))),this.addFriend=(n,s)=>this.fetch(this.url("AddFriend"),Je(n,s)).then(i=>Xe(i).then(o=>({status:o.status,friend:o.friend}))),this.updateFriendNickname=(n,s)=>this.fetch(this.url("UpdateFriendNickname"),Je(n,s)).then(i=>Xe(i).then(o=>({status:o.status,friend:o.friend}))),this.removeFriend=(n,s)=>this.fetch(this.url("RemoveFriend"),Je(n,s)).then(i=>Xe(i).then(o=>({status:o.status}))),this.contractCall=(n,s)=>this.fetch(this.url("ContractCall"),Je(n,s)).then(i=>Xe(i).then(o=>({returns:o.returns}))),this.decodeContractCall=(n,s)=>this.fetch(this.url("DecodeContractCall"),Je(n,s)).then(i=>Xe(i).then(o=>({call:o.call}))),this.lookupContractCallSelectors=(n,s)=>this.fetch(this.url("LookupContractCallSelectors"),Je(n,s)).then(i=>Xe(i).then(o=>({signatures:o.signatures}))),this.userStorageFetch=(n,s)=>this.fetch(this.url("UserStorageFetch"),Je(n,s)).then(i=>Xe(i).then(o=>({object:o.object}))),this.userStorageSave=(n,s)=>this.fetch(this.url("UserStorageSave"),Je(n,s)).then(i=>Xe(i).then(o=>({ok:o.ok}))),this.userStorageDelete=(n,s)=>this.fetch(this.url("UserStorageDelete"),Je(n,s)).then(i=>Xe(i).then(o=>({ok:o.ok}))),this.userStorageFetchAll=(n,s)=>this.fetch(this.url("UserStorageFetchAll"),Je(n,s)).then(i=>Xe(i).then(o=>({objects:o.objects}))),this.getMoonpayLink=(n,s)=>this.fetch(this.url("GetMoonpayLink"),Je(n,s)).then(i=>Xe(i).then(o=>({signedUrl:o.signedUrl}))),this.getSardineClientToken=n=>this.fetch(this.url("GetSardineClientToken"),Je({},n)).then(s=>Xe(s).then(i=>({token:i.token}))),this.resolveENSAddress=(n,s)=>this.fetch(this.url("ResolveENSAddress"),Je(n,s)).then(i=>Xe(i).then(o=>({address:o.address,ok:o.ok}))),this.isValidSignature=(n,s)=>this.fetch(this.url("IsValidSignature"),Je(n,s)).then(i=>Xe(i).then(o=>({isValid:o.isValid}))),this.isValidMessageSignature=(n,s)=>this.fetch(this.url("IsValidMessageSignature"),Je(n,s)).then(i=>Xe(i).then(o=>({isValid:o.isValid}))),this.isValidTypedDataSignature=(n,s)=>this.fetch(this.url("IsValidTypedDataSignature"),Je(n,s)).then(i=>Xe(i).then(o=>({isValid:o.isValid}))),this.isValidETHAuthProof=(n,s)=>this.fetch(this.url("IsValidETHAuthProof"),Je(n,s)).then(i=>Xe(i).then(o=>({isValid:o.isValid}))),this.getCoinPrices=(n,s)=>this.fetch(this.url("GetCoinPrices"),Je(n,s)).then(i=>Xe(i).then(o=>({tokenPrices:o.tokenPrices}))),this.getCollectiblePrices=(n,s)=>this.fetch(this.url("GetCollectiblePrices"),Je(n,s)).then(i=>Xe(i).then(o=>({tokenPrices:o.tokenPrices}))),this.getExchangeRate=(n,s)=>this.fetch(this.url("GetExchangeRate"),Je(n,s)).then(i=>Xe(i).then(o=>({exchangeRate:o.exchangeRate}))),this.memoryStore=(n,s)=>this.fetch(this.url("MemoryStore"),Je(n,s)).then(i=>Xe(i).then(o=>({ok:o.ok}))),this.memoryLoad=(n,s)=>this.fetch(this.url("MemoryLoad"),Je(n,s)).then(i=>Xe(i).then(o=>({value:o.value}))),this.getInviteInfo=n=>this.fetch(this.url("GetInviteInfo"),Je({},n)).then(s=>Xe(s).then(i=>({inviteInfo:i.inviteInfo}))),this.isValidAccessCode=(n,s)=>this.fetch(this.url("IsValidAccessCode"),Je(n,s)).then(i=>Xe(i).then(o=>({status:o.status}))),this.internalClaimAccessCode=(n,s)=>this.fetch(this.url("InternalClaimAccessCode"),Je(n,s)).then(i=>Xe(i).then(o=>({status:o.status}))),this.blockNumberAtTime=(n,s)=>this.fetch(this.url("BlockNumberAtTime"),Je(n,s)).then(i=>Xe(i).then(o=>({blocks:o.blocks}))),this.paperSessionSecret=(n,s)=>this.fetch(this.url("PaperSessionSecret"),Je(n,s)).then(i=>Xe(i).then(o=>({secret:o.secret}))),this.paperSessionSecret2=(n,s)=>this.fetch(this.url("PaperSessionSecret2"),Je(n,s)).then(i=>Xe(i).then(o=>({secret:o.secret}))),this.linkWallet=(n,s)=>this.fetch(this.url("LinkWallet"),Je(n,s)).then(i=>Xe(i).then(o=>({status:o.status,linkedWalletAddress:o.linkedWalletAddress}))),this.getLinkedWallets=(n,s)=>this.fetch(this.url("GetLinkedWallets"),Je(n,s)).then(i=>Xe(i).then(o=>({linkedWallets:o.linkedWallets}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const Je=(t={},e={})=>({method:"POST",headers:xg({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Xe=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}),LA=typeof Yn=="object"?Yn.fetch:window.fetch;class s0 extends KN{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,LA),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(s,i)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),i.headers=xg({},i.headers,o),LA(s,i)},this.fetch=this._fetch}}const tZ=Object.freeze(Object.defineProperty({__proto__:null,API:KN,SequenceAPIClient:s0,SortOrder:eZ,WebRPCSchemaHash:ZX,WebRPCSchemaVersion:XX,WebRPCVersion:JX},Symbol.toStringTag,{value:"Module"}));var x4={exports:{}},rn={},x2={};x2.byteLength=sZ;x2.toByteArray=oZ;x2.fromByteArray=lZ;var wo=[],Qs=[],rZ=typeof Uint8Array<"u"?Uint8Array:Array,c5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var gu=0,nZ=c5.length;gu0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function sZ(t){var e=YN(t),r=e[0],n=e[1];return(r+n)*3/4-n}function iZ(t,e,r){return(e+r)*3/4-r}function oZ(t){var e,r=YN(t),n=r[0],s=r[1],i=new rZ(iZ(t,n,s)),o=0,a=s>0?n-4:n,c;for(c=0;c>16&255,i[o++]=e>>8&255,i[o++]=e&255;return s===2&&(e=Qs[t.charCodeAt(c)]<<2|Qs[t.charCodeAt(c+1)]>>4,i[o++]=e&255),s===1&&(e=Qs[t.charCodeAt(c)]<<10|Qs[t.charCodeAt(c+1)]<<4|Qs[t.charCodeAt(c+2)]>>2,i[o++]=e>>8&255,i[o++]=e&255),i}function aZ(t){return wo[t>>18&63]+wo[t>>12&63]+wo[t>>6&63]+wo[t&63]}function cZ(t,e,r){for(var n,s=[],i=e;ia?a:o+i));return n===1?(e=t[r-1],s.push(wo[e>>2]+wo[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],s.push(wo[e>>10]+wo[e>>4&63]+wo[e<<2&63]+"=")),s.join("")}var w4={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */w4.read=function(t,e,r,n,s){var i,o,a=s*8-n-1,c=(1<>1,f=-7,u=r?s-1:0,d=r?-1:1,h=t[e+u];for(u+=d,i=h&(1<<-f)-1,h>>=-f,f+=a;f>0;i=i*256+t[e+u],u+=d,f-=8);for(o=i&(1<<-f)-1,i>>=-f,f+=n;f>0;o=o*256+t[e+u],u+=d,f-=8);if(i===0)i=1-l;else{if(i===c)return o?NaN:(h?-1:1)*(1/0);o=o+Math.pow(2,n),i=i-l}return(h?-1:1)*o*Math.pow(2,i-n)};w4.write=function(t,e,r,n,s,i){var o,a,c,l=i*8-s-1,f=(1<>1,d=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,v=n?1:-1,y=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=f):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+u>=1?e+=d/c:e+=d*Math.pow(2,1-u),e*c>=2&&(o++,c/=2),o+u>=f?(a=0,o=f):o+u>=1?(a=(e*c-1)*Math.pow(2,s),o=o+u):(a=e*Math.pow(2,u-1)*Math.pow(2,s),o=0));s>=8;t[r+h]=a&255,h+=v,a/=256,s-=8);for(o=o<0;t[r+h]=o&255,h+=v,o/=256,l-=8);t[r+h-v]|=y*128};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */(function(t){const e=x2,r=w4,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=f,t.SlowBuffer=$,t.INSPECT_MAX_BYTES=50;const s=2147483647;t.kMaxLength=s;const{Uint8Array:i,ArrayBuffer:o,SharedArrayBuffer:a}=globalThis;f.TYPED_ARRAY_SUPPORT=c(),!f.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{const z=new i(1),O={foo:function(){return 42}};return Object.setPrototypeOf(O,i.prototype),Object.setPrototypeOf(z,O),z.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function l(z){if(z>s)throw new RangeError('The value "'+z+'" is invalid for option "size"');const O=new i(z);return Object.setPrototypeOf(O,f.prototype),O}function f(z,O,j){if(typeof z=="number"){if(typeof O=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return v(z)}return u(z,O,j)}f.poolSize=8192;function u(z,O,j){if(typeof z=="string")return y(z,O);if(o.isView(z))return g(z);if(z==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof z);if(nt(z,o)||z&&nt(z.buffer,o)||typeof a<"u"&&(nt(z,a)||z&&nt(z.buffer,a)))return b(z,O,j);if(typeof z=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Y=z.valueOf&&z.valueOf();if(Y!=null&&Y!==z)return f.from(Y,O,j);const te=x(z);if(te)return te;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof z[Symbol.toPrimitive]=="function")return f.from(z[Symbol.toPrimitive]("string"),O,j);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof z)}f.from=function(z,O,j){return u(z,O,j)},Object.setPrototypeOf(f.prototype,i.prototype),Object.setPrototypeOf(f,i);function d(z){if(typeof z!="number")throw new TypeError('"size" argument must be of type number');if(z<0)throw new RangeError('The value "'+z+'" is invalid for option "size"')}function h(z,O,j){return d(z),z<=0?l(z):O!==void 0?typeof j=="string"?l(z).fill(O,j):l(z).fill(O):l(z)}f.alloc=function(z,O,j){return h(z,O,j)};function v(z){return d(z),l(z<0?0:k(z)|0)}f.allocUnsafe=function(z){return v(z)},f.allocUnsafeSlow=function(z){return v(z)};function y(z,O){if((typeof O!="string"||O==="")&&(O="utf8"),!f.isEncoding(O))throw new TypeError("Unknown encoding: "+O);const j=I(z,O)|0;let Y=l(j);const te=Y.write(z,O);return te!==j&&(Y=Y.slice(0,te)),Y}function m(z){const O=z.length<0?0:k(z.length)|0,j=l(O);for(let Y=0;Y=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return z|0}function $(z){return+z!=z&&(z=0),f.alloc(+z)}f.isBuffer=function(O){return O!=null&&O._isBuffer===!0&&O!==f.prototype},f.compare=function(O,j){if(nt(O,i)&&(O=f.from(O,O.offset,O.byteLength)),nt(j,i)&&(j=f.from(j,j.offset,j.byteLength)),!f.isBuffer(O)||!f.isBuffer(j))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(O===j)return 0;let Y=O.length,te=j.length;for(let ie=0,ce=Math.min(Y,te);iete.length?(f.isBuffer(ce)||(ce=f.from(ce)),ce.copy(te,ie)):i.prototype.set.call(te,ce,ie);else if(f.isBuffer(ce))ce.copy(te,ie);else throw new TypeError('"list" argument must be an Array of Buffers');ie+=ce.length}return te};function I(z,O){if(f.isBuffer(z))return z.length;if(o.isView(z)||nt(z,o))return z.byteLength;if(typeof z!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof z);const j=z.length,Y=arguments.length>2&&arguments[2]===!0;if(!Y&&j===0)return 0;let te=!1;for(;;)switch(O){case"ascii":case"latin1":case"binary":return j;case"utf8":case"utf-8":return it(z).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j*2;case"hex":return j>>>1;case"base64":return Et(z).length;default:if(te)return Y?-1:it(z).length;O=(""+O).toLowerCase(),te=!0}}f.byteLength=I;function M(z,O,j){let Y=!1;if((O===void 0||O<0)&&(O=0),O>this.length||((j===void 0||j>this.length)&&(j=this.length),j<=0)||(j>>>=0,O>>>=0,j<=O))return"";for(z||(z="utf8");;)switch(z){case"hex":return E(this,O,j);case"utf8":case"utf-8":return R(this,O,j);case"ascii":return B(this,O,j);case"latin1":case"binary":return P(this,O,j);case"base64":return T(this,O,j);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,O,j);default:if(Y)throw new TypeError("Unknown encoding: "+z);z=(z+"").toLowerCase(),Y=!0}}f.prototype._isBuffer=!0;function D(z,O,j){const Y=z[O];z[O]=z[j],z[j]=Y}f.prototype.swap16=function(){const O=this.length;if(O%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let j=0;jj&&(O+=" ... "),""},n&&(f.prototype[n]=f.prototype.inspect),f.prototype.compare=function(O,j,Y,te,ie){if(nt(O,i)&&(O=f.from(O,O.offset,O.byteLength)),!f.isBuffer(O))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof O);if(j===void 0&&(j=0),Y===void 0&&(Y=O?O.length:0),te===void 0&&(te=0),ie===void 0&&(ie=this.length),j<0||Y>O.length||te<0||ie>this.length)throw new RangeError("out of range index");if(te>=ie&&j>=Y)return 0;if(te>=ie)return-1;if(j>=Y)return 1;if(j>>>=0,Y>>>=0,te>>>=0,ie>>>=0,this===O)return 0;let ce=ie-te,Fe=Y-j;const je=Math.min(ce,Fe),Oe=this.slice(te,ie),$t=O.slice(j,Y);for(let Pe=0;Pe2147483647?j=2147483647:j<-2147483648&&(j=-2147483648),j=+j,Be(j)&&(j=te?0:z.length-1),j<0&&(j=z.length+j),j>=z.length){if(te)return-1;j=z.length-1}else if(j<0)if(te)j=0;else return-1;if(typeof O=="string"&&(O=f.from(O,Y)),f.isBuffer(O))return O.length===0?-1:G(z,O,j,Y,te);if(typeof O=="number")return O=O&255,typeof i.prototype.indexOf=="function"?te?i.prototype.indexOf.call(z,O,j):i.prototype.lastIndexOf.call(z,O,j):G(z,[O],j,Y,te);throw new TypeError("val must be string, number or Buffer")}function G(z,O,j,Y,te){let ie=1,ce=z.length,Fe=O.length;if(Y!==void 0&&(Y=String(Y).toLowerCase(),Y==="ucs2"||Y==="ucs-2"||Y==="utf16le"||Y==="utf-16le")){if(z.length<2||O.length<2)return-1;ie=2,ce/=2,Fe/=2,j/=2}function je($t,Pe){return ie===1?$t[Pe]:$t.readUInt16BE(Pe*ie)}let Oe;if(te){let $t=-1;for(Oe=j;Oece&&(j=ce-Fe),Oe=j;Oe>=0;Oe--){let $t=!0;for(let Pe=0;Pete&&(Y=te)):Y=te;const ie=O.length;Y>ie/2&&(Y=ie/2);let ce;for(ce=0;ce>>0,isFinite(Y)?(Y=Y>>>0,te===void 0&&(te="utf8")):(te=Y,Y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ie=this.length-j;if((Y===void 0||Y>ie)&&(Y=ie),O.length>0&&(Y<0||j<0)||j>this.length)throw new RangeError("Attempt to write outside buffer bounds");te||(te="utf8");let ce=!1;for(;;)switch(te){case"hex":return V(this,O,j,Y);case"utf8":case"utf-8":return Q(this,O,j,Y);case"ascii":case"latin1":case"binary":return F(this,O,j,Y);case"base64":return C(this,O,j,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,O,j,Y);default:if(ce)throw new TypeError("Unknown encoding: "+te);te=(""+te).toLowerCase(),ce=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(z,O,j){return O===0&&j===z.length?e.fromByteArray(z):e.fromByteArray(z.slice(O,j))}function R(z,O,j){j=Math.min(z.length,j);const Y=[];let te=O;for(;te239?4:ie>223?3:ie>191?2:1;if(te+Fe<=j){let je,Oe,$t,Pe;switch(Fe){case 1:ie<128&&(ce=ie);break;case 2:je=z[te+1],(je&192)===128&&(Pe=(ie&31)<<6|je&63,Pe>127&&(ce=Pe));break;case 3:je=z[te+1],Oe=z[te+2],(je&192)===128&&(Oe&192)===128&&(Pe=(ie&15)<<12|(je&63)<<6|Oe&63,Pe>2047&&(Pe<55296||Pe>57343)&&(ce=Pe));break;case 4:je=z[te+1],Oe=z[te+2],$t=z[te+3],(je&192)===128&&(Oe&192)===128&&($t&192)===128&&(Pe=(ie&15)<<18|(je&63)<<12|(Oe&63)<<6|$t&63,Pe>65535&&Pe<1114112&&(ce=Pe))}}ce===null?(ce=65533,Fe=1):ce>65535&&(ce-=65536,Y.push(ce>>>10&1023|55296),ce=56320|ce&1023),Y.push(ce),te+=Fe}return N(Y)}const A=4096;function N(z){const O=z.length;if(O<=A)return String.fromCharCode.apply(String,z);let j="",Y=0;for(;YY)&&(j=Y);let te="";for(let ie=O;ieY&&(O=Y),j<0?(j+=Y,j<0&&(j=0)):j>Y&&(j=Y),jj)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(O,j,Y){O=O>>>0,j=j>>>0,Y||q(O,j,this.length);let te=this[O],ie=1,ce=0;for(;++ce>>0,j=j>>>0,Y||q(O,j,this.length);let te=this[O+--j],ie=1;for(;j>0&&(ie*=256);)te+=this[O+--j]*ie;return te},f.prototype.readUint8=f.prototype.readUInt8=function(O,j){return O=O>>>0,j||q(O,1,this.length),this[O]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(O,j){return O=O>>>0,j||q(O,2,this.length),this[O]|this[O+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(O,j){return O=O>>>0,j||q(O,2,this.length),this[O]<<8|this[O+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(O,j){return O=O>>>0,j||q(O,4,this.length),(this[O]|this[O+1]<<8|this[O+2]<<16)+this[O+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(O,j){return O=O>>>0,j||q(O,4,this.length),this[O]*16777216+(this[O+1]<<16|this[O+2]<<8|this[O+3])},f.prototype.readBigUInt64LE=Nt(function(O){O=O>>>0,$e(O,"offset");const j=this[O],Y=this[O+7];(j===void 0||Y===void 0)&&Se(O,this.length-8);const te=j+this[++O]*2**8+this[++O]*2**16+this[++O]*2**24,ie=this[++O]+this[++O]*2**8+this[++O]*2**16+Y*2**24;return BigInt(te)+(BigInt(ie)<>>0,$e(O,"offset");const j=this[O],Y=this[O+7];(j===void 0||Y===void 0)&&Se(O,this.length-8);const te=j*2**24+this[++O]*2**16+this[++O]*2**8+this[++O],ie=this[++O]*2**24+this[++O]*2**16+this[++O]*2**8+Y;return(BigInt(te)<>>0,j=j>>>0,Y||q(O,j,this.length);let te=this[O],ie=1,ce=0;for(;++ce=ie&&(te-=Math.pow(2,8*j)),te},f.prototype.readIntBE=function(O,j,Y){O=O>>>0,j=j>>>0,Y||q(O,j,this.length);let te=j,ie=1,ce=this[O+--te];for(;te>0&&(ie*=256);)ce+=this[O+--te]*ie;return ie*=128,ce>=ie&&(ce-=Math.pow(2,8*j)),ce},f.prototype.readInt8=function(O,j){return O=O>>>0,j||q(O,1,this.length),this[O]&128?(255-this[O]+1)*-1:this[O]},f.prototype.readInt16LE=function(O,j){O=O>>>0,j||q(O,2,this.length);const Y=this[O]|this[O+1]<<8;return Y&32768?Y|4294901760:Y},f.prototype.readInt16BE=function(O,j){O=O>>>0,j||q(O,2,this.length);const Y=this[O+1]|this[O]<<8;return Y&32768?Y|4294901760:Y},f.prototype.readInt32LE=function(O,j){return O=O>>>0,j||q(O,4,this.length),this[O]|this[O+1]<<8|this[O+2]<<16|this[O+3]<<24},f.prototype.readInt32BE=function(O,j){return O=O>>>0,j||q(O,4,this.length),this[O]<<24|this[O+1]<<16|this[O+2]<<8|this[O+3]},f.prototype.readBigInt64LE=Nt(function(O){O=O>>>0,$e(O,"offset");const j=this[O],Y=this[O+7];(j===void 0||Y===void 0)&&Se(O,this.length-8);const te=this[O+4]+this[O+5]*2**8+this[O+6]*2**16+(Y<<24);return(BigInt(te)<>>0,$e(O,"offset");const j=this[O],Y=this[O+7];(j===void 0||Y===void 0)&&Se(O,this.length-8);const te=(j<<24)+this[++O]*2**16+this[++O]*2**8+this[++O];return(BigInt(te)<>>0,j||q(O,4,this.length),r.read(this,O,!0,23,4)},f.prototype.readFloatBE=function(O,j){return O=O>>>0,j||q(O,4,this.length),r.read(this,O,!1,23,4)},f.prototype.readDoubleLE=function(O,j){return O=O>>>0,j||q(O,8,this.length),r.read(this,O,!0,52,8)},f.prototype.readDoubleBE=function(O,j){return O=O>>>0,j||q(O,8,this.length),r.read(this,O,!1,52,8)};function _(z,O,j,Y,te,ie){if(!f.isBuffer(z))throw new TypeError('"buffer" argument must be a Buffer instance');if(O>te||Oz.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(O,j,Y,te){if(O=+O,j=j>>>0,Y=Y>>>0,!te){const Fe=Math.pow(2,8*Y)-1;_(this,O,j,Y,Fe,0)}let ie=1,ce=0;for(this[j]=O&255;++ce>>0,Y=Y>>>0,!te){const Fe=Math.pow(2,8*Y)-1;_(this,O,j,Y,Fe,0)}let ie=Y-1,ce=1;for(this[j+ie]=O&255;--ie>=0&&(ce*=256);)this[j+ie]=O/ce&255;return j+Y},f.prototype.writeUint8=f.prototype.writeUInt8=function(O,j,Y){return O=+O,j=j>>>0,Y||_(this,O,j,1,255,0),this[j]=O&255,j+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(O,j,Y){return O=+O,j=j>>>0,Y||_(this,O,j,2,65535,0),this[j]=O&255,this[j+1]=O>>>8,j+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(O,j,Y){return O=+O,j=j>>>0,Y||_(this,O,j,2,65535,0),this[j]=O>>>8,this[j+1]=O&255,j+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(O,j,Y){return O=+O,j=j>>>0,Y||_(this,O,j,4,4294967295,0),this[j+3]=O>>>24,this[j+2]=O>>>16,this[j+1]=O>>>8,this[j]=O&255,j+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(O,j,Y){return O=+O,j=j>>>0,Y||_(this,O,j,4,4294967295,0),this[j]=O>>>24,this[j+1]=O>>>16,this[j+2]=O>>>8,this[j+3]=O&255,j+4};function U(z,O,j,Y,te){pe(O,Y,te,z,j,7);let ie=Number(O&BigInt(4294967295));z[j++]=ie,ie=ie>>8,z[j++]=ie,ie=ie>>8,z[j++]=ie,ie=ie>>8,z[j++]=ie;let ce=Number(O>>BigInt(32)&BigInt(4294967295));return z[j++]=ce,ce=ce>>8,z[j++]=ce,ce=ce>>8,z[j++]=ce,ce=ce>>8,z[j++]=ce,j}function W(z,O,j,Y,te){pe(O,Y,te,z,j,7);let ie=Number(O&BigInt(4294967295));z[j+7]=ie,ie=ie>>8,z[j+6]=ie,ie=ie>>8,z[j+5]=ie,ie=ie>>8,z[j+4]=ie;let ce=Number(O>>BigInt(32)&BigInt(4294967295));return z[j+3]=ce,ce=ce>>8,z[j+2]=ce,ce=ce>>8,z[j+1]=ce,ce=ce>>8,z[j]=ce,j+8}f.prototype.writeBigUInt64LE=Nt(function(O,j=0){return U(this,O,j,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=Nt(function(O,j=0){return W(this,O,j,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(O,j,Y,te){if(O=+O,j=j>>>0,!te){const je=Math.pow(2,8*Y-1);_(this,O,j,Y,je-1,-je)}let ie=0,ce=1,Fe=0;for(this[j]=O&255;++ie>0)-Fe&255;return j+Y},f.prototype.writeIntBE=function(O,j,Y,te){if(O=+O,j=j>>>0,!te){const je=Math.pow(2,8*Y-1);_(this,O,j,Y,je-1,-je)}let ie=Y-1,ce=1,Fe=0;for(this[j+ie]=O&255;--ie>=0&&(ce*=256);)O<0&&Fe===0&&this[j+ie+1]!==0&&(Fe=1),this[j+ie]=(O/ce>>0)-Fe&255;return j+Y},f.prototype.writeInt8=function(O,j,Y){return O=+O,j=j>>>0,Y||_(this,O,j,1,127,-128),O<0&&(O=255+O+1),this[j]=O&255,j+1},f.prototype.writeInt16LE=function(O,j,Y){return O=+O,j=j>>>0,Y||_(this,O,j,2,32767,-32768),this[j]=O&255,this[j+1]=O>>>8,j+2},f.prototype.writeInt16BE=function(O,j,Y){return O=+O,j=j>>>0,Y||_(this,O,j,2,32767,-32768),this[j]=O>>>8,this[j+1]=O&255,j+2},f.prototype.writeInt32LE=function(O,j,Y){return O=+O,j=j>>>0,Y||_(this,O,j,4,2147483647,-2147483648),this[j]=O&255,this[j+1]=O>>>8,this[j+2]=O>>>16,this[j+3]=O>>>24,j+4},f.prototype.writeInt32BE=function(O,j,Y){return O=+O,j=j>>>0,Y||_(this,O,j,4,2147483647,-2147483648),O<0&&(O=4294967295+O+1),this[j]=O>>>24,this[j+1]=O>>>16,this[j+2]=O>>>8,this[j+3]=O&255,j+4},f.prototype.writeBigInt64LE=Nt(function(O,j=0){return U(this,O,j,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=Nt(function(O,j=0){return W(this,O,j,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function J(z,O,j,Y,te,ie){if(j+Y>z.length)throw new RangeError("Index out of range");if(j<0)throw new RangeError("Index out of range")}function X(z,O,j,Y,te){return O=+O,j=j>>>0,te||J(z,O,j,4),r.write(z,O,j,Y,23,4),j+4}f.prototype.writeFloatLE=function(O,j,Y){return X(this,O,j,!0,Y)},f.prototype.writeFloatBE=function(O,j,Y){return X(this,O,j,!1,Y)};function re(z,O,j,Y,te){return O=+O,j=j>>>0,te||J(z,O,j,8),r.write(z,O,j,Y,52,8),j+8}f.prototype.writeDoubleLE=function(O,j,Y){return re(this,O,j,!0,Y)},f.prototype.writeDoubleBE=function(O,j,Y){return re(this,O,j,!1,Y)},f.prototype.copy=function(O,j,Y,te){if(!f.isBuffer(O))throw new TypeError("argument should be a Buffer");if(Y||(Y=0),!te&&te!==0&&(te=this.length),j>=O.length&&(j=O.length),j||(j=0),te>0&&te=this.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("sourceEnd out of bounds");te>this.length&&(te=this.length),O.length-j>>0,Y=Y===void 0?this.length:Y>>>0,O||(O=0);let ie;if(typeof O=="number")for(ie=j;ie2**32?te=xe(String(j)):typeof j=="bigint"&&(te=String(j),(j>BigInt(2)**BigInt(32)||j<-(BigInt(2)**BigInt(32)))&&(te=xe(te)),te+="n"),Y+=` It must be ${O}. Received ${te}`,Y},RangeError);function xe(z){let O="",j=z.length;const Y=z[0]==="-"?1:0;for(;j>=Y+4;j-=3)O=`_${z.slice(j-3,j)}${O}`;return`${z.slice(0,j)}${O}`}function de(z,O,j){$e(O,"offset"),(z[O]===void 0||z[O+j]===void 0)&&Se(O,z.length-(j+1))}function pe(z,O,j,Y,te,ie){if(z>j||z3?O===0||O===BigInt(0)?Fe=`>= 0${ce} and < 2${ce} ** ${(ie+1)*8}${ce}`:Fe=`>= -(2${ce} ** ${(ie+1)*8-1}${ce}) and < 2 ** ${(ie+1)*8-1}${ce}`:Fe=`>= ${O}${ce} and <= ${j}${ce}`,new ee.ERR_OUT_OF_RANGE("value",Fe,z)}de(Y,te,ie)}function $e(z,O){if(typeof z!="number")throw new ee.ERR_INVALID_ARG_TYPE(O,"number",z)}function Se(z,O,j){throw Math.floor(z)!==z?($e(z,j),new ee.ERR_OUT_OF_RANGE(j||"offset","an integer",z)):O<0?new ee.ERR_BUFFER_OUT_OF_BOUNDS:new ee.ERR_OUT_OF_RANGE(j||"offset",`>= ${j?1:0} and <= ${O}`,z)}const _e=/[^+/0-9A-Za-z-_]/g;function Ye(z){if(z=z.split("=")[0],z=z.trim().replace(_e,""),z.length<2)return"";for(;z.length%4!==0;)z=z+"=";return z}function it(z,O){O=O||1/0;let j;const Y=z.length;let te=null;const ie=[];for(let ce=0;ce55295&&j<57344){if(!te){if(j>56319){(O-=3)>-1&&ie.push(239,191,189);continue}else if(ce+1===Y){(O-=3)>-1&&ie.push(239,191,189);continue}te=j;continue}if(j<56320){(O-=3)>-1&&ie.push(239,191,189),te=j;continue}j=(te-55296<<10|j-56320)+65536}else te&&(O-=3)>-1&&ie.push(239,191,189);if(te=null,j<128){if((O-=1)<0)break;ie.push(j)}else if(j<2048){if((O-=2)<0)break;ie.push(j>>6|192,j&63|128)}else if(j<65536){if((O-=3)<0)break;ie.push(j>>12|224,j>>6&63|128,j&63|128)}else if(j<1114112){if((O-=4)<0)break;ie.push(j>>18|240,j>>12&63|128,j>>6&63|128,j&63|128)}else throw new Error("Invalid code point")}return ie}function ze(z){const O=[];for(let j=0;j>8,te=j%256,ie.push(te),ie.push(Y);return ie}function Et(z){return e.toByteArray(Ye(z))}function we(z,O,j,Y){let te;for(te=0;te=O.length||te>=z.length);++te)O[te+j]=z[te];return te}function nt(z,O){return z instanceof O||z!=null&&z.constructor!=null&&z.constructor.name!=null&&z.constructor.name===O.name}function Be(z){return z!==z}const Qe=function(){const z="0123456789abcdef",O=new Array(256);for(let j=0;j<16;++j){const Y=j*16;for(let te=0;te<16;++te)O[Y+te]=z[j]+z[te]}return O}();function Nt(z){return typeof BigInt>"u"?wt:z}function wt(){throw new Error("BigInt not supported")}})(rn);const _l=rn.Buffer,fZ=rn.Blob,uZ=rn.BlobOptions,dZ=rn.Buffer,hZ=rn.File,vZ=rn.FileOptions,yZ=rn.INSPECT_MAX_BYTES,pZ=rn.SlowBuffer,mZ=rn.TranscodeEncoding,gZ=rn.atob,bZ=rn.btoa,xZ=rn.constants,wZ=rn.isAscii,CZ=rn.isUtf8,EZ=rn.kMaxLength,kZ=rn.kStringMaxLength,SZ=rn.resolveObjectURL,AZ=rn.transcode,$Z=Object.freeze(Object.defineProperty({__proto__:null,Blob:fZ,BlobOptions:uZ,Buffer:dZ,File:hZ,FileOptions:vZ,INSPECT_MAX_BYTES:yZ,SlowBuffer:pZ,TranscodeEncoding:mZ,atob:gZ,btoa:bZ,constants:xZ,default:_l,isAscii:wZ,isUtf8:CZ,kMaxLength:EZ,kStringMaxLength:kZ,resolveObjectURL:SZ,transcode:AZ},Symbol.toStringTag,{value:"Module"})),_Z=Or($Z);x4.exports;(function(t){(function(e,r){function n(F,C){if(!F)throw new Error(C||"Assertion failed")}function s(F,C){F.super_=C;var S=function(){};S.prototype=C.prototype,F.prototype=new S,F.prototype.constructor=F}function i(F,C,S){if(i.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((C==="le"||C==="be")&&(S=C,C=10),this._init(F||0,C||10,S||"be"))}typeof e=="object"?e.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=_Z.Buffer}catch{}i.isBN=function(C){return C instanceof i?!0:C!==null&&typeof C=="object"&&C.constructor.wordSize===i.wordSize&&Array.isArray(C.words)},i.max=function(C,S){return C.cmp(S)>0?C:S},i.min=function(C,S){return C.cmp(S)<0?C:S},i.prototype._init=function(C,S,T){if(typeof C=="number")return this._initNumber(C,S,T);if(typeof C=="object")return this._initArray(C,S,T);S==="hex"&&(S=16),n(S===(S|0)&&S>=2&&S<=36),C=C.toString().replace(/\s+/g,"");var R=0;C[0]==="-"&&(R++,this.negative=1),R=0;R-=3)N=C[R]|C[R-1]<<8|C[R-2]<<16,this.words[A]|=N<>>26-B&67108863,B+=24,B>=26&&(B-=26,A++);else if(T==="le")for(R=0,A=0;R>>26-B&67108863,B+=24,B>=26&&(B-=26,A++);return this._strip()};function a(F,C){var S=F.charCodeAt(C);if(S>=48&&S<=57)return S-48;if(S>=65&&S<=70)return S-55;if(S>=97&&S<=102)return S-87;n(!1,"Invalid character in "+F)}function c(F,C,S){var T=a(F,S);return S-1>=C&&(T|=a(F,S-1)<<4),T}i.prototype._parseHex=function(C,S,T){this.length=Math.ceil((C.length-S)/6),this.words=new Array(this.length);for(var R=0;R=S;R-=2)B=c(C,S,R)<=18?(A-=18,N+=1,this.words[N]|=B>>>26):A+=8;else{var P=C.length-S;for(R=P%2===0?S+1:S;R=18?(A-=18,N+=1,this.words[N]|=B>>>26):A+=8}this._strip()};function l(F,C,S,T){for(var R=0,A=0,N=Math.min(F.length,S),B=C;B=49?A=P-49+10:P>=17?A=P-17+10:A=P,n(P>=0&&A1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch{i.prototype.inspect=u}else i.prototype.inspect=u;function u(){return(this.red?""}var d=["","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"],h=[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],v=[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];i.prototype.toString=function(C,S){C=C||10,S=S|0||1;var T;if(C===16||C==="hex"){T="";for(var R=0,A=0,N=0;N>>24-R&16777215,R+=2,R>=26&&(R-=26,N--),A!==0||N!==this.length-1?T=d[6-P.length]+P+T:T=P+T}for(A!==0&&(T=A.toString(16)+T);T.length%S!==0;)T="0"+T;return this.negative!==0&&(T="-"+T),T}if(C===(C|0)&&C>=2&&C<=36){var E=h[C],L=v[C];T="";var q=this.clone();for(q.negative=0;!q.isZero();){var _=q.modrn(L).toString(C);q=q.idivn(L),q.isZero()?T=_+T:T=d[E-_.length]+_+T}for(this.isZero()&&(T="0"+T);T.length%S!==0;)T="0"+T;return this.negative!==0&&(T="-"+T),T}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var C=this.words[0];return this.length===2?C+=this.words[1]*67108864:this.length===3&&this.words[2]===1?C+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-C:C},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(C,S){return this.toArrayLike(o,C,S)}),i.prototype.toArray=function(C,S){return this.toArrayLike(Array,C,S)};var y=function(C,S){return C.allocUnsafe?C.allocUnsafe(S):new C(S)};i.prototype.toArrayLike=function(C,S,T){this._strip();var R=this.byteLength(),A=T||Math.max(1,R);n(R<=A,"byte array longer than desired length"),n(A>0,"Requested array length <= 0");var N=y(C,A),B=S==="le"?"LE":"BE";return this["_toArrayLike"+B](N,R),N},i.prototype._toArrayLikeLE=function(C,S){for(var T=0,R=0,A=0,N=0;A>8&255),T>16&255),N===6?(T>24&255),R=0,N=0):(R=B>>>24,N+=2)}if(T=0&&(C[T--]=B>>8&255),T>=0&&(C[T--]=B>>16&255),N===6?(T>=0&&(C[T--]=B>>24&255),R=0,N=0):(R=B>>>24,N+=2)}if(T>=0)for(C[T--]=R;T>=0;)C[T--]=0},Math.clz32?i.prototype._countBits=function(C){return 32-Math.clz32(C)}:i.prototype._countBits=function(C){var S=C,T=0;return S>=4096&&(T+=13,S>>>=13),S>=64&&(T+=7,S>>>=7),S>=8&&(T+=4,S>>>=4),S>=2&&(T+=2,S>>>=2),T+S},i.prototype._zeroBits=function(C){if(C===0)return 26;var S=C,T=0;return S&8191||(T+=13,S>>>=13),S&127||(T+=7,S>>>=7),S&15||(T+=4,S>>>=4),S&3||(T+=2,S>>>=2),S&1||T++,T},i.prototype.bitLength=function(){var C=this.words[this.length-1],S=this._countBits(C);return(this.length-1)*26+S};function m(F){for(var C=new Array(F.bitLength()),S=0;S>>R&1}return C}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var C=0,S=0;SC.length?this.clone().ior(C):C.clone().ior(this)},i.prototype.uor=function(C){return this.length>C.length?this.clone().iuor(C):C.clone().iuor(this)},i.prototype.iuand=function(C){var S;this.length>C.length?S=C:S=this;for(var T=0;TC.length?this.clone().iand(C):C.clone().iand(this)},i.prototype.uand=function(C){return this.length>C.length?this.clone().iuand(C):C.clone().iuand(this)},i.prototype.iuxor=function(C){var S,T;this.length>C.length?(S=this,T=C):(S=C,T=this);for(var R=0;RC.length?this.clone().ixor(C):C.clone().ixor(this)},i.prototype.uxor=function(C){return this.length>C.length?this.clone().iuxor(C):C.clone().iuxor(this)},i.prototype.inotn=function(C){n(typeof C=="number"&&C>=0);var S=Math.ceil(C/26)|0,T=C%26;this._expand(S),T>0&&S--;for(var R=0;R0&&(this.words[R]=~this.words[R]&67108863>>26-T),this._strip()},i.prototype.notn=function(C){return this.clone().inotn(C)},i.prototype.setn=function(C,S){n(typeof C=="number"&&C>=0);var T=C/26|0,R=C%26;return this._expand(T+1),S?this.words[T]=this.words[T]|1<C.length?(T=this,R=C):(T=C,R=this);for(var A=0,N=0;N>>26;for(;A!==0&&N>>26;if(this.length=T.length,A!==0)this.words[this.length]=A,this.length++;else if(T!==this)for(;NC.length?this.clone().iadd(C):C.clone().iadd(this)},i.prototype.isub=function(C){if(C.negative!==0){C.negative=0;var S=this.iadd(C);return C.negative=1,S._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(C),this.negative=1,this._normSign();var T=this.cmp(C);if(T===0)return this.negative=0,this.length=1,this.words[0]=0,this;var R,A;T>0?(R=this,A=C):(R=C,A=this);for(var N=0,B=0;B>26,this.words[B]=S&67108863;for(;N!==0&&B>26,this.words[B]=S&67108863;if(N===0&&B>>26,q=P&67108863,_=Math.min(E,C.length-1),U=Math.max(0,E-F.length+1);U<=_;U++){var W=E-U|0;R=F.words[W]|0,A=C.words[U]|0,N=R*A+q,L+=N/67108864|0,q=N&67108863}S.words[E]=q|0,P=L|0}return P!==0?S.words[E]=P|0:S.length--,S._strip()}var b=function(C,S,T){var R=C.words,A=S.words,N=T.words,B=0,P,E,L,q=R[0]|0,_=q&8191,U=q>>>13,W=R[1]|0,J=W&8191,X=W>>>13,re=R[2]|0,ee=re&8191,se=re>>>13,xe=R[3]|0,de=xe&8191,pe=xe>>>13,$e=R[4]|0,Se=$e&8191,_e=$e>>>13,Ye=R[5]|0,it=Ye&8191,ze=Ye>>>13,_i=R[6]|0,Et=_i&8191,we=_i>>>13,nt=R[7]|0,Be=nt&8191,Qe=nt>>>13,Nt=R[8]|0,wt=Nt&8191,z=Nt>>>13,O=R[9]|0,j=O&8191,Y=O>>>13,te=A[0]|0,ie=te&8191,ce=te>>>13,Fe=A[1]|0,je=Fe&8191,Oe=Fe>>>13,$t=A[2]|0,Pe=$t&8191,Vt=$t>>>13,Fl=A[3]|0,Gt=Fl&8191,Kt=Fl>>>13,zl=A[4]|0,Yt=zl&8191,Qt=zl>>>13,ql=A[5]|0,Jt=ql&8191,Xt=ql>>>13,Ul=A[6]|0,Zt=Ul&8191,er=Ul>>>13,Wl=A[7]|0,tr=Wl&8191,rr=Wl>>>13,Hl=A[8]|0,nr=Hl&8191,sr=Hl>>>13,Vl=A[9]|0,ir=Vl&8191,or=Vl>>>13;T.negative=C.negative^S.negative,T.length=19,P=Math.imul(_,ie),E=Math.imul(_,ce),E=E+Math.imul(U,ie)|0,L=Math.imul(U,ce);var ic=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+(ic>>>26)|0,ic&=67108863,P=Math.imul(J,ie),E=Math.imul(J,ce),E=E+Math.imul(X,ie)|0,L=Math.imul(X,ce),P=P+Math.imul(_,je)|0,E=E+Math.imul(_,Oe)|0,E=E+Math.imul(U,je)|0,L=L+Math.imul(U,Oe)|0;var oc=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+(oc>>>26)|0,oc&=67108863,P=Math.imul(ee,ie),E=Math.imul(ee,ce),E=E+Math.imul(se,ie)|0,L=Math.imul(se,ce),P=P+Math.imul(J,je)|0,E=E+Math.imul(J,Oe)|0,E=E+Math.imul(X,je)|0,L=L+Math.imul(X,Oe)|0,P=P+Math.imul(_,Pe)|0,E=E+Math.imul(_,Vt)|0,E=E+Math.imul(U,Pe)|0,L=L+Math.imul(U,Vt)|0;var ac=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+(ac>>>26)|0,ac&=67108863,P=Math.imul(de,ie),E=Math.imul(de,ce),E=E+Math.imul(pe,ie)|0,L=Math.imul(pe,ce),P=P+Math.imul(ee,je)|0,E=E+Math.imul(ee,Oe)|0,E=E+Math.imul(se,je)|0,L=L+Math.imul(se,Oe)|0,P=P+Math.imul(J,Pe)|0,E=E+Math.imul(J,Vt)|0,E=E+Math.imul(X,Pe)|0,L=L+Math.imul(X,Vt)|0,P=P+Math.imul(_,Gt)|0,E=E+Math.imul(_,Kt)|0,E=E+Math.imul(U,Gt)|0,L=L+Math.imul(U,Kt)|0;var cc=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+(cc>>>26)|0,cc&=67108863,P=Math.imul(Se,ie),E=Math.imul(Se,ce),E=E+Math.imul(_e,ie)|0,L=Math.imul(_e,ce),P=P+Math.imul(de,je)|0,E=E+Math.imul(de,Oe)|0,E=E+Math.imul(pe,je)|0,L=L+Math.imul(pe,Oe)|0,P=P+Math.imul(ee,Pe)|0,E=E+Math.imul(ee,Vt)|0,E=E+Math.imul(se,Pe)|0,L=L+Math.imul(se,Vt)|0,P=P+Math.imul(J,Gt)|0,E=E+Math.imul(J,Kt)|0,E=E+Math.imul(X,Gt)|0,L=L+Math.imul(X,Kt)|0,P=P+Math.imul(_,Yt)|0,E=E+Math.imul(_,Qt)|0,E=E+Math.imul(U,Yt)|0,L=L+Math.imul(U,Qt)|0;var lc=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+(lc>>>26)|0,lc&=67108863,P=Math.imul(it,ie),E=Math.imul(it,ce),E=E+Math.imul(ze,ie)|0,L=Math.imul(ze,ce),P=P+Math.imul(Se,je)|0,E=E+Math.imul(Se,Oe)|0,E=E+Math.imul(_e,je)|0,L=L+Math.imul(_e,Oe)|0,P=P+Math.imul(de,Pe)|0,E=E+Math.imul(de,Vt)|0,E=E+Math.imul(pe,Pe)|0,L=L+Math.imul(pe,Vt)|0,P=P+Math.imul(ee,Gt)|0,E=E+Math.imul(ee,Kt)|0,E=E+Math.imul(se,Gt)|0,L=L+Math.imul(se,Kt)|0,P=P+Math.imul(J,Yt)|0,E=E+Math.imul(J,Qt)|0,E=E+Math.imul(X,Yt)|0,L=L+Math.imul(X,Qt)|0,P=P+Math.imul(_,Jt)|0,E=E+Math.imul(_,Xt)|0,E=E+Math.imul(U,Jt)|0,L=L+Math.imul(U,Xt)|0;var Cw=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+(Cw>>>26)|0,Cw&=67108863,P=Math.imul(Et,ie),E=Math.imul(Et,ce),E=E+Math.imul(we,ie)|0,L=Math.imul(we,ce),P=P+Math.imul(it,je)|0,E=E+Math.imul(it,Oe)|0,E=E+Math.imul(ze,je)|0,L=L+Math.imul(ze,Oe)|0,P=P+Math.imul(Se,Pe)|0,E=E+Math.imul(Se,Vt)|0,E=E+Math.imul(_e,Pe)|0,L=L+Math.imul(_e,Vt)|0,P=P+Math.imul(de,Gt)|0,E=E+Math.imul(de,Kt)|0,E=E+Math.imul(pe,Gt)|0,L=L+Math.imul(pe,Kt)|0,P=P+Math.imul(ee,Yt)|0,E=E+Math.imul(ee,Qt)|0,E=E+Math.imul(se,Yt)|0,L=L+Math.imul(se,Qt)|0,P=P+Math.imul(J,Jt)|0,E=E+Math.imul(J,Xt)|0,E=E+Math.imul(X,Jt)|0,L=L+Math.imul(X,Xt)|0,P=P+Math.imul(_,Zt)|0,E=E+Math.imul(_,er)|0,E=E+Math.imul(U,Zt)|0,L=L+Math.imul(U,er)|0;var Ew=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+(Ew>>>26)|0,Ew&=67108863,P=Math.imul(Be,ie),E=Math.imul(Be,ce),E=E+Math.imul(Qe,ie)|0,L=Math.imul(Qe,ce),P=P+Math.imul(Et,je)|0,E=E+Math.imul(Et,Oe)|0,E=E+Math.imul(we,je)|0,L=L+Math.imul(we,Oe)|0,P=P+Math.imul(it,Pe)|0,E=E+Math.imul(it,Vt)|0,E=E+Math.imul(ze,Pe)|0,L=L+Math.imul(ze,Vt)|0,P=P+Math.imul(Se,Gt)|0,E=E+Math.imul(Se,Kt)|0,E=E+Math.imul(_e,Gt)|0,L=L+Math.imul(_e,Kt)|0,P=P+Math.imul(de,Yt)|0,E=E+Math.imul(de,Qt)|0,E=E+Math.imul(pe,Yt)|0,L=L+Math.imul(pe,Qt)|0,P=P+Math.imul(ee,Jt)|0,E=E+Math.imul(ee,Xt)|0,E=E+Math.imul(se,Jt)|0,L=L+Math.imul(se,Xt)|0,P=P+Math.imul(J,Zt)|0,E=E+Math.imul(J,er)|0,E=E+Math.imul(X,Zt)|0,L=L+Math.imul(X,er)|0,P=P+Math.imul(_,tr)|0,E=E+Math.imul(_,rr)|0,E=E+Math.imul(U,tr)|0,L=L+Math.imul(U,rr)|0;var kw=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+(kw>>>26)|0,kw&=67108863,P=Math.imul(wt,ie),E=Math.imul(wt,ce),E=E+Math.imul(z,ie)|0,L=Math.imul(z,ce),P=P+Math.imul(Be,je)|0,E=E+Math.imul(Be,Oe)|0,E=E+Math.imul(Qe,je)|0,L=L+Math.imul(Qe,Oe)|0,P=P+Math.imul(Et,Pe)|0,E=E+Math.imul(Et,Vt)|0,E=E+Math.imul(we,Pe)|0,L=L+Math.imul(we,Vt)|0,P=P+Math.imul(it,Gt)|0,E=E+Math.imul(it,Kt)|0,E=E+Math.imul(ze,Gt)|0,L=L+Math.imul(ze,Kt)|0,P=P+Math.imul(Se,Yt)|0,E=E+Math.imul(Se,Qt)|0,E=E+Math.imul(_e,Yt)|0,L=L+Math.imul(_e,Qt)|0,P=P+Math.imul(de,Jt)|0,E=E+Math.imul(de,Xt)|0,E=E+Math.imul(pe,Jt)|0,L=L+Math.imul(pe,Xt)|0,P=P+Math.imul(ee,Zt)|0,E=E+Math.imul(ee,er)|0,E=E+Math.imul(se,Zt)|0,L=L+Math.imul(se,er)|0,P=P+Math.imul(J,tr)|0,E=E+Math.imul(J,rr)|0,E=E+Math.imul(X,tr)|0,L=L+Math.imul(X,rr)|0,P=P+Math.imul(_,nr)|0,E=E+Math.imul(_,sr)|0,E=E+Math.imul(U,nr)|0,L=L+Math.imul(U,sr)|0;var Sw=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+(Sw>>>26)|0,Sw&=67108863,P=Math.imul(j,ie),E=Math.imul(j,ce),E=E+Math.imul(Y,ie)|0,L=Math.imul(Y,ce),P=P+Math.imul(wt,je)|0,E=E+Math.imul(wt,Oe)|0,E=E+Math.imul(z,je)|0,L=L+Math.imul(z,Oe)|0,P=P+Math.imul(Be,Pe)|0,E=E+Math.imul(Be,Vt)|0,E=E+Math.imul(Qe,Pe)|0,L=L+Math.imul(Qe,Vt)|0,P=P+Math.imul(Et,Gt)|0,E=E+Math.imul(Et,Kt)|0,E=E+Math.imul(we,Gt)|0,L=L+Math.imul(we,Kt)|0,P=P+Math.imul(it,Yt)|0,E=E+Math.imul(it,Qt)|0,E=E+Math.imul(ze,Yt)|0,L=L+Math.imul(ze,Qt)|0,P=P+Math.imul(Se,Jt)|0,E=E+Math.imul(Se,Xt)|0,E=E+Math.imul(_e,Jt)|0,L=L+Math.imul(_e,Xt)|0,P=P+Math.imul(de,Zt)|0,E=E+Math.imul(de,er)|0,E=E+Math.imul(pe,Zt)|0,L=L+Math.imul(pe,er)|0,P=P+Math.imul(ee,tr)|0,E=E+Math.imul(ee,rr)|0,E=E+Math.imul(se,tr)|0,L=L+Math.imul(se,rr)|0,P=P+Math.imul(J,nr)|0,E=E+Math.imul(J,sr)|0,E=E+Math.imul(X,nr)|0,L=L+Math.imul(X,sr)|0,P=P+Math.imul(_,ir)|0,E=E+Math.imul(_,or)|0,E=E+Math.imul(U,ir)|0,L=L+Math.imul(U,or)|0;var Aw=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+(Aw>>>26)|0,Aw&=67108863,P=Math.imul(j,je),E=Math.imul(j,Oe),E=E+Math.imul(Y,je)|0,L=Math.imul(Y,Oe),P=P+Math.imul(wt,Pe)|0,E=E+Math.imul(wt,Vt)|0,E=E+Math.imul(z,Pe)|0,L=L+Math.imul(z,Vt)|0,P=P+Math.imul(Be,Gt)|0,E=E+Math.imul(Be,Kt)|0,E=E+Math.imul(Qe,Gt)|0,L=L+Math.imul(Qe,Kt)|0,P=P+Math.imul(Et,Yt)|0,E=E+Math.imul(Et,Qt)|0,E=E+Math.imul(we,Yt)|0,L=L+Math.imul(we,Qt)|0,P=P+Math.imul(it,Jt)|0,E=E+Math.imul(it,Xt)|0,E=E+Math.imul(ze,Jt)|0,L=L+Math.imul(ze,Xt)|0,P=P+Math.imul(Se,Zt)|0,E=E+Math.imul(Se,er)|0,E=E+Math.imul(_e,Zt)|0,L=L+Math.imul(_e,er)|0,P=P+Math.imul(de,tr)|0,E=E+Math.imul(de,rr)|0,E=E+Math.imul(pe,tr)|0,L=L+Math.imul(pe,rr)|0,P=P+Math.imul(ee,nr)|0,E=E+Math.imul(ee,sr)|0,E=E+Math.imul(se,nr)|0,L=L+Math.imul(se,sr)|0,P=P+Math.imul(J,ir)|0,E=E+Math.imul(J,or)|0,E=E+Math.imul(X,ir)|0,L=L+Math.imul(X,or)|0;var $w=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+($w>>>26)|0,$w&=67108863,P=Math.imul(j,Pe),E=Math.imul(j,Vt),E=E+Math.imul(Y,Pe)|0,L=Math.imul(Y,Vt),P=P+Math.imul(wt,Gt)|0,E=E+Math.imul(wt,Kt)|0,E=E+Math.imul(z,Gt)|0,L=L+Math.imul(z,Kt)|0,P=P+Math.imul(Be,Yt)|0,E=E+Math.imul(Be,Qt)|0,E=E+Math.imul(Qe,Yt)|0,L=L+Math.imul(Qe,Qt)|0,P=P+Math.imul(Et,Jt)|0,E=E+Math.imul(Et,Xt)|0,E=E+Math.imul(we,Jt)|0,L=L+Math.imul(we,Xt)|0,P=P+Math.imul(it,Zt)|0,E=E+Math.imul(it,er)|0,E=E+Math.imul(ze,Zt)|0,L=L+Math.imul(ze,er)|0,P=P+Math.imul(Se,tr)|0,E=E+Math.imul(Se,rr)|0,E=E+Math.imul(_e,tr)|0,L=L+Math.imul(_e,rr)|0,P=P+Math.imul(de,nr)|0,E=E+Math.imul(de,sr)|0,E=E+Math.imul(pe,nr)|0,L=L+Math.imul(pe,sr)|0,P=P+Math.imul(ee,ir)|0,E=E+Math.imul(ee,or)|0,E=E+Math.imul(se,ir)|0,L=L+Math.imul(se,or)|0;var _w=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+(_w>>>26)|0,_w&=67108863,P=Math.imul(j,Gt),E=Math.imul(j,Kt),E=E+Math.imul(Y,Gt)|0,L=Math.imul(Y,Kt),P=P+Math.imul(wt,Yt)|0,E=E+Math.imul(wt,Qt)|0,E=E+Math.imul(z,Yt)|0,L=L+Math.imul(z,Qt)|0,P=P+Math.imul(Be,Jt)|0,E=E+Math.imul(Be,Xt)|0,E=E+Math.imul(Qe,Jt)|0,L=L+Math.imul(Qe,Xt)|0,P=P+Math.imul(Et,Zt)|0,E=E+Math.imul(Et,er)|0,E=E+Math.imul(we,Zt)|0,L=L+Math.imul(we,er)|0,P=P+Math.imul(it,tr)|0,E=E+Math.imul(it,rr)|0,E=E+Math.imul(ze,tr)|0,L=L+Math.imul(ze,rr)|0,P=P+Math.imul(Se,nr)|0,E=E+Math.imul(Se,sr)|0,E=E+Math.imul(_e,nr)|0,L=L+Math.imul(_e,sr)|0,P=P+Math.imul(de,ir)|0,E=E+Math.imul(de,or)|0,E=E+Math.imul(pe,ir)|0,L=L+Math.imul(pe,or)|0;var Pw=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+(Pw>>>26)|0,Pw&=67108863,P=Math.imul(j,Yt),E=Math.imul(j,Qt),E=E+Math.imul(Y,Yt)|0,L=Math.imul(Y,Qt),P=P+Math.imul(wt,Jt)|0,E=E+Math.imul(wt,Xt)|0,E=E+Math.imul(z,Jt)|0,L=L+Math.imul(z,Xt)|0,P=P+Math.imul(Be,Zt)|0,E=E+Math.imul(Be,er)|0,E=E+Math.imul(Qe,Zt)|0,L=L+Math.imul(Qe,er)|0,P=P+Math.imul(Et,tr)|0,E=E+Math.imul(Et,rr)|0,E=E+Math.imul(we,tr)|0,L=L+Math.imul(we,rr)|0,P=P+Math.imul(it,nr)|0,E=E+Math.imul(it,sr)|0,E=E+Math.imul(ze,nr)|0,L=L+Math.imul(ze,sr)|0,P=P+Math.imul(Se,ir)|0,E=E+Math.imul(Se,or)|0,E=E+Math.imul(_e,ir)|0,L=L+Math.imul(_e,or)|0;var Iw=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+(Iw>>>26)|0,Iw&=67108863,P=Math.imul(j,Jt),E=Math.imul(j,Xt),E=E+Math.imul(Y,Jt)|0,L=Math.imul(Y,Xt),P=P+Math.imul(wt,Zt)|0,E=E+Math.imul(wt,er)|0,E=E+Math.imul(z,Zt)|0,L=L+Math.imul(z,er)|0,P=P+Math.imul(Be,tr)|0,E=E+Math.imul(Be,rr)|0,E=E+Math.imul(Qe,tr)|0,L=L+Math.imul(Qe,rr)|0,P=P+Math.imul(Et,nr)|0,E=E+Math.imul(Et,sr)|0,E=E+Math.imul(we,nr)|0,L=L+Math.imul(we,sr)|0,P=P+Math.imul(it,ir)|0,E=E+Math.imul(it,or)|0,E=E+Math.imul(ze,ir)|0,L=L+Math.imul(ze,or)|0;var Tw=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+(Tw>>>26)|0,Tw&=67108863,P=Math.imul(j,Zt),E=Math.imul(j,er),E=E+Math.imul(Y,Zt)|0,L=Math.imul(Y,er),P=P+Math.imul(wt,tr)|0,E=E+Math.imul(wt,rr)|0,E=E+Math.imul(z,tr)|0,L=L+Math.imul(z,rr)|0,P=P+Math.imul(Be,nr)|0,E=E+Math.imul(Be,sr)|0,E=E+Math.imul(Qe,nr)|0,L=L+Math.imul(Qe,sr)|0,P=P+Math.imul(Et,ir)|0,E=E+Math.imul(Et,or)|0,E=E+Math.imul(we,ir)|0,L=L+Math.imul(we,or)|0;var Ow=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+(Ow>>>26)|0,Ow&=67108863,P=Math.imul(j,tr),E=Math.imul(j,rr),E=E+Math.imul(Y,tr)|0,L=Math.imul(Y,rr),P=P+Math.imul(wt,nr)|0,E=E+Math.imul(wt,sr)|0,E=E+Math.imul(z,nr)|0,L=L+Math.imul(z,sr)|0,P=P+Math.imul(Be,ir)|0,E=E+Math.imul(Be,or)|0,E=E+Math.imul(Qe,ir)|0,L=L+Math.imul(Qe,or)|0;var Rw=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+(Rw>>>26)|0,Rw&=67108863,P=Math.imul(j,nr),E=Math.imul(j,sr),E=E+Math.imul(Y,nr)|0,L=Math.imul(Y,sr),P=P+Math.imul(wt,ir)|0,E=E+Math.imul(wt,or)|0,E=E+Math.imul(z,ir)|0,L=L+Math.imul(z,or)|0;var Mw=(B+P|0)+((E&8191)<<13)|0;B=(L+(E>>>13)|0)+(Mw>>>26)|0,Mw&=67108863,P=Math.imul(j,ir),E=Math.imul(j,or),E=E+Math.imul(Y,ir)|0,L=Math.imul(Y,or);var Nw=(B+P|0)+((E&8191)<<13)|0;return B=(L+(E>>>13)|0)+(Nw>>>26)|0,Nw&=67108863,N[0]=ic,N[1]=oc,N[2]=ac,N[3]=cc,N[4]=lc,N[5]=Cw,N[6]=Ew,N[7]=kw,N[8]=Sw,N[9]=Aw,N[10]=$w,N[11]=_w,N[12]=Pw,N[13]=Iw,N[14]=Tw,N[15]=Ow,N[16]=Rw,N[17]=Mw,N[18]=Nw,B!==0&&(N[19]=B,T.length++),T};Math.imul||(b=g);function x(F,C,S){S.negative=C.negative^F.negative,S.length=F.length+C.length;for(var T=0,R=0,A=0;A>>26)|0,R+=N>>>26,N&=67108863}S.words[A]=B,T=N,N=R}return T!==0?S.words[A]=T:S.length--,S._strip()}function k(F,C,S){return x(F,C,S)}i.prototype.mulTo=function(C,S){var T,R=this.length+C.length;return this.length===10&&C.length===10?T=b(this,C,S):R<63?T=g(this,C,S):R<1024?T=x(this,C,S):T=k(this,C,S),T},i.prototype.mul=function(C){var S=new i(null);return S.words=new Array(this.length+C.length),this.mulTo(C,S)},i.prototype.mulf=function(C){var S=new i(null);return S.words=new Array(this.length+C.length),k(this,C,S)},i.prototype.imul=function(C){return this.clone().mulTo(C,this)},i.prototype.imuln=function(C){var S=C<0;S&&(C=-C),n(typeof C=="number"),n(C<67108864);for(var T=0,R=0;R>=26,T+=A/67108864|0,T+=N>>>26,this.words[R]=N&67108863}return T!==0&&(this.words[R]=T,this.length++),S?this.ineg():this},i.prototype.muln=function(C){return this.clone().imuln(C)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(C){var S=m(C);if(S.length===0)return new i(1);for(var T=this,R=0;R=0);var S=C%26,T=(C-S)/26,R=67108863>>>26-S<<26-S,A;if(S!==0){var N=0;for(A=0;A>>26-S}N&&(this.words[A]=N,this.length++)}if(T!==0){for(A=this.length-1;A>=0;A--)this.words[A+T]=this.words[A];for(A=0;A=0);var R;S?R=(S-S%26)/26:R=0;var A=C%26,N=Math.min((C-A)/26,this.length),B=67108863^67108863>>>A<N)for(this.length-=N,E=0;E=0&&(L!==0||E>=R);E--){var q=this.words[E]|0;this.words[E]=L<<26-A|q>>>A,L=q&B}return P&&L!==0&&(P.words[P.length++]=L),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(C,S,T){return n(this.negative===0),this.iushrn(C,S,T)},i.prototype.shln=function(C){return this.clone().ishln(C)},i.prototype.ushln=function(C){return this.clone().iushln(C)},i.prototype.shrn=function(C){return this.clone().ishrn(C)},i.prototype.ushrn=function(C){return this.clone().iushrn(C)},i.prototype.testn=function(C){n(typeof C=="number"&&C>=0);var S=C%26,T=(C-S)/26,R=1<=0);var S=C%26,T=(C-S)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=T)return this;if(S!==0&&T++,this.length=Math.min(T,this.length),S!==0){var R=67108863^67108863>>>S<=67108864;S++)this.words[S]-=67108864,S===this.length-1?this.words[S+1]=1:this.words[S+1]++;return this.length=Math.max(this.length,S+1),this},i.prototype.isubn=function(C){if(n(typeof C=="number"),n(C<67108864),C<0)return this.iaddn(-C);if(this.negative!==0)return this.negative=0,this.iaddn(C),this.negative=1,this;if(this.words[0]-=C,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var S=0;S>26)-(P/67108864|0),this.words[A+T]=N&67108863}for(;A>26,this.words[A+T]=N&67108863;if(B===0)return this._strip();for(n(B===-1),B=0,A=0;A>26,this.words[A]=N&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(C,S){var T=this.length-C.length,R=this.clone(),A=C,N=A.words[A.length-1]|0,B=this._countBits(N);T=26-B,T!==0&&(A=A.ushln(T),R.iushln(T),N=A.words[A.length-1]|0);var P=R.length-A.length,E;if(S!=="mod"){E=new i(null),E.length=P+1,E.words=new Array(E.length);for(var L=0;L=0;_--){var U=(R.words[A.length+_]|0)*67108864+(R.words[A.length+_-1]|0);for(U=Math.min(U/N|0,67108863),R._ishlnsubmul(A,U,_);R.negative!==0;)U--,R.negative=0,R._ishlnsubmul(A,1,_),R.isZero()||(R.negative^=1);E&&(E.words[_]=U)}return E&&E._strip(),R._strip(),S!=="div"&&T!==0&&R.iushrn(T),{div:E||null,mod:R}},i.prototype.divmod=function(C,S,T){if(n(!C.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var R,A,N;return this.negative!==0&&C.negative===0?(N=this.neg().divmod(C,S),S!=="mod"&&(R=N.div.neg()),S!=="div"&&(A=N.mod.neg(),T&&A.negative!==0&&A.iadd(C)),{div:R,mod:A}):this.negative===0&&C.negative!==0?(N=this.divmod(C.neg(),S),S!=="mod"&&(R=N.div.neg()),{div:R,mod:N.mod}):this.negative&C.negative?(N=this.neg().divmod(C.neg(),S),S!=="div"&&(A=N.mod.neg(),T&&A.negative!==0&&A.isub(C)),{div:N.div,mod:A}):C.length>this.length||this.cmp(C)<0?{div:new i(0),mod:this}:C.length===1?S==="div"?{div:this.divn(C.words[0]),mod:null}:S==="mod"?{div:null,mod:new i(this.modrn(C.words[0]))}:{div:this.divn(C.words[0]),mod:new i(this.modrn(C.words[0]))}:this._wordDiv(C,S)},i.prototype.div=function(C){return this.divmod(C,"div",!1).div},i.prototype.mod=function(C){return this.divmod(C,"mod",!1).mod},i.prototype.umod=function(C){return this.divmod(C,"mod",!0).mod},i.prototype.divRound=function(C){var S=this.divmod(C);if(S.mod.isZero())return S.div;var T=S.div.negative!==0?S.mod.isub(C):S.mod,R=C.ushrn(1),A=C.andln(1),N=T.cmp(R);return N<0||A===1&&N===0?S.div:S.div.negative!==0?S.div.isubn(1):S.div.iaddn(1)},i.prototype.modrn=function(C){var S=C<0;S&&(C=-C),n(C<=67108863);for(var T=(1<<26)%C,R=0,A=this.length-1;A>=0;A--)R=(T*R+(this.words[A]|0))%C;return S?-R:R},i.prototype.modn=function(C){return this.modrn(C)},i.prototype.idivn=function(C){var S=C<0;S&&(C=-C),n(C<=67108863);for(var T=0,R=this.length-1;R>=0;R--){var A=(this.words[R]|0)+T*67108864;this.words[R]=A/C|0,T=A%C}return this._strip(),S?this.ineg():this},i.prototype.divn=function(C){return this.clone().idivn(C)},i.prototype.egcd=function(C){n(C.negative===0),n(!C.isZero());var S=this,T=C.clone();S.negative!==0?S=S.umod(C):S=S.clone();for(var R=new i(1),A=new i(0),N=new i(0),B=new i(1),P=0;S.isEven()&&T.isEven();)S.iushrn(1),T.iushrn(1),++P;for(var E=T.clone(),L=S.clone();!S.isZero();){for(var q=0,_=1;!(S.words[0]&_)&&q<26;++q,_<<=1);if(q>0)for(S.iushrn(q);q-- >0;)(R.isOdd()||A.isOdd())&&(R.iadd(E),A.isub(L)),R.iushrn(1),A.iushrn(1);for(var U=0,W=1;!(T.words[0]&W)&&U<26;++U,W<<=1);if(U>0)for(T.iushrn(U);U-- >0;)(N.isOdd()||B.isOdd())&&(N.iadd(E),B.isub(L)),N.iushrn(1),B.iushrn(1);S.cmp(T)>=0?(S.isub(T),R.isub(N),A.isub(B)):(T.isub(S),N.isub(R),B.isub(A))}return{a:N,b:B,gcd:T.iushln(P)}},i.prototype._invmp=function(C){n(C.negative===0),n(!C.isZero());var S=this,T=C.clone();S.negative!==0?S=S.umod(C):S=S.clone();for(var R=new i(1),A=new i(0),N=T.clone();S.cmpn(1)>0&&T.cmpn(1)>0;){for(var B=0,P=1;!(S.words[0]&P)&&B<26;++B,P<<=1);if(B>0)for(S.iushrn(B);B-- >0;)R.isOdd()&&R.iadd(N),R.iushrn(1);for(var E=0,L=1;!(T.words[0]&L)&&E<26;++E,L<<=1);if(E>0)for(T.iushrn(E);E-- >0;)A.isOdd()&&A.iadd(N),A.iushrn(1);S.cmp(T)>=0?(S.isub(T),R.isub(A)):(T.isub(S),A.isub(R))}var q;return S.cmpn(1)===0?q=R:q=A,q.cmpn(0)<0&&q.iadd(C),q},i.prototype.gcd=function(C){if(this.isZero())return C.abs();if(C.isZero())return this.abs();var S=this.clone(),T=C.clone();S.negative=0,T.negative=0;for(var R=0;S.isEven()&&T.isEven();R++)S.iushrn(1),T.iushrn(1);do{for(;S.isEven();)S.iushrn(1);for(;T.isEven();)T.iushrn(1);var A=S.cmp(T);if(A<0){var N=S;S=T,T=N}else if(A===0||T.cmpn(1)===0)break;S.isub(T)}while(!0);return T.iushln(R)},i.prototype.invm=function(C){return this.egcd(C).a.umod(C)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(C){return this.words[0]&C},i.prototype.bincn=function(C){n(typeof C=="number");var S=C%26,T=(C-S)/26,R=1<>>26,B&=67108863,this.words[N]=B}return A!==0&&(this.words[N]=A,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(C){var S=C<0;if(this.negative!==0&&!S)return-1;if(this.negative===0&&S)return 1;this._strip();var T;if(this.length>1)T=1;else{S&&(C=-C),n(C<=67108863,"Number is too big");var R=this.words[0]|0;T=R===C?0:RC.length)return 1;if(this.length=0;T--){var R=this.words[T]|0,A=C.words[T]|0;if(R!==A){RA&&(S=1);break}}return S},i.prototype.gtn=function(C){return this.cmpn(C)===1},i.prototype.gt=function(C){return this.cmp(C)===1},i.prototype.gten=function(C){return this.cmpn(C)>=0},i.prototype.gte=function(C){return this.cmp(C)>=0},i.prototype.ltn=function(C){return this.cmpn(C)===-1},i.prototype.lt=function(C){return this.cmp(C)===-1},i.prototype.lten=function(C){return this.cmpn(C)<=0},i.prototype.lte=function(C){return this.cmp(C)<=0},i.prototype.eqn=function(C){return this.cmpn(C)===0},i.prototype.eq=function(C){return this.cmp(C)===0},i.red=function(C){return new V(C)},i.prototype.toRed=function(C){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),C.convertTo(this)._forceRed(C)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(C){return this.red=C,this},i.prototype.forceRed=function(C){return n(!this.red,"Already a number in reduction context"),this._forceRed(C)},i.prototype.redAdd=function(C){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,C)},i.prototype.redIAdd=function(C){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,C)},i.prototype.redSub=function(C){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,C)},i.prototype.redISub=function(C){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,C)},i.prototype.redShl=function(C){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,C)},i.prototype.redMul=function(C){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,C),this.red.mul(this,C)},i.prototype.redIMul=function(C){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,C),this.red.imul(this,C)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(C){return n(this.red&&!C.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,C)};var $={k256:null,p224:null,p192:null,p25519:null};function I(F,C){this.name=F,this.p=new i(C,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}I.prototype._tmp=function(){var C=new i(null);return C.words=new Array(Math.ceil(this.n/13)),C},I.prototype.ireduce=function(C){var S=C,T;do this.split(S,this.tmp),S=this.imulK(S),S=S.iadd(this.tmp),T=S.bitLength();while(T>this.n);var R=T0?S.isub(this.p):S.strip!==void 0?S.strip():S._strip(),S},I.prototype.split=function(C,S){C.iushrn(this.n,0,S)},I.prototype.imulK=function(C){return C.imul(this.k)};function M(){I.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(M,I),M.prototype.split=function(C,S){for(var T=4194303,R=Math.min(C.length,9),A=0;A>>22,N=B}N>>>=22,C.words[A-10]=N,N===0&&C.length>10?C.length-=10:C.length-=9},M.prototype.imulK=function(C){C.words[C.length]=0,C.words[C.length+1]=0,C.length+=2;for(var S=0,T=0;T>>=26,C.words[T]=A,S=R}return S!==0&&(C.words[C.length++]=S),C},i._prime=function(C){if($[C])return $[C];var S;if(C==="k256")S=new M;else if(C==="p224")S=new D;else if(C==="p192")S=new H;else if(C==="p25519")S=new G;else throw new Error("Unknown prime "+C);return $[C]=S,S};function V(F){if(typeof F=="string"){var C=i._prime(F);this.m=C.p,this.prime=C}else n(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}V.prototype._verify1=function(C){n(C.negative===0,"red works only with positives"),n(C.red,"red works only with red numbers")},V.prototype._verify2=function(C,S){n((C.negative|S.negative)===0,"red works only with positives"),n(C.red&&C.red===S.red,"red works only with red numbers")},V.prototype.imod=function(C){return this.prime?this.prime.ireduce(C)._forceRed(this):(f(C,C.umod(this.m)._forceRed(this)),C)},V.prototype.neg=function(C){return C.isZero()?C.clone():this.m.sub(C)._forceRed(this)},V.prototype.add=function(C,S){this._verify2(C,S);var T=C.add(S);return T.cmp(this.m)>=0&&T.isub(this.m),T._forceRed(this)},V.prototype.iadd=function(C,S){this._verify2(C,S);var T=C.iadd(S);return T.cmp(this.m)>=0&&T.isub(this.m),T},V.prototype.sub=function(C,S){this._verify2(C,S);var T=C.sub(S);return T.cmpn(0)<0&&T.iadd(this.m),T._forceRed(this)},V.prototype.isub=function(C,S){this._verify2(C,S);var T=C.isub(S);return T.cmpn(0)<0&&T.iadd(this.m),T},V.prototype.shl=function(C,S){return this._verify1(C),this.imod(C.ushln(S))},V.prototype.imul=function(C,S){return this._verify2(C,S),this.imod(C.imul(S))},V.prototype.mul=function(C,S){return this._verify2(C,S),this.imod(C.mul(S))},V.prototype.isqr=function(C){return this.imul(C,C.clone())},V.prototype.sqr=function(C){return this.mul(C,C)},V.prototype.sqrt=function(C){if(C.isZero())return C.clone();var S=this.m.andln(3);if(n(S%2===1),S===3){var T=this.m.add(new i(1)).iushrn(2);return this.pow(C,T)}for(var R=this.m.subn(1),A=0;!R.isZero()&&R.andln(1)===0;)A++,R.iushrn(1);n(!R.isZero());var N=new i(1).toRed(this),B=N.redNeg(),P=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new i(2*E*E).toRed(this);this.pow(E,P).cmp(B)!==0;)E.redIAdd(B);for(var L=this.pow(E,R),q=this.pow(C,R.addn(1).iushrn(1)),_=this.pow(C,R),U=A;_.cmp(N)!==0;){for(var W=_,J=0;W.cmp(N)!==0;J++)W=W.redSqr();n(J=0;A--){for(var L=S.words[A],q=E-1;q>=0;q--){var _=L>>q&1;if(N!==R[0]&&(N=this.sqr(N)),_===0&&B===0){P=0;continue}B<<=1,B|=_,P++,!(P!==T&&(A!==0||q!==0))&&(N=this.mul(N,R[B]),P=0,B=0)}E=26}return N},V.prototype.convertTo=function(C){var S=C.umod(this.m);return S===C?S.clone():S},V.prototype.convertFrom=function(C){var S=C.clone();return S.red=null,S},i.mont=function(C){return new Q(C)};function Q(F){V.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}s(Q,V),Q.prototype.convertTo=function(C){return this.imod(C.ushln(this.shift))},Q.prototype.convertFrom=function(C){var S=this.imod(C.mul(this.rinv));return S.red=null,S},Q.prototype.imul=function(C,S){if(C.isZero()||S.isZero())return C.words[0]=0,C.length=1,C;var T=C.imul(S),R=T.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=T.isub(R).iushrn(this.shift),N=A;return A.cmp(this.m)>=0?N=A.isub(this.m):A.cmpn(0)<0&&(N=A.iadd(this.m)),N._forceRed(this)},Q.prototype.mul=function(C,S){if(C.isZero()||S.isZero())return new i(0)._forceRed(this);var T=C.mul(S),R=T.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),A=T.isub(R).iushrn(this.shift),N=A;return A.cmp(this.m)>=0?N=A.isub(this.m):A.cmpn(0)<0&&(N=A.iadd(this.m)),N._forceRed(this)},Q.prototype.invm=function(C){var S=this.imod(C._invmp(this.m).mul(this.r2));return S._forceRed(this)}})(t,ks)})(x4);var PZ=x4.exports;const Ge=Fs(PZ),IZ="logger/5.7.0";let BA=!1,FA=!1;const hm={debug:1,default:2,info:2,warning:3,error:4,off:5};let zA=hm.default,l5=null;function TZ(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if("é".normalize("NFD")!=="é")throw new Error("broken implementation")}catch(t){return t.message}return null}const qA=TZ();var wg;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(wg||(wg={}));var Js;(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"})(Js||(Js={}));const UA="0123456789abcdef";let oe=class Yr{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();hm[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(zA>hm[n])&&console.log.apply(console,r)}debug(...e){this._log(Yr.levels.DEBUG,e)}info(...e){this._log(Yr.levels.INFO,e)}warn(...e){this._log(Yr.levels.WARNING,e)}makeError(e,r,n){if(FA)return this.makeError("censored error",r,{});r||(r=Yr.errors.UNKNOWN_ERROR),n||(n={});const s=[];Object.keys(n).forEach(c=>{const l=n[c];try{if(l instanceof Uint8Array){let f="";for(let u=0;u>4],f+=UA[l[u]&15];s.push(c+"=Uint8Array(0x"+f+")")}else s.push(c+"="+JSON.stringify(l))}catch{s.push(c+"="+JSON.stringify(n[c].toString()))}}),s.push(`code=${r}`),s.push(`version=${this.version}`);const i=e;let o="";switch(r){case Js.NUMERIC_FAULT:{o="NUMERIC_FAULT";const c=e;switch(c){case"overflow":case"underflow":case"division-by-zero":o+="-"+c;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case Js.CALL_EXCEPTION:case Js.INSUFFICIENT_FUNDS:case Js.MISSING_NEW:case Js.NONCE_EXPIRED:case Js.REPLACEMENT_UNDERPRICED:case Js.TRANSACTION_REPLACED:case Js.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),s.length&&(e+=" ("+s.join(", ")+")");const a=new Error(e);return a.reason=i,a.code=r,Object.keys(n).forEach(function(c){a[c]=n[c]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,Yr.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,s){e||this.throwError(r,n,s)}assertArgument(e,r,n,s){e||this.throwArgumentError(r,n,s)}checkNormalize(e){qA&&this.throwError("platform missing String.prototype.normalize",Yr.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:qA})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,Yr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,Yr.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,Yr.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",Yr.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",Yr.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",Yr.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return l5||(l5=new Yr(IZ)),l5}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",Yr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),BA){if(!e)return;this.globalLogger().throwError("error censorship permanent",Yr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}FA=!!e,BA=!!r}static setLogLevel(e){const r=hm[e.toLowerCase()];if(r==null){Yr.globalLogger().warn("invalid log level - "+e);return}zA=r}static from(e){return new Yr(e)}};oe.errors=Js;oe.levels=wg;const OZ=Object.freeze(Object.defineProperty({__proto__:null,get ErrorCode(){return Js},get LogLevel(){return wg},Logger:oe},Symbol.toStringTag,{value:"Module"})),RZ="bytes/5.7.0",kr=new oe(RZ);function QN(t){return!!t.toHexString}function Cd(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return Cd(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function Ji(t){return Ke(t)&&!(t.length%2)||Ga(t)}function WA(t){return typeof t=="number"&&t==t&&t%1===0}function Ga(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!WA(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function ue(t,e){if(e||(e={}),typeof t=="number"){kr.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),Cd(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),QN(t)&&(t=t.toHexString()),Ke(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":kr.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let s=0;sue(s)),r=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(r);return e.reduce((s,i)=>(n.set(i,s),s+i.length),0),Cd(n)}function Gi(t){let e=ue(t);if(e.length===0)return e;let r=0;for(;re&&kr.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),Cd(r)}function Ke(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const f5="0123456789abcdef";function le(t,e){if(e||(e={}),typeof t=="number"){kr.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=f5[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),QN(t))return t.toHexString();if(Ke(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":kr.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Ga(t)){let r="0x";for(let n=0;n>4]+f5[s&15]}return r}return kr.throwArgumentError("invalid hexlify value","value",t)}function Xi(t){if(typeof t!="string")t=le(t);else if(!Ke(t)||t.length%2)return null;return(t.length-2)/2}function fr(t,e,r){return typeof t!="string"?t=le(t):(!Ke(t)||t.length%2)&&kr.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function In(t){let e="0x";return t.forEach(r=>{e+=le(r).substring(2)}),e}function ui(t){const e=C4(le(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function C4(t){typeof t!="string"&&(t=le(t)),Ke(t)||kr.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&kr.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function Pl(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(Ji(t)){let r=ue(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=le(r.slice(0,32)),e.s=le(r.slice(32,64))):r.length===65?(e.r=le(r.slice(0,32)),e.s=le(r.slice(32,64)),e.v=r[64]):kr.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:kr.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=le(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 s=Ed(ue(e._vs),32);e._vs=le(s);const i=s[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=i:e.recoveryParam!==i&&kr.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),s[0]&=127;const o=le(s);e.s==null?e.s=o:e.s!==o&&kr.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?kr.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 s=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==s&&kr.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Ke(e.r)?kr.throwArgumentError("signature missing or invalid r","signature",t):e.r=Rt(e.r,32),e.s==null||!Ke(e.s)?kr.throwArgumentError("signature missing or invalid s","signature",t):e.s=Rt(e.s,32);const r=ue(e.s);r[0]>=128&&kr.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=le(r);e._vs&&(Ke(e._vs)||kr.throwArgumentError("signature invalid _vs","signature",t),e._vs=Rt(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&kr.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Cg(t){return t=Pl(t),le(Tt([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const MZ=Object.freeze(Object.defineProperty({__proto__:null,arrayify:ue,concat:Tt,hexConcat:In,hexDataLength:Xi,hexDataSlice:fr,hexStripZeros:C4,hexValue:ui,hexZeroPad:Rt,hexlify:le,isBytes:Ga,isBytesLike:Ji,isHexString:Ke,joinSignature:Cg,splitSignature:Pl,stripZeros:Gi,zeroPad:Ed},Symbol.toStringTag,{value:"Module"})),JN="bignumber/5.7.0";var V0=Ge.BN;const Xo=new oe(JN),u5={},HA=9007199254740991;function NZ(t){return t!=null&&(ne.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Ke(t)||typeof t=="bigint"||Ga(t))}let VA=!1;class ne{constructor(e,r){e!==u5&&Xo.throwError("cannot call constructor directly; use BigNumber.from",oe.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return ts(ct(this).fromTwos(e))}toTwos(e){return ts(ct(this).toTwos(e))}abs(){return this._hex[0]==="-"?ne.from(this._hex.substring(1)):this}add(e){return ts(ct(this).add(ct(e)))}sub(e){return ts(ct(this).sub(ct(e)))}div(e){return ne.from(e).isZero()&&Ks("division-by-zero","div"),ts(ct(this).div(ct(e)))}mul(e){return ts(ct(this).mul(ct(e)))}mod(e){const r=ct(e);return r.isNeg()&&Ks("division-by-zero","mod"),ts(ct(this).umod(r))}pow(e){const r=ct(e);return r.isNeg()&&Ks("negative-power","pow"),ts(ct(this).pow(r))}and(e){const r=ct(e);return(this.isNegative()||r.isNeg())&&Ks("unbound-bitwise-result","and"),ts(ct(this).and(r))}or(e){const r=ct(e);return(this.isNegative()||r.isNeg())&&Ks("unbound-bitwise-result","or"),ts(ct(this).or(r))}xor(e){const r=ct(e);return(this.isNegative()||r.isNeg())&&Ks("unbound-bitwise-result","xor"),ts(ct(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&Ks("negative-width","mask"),ts(ct(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Ks("negative-width","shl"),ts(ct(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Ks("negative-width","shr"),ts(ct(this).shrn(e))}eq(e){return ct(this).eq(ct(e))}lt(e){return ct(this).lt(ct(e))}lte(e){return ct(this).lte(ct(e))}gt(e){return ct(this).gt(ct(e))}gte(e){return ct(this).gte(ct(e))}isNegative(){return this._hex[0]==="-"}isZero(){return ct(this).isZero()}toNumber(){try{return ct(this).toNumber()}catch{Ks("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Xo.throwError("this platform does not support BigInt",oe.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?VA||(VA=!0,Xo.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Xo.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",oe.errors.UNEXPECTED_ARGUMENT,{}):Xo.throwError("BigNumber.toString does not accept parameters",oe.errors.UNEXPECTED_ARGUMENT,{})),ct(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof ne)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new ne(u5,G0(e)):e.match(/^-?[0-9]+$/)?new ne(u5,G0(new V0(e))):Xo.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Ks("underflow","BigNumber.from",e),(e>=HA||e<=-HA)&&Ks("overflow","BigNumber.from",e),ne.from(String(e));const r=e;if(typeof r=="bigint")return ne.from(r.toString());if(Ga(r))return ne.from(le(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return ne.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(Ke(n)||n[0]==="-"&&Ke(n.substring(1))))return ne.from(n)}return Xo.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function G0(t){if(typeof t!="string")return G0(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Xo.throwArgumentError("invalid hex","value",t),t=G0(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 ts(t){return ne.from(G0(t))}function ct(t){const e=ne.from(t).toHexString();return e[0]==="-"?new V0("-"+e.substring(3),16):new V0(e.substring(2),16)}function Ks(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Xo.throwError(t,oe.errors.NUMERIC_FAULT,n)}function jZ(t){return new V0(t,36).toString(16)}function DZ(t){return new V0(t,16).toString(36)}const Gn=new oe(JN),i0={},XN=ne.from(0),ZN=ne.from(-1);function ej(t,e,r,n){const s={fault:e,operation:r};return n!==void 0&&(s.value=n),Gn.throwError(t,oe.errors.NUMERIC_FAULT,s)}let o0="0";for(;o0.length<256;)o0+=o0;function E4(t){if(typeof t!="number")try{t=ne.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+o0.substring(0,t):Gn.throwArgumentError("invalid decimal size","decimals",t)}function vm(t,e){e==null&&(e=0);const r=E4(e);t=ne.from(t);const n=t.lt(XN);n&&(t=t.mul(ZN));let s=t.mod(r).toString();for(;s.length2&&Gn.throwArgumentError("too many decimal points","value",t);let i=s[0],o=s[1];for(i||(i="0"),o||(o="0");o[o.length-1]==="0";)o=o.substring(0,o.length-1);for(o.length>r.length-1&&ej("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?c:(typeof e[o]!==a&&Gn.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);r=i("signed","boolean",r),n=i("width","number",n),s=i("decimals","number",s)}return n%8&&Gn.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),s>80&&Gn.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",s),new kd(i0,r,n,s)}}class fn{constructor(e,r,n,s){e!==i0&&Gn.throwError("cannot use FixedNumber constructor; use FixedNumber.from",oe.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=s,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Gn.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=fo(this._value,this.format.decimals),n=fo(e._value,e.format.decimals);return fn.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=fo(this._value,this.format.decimals),n=fo(e._value,e.format.decimals);return fn.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=fo(this._value,this.format.decimals),n=fo(e._value,e.format.decimals);return fn.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=fo(this._value,this.format.decimals),n=fo(e._value,e.format.decimals);return fn.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=fn.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(GA.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=fn.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(GA.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)&&Gn.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=fn.from("1"+o0.substring(0,e),this.format),s=LZ.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(s).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&&Gn.throwArgumentError("invalid byte width","width",e);const r=ne.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return Rt(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return fn.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!NZ(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),fn.fromString(vm(e,r),kd.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=kd.from(r),s=fo(e,n.decimals);!n.signed&&s.lt(XN)&&ej("unsigned value cannot be negative","overflow","value",e);let i=null;n.signed?i=s.toTwos(n.width).toHexString():(i=s.toHexString(),i=Rt(i,n.width/8));const o=vm(s,n.decimals);return new fn(i0,i,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=kd.from(r);if(ue(e).length>n.width/8)throw new Error("overflow");let s=ne.from(e);n.signed&&(s=s.fromTwos(n.width));const i=s.toTwos((n.signed?0:1)+n.width).toHexString(),o=vm(s,n.decimals);return new fn(i0,i,o,n)}static from(e,r){if(typeof e=="string")return fn.fromString(e,r);if(Ga(e))return fn.fromBytes(e,r);try{return fn.fromValue(e,0,r)}catch(n){if(n.code!==oe.errors.INVALID_ARGUMENT)throw n}return Gn.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const GA=fn.from(1),LZ=fn.from("0.5"),BZ="properties/5.7.0";var FZ=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{l(n.next(f))}catch(u){o(u)}}function c(f){try{l(n.throw(f))}catch(u){o(u)}}function l(f){f.done?i(f.value):s(f.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const Eg=new oe(BZ);function ve(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function li(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 Mt(t){return FZ(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const s=t[n];return Promise.resolve(s).then(i=>({key:n,value:i}))});return(yield Promise.all(e)).reduce((n,s)=>(n[s.key]=s.value,n),{})})}function w2(t,e){(!t||typeof t!="object")&&Eg.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||Eg.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function Ht(t){const e={};for(const r in t)e[r]=t[r];return e}const zZ={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function tj(t){if(t==null||zZ[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;rvs(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&ve(e,r,vs(n))}return e}return Eg.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function vs(t){return qZ(t)}class Il{constructor(e){for(const r in e)this[r]=vs(e[r])}}const UZ=Object.freeze(Object.defineProperty({__proto__:null,Description:Il,checkProperties:w2,deepCopy:vs,defineReadOnly:ve,getStatic:li,resolveProperties:Mt,shallowCopy:Ht},Symbol.toStringTag,{value:"Module"})),Xv="abi/5.7.0",dt=new oe(Xv),Mf={};let KA={calldata:!0,memory:!0,storage:!0},WZ={calldata:!0,memory:!0};function op(t,e){if(t==="bytes"||t==="string"){if(KA[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&WZ[e])return!0;return(KA[e]||e==="payable")&&dt.throwArgumentError("invalid modifier","name",e),!1}function HZ(t,e){let r=t;function n(a){dt.throwArgumentError(`unexpected character at position ${a}`,"param",t)}t=t.replace(/\s/g," ");function s(a){let c={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(c.indexed=!1),c}let i={type:"",name:"",state:{allowType:!0}},o=i;for(let a=0;aJSON.parse(s.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!==yt.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===yt.full?", ":",")+")"):r+=this.type,e!==yt.sighash&&(this.indexed===!0&&(r+=" indexed"),e===yt.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?Vr.fromString(e,r):Vr.fromObject(e)}static fromObject(e){return Vr.isParamType(e)?e:new Vr(Mf,{name:e.name||null,type:zu(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(Vr.fromObject):null})}static fromString(e,r){function n(s){return Vr.fromObject({name:s.name,type:s.type,indexed:s.indexed,components:s.components})}return n(HZ(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function K0(t,e){return KZ(t).map(r=>Vr.fromString(r,e))}class qi{constructor(e,r){e!==Mf&&dt.throwError("use a static from method",oe.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),ym(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return qi.isFragment(e)?e:typeof e=="string"?qi.fromString(e):qi.fromObject(e)}static fromObject(e){if(qi.isFragment(e))return e;switch(e.type){case"function":return si.fromObject(e);case"event":return zi.fromObject(e);case"constructor":return ni.fromObject(e);case"error":return Co.fromObject(e);case"fallback":case"receive":return null}return dt.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"?zi.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?si.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?ni.fromString(e.trim()):e.split(" ")[0]==="error"?Co.fromString(e.substring(5).trim()):dt.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class zi extends qi{format(e){if(e||(e=yt.sighash),yt[e]||dt.throwArgumentError("invalid format type","format",e),e===yt.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!==yt.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===yt.full?", ":",")+") ",e!==yt.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?zi.fromString(e):zi.fromObject(e)}static fromObject(e){if(zi.isEventFragment(e))return e;e.type!=="event"&&dt.throwArgumentError("invalid event object","value",e);const r={name:Y0(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(Vr.fromObject):[],type:"event"};return new zi(Mf,r)}static fromString(e){let r=e.match(Q0);r||dt.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(s=>{switch(s.trim()){case"anonymous":n=!0;break;case"":break;default:dt.warn("unknown modifier: "+s)}}),zi.fromObject({name:r[1].trim(),anonymous:n,inputs:K0(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function rj(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&dt.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||dt.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=ne.from(r[1]),r[0]):t}function nj(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 sj(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&&dt.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&dt.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"&&dt.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&&dt.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"&&dt.throwArgumentError("unable to determine stateMutability","value",t),e}class ni extends qi{format(e){if(e||(e=yt.sighash),yt[e]||dt.throwArgumentError("invalid format type","format",e),e===yt.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===yt.sighash&&dt.throwError("cannot format a constructor for sighash",oe.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===yt.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?ni.fromString(e):ni.fromObject(e)}static fromObject(e){if(ni.isConstructorFragment(e))return e;e.type!=="constructor"&&dt.throwArgumentError("invalid constructor object","value",e);let r=sj(e);r.constant&&dt.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(Vr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?ne.from(e.gas):null};return new ni(Mf,n)}static fromString(e){let r={type:"constructor"};e=rj(e,r);let n=e.match(Q0);return(!n||n[1].trim()!=="constructor")&&dt.throwArgumentError("invalid constructor string","value",e),r.inputs=K0(n[2].trim(),!1),nj(n[3].trim(),r),ni.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class si extends ni{format(e){if(e||(e=yt.sighash),yt[e]||dt.throwArgumentError("invalid format type","format",e),e===yt.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!==yt.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===yt.full?", ":",")+") ",e!==yt.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"?si.fromString(e):si.fromObject(e)}static fromObject(e){if(si.isFunctionFragment(e))return e;e.type!=="function"&&dt.throwArgumentError("invalid function object","value",e);let r=sj(e);const n={type:e.type,name:Y0(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(Vr.fromObject):[],outputs:e.outputs?e.outputs.map(Vr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?ne.from(e.gas):null};return new si(Mf,n)}static fromString(e){let r={type:"function"};e=rj(e,r);let n=e.split(" returns ");n.length>2&&dt.throwArgumentError("invalid function string","value",e);let s=n[0].match(Q0);if(s||dt.throwArgumentError("invalid function signature","value",e),r.name=s[1].trim(),r.name&&Y0(r.name),r.inputs=K0(s[2],!1),nj(s[3].trim(),r),n.length>1){let i=n[1].match(Q0);(i[1].trim()!=""||i[3].trim()!="")&&dt.throwArgumentError("unexpected tokens","value",e),r.outputs=K0(i[2],!1)}else r.outputs=[];return si.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function YA(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&dt.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Co extends qi{format(e){if(e||(e=yt.sighash),yt[e]||dt.throwArgumentError("invalid format type","format",e),e===yt.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==yt.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===yt.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?Co.fromString(e):Co.fromObject(e)}static fromObject(e){if(Co.isErrorFragment(e))return e;e.type!=="error"&&dt.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:Y0(e.name),inputs:e.inputs?e.inputs.map(Vr.fromObject):[]};return YA(new Co(Mf,r))}static fromString(e){let r={type:"error"},n=e.match(Q0);return n||dt.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&Y0(r.name),r.inputs=K0(n[2],!1),YA(Co.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function zu(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const GZ=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Y0(t){return(!t||!t.match(GZ))&&dt.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const Q0=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function KZ(t){t=t.trim();let e=[],r="",n=0;for(let s=0;sthis.wordSize&&k4.throwError("value out-of-bounds",oe.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=Tt([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 kg{constructor(e,r,n,s){ve(this,"_data",ue(e)),ve(this,"wordSize",r||32),ve(this,"_coerceFunc",n),ve(this,"allowLoose",s),this._offset=0}get data(){return le(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):kg.coerce(e,r)}_peekBytes(e,r,n){let s=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+s>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?s=r:k4.throwError("data out-of-bounds",oe.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+s})),this._data.slice(this._offset,this._offset+s)}subReader(e){return new kg(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 ne.from(this.readBytes(this.wordSize))}}function YZ(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ij={exports:{}},zr=ij.exports={},vo,yo;function zC(){throw new Error("setTimeout has not been defined")}function qC(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?vo=setTimeout:vo=zC}catch{vo=zC}try{typeof clearTimeout=="function"?yo=clearTimeout:yo=qC}catch{yo=qC}})();function oj(t){if(vo===setTimeout)return setTimeout(t,0);if((vo===zC||!vo)&&setTimeout)return vo=setTimeout,setTimeout(t,0);try{return vo(t,0)}catch{try{return vo.call(null,t,0)}catch{return vo.call(this,t,0)}}}function QZ(t){if(yo===clearTimeout)return clearTimeout(t);if((yo===qC||!yo)&&clearTimeout)return yo=clearTimeout,clearTimeout(t);try{return yo(t)}catch{try{return yo.call(null,t)}catch{return yo.call(this,t)}}}var la=[],Sd=!1,vf,pm=-1;function JZ(){!Sd||!vf||(Sd=!1,vf.length?la=vf.concat(la):pm=-1,la.length&&aj())}function aj(){if(!Sd){var t=oj(JZ);Sd=!0;for(var e=la.length;e;){for(vf=la,la=[];++pm1)for(var r=1;r>5,this.byteCount=this.blockCount<<2,this.outputBlocks=W>>5,this.extraBytes=(W&31)>>3;for(var J=0;J<50;++J)this.s[J]=0}E.prototype.update=function(_){if(this.finalized)throw new Error(r);var U,W=typeof _;if(W!=="string"){if(W==="object"){if(_===null)throw new Error(e);if(c&&_.constructor===ArrayBuffer)_=new Uint8Array(_);else if(!Array.isArray(_)&&(!c||!ArrayBuffer.isView(_)))throw new Error(e)}else throw new Error(e);U=!0}for(var J=this.blocks,X=this.byteCount,re=_.length,ee=this.blockCount,se=0,xe=this.s,de,pe;se>2]|=_[se]<>2]|=pe<>2]|=(192|pe>>6)<>2]|=(128|pe&63)<=57344?(J[de>>2]|=(224|pe>>12)<>2]|=(128|pe>>6&63)<>2]|=(128|pe&63)<>2]|=(240|pe>>18)<>2]|=(128|pe>>12&63)<>2]|=(128|pe>>6&63)<>2]|=(128|pe&63)<=X){for(this.start=de-X,this.block=J[ee],de=0;de>8,W=_&255;W>0;)X.unshift(W),_=_>>8,W=_&255,++J;return U?X.push(J):X.unshift(J),this.update(X),X.length},E.prototype.encodeString=function(_){var U,W=typeof _;if(W!=="string"){if(W==="object"){if(_===null)throw new Error(e);if(c&&_.constructor===ArrayBuffer)_=new Uint8Array(_);else if(!Array.isArray(_)&&(!c||!ArrayBuffer.isView(_)))throw new Error(e)}else throw new Error(e);U=!0}var J=0,X=_.length;if(U)J=X;else for(var re=0;re<_.length;++re){var ee=_.charCodeAt(re);ee<128?J+=1:ee<2048?J+=2:ee<55296||ee>=57344?J+=3:(ee=65536+((ee&1023)<<10|_.charCodeAt(++re)&1023),J+=4)}return J+=this.encode(J*8),this.update(_),J},E.prototype.bytepad=function(_,U){for(var W=this.encode(U),J=0;J<_.length;++J)W+=this.encodeString(_[J]);var X=U-W%U,re=[];return re.length=X,this.update(re),this},E.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var _=this.blocks,U=this.lastByteIndex,W=this.blockCount,J=this.s;if(_[U>>2]|=this.padding[U&3],this.lastByteIndex===this.byteCount)for(_[0]=_[W],U=1;U>4&15]+l[se&15]+l[se>>12&15]+l[se>>8&15]+l[se>>20&15]+l[se>>16&15]+l[se>>28&15]+l[se>>24&15];re%_===0&&(q(U),X=0)}return J&&(se=U[X],ee+=l[se>>4&15]+l[se&15],J>1&&(ee+=l[se>>12&15]+l[se>>8&15]),J>2&&(ee+=l[se>>20&15]+l[se>>16&15])),ee},E.prototype.arrayBuffer=function(){this.finalize();var _=this.blockCount,U=this.s,W=this.outputBlocks,J=this.extraBytes,X=0,re=0,ee=this.outputBits>>3,se;J?se=new ArrayBuffer(W+1<<2):se=new ArrayBuffer(ee);for(var xe=new Uint32Array(se);re>8&255,ee[se+2]=xe>>16&255,ee[se+3]=xe>>24&255;re%_===0&&q(U)}return J&&(se=re<<2,xe=U[X],ee[se]=xe&255,J>1&&(ee[se+1]=xe>>8&255),J>2&&(ee[se+2]=xe>>16&255)),ee};function L(_,U,W){E.call(this,_,U,W)}L.prototype=new E,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),E.prototype.finalize.call(this)};var q=function(_){var U,W,J,X,re,ee,se,xe,de,pe,$e,Se,_e,Ye,it,ze,_i,Et,we,nt,Be,Qe,Nt,wt,z,O,j,Y,te,ie,ce,Fe,je,Oe,$t,Pe,Vt,Fl,Gt,Kt,zl,Yt,Qt,ql,Jt,Xt,Ul,Zt,er,Wl,tr,rr,Hl,nr,sr,Vl,ir,or,ic,oc,ac,cc,lc;for(J=0;J<48;J+=2)X=_[0]^_[10]^_[20]^_[30]^_[40],re=_[1]^_[11]^_[21]^_[31]^_[41],ee=_[2]^_[12]^_[22]^_[32]^_[42],se=_[3]^_[13]^_[23]^_[33]^_[43],xe=_[4]^_[14]^_[24]^_[34]^_[44],de=_[5]^_[15]^_[25]^_[35]^_[45],pe=_[6]^_[16]^_[26]^_[36]^_[46],$e=_[7]^_[17]^_[27]^_[37]^_[47],Se=_[8]^_[18]^_[28]^_[38]^_[48],_e=_[9]^_[19]^_[29]^_[39]^_[49],U=Se^(ee<<1|se>>>31),W=_e^(se<<1|ee>>>31),_[0]^=U,_[1]^=W,_[10]^=U,_[11]^=W,_[20]^=U,_[21]^=W,_[30]^=U,_[31]^=W,_[40]^=U,_[41]^=W,U=X^(xe<<1|de>>>31),W=re^(de<<1|xe>>>31),_[2]^=U,_[3]^=W,_[12]^=U,_[13]^=W,_[22]^=U,_[23]^=W,_[32]^=U,_[33]^=W,_[42]^=U,_[43]^=W,U=ee^(pe<<1|$e>>>31),W=se^($e<<1|pe>>>31),_[4]^=U,_[5]^=W,_[14]^=U,_[15]^=W,_[24]^=U,_[25]^=W,_[34]^=U,_[35]^=W,_[44]^=U,_[45]^=W,U=xe^(Se<<1|_e>>>31),W=de^(_e<<1|Se>>>31),_[6]^=U,_[7]^=W,_[16]^=U,_[17]^=W,_[26]^=U,_[27]^=W,_[36]^=U,_[37]^=W,_[46]^=U,_[47]^=W,U=pe^(X<<1|re>>>31),W=$e^(re<<1|X>>>31),_[8]^=U,_[9]^=W,_[18]^=U,_[19]^=W,_[28]^=U,_[29]^=W,_[38]^=U,_[39]^=W,_[48]^=U,_[49]^=W,Ye=_[0],it=_[1],Xt=_[11]<<4|_[10]>>>28,Ul=_[10]<<4|_[11]>>>28,Y=_[20]<<3|_[21]>>>29,te=_[21]<<3|_[20]>>>29,oc=_[31]<<9|_[30]>>>23,ac=_[30]<<9|_[31]>>>23,Yt=_[40]<<18|_[41]>>>14,Qt=_[41]<<18|_[40]>>>14,Oe=_[2]<<1|_[3]>>>31,$t=_[3]<<1|_[2]>>>31,ze=_[13]<<12|_[12]>>>20,_i=_[12]<<12|_[13]>>>20,Zt=_[22]<<10|_[23]>>>22,er=_[23]<<10|_[22]>>>22,ie=_[33]<<13|_[32]>>>19,ce=_[32]<<13|_[33]>>>19,cc=_[42]<<2|_[43]>>>30,lc=_[43]<<2|_[42]>>>30,nr=_[5]<<30|_[4]>>>2,sr=_[4]<<30|_[5]>>>2,Pe=_[14]<<6|_[15]>>>26,Vt=_[15]<<6|_[14]>>>26,Et=_[25]<<11|_[24]>>>21,we=_[24]<<11|_[25]>>>21,Wl=_[34]<<15|_[35]>>>17,tr=_[35]<<15|_[34]>>>17,Fe=_[45]<<29|_[44]>>>3,je=_[44]<<29|_[45]>>>3,wt=_[6]<<28|_[7]>>>4,z=_[7]<<28|_[6]>>>4,Vl=_[17]<<23|_[16]>>>9,ir=_[16]<<23|_[17]>>>9,Fl=_[26]<<25|_[27]>>>7,Gt=_[27]<<25|_[26]>>>7,nt=_[36]<<21|_[37]>>>11,Be=_[37]<<21|_[36]>>>11,rr=_[47]<<24|_[46]>>>8,Hl=_[46]<<24|_[47]>>>8,ql=_[8]<<27|_[9]>>>5,Jt=_[9]<<27|_[8]>>>5,O=_[18]<<20|_[19]>>>12,j=_[19]<<20|_[18]>>>12,or=_[29]<<7|_[28]>>>25,ic=_[28]<<7|_[29]>>>25,Kt=_[38]<<8|_[39]>>>24,zl=_[39]<<8|_[38]>>>24,Qe=_[48]<<14|_[49]>>>18,Nt=_[49]<<14|_[48]>>>18,_[0]=Ye^~ze&Et,_[1]=it^~_i&we,_[10]=wt^~O&Y,_[11]=z^~j&te,_[20]=Oe^~Pe&Fl,_[21]=$t^~Vt&Gt,_[30]=ql^~Xt&Zt,_[31]=Jt^~Ul&er,_[40]=nr^~Vl&or,_[41]=sr^~ir&ic,_[2]=ze^~Et&nt,_[3]=_i^~we&Be,_[12]=O^~Y&ie,_[13]=j^~te&ce,_[22]=Pe^~Fl&Kt,_[23]=Vt^~Gt&zl,_[32]=Xt^~Zt&Wl,_[33]=Ul^~er&tr,_[42]=Vl^~or&oc,_[43]=ir^~ic&ac,_[4]=Et^~nt&Qe,_[5]=we^~Be&Nt,_[14]=Y^~ie&Fe,_[15]=te^~ce&je,_[24]=Fl^~Kt&Yt,_[25]=Gt^~zl&Qt,_[34]=Zt^~Wl&rr,_[35]=er^~tr&Hl,_[44]=or^~oc&cc,_[45]=ic^~ac&lc,_[6]=nt^~Qe&Ye,_[7]=Be^~Nt&it,_[16]=ie^~Fe&wt,_[17]=ce^~je&z,_[26]=Kt^~Yt&Oe,_[27]=zl^~Qt&$t,_[36]=Wl^~rr&ql,_[37]=tr^~Hl&Jt,_[46]=oc^~cc&nr,_[47]=ac^~lc&sr,_[8]=Qe^~Ye&ze,_[9]=Nt^~it&_i,_[18]=Fe^~wt&O,_[19]=je^~z&j,_[28]=Yt^~Oe&Pe,_[29]=Qt^~$t&Vt,_[38]=rr^~ql&Xt,_[39]=Hl^~Jt&Ul,_[48]=cc^~nr&Vl,_[49]=lc^~sr&ir,_[0]^=y[J],_[1]^=y[J+1]};if(a)t.exports=C;else for(T=0;T>=8;return e}function JA(t,e,r){let n=0;for(let s=0;se+1+n&&po.throwError("child data too short",oe.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:s}}function uj(t,e){if(t.length===0&&po.throwError("data too short",oe.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&po.throwError("data short segment too short",oe.errors.BUFFER_OVERRUN,{});const n=JA(t,e+1,r);return e+1+r+n>t.length&&po.throwError("data long segment too short",oe.errors.BUFFER_OVERRUN,{}),XA(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&po.throwError("data array too short",oe.errors.BUFFER_OVERRUN,{}),XA(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&po.throwError("data array too short",oe.errors.BUFFER_OVERRUN,{});const n=JA(t,e+1,r);e+1+r+n>t.length&&po.throwError("data array too short",oe.errors.BUFFER_OVERRUN,{});const s=le(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:s}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&po.throwError("data too short",oe.errors.BUFFER_OVERRUN,{});const n=le(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:le(t[e])}}function C2(t){const e=ue(t),r=uj(e,0);return r.consumed!==e.length&&po.throwArgumentError("invalid rlp data","data",t),r.result}const dj=Object.freeze(Object.defineProperty({__proto__:null,decode:C2,encode:Nf},Symbol.toStringTag,{value:"Module"})),nee="address/5.7.0",Oc=new oe(nee);function ZA(t){Ke(t,20)||Oc.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let s=0;s<40;s++)r[s]=e[s].charCodeAt(0);const n=ue(Ne(r));for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&(e[s]=e[s].toUpperCase()),(n[s>>1]&15)>=8&&(e[s+1]=e[s+1].toUpperCase());return"0x"+e.join("")}const see=9007199254740991;function iee(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const A4={};for(let t=0;t<10;t++)A4[String(t)]=String(t);for(let t=0;t<26;t++)A4[String.fromCharCode(65+t)]=String(10+t);const e$=Math.floor(iee(see));function hj(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>A4[n]).join("");for(;e.length>=e$;){let n=e.substring(0,e$);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 He(t){let e=null;if(typeof t!="string"&&Oc.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=ZA(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Oc.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)!==hj(t)&&Oc.throwArgumentError("bad icap checksum","address",t),e=jZ(t.substring(4));e.length<40;)e="0"+e;e=ZA("0x"+e)}else Oc.throwArgumentError("invalid address","address",t);return e}function $4(t){try{return He(t),!0}catch{}return!1}function vj(t){let e=DZ(He(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+hj("XE00"+e)+e}function E2(t){let e=null;try{e=He(t.from)}catch{Oc.throwArgumentError("missing from address","transaction",t)}const r=Gi(ue(ne.from(t.nonce).toHexString()));return He(fr(Ne(Nf([e,r])),12))}function yj(t,e,r){return Xi(e)!==32&&Oc.throwArgumentError("salt must be 32 bytes","salt",e),Xi(r)!==32&&Oc.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),He(fr(Ne(Tt(["0xff",He(t),e,r])),12))}const oee=Object.freeze(Object.defineProperty({__proto__:null,getAddress:He,getContractAddress:E2,getCreate2Address:yj,getIcapAddress:vj,isAddress:$4},Symbol.toStringTag,{value:"Module"}));class aee extends Ka{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=He(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return He(Rt(e.readValue().toHexString(),20))}}class cee extends Ka{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 od=new oe(Xv);function pj(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let c={};n=e.map(l=>{const f=l.localName;return f||od.throwError("cannot encode object for signature with missing names",oe.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),c[f]&&od.throwError("cannot encode object for signature with duplicate names",oe.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),c[f]=!0,r[f]})}else od.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&od.throwArgumentError("types/value length mismatch","tuple",r);let s=new FC(t.wordSize),i=new FC(t.wordSize),o=[];e.forEach((c,l)=>{let f=n[l];if(c.dynamic){let u=i.length;c.encode(i,f);let d=s.writeUpdatableValue();o.push(h=>{d(h+u)})}else c.encode(s,f)}),o.forEach(c=>{c(s.length)});let a=t.appendWriter(s);return a+=t.appendWriter(i),a}function mj(t,e){let r=[],n=t.subReader(0);e.forEach(i=>{let o=null;if(i.dynamic){let a=t.readValue(),c=n.subReader(a.toNumber());try{o=i.decode(c)}catch(l){if(l.code===oe.errors.BUFFER_OVERRUN)throw l;o=l,o.baseType=i.name,o.name=i.localName,o.type=i.type}}else try{o=i.decode(t)}catch(a){if(a.code===oe.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=i.name,o.name=i.localName,o.type=i.type}o!=null&&r.push(o)});const s=e.reduce((i,o)=>{const a=o.localName;return a&&(i[a]||(i[a]=0),i[a]++),i},{});e.forEach((i,o)=>{let a=i.localName;if(!a||s[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;const c=r[o];c instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw c}}):r[a]=c});for(let i=0;i{throw o}})}return Object.freeze(r)}class lee extends Ka{constructor(e,r,n){const s=e.type+"["+(r>=0?r:"")+"]",i=r===-1||e.dynamic;super("array",s,n,i),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&od.throwError("insufficient data length",oe.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let s=0;s>6===2;o++)i++;return i}return t===Vn.OVERRUN?r.length-e-1:0}function bee(t,e,r,n,s){return t===Vn.OVERLONG?(n.push(s),0):(n.push(65533),Cj(t,e,r))}const _4=Object.freeze({error:gee,ignore:Cj,replace:bee});function P4(t,e){e==null&&(e=_4.error),t=ue(t);const r=[];let n=0;for(;n>7)){r.push(s);continue}let i=null,o=null;if((s&224)===192)i=1,o=127;else if((s&240)===224)i=2,o=2047;else if((s&248)===240)i=3,o=65535;else{(s&192)===128?n+=e(Vn.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Vn.BAD_PREFIX,n-1,t,r);continue}if(n-1+i>=t.length){n+=e(Vn.OVERRUN,n-1,t,r);continue}let a=s&(1<<8-i-1)-1;for(let c=0;c1114111){n+=e(Vn.OUT_OF_RANGE,n-1-i,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(Vn.UTF16_SURROGATE,n-1-i,t,r,a);continue}if(a<=o){n+=e(Vn.OVERLONG,n-1-i,t,r,a);continue}r.push(a)}}return r}function _t(t,e=Zi.current){e!=Zi.current&&(wj.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(s&63|128);else if((s&64512)==55296){n++;const i=t.charCodeAt(n);if(n>=t.length||(i&64512)!==56320)throw new Error("invalid utf-8 string");const o=65536+((s&1023)<<10)+(i&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(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128)}return ue(r)}function d5(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function Ej(t,e){return'"'+P4(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?d5(r):(r-=65536,d5((r>>10&1023)+55296)+d5((r&1023)+56320))}).join("")+'"'}function UC(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Ei(t,e){return UC(P4(t,e))}function J0(t,e=Zi.current){return P4(_t(t,e))}function kj(t){const e=_t(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return le(Tt([e,Sg]).slice(0,32))}function Sj(t){const e=ue(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 Ei(e.slice(0,r))}function xee(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let i=s.split(":");r+=parseInt(i[0],16),n[r]=e(i[1])}),n}function Aj(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 s=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:s,h:e}})}function T4(t,e){let r=0;for(let n=0;n=r&&t<=r+s.h&&(t-r)%(s.d||1)===0){if(s.e&&s.e.indexOf(t-r)!==-1)continue;return s}}return null}const wee=Aj("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"),Cee="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),Eee=[{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}],kee=I4("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"),See=I4("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"),Aee=I4("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",xee),$ee=Aj("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 _ee(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function Pee(t){return!!T4(t,wee)}function Iee(t){let e=T4(t,Eee);if(e)return[t+e.s];let r=kee[t];if(r)return r;let n=See[t];if(n)return[t+n[0]];let s=Aee[t];return s||null}function Tee(t){return!!T4(t,$ee)}function $j(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=J0(t);e=_ee(e.map(n=>{if(Cee.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let s=Iee(n);return s||[n]})),e=J0(UC(e),Zi.NFKC),e.forEach(n=>{if(Tee(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(Pee(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=UC(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}const Oee=Object.freeze(Object.defineProperty({__proto__:null,get UnicodeNormalizationForm(){return Zi},Utf8ErrorFuncs:_4,get Utf8ErrorReason(){return Vn},_toEscapedUtf8String:Ej,formatBytes32String:kj,nameprep:$j,parseBytes32String:Sj,toUtf8Bytes:_t,toUtf8CodePoints:J0,toUtf8String:Ei},Symbol.toStringTag,{value:"Module"}));class Ree extends gj{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,_t(r))}decode(e){return Ei(super.decode(e))}}class ap extends Ka{constructor(e,r){let n=!1;const s=[];e.forEach(o=>{o.dynamic&&(n=!0),s.push(o.type)});const i="tuple("+s.join(",")+")";super("tuple",i,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,s)=>{const i=s.localName;return i&&(n[i]||(n[i]=0),n[i]++),n},{});return this.coders.forEach((n,s)=>{let i=n.localName;!i||r[i]!==1||(i==="length"&&(i="_length"),e[i]==null&&(e[i]=e[s]))}),Object.freeze(e)}encode(e,r){return pj(e,this.coders,r)}decode(e){return e.coerce(this.name,mj(e,this.coders))}}const cp=new oe(Xv),Mee=new RegExp(/^bytes([0-9]*)$/),Nee=new RegExp(/^(u?int)([0-9]*)$/);class k2{constructor(e){ve(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new aee(e.name);case"bool":return new fee(e.name);case"string":return new Ree(e.name);case"bytes":return new uee(e.name);case"array":return new lee(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new ap((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new hee(e.name)}let r=e.type.match(Nee);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&cp.throwArgumentError("invalid "+r[1]+" bit length","param",e),new pee(n/8,r[1]==="int",e.name)}if(r=e.type.match(Mee),r){let n=parseInt(r[1]);return(n===0||n>32)&&cp.throwArgumentError("invalid bytes length","param",e),new dee(n,e.name)}return cp.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new kg(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new FC(this._getWordSize())}getDefaultValue(e){const r=e.map(s=>this._getCoder(Vr.from(s)));return new ap(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&cp.throwError("types/values length mismatch",oe.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(Vr.from(o))),s=new ap(n,"_"),i=this._getWriter();return s.encode(i,r),i.data}decode(e,r,n){const s=e.map(o=>this._getCoder(Vr.from(o)));return new ap(s,"_").decode(this._getReader(ue(r),n))}}const Dn=new k2;function fa(t){return Ne(_t(t))}const _j="hash/5.7.0";function O4(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(a)?s(a,o-1):r.push(a)})};return s(t,e),r}function jee(t){const e={};for(let r=0;r>--c&1}const u=31,d=Math.pow(2,u),h=d>>>1,v=h>>1,y=d-1;let m=0;for(let $=0;$1;){let G=I+M>>>1;$>>1|f(),D=D<<1^h,H=(H^h)<<1|h|1;b=D,x=1+H-D}let k=n-4;return g.map($=>{switch($-k){case 3:return k+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return k+256+(t[a++]<<8|t[a++]);case 1:return k+t[a++];default:return $-1}})}function Lee(t){let e=0;return()=>t[e++]}function Bee(t){return Lee(Dee(t))}function Fee(t){return t&1?~t>>1:t>>1}function zee(t,e){let r=Array(t);for(let n=0;ne[o]):r}function Uee(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(Hee(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(Vee(r,t))}return jee(Ij(e))}function Wee(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function Tj(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let s=0;sn[o].push(i));return n}function Hee(t,e){let r=1+e(),n=e(),s=Wee(e),i=Tj(s.length,1+t,e);return Ij(i.map((o,a)=>{const c=o[0],l=o.slice(1);return Array(s[a]).fill(void 0).map((f,u)=>{let d=u*n;return[c+u*r,l.map(h=>h+d)]})}))}function Vee(t,e){let r=1+e();return Tj(r,1+t,e).map(s=>[s[0],s.slice(1)])}function Gee(t){let e=Ag(t).sort((n,s)=>n-s);return r();function r(){let n=[];for(;;){let l=Ag(t,e);if(l.length==0)break;n.push({set:new Set(l),node:r()})}n.sort((l,f)=>f.set.size-l.set.size);let s=t(),i=s%3;s=s/3|0;let o=!!(s&1);s>>=1;let a=s==1,c=s==2;return{branches:n,valid:i,fe0f:o,save:a,check:c}}}function Kee(){return Bee(O4("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 S2=Kee(),Yee=new Set(Ag(S2)),Qee=new Set(Ag(S2)),Jee=Uee(S2),Xee=Gee(S2),r$=45,n$=95;function Oj(t){return J0(t)}function Zee(t){return t.filter(e=>e!=65039)}function Rj(t){for(let e of t.split(".")){let r=Oj(e);try{for(let n=r.lastIndexOf(n$)-1;n>=0;n--)if(r[n]!==n$)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===r$&&r[3]===r$)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function ete(t){return Rj(tte(t,Zee))}function tte(t,e){let r=Oj(t).reverse(),n=[];for(;r.length;){let s=nte(r);if(s){n.push(...e(s));continue}let i=r.pop();if(Yee.has(i)){n.push(i);continue}if(Qee.has(i))continue;let o=Jee[i];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`)}return Rj(rte(String.fromCodePoint(...n)))}function rte(t){return t.normalize("NFC")}function nte(t,e){var r;let n=Xee,s,i,o=[],a=t.length;for(e&&(e.length=0);a;){let c=t[--a];if(n=(r=n.branches.find(l=>l.set.has(c)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)i=c;else if(n.check&&c===i)break;o.push(c),n.fe0f&&(o.push(65039),a>0&&t[a-1]==65039&&a--),n.valid&&(s=o.slice(),n.valid==2&&s.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return s}const ste=new oe(_j),Mj=new Uint8Array(32);Mj.fill(0);function s$(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function A2(t){const e=_t(ete(t)),r=[];if(t.length===0)return r;let n=0;for(let s=0;s=e.length)throw new Error("invalid ENS name; empty component");return r.push(s$(e.slice(n))),r}function ite(t){return A2(t).map(e=>Ei(e)).join(".")}function Nj(t){try{return A2(t).length!==0}catch{}return!1}function Ad(t){typeof t!="string"&&ste.throwArgumentError("invalid ENS name; not a string","name",t);let e=Mj;const r=A2(t);for(;r.length;)e=Ne(Tt([e,Ne(r.pop())]));return le(e)}function M4(t){return le(Tt(A2(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 jj=`Ethereum Signed Message: +`;function Zv(t){return typeof t=="string"&&(t=_t(t)),Ne(Tt([_t(jj),_t(String(t.length)),t]))}var ote=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{l(n.next(f))}catch(u){o(u)}}function c(f){try{l(n.throw(f))}catch(u){o(u)}}function l(f){f.done?i(f.value):s(f.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const gr=new oe(_j),Dj=new Uint8Array(32);Dj.fill(0);const ate=ne.from(-1),Lj=ne.from(0),Bj=ne.from(1),cte=ne.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function lte(t){const e=ue(t),r=e.length%32;return r?In([e,Dj.slice(r)]):le(e)}const fte=Rt(Bj.toHexString(),32),ute=Rt(Lj.toHexString(),32),i$={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},h5=["name","version","chainId","verifyingContract","salt"];function o$(t){return function(e){return typeof e!="string"&&gr.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const dte={name:o$("name"),version:o$("version"),chainId:function(t){try{return ne.from(t).toString()}catch{}return gr.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return He(t).toLowerCase()}catch{}return gr.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=ue(t);if(e.length!==32)throw new Error("bad length");return le(e)}catch{}return gr.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function v5(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))&&gr.throwArgumentError("invalid numeric width","type",t);const s=cte.mask(r?n-1:n),i=r?s.add(Bj).mul(ate):Lj;return function(o){const a=ne.from(o);return(a.lt(i)||a.gt(s))&&gr.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),Rt(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))&&gr.throwArgumentError("invalid bytes width","type",t),function(n){return ue(n).length!==r&&gr.throwArgumentError(`invalid length for ${t}`,"value",n),lte(n)}}}switch(t){case"address":return function(e){return Rt(He(e),32)};case"bool":return function(e){return e?fte:ute};case"bytes":return function(e){return Ne(e)};case"string":return function(e){return fa(e)}}return null}function a$(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class jr{constructor(e){ve(this,"types",Object.freeze(vs(e))),ve(this,"_encoderCache",{}),ve(this,"_types",{});const r={},n={},s={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],s[a]={}});for(const a in e){const c={};e[a].forEach(l=>{c[l.name]&&gr.throwArgumentError(`duplicate variable name ${JSON.stringify(l.name)} in ${JSON.stringify(a)}`,"types",e),c[l.name]=!0;const f=l.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===a&&gr.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!v5(f)&&(n[f]||gr.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(a),r[a][f]=!0)})}const i=Object.keys(n).filter(a=>n[a].length===0);i.length===0?gr.throwArgumentError("missing primary type","types",e):i.length>1&&gr.throwArgumentError(`ambiguous primary types or unused types: ${i.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),ve(this,"primaryType",i[0]);function o(a,c){c[a]&&gr.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),c[a]=!0,Object.keys(r[a]).forEach(l=>{n[l]&&(o(l,c),Object.keys(c).forEach(f=>{s[f][l]=!0}))}),delete c[a]}o(this.primaryType,{});for(const a in s){const c=Object.keys(s[a]);c.sort(),this._types[a]=a$(a,e[a])+c.map(l=>a$(l,e[l])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const s=v5(e);if(s)return s}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const s=r[1],i=this.getEncoder(s),o=parseInt(r[3]);return a=>{o>=0&&a.length!==o&&gr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let c=a.map(i);return this._types[s]&&(c=c.map(Ne)),Ne(In(c))}}const n=this.types[e];if(n){const s=fa(this._types[e]);return i=>{const o=n.map(({name:a,type:c})=>{const l=this.getEncoder(c)(i[a]);return this._types[c]?Ne(l):l});return o.unshift(s),In(o)}}return gr.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||gr.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Ne(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(v5(e))return n(e,r);const s=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(s){const o=s[1],a=parseInt(s[3]);return a>=0&&r.length!==a&&gr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(c=>this._visit(o,c,n))}const i=this.types[e];return i?i.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,r[a],n),o),{}):gr.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new jr(e)}static getPrimaryType(e){return jr.from(e).primaryType}static hashStruct(e,r,n){return jr.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const s=i$[n];s||gr.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:s})}return r.sort((n,s)=>h5.indexOf(n.name)-h5.indexOf(s.name)),jr.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return In(["0x1901",jr.hashDomain(e),jr.from(r).hash(n)])}static hash(e,r,n){return Ne(jr.encode(e,r,n))}static resolveNames(e,r,n,s){return ote(this,void 0,void 0,function*(){e=Ht(e);const i={};e.verifyingContract&&!Ke(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=jr.from(r);o.visit(n,(a,c)=>(a==="address"&&!Ke(c,20)&&(i[c]="0x"),c));for(const a in i)i[a]=yield s(a);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),n=o.visit(n,(a,c)=>a==="address"&&i[c]?i[c]:c),{domain:e,value:n}})}static getPayload(e,r,n){jr.hashDomain(e);const s={},i=[];h5.forEach(c=>{const l=e[c];l!=null&&(s[c]=dte[c](l),i.push({name:c,type:i$[c]}))});const o=jr.from(r),a=Ht(r);return a.EIP712Domain?gr.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):a.EIP712Domain=i,o.encode(n),{types:a,domain:s,primaryType:o.primaryType,message:o.visit(n,(c,l)=>{if(c.match(/^bytes(\d*)/))return le(ue(l));if(c.match(/^u?int/))return ne.from(l).toString();switch(c){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return typeof l!="string"&&gr.throwArgumentError("invalid string","value",l),l}return gr.throwArgumentError("unsupported type","type",c)})}}}const hte=Object.freeze(Object.defineProperty({__proto__:null,_TypedDataEncoder:jr,dnsEncode:M4,ensNormalize:ite,hashMessage:Zv,id:fa,isValidName:Nj,messagePrefix:jj,namehash:Ad},Symbol.toStringTag,{value:"Module"})),mr=new oe(Xv);class N4 extends Il{}class j4 extends Il{}class vte extends Il{}class X0 extends Il{static isIndexed(e){return!!(e&&e._isIndexed)}}const yte={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function c$(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,ve(this,"fragments",r.map(n=>qi.from(n)).filter(n=>n!=null)),ve(this,"_abiCoder",li(new.target,"getAbiCoder")()),ve(this,"functions",{}),ve(this,"errors",{}),ve(this,"events",{}),ve(this,"structs",{}),this.fragments.forEach(n=>{let s=null;switch(n.type){case"constructor":if(this.deploy){mr.warn("duplicate definition - constructor");return}ve(this,"deploy",n);return;case"function":s=this.functions;break;case"event":s=this.events;break;case"error":s=this.errors;break;default:return}let i=n.format();if(s[i]){mr.warn("duplicate definition - "+i);return}s[i]=n}),this.deploy||ve(this,"deploy",ni.from({payable:!1,type:"constructor"})),ve(this,"_isInterface",!0)}format(e){e||(e=yt.full),e===yt.sighash&&mr.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===yt.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return Dn}static getAddress(e){return He(e)}static getSighash(e){return fr(fa(e.format()),0,4)}static getEventTopic(e){return fa(e.format())}getFunction(e){if(Ke(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];mr.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.functions).filter(i=>i.split("(")[0]===n);return s.length===0?mr.throwArgumentError("no matching function","name",n):s.length>1&&mr.throwArgumentError("multiple matching functions","name",n),this.functions[s[0]]}const r=this.functions[si.fromString(e).format()];return r||mr.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(Ke(e)){const n=e.toLowerCase();for(const s in this.events)if(n===this.getEventTopic(s))return this.events[s];mr.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.events).filter(i=>i.split("(")[0]===n);return s.length===0?mr.throwArgumentError("no matching event","name",n):s.length>1&&mr.throwArgumentError("multiple matching events","name",n),this.events[s[0]]}const r=this.events[zi.fromString(e).format()];return r||mr.throwArgumentError("no matching event","signature",e),r}getError(e){if(Ke(e)){const n=li(this.constructor,"getSighash");for(const s in this.errors){const i=this.errors[s];if(e===n(i))return this.errors[s]}mr.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.errors).filter(i=>i.split("(")[0]===n);return s.length===0?mr.throwArgumentError("no matching error","name",n):s.length>1&&mr.throwArgumentError("multiple matching errors","name",n),this.errors[s[0]]}const r=this.errors[si.fromString(e).format()];return r||mr.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 li(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),li(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=ue(r);return le(n.slice(0,4))!==this.getSighash(e)&&mr.throwArgumentError(`data signature does not match error ${e.name}.`,"data",le(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),le(Tt([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=ue(r);return le(n.slice(0,4))!==this.getSighash(e)&&mr.throwArgumentError(`data signature does not match function ${e.name}.`,"data",le(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),le(Tt([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=ue(r),s=null,i="",o=null,a=null,c=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const l=le(n.slice(0,4)),f=yte[l];if(f)o=this._abiCoder.decode(f.inputs,n.slice(4)),a=f.name,c=f.signature,f.reason&&(s=o[0]),a==="Error"?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(i=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const u=this.getError(l);o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,c=u.format()}catch{}break}}return mr.throwError("call revert exception"+i,oe.errors.CALL_EXCEPTION,{method:e.format(),data:le(r),errorArgs:o,errorName:a,errorSignature:c,reason:s})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),le(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&mr.throwError("too many arguments for "+e.format(),oe.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const s=(i,o)=>i.type==="string"?fa(o):i.type==="bytes"?Ne(le(o)):(i.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),i.type.match(/^u?int/)&&(o=ne.from(o).toHexString()),i.type==="address"&&this._abiCoder.encode(["address"],[o]),Rt(le(o),32));for(r.forEach((i,o)=>{let a=e.inputs[o];if(!a.indexed){i!=null&&mr.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,i);return}i==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?mr.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,i):Array.isArray(i)?n.push(i.map(c=>s(a,c))):n.push(s(a,i))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],s=[],i=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&mr.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const c=r[a];if(o.indexed)if(o.type==="string")n.push(fa(c));else if(o.type==="bytes")n.push(Ne(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([o.type],[c]))}else s.push(o),i.push(c)}),{data:this._abiCoder.encode(s,i),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let d=this.getEventTopic(e);(!Ke(n[0],32)||n[0].toLowerCase()!==d)&&mr.throwError("fragment/topic mismatch",oe.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:d,value:n[0]}),n=n.slice(1)}let s=[],i=[],o=[];e.inputs.forEach((d,h)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(s.push(Vr.fromObject({type:"bytes32",name:d.name})),o.push(!0)):(s.push(d),o.push(!1)):(i.push(d),o.push(!1))});let a=n!=null?this._abiCoder.decode(s,Tt(n)):null,c=this._abiCoder.decode(i,r,!0),l=[],f=0,u=0;e.inputs.forEach((d,h)=>{if(d.indexed)if(a==null)l[h]=new X0({_isIndexed:!0,hash:null});else if(o[h])l[h]=new X0({_isIndexed:!0,hash:a[u++]});else try{l[h]=a[u++]}catch(v){l[h]=v}else try{l[h]=c[f++]}catch(v){l[h]=v}if(d.name&&l[d.name]==null){const v=l[h];v instanceof Error?Object.defineProperty(l,d.name,{enumerable:!0,get:()=>{throw c$(`property ${JSON.stringify(d.name)}`,v)}}):l[d.name]=v}});for(let d=0;d{throw c$(`index ${d}`,h)}})}return Object.freeze(l)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new j4({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:ne.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new N4({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=le(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new vte({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 pte=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:k2,ConstructorFragment:ni,ErrorFragment:Co,EventFragment:zi,FormatTypes:yt,Fragment:qi,FunctionFragment:si,Indexed:X0,Interface:Ir,LogDescription:N4,ParamType:Vr,TransactionDescription:j4,checkResultErrors:S4,defaultAbiCoder:Dn},Symbol.toStringTag,{value:"Module"})),mte="abstract-provider/5.7.0";var gte=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{l(n.next(f))}catch(u){o(u)}}function c(f){try{l(n.throw(f))}catch(u){o(u)}}function l(f){f.done?i(f.value):s(f.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const bte=new oe(mte);class xte extends Il{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class Qa{constructor(){bte.checkAbstract(new.target,Qa),ve(this,"_isProvider",!0)}getFeeData(){return gte(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield Mt({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(o=>null)});let n=null,s=null,i=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,i=ne.from("1500000000"),s=e.baseFeePerGas.mul(2).add(i)),{lastBaseFeePerGas:n,maxFeePerGas:s,maxPriorityFeePerGas:i,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 wte="abstract-signer/5.7.0";var Ii=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{l(n.next(f))}catch(u){o(u)}}function c(f){try{l(n.throw(f))}catch(u){o(u)}}function l(f){f.done?i(f.value):s(f.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const Ys=new oe(wte),Cte=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Ete=[oe.errors.INSUFFICIENT_FUNDS,oe.errors.NONCE_EXPIRED,oe.errors.REPLACEMENT_UNDERPRICED];let rl=class Fj{constructor(){Ys.checkAbstract(new.target,Fj),ve(this,"_isSigner",!0)}getBalance(e){return Ii(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Ii(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Ii(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield Mt(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return Ii(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield Mt(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return Ii(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 Ii(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Ii(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Ii(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Ii(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)Cte.indexOf(n)===-1&&Ys.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=Ht(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()&&Ys.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return Ii(this,void 0,void 0,function*(){const r=yield Mt(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(s=>Ii(this,void 0,void 0,function*(){if(s==null)return null;const i=yield this.resolveName(s);return i==null&&Ys.throwArgumentError("provided ENS name resolves to null","tx.to",s),i})),r.to.catch(s=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?Ys.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&Ys.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 s=yield this.getFeeData();if(r.type==null)if(s.maxFeePerGas!=null&&s.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const i=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=i,r.maxPriorityFeePerGas=i}else r.maxFeePerGas==null&&(r.maxFeePerGas=s.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=s.maxPriorityFeePerGas);else s.gasPrice!=null?(n&&Ys.throwError("network does not support EIP-1559",oe.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=s.gasPrice),r.type=0):Ys.throwError("failed to get consistent fee data",oe.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=s.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=s.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(s=>{if(Ete.indexOf(s.code)>=0)throw s;return Ys.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",oe.errors.UNPREDICTABLE_GAS_LIMIT,{error:s,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(s=>(s[1]!==0&&s[0]!==s[1]&&Ys.throwArgumentError("chainId address mismatch","transaction",e),s[0])),yield Mt(r)})}_checkProvider(e){this.provider||Ys.throwError("missing provider",oe.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class D4 extends rl{constructor(e,r){super(),ve(this,"address",e),ve(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{Ys.throwError(e,oe.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 D4(this.address,e)}}var zj={},ut={},ey=qj;function qj(t,e){if(!t)throw new Error(e||"Assertion failed")}qj.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var WC={exports:{}};typeof Object.create=="function"?WC.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:WC.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 kte=WC.exports,Ste=ey,Ate=kte;ut.inherits=Ate;function $te(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function _te(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),s=0;s>6|192,r[n++]=i&63|128):$te(t,s)?(i=65536+((i&1023)<<10)+(t.charCodeAt(++s)&1023),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=i&63|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=i&63|128)}else for(s=0;s>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}ut.htonl=Uj;function Ite(t,e){for(var r="",n=0;n>>0}return i}ut.join32=Tte;function Ote(t,e){for(var r=new Array(t.length*4),n=0,s=0;n>>24,r[s+1]=i>>>16&255,r[s+2]=i>>>8&255,r[s+3]=i&255):(r[s+3]=i>>>24,r[s+2]=i>>>16&255,r[s+1]=i>>>8&255,r[s]=i&255)}return r}ut.split32=Ote;function Rte(t,e){return t>>>e|t<<32-e}ut.rotr32=Rte;function Mte(t,e){return t<>>32-e}ut.rotl32=Mte;function Nte(t,e){return t+e>>>0}ut.sum32=Nte;function jte(t,e,r){return t+e+r>>>0}ut.sum32_3=jte;function Dte(t,e,r,n){return t+e+r+n>>>0}ut.sum32_4=Dte;function Lte(t,e,r,n,s){return t+e+r+n+s>>>0}ut.sum32_5=Lte;function Bte(t,e,r,n){var s=t[e],i=t[e+1],o=n+i>>>0,a=(o>>0,t[e+1]=o}ut.sum64=Bte;function Fte(t,e,r,n){var s=e+n>>>0,i=(s>>0}ut.sum64_hi=Fte;function zte(t,e,r,n){var s=e+n;return s>>>0}ut.sum64_lo=zte;function qte(t,e,r,n,s,i,o,a){var c=0,l=e;l=l+n>>>0,c+=l>>0,c+=l>>0,c+=l>>0}ut.sum64_4_hi=qte;function Ute(t,e,r,n,s,i,o,a){var c=e+n+i+a;return c>>>0}ut.sum64_4_lo=Ute;function Wte(t,e,r,n,s,i,o,a,c,l){var f=0,u=e;u=u+n>>>0,f+=u>>0,f+=u>>0,f+=u>>0,f+=u>>0}ut.sum64_5_hi=Wte;function Hte(t,e,r,n,s,i,o,a,c,l){var f=e+n+i+a+l;return f>>>0}ut.sum64_5_lo=Hte;function Vte(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}ut.rotr64_hi=Vte;function Gte(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}ut.rotr64_lo=Gte;function Kte(t,e,r){return t>>>r}ut.shr64_hi=Kte;function Yte(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}ut.shr64_lo=Yte;var w1={},l$=ut,Qte=ey;function $2(){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}w1.BlockHash=$2;$2.prototype.update=function(e,r){if(e=l$.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=l$.join32(e,0,e.length-n,this.endian);for(var s=0;s>>24&255,s[i++]=e>>>16&255,s[i++]=e>>>8&255,s[i++]=e&255}else for(s[i++]=e&255,s[i++]=e>>>8&255,s[i++]=e>>>16&255,s[i++]=e>>>24&255,s[i++]=0,s[i++]=0,s[i++]=0,s[i++]=0,o=8;o>>3}Ko.g0_256=tre;function rre(t){return Io(t,17)^Io(t,19)^t>>>10}Ko.g1_256=rre;var Vd=ut,nre=w1,sre=Ko,y5=Vd.rotl32,ph=Vd.sum32,ire=Vd.sum32_5,ore=sre.ft_1,Yj=nre.BlockHash,are=[1518500249,1859775393,2400959708,3395469782];function Lo(){if(!(this instanceof Lo))return new Lo;Yj.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Vd.inherits(Lo,Yj);var cre=Lo;Lo.blockSize=512;Lo.outSize=160;Lo.hmacStrength=80;Lo.padLength=64;Lo.prototype._update=function(e,r){for(var n=this.W,s=0;s<16;s++)n[s]=e[r+s];for(;sthis.blockSize&&(e=new this.Hash().update(e).digest()),Yre(e.length<=this.blockSize);for(var r=e.length;r>8,d=f&255;u?c.push(u,d):c.push(d)}return c}r.toArray=n;function s(o){return o.length===1?"0"+o:o}r.zero2=s;function i(o){for(var a="",c=0;c(d>>1)-1?y=(d>>1)-m:y=m,h.isubn(y)):y=0,u[v]=y,h.iushrn(1)}return u}r.getNAF=n;function s(c,l){var f=[[],[]];c=c.clone(),l=l.clone();for(var u=0,d=0,h;c.cmpn(-u)>0||l.cmpn(-d)>0;){var v=c.andln(3)+u&3,y=l.andln(3)+d&3;v===3&&(v=-1),y===3&&(y=-1);var m;v&1?(h=c.andln(7)+u&7,(h===3||h===5)&&y===2?m=-v:m=v):m=0,f[0].push(m);var g;y&1?(h=l.andln(7)+d&7,(h===3||h===5)&&v===2?g=-y:g=y):g=0,f[1].push(g),2*u===m+1&&(u=1-u),2*d===g+1&&(d=1-d),c.iushrn(1),l.iushrn(1)}return f}r.getJSF=s;function i(c,l,f){var u="_"+l;c.prototype[l]=function(){return this[u]!==void 0?this[u]:this[u]=f.call(this)}}r.cachedProperty=i;function o(c){return typeof c=="string"?r.toArray(c,"hex"):c}r.parseBytes=o;function a(c){return new Ge(c,"hex","le")}r.intFromLE=a}),$g=Us.getNAF,Xre=Us.getJSF,_g=Us.assert;function Tl(t,e){this.type=t,this.p=new Ge(e.p,16),this.red=e.prime?Ge.red(e.prime):Ge.mont(this.p),this.zero=new Ge(0).toRed(this.red),this.one=new Ge(1).toRed(this.red),this.two=new Ge(2).toRed(this.red),this.n=e.n&&new Ge(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 ru=Tl;Tl.prototype.point=function(){throw new Error("Not implemented")};Tl.prototype.validate=function(){throw new Error("Not implemented")};Tl.prototype._fixedNafMul=function(e,r){_g(e.precomputed);var n=e._getDoubles(),s=$g(r,1,this._bitLength),i=(1<=a;l--)c=(c<<1)+s[l];o.push(c)}for(var f=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=i;d>0;d--){for(a=0;a=0;c--){for(var l=0;c>=0&&o[c]===0;c--)l++;if(c>=0&&l++,a=a.dblp(l),c<0)break;var f=o[c];_g(f!==0),e.type==="affine"?f>0?a=a.mixedAdd(i[f-1>>1]):a=a.mixedAdd(i[-f-1>>1].neg()):f>0?a=a.add(i[f-1>>1]):a=a.add(i[-f-1>>1].neg())}return e.type==="affine"?a.toP():a};Tl.prototype._wnafMulAdd=function(e,r,n,s,i){var o=this._wnafT1,a=this._wnafT2,c=this._wnafT3,l=0,f,u,d;for(f=0;f=1;f-=2){var v=f-1,y=f;if(o[v]!==1||o[y]!==1){c[v]=$g(n[v],o[v],this._bitLength),c[y]=$g(n[y],o[y],this._bitLength),l=Math.max(c[v].length,l),l=Math.max(c[y].length,l);continue}var m=[r[v],null,null,r[y]];r[v].y.cmp(r[y].y)===0?(m[1]=r[v].add(r[y]),m[2]=r[v].toJ().mixedAdd(r[y].neg())):r[v].y.cmp(r[y].y.redNeg())===0?(m[1]=r[v].toJ().mixedAdd(r[y]),m[2]=r[v].add(r[y].neg())):(m[1]=r[v].toJ().mixedAdd(r[y]),m[2]=r[v].toJ().mixedAdd(r[y].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],b=Xre(n[v],n[y]);for(l=Math.max(b[0].length,l),c[v]=new Array(l),c[y]=new Array(l),u=0;u=0;f--){for(var M=0;f>=0;){var D=!0;for(u=0;u=0&&M++,$=$.dblp(M),f<0)break;for(u=0;u0?d=a[u][H-1>>1]:H<0&&(d=a[u][-H-1>>1].neg()),d.type==="affine"?$=$.mixedAdd(d):$=$.add(d))}}for(f=0;f=Math.ceil((e.bitLength()+1)/r.step):!1};ki.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],s=this,i=0;i=0&&(h=l,v=f),u.negative&&(u=u.neg(),d=d.neg()),h.negative&&(h=h.neg(),v=v.neg()),[{a:u,b:d},{a:h,b:v}]};Si.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],s=r[1],i=s.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=i.mul(n.a),c=o.mul(s.a),l=i.mul(n.b),f=o.mul(s.b),u=e.sub(a).sub(c),d=l.add(f).neg();return{k1:u,k2:d}};Si.prototype.pointFromX=function(e,r){e=new Ge(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),s=n.redSqrt();if(s.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var i=s.fromRed().isOdd();return(r&&!i||!r&&i)&&(s=s.redNeg()),this.point(e,s)};Si.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,s=this.a.redMul(r),i=r.redSqr().redMul(r).redIAdd(s).redIAdd(this.b);return n.redSqr().redISub(i).cmpn(0)===0};Si.prototype._endoWnafMulAdd=function(e,r,n){for(var s=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""};ln.prototype.isInfinity=function(){return this.inf};ln.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),s=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,s)};ln.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(),s=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(s),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)};ln.prototype.getX=function(){return this.x.fromRed()};ln.prototype.getY=function(){return this.y.fromRed()};ln.prototype.mul=function(e){return e=new Ge(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)};ln.prototype.mulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i):this.curve._wnafMulAdd(1,s,i,2)};ln.prototype.jmulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i,!0):this.curve._wnafMulAdd(1,s,i,2,!0)};ln.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)};ln.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,s=function(i){return i.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(s)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(s)}}}return r};ln.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 xn(t,e,r,n){ru.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Ge(0)):(this.x=new Ge(e,16),this.y=new Ge(r,16),this.z=new Ge(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}B4(xn,ru.BasePoint);Si.prototype.jpoint=function(e,r,n){return new xn(this,e,r,n)};xn.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),s=this.y.redMul(r).redMul(e);return this.curve.point(n,s)};xn.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};xn.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),s=this.x.redMul(r),i=e.x.redMul(n),o=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),c=s.redSub(i),l=o.redSub(a);if(c.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=c.redSqr(),u=f.redMul(c),d=s.redMul(f),h=l.redSqr().redIAdd(u).redISub(d).redISub(d),v=l.redMul(d.redISub(h)).redISub(o.redMul(u)),y=this.z.redMul(e.z).redMul(c);return this.curve.jpoint(h,v,y)};xn.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,s=e.x.redMul(r),i=this.y,o=e.y.redMul(r).redMul(this.z),a=n.redSub(s),c=i.redSub(o);if(a.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),f=l.redMul(a),u=n.redMul(l),d=c.redSqr().redIAdd(f).redISub(u).redISub(u),h=c.redMul(u.redISub(d)).redISub(i.redMul(f)),v=this.z.redMul(a);return this.curve.jpoint(d,h,v)};xn.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(i),this.x.cmp(n)===0)return!0}};xn.prototype.inspect=function(){return this.isInfinity()?"":""};xn.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var mm=k1(function(t,e){var r=e;r.base=ru,r.short=ene,r.mont=null,r.edwards=null}),gm=k1(function(t,e){var r=e,n=Us.assert;function s(a){a.type==="short"?this.curve=new mm.short(a):a.type==="edwards"?this.curve=new mm.edwards(a):this.curve=new mm.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=s;function i(a,c){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var l=new s(c);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:l}),l}})}i("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:ss.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("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:ss.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("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:ss.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("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:ss.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"]}),i("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:ss.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"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:ss.sha256,gRed:!1,g:["9"]}),i("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:ss.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var o;try{o=null.crash()}catch{o=void 0}i("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:ss.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function nl(t){if(!(this instanceof nl))return new nl(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=Ui.toArray(t.entropy,t.entropyEnc||"hex"),r=Ui.toArray(t.nonce,t.nonceEnc||"hex"),n=Ui.toArray(t.pers,t.persEnc||"hex");L4(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var aD=nl;nl.prototype._init=function(e,r,n){var s=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};nl.prototype.generate=function(e,r,n,s){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(s=n,n=r,r=null),n&&(n=Ui.toArray(n,s||"hex"),this._update(n));for(var i=[];i.length"};var tne=Us.assert;function _2(t,e){if(t instanceof _2)return t;this._importDER(t,e)||(tne(t.r&&t.s,"Signature without r or s"),this.r=new Ge(t.r,16),this.s=new Ge(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var P2=_2;function rne(){this.place=0}function g5(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 s=0,i=0,o=e.place;i>>=0;return s<=127?!1:(e.place=o,s)}function h$(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)}_2.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=h$(r),n=h$(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var s=[2];b5(s,r.length),s=s.concat(r),s.push(2),b5(s,n.length);var i=s.concat(n),o=[48];return b5(o,i.length),o=o.concat(i),Us.encode(o,e)};var nne=function(){throw new Error("unsupported")},cD=Us.assert;function yi(t){if(!(this instanceof yi))return new yi(t);typeof t=="string"&&(cD(Object.prototype.hasOwnProperty.call(gm,t),"Unknown curve "+t),t=gm[t]),t instanceof gm.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 sne=yi;yi.prototype.keyPair=function(e){return new F4(this,e)};yi.prototype.keyFromPrivate=function(e,r){return F4.fromPrivate(this,e,r)};yi.prototype.keyFromPublic=function(e,r){return F4.fromPublic(this,e,r)};yi.prototype.genKeyPair=function(e){e||(e={});for(var r=new aD({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||nne(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),s=this.n.sub(new Ge(2));;){var i=new Ge(r.generate(n));if(!(i.cmp(s)>0))return i.iaddn(1),this.keyFromPrivate(i)}};yi.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};yi.prototype.sign=function(e,r,n,s){typeof n=="object"&&(s=n,n=null),s||(s={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new Ge(e,16));for(var i=this.n.byteLength(),o=r.getPrivate().toArray("be",i),a=e.toArray("be",i),c=new aD({hash:this.hash,entropy:o,nonce:a,pers:s.pers,persEnc:s.persEnc||"utf8"}),l=this.n.sub(new Ge(1)),f=0;;f++){var u=s.k?s.k(f):new Ge(c.generate(this.n.byteLength()));if(u=this._truncateToN(u,!0),!(u.cmpn(1)<=0||u.cmp(l)>=0)){var d=this.g.mul(u);if(!d.isInfinity()){var h=d.getX(),v=h.umod(this.n);if(v.cmpn(0)!==0){var y=u.invm(this.n).mul(v.mul(r.getPrivate()).iadd(e));if(y=y.umod(this.n),y.cmpn(0)!==0){var m=(d.getY().isOdd()?1:0)|(h.cmp(v)!==0?2:0);return s.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),m^=1),new P2({r:v,s:y,recoveryParam:m})}}}}}};yi.prototype.verify=function(e,r,n,s){e=this._truncateToN(new Ge(e,16)),n=this.keyFromPublic(n,s),r=new P2(r,"hex");var i=r.r,o=r.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a=o.invm(this.n),c=a.mul(e).umod(this.n),l=a.mul(i).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(c,n.getPublic(),l),f.isInfinity()?!1:f.eqXToP(i)):(f=this.g.mulAdd(c,n.getPublic(),l),f.isInfinity()?!1:f.getX().umod(this.n).cmp(i)===0)};yi.prototype.recoverPubKey=function(t,e,r,n){cD((3&r)===r,"The recovery param is more than two bits"),e=new P2(e,n);var s=this.n,i=new Ge(t),o=e.r,a=e.s,c=r&1,l=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");l?o=this.curve.pointFromX(o.add(this.curve.n),c):o=this.curve.pointFromX(o,c);var f=e.r.invm(s),u=s.sub(i).mul(f).umod(s),d=a.mul(f).umod(s);return this.g.mulAdd(u,o,d)};yi.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new P2(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var s=0;s<4;s++){var i;try{i=this.recoverPubKey(t,e,s)}catch{continue}if(i.eq(r))return s}throw new Error("Unable to find valid recovery factor")};var ine=k1(function(t,e){var r=e;r.version="6.5.4",r.utils=Us,r.rand=function(){throw new Error("unsupported")},r.curve=mm,r.curves=gm,r.ec=sne,r.eddsa=null}),one=ine.ec;const ane="signing-key/5.7.0",KC=new oe(ane);let x5=null;function mo(){return x5||(x5=new one("secp256k1")),x5}class Wc{constructor(e){ve(this,"curve","secp256k1"),ve(this,"privateKey",le(e)),Xi(this.privateKey)!==32&&KC.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=mo().keyFromPrivate(ue(this.privateKey));ve(this,"publicKey","0x"+r.getPublic(!1,"hex")),ve(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),ve(this,"_isSigningKey",!0)}_addPoint(e){const r=mo().keyFromPublic(ue(this.publicKey)),n=mo().keyFromPublic(ue(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=mo().keyFromPrivate(ue(this.privateKey)),n=ue(e);n.length!==32&&KC.throwArgumentError("bad digest length","digest",e);const s=r.sign(n,{canonical:!0});return Pl({recoveryParam:s.recoveryParam,r:Rt("0x"+s.r.toString(16),32),s:Rt("0x"+s.s.toString(16),32)})}computeSharedSecret(e){const r=mo().keyFromPrivate(ue(this.privateKey)),n=mo().keyFromPublic(ue(I2(e)));return Rt("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function z4(t,e){const r=Pl(e),n={r:ue(r.r),s:ue(r.s)};return"0x"+mo().recoverPubKey(ue(t),n,r.recoveryParam).encode("hex",!1)}function I2(t,e){const r=ue(t);if(r.length===32){const n=new Wc(r);return e?"0x"+mo().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?le(r):"0x"+mo().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+mo().keyFromPublic(r).getPublic(!0,"hex"):le(r)}return KC.throwArgumentError("invalid public or private key","key","[REDACTED]")}const cne=Object.freeze(Object.defineProperty({__proto__:null,SigningKey:Wc,computePublicKey:I2,recoverPublicKey:z4},Symbol.toStringTag,{value:"Module"})),lne="transactions/5.7.0",Tn=new oe(lne);var Pg;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(Pg||(Pg={}));function q4(t){return t==="0x"?null:He(t)}function Pn(t){return t==="0x"?yr:ne.from(t)}const fne=[{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"}],une={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function ya(t){const e=I2(t);return He(fr(Ne(fr(e,1)),12))}function sl(t,e){return ya(z4(ue(t),e))}function Es(t,e){const r=Gi(ne.from(t).toHexString());return r.length>32&&Tn.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function w5(t,e){return{address:He(t),storageKeys:(e||[]).map((r,n)=>(Xi(r)!==32&&Tn.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function Ol(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Tn.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),w5(r[0],r[1])):w5(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((s,i)=>(s[i]=!0,s),{});return w5(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function lD(t){return Ol(t).map(e=>[e.address,e.storageKeys])}function fD(t,e){if(t.gasPrice!=null){const n=ne.from(t.gasPrice),s=ne.from(t.maxFeePerGas||0);n.eq(s)||Tn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:s})}const r=[Es(t.chainId||0,"chainId"),Es(t.nonce||0,"nonce"),Es(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Es(t.maxFeePerGas||0,"maxFeePerGas"),Es(t.gasLimit||0,"gasLimit"),t.to!=null?He(t.to):"0x",Es(t.value||0,"value"),t.data||"0x",lD(t.accessList||[])];if(e){const n=Pl(e);r.push(Es(n.recoveryParam,"recoveryParam")),r.push(Gi(n.r)),r.push(Gi(n.s))}return In(["0x02",Nf(r)])}function uD(t,e){const r=[Es(t.chainId||0,"chainId"),Es(t.nonce||0,"nonce"),Es(t.gasPrice||0,"gasPrice"),Es(t.gasLimit||0,"gasLimit"),t.to!=null?He(t.to):"0x",Es(t.value||0,"value"),t.data||"0x",lD(t.accessList||[])];if(e){const n=Pl(e);r.push(Es(n.recoveryParam,"recoveryParam")),r.push(Gi(n.r)),r.push(Gi(n.s))}return In(["0x01",Nf(r)])}function dne(t,e){w2(t,une);const r=[];fne.forEach(function(o){let a=t[o.name]||[];const c={};o.numeric&&(c.hexPad="left"),a=ue(le(a,c)),o.length&&a.length!==o.length&&a.length>0&&Tn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=Gi(a),a.length>o.maxLength&&Tn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push(le(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Tn.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!Ji(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(le(n)),r.push("0x"),r.push("0x")),!e)return Nf(r);const s=Pl(e);let i=27+s.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),i+=n*2+8,s.v>28&&s.v!==i&&Tn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):s.v!==i&&Tn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(le(i)),r.push(Gi(ue(s.r))),r.push(Gi(ue(s.s))),Nf(r)}function Ig(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Tn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),dne(t,e);switch(t.type){case 1:return uD(t,e);case 2:return fD(t,e)}return Tn.throwError(`unsupported transaction type: ${t.type}`,oe.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function dD(t,e,r){try{const n=Pn(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Tn.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=Rt(e[1],32),t.s=Rt(e[2],32);try{const n=Ne(r(t));t.from=sl(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function hne(t){const e=C2(t.slice(1));e.length!==9&&e.length!==12&&Tn.throwArgumentError("invalid component count for transaction type: 2","payload",le(t));const r=Pn(e[2]),n=Pn(e[3]),s={type:2,chainId:Pn(e[0]).toNumber(),nonce:Pn(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Pn(e[4]),to:q4(e[5]),value:Pn(e[6]),data:e[7],accessList:Ol(e[8])};return e.length===9||(s.hash=Ne(t),dD(s,e.slice(9),fD)),s}function vne(t){const e=C2(t.slice(1));e.length!==8&&e.length!==11&&Tn.throwArgumentError("invalid component count for transaction type: 1","payload",le(t));const r={type:1,chainId:Pn(e[0]).toNumber(),nonce:Pn(e[1]).toNumber(),gasPrice:Pn(e[2]),gasLimit:Pn(e[3]),to:q4(e[4]),value:Pn(e[5]),data:e[6],accessList:Ol(e[7])};return e.length===8||(r.hash=Ne(t),dD(r,e.slice(8),uD)),r}function yne(t){const e=C2(t);e.length!==9&&e.length!==6&&Tn.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:Pn(e[0]).toNumber(),gasPrice:Pn(e[1]),gasLimit:Pn(e[2]),to:q4(e[3]),value:Pn(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=ne.from(e[6]).toNumber()}catch{return r}if(r.r=Rt(e[7],32),r.s=Rt(e[8],32),ne.from(r.r).isZero()&&ne.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 s=e.slice(0,6);r.chainId!==0&&(s.push(le(r.chainId)),s.push("0x"),s.push("0x"),n-=r.chainId*2+8);const i=Ne(Nf(s));try{r.from=sl(i,{r:le(r.r),s:le(r.s),recoveryParam:n})}catch{}r.hash=Ne(t)}return r.type=null,r}function U4(t){const e=ue(t);if(e[0]>127)return yne(e);switch(e[0]){case 1:return vne(e);case 2:return hne(e)}return Tn.throwError(`unsupported transaction type: ${e[0]}`,oe.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const pne=Object.freeze(Object.defineProperty({__proto__:null,get TransactionTypes(){return Pg},accessListify:Ol,computeAddress:ya,parse:U4,recoverAddress:sl,serialize:Ig},Symbol.toStringTag,{value:"Module"})),mne="contracts/5.7.0";var Df=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{l(n.next(f))}catch(u){o(u)}}function c(f){try{l(n.throw(f))}catch(u){o(u)}}function l(f){f.done?i(f.value):s(f.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const Dr=new oe(mne);function Tg(t,e){return Df(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&Dr.throwArgumentError("invalid address or ENS name","name",r);try{return He(r)}catch{}t||Dr.throwError("a provider or signer is needed to resolve ENS names",oe.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&Dr.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function bm(t,e,r){return Df(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,s)=>bm(t,Array.isArray(e)?e[s]:e[n.name],n))):r.type==="address"?yield Tg(t,e):r.type==="tuple"?yield bm(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>bm(t,n,r.arrayChildren))):Promise.reject(Dr.makeError("invalid value for array",oe.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function T2(t,e,r){return Df(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=Ht(r.pop())),Dr.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=Mt({override:Tg(t.signer,n.from),signer:t.signer.getAddress()}).then(l=>Df(this,void 0,void 0,function*(){return He(l.signer)!==l.override&&Dr.throwError("Contract with a Signer cannot override from",oe.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),l.override})):n.from=t.signer.getAddress():n.from&&(n.from=Tg(t.provider,n.from));const s=yield Mt({args:bm(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:Mt(n)||{}}),i=t.interface.encodeFunctionData(e,s.args),o={data:i,to:s.address},a=s.overrides;if(a.nonce!=null&&(o.nonce=ne.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=ne.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=ne.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=ne.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=ne.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=Ol(a.accessList)),o.gasLimit==null&&e.gas!=null){let l=21e3;const f=ue(i);for(let u=0;un[l]!=null);return c.length&&Dr.throwError(`cannot override ${c.map(l=>JSON.stringify(l)).join(",")}`,oe.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:c}),o})}function gne(t,e){return function(...r){return T2(t,e,r)}}function bne(t,e){const r=t.signer||t.provider;return function(...n){return Df(this,void 0,void 0,function*(){r||Dr.throwError("estimate require a provider or signer",oe.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const s=yield T2(t,e,n);return yield r.estimateGas(s)})}}function xne(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(s=>(s.events=s.logs.map(i=>{let o=vs(i),a=null;try{a=t.interface.parseLog(i)}catch{}return a&&(o.args=a.args,o.decode=(c,l)=>t.interface.decodeEventLog(a.eventFragment,c,l),o.event=a.name,o.eventSignature=a.signature),o.removeListener=()=>t.provider,o.getBlock=()=>t.provider.getBlock(s.blockHash),o.getTransaction=()=>t.provider.getTransaction(s.transactionHash),o.getTransactionReceipt=()=>Promise.resolve(s),o}),s))}function hD(t,e,r){const n=t.signer||t.provider;return function(...s){return Df(this,void 0,void 0,function*(){let i;if(s.length===e.inputs.length+1&&typeof s[s.length-1]=="object"){const c=Ht(s.pop());c.blockTag!=null&&(i=yield c.blockTag),delete c.blockTag,s.push(c)}t.deployTransaction!=null&&(yield t._deployed(i));const o=yield T2(t,e,s),a=yield n.call(o,i);try{let c=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(c=c[0]),c}catch(c){throw c.code===oe.errors.CALL_EXCEPTION&&(c.address=t.address,c.args=s,c.transaction=o),c}})}}function wne(t,e){return function(...r){return Df(this,void 0,void 0,function*(){t.signer||Dr.throwError("sending a transaction requires a signer",oe.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield T2(t,e,r),s=yield t.signer.sendTransaction(n);return xne(t,s),s})}}function v$(t,e,r){return e.constant?hD(t,e,r):wne(t,e)}function vD(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 Z0{constructor(e,r){ve(this,"tag",e),ve(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 s=e.slice();return setTimeout(()=>{n.listener.apply(this,s)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class Cne extends Z0{constructor(){super("error",null)}}class y$ extends Z0{constructor(e,r,n,s){const i={address:e};let o=r.getEventTopic(n);s?(o!==s[0]&&Dr.throwArgumentError("topic mismatch","topics",s),i.topics=s.slice()):i.topics=[o],super(vD(i),i),ve(this,"address",e),ve(this,"interface",r),ve(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=S4(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class p$ extends Z0{constructor(e,r){super("*",{address:e}),ve(this,"address",e),ve(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,s)=>this.interface.decodeEventLog(r.eventFragment,n,s),e.args=r.args}catch{}}}class Ene{constructor(e,r,n){ve(this,"interface",li(new.target,"getInterface")(r)),n==null?(ve(this,"provider",null),ve(this,"signer",null)):rl.isSigner(n)?(ve(this,"provider",n.provider||null),ve(this,"signer",n)):Qa.isProvider(n)?(ve(this,"provider",n),ve(this,"signer",null)):Dr.throwArgumentError("invalid signer or provider","signerOrProvider",n),ve(this,"callStatic",{}),ve(this,"estimateGas",{}),ve(this,"functions",{}),ve(this,"populateTransaction",{}),ve(this,"filters",{});{const o={};Object.keys(this.interface.events).forEach(a=>{const c=this.interface.events[a];ve(this.filters,a,(...l)=>({address:this.address,topics:this.interface.encodeFilterTopics(c,l)})),o[c.name]||(o[c.name]=[]),o[c.name].push(a)}),Object.keys(o).forEach(a=>{const c=o[a];c.length===1?ve(this.filters,a,this.filters[c[0]]):Dr.warn(`Duplicate definition of ${a} (${c.join(", ")})`)})}if(ve(this,"_runningEvents",{}),ve(this,"_wrappedEmits",{}),e==null&&Dr.throwArgumentError("invalid contract address or ENS name","addressOrName",e),ve(this,"address",e),this.provider)ve(this,"resolvedAddress",Tg(this.provider,e));else try{ve(this,"resolvedAddress",Promise.resolve(He(e)))}catch{Dr.throwError("provider is required to use ENS name as contract address",oe.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(o=>{});const s={},i={};Object.keys(this.interface.functions).forEach(o=>{const a=this.interface.functions[o];if(i[o]){Dr.warn(`Duplicate ABI entry for ${JSON.stringify(o)}`);return}i[o]=!0;{const c=a.name;s[`%${c}`]||(s[`%${c}`]=[]),s[`%${c}`].push(o)}this[o]==null&&ve(this,o,v$(this,a,!0)),this.functions[o]==null&&ve(this.functions,o,v$(this,a,!1)),this.callStatic[o]==null&&ve(this.callStatic,o,hD(this,a,!0)),this.populateTransaction[o]==null&&ve(this.populateTransaction,o,gne(this,a)),this.estimateGas[o]==null&&ve(this.estimateGas,o,bne(this,a))}),Object.keys(s).forEach(o=>{const a=s[o];if(a.length>1)return;o=o.substring(1);const c=a[0];try{this[o]==null&&ve(this,o,this[c])}catch{}this.functions[o]==null&&ve(this.functions,o,this.functions[c]),this.callStatic[o]==null&&ve(this.callStatic,o,this.callStatic[c]),this.populateTransaction[o]==null&&ve(this.populateTransaction,o,this.populateTransaction[c]),this.estimateGas[o]==null&&ve(this.estimateGas,o,this.estimateGas[c])})}static getContractAddress(e){return E2(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"&&Dr.throwError("contract not deployed",oe.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Dr.throwError("sending a transactions require a signer",oe.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=Ht(e||{});return["from","to"].forEach(function(n){r[n]!=null&&Dr.throwError("cannot override "+n,oe.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new D4(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&ve(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return X0.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 Cne);if(e==="event")return this._normalizeRunningEvent(new Z0("event",null));if(e==="*")return this._normalizeRunningEvent(new p$(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new y$(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 s=this.interface.getEvent(n);return this._normalizeRunningEvent(new y$(this.address,this.interface,s,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new Z0(vD(r),r))}return this._normalizeRunningEvent(new p$(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 s=vs(r);return s.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},s.getBlock=()=>this.provider.getBlock(r.blockHash),s.getTransaction=()=>this.provider.getTransaction(r.transactionHash),s.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(s),s}_addEventListener(e,r,n){if(this.provider||Dr.throwError("events require a provider or a signer with a provider",oe.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const s=i=>{let o=this._wrapEvent(e,i,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]=s,e.filter!=null&&this.provider.on(e.filter,s)}}queryFilter(e,r,n){const s=this._getRunningEvent(e),i=Ht(s.filter);return typeof r=="string"&&Ke(r,32)?(n!=null&&Dr.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),i.blockHash=r):(i.fromBlock=r??0,i.toBlock=n??"latest"),this.provider.getLogs(i).then(o=>o.map(a=>this._wrapEvent(s,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),s=n.run(r)>0;return this._checkRunningEvents(n),s}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(s=>{r.push(s)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const s=this._runningEvents[n];s.removeAllListeners(),this._checkRunningEvents(s)}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 S1 extends Ene{}class W4{constructor(e){ve(this,"alphabet",e),ve(this,"base",e.length),ve(this,"_alphabetMap",{}),ve(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(o%this.base),o=o/this.base|0}let s="";for(let i=0;r[i]===0&&i=0;--i)s+=this.alphabet[n[i]];return s}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(;i>0;)r.push(i&255),i>>=8}for(let n=0;e[n]===this._leader&&n>24&255,c[e.length+1]=u>>16&255,c[e.length+2]=u>>8&255,c[e.length+3]=u&255;let d=ue(Yd(s,t,c));i||(i=d.length,f=new Uint8Array(i),o=Math.ceil(n/i),l=n-(o-1)*i),f.set(d);for(let y=1;y=256)throw new Error("Depth too large!");return b$(Tt([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",le(this.depth),this.parentFingerprint,Rt(le(this.index),4),this.chainCode,this.privateKey!=null?Tt(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new is(bu,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&~qu));const n=new Uint8Array(37);if(e&qu){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(ue(this.privateKey),1),r&&(r+="'")}else n.set(ue(this.publicKey));for(let u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const s=ue(Yd(Bf.sha512,this.chainCode,n)),i=s.slice(0,32),o=s.slice(32);let a=null,c=null;this.privateKey?a=fp(ne.from(i).add(this.privateKey).mod(Mne)):c=new Wc(le(i))._addPoint(this.publicKey);let l=r;const f=this.mnemonic;return f&&(l=Object.freeze({phrase:f.phrase,path:r,locale:f.locale||"en"})),new is(bu,a,c,this.fingerprint,fp(o),e,this.depth+1,l)}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 s=0;s=qu)throw new Error("invalid path index - "+i);n=n._derive(qu+o)}else if(i.match(/^[0-9]+$/)){const o=parseInt(i);if(o>=qu)throw new Error("invalid path index - "+i);n=n._derive(o)}else throw new Error("invalid path component - "+i)}return n}static _fromSeed(e,r){const n=ue(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const s=ue(Yd(Bf.sha512,Nne,n));return new is(bu,fp(s.slice(0,32)),null,"0x00000000",fp(s.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=G4(n),e=ny(ry(e,n),n),is._fromSeed(K4(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return is._fromSeed(e,null)}static fromExtendedKey(e){const r=Lf.decode(e);(r.length!==82||b$(r.slice(0,78))!==e)&&ev.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],s=le(r.slice(5,9)),i=parseInt(le(r.slice(9,13)).substring(2),16),o=le(r.slice(13,45)),a=r.slice(45,78);switch(le(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new is(bu,null,le(a),s,o,i,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new is(bu,le(a.slice(1)),null,s,o,i,n,null)}return ev.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function K4(t,e){e||(e="");const r=_t("mnemonic"+e,Zi.NFKD);return V4(_t(t,Zi.NFKD),r,2048,64,"sha512")}function ry(t,e){e=G4(e),ev.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=ue(new Uint8Array(Math.ceil(11*r.length/8)));let s=0;for(let l=0;l>3]|=1<<7-s%8),s++}const i=32*r.length/3,o=r.length/3,a=mD(o);if((ue(zo(n.slice(0,i/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return le(n.slice(0,i/8))}function ny(t,e){if(e=G4(e),t=ue(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]&jne(8-n)),n+=3);const s=t.length/4,i=ue(zo(t))[0]&mD(s);return r[r.length-1]<<=s,r[r.length-1]|=i>>8-s,e.join(r.map(o=>e.getWord(o)))}function gD(t,e){try{return ry(t,e),!0}catch{}return!1}function bD(t){return(typeof t!="number"||t<0||t>=qu||t%1)&&ev.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const Dne=Object.freeze(Object.defineProperty({__proto__:null,HDNode:is,defaultPath:Ff,entropyToMnemonic:ny,getAccountPath:bD,isValidMnemonic:gD,mnemonicToEntropy:ry,mnemonicToSeed:K4},Symbol.toStringTag,{value:"Module"})),Lne="random/5.7.0",YC=new oe(Lne);function Bne(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Yn<"u")return Yn;throw new Error("unable to locate global object")}const x$=Bne();let xm=x$.crypto||x$.msCrypto;(!xm||!xm.getRandomValues)&&(YC.warn("WARNING: Missing strong random number source"),xm={getRandomValues:function(t){return YC.throwError("no secure random source avaialble",oe.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Wi(t){(t<=0||t>1024||t%1||t!=t)&&YC.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return xm.getRandomValues(e),ue(e)}function Y4(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}const Fne=Object.freeze(Object.defineProperty({__proto__:null,randomBytes:Wi,shuffled:Y4},Symbol.toStringTag,{value:"Module"}));var xD={exports:{}};(function(t,e){(function(r){function n(P){return parseInt(P)===P}function s(P){if(!n(P.length))return!1;for(var E=0;E255)return!1;return!0}function i(P,E){if(P.buffer&&ArrayBuffer.isView(P)&&P.name==="Uint8Array")return E&&(P.slice?P=P.slice():P=Array.prototype.slice.call(P)),P;if(Array.isArray(P)){if(!s(P))throw new Error("Array contains invalid value: "+P);return new Uint8Array(P)}if(n(P.length)&&s(P))return new Uint8Array(P);throw new Error("unsupported array-like object")}function o(P){return new Uint8Array(P)}function a(P,E,L,q,_){(q!=null||_!=null)&&(P.slice?P=P.slice(q,_):P=Array.prototype.slice.call(P,q,_)),E.set(P,L)}var c=function(){function P(L){var q=[],_=0;for(L=encodeURI(L);_191&&U<224?(q.push(String.fromCharCode((U&31)<<6|L[_+1]&63)),_+=2):(q.push(String.fromCharCode((U&15)<<12|(L[_+1]&63)<<6|L[_+2]&63)),_+=3)}return q.join("")}return{toBytes:P,fromBytes:E}}(),l=function(){function P(q){for(var _=[],U=0;U>4]+E[W&15])}return _.join("")}return{toBytes:P,fromBytes:L}}(),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],d=[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],h=[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],v=[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],y=[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],m=[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],g=[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],b=[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],x=[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],k=[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],$=[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],I=[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],M=[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],D=[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],H=[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(P){for(var E=[],L=0;L>2,this._Ke[U][E%4]=_[E],this._Kd[P-U][E%4]=_[E];for(var W=0,J=q,X;J>16&255]<<24^d[X>>8&255]<<16^d[X&255]<<8^d[X>>24&255]^u[W]<<24,W+=1,q!=8)for(var E=1;E>8&255]<<8^d[X>>16&255]<<16^d[X>>24&255]<<24;for(var E=q/2+1;E>2,ee=J%4,this._Ke[re][ee]=_[E],this._Kd[P-re][ee]=_[E++],J++}for(var re=1;re>24&255]^M[X>>16&255]^D[X>>8&255]^H[X&255]},V.prototype.encrypt=function(P){if(P.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var E=this._Ke.length-1,L=[0,0,0,0],q=G(P),_=0;_<4;_++)q[_]^=this._Ke[0][_];for(var U=1;U>24&255]^y[q[(_+1)%4]>>16&255]^m[q[(_+2)%4]>>8&255]^g[q[(_+3)%4]&255]^this._Ke[U][_];q=L.slice()}for(var W=o(16),J,_=0;_<4;_++)J=this._Ke[E][_],W[4*_]=(d[q[_]>>24&255]^J>>24)&255,W[4*_+1]=(d[q[(_+1)%4]>>16&255]^J>>16)&255,W[4*_+2]=(d[q[(_+2)%4]>>8&255]^J>>8)&255,W[4*_+3]=(d[q[(_+3)%4]&255]^J)&255;return W},V.prototype.decrypt=function(P){if(P.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var E=this._Kd.length-1,L=[0,0,0,0],q=G(P),_=0;_<4;_++)q[_]^=this._Kd[0][_];for(var U=1;U>24&255]^x[q[(_+3)%4]>>16&255]^k[q[(_+2)%4]>>8&255]^$[q[(_+1)%4]&255]^this._Kd[U][_];q=L.slice()}for(var W=o(16),J,_=0;_<4;_++)J=this._Kd[E][_],W[4*_]=(h[q[_]>>24&255]^J>>24)&255,W[4*_+1]=(h[q[(_+3)%4]>>16&255]^J>>16)&255,W[4*_+2]=(h[q[(_+2)%4]>>8&255]^J>>8)&255,W[4*_+3]=(h[q[(_+1)%4]&255]^J)&255;return W};var Q=function(P){if(!(this instanceof Q))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new V(P)};Q.prototype.encrypt=function(P){if(P=i(P),P.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var E=o(P.length),L=o(16),q=0;q=0;--E)this._counter[E]=P%256,P=P>>8},T.prototype.setBytes=function(P){if(P=i(P,!0),P.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=P},T.prototype.increment=function(){for(var P=15;P>=0;P--)if(this._counter[P]===255)this._counter[P]=0;else{this._counter[P]++;break}};var R=function(P,E){if(!(this instanceof R))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",E instanceof T||(E=new T(E)),this._counter=E,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new V(P)};R.prototype.encrypt=function(P){for(var E=i(P,!0),L=0;L16)throw new Error("PKCS#7 padding byte out of range");for(var L=P.length-E,q=0;q=64;){let B=g,P=b,E=x,L=k,q=$,_=I,U=M,W=D,J,X,re,ee,se;for(X=0;X<16;X++)re=A+X*4,H[X]=(R[re]&255)<<24|(R[re+1]&255)<<16|(R[re+2]&255)<<8|R[re+3]&255;for(X=16;X<64;X++)J=H[X-2],ee=(J>>>17|J<<15)^(J>>>19|J<<13)^J>>>10,J=H[X-15],se=(J>>>7|J<<25)^(J>>>18|J<<14)^J>>>3,H[X]=(ee+H[X-7]|0)+(se+H[X-16]|0)|0;for(X=0;X<64;X++)ee=(((q>>>6|q<<26)^(q>>>11|q<<21)^(q>>>25|q<<7))+(q&_^~q&U)|0)+(W+(m[X]+H[X]|0)|0)|0,se=((B>>>2|B<<30)^(B>>>13|B<<19)^(B>>>22|B<<10))+(B&P^B&E^P&E)|0,W=U,U=_,_=q,q=L+ee|0,L=E,E=P,P=B,B=ee+se|0;g=g+B|0,b=b+P|0,x=x+E|0,k=k+L|0,$=$+q|0,I=I+_|0,M=M+U|0,D=D+W|0,A+=64,N-=64}}G(y);let V,Q=y.length%64,F=y.length/536870912|0,C=y.length<<3,S=Q<56?56:120,T=y.slice(y.length-Q,y.length);for(T.push(128),V=Q+1;V>>24&255),T.push(F>>>16&255),T.push(F>>>8&255),T.push(F>>>0&255),T.push(C>>>24&255),T.push(C>>>16&255),T.push(C>>>8&255),T.push(C>>>0&255),G(T),[g>>>24&255,g>>>16&255,g>>>8&255,g>>>0&255,b>>>24&255,b>>>16&255,b>>>8&255,b>>>0&255,x>>>24&255,x>>>16&255,x>>>8&255,x>>>0&255,k>>>24&255,k>>>16&255,k>>>8&255,k>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>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,D>>>24&255,D>>>16&255,D>>>8&255,D>>>0&255]}function i(y,m,g){y=y.length<=64?y:s(y);const b=64+m.length+4,x=new Array(b),k=new Array(64);let $,I=[];for($=0;$<64;$++)x[$]=54;for($=0;$=b-4;D--){if(x[D]++,x[D]<=255)return;x[D]=0}}for(;g>=32;)M(),I=I.concat(s(k.concat(s(x)))),g-=32;return g>0&&(M(),I=I.concat(s(k.concat(s(x))).slice(0,g))),I}function o(y,m,g,b,x){let k;for(f(y,(2*g-1)*16,x,0,16),k=0;k<2*g;k++)l(y,k*16,x,16),c(x,b),f(x,0,y,m+k*16,16);for(k=0;k>>32-m}function c(y,m){f(y,0,m,0,16);for(let g=8;g>0;g-=2)m[4]^=a(m[0]+m[12],7),m[8]^=a(m[4]+m[0],9),m[12]^=a(m[8]+m[4],13),m[0]^=a(m[12]+m[8],18),m[9]^=a(m[5]+m[1],7),m[13]^=a(m[9]+m[5],9),m[1]^=a(m[13]+m[9],13),m[5]^=a(m[1]+m[13],18),m[14]^=a(m[10]+m[6],7),m[2]^=a(m[14]+m[10],9),m[6]^=a(m[2]+m[14],13),m[10]^=a(m[6]+m[2],18),m[3]^=a(m[15]+m[11],7),m[7]^=a(m[3]+m[15],9),m[11]^=a(m[7]+m[3],13),m[15]^=a(m[11]+m[7],18),m[1]^=a(m[0]+m[3],7),m[2]^=a(m[1]+m[0],9),m[3]^=a(m[2]+m[1],13),m[0]^=a(m[3]+m[2],18),m[6]^=a(m[5]+m[4],7),m[7]^=a(m[6]+m[5],9),m[4]^=a(m[7]+m[6],13),m[5]^=a(m[4]+m[7],18),m[11]^=a(m[10]+m[9],7),m[8]^=a(m[11]+m[10],9),m[9]^=a(m[8]+m[11],13),m[10]^=a(m[9]+m[8],18),m[12]^=a(m[15]+m[14],7),m[13]^=a(m[12]+m[15],9),m[14]^=a(m[13]+m[12],13),m[15]^=a(m[14]+m[13],18);for(let g=0;g<16;++g)y[g]+=m[g]}function l(y,m,g,b){for(let x=0;x=256)return!1}return!0}function d(y,m){if(typeof y!="number"||y%1)throw new Error("invalid "+m);return y}function h(y,m,g,b,x,k,$){if(g=d(g,"N"),b=d(b,"r"),x=d(x,"p"),k=d(k,"dkLen"),g===0||g&g-1)throw new Error("N must be power of 2");if(g>2147483647/128/b)throw new Error("N too large");if(b>2147483647/128/x)throw new Error("r too large");if(!u(y))throw new Error("password must be an array or buffer");if(y=Array.prototype.slice.call(y),!u(m))throw new Error("salt must be an array or buffer");m=Array.prototype.slice.call(m);let I=i(y,m,x*128*b);const M=new Uint32Array(x*32*b);for(let q=0;qP&&(q=P);for(let U=0;UP&&(q=P);for(let U=0;U>0&255),I.push(M[U]>>8&255),I.push(M[U]>>16&255),I.push(M[U]>>24&255);const _=i(y,I,k);return $&&$(null,1,_),_}$&&E(L)};if(!$)for(;;){const q=L();if(q!=null)return q}L()}const v={scrypt:function(y,m,g,b,x,k,$){return new Promise(function(I,M){let D=0;$&&$(0),h(y,m,g,b,x,k,function(H,G,V){if(H)M(H);else if(V)$&&D!==1&&$(1),I(new Uint8Array(V));else if($&&G!==D)return D=G,$(G)})})},syncScrypt:function(y,m,g,b,x,k){return new Uint8Array(h(y,m,g,b,x,k))}};t.exports=v})()})(ED);var Hne=ED.exports;const X4=Fs(Hne);var Vne=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{l(n.next(f))}catch(u){o(u)}}function c(f){try{l(n.throw(f))}catch(u){o(u)}}function l(f){f.done?i(f.value):s(f.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const QC=new oe(wD);function w$(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}class Gne extends Il{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function Kne(t,e,r){if(Lr(t,"crypto/cipher")==="aes-128-ctr"){const s=xf(Lr(t,"crypto/cipherparams/iv")),i=new So.Counter(s),o=new So.ModeOfOperation.ctr(e,i);return ue(o.decrypt(r))}return null}function kD(t,e){const r=xf(Lr(t,"crypto/ciphertext"));if(le(Ne(Tt([e.slice(16,32),r]))).substring(2)!==Lr(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const s=Kne(t,e.slice(0,16),r);s||QC.throwError("unsupported cipher",oe.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const i=e.slice(32,64),o=ya(s);if(t.address){let c=t.address.toLowerCase();if(c.substring(0,2)!=="0x"&&(c="0x"+c),He(c)!==o)throw new Error("address mismatch")}const a={_isKeystoreAccount:!0,address:o,privateKey:le(s)};if(Lr(t,"x-ethers/version")==="0.1"){const c=xf(Lr(t,"x-ethers/mnemonicCiphertext")),l=xf(Lr(t,"x-ethers/mnemonicCounter")),f=new So.Counter(l),u=new So.ModeOfOperation.ctr(i,f),d=Lr(t,"x-ethers/path")||Ff,h=Lr(t,"x-ethers/locale")||"en",v=ue(u.decrypt(c));try{const y=ny(v,h),m=is.fromMnemonic(y,null,h).derivePath(d);if(m.privateKey!=a.privateKey)throw new Error("mnemonic mismatch");a.mnemonic=m.mnemonic}catch(y){if(y.code!==oe.errors.INVALID_ARGUMENT||y.argument!=="wordlist")throw y}}return new Gne(a)}function SD(t,e,r,n,s){return ue(V4(t,e,r,n,s))}function Yne(t,e,r,n,s){return Promise.resolve(SD(t,e,r,n,s))}function AD(t,e,r,n,s){const i=Q4(e),o=Lr(t,"crypto/kdf");if(o&&typeof o=="string"){const a=function(c,l){return QC.throwArgumentError("invalid key-derivation function parameters",c,l)};if(o.toLowerCase()==="scrypt"){const c=xf(Lr(t,"crypto/kdfparams/salt")),l=parseInt(Lr(t,"crypto/kdfparams/n")),f=parseInt(Lr(t,"crypto/kdfparams/r")),u=parseInt(Lr(t,"crypto/kdfparams/p"));(!l||!f||!u)&&a("kdf",o),l&l-1&&a("N",l);const d=parseInt(Lr(t,"crypto/kdfparams/dklen"));return d!==32&&a("dklen",d),n(i,c,l,f,u,64,s)}else if(o.toLowerCase()==="pbkdf2"){const c=xf(Lr(t,"crypto/kdfparams/salt"));let l=null;const f=Lr(t,"crypto/kdfparams/prf");f==="hmac-sha256"?l="sha256":f==="hmac-sha512"?l="sha512":a("prf",f);const u=parseInt(Lr(t,"crypto/kdfparams/c")),d=parseInt(Lr(t,"crypto/kdfparams/dklen"));return d!==32&&a("dklen",d),r(i,c,u,d,l)}}return QC.throwArgumentError("unsupported key-derivation function","kdf",o)}function $D(t,e){const r=JSON.parse(t),n=AD(r,e,SD,X4.syncScrypt);return kD(r,n)}function _D(t,e,r){return Vne(this,void 0,void 0,function*(){const n=JSON.parse(t),s=yield AD(n,e,Yne,X4.scrypt,r);return kD(n,s)})}function PD(t,e,r,n){try{if(He(t.address)!==ya(t.privateKey))throw new Error("address/privateKey mismatch");if(w$(t)){const m=t.mnemonic;if(is.fromMnemonic(m.phrase,null,m.locale).derivePath(m.path||Ff).privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(m){return Promise.reject(m)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});const s=ue(t.privateKey),i=Q4(e);let o=null,a=null,c=null;if(w$(t)){const m=t.mnemonic;o=ue(ry(m.phrase,m.locale||"en")),a=m.path||Ff,c=m.locale||"en"}let l=r.client;l||(l="ethers.js");let f=null;r.salt?f=ue(r.salt):f=Wi(32);let u=null;if(r.iv){if(u=ue(r.iv),u.length!==16)throw new Error("invalid iv")}else u=Wi(16);let d=null;if(r.uuid){if(d=ue(r.uuid),d.length!==16)throw new Error("invalid uuid")}else d=Wi(16);let h=1<<17,v=8,y=1;return r.scrypt&&(r.scrypt.N&&(h=r.scrypt.N),r.scrypt.r&&(v=r.scrypt.r),r.scrypt.p&&(y=r.scrypt.p)),X4.scrypt(i,f,h,v,y,64,n).then(m=>{m=ue(m);const g=m.slice(0,16),b=m.slice(16,32),x=m.slice(32,64),k=new So.Counter(u),$=new So.ModeOfOperation.ctr(g,k),I=ue($.encrypt(s)),M=Ne(Tt([b,I])),D={address:t.address.substring(2).toLowerCase(),id:qne(d),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:le(u).substring(2)},ciphertext:le(I).substring(2),kdf:"scrypt",kdfparams:{salt:le(f).substring(2),n:h,dklen:32,p:y,r:v},mac:M.substring(2)}};if(o){const H=Wi(16),G=new So.Counter(H),V=new So.ModeOfOperation.ctr(x,G),Q=ue(V.encrypt(o)),F=new Date,C=F.getUTCFullYear()+"-"+gh(F.getUTCMonth()+1,2)+"-"+gh(F.getUTCDate(),2)+"T"+gh(F.getUTCHours(),2)+"-"+gh(F.getUTCMinutes(),2)+"-"+gh(F.getUTCSeconds(),2)+".0Z";D["x-ethers"]={client:l,gethFilename:"UTC--"+C+"--"+D.address,mnemonicCounter:le(H).substring(2),mnemonicCiphertext:le(Q).substring(2),path:a,locale:c,version:"0.1"}}return JSON.stringify(D)})}function ID(t,e,r){if(O2(t)){r&&r(0);const n=J4(t,e);return r&&r(1),Promise.resolve(n)}return R2(t)?_D(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}function TD(t,e){if(O2(t))return J4(t,e);if(R2(t))return $D(t,e);throw new Error("invalid JSON wallet")}const Qne=Object.freeze(Object.defineProperty({__proto__:null,decryptCrowdsale:J4,decryptJsonWallet:ID,decryptJsonWalletSync:TD,decryptKeystore:_D,decryptKeystoreSync:$D,encryptKeystore:PD,getJsonWalletAddress:CD,isCrowdsaleWallet:O2,isKeystoreWallet:R2},Symbol.toStringTag,{value:"Module"})),Jne="wallet/5.7.0";var C$=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{l(n.next(f))}catch(u){o(u)}}function c(f){try{l(n.throw(f))}catch(u){o(u)}}function l(f){f.done?i(f.value):s(f.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const xu=new oe(Jne);function Xne(t){return t!=null&&Ke(t.privateKey,32)&&t.address!=null}function Zne(t){const e=t.mnemonic;return e&&e.phrase}let OD=class Uu extends rl{constructor(e,r){if(super(),Xne(e)){const n=new Wc(e.privateKey);if(ve(this,"_signingKey",()=>n),ve(this,"address",ya(this.publicKey)),this.address!==He(e.address)&&xu.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),Zne(e)){const s=e.mnemonic;ve(this,"_mnemonic",()=>({phrase:s.phrase,path:s.path||Ff,locale:s.locale||"en"}));const i=this.mnemonic,o=is.fromMnemonic(i.phrase,null,i.locale).derivePath(i.path);ya(o.privateKey)!==this.address&&xu.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else ve(this,"_mnemonic",()=>null)}else{if(Wc.isSigningKey(e))e.curve!=="secp256k1"&&xu.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),ve(this,"_signingKey",()=>e);else{typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e="0x"+e);const n=new Wc(e);ve(this,"_signingKey",()=>n)}ve(this,"_mnemonic",()=>null),ve(this,"address",ya(this.publicKey))}r&&!Qa.isProvider(r)&&xu.throwArgumentError("invalid provider","provider",r),ve(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 Uu(this,e)}signTransaction(e){return Mt(e).then(r=>{r.from!=null&&(He(r.from)!==this.address&&xu.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);const n=this._signingKey().signDigest(Ne(Ig(r)));return Ig(r,n)})}signMessage(e){return C$(this,void 0,void 0,function*(){return Cg(this._signingKey().signDigest(Zv(e)))})}_signTypedData(e,r,n){return C$(this,void 0,void 0,function*(){const s=yield jr.resolveNames(e,r,n,i=>(this.provider==null&&xu.throwError("cannot resolve ENS names without a provider",oe.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:i}),this.provider.resolveName(i)));return Cg(this._signingKey().signDigest(jr.hash(s.domain,r,s.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={}),PD(this,e,r,n)}static createRandom(e){let r=Wi(16);e||(e={}),e.extraEntropy&&(r=ue(fr(Ne(Tt([r,e.extraEntropy])),0,16)));const n=ny(r,e.locale);return Uu.fromMnemonic(n,e.path,e.locale)}static fromEncryptedJson(e,r,n){return ID(e,r,n).then(s=>new Uu(s))}static fromEncryptedJsonSync(e,r){return new Uu(TD(e,r))}static fromMnemonic(e,r,n){return r||(r=Ff),new Uu(is.fromMnemonic(e,null,n).derivePath(r))}};function Z4(t,e){return sl(Zv(t),e)}function RD(t,e,r,n){return sl(jr.hash(t,e,r),n)}const ese=Object.freeze(Object.defineProperty({__proto__:null,Wallet:OD,verifyMessage:Z4,verifyTypedData:RD},Symbol.toStringTag,{value:"Module"})),tse="networks/5.7.1",E$=new oe(tse);function rse(t){return t&&typeof t.renetwork=="function"}function sa(t){const e=function(r,n){n==null&&(n={});const s=[];if(r.InfuraProvider&&n.infura!=="-")try{s.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{s.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{s.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const i=["goerli","ropsten","rinkeby","sepolia"];try{const o=new r.PocketProvider(t,n.pocket);o.network&&i.indexOf(o.network.name)===-1&&s.push(o)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{s.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const i=["ropsten"],o=new r.AnkrProvider(t,n.ankr);o.network&&i.indexOf(o.network.name)===-1&&s.push(o)}catch{}if(s.length===0)return null;if(r.FallbackProvider){let i=1;return n.quorum!=null?i=n.quorum:t==="homestead"&&(i=2),new r.FallbackProvider(s,i)}return s[0]};return e.renetwork=function(r){return sa(r)},e}function Og(t,e){const r=function(n,s){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return Og(t,n)},r}const k$={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:sa("homestead")},S$={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:sa("ropsten")},A$={chainId:63,name:"classicMordor",_defaultProvider:Og("https://www.ethercluster.com/mordor","classicMordor")},up={unspecified:{chainId:0,name:"unspecified"},homestead:k$,mainnet:k$,morden:{chainId:2,name:"morden"},ropsten:S$,testnet:S$,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:sa("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:sa("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:sa("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:sa("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Og("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:A$,classicTestnet:A$,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Og("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:sa("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:sa("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 nse(t){if(t==null)return null;if(typeof t=="number"){for(const n in up){const s=up[n];if(s.chainId===t)return{name:s.name,chainId:s.chainId,ensAddress:s.ensAddress||null,_defaultProvider:s._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=up[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=up[t.name];if(!e)return typeof t.chainId!="number"&&E$.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&E$.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(rse(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 sse="web/5.7.1";var ise=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{l(n.next(f))}catch(u){o(u)}}function c(f){try{l(n.throw(f))}catch(u){o(u)}}function l(f){f.done?i(f.value):s(f.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};function ose(t,e){return ise(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),s=yield n.arrayBuffer(),i={};return n.headers.forEach?n.headers.forEach((o,a)=>{i[a.toLowerCase()]=o}):n.headers.keys().forEach(o=>{i[o.toLowerCase()]=n.headers.get(o)}),{headers:i,statusCode:n.status,statusMessage:n.statusText,body:ue(new Uint8Array(s))}})}var ase=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{l(n.next(f))}catch(u){o(u)}}function c(f){try{l(n.throw(f))}catch(u){o(u)}}function l(f){f.done?i(f.value):s(f.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const Ni=new oe(sse);function $$(t){return new Promise(e=>{setTimeout(e,t)})}function dc(t,e){if(t==null)return null;if(typeof t=="string")return t;if(Ji(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Ei(t)}catch{}return le(t)}return t}function cse(t){return _t(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function ek(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;Ni.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const s=typeof t=="object"?t.throttleCallback:null,i=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;Ni.assertArgument(i>0&&i%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",i);const o=typeof t=="object"?!!t.errorPassThrough:!1,a={};let c=null;const l={method:"GET"};let f=!1,u=2*60*1e3;if(typeof t=="string")c=t;else if(typeof t=="object"){if((t==null||t.url==null)&&Ni.throwArgumentError("missing URL","connection.url",t),c=t.url,typeof t.timeout=="number"&&t.timeout>0&&(u=t.timeout),t.headers)for(const g in t.headers)a[g.toLowerCase()]={key:g,value:String(t.headers[g])},["if-none-match","if-modified-since"].indexOf(g.toLowerCase())>=0&&(f=!0);if(l.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){c.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&Ni.throwError("basic authentication requires a secure https url",oe.errors.INVALID_ARGUMENT,{argument:"url",url:c,user:t.user,password:"[REDACTED]"});const g=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+R4(_t(g))}}t.skipFetchSetup!=null&&(l.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(l.fetchOptions=Ht(t.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),h=c?c.match(d):null;if(h)try{const g={statusCode:200,statusMessage:"OK",headers:{"content-type":h[1]||"text/plain"},body:h[2]?O4(h[3]):cse(h[3])};let b=g.body;return r&&(b=r(g.body,g)),Promise.resolve(b)}catch(g){Ni.throwError("processing response error",oe.errors.SERVER_ERROR,{body:dc(h[1],h[2]),error:g,requestBody:null,requestMethod:"GET",url:c})}e&&(l.method="POST",l.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 v={};Object.keys(a).forEach(g=>{const b=a[g];v[b.key]=b.value}),l.headers=v;const y=function(){let g=null;return{promise:new Promise(function(k,$){u&&(g=setTimeout(()=>{g!=null&&(g=null,$(Ni.makeError("timeout",oe.errors.TIMEOUT,{requestBody:dc(l.body,v["content-type"]),requestMethod:l.method,timeout:u,url:c})))},u))}),cancel:function(){g!=null&&(clearTimeout(g),g=null)}}}(),m=function(){return ase(this,void 0,void 0,function*(){for(let g=0;g=300)&&(y.cancel(),Ni.throwError("bad response",oe.errors.SERVER_ERROR,{status:b.statusCode,headers:b.headers,body:dc(x,b.headers?b.headers["content-type"]:null),requestBody:dc(l.body,v["content-type"]),requestMethod:l.method,url:c})),r)try{const k=yield r(x,b);return y.cancel(),k}catch(k){if(k.throttleRetry&&g{let a=null;if(i!=null)try{a=JSON.parse(Ei(i))}catch(c){Ni.throwError("invalid JSON",oe.errors.SERVER_ERROR,{body:i,error:c})}return r&&(a=r(a,o)),a},s=null;if(e!=null){s=_t(e);const i=typeof t=="string"?{url:t}:Ht(t);i.headers?Object.keys(i.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(i.headers=Ht(i.headers),i.headers["content-type"]="application/json"):i.headers={"content-type":"application/json"},t=i}return ek(t,s,n)}function ua(t,e){return e||(e={}),e=Ht(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 s=null,i=!1;const o=()=>i?!1:(i=!0,s&&clearTimeout(s),!0);e.timeout&&(s=setTimeout(()=>{o()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let c=0;function l(){return t().then(function(f){if(f!==void 0)o()&&r(f);else if(e.oncePoll)e.oncePoll.once("poll",l);else if(e.onceBlock)e.onceBlock.once("block",l);else if(!i){if(c++,c>a){o()&&n(new Error("retry limit reached"));return}let u=e.interval*parseInt(String(Math.random()*Math.pow(2,c)));ue.ceiling&&(u=e.ceiling),setTimeout(l,u)}return null},function(f){o()&&n(f)})}l()})}const lse=Object.freeze(Object.defineProperty({__proto__:null,_fetchData:ek,fetchJson:A1,poll:ua},Symbol.toStringTag,{value:"Module"}));var Rg="qpzry9x8gf2tvdw0s3jn54khce6mua7l",JC={};for(var dp=0;dp>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 MD(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=$d(e)^n>>5}for(e=$d(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=MD(t);if(typeof n=="string")throw new Error(n);for(var s=t+"1",i=0;i>5)throw new Error("Non 5-bit word");n=$d(n)^o,s+=Rg.charAt(o)}for(i=0;i<6;++i)n=$d(n);for(n^=1,i=0;i<6;++i){var a=n>>(5-i)*5&31;s+=Rg.charAt(a)}return s}function ND(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 s=t.lastIndexOf("1");if(s===-1)return"No separator character for "+t;if(s===0)return"Missing prefix for "+t;var i=t.slice(0,s),o=t.slice(s+1);if(o.length<6)return"Data too short";var a=MD(i);if(typeof a=="string")return a;for(var c=[],l=0;l=o.length)&&c.push(u)}return a!==1?"Invalid checksum for "+t:{prefix:i,words:c}}function use(){var t=ND.apply(null,arguments);if(typeof t=="object")return t}function dse(t){var e=ND.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function M2(t,e,r,n){for(var s=0,i=0,o=(1<=r;)i-=r,a.push(s>>i&o);if(n)i>0&&a.push(s<=e)return"Excess padding";if(s<this.data(u,!0);return e.transaction={hash:o,type:l,accessList:ke.allowNull(this.accessList.bind(this),null),blockHash:ke.allowNull(o,null),blockNumber:ke.allowNull(c,null),transactionIndex:ke.allowNull(c,null),confirmations:ke.allowNull(c,null),from:r,gasPrice:ke.allowNull(n),maxPriorityFeePerGas:ke.allowNull(n),maxFeePerGas:ke.allowNull(n),gasLimit:n,to:ke.allowNull(r,null),value:n,nonce:c,data:i,r:ke.allowNull(this.uint256),s:ke.allowNull(this.uint256),v:ke.allowNull(c),creates:ke.allowNull(r,null),raw:ke.allowNull(i)},e.transactionRequest={from:ke.allowNull(r),nonce:ke.allowNull(c),gasLimit:ke.allowNull(n),gasPrice:ke.allowNull(n),maxPriorityFeePerGas:ke.allowNull(n),maxFeePerGas:ke.allowNull(n),to:ke.allowNull(r),value:ke.allowNull(n),data:ke.allowNull(f),type:ke.allowNull(c),accessList:ke.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:c,blockNumber:c,transactionHash:o,address:r,topics:ke.arrayOf(o),data:i,logIndex:c,blockHash:o},e.receipt={to:ke.allowNull(this.address,null),from:ke.allowNull(this.address,null),contractAddress:ke.allowNull(r,null),transactionIndex:c,root:ke.allowNull(a),gasUsed:n,logsBloom:ke.allowNull(i),blockHash:o,transactionHash:o,logs:ke.arrayOf(this.receiptLog.bind(this)),blockNumber:c,confirmations:ke.allowNull(c,null),cumulativeGasUsed:n,effectiveGasPrice:ke.allowNull(n),status:ke.allowNull(c),type:l},e.block={hash:ke.allowNull(o),parentHash:o,number:c,timestamp:c,nonce:ke.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:ke.allowNull(r),extraData:i,transactions:ke.allowNull(ke.arrayOf(o)),baseFeePerGas:ke.allowNull(n)},e.blockWithTransactions=Ht(e.block),e.blockWithTransactions.transactions=ke.allowNull(ke.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:ke.allowNull(s,void 0),toBlock:ke.allowNull(s,void 0),blockHash:ke.allowNull(o,void 0),address:ke.allowNull(r,void 0),topics:ke.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:ke.allowNull(c),blockHash:ke.allowNull(o),transactionIndex:c,removed:ke.allowNull(this.boolean.bind(this)),address:r,data:ke.allowFalsish(i,"0x"),topics:ke.arrayOf(o),transactionHash:o,logIndex:c},e}accessList(e){return Ol(e||[])}number(e){return e==="0x"?0:ne.from(e).toNumber()}type(e){return e==="0x"||e==null?0:ne.from(e).toNumber()}bigNumber(e){return ne.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),Ke(e))?e.toLowerCase():bh.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 He(e)}callAddress(e){if(!Ke(e,32))return null;const r=He(fr(e,12));return r===Lt?null:r}contractAddress(e){return E2(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"||Ke(e))return ui(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return Xi(n)!==32?bh.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=ne.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!Ke(e))throw new Error("invalid uint256");return Rt(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,s=ke.check(r,e);return s._difficulty=n==null?null:ne.from(n),s}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return ke.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&ne.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=ke.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;Ke(n)&&(n=ne.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),Ke(n)&&(n=ne.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 U4(e)}receiptLog(e){return ke.check(this.formats.receiptLog,e)}receipt(e){const r=ke.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=ne.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&bh.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):bh.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&bh.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 ke.check(this.formats.filter,e)}filterLog(e){return ke.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const s in e)try{const i=e[s](r[s]);i!==void 0&&(n[s]=i)}catch(i){throw i.checkKey=s,i.checkValue=r[s],i}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(s){n.push(e(s))}),n}}}function gse(t){return t&&typeof t.isCommunityResource=="function"}function P$(t){return gse(t)&&t.isCommunityResource()}var We=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{l(n.next(f))}catch(u){o(u)}}function c(f){try{l(n.throw(f))}catch(u){o(u)}}function l(f){f.done?i(f.value):s(f.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const st=new oe($1),bse=10;function I$(t){return t==null?"null":(Xi(t)!==32&&st.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function T$(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(s=>{r[I$(s)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return I$(e)}).join("&")}function xse(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 wu(t){if(typeof t=="string"){if(t=t.toLowerCase(),Xi(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+T$(t);if(xte.isForkEvent(t))throw st.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+T$(t.topics||[])}throw new Error("invalid event - "+t)}function xh(){return new Date().getTime()}function O$(t){return new Promise(e=>{setTimeout(e,t)})}const wse=["block","network","pending","poll"];let Cse=class{constructor(e,r,n){ve(this,"tag",e),ve(this,"listener",r),ve(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=xse(e[2]),s={};return n.length>0&&(s.topics=n),r&&r!=="*"&&(s.address=r),s}pollable(){return this.tag.indexOf(":")>=0||wse.indexOf(this.tag)>=0}};const Ese={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 E5(t){return Rt(ne.from(t).toHexString(),32)}function R$(t){return Lf.encode(Tt([t,fr(zo(zo(t)),0,4)]))}const jD=new RegExp("^(ipfs)://(.*)$","i"),M$=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),jD,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function wm(t,e){try{return Ei(tv(t,e))}catch{}return null}function tv(t,e){if(t==="0x")return null;const r=ne.from(fr(t,e,e+32)).toNumber(),n=ne.from(fr(t,r,r+32)).toNumber();return fr(t,r+32,r+32+n)}function k5(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):st.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function N$(t){const e=ue(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 kse(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function DD(t){const e=[];let r=0;for(let n=0;nne.from(e).eq(1)).catch(e=>{if(e.code===oe.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:In([e,Ad(this.name),r||"0x"])};let s=!1;(yield this.supportsWildcard())&&(s=!0,n.data=In(["0x9061b923",DD([M4(this.name),n.data])]));try{let i=yield this.provider.call(n);return ue(i).length%32===4&&st.throwError("resolver threw error",oe.errors.CALL_EXCEPTION,{transaction:n,data:i}),s&&(i=tv(i,0)),i}catch(i){if(i.code===oe.errors.CALL_EXCEPTION)return null;throw i}})}_fetchBytes(e,r){return We(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?tv(n,0):null})}_getAddress(e,r){const n=Ese[String(e)];if(n==null&&st.throwError(`unsupported coin type: ${e}`,oe.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const s=ue(r);if(n.p2pkh!=null){const i=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(i){const o=parseInt(i[1],16);if(i[2].length===o*2&&o>=1&&o<=75)return R$(Tt([[n.p2pkh],"0x"+i[2]]))}}if(n.p2sh!=null){const i=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(i){const o=parseInt(i[1],16);if(i[2].length===o*2&&o>=1&&o<=75)return R$(Tt([[n.p2sh],"0x"+i[2]]))}}if(n.prefix!=null){const i=s[1];let o=s[0];if(o===0?i!==20&&i!==32&&(o=-1):o=-1,o>=0&&s.length===2+i&&i>=1&&i<=75){const a=_$.toWords(s.slice(2));return a.unshift(o),_$.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 s=yield this._fetch("0x3b3b57de");return s==="0x"||s===Sg?null:this.provider.formatter.callAddress(s)}catch(s){if(s.code===oe.errors.CALL_EXCEPTION)return null;throw s}const r=yield this._fetchBytes("0xf1cb7e06",E5(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&st.throwError("invalid or unsupported coin data",oe.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[c])}return st.throwError("invalid or unsupported content hash data",oe.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return We(this,void 0,void 0,function*(){let r=_t(e);r=Tt([E5(64),E5(r.length),r]),r.length%32!==0&&(r=Tt([r,Rt("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",le(r));return n==null||n==="0x"?null:Ei(n)})}}let S5=null,Sse=1;class N2 extends Qa{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),ve(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=li(new.target,"getNetwork")(e);r?(ve(this,"_network",r),this.emit("network",r,null)):st.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||st.throwError("no network detected",oe.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:ve(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return ua(()=>this._ready().then(e=>e,e=>{if(!(e.code===oe.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return S5==null&&(S5=new ke),S5}static getNetwork(e){return nse(e??"homestead")}ccipReadFetch(e,r,n){return We(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const s=e.to.toLowerCase(),i=r.toLowerCase(),o=[];for(let a=0;a=0?null:JSON.stringify({data:i,sender:s}),u=yield A1({url:l,errorPassThrough:!0},f,(h,v)=>(h.status=v.statusCode,h));if(u.data)return u.data;const d=u.message||"unknown error";if(u.status>=400&&u.status<500)return st.throwError(`response not found during CCIP fetch: ${d}`,oe.errors.SERVER_ERROR,{url:c,errorMessage:d});o.push(d)}return st.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,oe.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 s=this._internalBlockNumber;try{const i=yield s;if(xh()-i.respTime<=e)return i.blockNumber;break}catch{if(this._internalBlockNumber===s)break}}const r=xh(),n=Mt({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(s=>null,s=>s)}).then(({blockNumber:s,networkError:i})=>{if(i)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),i;const o=xh();return s=ne.from(s).toNumber(),s{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return We(this,void 0,void 0,function*(){const e=Sse++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(s){this.emit("error",s);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)st.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",st.makeError("network block skew detected",oe.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let s=this._emitted.block+1;s<=n;s++)this.emit("block",s);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(s=>{if(s==="block")return;const i=this._emitted[s];i!=="pending"&&n-i>12&&delete this._emitted[s]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(s=>{switch(s.type){case"tx":{const i=s.hash;let o=this.getTransactionReceipt(i).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+i]=a.blockNumber,this.emit(i,a)),null)).catch(a=>{this.emit("error",a)});r.push(o);break}case"filter":{if(!s._inflight){s._inflight=!0,s._lastBlockNumber===-2&&(s._lastBlockNumber=n-1);const i=s.filter;i.fromBlock=s._lastBlockNumber+1,i.toBlock=n;const o=i.toBlock-this._maxFilterBlockRange;o>i.fromBlock&&(i.fromBlock=o),i.fromBlock<0&&(i.fromBlock=0);const a=this.getLogs(i).then(c=>{s._inflight=!1,c.length!==0&&c.forEach(l=>{l.blockNumber>s._lastBlockNumber&&(s._lastBlockNumber=l.blockNumber),this._emitted["b:"+l.blockHash]=l.blockNumber,this._emitted["t:"+l.transactionHash]=l.blockNumber,this.emit(i,l)})}).catch(c=>{this.emit("error",c),s._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(s=>{this.emit("error",s)})})}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 st.throwError("provider does not support network detection",oe.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 O$(0),this._network;const n=st.makeError("underlying network changed",oe.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=xh();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,s){return We(this,void 0,void 0,function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=r?i:new Promise((o,a)=>{const c=[];let l=!1;const f=function(){return l?!0:(l=!0,c.forEach(d=>{d()}),!1)},u=d=>{d.confirmations{this.removeListener(e,u)}),s){let d=s.startBlock,h=null;const v=y=>We(this,void 0,void 0,function*(){l||(yield O$(1e3),this.getTransactionCount(s.from).then(m=>We(this,void 0,void 0,function*(){if(!l){if(m<=s.nonce)d=y;else{{const g=yield this.getTransaction(e);if(g&&g.blockNumber!=null)return}for(h==null&&(h=d-3,h{l||this.once("block",v)}))});if(l)return;this.once("block",v),c.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){const d=setTimeout(()=>{f()||a(st.makeError("timeout exceeded",oe.errors.TIMEOUT,{timeout:n}))},n);d.unref&&d.unref(),c.push(()=>{clearTimeout(d)})}})})}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 ne.from(e)}catch(r){return st.throwError("bad result from backend",oe.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 Mt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getBalance",n);try{return ne.from(s)}catch(i){return st.throwError("bad result from backend",oe.errors.SERVER_ERROR,{method:"getBalance",params:n,result:s,error:i})}})}getTransactionCount(e,r){return We(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Mt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getTransactionCount",n);try{return ne.from(s).toNumber()}catch(i){return st.throwError("bad result from backend",oe.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:s,error:i})}})}getCode(e,r){return We(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Mt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getCode",n);try{return le(s)}catch(i){return st.throwError("bad result from backend",oe.errors.SERVER_ERROR,{method:"getCode",params:n,result:s,error:i})}})}getStorageAt(e,r,n){return We(this,void 0,void 0,function*(){yield this.getNetwork();const s=yield Mt({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>ui(o))}),i=yield this.perform("getStorageAt",s);try{return le(i)}catch(o){return st.throwError("bad result from backend",oe.errors.SERVER_ERROR,{method:"getStorageAt",params:s,result:i,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&Xi(r)!==32)throw new Error("invalid response - sendTransaction");const s=e;return r!=null&&e.hash!==r&&st.throwError("Transaction hash mismatch from Provider.sendTransaction.",oe.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),s.wait=(i,o)=>We(this,void 0,void 0,function*(){i==null&&(i=1),o==null&&(o=0);let a;i!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const c=yield this._waitForTransaction(e.hash,i,o,a);return c==null&&i===0?null:(this._emitted["t:"+e.hash]=c.blockNumber,c.status===0&&st.throwError("transaction failed",oe.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:c}),c)}),s}sendTransaction(e){return We(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(i=>le(i)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const s=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const i=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,i,s)}catch(i){throw i.transaction=n,i.transactionHash=n.hash,i}})}_getTransactionRequest(e){return We(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?this._getAddress(i):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?ne.from(i):null))}),["type"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?le(i):null))}),this.formatter.transactionRequest(yield Mt(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 Mt(r))})}_call(e,r,n){return We(this,void 0,void 0,function*(){n>=bse&&st.throwError("CCIP read exceeded maximum redirections",oe.errors.SERVER_ERROR,{redirects:n,transaction:e});const s=e.to,i=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&s!=null&&i.substring(0,10)==="0x556f1830"&&Xi(i)%32===4)try{const o=fr(i,4),a=fr(o,0,32);ne.from(a).eq(s)||st.throwError("CCIP Read sender did not match",oe.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const c=[],l=ne.from(fr(o,32,64)).toNumber(),f=ne.from(fr(o,l,l+32)).toNumber(),u=fr(o,l+32);for(let g=0;gWe(this,void 0,void 0,function*(){const i=yield this.perform("getBlock",s);if(i==null)return s.blockHash!=null&&this._emitted["b:"+s.blockHash]==null||s.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let o=null;for(let c=0;cthis._wrapTransaction(c)),a}return this.formatter.block(i)}),{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 ua(()=>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 s=this.formatter.transactionResponse(n);if(s.blockNumber==null)s.confirmations=0;else if(s.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-s.blockNumber+1;o<=0&&(o=1),s.confirmations=o}return this._wrapTransaction(s)}),{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 ua(()=>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 s=this.formatter.receipt(n);if(s.blockNumber==null)s.confirmations=0;else if(s.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-s.blockNumber+1;o<=0&&(o=1),s.confirmations=o}return s}),{oncePoll:this})})}getLogs(e){return We(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Mt({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(s=>{s.removed==null&&(s.removed=!1)}),ke.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&&st.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 s=new XC(this,n,e);return r!==e&&!(yield s.supportsWildcard())?null:s}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||st.throwError("network does not support ENS",oe.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const s=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Ad(e).substring(2)});return this.formatter.callAddress(s)}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(Ke(e))throw n}typeof e!="string"&&st.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 s=wm(yield this.call({to:n,data:"0x691f3431"+Ad(r).substring(2)}),0);return(yield this.resolveName(s))!=e?null:s})}getAvatar(e){return We(this,void 0,void 0,function*(){let r=null;if(Ke(e)){const i=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(i,"getAvatar");if(!o)return null;r=new XC(this,o,i);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==oe.errors.CALL_EXCEPTION)throw a}try{const a=wm(yield this.call({to:o,data:"0x691f3431"+Ad(i).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==oe.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 st.throwError(e+" not implemented",oe.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 s=new Cse(wu(e),r,n);return this._events.push(s),this._startEvent(s),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,s=[],i=wu(e);return this._events=this._events.filter(o=>o.tag!==i?!0:(setTimeout(()=>{o.listener.apply(this,r)},0),n=!0,o.once?(s.push(o),!1):!0)),s.forEach(o=>{this._stopEvent(o)}),n}listenerCount(e){if(!e)return this._events.length;let r=wu(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=wu(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 s=!1,i=wu(e);return this._events=this._events.filter(o=>o.tag!==i||o.listener!=r||s?!0:(s=!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=wu(e);this._events=this._events.filter(s=>s.tag!==n?!0:(r.push(s),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var Zo=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{l(n.next(f))}catch(u){o(u)}}function c(f){try{l(n.throw(f))}catch(u){o(u)}}function l(f){f.done?i(f.value):s(f.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const Hr=new oe($1),Ase=["call","estimateGas"];function c0(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=Ke(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=c0(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return c0(JSON.parse(t),e)}catch{}return null}function LD(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const i=c0(e,!0);if(i)return i.data;Hr.throwError("missing revert data in call exception; Transaction reverted without a reason string",oe.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let i=c0(e.body,!1);i==null&&(i=c0(e,!1)),i&&Hr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",oe.errors.UNPREDICTABLE_GAS_LIMIT,{reason:i.message,method:t,transaction:n,error:e})}let s=e.message;throw e.code===oe.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?s=e.error.message:typeof e.body=="string"?s=e.body:typeof e.responseText=="string"&&(s=e.responseText),s=(s||"").toLowerCase(),s.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Hr.throwError("insufficient funds for intrinsic transaction cost",oe.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),s.match(/nonce (is )?too low/i)&&Hr.throwError("nonce has already been used",oe.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),s.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Hr.throwError("replacement fee too low",oe.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),s.match(/only replay-protected/i)&&Hr.throwError("legacy pre-eip-155 transactions not supported",oe.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),Ase.indexOf(t)>=0&&s.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Hr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",oe.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function j$(t){return new Promise(function(e){setTimeout(e,t)})}function $se(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 wh(t){return t&&t.toLowerCase()}const ZC={};class BD extends rl{constructor(e,r,n){if(super(),e!==ZC)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");ve(this,"provider",r),n==null&&(n=0),typeof n=="string"?(ve(this,"_address",this.provider.formatter.address(n)),ve(this,"_index",null)):typeof n=="number"?(ve(this,"_index",n),ve(this,"_address",null)):Hr.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Hr.throwError("cannot alter JSON-RPC Signer connection",oe.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new _se(ZC,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&&Hr.throwError("unknown account #"+this._index,oe.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Ht(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=Ht(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Zo(this,void 0,void 0,function*(){if(n==null)return null;const s=yield this.provider.resolveName(n);return s==null&&Hr.throwArgumentError("provided ENS name resolves to null","tx.to",n),s}))),Mt({tx:Mt(e),sender:r}).then(({tx:n,sender:s})=>{n.from!=null?n.from.toLowerCase()!==s&&Hr.throwArgumentError("from address mismatch","transaction",e):n.from=s;const i=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[i]).then(o=>o,o=>(typeof o.message=="string"&&o.message.match(/user denied/i)&&Hr.throwError("user rejected transaction",oe.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),LD("sendTransaction",o,i)))})}signTransaction(e){return Hr.throwError("signing transactions is unsupported",oe.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Zo(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 ua(()=>Zo(this,void 0,void 0,function*(){const s=yield this.provider.getTransaction(n);if(s!==null)return this.provider._wrapTransaction(s,n,r)}),{oncePoll:this.provider})}catch(s){throw s.transactionHash=n,s}})}signMessage(e){return Zo(this,void 0,void 0,function*(){const r=typeof e=="string"?_t(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[le(r),n.toLowerCase()])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Hr.throwError("user rejected signing",oe.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),s}})}_legacySignMessage(e){return Zo(this,void 0,void 0,function*(){const r=typeof e=="string"?_t(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),le(r)])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Hr.throwError("user rejected signing",oe.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),s}})}_signTypedData(e,r,n){return Zo(this,void 0,void 0,function*(){const s=yield jr.resolveNames(e,r,n,o=>this.provider.resolveName(o)),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(jr.getPayload(s.domain,r,s.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&Hr.throwError("user rejected signing",oe.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:s.domain,types:r,value:s.value}}),o}})}unlock(e){return Zo(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class _se extends BD{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 Pse={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 N2{constructor(e,r){let n=r;n==null&&(n=new Promise((s,i)=>{setTimeout(()=>{this.detectNetwork().then(o=>{s(o)},o=>{i(o)})},0)})),super(n),e||(e=li(this.constructor,"defaultUrl")()),typeof e=="string"?ve(this,"connection",Object.freeze({url:e})):ve(this,"connection",Object.freeze(Ht(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 Zo(this,void 0,void 0,function*(){yield j$(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=li(this.constructor,"getNetwork");try{return r(ne.from(e).toNumber())}catch(n){return Hr.throwError("could not detect network",oe.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Hr.throwError("could not detect network",oe.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new BD(ZC,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:vs(n),provider:this});const s=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(s&&this._cache[e])return this._cache[e];const i=A1(this.connection,JSON.stringify(n),$se).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 s&&(this._cache[e]=i,setTimeout(()=>{this._cache[e]=null},0)),i}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[wh(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[wh(r.address),r.blockTag]];case"getCode":return["eth_getCode",[wh(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[wh(r.address),Rt(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",[li(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[li(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=wh(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return Zo(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const s=r.transaction;if(s&&s.type!=null&&ne.from(s.type).isZero()&&s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null){const i=yield this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(r=Ht(r),r.transaction=Ht(s),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&Hr.throwError(e+" not implemented",oe.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(s){return LD(e,s,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 s(){e.send("eth_getFilterChanges",[n]).then(function(i){if(e._pendingFilter!=r)return null;let o=Promise.resolve();return i.forEach(function(a){e._emitted["t:"+a.toLowerCase()]="pending",o=o.then(function(){return e.getTransaction(a).then(function(c){return e.emit("pending",c),null})})}),o.then(function(){return j$(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){s()},0),null}).catch(i=>{})}return s(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=Ht(Pse);if(r)for(const i in r)r[i]&&(n[i]=!0);w2(e,n);const s={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(i){if(e[i]==null)return;const o=ui(ne.from(e[i]));i==="gasLimit"&&(i="gas"),s[i]=o}),["from","to","data"].forEach(function(i){e[i]!=null&&(s[i]=le(e[i]))}),e.accessList&&(s.accessList=Ol(e.accessList)),s}};var Ise=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{l(n.next(f))}catch(u){o(u)}}function c(f){try{l(n.throw(f))}catch(u){o(u)}}function l(f){f.done?i(f.value):s(f.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const Tse=new oe($1);class Mg extends $a{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return Ise(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||Tse.throwError("no network detected",oe.errors.UNKNOWN_ERROR,{}),this._network==null&&(ve(this,"_network",r),this.emit("network",r,null))),r})}}var Ng=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{l(n.next(f))}catch(u){o(u)}}function c(f){try{l(n.throw(f))}catch(u){o(u)}}function l(f){f.done?i(f.value):s(f.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const nf=new oe($1);function hp(){return new Date().getTime()}function D$(t){let e=null;for(let r=0;re?null:(n+s)/2}function ad(t){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return JSON.stringify(t);if(typeof t=="string")return t;if(ne.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map(e=>ad(e)));if(typeof t=="object"){const e=Object.keys(t);return e.sort(),"{"+e.map(r=>{let n=t[r];return typeof n=="function"?n="[function]":n=ad(n),JSON.stringify(r)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof t)}let Ose=1;function B$(t){let e=null,r=null,n=new Promise(o=>{e=function(){r&&(clearTimeout(r),r=null),o()},r=setTimeout(e,t)});const s=o=>(n=n.then(o),n);function i(){return n}return{cancel:e,getPromise:i,wait:s}}const Rse=[oe.errors.CALL_EXCEPTION,oe.errors.INSUFFICIENT_FUNDS,oe.errors.NONCE_EXPIRED,oe.errors.REPLACEMENT_UNDERPRICED,oe.errors.UNPREDICTABLE_GAS_LIMIT],Mse=["address","args","errorArgs","errorSignature","method","transaction"];function vp(t,e){const r={weight:t.weight};return Object.defineProperty(r,"provider",{get:()=>t.provider}),t.start&&(r.start=t.start),e&&(r.duration=e-t.start),t.done&&(t.error?r.error=t.error:r.result=t.result||null),r}function Nse(t,e){return function(r){const n={};r.forEach(i=>{const o=t(i.result);n[o]||(n[o]={count:0,result:i.result}),n[o].count++});const s=Object.keys(n);for(let i=0;i=e)return o.result}}}function jse(t,e,r){let n=ad;switch(e){case"getBlockNumber":return function(s){const i=s.map(a=>a.result);let o=L$(s.map(a=>a.result),2);if(o!=null)return o=Math.ceil(o),i.indexOf(o+1)>=0&&o++,o>=t._highestBlockNumber&&(t._highestBlockNumber=o),t._highestBlockNumber};case"getGasPrice":return function(s){const i=s.map(o=>o.result);return i.sort(),i[Math.floor(i.length/2)]};case"getEtherPrice":return function(s){return L$(s.map(i=>i.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(s){return s==null?null:(s=Ht(s),s.confirmations=-1,ad(s))};break;case"getBlock":r.includeTransactions?n=function(s){return s==null?null:(s=Ht(s),s.transactions=s.transactions.map(i=>(i=Ht(i),i.confirmations=-1,i)),ad(s))}:n=function(s){return s==null?null:ad(s)};break;default:throw new Error("unknown method: "+e)}return Nse(n,t.quorum)}function Ch(t,e){return Ng(this,void 0,void 0,function*(){const r=t.provider;return r.blockNumber!=null&&r.blockNumber>=e||e===-1?r:ua(()=>new Promise((n,s)=>{setTimeout(function(){return r.blockNumber>=e?n(r):t.cancelled?n(null):n(void 0)},0)}),{oncePoll:r})})}function Dse(t,e,r,n){return Ng(this,void 0,void 0,function*(){let s=t.provider;switch(r){case"getBlockNumber":case"getGasPrice":return s[r]();case"getEtherPrice":if(s.getEtherPrice)return s.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&Ke(n.blockTag)&&(s=yield Ch(t,e)),s[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&Ke(n.blockTag)&&(s=yield Ch(t,e)),s.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&Ke(n.blockTag)&&(s=yield Ch(t,e)),s[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&Ke(n.blockTag)&&(s=yield Ch(t,e)),r==="call"&&n.blockTag?s[r](n.transaction,n.blockTag):s[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return s[r](n.transactionHash);case"getLogs":{let i=n.filter;return(i.fromBlock&&Ke(i.fromBlock)||i.toBlock&&Ke(i.toBlock))&&(s=yield Ch(t,e)),s.getLogs(i)}}return nf.throwError("unknown method error",oe.errors.UNKNOWN_ERROR,{method:r,params:n})})}class Lse extends N2{constructor(e,r){e.length===0&&nf.throwArgumentError("missing providers","providers",e);const n=e.map((o,a)=>{if(Qa.isProvider(o)){const f=P$(o)?2e3:750;return Object.freeze({provider:o,weight:1,stallTimeout:f,priority:1})}const c=Ht(o);c.priority==null&&(c.priority=1),c.stallTimeout==null&&(c.stallTimeout=P$(o)?2e3:750),c.weight==null&&(c.weight=1);const l=c.weight;return(l%1||l>512||l<1)&&nf.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${a}].weight`,l),Object.freeze(c)}),s=n.reduce((o,a)=>o+a.weight,0);r==null?r=s/2:r>s&&nf.throwArgumentError("quorum will always fail; larger than total weight","quorum",r);let i=D$(n.map(o=>o.provider.network));i==null&&(i=new Promise((o,a)=>{setTimeout(()=>{this.detectNetwork().then(o,a)},0)})),super(i),ve(this,"providerConfigs",Object.freeze(n)),ve(this,"quorum",r),this._highestBlockNumber=-1}detectNetwork(){return Ng(this,void 0,void 0,function*(){const e=yield Promise.all(this.providerConfigs.map(r=>r.provider.getNetwork()));return D$(e)})}perform(e,r){return Ng(this,void 0,void 0,function*(){if(e==="sendTransaction"){const c=yield Promise.all(this.providerConfigs.map(l=>l.provider.sendTransaction(r.signedTransaction).then(f=>f.hash,f=>f)));for(let l=0;lc.priority-l.priority);const i=this._highestBlockNumber;let o=0,a=!0;for(;;){const c=hp();let l=s.filter(h=>h.runner&&c-h.starth+v.weight,0);for(;l{h.staller=null}),h.runner=Dse(h,i,e,r).then(y=>{h.done=!0,h.result=y,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:vp(h,hp()),request:{method:e,params:vs(r)},provider:this})},y=>{h.done=!0,h.error=y,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:vp(h,hp()),request:{method:e,params:vs(r)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:vp(h,null),request:{method:e,params:vs(r)},provider:this}),l+=h.weight}const f=[];s.forEach(h=>{h.done||!h.runner||(f.push(h.runner),h.staller&&f.push(h.staller.getPromise()))}),f.length&&(yield Promise.race(f));const u=s.filter(h=>h.done&&h.error==null);if(u.length>=this.quorum){const h=n(u);if(h!==void 0)return s.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),h;a||(yield B$(100).getPromise()),a=!1}const d=s.reduce((h,v)=>{if(!v.done||v.error==null)return h;const y=v.error.code;return Rse.indexOf(y)>=0&&(h[y]||(h[y]={error:v.error,weight:0}),h[y].weight+=v.weight),h},{});if(Object.keys(d).forEach(h=>{const v=d[h];if(v.weight{g.staller&&g.staller.cancel(),g.cancelled=!0});const y=v.error,m={};Mse.forEach(g=>{y[g]!=null&&(m[g]=y[g])}),nf.throwError(y.reason||y.message,h,m)}),s.filter(h=>!h.done).length===0)break}return s.forEach(c=>{c.staller&&c.staller.cancel(),c.cancelled=!0}),nf.throwError("failed to meet quorum",oe.errors.SERVER_ERROR,{method:e,params:r,results:s.map(c=>vp(c)),provider:this})})}}const F$=new oe($1);let Bse=1;function z$(t,e){const r="Web3LegacyFetcher";return function(n,s){const i={method:n,params:s,id:Bse++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:vs(i),provider:this}),e(i,(c,l)=>{if(c)return this.emit("debug",{action:"response",fetcher:r,error:c,request:i,provider:this}),a(c);if(this.emit("debug",{action:"response",fetcher:r,request:i,response:l,provider:this}),l.error){const f=new Error(l.error.message);return f.code=l.error.code,f.data=l.error.data,a(f)}o(l.result)})})}}function Fse(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:vs(n),provider:this}),t.request(n).then(s=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:s,provider:this}),s})}}class FD extends $a{constructor(e,r){e==null&&F$.throwArgumentError("missing provider","provider",e);let n=null,s=null,i=null;typeof e=="function"?(n="unknown:",s=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),i=e,e.request?(n===""&&(n="eip-1193:"),s=Fse(e)):e.sendAsync?s=z$(e,e.sendAsync.bind(e)):e.send?s=z$(e,e.send.bind(e)):F$.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),ve(this,"jsonRpcFetchFunc",s),ve(this,"provider",i)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const zse="solidity/5.7.0",qse=new RegExp("^bytes([0-9]+)$"),Use=new RegExp("^(u?int)([0-9]*)$"),Wse=new RegExp("^(.*)\\[([0-9]*)\\]$"),Hse="0000000000000000000000000000000000000000000000000000000000000000",Wu=new oe(zse);function zD(t,e,r){switch(t){case"address":return r?Ed(e,32):ue(e);case"string":return _t(e);case"bytes":return ue(e);case"bool":return e=e?"0x01":"0x00",r?Ed(e,32):ue(e)}let n=t.match(Use);if(n){let s=parseInt(n[2]||"256");return(n[2]&&String(s)!==n[2]||s%8!==0||s===0||s>256)&&Wu.throwArgumentError("invalid number type","type",t),r&&(s=256),e=ne.from(e).toTwos(s),Ed(e,s/8)}if(n=t.match(qse),n){const s=parseInt(n[1]);return(String(s)!==n[1]||s===0||s>32)&&Wu.throwArgumentError("invalid bytes type","type",t),ue(e).byteLength!==s&&Wu.throwArgumentError(`invalid value for ${t}`,"value",e),r?ue((e+Hse).substring(0,66)):e}if(n=t.match(Wse),n&&Array.isArray(e)){const s=n[1];parseInt(n[2]||String(e.length))!=e.length&&Wu.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(zD(s,a,!0))}),Tt(o)}return Wu.throwArgumentError("invalid type","type",t)}function tt(t,e){t.length!=e.length&&Wu.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,s){r.push(zD(n,e[s]))}),le(Tt(r))}function pa(t,e){return Ne(tt(t,e))}function qD(t,e){return zo(tt(t,e))}const Vse=Object.freeze(Object.defineProperty({__proto__:null,keccak256:pa,pack:tt,sha256:qD},Symbol.toStringTag,{value:"Module"})),Gse="units/5.7.0",UD=new oe(Gse),WD=["wei","kwei","mwei","gwei","szabo","finney","ether"];function HD(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&UD.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 s="";for(e.length===2&&(s="."+(e[1]||"0"));s.length>2&&s[s.length-1]==="0";)s=s.substring(0,s.length-1);const i=[];for(;r.length;)if(r.length<=3){i.unshift(r);break}else{const o=r.length-3;i.unshift(r.substring(o)),r=r.substring(0,o)}return n+i.join(",")+s}function Dt(t,e){if(typeof e=="string"){const r=WD.indexOf(e);r!==-1&&(e=3*r)}return vm(t,e??18)}function _a(t,e){if(typeof t!="string"&&UD.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=WD.indexOf(e);r!==-1&&(e=3*r)}return fo(t,e??18)}function VD(t){return Dt(t,18)}function GD(t){return _a(t,18)}const Kse=Object.freeze(Object.defineProperty({__proto__:null,commify:HD,formatEther:VD,formatUnits:Dt,parseEther:GD,parseUnits:_a},Symbol.toStringTag,{value:"Module"})),Yse=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:k2,ConstructorFragment:ni,ErrorFragment:Co,EventFragment:zi,FormatTypes:yt,Fragment:qi,FunctionFragment:si,HDNode:is,Indexed:X0,Interface:Ir,LogDescription:N4,Logger:oe,ParamType:Vr,RLP:dj,SigningKey:Wc,get SupportedAlgorithm(){return Bf},TransactionDescription:j4,get TransactionTypes(){return Pg},get UnicodeNormalizationForm(){return Zi},Utf8ErrorFuncs:_4,get Utf8ErrorReason(){return Vn},_TypedDataEncoder:jr,_fetchData:ek,_toEscapedUtf8String:Ej,accessListify:Ol,arrayify:ue,base58:Lf,base64:Pj,checkProperties:w2,checkResultErrors:S4,commify:HD,computeAddress:ya,computeHmac:Yd,computePublicKey:I2,concat:Tt,deepCopy:vs,defaultAbiCoder:Dn,defaultPath:Ff,defineReadOnly:ve,dnsEncode:M4,entropyToMnemonic:ny,fetchJson:A1,formatBytes32String:kj,formatEther:VD,formatUnits:Dt,getAccountPath:bD,getAddress:He,getContractAddress:E2,getCreate2Address:yj,getIcapAddress:vj,getJsonWalletAddress:CD,getStatic:li,hashMessage:Zv,hexConcat:In,hexDataLength:Xi,hexDataSlice:fr,hexStripZeros:C4,hexValue:ui,hexZeroPad:Rt,hexlify:le,id:fa,isAddress:$4,isBytes:Ga,isBytesLike:Ji,isHexString:Ke,isValidMnemonic:gD,isValidName:Nj,joinSignature:Cg,keccak256:Ne,mnemonicToEntropy:ry,mnemonicToSeed:K4,namehash:Ad,nameprep:$j,parseBytes32String:Sj,parseEther:GD,parseTransaction:U4,parseUnits:_a,poll:ua,randomBytes:Wi,recoverAddress:sl,recoverPublicKey:z4,resolveProperties:Mt,ripemd160:H4,serializeTransaction:Ig,sha256:zo,sha512:yD,shallowCopy:Ht,shuffled:Y4,solidityKeccak256:pa,solidityPack:tt,soliditySha256:qD,splitSignature:Pl,stripZeros:Gi,toUtf8Bytes:_t,toUtf8CodePoints:J0,toUtf8String:Ei,verifyMessage:Z4,verifyTypedData:RD,zeroPad:Ed},Symbol.toStringTag,{value:"Module"})),KD="3.7.6",Qse=KD,Jse=typeof atob=="function",Xse=typeof btoa=="function",_1=typeof _l=="function",q$=typeof TextDecoder=="function"?new TextDecoder:void 0,U$=typeof TextEncoder=="function"?new TextEncoder:void 0,Zse="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Vh=Array.prototype.slice.call(Zse),yp=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(Vh),eie=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,dn=String.fromCharCode.bind(String),W$=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),YD=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),QD=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),JD=t=>{let e,r,n,s,i="";const o=t.length%3;for(let a=0;a255||(n=t.charCodeAt(a++))>255||(s=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|s,i+=Vh[e>>18&63]+Vh[e>>12&63]+Vh[e>>6&63]+Vh[e&63]}return o?i.slice(0,o-3)+"===".substring(o):i},tk=Xse?t=>btoa(t):_1?t=>_l.from(t,"binary").toString("base64"):JD,e3=_1?t=>_l.from(t).toString("base64"):t=>{let r=[];for(let n=0,s=t.length;ne?YD(e3(t)):e3(t),tie=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?dn(192|e>>>6)+dn(128|e&63):dn(224|e>>>12&15)+dn(128|e>>>6&63)+dn(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return dn(240|e>>>18&7)+dn(128|e>>>12&63)+dn(128|e>>>6&63)+dn(128|e&63)}},rie=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,XD=t=>t.replace(rie,tie),H$=_1?t=>_l.from(t,"utf8").toString("base64"):U$?t=>e3(U$.encode(t)):t=>tk(XD(t)),_d=(t,e=!1)=>e?YD(H$(t)):H$(t),V$=t=>_d(t,!0),nie=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,sie=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 dn((r>>>10)+55296)+dn((r&1023)+56320);case 3:return dn((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return dn((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},ZD=t=>t.replace(nie,sie),eL=t=>{if(t=t.replace(/\s+/g,""),!eie.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,s;for(let i=0;i>16&255):s===64?dn(e>>16&255,e>>8&255):dn(e>>16&255,e>>8&255,e&255);return r},rk=Jse?t=>atob(QD(t)):_1?t=>_l.from(t,"base64").toString("binary"):eL,tL=_1?t=>W$(_l.from(t,"base64")):t=>W$(rk(t).split("").map(e=>e.charCodeAt(0))),rL=t=>tL(nL(t)),iie=_1?t=>_l.from(t,"base64").toString("utf8"):q$?t=>q$.decode(tL(t)):t=>ZD(rk(t)),nL=t=>QD(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),t3=t=>iie(nL(t)),oie=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)},sL=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),iL=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,sL(r));t("fromBase64",function(){return t3(this)}),t("toBase64",function(e){return _d(this,e)}),t("toBase64URI",function(){return _d(this,!0)}),t("toBase64URL",function(){return _d(this,!0)}),t("toUint8Array",function(){return rL(this)})},oL=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,sL(r));t("toBase64",function(e){return Cm(this,e)}),t("toBase64URI",function(){return Cm(this,!0)}),t("toBase64URL",function(){return Cm(this,!0)})},aie=()=>{iL(),oL()},zf={version:KD,VERSION:Qse,atob:rk,atobPolyfill:eL,btoa:tk,btoaPolyfill:JD,fromBase64:t3,toBase64:_d,encode:_d,encodeURI:V$,encodeURL:V$,utob:XD,btou:ZD,decode:t3,isValid:oie,fromUint8Array:Cm,toUint8Array:rL,extendString:iL,extendUint8Array:oL,extendBuiltins:aie};var r3=function(){return r3=Object.assign||function(e){for(var r,n=1,s=arguments.length;n0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]0&&(s.types.Claims.push({name:"app",type:"string"}),s.message.app=this.claims.app),this.claims.iat&&this.claims.iat>0&&(s.types.Claims.push({name:"iat",type:"int64"}),s.message.iat=this.claims.iat),this.claims.exp&&this.claims.exp>0&&(s.types.Claims.push({name:"exp",type:"int64"}),s.message.exp=this.claims.exp),this.claims.n&&this.claims.n>0&&(s.types.Claims.push({name:"n",type:"uint64"}),s.message.n=this.claims.n),this.claims.typ&&this.claims.typ.length>0&&(s.types.Claims.push({name:"typ",type:"string"}),s.message.typ=this.claims.typ),this.claims.ogn&&this.claims.ogn.length>0&&(s.types.Claims.push({name:"ogn",type:"string"}),s.message.ogn=this.claims.ogn),this.claims.v&&this.claims.v.length>0&&(s.types.Claims.push({name:"v",type:"string"}),s.message.v=this.claims.v),s},t}(),lie=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}},fie=function(t,e,r){return sf(void 0,void 0,void 0,function(){var n,s;return of(this,function(i){return n=r.messageDigest(),s=Z4(n,r.signature),s.slice(0,2)==="0x"&&s.length===42&&s.toLowerCase()===r.address.toLowerCase()?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]})})},uie=function(t,e,r){return sf(void 0,void 0,void 0,function(){var n,s,i,o,a;return of(this,function(c){switch(c.label){case 0:return!t||t===void 0?[2,{isValid:!1}]:(n=r.messageDigest(),[4,t.getCode(r.address)]);case 1:if(s=c.sent(),s==="0x"||s.length<=2)throw new Error("ValidateContractAccountProof failed. unable to fetch wallet contract code");return i=["function isValidSignature(bytes32, bytes) public view returns (bytes4)"],o=new S1(r.address,i,t),[4,o.isValidSignature(n,ue(r.signature))];case 2:return a=c.sent(),a===die?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},die="0x1626ba7e",aL="1",n3="eth",hie={name:"ETHAuth",version:aL},rv=function(){function t(){for(var e=[],r=0;r0&&(c+="."+s.extra),[2,c]}})})},this.decodeProof=function(s,i){return i===void 0&&(i=!1),sf(n,void 0,void 0,function(){var o,a,c,l,f,u,d,h,v,y;return of(this,function(m){switch(m.label){case 0:if(o=s.split("."),o.length<4||o.length>5)throw new Error("ethauth: invalid proof string");if(a=o[0],c=o[1],l=o[2],f=o[3],u=o[4],a!==n3)throw new Error("ethauth: not an ethauth proof");return d=zf.decode(l),h=JSON.parse(d),v=new j2({address:c,claims:h,signature:f,extra:u}),[4,this.validateProof(v,i)];case 1:if(y=m.sent(),!y)throw new Error("ethauth: proof is invalid");return[2,v]}})})},this.validateProof=function(s,i){return i===void 0&&(i=!1),sf(n,void 0,void 0,function(){var o,a;return of(this,function(c){switch(c.label){case 0:if(o=this.validateProofClaims(s),o.err)throw new Error("ethauth: proof claims are invalid ".concat(o.err));return i===!0?[3,2]:[4,this.validateProofSignature(s)];case 1:if(a=c.sent(),a!==!0)throw new Error("ethauth: proof signature is invalid");c.label=2;case 2:return[2,!0]}})})},this.validateProofSignature=function(s){return sf(n,void 0,void 0,function(){var i,c,o,a,c;return of(this,function(l){switch(l.label){case 0:i=[],c=0,l.label=1;case 1:if(!(czf.encode(t,!0),nk=t=>zf.encode(JSON.stringify(t),!0),yie=t=>{if(t!=null)return zf.decode(t)},sk=t=>{if(t!=null)return JSON.parse(zf.decode(t))};function cL(t){return t!=null&&(ne.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Ke(t)||typeof t=="bigint"||Ga(t))}const ik=t=>ue(Ne(typeof t=="string"?_t(t):t)),lL=(t,e,r)=>tt(["string","uint256","address","bytes32"],["",e,t,r]),s3=(t,e,r)=>Ne(lL(t,e,r)),fL=()=>typeof window>"u"&&typeof hn=="object",pie=()=>!fL(),uL=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(zf.decode(e[1]))};function jg(){return jg=Object.assign?Object.assign.bind():function(t){for(var e=1;eAe.configure(t),nv=(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 gie=class{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...s){e=`${e}:${Ne(_t(JSON.stringify(s,bie)))}`;let i=this.cache.get(e);if(i&&i.expiration&&new Date>=i.expiration&&(i=void 0,this.cache.delete(e)),!i){const o={promise:n(...s)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),i=o,this.cache.set(e,i)}return i.promise}};function bie(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function ok(t,e){return function(...r){const n=Array.prototype.slice.call(r);return new Promise(async(s,i)=>{try{n.push((o,a)=>o?i(o):s(a)),await t.apply(e,n)}catch(o){i(o)}})}}function xie(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function wie(t){const e=t.split("&"),r={};for(const n of e){const s=n.split("=");r[decodeURIComponent(s[0])]=JSON.parse(decodeURIComponent(s[1]))}return r}const ak=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),hL=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},vL=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},yL=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},Cie=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),pL=t=>{const e=jg({},t.types);return delete e.EIP712Domain,jr.hash(t.domain,e,t.message)},sy=t=>ue(pL(t)),{defineReadOnly:Eie,getStatic:kie,resolveProperties:Sie,checkProperties:Aie,shallowCopy:$ie,deepCopy:_ie}=Yse,Pie=t=>t.replace(/([^:]\/)\/+/g,"$1"),Iie=Object.freeze(Object.defineProperty({__proto__:null,Logger:dL,PromiseCache:gie,base64Decode:yie,base64DecodeObject:sk,base64Encode:vie,base64EncodeObject:nk,checkProperties:Aie,configureLogger:mie,deepCopy:_ie,defineReadOnly:Eie,encodeMessageDigest:ik,encodeTypedDataDigest:sy,encodeTypedDataHash:pL,getEthersConnectionInfo:nv,getRandomInt:ak,getStatic:kie,isBigNumberish:cL,isBrowser:pie,isNode:fL,jwtDecodeClaims:uL,logger:Ae,packMessageData:lL,promisify:ok,queryStringFromObject:xie,queryStringToObject:wie,resolveProperties:Sie,sanitizeAlphanumeric:vL,sanitizeHost:yL,sanitizeNumberString:hL,shallowCopy:$ie,sleep:Cie,subDigestOf:s3,urlClean:Pie},Symbol.toStringTag,{value:"Module"}));function kt(){return kt=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:ne.from(t).toNumber(),Oie=t=>{if(t)return mL(t)},gL=(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 s=n.map(l=>l.chainId).sort(),i=s.filter((l,f)=>s.indexOf(l)!==f);if(i.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${i}`);return!1}n.forEach(l=>l.name=l.name.toLowerCase());const o=n.map(l=>l.name).sort(),a=o.filter((l,f)=>o.indexOf(l)!==f);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let c=!1;for(let l=0;l(gL(t,!0,e),t),Rie=(t,e=!0)=>{const r=t.map(s=>s.chainId).sort(),n=r.filter((s,i)=>r.indexOf(s)!==i);if(n.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${n}`);return!1}return!0},Mie=(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)}},xL=t=>bL(wL(t)),Ki=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=ne.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(ne.isBigNumber(e)){const r=e.toNumber();return t.find(n=>n.chainId===r)}else return}},Nie=(t,e)=>t?t.name===e||t.chainId===e:!1,jie=t=>{const e={};for(let r=0;r{if(!t)return[];const e=t.sort((n,s)=>n.chainId===s.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},D2=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let s=e[n];return typeof s=="function"?s=s():s==null?s="":typeof s=="object"||typeof s=="symbol"?s=s.toString():s=s.valueOf(),s})):"",ck=t=>D2("https://${network}-indexer.sequence.app",{network:t}),CL=t=>D2("https://${network}-relayer.sequence.app",{network:t}),EL=t=>D2("https://nodes.sequence.app/${network}",{network:t});function lk(t){return Ki(Qd,t)}function kL(t){return ne.isBigNumber(t)?t:cL(t)?ne.from(t):ne.from(t.chainId)}const jt=t=>{const e=EL(t);return{rpcUrl:e,relayer:{url:CL(t),provider:{url:e}},indexerUrl:ck(t)}},Qd=xL([kt({},gt[fe.POLYGON],jt("polygon"),{isDefaultChain:!0,isAuthChain:!0}),kt({},gt[fe.MAINNET],jt("mainnet")),kt({},gt[fe.BSC],jt("bsc")),kt({},gt[fe.AVALANCHE],jt("avalanche")),kt({},gt[fe.ARBITRUM],jt("arbitrum")),kt({},gt[fe.ARBITRUM_NOVA],jt("arbitrum-nova")),kt({},gt[fe.OPTIMISM],jt("optimism")),kt({},gt[fe.OPTIMISM_SEPOLIA],jt("optimism-sepolia")),kt({},gt[fe.POLYGON_ZKEVM],jt("polygon-zkevm")),kt({},gt[fe.GNOSIS],jt("gnosis")),kt({},gt[fe.RINKEBY],jt("rinkeby"),{disabled:!0}),kt({},gt[fe.GOERLI],jt("goerli"),{disabled:!0}),kt({},gt[fe.SEPOLIA],jt("sepolia")),kt({},gt[fe.POLYGON_MUMBAI],jt("mumbai"),{disabled:!0}),kt({},gt[fe.POLYGON_AMOY],jt("amoy")),kt({},gt[fe.BSC_TESTNET],jt("bsc-testnet")),kt({},gt[fe.ARBITRUM_SEPOLIA],jt("arbitrum-sepolia")),kt({},gt[fe.BASE],jt("base")),kt({},gt[fe.BASE_SEPOLIA],jt("base-sepolia")),kt({},gt[fe.HOMEVERSE],jt("homeverse")),kt({},gt[fe.HOMEVERSE_TESTNET],jt("homeverse-testnet")),kt({},gt[fe.XAI],jt("xai")),kt({},gt[fe.XAI_SEPOLIA],jt("xai-sepolia")),kt({},gt[fe.AVALANCHE_TESTNET],jt("avalanche-testnet")),kt({},gt[fe.ASTAR_ZKEVM],jt("astar-zkevm")),kt({},gt[fe.ASTAR_ZKYOTO],jt("astar-zkyoto")),kt({},gt[fe.XR_SEPOLIA],jt("xr-sepolia")),kt({},gt[fe.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),kt({},gt[fe.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),Jd="2.0";class fk{constructor(e,r){this.sender=void 0,this.handler=void 0,this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=SL(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(s){r(s,void 0)}}}const SL=(t,e)=>{if(t.length===0)return e;const r=s=>s.sendAsyncMiddleware?s.sendAsyncMiddleware:s;let n;n=r(t[t.length-1])(e);for(let s=t.length-2;s>=0;s--)n=r(t[s])(n);return n};function AL(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 $L(t){return t!==void 0&&t.sendAsync!==void 0}let Die=0;class Dg{constructor(e,r){this.send=void 0,this.request=void 0,this.defaultChainId=void 0,this.sendAsync=(n,s,i)=>{this.send(n.method,n.params,i||this.defaultChainId).then(o=>{s(void 0,{jsonrpc:"2.0",id:n.id,result:o})}).catch(o=>{s(o,void 0)})},this.defaultChainId=r,AL(e)?this.send=e.send.bind(e):$L(e)?this.send=(n,s,i)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:Jd,id:++Die,method:n,params:s},(c,l)=>{c?a(c):o(l?l.result:void 0)},i||this.defaultChainId)}):this.send=e,this.request=(n,s)=>this.send(n.method,n.params,s)}}class Lie{constructor(e){this.provider=e,this.sendAsync=(r,n)=>{this.provider.send(r.method,r.params).then(s=>{n(void 0,{jsonrpc:"2.0",id:r.id,result:s})}).catch(s=>{n(s,void 0)})},this.send=this.sendAsync}}class Bie{constructor(e){this.sendAsyncMiddleware=void 0,this.isAllowedFunc=void 0,e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.sendAsyncMiddleware=i3(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.sendAsyncMiddleware=i3(this.isAllowedFunc)}}const i3=t=>e=>(r,n,s)=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");e(r,n,s)};class uk{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,s,i)=>{if(this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method)){const o=this.cacheKey(n.method,n.params,i||this.defaultChainId),a=this.getCacheValue(o);if(a&&a!==""){s(void 0,{jsonrpc:"2.0",id:n.id,result:a});return}}r(n,(o,a,c)=>{if((this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method))&&a&&a.result&&this.shouldCacheResponse(n,a)){const l=this.cacheKey(n.method,n.params,c||this.defaultChainId);this.cachableJsonRpcMethods.includes(n.method)?this.setCacheValue(l,a.result):this.setCacheByBlockValue(l,a.result)}s(o,a)},i||this.defaultChainId)},this.cacheKey=(r,n,s)=>{let i="";return s?i=`${s}:${r}:`:i=`:${r}:`,!n||n.length===0?i+"[]":i+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 _L{constructor(e){this.options=void 0,this.sendAsyncMiddleware=r=>(n,s,i)=>{const{id:o,method:a}=n;switch(a){case"net_version":if(this.options.chainId){s(void 0,{jsonrpc:"2.0",id:o,result:`${this.options.chainId}`});return}break;case"eth_chainId":if(this.options.chainId){s(void 0,{jsonrpc:"2.0",id:o,result:le(this.options.chainId)});return}break;case"eth_accounts":if(this.options.accountAddress){s(void 0,{jsonrpc:"2.0",id:o,result:[He(this.options.accountAddress)]});return}break;case"sequence_getWalletContext":if(this.options.walletContext){s(void 0,{jsonrpc:"2.0",id:o,result:this.options.walletContext});return}break}r(n,s,i)},this.options=e}}const PL=t=>(e,r,n)=>{t(e,(s,i)=>{if(!s&&i&&i.error)throw typeof i.error=="string"?new Error(i.error):new Error(i.error.message);r(s,i)},n)},IL=t=>(e,r,n)=>{const s=n?` chainId:${n}`:"";Ae.info(`[provider request]${s} id:${e.id} method:${e.method} params:`,e.params),t(e,(i,o)=>{i?Ae.warn(`[provider response]${s} id:${e.id} method:${e.method} params:`,e.params,"error:",i):Ae.info(`[provider response]${s} id:${e.id} method:${e.method} params:`,e.params,"response:",o),r(i,o)},n)},Fie=t=>e=>(r,n,s)=>{const i=t(r),{id:o,method:a}=r;switch(a){case"net_version":n(void 0,{jsonrpc:"2.0",id:o,result:`${i}`});return;case"eth_chainId":n(void 0,{jsonrpc:"2.0",id:o,result:le(i)});return}e(r,n,s)},TL=["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 zie{constructor(e){this.provider=void 0,this.sendAsyncMiddleware=r=>(n,s,i)=>{if(TL.includes(n.method)){this.provider.sendAsync(n,s,i);return}r(n,s,i)},this.provider=e}}class qie{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...TL],this.provider=void 0,this.rpcUrl=void 0,this.sendAsyncMiddleware=r=>(n,s)=>{if(this.provider&&!this.privateJsonRpcMethods.includes(n.method)){this.provider.send(n.method,n.params).then(i=>{s(void 0,{jsonrpc:"2.0",id:n.id,result:i})}).catch(i=>s(i));return}Ae.debug("[public-provider] sending request to signer window",n.method),r(n,s)},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 OL{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,s)=>{if(!this.singleflightJsonRpcMethods.includes(r.method)){e(r,n,s);return}const i=this.requestKey(r.method,r.params||[],s);if(!this.inflight[i])this.inflight[i]=[];else{this.inflight[i].push({id:r.id,callback:n});return}e(r,(o,a,c)=>{n(o,a);for(let l=0;l{let s="";return n?s=`${n}:${e}:`:s=`:${e}:`,!r||r.length===0?s+"[]":s+JSON.stringify(r)},this.inflight={}}}class Uie extends $a{constructor(e,r){super(e,r==null?void 0:r.chainId),this._chainId=void 0,this._sender=void 0,this.send=(a,c)=>this._sender.send(a,c),this.fetch=(a,c)=>{const l={method:a,params:c,id:this._nextId++,jsonrpc:"2.0"};return A1(this.connection,JSON.stringify(l),Wie).then(u=>u,u=>{throw u})};const n=r==null?void 0:r.chainId,s=r==null?void 0:r.middlewares,i=r==null?void 0:r.blockCache;this._chainId=n;const o=new fk(s??[new _L({chainId:n}),new OL,new uk({defaultChainId:n,blockCache:i})],new Dg(this.fetch,n));this._sender=new Dg(o,n)}async getNetwork(){const e=this._chainId;if(e){const r=gt[e],n=(r==null?void 0:r.name)||"",s=r==null?void 0:r.ensAddress;return{name:n,chainId:e,ensAddress:s}}else{const r=await this.send("eth_chainId",[]);return this._chainId=ne.from(r).toNumber(),this.getNetwork()}}}function Wie(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 Hie=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:Bie,CachedProvider:uk,ChainId:fe,EagerProvider:_L,JsonRpcExternalProvider:Lie,JsonRpcProvider:Uie,JsonRpcRouter:fk,JsonRpcSender:Dg,JsonRpcVersion:Jd,NetworkType:vt,PublicProvider:qie,SigningProvider:zie,SingleflightMiddleware:OL,allNetworks:Qd,allowProviderMiddleware:i3,checkNetworkConfig:Nie,createJsonRpcMiddlewareStack:SL,ensureUniqueNetworks:Rie,ensureValidNetworks:bL,exceptionProviderMiddleware:PL,findNetworkConfig:Ki,findSupportedNetwork:lk,getChainId:mL,indexerURL:ck,isJsonRpcHandler:$L,isJsonRpcProvider:AL,isNetworkConfig:Tie,isValidNetworkConfig:gL,loggingProviderMiddleware:IL,maybeChainId:Oie,networkProviderMiddleware:Fie,networks:gt,networksIndex:jie,nodesURL:EL,relayerURL:CL,sortNetworks:wL,stringTemplate:D2,toChainIdNumber:kL,updateNetworkConfig:Mie,validateAndSortNetworks:xL},Symbol.toStringTag,{value:"Module"}));function pn(){return pn=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(hk(s))return tt(["uint8","uint8","address"],[wf.Address,s.weight,s.address]);if(s.isDynamic){const i=ue(s.signature);return tt(["uint8","uint8","address","uint16","bytes"],[wf.DynamicSignature,s.weight,s.address,i.length,i])}return tt(["uint8","uint8","bytes"],[wf.EOASignature,s.weight,s.signature])});return tt(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function LL(t,e,r){const n=iy(e),s=await Promise.all(t.signers.map(async i=>{if(hk(i))return i;if(i.isDynamic){if(!i.address)throw new Error("Dynamic signature part must have address");if(!dk(i.address,n,i.signature,r))throw new Error(`Invalid dynamic signature part ${i.address}`);return{address:i.address,weight:i.weight,signature:i.signature}}else return{address:oy(n,i.signature),weight:i.weight,signature:i.signature}}));return{version:1,payload:e,subdigest:n,config:{version:1,threshold:t.threshold,signers:s}}}function l0(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let s=ne.from(0);const i=t.signers.map(a=>{if(!e.has(a.address))return a;const c=e.get(a.address),l=ue(c.signature);return s=s.add(a.weight),c.isDynamic||l.length!==66?pn({},a,{isDynamic:!0,signature:c.signature,address:a.address}):pn({},a,{isDynamic:!1,signature:c.signature})});return{encoded:vk({version:1,threshold:t.threshold,signers:i}),weight:s}}const yk={decode:t=>DL(t),encode:t=>vk(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>LL(t,e,r),encodeSigners:(t,e,r,n)=>l0(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=yk.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 eoe=Object.freeze({__proto__:null,SignaturePartType:wf,isAddressMember:hk,isUnrecoveredSignatureMember:NL,isUnrecoveredSignature:jL,decodeSignature:DL,encodeSignature:vk,recoverSignature:LL,encodeSigners:l0,SignatureCoder:yk});const pk={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>Ne(Dn.encode(["bytes32","uint8","address"],[e,r.weight,r.address])),tt(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>ne.from(0),signersOf:t=>t.signers.map(e=>({address:e.address,weight:ne.from(e.weight).toNumber()})),fromSimple:t=>{if(!yr.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 s=new Ir([...cn.mainModule.abi,...cn.mainModuleUpgradable.abi]),i=[];return(!n||n==="first")&&i.push({to:t,data:s.encodeFunctionData(s.getFunction("updateImplementation"),[r.mainModuleUpgradable]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),i.push({to:t,data:s.encodeFunctionData(s.getFunction("updateImageHash"),[pk.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),{entrypoint:t,transactions:i}},decodeTransaction:function(t){throw new Error("Function not implemented.")}},toJSON:function(t){const e=t.signers.map(r=>({weight:ne.from(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:ne.from(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:ne.from(n.weight),address:n.address}));return{version:e.version,threshold:ne.from(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&!yr.eq(e.checkpoint))throw new Error("v1 wallet config does not support checkpoint");if(e.add)for(const s of e.add)n.find(i=>i.address===s.address)||n.push({weight:s.weight,address:s.address});if(e.remove)for(const s of e.remove){const i=n.findIndex(o=>o.address===s);i>=0&&n.splice(i,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[s,i]of e.entries()){r.set(s,{signature:i,isDynamic:!0});const{encoded:o,weight:a}=l0(t,r,[]);if(a.gte(t.threshold))return o}const n=t.signers;for(const{address:s}of n.sort(({weight:i},{weight:o})=>ne.from(i).sub(o).toNumber())){r.set(s,{signature:"0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02",isDynamic:!1});const{encoded:o,weight:a}=l0(t,r,[]);if(a.gte(t.threshold))return o}return l0(t,r,[]).encoded}};var toe=Object.freeze({__proto__:null,ConfigCoder:pk});const BL=1,FL={version:BL,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var oa=Object.freeze({__proto__:null,config:toe,signature:eoe,version:BL,DeployedWalletContext:FL});const mk="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function zL(t){return Ne(qL(t))}function qL(t){return tt(["bytes32","bytes32"],[mk,t])}function UL(t){const e=ue(t);if(e.length===64&&le(e.slice(0,32))===mk)return le(e.slice(32,64))}function roe(t){return UL(t)!==void 0}var noe=Object.freeze({__proto__:null,SetImageHashPrefix:mk,hashSetImageHash:zL,messageSetImageHash:qL,decodeMessageSetImageHash:UL,isMessageSetImageHash:roe});let on=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),Ar=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 Lg=66;function qf(t){return t.left!==void 0&&t.right!==void 0}function P1(t){return t.tree!==void 0}function ay(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function Bg(t){let e=ue(t),r;const n=(s,i)=>s?s.right?{left:s,right:i}:{left:s.left,right:i}:{left:i};for(;e.length>0;){const s=e[0];switch(e=e.slice(1),s){case Ar.Signature:{const i=e[0],o=le(e.slice(1,Lg+1));r=n(r,{signature:o,weight:i,unrecovered:!0,isDynamic:!1}),e=e.slice(Lg+1)}break;case Ar.Address:{const i=e[0],o=He(le(e.slice(1,21)));r=n(r,{address:o,weight:i}),e=e.slice(21)}break;case Ar.DynamicSignature:{const i=e[0],o=He(le(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],c=le(e.slice(24,24+a));r=n(r,{address:o,signature:c,weight:i,unrecovered:!0,isDynamic:!0}),e=e.slice(24+a)}break;case Ar.Node:{const i=le(e.slice(0,32));r=n(r,{nodeHash:i}),e=e.slice(32)}break;case Ar.Branch:{const i=e[0]<<16|e[1]<<8|e[2],o=Bg(e.slice(3,3+i));r=n(r,o),e=e.slice(3+i)}break;case Ar.Subdigest:{const i=le(e.slice(0,32));r=n(r,{subdigest:i}),e=e.slice(32)}break;case Ar.Nested:{const i=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],c=Bg(e.slice(6,6+a));r=n(r,{weight:i,threshold:o,tree:c}),e=e.slice(6+a)}break;default:throw new Error(`Unknown signature part type: ${s}: ${le(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class WL extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function Cf(t,e,r){if(qf(t)){const[n,s]=await Promise.all([Cf(t.left,e,r),Cf(t.right,e,r)]);return{left:n,right:s}}if(P1(t))return{weight:t.weight,threshold:t.threshold,tree:await Cf(t.tree,e,r)};if(ay(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await dk(t.address,e,t.signature,r))throw new WL(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:oy(e,t.signature),signature:t.signature,subdigest:e};return t}const Sn={concat:(t,e)=>tt(["bytes","bytes"],[t,e]),node:t=>tt(["uint8","bytes32"],[Ar.Node,t]),branch:t=>{const e=ue(t);return tt(["uint8","uint24","bytes"],[Ar.Branch,e.length,e])},nested:(t,e,r)=>{const n=ue(r);return tt(["uint8","uint8","uint16","uint24","bytes"],[Ar.Nested,t,e,n.length,n])},subdigest:t=>tt(["uint8","bytes32"],[Ar.Subdigest,t]),signature:(t,e)=>tt(["uint8","uint8","bytes"],[Ar.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=ue(r);return tt(["uint8","uint8","address","uint24","bytes"],[Ar.DynamicSignature,t,e,n.length,n])},address:(t,e)=>tt(["uint8","uint8","address"],[Ar.Address,t,e])};function f0(t,e,r,n,s={}){const i=u0(t.tree,e,r,s);return ne.from(n).isZero()?{encoded:tt(["uint8","uint16","uint32","bytes"],[on.NoChainIdDynamic,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}:ne.from(t.threshold).gt(255)?{encoded:tt(["uint8","uint16","uint32","bytes"],[on.Dynamic,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}:{encoded:tt(["uint8","uint8","uint32","bytes"],[on.Legacy,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}}function u0(t,e,r,n={}){const s=!n.disableTrim;if(to(t)){const i=u0(t.left,e,r),o=u0(t.right,e,r),a=Qn(t.left),c=Qn(t.right);return s&&i.weight.eq(0)&&o.weight.eq(0)&&!a&&!c?{encoded:Sn.node(ii(t)),weight:yr}:s&&o.weight.eq(0)&&!c?{encoded:Sn.concat(i.encoded,Sn.node(ii(t.right))),weight:i.weight}:s&&i.weight.eq(0)&&!a?{encoded:Sn.concat(Sn.node(ii(t.left)),Sn.branch(o.encoded)),weight:o.weight}:{encoded:Sn.concat(i.encoded,Sn.branch(o.encoded)),weight:i.weight.add(o.weight)}}if(Xa(t)){const i=u0(t.tree,e,r);return s&&i.weight.eq(0)?{encoded:Sn.node(ii(t)),weight:yr}:{encoded:Sn.nested(t.weight,t.threshold,i.encoded),weight:i.weight}}if(Za(t))return{encoded:Sn.node(ii(t)),weight:yr};if(Ja(t)){const i=r.includes(t.subdigest);return{encoded:Sn.subdigest(t.subdigest),weight:i?xj:yr}}if(Qn(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:Sn.dynamicSignature(t.weight,t.address,a),weight:ne.from(t.weight)}:{encoded:Sn.signature(t.weight,a),weight:ne.from(t.weight)}}else return{encoded:Sn.address(t.weight,t.address),weight:yr};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function gk(t){return xk(t)?gk(t.suffix[t.suffix.length-1]):t.config}function bk(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function cy(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(bk)}function HL(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function xk(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(HL)}function L2(t){const e=ue(t),r=e[0];switch(r){case on.Legacy:return{version:2,type:on.Legacy,decoded:Em(e)};case on.Dynamic:return{version:2,type:on.Dynamic,decoded:Em(e.slice(1))};case on.NoChainIdDynamic:return{version:2,type:on.NoChainIdDynamic,decoded:Em(e.slice(1))};case on.Chained:return VL(e);default:throw new Error(`Invalid signature type: ${r}`)}}function Em(t){const e=ue(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],s=Bg(e.slice(6));return{threshold:r,checkpoint:n,tree:s}}function VL(t){const e=ue(t),r=e[0];if(r!==on.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let s=1;for(;sue(Vc(i))),s=tt(n.map(()=>["uint24","bytes"]).flat(),n.map(i=>[i.length,i]).flat());return tt(["uint8","bytes"],[on.Chained,s])}function Vc(t){if(Ji(t))return le(t);if(cy(t)||xk(t))return B2(Vc(t),(t.suffix||[]).map(Vc));const e=bk(t)?t.decoded:t.config;switch(t.type){case on.Legacy:if(ne.from(e.threshold).gt(255))throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return o3(e);case on.NoChainIdDynamic:case on.Dynamic:return tt(["uint8","bytes"],[t.type,o3(e)]);case on.Chained:throw new Error("Unreachable code: Chained signature should be handled above");default:throw new Error(`Invalid signature type: ${t.type}`)}}function o3(t){return tt(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,d0(t.tree)])}function d0(t){if(to(t)||qf(t)){const e=ue(d0(t.right)),r=ue(d0(t.left));return to(t.right)||qf(t.right)?tt(["bytes","uint8","uint24","bytes"],[r,Ar.Branch,e.length,e]):tt(["bytes","bytes"],[r,e])}if(Xa(t)||P1(t)){const e=ue(d0(t.tree));return tt(["uint8","uint8","uint16","uint24","bytes"],[Ar.Nested,t.weight,t.threshold,e.length,e])}if(ay(t)||Qn(t)&&t.signature!==void 0){const e=ue(t.signature);if(t.isDynamic||e.length!==Lg){if(!t.address)throw new Error("Dynamic signature leaf must have address");return tt(["uint8","uint8","address","uint24","bytes"],[Ar.DynamicSignature,t.weight,t.address,e.length,e])}else return tt(["uint8","uint8","bytes"],[Ar.Signature,t.weight,e])}if(Qn(t))return tt(["uint8","uint8","address"],[Ar.Address,t.weight,t.address]);if(Za(t))return tt(["uint8","bytes32"],[Ar.Node,t.nodeHash]);if(Ja(t))return tt(["uint8","bytes32"],[Ar.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function h0(t){return to(t)?[...h0(t.left),...h0(t.right)]:Xa(t)?h0(t.tree):Qn(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function v0(t){return qf(t)?[...v0(t.left),...v0(t.right)]:P1(t)?v0(t.tree):ay(t)?[t.signature]:[]}function km(t){return qf(t)?[...km(t.left),...km(t.right)]:P1(t)?km(t.tree):Ja(t)?[t.subdigest]:[]}async function Fg(t){const e=typeof t=="string"?L2(t):t;if(cy(e)){const n=await Promise.all([Fg(pn({},e,{suffix:void 0})),...e.suffix.map(s=>Fg(s))]);return B2(n[0],n.slice(1))}const{trimmed:r}=await y0(e.decoded.tree);return Vc(pn({},e,{decoded:pn({},e.decoded,{tree:r})}))}async function y0(t,e=!0){if(qf(t)){const[r,n]=await Promise.all([y0(t.left),y0(t.right)]);if(r.weight===0&&n.weight===0)try{const s=await Cf(t,Sg,void 0);return{weight:0,trimmed:{nodeHash:ii(s)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(P1(t)){const r=await y0(t.tree);if(r.weight===0)try{const n=await Cf(t,Sg,void 0);return{weight:0,trimmed:{nodeHash:ii(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return Za(t)&&QL(t.nodeHash)?{weight:0,trimmed:pn({},YL(t.nodeHash))}:ay(t)||Qn(t)&&t.signature!==void 0?{weight:ne.from(t.weight).toNumber(),trimmed:t}:!e&&Ja(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const F2={decode:t=>L2(t),encode:t=>Vc(t),trim:t=>Fg(t),supportsNoChainId:!0,recover:(t,e,r)=>wk(t,e,r),encodeSigners:(t,e,r,n)=>f0(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=F2.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=Ji(t)?t:Vc(t),s=r.map(i=>Ji(i)?i:Vc(i));return B2(n,s)},hashSetImageHash:function(t){return zL(t)},signaturesOf(t){return h0(t.tree)},signaturesOfDecoded:function(t){return v0(t.decoded.tree)}};var soe=Object.freeze({__proto__:null,SignatureType:on,SignaturePartType:Ar,SignaturePartTypeLength:Lg,isUnrecoveredNode:qf,isUnrecoveredNestedLeaf:P1,isUnrecoveredSignatureLeaf:ay,decodeSignatureTree:Bg,InvalidSignatureLeafError:WL,recoverTopology:Cf,partEncoder:Sn,encodeSigners:f0,encodeTree:u0,deepestConfigOfSignature:gk,isUnrecoveredSignature:bk,isUnrecoveredChainedSignature:cy,isSignature:HL,isChainedSignature:xk,decodeSignature:L2,decodeSignatureBody:Em,decodeChainedSignature:VL,setImageHashStruct:GL,recoverSignature:wk,encodeChain:B2,encodeSignature:Vc,encodeSignatureBody:o3,encodeSignatureTree:d0,signaturesOf:h0,signaturesOfDecoded:v0,subdigestsOfDecoded:km,trimSignature:Fg,trimUnrecoveredTree:y0,SignatureCoder:F2});function Qn(t){return t.address!==void 0&&t.weight!==void 0}function Ja(t){return t.subdigest!==void 0&&t.address===void 0}function p0(t){return to(t)?JSON.stringify({left:p0(t.left),right:p0(t.right)}):Xa(t)?JSON.stringify({weight:ne.from(t.weight).toString(),threshold:ne.from(t.threshold).toString(),tree:p0(t.tree)}):Qn(t)?JSON.stringify({address:t.address,weight:ne.from(t.weight).toString()}):JSON.stringify(t)}function m0(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:m0(e.left),right:m0(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:ne.from(e.weight),threshold:ne.from(e.threshold),tree:m0(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:ne.from(e.weight)}:e}function Xa(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function Za(t){return t.nodeHash!==void 0}function Ck(t){return Qn(t)||Ja(t)||Xa(t)||Za(t)}function to(t){return t.left!==void 0&&t.right!==void 0}function ioe(t){return to(t)||Ck(t)}function KL(t){return tt(["uint96","address"],[t.weight,t.address])}function YL(t){const e=ue(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=ne.from(e.slice(0,12)),n=He(le(e.slice(12)));return{weight:r,address:n}}function QL(t){const e=ue(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function ii(t){if(Qn(t))return KL(t);if(Ja(t))return pa(["string","bytes32"],[`Sequence static digest: +`,t.subdigest]);if(Xa(t)){const e=ii(t.tree);return pa(["string","bytes32","uint256","uint256"],[`Sequence nested config: +`,e,t.threshold,t.weight])}return Za(t)?t.nodeHash:pa(["bytes32","bytes32"],[ii(t.left),ii(t.right)])}function ooe(t){const e=[];let r=t;for(;!Ck(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function aoe(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function Ek(t){return pa(["bytes32","uint256"],[pa(["bytes32","uint256"],[ii(t.tree),t.threshold]),t.checkpoint])}function JL(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function Pd(t){return Qn(t)||Ja(t)?[t]:Xa(t)?[{threshold:t.threshold,weight:t.weight,members:Pd(t.tree)}]:Za(t)?[]:[...Pd(t.left),...Pd(t.right)]}function a3(t){return Za(t)?!0:to(t)?a3(t.left)||a3(t.right):!1}function coe(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:Pd(t.tree)}}const XL=(t,e)=>t.map(r=>JL(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function kk(t){if(t.length===0)throw new Error("Empty members array");return XL(t,kk).reduce((r,n)=>({left:r,right:n}))}function Sk(t){if(t.length===0)throw new Error("Empty members array");const e=XL(t,Sk);for(let r=e.length;r>1;r=r/2)for(let n=0;n=r?e[n]=e[s]:e[n]={left:e[s],right:e[i]}}return e[0]}function Ak(t){return t.length>8?Sk(t):kk(t)}function ZL(t,e=Ak){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function zg(t,e){return Ja(t)?t.subdigest===e:to(t)?zg(t.left,e)||zg(t.right,e):!1}function c3(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();Xa(n)?e.push(n.tree):to(n)?(e.push(n.left),e.push(n.right)):Qn(n)&&r.add({address:n.address,weight:ne.from(n.weight).toNumber()})}return Array.from(r)}function qg(t){return to(t)?qg(t.left)&&qg(t.right):!Za(t)}const z2={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>Ek(t),hasSubdigest:(t,e)=>zg(t.tree,e),checkpointOf:t=>ne.from(t.checkpoint),signersOf:t=>c3(t.tree),fromSimple:t=>{var e;return ZL(pn({},t,{members:[...t.signers,...((e=t.subdigests)!=null?e:[]).map(r=>({subdigest:r}))]}))},isComplete:t=>qg(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const s=new Ir(cn.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:s.encodeFunctionData(s.getFunction("updateImageHash"),[z2.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,s;const i=new Ir(cn.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=i.decodeFunctionData(i.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(!yr.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(!yr.eq((n=(s=t.transactions[0])==null?void 0:s.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:ne.from(t.threshold).toString(),checkpoint:ne.from(t.checkpoint).toString(),tree:p0(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:ne.from(e.threshold),checkpoint:ne.from(e.checkpoint),tree:m0(e.tree)}},editConfig:function(t,e){var r,n;const s=Pd(t.tree);if(e.add)for(const i of e.add)s.find(o=>Qn(o)&&o.address===i.address)||s.push({address:i.address,weight:i.weight});if(e.remove)for(const i of e.remove){const o=s.findIndex(a=>Qn(a)&&a.address===i);o>=0&&s.splice(o,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,checkpoint:(n=e.checkpoint)!=null?n:t.checkpoint,tree:Ak(s)}},buildStubSignature:function(t,e){const r=new Map;for(const[s,i]of e.entries()){r.set(s,{signature:i,isDynamic:!0});const{encoded:o,weight:a}=f0(t,r,[],0);if(a.gte(t.threshold))return o}const n=c3(t.tree);for(const{address:s}of n.sort(({weight:i},{weight:o})=>i-o)){r.set(s,{signature:"0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02",isDynamic:!1});const{encoded:o,weight:a}=f0(t,r,[],0);if(a.gte(t.threshold))return o}return f0(t,r,[],0).encoded}};var loe=Object.freeze({__proto__:null,isSignerLeaf:Qn,isSubdigestLeaf:Ja,topologyToJSON:p0,topologyFromJSON:m0,isNestedLeaf:Xa,isNodeLeaf:Za,isLeaf:Ck,isNode:to,isTopology:ioe,encodeSignerLeaf:KL,decodeSignerLeaf:YL,isEncodedSignerLeaf:QL,hashNode:ii,leftFace:ooe,isWalletConfig:aoe,imageHash:Ek,isSimpleNestedMember:JL,topologyToMembers:Pd,hasUnknownNodes:a3,toSimpleWalletConfig:coe,legacyTopologyBuilder:kk,merkleTopologyBuilder:Sk,optimized2SignersTopologyBuilder:Ak,toWalletConfig:ZL,hasSubdigest:zg,signersOf:c3,isComplete:qg,ConfigCoder:z2}),foe=Object.freeze({__proto__:null});const uoe={config:z2,signature:F2},eB=2,tB={version:eB,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var ot=Object.freeze({__proto__:null,config:loe,signature:soe,context:foe,chained:noe,coders:uoe,version:eB,DeployedWalletContext:tB});function l3(t,e){const r=Ne(tt(["bytes","bytes32"],[t.walletCreationCode,Rt(t.mainModule,32)])),n=Ne(tt(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return He(fr(n,12))}async function doe(t,e,r,n,s,i){return(await Promise.all(hB.map(async a=>{try{const c=a.signature.SignatureCoder.decode(le(r)),l=await a.signature.SignatureCoder.recover(c,{address:t,digest:le(e),chainId:n},s),f=a.config.ConfigCoder.imageHashOf(l.config);if(l3(i[a.version],f).toLowerCase()===t.toLowerCase())return!0;const d=await a.signature.SignatureCoder.recover(c,{address:t,digest:le(e),chainId:n},s),h=a.config.ConfigCoder.imageHashOf(d.config);return l3(i[a.version],h).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function hoe(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 voe(t){const e=Object.keys(t).length;return t[e]}const yoe={1:FL,2:tB};var poe=Object.freeze({__proto__:null,addressOf:l3,isValidCounterfactual:doe,isValidVersionedContext:hoe,latestContext:voe,defaultContexts:yoe});const q2=`tuple( + bool delegateCall, + bool revertOnError, + uint256 gasLimit, + address target, + uint256 value, + bytes data +)[]`;function moe(t,e,r,n){return pn({},t,{chainId:r,intent:{id:n,wallet:e}})}function goe(t){return Ne(Dn.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function boe(t){const e=Dn.decode(["uint256",q2],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function rB(t,e){return Dn.encode(["uint256",q2],[t,sv(e)])}function nB(t,e){return Ne(rB(t,e))}function xoe(t,e,r,n){return iy({address:t,chainId:e,digest:nB(r,n)})}function woe(t,e,r){return iy({address:t,chainId:e,digest:Ne(Dn.encode(["string",q2],["guest:",sv(r)]))})}function sB(t,e){return e.map(r=>$k(t,r))}function $k(t,e){if(e.to&&e.to!==Lt)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(cn.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 U2(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function iB(t){return t.every(U2)}function sv(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:e.gasLimit!==void 0?e.gasLimit:yr,target:(r=e.to)!=null?r:Lt,value:e.value!==void 0?e.value:yr,data:e.data!==void 0?e.data:[]}})}function Coe(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function Eoe(t,e){const r=ne.from(t),n=ne.from(e),s=bj.pow(ne.from(96));if(!n.div(s).eq(yr))throw new Error("Space already encoded");return n.add(r.mul(s))}function koe(t){const e=ne.from(t),r=bj.pow(ne.from(96));return[e.div(r),e.mod(r)]}function Soe(t,e){return Array.isArray(e)?iB(e)?e:sB(t,e).map(n=>n.transaction):U2(e)?[e]:[$k(t,e).transaction]}function oB(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&&U2(r),!0)}function aB(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&oB(t)}function Aoe(t){const e=new Ir(cn.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),aB(t)?[sv(t.transactions),t.nonce,t.signature]:[sv(t.transactions),0,[]])}const cB="0x61c2926c",lB=`tuple( + bool delegateCall, + bool revertOnError, + uint256 gasLimit, + address target, + uint256 value, + bytes data +)[]`,f3=(t,e)=>{const r=[],n=new Ir(cn.mainModule.abi);for(const s of e){const i=ue(s.data||"0x");if(s.to===t&&le(i.slice(0,4))===cB){const o=i.slice(4),a=Dn.decode([lB],o)[0];r.push(...f3(s.to,a.map(c=>pn({},c,{to:c.target}))))}else try{const o=n.decodeFunctionData("execute",i)[0],a=f3(t,o.map(c=>pn({},c,{to:c.target})));r.push(...a)}catch{r.push(s)}}return r};var $oe=Object.freeze({__proto__:null,MetaTransactionsType:q2,intendTransactionBundle:moe,intendedTransactionID:goe,unpackMetaTransactionsData:boe,packMetaTransactionsData:rB,digestOfTransactions:nB,subdigestOfTransactions:xoe,subdigestOfGuestModuleTransactions:woe,toSequenceTransactions:sB,toSequenceTransaction:$k,isSequenceTransaction:U2,hasSequenceTransactions:iB,sequenceTxAbiEncode:sv,fromTxAbiEncode:Coe,encodeNonce:Eoe,decodeNonce:koe,fromTransactionish:Soe,isTransactionBundle:oB,isSignedTransactionBundle:aB,encodeBundleExecData:Aoe,selfExecuteSelector:cB,selfExecuteAbi:lB,unwind:f3});const fB="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",_oe="0x6492649264926492649264926492649264926492649264926492649264926492";async function uB(t,e,r,n){return await t.call({data:Tt([fB,new k2().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}var Poe=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:fB,EIP_6492_SUFFIX:_oe,validateEIP6492Offchain:uB});class Ioe{constructor(e){this.provider=e,this.isDeployedCache=new Set}module(e){return new S1(e,[...cn.mainModuleUpgradable.abi,...cn.mainModule.abi,...cn.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(s=>ue(s))).length!==0;return n&&this.isDeployedCache.add(e),n}async implementation(e){const r=Dn.encode(["address"],[e]),n=await this.provider.getStorageAt(e,r).then(s=>ue(s));if(n.length===20)return He(le(n));if(n.length===32)return Dn.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 uB(this.provider,e,r,n)}}var Toe=Object.freeze({__proto__:null,OnChainReader:Ioe});function Ooe(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var Ee=Object.freeze({__proto__:null,config:Vie,signature:Gie,context:poe,signer:Zie,EIP1271:Qie,transaction:$oe,reader:Toe,EIP6492:Poe,isWalletSignRequestMetadata:Ooe});const u3=[{config:pk,signature:yk},{config:z2,signature:F2}];function dB(t){const e=t-1;if(e<0||e>=u3.length)throw new Error(`No coder for version: ${t}`);return u3[e]}function Roe(t){return dB(t)}var vn=Object.freeze({__proto__:null,ALL_CODERS:u3,coderFor:dB,genericCoderFor:Roe});const hB=[oa,ot],Moe=Object.freeze(Object.defineProperty({__proto__:null,allVersions:hB,commons:Ee,universal:vn,v1:oa,v2:ot},Symbol.toStringTag,{value:"Module"}));function Noe(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:s,chainId:i}=e;let o=n,a=s;const c=Object.values(this.contexts),l=[];for(let f=1;fue(i).length===0))return G$;if(!n.provider)throw new Error("signer.provider is not set, but is required");return n.provider.estimateGas({from:e,to:s.to,data:s.data,value:s.value})}))).map(s=>({executed:!0,succeeded:!0,gasUsed:ne.from(s).toNumber(),gasLimit:ne.from(s).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 i=await new S1(e,cn.mainModule.abi,this.provider).readNonce(r,{blockTag:n});return Ee.transaction.encodeNonce(r,i)}async wait(e,r,n=this.waitPollRate,s=5){var i=this;typeof e!="string"&&(e=Ee.transaction.intendedTransactionID(e));let o=!1;const a=async function(f,u){let d=0;for(;!o;){try{return await f()}catch(h){if(d++,s!==void 0&&d>=s)throw Ae.error(`giving up after ${d} failed attempts${u?`: ${u}`:""}`,h),h;Ae.warn(`attempt #${d} failed${u?`: ${u}`:""}`,h)}n>0&&await new Promise(h=>setTimeout(h,n))}throw new Error(`timed out after ${d} failed attempts${u?`: ${u}`:""}`)},c=async function(){let f=i.fromBlockLog;if(f<0&&(f=await a(()=>i.provider.getBlockNumber(),"unable to get latest block number")+f),typeof e!="string")throw new Error("impossible");const u=e.replace("0x","");for(;!o;){const d=await a(()=>i.provider.getBlockNumber(),"unable to get latest block number"),h=await a(()=>i.provider.getLogs({fromBlock:Math.max(0,f-i.deltaBlocksLog),toBlock:d,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,f-i.deltaBlocksLog)} to ${d}`);f=d;const y=(await Promise.all(h.map(m=>a(()=>i.provider.getTransactionReceipt(m.transactionHash),`unable to get receipt for transaction ${m.transactionHash}`)))).find(m=>m.logs.find(g=>g.topics.length===0&&g.data.replace("0x","")===u||g.topics.length===1&&g.topics[0]==="0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7"&&g.data.length>=64&&g.data.replace("0x","").startsWith(u)));if(y)return il({receipt:y},await a(()=>i.provider.getTransaction(y.transactionHash),`unable to get transaction ${y.transactionHash}`));o||await new Promise(m=>setTimeout(m,n))}throw new Error(`Timeout waiting for transaction receipt ${e}`)};return r!==void 0?Promise.race([c(),new Promise((l,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):c()}}function qoe(t){return t.signer!==void 0&&rl.isSigner(t.signer)}class Uoe extends gB{constructor(e){if(super(rl.isSigner(e)?{provider:e.provider}:il({},e,{provider:e.signer.provider})),this.signer=void 0,this.txnOptions=void 0,this.signer=rl.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&&Ae.warn("LocalRelayer doesn't accept fee quotes");const s=Ee.transaction.encodeBundleExecData(e),i=this.signer.sendTransaction(il({to:e.entrypoint,data:s},this.txnOptions,{gasLimit:9e6}));if(n){const o=await i;return o.receipt=await o.wait(),o}else return i}}const Woe="v1",Hoe="v0.4.1",Voe="13cf0e854e8127ae83218cc188ef0e7456241c96";let Rc=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}({}),Goe=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}({}),Koe=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),Yoe=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class bB{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Relayer/",this.ping=n=>this.fetch(this.url("Ping"),Pt({},n)).then(s=>It(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),Pt({},n)).then(s=>It(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Pt({},n)).then(s=>It(s).then(i=>({status:i.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),Pt({},n)).then(s=>It(s).then(i=>({data:i.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),Pt({},n)).then(s=>It(s).then(i=>({chainID:i.chainID}))),this.sendMetaTxn=(n,s)=>this.fetch(this.url("SendMetaTxn"),Pt(n,s)).then(i=>It(i).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,s)=>this.fetch(this.url("GetMetaTxnNonce"),Pt(n,s)).then(i=>It(i).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,s)=>this.fetch(this.url("GetMetaTxnReceipt"),Pt(n,s)).then(i=>It(i).then(o=>({receipt:o.receipt}))),this.simulate=(n,s)=>this.fetch(this.url("Simulate"),Pt(n,s)).then(i=>It(i).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,s)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),Pt(n,s)).then(i=>It(i).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),Pt({},n)).then(s=>It(s).then(i=>({isFeeRequired:i.isFeeRequired,tokens:i.tokens}))),this.feeOptions=(n,s)=>this.fetch(this.url("FeeOptions"),Pt(n,s)).then(i=>It(i).then(o=>({options:o.options,sponsored:o.sponsored,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,s)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),Pt(n,s)).then(i=>It(i).then(o=>({options:o.options}))),this.getMetaTransactions=(n,s)=>this.fetch(this.url("GetMetaTransactions"),Pt(n,s)).then(i=>It(i).then(o=>({page:o.page,transactions:o.transactions}))),this.sentTransactions=(n,s)=>this.fetch(this.url("SentTransactions"),Pt(n,s)).then(i=>It(i).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,s)=>this.fetch(this.url("PendingTransactions"),Pt(n,s)).then(i=>It(i).then(o=>({page:o.page,transactions:o.transactions}))),this.getGasTank=(n,s)=>this.fetch(this.url("GetGasTank"),Pt(n,s)).then(i=>It(i).then(o=>({gasTank:o.gasTank}))),this.addGasTank=(n,s)=>this.fetch(this.url("AddGasTank"),Pt(n,s)).then(i=>It(i).then(o=>({status:o.status,gasTank:o.gasTank}))),this.updateGasTank=(n,s)=>this.fetch(this.url("UpdateGasTank"),Pt(n,s)).then(i=>It(i).then(o=>({status:o.status,gasTank:o.gasTank}))),this.getGasSponsor=(n,s)=>this.fetch(this.url("GetGasSponsor"),Pt(n,s)).then(i=>It(i).then(o=>({gasSponsor:o.gasSponsor}))),this.listGasSponsors=(n,s)=>this.fetch(this.url("ListGasSponsors"),Pt(n,s)).then(i=>It(i).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,s)=>this.fetch(this.url("AddGasSponsor"),Pt(n,s)).then(i=>It(i).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,s)=>this.fetch(this.url("UpdateGasSponsor"),Pt(n,s)).then(i=>It(i).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.removeGasSponsor=(n,s)=>this.fetch(this.url("RemoveGasSponsor"),Pt(n,s)).then(i=>It(i).then(o=>({status:o.status}))),this.reportGasSponsorUsage=(n,s)=>this.fetch(this.url("ReportGasSponsorUsage"),Pt(n,s)).then(i=>It(i).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.nextGasTankBalanceAdjustmentNonce=(n,s)=>this.fetch(this.url("NextGasTankBalanceAdjustmentNonce"),Pt(n,s)).then(i=>It(i).then(o=>({nonce:o.nonce}))),this.adjustGasTankBalance=(n,s)=>this.fetch(this.url("AdjustGasTankBalance"),Pt(n,s)).then(i=>It(i).then(o=>({status:o.status,adjustment:o.adjustment}))),this.getGasTankBalanceAdjustment=(n,s)=>this.fetch(this.url("GetGasTankBalanceAdjustment"),Pt(n,s)).then(i=>It(i).then(o=>({adjustment:o.adjustment}))),this.listGasTankBalanceAdjustments=(n,s)=>this.fetch(this.url("ListGasTankBalanceAdjustments"),Pt(n,s)).then(i=>It(i).then(o=>({page:o.page,adjustments:o.adjustments}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const Pt=(t={},e={})=>({method:"POST",headers:il({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),It=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 Xd=Object.freeze({__proto__:null,WebRPCVersion:Woe,WebRPCSchemaVersion:Hoe,WebRPCSchemaHash:Voe,ETHTxnStatus:Rc,TransferType:Goe,FeeTokenType:Koe,SortOrder:Yoe,Relayer:bB});const Qoe=[Rc.DROPPED,Rc.SUCCEEDED,Rc.PARTIALLY_FAILED,Rc.FAILED],Joe=[Rc.DROPPED,Rc.PARTIALLY_FAILED,Rc.FAILED];function Xoe(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&Qa.isProvider(t.provider)}const Zoe=typeof Yn=="object"?Yn.fetch:window.fetch;class xB{constructor(e){if(this.options=e,this.service=void 0,this.provider=void 0,this._fetch=(r,n)=>{const s={},{jwtAuth:i,projectAccessKey:o}=this.options;return i&&i.length>0&&(s.Authorization=`BEARER ${i}`),o&&o.length>0&&(s["X-Access-Key"]=o),n.headers=il({},n.headers,s),Zoe(r,n)},this.service=new bB(e.url,this._fetch),Qa.isProvider(e.provider))this.provider=e.provider;else{const{jwtAuth:r,projectAccessKey:n}=this.options,s=nv(e.provider.url,n,r);this.provider=new Mg(s)}}async waitReceipt(e,r=1e3,n=5,s){typeof e!="string"&&(e=Ee.transaction.intendedTransactionID(e)),Ae.info(`[rpc-relayer/waitReceipt] waiting for ${e}`);let i=0;for(;s===void 0||!s();){try{const{receipt:o}=await this.service.getMetaTxnReceipt({metaTxID:e});if(o&&o.txnReceipt&&o.txnReceipt!=="null"&&Qoe.includes(o.status))return{receipt:o}}catch(o){if(i++,i===n)throw o}(s===void 0||!s())&&await new Promise(o=>setTimeout(o,r))}throw new Error(`Cancelled waiting for transaction receipt ${e}`)}async simulate(e,...r){const s=Dn.encode([Ee.transaction.MetaTransactionsType],[Ee.transaction.sequenceTxAbiEncode(r)]);return(await this.service.simulate({wallet:e,transactions:s})).results}async getFeeOptions(e,...r){const n=await this.service.feeTokens();if(n.isFeeRequired){const s=n.tokens.map(c=>c.symbol).join(", ");Ae.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${s}`);const i=await this.getNonce(e);if(!this.provider)throw Ae.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:Ee.transaction.encodeBundleExecData({entrypoint:e,transactions:r,nonce:i})});return Ae.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return Ae.info("[rpc-relayer/getFeeOptions] relayer fees are not required"),{options:[]}}async getFeeOptionsRaw(e,r,n){const{options:s,quote:i}=await this.service.feeOptions({wallet:e,to:e,data:le(r),simulate:n==null?void 0:n.simulate});return{options:s,quote:{_tag:"FeeQuote",_quote:i}}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}async getNonce(e,r){Ae.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?ne.from(r).toHexString():void 0,s=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),i=ne.from(s.nonce),[o,a]=Ee.transaction.decodeNonce(i);return Ae.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),i}async relay(e,r,n=!0){var s=this;Ae.info(`[rpc-relayer/relay] relaying signed meta-transactions ${JSON.stringify(e)} with quote ${JSON.stringify(r)}`);let i;if(r!==void 0&&(typeof r._quote=="string"?i=r._quote:Ae.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw Ae.warn("[rpc-relayer/relay] provider not set, failed relay"),new Error("provider is not set");const o=Ee.transaction.encodeBundleExecData(e),a=await this.service.sendMetaTxn({call:{walletAddress:e.intent.wallet,contract:e.entrypoint,input:o},quote:i});if(Ae.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(a)}`),n)return this.wait(e.intent.id);{const c={hash:e.intent.id,confirmations:0,from:e.intent.wallet,wait:f=>Promise.reject(new Error("impossible"))},l=async function(u){var d;if(!s.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const h=await s.wait(e.intent.id),v=(d=h.receipt)==null?void 0:d.transactionHash;if(!v)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(c,h),s.provider.waitForTransaction(v,u)};return c.wait=l,c}}async wait(e,r,n=1e3,s=5){var i=this;let o=!1;const{receipt:a}=await(r!==void 0?Promise.race([this.waitReceipt(e,n,s,()=>o),new Promise((l,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,s));if(!a.txnReceipt||Joe.includes(a.status))throw new eae(a);const c=JSON.parse(a.txnReceipt);return{blockHash:c.blockHash,blockNumber:ne.from(c.blockNumber).toNumber(),confirmations:1,from:typeof e=="string"?void 0:e.intent.wallet,hash:c.transactionHash,raw:a.txnReceipt,receipt:c,wait:async function(l){return i.provider.waitForTransaction(c.transactionHash,l)}}}}class eae{constructor(e){this.receipt=e}}function wB(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 tae=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:Uoe,ProviderRelayer:gB,ProviderRelayerDefaults:mB,RpcRelayer:xB,RpcRelayerProto:Xd,isLocalRelayerOptions:qoe,isProviderRelayerOptions:zoe,isRelayer:wB,isRpcRelayerOptions:Xoe,proto:Xd},Symbol.toStringTag,{value:"Module"}));function CB(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 EB{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 p3=Object.freeze({__proto__:null,isSapientSigner:CB,SignerWrapper:EB});let Mc=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 kB(t){return t===void 0||t.state===Mc.INITIAL||t.state===Mc.SIGNING}class W2{constructor(e,r=W2.randomTag()){this.tag=r,this.observers=[],this.signers=[],this.count=0,this.setSigners(e)}static randomTag(){return`default-${le(Wi(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>CB(r)?r:new EB(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(s){return s.notifyStatusChange(e,r,n)}),...this.observers.map(async function(s){return s(r,n)})])}async buildDeployTransaction(e){let r;for(const n of this.signers){const s=await n.buildDeployTransaction(e);r===void 0?r=s:s!=null&&s.transactions&&(r.transactions=s.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(s){const{message:i,metadata:o,callback:a,candidates:c}=e,l={ended:!1,message:i,signers:{}};let f=o??{};const u=y=>{f=y,r.notifyObservers(n,l,f)},d=()=>{try{r.notifyObservers(n,l,f);const y=Object.entries(l.signers).filter(([m,g])=>kB(g));if(a&&a(l,u)||y.length===0){l.ended=!0,s(l),r.notifyObservers(n,l,f);return}}catch(y){console.error("Error while notifying observers",y)}};let h=r.signers;if(c){const y=await Promise.all(r.signers.map(async function(m){return m.getAddress()}));h=r.signers.filter((m,g)=>c.includes(y[g]))}const v=await Promise.allSettled(h.map(async function(y){const m=await y.getAddress();l.signers[m]={state:Mc.SIGNING,request:y.sign(i,o??{}).then(g=>{const b=y.suffix();return l.signers[m]={state:Mc.SIGNED,signature:g,suffix:b},d(),g}).catch(g=>{throw l.signers[m]={state:Mc.ERROR,error:g},d(),g})}}));for(let y=0;yMt(e))):Mt(t)}const Y$=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(n.state===Mc.SIGNED){const s=ue(n.suffix),i=tt(["bytes","bytes"],[n.signature,s]);e.set(r,{signature:i,isDynamic:s.length!==1||s[0]!==2})}}return e};class iv extends rl{constructor(e){if(yr.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=Ee.context.addressOf(e.context,e.coders.config.imageHashOf(e.config));return new iv(Sc({},e,{address:r}))}reader(){if(this._reader)return this._reader;if(!this.provider)throw new Error("Wallet status provider requires a provider");return new Ee.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:Ee.transaction.encodeBundleExecData(r),revertOnError:!0}],s=await this.buildDeployTransaction();return s&&n.unshift(...s.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(Ee.context.addressOf(this.context,r)!==this.address)throw new Error(`First address of config ${r} doesn't match wallet address ${this.address}`);const n=iv.buildDeployTransaction(this.context,r);if(e!=null&&e.includeChildren){const s=await this.orchestrator.buildDeployTransaction(e);s&&(n.transactions=s.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(Sc({},r,{chainId:this.chainId,intent:{id:le(Wi(32)),wallet:this.address}}))}}static buildDeployTransaction(e,r){const n=new Ir(cn.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=s3(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 s=Sc({},r,{digest:e,chainId:this.chainId,address:this.address,config:this.config}),i=ue(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(c=>c.address),message:i,metadata:s,callback:(c,l)=>{const f=Y$(c),u=Sc({},s,{parts:f});return l(u),this.coders.signature.hasEnoughSigningPower(this.config,f)}}),a=Y$(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(Ne(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=ne.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 Ee.transaction.encodeNonce(r,n)}randomNonce(){const e=ne.from(le(Wi(12)));return Ee.transaction.encodeNonce(e,0)}async signTransactions(e,r,n){const s=await K$(e),i=Ee.transaction.fromTransactionish(this.address,s);i.length===0&&i.push({to:this.address,data:"0x",value:0,gasLimit:0,delegateCall:!1,revertOnError:!0});const o=await this.fetchNonceOrSpace(r),a=Ee.transaction.digestOfTransactions(o,i),c=Sc({digest:a,transactions:i},n),l=await this.signDigest(a,c);return{intent:{id:s3(this.address,this.chainId,a),wallet:this.address},chainId:this.chainId,transactions:i,entrypoint:this.address,nonce:o,signature:l}}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 s=await this.signTransactions(e,n),i=await this.decorateTransactions(s);return this.sendSignedTransaction(i,r==null?void 0:r.quote)}async fillGasLimits(e){const r=await K$(e),n=Ee.transaction.fromTransactionish(this.address,r),s=this.relayer;if(!s)throw new Error("Wallet fillGasLimits requires a relayer");const i=await s.simulate(this.address,...n);return n.map((o,a)=>{const c=o.gasLimit?ne.from(o.gasLimit).toNumber():i[a].gasLimit;return Sc({},o,i[a],{gasLimit:c})})}connect(e,r){return this.provider=e,this.relayer=r,this}signTransaction(e){throw new Error("Method not implemented.")}}function ea(){return ea=Object.assign?Object.assign.bind():function(t){for(var e=1;enae(t[e])):!1}function iae(t){if(!t)return[];const e=ne.from(t.value);switch(t.token.type){case Xd.FeeTokenType.UNKNOWN:return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.to,value:e.toHexString(),data:[]}];case Xd.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 oae{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 s of r)if(s.token.type===Xd.FeeTokenType.UNKNOWN){if((await this.getBalance()).gte(ne.from(s.value)))return s}else if(s.token.contractAddress&&s.token.type===Xd.FeeTokenType.ERC20_TOKEN&&(await new S1(s.token.contractAddress,n,this.provider).balanceOf(this.account.address)).gte(ne.from(s.value)))return s;throw new Error("No fee option available - not enough balance")}async sendTransaction(e,r){var n,s,i,o,a;const c=sae(e)?await Mt(e):e,l=await this.account.prepareTransactions({txs:c,chainId:this.chainId,stubSignatureOverrides:(n=(s=this.options)==null?void 0:s.stubSignatureOverrides)!=null?n:new Map,simulateForFeeOptions:r==null?void 0:r.simulateForFeeOptions}),u=await((i=(o=this.options)==null?void 0:o.selectFee)!=null?i:this.defaultSelectFee.bind(this))(c,l.feeOptions),d=[...l.transactions,...iae(u)];return this.account.sendTransaction(d,this.chainId,l.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(ne.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 aae{async isDeployed(e){return!1}async implementation(e){}async imageHash(e){}async nonce(e,r){return yr}async isValidSignature(e,r,n){throw new Error("Method not supported.")}}class da{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=He(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||y3.DefaultMigrations,this.migrator=new v3.Migrator(e.tracker,this.migrations,this.contexts)}getSigner(e,r){return new oae(this,e,r)}static async new(e){var r;const s=new v3.Migrator(e.tracker,(r=e.migrations)!=null?r:y3.DefaultMigrations,e.contexts).lastMigration(),i=s.configCoder,o=i.fromSimple(e.config),a=i.imageHashOf(o),c=e.contexts[s.version],l=Ee.context.addressOf(c,a);return await e.tracker.saveCounterfactualWallet({config:o,context:Object.values(e.contexts)}),new da({address:l,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=ne.from(e),n=this.networks.find(s=>r.eq(s.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 Mg(nv(r.rpcUrl,this.projectAccessKey,this.jwt),{name:"",chainId:ne.from(e).toNumber()})}reader(e){return yr.eq(e)?new aae:new Ee.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 wB(r.relayer)?r.relayer:new xB(ea({},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=vn.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,s){const i=yr.eq(e);return new iv({config:n,context:r,chainId:e,coders:s,relayer:i?void 0:this.relayer(e),address:this.address,orchestrator:this.orchestrator,reader:this.reader(e)})}async status(e,r=!1){var n=this;const s=this.reader(e).isDeployed(this.address),i=this.tracker.imageHashOfCounterfactualWallet({wallet:this.address}).then($=>{if(!$)throw new Error(`Counterfactual imageHash not found for wallet ${this.address}`);return $}),o=i.then($=>vB.counterfactualVersion(this.address,$.imageHash,Object.values(this.contexts))),a=async function(){if(!await s)return o;const I=await n.reader(e).implementation(n.address);if(!I)throw new Error(`Implementation not found for wallet ${n.address}`);const M=Object.values(n.contexts);for(let D=0;D0?y[y.length-1].nextImageHash:d,g=await this.tracker.configOfImageHash({imageHash:m});if(!g)throw new Error(`Config not found for imageHash ${m}`);const b=await s,x=await i,k=vn.coderFor(h).config.checkpointOf(g);return{original:ea({},x,{version:await o}),onChain:{imageHash:u,config:await l,version:f,deployed:b},fullyMigrated:h===this.version,signedMigrations:v,version:h,presignedConfigurations:y,imageHash:m,config:g,checkpoint:k,canOnchainValidate:f===this.version&&b}}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}),s=await this.predecorateTransactions([],e,r);return Ee.transaction.fromTransactionish(this.address,s).length>0&&n.push(await this.signTransactions(s,r)),n}async predecorateTransactions(e,r,n){if(r.onChain.imageHash!==r.imageHash){const i=await this.walletForStatus(n,r).buildUpdateConfigurationTransaction(r.config);return[Array.isArray(e)?e:[e],i.transactions].flat()}return e}async decorateTransactions(e,r,n){var s,i;if(!Array.isArray(e))return this.decorateTransactions([e],r,n);n=(s=n)!=null?s: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:c}=a?o:e[0],l={entrypoint:c,chainId:n,intent:(i=e[0])==null?void 0:i.intent,transactions:[...o.transactions,...e.map(f=>({to:f.entrypoint,data:Ee.transaction.encodeBundleExecData(f),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}))]};if(!r.onChain.deployed){const f=Ee.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,n,l.transactions);l.intent===void 0?l.intent={id:f,wallet:this.address}:l.intent.id=f}return l}async decorateSignature(e,r){if(!r.presignedConfigurations||r.presignedConfigurations.length===0)return e;const n=this.coders.signature,s=r.presignedConfigurations.map(o=>o.signature),i=n.chainSignatures(e,s);return n.trim(i)}async publishWitness(){const e=Ne(_t(`This is a Sequence account woo! ${Date.now()}`)),r=await this.signDigest(e,0,!1),n=this.coders.signature.decode(r),s=this.coders.signature.signaturesOfDecoded(n);return this.tracker.saveWitnesses({wallet:this.address,digest:e,chainId:0,signatures:s})}async signDigest(e,r,n=!0,s="ignore",i){const o=yr.eq(r)?this.networks[0].chainId:r,a=await this.status(o);if(this.mustBeFullyMigrated(a),!a.canOnchainValidate&&s==="throw")throw new Error("Wallet cannot validate onchain");const l=await this.walletForStatus(r,a).signDigest(e,i),f=n?this.decorateSignature(l,a):l;if(!a.canOnchainValidate)switch(s){case"ignore":return f;case"eip6492":return this.buildEIP6492Signature(await f,a,r)}return f}buildOnChainSignature(e){const r=Ee.signature.subdigestOf({digest:le(e),chainId:0,address:this.address}),n=le(r),s=this.coders.config.fromSimple({threshold:32768,checkpoint:0,signers:[],subdigests:[n]}),i=new Ir(cn.mainModule.abi),o={entrypoint:this.address,transactions:[{to:this.address,data:i.encodeFunctionData("setExtraImageHash",[this.coders.config.imageHashOf(s),"57896044618658097711785492504343953926634992332820282019728792003956564819968"]),gasLimit:25e4}]};this.tracker.saveWalletConfig({config:s});const a=this.coders.signature.encodeSigners(s,new Map,[n],0).encoded;return{bundle:o,signature:a}}async buildEIP6492Signature(e,r,n){const s=await this.buildBootstrapTransactions(r,n);if(s.transactions.length===0)throw new Error("Cannot build EIP-6492 signature without bootstrap transactions");const i=Dn.encode(["address","bytes","bytes"],[s.entrypoint,Ee.transaction.encodeBundleExecData(s),e]);return tt(["bytes","bytes32"],[i,Ee.EIP6492.EIP_6492_SUFFIX])}async editConfig(e){const r=await this.status(0).then(s=>s.config),n=this.coders.config.editConfig(r,ea({},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),s=await this.signDigest(n,0,!1);await this.tracker.savePresignedConfiguration({wallet:this.address,nextConfig:e,signature:s});const i=await this.tracker.configOfImageHash({imageHash:r,noCache:!0});if(!i||this.coders.config.imageHashOf(i)!==r)throw Error(`Reverse lookup failed for imageHash ${r}`)}async buildBootstrapTransactions(e,r){var n;const s=await this.orchestrator.buildDeployTransaction({chainId:r}),i=(n=s==null?void 0:s.transactions)!=null?n:[];if(!e.onChain.deployed){const c=iv.buildDeployTransaction(e.original.context,e.original.imageHash);i.push(...c.transactions)}i.length,i.push(...e.signedMigrations.map(c=>({to:c.tx.entrypoint,data:Ee.transaction.encodeBundleExecData(c.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const o=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:Ee.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,r,i),{guestModule:a}=this.contextFor(e.version);return{entrypoint:a,transactions:i,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 s=await this.bootstrapTransactions(e,n);return this.relayer(e).relay(ea({},s,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(Ne(e),r,!0,n)}async signTransactions(e,r,n,s){const i=n||await this.status(r);this.mustBeFullyMigrated(i);const o=this.walletForStatus(r,i),a={address:this.address,digest:"",chainId:r,config:{version:this.version},decorate:!0,cantValidateBehavior:"ignore"},c=s!=null&&s.serial?{serial:!0}:(s==null?void 0:s.nonceSpace)!==void 0?{space:s.nonceSpace}:void 0,l=await o.signTransactions(e,c,a);return ea({},l,{signature:await this.decorateSignature(l.signature,i)})}async signMigrations(e,r){const n=await this.status(e);if(n.fullyMigrated)return!1;const s=this.walletForStatus(e,n),i=r(s.config),o=await this.migrator.signNextMigration(this.address,n.version,s,i);if(!o)return!1;await this.tracker.saveWalletConfig({config:i});const a=vn.coderFor(i.version).config,c=a.imageHashOf(i),l=await this.tracker.configOfImageHash({imageHash:c,noCache:!0});if(!l||a.imageHashOf(l)!==c)throw Error(`Reverse lookup failed for imageHash ${c}`);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(i){try{return await e.status(i.chainId)}catch(o){return r.push(i.chainId),console.warn(`Failed to get status for chain ${i.chainId}`,o),{fullyMigrated:!0}}}))).every(i=>i.fullyMigrated),failedChains:r}}async sendSignedTransactions(e,r,n,s,i){if(!Array.isArray(e))return this.sendSignedTransactions([e],r,n,s,i);const o=s||await this.status(r);this.mustBeFullyMigrated(o);const a=await this.decorateTransactions(e,o,r);return i==null||i(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,s,i){const o=s||await this.status(r),a=this.walletForStatus(r,o),c=await this.predecorateTransactions(e,o,r),l=Ee.transaction.fromTransactionish(this.address,c),f=a.coders.config.buildStubSignature(a.config,n),u=le(Wi(32)),d={chainId:r,intent:{id:u,wallet:this.address},signature:f,transactions:l,entrypoint:this.address,nonce:0},h=await this.decorateTransactions(d,o),v=Ee.transaction.encodeBundleExecData(h),y=await this.relayer(r).getFeeOptionsRaw(h.entrypoint,v,i);return ea({},y,{decorated:h})}async prepareTransactions(e){const r=await this.status(e.chainId),n=await this.fillGasLimits(e.txs,e.chainId,r),s=await this.gasRefundQuotes(n,e.chainId,e.stubSignatureOverrides,r,{simulate:e.simulateForFeeOptions}),i=Ee.transaction.unwind(this.address,s.decorated.transactions);return{transactions:n,flatDecorated:i,feeOptions:s.options,feeQuote:s.quote}}async sendTransaction(e,r,n,s=!1,i,o){const a=await this.status(r),c=s?e:await this.predecorateTransactions(e,a,r),f=Ee.transaction.fromTransactionish(this.address,c).length>0?await this.signTransactions(c,r,void 0,o):void 0,u=await this.orchestrator.predecorateSignedTransactions({chainId:r}),d=[];return f!==void 0&&f.transactions.length>0&&d.push(f),d.push(...u.filter(h=>h.transactions.length>0)),this.sendSignedTransactions(d,r,n,void 0,i)}async signTypedData(e,r,n,s,i="ignore"){const o=sy({domain:e,types:r,message:n});return this.signDigest(o,s,!0,i)}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:s}){try{var i;const o=await e.status(n);let a=(i=r(o.presignedConfigurations))==null?void 0:i.nextImageHash;if(!a&&o.onChain.version!==o.version){const u=r(o.signedMigrations);if(u){const{toVersion:d,toConfig:h}=u;a=vn.genericCoderFor(d).config.imageHashOf(h)}}a||(a=o.onChain.imageHash);const c=await e.tracker.configOfImageHash({imageHash:a});if(!c)throw new Error(`unable to find config for image hash ${a}`);return vn.genericCoderFor(c.version).config.signersOf(c).map(u=>ea({},u,{network:n}))}catch(o){return console.warn(`unable to get signers on network ${n} ${s}`,o),[]}}))).flat()}async getAllSigners(){var e=this;const r=[];return await Promise.all(this.networks.map(async function(n){const s=n.chainId,i=await e.status(s,!0),o=[i.onChain.imageHash,...i.onChain.version!==i.version?i.signedMigrations.map(a=>vn.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...i.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,c){const l=c===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}vn.genericCoderFor(f.version).config.signersOf(f).forEach(h=>{const v=r.find(y=>y.address===h.address&&y.network===s);if(v&&l&&v.flaggedForRemoval){v.flaggedForRemoval=!1;return}v||r.push({address:h.address,weight:h.weight,network:s,flaggedForRemoval:!l})})}))})),r}}function cae(t){return t instanceof da}const lae=Object.freeze(Object.defineProperty({__proto__:null,Account:da,isAccount:cae},Symbol.toStringTag,{value:"Module"}));function Ug(){return Ug=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),qr({},n)).then(s=>Ur(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),qr({},n)).then(s=>Ur(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),qr({},n)).then(s=>Ur(s).then(i=>({status:i.status}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),qr({},n)).then(s=>Ur(s).then(i=>({chainID:i.chainID}))),this.getEtherBalance=(n,s)=>this.fetch(this.url("GetEtherBalance"),qr(n,s)).then(i=>Ur(i).then(o=>({balance:o.balance}))),this.getTokenBalances=(n,s)=>this.fetch(this.url("GetTokenBalances"),qr(n,s)).then(i=>Ur(i).then(o=>({page:o.page,balances:o.balances}))),this.getTokenSupplies=(n,s)=>this.fetch(this.url("GetTokenSupplies"),qr(n,s)).then(i=>Ur(i).then(o=>({page:o.page,contractType:o.contractType,tokenIDs:o.tokenIDs}))),this.getTokenSuppliesMap=(n,s)=>this.fetch(this.url("GetTokenSuppliesMap"),qr(n,s)).then(i=>Ur(i).then(o=>({supplies:o.supplies}))),this.getBalanceUpdates=(n,s)=>this.fetch(this.url("GetBalanceUpdates"),qr(n,s)).then(i=>Ur(i).then(o=>({page:o.page,balances:o.balances}))),this.getTransactionHistory=(n,s)=>this.fetch(this.url("GetTransactionHistory"),qr(n,s)).then(i=>Ur(i).then(o=>({page:o.page,transactions:o.transactions}))),this.syncBalance=(n,s)=>this.fetch(this.url("SyncBalance"),qr(n,s)).then(i=>Ur(i).then(o=>({}))),this.fetchTransactionReceipt=(n,s)=>this.fetch(this.url("FetchTransactionReceipt"),qr(n,s)).then(i=>Ur(i).then(o=>({receipt:o.receipt}))),this.getOrderbookOrders=(n,s)=>this.fetch(this.url("GetOrderbookOrders"),qr(n,s)).then(i=>Ur(i).then(o=>({page:o.page,orders:o.orders}))),this.getTopOrders=(n,s)=>this.fetch(this.url("GetTopOrders"),qr(n,s)).then(i=>Ur(i).then(o=>({orders:o.orders}))),this.fetchTransactionReceiptWithFilter=(n,s)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),qr(n,s)).then(i=>Ur(i).then(o=>({receipt:o.receipt}))),this.getAllWebhookListeners=(n,s)=>this.fetch(this.url("GetAllWebhookListeners"),qr(n,s)).then(i=>Ur(i).then(o=>({listeners:o.listeners}))),this.getWebhookListener=(n,s)=>this.fetch(this.url("GetWebhookListener"),qr(n,s)).then(i=>Ur(i).then(o=>({listener:o.listener}))),this.addWebhookListener=(n,s)=>this.fetch(this.url("AddWebhookListener"),qr(n,s)).then(i=>Ur(i).then(o=>({status:o.status,listener:o.listener}))),this.updateWebhookListener=(n,s)=>this.fetch(this.url("UpdateWebhookListener"),qr(n,s)).then(i=>Ur(i).then(o=>({status:o.status}))),this.removeWebhookListener=(n,s)=>this.fetch(this.url("RemoveWebhookListener"),qr(n,s)).then(i=>Ur(i).then(o=>({status:o.status}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const qr=(t={},e={})=>({method:"POST",headers:Ug({},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}),Q$=typeof Yn=="object"?Yn.fetch:window.fetch;class _k extends SB{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,Q$),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(s,i)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),i.headers=Ug({},i.headers,o),Q$(s,i)},this.fetch=this._fetch}}const bae=Object.freeze(Object.defineProperty({__proto__:null,ContractType:oi,EventLogDataType:vae,EventLogType:hae,Indexer:SB,OrderStatus:yae,SequenceIndexer:_k,SortOrder:gae,TransactionStatus:pae,TransactionType:mae,TxnTransferType:$n,WebRPCSchemaHash:dae,WebRPCSchemaVersion:uae,WebRPCVersion:fae},Symbol.toStringTag,{value:"Module"}));function ov(){return ov=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Ze({},n)).then(s=>et(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),Ze({},n)).then(s=>et(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Ze({},n)).then(s=>et(s).then(i=>({status:i.status}))),this.getTokenMetadata=(n,s)=>this.fetch(this.url("GetTokenMetadata"),Ze(n,s)).then(i=>et(i).then(o=>({tokenMetadata:o.tokenMetadata}))),this.refreshTokenMetadata=(n,s)=>this.fetch(this.url("RefreshTokenMetadata"),Ze(n,s)).then(i=>et(i).then(o=>({taskId:o.taskId}))),this.enqueueTokensForRefresh=(n,s)=>this.fetch(this.url("EnqueueTokensForRefresh"),Ze(n,s)).then(i=>et(i).then(o=>({taskId:o.taskId}))),this.getTokenRefreshStatus=(n,s)=>this.fetch(this.url("GetTokenRefreshStatus"),Ze(n,s)).then(i=>et(i).then(o=>({status:o.status}))),this.getTokenRefreshResult=(n,s)=>this.fetch(this.url("GetTokenRefreshResult"),Ze(n,s)).then(i=>et(i).then(o=>({status:o.status,tokens:o.tokens,failureReasons:o.failureReasons}))),this.cancelRefreshJob=(n,s)=>this.fetch(this.url("CancelRefreshJob"),Ze(n,s)).then(i=>et(i).then(o=>({ok:o.ok}))),this.getTokenMetadataBatch=(n,s)=>this.fetch(this.url("GetTokenMetadataBatch"),Ze(n,s)).then(i=>et(i).then(o=>({contractTokenMetadata:o.contractTokenMetadata}))),this.searchTokenMetadata=(n,s)=>this.fetch(this.url("SearchTokenMetadata"),Ze(n,s)).then(i=>et(i).then(o=>({page:o.page,tokenMetadata:o.tokenMetadata}))),this.searchTokenIDs=(n,s)=>this.fetch(this.url("SearchTokenIDs"),Ze(n,s)).then(i=>et(i).then(o=>({page:o.page,tokenIds:o.tokenIds}))),this.tokenCollectionFilters=(n,s)=>this.fetch(this.url("TokenCollectionFilters"),Ze(n,s)).then(i=>et(i).then(o=>({filters:o.filters}))),this.getContractInfo=(n,s)=>this.fetch(this.url("GetContractInfo"),Ze(n,s)).then(i=>et(i).then(o=>({contractInfo:o.contractInfo}))),this.getContractInfoBatch=(n,s)=>this.fetch(this.url("GetContractInfoBatch"),Ze(n,s)).then(i=>et(i).then(o=>({contractInfoMap:o.contractInfoMap}))),this.searchContractInfo=(n,s)=>this.fetch(this.url("SearchContractInfo"),Ze(n,s)).then(i=>et(i).then(o=>({contractInfoList:o.contractInfoList}))),this.searchContractInfoBatch=(n,s)=>this.fetch(this.url("SearchContractInfoBatch"),Ze(n,s)).then(i=>et(i).then(o=>({contractInfoByChain:o.contractInfoByChain}))),this.searchMetadata=(n,s)=>this.fetch(this.url("SearchMetadata"),Ze(n,s)).then(i=>et(i).then(o=>({tokenMetadata:o.tokenMetadata,contractInfo:o.contractInfo}))),this.getNiftyswapTokenQuantity=(n,s)=>this.fetch(this.url("GetNiftyswapTokenQuantity"),Ze(n,s)).then(i=>et(i).then(o=>({quantity:o.quantity}))),this.getNiftyswapUnitPrices=(n,s)=>this.fetch(this.url("GetNiftyswapUnitPrices"),Ze(n,s)).then(i=>et(i).then(o=>({prices:o.prices}))),this.getNiftyswapUnitPricesWithQuantities=(n,s)=>this.fetch(this.url("GetNiftyswapUnitPricesWithQuantities"),Ze(n,s)).then(i=>et(i).then(o=>({prices:o.prices}))),this.addContractToMintMonitor=(n,s)=>this.fetch(this.url("AddContractToMintMonitor"),Ze(n,s)).then(i=>et(i).then(o=>({ok:o.ok}))),this.removeContractFromMintMonitor=(n,s)=>this.fetch(this.url("RemoveContractFromMintMonitor"),Ze(n,s)).then(i=>et(i).then(o=>({ok:o.ok}))),this.mintMonitorJobStatus=(n,s)=>this.fetch(this.url("MintMonitorJobStatus"),Ze(n,s)).then(i=>et(i).then(o=>({task:o.task}))),this.mintMonitorTriggerJob=(n,s)=>this.fetch(this.url("MintMonitorTriggerJob"),Ze(n,s)).then(i=>et(i).then(o=>({ok:o.ok}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}class $B{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Collections/",this.createCollection=(n,s)=>this.fetch(this.url("CreateCollection"),Ze(n,s)).then(i=>et(i).then(o=>({collection:o.collection}))),this.getCollection=(n,s)=>this.fetch(this.url("GetCollection"),Ze(n,s)).then(i=>et(i).then(o=>({collection:o.collection}))),this.listCollections=(n,s)=>this.fetch(this.url("ListCollections"),Ze(n,s)).then(i=>et(i).then(o=>({page:o.page,collections:o.collections}))),this.updateCollection=(n,s)=>this.fetch(this.url("UpdateCollection"),Ze(n,s)).then(i=>et(i).then(o=>({collection:o.collection}))),this.deleteCollection=(n,s)=>this.fetch(this.url("DeleteCollection"),Ze(n,s)).then(i=>et(i).then(o=>({status:o.status}))),this.publishCollection=(n,s)=>this.fetch(this.url("PublishCollection"),Ze(n,s)).then(i=>et(i).then(o=>({collection:o.collection}))),this.unpublishCollection=(n,s)=>this.fetch(this.url("UnpublishCollection"),Ze(n,s)).then(i=>et(i).then(o=>({collection:o.collection}))),this.createToken=(n,s)=>this.fetch(this.url("CreateToken"),Ze(n,s)).then(i=>et(i).then(o=>({token:o.token,assets:o.assets}))),this.getToken=(n,s)=>this.fetch(this.url("GetToken"),Ze(n,s)).then(i=>et(i).then(o=>({token:o.token,assets:o.assets}))),this.listTokens=(n,s)=>this.fetch(this.url("ListTokens"),Ze(n,s)).then(i=>et(i).then(o=>({page:o.page,tokens:o.tokens}))),this.updateToken=(n,s)=>this.fetch(this.url("UpdateToken"),Ze(n,s)).then(i=>et(i).then(o=>({token:o.token}))),this.deleteToken=(n,s)=>this.fetch(this.url("DeleteToken"),Ze(n,s)).then(i=>et(i).then(o=>({status:o.status}))),this.createAsset=(n,s)=>this.fetch(this.url("CreateAsset"),Ze(n,s)).then(i=>et(i).then(o=>({asset:o.asset}))),this.getAsset=(n,s)=>this.fetch(this.url("GetAsset"),Ze(n,s)).then(i=>et(i).then(o=>({asset:o.asset}))),this.updateAsset=(n,s)=>this.fetch(this.url("UpdateAsset"),Ze(n,s)).then(i=>et(i).then(o=>({asset:o.asset}))),this.deleteAsset=(n,s)=>this.fetch(this.url("DeleteAsset"),Ze(n,s)).then(i=>et(i).then(o=>({status:o.status}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const Ze=(t={},e={})=>({method:"POST",headers:ov({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),et=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}),Wg=typeof Yn=="object"?Yn.fetch:window.fetch;class Pk extends AB{constructor(e="https://metadata.sequence.app",r,n){super(e.endsWith("/")?e.slice(0,-1):e,Wg),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(s,i)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),i.headers=ov({},i.headers,o),Wg(s,i)},this.fetch=this._fetch}}class $ae extends $B{constructor(e="https://metadata.sequence.app",r){super(e.endsWith("/")?e.slice(0,-1):e,Wg),this.jwtAuth=r,this._fetch=(n,s)=>{const i={},o=this.jwtAuth;return o&&o.length>0&&(i.Authorization=`BEARER ${o}`),s.headers=ov({},s.headers,i),Wg(n,s)},this.fetch=this._fetch}}const _ae=Object.freeze(Object.defineProperty({__proto__:null,Collections:$B,ContractType:Eae,Metadata:AB,PropertyType:kae,SequenceCollections:$ae,SequenceMetadata:Pk,SwapType:Sae,TaskStatus:Aae,WebRPCSchemaHash:Cae,WebRPCSchemaVersion:wae,WebRPCVersion:xae},Symbol.toStringTag,{value:"Module"}));function Pae(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function Iae(t){return t.startsWith("ipfs://")}class Tae{constructor(e,r,n=1e3){this.provider=e,this.solver=r,this.window=n,this.pending=new Map}async runByEIP5719(e,r,n){const s=`${e}-${r}-${n}`,i=Date.now();if(this.pending.has(s)&&i-this.pending.get(s).timestamp10)throw new Error("EIP5719 - Too many tries");if(Ee.signer.canRecover(n)){const c=Ee.signer.recoverSigner(r,n);if(c&&c.toLowerCase()===t.toLowerCase())return n}try{if(await Ee.signer.isValidSignature(t,r,n,e))return n}catch{}const o=await Rae(Oae(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=le(await(s||new Mae).resolve(o));if(!a||a==="")throw new Error("EIP5719 - Empty alternative signature");if(a===le(n))throw new Error("EIP5719 - Alternative signature is invalid or the same");return _B(t,e,r,a,s,i+1)}class Mae{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.gateway=e,this.uri=n=>Iae(n)?Pae(n,this.gateway):n,this.resolve=async function(n){const s=r.uri(n),i=await fetch(s);if(!i.ok)throw new Error(`URISolverIPFS - Failed to fetch ${s}`);return await i.text()}}}const Nae=(t,e)=>e.some(r=>t instanceof r);let J$,X$;function jae(){return J$||(J$=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Dae(){return X$||(X$=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const PB=new WeakMap,m3=new WeakMap,IB=new WeakMap,A5=new WeakMap,Ik=new WeakMap;function Lae(t){const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{r(Gc(t.result)),s()},o=()=>{n(t.error),s()};t.addEventListener("success",i),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&PB.set(r,t)}).catch(()=>{}),Ik.set(e,t),e}function Bae(t){if(m3.has(t))return;const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{r(),s()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});m3.set(t,e)}let g3={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return m3.get(t);if(e==="objectStoreNames")return t.objectStoreNames||IB.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Gc(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 Fae(t){g3=t(g3)}function zae(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call($5(this),e,...r);return IB.set(n,e.sort?e.sort():[e]),Gc(n)}:Dae().includes(t)?function(...e){return t.apply($5(this),e),Gc(PB.get(this))}:function(...e){return Gc(t.apply($5(this),e))}}function qae(t){return typeof t=="function"?zae(t):(t instanceof IDBTransaction&&Bae(t),Nae(t,jae())?new Proxy(t,g3):t)}function Gc(t){if(t instanceof IDBRequest)return Lae(t);if(A5.has(t))return A5.get(t);const e=qae(t);return e!==t&&(A5.set(t,e),Ik.set(e,t)),e}const $5=t=>Ik.get(t);function Uae(t,e,{blocked:r,upgrade:n,blocking:s,terminated:i}={}){const o=indexedDB.open(t,e),a=Gc(o);return n&&o.addEventListener("upgradeneeded",c=>{n(Gc(o.result),c.oldVersion,c.newVersion,Gc(o.transaction),c)}),r&&o.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),a.then(c=>{i&&c.addEventListener("close",()=>i()),s&&c.addEventListener("versionchange",l=>s(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}const Wae=["get","getKey","getAll","getAllKeys","count"],Hae=["put","add","delete","clear"],_5=new Map;function Z$(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(_5.get(e))return _5.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,s=Hae.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(s||Wae.includes(r)))return;const i=async function(o,...a){const c=this.transaction(o,s?"readwrite":"readonly");let l=c.store;return n&&(l=l.index(a.shift())),(await Promise.all([l[r](...a),s&&c.done]))[0]};return _5.set(e,i),i}Fae(t=>({...t,get:(e,r,n)=>Z$(e,r)||t.get(e,r,n),has:(e,r)=>!!Z$(e,r)||t.has(e,r)}));class Vae{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 Gae=Object.freeze({__proto__:null,ConfigTracker:Vae});class Kae{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),zn(e,"? "),zn(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),zn(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),zn(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),zn(e,"? "),zn(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),zn(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),zn(e,"? "),zn(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),zn(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),zn(e,"? "),zn(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,s){return console.debug("? getMigration"),zn({address:e,fromImageHash:r,fromVersion:n,chainId:s},"? "),zn(await this.tracker.getMigration(e,r,n,s),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),zn({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function zn(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 Yae=Object.freeze({__proto__:null,DebugConfigTracker:Kae});function ol(){return ol=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 s;return Promise.resolve(((s=this.migrations[e])==null||(s=s[r])==null?void 0:s[n])||[])},this.saveMigrationsSubdigest=(e,r,n,s,i)=>(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:s,toImageHash:i}),Promise.resolve())}}function Id(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]=ne.from(n):Array.isArray(n)?e[r]=n.map(s=>Id(s)):typeof n=="object"&&n!==null?e[r]=Id(n):e[r]=n}return e}class Qae{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(i=>Id(i))},this.saveConfig=async function(n,s){await(await r.getDb()).put("configs",s,n)},this.loadV2Node=async function(n){return(await r.getDb()).get("v2Nodes",n).then(i=>Id(i))},this.saveV2Node=async function(n,s){await(await r.getDb()).put("v2Nodes",s,n)},this.loadCounterfactualWallet=async function(n){return(await r.getDb()).get("counterfactualWallets",n)},this.saveCounterfactualWallet=async function(n,s,i){await(await r.getDb()).put("counterfactualWallets",{imageHash:s,context:i},n)},this.loadPayloadOfSubdigest=async function(n){return(await r.getDb()).get("payloads",n).then(i=>Id(i))},this.savePayloadOfSubdigest=async function(n,s){await(await r.getDb()).put("payloads",s,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,s){const o=await(await r.getDb()).get("signatures",[s,n].join("-"));return o==null?void 0:o.signature},this.saveSignatureOfSubdigest=async function(n,s,i){await(await r.getDb()).put("signatures",{signature:i,signer:n},[s,n].join("-"))},this.loadMigrationsSubdigest=async function(n,s,i){return(await(await r.getDb()).getAllFromIndex("migrations","jump",IDBKeyRange.only([n,s,i]))).map(c=>({subdigest:c.subdigest,toImageHash:c.toImageHash}))},this.saveMigrationsSubdigest=async function(n,s,i,o,a){await(await r.getDb()).put("migrations",{wallet:n,fromVersion:s,toVersion:i,subdigest:o,toImageHash:a},o)}}async getDb(){if(this._lazyDb)return this._lazyDb;const e=this.dbName;return this._lazyDb=await Uae(e,1,{upgrade(r,n,s,i){console.log(`upgrading ${e} from ${n} to ${s} - ${i}`),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 OB(t){return t.left!==void 0&&t.right!==void 0}function RB(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function b3(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var Jae=Object.freeze({__proto__:null,isPlainNode:OB,isPlainNested:RB,isPlainV2Config:b3,MemoryTrackerStore:TB,recreateBigNumbers:Id,IndexedDBStore:Qae});class Tk{constructor(e,r=new TB,n=!1){var s=this;this.provider=e,this.store=r,this.useEIP5719=n,this.cachedEIP5719=void 0,this.loadTopology=async function(i){const o=await s.store.loadV2Node(i);if(!o)return{nodeHash:i};if(OB(o)){const[a,c]=await Promise.all([s.loadTopology(o.left),s.loadTopology(o.right)]);return{left:a,right:c}}return RB(o)?{weight:ne.from(o.weight),threshold:ne.from(o.threshold),tree:await s.loadTopology(o.tree)}:o},this.saveTopology=async function(i){if(ot.config.isNodeLeaf(i))return;const o=ot.config.hashNode(i);if(ot.config.isNode(i)){const a=s.saveTopology(i.left),c=s.saveTopology(i.right),l=s.store.saveV2Node(o,{left:ot.config.hashNode(i.left),right:ot.config.hashNode(i.right)});await Promise.all([a,c,l]);return}if(ot.config.isNestedLeaf(i)){const a=s.saveTopology(i.tree),c=s.store.saveV2Node(o,{weight:ne.from(i.weight).toString(),threshold:ne.from(i.threshold).toString(),tree:ot.config.hashNode(i.tree)});await Promise.all([a,c]);return}if(ot.config.isSignerLeaf(i))return s.store.saveV2Node(o,{address:i.address,weight:i.weight});if(ot.config.isSubdigestLeaf(i))return s.store.saveV2Node(o,{subdigest:i.subdigest});throw new Error(`Unknown topology type: ${i}`)},this.saveWalletConfig=async function(i){const{config:o}=i;if(oa.config.ConfigCoder.isWalletConfig(o)){const a=oa.config.ConfigCoder.imageHashOf(o);return s.store.saveConfig(a,o)}if(ot.config.ConfigCoder.isWalletConfig(o)){const a=ot.config.ConfigCoder.imageHashOf(o);if(ot.config.isComplete(o.tree))return s.store.saveConfig(a,o)}},this.configOfImageHashCache={},this.configOfImageHash=async function(i){const{imageHash:o}=i;if(s.configOfImageHashCache[i.imageHash])return s.configOfImageHashCache[i.imageHash];const a=await s.store.loadConfig(o);if(a){if(a.version===1||a.version===2&&!b3(a))return s.configOfImageHashCache[i.imageHash]=a,a;if(b3(a)){const c={version:2,threshold:ne.from(a.threshold),checkpoint:ne.from(a.checkpoint),tree:await s.loadTopology(a.tree)};return s.configOfImageHashCache[i.imageHash]=c,c}throw new Error(`Unknown config type: ${a}`)}},this.saveCounterfactualWallet=async function(i){const{config:o,context:a}=i,c=vn.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([s.saveWalletConfig({config:o}),...a.map(l=>{const f=Ee.context.addressOf(l,c);return s.store.saveCounterfactualWallet(f,c,l)})])},this.imageHashOfCounterfactualWallet=async function(i){const{wallet:o}=i,a=await s.store.loadCounterfactualWallet(o);if(a)return{imageHash:a.imageHash,context:a.context}},this.savePayload=async function(i){const{payload:o}=i,a=Ee.signature.subdigestOf(o);await s.store.savePayloadOfSubdigest(a,o)},this.payloadOfSubdigestCache={},this.payloadOfSubdigest=async function(i){if(s.payloadOfSubdigestCache[i.subdigest])return s.payloadOfSubdigestCache[i.subdigest];const{subdigest:o}=i,a=await s.store.loadPayloadOfSubdigest(o);return a&&(s.payloadOfSubdigestCache[o]=a),a},this.savePresignedConfiguration=async function(i){const o=ot.signature.SignatureCoder.decode(i.signature),a=vn.genericCoderFor(i.nextConfig.version).config.imageHashOf(i.nextConfig),c=ot.chained.messageSetImageHash(a),l=Ne(c),f={message:c,address:i.wallet,chainId:0,digest:l},u=s.savePayload({payload:f}),d=s.saveWalletConfig({config:i.nextConfig}),h=await ot.signature.SignatureCoder.recover(o,f,s.provider),v=ot.signature.signaturesOf(h.config.tree);await Promise.all([u,d,s.saveWalletConfig({config:h.config}),...v.map(y=>s.store.saveSignatureOfSubdigest(y.address,h.subdigest,y.signature))])},this.loadPresignedConfiguration=async function(i){const{wallet:o,fromImageHash:a,longestPath:c}=i,l=await s.configOfImageHash({imageHash:a});if(!l||!ot.config.ConfigCoder.isWalletConfig(l))return[];const f=ot.config.signersOf(l.tree).map(x=>x.address),u=await Promise.all(f.map(x=>s.store.loadSubdigestsOfSigner(x))),d=[...new Set(u.flat())],v=(await Promise.all([...new Set(d)].map(async function(x){return ol({},await s.payloadOfSubdigest({subdigest:x}),{subdigest:x})}))).filter(x=>(x==null?void 0:x.message)&&(x==null?void 0:x.address)&&x.address===o).map(x=>({payload:x,nextImageHash:ot.chained.decodeMessageSetImageHash(x.message)})).filter(x=>x==null?void 0:x.nextImageHash);let y;const g=(await Promise.all(v.map(async function({nextImageHash:x,payload:k}){const $=await s.configOfImageHash({imageHash:x});if(!$||!ot.config.isWalletConfig($))return;const I=ne.from($.checkpoint);return{nextConfig:$,nextCheckpoint:I,nextImageHash:x,payload:k}}))).filter(x=>x!==void 0).filter(x=>x.nextCheckpoint.gt(l.checkpoint)).sort((x,k)=>x.nextCheckpoint.gt(k.nextCheckpoint)?c?1:-1:c?-1:1);for(const x of g){const{nextConfig:k,nextCheckpoint:$,nextImageHash:I,payload:M}=x;if(y){const G=y.checkpoint;if(c){if($.gte(G))continue}else if($.lte(G))continue}const D=new Map((await Promise.all(f.map(async function(G){const V=await s.store.loadSignatureOfSubdigest(G,M.subdigest);if(!V)return[G,void 0];const Q=le(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(G,M.subdigest,V):V),F=Ee.signer.tryRecoverSigner(M.subdigest,Q)!==G;return[G,{isDynamic:F,signature:Q}]}))).filter(G=>!!G[1]));if(D.size===0)continue;const H=ot.signature.SignatureCoder.encodeSigners(l,D,[],0);H.weight.lt(l.threshold)||(y={nextImageHash:I,checkpoint:ne.from(k.checkpoint),signature:H.encoded})}if(!y)return[];const b=await s.loadPresignedConfiguration({wallet:o,fromImageHash:y.nextImageHash,longestPath:c});return[{wallet:o,nextImageHash:y.nextImageHash,signature:y.signature},...b]},this.saveWitnesses=async function(i){const o={digest:i.digest,address:i.wallet,chainId:i.chainId},a=Ee.signature.subdigestOf(o);await Promise.all([s.savePayload({payload:o}),...i.signatures.filter(c=>Ee.signer.canRecover(c)).map(c=>{const l=Ee.signer.recoverSigner(a,c);return s.store.saveSignatureOfSubdigest(l,a,c)})])},this.walletsOfSigner=async function(i){const o=await s.store.loadSubdigestsOfSigner(i.signer),a=await Promise.all(o.map(l=>s.payloadOfSubdigest({subdigest:l}))).then(l=>l.filter(f=>f!==void 0)),c=[];for(const l of a){const f=l.address;if(c.find(h=>h.wallet===f))continue;const u=Ee.signature.subdigestOf(l),d=await s.store.loadSignatureOfSubdigest(i.signer,u);d&&c.push({wallet:f,proof:{digest:l.digest,chainId:ne.from(l.chainId),signature:le(d)}})}return c},this.cachedEIP5719=new Tae(e)}async saveMigration(e,r,n){const s=r.fromVersion;if(s!==1)throw new Error("Migration not supported");if(!ot.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:i,address:o}=pB.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(ot.config.ConfigCoder.imageHashOf(r.toConfig)!=i)throw new Error("Invalid migration transaction - config");const a=Ee.transaction.packMetaTransactionsData(r.tx.nonce,r.tx.transactions),c=Ne(a),l={chainId:r.tx.chainId,message:a,address:e,digest:c},f=Ee.signature.subdigestOf(l),u=this.savePayload({payload:l}),d=this.saveWalletConfig({config:r.toConfig}),h=oa.signature.SignatureCoder.decode(r.tx.signature),v=await oa.signature.SignatureCoder.recover(h,l,this.provider),y=oa.signature.SignatureCoder.signaturesOf(v.config);await Promise.all([u,d,this.saveWalletConfig({config:v.config}),this.store.saveMigrationsSubdigest(e,s,s+1,f,i),...y.map(m=>this.store.saveSignatureOfSubdigest(m.address,v.subdigest,m.signature))])}async getMigration(e,r,n,s){var i=this;const[o,a]=await Promise.all([this.configOfImageHash({imageHash:r}),this.store.loadMigrationsSubdigest(e,n,n+1)]),c=vn.coderFor(n);return!o||!c.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(f){const{subdigest:u,toImageHash:d}=f,h=await i.payloadOfSubdigest({subdigest:u});if(!h||!h.message||!ne.from(s).eq(h.chainId))return;const v=c.config.signersOf(o).map(x=>x.address),y=new Map((await Promise.all(v.map(async function(x){const k=await i.store.loadSignatureOfSubdigest(x,u);if(!k)return[x,void 0];const $=le(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(x,u,k):k),I=Ee.signer.tryRecoverSigner(u,$)!==x;return[x,{isDynamic:I,signature:$}]}))).filter(x=>!!x[1])),m=c.signature.encodeSigners(o,y,[],s);if(!m||m.weightf.filter(u=>u!==void 0)))[0]}updateProvider(e){this.provider=e}}var Xae=Object.freeze({__proto__:null,LocalConfigTracker:Tk});let P5=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class Zae{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Sessions/",this.ping=n=>this.fetch(this.url("Ping"),Oi({},n)).then(s=>Ri(s).then(i=>({}))),this.config=(n,s)=>this.fetch(this.url("Config"),Oi(n,s)).then(i=>Ri(i).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,s)=>this.fetch(this.url("Wallets"),Oi(n,s)).then(i=>Ri(i).then(o=>({wallets:o.wallets}))),this.deployHash=(n,s)=>this.fetch(this.url("DeployHash"),Oi(n,s)).then(i=>Ri(i).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,s)=>this.fetch(this.url("ConfigUpdates"),Oi(n,s)).then(i=>Ri(i).then(o=>({updates:o.updates}))),this.migrations=(n,s)=>this.fetch(this.url("Migrations"),Oi(n,s)).then(i=>Ri(i).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,s)=>this.fetch(this.url("SaveConfig"),Oi(n,s)).then(i=>Ri(i).then(o=>({}))),this.saveWallet=(n,s)=>this.fetch(this.url("SaveWallet"),Oi(n,s)).then(i=>Ri(i).then(o=>({}))),this.saveSignature=(n,s)=>this.fetch(this.url("SaveSignature"),Oi(n,s)).then(i=>Ri(i).then(o=>({}))),this.saveSignerSignatures=(n,s)=>this.fetch(this.url("SaveSignerSignatures"),Oi(n,s)).then(i=>Ri(i).then(o=>({}))),this.saveMigration=(n,s)=>this.fetch(this.url("SaveMigration"),Oi(n,s)).then(i=>Ri(i).then(o=>({}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const Oi=(t={},e={})=>({method:"POST",headers:ol({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Ri=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 ece{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=void 0,this.sessions=new Zae(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:s})=>({wallet:e.wallet,nextImageHash:n,signature:s}))}catch(r){if(I5(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=vn.genericCoderFor(r.version).config.imageHashOf(r),s=ot.signature.setImageHashStruct(n),i=Ne(s);await this.sessions.saveSignature({wallet:e.wallet,digest:i,chainID:"0",signature:e.signature,toConfig:pp(r)})}async saveWitnesses(e){let r=e.signatures;this.onlyRecoverable&&(r=r.filter(n=>Ee.signer.canRecover(n))),await this.sessions.saveSignerSignatures({wallet:e.wallet,digest:e.digest,chainID:cd(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return tce(r,n)}catch(r){if(I5(r))return;throw r}}async saveWalletConfig(e){const r=pp(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(I5(r))return;throw r}}async saveCounterfactualWallet(e){const r=pp(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:s,chainID:i,type:o,signature:a}])=>{switch(o){case P5.EIP712:a+=le(Ee.signer.SigType.EIP712).slice(2);break;case P5.EthSign:a+=le(Ee.signer.SigType.ETH_SIGN).slice(2);break;case P5.EIP1271:a+=le(Ee.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:s,signature:a,chainId:ne.from(i)}}})}async getMigration(e,r,n,s){var i=this;const o=cd(s),{migrations:a}=await this.sessions.migrations({wallet:e,fromVersion:n,fromImageHash:r,chainID:o}),c=async function(u){const d=a[u];if(d){const h=Object.keys(d).map(Number).sort((v,y)=>y-v);for(const v of h)for(const[y,m]of Object.entries(d[v]))try{const g=await i.configOfImageHash({imageHash:y});if(g)return{fromVersion:n,toVersion:v,toConfig:g,tx:{entrypoint:m.executor,transactions:m.transactions,nonce:m.nonce,signature:m.signature,chainId:u,intent:{id:Ee.transaction.subdigestOfTransactions(e,u,m.nonce,m.transactions),wallet:e}}}}catch(g){console.error(g)}}},l=await c(o);if(l)return l;for(const f in a)if(f!==o){const u=await c(f);if(u)return u}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:pp(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(rce),nonce:cd(r.tx.nonce),signature:r.tx.signature,chainID:cd(r.tx.chainId)})}}function pp(t){switch(t.version){case 1:if(oa.config.ConfigCoder.isWalletConfig(t))return{threshold:yf(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:yf(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(ot.config.ConfigCoder.isWalletConfig(t))return{threshold:yf(t.threshold),checkpoint:yf(t.checkpoint),tree:Sm(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function Sm(t){return ot.config.isNode(t)?{left:Sm(t.left),right:Sm(t.right)}:ot.config.isSignerLeaf(t)?{weight:yf(t.weight),address:t.address}:ot.config.isNestedLeaf(t)?{weight:yf(t.weight),threshold:yf(t.threshold),tree:Sm(t.tree)}:ot.config.isNodeLeaf(t)?{node:t.nodeHash}:ol({},t)}function tce(t,e){switch(t){case 1:return ol({},e,{version:t});case 2:return ol({},e,{version:t,tree:Am(e.tree)});default:throw new Error(`unknown version ${t}`)}}function Am(t){switch(typeof t){case"object":const e=ol({},t);return e.left!==void 0&&(e.left=Am(e.left)),e.right!==void 0&&(e.right=Am(e.right)),e.tree!==void 0&&(e.tree=Am(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 rce(t){return{to:t.to,value:t.value!==void 0?cd(t.value):void 0,data:t.data!==void 0?le(t.data):void 0,gasLimit:t.gasLimit!==void 0?cd(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function yf(t){return ne.from(t).toNumber()}function cd(t){return ne.from(t).toString()}function I5(t){return typeof t=="object"&&t.status===404}var nce=Object.freeze({__proto__:null,RemoteConfigTracker:ece});function x3(t,e,r){return new Promise(n=>{let s=0;t.forEach(i=>i.then(o=>{r(o)?n(o):(s++,s===t.length&&n(e))}).catch(()=>{s++,s===t.length&&n(e)}))})}async function Gh(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class sce{constructor(e){this.trackers=e}async configOfImageHash(e){const r=this.trackers.map(async function(a,c){return{res:await a.configOfImageHash(e),i:c}}),n=await x3(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:vn.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 s=new Tk(void 0),i=await Gh(r,void 0);for(const a of i)a!=null&&a.res&&await s.saveWalletConfig({config:a.res});const o=await s.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 x3(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 Gh(this.trackers.map(o=>o.walletsOfSigner(e)),[]).then(o=>o.flat()),n={};for(const o of r)n[o.wallet]=o.proof;const s=Object.keys(n).map(o=>({wallet:o,proof:n[o]})),i=new Map;return s.forEach(({wallet:o,proof:{digest:a,chainId:c,signature:l}})=>{const f=`${o}-${a}-${c}`;let u=i.get(f);u||(u={wallet:o,digest:a,chainId:c,signatures:[]},i.set(f,u)),u.signatures.push(l)}),i.forEach(o=>this.saveWitnesses(o)),s}async saveWitnesses(e){await Promise.all(this.trackers.map(r=>r.saveWitnesses(e)))}async loadPresignedConfiguration(e){var r=this;const n=await Gh(this.trackers.map(c=>c.loadPresignedConfiguration(e)),[]),i=(await Gh(n.map(async function(c){const l=c[c.length-1],f=await r.configOfImageHash({imageHash:l.nextImageHash});if(f)return{checkpoint:vn.genericCoderFor(f.version).config.checkpointOf(f),result:c}}),void 0)).reduce((c,l)=>l&&(!c||l.checkpoint.gt(c.checkpoint))?l:c);if(!i)return[];const o=new Map,a=c=>(o.has(c)||o.set(c,this.configOfImageHash({imageHash:c})),o.get(c));return i.result.forEach(async function(c){const l=await a(c.nextImageHash);l&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:l,signature:c.signature})}),i.result}async savePresignedConfiguration(e){await Promise.all(this.trackers.map(r=>r.savePresignedConfiguration(e)))}async getMigration(e,r,n,s){return(await Promise.all(this.trackers.map(o=>o.getMigration(e,r,n,s)))).find(o=>!!o)}async saveMigration(e,r,n){await Promise.all(this.trackers.map(s=>s.saveMigration(e,r,n)))}}class ice{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 s;const[i,o]=await Promise.all(n);if(i.length>0&&o.length>0&&i[i.length-1].nextImageHash===o[o.length-1].nextImageHash)s=e.longestPath===!0?i.length>o.length?i:o:i.lengthu&&(!f||u.checkpoint.gt(f.checkpoint))?u:f))==null?void 0:c.result)!=null?a:[]}return s||[]}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 s of r)for(const i of s)n.set(i.wallet,i);return Array.from(n.values())}async saveWitnesses(e){await Promise.all([this.tracker.saveWitnesses(e),this.cache.saveWitnesses(e)])}async getMigration(e,r,n,s){const i=await this.cache.getMigration(e,r,n,s);if(i)return i;const o=await this.tracker.getMigration(e,r,n,s);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 e_{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...s){e=`${e}:${Ne(_t(JSON.stringify(s,oce)))}`;let i=this.cache.get(e);if(i&&i.expiration&&new Date>=i.expiration&&(i=void 0,this.cache.delete(e)),!i){const o={promise:n(...s)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),i=o,this.cache.set(e,i)}return i.promise}}function oce(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function ace(t){return t instanceof MB}class MB{constructor(e,r=50,n=!1){this.tracker=e,this.window=r,this.verbose=n,this.cache=new e_}invalidateCache(){this.cache=new e_}configOfImageHash(e){return this.cache.do("configOfImageHash",this.window,r=>this.tracker.configOfImageHash(r),e)}getMigration(e,r,n,s){return this.cache.do("getMigration",this.window,(...i)=>this.tracker.getMigration(...i),e,r,n,s)}saveMigration(e,r,n){return this.cache.do("saveMigration",void 0,(...s)=>this.tracker.saveMigration(...s),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 Tk&&this.tracker.updateProvider(e)}}var Ok=Object.freeze({__proto__:null,debug:Yae,local:Xae,remote:nce,stores:Jae,raceUntil:x3,allSafe:Gh,MultipleTracker:sce,CachedTracker:ice,isDedupedTracker:ace,DedupedTracker:MB});const cce=Object.freeze(Object.defineProperty({__proto__:null,tracker:Gae,trackers:Ok},Symbol.toStringTag,{value:"Module"})),NB=60*60*24*7,lce=60;class t_{constructor(e,r,n={},s){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=s}now(){return Math.floor(Date.now()/1e3)}get expiration(){var e;return Math.max((e=this.settings.metadata.expiration)!=null?e:NB,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 s;for(let i=1;;i++)try{s=(await r.getJWT(!0)).token;break}catch(o){if(i===e)throw console.error(`couldn't authenticate after ${e} attempts`,o),o}return new s0(n,void 0,s)}(),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 l=this.status.jwt,f=await l.token;if(this.now(){throw this.status.jwt=void 0,l}),expiration:o};return this.status.jwt=a,a.token.then(l=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"fulfilled",value:l})}catch{}})}).catch(l=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"rejected",reason:l})}catch{}})}),{token:await a.token,expiration:o}}getProofStringKey(){return`${this.account.address} - ${this.settings.metadata.name}`}async isProofStringValid(e){try{const r=new rv,n=ne.from(this.settings.sequenceApiChainId),s=Ki(this.account.networks,n);if(!s)throw Error("No network found");return r.chainId=n.toNumber(),r.provider=new Mg(nv(s.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 s0(r,void 0,n)}return this.apiClient}async getMetadataClient(e=!0){if(!this.metadataClient){const r=(await this.getJWT(e)).token;this.metadataClient=new Pk(this.settings.sequenceMetadataUrl,void 0,r)}return this.metadataClient}async getIndexerClient(e,r=!0){const n=Ki(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 s=(await this.getJWT(r)).token;this.indexerClients.set(n.chainId,new _k(n.indexerUrl,void 0,s))}else throw Error(`No indexer url for chain ${e}`);return this.indexerClients.get(n.chainId)}getProofString(e){if(this.proofStrings.has(e)){const c=this.proofStrings.get(e);if(this.now()(r.signature=c,n.encodeProof(r,!0))).catch(c=>{throw this.proofStrings.delete(e),c}),expiration:o};return this.proofStrings.set(e,a),a}}const jB=async(t,e,r)=>{const n=He(await t.getAddress());if(!n||n===""||n==="0x")throw DB;const s=new j2;if(s.address=n,!r||!r.app||r.app==="")throw new Rk("authorization options requires app to be set");s.claims.app=r.app,s.claims.ogn=r.origin,s.claims.n=r.nonce,s.setExpiryIn(r.expiry?Math.max(r.expiry,200):NB);const i=s.messageTypedData(),o=kL(e);s.signature=await(t instanceof da?t.signTypedData(i.domain,i.types,i.message,o,"eip6492"):t.signTypedData(i.domain,i.types,i.message,o));const c=await new rv().encodeProof(s,!0);return{typedData:i,proofString:c}};class Rk extends Error{constructor(e){super(e),this.name="AuthError"}}const DB=new Rk("auth error: account address is empty");function af(){return af=Object.assign?Object.assign.bind():function(t){for(var e=1;eG.wallet));let D;if(M){if(u==null||u(M),D=new da({address:M,tracker:x,networks:b,contexts:g,orchestrator:y,projectAccessKey:m}),l&&l.length>0){let G=await D.status($);if(G.original.version!==G.version||D.version!==G.version){const{migratedAllChains:F,failedChains:C}=await D.isMigratedAllChains();if(C.some(S=>w3.includes(S)))throw Error(`Failed to fetch account status on ${C.join(", ")}`);if(!F){if(v&&!await v(D))throw Error("Migration cancelled, cannot open session");const{failedChains:S}=await D.signAllMigrations(h||(R=>R));if(S.some(R=>w3.includes(R)))throw Error(`Failed to sign migrations on ${S.join(", ")}`);Ok.isDedupedTracker(x)&&x.invalidateCache();let T;if([T,G]=await Promise.all([D.isMigratedAllChains().then(R=>R.migratedAllChains),D.status($)]),!T)throw Error("Failed to migrate account")}}G.onChain.version!==G.version&&await D.doBootstrap($,void 0,G);const V=G.config,Q=D.coders.config.editConfig(V,{add:l,threshold:c});if(D.coders.config.imageHashOf(V)!==D.coders.config.imageHashOf(Q)){const F=D.coders.config.editConfig(Q,{checkpoint:D.coders.config.checkpointOf(V).add(1)});await D.updateConfig(F)}}}else{if(!l||l.length===0)throw Error("Cannot create new account without signers");if(!c)throw Error("Cannot create new account without threshold");if(D=await da.new({config:{threshold:c,checkpoint:0,signers:l},tracker:x,contexts:g,orchestrator:y,networks:b,projectAccessKey:m}),u==null||u(D.address),await D.publishWitness(),!(await x.walletsOfSigner({signer:a,noCache:!0})).some(V=>V.wallet===D.address))throw Error("Account not found on tracker")}let H;return k&&(H=new t_(D,k),H.auth(),H.onAuth(G=>{G.status==="fulfilled"&&D.setJwt(G.value)})),new g0(b,g,D,H)}static async load(e){const{dump:r,settings:n,editConfigOnMigration:s,onMigration:i,orchestrator:o}=e,{contexts:a,networks:c,tracker:l,services:f}=af({},$m,n);let u;if(LB(r)){var d,h,v;const k=r.config.address||Ee.context.addressOf(a[1],oa.config.ConfigCoder.imageHashOf(af({},r.config,{version:1}))),$=((d=(h=r.jwt)==null?void 0:h.expiration)!=null?d:0)I.migratedAllChains)){if(i&&!await i(u))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await u.signAllMigrations(s),!await u.isMigratedAllChains().then(I=>I.migratedAllChains))throw Error("Failed to migrate account")}}else if(BB(r)){var y,m,g;const k=((y=(m=r.jwt)==null?void 0:m.expiration)!=null?y:0)async(n,s,i)=>{const o=i.messageDigest();return{isValid:await t(s).isValidSignature(i.address,o,i.signature)}},uce=Object.freeze(Object.defineProperty({__proto__:null,AuthError:Rk,CRITICAL_CHAINS:w3,ErrAccountIsRequired:DB,Session:g0,SessionSettingsDefault:$m,ValidateSequenceWalletProof:fce,isSessionDumpV1:LB,isSessionDumpV2:BB,signAuthorization:jB},Symbol.toStringTag,{value:"Module"}));function Hg(){return Hg=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),qn({},n)).then(s=>Un(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),qn({},n)).then(s=>Un(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),qn({},n)).then(s=>Un(s).then(i=>({status:i.status}))),this.getSignerConfig=(n,s)=>this.fetch(this.url("GetSignerConfig"),qn(n,s)).then(i=>Un(i).then(o=>({signerConfig:o.signerConfig}))),this.sign=(n,s)=>this.fetch(this.url("Sign"),qn(n,s)).then(i=>Un(i).then(o=>({sig:o.sig}))),this.signWith=(n,s)=>this.fetch(this.url("SignWith"),qn(n,s)).then(i=>Un(i).then(o=>({sig:o.sig}))),this.authMethods=(n,s)=>this.fetch(this.url("AuthMethods"),qn(n,s)).then(i=>Un(i).then(o=>({methods:o.methods,active:o.active}))),this.setPIN=(n,s)=>this.fetch(this.url("SetPIN"),qn(n,s)).then(i=>Un(i).then(o=>({}))),this.resetPIN=(n,s)=>this.fetch(this.url("ResetPIN"),qn(n,s)).then(i=>Un(i).then(o=>({}))),this.createTOTP=(n,s)=>this.fetch(this.url("CreateTOTP"),qn(n,s)).then(i=>Un(i).then(o=>({uri:o.uri}))),this.commitTOTP=(n,s)=>this.fetch(this.url("CommitTOTP"),qn(n,s)).then(i=>Un(i).then(o=>({codes:o.codes}))),this.resetTOTP=(n,s)=>this.fetch(this.url("ResetTOTP"),qn(n,s)).then(i=>Un(i).then(o=>({}))),this.reset2FA=(n,s)=>this.fetch(this.url("Reset2FA"),qn(n,s)).then(i=>Un(i).then(o=>({}))),this.recoveryCodes=(n,s)=>this.fetch(this.url("RecoveryCodes"),qn(n,s)).then(i=>Un(i).then(o=>({codes:o.codes}))),this.resetRecoveryCodes=(n,s)=>this.fetch(this.url("ResetRecoveryCodes"),qn(n,s)).then(i=>Un(i).then(o=>({codes:o.codes}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const qn=(t={},e={})=>({method:"POST",headers:Hg({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Un=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}),hce=typeof Yn=="object"?Yn.fetch:window.fetch;class vce{constructor(e,r,n=!1){this.address=e,this.url=r,this.appendSuffix=n,this.guard=void 0,this.guard=new dce(r,hce)}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(!Ee.isWalletSignRequestMetadata(r))throw new Error("expected sequence signature request metadata");const s=r.guardTotpCode,i=vn.genericCoderFor(r.config.version),{encoded:o}=i.signature.encodeSigners(r.config,(n=r.parts)!=null?n:new Map,[],r.chainId);return(await this.guard.signWith({signer:this.address,request:{msg:le(e),auxData:this.packMsgAndSig(r.address,r.digest,o,r.chainId),chainId:ne.from(r.chainId).toNumber()},token:s?{id:Vg.TOTP,token:s}: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 C3(e);r=await this.guard.authMethods({proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}return Hg({},r,{methods:r.methods.map(yce)})}async setPin(e,r){const n=await Eh(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 Eh(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 Eh(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 C3(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 Eh(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 Eh(e),{codes:n}=await this.guard.resetRecoveryCodes({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return n}packMsgAndSig(e,r,n,s){return Dn.encode(["address","uint256","bytes","bytes"],[e,s,r,n])}suffix(){return this.appendSuffix?[3]:[]}}let Vg=function(t){return t.PIN="PIN",t.TOTP="TOTP",t}({});function yce(t){switch(t){case Vg.PIN:case Vg.TOTP:return t;default:throw new Error(`unknown auth method '${t}'`)}}function FB(t){return"signerAddress"in t&&typeof t.signerAddress=="string"}async function C3(t){if(FB(t))return t;{const e=p3.isSapientSigner(t.signer)?t.signer:new p3.SignerWrapper(t.signer),r=await e.getAddress(),n=new Date,s=zB(t.walletAddress,n),i=sy(s);return{walletAddress:t.walletAddress,timestamp:n,signerAddress:r,signature:le(await e.sign(i,{}))}}}async function Eh(t){if("wallet"in t){var e;const r=new Date,n=qB(r),s=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:s}}else return t}function zB(t,e){return{domain:UB,types:{AuthMethods:[{name:"wallet",type:"address"},{name:"timestamp",type:"string"}]},message:{wallet:He(t),timestamp:WB(e)}}}function qB(t){return{domain:UB,types:{AuthUpdate:[{name:"timestamp",type:"string"}]},message:{timestamp:WB(t)}}}const UB={name:"Sequence Guard",version:"1",chainId:1};function WB(t){return t.toUTCString().replace("GMT","UTC")}const pce=Object.freeze(Object.defineProperty({__proto__:null,AuthMethod:Vg,GuardSigner:vce,getAuthUpdateProofTypedData:qB,getOwnershipProofTypedData:zB,isSignedOwnershipProof:FB,signOwnershipProof:C3},Symbol.toStringTag,{value:"Module"}));function Gg(){return Gg=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,s,i)=>{if(this.batchableJsonRpcMethods.find(o=>o===s.method)){this.queue.push({request:s,callback:i,next:n}),this.options.verbose&&console.log("Scheduling call",s.method),this.scheduleExecution();return}return this.options.verbose&&console.log("Forwarded call",s.method),n(s,i)},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 s=a[0].next;let i;var[a,c]=r_(a,h=>{try{if(h.next!==s)return!1;switch(h.request.method){case Jr.ethCall:if(h.request.params[0].from||h.request.params[0].gasPrice||h.request.params[0].value)return!1;case Jr.ethGetBalance:case Jr.ethGetCode:const v=gce(h.request.params[1]);if(i===void 0&&(i=v),!bce(v,i))return!1}return!0}catch{return!1}});if(c.length!==0&&(r.options.verbose&&console.log("Forwarding incompatible calls",c.length),r.forward(c),a.length===0)){r.options.verbose&&console.log("Skip multicall, all calls are incompatible");return}let o=a.map(h=>{try{switch(h.request.method){case Jr.ethCall:return{delegateCall:!1,revertOnError:!1,target:h.request.params[0].to,data:h.request.params[0].data,gasLimit:h.request.params[0].gas?h.request.params[0].gas:0,value:0};case Jr.ethGetCode:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callCode"),[h.request.params[0]])};case Jr.ethGetBalance:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callBalanceOf"),[h.request.params[0]])};default:return null}}catch{return null}});var[a,c]=r_(a,(h,v)=>o[v]!==void 0);if(o=o.filter(h=>h),c.length!==0&&(r.options.verbose&&console.log("Forwarding calls on error",c.length),r.forward(c),a.length===0)){r.options.verbose&&console.log("Skip multicall, all calls had encoding errors");return}let l;try{r.options.verbose&&console.log("Encoding multicall"),l=r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("multiCall"),[o])}catch(h){r.options.verbose&&console.warn("Error encoding multicall, forwarding one by one",h),r.forward(a);return}const f=ak(),u=await mce(ok(s)({id:f,jsonrpc:Jd,method:Jr.ethCall,params:[{to:r.options.contract,value:0,data:l},ne.isBigNumber(i)?i.toNumber():i]}),h=>({jsonrpc:Jd,id:f,result:void 0,error:h}));if(u.error)return r.options.verbose&&console.warn("Error calling multicall, forwarding one by one",u.error),r.forward(a);let d;try{d=r.multicallInterface.decodeFunctionResult(r.multicallInterface.getFunction("multiCall"),u.result)}catch(h){r.options.verbose&&console.warn("Error decoding multicall result, forwarding one by one",h),r.forward(a);return}r.options.verbose&&console.log("Got response for",a.length),a.forEach((h,v)=>{if(!d[0][v])r.options.verbose&&console.warn(`Multicall error for ${h.request.method} not found`),r.forward(h);else switch(h.request.method){case Jr.ethCall:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:d[1][v]});break;case Jr.ethGetCode:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:Dn.decode(["bytes"],d[1][v])[0]});break;case Jr.ethGetBalance:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:Dn.decode(["uint256"],d[1][v])[0]});break}})},this.options=e?Gg({},di.DefaultOptions,e):di.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&&di.isMulticallOptions(e.options)}static isMulticallOptions(e){return e!==void 0&&e.batchSize!==void 0&&e.timeWindow!==void 0&&e.contract!==void 0}}di.DefaultOptions=Gg({},xce);const HB=["getNetwork","getBlockNumber","getGasPrice","getTransactionCount","getStorageAt","sendTransaction","estimateGas","getBlock","getTransaction","getTransactionReceipt","getLogs","emit","litenerCount","addListener","removeListener","waitForTransaction","detectNetwork","getBlockWithTransactions"];class wce extends N2{constructor(e,r){var n;super(e.getNetwork()),n=this,this.provider=e,this.multicall=void 0,this.getResolver=async function(s){const i=n.provider;if(i.getResolver){const o=await i.getResolver(await s);return o?new XC(n,o.address,o.name):null}return i.getResolver(await s)},this.next=async function(s,i){try{switch(s.method){case Jr.ethCall:n.callback(s,i,await n.provider.call(s.params[0],s.params[1]));break;case Jr.ethGetCode:n.callback(s,i,await n.provider.getCode(s.params[0],s.params[1]));break;case Jr.ethGetBalance:n.callback(s,i,await n.provider.getBalance(s.params[0],s.params[1]));break}}catch(o){n.callback(s,i,void 0,o)}},this.listenerCount=e.listenerCount.bind(e),this.multicall=di.isMulticall(r)?r:new di(r),HB.forEach(s=>{e[s]!==void 0&&(this[s]=(...i)=>e[s](...i))})}callback(e,r,n,s){r(s,{jsonrpc:Jd,id:e.id,result:n,error:s})}async call(e,r){return this.rpcCall(Jr.ethCall,e,r)}async getCode(e,r){return this.rpcCall(Jr.ethGetCode,e,r)}async getBalance(e,r){return this.rpcCall(Jr.ethGetBalance,e,r)}async rpcCall(e,...r){const n=ak();return(await ok(this.multicall.handle)(this.next,{jsonrpc:Jd,id:n,method:e,params:r})).result}}class Cce{constructor(e,r){if(this.provider=e,this.multicall=void 0,this.multicall=di.isMulticall(r)?r:new di(r),e.send){const n=async function(i,o){e.send(i,o)};this.send=(s,i)=>{this.multicall.handle(n,s,i)}}if(e.sendAsync){const n=async function(i,o){e.sendAsync(i,o)};this.sendAsync=(s,i)=>{this.multicall.handle(n,s,i)}}}get isMetaMask(){return this.provider.isMetaMask}get isStatus(){return this.provider.isStatus}}const Ece=t=>e=>{const r=di.isMulticall(t)?t:new di(t);return(n,s)=>r.handle(e,n,s)};var kce=Object.freeze({__proto__:null,ProxyMethods:HB,MulticallProvider:wce,MulticallExternalProvider:Cce,multicallMiddleware:Ece});const Sce=Object.freeze(Object.defineProperty({__proto__:null,Multicall:di,providers:kce},Symbol.toStringTag,{value:"Module"}));var VB={exports:{}};(function(t,e){(function(r){var n=Object.hasOwnProperty,s=Array.isArray?Array.isArray:function(N){return Object.prototype.toString.call(N)==="[object Array]"},i=10,o=typeof hn=="object"&&typeof hn.nextTick=="function",a=typeof Symbol=="function",c=typeof Reflect=="object",l=typeof setImmediate=="function",f=l?setImmediate:setTimeout,u=a?c&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(A){var N=Object.getOwnPropertyNames(A);return N.push.apply(N,Object.getOwnPropertySymbols(A)),N}:Object.keys;function d(){this._events={},this._conf&&h.call(this,this._conf)}function h(A){A&&(this._conf=A,A.delimiter&&(this.delimiter=A.delimiter),A.maxListeners!==r&&(this._maxListeners=A.maxListeners),A.wildcard&&(this.wildcard=A.wildcard),A.newListener&&(this._newListener=A.newListener),A.removeListener&&(this._removeListener=A.removeListener),A.verboseMemoryLeak&&(this.verboseMemoryLeak=A.verboseMemoryLeak),A.ignoreErrors&&(this.ignoreErrors=A.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function v(A,N){var B="(node) warning: possible EventEmitter memory leak detected. "+A+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(B+=" Event name: "+N+"."),typeof hn<"u"&&hn.emitWarning){var P=new Error(B);P.name="MaxListenersExceededWarning",P.emitter=this,P.count=A,hn.emitWarning(P)}else console.error(B),console.trace&&console.trace()}var y=function(A,N,B){var P=arguments.length;switch(P){case 0:return[];case 1:return[A];case 2:return[A,N];case 3:return[A,N,B];default:for(var E=new Array(P);P--;)E[P]=arguments[P];return E}};function m(A,N){for(var B={},P,E=A.length,L=N?N.length:0,q=0;q0;)A=L[U],q.call(_,A,B[A]);this._listeners={},this._listenersCount=0,W()}}});function b(A,N,B,P){var E=Object.assign({},N);if(!A)return E;if(typeof A!="object")throw TypeError("options must be an object");var L=Object.keys(A),q=L.length,_,U,W;function J(re){throw Error('Invalid "'+_+'" option value'+(re?". Reason: "+re:""))}for(var X=0;X0;)if(_===A[U])return L;q(N)}}var $=k(["function"]),I=k(["object","function"]);function M(A,N,B){var P,E,L=0,q,_=new A(function(U,W,J){B=b(B,{timeout:0,overload:!1},{timeout:function(se,xe){return se*=1,(typeof se!="number"||se<0||!Number.isFinite(se))&&xe("timeout must be a positive number"),se}}),P=!B.overload&&typeof A.prototype.cancel=="function"&&typeof J=="function";function X(){E&&(E=null),L&&(clearTimeout(L),L=0)}var re=function(se){X(),U(se)},ee=function(se){X(),W(se)};P?N(re,ee,J):(E=[function(se){ee(se||Error("canceled"))}],N(re,ee,function(se){if(q)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof se!="function")throw TypeError("onCancel callback must be a function");E.push(se)}),q=!0),B.timeout>0&&(L=setTimeout(function(){var se=Error("timeout");se.code="ETIMEDOUT",L=0,_.cancel(se),W(se)},B.timeout))});return P||(_.cancel=function(U){if(E){for(var W=E.length,J=1;J0;)ee=_e[_],ee!=="_listeners"&&(Ye=H(A,N,B[ee],P+1,E),Ye&&(re?re.push.apply(re,Ye):re=Ye));return re}else if($e==="**"){for(pe=P+1===E||P+2===E&&Se==="*",pe&&B._listeners&&(re=H(A,N,B,E,E)),_e=u(B),_=_e.length;_-- >0;)ee=_e[_],ee!=="_listeners"&&(ee==="*"||ee==="**"?(B[ee]._listeners&&!pe&&(Ye=H(A,N,B[ee],E,E),Ye&&(re?re.push.apply(re,Ye):re=Ye)),Ye=H(A,N,B[ee],P,E)):ee===Se?Ye=H(A,N,B[ee],P+2,E):Ye=H(A,N,B[ee],P,E),Ye&&(re?re.push.apply(re,Ye):re=Ye));return re}else B[$e]&&(re=H(A,N,B[$e],P+1,E));if(se=B["*"],se&&H(A,N,se,P+1,E),xe=B["**"],xe)if(P0;)ee=_e[_],ee!=="_listeners"&&(ee===Se?H(A,N,xe[ee],P+2,E):ee===$e?H(A,N,xe[ee],P+1,E):(de={},de[ee]=xe[ee],H(A,N,{"**":de},P+1,E)));else xe._listeners?H(A,N,xe,E,E):xe["*"]&&xe["*"]._listeners&&H(A,N,xe["*"],E,E);return re}function G(A,N,B){var P=0,E=0,L,q=this.delimiter,_=q.length,U;if(typeof A=="string")if((L=A.indexOf(q))!==-1){U=new Array(5);do U[P++]=A.slice(E,L),E=L+_;while((L=A.indexOf(q,E))!==-1);U[P++]=A.slice(E)}else U=[A],P=1;else U=A,P=A.length;if(P>1){for(L=0;L+10&&W._listeners.length>this._maxListeners&&(W._listeners.warned=!0,v.call(this,W._listeners.length,J))):W._listeners=N,!0;return!0}function V(A,N,B,P){for(var E=u(A),L=E.length,q,_,U,W=A._listeners,J;L-- >0;)_=E[L],q=A[_],_==="_listeners"?U=B:U=B?B.concat(_):[_],J=P||typeof _=="symbol",W&&N.push(J?U:U.join(this.delimiter)),typeof q=="object"&&V.call(this,q,N,U,J);return N}function Q(A){for(var N=u(A),B=N.length,P,E,L;B-- >0;)E=N[B],P=A[E],P&&(L=!0,E!=="_listeners"&&!Q(P)&&delete A[E]);return L}function F(A,N,B){this.emitter=A,this.event=N,this.listener=B}F.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function C(A,N,B){if(B===!0)E=!0;else if(B===!1)P=!0;else{if(!B||typeof B!="object")throw TypeError("options should be an object or true");var P=B.async,E=B.promisify,L=B.nextTick,q=B.objectify}if(P||L||E){var _=N,U=N._origin||N;if(L&&!o)throw Error("process.nextTick is not supported");E===r&&(E=N.constructor.name==="AsyncFunction"),N=function(){var W=arguments,J=this,X=this.event;return E?L?Promise.resolve():new Promise(function(re){f(re)}).then(function(){return J.event=X,_.apply(J,W)}):(L?hn.nextTick:f)(function(){J.event=X,_.apply(J,W)})},N._async=!0,N._origin=U}return[N,q?new F(this,A,N):this]}function S(A){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,h.call(this,A)}S.EventEmitter2=S,S.prototype.listenTo=function(A,N,B){if(typeof A!="object")throw TypeError("target musts be an object");var P=this;B=b(B,{on:r,off:r,reducers:r},{on:$,off:$,reducers:I});function E(L){if(typeof L!="object")throw TypeError("events must be an object");var q=B.reducers,_=D.call(P,A),U;_===-1?U=new g(P,A,B):U=P._observers[_];for(var W=u(L),J=W.length,X,re=typeof q=="function",ee=0;ee0;)E=B[P],(!A||E._target===A)&&(E.unsubscribe(N),L=!0);return L},S.prototype.delimiter=".",S.prototype.setMaxListeners=function(A){A!==r&&(this._maxListeners=A,this._conf||(this._conf={}),this._conf.maxListeners=A)},S.prototype.getMaxListeners=function(){return this._maxListeners},S.prototype.event="",S.prototype.once=function(A,N,B){return this._once(A,N,!1,B)},S.prototype.prependOnceListener=function(A,N,B){return this._once(A,N,!0,B)},S.prototype._once=function(A,N,B,P){return this._many(A,1,N,B,P)},S.prototype.many=function(A,N,B,P){return this._many(A,N,B,!1,P)},S.prototype.prependMany=function(A,N,B,P){return this._many(A,N,B,!0,P)},S.prototype._many=function(A,N,B,P,E){var L=this;if(typeof B!="function")throw new Error("many only accepts instances of Function");function q(){return--N===0&&L.off(A,q),B.apply(this,arguments)}return q._origin=B,this._on(A,q,P,E)},S.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||d.call(this);var A=arguments[0],N,B=this.wildcard,P,E,L,q,_;if(A==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(B&&(N=A,A!=="newListener"&&A!=="removeListener"&&typeof A=="object")){if(E=A.length,a){for(L=0;L3)for(P=new Array(U-1),q=1;q3)for(E=new Array(W-1),_=1;_0&&this._events[A].length>this._maxListeners&&(this._events[A].warned=!0,v.call(this,this._events[A].length,A))):this._events[A]=N,E)},S.prototype.off=function(A,N){if(typeof N!="function")throw new Error("removeListener only takes instances of Function");var B,P=[];if(this.wildcard){var E=typeof A=="string"?A.split(this.delimiter):A.slice();if(P=H.call(this,null,E,this.listenerTree,0),!P)return this}else{if(!this._events[A])return this;B=this._events[A],P.push({_listeners:B})}for(var L=0;L0){for(P=this._all,N=0,B=P.length;N0;)P=N[B[L]],typeof P=="function"?E.push(P):E.push.apply(E,P);return E}else{if(this.wildcard){if(q=this.listenerTree,!q)return[];var _=[],U=typeof A=="string"?A.split(this.delimiter):A.slice();return H.call(this,_,U,q,0),_}return N?(P=N[A],P?typeof P=="function"?[P]:P:[]):[]}},S.prototype.eventNames=function(A){var N=this._events;return this.wildcard?V.call(this,this.listenerTree,[],null,A):N?u(N):[]},S.prototype.listenerCount=function(A){return this.listeners(A).length},S.prototype.hasListeners=function(A){if(this.wildcard){var N=[],B=typeof A=="string"?A.split(this.delimiter):A.slice();return H.call(this,N,B,this.listenerTree,0),N.length>0}var P=this._events,E=this._all;return!!(E&&E.length||P&&(A===r?u(P).length:P[A]))},S.prototype.listenersAny=function(){return this._all?this._all:[]},S.prototype.waitFor=function(A,N){var B=this,P=typeof N;return P==="number"?N={timeout:N}:P==="function"&&(N={filter:N}),N=b(N,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:$,Promise:x}),M(N.Promise,function(E,L,q){function _(){var U=N.filter;if(!(U&&!U.apply(B,arguments)))if(B.off(A,_),N.handleError){var W=arguments[0];W?L(W):E(y.apply(null,arguments).slice(1))}else E(y.apply(null,arguments))}q(function(){B.off(A,_)}),B._on(A,_,!1)},{timeout:N.timeout,overload:N.overload})};function T(A,N,B){B=b(B,{Promise,timeout:0,overload:!1},{Promise:x});var P=B.Promise;return M(P,function(E,L,q){var _;if(typeof A.addEventListener=="function"){_=function(){E(y.apply(null,arguments))},q(function(){A.removeEventListener(N,_)}),A.addEventListener(N,_,{once:!0});return}var U=function(){W&&A.removeListener("error",W),E(y.apply(null,arguments))},W;N!=="error"&&(W=function(J){A.removeListener(N,U),L(J)},A.once("error",W)),q(function(){W&&A.removeListener("error",W),A.removeListener(N,U)}),A.once(N,U)},{timeout:B.timeout,overload:B.overload})}var R=S.prototype;Object.defineProperties(S,{defaultMaxListeners:{get:function(){return R._maxListeners},set:function(A){if(typeof A!="number"||A<0||Number.isNaN(A))throw TypeError("n must be a non-negative number");R._maxListeners=A},enumerable:!0},once:{value:T,writable:!0,configurable:!0}}),Object.defineProperties(R,{_maxListeners:{value:i,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof r=="function"&&r.amd?r(function(){return S}):t.exports=S})()})(VB);var H2=VB.exports;function Ace(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function $ce(t,...e){if(!Ace(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 n_(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 _ce(t,e){$ce(t);const r=e.outputLen;if(t.lengthnew DataView(t.buffer,t.byteOffset,t.byteLength),ao=(t,e)=>t<<32-e|t>>>e,Pce=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Pce)throw new Error("Non little-endian hardware is not supported");const Ice=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Tce(t){if(!GB(t))throw new Error("Uint8Array expected");let e="";for(let r=0;rt().update(KB(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function Nce(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const s=BigInt(32),i=BigInt(4294967295),o=Number(r>>s&i),a=Number(r&i),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}class jce extends Rce{constructor(e,r,n,s){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=T5(this.buffer)}update(e){n_(this);const{view:r,buffer:n,blockLen:s}=this;e=KB(e);const i=e.length;for(let o=0;os-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,Lce=(t,e,r)=>t&e^t&r^e&r,Bce=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]),hc=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),vc=new Uint32Array(64);class Fce extends jce{constructor(){super(64,32,8,!1),this.A=hc[0]|0,this.B=hc[1]|0,this.C=hc[2]|0,this.D=hc[3]|0,this.E=hc[4]|0,this.F=hc[5]|0,this.G=hc[6]|0,this.H=hc[7]|0}get(){const{A:e,B:r,C:n,D:s,E:i,F:o,G:a,H:c}=this;return[e,r,n,s,i,o,a,c]}set(e,r,n,s,i,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=s|0,this.E=i|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let u=0;u<16;u++,r+=4)vc[u]=e.getUint32(r,!1);for(let u=16;u<64;u++){const d=vc[u-15],h=vc[u-2],v=ao(d,7)^ao(d,18)^d>>>3,y=ao(h,17)^ao(h,19)^h>>>10;vc[u]=y+vc[u-7]+v+vc[u-16]|0}let{A:n,B:s,C:i,D:o,E:a,F:c,G:l,H:f}=this;for(let u=0;u<64;u++){const d=ao(a,6)^ao(a,11)^ao(a,25),h=f+d+Dce(a,c,l)+Bce[u]+vc[u]|0,y=(ao(n,2)^ao(n,13)^ao(n,22))+Lce(n,s,i)|0;f=l,l=c,c=a,a=o+h|0,o=i,i=s,s=n,n=h+y|0}n=n+this.A|0,s=s+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,f=f+this.H|0,this.set(n,s,i,o,a,c,l,f)}roundClean(){vc.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const zce=Mce(()=>new Fce);var qce=class{constructor(t,e){mt(this,"hostname");mt(this,"fetch");mt(this,"path","/rpc/Databeat/");mt(this,"ping",(t,e)=>this.fetch(this.url("Ping"),kh({},t,e)).then(r=>Sh(r).then(n=>({status:n.status})),r=>{throw Hu.new({cause:`fetch(): ${r.message||""}`})}));mt(this,"version",(t,e)=>this.fetch(this.url("Version"),kh({},t,e)).then(r=>Sh(r).then(n=>({version:n.version})),r=>{throw Hu.new({cause:`fetch(): ${r.message||""}`})}));mt(this,"runtimeStatus",(t,e)=>this.fetch(this.url("RuntimeStatus"),kh({},t,e)).then(r=>Sh(r).then(n=>({status:n.status})),r=>{throw Hu.new({cause:`fetch(): ${r.message||""}`})}));mt(this,"tick",(t,e,r)=>this.fetch(this.url("Tick"),kh(t,e,r)).then(n=>Sh(n).then(s=>({ok:s.ok})),n=>{throw Hu.new({cause:`fetch(): ${n.message||""}`})}));mt(this,"rawEvents",(t,e,r)=>this.fetch(this.url("RawEvents"),kh(t,e,r)).then(n=>Sh(n).then(s=>({ok:s.ok})),n=>{throw Hu.new({cause:`fetch(): ${n.message||""}`})}));this.hostname=t,this.fetch=(r,n)=>e(r,n)}url(t){return this.hostname+this.path+t}},kh=(t={},e={},r=null)=>({method:"POST",headers:{...e,"Content-Type":"application/json"},body:JSON.stringify(t||{}),signal:r}),Sh=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),tF.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(ile[n]||nn).new(r)}return r}),nn=class YB extends Error{constructor(r,n,s,i,o){super(s);mt(this,"name");mt(this,"code");mt(this,"message");mt(this,"status");mt(this,"cause");mt(this,"msg");this.name=r||"WebrpcError",this.code=typeof n=="number"?n:0,this.message=s||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof i=="number"?i:0,this.cause=o,Object.setPrototypeOf(this,YB.prototype)}static new(r){return new this(r.error,r.code,r.message||r.msg,r.status,r.cause)}},Uce=class QB extends nn{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,QB.prototype)}},Hu=class JB extends nn{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,JB.prototype)}},Wce=class XB extends nn{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,XB.prototype)}},Hce=class ZB extends nn{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ZB.prototype)}},Vce=class eF extends nn{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,eF.prototype)}},tF=class rF extends nn{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,rF.prototype)}},Gce=class nF extends nn{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,nF.prototype)}},Kce=class sF extends nn{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,sF.prototype)}},Yce=class iF extends nn{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,iF.prototype)}},Qce=class oF extends nn{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,oF.prototype)}},Jce=class aF extends nn{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,aF.prototype)}},Xce=class cF extends nn{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,cF.prototype)}},Zce=class lF extends nn{constructor(e="PermissionDenied",r=2e3,n="Permission denied",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,lF.prototype)}},ele=class fF extends nn{constructor(e="SessionExpired",r=2001,n="Session expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,fF.prototype)}},tle=class uF extends nn{constructor(e="NotFound",r=3e3,n="Resource not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,uF.prototype)}},rle=class dF extends nn{constructor(e="InvalidAppKey",r=4e3,n="Invalid app key",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,dF.prototype)}},nle=class hF extends nn{constructor(e="QueryFailed",r=4001,n="DB query failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,hF.prototype)}},sle=class vF extends nn{constructor(e="InvalidProjectId",r=4002,n="Invalid project id",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,vF.prototype)}},ile={0:Uce,[-1]:Hu,[-2]:Wce,[-3]:Hce,[-4]:Vce,[-5]:tF,[-6]:Gce,[-7]:Kce,[-8]:Yce,[-9]:Qce,[-10]:Jce,1e3:Xce,2e3:Zce,2001:ele,3e3:tle,4e3:rle,4001:nle,4002:sle},ole=class extends qce{constructor(e,r){const n=typeof Yn=="object"?Yn.fetch.bind(Yn):window.fetch.bind(window);super(e.endsWith("/")?e.slice(0,-1):e,n);mt(this,"_globalFetch");mt(this,"_fetch",(e,r)=>{var n;if(this.auth){let s={};((n=this.auth.jwt)==null?void 0:n.length)>0&&(s.Authorization=`BEARER ${this.auth.jwt}`),this.auth.headers&&(s={...s,...this.auth.headers}),r.headers={...r.headers,...s}}return this._globalFetch(e,r)});this.auth=r,this._globalFetch=n,this.fetch=this._fetch}},s_=150,Gl={defaultEnabled:!0,noop:!1,privacy:{userIdHash:!0,userAgentSalt:!1},userIdentTracking:!1,strictMode:!1,flushInterval:500,initProps:()=>({})},ale=class{constructor(t,e,r){mt(this,"rpc");mt(this,"auth");mt(this,"options");mt(this,"enabled");mt(this,"ident");mt(this,"userId");mt(this,"sessionId");mt(this,"allowUserTracking");mt(this,"projectId");mt(this,"queue");mt(this,"flushTimeout");mt(this,"defaultProps");mt(this,"previousPageKey");mt(this,"ts");mt(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}`)}});mt(this,"dedupedQueue",()=>{const t=new Map;for(let e=0;es_&&(this.queue=this.queue.splice(this.queue.length-s_)),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=o_(),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=E3();if(!(t==null||t.id===null))return this.ts=t.ts,this.ts}enable(){if(!yF(this.auth)){this.enabled=!1;return}ha()&&(this.enabled=!0,this.ts=Cu({on:this.enabled,id:this.userId,it:this.ident,ut:this.allowUserTracking}),this.identify())}disable(){ha()&&(this.enabled=!1,this.ts=Cu({on:this.enabled,id:this.userId,it:this.ident,ut:this.allowUserTracking}))}},ha=()=>typeof window=="object"&&typeof window.localStorage=="object"&&typeof window.localStorage.getItem=="function"&&typeof window.localStorage.setItem=="function",i_=(t,e)=>{if(!yF(e))return!1;if(!ha())return!0;const r=E3();return r===null?t??!0:r.on},yF=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)},o_=()=>{try{return window.location.pathname}catch{return""}},cle=()=>{if(!ha())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},Kg="_dbeat",E3=()=>{try{return JSON.parse(window.localStorage.getItem(Kg))}catch{return null}},Cu=t=>{try{return t.ts||(t.ts=Math.floor(Date.now()/1e3)),window.localStorage.setItem(Kg,JSON.stringify(t)),t.ts}catch{return}},lle=(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 ha()&&r.privacy.userAgentSalt===!0&&(t=t+":"+navigator.userAgent),r.privacy.extraSalt&&r.privacy.extraSalt.length>0&&(t=t+":"+r.privacy.extraSalt),{userId:Tce(zce(t)).substring(0,50),ident:1};throw new Error("invalid configuration")},fle=()=>{if(ha()&&typeof window.sessionStorage=="object"&&typeof window.sessionStorage.getItem=="function"&&typeof window.sessionStorage.setItem=="function"){const e=window.sessionStorage.getItem(Kg);if(e&&e.length>0)return e;{const r=a_(16);return window.sessionStorage.setItem(Kg,r),r}}else return a_(16)},a_=t=>{let e="";for(let r=0;r[Ne(_t(t)).slice(0,10),t]));function k3(t,e){const r=Ee.transaction.fromTransactionish(t,e);Ee.transaction.unwind(t,r).forEach(s=>dle(t,s))}function dle(t,e){if(e.to.toLowerCase()===t.toLowerCase()&&e.data){const r=ue(e.data);if(r.length>=4&&!hle(r))throw new Error("self calls are forbidden")}if(e.delegateCall)throw new Error("delegate calls are forbidden");if(e.data){const n=le(e.data).slice(0,10),s=ule.get(n);if(s){const i=s.slice(0,s.indexOf("("));throw new Error(`${i} calls are forbidden`)}}}function hle(t){const e=new Ir(cn.mainModule.abi);try{return e.decodeFunctionData("createContract",t),!0}catch{return!1}}function cs(){return cs=Object.assign?Object.assign.bind():function(t){for(var e=1;e++vle;class fy{constructor(){var e=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.state=void 0,this.confirmationOnly=!1,this.events=new H2.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,s){e.state===Xs.CLOSED&&(e.confirmationOnly=!0),e.openWallet(void 0,{type:"jsonRpcRequest",method:r.method},s);try{e.isOpened()||await e.waitUntilOpened();const i=await e.sendMessageRequest({idx:bF(),type:lt.MESSAGE,data:r,chainId:s});n(void 0,i.data)}catch(i){n(i)}},this.sendMessageRequest=async function(r){return new Promise((n,s)=>{(!r.idx||r.idx<=0)&&r.type!=="init"&&s(new Error("message idx not set"));const i=(a,c)=>{if(a)s(a);else if(c)n(c);else throw new Error("no valid response to return")},o=r.idx;e.responseCallbacks.get(o)?s(new Error("duplicate message idx, should never happen")):e.responseCallbacks.set(o,i),e.isOpened()?e.sendMessage(r):(Ae.debug("pushing to pending requests",r),e.pendingMessageRequests.push(r))})},this.waitUntilOpened=async function(r=Mk){let n=!1;return Promise.race([new Promise((s,i)=>{const o=setTimeout(()=>{clearTimeout(o),n||(e.state=Xs.CLOSED,e.events.emit("close",{code:1005,message:"opening wallet timed out"})),i(new Error("opening wallet timed out"))},r)}),new Promise(s=>{if(e.isOpened()){var i;n=!0,s((i=e.openPayload)==null?void 0:i.session);return}e.events.once("open",o=>{e.openPayload=o,n=!0,s(o.session)})})])},this.waitUntilConnected=async function(){await e.waitUntilOpened();const r=new Promise(s=>{if(e.connectPayload){s(e.connectPayload);return}e.events.once("connect",i=>{e.connectPayload=i,s(i)})}),n=new Promise((s,i)=>{e.events.once("close",o=>{i(o?new Error(`wallet closed due to ${JSON.stringify(o)}`):new Error("user closed the wallet"))})});return Promise.race([r,n])},this.state=Xs.CLOSED,this._registered=!1,this._init=lr.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===Xs.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===lt.INIT){Ae.debug("MessageProvider, received INIT message",e);const{nonce:c}=e.data;if(!c||c.length==0){Ae.error("invalid init nonce");return}this._init=lr.OK,this.sendMessage({idx:-1,type:lt.INIT,data:{sessionId:this._sessionId,nonce:c}})}if(this._init!==lr.OK)return;Ae.debug("RECEIVED MESSAGE FROM WALLET",e.idx,e);const n=e.idx,s=this.responseCallbacks.get(n);if(n&&this.responseCallbacks.delete(n),e.type===lt.OPEN&&!this.isOpened()){var i,o;if(this._sessionId&&this._sessionId!==((i=e.data)==null?void 0:i.sessionId)){Ae.debug("open event received from wallet, but does not match sessionId",this._sessionId);return}if((o=e.data)!=null&&o.error){var a;const c=new Error(`opening wallet failed: received ${(a=e.data)==null?void 0:a.error}`);throw Ae.error(c),this.close(),c}this.state=Xs.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(l){r.sendMessage(l)});return}if(e.type===lt.MESSAGE){if(this.confirmationOnly&&setTimeout(()=>{this.responseCallbacks.size===0&&this.closeWallet()},500),!s)throw new Error("impossible state");if(s){this.events.emit("message",e),s(e.data.error,e);return}}if(e.type===lt.ACCOUNTS_CHANGED){this.accountsChangedPayload={accounts:[]},e.data&&e.data.length>0?(this.accountsChangedPayload={accounts:[He(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===lt.CHAIN_CHANGED){this.events.emit("chainChanged",e.data,e.origin);return}if(e.type===lt.NETWORKS){this.networksPayload=e.data,this.events.emit("networks",this.networksPayload);return}if(e.type===lt.WALLET_CONTEXT){this.walletContextPayload=e.data,this.events.emit("walletContext",this.walletContextPayload);return}e.type===lt.CLOSE&&this.state!==Xs.CLOSED&&this.close(e.data),e.type===lt.CONNECT&&(this.connectPayload=e.data,this.events.emit("connect",this.connectPayload)),e.type===lt.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!==Xs.CLOSED&&(this.state=Xs.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,Ae.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(cs({},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 yle(t){return ple.some(e=>e.predicate(t))}const ple=[{name:"Decentraland Exception",predicate:gle},{name:"0x v3 Exception",predicate:ble}],mle=/^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 gle(t){try{const e=Ei(t);return mle.test(e)}catch{return!1}}function ble(t){const e=new Ir(xle);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const xle=[{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"}],_m=_t(`Ethereum Signed Message: +`),Nk=t=>Ji(t)?ue(t):_t(t),V2=t=>{const e=Nk(t);return yle(e)?e:Tt([_m,_t(String(e.length)),e])},wle=t=>{if(JSON.stringify(t.slice(0,_m.length))!==JSON.stringify(_m))return t;const e=t.slice(_m.length),r=String(e.length).length;let n,s;try{s=Number(Ei(e.slice(0,r)))}catch{s=Number(le(e.slice(0,r)))}return s>e.length||!Number.isInteger(s)?n=r-1:n=r,e.slice(n)},Zd=async(t,e,r,n)=>new Ee.reader.OnChainReader(n).isValidSignature(t,e,r),xF=async(t,e,r,n)=>{const s=V2(e),i=ik(s);return Zd(t,i,r,n)},wF=(t,e,r,n)=>Zd(t,sy(e),r,n),Yg=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",CF=()=>!!navigator.userAgent.match(/UnitySequence/i),EF=t=>t.onChain.deployed&&t.fullyMigrated;class kF{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 av{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(this.callbacks=[],!av.isAvailable())throw new Error("LocalStorage is not available");window.addEventListener("storage",e=>{const{key:r}=e;this.callbacks.filter(s=>s.key===r).forEach(s=>s.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 Qg(){return av.isAvailable()?new av:new kF}async function SF(t){return Array.isArray(t)?Promise.all(t.map(e=>Mt(e))):Mt(t)}const c_="@sequence.transportSession";class uy{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,s,i){throw new Error("abstract method")},this.handleMessage=async function(n){const s=n;if(r._init!==lr.OK){if(s.type===lt.INIT)if(r.isValidInitAck(n))r._initCallback&&r._initCallback();else{r._initCallback&&r._initCallback("invalid init");return}return}switch(s.type){case lt.OPEN:{if(r._init!==lr.OK)return;const i={sessionId:s.data.sessionId,intent:s.data.intent,networkId:s.data.networkId};await r.open(i);return}case lt.CLOSE:return r._init!==lr.OK,void 0;case lt.MESSAGE:{const i=await r.walletRequestHandler.sendMessageRequest(s);r.sendMessage(i),i.data.error;return}default:Ae.error(`unexpected payload type ${s.type}`)}},this.sendMessageRequest=async function(n){return r.walletRequestHandler.sendMessageRequest(n)},this.open=async function({sessionId:n,intent:s,networkId:i}){n&&(r._sessionId=hL(n),r.saveTransportSession({sessionId:n,intent:s,networkId:i})),r.walletRequestHandler.setOpenIntent(s),await r.init();let o;try{if(i){const a=lk(i);if(a)o=a.chainId;else throw new Error(`unknown network ${i}`)}else o=r.walletRequestHandler.defaultChainId()}catch(a){console.error(a)}if(s&&s.type==="connect"&&s.options){const a=s.options,c=a;if(r.appOrigin&&c!=null&&c.origin){if(!Yg()&&c.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&c!=null&&c.origin?a.origin=yL(c.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=vL(a.app)),a.networkId?i=a.networkId:i&&(a.networkId=i),r.walletRequestHandler.setConnectOptions(a)}else r.walletRequestHandler.setConnectOptions(void 0);if(await r.walletRequestHandler.getAccount(),await r.walletRequestHandler.isSignedIn())if(s&&s.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(s.options);a.connected&&r.walletRequestHandler.notifyConnect(a)}catch(a){Ae.warn("promptConnect not connected:",a)}finally{(!s.options||s.options.keepWalletOpened!==!0)&&r.notifyClose()}}else{if(!o||o<=0)return r.notifyOpen({sessionId:r._sessionId,error:`failed to open wallet on network ${i}`}),!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=>{Qg().setItem(c_,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=Qg().getItem(c_);try{return n?JSON.parse(n):null}catch{return console.error(`unable to parse transport session: ${n}`),null}},this.walletRequestHandler=e,this._init=lr.NIL,this.walletRequestHandler.on("connect",n=>{this.registered&&this.notifyConnect(n)}),this.walletRequestHandler.on("disconnect",(n,s)=>{this.registered&&this.notifyDisconnect(n,s)}),this.walletRequestHandler.on("accountsChanged",(n,s)=>{this.registered&&this.notifyAccountsChanged(n,s)}),this.walletRequestHandler.on("networks",n=>{this.registered&&(this.notifyNetworks(n),!n||n.length===0?this.notifyChainChanged("0x0"):this.notifyChainChanged(ui(n.find(s=>s.isDefaultChain).chainId)))}),this.walletRequestHandler.on("chainChanged",(n,s)=>{this.notifyChainChanged(n,s)}),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:s,error:i}=e;this.sendMessage({idx:-1,type:lt.OPEN,data:{chainId:r,sessionId:n,session:s,error:i}})}notifyClose(e){this.sendMessage({idx:-1,type:lt.CLOSE,data:e?{error:e}:null})}notifyConnect(e){this.sendMessage({idx:-1,type:lt.CONNECT,data:e})}notifyDisconnect(e,r){this.sendMessage({idx:-1,type:lt.DISCONNECT,data:e?{error:e}:null,origin:r})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:lt.ACCOUNTS_CHANGED,data:e,origin:r})}notifyChainChanged(e,r){this.sendMessage({idx:-1,type:lt.CHAIN_CHANGED,data:e,origin:r})}notifyNetworks(e){this.sendMessage({idx:-1,type:lt.NETWORKS,data:e})}notifyWalletContext(e){this.sendMessage({idx:-1,type:lt.WALLET_CONTEXT,data:e})}isValidInitAck(e){if(this._init===lr.OK)return Ae.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==lt.INIT)return Ae.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(Ae.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(Ae.error("invalid init ack match"),!1):!0}init(){return new Promise((e,r)=>{if(this._init===lr.OK){e();return}if(this._init!==lr.NIL||this._initCallback){r("transport init is in progress");return}const n=setTimeout(()=>{Ae.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},Mk/2);this._initCallback=s=>{this._initCallback=void 0,clearTimeout(n),s?r(s):(this._init=lr.OK,e())},this._initNonce=`${performance.now()}`,this.sendMessage({idx:-1,type:lt.INIT,data:{nonce:this._initNonce}}),this._init=lr.SENT_NONCE})}}class Cle{constructor(){this.app=void 0,this.wallet=void 0;const e=new S3,r=new S3;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class S3{constructor(){this.conn=void 0,this.events=new H2.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 AF extends fy{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,s)=>{if(this.state===Xs.CLOSED){this.state=Xs.OPENING;const i=`${performance.now()}`;this._sessionId=i,this.sendMessage({idx:-1,type:lt.OPEN,data:{path:r,intent:n,networkId:s,sessionId:i}})}},this.state=Xs.CLOSED,this.port=e,!e)throw new Error("port argument cannot be empty");this._init=lr.OK}closeWallet(){this.sendMessage({idx:-1,type:lt.CLOSE,data:null}),this.close()}sendMessage(e){if(!e.idx)throw new Error("message idx is empty");this.port.sendMessage(e)}}class Ele extends uy{constructor(e,r){super(e),this.port=void 0,this.port=r,this._init=lr.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 $F(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=(...s)=>{n.logfromjs(`${t}: ${O5(s)}`)},console.warn=(...s)=>{n.warnfromjs(`${t}: ${O5(s)}`)},console.error=(...s)=>{n.errorfromjs(`${t}: ${O5(s)}`)},window.logsOverriddenForUnreal=!0}}function O5(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let Eu;class _F extends fy{constructor(e){super(),this.walletURL=void 0,this.register=()=>{var r;$F("dapp"),Eu&&(Eu.unregister(),Eu=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),Eu=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r;this._registered=!1,this.closeWallet(),Eu===this&&(Eu=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,s)=>{if(this.isOpened()){console.log("wallet already open!");return}console.log("opening wallet!");const i=new URL(this.walletURL.href),o=new ly;r&&(i.pathname=r.toLowerCase()),this._init=lr.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",nk(n)),s&&o.set("net",`${s}`),i.search=o.toString(),console.log("opening wallet to",i.href),window.open(i.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 kle extends uy{constructor(e){super(e),this.onMessageFromUnreal=r=>{Ae.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new ly(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:sk(n.get("intent"))}},this._init=lr.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;$F("wallet");const{search:n}=new URL(e||window.location.href);let s=this.getUnrealTransportSession(n);if(!!s.sessionId||(s=await this.getCachedTransportSession()),!s){Ae.error("unreal session is undefined");return}window.ue.sequencewallettransport.onmessagefromsequencejs=this.onMessageFromUnreal,this._registered=!0,this.open(s).then(o=>{if(!o){var a;const c=`failed to open to network ${(a=s)==null?void 0:a.networkId}`;Ae.error(c),this.notifyClose({message:c}),window.close()}}).catch(o=>{var a;const c=`failed to open to network ${(a=s)==null?void 0:a.networkId}, due to: ${o}`;Ae.error(c),this.notifyClose({message:c}),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!==lt.INIT&&this._init!==lr.OK){Ae.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 jk="sequence-extension-message-handler";class Sle extends uy{constructor(e,r){super(e),this.runtime=r,this.port=void 0,this._init=lr.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:jk})}sendMessage(e){Ae.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class PF extends fy{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===jk&&(this._init=lr.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class Ale extends H2.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;Ae.info("[received message]",n);const s=n.idx,i=this.responseCallbacks.get(s);switch(s&&this.responseCallbacks.delete(s),n.type){case lt.MESSAGE:if(i)this.emit(lt.MESSAGE,n),i(n.data.error,n);else throw new Error("impossible state");break;case lt.DISCONNECT:case lt.ACCOUNTS_CHANGED:case lt.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((s,i)=>{(!n.idx||n.idx<=0)&&i(new Error("message idx not set"));const o=(c,l)=>{if(c)i(c);else if(l)s(l);else throw new Error("no valid response to return")},{idx:a}=n;r.responseCallbacks.get(a)?i(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 ku;class IF extends fy{constructor(e){super(),this.walletURL=void 0,this.walletWindow=void 0,this.register=()=>{ku&&(ku.unregister(),ku=this),window.addEventListener("message",this.onWindowEvent),ku=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(),ku===this&&(ku=void 0),window.removeEventListener("message",this.onWindowEvent),this.events.removeAllListeners()},this.openWallet=(r,n,s)=>{if(this.walletWindow&&this.isOpened()){this.walletWindow.focus();return}const i=new URL(this.walletURL.href),o=new ly;r&&r!==""&&(i.pathname=r.toLowerCase()),this._init=lr.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&(n.type==="connect"&&(n.options||(n.options={app:window.location.origin}),!Yg()&&!CF()&&n.options&&(n.options.origin=window.location.origin)),o.set("intent",nk(n))),s&&o.set("net",`${s}`);let a,c;Yg()?(a=[450,750],c=[Math.abs(window.screen.width/2-a[0]/2),Math.abs(window.screen.height/2-a[1]/2)]):(a=[450,750],c=[Math.abs(window.screenX+window.innerWidth/2-a[0]/2),Math.abs(window.screenY+window.innerHeight/2-a[1]/2)]);const l=`toolbar=0,location=0,menubar=0,scrollbars=yes,status=yes,width=${a[0]},height=${a[1]},left=${c[0]},top=${c[1]}`;i.search=o.toString(),this.walletWindow=window.open(i.href,"sequence.app",l)},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){Ae.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 $le extends uy{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 s;try{s=JSON.parse(n.data)}catch{return}if(Ae.debug("RECEIVED MESSAGE",s),r._init!==lr.OK&&r.isValidInitAck(s)&&(r.appOrigin=n.origin),r._init===lr.OK&&(!r.appOrigin||r.appOrigin.length<8)){Ae.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(s)},this.getWindowTransportSession=n=>{const s=new ly(n);return{sessionId:s.get("sid"),networkId:s.get("net"),intent:sk(s.get("intent"))}},this._init=lr.NIL}async register(e){const r=parent.window.opener!==null;if(this._isPopup=r,r!==!0)return;const{pathname:n,search:s}=new URL(e||window.location.href);let i=this.getWindowTransportSession(s);if(!!i.sessionId||(i=await this.getCachedTransportSession()),!i){Ae.error("window session is undefined");return}this.parentWindow=parent.window.opener,window.addEventListener("message",this.onWindowEvent,!1),this._registered=!0,this.open(i).then(a=>{if(!a){var c;const l=`failed to open to network ${(c=i)==null?void 0:c.networkId}`;Ae.error(l),this.notifyClose({message:l}),window.close()}}).catch(a=>{var c;const l=`failed to open to network ${(c=i)==null?void 0:c.networkId}, due to: ${a}`;Ae.error(l),this.notifyClose({message:l}),window.close()})}unregister(){window.removeEventListener("message",this.onWindowEvent),this._registered=!1}sendMessage(e){const r=JSON.stringify(e);e.type===lt.INIT?this.postMessage(r,!0):this.postMessage(r)}get isPopup(){return this._isPopup}postMessage(e,r=!1){if(r!==!0&&this._init!==lr.OK){Ae.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):Ae.error("unable to postMessage as parentOrigin is invalid")}}function TF(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 G2{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(s=>{this.provider!==s&&s.unregister()}))})})},this.unregister=()=>{this.messageProviders.forEach(n=>n.unregister()),this.provider=void 0},this.openWallet=(n,s,i)=>{if(this.provider){this.provider.openWallet(n,s,i);return}this.messageProviders.forEach(o=>o.openWallet(n,s,i))},this.sendAsync=async function(n,s,i){if(r.provider){r.provider.sendAsync(n,s,i);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,s,i;const o=new G2;if((r=e.windowTransport)!=null&&r.enabled&&typeof window=="object"&&e.walletAppURL){const a=new IF(e.walletAppURL);o.add(a)}if((n=e.proxyTransport)!=null&&n.enabled){const a=new AF(e.proxyTransport.appPort);o.add(a)}if((s=e.extensionTransport)!=null&&s.enabled){const a=new PF(e.extensionTransport.runtime);o.add(a)}if((i=e.unrealTransport)!=null&&i.enabled&&e.windowTransport&&e.walletAppURL){const a=new _F(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;n({connected:!1})),a=o;return a.connected&&!a.session&&(a.session=await s.walletSession(i==null?void 0:i.networkId)),o},this.sendAsync=async function(i,o,a){const c={jsonrpc:"2.0",id:i.id,result:null};await s.getAccount();try{var l;if((!s.account||s.account===null)&&!Ole.includes(i.method))throw gF;const u=s.account;if(!u)throw new Error("WalletRequestHandler: wallet account is not configured");const d=(l=s.account)==null?void 0:l.providerFor(a??s.defaultChainId());if(!d)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${a}`);const h=d instanceof $a?d:void 0;switch(i.method){case"net_version":{if(!h)throw new Error("Account provider doesn't support send method");const v=await h.send("net_version",[]);c.result=v;break}case"eth_chainId":{if(!h)throw new Error("Account provider doesn't support send method");const v=await h.send("eth_chainId",[]);c.result=v;break}case"eth_accounts":{const v=u.address;c.result=[v];break}case"eth_getBalance":{const[v,y]=i.params,m=await d.getBalance(v,y);c.result=m.toHexString();break}case"sequence_sign":case"personal_sign":case"eth_sign":{let v;switch(i.method){case"sequence_sign":case"personal_sign":{const[b,x]=i.params;v=b;break}case"eth_sign":{const[b,x]=i.params;v=x;break}}let y="";const m=V2(v),g=i.method==="sequence_sign";if(s.prompter===null?y=await u.signMessage(m,a??s.defaultChainId(),g?"eip6492":"ignore"):y=await s.prompter.promptSignMessage({chainId:a,message:m,eip6492:g},s.connectOptions),y&&y.length>0)c.result=y;else throw new Error("declined by user");break}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[v,y]=i.params;let m;if(typeof y=="string")try{m=JSON.parse(y)}catch(x){console.warn("walletRequestHandler: error parsing typedData",x)}else m=y;if(!m||!m.domain||!m.types||!m.message)throw new Error("invalid typedData object");let g="";const b=i.method==="sequence_signTypedData_v4";if(s.prompter===null?g=await u.signTypedData(m.domain,m.types,m.message,a??s.defaultChainId(),b?"eip6492":"ignore"):g=await s.prompter.promptSignMessage({chainId:a,typedData:m,eip6492:b},s.connectOptions),g&&g.length>0)c.result=g;else throw new Error("declined by user");break}case"eth_sendTransaction":{const v=Ple(i.params[0]).map(m=>("gas"in m&&m.gasLimit===void 0&&(m.gasLimit=m.gas,delete m.gas),m));k3(u.address,v);let y="";if(s.prompter===null){var f;const m=await u.sendTransaction(v,a??s.defaultChainId());y=(f=m==null?void 0:m.hash)!=null?f:""}else y=await s.prompter.promptSendTransaction(v,a,s.connectOptions);if(y)c.result=y;else throw new Error("declined by user");break}case"eth_signTransaction":{const[v]=i.params;if(He(v.from)!==u.address)throw new Error("sender address does not match wallet");k3(u.address,v),s.prompter===null?c.result=await u.signTransactions(v,a??s.defaultChainId()):c.result=await s.prompter.promptSignTransaction(v,a,s.connectOptions);break}case"eth_sendRawTransaction":{if(Ee.transaction.isSignedTransactionBundle(i.params[0])){const v=ne.from(i.params[0].chainId).toNumber(),y=await u.relayer(v).relay(i.params[0]);c.result=y.hash}else{const v=await d.sendTransaction(i.params[0]);c.result=v.hash}break}case"eth_getTransactionCount":{const v=He(i.params[0]),y=i.params[1],m=await d.getTransactionCount(v,y);c.result=ne.from(m).toHexString();break}case"eth_blockNumber":{c.result=await d.getBlockNumber();break}case"eth_getBlockByNumber":{c.result=await d.getBlock(i.params[0]);break}case"eth_getBlockByHash":{c.result=await d.getBlock(i.params[0]);break}case"eth_getTransactionByHash":{c.result=await d.getTransaction(i.params[0]);break}case"eth_call":{const[v,y]=i.params;c.result=await d.call(v,y);break}case"eth_getCode":{const[v,y]=i.params;c.result=await d.getCode(v,y);break}case"eth_estimateGas":{const[v]=i.params;c.result=await d.estimateGas(v);break}case"eth_gasPrice":{const v=await d.getGasPrice();c.result=v.toHexString();break}case"wallet_switchEthereumChain":{const[v]=i.params;if(!v.chainId||v.chainId.length===0)throw new Error("invalid chainId");const y=ne.from(v.chainId);s.setDefaultChainId(y.toNumber()),c.result=null;break}case"sequence_getWalletContext":{c.result=u.contexts;break}case"sequence_getWalletConfig":{const[v]=i.params;v?c.result=[(await u.status(v)).onChain.config]:c.result=await Promise.all(u.networks.map(async function(y){return(await u.status(y.chainId)).onChain.config}));break}case"sequence_getWalletState":{const[v]=i.params;v?c.result=[l_(v,await u.status(v))]:c.result=await Promise.all(u.networks.map(async function(y){const m=await u.status(y.chainId);return l_(y.chainId,m)}));break}case"sequence_getNetworks":{c.result=await s.getNetworks(!0);break}case"sequence_isSequence":{c.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[v]=i.params;if(!v)throw new Error("invalid request, method argument defaultChainId cannot be empty");s.setDefaultChainId(v),c.result=await s.getNetworks(!0);break}default:{if(!h)throw new Error("Account provider doesn't support send method");const v=await h.send(i.method,i.params);c.result=v}}}catch(u){Ae.error(u),c.result=null,c.error=cs({},new Error(u),{code:4001})}o(void 0,c)},this.isSignedIn=async function(){return await s.signerReady(),!!s.account},this.getAccount=async function(){if(await s.signerReady(),s.account===void 0)throw new Error("signerReady failed resolve");return s.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:s}=r;if(n){const a=this._connectOptions;let c;if(this.prompter!==null){var i;c=await((i=this.prompter)==null?void 0:i.promptSignInConnect(a))}else c=await this.connect(a);this.notifyConnect(c),(!a||a.keepWalletOpened!==!0)&&this.notifyClose()}if(s&&this.defaultChainId()!==s){var o;await((o=this.prompter)==null?void 0:o.promptChangeNetwork(s))}}signOut(){this.account&&this.notifyDisconnect(),this.setAccount(null)}signerReset(){this.account=void 0}signerReady(e=Ile){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 s=(r=(n=e==null?void 0:e.networkId)!=null?n:this.defaultChainId())!=null?r:fe.MAINNET,i=lk(s).chainId,o={connected:!0,chainId:ui(i)};if(e&&e.authorize){const a={app:e.app,origin:e.origin,expiry:e.expiry,nonce:e.authorizeNonce};try{o.proof=await jB(this.account,i,a)}catch(c){return Ae.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${c.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${c.message}`}}}return o.session=this.walletSession(i),o}sendMessageRequest(e){return new Promise(r=>{this.sendAsync(e.data,(n,s)=>{const i=cs({},e,{data:s});r(i)},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=cs({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(Ae.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(s=>cs({},s,{provider:void 0,relayer:void 0}))};if(e){const s=Ki(r.networks,e);if(s){var n;(n=r.networks)==null||n.forEach(i=>delete i.isDefaultChain),s.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 s;this.events.emit("accountsChanged",[(s=e.session)==null?void 0:s.accountAddress],r)}}notifyDisconnect(e){this.events.emit("accountsChanged",[],e),this.events.emit("disconnect",void 0,e)}notifyChainChanged(e,r){this.events.emit("chainChanged",ui(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(s=>s.chainId===this.defaultChainId());n&&this.events.emit("chainChanged",ui(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){Ae.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;rc.canOnchainValidate||c.original.version===2&&n,o=await r.status(s);if(i(o))return!0;if(await e.promptConfirmWalletDeploy(s,this.connectOptions)){const c=await r.status(s);return i(c)?!0:(Ae.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function l_(t,e){return{context:e.original.context,config:e.onChain.config,address:Ee.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 Ole=["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 I1{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(!T1.is(e))throw new Error("SequenceSigner can only be connected to a SequenceProvider");return new I1(this.client,e)}getSigner(e){if(!e)return this;const r=this.provider.toChainId(e);return this.singleNetworkSigners[r]||(this.singleNetworkSigners[r]=new Dk(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||{},s=this.useChainId(r==null?void 0:r.chainId);return this.client.signMessage(e,{eip6492:n,chainId:s})}async signTypedData(e,r,n,s){const{eip6492:i=!0}=s||{},o=this.useChainId(s==null?void 0:s.chainId);return this.client.signTypedData({domain:e,types:r,message:n},{eip6492:i,chainId:o})}getProvider(e){return this.provider.getProvider(e)}async sendTransaction(e,r){const n=this.useChainId(r==null?void 0:r.chainId),s=await SF(e),i=await this.client.sendTransaction(s,{chainId:n}),o=this.getProvider(n);try{return await ua(async function(){const a=await o.getTransaction(i);return a?o._wrapTransaction(a,i):void 0},{onceBlock:o})}catch(a){throw a.transactionHash=i,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 Dk extends I1{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 Rle{constructor(e){if(this.signer=e,Dk.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,s,i){return this.signer.signTypedData(e,r,n,{chainId:s,eip6492:i})}async isValidSignature(e,r,n,s){return Zd(e,r,n,this.signer.getProvider(s))}async isValidMessageSignature(e,r,n,s){const i=this.signer.getProvider(s),o=V2(r),a=ik(o);return Zd(e,a,n,i)}isValidTypedDataSignature(e,r,n,s){return this.isValidSignature(e,sy(r),n,s)}}class T1 extends N2{constructor(e,r,n=Qd){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(s=>{this.emit("connect",s)}),e.onDisconnect(s=>{this.emit("disconnect",s)}),e.onDefaultChainIdChanged(s=>{this.emit("chainChanged",s)}),e.onAccountsChanged(s=>{this.emit("accountsChanged",s)}),this.signer=new I1(this.client,this),this.utils=new Rle(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(cs({},e,{authorize:!0}))}async openWallet(e,r){return await this.client.openWallet(e,r),!0}toChainId(e){if(e===void 0)return;const r=Ki(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 RF(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 ui(await this.useChainId());if(e==="eth_accounts")return[this.client.getAddress()];if(e==="wallet_switchEthereumChain"){const o=r[0],a=OF(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 s=await this._getSubprovider(),i=(n=s.prepareRequest(e,r))!=null?n:[e,r];return s.send(i[0],i[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=Ki(this.networks,e);if(!r)throw new Error(`Unknown network ${e}`);return r}async waitForTransaction(e,r,n,s){return(await this._getSubprovider(s==null?void 0:s.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,s){return(await this._getSubprovider(s==null?void 0:s.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 $4(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}}T1.is=t=>t&&typeof t=="object"&&t._isSequenceProvider===!0;function OF(t){return typeof t=="object"?OF(t.chainId):ne.from(t).toNumber()}class RF extends T1{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=Ki(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 Mle extends ale{}const Nle=(t,e)=>{e||(e="https://nodes.sequence.app");const r=!t,n={};return t&&(n.headers={"X-Access-Key":t}),new Mle(e,n,{noop:r,defaultEnabled:!0,privacy:{userIdHash:!0,userAgentSalt:!1},initProps:()=>ha()?{origin:window.location.origin}:{}})};var jle={name:"@0xsequence/provider",version:"1.9.19",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 Ef{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(Ef.SESSION_LOCALSTORE_KEY,JSON.stringify(e))}getSession(){const e=this.store.getItem(Ef.SESSION_LOCALSTORE_KEY);if(e)return JSON.parse(e)}async clearSession(){return this.store.removeItem(Ef.SESSION_LOCALSTORE_KEY)}}Ef.SESSION_LOCALSTORE_KEY="@sequence.session";class kf{constructor(e,r=1){this.store=e,this.startingChainId=r,this.callbacks=[],e.onItemChange(kf.SESSION_CHAIN_ID_KEY,n=>{if(n){const s=parseInt(n);this.callbacks.forEach(i=>i(s))}})}onDefaultChainIdChanged(e){return this.callbacks.push(e),()=>{this.callbacks=this.callbacks.filter(r=>r!==e)}}setDefaultChainId(e){e!==this.getDefaultChainId()&&this.store.setItem(kf.SESSION_CHAIN_ID_KEY,e.toString())}getDefaultChainId(){const e=this.store.getItem(kf.SESSION_CHAIN_ID_KEY);return!e||e.length===0?this.startingChainId:parseInt(e)}}kf.SESSION_CHAIN_ID_KEY="@sequence.session.defaultChainId";class Lk{constructor(e,r,n){var s,i;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,TF(e))this.transport=G2.new(e);else if(pF(e))this.transport=e;else throw new Error("Invalid transport");const o=n==null?void 0:n.defaultChainId;if(this.defaultEIP6492=(s=n==null?void 0:n.defaultEIP6492)!=null?s:!1,this.session=new Ef(r),this.defaultChainId=new kf(r,o),this.transport.on("accountsChanged",l=>{var f;l.length>1&&console.warn("SequenceClient: wallet-webapp returned more than one account"),(f=this.callbacks.accountsChanged)==null||f.forEach(u=>u(l))}),this.transport.on("connect",l=>{var f;const u=ui(this.getChainId());(f=this.callbacks.connect)==null||f.forEach(d=>d(cs({},l,{chainId:u})))}),this.transport.on("disconnect",(l,f)=>{var u;(u=this.callbacks.disconnect)==null||u.forEach(d=>d(l,f))}),this.transport.on("networks",l=>{var f;(f=this.callbacks.networks)==null||f.forEach(u=>u(l))}),this.transport.on("walletContext",l=>{var f;(f=this.callbacks.walletContext)==null||f.forEach(u=>u(l))}),this.transport.on("open",l=>{var f;(f=this.callbacks.open)==null||f.forEach(u=>u(l))}),this.transport.on("close",()=>{var l;(l=this.callbacks.close)==null||l.forEach(f=>f())}),this.transport.on("chainChanged",(l,f)=>{var u;(u=this.callbacks.chainChanged)==null||u.forEach(d=>d(l,f))}),this.defaultChainId.onDefaultChainIdChanged(l=>{var f;const u=ui(l);(f=this.callbacks.chainChanged)==null||f.forEach(d=>d(u))}),n!=null&&n.projectAccessKey&&(this.projectAccessKey=n.projectAccessKey),this.projectAccessKey&&n!=null&&n.analytics&&(this.analytics=Nle(this.projectAccessKey)),(i=this.session.getSession())!=null&&i.accountAddress){var a,c;(a=this.analytics)==null||a.identify((c=this.session.getSession())==null||(c=c.accountAddress)==null?void 0:c.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:cs({},e,{networkId:this.getChainId(),clientVersion:jle.version})});const r=await this.transport.waitUntilConnected().catch(i=>i instanceof Error?{connected:!1,error:i.message}:{connected:!1,error:JSON.stringify(i)});if(r.chainId&&(r.chainId=ne.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 s;(s=this.analytics)==null||s.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,s)=>{this.transport.sendAsync(e,(i,o)=>{i?s(i):o===void 0?s(new Error(`Got undefined response for request: ${e}`)):typeof o=="object"&&o.error?s(o.error):typeof o=="object"&&o.result?n(o.result):s(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 s=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=le(Nk(e)),this.send({method:s,params:[e,this.getAddress()]},r==null?void 0:r.chainId)}async signTypedData(e,r){var n;const s=this.signTypedDataMethod(r),i=jr.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:s,params:[this.getAddress(),i]},(r==null?void 0:r.chainId)||e.domain.chainId&&ne.from(e.domain.chainId).toNumber()||this.getChainId())}async sendTransaction(e,r){var n;const s=Array.isArray(e)?e:[e],i=_le(s);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:[i]},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 A3={transports:{walletAppURL:"https://sequence.app",windowTransport:{enabled:!0},proxyTransport:{enabled:!1}},defaultNetwork:1,analytics:!0};let Ao;const MF=(t,e)=>{var r,n,s;if(!t||typeof t!="string")throw new Error("Please pass a projectAccessKey in initWallet.");if(Ao)return Ao;const i=cs({},A3,e,{transports:cs({},A3.transports,e==null?void 0:e.transports)}),o={},a=(r=(n=i.networks)==null?void 0:n.filter(h=>{h.rpcUrl!==void 0&&h.chainId!==void 0&&Qd.find(v=>v.chainId===h.chainId)}))!=null?r:[],c=Qd.map(h=>{var v;const y=(v=i.networks)==null?void 0:v.find(m=>m.chainId===h.chainId);return y?cs({},h,y):h}).concat(a).map(h=>(h.rpcUrl.includes(t)||(h.rpcUrl=h.rpcUrl+`/${t}`),h)),l=h=>{if(!o[h]){var v;const y=(v=c.find(b=>b.chainId===h))==null?void 0:v.rpcUrl;if(!y)throw new Error(`no rpcUrl found for chainId: ${h}`);const m=new $a(y),g=new fk([IL,PL,new uk],new Dg(m));o[h]=new FD(g,h)}return o[h]},f=i.defaultNetwork?(s=Ki(c,i.defaultNetwork))==null?void 0:s.chainId:void 0;if(!f&&i.defaultNetwork)throw new Error(`defaultNetwork not found for chainId: ${i.defaultNetwork}`);const u=i.localStorage||Qg(),d=new Lk(i.transports,u,{defaultChainId:f,defaultEIP6492:i.defaultEIP6492,projectAccessKey:t,analytics:i.analytics});return Ao=new T1(d,l),Ao},NF=()=>{Ao&&(Ao.client.closeWallet(),Ao.client.transport.unregister(),Ao=void 0)},jF=()=>{if(!Ao)throw new Error("Wallet has not been initialized, call sequence.initWallet(config) first.");return Ao},Dle=Object.freeze(Object.defineProperty({__proto__:null,BaseInjectedTransport:Ale,BaseProviderTransport:fy,BaseWalletTransport:uy,CHANNEL_ID:jk,DefaultChainIdTracker:kf,DefaultProviderConfig:A3,ErrSignedInRequired:gF,EventType:lt,ExtensionMessageHandler:Sle,ExtensionMessageProvider:PF,InitState:lr,LocalStorage:av,MemoryItemStore:kF,MuxMessageProvider:G2,OpenState:Xs,PROVIDER_OPEN_TIMEOUT:Mk,ProviderError:mF,ProxyMessageChannel:Cle,ProxyMessageChannelPort:S3,ProxyMessageHandler:Ele,ProxyMessageProvider:AF,SequenceClient:Lk,SequenceClientSession:Ef,SequenceProvider:T1,SequenceSigner:I1,SingleNetworkSequenceProvider:RF,SingleNetworkSequenceSigner:Dk,UnrealMessageHandler:kle,UnrealMessageProvider:_F,WalletRequestHandler:Tle,WindowMessageHandler:$le,WindowMessageProvider:IF,WindowSessionParams:ly,getWallet:jF,initWallet:MF,isBrowserExtension:Yg,isMuxTransportTemplate:TF,isProviderTransport:pF,isUnityPlugin:CF,isValidMessageSignature:xF,isValidSignature:Zd,isValidTypedDataSignature:wF,isWalletUpToDate:EF,messageToBytes:Nk,nextMessageIdx:bF,prefixEIP191Message:V2,resolveArrayProperties:SF,trimEIP191Prefix:wle,unregisterWallet:NF,useBestStore:Qg,validateTransactionRequest:k3},Symbol.toStringTag,{value:"Module"}));function Ln(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 s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(t)}var Lle=Ln({__proto__:null},[QX]),Ble=Ln({__proto__:null},[tZ]),Fle=Ln({__proto__:null},[uce]),zle=Ln({__proto__:null},[pce]),qle=Ln({__proto__:null},[bae]),Ule=Ln({__proto__:null},[_ae]),Wle=Ln({__proto__:null},[Sce]),Hle=Ln({__proto__:null},[Hie]),Vle=Ln({__proto__:null},[Dle]),Gle=Ln({__proto__:null},[tae]);const Kle=Ee.transaction;var Yle=Object.freeze({__proto__:null,transactions:Kle}),Qle=Ln({__proto__:null,isValidSignature:Zd,isValidMessageSignature:xF,isValidTypedDataSignature:wF,isWalletUpToDate:EF},[Iie]),Jle=Ln({__proto__:null},[Moe]),Xle=Ln({__proto__:null},[rae]),Zle=Ln({__proto__:null},[cce]),efe=Ln({__proto__:null},[Foe]),tfe=Ln({__proto__:null},[lae]),Uf=Object.freeze({__proto__:null,abi:Lle,api:Ble,auth:Fle,guard:zle,indexer:qle,metadata:Ule,multicall:Wle,network:Hle,provider:Vle,relayer:Gle,transactions:Yle,utils:Qle,core:Jle,signhub:Xle,sessions:Zle,migration:efe,account:tfe,initWallet:MF,getWallet:jF,unregisterWallet:NF,SequenceProvider:T1,SequenceClient:Lk,SequenceSigner:I1});const DF="%[a-f0-9]{2}",f_=new RegExp("("+DF+")|([^%]+?)","gi"),u_=new RegExp("("+DF+")+","gi");function $3(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;const r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],$3(r),$3(n))}function rfe(t){try{return decodeURIComponent(t)}catch{let e=t.match(f_)||[];for(let r=1;rt==null,afe=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),_3=Symbol("encodeFragmentIdentifier");function cfe(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{const s=r.length;return n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Wr(e,t),"[",s,"]"].join("")]:[...r,[Wr(e,t),"[",Wr(s,t),"]=",Wr(n,t)].join("")]};case"bracket":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Wr(e,t),"[]"].join("")]:[...r,[Wr(e,t),"[]=",Wr(n,t)].join("")];case"colon-list-separator":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Wr(e,t),":list="].join("")]:[...r,[Wr(e,t),":list=",Wr(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e=t.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,s)=>s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?n:(s=s===null?"":s,n.length===0?[[Wr(r,t),e,Wr(s,t)].join("")]:[[n,Wr(s,t)].join(t.arrayFormatSeparator)])}default:return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,Wr(e,t)]:[...r,[Wr(e,t),"=",Wr(n,t)].join("")]}}function lfe(t){let e;switch(t.arrayFormat){case"index":return(r,n,s)=>{if(e=/\[(\d*)]$/.exec(r),r=r.replace(/\[\d*]$/,""),!e){s[r]=n;return}s[r]===void 0&&(s[r]={}),s[r][e[1]]=n};case"bracket":return(r,n,s)=>{if(e=/(\[])$/.exec(r),r=r.replace(/\[]$/,""),!e){s[r]=n;return}if(s[r]===void 0){s[r]=[n];return}s[r]=[...s[r],n]};case"colon-list-separator":return(r,n,s)=>{if(e=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!e){s[r]=n;return}if(s[r]===void 0){s[r]=[n];return}s[r]=[...s[r],n]};case"comma":case"separator":return(r,n,s)=>{const i=typeof n=="string"&&n.includes(t.arrayFormatSeparator),o=typeof n=="string"&&!i&&ia(n,t).includes(t.arrayFormatSeparator);n=o?ia(n,t):n;const a=i||o?n.split(t.arrayFormatSeparator).map(c=>ia(c,t)):n===null?n:ia(n,t);s[r]=a};case"bracket-separator":return(r,n,s)=>{const i=/(\[])$/.test(r);if(r=r.replace(/\[]$/,""),!i){s[r]=n&&ia(n,t);return}const o=n===null?[]:n.split(t.arrayFormatSeparator).map(a=>ia(a,t));if(s[r]===void 0){s[r]=o;return}s[r]=[...s[r],...o]};default:return(r,n,s)=>{if(s[r]===void 0){s[r]=n;return}s[r]=[...[s[r]].flat(),n]}}}function BF(t){if(typeof t!="string"||t.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Wr(t,e){return e.encode?e.strict?afe(t):encodeURIComponent(t):t}function ia(t,e){return e.decode?sfe(t):t}function FF(t){return Array.isArray(t)?t.sort():typeof t=="object"?FF(Object.keys(t)).sort((e,r)=>Number(e)-Number(r)).map(e=>t[e]):t}function zF(t){const e=t.indexOf("#");return e!==-1&&(t=t.slice(0,e)),t}function ffe(t){let e="";const r=t.indexOf("#");return r!==-1&&(e=t.slice(r)),e}function d_(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?t=Number(t):e.parseBooleans&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")&&(t=t.toLowerCase()==="true"),t}function Bk(t){t=zF(t);const e=t.indexOf("?");return e===-1?"":t.slice(e+1)}function Fk(t,e){e={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...e},BF(e.arrayFormatSeparator);const r=lfe(e),n=Object.create(null);if(typeof t!="string"||(t=t.trim().replace(/^[?#&]/,""),!t))return n;for(const s of t.split("&")){if(s==="")continue;const i=e.decode?s.replace(/\+/g," "):s;let[o,a]=LF(i,"=");o===void 0&&(o=i),a=a===void 0?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?a:ia(a,e),r(ia(o,e),a,n)}for(const[s,i]of Object.entries(n))if(typeof i=="object"&&i!==null)for(const[o,a]of Object.entries(i))i[o]=d_(a,e);else n[s]=d_(i,e);return e.sort===!1?n:(e.sort===!0?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((s,i)=>{const o=n[i];return s[i]=o&&typeof o=="object"&&!Array.isArray(o)?FF(o):o,s},Object.create(null))}function qF(t,e){if(!t)return"";e={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...e},BF(e.arrayFormatSeparator);const r=o=>e.skipNull&&ofe(t[o])||e.skipEmptyString&&t[o]==="",n=cfe(e),s={};for(const[o,a]of Object.entries(t))r(o)||(s[o]=a);const i=Object.keys(s);return e.sort!==!1&&i.sort(e.sort),i.map(o=>{const a=t[o];return a===void 0?"":a===null?Wr(o,e):Array.isArray(a)?a.length===0&&e.arrayFormat==="bracket-separator"?Wr(o,e)+"[]":a.reduce(n(o),[]).join("&"):Wr(o,e)+"="+Wr(a,e)}).filter(o=>o.length>0).join("&")}function UF(t,e){var s;e={decode:!0,...e};let[r,n]=LF(t,"#");return r===void 0&&(r=t),{url:((s=r==null?void 0:r.split("?"))==null?void 0:s[0])??"",query:Fk(Bk(t),e),...e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:ia(n,e)}:{}}}function WF(t,e){e={encode:!0,strict:!0,[_3]:!0,...e};const r=zF(t.url).split("?")[0]||"",n=Bk(t.url),s={...Fk(n,{sort:!1}),...t.query};let i=qF(s,e);i&&(i=`?${i}`);let o=ffe(t.url);if(t.fragmentIdentifier){const a=new URL(r);a.hash=t.fragmentIdentifier,o=e[_3]?a.hash:`#${t.fragmentIdentifier}`}return`${r}${i}${o}`}function HF(t,e,r){r={parseFragmentIdentifier:!0,[_3]:!1,...r};const{url:n,query:s,fragmentIdentifier:i}=UF(t,r);return WF({url:n,query:ife(s,e),fragmentIdentifier:i},r)}function ufe(t,e,r){const n=Array.isArray(e)?s=>!e.includes(s):(s,i)=>!e(s,i);return HF(t,n,r)}const VF=Object.freeze(Object.defineProperty({__proto__:null,exclude:ufe,extract:Bk,parse:Fk,parseUrl:UF,pick:HF,stringify:qF,stringifyUrl:WF},Symbol.toStringTag,{value:"Module"})),zk=p.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),K2=p.createContext({});function dfe(){return p.useContext(K2).visualElement}const dy=p.createContext(null),Y2=typeof document<"u",Jg=Y2?p.useLayoutEffect:p.useEffect,GF=p.createContext({strict:!1});function hfe(t,e,r,n){const s=dfe(),i=p.useContext(GF),o=p.useContext(dy),a=p.useContext(zk).reducedMotion,c=p.useRef();n=n||i.renderer,!c.current&&n&&(c.current=n(t,{visualState:e,parent:s,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const l=c.current;return Jg(()=>{l&&l.render()}),(window.HandoffAppearAnimations?Jg:p.useEffect)(()=>{l&&l.animationState&&l.animationState.animateChanges()}),l}function ld(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function vfe(t,e,r){return p.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):ld(r)&&(r.current=n))},[e])}function cv(t){return typeof t=="string"||Array.isArray(t)}function Q2(t){return typeof t=="object"&&typeof t.start=="function"}const yfe=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function J2(t){return Q2(t.animate)||yfe.some(e=>cv(t[e]))}function KF(t){return!!(J2(t)||t.variants)}function pfe(t,e){if(J2(t)){const{initial:r,animate:n}=t;return{initial:r===!1||cv(r)?r:void 0,animate:cv(n)?n:void 0}}return t.inherit!==!1?e:{}}function mfe(t){const{initial:e,animate:r}=pfe(t,p.useContext(K2));return p.useMemo(()=>({initial:e,animate:r}),[h_(e),h_(r)])}function h_(t){return Array.isArray(t)?t.join(" "):t}const Yo=t=>({isEnabled:e=>t.some(r=>!!e[r])}),lv={measureLayout:Yo(["layout","layoutId","drag"]),animation:Yo(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Yo(["exit"]),drag:Yo(["drag","dragControls"]),focus:Yo(["whileFocus"]),hover:Yo(["whileHover","onHoverStart","onHoverEnd"]),tap:Yo(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Yo(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Yo(["whileInView","onViewportEnter","onViewportLeave"])};function gfe(t){for(const e in t)e==="projectionNodeConstructor"?lv.projectionNodeConstructor=t[e]:lv[e].Component=t[e]}function X2(t){const e=p.useRef(null);return e.current===null&&(e.current=t()),e.current}const b0={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let bfe=1;function xfe(){return X2(()=>{if(b0.hasEverUpdated)return bfe++})}const qk=p.createContext({});class wfe extends w.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}}const YF=p.createContext({}),Cfe=Symbol.for("motionComponentSymbol");function Efe({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:s,Component:i}){t&&gfe(t);function o(c,l){const f={...p.useContext(zk),...c,layoutId:kfe(c)},{isStatic:u}=f;let d=null;const h=mfe(c),v=u?void 0:xfe(),y=s(c,u);if(!u&&Y2){h.visualElement=hfe(i,y,f,e);const m=p.useContext(GF).strict,g=p.useContext(YF);h.visualElement&&(d=h.visualElement.loadFeatures(f,m,t,v,r||lv.projectionNodeConstructor,g))}return p.createElement(wfe,{visualElement:h.visualElement,props:f},d,p.createElement(K2.Provider,{value:h},n(i,c,v,vfe(y,h.visualElement,l),y,u,h.visualElement)))}const a=p.forwardRef(o);return a[Cfe]=i,a}function kfe({layoutId:t}){const e=p.useContext(qk).id;return e&&t!==void 0?e+"-"+t:t}function Sfe(t){function e(n,s={}){return Efe(t(n,s))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,s)=>(r.has(s)||r.set(s,e(s)),r.get(s))})}const Afe=["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 Uk(t){return typeof t!="string"||t.includes("-")?!1:!!(Afe.indexOf(t)>-1||/[A-Z]/.test(t))}const Xg={};function $fe(t){Object.assign(Xg,t)}const Zg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],O1=new Set(Zg);function QF(t,{layout:e,layoutId:r}){return O1.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!Xg[t]||t==="opacity")}const gs=t=>!!(t!=null&&t.getVelocity),_fe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Pfe=(t,e)=>Zg.indexOf(t)-Zg.indexOf(e);function Ife({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},s,i){let o="";e.sort(Pfe);for(const a of e)o+=`${_fe[a]||a}(${t[a]}) `;return r&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}function JF(t){return t.startsWith("--")}const Tfe=(t,e)=>e&&typeof t=="number"?e.transform(t):t,e1=(t,e,r)=>Math.min(Math.max(r,t),e),nu={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},x0={...nu,transform:t=>e1(0,1,t)},mp={...nu,default:1},w0=t=>Math.round(t*1e5)/1e5,fv=/(-)?([\d]*\.?[\d])+/g,P3=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Ofe=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function hy(t){return typeof t=="string"}const vy=t=>({test:e=>hy(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),yc=vy("deg"),Ro=vy("%"),Re=vy("px"),Rfe=vy("vh"),Mfe=vy("vw"),v_={...Ro,parse:t=>Ro.parse(t)/100,transform:t=>Ro.transform(t*100)},y_={...nu,transform:Math.round},XF={borderWidth:Re,borderTopWidth:Re,borderRightWidth:Re,borderBottomWidth:Re,borderLeftWidth:Re,borderRadius:Re,radius:Re,borderTopLeftRadius:Re,borderTopRightRadius:Re,borderBottomRightRadius:Re,borderBottomLeftRadius:Re,width:Re,maxWidth:Re,height:Re,maxHeight:Re,size:Re,top:Re,right:Re,bottom:Re,left:Re,padding:Re,paddingTop:Re,paddingRight:Re,paddingBottom:Re,paddingLeft:Re,margin:Re,marginTop:Re,marginRight:Re,marginBottom:Re,marginLeft:Re,rotate:yc,rotateX:yc,rotateY:yc,rotateZ:yc,scale:mp,scaleX:mp,scaleY:mp,scaleZ:mp,skew:yc,skewX:yc,skewY:yc,distance:Re,translateX:Re,translateY:Re,translateZ:Re,x:Re,y:Re,z:Re,perspective:Re,transformPerspective:Re,opacity:x0,originX:v_,originY:v_,originZ:Re,zIndex:y_,fillOpacity:x0,strokeOpacity:x0,numOctaves:y_};function Wk(t,e,r,n){const{style:s,vars:i,transform:o,transformKeys:a,transformOrigin:c}=t;a.length=0;let l=!1,f=!1,u=!0;for(const d in e){const h=e[d];if(JF(d)){i[d]=h;continue}const v=XF[d],y=Tfe(h,v);if(O1.has(d)){if(l=!0,o[d]=y,a.push(d),!u)continue;h!==(v.default||0)&&(u=!1)}else d.startsWith("origin")?(f=!0,c[d]=y):s[d]=y}if(e.transform||(l||n?s.transform=Ife(t,r,u,n):s.transform&&(s.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:v=0}=c;s.transformOrigin=`${d} ${h} ${v}`}}const Hk=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function ZF(t,e,r){for(const n in e)!gs(e[n])&&!QF(n,r)&&(t[n]=e[n])}function Nfe({transformTemplate:t},e,r){return p.useMemo(()=>{const n=Hk();return Wk(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function jfe(t,e,r){const n=t.style||{},s={};return ZF(s,n,t),Object.assign(s,Nfe(t,e,r)),t.transformValues?t.transformValues(s):s}function Dfe(t,e,r){const n={},s=jfe(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),n.style=s,n}const Lfe=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 eb(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||Lfe.has(t)}let ez=t=>!eb(t);function Bfe(t){t&&(ez=e=>e.startsWith("on")?!eb(e):t(e))}try{Bfe(require("@emotion/is-prop-valid").default)}catch{}function Ffe(t,e,r){const n={};for(const s in t)s==="values"&&typeof t.values=="object"||(ez(s)||r===!0&&eb(s)||!e&&!eb(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}function p_(t,e,r){return typeof t=="string"?t:Re.transform(e+r*t)}function zfe(t,e,r){const n=p_(e,t.x,t.width),s=p_(r,t.y,t.height);return`${n} ${s}`}const qfe={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ufe={offset:"strokeDashoffset",array:"strokeDasharray"};function Wfe(t,e,r=1,n=0,s=!0){t.pathLength=1;const i=s?qfe:Ufe;t[i.offset]=Re.transform(-n);const o=Re.transform(e),a=Re.transform(r);t[i.array]=`${o} ${a}`}function Vk(t,{attrX:e,attrY:r,originX:n,originY:s,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...c},l,f,u){if(Wk(t,c,l,u),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:v}=t;d.transform&&(v&&(h.transform=d.transform),delete d.transform),v&&(n!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=zfe(v,n!==void 0?n:.5,s!==void 0?s:.5)),e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),i!==void 0&&Wfe(d,i,o,a,!1)}const tz=()=>({...Hk(),attrs:{}}),Gk=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Hfe(t,e,r,n){const s=p.useMemo(()=>{const i=tz();return Vk(i,e,{enableHardwareAcceleration:!1},Gk(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};ZF(i,t.style,t),s.style={...i,...s.style}}return s}function Vfe(t=!1){return(r,n,s,i,{latestValues:o},a)=>{const l=(Uk(r)?Hfe:Dfe)(n,o,a,r),u={...Ffe(n,typeof r=="string",t),...l,ref:i},{children:d}=n,h=p.useMemo(()=>gs(d)?d.get():d,[d]);return s&&(u["data-projection-id"]=s),p.createElement(r,{...u,children:h})}}const Kk=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function rz(t,{style:e,vars:r},n,s){Object.assign(t.style,e,s&&s.getProjectionStyles(n));for(const i in r)t.style.setProperty(i,r[i])}const nz=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 sz(t,e,r,n){rz(t,e,void 0,n);for(const s in e.attrs)t.setAttribute(nz.has(s)?s:Kk(s),e.attrs[s])}function Yk(t,e){const{style:r}=t,n={};for(const s in r)(gs(r[s])||e.style&&gs(e.style[s])||QF(s,t))&&(n[s]=r[s]);return n}function iz(t,e){const r=Yk(t,e);for(const n in t)if(gs(t[n])||gs(e[n])){const s=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[s]=t[n]}return r}function Qk(t,e,r,n={},s={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),e}const tb=t=>Array.isArray(t),Gfe=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Kfe=t=>tb(t)?t[t.length-1]||0:t;function Pm(t){const e=gs(t)?t.get():t;return Gfe(e)?e.toValue():e}function Yfe({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,s,i){const o={latestValues:Qfe(n,s,i,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const oz=t=>(e,r)=>{const n=p.useContext(K2),s=p.useContext(dy),i=()=>Yfe(t,e,n,s);return r?i():X2(i)};function Qfe(t,e,r,n){const s={},i=n(t,{});for(const d in i)s[d]=Pm(i[d]);let{initial:o,animate:a}=t;const c=J2(t),l=KF(t);e&&l&&!c&&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"&&!Q2(u)&&(Array.isArray(u)?u:[u]).forEach(h=>{const v=Qk(t,h);if(!v)return;const{transitionEnd:y,transition:m,...g}=v;for(const b in g){let x=g[b];if(Array.isArray(x)){const k=f?x.length-1:0;x=x[k]}x!==null&&(s[b]=x)}for(const b in y)s[b]=y[b]}),s}const Jfe={useVisualState:oz({scrapeMotionValuesFromProps:iz,createRenderState:tz,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}}Vk(r,n,{enableHardwareAcceleration:!1},Gk(e.tagName),t.transformTemplate),sz(e,r)}})},Xfe={useVisualState:oz({scrapeMotionValuesFromProps:Yk,createRenderState:Hk})};function Zfe(t,{forwardMotionProps:e=!1},r,n,s){return{...Uk(t)?Jfe:Xfe,preloadedFeatures:r,useRender:Vfe(e),createVisualElement:n,projectionNodeConstructor:s,Component:t}}var qt;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(qt||(qt={}));function Z2(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function I3(t,e,r,n){p.useEffect(()=>{const s=t.current;if(r&&s)return Z2(s,e,r,n)},[t,e,r,n])}function eue({whileFocus:t,visualElement:e}){const{animationState:r}=e,n=p.useCallback(()=>{r&&r.setActive(qt.Focus,!0)},[r]),s=p.useCallback(()=>{r&&r.setActive(qt.Focus,!1)},[r]);I3(e,"focus",t?n:void 0),I3(e,"blur",t?s:void 0)}const az=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Jk(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const cz=t=>e=>az(e)&&t(e,Jk(e));function Td(t,e,r,n){return Z2(t,e,cz(r),n)}function rb(t,e,r,n){return I3(t,e,r&&cz(r),n)}function lz(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const m_=lz("dragHorizontal"),g_=lz("dragVertical");function fz(t){let e=!1;if(t==="y")e=g_();else if(t==="x")e=m_();else{const r=m_(),n=g_();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function uz(){const t=fz(!0);return t?(t(),!1):!0}function b_(t,e,r,n){return(s,i)=>{s.type==="touch"||uz()||(r&&t.animationState&&t.animationState.setActive(qt.Hover,e),n&&n(s,i))}}function tue({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){rb(n,"pointerenter",p.useMemo(()=>t||r?b_(n,!0,!!r,t):void 0,[t,!!r,n]),{passive:!t}),rb(n,"pointerleave",p.useMemo(()=>e||r?b_(n,!1,!!r,e):void 0,[t,!!r,n]),{passive:!e})}const dz=(t,e)=>e?t===e?!0:dz(t,e.parentElement):!1;function Xk(t){return p.useEffect(()=>()=>t(),[])}const rue=(t,e)=>r=>e(t(r)),ex=(...t)=>t.reduce(rue);function nue({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:s,...i}){const o=t||e||r||n,a=p.useRef(!1),c=p.useRef(null),l={passive:!(e||t||r||i.onPointerDown)};function f(){c.current&&c.current(),c.current=null}function u(){return f(),a.current=!1,s.getProps().whileTap&&s.animationState&&s.animationState.setActive(qt.Tap,!1),!uz()}function d(y,m){var g,b,x,k;u()&&(dz(s.current,y.target)?(k=(x=s.getProps()).onTap)===null||k===void 0||k.call(x,y,m):(b=(g=s.getProps()).onTapCancel)===null||b===void 0||b.call(g,y,m))}function h(y,m){var g,b;u()&&((b=(g=s.getProps()).onTapCancel)===null||b===void 0||b.call(g,y,m))}const v=p.useCallback((y,m)=>{var g;if(f(),a.current)return;a.current=!0,c.current=ex(Td(window,"pointerup",d,l),Td(window,"pointercancel",h,l));const b=s.getProps();b.whileTap&&s.animationState&&s.animationState.setActive(qt.Tap,!0),(g=b.onTapStart)===null||g===void 0||g.call(b,y,m)},[!!e,s]);rb(s,"pointerdown",o?v:void 0,l),Xk(f)}const T3=new WeakMap,R5=new WeakMap,sue=t=>{const e=T3.get(t.target);e&&e(t)},iue=t=>{t.forEach(sue)};function oue({root:t,...e}){const r=t||document;R5.has(r)||R5.set(r,{});const n=R5.get(r),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(iue,{root:t,...e})),n[s]}function aue(t,e,r){const n=oue(e);return T3.set(t,r),n.observe(t),()=>{T3.delete(t),n.unobserve(t)}}function cue({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:s={}}){const i=p.useRef({hasEnteredView:!1,isInView:!1});let o=!!(e||r||n);s.once&&i.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?uue:fue)(o,i.current,t,s)}const lue={some:0,all:1};function fue(t,e,r,{root:n,margin:s,amount:i="some",once:o}){p.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:s,threshold:typeof i=="number"?i:lue[i]},c=l=>{const{isIntersecting:f}=l;if(e.isInView===f||(e.isInView=f,o&&!f&&e.hasEnteredView))return;f&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(qt.InView,f);const u=r.getProps(),d=f?u.onViewportEnter:u.onViewportLeave;d&&d(l)};return aue(r.current,a,c)},[t,n,s,i])}function uue(t,e,r,{fallback:n=!0}){p.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:s}=r.getProps();s&&s(null),r.animationState&&r.animationState.setActive(qt.InView,!0)})},[t])}const Nc=t=>e=>(t(e),null),due={inView:Nc(cue),tap:Nc(nue),focus:Nc(eue),hover:Nc(tue)};function hz(){const t=p.useContext(dy);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,s=p.useId();return p.useEffect(()=>n(s),[]),!e&&r?[!1,()=>r&&r(s)]:[!0]}function vz(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),vue=t=>/^0[^.\s]+$/.test(t),ma={delta:0,timestamp:0},yz=1/60*1e3,yue=typeof performance<"u"?()=>performance.now():()=>Date.now(),pz=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(yue()),yz);function pue(t){let e=[],r=[],n=0,s=!1,i=!1;const o=new WeakSet,a={schedule:(c,l=!1,f=!1)=>{const u=f&&s,d=u?e:r;return l&&o.add(c),d.indexOf(c)===-1&&(d.push(c),u&&s&&(n=e.length)),c},cancel:c=>{const l=r.indexOf(c);l!==-1&&r.splice(l,1),o.delete(c)},process:c=>{if(s){i=!0;return}if(s=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let l=0;l(t[e]=pue(()=>uv=!0),t),{}),Nn=yy.reduce((t,e)=>{const r=tx[e];return t[e]=(n,s=!1,i=!1)=>(uv||bue(),r.schedule(n,s,i)),t},{}),al=yy.reduce((t,e)=>(t[e]=tx[e].cancel,t),{}),M5=yy.reduce((t,e)=>(t[e]=()=>tx[e].process(ma),t),{}),gue=t=>tx[t].process(ma),mz=t=>{uv=!1,ma.delta=O3?yz:Math.max(Math.min(t-ma.timestamp,mue),1),ma.timestamp=t,R3=!0,yy.forEach(gue),R3=!1,uv&&(O3=!1,pz(mz))},bue=()=>{uv=!0,O3=!0,R3||pz(mz)};function Zk(t,e){t.indexOf(e)===-1&&t.push(e)}function e7(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class t7{constructor(){this.subscriptions=[]}add(e){return Zk(this.subscriptions,e),()=>e7(this.subscriptions,e)}notify(e,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,r,n);else for(let i=0;i!isNaN(parseFloat(t));class wue{constructor(e,r={}){this.version="8.5.5",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,s=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=ma;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Nn.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()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Nn.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=xue(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new t7);const n=this.events[e].add(r);return e==="change"?()=>{n(),Nn.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?r7(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 t1(t,e){return new wue(t,e)}const n7=(t,e)=>r=>!!(hy(r)&&Ofe.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),gz=(t,e,r)=>n=>{if(!hy(n))return n;const[s,i,o,a]=n.match(fv);return{[t]:parseFloat(s),[e]:parseFloat(i),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Cue=t=>e1(0,255,t),N5={...nu,transform:t=>Math.round(Cue(t))},pf={test:n7("rgb","red"),parse:gz("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+N5.transform(t)+", "+N5.transform(e)+", "+N5.transform(r)+", "+w0(x0.transform(n))+")"};function Eue(t){let e="",r="",n="",s="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,r+=r,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const M3={test:n7("#"),parse:Eue,transform:pf.transform},fd={test:n7("hsl","hue"),parse:gz("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+Ro.transform(w0(e))+", "+Ro.transform(w0(r))+", "+w0(x0.transform(n))+")"},Wn={test:t=>pf.test(t)||M3.test(t)||fd.test(t),parse:t=>pf.test(t)?pf.parse(t):fd.test(t)?fd.parse(t):M3.parse(t),transform:t=>hy(t)?t:t.hasOwnProperty("red")?pf.transform(t):fd.transform(t)},bz="${c}",xz="${n}";function kue(t){var e,r;return isNaN(t)&&hy(t)&&(((e=t.match(fv))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(P3))===null||r===void 0?void 0:r.length)||0)>0}function nb(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const s=t.match(P3);s&&(r=s.length,t=t.replace(P3,bz),e.push(...s.map(Wn.parse)));const i=t.match(fv);return i&&(n=i.length,t=t.replace(fv,xz),e.push(...i.map(nu.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function wz(t){return nb(t).values}function Cz(t){const{values:e,numColors:r,tokenised:n}=nb(t),s=e.length;return i=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function Aue(t){const e=wz(t);return Cz(t)(e.map(Sue))}const cl={test:kue,parse:wz,createTransformer:Cz,getAnimatableNone:Aue},$ue=new Set(["brightness","contrast","saturate","opacity"]);function _ue(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(fv)||[];if(!n)return t;const s=r.replace(n,"");let i=$ue.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+s+")"}const Pue=/([a-z-]*)\(.*?\)/g,N3={...cl,getAnimatableNone:t=>{const e=t.match(Pue);return e?e.map(_ue).join(" "):t}},Iue={...XF,color:Wn,backgroundColor:Wn,outlineColor:Wn,fill:Wn,stroke:Wn,borderColor:Wn,borderTopColor:Wn,borderRightColor:Wn,borderBottomColor:Wn,borderLeftColor:Wn,filter:N3,WebkitFilter:N3},s7=t=>Iue[t];function i7(t,e){var r;let n=s7(t);return n!==N3&&(n=cl),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const Ez=t=>e=>e.test(t),Tue={test:t=>t==="auto",parse:t=>t},kz=[nu,Re,Ro,yc,Mfe,Rfe,Tue],Ah=t=>kz.find(Ez(t)),Oue=[...kz,Wn,cl],Rue=t=>Oue.find(Ez(t));function Mue(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function Nue(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function rx(t,e,r){const n=t.getProps();return Qk(n,e,r!==void 0?r:n.custom,Mue(t),Nue(t))}function jue(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,t1(r))}function Due(t,e){const r=rx(t,e);let{transitionEnd:n={},transition:s={},...i}=r?t.makeTargetAnimatable(r,!1):{};i={...i,...n};for(const o in i){const a=Kfe(i[o]);jue(t,o,a)}}function Lue(t,e,r){var n,s;const i=Object.keys(e).filter(a=>!t.hasValue(a)),o=i.length;if(o)for(let a=0;at*1e3,Uue={current:!1},o7=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,a7=t=>e=>1-t(1-e),c7=t=>t*t,Wue=a7(c7),l7=o7(c7),_r=(t,e,r)=>-r*t+r*e+t;function j5(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 Hue({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let s=0,i=0,o=0;if(!e)s=i=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,c=2*r-a;s=j5(c,a,t+1/3),i=j5(c,a,t),o=j5(c,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}const D5=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},Vue=[M3,pf,fd],Gue=t=>Vue.find(e=>e.test(t));function x_(t){const e=Gue(t);let r=e.parse(t);return e===fd&&(r=Hue(r)),r}const Sz=(t,e)=>{const r=x_(t),n=x_(e),s={...r};return i=>(s.red=D5(r.red,n.red,i),s.green=D5(r.green,n.green,i),s.blue=D5(r.blue,n.blue,i),s.alpha=_r(r.alpha,n.alpha,i),pf.transform(s))};function Az(t,e){return typeof t=="number"?r=>_r(t,e,r):Wn.test(t)?Sz(t,e):_z(t,e)}const $z=(t,e)=>{const r=[...t],n=r.length,s=t.map((i,o)=>Az(i,e[o]));return i=>{for(let o=0;o{const r={...t,...e},n={};for(const s in r)t[s]!==void 0&&e[s]!==void 0&&(n[s]=Az(t[s],e[s]));return s=>{for(const i in n)r[i]=n[i](s);return r}},_z=(t,e)=>{const r=cl.createTransformer(e),n=nb(t),s=nb(e);return n.numColors===s.numColors&&n.numNumbers>=s.numNumbers?ex($z(n.values,s.values),r):o=>`${o>0?e:t}`},ob=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},w_=(t,e)=>r=>_r(t,e,r);function Yue(t){return typeof t=="number"?w_:typeof t=="string"?Wn.test(t)?Sz:_z:Array.isArray(t)?$z:typeof t=="object"?Kue:w_}function Que(t,e,r){const n=[],s=r||Yue(t[0]),i=t.length-1;for(let o=0;ot[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=Que(e,n,s),a=o.length,c=l=>{let f=0;if(a>1)for(;fc(e1(t[0],t[i-1],l)):c}const f7=t=>t,Iz=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,Jue=1e-7,Xue=12;function Zue(t,e,r,n,s){let i,o,a=0;do o=e+(r-e)/2,i=Iz(o,n,s)-t,i>0?r=o:e=o;while(Math.abs(i)>Jue&&++aZue(i,0,1,t,r);return i=>i===0||i===1?i:Iz(s(i),e,n)}const Oz=t=>1-Math.sin(Math.acos(t)),u7=a7(Oz),ede=o7(u7),Rz=Tz(.33,1.53,.69,.99),d7=a7(Rz),tde=o7(d7),rde=t=>(t*=2)<1?.5*d7(t):.5*(2-Math.pow(2,-10*(t-1))),nde={linear:f7,easeIn:c7,easeInOut:l7,easeOut:Wue,circIn:Oz,circInOut:ede,circOut:u7,backIn:d7,backInOut:tde,backOut:Rz,anticipate:rde},C_=t=>{if(Array.isArray(t)){ib(t.length===4);const[e,r,n,s]=t;return Tz(e,r,n,s)}else if(typeof t=="string")return nde[t];return t},sde=t=>Array.isArray(t)&&typeof t[0]!="number";function ide(t,e){return t.map(()=>e||l7).splice(0,t.length-1)}function ode(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function ade(t,e){return t.map(r=>r*e)}function j3({keyframes:t,ease:e=l7,times:r,duration:n=300}){t=[...t];const s=sde(e)?e.map(C_):C_(e),i={done:!1,value:t[0]},o=ade(r&&r.length===t.length?r:ode(t),n);function a(){return Pz(o,t,{ease:Array.isArray(s)?s:ide(t,s)})}let c=a();return{next:l=>(i.value=c(l),i.done=l>=n,i),flipTarget:()=>{t.reverse(),c=a()}}}const L5=.001,cde=.01,lde=10,fde=.05,ude=1;function dde({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let s,i,o=1-e;o=e1(fde,ude,o),t=e1(cde,lde,t/1e3),o<1?(s=l=>{const f=l*o,u=f*t,d=f-r,h=D3(l,o),v=Math.exp(-u);return L5-d/h*v},i=l=>{const u=l*o*t,d=u*r+r,h=Math.pow(o,2)*Math.pow(l,2)*t,v=Math.exp(-u),y=D3(Math.pow(l,2),o);return(-s(l)+L5>0?-1:1)*((d-h)*v)/y}):(s=l=>{const f=Math.exp(-l*t),u=(l-r)*t+1;return-L5+f*u},i=l=>{const f=Math.exp(-l*t),u=(r-l)*(t*t);return f*u});const a=5/t,c=vde(s,i,a);if(t=t*1e3,isNaN(c))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:o*2*Math.sqrt(n*l),duration:t}}}const hde=12;function vde(t,e,r){let n=r;for(let s=1;st[r]!==void 0)}function mde(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!E_(t,pde)&&E_(t,yde)){const r=dde(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const gde=5;function Mz({keyframes:t,restDelta:e,restSpeed:r,...n}){let s=t[0],i=t[t.length-1];const o={done:!1,value:s},{stiffness:a,damping:c,mass:l,velocity:f,duration:u,isResolvedFromDuration:d}=mde(n);let h=bde,v=f?-(f/1e3):0;const y=c/(2*Math.sqrt(a*l));function m(){const g=i-s,b=Math.sqrt(a/l)/1e3,x=Math.abs(g)<5;if(r||(r=x?.01:2),e||(e=x?.005:.5),y<1){const k=D3(b,y);h=$=>{const I=Math.exp(-y*b*$);return i-I*((v+y*b*g)/k*Math.sin(k*$)+g*Math.cos(k*$))}}else if(y===1)h=k=>i-Math.exp(-b*k)*(g+(v+b*g)*k);else{const k=b*Math.sqrt(y*y-1);h=$=>{const I=Math.exp(-y*b*$),M=Math.min(k*$,300);return i-I*((v+y*b*g)*Math.sinh(M)+k*g*Math.cosh(M))/k}}}return m(),{next:g=>{const b=h(g);if(d)o.done=g>=u;else{let x=v;if(g!==0)if(y<1){const I=Math.max(0,g-gde);x=r7(b-h(I),g-I)}else x=0;const k=Math.abs(x)<=r,$=Math.abs(i-b)<=e;o.done=k&&$}return o.value=o.done?i:b,o},flipTarget:()=>{v=-v,[s,i]=[i,s],m()}}}Mz.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const bde=t=>0;function xde({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:s=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let c=r*e;const l=o+c,f=i===void 0?l:i(l);return f!==l&&(c=f-o),{next:u=>{const d=-c*Math.exp(-u/n);return a.done=!(d>s||d<-s),a.value=a.done?f:f+d,a},flipTarget:()=>{}}}const wde={decay:xde,keyframes:j3,tween:j3,spring:Mz};function Nz(t,e,r=0){return t-e-r}function Cde(t,e=0,r=0,n=!0){return n?Nz(e+-t,e,r):e-(t-e)+r}function Ede(t,e,r,n){return n?t>=e+r:t<=-r}const kde=t=>{const e=({delta:r})=>t(r);return{start:()=>Nn.update(e,!0),stop:()=>al.update(e)}};function ab({duration:t,driver:e=kde,elapsed:r=0,repeat:n=0,repeatType:s="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:c,onStop:l,onComplete:f,onRepeat:u,onUpdate:d,type:h="keyframes",...v}){var y,m;const g=r;let b,x=0,k=t,$=!1,I=!0,M;const D=wde[o.length>2?"keyframes":h]||j3,H=o[0],G=o[o.length-1];let V={done:!1,value:H};!((m=(y=D).needsInterpolation)===null||m===void 0)&&m.call(y,H,G)&&(M=Pz([0,100],[H,G],{clamp:!1}),o=[0,100]);const Q=D({...v,duration:t,keyframes:o});function F(){x++,s==="reverse"?(I=x%2===0,r=Cde(r,k,i,I)):(r=Nz(r,k,i),s==="mirror"&&Q.flipTarget()),$=!1,u&&u()}function C(){b&&b.stop(),f&&f()}function S(R){I||(R=-R),r+=R,$||(V=Q.next(Math.max(0,r)),M&&(V.value=M(V.value)),$=I?V.done:r<=0),d&&d(V.value),$&&(x===0&&(k=k!==void 0?k:r),x{l&&l(),b&&b.stop()},set currentTime(R){r=g,S(R)},sample:R=>{r=g;const A=t&&typeof t=="number"?Math.max(t*.5,50):50;let N=0;for(S(0);N<=R;){const B=R-N;S(Math.min(B,A)),N+=A}return V}}}function Sde(t){return!t||Array.isArray(t)||typeof t=="string"&&jz[t]}const Kh=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,jz={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Kh([0,.65,.55,1]),circOut:Kh([.55,0,1,.45]),backIn:Kh([.31,.01,.66,-.59]),backOut:Kh([.33,1.53,.69,.99])};function Ade(t){if(t)return Array.isArray(t)?Kh(t):jz[t]}function $de(t,e,r,{delay:n=0,duration:s,repeat:i=0,repeatType:o="loop",ease:a,times:c}={}){return t.animate({[e]:r,offset:c},{delay:n,duration:s,easing:Ade(a),fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const k_={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},B5={},Dz={};for(const t in k_)Dz[t]=()=>(B5[t]===void 0&&(B5[t]=k_[t]()),B5[t]);function _de(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const Pde=new Set(["opacity"]),gp=10;function Ide(t,e,{onUpdate:r,onComplete:n,...s}){if(!(Dz.waapi()&&Pde.has(e)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:c=0,ease:l}=s;if(s.type==="spring"||!Sde(s.ease)){if(s.repeat===1/0)return;const u=ab({...s,elapsed:0});let d={done:!1,value:o[0]};const h=[];let v=0;for(;!d.done&&v<2e4;)d=u.sample(v),h.push(d.value),v+=gp;o=h,a=v-gp,l="linear"}const f=$de(t.owner.current,e,o,{...s,delay:-c,duration:a,ease:l});return f.onfinish=()=>{t.set(_de(o,s)),Nn.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 d=ab({...s,autoplay:!1});t.setWithVelocity(d.sample(u-gp).value,d.sample(u).value,gp)}Nn.update(()=>f.cancel())}}}function Lz(t,e){const r=performance.now(),n=({timestamp:s})=>{const i=s-r;i>=e&&(al.read(n),t(i-e))};return Nn.read(n,!0),()=>al.read(n)}function Tde({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const s=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:Lz(s,-e)}:s()}function Ode({keyframes:t,velocity:e=0,min:r,max:n,power:s=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:c=1,modifyTarget:l,driver:f,onUpdate:u,onComplete:d,onStop:h}){const v=t[0];let y;function m(k){return r!==void 0&&kn}function g(k){return r===void 0?n:n===void 0||Math.abs(r-k){var I;u==null||u($),(I=k.onUpdate)===null||I===void 0||I.call(k,$)},onComplete:d,onStop:h})}function x(k){b({type:"spring",stiffness:o,damping:a,restDelta:c,...k})}if(m(v))x({velocity:e,keyframes:[v,g(v)]});else{let k=s*e+v;typeof l<"u"&&(k=l(k));const $=g(k),I=$===r?-1:1;let M,D;const H=G=>{M=D,D=G,e=r7(G-M,ma.delta),(I===1&&G>$||I===-1&&G<$)&&x({keyframes:[G,$],velocity:e})};b({type:"decay",keyframes:[v,0],velocity:e,timeConstant:i,power:s,restDelta:c,modifyTarget:l,onUpdate:m(k)?H:void 0})}return{stop:()=>y==null?void 0:y.stop()}}const Kl=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),bp=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),F5=()=>({type:"keyframes",ease:"linear",duration:.3}),Rde={type:"keyframes",duration:.8},S_={x:Kl,y:Kl,z:Kl,rotate:Kl,rotateX:Kl,rotateY:Kl,rotateZ:Kl,scaleX:bp,scaleY:bp,scale:bp,opacity:F5,backgroundColor:F5,color:F5,default:bp},Mde=(t,{keyframes:e})=>e.length>2?Rde:(S_[t]||S_.default)(e[1]),L3=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&cl.test(e)&&!e.startsWith("url("));function Nde({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:c,elapsed:l,...f}){return!!Object.keys(f).length}function A_(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function $_(t){return typeof t=="number"?0:i7("",t)}function Bz(t,e){return t[e]||t.default||t}function jde(t,e,r,n){const s=L3(e,r);let i=n.from!==void 0?n.from:t.get();return i==="none"&&s&&typeof r=="string"?i=i7(e,r):A_(i)&&typeof r=="string"?i=$_(r):!Array.isArray(r)&&A_(r)&&typeof i=="string"&&(r=$_(i)),Array.isArray(r)?(r[0]===null&&(r[0]=i),r):[i,r]}const h7=(t,e,r,n={})=>s=>{const i=Bz(n,t)||{},o=i.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Im(o);const c=jde(e,t,r,i),l=c[0],f=c[c.length-1],u=L3(t,l),d=L3(t,f);let h={keyframes:c,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:m=>{e.set(m),i.onUpdate&&i.onUpdate(m)},onComplete:()=>{s(),i.onComplete&&i.onComplete()}};if(!u||!d||Uue.current||i.type===!1)return Tde(h);if(i.type==="inertia")return Ode(h);Nde(i)||(h={...h,...Mde(t,h)}),h.duration&&(h.duration=Im(h.duration)),h.repeatDelay&&(h.repeatDelay=Im(h.repeatDelay));const v=e.owner,y=v&&v.current;if(v&&y instanceof HTMLElement&&!(v!=null&&v.getProps().onUpdate)){const m=Ide(e,t,h);if(m)return m}return ab(h)};function Dde(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const s=e.map(i=>B3(t,i,r));n=Promise.all(s)}else if(typeof e=="string")n=B3(t,e,r);else{const s=typeof e=="function"?rx(t,e,r.custom):e;n=Fz(t,s,r)}return n.then(()=>t.notify("AnimationComplete",e))}function B3(t,e,r={}){var n;const s=rx(t,e,r.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};r.transitionOverride&&(i=r.transitionOverride);const o=s?()=>Fz(t,s,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(l=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:d}=i;return Lde(t,e,f+l,u,d,r)}:()=>Promise.resolve(),{when:c}=i;if(c){const[l,f]=c==="beforeChildren"?[o,a]:[a,o];return l().then(f)}else return Promise.all([o(),a(r.delay)])}function Fz(t,e,{delay:r=0,transitionOverride:n,type:s}={}){var i;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...c}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");n&&(o=n);const f=[],u=s&&((i=t.animationState)===null||i===void 0?void 0:i.getState()[s]);for(const d in c){const h=t.getValue(d),v=c[d];if(!h||v===void 0||u&&Fde(u,d))continue;const y={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!h.hasAnimated){const g=t.getProps()[que];g&&(y.elapsed=window.HandoffAppearAnimations(g,d,h,Nn))}let m=h.start(h7(d,h,v,t.shouldReduceMotion&&O1.has(d)?{type:!1}:y));sb(l)&&(l.add(d),m=m.then(()=>l.remove(d))),f.push(m)}return Promise.all(f).then(()=>{a&&Due(t,a)})}function Lde(t,e,r=0,n=0,s=1,i){const o=[],a=(t.variantChildren.size-1)*n,c=s===1?(l=0)=>l*n:(l=0)=>a-l*n;return Array.from(t.variantChildren).sort(Bde).forEach((l,f)=>{l.notify("AnimationStart",e),o.push(B3(l,e,{...i,delay:r+c(f)}).then(()=>l.notify("AnimationComplete",e)))}),Promise.all(o)}function Bde(t,e){return t.sortNodePosition(e)}function Fde({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const v7=[qt.Animate,qt.InView,qt.Focus,qt.Hover,qt.Tap,qt.Drag,qt.Exit],zde=[...v7].reverse(),qde=v7.length;function Ude(t){return e=>Promise.all(e.map(({animation:r,options:n})=>Dde(t,r,n)))}function Wde(t){let e=Ude(t);const r=Vde();let n=!0;const s=(c,l)=>{const f=rx(t,l);if(f){const{transition:u,transitionEnd:d,...h}=f;c={...c,...h,...d}}return c};function i(c){e=c(t)}function o(c,l){const f=t.getProps(),u=t.getVariantContext(!0)||{},d=[],h=new Set;let v={},y=1/0;for(let g=0;gy&&$;const G=Array.isArray(k)?k:[k];let V=G.reduce(s,{});I===!1&&(V={});const{prevResolvedValues:Q={}}=x,F={...Q,...V},C=S=>{H=!0,h.delete(S),x.needsAnimating[S]=!0};for(const S in F){const T=V[S],R=Q[S];v.hasOwnProperty(S)||(T!==R?tb(T)&&tb(R)?!vz(T,R)||D?C(S):x.protectedKeys[S]=!0:T!==void 0?C(S):h.add(S):T!==void 0&&h.has(S)?C(S):x.protectedKeys[S]=!0)}x.prevProp=k,x.prevResolvedValues=V,x.isActive&&(v={...v,...V}),n&&t.blockInitialAnimation&&(H=!1),H&&!M&&d.push(...G.map(S=>({animation:S,options:{type:b,...c}})))}if(h.size){const g={};h.forEach(b=>{const x=t.getBaseTarget(b);x!==void 0&&(g[b]=x)}),d.push({animation:g})}let m=!!d.length;return n&&f.initial===!1&&!t.manuallyAnimateOnMount&&(m=!1),n=!1,m?e(d):Promise.resolve()}function a(c,l,f){var u;if(r[c].isActive===l)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(h=>{var v;return(v=h.animationState)===null||v===void 0?void 0:v.setActive(c,l)}),r[c].isActive=l;const d=o(f,c);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>r}}function Hde(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!vz(e,t):!1}function Yl(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Vde(){return{[qt.Animate]:Yl(!0),[qt.InView]:Yl(),[qt.Hover]:Yl(),[qt.Tap]:Yl(),[qt.Drag]:Yl(),[qt.Focus]:Yl(),[qt.Exit]:Yl()}}const Gde={animation:Nc(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=Wde(t)),Q2(e)&&p.useEffect(()=>e.subscribe(t),[e])}),exit:Nc(t=>{const{custom:e,visualElement:r}=t,[n,s]=hz(),i=p.useContext(dy);p.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(qt.Exit,!n,{custom:i&&i.custom||e});o&&!n&&o.then(s)},[n])})},__=(t,e)=>Math.abs(t-e);function Kde(t,e){const r=__(t.x,e.x),n=__(t.y,e.y);return Math.sqrt(r**2+n**2)}class zz{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 l=q5(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,u=Kde(l.offset,{x:0,y:0})>=3;if(!f&&!u)return;const{point:d}=l,{timestamp:h}=ma;this.history.push({...d,timestamp:h});const{onStart:v,onMove:y}=this.handlers;f||(v&&v(this.lastMoveEvent,l),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,l)},this.handlePointerMove=(l,f)=>{this.lastMoveEvent=l,this.lastMoveEventInfo=z5(f,this.transformPagePoint),Nn.update(this.updatePoint,!0)},this.handlePointerUp=(l,f)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:d}=this.handlers,h=q5(l.type==="pointercancel"?this.lastMoveEventInfo:z5(f,this.transformPagePoint),this.history);this.startEvent&&u&&u(l,h),d&&d(l,h)},!az(e))return;this.handlers=r,this.transformPagePoint=n;const s=Jk(e),i=z5(s,this.transformPagePoint),{point:o}=i,{timestamp:a}=ma;this.history=[{...o,timestamp:a}];const{onSessionStart:c}=r;c&&c(e,q5(i,this.history)),this.removeListeners=ex(Td(window,"pointermove",this.handlePointerMove),Td(window,"pointerup",this.handlePointerUp),Td(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),al.update(this.updatePoint)}}function z5(t,e){return e?{point:e(t.point)}:t}function P_(t,e){return{x:t.x-e.x,y:t.y-e.y}}function q5({point:t},e){return{point:t,delta:P_(t,qz(e)),offset:P_(t,Yde(e)),velocity:Qde(e,.1)}}function Yde(t){return t[0]}function qz(t){return t[t.length-1]}function Qde(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const s=qz(t);for(;r>=0&&(n=t[r],!(s.timestamp-n.timestamp>Im(e)));)r--;if(!n)return{x:0,y:0};const i=(s.timestamp-n.timestamp)/1e3;if(i===0)return{x:0,y:0};const o={x:(s.x-n.x)/i,y:(s.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Ds(t){return t.max-t.min}function F3(t,e=0,r=.01){return Math.abs(t-e)<=r}function I_(t,e,r,n=.5){t.origin=n,t.originPoint=_r(e.min,e.max,t.origin),t.scale=Ds(r)/Ds(e),(F3(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=_r(r.min,r.max,t.origin)-t.originPoint,(F3(t.translate)||isNaN(t.translate))&&(t.translate=0)}function C0(t,e,r,n){I_(t.x,e.x,r.x,n==null?void 0:n.originX),I_(t.y,e.y,r.y,n==null?void 0:n.originY)}function T_(t,e,r){t.min=r.min+e.min,t.max=t.min+Ds(e)}function Jde(t,e,r){T_(t.x,e.x,r.x),T_(t.y,e.y,r.y)}function O_(t,e,r){t.min=e.min-r.min,t.max=t.min+Ds(e)}function E0(t,e,r){O_(t.x,e.x,r.x),O_(t.y,e.y,r.y)}function Xde(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?_r(r,t,n.max):Math.min(t,r)),t}function R_(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 Zde(t,{top:e,left:r,bottom:n,right:s}){return{x:R_(t.x,r,s),y:R_(t.y,e,n)}}function M_(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=ob(e.min,e.max-n,t.min):n>s&&(r=ob(t.min,t.max-s,e.min)),e1(0,1,r)}function r1e(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 z3=.35;function n1e(t=z3){return t===!1?t=0:t===!0&&(t=z3),{x:N_(t,"left","right"),y:N_(t,"top","bottom")}}function N_(t,e,r){return{min:j_(t,e),max:j_(t,r)}}function j_(t,e){return typeof t=="number"?t:t[e]||0}const D_=()=>({translate:0,scale:1,origin:0,originPoint:0}),k0=()=>({x:D_(),y:D_()}),L_=()=>({min:0,max:0}),Qr=()=>({x:L_(),y:L_()});function ho(t){return[t("x"),t("y")]}function Uz({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function s1e({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function i1e(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 U5(t){return t===void 0||t===1}function q3({scale:t,scaleX:e,scaleY:r}){return!U5(t)||!U5(e)||!U5(r)}function Xl(t){return q3(t)||Wz(t)||t.z||t.rotate||t.rotateX||t.rotateY}function Wz(t){return B_(t.x)||B_(t.y)}function B_(t){return t&&t!=="0%"}function cb(t,e,r){const n=t-r,s=e*n;return r+s}function F_(t,e,r,n,s){return s!==void 0&&(t=cb(t,s,n)),cb(t,r,n)+e}function U3(t,e=0,r=1,n,s){t.min=F_(t.min,e,r,n,s),t.max=F_(t.max,e,r,n,s)}function Hz(t,{x:e,y:r}){U3(t.x,e.translate,e.scale,e.originPoint),U3(t.y,r.translate,r.scale,r.originPoint)}function o1e(t,e,r,n=!1){var s,i;const o=r.length;if(!o)return;e.x=e.y=1;let a,c;for(let l=0;l1.0000000000001||t<.999999999999?t:1}function Ac(t,e){t.min=t.min+e,t.max=t.max+e}function q_(t,e,[r,n,s]){const i=e[s]!==void 0?e[s]:.5,o=_r(t.min,t.max,i);U3(t,e[r],e[n],o,e.scale)}const a1e=["x","scaleX","originX"],c1e=["y","scaleY","originY"];function ud(t,e){q_(t.x,e,a1e),q_(t.y,e,c1e)}function Vz(t,e){return Uz(i1e(t.getBoundingClientRect(),e))}function l1e(t,e,r){const n=Vz(t,r),{scroll:s}=e;return s&&(Ac(n.x,s.offset.x),Ac(n.y,s.offset.y)),n}const f1e=new WeakMap;class u1e{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=Qr(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(Jk(a,"page").point)},s=(a,c)=>{var l;const{drag:f,dragPropagation:u,onDragStart:d}=this.getProps();f&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=fz(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),ho(h=>{var v,y;let m=this.getAxisMotionValue(h).get()||0;if(Ro.test(m)){const g=(y=(v=this.visualElement.projection)===null||v===void 0?void 0:v.layout)===null||y===void 0?void 0:y.layoutBox[h];g&&(m=Ds(g)*(parseFloat(m)/100))}this.originPoint[h]=m}),d==null||d(a,c),(l=this.visualElement.animationState)===null||l===void 0||l.setActive(qt.Drag,!0))},i=(a,c)=>{const{dragPropagation:l,dragDirectionLock:f,onDirectionLock:u,onDrag:d}=this.getProps();if(!l&&!this.openGlobalLock)return;const{offset:h}=c;if(f&&this.currentDirection===null){this.currentDirection=d1e(h),this.currentDirection!==null&&(u==null||u(this.currentDirection));return}this.updateAxis("x",c.point,h),this.updateAxis("y",c.point,h),this.visualElement.render(),d==null||d(a,c)},o=(a,c)=>this.stop(a,c);this.panSession=new zz(e,{onSessionStart:n,onStart:s,onMove:i,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i==null||i(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(qt.Drag,!1)}updateAxis(e,r,n){const{drag:s}=this.getProps();if(!n||!xp(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=Xde(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},s=this.constraints;e&&ld(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=Zde(n.layoutBox,e):this.constraints=!1,this.elastic=n1e(r),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&ho(i=>{this.getAxisMotionValue(i)&&(this.constraints[i]=r1e(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!ld(e))return!1;const n=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=l1e(n,s.root,this.visualElement.getTransformPagePoint());let o=e1e(s.layout.layoutBox,i);if(r){const a=r(s1e(o));this.hasMutatedConstraints=!!a,a&&(o=Uz(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=ho(f=>{if(!xp(f,r,this.currentDirection))return;let u=(c==null?void 0:c[f])||{};o&&(u={min:0,max:0});const d=s?200:1e6,h=s?40:1e7,v={type:"inertia",velocity:n?e[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(f,v)});return Promise.all(l).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(h7(e,n,0,r))}stopAnimation(){ho(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var r;const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(e,((r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[e])||0)}snapToCursor(e){ho(r=>{const{drag:n}=this.getProps();if(!xp(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(r);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[r];i.set(e[r]-_r(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!ld(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ho(a=>{const c=this.getAxisMotionValue(a);if(c){const l=c.get();i[a]=t1e({min:l,max:l},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",(e=s.root)===null||e===void 0||e.updateScroll(),s.updateLayout(),this.resolveConstraints(),ho(a=>{if(!xp(a,r,null))return;const c=this.getAxisMotionValue(a),{min:l,max:f}=this.constraints[a];c.set(_r(l,f,i[a]))})}addListeners(){var e;if(!this.visualElement.current)return;f1e.set(this.visualElement,this);const r=this.visualElement.current,n=Td(r,"pointerdown",l=>{const{drag:f,dragListener:u=!0}=this.getProps();f&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();ld(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&((e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout()),s();const a=Z2(window,"resize",()=>this.scalePositionWithinConstraints()),c=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:f})=>{this.isDragging&&f&&(ho(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),c==null||c()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=z3,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function xp(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function d1e(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function h1e(t){const{dragControls:e,visualElement:r}=t,n=X2(()=>new u1e(r));p.useEffect(()=>e&&e.subscribe(n),[n,e]),p.useEffect(()=>n.addListeners(),[n])}function v1e({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:s}){const i=t||e||r||n,o=p.useRef(null),{transformPagePoint:a}=p.useContext(zk),c={onSessionStart:n,onStart:e,onMove:t,onEnd:(f,u)=>{o.current=null,r&&r(f,u)}};p.useEffect(()=>{o.current!==null&&o.current.updateHandlers(c)});function l(f){o.current=new zz(f,c,{transformPagePoint:a})}rb(s,"pointerdown",i&&l),Xk(()=>o.current&&o.current.end())}const y1e={pan:Nc(v1e),drag:Nc(h1e)};function W3(t){return typeof t=="string"&&t.startsWith("var(--")}const Gz=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function p1e(t){const e=Gz.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function H3(t,e,r=1){const[n,s]=p1e(t);if(!n)return;const i=window.getComputedStyle(e).getPropertyValue(n);return i?i.trim():W3(s)?H3(s,e,r+1):s}function m1e(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(s=>{const i=s.get();if(!W3(i))return;const o=H3(i,n);o&&s.set(o)});for(const s in e){const i=e[s];if(!W3(i))continue;const o=H3(i,n);o&&(e[s]=o,r&&r[s]===void 0&&(r[s]=i))}return{target:e,transitionEnd:r}}const g1e=new Set(["width","height","top","left","right","bottom","x","y"]),Kz=t=>g1e.has(t),b1e=t=>Object.keys(t).some(Kz),U_=t=>t===nu||t===Re;var W_;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(W_||(W_={}));const H_=(t,e)=>parseFloat(t.split(", ")[e]),V_=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/);if(s)return H_(s[1],e);{const i=n.match(/^matrix\((.+)\)$/);return i?H_(i[1],t):0}},x1e=new Set(["x","y","z"]),w1e=Zg.filter(t=>!x1e.has(t));function C1e(t){const e=[];return w1e.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 G_={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:V_(4,13),y:V_(5,14)},E1e=(t,e,r)=>{const n=e.measureViewportBox(),s=e.current,i=getComputedStyle(s),{display:o}=i,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(l=>{a[l]=G_[l](n,i)}),e.render();const c=e.measureViewportBox();return r.forEach(l=>{const f=e.getValue(l);f&&f.jump(a[l]),t[l]=G_[l](c,i)}),t},k1e=(t,e,r={},n={})=>{e={...e},n={...n};const s=Object.keys(e).filter(Kz);let i=[],o=!1;const a=[];if(s.forEach(c=>{const l=t.getValue(c);if(!t.hasValue(c))return;let f=r[c],u=Ah(f);const d=e[c];let h;if(tb(d)){const v=d.length,y=d[0]===null?1:0;f=d[y],u=Ah(f);for(let m=y;m=0?window.pageYOffset:null,l=E1e(e,t,a);return i.length&&i.forEach(([f,u])=>{t.getValue(f).set(u)}),t.render(),Y2&&c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:n}}else return{target:e,transitionEnd:n}};function S1e(t,e,r,n){return b1e(e)?k1e(t,e,r,n):{target:e,transitionEnd:n}}const A1e=(t,e,r,n)=>{const s=m1e(t,e,n);return e=s.target,n=s.transitionEnd,S1e(t,e,r,n)},V3={current:null},Yz={current:!1};function $1e(){if(Yz.current=!0,!!Y2)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>V3.current=t.matches;t.addListener(e),e()}else V3.current=!1}function _1e(t,e,r){const{willChange:n}=e;for(const s in e){const i=e[s],o=r[s];if(gs(i))t.addValue(s,i),sb(n)&&n.add(s);else if(gs(o))t.addValue(s,t1(i,{owner:t})),sb(n)&&n.remove(s);else if(o!==i)if(t.hasValue(s)){const a=t.getValue(s);!a.hasAnimated&&a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,t1(a!==void 0?a:i,{owner:t}))}}for(const s in r)e[s]===void 0&&t.removeValue(s);return e}const Qz=Object.keys(lv),P1e=Qz.length,K_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class I1e{constructor({parent:e,props:r,reducedMotionConfig:n,visualState:s},i={}){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=()=>Nn.render(this.render,!1,!0);const{latestValues:o,renderState:a}=s;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=i,this.isControllingVariants=J2(r),this.isVariantNode=KF(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...l}=this.scrapeMotionValuesFromProps(r,{});for(const f in l){const u=l[f];o[f]!==void 0&&gs(u)&&(u.set(o[f],!1),sb(c)&&c.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,s)=>this.bindToMotionValue(s,n)),Yz.current||$1e(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:V3.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(),al.update(this.notifyUpdate),al.render(this.render),this.valueSubscriptions.forEach(s=>s()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(const s in this.events)this.events[s].clear();this.current=null}bindToMotionValue(e,r){const n=O1.has(e),s=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Nn.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{s(),i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,s,i,o,a){const c=[];for(let l=0;lthis.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:a,layoutScroll:h,layoutRoot:v})}return c}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Qr()}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=t1(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,s=typeof n=="string"||typeof n=="object"?(r=Qk(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!gs(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new t7),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}}const Jz=["initial",...v7],T1e=Jz.length;class Xz extends I1e{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:s},i){let o=Fue(n,e||{},this);if(s&&(r&&(r=s(r)),n&&(n=s(n)),o&&(o=s(o))),i){Lue(this,n,o);const a=A1e(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function O1e(t){return window.getComputedStyle(t)}class R1e extends Xz{readValueFromInstance(e,r){if(O1.has(r)){const n=s7(r);return n&&n.default||0}else{const n=O1e(e),s=(JF(r)?n.getPropertyValue(r):n[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:r}){return Vz(e,r)}build(e,r,n,s){Wk(e,r,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,r){return Yk(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;gs(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,s){rz(e,r,n,s)}}class M1e extends Xz{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return O1.has(r)?((n=s7(r))===null||n===void 0?void 0:n.default)||0:(r=nz.has(r)?r:Kk(r),e.getAttribute(r))}measureInstanceViewportBox(){return Qr()}scrapeMotionValuesFromProps(e,r){return iz(e,r)}build(e,r,n,s){Vk(e,r,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,r,n,s){sz(e,r,n,s)}mount(e){this.isSVGTag=Gk(e.tagName),super.mount(e)}}const N1e=(t,e)=>Uk(t)?new M1e(e,{enableHardwareAcceleration:!1}):new R1e(e,{enableHardwareAcceleration:!0});function Y_(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const $h={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Re.test(t))t=parseFloat(t);else return t;const r=Y_(t,e.target.x),n=Y_(t,e.target.y);return`${r}% ${n}%`}},Q_="_$css",j1e={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,s=t.includes("var("),i=[];s&&(t=t.replace(Gz,h=>(i.push(h),Q_)));const o=cl.parse(t);if(o.length>5)return n;const a=cl.createTransformer(t),c=typeof o[0]!="number"?1:0,l=r.x.scale*e.x,f=r.y.scale*e.y;o[0+c]/=l,o[1+c]/=f;const u=_r(l,f,.5);typeof o[2+c]=="number"&&(o[2+c]/=u),typeof o[3+c]=="number"&&(o[3+c]/=u);let d=a(o);if(s){let h=0;d=d.replace(Q_,()=>{const v=i[h];return h++,v})}return d}};class D1e extends w.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=e;$fe(B1e),i&&(r.group&&r.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),b0.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,s||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||Nn.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:s}=e;s&&(s.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(s),n!=null&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}}function L1e(t){const[e,r]=hz(),n=p.useContext(qk);return w.createElement(D1e,{...t,layoutGroup:n,switchLayoutGroup:p.useContext(YF),isPresent:e,safeToRemove:r})}const B1e={borderRadius:{...$h,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:$h,borderTopRightRadius:$h,borderBottomLeftRadius:$h,borderBottomRightRadius:$h,boxShadow:j1e},F1e={measureLayout:L1e};function z1e(t,e,r={}){const n=gs(t)?t:t1(t);return n.start(h7("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const Zz=["TopLeft","TopRight","BottomLeft","BottomRight"],q1e=Zz.length,J_=t=>typeof t=="string"?parseFloat(t):t,X_=t=>typeof t=="number"||Re.test(t);function U1e(t,e,r,n,s,i){s?(t.opacity=_r(0,r.opacity!==void 0?r.opacity:1,W1e(n)),t.opacityExit=_r(e.opacity!==void 0?e.opacity:1,0,H1e(n))):i&&(t.opacity=_r(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(ob(t,e,n))}function eP(t,e){t.min=e.min,t.max=e.max}function Mi(t,e){eP(t.x,e.x),eP(t.y,e.y)}function tP(t,e,r,n,s){return t-=e,t=cb(t,1/r,n),s!==void 0&&(t=cb(t,1/s,n)),t}function V1e(t,e=0,r=1,n=.5,s,i=t,o=t){if(Ro.test(e)&&(e=parseFloat(e),e=_r(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=_r(i.min,i.max,n);t===i&&(a-=e),t.min=tP(t.min,e,r,a,s),t.max=tP(t.max,e,r,a,s)}function rP(t,e,[r,n,s],i,o){V1e(t,e[r],e[n],e[s],e.scale,i,o)}const G1e=["x","scaleX","originX"],K1e=["y","scaleY","originY"];function nP(t,e,r,n){rP(t.x,e,G1e,r==null?void 0:r.x,n==null?void 0:n.x),rP(t.y,e,K1e,r==null?void 0:r.y,n==null?void 0:n.y)}function sP(t){return t.translate===0&&t.scale===1}function tq(t){return sP(t.x)&&sP(t.y)}function rq(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 iP(t){return Ds(t.x)/Ds(t.y)}class Y1e{constructor(){this.members=[]}add(e){Zk(this.members,e),e.scheduleRender()}remove(e){if(e7(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(s=>e===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(e,r){var n;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,r&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,n,s,i,o;(n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r),(o=(s=e.resumingFrom)===null||s===void 0?void 0:(i=s.options).onExitComplete)===null||o===void 0||o.call(i)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function oP(t,e,r){let n="";const s=t.x.translate/e.x,i=t.y.translate/e.y;if((s||i)&&(n=`translate3d(${s}px, ${i}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:c,rotateX:l,rotateY:f}=r;c&&(n+=`rotate(${c}deg) `),l&&(n+=`rotateX(${l}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 Q1e=(t,e)=>t.depth-e.depth;class J1e{constructor(){this.children=[],this.isDirty=!1}add(e){Zk(this.children,e),this.isDirty=!0}remove(e){e7(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Q1e),this.isDirty=!1,this.children.forEach(e)}}const aP=["","X","Y","Z"],cP=1e3;let X1e=0;function nq({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o,a={},c=e==null?void 0:e()){this.id=X1e++,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(the),this.nodes.forEach(she),this.nodes.forEach(ihe)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let l=0;lthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Lz(h,250),b0.hasAnimatedSinceResize&&(b0.hasAnimatedSinceResize=!1,this.nodes.forEach(fP))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||f)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:v,layout:y})=>{var m,g,b,x,k;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const $=(g=(m=this.options.transition)!==null&&m!==void 0?m:u.getDefaultTransition())!==null&&g!==void 0?g:fhe,{onLayoutAnimationStart:I,onLayoutAnimationComplete:M}=u.getProps(),D=!this.targetLayout||!rq(this.targetLayout,y)||v,H=!h&&v;if(this.options.layoutRoot||!((b=this.resumeFrom)===null||b===void 0)&&b.instance||H||h&&(D||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,H);const G={...Bz($,"layout"),onPlay:I,onComplete:M};(u.shouldReduceMotion||this.options.layoutRoot)&&(G.delay=0,G.type=!1),this.startAnimation(G)}else!h&&this.animationProgress===0&&fP(this),this.isLead()&&((k=(x=this.options).onExitComplete)===null||k===void 0||k.call(x));this.targetLayout=y})}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,al.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(ohe),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,c,l;if(this.root.isUpdateBlocked()){(c=(a=this.options).onExitComplete)===null||c===void 0||c.call(a);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{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 c=0;c{var x;const k=b/1e3;uP(h.x,o.x,k),uP(h.y,o.y,k),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((x=this.relativeParent)===null||x===void 0)&&x.layout)&&(E0(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),che(this.relativeTarget,this.relativeTargetOrigin,v,k)),y&&(this.animationValues=d,U1e(d,u,this.latestValues,k,g,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((c=this.resumingFrom.currentAnimation)===null||c===void 0||c.stop()),this.pendingAnimation&&(al.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Nn.update(()=>{b0.hasAnimatedSinceResize=!0,this.currentAnimation=z1e(0,cP,{...o,onUpdate:l=>{var f;this.mixTargetDelta(l),(f=o.onUpdate)===null||f===void 0||f.call(o,l)},onComplete:()=>{var l;(l=o.onComplete)===null||l===void 0||l.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,cP),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:f}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&sq(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Qr();const u=Ds(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+u;const d=Ds(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+d}Mi(a,c),ud(a,f),C0(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){var c,l,f;this.sharedNodes.has(o)||this.sharedNodes.set(o,new Y1e),this.sharedNodes.get(o).add(a),a.promote({transition:(c=a.options.initialPromotionConfig)===null||c===void 0?void 0:c.transition,preserveFollowOpacity:(f=(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(l,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:c}={}){const l=this.getStack();l&&l.promote(this,c),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:c}=o;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const l={};for(let f=0;f{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(lP),this.root.sharedNodes.clear()}}}function Z1e(t){t.updateLayout()}function ehe(t){var e,r,n;const s=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&s&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:o}=t.layout,{animationType:a}=t.options,c=s.source!==t.layout.source;a==="size"?ho(h=>{const v=c?s.measuredBox[h]:s.layoutBox[h],y=Ds(v);v.min=i[h].min,v.max=v.min+y}):sq(a,s.layoutBox,i)&&ho(h=>{const v=c?s.measuredBox[h]:s.layoutBox[h],y=Ds(i[h]);v.max=v.min+y});const l=k0();C0(l,i,s.layoutBox);const f=k0();c?C0(f,t.applyTransform(o,!0),s.measuredBox):C0(f,i,s.layoutBox);const u=!tq(l);let d=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:v,layout:y}=h;if(v&&y){const m=Qr();E0(m,s.layoutBox,v.layoutBox);const g=Qr();E0(g,i,y.layoutBox),rq(m,g)||(d=!0),h.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:s,delta:f,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function the(t){t.isProjectionDirty||(t.isProjectionDirty=!!(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=!!(t.parent&&t.parent.isTransformDirty))}function rhe(t){t.clearSnapshot()}function lP(t){t.clearMeasurements()}function nhe(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function fP(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function she(t){t.resolveTargetDelta()}function ihe(t){t.calcProjection()}function ohe(t){t.resetRotation()}function ahe(t){t.removeLeadSnapshot()}function uP(t,e,r){t.translate=_r(e.translate,0,r),t.scale=_r(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function dP(t,e,r,n){t.min=_r(e.min,r.min,n),t.max=_r(e.max,r.max,n)}function che(t,e,r,n){dP(t.x,e.x,r.x,n),dP(t.y,e.y,r.y,n)}function lhe(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const fhe={duration:.45,ease:[.4,0,.1,1]};function uhe(t,e){let r=t.root;for(let i=t.path.length-1;i>=0;i--)if(t.path[i].instance){r=t.path[i];break}const s=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);s&&t.mount(s,!0)}function hP(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function dhe(t){hP(t.x),hP(t.y)}function sq(t,e,r){return t==="position"||t==="preserve-aspect"&&!F3(iP(e),iP(r),.2)}const hhe=nq({attachResizeListener:(t,e)=>Z2(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),W5={current:void 0},vhe=nq({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!W5.current){const t=new hhe(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),W5.current=t}return W5.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),yhe={...Gde,...due,...y1e,...F1e},Yi=Sfe((t,e)=>Zfe(t,e,yhe,N1e,vhe));function iq(){const t=p.useRef(!1);return Jg(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function phe(){const t=iq(),[e,r]=p.useState(0),n=p.useCallback(()=>{t.current&&r(e+1)},[e]);return[p.useCallback(()=>Nn.postRender(n),[n]),e]}class mhe extends p.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 ghe({children:t,isPresent:e}){const r=p.useId(),n=p.useRef(null),s=p.useRef({width:0,height:0,top:0,left:0});return p.useInsertionEffect(()=>{const{width:i,height:o,top:a,left:c}=s.current;if(e||!n.current||!i||!o)return;n.current.dataset.motionPopId=r;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` + [data-motion-pop-id="${r}"] { + position: absolute !important; + width: ${i}px !important; + height: ${o}px !important; + top: ${a}px !important; + left: ${c}px !important; + } + `),()=>{document.head.removeChild(l)}},[e]),p.createElement(mhe,{isPresent:e,childRef:n,sizeRef:s},p.cloneElement(t,{ref:n}))}const H5=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=X2(bhe),c=p.useId(),l=p.useMemo(()=>({id:c,initial:e,isPresent:r,custom:s,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))}),i?void 0:[r]);return p.useMemo(()=>{a.forEach((f,u)=>a.set(u,!1))},[r]),p.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=p.createElement(ghe,{isPresent:r},t)),p.createElement(dy.Provider,{value:l},t)};function bhe(){return new Map}const Vu=t=>t.key||"";function xhe(t,e){t.forEach(r=>{const n=Vu(r);e.set(n,r)})}function whe(t){const e=[];return p.Children.forEach(t,r=>{p.isValidElement(r)&&e.push(r)}),e}const r1=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:s,presenceAffectsLayout:i=!0,mode:o="sync"})=>{s&&(o="wait");let[a]=phe();const c=p.useContext(qk).forceRender;c&&(a=c);const l=iq(),f=whe(t);let u=f;const d=new Set,h=p.useRef(u),v=p.useRef(new Map).current,y=p.useRef(!0);if(Jg(()=>{y.current=!1,xhe(f,v),h.current=u}),Xk(()=>{y.current=!0,v.clear(),d.clear()}),y.current)return p.createElement(p.Fragment,null,u.map(x=>p.createElement(H5,{key:Vu(x),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:i,mode:o},x)));u=[...u];const m=h.current.map(Vu),g=f.map(Vu),b=m.length;for(let x=0;x{if(g.indexOf(x)!==-1)return;const k=v.get(x);if(!k)return;const $=m.indexOf(x),I=()=>{v.delete(x),d.delete(x);const M=h.current.findIndex(D=>D.key===x);if(h.current.splice(M,1),!d.size){if(h.current=f,l.current===!1)return;a(),n&&n()}};u.splice($,0,p.createElement(H5,{key:Vu(k),isPresent:!1,onExitComplete:I,custom:e,presenceAffectsLayout:i,mode:o},k))}),u=u.map(x=>{const k=x.key;return d.has(k)?x:p.createElement(H5,{key:Vu(x),isPresent:!0,presenceAffectsLayout:i,mode:o},x)}),p.createElement(p.Fragment,null,d.size?u:u.map(x=>p.cloneElement(x)))};var G3=function(t,e){return G3=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])},G3(t,e)};function oq(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");G3(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var ai=function(){return ai=Object.assign||function(e){for(var r,n=1,s=arguments.length;n=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(e,r,i):o(e,r))||i);return s>3&&i&&Object.defineProperty(e,r,i),i}function cq(t,e){return function(r,n){e(r,n,t)}}function Che(t,e,r,n,s,i){function o(g){if(g!==void 0&&typeof g!="function")throw new TypeError("Function expected");return g}for(var a=n.kind,c=a==="getter"?"get":a==="setter"?"set":"value",l=!e&&t?n.static?t:t.prototype:null,f=e||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),u,d=!1,h=r.length-1;h>=0;h--){var v={};for(var y in n)v[y]=y==="access"?{}:n[y];for(var y in n.access)v.access[y]=n.access[y];v.addInitializer=function(g){if(d)throw new TypeError("Cannot add initializers after decoration has completed");i.push(o(g||null))};var m=(0,r[h])(a==="accessor"?{get:f.get,set:f.set}:f[c],v);if(a==="accessor"){if(m===void 0)continue;if(m===null||typeof m!="object")throw new TypeError("Object expected");(u=o(m.get))&&(f.get=u),(u=o(m.set))&&(f.set=u),(u=o(m.init))&&s.unshift(u)}else(u=o(m))&&(a==="field"?s.unshift(u):f[c]=u)}l&&Object.defineProperty(l,n.name,f),d=!0}function Ehe(t,e,r){for(var n=arguments.length>2,s=0;s0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function y7(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),s,i=[],o;try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i}function hq(){for(var t=[],e=0;e1||a(d,h)})})}function a(d,h){try{c(n[d](h))}catch(v){u(i[0][3],v)}}function c(d){d.value instanceof n1?Promise.resolve(d.value.v).then(l,f):u(i[0][2],d)}function l(d){a("next",d)}function f(d){a("throw",d)}function u(d,h){d(h),i.shift(),i.length&&a(i[0][0],i[0][1])}}function pq(t){var e,r;return e={},n("next"),n("throw",function(s){throw s}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(s,i){e[s]=t[s]?function(o){return(r=!r)?{value:n1(t[s](o)),done:!1}:i?i(o):o}:i}}function mq(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof lb=="function"?lb(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=t[i]&&function(o){return new Promise(function(a,c){o=t[i](o),s(a,c,o.done,o.value)})}}function s(i,o,a,c){Promise.resolve(c).then(function(l){i({value:l,done:a})},o)}}function gq(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var Ahe=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function bq(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&sx(e,t,r);return Ahe(e,t),e}function xq(t){return t&&t.__esModule?t:{default:t}}function wq(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function Cq(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r}function Eq(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}function kq(t,e,r){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose]}if(typeof n!="function")throw new TypeError("Object not disposable.");t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}var $he=typeof SuppressedError=="function"?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};function Sq(t){function e(n){t.error=t.hasError?new $he(n,t.error,"An error was suppressed during disposal."):n,t.hasError=!0}function r(){for(;t.stack.length;){var n=t.stack.pop();try{var s=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(s).then(r,function(i){return e(i),r()})}catch(i){e(i)}}if(t.hasError)throw t.error}return r()}const _he={__extends:oq,__assign:ai,__rest:nx,__decorate:aq,__param:cq,__metadata:lq,__awaiter:fq,__generator:uq,__createBinding:sx,__exportStar:dq,__values:lb,__read:y7,__spread:hq,__spreadArrays:vq,__spreadArray:p7,__await:n1,__asyncGenerator:yq,__asyncDelegator:pq,__asyncValues:mq,__makeTemplateObject:gq,__importStar:bq,__importDefault:xq,__classPrivateFieldGet:wq,__classPrivateFieldSet:Cq,__classPrivateFieldIn:Eq,__addDisposableResource:kq,__disposeResources:Sq},UBe=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:kq,get __assign(){return ai},__asyncDelegator:pq,__asyncGenerator:yq,__asyncValues:mq,__await:n1,__awaiter:fq,__classPrivateFieldGet:wq,__classPrivateFieldIn:Eq,__classPrivateFieldSet:Cq,__createBinding:sx,__decorate:aq,__disposeResources:Sq,__esDecorate:Che,__exportStar:dq,__extends:oq,__generator:uq,__importDefault:xq,__importStar:bq,__makeTemplateObject:gq,__metadata:lq,__param:cq,__propKey:khe,__read:y7,__rest:nx,__runInitializers:Ehe,__setFunctionName:She,__spread:hq,__spreadArray:p7,__spreadArrays:vq,__values:lb,default:_he},Symbol.toStringTag,{value:"Module"})),Aq={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"},Phe={...Aq,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)"},Ihe={...Aq,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)"},The={dark:Phe,light:Ihe},Ohe={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"}},vP={sm:0,md:480,lg:769,xl:1281};var yP={colors:{black:"var(--seq-colors-black)",white:"var(--seq-colors-white)",inherit:"var(--seq-colors-inherit)",transparent:"var(--seq-colors-transparent)",positive:"var(--seq-colors-positive)",negative:"var(--seq-colors-negative)",info:"var(--seq-colors-info)",warning:"var(--seq-colors-warning)",gradientBackdrop:"var(--seq-colors-gradient-backdrop)",gradientPrimary:"var(--seq-colors-gradient-primary)",gradientSecondary:"var(--seq-colors-gradient-secondary)",arbitrumDark:"var(--seq-colors-arbitrum-dark)",arbitrumLight:"var(--seq-colors-arbitrum-light)",avalanceDark:"var(--seq-colors-avalance-dark)",avalanceLight:"var(--seq-colors-avalance-light)",bscDark:"var(--seq-colors-bsc-dark)",bscLight:"var(--seq-colors-bsc-light)",ethereumDark:"var(--seq-colors-ethereum-dark)",ethereumLight:"var(--seq-colors-ethereum-light)",gnosisDark:"var(--seq-colors-gnosis-dark)",gnosisLight:"var(--seq-colors-gnosis-light)",polygonDark:"var(--seq-colors-polygon-dark)",polygonLight:"var(--seq-colors-polygon-light)",text100:"var(--seq-colors-text100)",text80:"var(--seq-colors-text80)",text50:"var(--seq-colors-text50)",textInverse100:"var(--seq-colors-text-inverse100)",backgroundPrimary:"var(--seq-colors-background-primary)",backgroundSecondary:"var(--seq-colors-background-secondary)",backgroundContrast:"var(--seq-colors-background-contrast)",backgroundMuted:"var(--seq-colors-background-muted)",backgroundControl:"var(--seq-colors-background-control)",backgroundInverse:"var(--seq-colors-background-inverse)",backgroundBackdrop:"var(--seq-colors-background-backdrop)",backgroundOverlay:"var(--seq-colors-background-overlay)",backgroundRaised:"var(--seq-colors-background-raised)",buttonGlass:"var(--seq-colors-button-glass)",buttonEmphasis:"var(--seq-colors-button-emphasis)",buttonInverse:"var(--seq-colors-button-inverse)",borderNormal:"var(--seq-colors-border-normal)",borderFocus:"var(--seq-colors-border-focus)"}},rt={blur:{blur:"var(--seq-blur-blur)",none:"var(--seq-blur-none)"},borderWidths:{none:"var(--seq-border-widths-none)",thin:"var(--seq-border-widths-thin)",thick:"var(--seq-border-widths-thick)"},fonts:{inherit:"var(--seq-fonts-inherit)",body:"var(--seq-fonts-body)",mono:"var(--seq-fonts-mono)"},fontSizes:{inherit:"var(--seq-font-sizes-inherit)",xsmall:"var(--seq-font-sizes-xsmall)",small:"var(--seq-font-sizes-small)",normal:"var(--seq-font-sizes-normal)",medium:"var(--seq-font-sizes-medium)",large:"var(--seq-font-sizes-large)",xlarge:"var(--seq-font-sizes-xlarge)"},fontWeights:{inherit:"var(--seq-font-weights-inherit)",normal:"var(--seq-font-weights-normal)",medium:"var(--seq-font-weights-medium)",semibold:"var(--seq-font-weights-semibold)",bold:"var(--seq-font-weights-bold)"},letterSpacings:{inherit:"var(--seq-letter-spacings-inherit)",none:"var(--seq-letter-spacings-none)",normal:"var(--seq-letter-spacings-normal)",wide:"var(--seq-letter-spacings-wide)"},lineHeights:{4:"var(--seq-line-heights-4)",5:"var(--seq-line-heights-5)",6:"var(--seq-line-heights-6)",7:"var(--seq-line-heights-7)",9:"var(--seq-line-heights-9)",inherit:"var(--seq-line-heights-inherit)"},opacity:{0:"var(--seq-opacity-0)",50:"var(--seq-opacity-50)",80:"var(--seq-opacity-80)",100:"var(--seq-opacity-100)"},radii:{none:"var(--seq-radii-none)",xs:"var(--seq-radii-xs)",sm:"var(--seq-radii-sm)",md:"var(--seq-radii-md)",lg:"var(--seq-radii-lg)",circle:"var(--seq-radii-circle)"},space:{0:"var(--seq-space-0)",1:"var(--seq-space-1)",2:"var(--seq-space-2)",3:"var(--seq-space-3)",4:"var(--seq-space-4)",5:"var(--seq-space-5)",6:"var(--seq-space-6)",7:"var(--seq-space-7)",8:"var(--seq-space-8)",9:"var(--seq-space-9)",10:"var(--seq-space-10)",12:"var(--seq-space-12)",14:"var(--seq-space-14)",16:"var(--seq-space-16)","0.25":"var(--seq-space-0_25)","0.5":"var(--seq-space-0_5)","1.5":"var(--seq-space-1_5)"},colors:{black:"var(--seq-colors-black)",white:"var(--seq-colors-white)",inherit:"var(--seq-colors-inherit)",transparent:"var(--seq-colors-transparent)",positive:"var(--seq-colors-positive)",negative:"var(--seq-colors-negative)",info:"var(--seq-colors-info)",warning:"var(--seq-colors-warning)",gradientBackdrop:"var(--seq-colors-gradient-backdrop)",gradientPrimary:"var(--seq-colors-gradient-primary)",gradientSecondary:"var(--seq-colors-gradient-secondary)",arbitrumDark:"var(--seq-colors-arbitrum-dark)",arbitrumLight:"var(--seq-colors-arbitrum-light)",avalanceDark:"var(--seq-colors-avalance-dark)",avalanceLight:"var(--seq-colors-avalance-light)",bscDark:"var(--seq-colors-bsc-dark)",bscLight:"var(--seq-colors-bsc-light)",ethereumDark:"var(--seq-colors-ethereum-dark)",ethereumLight:"var(--seq-colors-ethereum-light)",gnosisDark:"var(--seq-colors-gnosis-dark)",gnosisLight:"var(--seq-colors-gnosis-light)",polygonDark:"var(--seq-colors-polygon-dark)",polygonLight:"var(--seq-colors-polygon-light)",text100:"var(--seq-colors-text100)",text80:"var(--seq-colors-text80)",text50:"var(--seq-colors-text50)",textInverse100:"var(--seq-colors-text-inverse100)",backgroundPrimary:"var(--seq-colors-background-primary)",backgroundSecondary:"var(--seq-colors-background-secondary)",backgroundContrast:"var(--seq-colors-background-contrast)",backgroundMuted:"var(--seq-colors-background-muted)",backgroundControl:"var(--seq-colors-background-control)",backgroundInverse:"var(--seq-colors-background-inverse)",backgroundBackdrop:"var(--seq-colors-background-backdrop)",backgroundOverlay:"var(--seq-colors-background-overlay)",backgroundRaised:"var(--seq-colors-background-raised)",buttonGlass:"var(--seq-colors-button-glass)",buttonEmphasis:"var(--seq-colors-button-emphasis)",buttonInverse:"var(--seq-colors-button-inverse)",borderNormal:"var(--seq-colors-border-normal)",borderFocus:"var(--seq-colors-border-focus)"}};function Rhe(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 Mhe(t){var e=Rhe(t,"string");return typeof e=="symbol"?e:String(e)}function Nhe(t,e,r){return e=Mhe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function V5(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nc.styles)),i=Object.keys(s),o=i.filter(c=>"mappings"in s[c]),a=c=>{var l=[],f={},u=V5({},c),d=!1;for(var h of o){var v=c[h];if(v!=null){var y=s[h];d=!0;for(var m of y.mappings)f[m]=v,u[m]==null&&delete u[m]}}var g=d?V5(V5({},f),u):c,b=function(){var I=g[x],M=s[x];try{if(M.mappings)return"continue";if(typeof I=="string"||typeof I=="number")l.push(M.values[I].defaultClass);else if(Array.isArray(I))for(var D=0;Dt,Lhe=function(){return jhe(Dhe)(...arguments)},$q=Lhe({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"}}},textDecoration:{values:{none:{defaultClass:"fyvr11n2"},underline:{defaultClass:"fyvr11n3"}}},userSelect:{values:{none:{defaultClass:"fyvr11n4"},text:{defaultClass:"fyvr11n5"},all:{defaultClass:"fyvr11n6"},auto:{defaultClass:"fyvr11n7"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11n8"},nowrap:{defaultClass:"fyvr11n9"},initial:{defaultClass:"fyvr11na"},inherit:{defaultClass:"fyvr11nb"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11nc"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11nd"},"break-word":{defaultClass:"fyvr11ne"},initial:{defaultClass:"fyvr11nf"},inherit:{defaultClass:"fyvr11ng"}}},zIndex:{values:{0:{defaultClass:"fyvr11nh"},1:{defaultClass:"fyvr11ni"},10:{defaultClass:"fyvr11nj"},20:{defaultClass:"fyvr11nk"},30:{defaultClass:"fyvr11nl"},40:{defaultClass:"fyvr11nm"},50:{defaultClass:"fyvr11nn"},"-1":{defaultClass:"fyvr11no"},auto:{defaultClass:"fyvr11np"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11nq"},"16/9":{defaultClass:"fyvr11nr"},"4/3":{defaultClass:"fyvr11ns"},"3/1":{defaultClass:"fyvr11nt"},auto:{defaultClass:"fyvr11nu"}}}}},{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:"fyvr11nv",active:"fyvr11nw",disabled:"fyvr11nx",focus:"fyvr11ny",hover:"fyvr11nz",checked:"fyvr11o0"},defaultClass:"fyvr11nv"},white:{conditions:{base:"fyvr11o1",active:"fyvr11o2",disabled:"fyvr11o3",focus:"fyvr11o4",hover:"fyvr11o5",checked:"fyvr11o6"},defaultClass:"fyvr11o1"},inherit:{conditions:{base:"fyvr11o7",active:"fyvr11o8",disabled:"fyvr11o9",focus:"fyvr11oa",hover:"fyvr11ob",checked:"fyvr11oc"},defaultClass:"fyvr11o7"},transparent:{conditions:{base:"fyvr11od",active:"fyvr11oe",disabled:"fyvr11of",focus:"fyvr11og",hover:"fyvr11oh",checked:"fyvr11oi"},defaultClass:"fyvr11od"},positive:{conditions:{base:"fyvr11oj",active:"fyvr11ok",disabled:"fyvr11ol",focus:"fyvr11om",hover:"fyvr11on",checked:"fyvr11oo"},defaultClass:"fyvr11oj"},negative:{conditions:{base:"fyvr11op",active:"fyvr11oq",disabled:"fyvr11or",focus:"fyvr11os",hover:"fyvr11ot",checked:"fyvr11ou"},defaultClass:"fyvr11op"},info:{conditions:{base:"fyvr11ov",active:"fyvr11ow",disabled:"fyvr11ox",focus:"fyvr11oy",hover:"fyvr11oz",checked:"fyvr11p0"},defaultClass:"fyvr11ov"},warning:{conditions:{base:"fyvr11p1",active:"fyvr11p2",disabled:"fyvr11p3",focus:"fyvr11p4",hover:"fyvr11p5",checked:"fyvr11p6"},defaultClass:"fyvr11p1"},gradientBackdrop:{conditions:{base:"fyvr11p7",active:"fyvr11p8",disabled:"fyvr11p9",focus:"fyvr11pa",hover:"fyvr11pb",checked:"fyvr11pc"},defaultClass:"fyvr11p7"},gradientPrimary:{conditions:{base:"fyvr11pd",active:"fyvr11pe",disabled:"fyvr11pf",focus:"fyvr11pg",hover:"fyvr11ph",checked:"fyvr11pi"},defaultClass:"fyvr11pd"},gradientSecondary:{conditions:{base:"fyvr11pj",active:"fyvr11pk",disabled:"fyvr11pl",focus:"fyvr11pm",hover:"fyvr11pn",checked:"fyvr11po"},defaultClass:"fyvr11pj"},arbitrumDark:{conditions:{base:"fyvr11pp",active:"fyvr11pq",disabled:"fyvr11pr",focus:"fyvr11ps",hover:"fyvr11pt",checked:"fyvr11pu"},defaultClass:"fyvr11pp"},arbitrumLight:{conditions:{base:"fyvr11pv",active:"fyvr11pw",disabled:"fyvr11px",focus:"fyvr11py",hover:"fyvr11pz",checked:"fyvr11q0"},defaultClass:"fyvr11pv"},avalanceDark:{conditions:{base:"fyvr11q1",active:"fyvr11q2",disabled:"fyvr11q3",focus:"fyvr11q4",hover:"fyvr11q5",checked:"fyvr11q6"},defaultClass:"fyvr11q1"},avalanceLight:{conditions:{base:"fyvr11q7",active:"fyvr11q8",disabled:"fyvr11q9",focus:"fyvr11qa",hover:"fyvr11qb",checked:"fyvr11qc"},defaultClass:"fyvr11q7"},bscDark:{conditions:{base:"fyvr11qd",active:"fyvr11qe",disabled:"fyvr11qf",focus:"fyvr11qg",hover:"fyvr11qh",checked:"fyvr11qi"},defaultClass:"fyvr11qd"},bscLight:{conditions:{base:"fyvr11qj",active:"fyvr11qk",disabled:"fyvr11ql",focus:"fyvr11qm",hover:"fyvr11qn",checked:"fyvr11qo"},defaultClass:"fyvr11qj"},ethereumDark:{conditions:{base:"fyvr11qp",active:"fyvr11qq",disabled:"fyvr11qr",focus:"fyvr11qs",hover:"fyvr11qt",checked:"fyvr11qu"},defaultClass:"fyvr11qp"},ethereumLight:{conditions:{base:"fyvr11qv",active:"fyvr11qw",disabled:"fyvr11qx",focus:"fyvr11qy",hover:"fyvr11qz",checked:"fyvr11r0"},defaultClass:"fyvr11qv"},gnosisDark:{conditions:{base:"fyvr11r1",active:"fyvr11r2",disabled:"fyvr11r3",focus:"fyvr11r4",hover:"fyvr11r5",checked:"fyvr11r6"},defaultClass:"fyvr11r1"},gnosisLight:{conditions:{base:"fyvr11r7",active:"fyvr11r8",disabled:"fyvr11r9",focus:"fyvr11ra",hover:"fyvr11rb",checked:"fyvr11rc"},defaultClass:"fyvr11r7"},polygonDark:{conditions:{base:"fyvr11rd",active:"fyvr11re",disabled:"fyvr11rf",focus:"fyvr11rg",hover:"fyvr11rh",checked:"fyvr11ri"},defaultClass:"fyvr11rd"},polygonLight:{conditions:{base:"fyvr11rj",active:"fyvr11rk",disabled:"fyvr11rl",focus:"fyvr11rm",hover:"fyvr11rn",checked:"fyvr11ro"},defaultClass:"fyvr11rj"},text100:{conditions:{base:"fyvr11rp",active:"fyvr11rq",disabled:"fyvr11rr",focus:"fyvr11rs",hover:"fyvr11rt",checked:"fyvr11ru"},defaultClass:"fyvr11rp"},text80:{conditions:{base:"fyvr11rv",active:"fyvr11rw",disabled:"fyvr11rx",focus:"fyvr11ry",hover:"fyvr11rz",checked:"fyvr11s0"},defaultClass:"fyvr11rv"},text50:{conditions:{base:"fyvr11s1",active:"fyvr11s2",disabled:"fyvr11s3",focus:"fyvr11s4",hover:"fyvr11s5",checked:"fyvr11s6"},defaultClass:"fyvr11s1"},textInverse100:{conditions:{base:"fyvr11s7",active:"fyvr11s8",disabled:"fyvr11s9",focus:"fyvr11sa",hover:"fyvr11sb",checked:"fyvr11sc"},defaultClass:"fyvr11s7"},backgroundPrimary:{conditions:{base:"fyvr11sd",active:"fyvr11se",disabled:"fyvr11sf",focus:"fyvr11sg",hover:"fyvr11sh",checked:"fyvr11si"},defaultClass:"fyvr11sd"},backgroundSecondary:{conditions:{base:"fyvr11sj",active:"fyvr11sk",disabled:"fyvr11sl",focus:"fyvr11sm",hover:"fyvr11sn",checked:"fyvr11so"},defaultClass:"fyvr11sj"},backgroundContrast:{conditions:{base:"fyvr11sp",active:"fyvr11sq",disabled:"fyvr11sr",focus:"fyvr11ss",hover:"fyvr11st",checked:"fyvr11su"},defaultClass:"fyvr11sp"},backgroundMuted:{conditions:{base:"fyvr11sv",active:"fyvr11sw",disabled:"fyvr11sx",focus:"fyvr11sy",hover:"fyvr11sz",checked:"fyvr11t0"},defaultClass:"fyvr11sv"},backgroundControl:{conditions:{base:"fyvr11t1",active:"fyvr11t2",disabled:"fyvr11t3",focus:"fyvr11t4",hover:"fyvr11t5",checked:"fyvr11t6"},defaultClass:"fyvr11t1"},backgroundInverse:{conditions:{base:"fyvr11t7",active:"fyvr11t8",disabled:"fyvr11t9",focus:"fyvr11ta",hover:"fyvr11tb",checked:"fyvr11tc"},defaultClass:"fyvr11t7"},backgroundBackdrop:{conditions:{base:"fyvr11td",active:"fyvr11te",disabled:"fyvr11tf",focus:"fyvr11tg",hover:"fyvr11th",checked:"fyvr11ti"},defaultClass:"fyvr11td"},backgroundOverlay:{conditions:{base:"fyvr11tj",active:"fyvr11tk",disabled:"fyvr11tl",focus:"fyvr11tm",hover:"fyvr11tn",checked:"fyvr11to"},defaultClass:"fyvr11tj"},backgroundRaised:{conditions:{base:"fyvr11tp",active:"fyvr11tq",disabled:"fyvr11tr",focus:"fyvr11ts",hover:"fyvr11tt",checked:"fyvr11tu"},defaultClass:"fyvr11tp"},buttonGlass:{conditions:{base:"fyvr11tv",active:"fyvr11tw",disabled:"fyvr11tx",focus:"fyvr11ty",hover:"fyvr11tz",checked:"fyvr11u0"},defaultClass:"fyvr11tv"},buttonEmphasis:{conditions:{base:"fyvr11u1",active:"fyvr11u2",disabled:"fyvr11u3",focus:"fyvr11u4",hover:"fyvr11u5",checked:"fyvr11u6"},defaultClass:"fyvr11u1"},buttonInverse:{conditions:{base:"fyvr11u7",active:"fyvr11u8",disabled:"fyvr11u9",focus:"fyvr11ua",hover:"fyvr11ub",checked:"fyvr11uc"},defaultClass:"fyvr11u7"},borderNormal:{conditions:{base:"fyvr11ud",active:"fyvr11ue",disabled:"fyvr11uf",focus:"fyvr11ug",hover:"fyvr11uh",checked:"fyvr11ui"},defaultClass:"fyvr11ud"},borderFocus:{conditions:{base:"fyvr11uj",active:"fyvr11uk",disabled:"fyvr11ul",focus:"fyvr11um",hover:"fyvr11un",checked:"fyvr11uo"},defaultClass:"fyvr11uj"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11up",active:"fyvr11uq",disabled:"fyvr11ur",focus:"fyvr11us",hover:"fyvr11ut",checked:"fyvr11uu"},defaultClass:"fyvr11up"},white:{conditions:{base:"fyvr11uv",active:"fyvr11uw",disabled:"fyvr11ux",focus:"fyvr11uy",hover:"fyvr11uz",checked:"fyvr11v0"},defaultClass:"fyvr11uv"},inherit:{conditions:{base:"fyvr11v1",active:"fyvr11v2",disabled:"fyvr11v3",focus:"fyvr11v4",hover:"fyvr11v5",checked:"fyvr11v6"},defaultClass:"fyvr11v1"},transparent:{conditions:{base:"fyvr11v7",active:"fyvr11v8",disabled:"fyvr11v9",focus:"fyvr11va",hover:"fyvr11vb",checked:"fyvr11vc"},defaultClass:"fyvr11v7"},positive:{conditions:{base:"fyvr11vd",active:"fyvr11ve",disabled:"fyvr11vf",focus:"fyvr11vg",hover:"fyvr11vh",checked:"fyvr11vi"},defaultClass:"fyvr11vd"},negative:{conditions:{base:"fyvr11vj",active:"fyvr11vk",disabled:"fyvr11vl",focus:"fyvr11vm",hover:"fyvr11vn",checked:"fyvr11vo"},defaultClass:"fyvr11vj"},info:{conditions:{base:"fyvr11vp",active:"fyvr11vq",disabled:"fyvr11vr",focus:"fyvr11vs",hover:"fyvr11vt",checked:"fyvr11vu"},defaultClass:"fyvr11vp"},warning:{conditions:{base:"fyvr11vv",active:"fyvr11vw",disabled:"fyvr11vx",focus:"fyvr11vy",hover:"fyvr11vz",checked:"fyvr11w0"},defaultClass:"fyvr11vv"},gradientBackdrop:{conditions:{base:"fyvr11w1",active:"fyvr11w2",disabled:"fyvr11w3",focus:"fyvr11w4",hover:"fyvr11w5",checked:"fyvr11w6"},defaultClass:"fyvr11w1"},gradientPrimary:{conditions:{base:"fyvr11w7",active:"fyvr11w8",disabled:"fyvr11w9",focus:"fyvr11wa",hover:"fyvr11wb",checked:"fyvr11wc"},defaultClass:"fyvr11w7"},gradientSecondary:{conditions:{base:"fyvr11wd",active:"fyvr11we",disabled:"fyvr11wf",focus:"fyvr11wg",hover:"fyvr11wh",checked:"fyvr11wi"},defaultClass:"fyvr11wd"},arbitrumDark:{conditions:{base:"fyvr11wj",active:"fyvr11wk",disabled:"fyvr11wl",focus:"fyvr11wm",hover:"fyvr11wn",checked:"fyvr11wo"},defaultClass:"fyvr11wj"},arbitrumLight:{conditions:{base:"fyvr11wp",active:"fyvr11wq",disabled:"fyvr11wr",focus:"fyvr11ws",hover:"fyvr11wt",checked:"fyvr11wu"},defaultClass:"fyvr11wp"},avalanceDark:{conditions:{base:"fyvr11wv",active:"fyvr11ww",disabled:"fyvr11wx",focus:"fyvr11wy",hover:"fyvr11wz",checked:"fyvr11x0"},defaultClass:"fyvr11wv"},avalanceLight:{conditions:{base:"fyvr11x1",active:"fyvr11x2",disabled:"fyvr11x3",focus:"fyvr11x4",hover:"fyvr11x5",checked:"fyvr11x6"},defaultClass:"fyvr11x1"},bscDark:{conditions:{base:"fyvr11x7",active:"fyvr11x8",disabled:"fyvr11x9",focus:"fyvr11xa",hover:"fyvr11xb",checked:"fyvr11xc"},defaultClass:"fyvr11x7"},bscLight:{conditions:{base:"fyvr11xd",active:"fyvr11xe",disabled:"fyvr11xf",focus:"fyvr11xg",hover:"fyvr11xh",checked:"fyvr11xi"},defaultClass:"fyvr11xd"},ethereumDark:{conditions:{base:"fyvr11xj",active:"fyvr11xk",disabled:"fyvr11xl",focus:"fyvr11xm",hover:"fyvr11xn",checked:"fyvr11xo"},defaultClass:"fyvr11xj"},ethereumLight:{conditions:{base:"fyvr11xp",active:"fyvr11xq",disabled:"fyvr11xr",focus:"fyvr11xs",hover:"fyvr11xt",checked:"fyvr11xu"},defaultClass:"fyvr11xp"},gnosisDark:{conditions:{base:"fyvr11xv",active:"fyvr11xw",disabled:"fyvr11xx",focus:"fyvr11xy",hover:"fyvr11xz",checked:"fyvr11y0"},defaultClass:"fyvr11xv"},gnosisLight:{conditions:{base:"fyvr11y1",active:"fyvr11y2",disabled:"fyvr11y3",focus:"fyvr11y4",hover:"fyvr11y5",checked:"fyvr11y6"},defaultClass:"fyvr11y1"},polygonDark:{conditions:{base:"fyvr11y7",active:"fyvr11y8",disabled:"fyvr11y9",focus:"fyvr11ya",hover:"fyvr11yb",checked:"fyvr11yc"},defaultClass:"fyvr11y7"},polygonLight:{conditions:{base:"fyvr11yd",active:"fyvr11ye",disabled:"fyvr11yf",focus:"fyvr11yg",hover:"fyvr11yh",checked:"fyvr11yi"},defaultClass:"fyvr11yd"},text100:{conditions:{base:"fyvr11yj",active:"fyvr11yk",disabled:"fyvr11yl",focus:"fyvr11ym",hover:"fyvr11yn",checked:"fyvr11yo"},defaultClass:"fyvr11yj"},text80:{conditions:{base:"fyvr11yp",active:"fyvr11yq",disabled:"fyvr11yr",focus:"fyvr11ys",hover:"fyvr11yt",checked:"fyvr11yu"},defaultClass:"fyvr11yp"},text50:{conditions:{base:"fyvr11yv",active:"fyvr11yw",disabled:"fyvr11yx",focus:"fyvr11yy",hover:"fyvr11yz",checked:"fyvr11z0"},defaultClass:"fyvr11yv"},textInverse100:{conditions:{base:"fyvr11z1",active:"fyvr11z2",disabled:"fyvr11z3",focus:"fyvr11z4",hover:"fyvr11z5",checked:"fyvr11z6"},defaultClass:"fyvr11z1"},backgroundPrimary:{conditions:{base:"fyvr11z7",active:"fyvr11z8",disabled:"fyvr11z9",focus:"fyvr11za",hover:"fyvr11zb",checked:"fyvr11zc"},defaultClass:"fyvr11z7"},backgroundSecondary:{conditions:{base:"fyvr11zd",active:"fyvr11ze",disabled:"fyvr11zf",focus:"fyvr11zg",hover:"fyvr11zh",checked:"fyvr11zi"},defaultClass:"fyvr11zd"},backgroundContrast:{conditions:{base:"fyvr11zj",active:"fyvr11zk",disabled:"fyvr11zl",focus:"fyvr11zm",hover:"fyvr11zn",checked:"fyvr11zo"},defaultClass:"fyvr11zj"},backgroundMuted:{conditions:{base:"fyvr11zp",active:"fyvr11zq",disabled:"fyvr11zr",focus:"fyvr11zs",hover:"fyvr11zt",checked:"fyvr11zu"},defaultClass:"fyvr11zp"},backgroundControl:{conditions:{base:"fyvr11zv",active:"fyvr11zw",disabled:"fyvr11zx",focus:"fyvr11zy",hover:"fyvr11zz",checked:"fyvr1200"},defaultClass:"fyvr11zv"},backgroundInverse:{conditions:{base:"fyvr1201",active:"fyvr1202",disabled:"fyvr1203",focus:"fyvr1204",hover:"fyvr1205",checked:"fyvr1206"},defaultClass:"fyvr1201"},backgroundBackdrop:{conditions:{base:"fyvr1207",active:"fyvr1208",disabled:"fyvr1209",focus:"fyvr120a",hover:"fyvr120b",checked:"fyvr120c"},defaultClass:"fyvr1207"},backgroundOverlay:{conditions:{base:"fyvr120d",active:"fyvr120e",disabled:"fyvr120f",focus:"fyvr120g",hover:"fyvr120h",checked:"fyvr120i"},defaultClass:"fyvr120d"},backgroundRaised:{conditions:{base:"fyvr120j",active:"fyvr120k",disabled:"fyvr120l",focus:"fyvr120m",hover:"fyvr120n",checked:"fyvr120o"},defaultClass:"fyvr120j"},buttonGlass:{conditions:{base:"fyvr120p",active:"fyvr120q",disabled:"fyvr120r",focus:"fyvr120s",hover:"fyvr120t",checked:"fyvr120u"},defaultClass:"fyvr120p"},buttonEmphasis:{conditions:{base:"fyvr120v",active:"fyvr120w",disabled:"fyvr120x",focus:"fyvr120y",hover:"fyvr120z",checked:"fyvr1210"},defaultClass:"fyvr120v"},buttonInverse:{conditions:{base:"fyvr1211",active:"fyvr1212",disabled:"fyvr1213",focus:"fyvr1214",hover:"fyvr1215",checked:"fyvr1216"},defaultClass:"fyvr1211"},borderNormal:{conditions:{base:"fyvr1217",active:"fyvr1218",disabled:"fyvr1219",focus:"fyvr121a",hover:"fyvr121b",checked:"fyvr121c"},defaultClass:"fyvr1217"},borderFocus:{conditions:{base:"fyvr121d",active:"fyvr121e",disabled:"fyvr121f",focus:"fyvr121g",hover:"fyvr121h",checked:"fyvr121i"},defaultClass:"fyvr121d"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr121j",active:"fyvr121k",disabled:"fyvr121l",focus:"fyvr121m",hover:"fyvr121n",checked:"fyvr121o"},defaultClass:"fyvr121j"},dashed:{conditions:{base:"fyvr121p",active:"fyvr121q",disabled:"fyvr121r",focus:"fyvr121s",hover:"fyvr121t",checked:"fyvr121u"},defaultClass:"fyvr121p"},dotted:{conditions:{base:"fyvr121v",active:"fyvr121w",disabled:"fyvr121x",focus:"fyvr121y",hover:"fyvr121z",checked:"fyvr1220"},defaultClass:"fyvr121v"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr1221",active:"fyvr1222",disabled:"fyvr1223",focus:"fyvr1224",hover:"fyvr1225",checked:"fyvr1226"},defaultClass:"fyvr1221"},white:{conditions:{base:"fyvr1227",active:"fyvr1228",disabled:"fyvr1229",focus:"fyvr122a",hover:"fyvr122b",checked:"fyvr122c"},defaultClass:"fyvr1227"},inherit:{conditions:{base:"fyvr122d",active:"fyvr122e",disabled:"fyvr122f",focus:"fyvr122g",hover:"fyvr122h",checked:"fyvr122i"},defaultClass:"fyvr122d"},transparent:{conditions:{base:"fyvr122j",active:"fyvr122k",disabled:"fyvr122l",focus:"fyvr122m",hover:"fyvr122n",checked:"fyvr122o"},defaultClass:"fyvr122j"},positive:{conditions:{base:"fyvr122p",active:"fyvr122q",disabled:"fyvr122r",focus:"fyvr122s",hover:"fyvr122t",checked:"fyvr122u"},defaultClass:"fyvr122p"},negative:{conditions:{base:"fyvr122v",active:"fyvr122w",disabled:"fyvr122x",focus:"fyvr122y",hover:"fyvr122z",checked:"fyvr1230"},defaultClass:"fyvr122v"},info:{conditions:{base:"fyvr1231",active:"fyvr1232",disabled:"fyvr1233",focus:"fyvr1234",hover:"fyvr1235",checked:"fyvr1236"},defaultClass:"fyvr1231"},warning:{conditions:{base:"fyvr1237",active:"fyvr1238",disabled:"fyvr1239",focus:"fyvr123a",hover:"fyvr123b",checked:"fyvr123c"},defaultClass:"fyvr1237"},gradientBackdrop:{conditions:{base:"fyvr123d",active:"fyvr123e",disabled:"fyvr123f",focus:"fyvr123g",hover:"fyvr123h",checked:"fyvr123i"},defaultClass:"fyvr123d"},gradientPrimary:{conditions:{base:"fyvr123j",active:"fyvr123k",disabled:"fyvr123l",focus:"fyvr123m",hover:"fyvr123n",checked:"fyvr123o"},defaultClass:"fyvr123j"},gradientSecondary:{conditions:{base:"fyvr123p",active:"fyvr123q",disabled:"fyvr123r",focus:"fyvr123s",hover:"fyvr123t",checked:"fyvr123u"},defaultClass:"fyvr123p"},arbitrumDark:{conditions:{base:"fyvr123v",active:"fyvr123w",disabled:"fyvr123x",focus:"fyvr123y",hover:"fyvr123z",checked:"fyvr1240"},defaultClass:"fyvr123v"},arbitrumLight:{conditions:{base:"fyvr1241",active:"fyvr1242",disabled:"fyvr1243",focus:"fyvr1244",hover:"fyvr1245",checked:"fyvr1246"},defaultClass:"fyvr1241"},avalanceDark:{conditions:{base:"fyvr1247",active:"fyvr1248",disabled:"fyvr1249",focus:"fyvr124a",hover:"fyvr124b",checked:"fyvr124c"},defaultClass:"fyvr1247"},avalanceLight:{conditions:{base:"fyvr124d",active:"fyvr124e",disabled:"fyvr124f",focus:"fyvr124g",hover:"fyvr124h",checked:"fyvr124i"},defaultClass:"fyvr124d"},bscDark:{conditions:{base:"fyvr124j",active:"fyvr124k",disabled:"fyvr124l",focus:"fyvr124m",hover:"fyvr124n",checked:"fyvr124o"},defaultClass:"fyvr124j"},bscLight:{conditions:{base:"fyvr124p",active:"fyvr124q",disabled:"fyvr124r",focus:"fyvr124s",hover:"fyvr124t",checked:"fyvr124u"},defaultClass:"fyvr124p"},ethereumDark:{conditions:{base:"fyvr124v",active:"fyvr124w",disabled:"fyvr124x",focus:"fyvr124y",hover:"fyvr124z",checked:"fyvr1250"},defaultClass:"fyvr124v"},ethereumLight:{conditions:{base:"fyvr1251",active:"fyvr1252",disabled:"fyvr1253",focus:"fyvr1254",hover:"fyvr1255",checked:"fyvr1256"},defaultClass:"fyvr1251"},gnosisDark:{conditions:{base:"fyvr1257",active:"fyvr1258",disabled:"fyvr1259",focus:"fyvr125a",hover:"fyvr125b",checked:"fyvr125c"},defaultClass:"fyvr1257"},gnosisLight:{conditions:{base:"fyvr125d",active:"fyvr125e",disabled:"fyvr125f",focus:"fyvr125g",hover:"fyvr125h",checked:"fyvr125i"},defaultClass:"fyvr125d"},polygonDark:{conditions:{base:"fyvr125j",active:"fyvr125k",disabled:"fyvr125l",focus:"fyvr125m",hover:"fyvr125n",checked:"fyvr125o"},defaultClass:"fyvr125j"},polygonLight:{conditions:{base:"fyvr125p",active:"fyvr125q",disabled:"fyvr125r",focus:"fyvr125s",hover:"fyvr125t",checked:"fyvr125u"},defaultClass:"fyvr125p"},text100:{conditions:{base:"fyvr125v",active:"fyvr125w",disabled:"fyvr125x",focus:"fyvr125y",hover:"fyvr125z",checked:"fyvr1260"},defaultClass:"fyvr125v"},text80:{conditions:{base:"fyvr1261",active:"fyvr1262",disabled:"fyvr1263",focus:"fyvr1264",hover:"fyvr1265",checked:"fyvr1266"},defaultClass:"fyvr1261"},text50:{conditions:{base:"fyvr1267",active:"fyvr1268",disabled:"fyvr1269",focus:"fyvr126a",hover:"fyvr126b",checked:"fyvr126c"},defaultClass:"fyvr1267"},textInverse100:{conditions:{base:"fyvr126d",active:"fyvr126e",disabled:"fyvr126f",focus:"fyvr126g",hover:"fyvr126h",checked:"fyvr126i"},defaultClass:"fyvr126d"},backgroundPrimary:{conditions:{base:"fyvr126j",active:"fyvr126k",disabled:"fyvr126l",focus:"fyvr126m",hover:"fyvr126n",checked:"fyvr126o"},defaultClass:"fyvr126j"},backgroundSecondary:{conditions:{base:"fyvr126p",active:"fyvr126q",disabled:"fyvr126r",focus:"fyvr126s",hover:"fyvr126t",checked:"fyvr126u"},defaultClass:"fyvr126p"},backgroundContrast:{conditions:{base:"fyvr126v",active:"fyvr126w",disabled:"fyvr126x",focus:"fyvr126y",hover:"fyvr126z",checked:"fyvr1270"},defaultClass:"fyvr126v"},backgroundMuted:{conditions:{base:"fyvr1271",active:"fyvr1272",disabled:"fyvr1273",focus:"fyvr1274",hover:"fyvr1275",checked:"fyvr1276"},defaultClass:"fyvr1271"},backgroundControl:{conditions:{base:"fyvr1277",active:"fyvr1278",disabled:"fyvr1279",focus:"fyvr127a",hover:"fyvr127b",checked:"fyvr127c"},defaultClass:"fyvr1277"},backgroundInverse:{conditions:{base:"fyvr127d",active:"fyvr127e",disabled:"fyvr127f",focus:"fyvr127g",hover:"fyvr127h",checked:"fyvr127i"},defaultClass:"fyvr127d"},backgroundBackdrop:{conditions:{base:"fyvr127j",active:"fyvr127k",disabled:"fyvr127l",focus:"fyvr127m",hover:"fyvr127n",checked:"fyvr127o"},defaultClass:"fyvr127j"},backgroundOverlay:{conditions:{base:"fyvr127p",active:"fyvr127q",disabled:"fyvr127r",focus:"fyvr127s",hover:"fyvr127t",checked:"fyvr127u"},defaultClass:"fyvr127p"},backgroundRaised:{conditions:{base:"fyvr127v",active:"fyvr127w",disabled:"fyvr127x",focus:"fyvr127y",hover:"fyvr127z",checked:"fyvr1280"},defaultClass:"fyvr127v"},buttonGlass:{conditions:{base:"fyvr1281",active:"fyvr1282",disabled:"fyvr1283",focus:"fyvr1284",hover:"fyvr1285",checked:"fyvr1286"},defaultClass:"fyvr1281"},buttonEmphasis:{conditions:{base:"fyvr1287",active:"fyvr1288",disabled:"fyvr1289",focus:"fyvr128a",hover:"fyvr128b",checked:"fyvr128c"},defaultClass:"fyvr1287"},buttonInverse:{conditions:{base:"fyvr128d",active:"fyvr128e",disabled:"fyvr128f",focus:"fyvr128g",hover:"fyvr128h",checked:"fyvr128i"},defaultClass:"fyvr128d"},borderNormal:{conditions:{base:"fyvr128j",active:"fyvr128k",disabled:"fyvr128l",focus:"fyvr128m",hover:"fyvr128n",checked:"fyvr128o"},defaultClass:"fyvr128j"},borderFocus:{conditions:{base:"fyvr128p",active:"fyvr128q",disabled:"fyvr128r",focus:"fyvr128s",hover:"fyvr128t",checked:"fyvr128u"},defaultClass:"fyvr128p"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128v",active:"fyvr128w",disabled:"fyvr128x",focus:"fyvr128y",hover:"fyvr128z",checked:"fyvr1290"},defaultClass:"fyvr128v"},dashed:{conditions:{base:"fyvr1291",active:"fyvr1292",disabled:"fyvr1293",focus:"fyvr1294",hover:"fyvr1295",checked:"fyvr1296"},defaultClass:"fyvr1291"},dotted:{conditions:{base:"fyvr1297",active:"fyvr1298",disabled:"fyvr1299",focus:"fyvr129a",hover:"fyvr129b",checked:"fyvr129c"},defaultClass:"fyvr1297"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr129d",active:"fyvr129e",disabled:"fyvr129f",focus:"fyvr129g",hover:"fyvr129h",checked:"fyvr129i"},defaultClass:"fyvr129d"},white:{conditions:{base:"fyvr129j",active:"fyvr129k",disabled:"fyvr129l",focus:"fyvr129m",hover:"fyvr129n",checked:"fyvr129o"},defaultClass:"fyvr129j"},inherit:{conditions:{base:"fyvr129p",active:"fyvr129q",disabled:"fyvr129r",focus:"fyvr129s",hover:"fyvr129t",checked:"fyvr129u"},defaultClass:"fyvr129p"},transparent:{conditions:{base:"fyvr129v",active:"fyvr129w",disabled:"fyvr129x",focus:"fyvr129y",hover:"fyvr129z",checked:"fyvr12a0"},defaultClass:"fyvr129v"},positive:{conditions:{base:"fyvr12a1",active:"fyvr12a2",disabled:"fyvr12a3",focus:"fyvr12a4",hover:"fyvr12a5",checked:"fyvr12a6"},defaultClass:"fyvr12a1"},negative:{conditions:{base:"fyvr12a7",active:"fyvr12a8",disabled:"fyvr12a9",focus:"fyvr12aa",hover:"fyvr12ab",checked:"fyvr12ac"},defaultClass:"fyvr12a7"},info:{conditions:{base:"fyvr12ad",active:"fyvr12ae",disabled:"fyvr12af",focus:"fyvr12ag",hover:"fyvr12ah",checked:"fyvr12ai"},defaultClass:"fyvr12ad"},warning:{conditions:{base:"fyvr12aj",active:"fyvr12ak",disabled:"fyvr12al",focus:"fyvr12am",hover:"fyvr12an",checked:"fyvr12ao"},defaultClass:"fyvr12aj"},gradientBackdrop:{conditions:{base:"fyvr12ap",active:"fyvr12aq",disabled:"fyvr12ar",focus:"fyvr12as",hover:"fyvr12at",checked:"fyvr12au"},defaultClass:"fyvr12ap"},gradientPrimary:{conditions:{base:"fyvr12av",active:"fyvr12aw",disabled:"fyvr12ax",focus:"fyvr12ay",hover:"fyvr12az",checked:"fyvr12b0"},defaultClass:"fyvr12av"},gradientSecondary:{conditions:{base:"fyvr12b1",active:"fyvr12b2",disabled:"fyvr12b3",focus:"fyvr12b4",hover:"fyvr12b5",checked:"fyvr12b6"},defaultClass:"fyvr12b1"},arbitrumDark:{conditions:{base:"fyvr12b7",active:"fyvr12b8",disabled:"fyvr12b9",focus:"fyvr12ba",hover:"fyvr12bb",checked:"fyvr12bc"},defaultClass:"fyvr12b7"},arbitrumLight:{conditions:{base:"fyvr12bd",active:"fyvr12be",disabled:"fyvr12bf",focus:"fyvr12bg",hover:"fyvr12bh",checked:"fyvr12bi"},defaultClass:"fyvr12bd"},avalanceDark:{conditions:{base:"fyvr12bj",active:"fyvr12bk",disabled:"fyvr12bl",focus:"fyvr12bm",hover:"fyvr12bn",checked:"fyvr12bo"},defaultClass:"fyvr12bj"},avalanceLight:{conditions:{base:"fyvr12bp",active:"fyvr12bq",disabled:"fyvr12br",focus:"fyvr12bs",hover:"fyvr12bt",checked:"fyvr12bu"},defaultClass:"fyvr12bp"},bscDark:{conditions:{base:"fyvr12bv",active:"fyvr12bw",disabled:"fyvr12bx",focus:"fyvr12by",hover:"fyvr12bz",checked:"fyvr12c0"},defaultClass:"fyvr12bv"},bscLight:{conditions:{base:"fyvr12c1",active:"fyvr12c2",disabled:"fyvr12c3",focus:"fyvr12c4",hover:"fyvr12c5",checked:"fyvr12c6"},defaultClass:"fyvr12c1"},ethereumDark:{conditions:{base:"fyvr12c7",active:"fyvr12c8",disabled:"fyvr12c9",focus:"fyvr12ca",hover:"fyvr12cb",checked:"fyvr12cc"},defaultClass:"fyvr12c7"},ethereumLight:{conditions:{base:"fyvr12cd",active:"fyvr12ce",disabled:"fyvr12cf",focus:"fyvr12cg",hover:"fyvr12ch",checked:"fyvr12ci"},defaultClass:"fyvr12cd"},gnosisDark:{conditions:{base:"fyvr12cj",active:"fyvr12ck",disabled:"fyvr12cl",focus:"fyvr12cm",hover:"fyvr12cn",checked:"fyvr12co"},defaultClass:"fyvr12cj"},gnosisLight:{conditions:{base:"fyvr12cp",active:"fyvr12cq",disabled:"fyvr12cr",focus:"fyvr12cs",hover:"fyvr12ct",checked:"fyvr12cu"},defaultClass:"fyvr12cp"},polygonDark:{conditions:{base:"fyvr12cv",active:"fyvr12cw",disabled:"fyvr12cx",focus:"fyvr12cy",hover:"fyvr12cz",checked:"fyvr12d0"},defaultClass:"fyvr12cv"},polygonLight:{conditions:{base:"fyvr12d1",active:"fyvr12d2",disabled:"fyvr12d3",focus:"fyvr12d4",hover:"fyvr12d5",checked:"fyvr12d6"},defaultClass:"fyvr12d1"},text100:{conditions:{base:"fyvr12d7",active:"fyvr12d8",disabled:"fyvr12d9",focus:"fyvr12da",hover:"fyvr12db",checked:"fyvr12dc"},defaultClass:"fyvr12d7"},text80:{conditions:{base:"fyvr12dd",active:"fyvr12de",disabled:"fyvr12df",focus:"fyvr12dg",hover:"fyvr12dh",checked:"fyvr12di"},defaultClass:"fyvr12dd"},text50:{conditions:{base:"fyvr12dj",active:"fyvr12dk",disabled:"fyvr12dl",focus:"fyvr12dm",hover:"fyvr12dn",checked:"fyvr12do"},defaultClass:"fyvr12dj"},textInverse100:{conditions:{base:"fyvr12dp",active:"fyvr12dq",disabled:"fyvr12dr",focus:"fyvr12ds",hover:"fyvr12dt",checked:"fyvr12du"},defaultClass:"fyvr12dp"},backgroundPrimary:{conditions:{base:"fyvr12dv",active:"fyvr12dw",disabled:"fyvr12dx",focus:"fyvr12dy",hover:"fyvr12dz",checked:"fyvr12e0"},defaultClass:"fyvr12dv"},backgroundSecondary:{conditions:{base:"fyvr12e1",active:"fyvr12e2",disabled:"fyvr12e3",focus:"fyvr12e4",hover:"fyvr12e5",checked:"fyvr12e6"},defaultClass:"fyvr12e1"},backgroundContrast:{conditions:{base:"fyvr12e7",active:"fyvr12e8",disabled:"fyvr12e9",focus:"fyvr12ea",hover:"fyvr12eb",checked:"fyvr12ec"},defaultClass:"fyvr12e7"},backgroundMuted:{conditions:{base:"fyvr12ed",active:"fyvr12ee",disabled:"fyvr12ef",focus:"fyvr12eg",hover:"fyvr12eh",checked:"fyvr12ei"},defaultClass:"fyvr12ed"},backgroundControl:{conditions:{base:"fyvr12ej",active:"fyvr12ek",disabled:"fyvr12el",focus:"fyvr12em",hover:"fyvr12en",checked:"fyvr12eo"},defaultClass:"fyvr12ej"},backgroundInverse:{conditions:{base:"fyvr12ep",active:"fyvr12eq",disabled:"fyvr12er",focus:"fyvr12es",hover:"fyvr12et",checked:"fyvr12eu"},defaultClass:"fyvr12ep"},backgroundBackdrop:{conditions:{base:"fyvr12ev",active:"fyvr12ew",disabled:"fyvr12ex",focus:"fyvr12ey",hover:"fyvr12ez",checked:"fyvr12f0"},defaultClass:"fyvr12ev"},backgroundOverlay:{conditions:{base:"fyvr12f1",active:"fyvr12f2",disabled:"fyvr12f3",focus:"fyvr12f4",hover:"fyvr12f5",checked:"fyvr12f6"},defaultClass:"fyvr12f1"},backgroundRaised:{conditions:{base:"fyvr12f7",active:"fyvr12f8",disabled:"fyvr12f9",focus:"fyvr12fa",hover:"fyvr12fb",checked:"fyvr12fc"},defaultClass:"fyvr12f7"},buttonGlass:{conditions:{base:"fyvr12fd",active:"fyvr12fe",disabled:"fyvr12ff",focus:"fyvr12fg",hover:"fyvr12fh",checked:"fyvr12fi"},defaultClass:"fyvr12fd"},buttonEmphasis:{conditions:{base:"fyvr12fj",active:"fyvr12fk",disabled:"fyvr12fl",focus:"fyvr12fm",hover:"fyvr12fn",checked:"fyvr12fo"},defaultClass:"fyvr12fj"},buttonInverse:{conditions:{base:"fyvr12fp",active:"fyvr12fq",disabled:"fyvr12fr",focus:"fyvr12fs",hover:"fyvr12ft",checked:"fyvr12fu"},defaultClass:"fyvr12fp"},borderNormal:{conditions:{base:"fyvr12fv",active:"fyvr12fw",disabled:"fyvr12fx",focus:"fyvr12fy",hover:"fyvr12fz",checked:"fyvr12g0"},defaultClass:"fyvr12fv"},borderFocus:{conditions:{base:"fyvr12g1",active:"fyvr12g2",disabled:"fyvr12g3",focus:"fyvr12g4",hover:"fyvr12g5",checked:"fyvr12g6"},defaultClass:"fyvr12g1"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12g7",active:"fyvr12g8",disabled:"fyvr12g9",focus:"fyvr12ga",hover:"fyvr12gb",checked:"fyvr12gc"},defaultClass:"fyvr12g7"},dashed:{conditions:{base:"fyvr12gd",active:"fyvr12ge",disabled:"fyvr12gf",focus:"fyvr12gg",hover:"fyvr12gh",checked:"fyvr12gi"},defaultClass:"fyvr12gd"},dotted:{conditions:{base:"fyvr12gj",active:"fyvr12gk",disabled:"fyvr12gl",focus:"fyvr12gm",hover:"fyvr12gn",checked:"fyvr12go"},defaultClass:"fyvr12gj"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12gp",active:"fyvr12gq",disabled:"fyvr12gr",focus:"fyvr12gs",hover:"fyvr12gt",checked:"fyvr12gu"},defaultClass:"fyvr12gp"},white:{conditions:{base:"fyvr12gv",active:"fyvr12gw",disabled:"fyvr12gx",focus:"fyvr12gy",hover:"fyvr12gz",checked:"fyvr12h0"},defaultClass:"fyvr12gv"},inherit:{conditions:{base:"fyvr12h1",active:"fyvr12h2",disabled:"fyvr12h3",focus:"fyvr12h4",hover:"fyvr12h5",checked:"fyvr12h6"},defaultClass:"fyvr12h1"},transparent:{conditions:{base:"fyvr12h7",active:"fyvr12h8",disabled:"fyvr12h9",focus:"fyvr12ha",hover:"fyvr12hb",checked:"fyvr12hc"},defaultClass:"fyvr12h7"},positive:{conditions:{base:"fyvr12hd",active:"fyvr12he",disabled:"fyvr12hf",focus:"fyvr12hg",hover:"fyvr12hh",checked:"fyvr12hi"},defaultClass:"fyvr12hd"},negative:{conditions:{base:"fyvr12hj",active:"fyvr12hk",disabled:"fyvr12hl",focus:"fyvr12hm",hover:"fyvr12hn",checked:"fyvr12ho"},defaultClass:"fyvr12hj"},info:{conditions:{base:"fyvr12hp",active:"fyvr12hq",disabled:"fyvr12hr",focus:"fyvr12hs",hover:"fyvr12ht",checked:"fyvr12hu"},defaultClass:"fyvr12hp"},warning:{conditions:{base:"fyvr12hv",active:"fyvr12hw",disabled:"fyvr12hx",focus:"fyvr12hy",hover:"fyvr12hz",checked:"fyvr12i0"},defaultClass:"fyvr12hv"},gradientBackdrop:{conditions:{base:"fyvr12i1",active:"fyvr12i2",disabled:"fyvr12i3",focus:"fyvr12i4",hover:"fyvr12i5",checked:"fyvr12i6"},defaultClass:"fyvr12i1"},gradientPrimary:{conditions:{base:"fyvr12i7",active:"fyvr12i8",disabled:"fyvr12i9",focus:"fyvr12ia",hover:"fyvr12ib",checked:"fyvr12ic"},defaultClass:"fyvr12i7"},gradientSecondary:{conditions:{base:"fyvr12id",active:"fyvr12ie",disabled:"fyvr12if",focus:"fyvr12ig",hover:"fyvr12ih",checked:"fyvr12ii"},defaultClass:"fyvr12id"},arbitrumDark:{conditions:{base:"fyvr12ij",active:"fyvr12ik",disabled:"fyvr12il",focus:"fyvr12im",hover:"fyvr12in",checked:"fyvr12io"},defaultClass:"fyvr12ij"},arbitrumLight:{conditions:{base:"fyvr12ip",active:"fyvr12iq",disabled:"fyvr12ir",focus:"fyvr12is",hover:"fyvr12it",checked:"fyvr12iu"},defaultClass:"fyvr12ip"},avalanceDark:{conditions:{base:"fyvr12iv",active:"fyvr12iw",disabled:"fyvr12ix",focus:"fyvr12iy",hover:"fyvr12iz",checked:"fyvr12j0"},defaultClass:"fyvr12iv"},avalanceLight:{conditions:{base:"fyvr12j1",active:"fyvr12j2",disabled:"fyvr12j3",focus:"fyvr12j4",hover:"fyvr12j5",checked:"fyvr12j6"},defaultClass:"fyvr12j1"},bscDark:{conditions:{base:"fyvr12j7",active:"fyvr12j8",disabled:"fyvr12j9",focus:"fyvr12ja",hover:"fyvr12jb",checked:"fyvr12jc"},defaultClass:"fyvr12j7"},bscLight:{conditions:{base:"fyvr12jd",active:"fyvr12je",disabled:"fyvr12jf",focus:"fyvr12jg",hover:"fyvr12jh",checked:"fyvr12ji"},defaultClass:"fyvr12jd"},ethereumDark:{conditions:{base:"fyvr12jj",active:"fyvr12jk",disabled:"fyvr12jl",focus:"fyvr12jm",hover:"fyvr12jn",checked:"fyvr12jo"},defaultClass:"fyvr12jj"},ethereumLight:{conditions:{base:"fyvr12jp",active:"fyvr12jq",disabled:"fyvr12jr",focus:"fyvr12js",hover:"fyvr12jt",checked:"fyvr12ju"},defaultClass:"fyvr12jp"},gnosisDark:{conditions:{base:"fyvr12jv",active:"fyvr12jw",disabled:"fyvr12jx",focus:"fyvr12jy",hover:"fyvr12jz",checked:"fyvr12k0"},defaultClass:"fyvr12jv"},gnosisLight:{conditions:{base:"fyvr12k1",active:"fyvr12k2",disabled:"fyvr12k3",focus:"fyvr12k4",hover:"fyvr12k5",checked:"fyvr12k6"},defaultClass:"fyvr12k1"},polygonDark:{conditions:{base:"fyvr12k7",active:"fyvr12k8",disabled:"fyvr12k9",focus:"fyvr12ka",hover:"fyvr12kb",checked:"fyvr12kc"},defaultClass:"fyvr12k7"},polygonLight:{conditions:{base:"fyvr12kd",active:"fyvr12ke",disabled:"fyvr12kf",focus:"fyvr12kg",hover:"fyvr12kh",checked:"fyvr12ki"},defaultClass:"fyvr12kd"},text100:{conditions:{base:"fyvr12kj",active:"fyvr12kk",disabled:"fyvr12kl",focus:"fyvr12km",hover:"fyvr12kn",checked:"fyvr12ko"},defaultClass:"fyvr12kj"},text80:{conditions:{base:"fyvr12kp",active:"fyvr12kq",disabled:"fyvr12kr",focus:"fyvr12ks",hover:"fyvr12kt",checked:"fyvr12ku"},defaultClass:"fyvr12kp"},text50:{conditions:{base:"fyvr12kv",active:"fyvr12kw",disabled:"fyvr12kx",focus:"fyvr12ky",hover:"fyvr12kz",checked:"fyvr12l0"},defaultClass:"fyvr12kv"},textInverse100:{conditions:{base:"fyvr12l1",active:"fyvr12l2",disabled:"fyvr12l3",focus:"fyvr12l4",hover:"fyvr12l5",checked:"fyvr12l6"},defaultClass:"fyvr12l1"},backgroundPrimary:{conditions:{base:"fyvr12l7",active:"fyvr12l8",disabled:"fyvr12l9",focus:"fyvr12la",hover:"fyvr12lb",checked:"fyvr12lc"},defaultClass:"fyvr12l7"},backgroundSecondary:{conditions:{base:"fyvr12ld",active:"fyvr12le",disabled:"fyvr12lf",focus:"fyvr12lg",hover:"fyvr12lh",checked:"fyvr12li"},defaultClass:"fyvr12ld"},backgroundContrast:{conditions:{base:"fyvr12lj",active:"fyvr12lk",disabled:"fyvr12ll",focus:"fyvr12lm",hover:"fyvr12ln",checked:"fyvr12lo"},defaultClass:"fyvr12lj"},backgroundMuted:{conditions:{base:"fyvr12lp",active:"fyvr12lq",disabled:"fyvr12lr",focus:"fyvr12ls",hover:"fyvr12lt",checked:"fyvr12lu"},defaultClass:"fyvr12lp"},backgroundControl:{conditions:{base:"fyvr12lv",active:"fyvr12lw",disabled:"fyvr12lx",focus:"fyvr12ly",hover:"fyvr12lz",checked:"fyvr12m0"},defaultClass:"fyvr12lv"},backgroundInverse:{conditions:{base:"fyvr12m1",active:"fyvr12m2",disabled:"fyvr12m3",focus:"fyvr12m4",hover:"fyvr12m5",checked:"fyvr12m6"},defaultClass:"fyvr12m1"},backgroundBackdrop:{conditions:{base:"fyvr12m7",active:"fyvr12m8",disabled:"fyvr12m9",focus:"fyvr12ma",hover:"fyvr12mb",checked:"fyvr12mc"},defaultClass:"fyvr12m7"},backgroundOverlay:{conditions:{base:"fyvr12md",active:"fyvr12me",disabled:"fyvr12mf",focus:"fyvr12mg",hover:"fyvr12mh",checked:"fyvr12mi"},defaultClass:"fyvr12md"},backgroundRaised:{conditions:{base:"fyvr12mj",active:"fyvr12mk",disabled:"fyvr12ml",focus:"fyvr12mm",hover:"fyvr12mn",checked:"fyvr12mo"},defaultClass:"fyvr12mj"},buttonGlass:{conditions:{base:"fyvr12mp",active:"fyvr12mq",disabled:"fyvr12mr",focus:"fyvr12ms",hover:"fyvr12mt",checked:"fyvr12mu"},defaultClass:"fyvr12mp"},buttonEmphasis:{conditions:{base:"fyvr12mv",active:"fyvr12mw",disabled:"fyvr12mx",focus:"fyvr12my",hover:"fyvr12mz",checked:"fyvr12n0"},defaultClass:"fyvr12mv"},buttonInverse:{conditions:{base:"fyvr12n1",active:"fyvr12n2",disabled:"fyvr12n3",focus:"fyvr12n4",hover:"fyvr12n5",checked:"fyvr12n6"},defaultClass:"fyvr12n1"},borderNormal:{conditions:{base:"fyvr12n7",active:"fyvr12n8",disabled:"fyvr12n9",focus:"fyvr12na",hover:"fyvr12nb",checked:"fyvr12nc"},defaultClass:"fyvr12n7"},borderFocus:{conditions:{base:"fyvr12nd",active:"fyvr12ne",disabled:"fyvr12nf",focus:"fyvr12ng",hover:"fyvr12nh",checked:"fyvr12ni"},defaultClass:"fyvr12nd"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12nj",active:"fyvr12nk",disabled:"fyvr12nl",focus:"fyvr12nm",hover:"fyvr12nn",checked:"fyvr12no"},defaultClass:"fyvr12nj"},dashed:{conditions:{base:"fyvr12np",active:"fyvr12nq",disabled:"fyvr12nr",focus:"fyvr12ns",hover:"fyvr12nt",checked:"fyvr12nu"},defaultClass:"fyvr12np"},dotted:{conditions:{base:"fyvr12nv",active:"fyvr12nw",disabled:"fyvr12nx",focus:"fyvr12ny",hover:"fyvr12nz",checked:"fyvr12o0"},defaultClass:"fyvr12nv"}}},border:{values:{none:{conditions:{base:"fyvr12o1",active:"fyvr12o2",disabled:"fyvr12o3",focus:"fyvr12o4",hover:"fyvr12o5",checked:"fyvr12o6"},defaultClass:"fyvr12o1"}}},color:{values:{black:{conditions:{base:"fyvr12o7",active:"fyvr12o8",disabled:"fyvr12o9",focus:"fyvr12oa",hover:"fyvr12ob",checked:"fyvr12oc"},defaultClass:"fyvr12o7"},white:{conditions:{base:"fyvr12od",active:"fyvr12oe",disabled:"fyvr12of",focus:"fyvr12og",hover:"fyvr12oh",checked:"fyvr12oi"},defaultClass:"fyvr12od"},inherit:{conditions:{base:"fyvr12oj",active:"fyvr12ok",disabled:"fyvr12ol",focus:"fyvr12om",hover:"fyvr12on",checked:"fyvr12oo"},defaultClass:"fyvr12oj"},transparent:{conditions:{base:"fyvr12op",active:"fyvr12oq",disabled:"fyvr12or",focus:"fyvr12os",hover:"fyvr12ot",checked:"fyvr12ou"},defaultClass:"fyvr12op"},positive:{conditions:{base:"fyvr12ov",active:"fyvr12ow",disabled:"fyvr12ox",focus:"fyvr12oy",hover:"fyvr12oz",checked:"fyvr12p0"},defaultClass:"fyvr12ov"},negative:{conditions:{base:"fyvr12p1",active:"fyvr12p2",disabled:"fyvr12p3",focus:"fyvr12p4",hover:"fyvr12p5",checked:"fyvr12p6"},defaultClass:"fyvr12p1"},info:{conditions:{base:"fyvr12p7",active:"fyvr12p8",disabled:"fyvr12p9",focus:"fyvr12pa",hover:"fyvr12pb",checked:"fyvr12pc"},defaultClass:"fyvr12p7"},warning:{conditions:{base:"fyvr12pd",active:"fyvr12pe",disabled:"fyvr12pf",focus:"fyvr12pg",hover:"fyvr12ph",checked:"fyvr12pi"},defaultClass:"fyvr12pd"},gradientBackdrop:{conditions:{base:"fyvr12pj",active:"fyvr12pk",disabled:"fyvr12pl",focus:"fyvr12pm",hover:"fyvr12pn",checked:"fyvr12po"},defaultClass:"fyvr12pj"},gradientPrimary:{conditions:{base:"fyvr12pp",active:"fyvr12pq",disabled:"fyvr12pr",focus:"fyvr12ps",hover:"fyvr12pt",checked:"fyvr12pu"},defaultClass:"fyvr12pp"},gradientSecondary:{conditions:{base:"fyvr12pv",active:"fyvr12pw",disabled:"fyvr12px",focus:"fyvr12py",hover:"fyvr12pz",checked:"fyvr12q0"},defaultClass:"fyvr12pv"},arbitrumDark:{conditions:{base:"fyvr12q1",active:"fyvr12q2",disabled:"fyvr12q3",focus:"fyvr12q4",hover:"fyvr12q5",checked:"fyvr12q6"},defaultClass:"fyvr12q1"},arbitrumLight:{conditions:{base:"fyvr12q7",active:"fyvr12q8",disabled:"fyvr12q9",focus:"fyvr12qa",hover:"fyvr12qb",checked:"fyvr12qc"},defaultClass:"fyvr12q7"},avalanceDark:{conditions:{base:"fyvr12qd",active:"fyvr12qe",disabled:"fyvr12qf",focus:"fyvr12qg",hover:"fyvr12qh",checked:"fyvr12qi"},defaultClass:"fyvr12qd"},avalanceLight:{conditions:{base:"fyvr12qj",active:"fyvr12qk",disabled:"fyvr12ql",focus:"fyvr12qm",hover:"fyvr12qn",checked:"fyvr12qo"},defaultClass:"fyvr12qj"},bscDark:{conditions:{base:"fyvr12qp",active:"fyvr12qq",disabled:"fyvr12qr",focus:"fyvr12qs",hover:"fyvr12qt",checked:"fyvr12qu"},defaultClass:"fyvr12qp"},bscLight:{conditions:{base:"fyvr12qv",active:"fyvr12qw",disabled:"fyvr12qx",focus:"fyvr12qy",hover:"fyvr12qz",checked:"fyvr12r0"},defaultClass:"fyvr12qv"},ethereumDark:{conditions:{base:"fyvr12r1",active:"fyvr12r2",disabled:"fyvr12r3",focus:"fyvr12r4",hover:"fyvr12r5",checked:"fyvr12r6"},defaultClass:"fyvr12r1"},ethereumLight:{conditions:{base:"fyvr12r7",active:"fyvr12r8",disabled:"fyvr12r9",focus:"fyvr12ra",hover:"fyvr12rb",checked:"fyvr12rc"},defaultClass:"fyvr12r7"},gnosisDark:{conditions:{base:"fyvr12rd",active:"fyvr12re",disabled:"fyvr12rf",focus:"fyvr12rg",hover:"fyvr12rh",checked:"fyvr12ri"},defaultClass:"fyvr12rd"},gnosisLight:{conditions:{base:"fyvr12rj",active:"fyvr12rk",disabled:"fyvr12rl",focus:"fyvr12rm",hover:"fyvr12rn",checked:"fyvr12ro"},defaultClass:"fyvr12rj"},polygonDark:{conditions:{base:"fyvr12rp",active:"fyvr12rq",disabled:"fyvr12rr",focus:"fyvr12rs",hover:"fyvr12rt",checked:"fyvr12ru"},defaultClass:"fyvr12rp"},polygonLight:{conditions:{base:"fyvr12rv",active:"fyvr12rw",disabled:"fyvr12rx",focus:"fyvr12ry",hover:"fyvr12rz",checked:"fyvr12s0"},defaultClass:"fyvr12rv"},text100:{conditions:{base:"fyvr12s1",active:"fyvr12s2",disabled:"fyvr12s3",focus:"fyvr12s4",hover:"fyvr12s5",checked:"fyvr12s6"},defaultClass:"fyvr12s1"},text80:{conditions:{base:"fyvr12s7",active:"fyvr12s8",disabled:"fyvr12s9",focus:"fyvr12sa",hover:"fyvr12sb",checked:"fyvr12sc"},defaultClass:"fyvr12s7"},text50:{conditions:{base:"fyvr12sd",active:"fyvr12se",disabled:"fyvr12sf",focus:"fyvr12sg",hover:"fyvr12sh",checked:"fyvr12si"},defaultClass:"fyvr12sd"},textInverse100:{conditions:{base:"fyvr12sj",active:"fyvr12sk",disabled:"fyvr12sl",focus:"fyvr12sm",hover:"fyvr12sn",checked:"fyvr12so"},defaultClass:"fyvr12sj"},backgroundPrimary:{conditions:{base:"fyvr12sp",active:"fyvr12sq",disabled:"fyvr12sr",focus:"fyvr12ss",hover:"fyvr12st",checked:"fyvr12su"},defaultClass:"fyvr12sp"},backgroundSecondary:{conditions:{base:"fyvr12sv",active:"fyvr12sw",disabled:"fyvr12sx",focus:"fyvr12sy",hover:"fyvr12sz",checked:"fyvr12t0"},defaultClass:"fyvr12sv"},backgroundContrast:{conditions:{base:"fyvr12t1",active:"fyvr12t2",disabled:"fyvr12t3",focus:"fyvr12t4",hover:"fyvr12t5",checked:"fyvr12t6"},defaultClass:"fyvr12t1"},backgroundMuted:{conditions:{base:"fyvr12t7",active:"fyvr12t8",disabled:"fyvr12t9",focus:"fyvr12ta",hover:"fyvr12tb",checked:"fyvr12tc"},defaultClass:"fyvr12t7"},backgroundControl:{conditions:{base:"fyvr12td",active:"fyvr12te",disabled:"fyvr12tf",focus:"fyvr12tg",hover:"fyvr12th",checked:"fyvr12ti"},defaultClass:"fyvr12td"},backgroundInverse:{conditions:{base:"fyvr12tj",active:"fyvr12tk",disabled:"fyvr12tl",focus:"fyvr12tm",hover:"fyvr12tn",checked:"fyvr12to"},defaultClass:"fyvr12tj"},backgroundBackdrop:{conditions:{base:"fyvr12tp",active:"fyvr12tq",disabled:"fyvr12tr",focus:"fyvr12ts",hover:"fyvr12tt",checked:"fyvr12tu"},defaultClass:"fyvr12tp"},backgroundOverlay:{conditions:{base:"fyvr12tv",active:"fyvr12tw",disabled:"fyvr12tx",focus:"fyvr12ty",hover:"fyvr12tz",checked:"fyvr12u0"},defaultClass:"fyvr12tv"},backgroundRaised:{conditions:{base:"fyvr12u1",active:"fyvr12u2",disabled:"fyvr12u3",focus:"fyvr12u4",hover:"fyvr12u5",checked:"fyvr12u6"},defaultClass:"fyvr12u1"},buttonGlass:{conditions:{base:"fyvr12u7",active:"fyvr12u8",disabled:"fyvr12u9",focus:"fyvr12ua",hover:"fyvr12ub",checked:"fyvr12uc"},defaultClass:"fyvr12u7"},buttonEmphasis:{conditions:{base:"fyvr12ud",active:"fyvr12ue",disabled:"fyvr12uf",focus:"fyvr12ug",hover:"fyvr12uh",checked:"fyvr12ui"},defaultClass:"fyvr12ud"},buttonInverse:{conditions:{base:"fyvr12uj",active:"fyvr12uk",disabled:"fyvr12ul",focus:"fyvr12um",hover:"fyvr12un",checked:"fyvr12uo"},defaultClass:"fyvr12uj"},borderNormal:{conditions:{base:"fyvr12up",active:"fyvr12uq",disabled:"fyvr12ur",focus:"fyvr12us",hover:"fyvr12ut",checked:"fyvr12uu"},defaultClass:"fyvr12up"},borderFocus:{conditions:{base:"fyvr12uv",active:"fyvr12uw",disabled:"fyvr12ux",focus:"fyvr12uy",hover:"fyvr12uz",checked:"fyvr12v0"},defaultClass:"fyvr12uv"}}},cursor:{values:{default:{conditions:{base:"fyvr12v1",active:"fyvr12v2",disabled:"fyvr12v3",focus:"fyvr12v4",hover:"fyvr12v5",checked:"fyvr12v6"},defaultClass:"fyvr12v1"},pointer:{conditions:{base:"fyvr12v7",active:"fyvr12v8",disabled:"fyvr12v9",focus:"fyvr12va",hover:"fyvr12vb",checked:"fyvr12vc"},defaultClass:"fyvr12v7"},text:{conditions:{base:"fyvr12vd",active:"fyvr12ve",disabled:"fyvr12vf",focus:"fyvr12vg",hover:"fyvr12vh",checked:"fyvr12vi"},defaultClass:"fyvr12vd"}}},opacity:{values:{0:{conditions:{base:"fyvr12vj",active:"fyvr12vk",disabled:"fyvr12vl",focus:"fyvr12vm",hover:"fyvr12vn",checked:"fyvr12vo"},defaultClass:"fyvr12vj"},50:{conditions:{base:"fyvr12vp",active:"fyvr12vq",disabled:"fyvr12vr",focus:"fyvr12vs",hover:"fyvr12vt",checked:"fyvr12vu"},defaultClass:"fyvr12vp"},80:{conditions:{base:"fyvr12vv",active:"fyvr12vw",disabled:"fyvr12vx",focus:"fyvr12vy",hover:"fyvr12vz",checked:"fyvr12w0"},defaultClass:"fyvr12vv"},100:{conditions:{base:"fyvr12w1",active:"fyvr12w2",disabled:"fyvr12w3",focus:"fyvr12w4",hover:"fyvr12w5",checked:"fyvr12w6"},defaultClass:"fyvr12w1"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12w7",active:"fyvr12w8",disabled:"fyvr12w9",focus:"fyvr12wa",hover:"fyvr12wb",checked:"fyvr12wc"},defaultClass:"fyvr12w7"},auto:{conditions:{base:"fyvr12wd",active:"fyvr12we",disabled:"fyvr12wf",focus:"fyvr12wg",hover:"fyvr12wh",checked:"fyvr12wi"},defaultClass:"fyvr12wd"}}},outline:{values:{none:{conditions:{base:"fyvr12wj",active:"fyvr12wk",disabled:"fyvr12wl",focus:"fyvr12wm",hover:"fyvr12wn",checked:"fyvr12wo"},defaultClass:"fyvr12wj"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12wp",active:"fyvr12wq",disabled:"fyvr12wr",focus:"fyvr12ws",hover:"fyvr12wt",checked:"fyvr12wu"},defaultClass:"fyvr12wp"}}}}});const Bhe=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],K3=t=>(t.display||(t.display=Object.keys(t).some(e=>Bhe.includes(e))?"flex":void 0),$q(t));K3.properties=$q.properties;function _q(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e{const{as:r="div",sx:n={},className:s,...i}=t,o={},a={};for(const l in i)K3.properties.has(l)?o[l]=i[l]:a[l]=i[l];const c=K3({...o,...n});return p.createElement(r,{className:Ws(c,s),...a,ref:e})});var Pq={exports:{}},_h={};/** + * @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 mP;function Fhe(){if(mP)return _h;mP=1;var t=w,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,c,l){var f,u={},d=null,h=null;l!==void 0&&(d=""+l),c.key!==void 0&&(d=""+c.key),c.ref!==void 0&&(h=c.ref);for(f in c)n.call(c,f)&&!i.hasOwnProperty(f)&&(u[f]=c[f]);if(a&&a.defaultProps)for(f in c=a.defaultProps,c)u[f]===void 0&&(u[f]=c[f]);return{$$typeof:e,type:a,key:d,ref:h,props:u,_owner:s.current}}return _h.Fragment=r,_h.jsx=o,_h.jsxs=o,_h}Pq.exports=Fhe();var Z=Pq.exports;function zhe(t,e){if(typeof t!="object"||!t)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 qhe(t){var e=zhe(t,"string");return typeof e=="symbol"?e:String(e)}function Uhe(t,e,r){return e=qhe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function bP(t){for(var e=1;e{for(var n of Object.keys(t)){var s;if(t[n]!==((s=e[n])!==null&&s!==void 0?s:r[n]))return!1}return!0},Rr=t=>{var e=r=>{var n=t.defaultClassName,s=bP(bP({},t.defaultVariants),r);for(var i in s){var o,a=(o=s[i])!==null&&o!==void 0?o:t.defaultVariants[i];if(a!=null){var c=a;typeof c=="boolean"&&(c=c===!0?"true":"false");var l=t.variantClassNames[i][c];l&&(n+=" "+l)}}for(var[f,u]of t.compoundVariants)Whe(f,s,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 xP(t.variantClassNames,r=>xP(r,n=>n.split(" ")[0]))}},e};Rr({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"_2q9vfj8 _2q9vfj0 fyvr11ov",warning:"_2q9vfj9 _2q9vfj1 fyvr11p1",success:"_2q9vfja _2q9vfj2 fyvr11oj",error:"_2q9vfjb _2q9vfj3 fyvr11op"},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 Y3=t=>{const{color:e="borderNormal",marginY:r="4",...n}=t;return Z.jsx(K,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var Hhe=Rr({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 fyvr11n9 fyvr11mx"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const he=p.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:s,hidden:i,italic:o,underline:a,children:c,ellipsis:l,uppercase:f,capitalize:u,...d}=t,h=Ohe[n];return Z.jsx(K,{as:r,className:Ws(s,Hhe({hidden:i,ellipsis:l,italic:o,underline:a,uppercase:f,capitalize:u})),ref:e,...h,...d,children:c})});var Vhe=Rr({defaultClassName:"_140wn8ni _140wn8n0 fyvr11ls fyvr11m8 fyvr11n9 fyvr11ko fyvr12o1 fyvr11n2 fyvr11h0",variantClassNames:{variant:{base:"_140wn8nj _140wn8n1 fyvr11od fyvr12s1",ghost:"_140wn8nk _140wn8n2 fyvr11od fyvr12s1",feature:"_140wn8nl _140wn8n3 fyvr11pj fyvr12od",primary:"_140wn8nm _140wn8n4 fyvr11pd fyvr12od",glass:"_140wn8nn _140wn8n5 fyvr11tv fyvr12s1",emphasis:"_140wn8no _140wn8n6 fyvr11u1 fyvr12s1",raised:"_140wn8np _140wn8n7 fyvr11tp fyvr12s1",danger:"_140wn8nq _140wn8n8 fyvr11op fyvr12od",text:"_140wn8nr _1qxj1ib9 _1qxj1ibf _1qxj1ib5 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 _140wn8n9 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11od fyvr12sd"},shape:{circle:"_140wn8ns _140wn8na fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"_140wn8nt _140wn8nb fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"_140wn8nu _140wn8nc fyvr12v1 fyvr12vp",false:"_140wn8nv _140wn8nd fyvr12v7 fyvr12w1 fyvr12vz"},size:{xs:"_140wn8nw _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc _140wn8ne fyvr1ws fyvr1yo",sm:"_140wn8nx _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8nf fyvr1ww fyvr1ys",md:"_140wn8ny _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8ng fyvr1x0 fyvr1yw",lg:"_140wn8nz _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8nh fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8n10"},hasLeftIcon:{true:"_140wn8n11"},hasRightIcon:{true:"_140wn8n12"},activeOutline:{light:"_140wn8n13",bold:"_140wn8n14"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8n15"],[{iconOnly:!0,size:"sm"},"_140wn8n16"],[{iconOnly:!0,size:"md"},"_140wn8n17"],[{iconOnly:!0,size:"lg"},"_140wn8n18"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n19"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n1a"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n1b"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n1c"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n1d"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n1e"]]});const bt=p.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:s,disabled:i=!1,display:o="inline-flex",fontWeight:a="bold",pending:c=!1,label:l,leftIcon:f,rightIcon:u,size:d="md",variant:h="glass",width:v="fit",shape:y="circle",type:m="button",...g}=t,b=f!==void 0&&l!==void 0,x=u!==void 0&&l!==void 0,k=f!==void 0&&l===void 0,$=d==="xs"?"xs":"sm";return Z.jsx(K,{as:r,className:Ws(s,Vhe({activeOutline:n,disabled:i||c,hasLeftIcon:b,hasRightIcon:x,iconOnly:k,size:h==="text"?void 0:d,shape:h==="text"?void 0:y,variant:h})),disabled:i||c,display:o,fontWeight:a,ref:e,type:m,width:v,...g,children:k?Z.jsx(f,{size:$}):Z.jsxs(K,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[Z.jsxs(K,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[f&&Z.jsx(f,{size:$}),Z.jsx(he,{children:l})]}),u&&Z.jsx(u,{size:$})]})})});var Ghe=Rr({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"rhmai64 rhmai60 fyvr12vz fyvr12v7"},disabled:{true:"rhmai65"},outlined:{true:"rhmai66 rhmai61 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12n7 fyvr12fv fyvr1217 fyvr128j fyvr12nj fyvr12g7 fyvr121j fyvr128v"},blur:{true:"rhmai67 rhmai62 fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const Pa=p.forwardRef((t,e)=>{const{className:r,children:n,clickable:s,outlined:i,disabled:o,blur:a,width:c="full",...l}=t;return Z.jsx(K,{className:Ws(r,Ghe({clickable:s,outlined:i,disabled:o,blur:a})),background:i?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:c,ref:e,...l,children:n})});function Bt(){return Bt=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>Khe(r,e))}function hr(...t){return p.useCallback(Iq(...t),t)}function Bn(t,e=[]){let r=[];function n(i,o){const a=p.createContext(o),c=r.length;r=[...r,o];function l(u){const{scope:d,children:h,...v}=u,y=(d==null?void 0:d[t][c])||a,m=p.useMemo(()=>v,Object.values(v));return p.createElement(y.Provider,{value:m},h)}function f(u,d){const h=(d==null?void 0:d[t][c])||a,v=p.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,f]}const s=()=>{const i=r.map(o=>p.createContext(o));return function(a){const c=(a==null?void 0:a[t])||i;return p.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return s.scopeName=t,[n,Yhe(s,...e)]}function Yhe(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:c,scopeName:l})=>{const u=c(i)[`__scope${l}`];return{...a,...u}},{});return p.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Me(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function pi(t){const e=p.useRef(t);return p.useEffect(()=>{e.current=t}),p.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function ll({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=Qhe({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=pi(r),c=p.useCallback(l=>{if(i){const u=typeof l=="function"?l(t):l;u!==t&&a(u)}else s(l)},[i,t,s,a]);return[o,c]}function Qhe({defaultProp:t,onChange:e}){const r=p.useState(t),[n]=r,s=p.useRef(n),i=pi(e);return p.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}function ix(t){const e=p.useRef({value:t,previous:t});return p.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const mi=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{};function ox(t){const[e,r]=p.useState(void 0);return mi(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.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 Jhe(t,e){return p.useReducer((r,n)=>{const s=e[r][n];return s??r},t)}const Rl=t=>{const{present:e,children:r}=t,n=Xhe(e),s=typeof r=="function"?r({present:n.isPresent}):p.Children.only(r),i=hr(n.ref,s.ref);return typeof r=="function"||n.isPresent?p.cloneElement(s,{ref:i}):null};Rl.displayName="Presence";function Xhe(t){const[e,r]=p.useState(),n=p.useRef({}),s=p.useRef(t),i=p.useRef("none"),o=t?"mounted":"unmounted",[a,c]=Jhe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const l=wp(n.current);i.current=a==="mounted"?l:"none"},[a]),mi(()=>{const l=n.current,f=s.current;if(f!==t){const d=i.current,h=wp(l);t?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),mi(()=>{if(e){const l=u=>{const h=wp(n.current).includes(u.animationName);u.target===e&&h&&bn.flushSync(()=>c("ANIMATION_END"))},f=u=>{u.target===e&&(i.current=wp(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:p.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function wp(t){return(t==null?void 0:t.animationName)||"none"}function Ve(){return Ve=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,s=p.Children.toArray(r),i=s.find(e0e);if(i){const o=i.props.children,a=s.map(c=>c===i?p.Children.count(o)>1?p.Children.only(null):p.isValidElement(o)?o.props.children:null:c);return p.createElement(Q3,Ve({},n,{ref:e}),p.isValidElement(o)?p.cloneElement(o,void 0,a):null)}return p.createElement(Q3,Ve({},n,{ref:e}),r)});s1.displayName="Slot";const Q3=p.forwardRef((t,e)=>{const{children:r,...n}=t;return p.isValidElement(r)?p.cloneElement(r,{...t0e(n,r.props),ref:e?Iq(e,r.ref):r.ref}):p.Children.count(r)>1?p.Children.only(null):null});Q3.displayName="SlotClone";const Zhe=({children:t})=>p.createElement(p.Fragment,null,t);function e0e(t){return p.isValidElement(t)&&t.type===Zhe}function t0e(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}const r0e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ht=r0e.reduce((t,e)=>{const r=p.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?s1:e;return p.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),p.createElement(a,Bt({},o,{ref:s}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function m7(t,e){t&&bn.flushSync(()=>t.dispatchEvent(e))}const Tq="Checkbox",[n0e,WBe]=Bn(Tq),[s0e,i0e]=n0e(Tq),o0e=p.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:c="on",onCheckedChange:l,...f}=t,[u,d]=p.useState(null),h=hr(e,x=>d(x)),v=p.useRef(!1),y=u?!!u.closest("form"):!0,[m=!1,g]=ll({prop:s,defaultProp:i,onChange:l}),b=p.useRef(m);return p.useEffect(()=>{const x=u==null?void 0:u.form;if(x){const k=()=>g(b.current);return x.addEventListener("reset",k),()=>x.removeEventListener("reset",k)}},[u,g]),p.createElement(s0e,{scope:r,state:m,disabled:a},p.createElement(ht.button,Bt({type:"button",role:"checkbox","aria-checked":Sf(m)?"mixed":m,"aria-required":o,"data-state":Oq(m),"data-disabled":a?"":void 0,disabled:a,value:c},f,{ref:h,onKeyDown:Me(t.onKeyDown,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:Me(t.onClick,x=>{g(k=>Sf(k)?!0:!k),y&&(v.current=x.isPropagationStopped(),v.current||x.stopPropagation())})})),y&&p.createElement(l0e,{control:u,bubbles:!v.current,name:n,value:c,checked:m,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),a0e="CheckboxIndicator",c0e=p.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,i=i0e(a0e,r);return p.createElement(Rl,{present:n||Sf(i.state)||i.state===!0},p.createElement(ht.span,Bt({"data-state":Oq(i.state),"data-disabled":i.disabled?"":void 0},s,{ref:e,style:{pointerEvents:"none",...t.style}})))}),l0e=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=p.useRef(null),o=ix(r),a=ox(e);return p.useEffect(()=>{const c=i.current,l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});c.indeterminate=Sf(r),u.call(c,Sf(r)?!1:r),c.dispatchEvent(d)}},[o,r,n]),p.createElement("input",Bt({type:"checkbox","aria-hidden":!0,defaultChecked:Sf(r)?!1:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Sf(t){return t==="indeterminate"}function Oq(t){return Sf(t)?"indeterminate":t?"checked":"unchecked"}const f0e=o0e,u0e=c0e;var d0e=Rr({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 su=t=>{const{id:e,label:r,description:n,labelLocation:s="top",children:i,...o}=t,a=()=>r||n?Z.jsxs(K,{flexDirection:"column",gap:"0.5",children:[r&&Z.jsx(he,{variant:"small",color:"text100",hidden:s==="hidden",children:r}),n&&Z.jsx(he,{variant:"small",color:"text50",hidden:s==="hidden",children:n})]}):null;return Z.jsxs(K,{as:"label",className:d0e({labelLocation:s}),htmlFor:e,...o,children:[["left","top","hidden"].includes(s)&&a(),i,s==="right"&&a()]})};var Mr=Rr({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const h0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.168 9.25V2.929h-1.5V9.25h-6.32v1.5h6.32v6.321h1.5V10.75h6.321v-1.5h-6.32Z",clipRule:"evenodd"})}),v0e=({size:t="sm",...e})=>Z.jsx(K,{as:h0e,className:Mr({size:t}),...e}),y0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.888 14.47 1.06 1.06L17.48 10l-5.53-5.53-1.06 1.06 3.719 3.72H4.418v1.5h10.19l-3.72 3.72Z",clipRule:"evenodd"})}),J3=({size:t="sm",...e})=>Z.jsx(K,{as:y0e,className:Mr({size:t}),...e}),p0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),R1=({size:t="sm",...e})=>Z.jsx(K,{as:p0e,className:Mr({size:t}),...e}),m0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.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"})}),Rq=({size:t="sm",...e})=>Z.jsx(K,{as:m0e,className:Mr({size:t}),...e}),g0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m12.888 3.47 1.06 1.06L8.48 10l5.47 5.47-1.061 1.06L6.358 10l6.53-6.53Z",clipRule:"evenodd"})}),g7=({size:t="sm",...e})=>Z.jsx(K,{as:g0e,className:Mr({size:t}),...e}),b0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m7.949 16.53-1.061-1.06 5.47-5.47-5.47-5.47 1.06-1.06L14.48 10l-6.53 6.53Z",clipRule:"evenodd"})}),Kc=({size:t="sm",...e})=>Z.jsx(K,{as:b0e,className:Mr({size:t}),...e}),x0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.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"})}),iu=({size:t="sm",...e})=>Z.jsx(K,{as:x0e,className:Mr({size:t}),...e}),w0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.918 4.5h-6V6h4.5v6.5h1.5v-8Zm-1.5 9.5v3h-9V6h3V3h9v11h-3Zm-7.5 1.5v-8h6v8h-6Z",clipRule:"evenodd"})}),ax=({size:t="sm",...e})=>Z.jsx(K,{as:w0e,className:Mr({size:t}),...e}),C0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M5 6.714 3.618 3.547H2.5L4.158 7.02H2.98v.69h1.494v.663H2.981v.69h1.494v1.484h1.036V9.063h1.46v-.69h-1.46v-.66l.001-.003h1.46v-.69h-1.13L7.5 3.547H6.383L5 6.714Zm4.747 8.232v-.788a2.887 2.887 0 0 1-1.04-.249 2.04 2.04 0 0 1-.863-.727 2.213 2.213 0 0 1-.344-1.125h1.017c.02.26.098.476.236.65.14.171.319.299.535.383.144.054.297.09.46.109V10.81l-.319-.093c-.538-.157-.964-.388-1.28-.693-.312-.304-.469-.707-.469-1.209 0-.415.105-.777.315-1.086.21-.31.495-.55.853-.72.273-.133.573-.215.9-.246v-.817h.537v.81c.365.023.692.106.981.249.35.17.626.406.827.706.201.298.306.64.315 1.027h-.978a1.04 1.04 0 0 0-.433-.774 1.47 1.47 0 0 0-.712-.264v2.253l.283.079c.214.056.434.132.659.228a2.6 2.6 0 0 1 .627.38c.192.157.347.351.466.583.12.232.18.51.18.834 0 .407-.098.77-.295 1.086a2.006 2.006 0 0 1-.85.749c-.304.15-.66.239-1.07.265v.79h-.538Zm1.024-1.877c-.148.064-.31.106-.486.128v-2.23c.216.064.41.136.584.218.193.089.345.201.457.337.113.136.17.31.17.524 0 .234-.065.44-.194.615-.129.174-.306.31-.531.408ZM9.747 7.706v2.095a4.605 4.605 0 0 1-.246-.086 2.195 2.195 0 0 1-.4-.207 1.038 1.038 0 0 1-.299-.313.847.847 0 0 1-.111-.443.94.94 0 0 1 .164-.545c.112-.162.268-.288.47-.38.126-.059.267-.099.422-.12Zm7.677 10.086h-4.9v-.897h.34a.342.342 0 0 0 .29-.186c.068-.117.114-.254.137-.411.023-.16.032-.304.028-.432l-.027-.779H12.5v-.896h.76l-.043-1.262c-.018-.472.073-.866.273-1.183.203-.317.473-.555.809-.715.335-.16.697-.24 1.084-.24.346 0 .656.056.931.166.278.11.511.26.7.452.191.188.328.404.41.647.081.243.097.498.048.766l-1.01-.156c.023-.22-.014-.403-.11-.55a.891.891 0 0 0-.395-.33 1.31 1.31 0 0 0-1.102.024c-.177.09-.322.227-.434.411-.11.185-.164.42-.164.708l.048 1.261h1.649v.897H14.34l.029.752c.014.29-.025.55-.116.78-.04.1-.096.193-.166.276h3.337v.897Z",clipRule:"evenodd"})}),E0e=({size:t="sm",...e})=>Z.jsx(K,{as:C0e,className:Mr({size:t}),...e}),k0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.jsx("path",{fill:"currentColor",d:"m5.285 12.883 6.53-6.53 2.254 2.253-6.531 6.531-2.878.618.625-2.872ZM14.674 8.001l-2.253-2.253 1.502-1.503L16.176 6.5 14.674 8Z"})}),S0e=({size:t="sm",...e})=>Z.jsx(K,{as:k0e,className:Mr({size:t}),...e}),A0e=t=>Z.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[Z.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,d:"M10.906 8.966c1.459 1.316 1.459 3.45 0 4.765l-2.53 2.282c-1.459 1.316-3.824 1.316-5.282 0-1.459-1.315-1.459-3.449 0-4.764l1.265-1.142"}),Z.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,d:"M8.094 11c-1.459-1.316-1.459-3.449 0-4.765l2.53-2.282c1.459-1.316 3.823-1.316 5.282 0s1.459 3.449 0 4.765l-1.265 1.14"})]}),$0e=({size:t="sm",...e})=>Z.jsx(K,{as:A0e,className:Mr({size:t}),...e}),_0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.918 14.994v.752A7.003 7.003 0 0 1 6.968 5.05a7.003 7.003 0 0 1 8.95-.796v.752a4.979 4.979 0 0 0-3.293 1.459 5 5 0 0 0 3.293 8.53Zm-4.353-.398c.329.329.684.615 1.059.859a5.5 5.5 0 1 1 0-10.91 6.5 6.5 0 0 0-1.06 10.051Z",clipRule:"evenodd"})}),P0e=({size:t="sm",...e})=>Z.jsx(K,{as:_0e,className:Mr({size:t}),...e}),I0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.283 6.175a4.643 4.643 0 1 0-6.566 6.567l-.708.707a5.644 5.644 0 1 1 7.982 0l-.708-.707a4.644 4.644 0 0 0 0-6.567Zm-5.097 1.47a2.565 2.565 0 0 1 3.628 3.627l.707.707a3.565 3.565 0 1 0-5.042 0l.707-.707a2.565 2.565 0 0 1 0-3.627ZM10 10.959a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm0 .667-1.5 6h3l-1.5-6Z",clipRule:"evenodd"})}),T0e=({size:t="sm",...e})=>Z.jsx(K,{as:I0e,className:Mr({size:t}),...e}),O0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.418 3.6h-2.5v2.5h2.5V3.6Zm0-1.5h1.5v5.5h-5.5V2.1h4Zm0 12h-2.5v2.5h2.5v-2.5Zm0-1.5h1.5v5.5h-5.5v-5.5h4Zm8-9h2.5v2.5h-2.5V3.6Zm4-1.5h-5.5v5.5h5.5V2.1Zm-1.5 12h-2.5v2.5h2.5v-2.5Zm0-1.5h1.5v5.5h-5.5v-5.5h4ZM9.668 2.1v7.25h-7.25v1.5h8.75V2.1h-1.5Zm1.5 10.5v5.5h-1.5v-5.5h1.5Zm1.75-1.75h5.5v-1.5h-5.5v1.5Z",clipRule:"evenodd"})}),R0e=({size:t="sm",...e})=>Z.jsx(K,{as:O0e,className:Mr({size:t}),...e}),M0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.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"})}),cx=({size:t="sm",...e})=>Z.jsx(K,{as:M0e,className:Mr({size:t}),...e}),N0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.529 15.925 9.419 11 4.493 8.89 2.418 8l2.142-.714 11.08-3.693L17.418 3l-.593 1.779-3.693 11.08L12.418 18l-.89-2.075Zm-1.71-6.386L6.635 8.175l6.82-2.273-3.638 3.637Zm1.06 1.061 1.364 3.183 2.273-6.82L10.88 10.6Z",clipRule:"evenodd"})}),lx=({size:t="sm",...e})=>Z.jsx(K,{as:N0e,className:Mr({size:t}),...e}),j0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.775 5.204a5.465 5.465 0 0 0-1.341-.537L11 2.5H9l-.443 2.214c-.444.128-.866.31-1.257.54L5.404 3.99 3.99 5.404l1.283 1.925c-.212.38-.38.787-.497 1.216L2.5 9v2l2.276.455c.118.429.285.836.497 1.216L3.99 14.596l1.414 1.414L7.3 14.746c.391.23.813.412 1.257.54L9 17.5h2l.434-2.167c.474-.12.925-.302 1.341-.537l1.821 1.214 1.414-1.414-1.195-1.793c.253-.427.45-.891.581-1.382L17.5 11V9l-2.104-.42a5.467 5.467 0 0 0-.581-1.383l1.195-1.793-1.414-1.414-1.82 1.214Zm-.59 2.692a2.976 2.976 0 1 0-4.208 4.208 2.976 2.976 0 0 0 4.209-4.208Z",clipRule:"evenodd"})}),Mq=({size:t="sm",...e})=>Z.jsx(K,{as:j0e,className:Mr({size:t}),...e}),D0e=t=>Z.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[Z.jsx("path",{fill:"currentColor",d:"M4 6.234a.5.5 0 0 0-.5.5v8a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5V10.5L14 9v5.734a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h5.769l-1.516 1.5H4Z"}),Z.jsx("path",{stroke:"currentColor",strokeWidth:1.25,d:"M11 3h5v5"}),Z.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m16 3-8 8"})]}),L0e=({size:t="sm",...e})=>Z.jsx(K,{as:D0e,className:Mr({size:t}),...e}),B0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.418 3.25h-5.75v13.5h5.75v-1.5h-4.25V4.75h4.25v-1.5Zm4.53 11.28-1.06-1.06 2.72-2.72h-8.19v-1.5h8.19l-2.72-2.72 1.06-1.06L18.48 10l-4.53 4.53Z",clipRule:"evenodd"})}),Nq=({size:t="sm",...e})=>Z.jsx(K,{as:B0e,className:Mr({size:t}),...e}),F0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.539 10.75H4.298v-1.5h12.24v1.5Z",clipRule:"evenodd"})}),z0e=({size:t="sm",...e})=>Z.jsx(K,{as:F0e,className:Mr({size:t}),...e}),q0e=t=>Z.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[Z.jsx("path",{fill:"currentColor",d:"M4.633 10.75a5.878 5.878 0 0 1 .008-1.5H2.202v1.5h2.431ZM5.814 6.456A5.854 5.854 0 0 1 6.88 5.401L5.139 3.66l-1.06 1.06 1.735 1.736ZM4.078 15.28l1.711-1.711c.306.398.662.755 1.058 1.063L5.14 16.34l-1.06-1.06ZM9.668 15.802v2.414h1.5V15.8a5.876 5.876 0 0 1-1.5.003ZM13.98 14.623l1.718 1.717 1.06-1.06-1.721-1.723c-.305.4-.66.758-1.056 1.066ZM16.184 10.75h2.45v-1.5h-2.457a5.882 5.882 0 0 1 .007 1.5ZM15.012 6.467l1.747-1.747-1.061-1.06-1.75 1.75c.399.305.756.66 1.064 1.057ZM11.168 4.258V1.784h-1.5v2.472a5.875 5.875 0 0 1 1.5.002Z"}),Z.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.418 12.504a2.504 2.504 0 1 0 0-5.008 2.504 2.504 0 0 0 0 5.008Zm0 1.5a4.004 4.004 0 1 0 0-8.008 4.004 4.004 0 0 0 0 8.008Z",clipRule:"evenodd"})]}),U0e=({size:t="sm",...e})=>Z.jsx(K,{as:q0e,className:Mr({size:t}),...e}),W0e=t=>Z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Z.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"})}),jq=({size:t="sm",...e})=>Z.jsx(K,{as:W0e,className:Mr({size:t}),...e});var H0e=Rr({defaultClassName:"_1c9x66f1 _1c9x66f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12nd fyvr12g1 fyvr121d fyvr128p fyvr12nj fyvr12g7 fyvr121j fyvr128v fyvr11h0 fyvr11ko fyvr11jg fyvr11od fyvr12w1 fyvr12vz fyvr12vr fyvr12v7 fyvr12v3",variantClassNames:{size:{sm:"_1c9x66f2",lg:"_1c9x66f3"}},defaultVariants:{},compoundVariants:[]}),V0e="_1c9x66f4 fyvr12s1 fyvr11h0 fyvr11ko fyvr11jg fyvr128 fyvr15o";const G0e=({size:t="sm"})=>Z.jsx(u0e,{className:V0e,children:Z.jsx(R1,{size:t==="lg"?"sm":"xs"})});p.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:s,label:i="",labelLocation:o="left",size:a="sm",...c}=t;return Z.jsx(su,{disabled:r,display:"flex",id:n??s,label:i,labelLocation:o,whiteSpace:"nowrap",children:Z.jsx(f0e,{className:H0e({size:a}),disabled:r,id:n??s,name:s,ref:e,...c,children:Z.jsx(G0e,{size:a})})})});w.createContext(null);const K0e=PE.useId||(()=>{});let Y0e=0;function Yc(t){const[e,r]=p.useState(K0e());return mi(()=>{t||r(n=>n??String(Y0e++))},[t]),t||(e?`radix-${e}`:"")}const Dq="Collapsible",[Q0e,HBe]=Bn(Dq);Q0e(Dq);function fx(t){const e=t+"CollectionProvider",[r,n]=Bn(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:v,children:y}=h,m=w.useRef(null),g=w.useRef(new Map).current;return w.createElement(s,{scope:v,itemMap:g,collectionRef:m},y)},a=t+"CollectionSlot",c=w.forwardRef((h,v)=>{const{scope:y,children:m}=h,g=i(a,y),b=hr(v,g.collectionRef);return w.createElement(s1,{ref:b},m)}),l=t+"CollectionItemSlot",f="data-radix-collection-item",u=w.forwardRef((h,v)=>{const{scope:y,children:m,...g}=h,b=w.useRef(null),x=hr(v,b),k=i(l,y);return w.useEffect(()=>(k.itemMap.set(b,{ref:b,...g}),()=>void k.itemMap.delete(b))),w.createElement(s1,{[f]:"",ref:x},m)});function d(h){const v=i(t+"CollectionConsumer",h);return w.useCallback(()=>{const m=v.collectionRef.current;if(!m)return[];const g=Array.from(m.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((k,$)=>g.indexOf(k.ref.current)-g.indexOf($.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:c,ItemSlot:u},d,n]}const J0e=p.createContext(void 0);function ux(t){const e=p.useContext(J0e);return t||e||"ltr"}function X0e(t,e=globalThis==null?void 0:globalThis.document){const r=pi(t);p.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const X3="dismissableLayer.update",Z0e="dismissableLayer.pointerDownOutside",eve="dismissableLayer.focusOutside";let wP;const tve=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),b7=p.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:c,...l}=t,f=p.useContext(tve),[u,d]=p.useState(null),h=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,v]=p.useState({}),y=hr(e,D=>d(D)),m=Array.from(f.layers),[g]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(g),x=u?m.indexOf(u):-1,k=f.layersWithOutsidePointerEventsDisabled.size>0,$=x>=b,I=rve(D=>{const H=D.target,G=[...f.branches].some(V=>V.contains(H));!$||G||(i==null||i(D),a==null||a(D),D.defaultPrevented||c==null||c())},h),M=nve(D=>{const H=D.target;[...f.branches].some(V=>V.contains(H))||(o==null||o(D),a==null||a(D),D.defaultPrevented||c==null||c())},h);return X0e(D=>{x===f.layers.size-1&&(s==null||s(D),!D.defaultPrevented&&c&&(D.preventDefault(),c()))},h),p.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(wP=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),CP(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=wP)}},[u,h,n,f]),p.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),CP())},[u,f]),p.useEffect(()=>{const D=()=>v({});return document.addEventListener(X3,D),()=>document.removeEventListener(X3,D)},[]),p.createElement(ht.div,Ve({},l,{ref:y,style:{pointerEvents:k?$?"auto":"none":void 0,...t.style},onFocusCapture:Me(t.onFocusCapture,M.onFocusCapture),onBlurCapture:Me(t.onBlurCapture,M.onBlurCapture),onPointerDownCapture:Me(t.onPointerDownCapture,I.onPointerDownCapture)}))});function rve(t,e=globalThis==null?void 0:globalThis.document){const r=pi(t),n=p.useRef(!1),s=p.useRef(()=>{});return p.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let c=function(){Lq(Z0e,r,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function nve(t,e=globalThis==null?void 0:globalThis.document){const r=pi(t),n=p.useRef(!1);return p.useEffect(()=>{const s=i=>{i.target&&!n.current&&Lq(eve,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function CP(){const t=new CustomEvent(X3);document.dispatchEvent(t)}function Lq(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?m7(s,i):s.dispatchEvent(i)}const sve=b7;let G5=0;function Bq(){p.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:EP()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:EP()),G5++,()=>{G5===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),G5--}},[])}function EP(){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 K5="focusScope.autoFocusOnMount",Y5="focusScope.autoFocusOnUnmount",kP={bubbles:!1,cancelable:!0},Fq=p.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,c]=p.useState(null),l=pi(s),f=pi(i),u=p.useRef(null),d=hr(e,y=>c(y)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){let y=function(x){if(h.paused||!a)return;const k=x.target;a.contains(k)?u.current=k:pc(u.current,{select:!0})},m=function(x){if(h.paused||!a)return;const k=x.relatedTarget;k!==null&&(a.contains(k)||pc(u.current,{select:!0}))},g=function(x){if(document.activeElement===document.body)for(const $ of x)$.removedNodes.length>0&&pc(a)};document.addEventListener("focusin",y),document.addEventListener("focusout",m);const b=new MutationObserver(g);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",m),b.disconnect()}}},[n,a,h.paused]),p.useEffect(()=>{if(a){AP.add(h);const y=document.activeElement;if(!a.contains(y)){const g=new CustomEvent(K5,kP);a.addEventListener(K5,l),a.dispatchEvent(g),g.defaultPrevented||(ive(fve(zq(a)),{select:!0}),document.activeElement===y&&pc(a))}return()=>{a.removeEventListener(K5,l),setTimeout(()=>{const g=new CustomEvent(Y5,kP);a.addEventListener(Y5,f),a.dispatchEvent(g),g.defaultPrevented||pc(y??document.body,{select:!0}),a.removeEventListener(Y5,f),AP.remove(h)},0)}}},[a,l,f,h]);const v=p.useCallback(y=>{if(!r&&!n||h.paused)return;const m=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,g=document.activeElement;if(m&&g){const b=y.currentTarget,[x,k]=ove(b);x&&k?!y.shiftKey&&g===k?(y.preventDefault(),r&&pc(x,{select:!0})):y.shiftKey&&g===x&&(y.preventDefault(),r&&pc(k,{select:!0})):g===b&&y.preventDefault()}},[r,n,h.paused]);return p.createElement(ht.div,Ve({tabIndex:-1},o,{ref:d,onKeyDown:v}))});function ive(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(pc(n,{select:e}),document.activeElement!==r)return}function ove(t){const e=zq(t),r=SP(e,t),n=SP(e.reverse(),t);return[r,n]}function zq(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function SP(t,e){for(const r of t)if(!ave(r,{upTo:e}))return r}function ave(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 cve(t){return t instanceof HTMLInputElement&&"select"in t}function pc(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&cve(t)&&e&&t.select()}}const AP=lve();function lve(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=$P(t,e),t.unshift(e)},remove(e){var r;t=$P(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function $P(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function fve(t){return t.filter(e=>e.tagName!=="A")}const uve=["top","right","bottom","left"],fl=Math.min,Ss=Math.max,fb=Math.round,Cp=Math.floor,ul=t=>({x:t,y:t}),dve={left:"right",right:"left",bottom:"top",top:"bottom"},hve={start:"end",end:"start"};function Z3(t,e,r){return Ss(t,fl(e,r))}function Ia(t,e){return typeof t=="function"?t(e):t}function Ta(t){return t.split("-")[0]}function M1(t){return t.split("-")[1]}function x7(t){return t==="x"?"y":"x"}function w7(t){return t==="y"?"height":"width"}function N1(t){return["top","bottom"].includes(Ta(t))?"y":"x"}function C7(t){return x7(N1(t))}function vve(t,e,r){r===void 0&&(r=!1);const n=M1(t),s=C7(t),i=w7(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=ub(o)),[o,ub(o)]}function yve(t){const e=ub(t);return[e8(t),e,e8(e)]}function e8(t){return t.replace(/start|end/g,e=>hve[e])}function pve(t,e,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?s:n:e?n:s;case"left":case"right":return e?i:o;default:return[]}}function mve(t,e,r,n){const s=M1(t);let i=pve(Ta(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(e8)))),i}function ub(t){return t.replace(/left|right|bottom|top/g,e=>dve[e])}function gve(t){return{top:0,right:0,bottom:0,left:0,...t}}function qq(t){return typeof t!="number"?gve(t):{top:t,right:t,bottom:t,left:t}}function db(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function _P(t,e,r){let{reference:n,floating:s}=t;const i=N1(e),o=C7(e),a=w7(o),c=Ta(e),l=i==="y",f=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,d=n[a]/2-s[a]/2;let h;switch(c){case"top":h={x:f,y:n.y-s.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-s.width,y:u};break;default:h={x:n.x,y:n.y}}switch(M1(e)){case"start":h[o]-=d*(r&&l?-1:1);break;case"end":h[o]+=d*(r&&l?-1:1);break}return h}const bve=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=_P(l,n,c),d=n,h={},v=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:c}=e,{element:l,padding:f=0}=Ia(t,e)||{};if(l==null)return{};const u=qq(f),d={x:r,y:n},h=C7(s),v=w7(h),y=await o.getDimensions(l),m=h==="y",g=m?"top":"left",b=m?"bottom":"right",x=m?"clientHeight":"clientWidth",k=i.reference[v]+i.reference[h]-d[h]-i.floating[v],$=d[h]-i.reference[h],I=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let M=I?I[x]:0;(!M||!await(o.isElement==null?void 0:o.isElement(I)))&&(M=a.floating[x]||i.floating[v]);const D=k/2-$/2,H=M/2-y[v]/2-1,G=fl(u[g],H),V=fl(u[b],H),Q=G,F=M-y[v]-V,C=M/2-y[v]/2+D,S=Z3(Q,C,F),T=!c.arrow&&M1(s)!=null&&C!=S&&i.reference[v]/2-(CQ<=0)){var H,G;const Q=(((H=i.flip)==null?void 0:H.index)||0)+1,F=$[Q];if(F)return{data:{index:Q,overflows:D},reset:{placement:F}};let C=(G=D.filter(S=>S.overflows[0]<=0).sort((S,T)=>S.overflows[1]-T.overflows[1])[0])==null?void 0:G.placement;if(!C)switch(h){case"bestFit":{var V;const S=(V=D.map(T=>[T.placement,T.overflows.filter(R=>R>0).reduce((R,A)=>R+A,0)]).sort((T,R)=>T[1]-R[1])[0])==null?void 0:V[0];S&&(C=S);break}case"initialPlacement":C=a;break}if(s!==C)return{reset:{placement:C}}}return{}}}};function IP(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function TP(t){return uve.some(e=>t[e]>=0)}const wve=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=Ia(t,e);switch(n){case"referenceHidden":{const i=await dv(e,{...s,elementContext:"reference"}),o=IP(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:TP(o)}}}case"escaped":{const i=await dv(e,{...s,altBoundary:!0}),o=IP(i,r.floating);return{data:{escapedOffsets:o,escaped:TP(o)}}}default:return{}}}}};async function Cve(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Ta(r),a=M1(r),c=N1(r)==="y",l=["left","top"].includes(o)?-1:1,f=i&&c?-1:1,u=Ia(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),c?{x:h*f,y:d*l}:{x:d*l,y:h*f}}const Eve=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,s=await Cve(e,t);return{x:r+s.x,y:n+s.y,data:s}}}},kve=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:m=>{let{x:g,y:b}=m;return{x:g,y:b}}},...c}=Ia(t,e),l={x:r,y:n},f=await dv(e,c),u=N1(Ta(s)),d=x7(u);let h=l[d],v=l[u];if(i){const m=d==="y"?"top":"left",g=d==="y"?"bottom":"right",b=h+f[m],x=h-f[g];h=Z3(b,h,x)}if(o){const m=u==="y"?"top":"left",g=u==="y"?"bottom":"right",b=v+f[m],x=v-f[g];v=Z3(b,v,x)}const y=a.fn({...e,[d]:h,[u]:v});return{...y,data:{x:y.x-r,y:y.y-n}}}}},Sve=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Ia(t,e),f={x:r,y:n},u=N1(s),d=x7(u);let h=f[d],v=f[u];const y=Ia(a,e),m=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const x=d==="y"?"height":"width",k=i.reference[d]-i.floating[x]+m.mainAxis,$=i.reference[d]+i.reference[x]-m.mainAxis;h$&&(h=$)}if(l){var g,b;const x=d==="y"?"width":"height",k=["top","left"].includes(Ta(s)),$=i.reference[u]-i.floating[x]+(k&&((g=o.offset)==null?void 0:g[u])||0)+(k?0:m.crossAxis),I=i.reference[u]+i.reference[x]+(k?0:((b=o.offset)==null?void 0:b[u])||0)-(k?m.crossAxis:0);v<$?v=$:v>I&&(v=I)}return{[d]:h,[u]:v}}}},Ave=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=Ia(t,e),c=await dv(e,a),l=Ta(r),f=M1(r),u=N1(r)==="y",{width:d,height:h}=n.floating;let v,y;l==="top"||l==="bottom"?(v=l,y=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=l,v=f==="end"?"top":"bottom");const m=h-c[v],g=d-c[y],b=!e.middlewareData.shift;let x=m,k=g;if(u){const I=d-c.left-c.right;k=f||b?fl(g,I):I}else{const I=h-c.top-c.bottom;x=f||b?fl(m,I):I}if(b&&!f){const I=Ss(c.left,0),M=Ss(c.right,0),D=Ss(c.top,0),H=Ss(c.bottom,0);u?k=d-2*(I!==0||M!==0?I+M:Ss(c.left,c.right)):x=h-2*(D!==0||H!==0?D+H:Ss(c.top,c.bottom))}await o({...e,availableWidth:k,availableHeight:x});const $=await s.getDimensions(i.floating);return d!==$.width||h!==$.height?{reset:{rects:!0}}:{}}}};function dl(t){return Uq(t)?(t.nodeName||"").toLowerCase():"#document"}function Os(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ec(t){var e;return(e=(Uq(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Uq(t){return t instanceof Node||t instanceof Os(t).Node}function Oa(t){return t instanceof Element||t instanceof Os(t).Element}function qo(t){return t instanceof HTMLElement||t instanceof Os(t).HTMLElement}function OP(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Os(t).ShadowRoot}function py(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=gi(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function $ve(t){return["table","td","th"].includes(dl(t))}function E7(t){const e=k7(),r=gi(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 _ve(t){let e=i1(t);for(;qo(e)&&!dx(e);){if(E7(e))return e;e=i1(e)}return null}function k7(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function dx(t){return["html","body","#document"].includes(dl(t))}function gi(t){return Os(t).getComputedStyle(t)}function hx(t){return Oa(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function i1(t){if(dl(t)==="html")return t;const e=t.assignedSlot||t.parentNode||OP(t)&&t.host||ec(t);return OP(e)?e.host:e}function Wq(t){const e=i1(t);return dx(e)?t.ownerDocument?t.ownerDocument.body:t.body:qo(e)&&py(e)?e:Wq(e)}function hv(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=Wq(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=Os(s);return i?e.concat(o,o.visualViewport||[],py(s)?s:[],o.frameElement&&r?hv(o.frameElement):[]):e.concat(s,hv(s,[],r))}function Hq(t){const e=gi(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=qo(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=fb(r)!==i||fb(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function S7(t){return Oa(t)?t:t.contextElement}function Od(t){const e=S7(t);if(!qo(e))return ul(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=Hq(e);let o=(i?fb(r.width):r.width)/n,a=(i?fb(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const Pve=ul(0);function Vq(t){const e=Os(t);return!k7()||!e.visualViewport?Pve:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ive(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Os(t)?!1:e}function Wf(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=S7(t);let o=ul(1);e&&(n?Oa(n)&&(o=Od(n)):o=Od(t));const a=Ive(i,r,n)?Vq(i):ul(0);let c=(s.left+a.x)/o.x,l=(s.top+a.y)/o.y,f=s.width/o.x,u=s.height/o.y;if(i){const d=Os(i),h=n&&Oa(n)?Os(n):n;let v=d.frameElement;for(;v&&n&&h!==d;){const y=Od(v),m=v.getBoundingClientRect(),g=gi(v),b=m.left+(v.clientLeft+parseFloat(g.paddingLeft))*y.x,x=m.top+(v.clientTop+parseFloat(g.paddingTop))*y.y;c*=y.x,l*=y.y,f*=y.x,u*=y.y,c+=b,l+=x,v=Os(v).frameElement}}return db({width:f,height:u,x:c,y:l})}function Tve(t){let{rect:e,offsetParent:r,strategy:n}=t;const s=qo(r),i=ec(r);if(r===i)return e;let o={scrollLeft:0,scrollTop:0},a=ul(1);const c=ul(0);if((s||!s&&n!=="fixed")&&((dl(r)!=="body"||py(i))&&(o=hx(r)),qo(r))){const l=Wf(r);a=Od(r),c.x=l.x+r.clientLeft,c.y=l.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+c.x,y:e.y*a.y-o.scrollTop*a.y+c.y}}function Ove(t){return Array.from(t.getClientRects())}function Gq(t){return Wf(ec(t)).left+hx(t).scrollLeft}function Rve(t){const e=ec(t),r=hx(t),n=t.ownerDocument.body,s=Ss(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Ss(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Gq(t);const a=-r.scrollTop;return gi(n).direction==="rtl"&&(o+=Ss(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function Mve(t,e){const r=Os(t),n=ec(t),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,c=0;if(s){i=s.width,o=s.height;const l=k7();(!l||l&&e==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:a,y:c}}function Nve(t,e){const r=Wf(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=qo(t)?Od(t):ul(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,c=s*i.x,l=n*i.y;return{width:o,height:a,x:c,y:l}}function RP(t,e,r){let n;if(e==="viewport")n=Mve(t,r);else if(e==="document")n=Rve(ec(t));else if(Oa(e))n=Nve(e,r);else{const s=Vq(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return db(n)}function Kq(t,e){const r=i1(t);return r===e||!Oa(r)||dx(r)?!1:gi(r).position==="fixed"||Kq(r,e)}function jve(t,e){const r=e.get(t);if(r)return r;let n=hv(t,[],!1).filter(a=>Oa(a)&&dl(a)!=="body"),s=null;const i=gi(t).position==="fixed";let o=i?i1(t):t;for(;Oa(o)&&!dx(o);){const a=gi(o),c=E7(o);!c&&a.position==="fixed"&&(s=null),(i?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||py(o)&&!c&&Kq(t,o))?n=n.filter(f=>f!==o):s=a,o=i1(o)}return e.set(t,n),n}function Dve(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?jve(e,this._c):[].concat(r),n],a=o[0],c=o.reduce((l,f)=>{const u=RP(e,f,s);return l.top=Ss(u.top,l.top),l.right=fl(u.right,l.right),l.bottom=fl(u.bottom,l.bottom),l.left=Ss(u.left,l.left),l},RP(e,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Lve(t){return Hq(t)}function Bve(t,e,r){const n=qo(e),s=ec(e),i=r==="fixed",o=Wf(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=ul(0);if(n||!n&&!i)if((dl(e)!=="body"||py(s))&&(a=hx(e)),n){const l=Wf(e,!0,i,e);c.x=l.x+e.clientLeft,c.y=l.y+e.clientTop}else s&&(c.x=Gq(s));return{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function MP(t,e){return!qo(t)||gi(t).position==="fixed"?null:e?e(t):t.offsetParent}function Yq(t,e){const r=Os(t);if(!qo(t))return r;let n=MP(t,e);for(;n&&$ve(n)&&gi(n).position==="static";)n=MP(n,e);return n&&(dl(n)==="html"||dl(n)==="body"&&gi(n).position==="static"&&!E7(n))?r:n||_ve(t)||r}const Fve=async function(t){let{reference:e,floating:r,strategy:n}=t;const s=this.getOffsetParent||Yq,i=this.getDimensions;return{reference:Bve(e,await s(r),n),floating:{x:0,y:0,...await i(r)}}};function zve(t){return gi(t).direction==="rtl"}const qve={convertOffsetParentRelativeRectToViewportRelativeRect:Tve,getDocumentElement:ec,getClippingRect:Dve,getOffsetParent:Yq,getElementRects:Fve,getClientRects:Ove,getDimensions:Lve,getScale:Od,isElement:Oa,isRTL:zve};function Uve(t,e){let r=null,n;const s=ec(t);function i(){clearTimeout(n),r&&r.disconnect(),r=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:f,width:u,height:d}=t.getBoundingClientRect();if(a||e(),!u||!d)return;const h=Cp(f),v=Cp(s.clientWidth-(l+u)),y=Cp(s.clientHeight-(f+d)),m=Cp(l),b={rootMargin:-h+"px "+-v+"px "+-y+"px "+-m+"px",threshold:Ss(0,fl(1,c))||1};let x=!0;function k($){const I=$[0].intersectionRatio;if(I!==c){if(!x)return o();I?o(!1,I):n=setTimeout(()=>{o(!1,1e-7)},100)}x=!1}try{r=new IntersectionObserver(k,{...b,root:s.ownerDocument})}catch{r=new IntersectionObserver(k,b)}r.observe(t)}return o(!0),i}function Wve(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=S7(t),f=s||i?[...l?hv(l):[],...hv(e)]:[];f.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const u=l&&a?Uve(l,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(g=>{let[b]=g;b&&b.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(e)})),r()}),l&&!c&&h.observe(l),h.observe(e));let v,y=c?Wf(t):null;c&&m();function m(){const g=Wf(t);y&&(g.x!==y.x||g.y!==y.y||g.width!==y.width||g.height!==y.height)&&r(),y=g,v=requestAnimationFrame(m)}return r(),()=>{f.forEach(g=>{s&&g.removeEventListener("scroll",r),i&&g.removeEventListener("resize",r)}),u&&u(),h&&h.disconnect(),h=null,c&&cancelAnimationFrame(v)}}const Hve=(t,e,r)=>{const n=new Map,s={platform:qve,...r},i={...s.platform,_c:n};return bve(t,e,{...s,platform:i})},Vve=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?PP({element:n.current,padding:s}).fn(r):{}:n?PP({element:n,padding:s}).fn(r):{}}}};var Tm=typeof document<"u"?p.useLayoutEffect:p.useEffect;function hb(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,s;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(!hb(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!hb(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function Qq(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function NP(t,e){const r=Qq(t);return Math.round(e*r)/r}function jP(t){const e=p.useRef(t);return Tm(()=>{e.current=t}),e}function Gve(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=t,[f,u]=p.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=p.useState(n);hb(d,n)||h(n);const[v,y]=p.useState(null),[m,g]=p.useState(null),b=p.useCallback(T=>{T!=I.current&&(I.current=T,y(T))},[y]),x=p.useCallback(T=>{T!==M.current&&(M.current=T,g(T))},[g]),k=i||v,$=o||m,I=p.useRef(null),M=p.useRef(null),D=p.useRef(f),H=jP(c),G=jP(s),V=p.useCallback(()=>{if(!I.current||!M.current)return;const T={placement:e,strategy:r,middleware:d};G.current&&(T.platform=G.current),Hve(I.current,M.current,T).then(R=>{const A={...R,isPositioned:!0};Q.current&&!hb(D.current,A)&&(D.current=A,bn.flushSync(()=>{u(A)}))})},[d,e,r,G]);Tm(()=>{l===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,u(T=>({...T,isPositioned:!1})))},[l]);const Q=p.useRef(!1);Tm(()=>(Q.current=!0,()=>{Q.current=!1}),[]),Tm(()=>{if(k&&(I.current=k),$&&(M.current=$),k&&$){if(H.current)return H.current(k,$,V);V()}},[k,$,V,H]);const F=p.useMemo(()=>({reference:I,floating:M,setReference:b,setFloating:x}),[b,x]),C=p.useMemo(()=>({reference:k,floating:$}),[k,$]),S=p.useMemo(()=>{const T={position:r,left:0,top:0};if(!C.floating)return T;const R=NP(C.floating,f.x),A=NP(C.floating,f.y);return a?{...T,transform:"translate("+R+"px, "+A+"px)",...Qq(C.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:A}},[r,a,C.floating,f.x,f.y]);return p.useMemo(()=>({...f,update:V,refs:F,elements:C,floatingStyles:S}),[f,V,F,C,S])}const Jq="Popper",[Xq,j1]=Bn(Jq),[Kve,Zq]=Xq(Jq),Yve=t=>{const{__scopePopper:e,children:r}=t,[n,s]=p.useState(null);return p.createElement(Kve,{scope:e,anchor:n,onAnchorChange:s},r)},Qve="PopperAnchor",Jve=p.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=Zq(Qve,r),o=p.useRef(null),a=hr(e,o);return p.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:p.createElement(ht.div,Ve({},s,{ref:a}))}),eU="PopperContent",[Xve,VBe]=Xq(eU),Zve=p.forwardRef((t,e)=>{var r,n,s,i,o,a,c,l;const{__scopePopper:f,side:u="bottom",sideOffset:d=0,align:h="center",alignOffset:v=0,arrowPadding:y=0,avoidCollisions:m=!0,collisionBoundary:g=[],collisionPadding:b=0,sticky:x="partial",hideWhenDetached:k=!1,updatePositionStrategy:$="optimized",onPlaced:I,...M}=t,D=Zq(eU,f),[H,G]=p.useState(null),V=hr(e,pe=>G(pe)),[Q,F]=p.useState(null),C=ox(Q),S=(r=C==null?void 0:C.width)!==null&&r!==void 0?r:0,T=(n=C==null?void 0:C.height)!==null&&n!==void 0?n:0,R=u+(h!=="center"?"-"+h:""),A=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},N=Array.isArray(g)?g:[g],B=N.length>0,P={padding:A,boundary:N.filter(eye),altBoundary:B},{refs:E,floatingStyles:L,placement:q,isPositioned:_,middlewareData:U}=Gve({strategy:"fixed",placement:R,whileElementsMounted:(...pe)=>Wve(...pe,{animationFrame:$==="always"}),elements:{reference:D.anchor},middleware:[Eve({mainAxis:d+T,alignmentAxis:v}),m&&kve({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?Sve():void 0,...P}),m&&xve({...P}),Ave({...P,apply:({elements:pe,rects:$e,availableWidth:Se,availableHeight:_e})=>{const{width:Ye,height:it}=$e.reference,ze=pe.floating.style;ze.setProperty("--radix-popper-available-width",`${Se}px`),ze.setProperty("--radix-popper-available-height",`${_e}px`),ze.setProperty("--radix-popper-anchor-width",`${Ye}px`),ze.setProperty("--radix-popper-anchor-height",`${it}px`)}}),Q&&Vve({element:Q,padding:y}),tye({arrowWidth:S,arrowHeight:T}),k&&wve({strategy:"referenceHidden",...P})]}),[W,J]=tU(q),X=pi(I);mi(()=>{_&&(X==null||X())},[_,X]);const re=(s=U.arrow)===null||s===void 0?void 0:s.x,ee=(i=U.arrow)===null||i===void 0?void 0:i.y,se=((o=U.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[xe,de]=p.useState();return mi(()=>{H&&de(window.getComputedStyle(H).zIndex)},[H]),p.createElement("div",{ref:E.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:_?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[(a=U.transformOrigin)===null||a===void 0?void 0:a.x,(c=U.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:t.dir},p.createElement(Xve,{scope:f,placedSide:W,onArrowChange:F,arrowX:re,arrowY:ee,shouldHideArrow:se},p.createElement(ht.div,Ve({"data-side":W,"data-align":J},M,{ref:V,style:{...M.style,animation:_?void 0:"none",opacity:(l=U.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))});function eye(t){return t!==null}const tye=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s,i,o;const{placement:a,rects:c,middlewareData:l}=e,u=((r=l.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[v,y]=tU(a),m={start:"0%",center:"50%",end:"100%"}[y],g=((n=(s=l.arrow)===null||s===void 0?void 0:s.x)!==null&&n!==void 0?n:0)+d/2,b=((i=(o=l.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+h/2;let x="",k="";return v==="bottom"?(x=u?m:`${g}px`,k=`${-h}px`):v==="top"?(x=u?m:`${g}px`,k=`${c.floating.height+h}px`):v==="right"?(x=`${-h}px`,k=u?m:`${b}px`):v==="left"&&(x=`${c.floating.width+h}px`,k=u?m:`${b}px`),{data:{x,y:k}}}});function tU(t){const[e,r="center"]=t.split("-");return[e,r]}const rye=Yve,nye=Jve,sye=Zve,rU=p.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...s}=t;return n?GN.createPortal(p.createElement(ht.div,Ve({},s,{ref:e})),n):null}),Q5="rovingFocusGroup.onEntryFocus",iye={bubbles:!1,cancelable:!0},A7="RovingFocusGroup",[t8,nU,oye]=fx(A7),[aye,D1]=Bn(A7,[oye]),[cye,lye]=aye(A7),fye=p.forwardRef((t,e)=>p.createElement(t8.Provider,{scope:t.__scopeRovingFocusGroup},p.createElement(t8.Slot,{scope:t.__scopeRovingFocusGroup},p.createElement(uye,Bt({},t,{ref:e}))))),uye=p.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:l,...f}=t,u=p.useRef(null),d=hr(e,u),h=ux(i),[v=null,y]=ll({prop:o,defaultProp:a,onChange:c}),[m,g]=p.useState(!1),b=pi(l),x=nU(r),k=p.useRef(!1),[$,I]=p.useState(0);return p.useEffect(()=>{const M=u.current;if(M)return M.addEventListener(Q5,b),()=>M.removeEventListener(Q5,b)},[b]),p.createElement(cye,{scope:r,orientation:n,dir:h,loop:s,currentTabStopId:v,onItemFocus:p.useCallback(M=>y(M),[y]),onItemShiftTab:p.useCallback(()=>g(!0),[]),onFocusableItemAdd:p.useCallback(()=>I(M=>M+1),[]),onFocusableItemRemove:p.useCallback(()=>I(M=>M-1),[])},p.createElement(ht.div,Bt({tabIndex:m||$===0?-1:0,"data-orientation":n},f,{ref:d,style:{outline:"none",...t.style},onMouseDown:Me(t.onMouseDown,()=>{k.current=!0}),onFocus:Me(t.onFocus,M=>{const D=!k.current;if(M.target===M.currentTarget&&D&&!m){const H=new CustomEvent(Q5,iye);if(M.currentTarget.dispatchEvent(H),!H.defaultPrevented){const G=x().filter(S=>S.focusable),V=G.find(S=>S.active),Q=G.find(S=>S.id===v),C=[V,Q,...G].filter(Boolean).map(S=>S.ref.current);sU(C)}}k.current=!1}),onBlur:Me(t.onBlur,()=>g(!1))})))}),dye="RovingFocusGroupItem",hye=p.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=t,a=Yc(),c=i||a,l=lye(dye,r),f=l.currentTabStopId===c,u=nU(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=l;return p.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),p.createElement(t8.ItemSlot,{scope:r,id:c,focusable:n,active:s},p.createElement(ht.span,Bt({tabIndex:f?0:-1,"data-orientation":l.orientation},o,{ref:e,onMouseDown:Me(t.onMouseDown,v=>{n?l.onItemFocus(c):v.preventDefault()}),onFocus:Me(t.onFocus,()=>l.onItemFocus(c)),onKeyDown:Me(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){l.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=pye(v,l.orientation,l.dir);if(y!==void 0){v.preventDefault();let g=u().filter(b=>b.focusable).map(b=>b.ref.current);if(y==="last")g.reverse();else if(y==="prev"||y==="next"){y==="prev"&&g.reverse();const b=g.indexOf(v.currentTarget);g=l.loop?mye(g,b+1):g.slice(b+1)}setTimeout(()=>sU(g))}})})))}),vye={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function yye(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function pye(t,e,r){const n=yye(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return vye[n]}function sU(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function mye(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const iU=fye,$7=hye;var gye=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Su=new WeakMap,Ep=new WeakMap,kp={},J5=0,oU=function(t){return t&&(t.host||oU(t.parentNode))},bye=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=oU(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})},xye=function(t,e,r,n){var s=bye(e,Array.isArray(t)?t:[t]);kp[r]||(kp[r]=new WeakMap);var i=kp[r],o=[],a=new Set,c=new Set(s),l=function(u){!u||a.has(u)||(a.add(u),l(u.parentNode))};s.forEach(l);var f=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else{var h=d.getAttribute(n),v=h!==null&&h!=="false",y=(Su.get(d)||0)+1,m=(i.get(d)||0)+1;Su.set(d,y),i.set(d,m),o.push(d),y===1&&v&&Ep.set(d,!0),m===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}})};return f(e),a.clear(),J5++,function(){o.forEach(function(u){var d=Su.get(u)-1,h=i.get(u)-1;Su.set(u,d),i.set(u,h),d||(Ep.has(u)||u.removeAttribute(n),Ep.delete(u)),h||u.removeAttribute(r)}),J5--,J5||(Su=new WeakMap,Su=new WeakMap,Ep=new WeakMap,kp={})}},aU=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=e||gye(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),xye(n,s,r,"aria-hidden")):function(){return null}},Eo=function(){return Eo=Object.assign||function(e){for(var r,n=1,s=arguments.length;n"u")return Dye;var e=Lye(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])}},Fye=uU(),zye=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + .`.concat(Cye,` { + 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(s,`px; + padding-top: `).concat(i,`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(Om,` { + right: `).concat(a,"px ").concat(n,`; + } + + .`).concat(Rm,` { + margin-right: `).concat(a,"px ").concat(n,`; + } + + .`).concat(Om," .").concat(Om,` { + right: 0 `).concat(n,`; + } + + .`).concat(Rm," .").concat(Rm,` { + margin-right: 0 `).concat(n,`; + } + + body { + `).concat(Eye,": ").concat(a,`px; + } +`)},qye=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n,i=p.useMemo(function(){return Bye(s)},[s]);return p.createElement(Fye,{styles:zye(i,!e,s,r?"":"!important")})},r8=!1;if(typeof window<"u")try{var Sp=Object.defineProperty({},"passive",{get:function(){return r8=!0,!0}});window.addEventListener("test",Sp,Sp),window.removeEventListener("test",Sp,Sp)}catch{r8=!1}var Au=r8?{passive:!1}:!1,Uye=function(t){return t.tagName==="TEXTAREA"},dU=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!Uye(t)&&r[e]==="visible")},Wye=function(t){return dU(t,"overflowY")},Hye=function(t){return dU(t,"overflowX")},DP=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=hU(t,r);if(n){var s=vU(t,r),i=s[1],o=s[2];if(i>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},Vye=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},Gye=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},hU=function(t,e){return t==="v"?Wye(e):Hye(e)},vU=function(t,e){return t==="v"?Vye(e):Gye(e)},Kye=function(t,e){return t==="h"&&e==="rtl"?-1:1},Yye=function(t,e,r,n,s){var i=Kye(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,c=e.contains(a),l=!1,f=o>0,u=0,d=0;do{var h=vU(t,a),v=h[0],y=h[1],m=h[2],g=y-m-i*v;(v||g)&&hU(t,a)&&(u+=g,d+=v),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(f&&(s&&u===0||!s&&o>u)||!f&&(s&&d===0||!s&&-o>d))&&(l=!0),l},Ap=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},LP=function(t){return[t.deltaX,t.deltaY]},BP=function(t){return t&&"current"in t?t.current:t},Qye=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Jye=function(t){return` + .block-interactivity-`.concat(t,` {pointer-events: none;} + .allow-interactivity-`).concat(t,` {pointer-events: all;} +`)},Xye=0,$u=[];function Zye(t){var e=p.useRef([]),r=p.useRef([0,0]),n=p.useRef(),s=p.useState(Xye++)[0],i=p.useState(function(){return uU()})[0],o=p.useRef(t);p.useEffect(function(){o.current=t},[t]),p.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=wye([t.lockRef.current],(t.shards||[]).map(BP),!0).filter(Boolean);return y.forEach(function(m){return m.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=p.useCallback(function(y,m){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var g=Ap(y),b=r.current,x="deltaX"in y?y.deltaX:b[0]-g[0],k="deltaY"in y?y.deltaY:b[1]-g[1],$,I=y.target,M=Math.abs(x)>Math.abs(k)?"h":"v";if("touches"in y&&M==="h"&&I.type==="range")return!1;var D=DP(M,I);if(!D)return!0;if(D?$=M:($=M==="v"?"h":"v",D=DP(M,I)),!D)return!1;if(!n.current&&"changedTouches"in y&&(x||k)&&(n.current=$),!$)return!0;var H=n.current||$;return Yye(H,m,y,H==="h"?x:k,!0)},[]),c=p.useCallback(function(y){var m=y;if(!(!$u.length||$u[$u.length-1]!==i)){var g="deltaY"in m?LP(m):Ap(m),b=e.current.filter(function($){return $.name===m.type&&$.target===m.target&&Qye($.delta,g)})[0];if(b&&b.should){m.cancelable&&m.preventDefault();return}if(!b){var x=(o.current.shards||[]).map(BP).filter(Boolean).filter(function($){return $.contains(m.target)}),k=x.length>0?a(m,x[0]):!o.current.noIsolation;k&&m.cancelable&&m.preventDefault()}}},[]),l=p.useCallback(function(y,m,g,b){var x={name:y,delta:m,target:g,should:b};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(k){return k!==x})},1)},[]),f=p.useCallback(function(y){r.current=Ap(y),n.current=void 0},[]),u=p.useCallback(function(y){l(y.type,LP(y),y.target,a(y,t.lockRef.current))},[]),d=p.useCallback(function(y){l(y.type,Ap(y),y.target,a(y,t.lockRef.current))},[]);p.useEffect(function(){return $u.push(i),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Au),document.addEventListener("touchmove",c,Au),document.addEventListener("touchstart",f,Au),function(){$u=$u.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Au),document.removeEventListener("touchmove",c,Au),document.removeEventListener("touchstart",f,Au)}},[]);var h=t.removeScrollBar,v=t.inert;return p.createElement(p.Fragment,null,v?p.createElement(i,{styles:Jye(s)}):null,h?p.createElement(qye,{gapMode:"margin"}):null)}const epe=Iye(fU,Zye);var yU=p.forwardRef(function(t,e){return p.createElement(vx,Eo({},t,{ref:e,sideCar:epe}))});yU.classNames=vx.classNames;const pU=yU,tpe=["Enter"," "],yx="Menu",[rpe,GBe,npe]=fx(yx),[ou,mU]=Bn(yx,[npe,j1,D1]);j1();const spe=D1();ou(yx);const[KBe,ipe]=ou(yx),ope="MenuPortal";ou(ope,{forceMount:void 0});const ape="MenuContent",[YBe,gU]=ou(ape),n8="MenuItem",FP="menu.itemSelect",bU=p.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...s}=t,i=p.useRef(null),o=ipe(n8,t.__scopeMenu),a=gU(n8,t.__scopeMenu),c=hr(e,i),l=p.useRef(!1),f=()=>{const u=i.current;if(!r&&u){const d=new CustomEvent(FP,{bubbles:!0,cancelable:!0});u.addEventListener(FP,h=>n==null?void 0:n(h),{once:!0}),m7(u,d),d.defaultPrevented?l.current=!1:o.onClose()}};return p.createElement(cpe,Ve({},s,{ref:c,disabled:r,onClick:Me(t.onClick,f),onPointerDown:u=>{var d;(d=t.onPointerDown)===null||d===void 0||d.call(t,u),l.current=!0},onPointerUp:Me(t.onPointerUp,u=>{var d;l.current||(d=u.currentTarget)===null||d===void 0||d.click()}),onKeyDown:Me(t.onKeyDown,u=>{const d=a.searchRef.current!=="";r||d&&u.key===" "||tpe.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),cpe=p.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=t,o=gU(n8,r),a=spe(r),c=p.useRef(null),l=hr(e,c),[f,u]=p.useState(!1),[d,h]=p.useState("");return p.useEffect(()=>{const v=c.current;if(v){var y;h(((y=v.textContent)!==null&&y!==void 0?y:"").trim())}},[i.children]),p.createElement(rpe.ItemSlot,{scope:r,disabled:n,textValue:s??d},p.createElement($7,Ve({asChild:!0},a,{focusable:!n}),p.createElement(ht.div,Ve({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},i,{ref:l,onPointerMove:Me(t.onPointerMove,zP(v=>{n?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus())})),onPointerLeave:Me(t.onPointerLeave,zP(v=>o.onItemLeave(v))),onFocus:Me(t.onFocus,()=>u(!0)),onBlur:Me(t.onBlur,()=>u(!1))}))))}),lpe=p.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...s}=t;return p.createElement(wU,{scope:t.__scopeMenu,checked:r},p.createElement(bU,Ve({role:"menuitemcheckbox","aria-checked":vb(r)?"mixed":r},s,{ref:e,"data-state":_7(r),onSelect:Me(s.onSelect,()=>n==null?void 0:n(vb(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),fpe="MenuRadioGroup",[QBe,upe]=ou(fpe,{value:void 0,onValueChange:()=>{}}),dpe="MenuRadioItem",hpe=p.forwardRef((t,e)=>{const{value:r,...n}=t,s=upe(dpe,t.__scopeMenu),i=r===s.value;return p.createElement(wU,{scope:t.__scopeMenu,checked:i},p.createElement(bU,Ve({role:"menuitemradio","aria-checked":i},n,{ref:e,"data-state":_7(i),onSelect:Me(n.onSelect,()=>{var o;return(o=s.onValueChange)===null||o===void 0?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})))}),xU="MenuItemIndicator",[wU,vpe]=ou(xU,{checked:!1}),ype=p.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...s}=t,i=vpe(xU,r);return p.createElement(Rl,{present:n||vb(i.checked)||i.checked===!0},p.createElement(ht.span,Ve({},s,{ref:e,"data-state":_7(i.checked)})))}),ppe="MenuSub";ou(ppe);function vb(t){return t==="indeterminate"}function _7(t){return vb(t)?"indeterminate":t?"checked":"unchecked"}function zP(t){return e=>e.pointerType==="mouse"?t(e):void 0}const mpe=lpe,gpe=hpe,bpe=ype,CU="DropdownMenu",[xpe,JBe]=Bn(CU,[mU]),P7=mU();xpe(CU);const wpe=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=P7(r);return p.createElement(mpe,Ve({},s,n,{ref:e}))}),Cpe=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=P7(r);return p.createElement(gpe,Ve({},s,n,{ref:e}))}),Epe=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=P7(r);return p.createElement(bpe,Ve({},s,n,{ref:e}))}),kpe=wpe,Spe=Cpe,EU=Epe;var kU="_1k2mbvi4 _1k2mbvi3 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12ws fyvr12wm fyvr11h0 fyvr11ko fyvr11jw fyvr12v7 fyvr11n4 fyvr11hw fyvr12s7",SU="_1k2mbvi5";const Ape=({children:t})=>Z.jsx(EU,{className:SU,children:t});p.forwardRef(({className:t,children:e,...r},n)=>Z.jsxs(kpe,{className:Ws(kU,t),...r,ref:n,children:[Z.jsx(Ape,{children:Z.jsx(R1,{size:"xs"})}),Z.jsx(he,{variant:"small",children:e})]}));p.forwardRef(({className:t,children:e,...r},n)=>Z.jsxs(Spe,{className:Ws(kU,t),...r,ref:n,children:[Z.jsx(EU,{className:SU,children:Z.jsx(he,{children:"•"})}),Z.jsx(he,{variant:"small",children:e})]}));const Uo=p.forwardRef((t,e)=>{const{icon:r,size:n="md",...s}=t;return Z.jsx(bt,{leftIcon:r,size:n,flexShrink:"0",ref:e,...s})}),$pe=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var _pe="_1hq71vk1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _1hq71vk0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12n7 fyvr12fv fyvr1217 fyvr128j fyvr12np fyvr12gd fyvr121p fyvr1291 fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",Ppe=Rr({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:[]}),Ipe="_1hq71vka _1hq71vk9 fyvr12wp fyvr12wj fyvr11ho fyvr12vj fyvr1ko fyvr1oo fyvr1mo fyvr1qo";const Tpe={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};p.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:s=!1,id:i,label:o="",labelLocation:a="hidden",name:c,onValueChange:l,placeholder:f="Upload a file",validExtensions:u,...d}=t,h=p.useRef(null),v=$pe(h,e),[y,m]=p.useState(null),g=x=>{const k=x.currentTarget.files;if(!k||!k[0])return;const $=k[0],I=$.name,M=$.size/1e3;m({name:I,size:M,extension:I.split(".").pop()??""}),l==null||l($)},b=u.map(x=>Tpe[x]).join(",");return Z.jsx(su,{description:n,disabled:s,display:"grid",id:i??c,label:o,labelLocation:a,children:Z.jsxs(K,{width:"full",minWidth:"0",justifyContent:y?"space-between":"flex-start",gap:"2",color:y?"text100":"text50",className:Ws(_pe,Ppe({borderRadius:r})),children:[y?Z.jsxs(K,{flexDirection:"row",gap:"2",alignItems:"center",minWidth:"0",children:[Z.jsx(he,{ellipsis:!0,children:y.name}),Z.jsxs(he,{color:"text50",variant:"xsmall",whiteSpace:"nowrap",children:[y.size.toFixed(2)," kb"]})]}):Z.jsx(he,{ellipsis:!0,children:f}),Z.jsx(K,{accept:b,as:"input",className:Ipe,cursor:"pointer",disabled:s,id:i??c,name:c,onChange:g,ref:v,type:"file",...d}),y&&Z.jsx(Uo,{cursor:"pointer",icon:iu,size:"xs",onClick:x=>{var k;x.preventDefault(),x.stopPropagation(),(k=h.current)!=null&&k.value&&(h.current.value=""),l==null||l(null),m(null)},zIndex:"10"})]})})});var Ope=Rr({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const s8=1e3,Rd=64,e6=Rd/2,t6=(t,e=s8)=>t%e/(s8/Rd),Zl=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let s=0,i;s>>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)},Rpe=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),s=t%360,i=(t+120)%360,o=r%360;return{id:Zl(n),a:`hsl(${s}deg 100% 40%)`,b:`hsl(${i}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},Mpe=(t,e)=>{const r=[];for(let n=0;n{const i=Rd/10+t6(n.r,s8*1.5/(s+1));return{...Rpe(n.a,n.b,n.c),x:t6(n.x),y:t6(n.y),r:i}})},my=p.memo(t=>{const{className:e,address:r,size:n="md",complexity:s=1,...i}=t,o=Mpe(r,s);return Z.jsxs(K,{as:"svg",className:Ws(e,Ope({size:n})),viewBox:`0 0 ${Rd} ${Rd}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...i,children:[Z.jsxs("defs",{children:[Z.jsx("clipPath",{id:"circle-clip",children:Z.jsx("circle",{cx:e6,cy:e6,r:e6})}),Z.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[Z.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Z.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),Z.jsx("feGaussianBlur",{stdDeviation:Rd/10,result:"effect1_foregroundBlur"})]}),Z.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[Z.jsx("stop",{offset:"0",stopColor:o[0].c}),Z.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>Z.jsxs(p.Fragment,{children:[Z.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[Z.jsx("stop",{offset:"0",stopColor:a.a}),Z.jsx("stop",{offset:"1",stopColor:a.b})]}),Z.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[Z.jsx("stop",{offset:"0",stopColor:a.c}),Z.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),Z.jsxs("g",{clipPath:"url(#circle-clip)",children:[Z.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),Z.jsx("g",{filter:"url(#blur)",children:o.map(a=>Z.jsxs(p.Fragment,{children:[Z.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),Z.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})}),Fr=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[s,i]=p.useState(!1),o=a=>{i(!0),r==null||r(a)};return Z.jsx(K,{as:Yi.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:s?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},AU="Dialog",[$U,XBe]=Bn(AU),[Npe,Ml]=$U(AU),jpe=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=p.useRef(null),c=p.useRef(null),[l=!1,f]=ll({prop:n,defaultProp:s,onChange:i});return p.createElement(Npe,{scope:e,triggerRef:a,contentRef:c,contentId:Yc(),titleId:Yc(),descriptionId:Yc(),open:l,onOpenChange:f,onOpenToggle:p.useCallback(()=>f(u=>!u),[f]),modal:o},r)},_U="DialogPortal",[Dpe,PU]=$U(_U,{forceMount:void 0}),Lpe=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:s}=t,i=Ml(_U,e);return p.createElement(Dpe,{scope:e,forceMount:r},p.Children.map(n,o=>p.createElement(Rl,{present:r||i.open},p.createElement(rU,{asChild:!0,container:s},o))))},i8="DialogOverlay",Bpe=p.forwardRef((t,e)=>{const r=PU(i8,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=Ml(i8,t.__scopeDialog);return i.modal?p.createElement(Rl,{present:n||i.open},p.createElement(Fpe,Ve({},s,{ref:e}))):null}),Fpe=p.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Ml(i8,r);return p.createElement(pU,{as:s1,allowPinchZoom:!0,shards:[s.contentRef]},p.createElement(ht.div,Ve({"data-state":TU(s.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),vv="DialogContent",zpe=p.forwardRef((t,e)=>{const r=PU(vv,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=Ml(vv,t.__scopeDialog);return p.createElement(Rl,{present:n||i.open},i.modal?p.createElement(qpe,Ve({},s,{ref:e})):p.createElement(Upe,Ve({},s,{ref:e})))}),qpe=p.forwardRef((t,e)=>{const r=Ml(vv,t.__scopeDialog),n=p.useRef(null),s=hr(e,r.contentRef,n);return p.useEffect(()=>{const i=n.current;if(i)return aU(i)},[]),p.createElement(IU,Ve({},t,{ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Me(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:Me(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:Me(t.onFocusOutside,i=>i.preventDefault())}))}),Upe=p.forwardRef((t,e)=>{const r=Ml(vv,t.__scopeDialog),n=p.useRef(!1),s=p.useRef(!1);return p.createElement(IU,Ve({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,i),!i.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}n.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=i.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}}))}),IU=p.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=Ml(vv,r),c=p.useRef(null),l=hr(e,c);return Bq(),p.createElement(p.Fragment,null,p.createElement(Fq,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i},p.createElement(b7,Ve({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":TU(a.open)},o,{ref:l,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),Wpe="DialogClose",Hpe=p.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Ml(Wpe,r);return p.createElement(ht.button,Ve({type:"button"},n,{ref:e,onClick:Me(t.onClick,()=>s.onOpenChange(!1))}))});function TU(t){return t?"open":"closed"}const Vpe=jpe,Gpe=Lpe,Kpe=Bpe,Ype=zpe,Qpe=Hpe;var Jpe=Rr({defaultClassName:"_1vqx0w91 _1vqx0w90 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]}),Xpe=Rr({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]});const OU=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:s,...i}=t;return Z.jsx(K,{className:Xpe({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...i,children:Z.jsx(K,{className:Jpe({direction:n}),background:"backgroundPrimary",...s,children:e})})};function Zpe(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function eme(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 RU(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=t.constructor();for(var s in t){var i=t[s],o=[...r,s];typeof i=="string"||typeof i=="number"||i==null?n[s]=e(i,o):typeof i=="object"&&!Array.isArray(i)?n[s]=RU(i,e,o):console.warn('Skipping invalid key "'.concat(o.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(i)?"Array":typeof i,'"'))}return n}function qP(t,e,r){t.style.setProperty(Zpe(e),r)}function UP(t,e,r){if(typeof r=="object"){var n=e;RU(r,(a,c)=>{a!=null&&qP(t,eme(n,c),String(a))})}else{var s=e;for(var i in s){var o=s[i];o!=null&&qP(t,i,s[i])}}}const I7=["dark","light"],tme="dark",rme="data-theme",WP="@sequence.theme",nme=t=>I7.includes(t),sme=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),MU=t=>t?`${WP}.${t}`:WP,ime=t=>{const e=localStorage.getItem(MU(t));return e&&I7.includes(e)?e:tme},NU=p.createContext(null),T7=t=>{const[e,r]=p.useState(t.theme||ime(t.scope));p.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),p.useEffect(()=>{t.theme&&r(t.theme)},[t.theme]),p.useEffect(()=>{const s=document.querySelector(t.root||":root");s&&(nme(e)?(s.setAttribute(rme,e),UP(s,yP,{colors:The[e]})):sme(e)&&UP(s,yP,{colors:e}))},[e,t.root]);const n=p.useMemo(()=>({theme:e,root:t.root,setTheme:s=>{I7.includes(s)&&(localStorage.setItem(MU(t.scope),s),r(s))}}),[e,t.root,t.scope]);return Z.jsx(NU.Provider,{value:n,children:t.children})},O7=()=>{const t=p.useContext(NU);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t};var ome="_5b32m91 _5b32m90 fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11nk fyvr1ko fyvr1oo fyvr1qo fyvr1mo",ame="_5b32m93 _5b32m92 fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",cme=Rr({defaultClassName:"_5b32m95 _5b32m94 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12ws fyvr12wm fyvr11h0 fyvr11i4 fyvr11hs fyvr11sd fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]}),lme="_5b32m9b _5b32m9a fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11nk";const jU=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:s=!1,isDismissible:i=!0,onClose:o,scroll:a=!0,size:c="lg",overlayProps:l,contentProps:f}=t,{root:u}=O7(),d=document.querySelector(u||"body");return Z.jsx(Vpe,{modal:!0,defaultOpen:!0,onOpenChange:o,children:Z.jsx(Gpe,{forceMount:!0,container:d,children:Z.jsxs(K,{className:ome,children:[Z.jsx(K,{as:Kpe,asChild:!0,background:r,className:ame,forceMount:!0,children:Z.jsx(Yi.div,{initial:s?!1:{opacity:0},animate:s?!1:{opacity:1},exit:s?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...l},"modal-overlay")}),Z.jsx(Ype,{asChild:!0,className:cme({autoHeight:e,size:c}),forceMount:!0,onEscapeKeyDown:h=>{i?o==null||o():h.preventDefault()},onInteractOutside:h=>{i||h.preventDefault()},children:Z.jsxs(Yi.div,{initial:s?!1:{y:"100%",opacity:c==="sm"?0:1},animate:s?!1:{y:0,opacity:1},exit:s?void 0:{y:"100%",opacity:c==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...f,children:[a?Z.jsx(OU,{children:n}):n,i&&Z.jsx(Qpe,{asChild:!0,children:Z.jsx(Uo,{icon:iu,backdropFilter:"blur",size:"xs",className:lme,"aria-label":"Close"})})]},"modal-content")})]})})})};var fme="_1acm19y1 _1acm19y0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11od fyvr12s1 fyvr1g0 fyvr118g",ume=Rr({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:[]}),dme=Rr({defaultClassName:"_1acm19ya _1acm19y9 fyvr1wg fyvr1yc fyvr1t4 fyvr1v0 fyvr12wp fyvr12wj fyvr11gw fyvr11od fyvr12s1 fyvr12o1 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 au=p.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",leftIcon:f,rightIcon:u,name:d,controls:h,type:v="text",numeric:y=!1,...m}=t;return Z.jsx(su,{description:i,disabled:o,display:"grid",id:a??d,label:c,labelLocation:l,children:Z.jsx(K,{width:"full",children:Z.jsxs(K,{className:Ws(fme,ume({borderRadius:s})),children:[f&&Z.jsx(f,{size:"sm"}),Z.jsx(K,{as:r,autoComplete:n,spellCheck:"false",className:dme({numeric:y}),disabled:o,id:a??d,name:d,ref:e,type:v,...m}),u&&Z.jsx(u,{size:"sm"}),h]})})})}),hme=RegExp("^\\d*(?:\\\\[.])?\\d*$");function vme(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const DU=p.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:s,onBlur:i,...o}=t,a=l=>{let{value:f}=l.target;f=f.replace(/,/g,"."),f.startsWith(".")&&(f="0"+f),f.startsWith("0")&&(f=f.replace(/^0+(?=\d)/,"")),(f===""||hme.test(vme(f)))&&(s==null||s({...l,target:{...l.target,value:f}}))},c=l=>{const{value:f}=l.target;let u=f;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),i==null||i(l),u!==f&&(s==null||s({...l,target:{...l.target,value:u}}))};return Z.jsx(au,{name:r,onChange:a,onBlur:c,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})});Rr({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const LU="Progress",px=100,[yme,ZBe]=Bn(LU),[pme,eFe]=yme(LU),mme=p.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:s,getValueLabel:i=gme,...o}=t,a=o8(s)?s:px,c=BU(n,a)?n:null,l=yb(c)?i(c,a):void 0;return p.createElement(pme,{scope:r,value:c,max:a},p.createElement(ht.div,Bt({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":yb(c)?c:void 0,"aria-valuetext":l,role:"progressbar","data-state":bme(c,a),"data-value":c??void 0,"data-max":a},o,{ref:e})))});mme.propTypes={max(t,e,r){const n=t[e],s=String(n);return n&&!o8(n)?new Error(xme(s,r)):null},value(t,e,r){const n=t[e],s=String(n),i=o8(t.max)?t.max:px;return n!=null&&!BU(n,i)?new Error(wme(s,r)):null}};function gme(t,e){return`${Math.round(t/e*100)}%`}function bme(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function yb(t){return typeof t=="number"}function o8(t){return yb(t)&&!isNaN(t)&&t>0}function BU(t,e){return yb(t)&&!isNaN(t)&&t<=e&&t>=0}function xme(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${px}\`.`}function wme(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 ${px} if no \`max\` prop is set) + - \`null\` if the progress is indeterminate. + +Defaulting to \`null\`.`}const FU="Radio",[Cme,zU]=Bn(FU),[Eme,kme]=Cme(FU),Sme=p.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:c,...l}=t,[f,u]=p.useState(null),d=hr(e,y=>u(y)),h=p.useRef(!1),v=f?!!f.closest("form"):!0;return p.createElement(Eme,{scope:r,checked:s,disabled:o},p.createElement(ht.button,Bt({type:"button",role:"radio","aria-checked":s,"data-state":qU(s),"data-disabled":o?"":void 0,disabled:o,value:a},l,{ref:d,onClick:Me(t.onClick,y=>{s||c==null||c(),v&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})),v&&p.createElement(_me,{control:f,bubbles:!h.current,name:n,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}}))}),Ame="RadioIndicator",$me=p.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...s}=t,i=kme(Ame,r);return p.createElement(Rl,{present:n||i.checked},p.createElement(ht.span,Bt({"data-state":qU(i.checked),"data-disabled":i.disabled?"":void 0},s,{ref:e})))}),_me=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=p.useRef(null),o=ix(r),a=ox(e);return p.useEffect(()=>{const c=i.current,l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(c,r),c.dispatchEvent(d)}},[o,r,n]),p.createElement("input",Bt({type:"radio","aria-hidden":!0,defaultChecked:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function qU(t){return t?"checked":"unchecked"}const Pme=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],UU="RadioGroup",[Ime,tFe]=Bn(UU,[D1,zU]),WU=D1(),HU=zU(),[Tme,Ome]=Ime(UU),Rme=p.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:c,dir:l,loop:f=!0,onValueChange:u,...d}=t,h=WU(r),v=ux(l),[y,m]=ll({prop:i,defaultProp:s,onChange:u});return p.createElement(Tme,{scope:r,name:n,required:o,disabled:a,value:y,onValueChange:m},p.createElement(iU,Bt({asChild:!0},h,{orientation:c,dir:v,loop:f}),p.createElement(ht.div,Bt({role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":a?"":void 0,dir:v},d,{ref:e}))))}),Mme="RadioGroupItem",Nme=p.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...s}=t,i=Ome(Mme,r),o=i.disabled||n,a=WU(r),c=HU(r),l=p.useRef(null),f=hr(e,l),u=i.value===s.value,d=p.useRef(!1);return p.useEffect(()=>{const h=y=>{Pme.includes(y.key)&&(d.current=!0)},v=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),p.createElement($7,Bt({asChild:!0},a,{focusable:!o,active:u}),p.createElement(Sme,Bt({disabled:o,required:i.required,checked:u},c,s,{name:i.name,ref:f,onCheck:()=>i.onValueChange(s.value),onKeyDown:Me(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Me(s.onFocus,()=>{var h;d.current&&((h=l.current)===null||h===void 0||h.click())})})))}),jme=p.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,s=HU(r);return p.createElement($me,Bt({},s,n,{ref:e}))}),Dme=Rme,Lme=Nme,Bme=jme;var Fme=Rr({defaultClassName:"io59uy3 io59uy0 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1so fyvr1uk fyvr1wg fyvr1yc fyvr12nd fyvr12g1 fyvr121d fyvr128p fyvr12nj fyvr12g7 fyvr121j fyvr128v fyvr11od fyvr12v7 fyvr12v3 fyvr12vz fyvr12vr",variantClassNames:{size:{sm:"io59uy4 io59uy1 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy5 io59uy2 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]}),zme=Rr({defaultClassName:"io59uy8 io59uy7 io59uy6 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12s1",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]});const qme=t=>{const{id:e,label:r,size:n="sm",value:s,disabled:i}=t;return Z.jsx(K,{alignItems:"center",children:Z.jsx(su,{disabled:i,display:"flex",id:e,label:r,labelLocation:"right",children:Z.jsx(Lme,{className:Fme({size:n}),value:s,id:e,disabled:i,children:Z.jsx(Bme,{className:zme({size:n})})})})})};p.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:s="2",name:i,options:o,size:a="sm",...c}=t;return Z.jsx(Dme,{disabled:n,name:i,ref:e,...c,children:Z.jsx(K,{flexDirection:r,gap:s,children:o.map(({label:l,value:f,disabled:u})=>Z.jsx(qme,{id:`${i}-${f}`,label:l,size:a,value:f,disabled:u},f))})})});function HP(t,[e,r]){return Math.min(r,Math.max(e,t))}const VU=p.forwardRef((t,e)=>p.createElement(ht.span,Ve({},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}}))),Ume=[" ","Enter","ArrowUp","ArrowDown"],Wme=[" ","Enter"],mx="Select",[gx,R7,Hme]=fx(mx),[L1,rFe]=Bn(mx,[Hme,j1]),M7=j1(),[Vme,cu]=L1(mx),[Gme,Kme]=L1(mx),Yme=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:c,dir:l,name:f,autoComplete:u,disabled:d,required:h}=t,v=M7(e),[y,m]=p.useState(null),[g,b]=p.useState(null),[x,k]=p.useState(!1),$=ux(l),[I=!1,M]=ll({prop:n,defaultProp:s,onChange:i}),[D,H]=ll({prop:o,defaultProp:a,onChange:c}),G=p.useRef(null),V=y?!!y.closest("form"):!0,[Q,F]=p.useState(new Set),C=Array.from(Q).map(S=>S.props.value).join(";");return p.createElement(rye,v,p.createElement(Vme,{required:h,scope:e,trigger:y,onTriggerChange:m,valueNode:g,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:k,contentId:Yc(),value:D,onValueChange:H,open:I,onOpenChange:M,dir:$,triggerPointerDownPosRef:G,disabled:d},p.createElement(gx.Provider,{scope:e},p.createElement(Gme,{scope:t.__scopeSelect,onNativeOptionAdd:p.useCallback(S=>{F(T=>new Set(T).add(S))},[]),onNativeOptionRemove:p.useCallback(S=>{F(T=>{const R=new Set(T);return R.delete(S),R})},[])},r)),V?p.createElement(YU,{key:C,"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:u,value:D,onChange:S=>H(S.target.value),disabled:d},D===void 0?p.createElement("option",{value:""}):null,Array.from(Q)):null))},Qme="SelectTrigger",Jme=p.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=M7(r),o=cu(Qme,r),a=o.disabled||n,c=hr(e,o.onTriggerChange),l=R7(r),[f,u,d]=QU(v=>{const y=l().filter(b=>!b.disabled),m=y.find(b=>b.value===o.value),g=JU(y,v,m);g!==void 0&&o.onValueChange(g.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return p.createElement(nye,Ve({asChild:!0},i),p.createElement(ht.button,Ve({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":KU(o.value)?"":void 0},s,{ref:c,onClick:Me(s.onClick,v=>{v.currentTarget.focus()}),onPointerDown:Me(s.onPointerDown,v=>{const y=v.target;y.hasPointerCapture(v.pointerId)&&y.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&(h(),o.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)},v.preventDefault())}),onKeyDown:Me(s.onKeyDown,v=>{const y=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&u(v.key),!(y&&v.key===" ")&&Ume.includes(v.key)&&(h(),v.preventDefault())})})))}),Xme="SelectValue",Zme=p.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o="",...a}=t,c=cu(Xme,r),{onValueNodeHasChildrenChange:l}=c,f=i!==void 0,u=hr(e,c.onValueNodeChange);return mi(()=>{l(f)},[l,f]),p.createElement(ht.span,Ve({},a,{ref:u,style:{pointerEvents:"none"}}),KU(c.value)?p.createElement(p.Fragment,null,o):i)}),ege=p.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return p.createElement(ht.span,Ve({"aria-hidden":!0},s,{ref:e}),n||"▼")}),o1="SelectContent",tge=p.forwardRef((t,e)=>{const r=cu(o1,t.__scopeSelect),[n,s]=p.useState();if(mi(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?bn.createPortal(p.createElement(GU,{scope:t.__scopeSelect},p.createElement(gx.Slot,{scope:t.__scopeSelect},p.createElement("div",null,t.children))),i):null}return p.createElement(rge,Ve({},t,{ref:e}))}),ta=10,[GU,bx]=L1(o1),rge=p.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:c,align:l,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:m,...g}=t,b=cu(o1,r),[x,k]=p.useState(null),[$,I]=p.useState(null),M=hr(e,W=>k(W)),[D,H]=p.useState(null),[G,V]=p.useState(null),Q=R7(r),[F,C]=p.useState(!1),S=p.useRef(!1);p.useEffect(()=>{if(x)return aU(x)},[x]),Bq();const T=p.useCallback(W=>{const[J,...X]=Q().map(se=>se.ref.current),[re]=X.slice(-1),ee=document.activeElement;for(const se of W)if(se===ee||(se==null||se.scrollIntoView({block:"nearest"}),se===J&&$&&($.scrollTop=0),se===re&&$&&($.scrollTop=$.scrollHeight),se==null||se.focus(),document.activeElement!==ee))return},[Q,$]),R=p.useCallback(()=>T([D,x]),[T,D,x]);p.useEffect(()=>{F&&R()},[F,R]);const{onOpenChange:A,triggerPointerDownPosRef:N}=b;p.useEffect(()=>{if(x){let W={x:0,y:0};const J=re=>{var ee,se,xe,de;W={x:Math.abs(Math.round(re.pageX)-((ee=(se=N.current)===null||se===void 0?void 0:se.x)!==null&&ee!==void 0?ee:0)),y:Math.abs(Math.round(re.pageY)-((xe=(de=N.current)===null||de===void 0?void 0:de.y)!==null&&xe!==void 0?xe:0))}},X=re=>{W.x<=10&&W.y<=10?re.preventDefault():x.contains(re.target)||A(!1),document.removeEventListener("pointermove",J),N.current=null};return N.current!==null&&(document.addEventListener("pointermove",J),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",X,{capture:!0})}}},[x,A,N]),p.useEffect(()=>{const W=()=>A(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[A]);const[B,P]=QU(W=>{const J=Q().filter(ee=>!ee.disabled),X=J.find(ee=>ee.ref.current===document.activeElement),re=JU(J,W,X);re&&setTimeout(()=>re.ref.current.focus())}),E=p.useCallback((W,J,X)=>{const re=!S.current&&!X;(b.value!==void 0&&b.value===J||re)&&(H(W),re&&(S.current=!0))},[b.value]),L=p.useCallback(()=>x==null?void 0:x.focus(),[x]),q=p.useCallback((W,J,X)=>{const re=!S.current&&!X;(b.value!==void 0&&b.value===J||re)&&V(W)},[b.value]),_=n==="popper"?VP:nge,U=_===VP?{side:a,sideOffset:c,align:l,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:m}:{};return p.createElement(GU,{scope:r,content:x,viewport:$,onViewportChange:I,itemRefCallback:E,selectedItem:D,onItemLeave:L,itemTextRefCallback:q,focusSelectedItem:R,selectedItemText:G,position:n,isPositioned:F,searchRef:B},p.createElement(pU,{as:s1,allowPinchZoom:!0},p.createElement(Fq,{asChild:!0,trapped:b.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:Me(s,W=>{var J;(J=b.trigger)===null||J===void 0||J.focus({preventScroll:!0}),W.preventDefault()})},p.createElement(b7,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>b.onOpenChange(!1)},p.createElement(_,Ve({role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:W=>W.preventDefault()},g,U,{onPlaced:()=>C(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:Me(g.onKeyDown,W=>{const J=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!J&&W.key.length===1&&P(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let re=Q().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);if(["ArrowUp","End"].includes(W.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const ee=W.target,se=re.indexOf(ee);re=re.slice(se+1)}setTimeout(()=>T(re)),W.preventDefault()}})}))))))}),nge=p.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=cu(o1,r),o=bx(o1,r),[a,c]=p.useState(null),[l,f]=p.useState(null),u=hr(e,M=>f(M)),d=R7(r),h=p.useRef(!1),v=p.useRef(!0),{viewport:y,selectedItem:m,selectedItemText:g,focusSelectedItem:b}=o,x=p.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&l&&y&&m&&g){const M=i.trigger.getBoundingClientRect(),D=l.getBoundingClientRect(),H=i.valueNode.getBoundingClientRect(),G=g.getBoundingClientRect();if(i.dir!=="rtl"){const ee=G.left-D.left,se=H.left-ee,xe=M.left-se,de=M.width+xe,pe=Math.max(de,D.width),$e=window.innerWidth-ta,Se=HP(se,[ta,$e-pe]);a.style.minWidth=de+"px",a.style.left=Se+"px"}else{const ee=D.right-G.right,se=window.innerWidth-H.right-ee,xe=window.innerWidth-M.right-se,de=M.width+xe,pe=Math.max(de,D.width),$e=window.innerWidth-ta,Se=HP(se,[ta,$e-pe]);a.style.minWidth=de+"px",a.style.right=Se+"px"}const V=d(),Q=window.innerHeight-ta*2,F=y.scrollHeight,C=window.getComputedStyle(l),S=parseInt(C.borderTopWidth,10),T=parseInt(C.paddingTop,10),R=parseInt(C.borderBottomWidth,10),A=parseInt(C.paddingBottom,10),N=S+T+F+A+R,B=Math.min(m.offsetHeight*5,N),P=window.getComputedStyle(y),E=parseInt(P.paddingTop,10),L=parseInt(P.paddingBottom,10),q=M.top+M.height/2-ta,_=Q-q,U=m.offsetHeight/2,W=m.offsetTop+U,J=S+T+W,X=N-J;if(J<=q){const ee=m===V[V.length-1].ref.current;a.style.bottom="0px";const se=l.clientHeight-y.offsetTop-y.offsetHeight,xe=Math.max(_,U+(ee?L:0)+se+R),de=J+xe;a.style.height=de+"px"}else{const ee=m===V[0].ref.current;a.style.top="0px";const xe=Math.max(q,S+y.offsetTop+(ee?E:0)+U)+X;a.style.height=xe+"px",y.scrollTop=J-q+y.offsetTop}a.style.margin=`${ta}px 0`,a.style.minHeight=B+"px",a.style.maxHeight=Q+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,a,l,y,m,g,i.dir,n]);mi(()=>x(),[x]);const[k,$]=p.useState();mi(()=>{l&&$(window.getComputedStyle(l).zIndex)},[l]);const I=p.useCallback(M=>{M&&v.current===!0&&(x(),b==null||b(),v.current=!1)},[x,b]);return p.createElement(sge,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:I},p.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k}},p.createElement(ht.div,Ve({},s,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}}))))}),VP=p.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=ta,...i}=t,o=M7(r);return p.createElement(sye,Ve({},o,i,{ref:e,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.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)"}}))}),[sge,ige]=L1(o1,{}),GP="SelectViewport",oge=p.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=bx(GP,r),i=ige(GP,r),o=hr(e,s.onViewportChange),a=p.useRef(0);return p.createElement(p.Fragment,null,p.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}"}}),p.createElement(gx.Slot,{scope:r},p.createElement(ht.div,Ve({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:Me(n.onScroll,c=>{const l=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:u}=i;if(u!=null&&u.current&&f){const d=Math.abs(a.current-l.scrollTop);if(d>0){const h=window.innerHeight-ta*2,v=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),m=Math.max(v,y);if(m0?x:0,f.style.justifyContent="flex-end")}}}a.current=l.scrollTop})}))))}),age="SelectGroup",[cge,nFe]=L1(age),lge=p.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Yc();return p.createElement(cge,{scope:r,id:s},p.createElement(ht.div,Ve({role:"group","aria-labelledby":s},n,{ref:e})))}),a8="SelectItem",[fge,uge]=L1(a8),dge=p.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=cu(a8,r),c=bx(a8,r),l=a.value===n,[f,u]=p.useState(i??""),[d,h]=p.useState(!1),v=hr(e,g=>{var b;return(b=c.itemRefCallback)===null||b===void 0?void 0:b.call(c,g,n,s)}),y=Yc(),m=()=>{s||(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 p.createElement(fge,{scope:r,value:n,disabled:s,textId:y,isSelected:l,onItemTextChange:p.useCallback(g=>{u(b=>{var x;return b||((x=g==null?void 0:g.textContent)!==null&&x!==void 0?x:"").trim()})},[])},p.createElement(gx.ItemSlot,{scope:r,value:n,disabled:s,textValue:f},p.createElement(ht.div,Ve({role:"option","aria-labelledby":y,"data-highlighted":d?"":void 0,"aria-selected":l&&d,"data-state":l?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1},o,{ref:v,onFocus:Me(o.onFocus,()=>h(!0)),onBlur:Me(o.onBlur,()=>h(!1)),onPointerUp:Me(o.onPointerUp,m),onPointerMove:Me(o.onPointerMove,g=>{if(s){var b;(b=c.onItemLeave)===null||b===void 0||b.call(c)}else g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Me(o.onPointerLeave,g=>{if(g.currentTarget===document.activeElement){var b;(b=c.onItemLeave)===null||b===void 0||b.call(c)}}),onKeyDown:Me(o.onKeyDown,g=>{var b;((b=c.searchRef)===null||b===void 0?void 0:b.current)!==""&&g.key===" "||(Wme.includes(g.key)&&m(),g.key===" "&&g.preventDefault())})}))))}),$p="SelectItemText",hge=p.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=cu($p,r),a=bx($p,r),c=uge($p,r),l=Kme($p,r),[f,u]=p.useState(null),d=hr(e,g=>u(g),c.onItemTextChange,g=>{var b;return(b=a.itemTextRefCallback)===null||b===void 0?void 0:b.call(a,g,c.value,c.disabled)}),h=f==null?void 0:f.textContent,v=p.useMemo(()=>p.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},h),[c.disabled,c.value,h]),{onNativeOptionAdd:y,onNativeOptionRemove:m}=l;return mi(()=>(y(v),()=>m(v)),[y,m,v]),p.createElement(p.Fragment,null,p.createElement(ht.span,Ve({id:c.textId},i,{ref:d})),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?bn.createPortal(i.children,o.valueNode):null)});function KU(t){return t===""||t===void 0}const YU=p.forwardRef((t,e)=>{const{value:r,...n}=t,s=p.useRef(null),i=hr(e,s),o=ix(r);return p.useEffect(()=>{const a=s.current,c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==r&&f){const u=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(u)}},[o,r]),p.createElement(VU,{asChild:!0},p.createElement("select",Ve({},n,{ref:i,defaultValue:r})))});YU.displayName="BubbleSelect";function QU(t){const e=pi(t),r=p.useRef(""),n=p.useRef(0),s=p.useCallback(o=>{const a=r.current+o;e(a),function c(l){r.current=l,window.clearTimeout(n.current),l!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(a)},[e]),i=p.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function JU(t,e,r){const s=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=vge(t,Math.max(i,0));s.length===1&&(o=o.filter(l=>l!==r));const c=o.find(l=>l.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function vge(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const yge=Yme,pge=Jme,mge=Zme,gge=ege,bge=tge,xge=oge,wge=lge,Cge=dge,Ege=hge;var kge="gohwum1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 gohwum0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11od fyvr11hc fyvr11f4 fyvr12s1 fyvr118c fyvr11jw fyvr11n4 fyvr12v7 fyvr12o1",Sge=Rr({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:[]}),Age="gohwuma gohwum9 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11tv fyvr12s1 fyvr11nl",$ge="gohwume _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 gohwumd fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12ws fyvr12wt fyvr12wm fyvr12wn fyvr11h0 fyvr11jw fyvr11ko fyvr12v7 fyvr12v3 fyvr12s1 fyvr12w1 fyvr12vr";const _ge=p.forwardRef(({children:t,className:e,...r},n)=>Z.jsx(Cge,{className:Ws($ge,e),...r,ref:n,children:Z.jsx(Ege,{children:t})})),Pge=p.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:s,label:i="",description:o,labelLocation:a="hidden",name:c,options:l,placeholder:f,...u}=t;return Z.jsx(su,{disabled:n,display:"grid",id:s??c,label:i,labelLocation:a,description:o,whiteSpace:"nowrap",children:Z.jsxs(yge,{disabled:n,name:c,...u,children:[Z.jsxs(pge,{id:s??c,className:Ws(kge,Sge({borderRadius:r})),ref:e,children:[Z.jsx(mge,{placeholder:f}),Z.jsx(K,{as:gge,display:"inline-flex",children:Z.jsx(Rq,{})})]}),Z.jsx(bge,{className:Age,children:Z.jsx(xge,{children:Z.jsx(wge,{children:l.map(({value:d,label:h,...v})=>Z.jsx(_ge,{value:d,...v,children:h},d))})})})]})})});p.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:s="Search",name:i="search",value:o,...a}=t,c=o?Z.jsx(Uo,{icon:iu,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return Z.jsx(au,{ref:e,name:i,leftIcon:cx,controls:r||c,placeholder:s,value:o,onChange:l=>n==null?void 0:n(l),...a})});var Ige=Rr({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});const B1=p.forwardRef((t,e)=>{const{size:r="md",...n}=t;return Z.jsx(K,{className:Ige({size:r}),color:"text50",ref:e,...n,children:Z.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[Z.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),Z.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});p.forwardRef(({children:t},e)=>Z.jsx(K,{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 XU="Switch",[Tge,sFe]=Bn(XU),[Oge,Rge]=Tge(XU),Mge=p.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:c="on",onCheckedChange:l,...f}=t,[u,d]=p.useState(null),h=hr(e,b=>d(b)),v=p.useRef(!1),y=u?!!u.closest("form"):!0,[m=!1,g]=ll({prop:s,defaultProp:i,onChange:l});return p.createElement(Oge,{scope:r,checked:m,disabled:a},p.createElement(ht.button,Bt({type:"button",role:"switch","aria-checked":m,"aria-required":o,"data-state":ZU(m),"data-disabled":a?"":void 0,disabled:a,value:c},f,{ref:h,onClick:Me(t.onClick,b=>{g(x=>!x),y&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})})),y&&p.createElement(Dge,{control:u,bubbles:!v.current,name:n,value:c,checked:m,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),Nge="SwitchThumb",jge=p.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,s=Rge(Nge,r);return p.createElement(ht.span,Bt({"data-state":ZU(s.checked),"data-disabled":s.disabled?"":void 0},n,{ref:e}))}),Dge=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=p.useRef(null),o=ix(r),a=ox(e);return p.useEffect(()=>{const c=i.current,l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(c,r),c.dispatchEvent(d)}},[o,r,n]),p.createElement("input",Bt({type:"checkbox","aria-hidden":!0,defaultChecked:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ZU(t){return t?"checked":"unchecked"}const Lge=Mge,Bge=jge;var Fge="_1lp2u8e1 _1lp2u8e0 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1ss fyvr1uo fyvr1wk fyvr1yg fyvr11t1 fyvr11hw fyvr12v7 fyvr12o1",zge="_1lp2u8e3 _1lp2u8e2 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ho fyvr1ko fyvr1oo fyvr1k fyvr140 fyvr11o1";const c8=t=>{const{disabled:e,label:r,labelLocation:n="left",description:s,id:i,name:o,...a}=t;return Z.jsx(su,{disabled:e,display:"flex",id:i??o,label:r,labelLocation:n,description:s,whiteSpace:"nowrap",children:Z.jsx(Lge,{className:Fge,disabled:e,...a,children:Z.jsx(K,{position:"relative",width:"full",height:"full",children:Z.jsx(Bge,{className:zge})})})})};Rr({defaultClassName:"nwwh3z8",variantClassNames:{variant:{pill:"nwwh3z9",line:"nwwh3za nwwh3z1 fyvr11g0"},active:{true:"nwwh3zb nwwh3z2 fyvr12w5",false:"nwwh3zc"},disabled:{true:"nwwh3zd nwwh3z3 fyvr12vp"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"nwwh3z4 fyvr11u7 fyvr12sj"],[{active:!1,variant:"pill"},"nwwh3z5 fyvr11od fyvr12s7"],[{active:!0,variant:"line"},"nwwh3z6 fyvr12s1"],[{active:!1,variant:"line"},"nwwh3z7 fyvr12s7"]]});const eW="Tabs",[qge,iFe]=Bn(eW,[D1]),tW=D1(),[Uge,N7]=qge(eW),Wge=p.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:c="automatic",...l}=t,f=ux(a),[u,d]=ll({prop:n,onChange:s,defaultProp:i});return p.createElement(Uge,{scope:r,baseId:Yc(),value:u,onValueChange:d,orientation:o,dir:f,activationMode:c},p.createElement(ht.div,Bt({dir:f,"data-orientation":o},l,{ref:e})))}),Hge="TabsList",Vge=p.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...s}=t,i=N7(Hge,r),o=tW(r);return p.createElement(iU,Bt({asChild:!0},o,{orientation:i.orientation,dir:i.dir,loop:n}),p.createElement(ht.div,Bt({role:"tablist","aria-orientation":i.orientation},s,{ref:e})))}),Gge="TabsTrigger",Kge=p.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...i}=t,o=N7(Gge,r),a=tW(r),c=rW(o.baseId,n),l=nW(o.baseId,n),f=n===o.value;return p.createElement($7,Bt({asChild:!0},a,{focusable:!s,active:f}),p.createElement(ht.button,Bt({type:"button",role:"tab","aria-selected":f,"aria-controls":l,"data-state":f?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c},i,{ref:e,onMouseDown:Me(t.onMouseDown,u=>{!s&&u.button===0&&u.ctrlKey===!1?o.onValueChange(n):u.preventDefault()}),onKeyDown:Me(t.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&o.onValueChange(n)}),onFocus:Me(t.onFocus,()=>{const u=o.activationMode!=="manual";!f&&!s&&u&&o.onValueChange(n)})})))}),Yge="TabsContent",Qge=p.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:s,children:i,...o}=t,a=N7(Yge,r),c=rW(a.baseId,n),l=nW(a.baseId,n),f=n===a.value,u=p.useRef(f);return p.useEffect(()=>{const d=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(d)},[]),p.createElement(Rl,{present:s||f},({present:d})=>p.createElement(ht.div,Bt({"data-state":f?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!d,id:l,tabIndex:0},o,{ref:e,style:{...t.style,animationDuration:u.current?"0s":void 0}}),d&&i))});function rW(t,e){return`${t}-trigger-${e}`}function nW(t,e){return`${t}-content-${e}`}const Jge=Wge,Xge=Vge,Zge=Kge;var ebe="_10c8o0n1 _10c8o0n0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr11h0 fyvr11hw fyvr128 fyvr11sj fyvr14o",tbe="_10c8o0n3 _10c8o0n2 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr12wp fyvr12wj fyvr128 fyvr15o fyvr12v7 fyvr11hw fyvr11od fyvr11n4 fyvr12s7",rbe="_10c8o0n5 _10c8o0n4 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ho fyvr1ko fyvr1oo fyvr14c fyvr11tv fyvr12w7";const nbe=t=>{const{tabs:e,value:r}=t;if(!e.length)return null;const n=100/e.length,s=e.findIndex(i=>i.value===r);return Z.jsxs(Xge,{className:ebe,style:{outline:void 0},children:[Z.jsx(K,{display:"flex",position:"absolute",inset:"2",height:"8",children:Z.jsx("div",{className:rbe,style:{width:`${n}%`,transform:`translateX(${s*100}%)`}})}),e.map(i=>Z.jsx(Zge,{className:tbe,value:i.value,children:Z.jsx(he,{variant:"normal",fontWeight:"bold",children:i.label})},i.value))]})},sbe=Jge,KP=Qge;var ibe="_1ppqbnx1 _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc _1ppqbnx0 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n9";p.forwardRef((t,e)=>{const{icon:r,label:n,...s}=t;return Z.jsxs(K,{className:ibe,ref:e,background:"buttonGlass",color:"text80",...s,children:[r&&Z.jsx(r,{size:"xs"}),Z.jsx(he,{children:n})]})});const obe="ToastProvider",[abe,oFe,cbe]=fx("Toast"),[sW,aFe]=Bn("Toast",[cbe]),[cFe,iW]=sW(obe),YP="toast.viewportPause",QP="toast.viewportResume",xx="Toast",lbe="toast.swipeStart",fbe="toast.swipeMove",ube="toast.swipeCancel",dbe="toast.swipeEnd",[hbe,vbe]=sW(xx,{onClose(){}}),ybe=p.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:c,onResume:l,onSwipeStart:f,onSwipeMove:u,onSwipeCancel:d,onSwipeEnd:h,...v}=t,y=iW(xx,r),[m,g]=p.useState(null),b=hr(e,C=>g(C)),x=p.useRef(null),k=p.useRef(null),$=s||y.duration,I=p.useRef(0),M=p.useRef($),D=p.useRef(0),{onToastAdd:H,onToastRemove:G}=y,V=pi(()=>{var C;(m==null?void 0:m.contains(document.activeElement))&&((C=y.viewport)===null||C===void 0||C.focus()),o()}),Q=p.useCallback(C=>{!C||C===1/0||(window.clearTimeout(D.current),I.current=new Date().getTime(),D.current=window.setTimeout(V,C))},[V]);p.useEffect(()=>{const C=y.viewport;if(C){const S=()=>{Q(M.current),l==null||l()},T=()=>{const R=new Date().getTime()-I.current;M.current=M.current-R,window.clearTimeout(D.current),c==null||c()};return C.addEventListener(YP,T),C.addEventListener(QP,S),()=>{C.removeEventListener(YP,T),C.removeEventListener(QP,S)}}},[y.viewport,$,c,l,Q]),p.useEffect(()=>{i&&!y.isClosePausedRef.current&&Q($)},[i,$,y.isClosePausedRef,Q]),p.useEffect(()=>(H(),()=>G()),[H,G]);const F=p.useMemo(()=>m?aW(m):null,[m]);return y.viewport?p.createElement(p.Fragment,null,F&&p.createElement(pbe,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},F),p.createElement(hbe,{scope:r,onClose:V},bn.createPortal(p.createElement(abe.ItemSlot,{scope:r},p.createElement(sve,{asChild:!0,onEscapeKeyDown:Me(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||V(),y.isFocusedToastEscapeKeyDownRef.current=!1})},p.createElement(ht.li,Ve({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection},v,{ref:b,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Me(t.onKeyDown,C=>{C.key==="Escape"&&(a==null||a(C.nativeEvent),C.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,V()))}),onPointerDown:Me(t.onPointerDown,C=>{C.button===0&&(x.current={x:C.clientX,y:C.clientY})}),onPointerMove:Me(t.onPointerMove,C=>{if(!x.current)return;const S=C.clientX-x.current.x,T=C.clientY-x.current.y,R=!!k.current,A=["left","right"].includes(y.swipeDirection),N=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,B=A?N(0,S):0,P=A?0:N(0,T),E=C.pointerType==="touch"?10:2,L={x:B,y:P},q={originalEvent:C,delta:L};R?(k.current=L,_p(fbe,u,q,{discrete:!1})):JP(L,y.swipeDirection,E)?(k.current=L,_p(lbe,f,q,{discrete:!1}),C.target.setPointerCapture(C.pointerId)):(Math.abs(S)>E||Math.abs(T)>E)&&(x.current=null)}),onPointerUp:Me(t.onPointerUp,C=>{const S=k.current,T=C.target;if(T.hasPointerCapture(C.pointerId)&&T.releasePointerCapture(C.pointerId),k.current=null,x.current=null,S){const R=C.currentTarget,A={originalEvent:C,delta:S};JP(S,y.swipeDirection,y.swipeThreshold)?_p(dbe,h,A,{discrete:!0}):_p(ube,d,A,{discrete:!0}),R.addEventListener("click",N=>N.preventDefault(),{once:!0})}})})))),y.viewport))):null});ybe.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${xx}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const pbe=t=>{const{__scopeToast:e,children:r,...n}=t,s=iW(xx,e),[i,o]=p.useState(!1),[a,c]=p.useState(!1);return wbe(()=>o(!0)),p.useEffect(()=>{const l=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:p.createElement(rU,{asChild:!0},p.createElement(VU,n,i&&p.createElement(p.Fragment,null,s.label," ",r)))},mbe="ToastAction",gbe=p.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?p.createElement(oW,{altText:r,asChild:!0},p.createElement(xbe,Ve({},n,{ref:e}))):null});gbe.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${mbe}\``)}};const bbe="ToastClose",xbe=p.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=vbe(bbe,r);return p.createElement(oW,{asChild:!0},p.createElement(ht.button,Ve({type:"button"},n,{ref:e,onClick:Me(t.onClick,s.onClose)})))}),oW=p.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return p.createElement(ht.div,Ve({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},s,{ref:e}))});function aW(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),Cbe(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...aW(n))}}),e}function _p(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?m7(s,i):s.dispatchEvent(i)}const JP=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function wbe(t=()=>{}){const e=pi(t);mi(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function Cbe(t){return t.nodeType===t.ELEMENT_NODE}Rr({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});p.createContext(null);var Ebe="_15pztn1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _15pztn0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11od fyvr12s1 fyvr12o1 fyvr12wj fyvr128 fyvr11h0",kbe="_15pztn2";p.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",name:f,rows:u,resize:d=!1,...h}=t;return Z.jsx(su,{description:i,disabled:o,display:"grid",id:a??f,label:c,labelLocation:l,children:Z.jsx(K,{as:r,autoComplete:n,spellCheck:"false",className:Ws(Ebe,d&&kbe),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:s,...h})})});var Sbe=Rr({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:[]}),Abe="bnrrebf",$be="bnrrebh bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11sj fyvr128 fyvr15o fyvr11h0";p.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:s,src:i,symbol:o,size:a="md",...c}=t;return Z.jsx(K,{className:Ws(r,Sbe({borderRadius:e,size:a})),style:s,flexShrink:"0",...c,children:i?Z.jsx(Fr,{className:Abe,disableAnimation:n,src:i}):Z.jsx(he,{className:$be,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})});const[wx,lFe]=Bn("Tooltip",[j1]);j1();const _be="TooltipProvider";wx(_be);const cW="Tooltip";wx(cW);const Pbe="TooltipPortal";wx(Pbe,{forceMount:void 0});wx(cW,{isInside:!1});const lW=(t,e={})=>{const r=new Map().set("isMobile",`@media screen and (max-width: ${vP.lg-1}px)`).set("isDesktop",`@media screen and (min-width: ${vP.lg}px)`);if(!t.startsWith("@media")){const c=r.get(t);if(!c||c==="")throw new Error(`useMediaQuery failed to get breakpoint from theme for: ${t}`);t=c}const n=t.replace(/^@media( ?)/m,""),s=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1}=e,[o,a]=p.useState(()=>s?window.matchMedia(n).matches:i);return p.useEffect(()=>{let c=!0;if(!s)return;const l=window.matchMedia(n),f=()=>{c&&a(l.matches)};return f(),l.addListener(f),()=>{c=!1,l.removeListener(f)}},[n,s]),o};function Ibe(t={}){const{nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n}=t,[s,i]=p.useState(!1),o=p.useRef(r);o.current=r;const a=p.useRef(n);return a.current=n,p.useEffect(()=>{const c=document.createElement("script");return c.src="https://accounts.google.com/gsi/client",c.async=!0,c.defer=!0,c.nonce=e,c.onload=()=>{var l;i(!0),(l=o.current)===null||l===void 0||l.call(o)},c.onerror=()=>{var l;i(!1),(l=a.current)===null||l===void 0||l.call(a)},document.body.appendChild(c),()=>{document.body.removeChild(c)}},[e]),s}const fW=p.createContext(null);function Tbe({clientId:t,nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n,children:s}){const i=Ibe({nonce:e,onScriptLoadSuccess:r,onScriptLoadError:n}),o=p.useMemo(()=>({clientId:t,scriptLoadedSuccessfully:i}),[t,i]);return w.createElement(fW.Provider,{value:o},s)}function Obe(){const t=p.useContext(fW);if(!t)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return t}function Rbe(t){var e;return(e=t==null?void 0:t.clientId)!==null&&e!==void 0?e:t==null?void 0:t.client_id}const Mbe={large:40,medium:32,small:20};function Nbe({onSuccess:t,onError:e,useOneTap:r,promptMomentNotification:n,type:s="standard",theme:i="outline",size:o="large",text:a,shape:c,logo_alignment:l,width:f,locale:u,click_listener:d,containerProps:h,...v}){const y=p.useRef(null),{clientId:m,scriptLoadedSuccessfully:g}=Obe(),b=p.useRef(t);b.current=t;const x=p.useRef(e);x.current=e;const k=p.useRef(n);return k.current=n,p.useEffect(()=>{var $,I,M,D,H,G,V,Q,F;if(g)return(M=(I=($=window==null?void 0:window.google)===null||$===void 0?void 0:$.accounts)===null||I===void 0?void 0:I.id)===null||M===void 0||M.initialize({client_id:m,callback:C=>{var S;if(!(C!=null&&C.credential))return(S=x.current)===null||S===void 0?void 0:S.call(x);const{credential:T,select_by:R}=C;b.current({credential:T,clientId:Rbe(C),select_by:R})},...v}),(G=(H=(D=window==null?void 0:window.google)===null||D===void 0?void 0:D.accounts)===null||H===void 0?void 0:H.id)===null||G===void 0||G.renderButton(y.current,{type:s,theme:i,size:o,text:a,shape:c,logo_alignment:l,width:f,locale:u,click_listener:d}),r&&((F=(Q=(V=window==null?void 0:window.google)===null||V===void 0?void 0:V.accounts)===null||Q===void 0?void 0:Q.id)===null||F===void 0||F.prompt(k.current)),()=>{var C,S,T;r&&((T=(S=(C=window==null?void 0:window.google)===null||C===void 0?void 0:C.accounts)===null||S===void 0?void 0:S.id)===null||T===void 0||T.cancel())}},[m,g,r,s,i,o,a,c,l,f,u]),w.createElement("div",{...h,ref:y,style:{height:Mbe[o],...h==null?void 0:h.style}})}const uW={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"},jbe={...uW,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)"},Dbe={...uW,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)"},Lbe={dark:jbe,light:Dbe},Bbe={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 XP={colors:{black:"var(--seq-colors-black)",white:"var(--seq-colors-white)",inherit:"var(--seq-colors-inherit)",transparent:"var(--seq-colors-transparent)",positive:"var(--seq-colors-positive)",negative:"var(--seq-colors-negative)",info:"var(--seq-colors-info)",warning:"var(--seq-colors-warning)",gradientBackdrop:"var(--seq-colors-gradient-backdrop)",gradientPrimary:"var(--seq-colors-gradient-primary)",gradientSecondary:"var(--seq-colors-gradient-secondary)",arbitrumDark:"var(--seq-colors-arbitrum-dark)",arbitrumLight:"var(--seq-colors-arbitrum-light)",avalanceDark:"var(--seq-colors-avalance-dark)",avalanceLight:"var(--seq-colors-avalance-light)",bscDark:"var(--seq-colors-bsc-dark)",bscLight:"var(--seq-colors-bsc-light)",ethereumDark:"var(--seq-colors-ethereum-dark)",ethereumLight:"var(--seq-colors-ethereum-light)",gnosisDark:"var(--seq-colors-gnosis-dark)",gnosisLight:"var(--seq-colors-gnosis-light)",polygonDark:"var(--seq-colors-polygon-dark)",polygonLight:"var(--seq-colors-polygon-light)",text100:"var(--seq-colors-text100)",text80:"var(--seq-colors-text80)",text50:"var(--seq-colors-text50)",textInverse100:"var(--seq-colors-text-inverse100)",backgroundPrimary:"var(--seq-colors-background-primary)",backgroundSecondary:"var(--seq-colors-background-secondary)",backgroundContrast:"var(--seq-colors-background-contrast)",backgroundMuted:"var(--seq-colors-background-muted)",backgroundControl:"var(--seq-colors-background-control)",backgroundInverse:"var(--seq-colors-background-inverse)",backgroundBackdrop:"var(--seq-colors-background-backdrop)",backgroundOverlay:"var(--seq-colors-background-overlay)",backgroundRaised:"var(--seq-colors-background-raised)",buttonGlass:"var(--seq-colors-button-glass)",buttonEmphasis:"var(--seq-colors-button-emphasis)",buttonInverse:"var(--seq-colors-button-inverse)",borderNormal:"var(--seq-colors-border-normal)",borderFocus:"var(--seq-colors-border-focus)"}},_u={blur:{blur:"var(--seq-blur-blur)",none:"var(--seq-blur-none)"},borderWidths:{none:"var(--seq-border-widths-none)",thin:"var(--seq-border-widths-thin)",thick:"var(--seq-border-widths-thick)"},fonts:{inherit:"var(--seq-fonts-inherit)",body:"var(--seq-fonts-body)",mono:"var(--seq-fonts-mono)"},fontSizes:{inherit:"var(--seq-font-sizes-inherit)",xsmall:"var(--seq-font-sizes-xsmall)",small:"var(--seq-font-sizes-small)",normal:"var(--seq-font-sizes-normal)",medium:"var(--seq-font-sizes-medium)",large:"var(--seq-font-sizes-large)",xlarge:"var(--seq-font-sizes-xlarge)"},fontWeights:{inherit:"var(--seq-font-weights-inherit)",normal:"var(--seq-font-weights-normal)",medium:"var(--seq-font-weights-medium)",semibold:"var(--seq-font-weights-semibold)",bold:"var(--seq-font-weights-bold)"},letterSpacings:{inherit:"var(--seq-letter-spacings-inherit)",none:"var(--seq-letter-spacings-none)",normal:"var(--seq-letter-spacings-normal)",wide:"var(--seq-letter-spacings-wide)"},lineHeights:{4:"var(--seq-line-heights-4)",5:"var(--seq-line-heights-5)",6:"var(--seq-line-heights-6)",7:"var(--seq-line-heights-7)",9:"var(--seq-line-heights-9)",inherit:"var(--seq-line-heights-inherit)"},opacity:{0:"var(--seq-opacity-0)",50:"var(--seq-opacity-50)",80:"var(--seq-opacity-80)",100:"var(--seq-opacity-100)"},radii:{none:"var(--seq-radii-none)",xs:"var(--seq-radii-xs)",sm:"var(--seq-radii-sm)",md:"var(--seq-radii-md)",lg:"var(--seq-radii-lg)",circle:"var(--seq-radii-circle)"},space:{0:"var(--seq-space-0)",1:"var(--seq-space-1)",2:"var(--seq-space-2)",3:"var(--seq-space-3)",4:"var(--seq-space-4)",5:"var(--seq-space-5)",6:"var(--seq-space-6)",7:"var(--seq-space-7)",8:"var(--seq-space-8)",9:"var(--seq-space-9)",10:"var(--seq-space-10)",12:"var(--seq-space-12)",14:"var(--seq-space-14)",16:"var(--seq-space-16)","0.25":"var(--seq-space-0_25)","0.5":"var(--seq-space-0_5)","1.5":"var(--seq-space-1_5)"},colors:{black:"var(--seq-colors-black)",white:"var(--seq-colors-white)",inherit:"var(--seq-colors-inherit)",transparent:"var(--seq-colors-transparent)",positive:"var(--seq-colors-positive)",negative:"var(--seq-colors-negative)",info:"var(--seq-colors-info)",warning:"var(--seq-colors-warning)",gradientBackdrop:"var(--seq-colors-gradient-backdrop)",gradientPrimary:"var(--seq-colors-gradient-primary)",gradientSecondary:"var(--seq-colors-gradient-secondary)",arbitrumDark:"var(--seq-colors-arbitrum-dark)",arbitrumLight:"var(--seq-colors-arbitrum-light)",avalanceDark:"var(--seq-colors-avalance-dark)",avalanceLight:"var(--seq-colors-avalance-light)",bscDark:"var(--seq-colors-bsc-dark)",bscLight:"var(--seq-colors-bsc-light)",ethereumDark:"var(--seq-colors-ethereum-dark)",ethereumLight:"var(--seq-colors-ethereum-light)",gnosisDark:"var(--seq-colors-gnosis-dark)",gnosisLight:"var(--seq-colors-gnosis-light)",polygonDark:"var(--seq-colors-polygon-dark)",polygonLight:"var(--seq-colors-polygon-light)",text100:"var(--seq-colors-text100)",text80:"var(--seq-colors-text80)",text50:"var(--seq-colors-text50)",textInverse100:"var(--seq-colors-text-inverse100)",backgroundPrimary:"var(--seq-colors-background-primary)",backgroundSecondary:"var(--seq-colors-background-secondary)",backgroundContrast:"var(--seq-colors-background-contrast)",backgroundMuted:"var(--seq-colors-background-muted)",backgroundControl:"var(--seq-colors-background-control)",backgroundInverse:"var(--seq-colors-background-inverse)",backgroundBackdrop:"var(--seq-colors-background-backdrop)",backgroundOverlay:"var(--seq-colors-background-overlay)",backgroundRaised:"var(--seq-colors-background-raised)",buttonGlass:"var(--seq-colors-button-glass)",buttonEmphasis:"var(--seq-colors-button-emphasis)",buttonInverse:"var(--seq-colors-button-inverse)",borderNormal:"var(--seq-colors-border-normal)",borderFocus:"var(--seq-colors-border-focus)"}};function Fbe(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 zbe(t){var e=Fbe(t,"string");return typeof e=="symbol"?e:String(e)}function qbe(t,e,r){return e=zbe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ZP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function r6(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nc.styles)),i=Object.keys(s),o=i.filter(c=>"mappings"in s[c]),a=c=>{var l=[],f={},u=r6({},c),d=!1;for(var h of o){var v=c[h];if(v!=null){var y=s[h];d=!0;for(var m of y.mappings)f[m]=v,u[m]==null&&delete u[m]}}var g=d?r6(r6({},f),u):c,b=function(){var I=g[x],M=s[x];try{if(M.mappings)return"continue";if(typeof I=="string"||typeof I=="number")l.push(M.values[I].defaultClass);else if(Array.isArray(I))for(var D=0;Dt,Hbe=function(){return Ube(Wbe)(...arguments)},dW=Hbe({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"}}},textDecoration:{values:{none:{defaultClass:"fyvr11n2"},underline:{defaultClass:"fyvr11n3"}}},userSelect:{values:{none:{defaultClass:"fyvr11n4"},text:{defaultClass:"fyvr11n5"},all:{defaultClass:"fyvr11n6"},auto:{defaultClass:"fyvr11n7"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11n8"},nowrap:{defaultClass:"fyvr11n9"},initial:{defaultClass:"fyvr11na"},inherit:{defaultClass:"fyvr11nb"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11nc"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11nd"},"break-word":{defaultClass:"fyvr11ne"},initial:{defaultClass:"fyvr11nf"},inherit:{defaultClass:"fyvr11ng"}}},zIndex:{values:{0:{defaultClass:"fyvr11nh"},1:{defaultClass:"fyvr11ni"},10:{defaultClass:"fyvr11nj"},20:{defaultClass:"fyvr11nk"},30:{defaultClass:"fyvr11nl"},40:{defaultClass:"fyvr11nm"},50:{defaultClass:"fyvr11nn"},"-1":{defaultClass:"fyvr11no"},auto:{defaultClass:"fyvr11np"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11nq"},"16/9":{defaultClass:"fyvr11nr"},"4/3":{defaultClass:"fyvr11ns"},"3/1":{defaultClass:"fyvr11nt"},auto:{defaultClass:"fyvr11nu"}}}}},{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:"fyvr11nv",active:"fyvr11nw",disabled:"fyvr11nx",focus:"fyvr11ny",hover:"fyvr11nz",checked:"fyvr11o0"},defaultClass:"fyvr11nv"},white:{conditions:{base:"fyvr11o1",active:"fyvr11o2",disabled:"fyvr11o3",focus:"fyvr11o4",hover:"fyvr11o5",checked:"fyvr11o6"},defaultClass:"fyvr11o1"},inherit:{conditions:{base:"fyvr11o7",active:"fyvr11o8",disabled:"fyvr11o9",focus:"fyvr11oa",hover:"fyvr11ob",checked:"fyvr11oc"},defaultClass:"fyvr11o7"},transparent:{conditions:{base:"fyvr11od",active:"fyvr11oe",disabled:"fyvr11of",focus:"fyvr11og",hover:"fyvr11oh",checked:"fyvr11oi"},defaultClass:"fyvr11od"},positive:{conditions:{base:"fyvr11oj",active:"fyvr11ok",disabled:"fyvr11ol",focus:"fyvr11om",hover:"fyvr11on",checked:"fyvr11oo"},defaultClass:"fyvr11oj"},negative:{conditions:{base:"fyvr11op",active:"fyvr11oq",disabled:"fyvr11or",focus:"fyvr11os",hover:"fyvr11ot",checked:"fyvr11ou"},defaultClass:"fyvr11op"},info:{conditions:{base:"fyvr11ov",active:"fyvr11ow",disabled:"fyvr11ox",focus:"fyvr11oy",hover:"fyvr11oz",checked:"fyvr11p0"},defaultClass:"fyvr11ov"},warning:{conditions:{base:"fyvr11p1",active:"fyvr11p2",disabled:"fyvr11p3",focus:"fyvr11p4",hover:"fyvr11p5",checked:"fyvr11p6"},defaultClass:"fyvr11p1"},gradientBackdrop:{conditions:{base:"fyvr11p7",active:"fyvr11p8",disabled:"fyvr11p9",focus:"fyvr11pa",hover:"fyvr11pb",checked:"fyvr11pc"},defaultClass:"fyvr11p7"},gradientPrimary:{conditions:{base:"fyvr11pd",active:"fyvr11pe",disabled:"fyvr11pf",focus:"fyvr11pg",hover:"fyvr11ph",checked:"fyvr11pi"},defaultClass:"fyvr11pd"},gradientSecondary:{conditions:{base:"fyvr11pj",active:"fyvr11pk",disabled:"fyvr11pl",focus:"fyvr11pm",hover:"fyvr11pn",checked:"fyvr11po"},defaultClass:"fyvr11pj"},arbitrumDark:{conditions:{base:"fyvr11pp",active:"fyvr11pq",disabled:"fyvr11pr",focus:"fyvr11ps",hover:"fyvr11pt",checked:"fyvr11pu"},defaultClass:"fyvr11pp"},arbitrumLight:{conditions:{base:"fyvr11pv",active:"fyvr11pw",disabled:"fyvr11px",focus:"fyvr11py",hover:"fyvr11pz",checked:"fyvr11q0"},defaultClass:"fyvr11pv"},avalanceDark:{conditions:{base:"fyvr11q1",active:"fyvr11q2",disabled:"fyvr11q3",focus:"fyvr11q4",hover:"fyvr11q5",checked:"fyvr11q6"},defaultClass:"fyvr11q1"},avalanceLight:{conditions:{base:"fyvr11q7",active:"fyvr11q8",disabled:"fyvr11q9",focus:"fyvr11qa",hover:"fyvr11qb",checked:"fyvr11qc"},defaultClass:"fyvr11q7"},bscDark:{conditions:{base:"fyvr11qd",active:"fyvr11qe",disabled:"fyvr11qf",focus:"fyvr11qg",hover:"fyvr11qh",checked:"fyvr11qi"},defaultClass:"fyvr11qd"},bscLight:{conditions:{base:"fyvr11qj",active:"fyvr11qk",disabled:"fyvr11ql",focus:"fyvr11qm",hover:"fyvr11qn",checked:"fyvr11qo"},defaultClass:"fyvr11qj"},ethereumDark:{conditions:{base:"fyvr11qp",active:"fyvr11qq",disabled:"fyvr11qr",focus:"fyvr11qs",hover:"fyvr11qt",checked:"fyvr11qu"},defaultClass:"fyvr11qp"},ethereumLight:{conditions:{base:"fyvr11qv",active:"fyvr11qw",disabled:"fyvr11qx",focus:"fyvr11qy",hover:"fyvr11qz",checked:"fyvr11r0"},defaultClass:"fyvr11qv"},gnosisDark:{conditions:{base:"fyvr11r1",active:"fyvr11r2",disabled:"fyvr11r3",focus:"fyvr11r4",hover:"fyvr11r5",checked:"fyvr11r6"},defaultClass:"fyvr11r1"},gnosisLight:{conditions:{base:"fyvr11r7",active:"fyvr11r8",disabled:"fyvr11r9",focus:"fyvr11ra",hover:"fyvr11rb",checked:"fyvr11rc"},defaultClass:"fyvr11r7"},polygonDark:{conditions:{base:"fyvr11rd",active:"fyvr11re",disabled:"fyvr11rf",focus:"fyvr11rg",hover:"fyvr11rh",checked:"fyvr11ri"},defaultClass:"fyvr11rd"},polygonLight:{conditions:{base:"fyvr11rj",active:"fyvr11rk",disabled:"fyvr11rl",focus:"fyvr11rm",hover:"fyvr11rn",checked:"fyvr11ro"},defaultClass:"fyvr11rj"},text100:{conditions:{base:"fyvr11rp",active:"fyvr11rq",disabled:"fyvr11rr",focus:"fyvr11rs",hover:"fyvr11rt",checked:"fyvr11ru"},defaultClass:"fyvr11rp"},text80:{conditions:{base:"fyvr11rv",active:"fyvr11rw",disabled:"fyvr11rx",focus:"fyvr11ry",hover:"fyvr11rz",checked:"fyvr11s0"},defaultClass:"fyvr11rv"},text50:{conditions:{base:"fyvr11s1",active:"fyvr11s2",disabled:"fyvr11s3",focus:"fyvr11s4",hover:"fyvr11s5",checked:"fyvr11s6"},defaultClass:"fyvr11s1"},textInverse100:{conditions:{base:"fyvr11s7",active:"fyvr11s8",disabled:"fyvr11s9",focus:"fyvr11sa",hover:"fyvr11sb",checked:"fyvr11sc"},defaultClass:"fyvr11s7"},backgroundPrimary:{conditions:{base:"fyvr11sd",active:"fyvr11se",disabled:"fyvr11sf",focus:"fyvr11sg",hover:"fyvr11sh",checked:"fyvr11si"},defaultClass:"fyvr11sd"},backgroundSecondary:{conditions:{base:"fyvr11sj",active:"fyvr11sk",disabled:"fyvr11sl",focus:"fyvr11sm",hover:"fyvr11sn",checked:"fyvr11so"},defaultClass:"fyvr11sj"},backgroundContrast:{conditions:{base:"fyvr11sp",active:"fyvr11sq",disabled:"fyvr11sr",focus:"fyvr11ss",hover:"fyvr11st",checked:"fyvr11su"},defaultClass:"fyvr11sp"},backgroundMuted:{conditions:{base:"fyvr11sv",active:"fyvr11sw",disabled:"fyvr11sx",focus:"fyvr11sy",hover:"fyvr11sz",checked:"fyvr11t0"},defaultClass:"fyvr11sv"},backgroundControl:{conditions:{base:"fyvr11t1",active:"fyvr11t2",disabled:"fyvr11t3",focus:"fyvr11t4",hover:"fyvr11t5",checked:"fyvr11t6"},defaultClass:"fyvr11t1"},backgroundInverse:{conditions:{base:"fyvr11t7",active:"fyvr11t8",disabled:"fyvr11t9",focus:"fyvr11ta",hover:"fyvr11tb",checked:"fyvr11tc"},defaultClass:"fyvr11t7"},backgroundBackdrop:{conditions:{base:"fyvr11td",active:"fyvr11te",disabled:"fyvr11tf",focus:"fyvr11tg",hover:"fyvr11th",checked:"fyvr11ti"},defaultClass:"fyvr11td"},backgroundOverlay:{conditions:{base:"fyvr11tj",active:"fyvr11tk",disabled:"fyvr11tl",focus:"fyvr11tm",hover:"fyvr11tn",checked:"fyvr11to"},defaultClass:"fyvr11tj"},backgroundRaised:{conditions:{base:"fyvr11tp",active:"fyvr11tq",disabled:"fyvr11tr",focus:"fyvr11ts",hover:"fyvr11tt",checked:"fyvr11tu"},defaultClass:"fyvr11tp"},buttonGlass:{conditions:{base:"fyvr11tv",active:"fyvr11tw",disabled:"fyvr11tx",focus:"fyvr11ty",hover:"fyvr11tz",checked:"fyvr11u0"},defaultClass:"fyvr11tv"},buttonEmphasis:{conditions:{base:"fyvr11u1",active:"fyvr11u2",disabled:"fyvr11u3",focus:"fyvr11u4",hover:"fyvr11u5",checked:"fyvr11u6"},defaultClass:"fyvr11u1"},buttonInverse:{conditions:{base:"fyvr11u7",active:"fyvr11u8",disabled:"fyvr11u9",focus:"fyvr11ua",hover:"fyvr11ub",checked:"fyvr11uc"},defaultClass:"fyvr11u7"},borderNormal:{conditions:{base:"fyvr11ud",active:"fyvr11ue",disabled:"fyvr11uf",focus:"fyvr11ug",hover:"fyvr11uh",checked:"fyvr11ui"},defaultClass:"fyvr11ud"},borderFocus:{conditions:{base:"fyvr11uj",active:"fyvr11uk",disabled:"fyvr11ul",focus:"fyvr11um",hover:"fyvr11un",checked:"fyvr11uo"},defaultClass:"fyvr11uj"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11up",active:"fyvr11uq",disabled:"fyvr11ur",focus:"fyvr11us",hover:"fyvr11ut",checked:"fyvr11uu"},defaultClass:"fyvr11up"},white:{conditions:{base:"fyvr11uv",active:"fyvr11uw",disabled:"fyvr11ux",focus:"fyvr11uy",hover:"fyvr11uz",checked:"fyvr11v0"},defaultClass:"fyvr11uv"},inherit:{conditions:{base:"fyvr11v1",active:"fyvr11v2",disabled:"fyvr11v3",focus:"fyvr11v4",hover:"fyvr11v5",checked:"fyvr11v6"},defaultClass:"fyvr11v1"},transparent:{conditions:{base:"fyvr11v7",active:"fyvr11v8",disabled:"fyvr11v9",focus:"fyvr11va",hover:"fyvr11vb",checked:"fyvr11vc"},defaultClass:"fyvr11v7"},positive:{conditions:{base:"fyvr11vd",active:"fyvr11ve",disabled:"fyvr11vf",focus:"fyvr11vg",hover:"fyvr11vh",checked:"fyvr11vi"},defaultClass:"fyvr11vd"},negative:{conditions:{base:"fyvr11vj",active:"fyvr11vk",disabled:"fyvr11vl",focus:"fyvr11vm",hover:"fyvr11vn",checked:"fyvr11vo"},defaultClass:"fyvr11vj"},info:{conditions:{base:"fyvr11vp",active:"fyvr11vq",disabled:"fyvr11vr",focus:"fyvr11vs",hover:"fyvr11vt",checked:"fyvr11vu"},defaultClass:"fyvr11vp"},warning:{conditions:{base:"fyvr11vv",active:"fyvr11vw",disabled:"fyvr11vx",focus:"fyvr11vy",hover:"fyvr11vz",checked:"fyvr11w0"},defaultClass:"fyvr11vv"},gradientBackdrop:{conditions:{base:"fyvr11w1",active:"fyvr11w2",disabled:"fyvr11w3",focus:"fyvr11w4",hover:"fyvr11w5",checked:"fyvr11w6"},defaultClass:"fyvr11w1"},gradientPrimary:{conditions:{base:"fyvr11w7",active:"fyvr11w8",disabled:"fyvr11w9",focus:"fyvr11wa",hover:"fyvr11wb",checked:"fyvr11wc"},defaultClass:"fyvr11w7"},gradientSecondary:{conditions:{base:"fyvr11wd",active:"fyvr11we",disabled:"fyvr11wf",focus:"fyvr11wg",hover:"fyvr11wh",checked:"fyvr11wi"},defaultClass:"fyvr11wd"},arbitrumDark:{conditions:{base:"fyvr11wj",active:"fyvr11wk",disabled:"fyvr11wl",focus:"fyvr11wm",hover:"fyvr11wn",checked:"fyvr11wo"},defaultClass:"fyvr11wj"},arbitrumLight:{conditions:{base:"fyvr11wp",active:"fyvr11wq",disabled:"fyvr11wr",focus:"fyvr11ws",hover:"fyvr11wt",checked:"fyvr11wu"},defaultClass:"fyvr11wp"},avalanceDark:{conditions:{base:"fyvr11wv",active:"fyvr11ww",disabled:"fyvr11wx",focus:"fyvr11wy",hover:"fyvr11wz",checked:"fyvr11x0"},defaultClass:"fyvr11wv"},avalanceLight:{conditions:{base:"fyvr11x1",active:"fyvr11x2",disabled:"fyvr11x3",focus:"fyvr11x4",hover:"fyvr11x5",checked:"fyvr11x6"},defaultClass:"fyvr11x1"},bscDark:{conditions:{base:"fyvr11x7",active:"fyvr11x8",disabled:"fyvr11x9",focus:"fyvr11xa",hover:"fyvr11xb",checked:"fyvr11xc"},defaultClass:"fyvr11x7"},bscLight:{conditions:{base:"fyvr11xd",active:"fyvr11xe",disabled:"fyvr11xf",focus:"fyvr11xg",hover:"fyvr11xh",checked:"fyvr11xi"},defaultClass:"fyvr11xd"},ethereumDark:{conditions:{base:"fyvr11xj",active:"fyvr11xk",disabled:"fyvr11xl",focus:"fyvr11xm",hover:"fyvr11xn",checked:"fyvr11xo"},defaultClass:"fyvr11xj"},ethereumLight:{conditions:{base:"fyvr11xp",active:"fyvr11xq",disabled:"fyvr11xr",focus:"fyvr11xs",hover:"fyvr11xt",checked:"fyvr11xu"},defaultClass:"fyvr11xp"},gnosisDark:{conditions:{base:"fyvr11xv",active:"fyvr11xw",disabled:"fyvr11xx",focus:"fyvr11xy",hover:"fyvr11xz",checked:"fyvr11y0"},defaultClass:"fyvr11xv"},gnosisLight:{conditions:{base:"fyvr11y1",active:"fyvr11y2",disabled:"fyvr11y3",focus:"fyvr11y4",hover:"fyvr11y5",checked:"fyvr11y6"},defaultClass:"fyvr11y1"},polygonDark:{conditions:{base:"fyvr11y7",active:"fyvr11y8",disabled:"fyvr11y9",focus:"fyvr11ya",hover:"fyvr11yb",checked:"fyvr11yc"},defaultClass:"fyvr11y7"},polygonLight:{conditions:{base:"fyvr11yd",active:"fyvr11ye",disabled:"fyvr11yf",focus:"fyvr11yg",hover:"fyvr11yh",checked:"fyvr11yi"},defaultClass:"fyvr11yd"},text100:{conditions:{base:"fyvr11yj",active:"fyvr11yk",disabled:"fyvr11yl",focus:"fyvr11ym",hover:"fyvr11yn",checked:"fyvr11yo"},defaultClass:"fyvr11yj"},text80:{conditions:{base:"fyvr11yp",active:"fyvr11yq",disabled:"fyvr11yr",focus:"fyvr11ys",hover:"fyvr11yt",checked:"fyvr11yu"},defaultClass:"fyvr11yp"},text50:{conditions:{base:"fyvr11yv",active:"fyvr11yw",disabled:"fyvr11yx",focus:"fyvr11yy",hover:"fyvr11yz",checked:"fyvr11z0"},defaultClass:"fyvr11yv"},textInverse100:{conditions:{base:"fyvr11z1",active:"fyvr11z2",disabled:"fyvr11z3",focus:"fyvr11z4",hover:"fyvr11z5",checked:"fyvr11z6"},defaultClass:"fyvr11z1"},backgroundPrimary:{conditions:{base:"fyvr11z7",active:"fyvr11z8",disabled:"fyvr11z9",focus:"fyvr11za",hover:"fyvr11zb",checked:"fyvr11zc"},defaultClass:"fyvr11z7"},backgroundSecondary:{conditions:{base:"fyvr11zd",active:"fyvr11ze",disabled:"fyvr11zf",focus:"fyvr11zg",hover:"fyvr11zh",checked:"fyvr11zi"},defaultClass:"fyvr11zd"},backgroundContrast:{conditions:{base:"fyvr11zj",active:"fyvr11zk",disabled:"fyvr11zl",focus:"fyvr11zm",hover:"fyvr11zn",checked:"fyvr11zo"},defaultClass:"fyvr11zj"},backgroundMuted:{conditions:{base:"fyvr11zp",active:"fyvr11zq",disabled:"fyvr11zr",focus:"fyvr11zs",hover:"fyvr11zt",checked:"fyvr11zu"},defaultClass:"fyvr11zp"},backgroundControl:{conditions:{base:"fyvr11zv",active:"fyvr11zw",disabled:"fyvr11zx",focus:"fyvr11zy",hover:"fyvr11zz",checked:"fyvr1200"},defaultClass:"fyvr11zv"},backgroundInverse:{conditions:{base:"fyvr1201",active:"fyvr1202",disabled:"fyvr1203",focus:"fyvr1204",hover:"fyvr1205",checked:"fyvr1206"},defaultClass:"fyvr1201"},backgroundBackdrop:{conditions:{base:"fyvr1207",active:"fyvr1208",disabled:"fyvr1209",focus:"fyvr120a",hover:"fyvr120b",checked:"fyvr120c"},defaultClass:"fyvr1207"},backgroundOverlay:{conditions:{base:"fyvr120d",active:"fyvr120e",disabled:"fyvr120f",focus:"fyvr120g",hover:"fyvr120h",checked:"fyvr120i"},defaultClass:"fyvr120d"},backgroundRaised:{conditions:{base:"fyvr120j",active:"fyvr120k",disabled:"fyvr120l",focus:"fyvr120m",hover:"fyvr120n",checked:"fyvr120o"},defaultClass:"fyvr120j"},buttonGlass:{conditions:{base:"fyvr120p",active:"fyvr120q",disabled:"fyvr120r",focus:"fyvr120s",hover:"fyvr120t",checked:"fyvr120u"},defaultClass:"fyvr120p"},buttonEmphasis:{conditions:{base:"fyvr120v",active:"fyvr120w",disabled:"fyvr120x",focus:"fyvr120y",hover:"fyvr120z",checked:"fyvr1210"},defaultClass:"fyvr120v"},buttonInverse:{conditions:{base:"fyvr1211",active:"fyvr1212",disabled:"fyvr1213",focus:"fyvr1214",hover:"fyvr1215",checked:"fyvr1216"},defaultClass:"fyvr1211"},borderNormal:{conditions:{base:"fyvr1217",active:"fyvr1218",disabled:"fyvr1219",focus:"fyvr121a",hover:"fyvr121b",checked:"fyvr121c"},defaultClass:"fyvr1217"},borderFocus:{conditions:{base:"fyvr121d",active:"fyvr121e",disabled:"fyvr121f",focus:"fyvr121g",hover:"fyvr121h",checked:"fyvr121i"},defaultClass:"fyvr121d"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr121j",active:"fyvr121k",disabled:"fyvr121l",focus:"fyvr121m",hover:"fyvr121n",checked:"fyvr121o"},defaultClass:"fyvr121j"},dashed:{conditions:{base:"fyvr121p",active:"fyvr121q",disabled:"fyvr121r",focus:"fyvr121s",hover:"fyvr121t",checked:"fyvr121u"},defaultClass:"fyvr121p"},dotted:{conditions:{base:"fyvr121v",active:"fyvr121w",disabled:"fyvr121x",focus:"fyvr121y",hover:"fyvr121z",checked:"fyvr1220"},defaultClass:"fyvr121v"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr1221",active:"fyvr1222",disabled:"fyvr1223",focus:"fyvr1224",hover:"fyvr1225",checked:"fyvr1226"},defaultClass:"fyvr1221"},white:{conditions:{base:"fyvr1227",active:"fyvr1228",disabled:"fyvr1229",focus:"fyvr122a",hover:"fyvr122b",checked:"fyvr122c"},defaultClass:"fyvr1227"},inherit:{conditions:{base:"fyvr122d",active:"fyvr122e",disabled:"fyvr122f",focus:"fyvr122g",hover:"fyvr122h",checked:"fyvr122i"},defaultClass:"fyvr122d"},transparent:{conditions:{base:"fyvr122j",active:"fyvr122k",disabled:"fyvr122l",focus:"fyvr122m",hover:"fyvr122n",checked:"fyvr122o"},defaultClass:"fyvr122j"},positive:{conditions:{base:"fyvr122p",active:"fyvr122q",disabled:"fyvr122r",focus:"fyvr122s",hover:"fyvr122t",checked:"fyvr122u"},defaultClass:"fyvr122p"},negative:{conditions:{base:"fyvr122v",active:"fyvr122w",disabled:"fyvr122x",focus:"fyvr122y",hover:"fyvr122z",checked:"fyvr1230"},defaultClass:"fyvr122v"},info:{conditions:{base:"fyvr1231",active:"fyvr1232",disabled:"fyvr1233",focus:"fyvr1234",hover:"fyvr1235",checked:"fyvr1236"},defaultClass:"fyvr1231"},warning:{conditions:{base:"fyvr1237",active:"fyvr1238",disabled:"fyvr1239",focus:"fyvr123a",hover:"fyvr123b",checked:"fyvr123c"},defaultClass:"fyvr1237"},gradientBackdrop:{conditions:{base:"fyvr123d",active:"fyvr123e",disabled:"fyvr123f",focus:"fyvr123g",hover:"fyvr123h",checked:"fyvr123i"},defaultClass:"fyvr123d"},gradientPrimary:{conditions:{base:"fyvr123j",active:"fyvr123k",disabled:"fyvr123l",focus:"fyvr123m",hover:"fyvr123n",checked:"fyvr123o"},defaultClass:"fyvr123j"},gradientSecondary:{conditions:{base:"fyvr123p",active:"fyvr123q",disabled:"fyvr123r",focus:"fyvr123s",hover:"fyvr123t",checked:"fyvr123u"},defaultClass:"fyvr123p"},arbitrumDark:{conditions:{base:"fyvr123v",active:"fyvr123w",disabled:"fyvr123x",focus:"fyvr123y",hover:"fyvr123z",checked:"fyvr1240"},defaultClass:"fyvr123v"},arbitrumLight:{conditions:{base:"fyvr1241",active:"fyvr1242",disabled:"fyvr1243",focus:"fyvr1244",hover:"fyvr1245",checked:"fyvr1246"},defaultClass:"fyvr1241"},avalanceDark:{conditions:{base:"fyvr1247",active:"fyvr1248",disabled:"fyvr1249",focus:"fyvr124a",hover:"fyvr124b",checked:"fyvr124c"},defaultClass:"fyvr1247"},avalanceLight:{conditions:{base:"fyvr124d",active:"fyvr124e",disabled:"fyvr124f",focus:"fyvr124g",hover:"fyvr124h",checked:"fyvr124i"},defaultClass:"fyvr124d"},bscDark:{conditions:{base:"fyvr124j",active:"fyvr124k",disabled:"fyvr124l",focus:"fyvr124m",hover:"fyvr124n",checked:"fyvr124o"},defaultClass:"fyvr124j"},bscLight:{conditions:{base:"fyvr124p",active:"fyvr124q",disabled:"fyvr124r",focus:"fyvr124s",hover:"fyvr124t",checked:"fyvr124u"},defaultClass:"fyvr124p"},ethereumDark:{conditions:{base:"fyvr124v",active:"fyvr124w",disabled:"fyvr124x",focus:"fyvr124y",hover:"fyvr124z",checked:"fyvr1250"},defaultClass:"fyvr124v"},ethereumLight:{conditions:{base:"fyvr1251",active:"fyvr1252",disabled:"fyvr1253",focus:"fyvr1254",hover:"fyvr1255",checked:"fyvr1256"},defaultClass:"fyvr1251"},gnosisDark:{conditions:{base:"fyvr1257",active:"fyvr1258",disabled:"fyvr1259",focus:"fyvr125a",hover:"fyvr125b",checked:"fyvr125c"},defaultClass:"fyvr1257"},gnosisLight:{conditions:{base:"fyvr125d",active:"fyvr125e",disabled:"fyvr125f",focus:"fyvr125g",hover:"fyvr125h",checked:"fyvr125i"},defaultClass:"fyvr125d"},polygonDark:{conditions:{base:"fyvr125j",active:"fyvr125k",disabled:"fyvr125l",focus:"fyvr125m",hover:"fyvr125n",checked:"fyvr125o"},defaultClass:"fyvr125j"},polygonLight:{conditions:{base:"fyvr125p",active:"fyvr125q",disabled:"fyvr125r",focus:"fyvr125s",hover:"fyvr125t",checked:"fyvr125u"},defaultClass:"fyvr125p"},text100:{conditions:{base:"fyvr125v",active:"fyvr125w",disabled:"fyvr125x",focus:"fyvr125y",hover:"fyvr125z",checked:"fyvr1260"},defaultClass:"fyvr125v"},text80:{conditions:{base:"fyvr1261",active:"fyvr1262",disabled:"fyvr1263",focus:"fyvr1264",hover:"fyvr1265",checked:"fyvr1266"},defaultClass:"fyvr1261"},text50:{conditions:{base:"fyvr1267",active:"fyvr1268",disabled:"fyvr1269",focus:"fyvr126a",hover:"fyvr126b",checked:"fyvr126c"},defaultClass:"fyvr1267"},textInverse100:{conditions:{base:"fyvr126d",active:"fyvr126e",disabled:"fyvr126f",focus:"fyvr126g",hover:"fyvr126h",checked:"fyvr126i"},defaultClass:"fyvr126d"},backgroundPrimary:{conditions:{base:"fyvr126j",active:"fyvr126k",disabled:"fyvr126l",focus:"fyvr126m",hover:"fyvr126n",checked:"fyvr126o"},defaultClass:"fyvr126j"},backgroundSecondary:{conditions:{base:"fyvr126p",active:"fyvr126q",disabled:"fyvr126r",focus:"fyvr126s",hover:"fyvr126t",checked:"fyvr126u"},defaultClass:"fyvr126p"},backgroundContrast:{conditions:{base:"fyvr126v",active:"fyvr126w",disabled:"fyvr126x",focus:"fyvr126y",hover:"fyvr126z",checked:"fyvr1270"},defaultClass:"fyvr126v"},backgroundMuted:{conditions:{base:"fyvr1271",active:"fyvr1272",disabled:"fyvr1273",focus:"fyvr1274",hover:"fyvr1275",checked:"fyvr1276"},defaultClass:"fyvr1271"},backgroundControl:{conditions:{base:"fyvr1277",active:"fyvr1278",disabled:"fyvr1279",focus:"fyvr127a",hover:"fyvr127b",checked:"fyvr127c"},defaultClass:"fyvr1277"},backgroundInverse:{conditions:{base:"fyvr127d",active:"fyvr127e",disabled:"fyvr127f",focus:"fyvr127g",hover:"fyvr127h",checked:"fyvr127i"},defaultClass:"fyvr127d"},backgroundBackdrop:{conditions:{base:"fyvr127j",active:"fyvr127k",disabled:"fyvr127l",focus:"fyvr127m",hover:"fyvr127n",checked:"fyvr127o"},defaultClass:"fyvr127j"},backgroundOverlay:{conditions:{base:"fyvr127p",active:"fyvr127q",disabled:"fyvr127r",focus:"fyvr127s",hover:"fyvr127t",checked:"fyvr127u"},defaultClass:"fyvr127p"},backgroundRaised:{conditions:{base:"fyvr127v",active:"fyvr127w",disabled:"fyvr127x",focus:"fyvr127y",hover:"fyvr127z",checked:"fyvr1280"},defaultClass:"fyvr127v"},buttonGlass:{conditions:{base:"fyvr1281",active:"fyvr1282",disabled:"fyvr1283",focus:"fyvr1284",hover:"fyvr1285",checked:"fyvr1286"},defaultClass:"fyvr1281"},buttonEmphasis:{conditions:{base:"fyvr1287",active:"fyvr1288",disabled:"fyvr1289",focus:"fyvr128a",hover:"fyvr128b",checked:"fyvr128c"},defaultClass:"fyvr1287"},buttonInverse:{conditions:{base:"fyvr128d",active:"fyvr128e",disabled:"fyvr128f",focus:"fyvr128g",hover:"fyvr128h",checked:"fyvr128i"},defaultClass:"fyvr128d"},borderNormal:{conditions:{base:"fyvr128j",active:"fyvr128k",disabled:"fyvr128l",focus:"fyvr128m",hover:"fyvr128n",checked:"fyvr128o"},defaultClass:"fyvr128j"},borderFocus:{conditions:{base:"fyvr128p",active:"fyvr128q",disabled:"fyvr128r",focus:"fyvr128s",hover:"fyvr128t",checked:"fyvr128u"},defaultClass:"fyvr128p"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128v",active:"fyvr128w",disabled:"fyvr128x",focus:"fyvr128y",hover:"fyvr128z",checked:"fyvr1290"},defaultClass:"fyvr128v"},dashed:{conditions:{base:"fyvr1291",active:"fyvr1292",disabled:"fyvr1293",focus:"fyvr1294",hover:"fyvr1295",checked:"fyvr1296"},defaultClass:"fyvr1291"},dotted:{conditions:{base:"fyvr1297",active:"fyvr1298",disabled:"fyvr1299",focus:"fyvr129a",hover:"fyvr129b",checked:"fyvr129c"},defaultClass:"fyvr1297"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr129d",active:"fyvr129e",disabled:"fyvr129f",focus:"fyvr129g",hover:"fyvr129h",checked:"fyvr129i"},defaultClass:"fyvr129d"},white:{conditions:{base:"fyvr129j",active:"fyvr129k",disabled:"fyvr129l",focus:"fyvr129m",hover:"fyvr129n",checked:"fyvr129o"},defaultClass:"fyvr129j"},inherit:{conditions:{base:"fyvr129p",active:"fyvr129q",disabled:"fyvr129r",focus:"fyvr129s",hover:"fyvr129t",checked:"fyvr129u"},defaultClass:"fyvr129p"},transparent:{conditions:{base:"fyvr129v",active:"fyvr129w",disabled:"fyvr129x",focus:"fyvr129y",hover:"fyvr129z",checked:"fyvr12a0"},defaultClass:"fyvr129v"},positive:{conditions:{base:"fyvr12a1",active:"fyvr12a2",disabled:"fyvr12a3",focus:"fyvr12a4",hover:"fyvr12a5",checked:"fyvr12a6"},defaultClass:"fyvr12a1"},negative:{conditions:{base:"fyvr12a7",active:"fyvr12a8",disabled:"fyvr12a9",focus:"fyvr12aa",hover:"fyvr12ab",checked:"fyvr12ac"},defaultClass:"fyvr12a7"},info:{conditions:{base:"fyvr12ad",active:"fyvr12ae",disabled:"fyvr12af",focus:"fyvr12ag",hover:"fyvr12ah",checked:"fyvr12ai"},defaultClass:"fyvr12ad"},warning:{conditions:{base:"fyvr12aj",active:"fyvr12ak",disabled:"fyvr12al",focus:"fyvr12am",hover:"fyvr12an",checked:"fyvr12ao"},defaultClass:"fyvr12aj"},gradientBackdrop:{conditions:{base:"fyvr12ap",active:"fyvr12aq",disabled:"fyvr12ar",focus:"fyvr12as",hover:"fyvr12at",checked:"fyvr12au"},defaultClass:"fyvr12ap"},gradientPrimary:{conditions:{base:"fyvr12av",active:"fyvr12aw",disabled:"fyvr12ax",focus:"fyvr12ay",hover:"fyvr12az",checked:"fyvr12b0"},defaultClass:"fyvr12av"},gradientSecondary:{conditions:{base:"fyvr12b1",active:"fyvr12b2",disabled:"fyvr12b3",focus:"fyvr12b4",hover:"fyvr12b5",checked:"fyvr12b6"},defaultClass:"fyvr12b1"},arbitrumDark:{conditions:{base:"fyvr12b7",active:"fyvr12b8",disabled:"fyvr12b9",focus:"fyvr12ba",hover:"fyvr12bb",checked:"fyvr12bc"},defaultClass:"fyvr12b7"},arbitrumLight:{conditions:{base:"fyvr12bd",active:"fyvr12be",disabled:"fyvr12bf",focus:"fyvr12bg",hover:"fyvr12bh",checked:"fyvr12bi"},defaultClass:"fyvr12bd"},avalanceDark:{conditions:{base:"fyvr12bj",active:"fyvr12bk",disabled:"fyvr12bl",focus:"fyvr12bm",hover:"fyvr12bn",checked:"fyvr12bo"},defaultClass:"fyvr12bj"},avalanceLight:{conditions:{base:"fyvr12bp",active:"fyvr12bq",disabled:"fyvr12br",focus:"fyvr12bs",hover:"fyvr12bt",checked:"fyvr12bu"},defaultClass:"fyvr12bp"},bscDark:{conditions:{base:"fyvr12bv",active:"fyvr12bw",disabled:"fyvr12bx",focus:"fyvr12by",hover:"fyvr12bz",checked:"fyvr12c0"},defaultClass:"fyvr12bv"},bscLight:{conditions:{base:"fyvr12c1",active:"fyvr12c2",disabled:"fyvr12c3",focus:"fyvr12c4",hover:"fyvr12c5",checked:"fyvr12c6"},defaultClass:"fyvr12c1"},ethereumDark:{conditions:{base:"fyvr12c7",active:"fyvr12c8",disabled:"fyvr12c9",focus:"fyvr12ca",hover:"fyvr12cb",checked:"fyvr12cc"},defaultClass:"fyvr12c7"},ethereumLight:{conditions:{base:"fyvr12cd",active:"fyvr12ce",disabled:"fyvr12cf",focus:"fyvr12cg",hover:"fyvr12ch",checked:"fyvr12ci"},defaultClass:"fyvr12cd"},gnosisDark:{conditions:{base:"fyvr12cj",active:"fyvr12ck",disabled:"fyvr12cl",focus:"fyvr12cm",hover:"fyvr12cn",checked:"fyvr12co"},defaultClass:"fyvr12cj"},gnosisLight:{conditions:{base:"fyvr12cp",active:"fyvr12cq",disabled:"fyvr12cr",focus:"fyvr12cs",hover:"fyvr12ct",checked:"fyvr12cu"},defaultClass:"fyvr12cp"},polygonDark:{conditions:{base:"fyvr12cv",active:"fyvr12cw",disabled:"fyvr12cx",focus:"fyvr12cy",hover:"fyvr12cz",checked:"fyvr12d0"},defaultClass:"fyvr12cv"},polygonLight:{conditions:{base:"fyvr12d1",active:"fyvr12d2",disabled:"fyvr12d3",focus:"fyvr12d4",hover:"fyvr12d5",checked:"fyvr12d6"},defaultClass:"fyvr12d1"},text100:{conditions:{base:"fyvr12d7",active:"fyvr12d8",disabled:"fyvr12d9",focus:"fyvr12da",hover:"fyvr12db",checked:"fyvr12dc"},defaultClass:"fyvr12d7"},text80:{conditions:{base:"fyvr12dd",active:"fyvr12de",disabled:"fyvr12df",focus:"fyvr12dg",hover:"fyvr12dh",checked:"fyvr12di"},defaultClass:"fyvr12dd"},text50:{conditions:{base:"fyvr12dj",active:"fyvr12dk",disabled:"fyvr12dl",focus:"fyvr12dm",hover:"fyvr12dn",checked:"fyvr12do"},defaultClass:"fyvr12dj"},textInverse100:{conditions:{base:"fyvr12dp",active:"fyvr12dq",disabled:"fyvr12dr",focus:"fyvr12ds",hover:"fyvr12dt",checked:"fyvr12du"},defaultClass:"fyvr12dp"},backgroundPrimary:{conditions:{base:"fyvr12dv",active:"fyvr12dw",disabled:"fyvr12dx",focus:"fyvr12dy",hover:"fyvr12dz",checked:"fyvr12e0"},defaultClass:"fyvr12dv"},backgroundSecondary:{conditions:{base:"fyvr12e1",active:"fyvr12e2",disabled:"fyvr12e3",focus:"fyvr12e4",hover:"fyvr12e5",checked:"fyvr12e6"},defaultClass:"fyvr12e1"},backgroundContrast:{conditions:{base:"fyvr12e7",active:"fyvr12e8",disabled:"fyvr12e9",focus:"fyvr12ea",hover:"fyvr12eb",checked:"fyvr12ec"},defaultClass:"fyvr12e7"},backgroundMuted:{conditions:{base:"fyvr12ed",active:"fyvr12ee",disabled:"fyvr12ef",focus:"fyvr12eg",hover:"fyvr12eh",checked:"fyvr12ei"},defaultClass:"fyvr12ed"},backgroundControl:{conditions:{base:"fyvr12ej",active:"fyvr12ek",disabled:"fyvr12el",focus:"fyvr12em",hover:"fyvr12en",checked:"fyvr12eo"},defaultClass:"fyvr12ej"},backgroundInverse:{conditions:{base:"fyvr12ep",active:"fyvr12eq",disabled:"fyvr12er",focus:"fyvr12es",hover:"fyvr12et",checked:"fyvr12eu"},defaultClass:"fyvr12ep"},backgroundBackdrop:{conditions:{base:"fyvr12ev",active:"fyvr12ew",disabled:"fyvr12ex",focus:"fyvr12ey",hover:"fyvr12ez",checked:"fyvr12f0"},defaultClass:"fyvr12ev"},backgroundOverlay:{conditions:{base:"fyvr12f1",active:"fyvr12f2",disabled:"fyvr12f3",focus:"fyvr12f4",hover:"fyvr12f5",checked:"fyvr12f6"},defaultClass:"fyvr12f1"},backgroundRaised:{conditions:{base:"fyvr12f7",active:"fyvr12f8",disabled:"fyvr12f9",focus:"fyvr12fa",hover:"fyvr12fb",checked:"fyvr12fc"},defaultClass:"fyvr12f7"},buttonGlass:{conditions:{base:"fyvr12fd",active:"fyvr12fe",disabled:"fyvr12ff",focus:"fyvr12fg",hover:"fyvr12fh",checked:"fyvr12fi"},defaultClass:"fyvr12fd"},buttonEmphasis:{conditions:{base:"fyvr12fj",active:"fyvr12fk",disabled:"fyvr12fl",focus:"fyvr12fm",hover:"fyvr12fn",checked:"fyvr12fo"},defaultClass:"fyvr12fj"},buttonInverse:{conditions:{base:"fyvr12fp",active:"fyvr12fq",disabled:"fyvr12fr",focus:"fyvr12fs",hover:"fyvr12ft",checked:"fyvr12fu"},defaultClass:"fyvr12fp"},borderNormal:{conditions:{base:"fyvr12fv",active:"fyvr12fw",disabled:"fyvr12fx",focus:"fyvr12fy",hover:"fyvr12fz",checked:"fyvr12g0"},defaultClass:"fyvr12fv"},borderFocus:{conditions:{base:"fyvr12g1",active:"fyvr12g2",disabled:"fyvr12g3",focus:"fyvr12g4",hover:"fyvr12g5",checked:"fyvr12g6"},defaultClass:"fyvr12g1"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12g7",active:"fyvr12g8",disabled:"fyvr12g9",focus:"fyvr12ga",hover:"fyvr12gb",checked:"fyvr12gc"},defaultClass:"fyvr12g7"},dashed:{conditions:{base:"fyvr12gd",active:"fyvr12ge",disabled:"fyvr12gf",focus:"fyvr12gg",hover:"fyvr12gh",checked:"fyvr12gi"},defaultClass:"fyvr12gd"},dotted:{conditions:{base:"fyvr12gj",active:"fyvr12gk",disabled:"fyvr12gl",focus:"fyvr12gm",hover:"fyvr12gn",checked:"fyvr12go"},defaultClass:"fyvr12gj"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12gp",active:"fyvr12gq",disabled:"fyvr12gr",focus:"fyvr12gs",hover:"fyvr12gt",checked:"fyvr12gu"},defaultClass:"fyvr12gp"},white:{conditions:{base:"fyvr12gv",active:"fyvr12gw",disabled:"fyvr12gx",focus:"fyvr12gy",hover:"fyvr12gz",checked:"fyvr12h0"},defaultClass:"fyvr12gv"},inherit:{conditions:{base:"fyvr12h1",active:"fyvr12h2",disabled:"fyvr12h3",focus:"fyvr12h4",hover:"fyvr12h5",checked:"fyvr12h6"},defaultClass:"fyvr12h1"},transparent:{conditions:{base:"fyvr12h7",active:"fyvr12h8",disabled:"fyvr12h9",focus:"fyvr12ha",hover:"fyvr12hb",checked:"fyvr12hc"},defaultClass:"fyvr12h7"},positive:{conditions:{base:"fyvr12hd",active:"fyvr12he",disabled:"fyvr12hf",focus:"fyvr12hg",hover:"fyvr12hh",checked:"fyvr12hi"},defaultClass:"fyvr12hd"},negative:{conditions:{base:"fyvr12hj",active:"fyvr12hk",disabled:"fyvr12hl",focus:"fyvr12hm",hover:"fyvr12hn",checked:"fyvr12ho"},defaultClass:"fyvr12hj"},info:{conditions:{base:"fyvr12hp",active:"fyvr12hq",disabled:"fyvr12hr",focus:"fyvr12hs",hover:"fyvr12ht",checked:"fyvr12hu"},defaultClass:"fyvr12hp"},warning:{conditions:{base:"fyvr12hv",active:"fyvr12hw",disabled:"fyvr12hx",focus:"fyvr12hy",hover:"fyvr12hz",checked:"fyvr12i0"},defaultClass:"fyvr12hv"},gradientBackdrop:{conditions:{base:"fyvr12i1",active:"fyvr12i2",disabled:"fyvr12i3",focus:"fyvr12i4",hover:"fyvr12i5",checked:"fyvr12i6"},defaultClass:"fyvr12i1"},gradientPrimary:{conditions:{base:"fyvr12i7",active:"fyvr12i8",disabled:"fyvr12i9",focus:"fyvr12ia",hover:"fyvr12ib",checked:"fyvr12ic"},defaultClass:"fyvr12i7"},gradientSecondary:{conditions:{base:"fyvr12id",active:"fyvr12ie",disabled:"fyvr12if",focus:"fyvr12ig",hover:"fyvr12ih",checked:"fyvr12ii"},defaultClass:"fyvr12id"},arbitrumDark:{conditions:{base:"fyvr12ij",active:"fyvr12ik",disabled:"fyvr12il",focus:"fyvr12im",hover:"fyvr12in",checked:"fyvr12io"},defaultClass:"fyvr12ij"},arbitrumLight:{conditions:{base:"fyvr12ip",active:"fyvr12iq",disabled:"fyvr12ir",focus:"fyvr12is",hover:"fyvr12it",checked:"fyvr12iu"},defaultClass:"fyvr12ip"},avalanceDark:{conditions:{base:"fyvr12iv",active:"fyvr12iw",disabled:"fyvr12ix",focus:"fyvr12iy",hover:"fyvr12iz",checked:"fyvr12j0"},defaultClass:"fyvr12iv"},avalanceLight:{conditions:{base:"fyvr12j1",active:"fyvr12j2",disabled:"fyvr12j3",focus:"fyvr12j4",hover:"fyvr12j5",checked:"fyvr12j6"},defaultClass:"fyvr12j1"},bscDark:{conditions:{base:"fyvr12j7",active:"fyvr12j8",disabled:"fyvr12j9",focus:"fyvr12ja",hover:"fyvr12jb",checked:"fyvr12jc"},defaultClass:"fyvr12j7"},bscLight:{conditions:{base:"fyvr12jd",active:"fyvr12je",disabled:"fyvr12jf",focus:"fyvr12jg",hover:"fyvr12jh",checked:"fyvr12ji"},defaultClass:"fyvr12jd"},ethereumDark:{conditions:{base:"fyvr12jj",active:"fyvr12jk",disabled:"fyvr12jl",focus:"fyvr12jm",hover:"fyvr12jn",checked:"fyvr12jo"},defaultClass:"fyvr12jj"},ethereumLight:{conditions:{base:"fyvr12jp",active:"fyvr12jq",disabled:"fyvr12jr",focus:"fyvr12js",hover:"fyvr12jt",checked:"fyvr12ju"},defaultClass:"fyvr12jp"},gnosisDark:{conditions:{base:"fyvr12jv",active:"fyvr12jw",disabled:"fyvr12jx",focus:"fyvr12jy",hover:"fyvr12jz",checked:"fyvr12k0"},defaultClass:"fyvr12jv"},gnosisLight:{conditions:{base:"fyvr12k1",active:"fyvr12k2",disabled:"fyvr12k3",focus:"fyvr12k4",hover:"fyvr12k5",checked:"fyvr12k6"},defaultClass:"fyvr12k1"},polygonDark:{conditions:{base:"fyvr12k7",active:"fyvr12k8",disabled:"fyvr12k9",focus:"fyvr12ka",hover:"fyvr12kb",checked:"fyvr12kc"},defaultClass:"fyvr12k7"},polygonLight:{conditions:{base:"fyvr12kd",active:"fyvr12ke",disabled:"fyvr12kf",focus:"fyvr12kg",hover:"fyvr12kh",checked:"fyvr12ki"},defaultClass:"fyvr12kd"},text100:{conditions:{base:"fyvr12kj",active:"fyvr12kk",disabled:"fyvr12kl",focus:"fyvr12km",hover:"fyvr12kn",checked:"fyvr12ko"},defaultClass:"fyvr12kj"},text80:{conditions:{base:"fyvr12kp",active:"fyvr12kq",disabled:"fyvr12kr",focus:"fyvr12ks",hover:"fyvr12kt",checked:"fyvr12ku"},defaultClass:"fyvr12kp"},text50:{conditions:{base:"fyvr12kv",active:"fyvr12kw",disabled:"fyvr12kx",focus:"fyvr12ky",hover:"fyvr12kz",checked:"fyvr12l0"},defaultClass:"fyvr12kv"},textInverse100:{conditions:{base:"fyvr12l1",active:"fyvr12l2",disabled:"fyvr12l3",focus:"fyvr12l4",hover:"fyvr12l5",checked:"fyvr12l6"},defaultClass:"fyvr12l1"},backgroundPrimary:{conditions:{base:"fyvr12l7",active:"fyvr12l8",disabled:"fyvr12l9",focus:"fyvr12la",hover:"fyvr12lb",checked:"fyvr12lc"},defaultClass:"fyvr12l7"},backgroundSecondary:{conditions:{base:"fyvr12ld",active:"fyvr12le",disabled:"fyvr12lf",focus:"fyvr12lg",hover:"fyvr12lh",checked:"fyvr12li"},defaultClass:"fyvr12ld"},backgroundContrast:{conditions:{base:"fyvr12lj",active:"fyvr12lk",disabled:"fyvr12ll",focus:"fyvr12lm",hover:"fyvr12ln",checked:"fyvr12lo"},defaultClass:"fyvr12lj"},backgroundMuted:{conditions:{base:"fyvr12lp",active:"fyvr12lq",disabled:"fyvr12lr",focus:"fyvr12ls",hover:"fyvr12lt",checked:"fyvr12lu"},defaultClass:"fyvr12lp"},backgroundControl:{conditions:{base:"fyvr12lv",active:"fyvr12lw",disabled:"fyvr12lx",focus:"fyvr12ly",hover:"fyvr12lz",checked:"fyvr12m0"},defaultClass:"fyvr12lv"},backgroundInverse:{conditions:{base:"fyvr12m1",active:"fyvr12m2",disabled:"fyvr12m3",focus:"fyvr12m4",hover:"fyvr12m5",checked:"fyvr12m6"},defaultClass:"fyvr12m1"},backgroundBackdrop:{conditions:{base:"fyvr12m7",active:"fyvr12m8",disabled:"fyvr12m9",focus:"fyvr12ma",hover:"fyvr12mb",checked:"fyvr12mc"},defaultClass:"fyvr12m7"},backgroundOverlay:{conditions:{base:"fyvr12md",active:"fyvr12me",disabled:"fyvr12mf",focus:"fyvr12mg",hover:"fyvr12mh",checked:"fyvr12mi"},defaultClass:"fyvr12md"},backgroundRaised:{conditions:{base:"fyvr12mj",active:"fyvr12mk",disabled:"fyvr12ml",focus:"fyvr12mm",hover:"fyvr12mn",checked:"fyvr12mo"},defaultClass:"fyvr12mj"},buttonGlass:{conditions:{base:"fyvr12mp",active:"fyvr12mq",disabled:"fyvr12mr",focus:"fyvr12ms",hover:"fyvr12mt",checked:"fyvr12mu"},defaultClass:"fyvr12mp"},buttonEmphasis:{conditions:{base:"fyvr12mv",active:"fyvr12mw",disabled:"fyvr12mx",focus:"fyvr12my",hover:"fyvr12mz",checked:"fyvr12n0"},defaultClass:"fyvr12mv"},buttonInverse:{conditions:{base:"fyvr12n1",active:"fyvr12n2",disabled:"fyvr12n3",focus:"fyvr12n4",hover:"fyvr12n5",checked:"fyvr12n6"},defaultClass:"fyvr12n1"},borderNormal:{conditions:{base:"fyvr12n7",active:"fyvr12n8",disabled:"fyvr12n9",focus:"fyvr12na",hover:"fyvr12nb",checked:"fyvr12nc"},defaultClass:"fyvr12n7"},borderFocus:{conditions:{base:"fyvr12nd",active:"fyvr12ne",disabled:"fyvr12nf",focus:"fyvr12ng",hover:"fyvr12nh",checked:"fyvr12ni"},defaultClass:"fyvr12nd"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12nj",active:"fyvr12nk",disabled:"fyvr12nl",focus:"fyvr12nm",hover:"fyvr12nn",checked:"fyvr12no"},defaultClass:"fyvr12nj"},dashed:{conditions:{base:"fyvr12np",active:"fyvr12nq",disabled:"fyvr12nr",focus:"fyvr12ns",hover:"fyvr12nt",checked:"fyvr12nu"},defaultClass:"fyvr12np"},dotted:{conditions:{base:"fyvr12nv",active:"fyvr12nw",disabled:"fyvr12nx",focus:"fyvr12ny",hover:"fyvr12nz",checked:"fyvr12o0"},defaultClass:"fyvr12nv"}}},border:{values:{none:{conditions:{base:"fyvr12o1",active:"fyvr12o2",disabled:"fyvr12o3",focus:"fyvr12o4",hover:"fyvr12o5",checked:"fyvr12o6"},defaultClass:"fyvr12o1"}}},color:{values:{black:{conditions:{base:"fyvr12o7",active:"fyvr12o8",disabled:"fyvr12o9",focus:"fyvr12oa",hover:"fyvr12ob",checked:"fyvr12oc"},defaultClass:"fyvr12o7"},white:{conditions:{base:"fyvr12od",active:"fyvr12oe",disabled:"fyvr12of",focus:"fyvr12og",hover:"fyvr12oh",checked:"fyvr12oi"},defaultClass:"fyvr12od"},inherit:{conditions:{base:"fyvr12oj",active:"fyvr12ok",disabled:"fyvr12ol",focus:"fyvr12om",hover:"fyvr12on",checked:"fyvr12oo"},defaultClass:"fyvr12oj"},transparent:{conditions:{base:"fyvr12op",active:"fyvr12oq",disabled:"fyvr12or",focus:"fyvr12os",hover:"fyvr12ot",checked:"fyvr12ou"},defaultClass:"fyvr12op"},positive:{conditions:{base:"fyvr12ov",active:"fyvr12ow",disabled:"fyvr12ox",focus:"fyvr12oy",hover:"fyvr12oz",checked:"fyvr12p0"},defaultClass:"fyvr12ov"},negative:{conditions:{base:"fyvr12p1",active:"fyvr12p2",disabled:"fyvr12p3",focus:"fyvr12p4",hover:"fyvr12p5",checked:"fyvr12p6"},defaultClass:"fyvr12p1"},info:{conditions:{base:"fyvr12p7",active:"fyvr12p8",disabled:"fyvr12p9",focus:"fyvr12pa",hover:"fyvr12pb",checked:"fyvr12pc"},defaultClass:"fyvr12p7"},warning:{conditions:{base:"fyvr12pd",active:"fyvr12pe",disabled:"fyvr12pf",focus:"fyvr12pg",hover:"fyvr12ph",checked:"fyvr12pi"},defaultClass:"fyvr12pd"},gradientBackdrop:{conditions:{base:"fyvr12pj",active:"fyvr12pk",disabled:"fyvr12pl",focus:"fyvr12pm",hover:"fyvr12pn",checked:"fyvr12po"},defaultClass:"fyvr12pj"},gradientPrimary:{conditions:{base:"fyvr12pp",active:"fyvr12pq",disabled:"fyvr12pr",focus:"fyvr12ps",hover:"fyvr12pt",checked:"fyvr12pu"},defaultClass:"fyvr12pp"},gradientSecondary:{conditions:{base:"fyvr12pv",active:"fyvr12pw",disabled:"fyvr12px",focus:"fyvr12py",hover:"fyvr12pz",checked:"fyvr12q0"},defaultClass:"fyvr12pv"},arbitrumDark:{conditions:{base:"fyvr12q1",active:"fyvr12q2",disabled:"fyvr12q3",focus:"fyvr12q4",hover:"fyvr12q5",checked:"fyvr12q6"},defaultClass:"fyvr12q1"},arbitrumLight:{conditions:{base:"fyvr12q7",active:"fyvr12q8",disabled:"fyvr12q9",focus:"fyvr12qa",hover:"fyvr12qb",checked:"fyvr12qc"},defaultClass:"fyvr12q7"},avalanceDark:{conditions:{base:"fyvr12qd",active:"fyvr12qe",disabled:"fyvr12qf",focus:"fyvr12qg",hover:"fyvr12qh",checked:"fyvr12qi"},defaultClass:"fyvr12qd"},avalanceLight:{conditions:{base:"fyvr12qj",active:"fyvr12qk",disabled:"fyvr12ql",focus:"fyvr12qm",hover:"fyvr12qn",checked:"fyvr12qo"},defaultClass:"fyvr12qj"},bscDark:{conditions:{base:"fyvr12qp",active:"fyvr12qq",disabled:"fyvr12qr",focus:"fyvr12qs",hover:"fyvr12qt",checked:"fyvr12qu"},defaultClass:"fyvr12qp"},bscLight:{conditions:{base:"fyvr12qv",active:"fyvr12qw",disabled:"fyvr12qx",focus:"fyvr12qy",hover:"fyvr12qz",checked:"fyvr12r0"},defaultClass:"fyvr12qv"},ethereumDark:{conditions:{base:"fyvr12r1",active:"fyvr12r2",disabled:"fyvr12r3",focus:"fyvr12r4",hover:"fyvr12r5",checked:"fyvr12r6"},defaultClass:"fyvr12r1"},ethereumLight:{conditions:{base:"fyvr12r7",active:"fyvr12r8",disabled:"fyvr12r9",focus:"fyvr12ra",hover:"fyvr12rb",checked:"fyvr12rc"},defaultClass:"fyvr12r7"},gnosisDark:{conditions:{base:"fyvr12rd",active:"fyvr12re",disabled:"fyvr12rf",focus:"fyvr12rg",hover:"fyvr12rh",checked:"fyvr12ri"},defaultClass:"fyvr12rd"},gnosisLight:{conditions:{base:"fyvr12rj",active:"fyvr12rk",disabled:"fyvr12rl",focus:"fyvr12rm",hover:"fyvr12rn",checked:"fyvr12ro"},defaultClass:"fyvr12rj"},polygonDark:{conditions:{base:"fyvr12rp",active:"fyvr12rq",disabled:"fyvr12rr",focus:"fyvr12rs",hover:"fyvr12rt",checked:"fyvr12ru"},defaultClass:"fyvr12rp"},polygonLight:{conditions:{base:"fyvr12rv",active:"fyvr12rw",disabled:"fyvr12rx",focus:"fyvr12ry",hover:"fyvr12rz",checked:"fyvr12s0"},defaultClass:"fyvr12rv"},text100:{conditions:{base:"fyvr12s1",active:"fyvr12s2",disabled:"fyvr12s3",focus:"fyvr12s4",hover:"fyvr12s5",checked:"fyvr12s6"},defaultClass:"fyvr12s1"},text80:{conditions:{base:"fyvr12s7",active:"fyvr12s8",disabled:"fyvr12s9",focus:"fyvr12sa",hover:"fyvr12sb",checked:"fyvr12sc"},defaultClass:"fyvr12s7"},text50:{conditions:{base:"fyvr12sd",active:"fyvr12se",disabled:"fyvr12sf",focus:"fyvr12sg",hover:"fyvr12sh",checked:"fyvr12si"},defaultClass:"fyvr12sd"},textInverse100:{conditions:{base:"fyvr12sj",active:"fyvr12sk",disabled:"fyvr12sl",focus:"fyvr12sm",hover:"fyvr12sn",checked:"fyvr12so"},defaultClass:"fyvr12sj"},backgroundPrimary:{conditions:{base:"fyvr12sp",active:"fyvr12sq",disabled:"fyvr12sr",focus:"fyvr12ss",hover:"fyvr12st",checked:"fyvr12su"},defaultClass:"fyvr12sp"},backgroundSecondary:{conditions:{base:"fyvr12sv",active:"fyvr12sw",disabled:"fyvr12sx",focus:"fyvr12sy",hover:"fyvr12sz",checked:"fyvr12t0"},defaultClass:"fyvr12sv"},backgroundContrast:{conditions:{base:"fyvr12t1",active:"fyvr12t2",disabled:"fyvr12t3",focus:"fyvr12t4",hover:"fyvr12t5",checked:"fyvr12t6"},defaultClass:"fyvr12t1"},backgroundMuted:{conditions:{base:"fyvr12t7",active:"fyvr12t8",disabled:"fyvr12t9",focus:"fyvr12ta",hover:"fyvr12tb",checked:"fyvr12tc"},defaultClass:"fyvr12t7"},backgroundControl:{conditions:{base:"fyvr12td",active:"fyvr12te",disabled:"fyvr12tf",focus:"fyvr12tg",hover:"fyvr12th",checked:"fyvr12ti"},defaultClass:"fyvr12td"},backgroundInverse:{conditions:{base:"fyvr12tj",active:"fyvr12tk",disabled:"fyvr12tl",focus:"fyvr12tm",hover:"fyvr12tn",checked:"fyvr12to"},defaultClass:"fyvr12tj"},backgroundBackdrop:{conditions:{base:"fyvr12tp",active:"fyvr12tq",disabled:"fyvr12tr",focus:"fyvr12ts",hover:"fyvr12tt",checked:"fyvr12tu"},defaultClass:"fyvr12tp"},backgroundOverlay:{conditions:{base:"fyvr12tv",active:"fyvr12tw",disabled:"fyvr12tx",focus:"fyvr12ty",hover:"fyvr12tz",checked:"fyvr12u0"},defaultClass:"fyvr12tv"},backgroundRaised:{conditions:{base:"fyvr12u1",active:"fyvr12u2",disabled:"fyvr12u3",focus:"fyvr12u4",hover:"fyvr12u5",checked:"fyvr12u6"},defaultClass:"fyvr12u1"},buttonGlass:{conditions:{base:"fyvr12u7",active:"fyvr12u8",disabled:"fyvr12u9",focus:"fyvr12ua",hover:"fyvr12ub",checked:"fyvr12uc"},defaultClass:"fyvr12u7"},buttonEmphasis:{conditions:{base:"fyvr12ud",active:"fyvr12ue",disabled:"fyvr12uf",focus:"fyvr12ug",hover:"fyvr12uh",checked:"fyvr12ui"},defaultClass:"fyvr12ud"},buttonInverse:{conditions:{base:"fyvr12uj",active:"fyvr12uk",disabled:"fyvr12ul",focus:"fyvr12um",hover:"fyvr12un",checked:"fyvr12uo"},defaultClass:"fyvr12uj"},borderNormal:{conditions:{base:"fyvr12up",active:"fyvr12uq",disabled:"fyvr12ur",focus:"fyvr12us",hover:"fyvr12ut",checked:"fyvr12uu"},defaultClass:"fyvr12up"},borderFocus:{conditions:{base:"fyvr12uv",active:"fyvr12uw",disabled:"fyvr12ux",focus:"fyvr12uy",hover:"fyvr12uz",checked:"fyvr12v0"},defaultClass:"fyvr12uv"}}},cursor:{values:{default:{conditions:{base:"fyvr12v1",active:"fyvr12v2",disabled:"fyvr12v3",focus:"fyvr12v4",hover:"fyvr12v5",checked:"fyvr12v6"},defaultClass:"fyvr12v1"},pointer:{conditions:{base:"fyvr12v7",active:"fyvr12v8",disabled:"fyvr12v9",focus:"fyvr12va",hover:"fyvr12vb",checked:"fyvr12vc"},defaultClass:"fyvr12v7"},text:{conditions:{base:"fyvr12vd",active:"fyvr12ve",disabled:"fyvr12vf",focus:"fyvr12vg",hover:"fyvr12vh",checked:"fyvr12vi"},defaultClass:"fyvr12vd"}}},opacity:{values:{0:{conditions:{base:"fyvr12vj",active:"fyvr12vk",disabled:"fyvr12vl",focus:"fyvr12vm",hover:"fyvr12vn",checked:"fyvr12vo"},defaultClass:"fyvr12vj"},50:{conditions:{base:"fyvr12vp",active:"fyvr12vq",disabled:"fyvr12vr",focus:"fyvr12vs",hover:"fyvr12vt",checked:"fyvr12vu"},defaultClass:"fyvr12vp"},80:{conditions:{base:"fyvr12vv",active:"fyvr12vw",disabled:"fyvr12vx",focus:"fyvr12vy",hover:"fyvr12vz",checked:"fyvr12w0"},defaultClass:"fyvr12vv"},100:{conditions:{base:"fyvr12w1",active:"fyvr12w2",disabled:"fyvr12w3",focus:"fyvr12w4",hover:"fyvr12w5",checked:"fyvr12w6"},defaultClass:"fyvr12w1"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12w7",active:"fyvr12w8",disabled:"fyvr12w9",focus:"fyvr12wa",hover:"fyvr12wb",checked:"fyvr12wc"},defaultClass:"fyvr12w7"},auto:{conditions:{base:"fyvr12wd",active:"fyvr12we",disabled:"fyvr12wf",focus:"fyvr12wg",hover:"fyvr12wh",checked:"fyvr12wi"},defaultClass:"fyvr12wd"}}},outline:{values:{none:{conditions:{base:"fyvr12wj",active:"fyvr12wk",disabled:"fyvr12wl",focus:"fyvr12wm",hover:"fyvr12wn",checked:"fyvr12wo"},defaultClass:"fyvr12wj"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12wp",active:"fyvr12wq",disabled:"fyvr12wr",focus:"fyvr12ws",hover:"fyvr12wt",checked:"fyvr12wu"},defaultClass:"fyvr12wp"}}}}});const Vbe=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],l8=t=>(t.display||(t.display=Object.keys(t).some(e=>Vbe.includes(e))?"flex":void 0),dW(t));l8.properties=dW.properties;function hW(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e{const{as:r="div",sx:n={},className:s,...i}=t,o={},a={};for(const l in i)l8.properties.has(l)?o[l]=i[l]:a[l]=i[l];const c=l8({...o,...n});return p.createElement(r,{className:xs(c,s),...a,ref:e})});var vW={exports:{}},Ph={};/** + * @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 eI;function Gbe(){if(eI)return Ph;eI=1;var t=w,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,c,l){var f,u={},d=null,h=null;l!==void 0&&(d=""+l),c.key!==void 0&&(d=""+c.key),c.ref!==void 0&&(h=c.ref);for(f in c)n.call(c,f)&&!i.hasOwnProperty(f)&&(u[f]=c[f]);if(a&&a.defaultProps)for(f in c=a.defaultProps,c)u[f]===void 0&&(u[f]=c[f]);return{$$typeof:e,type:a,key:d,ref:h,props:u,_owner:s.current}}return Ph.Fragment=r,Ph.jsx=o,Ph.jsxs=o,Ph}vW.exports=Gbe();var ae=vW.exports;function Kbe(t,e){if(typeof t!="object"||!t)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 Ybe(t){var e=Kbe(t,"string");return typeof e=="symbol"?e:String(e)}function Qbe(t,e,r){return e=Ybe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function tI(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function rI(t){for(var e=1;e{for(var n of Object.keys(t)){var s;if(t[n]!==((s=e[n])!==null&&s!==void 0?s:r[n]))return!1}return!0},Nr=t=>{var e=r=>{var n=t.defaultClassName,s=rI(rI({},t.defaultVariants),r);for(var i in s){var o,a=(o=s[i])!==null&&o!==void 0?o:t.defaultVariants[i];if(a!=null){var c=a;typeof c=="boolean"&&(c=c===!0?"true":"false");var l=t.variantClassNames[i][c];l&&(n+=" "+l)}}for(var[f,u]of t.compoundVariants)Jbe(f,s,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 nI(t.variantClassNames,r=>nI(r,n=>n.split(" ")[0]))}},e};Nr({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"_2q9vfj8 _2q9vfj0 fyvr11ov",warning:"_2q9vfj9 _2q9vfj1 fyvr11p1",success:"_2q9vfja _2q9vfj2 fyvr11oj",error:"_2q9vfjb _2q9vfj3 fyvr11op"},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 sI=t=>{const{color:e="borderNormal",marginY:r="4",...n}=t;return ae.jsx(ge,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var yW=Nr({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 fyvr11n9 fyvr11mx"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const at=p.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:s,hidden:i,italic:o,underline:a,children:c,ellipsis:l,uppercase:f,capitalize:u,...d}=t,h=Bbe[n];return ae.jsx(ge,{as:r,className:xs(s,yW({hidden:i,ellipsis:l,italic:o,underline:a,uppercase:f,capitalize:u})),ref:e,...h,...d,children:c})});var Xbe=Nr({defaultClassName:"_140wn8ni _140wn8n0 fyvr11ls fyvr11m8 fyvr11n9 fyvr11ko fyvr12o1 fyvr11n2 fyvr11h0",variantClassNames:{variant:{base:"_140wn8nj _140wn8n1 fyvr11od fyvr12s1",ghost:"_140wn8nk _140wn8n2 fyvr11od fyvr12s1",feature:"_140wn8nl _140wn8n3 fyvr11pj fyvr12od",primary:"_140wn8nm _140wn8n4 fyvr11pd fyvr12od",glass:"_140wn8nn _140wn8n5 fyvr11tv fyvr12s1",emphasis:"_140wn8no _140wn8n6 fyvr11u1 fyvr12s1",raised:"_140wn8np _140wn8n7 fyvr11tp fyvr12s1",danger:"_140wn8nq _140wn8n8 fyvr11op fyvr12od",text:"_140wn8nr _1qxj1ib9 _1qxj1ibf _1qxj1ib5 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 _140wn8n9 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11od fyvr12sd"},shape:{circle:"_140wn8ns _140wn8na fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"_140wn8nt _140wn8nb fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"_140wn8nu _140wn8nc fyvr12v1 fyvr12vp",false:"_140wn8nv _140wn8nd fyvr12v7 fyvr12w1 fyvr12vz"},size:{xs:"_140wn8nw _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc _140wn8ne fyvr1ws fyvr1yo",sm:"_140wn8nx _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8nf fyvr1ww fyvr1ys",md:"_140wn8ny _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8ng fyvr1x0 fyvr1yw",lg:"_140wn8nz _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _140wn8nh fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8n10"},hasLeftIcon:{true:"_140wn8n11"},hasRightIcon:{true:"_140wn8n12"},activeOutline:{light:"_140wn8n13",bold:"_140wn8n14"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8n15"],[{iconOnly:!0,size:"sm"},"_140wn8n16"],[{iconOnly:!0,size:"md"},"_140wn8n17"],[{iconOnly:!0,size:"lg"},"_140wn8n18"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n19"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n1a"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n1b"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n1c"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n1d"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n1e"]]});const Af=p.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:s,disabled:i=!1,display:o="inline-flex",fontWeight:a="bold",pending:c=!1,label:l,leftIcon:f,rightIcon:u,size:d="md",variant:h="glass",width:v="fit",shape:y="circle",type:m="button",...g}=t,b=f!==void 0&&l!==void 0,x=u!==void 0&&l!==void 0,k=f!==void 0&&l===void 0,$=d==="xs"?"xs":"sm";return ae.jsx(ge,{as:r,className:xs(s,Xbe({activeOutline:n,disabled:i||c,hasLeftIcon:b,hasRightIcon:x,iconOnly:k,size:h==="text"?void 0:d,shape:h==="text"?void 0:y,variant:h})),disabled:i||c,display:o,fontWeight:a,ref:e,type:m,width:v,...g,children:k?ae.jsx(f,{size:$}):ae.jsxs(ge,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[ae.jsxs(ge,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[f&&ae.jsx(f,{size:$}),ae.jsx(at,{children:l})]}),u&&ae.jsx(u,{size:$})]})})});var Zbe=Nr({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"rhmai64 rhmai60 fyvr12vz fyvr12v7"},disabled:{true:"rhmai65"},outlined:{true:"rhmai66 rhmai61 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12n7 fyvr12fv fyvr1217 fyvr128j fyvr12nj fyvr12g7 fyvr121j fyvr128v"},blur:{true:"rhmai67 rhmai62 fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const a1=p.forwardRef((t,e)=>{const{className:r,children:n,clickable:s,outlined:i,disabled:o,blur:a,width:c="full",...l}=t;return ae.jsx(ge,{className:xs(r,Zbe({clickable:s,outlined:i,disabled:o,blur:a})),background:i?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:c,ref:e,...l,children:n})});function Tr(){return Tr=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>e2e(r,e))}function Ft(...t){return p.useCallback(pW(...t),t)}function Fn(t,e=[]){let r=[];function n(i,o){const a=p.createContext(o),c=r.length;r=[...r,o];function l(u){const{scope:d,children:h,...v}=u,y=(d==null?void 0:d[t][c])||a,m=p.useMemo(()=>v,Object.values(v));return p.createElement(y.Provider,{value:m},h)}function f(u,d){const h=(d==null?void 0:d[t][c])||a,v=p.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,f]}const s=()=>{const i=r.map(o=>p.createContext(o));return function(a){const c=(a==null?void 0:a[t])||i;return p.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return s.scopeName=t,[n,t2e(s,...e)]}function t2e(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:c,scopeName:l})=>{const u=c(i)[`__scope${l}`];return{...a,...u}},{});return p.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Te(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function bi(t){const e=p.useRef(t);return p.useEffect(()=>{e.current=t}),p.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function hl({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=r2e({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=bi(r),c=p.useCallback(l=>{if(i){const u=typeof l=="function"?l(t):l;u!==t&&a(u)}else s(l)},[i,t,s,a]);return[o,c]}function r2e({defaultProp:t,onChange:e}){const r=p.useState(t),[n]=r,s=p.useRef(n),i=bi(e);return p.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}function j7(t){const e=p.useRef({value:t,previous:t});return p.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const Ls=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{};function D7(t){const[e,r]=p.useState(void 0);return Ls(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.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 n2e(t,e){return p.useReducer((r,n)=>{const s=e[r][n];return s??r},t)}const tc=t=>{const{present:e,children:r}=t,n=s2e(e),s=typeof r=="function"?r({present:n.isPresent}):p.Children.only(r),i=Ft(n.ref,s.ref);return typeof r=="function"||n.isPresent?p.cloneElement(s,{ref:i}):null};tc.displayName="Presence";function s2e(t){const[e,r]=p.useState(),n=p.useRef({}),s=p.useRef(t),i=p.useRef("none"),o=t?"mounted":"unmounted",[a,c]=n2e(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const l=Pp(n.current);i.current=a==="mounted"?l:"none"},[a]),Ls(()=>{const l=n.current,f=s.current;if(f!==t){const d=i.current,h=Pp(l);t?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),Ls(()=>{if(e){const l=u=>{const h=Pp(n.current).includes(u.animationName);u.target===e&&h&&bn.flushSync(()=>c("ANIMATION_END"))},f=u=>{u.target===e&&(i.current=Pp(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:p.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function Pp(t){return(t==null?void 0:t.animationName)||"none"}function Ie(){return Ie=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,s=p.Children.toArray(r),i=s.find(i2e);if(i){const o=i.props.children,a=s.map(c=>c===i?p.Children.count(o)>1?p.Children.only(null):p.isValidElement(o)?o.props.children:null:c);return p.createElement(f8,Ie({},n,{ref:e}),p.isValidElement(o)?p.cloneElement(o,void 0,a):null)}return p.createElement(f8,Ie({},n,{ref:e}),r)});c1.displayName="Slot";const f8=p.forwardRef((t,e)=>{const{children:r,...n}=t;return p.isValidElement(r)?p.cloneElement(r,{...o2e(n,r.props),ref:e?pW(e,r.ref):r.ref}):p.Children.count(r)>1?p.Children.only(null):null});f8.displayName="SlotClone";const mW=({children:t})=>p.createElement(p.Fragment,null,t);function i2e(t){return p.isValidElement(t)&&t.type===mW}function o2e(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}const a2e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pt=a2e.reduce((t,e)=>{const r=p.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?c1:e;return p.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),p.createElement(a,Tr({},o,{ref:s}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function L7(t,e){t&&bn.flushSync(()=>t.dispatchEvent(e))}const gW="Checkbox",[c2e,fFe]=Fn(gW),[l2e,f2e]=c2e(gW),u2e=p.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:c="on",onCheckedChange:l,...f}=t,[u,d]=p.useState(null),h=Ft(e,x=>d(x)),v=p.useRef(!1),y=u?!!u.closest("form"):!0,[m=!1,g]=hl({prop:s,defaultProp:i,onChange:l}),b=p.useRef(m);return p.useEffect(()=>{const x=u==null?void 0:u.form;if(x){const k=()=>g(b.current);return x.addEventListener("reset",k),()=>x.removeEventListener("reset",k)}},[u,g]),p.createElement(l2e,{scope:r,state:m,disabled:a},p.createElement(pt.button,Tr({type:"button",role:"checkbox","aria-checked":$f(m)?"mixed":m,"aria-required":o,"data-state":bW(m),"data-disabled":a?"":void 0,disabled:a,value:c},f,{ref:h,onKeyDown:Te(t.onKeyDown,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:Te(t.onClick,x=>{g(k=>$f(k)?!0:!k),y&&(v.current=x.isPropagationStopped(),v.current||x.stopPropagation())})})),y&&p.createElement(v2e,{control:u,bubbles:!v.current,name:n,value:c,checked:m,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),d2e="CheckboxIndicator",h2e=p.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,i=f2e(d2e,r);return p.createElement(tc,{present:n||$f(i.state)||i.state===!0},p.createElement(pt.span,Tr({"data-state":bW(i.state),"data-disabled":i.disabled?"":void 0},s,{ref:e,style:{pointerEvents:"none",...t.style}})))}),v2e=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=p.useRef(null),o=j7(r),a=D7(e);return p.useEffect(()=>{const c=i.current,l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});c.indeterminate=$f(r),u.call(c,$f(r)?!1:r),c.dispatchEvent(d)}},[o,r,n]),p.createElement("input",Tr({type:"checkbox","aria-hidden":!0,defaultChecked:$f(r)?!1:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function $f(t){return t==="indeterminate"}function bW(t){return $f(t)?"indeterminate":t?"checked":"unchecked"}const y2e=u2e,p2e=h2e;var m2e=Nr({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 F1=t=>{const{id:e,label:r,description:n,labelLocation:s="top",children:i,...o}=t,a=()=>r||n?ae.jsxs(ge,{flexDirection:"column",gap:"0.5",children:[r&&ae.jsx(at,{variant:"small",color:"text100",hidden:s==="hidden",children:r}),n&&ae.jsx(at,{variant:"small",color:"text50",hidden:s==="hidden",children:n})]}):null;return ae.jsxs(ge,{as:"label",className:m2e({labelLocation:s}),htmlFor:e,...o,children:[["left","top","hidden"].includes(s)&&a(),i,s==="right"&&a()]})};var z1=Nr({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const g2e=t=>ae.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:ae.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),xW=({size:t="sm",...e})=>ae.jsx(ge,{as:g2e,className:z1({size:t}),...e}),b2e=t=>ae.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:ae.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"})}),wW=({size:t="sm",...e})=>ae.jsx(ge,{as:b2e,className:z1({size:t}),...e}),x2e=t=>ae.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:ae.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m12.888 3.47 1.06 1.06L8.48 10l5.47 5.47-1.061 1.06L6.358 10l6.53-6.53Z",clipRule:"evenodd"})}),w2e=({size:t="sm",...e})=>ae.jsx(ge,{as:x2e,className:z1({size:t}),...e}),C2e=t=>ae.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:ae.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m7.949 16.53-1.061-1.06 5.47-5.47-5.47-5.47 1.06-1.06L14.48 10l-6.53 6.53Z",clipRule:"evenodd"})}),iI=({size:t="sm",...e})=>ae.jsx(ge,{as:C2e,className:z1({size:t}),...e}),E2e=t=>ae.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:ae.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"})}),B7=({size:t="sm",...e})=>ae.jsx(ge,{as:E2e,className:z1({size:t}),...e}),k2e=t=>ae.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:ae.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"})}),S2e=({size:t="sm",...e})=>ae.jsx(ge,{as:k2e,className:z1({size:t}),...e});var A2e=Nr({defaultClassName:"_1c9x66f1 _1c9x66f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12nd fyvr12g1 fyvr121d fyvr128p fyvr12nj fyvr12g7 fyvr121j fyvr128v fyvr11h0 fyvr11ko fyvr11jg fyvr11od fyvr12w1 fyvr12vz fyvr12vr fyvr12v7 fyvr12v3",variantClassNames:{size:{sm:"_1c9x66f2",lg:"_1c9x66f3"}},defaultVariants:{},compoundVariants:[]}),$2e="_1c9x66f4 fyvr12s1 fyvr11h0 fyvr11ko fyvr11jg fyvr128 fyvr15o";const _2e=({size:t="sm"})=>ae.jsx(p2e,{className:$2e,children:ae.jsx(xW,{size:t==="lg"?"sm":"xs"})});p.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:s,label:i="",labelLocation:o="left",size:a="sm",...c}=t;return ae.jsx(F1,{disabled:r,display:"flex",id:n??s,label:i,labelLocation:o,whiteSpace:"nowrap",children:ae.jsx(y2e,{className:A2e({size:a}),disabled:r,id:n??s,name:s,ref:e,...c,children:ae.jsx(_2e,{size:a})})})});w.createContext(null);const P2e=PE.useId||(()=>{});let I2e=0;function ga(t){const[e,r]=p.useState(P2e());return Ls(()=>{t||r(n=>n??String(I2e++))},[t]),t||(e?`radix-${e}`:"")}const CW="Collapsible",[T2e,uFe]=Fn(CW),[O2e,F7]=T2e(CW),R2e=p.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:s,disabled:i,onOpenChange:o,...a}=t,[c=!1,l]=hl({prop:n,defaultProp:s,onChange:o});return p.createElement(O2e,{scope:r,disabled:i,contentId:ga(),open:c,onOpenToggle:p.useCallback(()=>l(f=>!f),[l])},p.createElement(pt.div,Tr({"data-state":z7(c),"data-disabled":i?"":void 0},a,{ref:e})))}),M2e="CollapsibleTrigger",N2e=p.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,s=F7(M2e,r);return p.createElement(pt.button,Tr({type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":z7(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled},n,{ref:e,onClick:Te(t.onClick,s.onOpenToggle)}))}),EW="CollapsibleContent",j2e=p.forwardRef((t,e)=>{const{forceMount:r,...n}=t,s=F7(EW,t.__scopeCollapsible);return p.createElement(tc,{present:r||s.open},({present:i})=>p.createElement(D2e,Tr({},n,{ref:e,present:i})))}),D2e=p.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:s,...i}=t,o=F7(EW,r),[a,c]=p.useState(n),l=p.useRef(null),f=Ft(e,l),u=p.useRef(0),d=u.current,h=p.useRef(0),v=h.current,y=o.open||a,m=p.useRef(y),g=p.useRef();return p.useEffect(()=>{const b=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(b)},[]),Ls(()=>{const b=l.current;if(b){g.current=g.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const x=b.getBoundingClientRect();u.current=x.height,h.current=x.width,m.current||(b.style.transitionDuration=g.current.transitionDuration,b.style.animationName=g.current.animationName),c(n)}},[o.open,n]),p.createElement(pt.div,Tr({"data-state":z7(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!y},i,{ref:f,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...t.style}}),y&&s)});function z7(t){return t?"open":"closed"}const L2e=R2e,B2e=N2e,F2e=j2e;var oI="64px",z2e="_4j62fl0",q2e="_4j62fl2 _4j62fl1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11h0 fyvr11ko fyvr11od fyvr128 fyvr12v7 fyvr11n4",U2e="_4j62fl4 _4j62fl3 fyvr1ww fyvr1ys fyvr1so fyvr1v0 fyvr128",W2e="_4j62fl5";const H2e=t=>{const{className:e,children:r,defaultOpen:n,open:s,onOpenChange:i,label:o,...a}=t,[c,l]=p.useState(n),f=s??c,u=h=>{s===void 0&&l(h)},d=h=>{u(h),i==null||i(h)};return ae.jsx(L2e,{open:f,defaultOpen:n,onOpenChange:d,asChild:!0,children:ae.jsxs(ge,{as:Yi.div,className:xs(e,z2e),initial:{height:f?"auto":oI},animate:{height:f?"auto":oI},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...a,children:[ae.jsxs(B2e,{className:q2e,children:[ae.jsx(at,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:o}),ae.jsx(ge,{as:Yi.div,position:"absolute",right:"0",marginRight:"4",initial:{rotate:f?180:0},animate:{rotate:f?180:0},transition:{ease:"linear",duration:.1},children:ae.jsx(wW,{className:W2e,color:"text50"})})]}),ae.jsx(r1,{children:f&&ae.jsx(F2e,{className:U2e,asChild:!0,forceMount:!0,children:ae.jsx(Yi.div,{initial:{opacity:f?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function Cx(t){const e=t+"CollectionProvider",[r,n]=Fn(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:v,children:y}=h,m=w.useRef(null),g=w.useRef(new Map).current;return w.createElement(s,{scope:v,itemMap:g,collectionRef:m},y)},a=t+"CollectionSlot",c=w.forwardRef((h,v)=>{const{scope:y,children:m}=h,g=i(a,y),b=Ft(v,g.collectionRef);return w.createElement(c1,{ref:b},m)}),l=t+"CollectionItemSlot",f="data-radix-collection-item",u=w.forwardRef((h,v)=>{const{scope:y,children:m,...g}=h,b=w.useRef(null),x=Ft(v,b),k=i(l,y);return w.useEffect(()=>(k.itemMap.set(b,{ref:b,...g}),()=>void k.itemMap.delete(b))),w.createElement(c1,{[f]:"",ref:x},m)});function d(h){const v=i(t+"CollectionConsumer",h);return w.useCallback(()=>{const m=v.collectionRef.current;if(!m)return[];const g=Array.from(m.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((k,$)=>g.indexOf(k.ref.current)-g.indexOf($.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:c,ItemSlot:u},d,n]}const V2e=p.createContext(void 0);function q7(t){const e=p.useContext(V2e);return t||e||"ltr"}function G2e(t,e=globalThis==null?void 0:globalThis.document){const r=bi(t);p.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const u8="dismissableLayer.update",K2e="dismissableLayer.pointerDownOutside",Y2e="dismissableLayer.focusOutside";let aI;const Q2e=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ex=p.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:c,...l}=t,f=p.useContext(Q2e),[u,d]=p.useState(null),h=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,v]=p.useState({}),y=Ft(e,D=>d(D)),m=Array.from(f.layers),[g]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(g),x=u?m.indexOf(u):-1,k=f.layersWithOutsidePointerEventsDisabled.size>0,$=x>=b,I=J2e(D=>{const H=D.target,G=[...f.branches].some(V=>V.contains(H));!$||G||(i==null||i(D),a==null||a(D),D.defaultPrevented||c==null||c())},h),M=X2e(D=>{const H=D.target;[...f.branches].some(V=>V.contains(H))||(o==null||o(D),a==null||a(D),D.defaultPrevented||c==null||c())},h);return G2e(D=>{x===f.layers.size-1&&(s==null||s(D),!D.defaultPrevented&&c&&(D.preventDefault(),c()))},h),p.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(aI=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),cI(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=aI)}},[u,h,n,f]),p.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),cI())},[u,f]),p.useEffect(()=>{const D=()=>v({});return document.addEventListener(u8,D),()=>document.removeEventListener(u8,D)},[]),p.createElement(pt.div,Ie({},l,{ref:y,style:{pointerEvents:k?$?"auto":"none":void 0,...t.style},onFocusCapture:Te(t.onFocusCapture,M.onFocusCapture),onBlurCapture:Te(t.onBlurCapture,M.onBlurCapture),onPointerDownCapture:Te(t.onPointerDownCapture,I.onPointerDownCapture)}))});function J2e(t,e=globalThis==null?void 0:globalThis.document){const r=bi(t),n=p.useRef(!1),s=p.useRef(()=>{});return p.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let c=function(){kW(K2e,r,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function X2e(t,e=globalThis==null?void 0:globalThis.document){const r=bi(t),n=p.useRef(!1);return p.useEffect(()=>{const s=i=>{i.target&&!n.current&&kW(Y2e,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function cI(){const t=new CustomEvent(u8);document.dispatchEvent(t)}function kW(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?L7(s,i):s.dispatchEvent(i)}const Z2e=Ex;let n6=0;function SW(){p.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:lI()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:lI()),n6++,()=>{n6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),n6--}},[])}function lI(){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 s6="focusScope.autoFocusOnMount",i6="focusScope.autoFocusOnUnmount",fI={bubbles:!1,cancelable:!0},AW=p.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,c]=p.useState(null),l=bi(s),f=bi(i),u=p.useRef(null),d=Ft(e,y=>c(y)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){let y=function(x){if(h.paused||!a)return;const k=x.target;a.contains(k)?u.current=k:mc(u.current,{select:!0})},m=function(x){if(h.paused||!a)return;const k=x.relatedTarget;k!==null&&(a.contains(k)||mc(u.current,{select:!0}))},g=function(x){if(document.activeElement===document.body)for(const $ of x)$.removedNodes.length>0&&mc(a)};document.addEventListener("focusin",y),document.addEventListener("focusout",m);const b=new MutationObserver(g);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",m),b.disconnect()}}},[n,a,h.paused]),p.useEffect(()=>{if(a){dI.add(h);const y=document.activeElement;if(!a.contains(y)){const g=new CustomEvent(s6,fI);a.addEventListener(s6,l),a.dispatchEvent(g),g.defaultPrevented||(exe(ixe($W(a)),{select:!0}),document.activeElement===y&&mc(a))}return()=>{a.removeEventListener(s6,l),setTimeout(()=>{const g=new CustomEvent(i6,fI);a.addEventListener(i6,f),a.dispatchEvent(g),g.defaultPrevented||mc(y??document.body,{select:!0}),a.removeEventListener(i6,f),dI.remove(h)},0)}}},[a,l,f,h]);const v=p.useCallback(y=>{if(!r&&!n||h.paused)return;const m=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,g=document.activeElement;if(m&&g){const b=y.currentTarget,[x,k]=txe(b);x&&k?!y.shiftKey&&g===k?(y.preventDefault(),r&&mc(x,{select:!0})):y.shiftKey&&g===x&&(y.preventDefault(),r&&mc(k,{select:!0})):g===b&&y.preventDefault()}},[r,n,h.paused]);return p.createElement(pt.div,Ie({tabIndex:-1},o,{ref:d,onKeyDown:v}))});function exe(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(mc(n,{select:e}),document.activeElement!==r)return}function txe(t){const e=$W(t),r=uI(e,t),n=uI(e.reverse(),t);return[r,n]}function $W(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function uI(t,e){for(const r of t)if(!rxe(r,{upTo:e}))return r}function rxe(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 nxe(t){return t instanceof HTMLInputElement&&"select"in t}function mc(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&nxe(t)&&e&&t.select()}}const dI=sxe();function sxe(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=hI(t,e),t.unshift(e)},remove(e){var r;t=hI(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function hI(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function ixe(t){return t.filter(e=>e.tagName!=="A")}const oxe=["top","right","bottom","left"],vl=Math.min,As=Math.max,pb=Math.round,Ip=Math.floor,yl=t=>({x:t,y:t}),axe={left:"right",right:"left",bottom:"top",top:"bottom"},cxe={start:"end",end:"start"};function d8(t,e,r){return As(t,vl(e,r))}function Ra(t,e){return typeof t=="function"?t(e):t}function Ma(t){return t.split("-")[0]}function q1(t){return t.split("-")[1]}function U7(t){return t==="x"?"y":"x"}function W7(t){return t==="y"?"height":"width"}function U1(t){return["top","bottom"].includes(Ma(t))?"y":"x"}function H7(t){return U7(U1(t))}function lxe(t,e,r){r===void 0&&(r=!1);const n=q1(t),s=H7(t),i=W7(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=mb(o)),[o,mb(o)]}function fxe(t){const e=mb(t);return[h8(t),e,h8(e)]}function h8(t){return t.replace(/start|end/g,e=>cxe[e])}function uxe(t,e,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?s:n:e?n:s;case"left":case"right":return e?i:o;default:return[]}}function dxe(t,e,r,n){const s=q1(t);let i=uxe(Ma(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(h8)))),i}function mb(t){return t.replace(/left|right|bottom|top/g,e=>axe[e])}function hxe(t){return{top:0,right:0,bottom:0,left:0,...t}}function _W(t){return typeof t!="number"?hxe(t):{top:t,right:t,bottom:t,left:t}}function gb(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function vI(t,e,r){let{reference:n,floating:s}=t;const i=U1(e),o=H7(e),a=W7(o),c=Ma(e),l=i==="y",f=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,d=n[a]/2-s[a]/2;let h;switch(c){case"top":h={x:f,y:n.y-s.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-s.width,y:u};break;default:h={x:n.x,y:n.y}}switch(q1(e)){case"start":h[o]-=d*(r&&l?-1:1);break;case"end":h[o]+=d*(r&&l?-1:1);break}return h}const vxe=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=vI(l,n,c),d=n,h={},v=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:c}=e,{element:l,padding:f=0}=Ra(t,e)||{};if(l==null)return{};const u=_W(f),d={x:r,y:n},h=H7(s),v=W7(h),y=await o.getDimensions(l),m=h==="y",g=m?"top":"left",b=m?"bottom":"right",x=m?"clientHeight":"clientWidth",k=i.reference[v]+i.reference[h]-d[h]-i.floating[v],$=d[h]-i.reference[h],I=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let M=I?I[x]:0;(!M||!await(o.isElement==null?void 0:o.isElement(I)))&&(M=a.floating[x]||i.floating[v]);const D=k/2-$/2,H=M/2-y[v]/2-1,G=vl(u[g],H),V=vl(u[b],H),Q=G,F=M-y[v]-V,C=M/2-y[v]/2+D,S=d8(Q,C,F),T=!c.arrow&&q1(s)!=null&&C!=S&&i.reference[v]/2-(CQ<=0)){var H,G;const Q=(((H=i.flip)==null?void 0:H.index)||0)+1,F=$[Q];if(F)return{data:{index:Q,overflows:D},reset:{placement:F}};let C=(G=D.filter(S=>S.overflows[0]<=0).sort((S,T)=>S.overflows[1]-T.overflows[1])[0])==null?void 0:G.placement;if(!C)switch(h){case"bestFit":{var V;const S=(V=D.map(T=>[T.placement,T.overflows.filter(R=>R>0).reduce((R,A)=>R+A,0)]).sort((T,R)=>T[1]-R[1])[0])==null?void 0:V[0];S&&(C=S);break}case"initialPlacement":C=a;break}if(s!==C)return{reset:{placement:C}}}return{}}}};function pI(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function mI(t){return oxe.some(e=>t[e]>=0)}const pxe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=Ra(t,e);switch(n){case"referenceHidden":{const i=await yv(e,{...s,elementContext:"reference"}),o=pI(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:mI(o)}}}case"escaped":{const i=await yv(e,{...s,altBoundary:!0}),o=pI(i,r.floating);return{data:{escapedOffsets:o,escaped:mI(o)}}}default:return{}}}}};async function mxe(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Ma(r),a=q1(r),c=U1(r)==="y",l=["left","top"].includes(o)?-1:1,f=i&&c?-1:1,u=Ra(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),c?{x:h*f,y:d*l}:{x:d*l,y:h*f}}const gxe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,s=await mxe(e,t);return{x:r+s.x,y:n+s.y,data:s}}}},bxe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:m=>{let{x:g,y:b}=m;return{x:g,y:b}}},...c}=Ra(t,e),l={x:r,y:n},f=await yv(e,c),u=U1(Ma(s)),d=U7(u);let h=l[d],v=l[u];if(i){const m=d==="y"?"top":"left",g=d==="y"?"bottom":"right",b=h+f[m],x=h-f[g];h=d8(b,h,x)}if(o){const m=u==="y"?"top":"left",g=u==="y"?"bottom":"right",b=v+f[m],x=v-f[g];v=d8(b,v,x)}const y=a.fn({...e,[d]:h,[u]:v});return{...y,data:{x:y.x-r,y:y.y-n}}}}},xxe=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Ra(t,e),f={x:r,y:n},u=U1(s),d=U7(u);let h=f[d],v=f[u];const y=Ra(a,e),m=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const x=d==="y"?"height":"width",k=i.reference[d]-i.floating[x]+m.mainAxis,$=i.reference[d]+i.reference[x]-m.mainAxis;h$&&(h=$)}if(l){var g,b;const x=d==="y"?"width":"height",k=["top","left"].includes(Ma(s)),$=i.reference[u]-i.floating[x]+(k&&((g=o.offset)==null?void 0:g[u])||0)+(k?0:m.crossAxis),I=i.reference[u]+i.reference[x]+(k?0:((b=o.offset)==null?void 0:b[u])||0)-(k?m.crossAxis:0);v<$?v=$:v>I&&(v=I)}return{[d]:h,[u]:v}}}},wxe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=Ra(t,e),c=await yv(e,a),l=Ma(r),f=q1(r),u=U1(r)==="y",{width:d,height:h}=n.floating;let v,y;l==="top"||l==="bottom"?(v=l,y=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=l,v=f==="end"?"top":"bottom");const m=h-c[v],g=d-c[y],b=!e.middlewareData.shift;let x=m,k=g;if(u){const I=d-c.left-c.right;k=f||b?vl(g,I):I}else{const I=h-c.top-c.bottom;x=f||b?vl(m,I):I}if(b&&!f){const I=As(c.left,0),M=As(c.right,0),D=As(c.top,0),H=As(c.bottom,0);u?k=d-2*(I!==0||M!==0?I+M:As(c.left,c.right)):x=h-2*(D!==0||H!==0?D+H:As(c.top,c.bottom))}await o({...e,availableWidth:k,availableHeight:x});const $=await s.getDimensions(i.floating);return d!==$.width||h!==$.height?{reset:{rects:!0}}:{}}}};function pl(t){return PW(t)?(t.nodeName||"").toLowerCase():"#document"}function Rs(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function rc(t){var e;return(e=(PW(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function PW(t){return t instanceof Node||t instanceof Rs(t).Node}function Na(t){return t instanceof Element||t instanceof Rs(t).Element}function Wo(t){return t instanceof HTMLElement||t instanceof Rs(t).HTMLElement}function gI(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Rs(t).ShadowRoot}function gy(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=xi(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function Cxe(t){return["table","td","th"].includes(pl(t))}function V7(t){const e=G7(),r=xi(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 Exe(t){let e=l1(t);for(;Wo(e)&&!kx(e);){if(V7(e))return e;e=l1(e)}return null}function G7(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function kx(t){return["html","body","#document"].includes(pl(t))}function xi(t){return Rs(t).getComputedStyle(t)}function Sx(t){return Na(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function l1(t){if(pl(t)==="html")return t;const e=t.assignedSlot||t.parentNode||gI(t)&&t.host||rc(t);return gI(e)?e.host:e}function IW(t){const e=l1(t);return kx(e)?t.ownerDocument?t.ownerDocument.body:t.body:Wo(e)&&gy(e)?e:IW(e)}function pv(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=IW(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=Rs(s);return i?e.concat(o,o.visualViewport||[],gy(s)?s:[],o.frameElement&&r?pv(o.frameElement):[]):e.concat(s,pv(s,[],r))}function TW(t){const e=xi(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=Wo(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=pb(r)!==i||pb(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function K7(t){return Na(t)?t:t.contextElement}function Md(t){const e=K7(t);if(!Wo(e))return yl(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=TW(e);let o=(i?pb(r.width):r.width)/n,a=(i?pb(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const kxe=yl(0);function OW(t){const e=Rs(t);return!G7()||!e.visualViewport?kxe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Sxe(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Rs(t)?!1:e}function Hf(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=K7(t);let o=yl(1);e&&(n?Na(n)&&(o=Md(n)):o=Md(t));const a=Sxe(i,r,n)?OW(i):yl(0);let c=(s.left+a.x)/o.x,l=(s.top+a.y)/o.y,f=s.width/o.x,u=s.height/o.y;if(i){const d=Rs(i),h=n&&Na(n)?Rs(n):n;let v=d.frameElement;for(;v&&n&&h!==d;){const y=Md(v),m=v.getBoundingClientRect(),g=xi(v),b=m.left+(v.clientLeft+parseFloat(g.paddingLeft))*y.x,x=m.top+(v.clientTop+parseFloat(g.paddingTop))*y.y;c*=y.x,l*=y.y,f*=y.x,u*=y.y,c+=b,l+=x,v=Rs(v).frameElement}}return gb({width:f,height:u,x:c,y:l})}function Axe(t){let{rect:e,offsetParent:r,strategy:n}=t;const s=Wo(r),i=rc(r);if(r===i)return e;let o={scrollLeft:0,scrollTop:0},a=yl(1);const c=yl(0);if((s||!s&&n!=="fixed")&&((pl(r)!=="body"||gy(i))&&(o=Sx(r)),Wo(r))){const l=Hf(r);a=Md(r),c.x=l.x+r.clientLeft,c.y=l.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+c.x,y:e.y*a.y-o.scrollTop*a.y+c.y}}function $xe(t){return Array.from(t.getClientRects())}function RW(t){return Hf(rc(t)).left+Sx(t).scrollLeft}function _xe(t){const e=rc(t),r=Sx(t),n=t.ownerDocument.body,s=As(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=As(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+RW(t);const a=-r.scrollTop;return xi(n).direction==="rtl"&&(o+=As(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function Pxe(t,e){const r=Rs(t),n=rc(t),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,c=0;if(s){i=s.width,o=s.height;const l=G7();(!l||l&&e==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:a,y:c}}function Ixe(t,e){const r=Hf(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=Wo(t)?Md(t):yl(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,c=s*i.x,l=n*i.y;return{width:o,height:a,x:c,y:l}}function bI(t,e,r){let n;if(e==="viewport")n=Pxe(t,r);else if(e==="document")n=_xe(rc(t));else if(Na(e))n=Ixe(e,r);else{const s=OW(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return gb(n)}function MW(t,e){const r=l1(t);return r===e||!Na(r)||kx(r)?!1:xi(r).position==="fixed"||MW(r,e)}function Txe(t,e){const r=e.get(t);if(r)return r;let n=pv(t,[],!1).filter(a=>Na(a)&&pl(a)!=="body"),s=null;const i=xi(t).position==="fixed";let o=i?l1(t):t;for(;Na(o)&&!kx(o);){const a=xi(o),c=V7(o);!c&&a.position==="fixed"&&(s=null),(i?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||gy(o)&&!c&&MW(t,o))?n=n.filter(f=>f!==o):s=a,o=l1(o)}return e.set(t,n),n}function Oxe(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?Txe(e,this._c):[].concat(r),n],a=o[0],c=o.reduce((l,f)=>{const u=bI(e,f,s);return l.top=As(u.top,l.top),l.right=vl(u.right,l.right),l.bottom=vl(u.bottom,l.bottom),l.left=As(u.left,l.left),l},bI(e,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Rxe(t){return TW(t)}function Mxe(t,e,r){const n=Wo(e),s=rc(e),i=r==="fixed",o=Hf(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=yl(0);if(n||!n&&!i)if((pl(e)!=="body"||gy(s))&&(a=Sx(e)),n){const l=Hf(e,!0,i,e);c.x=l.x+e.clientLeft,c.y=l.y+e.clientTop}else s&&(c.x=RW(s));return{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function xI(t,e){return!Wo(t)||xi(t).position==="fixed"?null:e?e(t):t.offsetParent}function NW(t,e){const r=Rs(t);if(!Wo(t))return r;let n=xI(t,e);for(;n&&Cxe(n)&&xi(n).position==="static";)n=xI(n,e);return n&&(pl(n)==="html"||pl(n)==="body"&&xi(n).position==="static"&&!V7(n))?r:n||Exe(t)||r}const Nxe=async function(t){let{reference:e,floating:r,strategy:n}=t;const s=this.getOffsetParent||NW,i=this.getDimensions;return{reference:Mxe(e,await s(r),n),floating:{x:0,y:0,...await i(r)}}};function jxe(t){return xi(t).direction==="rtl"}const Dxe={convertOffsetParentRelativeRectToViewportRelativeRect:Axe,getDocumentElement:rc,getClippingRect:Oxe,getOffsetParent:NW,getElementRects:Nxe,getClientRects:$xe,getDimensions:Rxe,getScale:Md,isElement:Na,isRTL:jxe};function Lxe(t,e){let r=null,n;const s=rc(t);function i(){clearTimeout(n),r&&r.disconnect(),r=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:f,width:u,height:d}=t.getBoundingClientRect();if(a||e(),!u||!d)return;const h=Ip(f),v=Ip(s.clientWidth-(l+u)),y=Ip(s.clientHeight-(f+d)),m=Ip(l),b={rootMargin:-h+"px "+-v+"px "+-y+"px "+-m+"px",threshold:As(0,vl(1,c))||1};let x=!0;function k($){const I=$[0].intersectionRatio;if(I!==c){if(!x)return o();I?o(!1,I):n=setTimeout(()=>{o(!1,1e-7)},100)}x=!1}try{r=new IntersectionObserver(k,{...b,root:s.ownerDocument})}catch{r=new IntersectionObserver(k,b)}r.observe(t)}return o(!0),i}function Bxe(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=K7(t),f=s||i?[...l?pv(l):[],...pv(e)]:[];f.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const u=l&&a?Lxe(l,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(g=>{let[b]=g;b&&b.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(e)})),r()}),l&&!c&&h.observe(l),h.observe(e));let v,y=c?Hf(t):null;c&&m();function m(){const g=Hf(t);y&&(g.x!==y.x||g.y!==y.y||g.width!==y.width||g.height!==y.height)&&r(),y=g,v=requestAnimationFrame(m)}return r(),()=>{f.forEach(g=>{s&&g.removeEventListener("scroll",r),i&&g.removeEventListener("resize",r)}),u&&u(),h&&h.disconnect(),h=null,c&&cancelAnimationFrame(v)}}const Fxe=(t,e,r)=>{const n=new Map,s={platform:Dxe,...r},i={...s.platform,_c:n};return vxe(t,e,{...s,platform:i})},zxe=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?yI({element:n.current,padding:s}).fn(r):{}:n?yI({element:n,padding:s}).fn(r):{}}}};var Mm=typeof document<"u"?p.useLayoutEffect:p.useEffect;function bb(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,s;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(!bb(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!bb(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function jW(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function wI(t,e){const r=jW(t);return Math.round(e*r)/r}function CI(t){const e=p.useRef(t);return Mm(()=>{e.current=t}),e}function qxe(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=t,[f,u]=p.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=p.useState(n);bb(d,n)||h(n);const[v,y]=p.useState(null),[m,g]=p.useState(null),b=p.useCallback(T=>{T!=I.current&&(I.current=T,y(T))},[y]),x=p.useCallback(T=>{T!==M.current&&(M.current=T,g(T))},[g]),k=i||v,$=o||m,I=p.useRef(null),M=p.useRef(null),D=p.useRef(f),H=CI(c),G=CI(s),V=p.useCallback(()=>{if(!I.current||!M.current)return;const T={placement:e,strategy:r,middleware:d};G.current&&(T.platform=G.current),Fxe(I.current,M.current,T).then(R=>{const A={...R,isPositioned:!0};Q.current&&!bb(D.current,A)&&(D.current=A,bn.flushSync(()=>{u(A)}))})},[d,e,r,G]);Mm(()=>{l===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,u(T=>({...T,isPositioned:!1})))},[l]);const Q=p.useRef(!1);Mm(()=>(Q.current=!0,()=>{Q.current=!1}),[]),Mm(()=>{if(k&&(I.current=k),$&&(M.current=$),k&&$){if(H.current)return H.current(k,$,V);V()}},[k,$,V,H]);const F=p.useMemo(()=>({reference:I,floating:M,setReference:b,setFloating:x}),[b,x]),C=p.useMemo(()=>({reference:k,floating:$}),[k,$]),S=p.useMemo(()=>{const T={position:r,left:0,top:0};if(!C.floating)return T;const R=wI(C.floating,f.x),A=wI(C.floating,f.y);return a?{...T,transform:"translate("+R+"px, "+A+"px)",...jW(C.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:A}},[r,a,C.floating,f.x,f.y]);return p.useMemo(()=>({...f,update:V,refs:F,elements:C,floatingStyles:S}),[f,V,F,C,S])}const Uxe=p.forwardRef((t,e)=>{const{children:r,width:n=10,height:s=5,...i}=t;return p.createElement(pt.svg,Ie({},i,{ref:e,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),t.asChild?r:p.createElement("polygon",{points:"0,0 30,0 15,10"}))}),Wxe=Uxe,DW="Popper",[LW,W1]=Fn(DW),[Hxe,BW]=LW(DW),Vxe=t=>{const{__scopePopper:e,children:r}=t,[n,s]=p.useState(null);return p.createElement(Hxe,{scope:e,anchor:n,onAnchorChange:s},r)},Gxe="PopperAnchor",Kxe=p.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=BW(Gxe,r),o=p.useRef(null),a=Ft(e,o);return p.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:p.createElement(pt.div,Ie({},s,{ref:a}))}),FW="PopperContent",[Yxe,Qxe]=LW(FW),Jxe=p.forwardRef((t,e)=>{var r,n,s,i,o,a,c,l;const{__scopePopper:f,side:u="bottom",sideOffset:d=0,align:h="center",alignOffset:v=0,arrowPadding:y=0,avoidCollisions:m=!0,collisionBoundary:g=[],collisionPadding:b=0,sticky:x="partial",hideWhenDetached:k=!1,updatePositionStrategy:$="optimized",onPlaced:I,...M}=t,D=BW(FW,f),[H,G]=p.useState(null),V=Ft(e,pe=>G(pe)),[Q,F]=p.useState(null),C=D7(Q),S=(r=C==null?void 0:C.width)!==null&&r!==void 0?r:0,T=(n=C==null?void 0:C.height)!==null&&n!==void 0?n:0,R=u+(h!=="center"?"-"+h:""),A=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},N=Array.isArray(g)?g:[g],B=N.length>0,P={padding:A,boundary:N.filter(twe),altBoundary:B},{refs:E,floatingStyles:L,placement:q,isPositioned:_,middlewareData:U}=qxe({strategy:"fixed",placement:R,whileElementsMounted:(...pe)=>Bxe(...pe,{animationFrame:$==="always"}),elements:{reference:D.anchor},middleware:[gxe({mainAxis:d+T,alignmentAxis:v}),m&&bxe({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?xxe():void 0,...P}),m&&yxe({...P}),wxe({...P,apply:({elements:pe,rects:$e,availableWidth:Se,availableHeight:_e})=>{const{width:Ye,height:it}=$e.reference,ze=pe.floating.style;ze.setProperty("--radix-popper-available-width",`${Se}px`),ze.setProperty("--radix-popper-available-height",`${_e}px`),ze.setProperty("--radix-popper-anchor-width",`${Ye}px`),ze.setProperty("--radix-popper-anchor-height",`${it}px`)}}),Q&&zxe({element:Q,padding:y}),rwe({arrowWidth:S,arrowHeight:T}),k&&pxe({strategy:"referenceHidden",...P})]}),[W,J]=zW(q),X=bi(I);Ls(()=>{_&&(X==null||X())},[_,X]);const re=(s=U.arrow)===null||s===void 0?void 0:s.x,ee=(i=U.arrow)===null||i===void 0?void 0:i.y,se=((o=U.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[xe,de]=p.useState();return Ls(()=>{H&&de(window.getComputedStyle(H).zIndex)},[H]),p.createElement("div",{ref:E.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:_?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[(a=U.transformOrigin)===null||a===void 0?void 0:a.x,(c=U.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:t.dir},p.createElement(Yxe,{scope:f,placedSide:W,onArrowChange:F,arrowX:re,arrowY:ee,shouldHideArrow:se},p.createElement(pt.div,Ie({"data-side":W,"data-align":J},M,{ref:V,style:{...M.style,animation:_?void 0:"none",opacity:(l=U.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))}),Xxe="PopperArrow",Zxe={top:"bottom",right:"left",bottom:"top",left:"right"},ewe=p.forwardRef(function(e,r){const{__scopePopper:n,...s}=e,i=Qxe(Xxe,n),o=Zxe[i.placedSide];return p.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},p.createElement(Wxe,Ie({},s,{ref:r,style:{...s.style,display:"block"}})))});function twe(t){return t!==null}const rwe=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s,i,o;const{placement:a,rects:c,middlewareData:l}=e,u=((r=l.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[v,y]=zW(a),m={start:"0%",center:"50%",end:"100%"}[y],g=((n=(s=l.arrow)===null||s===void 0?void 0:s.x)!==null&&n!==void 0?n:0)+d/2,b=((i=(o=l.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+h/2;let x="",k="";return v==="bottom"?(x=u?m:`${g}px`,k=`${-h}px`):v==="top"?(x=u?m:`${g}px`,k=`${c.floating.height+h}px`):v==="right"?(x=`${-h}px`,k=u?m:`${b}px`):v==="left"&&(x=`${c.floating.width+h}px`,k=u?m:`${b}px`),{data:{x,y:k}}}});function zW(t){const[e,r="center"]=t.split("-");return[e,r]}const qW=Vxe,UW=Kxe,WW=Jxe,nwe=ewe,HW=p.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...s}=t;return n?GN.createPortal(p.createElement(pt.div,Ie({},s,{ref:e})),n):null}),o6="rovingFocusGroup.onEntryFocus",swe={bubbles:!1,cancelable:!0},Y7="RovingFocusGroup",[v8,VW,iwe]=Cx(Y7),[owe,H1]=Fn(Y7,[iwe]),[awe,cwe]=owe(Y7),lwe=p.forwardRef((t,e)=>p.createElement(v8.Provider,{scope:t.__scopeRovingFocusGroup},p.createElement(v8.Slot,{scope:t.__scopeRovingFocusGroup},p.createElement(fwe,Tr({},t,{ref:e}))))),fwe=p.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:l,...f}=t,u=p.useRef(null),d=Ft(e,u),h=q7(i),[v=null,y]=hl({prop:o,defaultProp:a,onChange:c}),[m,g]=p.useState(!1),b=bi(l),x=VW(r),k=p.useRef(!1),[$,I]=p.useState(0);return p.useEffect(()=>{const M=u.current;if(M)return M.addEventListener(o6,b),()=>M.removeEventListener(o6,b)},[b]),p.createElement(awe,{scope:r,orientation:n,dir:h,loop:s,currentTabStopId:v,onItemFocus:p.useCallback(M=>y(M),[y]),onItemShiftTab:p.useCallback(()=>g(!0),[]),onFocusableItemAdd:p.useCallback(()=>I(M=>M+1),[]),onFocusableItemRemove:p.useCallback(()=>I(M=>M-1),[])},p.createElement(pt.div,Tr({tabIndex:m||$===0?-1:0,"data-orientation":n},f,{ref:d,style:{outline:"none",...t.style},onMouseDown:Te(t.onMouseDown,()=>{k.current=!0}),onFocus:Te(t.onFocus,M=>{const D=!k.current;if(M.target===M.currentTarget&&D&&!m){const H=new CustomEvent(o6,swe);if(M.currentTarget.dispatchEvent(H),!H.defaultPrevented){const G=x().filter(S=>S.focusable),V=G.find(S=>S.active),Q=G.find(S=>S.id===v),C=[V,Q,...G].filter(Boolean).map(S=>S.ref.current);GW(C)}}k.current=!1}),onBlur:Te(t.onBlur,()=>g(!1))})))}),uwe="RovingFocusGroupItem",dwe=p.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=t,a=ga(),c=i||a,l=cwe(uwe,r),f=l.currentTabStopId===c,u=VW(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=l;return p.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),p.createElement(v8.ItemSlot,{scope:r,id:c,focusable:n,active:s},p.createElement(pt.span,Tr({tabIndex:f?0:-1,"data-orientation":l.orientation},o,{ref:e,onMouseDown:Te(t.onMouseDown,v=>{n?l.onItemFocus(c):v.preventDefault()}),onFocus:Te(t.onFocus,()=>l.onItemFocus(c)),onKeyDown:Te(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){l.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=ywe(v,l.orientation,l.dir);if(y!==void 0){v.preventDefault();let g=u().filter(b=>b.focusable).map(b=>b.ref.current);if(y==="last")g.reverse();else if(y==="prev"||y==="next"){y==="prev"&&g.reverse();const b=g.indexOf(v.currentTarget);g=l.loop?pwe(g,b+1):g.slice(b+1)}setTimeout(()=>GW(g))}})})))}),hwe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function vwe(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function ywe(t,e,r){const n=vwe(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return hwe[n]}function GW(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function pwe(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const mwe=lwe,KW=dwe;var gwe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Pu=new WeakMap,Tp=new WeakMap,Op={},a6=0,YW=function(t){return t&&(t.host||YW(t.parentNode))},bwe=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=YW(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})},xwe=function(t,e,r,n){var s=bwe(e,Array.isArray(t)?t:[t]);Op[r]||(Op[r]=new WeakMap);var i=Op[r],o=[],a=new Set,c=new Set(s),l=function(u){!u||a.has(u)||(a.add(u),l(u.parentNode))};s.forEach(l);var f=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else{var h=d.getAttribute(n),v=h!==null&&h!=="false",y=(Pu.get(d)||0)+1,m=(i.get(d)||0)+1;Pu.set(d,y),i.set(d,m),o.push(d),y===1&&v&&Tp.set(d,!0),m===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}})};return f(e),a.clear(),a6++,function(){o.forEach(function(u){var d=Pu.get(u)-1,h=i.get(u)-1;Pu.set(u,d),i.set(u,h),d||(Tp.has(u)||u.removeAttribute(n),Tp.delete(u)),h||u.removeAttribute(r)}),a6--,a6||(Pu=new WeakMap,Pu=new WeakMap,Tp=new WeakMap,Op={})}},QW=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=e||gwe(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),xwe(n,s,r,"aria-hidden")):function(){return null}},ko=function(){return ko=Object.assign||function(e){for(var r,n=1,s=arguments.length;n"u")return Dwe;var e=Lwe(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])}},Fwe=eH(),zwe=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + .`.concat(Cwe,` { + 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(s,`px; + padding-top: `).concat(i,`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(Nm,` { + right: `).concat(a,"px ").concat(n,`; + } + + .`).concat(jm,` { + margin-right: `).concat(a,"px ").concat(n,`; + } + + .`).concat(Nm," .").concat(Nm,` { + right: 0 `).concat(n,`; + } + + .`).concat(jm," .").concat(jm,` { + margin-right: 0 `).concat(n,`; + } + + body { + `).concat(Ewe,": ").concat(a,`px; + } +`)},qwe=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n,i=p.useMemo(function(){return Bwe(s)},[s]);return p.createElement(Fwe,{styles:zwe(i,!e,s,r?"":"!important")})},y8=!1;if(typeof window<"u")try{var Rp=Object.defineProperty({},"passive",{get:function(){return y8=!0,!0}});window.addEventListener("test",Rp,Rp),window.removeEventListener("test",Rp,Rp)}catch{y8=!1}var Iu=y8?{passive:!1}:!1,Uwe=function(t){return t.tagName==="TEXTAREA"},tH=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!Uwe(t)&&r[e]==="visible")},Wwe=function(t){return tH(t,"overflowY")},Hwe=function(t){return tH(t,"overflowX")},EI=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=rH(t,r);if(n){var s=nH(t,r),i=s[1],o=s[2];if(i>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},Vwe=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},Gwe=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},rH=function(t,e){return t==="v"?Wwe(e):Hwe(e)},nH=function(t,e){return t==="v"?Vwe(e):Gwe(e)},Kwe=function(t,e){return t==="h"&&e==="rtl"?-1:1},Ywe=function(t,e,r,n,s){var i=Kwe(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,c=e.contains(a),l=!1,f=o>0,u=0,d=0;do{var h=nH(t,a),v=h[0],y=h[1],m=h[2],g=y-m-i*v;(v||g)&&rH(t,a)&&(u+=g,d+=v),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(f&&(s&&u===0||!s&&o>u)||!f&&(s&&d===0||!s&&-o>d))&&(l=!0),l},Mp=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},kI=function(t){return[t.deltaX,t.deltaY]},SI=function(t){return t&&"current"in t?t.current:t},Qwe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Jwe=function(t){return` + .block-interactivity-`.concat(t,` {pointer-events: none;} + .allow-interactivity-`).concat(t,` {pointer-events: all;} +`)},Xwe=0,Tu=[];function Zwe(t){var e=p.useRef([]),r=p.useRef([0,0]),n=p.useRef(),s=p.useState(Xwe++)[0],i=p.useState(function(){return eH()})[0],o=p.useRef(t);p.useEffect(function(){o.current=t},[t]),p.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=wwe([t.lockRef.current],(t.shards||[]).map(SI),!0).filter(Boolean);return y.forEach(function(m){return m.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=p.useCallback(function(y,m){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var g=Mp(y),b=r.current,x="deltaX"in y?y.deltaX:b[0]-g[0],k="deltaY"in y?y.deltaY:b[1]-g[1],$,I=y.target,M=Math.abs(x)>Math.abs(k)?"h":"v";if("touches"in y&&M==="h"&&I.type==="range")return!1;var D=EI(M,I);if(!D)return!0;if(D?$=M:($=M==="v"?"h":"v",D=EI(M,I)),!D)return!1;if(!n.current&&"changedTouches"in y&&(x||k)&&(n.current=$),!$)return!0;var H=n.current||$;return Ywe(H,m,y,H==="h"?x:k,!0)},[]),c=p.useCallback(function(y){var m=y;if(!(!Tu.length||Tu[Tu.length-1]!==i)){var g="deltaY"in m?kI(m):Mp(m),b=e.current.filter(function($){return $.name===m.type&&$.target===m.target&&Qwe($.delta,g)})[0];if(b&&b.should){m.cancelable&&m.preventDefault();return}if(!b){var x=(o.current.shards||[]).map(SI).filter(Boolean).filter(function($){return $.contains(m.target)}),k=x.length>0?a(m,x[0]):!o.current.noIsolation;k&&m.cancelable&&m.preventDefault()}}},[]),l=p.useCallback(function(y,m,g,b){var x={name:y,delta:m,target:g,should:b};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(k){return k!==x})},1)},[]),f=p.useCallback(function(y){r.current=Mp(y),n.current=void 0},[]),u=p.useCallback(function(y){l(y.type,kI(y),y.target,a(y,t.lockRef.current))},[]),d=p.useCallback(function(y){l(y.type,Mp(y),y.target,a(y,t.lockRef.current))},[]);p.useEffect(function(){return Tu.push(i),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Iu),document.addEventListener("touchmove",c,Iu),document.addEventListener("touchstart",f,Iu),function(){Tu=Tu.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Iu),document.removeEventListener("touchmove",c,Iu),document.removeEventListener("touchstart",f,Iu)}},[]);var h=t.removeScrollBar,v=t.inert;return p.createElement(p.Fragment,null,v?p.createElement(i,{styles:Jwe(s)}):null,h?p.createElement(qwe,{gapMode:"margin"}):null)}const e5e=Iwe(ZW,Zwe);var sH=p.forwardRef(function(t,e){return p.createElement(Ax,ko({},t,{ref:e,sideCar:e5e}))});sH.classNames=Ax.classNames;const iH=sH,t5e=["Enter"," "],$x="Menu",[r5e,dFe,n5e]=Cx($x),[lu,oH]=Fn($x,[n5e,W1,H1]);W1();const s5e=H1();lu($x);const[hFe,i5e]=lu($x),o5e="MenuPortal";lu(o5e,{forceMount:void 0});const a5e="MenuContent",[vFe,aH]=lu(a5e),p8="MenuItem",AI="menu.itemSelect",cH=p.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...s}=t,i=p.useRef(null),o=i5e(p8,t.__scopeMenu),a=aH(p8,t.__scopeMenu),c=Ft(e,i),l=p.useRef(!1),f=()=>{const u=i.current;if(!r&&u){const d=new CustomEvent(AI,{bubbles:!0,cancelable:!0});u.addEventListener(AI,h=>n==null?void 0:n(h),{once:!0}),L7(u,d),d.defaultPrevented?l.current=!1:o.onClose()}};return p.createElement(c5e,Ie({},s,{ref:c,disabled:r,onClick:Te(t.onClick,f),onPointerDown:u=>{var d;(d=t.onPointerDown)===null||d===void 0||d.call(t,u),l.current=!0},onPointerUp:Te(t.onPointerUp,u=>{var d;l.current||(d=u.currentTarget)===null||d===void 0||d.click()}),onKeyDown:Te(t.onKeyDown,u=>{const d=a.searchRef.current!=="";r||d&&u.key===" "||t5e.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),c5e=p.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=t,o=aH(p8,r),a=s5e(r),c=p.useRef(null),l=Ft(e,c),[f,u]=p.useState(!1),[d,h]=p.useState("");return p.useEffect(()=>{const v=c.current;if(v){var y;h(((y=v.textContent)!==null&&y!==void 0?y:"").trim())}},[i.children]),p.createElement(r5e.ItemSlot,{scope:r,disabled:n,textValue:s??d},p.createElement(KW,Ie({asChild:!0},a,{focusable:!n}),p.createElement(pt.div,Ie({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},i,{ref:l,onPointerMove:Te(t.onPointerMove,$I(v=>{n?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus())})),onPointerLeave:Te(t.onPointerLeave,$I(v=>o.onItemLeave(v))),onFocus:Te(t.onFocus,()=>u(!0)),onBlur:Te(t.onBlur,()=>u(!1))}))))}),l5e=p.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...s}=t;return p.createElement(fH,{scope:t.__scopeMenu,checked:r},p.createElement(cH,Ie({role:"menuitemcheckbox","aria-checked":xb(r)?"mixed":r},s,{ref:e,"data-state":Q7(r),onSelect:Te(s.onSelect,()=>n==null?void 0:n(xb(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),f5e="MenuRadioGroup",[yFe,u5e]=lu(f5e,{value:void 0,onValueChange:()=>{}}),d5e="MenuRadioItem",h5e=p.forwardRef((t,e)=>{const{value:r,...n}=t,s=u5e(d5e,t.__scopeMenu),i=r===s.value;return p.createElement(fH,{scope:t.__scopeMenu,checked:i},p.createElement(cH,Ie({role:"menuitemradio","aria-checked":i},n,{ref:e,"data-state":Q7(i),onSelect:Te(n.onSelect,()=>{var o;return(o=s.onValueChange)===null||o===void 0?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})))}),lH="MenuItemIndicator",[fH,v5e]=lu(lH,{checked:!1}),y5e=p.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...s}=t,i=v5e(lH,r);return p.createElement(tc,{present:n||xb(i.checked)||i.checked===!0},p.createElement(pt.span,Ie({},s,{ref:e,"data-state":Q7(i.checked)})))}),p5e="MenuSub";lu(p5e);function xb(t){return t==="indeterminate"}function Q7(t){return xb(t)?"indeterminate":t?"checked":"unchecked"}function $I(t){return e=>e.pointerType==="mouse"?t(e):void 0}const m5e=l5e,g5e=h5e,b5e=y5e,uH="DropdownMenu",[x5e,pFe]=Fn(uH,[oH]),J7=oH();x5e(uH);const w5e=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=J7(r);return p.createElement(m5e,Ie({},s,n,{ref:e}))}),C5e=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=J7(r);return p.createElement(g5e,Ie({},s,n,{ref:e}))}),E5e=p.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=J7(r);return p.createElement(b5e,Ie({},s,n,{ref:e}))}),k5e=w5e,S5e=C5e,dH=E5e;var hH="_1k2mbvi4 _1k2mbvi3 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12ws fyvr12wm fyvr11h0 fyvr11ko fyvr11jw fyvr12v7 fyvr11n4 fyvr11hw fyvr12s7",vH="_1k2mbvi5";const A5e=({children:t})=>ae.jsx(dH,{className:vH,children:t});p.forwardRef(({className:t,children:e,...r},n)=>ae.jsxs(k5e,{className:xs(hH,t),...r,ref:n,children:[ae.jsx(A5e,{children:ae.jsx(xW,{size:"xs"})}),ae.jsx(at,{variant:"small",children:e})]}));p.forwardRef(({className:t,children:e,...r},n)=>ae.jsxs(S5e,{className:xs(hH,t),...r,ref:n,children:[ae.jsx(dH,{className:vH,children:ae.jsx(at,{children:"•"})}),ae.jsx(at,{variant:"small",children:e})]}));const _x=p.forwardRef((t,e)=>{const{icon:r,size:n="md",...s}=t;return ae.jsx(Af,{leftIcon:r,size:n,flexShrink:"0",ref:e,...s})}),$5e=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var _5e="_1hq71vk1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _1hq71vk0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12n7 fyvr12fv fyvr1217 fyvr128j fyvr12np fyvr12gd fyvr121p fyvr1291 fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",P5e=Nr({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:[]}),I5e="_1hq71vka _1hq71vk9 fyvr12wp fyvr12wj fyvr11ho fyvr12vj fyvr1ko fyvr1oo fyvr1mo fyvr1qo";const T5e={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*, video/*",pdf:".pdf,application/pdf",mp4:".mp4,video/mp4"};p.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:s=!1,id:i,label:o="",labelLocation:a="hidden",name:c,onValueChange:l,placeholder:f="Upload a file",validExtensions:u,...d}=t,h=p.useRef(null),v=$5e(h,e),[y,m]=p.useState(null),g=x=>{const k=x.currentTarget.files;if(!k||!k[0])return;const $=k[0],I=$.name,M=$.size/1e3;m({name:I,size:M,extension:I.split(".").pop()??""}),l==null||l($)},b=u.map(x=>T5e[x]).join(",");return ae.jsx(F1,{description:n,disabled:s,display:"grid",id:i??c,label:o,labelLocation:a,children:ae.jsxs(ge,{width:"full",minWidth:"0",justifyContent:y?"space-between":"flex-start",gap:"2",color:y?"text100":"text50",className:xs(_5e,P5e({borderRadius:r})),children:[y?ae.jsxs(ge,{flexDirection:"row",gap:"2",alignItems:"center",minWidth:"0",children:[ae.jsx(at,{ellipsis:!0,children:y.name}),ae.jsxs(at,{color:"text50",variant:"xsmall",whiteSpace:"nowrap",children:[y.size.toFixed(2)," kb"]})]}):ae.jsx(at,{ellipsis:!0,children:f}),ae.jsx(ge,{accept:b,as:"input",className:I5e,cursor:"pointer",disabled:s,id:i??c,name:c,onChange:g,ref:v,type:"file",...d}),y&&ae.jsx(_x,{cursor:"pointer",icon:B7,size:"xs",onClick:x=>{var k;x.preventDefault(),x.stopPropagation(),(k=h.current)!=null&&k.value&&(h.current.value=""),l==null||l(null),m(null)},zIndex:"10"})]})})});var O5e=Nr({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const m8=1e3,Nd=64,f6=Nd/2,u6=(t,e=m8)=>t%e/(m8/Nd),ef=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let s=0,i;s>>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)},R5e=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),s=t%360,i=(t+120)%360,o=r%360;return{id:ef(n),a:`hsl(${s}deg 100% 40%)`,b:`hsl(${i}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},M5e=(t,e)=>{const r=[];for(let n=0;n{const i=Nd/10+u6(n.r,m8*1.5/(s+1));return{...R5e(n.a,n.b,n.c),x:u6(n.x),y:u6(n.y),r:i}})},yH=p.memo(t=>{const{className:e,address:r,size:n="md",complexity:s=1,...i}=t,o=M5e(r,s);return ae.jsxs(ge,{as:"svg",className:xs(e,O5e({size:n})),viewBox:`0 0 ${Nd} ${Nd}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...i,children:[ae.jsxs("defs",{children:[ae.jsx("clipPath",{id:"circle-clip",children:ae.jsx("circle",{cx:f6,cy:f6,r:f6})}),ae.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[ae.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),ae.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),ae.jsx("feGaussianBlur",{stdDeviation:Nd/10,result:"effect1_foregroundBlur"})]}),ae.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[ae.jsx("stop",{offset:"0",stopColor:o[0].c}),ae.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>ae.jsxs(p.Fragment,{children:[ae.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[ae.jsx("stop",{offset:"0",stopColor:a.a}),ae.jsx("stop",{offset:"1",stopColor:a.b})]}),ae.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[ae.jsx("stop",{offset:"0",stopColor:a.c}),ae.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),ae.jsxs("g",{clipPath:"url(#circle-clip)",children:[ae.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),ae.jsx("g",{filter:"url(#blur)",children:o.map(a=>ae.jsxs(p.Fragment,{children:[ae.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),ae.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})}),V1=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[s,i]=p.useState(!1),o=a=>{i(!0),r==null||r(a)};return ae.jsx(ge,{as:Yi.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:s?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},pH="Dialog",[mH,mFe]=Fn(pH),[N5e,Nl]=mH(pH),j5e=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=p.useRef(null),c=p.useRef(null),[l=!1,f]=hl({prop:n,defaultProp:s,onChange:i});return p.createElement(N5e,{scope:e,triggerRef:a,contentRef:c,contentId:ga(),titleId:ga(),descriptionId:ga(),open:l,onOpenChange:f,onOpenToggle:p.useCallback(()=>f(u=>!u),[f]),modal:o},r)},gH="DialogPortal",[D5e,bH]=mH(gH,{forceMount:void 0}),L5e=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:s}=t,i=Nl(gH,e);return p.createElement(D5e,{scope:e,forceMount:r},p.Children.map(n,o=>p.createElement(tc,{present:r||i.open},p.createElement(HW,{asChild:!0,container:s},o))))},g8="DialogOverlay",B5e=p.forwardRef((t,e)=>{const r=bH(g8,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=Nl(g8,t.__scopeDialog);return i.modal?p.createElement(tc,{present:n||i.open},p.createElement(F5e,Ie({},s,{ref:e}))):null}),F5e=p.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Nl(g8,r);return p.createElement(iH,{as:c1,allowPinchZoom:!0,shards:[s.contentRef]},p.createElement(pt.div,Ie({"data-state":wH(s.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),mv="DialogContent",z5e=p.forwardRef((t,e)=>{const r=bH(mv,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=Nl(mv,t.__scopeDialog);return p.createElement(tc,{present:n||i.open},i.modal?p.createElement(q5e,Ie({},s,{ref:e})):p.createElement(U5e,Ie({},s,{ref:e})))}),q5e=p.forwardRef((t,e)=>{const r=Nl(mv,t.__scopeDialog),n=p.useRef(null),s=Ft(e,r.contentRef,n);return p.useEffect(()=>{const i=n.current;if(i)return QW(i)},[]),p.createElement(xH,Ie({},t,{ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Te(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:Te(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:Te(t.onFocusOutside,i=>i.preventDefault())}))}),U5e=p.forwardRef((t,e)=>{const r=Nl(mv,t.__scopeDialog),n=p.useRef(!1),s=p.useRef(!1);return p.createElement(xH,Ie({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,i),!i.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}n.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=i.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}}))}),xH=p.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=Nl(mv,r),c=p.useRef(null),l=Ft(e,c);return SW(),p.createElement(p.Fragment,null,p.createElement(AW,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i},p.createElement(Ex,Ie({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":wH(a.open)},o,{ref:l,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),W5e="DialogClose",H5e=p.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Nl(W5e,r);return p.createElement(pt.button,Ie({type:"button"},n,{ref:e,onClick:Te(t.onClick,()=>s.onOpenChange(!1))}))});function wH(t){return t?"open":"closed"}const V5e=j5e,G5e=L5e,K5e=B5e,Y5e=z5e,Q5e=H5e;var J5e=Nr({defaultClassName:"_1vqx0w91 _1vqx0w90 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]}),X5e=Nr({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]});const Z5e=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:s,...i}=t;return ae.jsx(ge,{className:X5e({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...i,children:ae.jsx(ge,{className:J5e({direction:n}),background:"backgroundPrimary",...s,children:e})})};function e6e(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function t6e(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 CH(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=t.constructor();for(var s in t){var i=t[s],o=[...r,s];typeof i=="string"||typeof i=="number"||i==null?n[s]=e(i,o):typeof i=="object"&&!Array.isArray(i)?n[s]=CH(i,e,o):console.warn('Skipping invalid key "'.concat(o.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(i)?"Array":typeof i,'"'))}return n}function _I(t,e,r){t.style.setProperty(e6e(e),r)}function PI(t,e,r){if(typeof r=="object"){var n=e;CH(r,(a,c)=>{a!=null&&_I(t,t6e(n,c),String(a))})}else{var s=e;for(var i in s){var o=s[i];o!=null&&_I(t,i,s[i])}}}const X7=["dark","light"],r6e="dark",n6e="data-theme",II="@sequence.theme",s6e=t=>X7.includes(t),i6e=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),EH=t=>t?`${II}.${t}`:II,o6e=t=>{const e=localStorage.getItem(EH(t));return e&&X7.includes(e)?e:r6e},kH=p.createContext(null),a6e=t=>{const[e,r]=p.useState(t.theme||o6e(t.scope));p.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),p.useEffect(()=>{t.theme&&r(t.theme)},[t.theme]),p.useEffect(()=>{const s=document.querySelector(t.root||":root");s&&(s6e(e)?(s.setAttribute(n6e,e),PI(s,XP,{colors:Lbe[e]})):i6e(e)&&PI(s,XP,{colors:e}))},[e,t.root]);const n=p.useMemo(()=>({theme:e,root:t.root,setTheme:s=>{X7.includes(s)&&(localStorage.setItem(EH(t.scope),s),r(s))}}),[e,t.root,t.scope]);return ae.jsx(kH.Provider,{value:n,children:t.children})},Z7=()=>{const t=p.useContext(kH);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t};var c6e="_5b32m91 _5b32m90 fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11nk fyvr1ko fyvr1oo fyvr1qo fyvr1mo",l6e="_5b32m93 _5b32m92 fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",f6e=Nr({defaultClassName:"_5b32m95 _5b32m94 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12ws fyvr12wm fyvr11h0 fyvr11i4 fyvr11hs fyvr11sd fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]}),u6e="_5b32m9b _5b32m9a fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11nk";const TI=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:s=!1,isDismissible:i=!0,onClose:o,scroll:a=!0,size:c="lg",overlayProps:l,contentProps:f}=t,{root:u}=Z7(),d=document.querySelector(u||"body");return ae.jsx(V5e,{modal:!0,defaultOpen:!0,onOpenChange:o,children:ae.jsx(G5e,{forceMount:!0,container:d,children:ae.jsxs(ge,{className:c6e,children:[ae.jsx(ge,{as:K5e,asChild:!0,background:r,className:l6e,forceMount:!0,children:ae.jsx(Yi.div,{initial:s?!1:{opacity:0},animate:s?!1:{opacity:1},exit:s?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...l},"modal-overlay")}),ae.jsx(Y5e,{asChild:!0,className:f6e({autoHeight:e,size:c}),forceMount:!0,onEscapeKeyDown:h=>{i?o==null||o():h.preventDefault()},onInteractOutside:h=>{i||h.preventDefault()},children:ae.jsxs(Yi.div,{initial:s?!1:{y:"100%",opacity:c==="sm"?0:1},animate:s?!1:{y:0,opacity:1},exit:s?void 0:{y:"100%",opacity:c==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...f,children:[a?ae.jsx(Z5e,{children:n}):n,i&&ae.jsx(Q5e,{asChild:!0,children:ae.jsx(_x,{icon:B7,backdropFilter:"blur",size:"xs",className:u6e,"aria-label":"Close"})})]},"modal-content")})]})})})};var d6e="_1acm19y1 _1acm19y0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11od fyvr12s1 fyvr1g0 fyvr118g",h6e=Nr({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:[]}),v6e=Nr({defaultClassName:"_1acm19ya _1acm19y9 fyvr1wg fyvr1yc fyvr1t4 fyvr1v0 fyvr12wp fyvr12wj fyvr11gw fyvr11od fyvr12s1 fyvr12o1 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 e9=p.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",leftIcon:f,rightIcon:u,name:d,controls:h,type:v="text",numeric:y=!1,...m}=t;return ae.jsx(F1,{description:i,disabled:o,display:"grid",id:a??d,label:c,labelLocation:l,children:ae.jsx(ge,{width:"full",children:ae.jsxs(ge,{className:xs(d6e,h6e({borderRadius:s})),children:[f&&ae.jsx(f,{size:"sm"}),ae.jsx(ge,{as:r,autoComplete:n,spellCheck:"false",className:v6e({numeric:y}),disabled:o,id:a??d,name:d,ref:e,type:v,...m}),u&&ae.jsx(u,{size:"sm"}),h]})})})}),y6e=RegExp("^\\d*(?:\\\\[.])?\\d*$");function p6e(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}p.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:s,onBlur:i,...o}=t,a=l=>{let{value:f}=l.target;f=f.replace(/,/g,"."),f.startsWith(".")&&(f="0"+f),f.startsWith("0")&&(f=f.replace(/^0+(?=\d)/,"")),(f===""||y6e.test(p6e(f)))&&(s==null||s({...l,target:{...l.target,value:f}}))},c=l=>{const{value:f}=l.target;let u=f;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),i==null||i(l),u!==f&&(s==null||s({...l,target:{...l.target,value:u}}))};return ae.jsx(e9,{name:r,onChange:a,onBlur:c,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})});Nr({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const SH="Progress",Px=100,[m6e,gFe]=Fn(SH),[g6e,bFe]=m6e(SH),b6e=p.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:s,getValueLabel:i=x6e,...o}=t,a=b8(s)?s:Px,c=AH(n,a)?n:null,l=wb(c)?i(c,a):void 0;return p.createElement(g6e,{scope:r,value:c,max:a},p.createElement(pt.div,Tr({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":wb(c)?c:void 0,"aria-valuetext":l,role:"progressbar","data-state":w6e(c,a),"data-value":c??void 0,"data-max":a},o,{ref:e})))});b6e.propTypes={max(t,e,r){const n=t[e],s=String(n);return n&&!b8(n)?new Error(C6e(s,r)):null},value(t,e,r){const n=t[e],s=String(n),i=b8(t.max)?t.max:Px;return n!=null&&!AH(n,i)?new Error(E6e(s,r)):null}};function x6e(t,e){return`${Math.round(t/e*100)}%`}function w6e(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function wb(t){return typeof t=="number"}function b8(t){return wb(t)&&!isNaN(t)&&t>0}function AH(t,e){return wb(t)&&!isNaN(t)&&t<=e&&t>=0}function C6e(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Px}\`.`}function E6e(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 ${Px} if no \`max\` prop is set) + - \`null\` if the progress is indeterminate. + +Defaulting to \`null\`.`}const $H="Radio",[k6e,_H]=Fn($H),[S6e,A6e]=k6e($H),$6e=p.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:c,...l}=t,[f,u]=p.useState(null),d=Ft(e,y=>u(y)),h=p.useRef(!1),v=f?!!f.closest("form"):!0;return p.createElement(S6e,{scope:r,checked:s,disabled:o},p.createElement(pt.button,Tr({type:"button",role:"radio","aria-checked":s,"data-state":PH(s),"data-disabled":o?"":void 0,disabled:o,value:a},l,{ref:d,onClick:Te(t.onClick,y=>{s||c==null||c(),v&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})),v&&p.createElement(I6e,{control:f,bubbles:!h.current,name:n,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}}))}),_6e="RadioIndicator",P6e=p.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...s}=t,i=A6e(_6e,r);return p.createElement(tc,{present:n||i.checked},p.createElement(pt.span,Tr({"data-state":PH(i.checked),"data-disabled":i.disabled?"":void 0},s,{ref:e})))}),I6e=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=p.useRef(null),o=j7(r),a=D7(e);return p.useEffect(()=>{const c=i.current,l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(c,r),c.dispatchEvent(d)}},[o,r,n]),p.createElement("input",Tr({type:"radio","aria-hidden":!0,defaultChecked:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function PH(t){return t?"checked":"unchecked"}const T6e=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],IH="RadioGroup",[O6e,xFe]=Fn(IH,[H1,_H]),TH=H1(),OH=_H(),[R6e,M6e]=O6e(IH),N6e=p.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:c,dir:l,loop:f=!0,onValueChange:u,...d}=t,h=TH(r),v=q7(l),[y,m]=hl({prop:i,defaultProp:s,onChange:u});return p.createElement(R6e,{scope:r,name:n,required:o,disabled:a,value:y,onValueChange:m},p.createElement(mwe,Tr({asChild:!0},h,{orientation:c,dir:v,loop:f}),p.createElement(pt.div,Tr({role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":a?"":void 0,dir:v},d,{ref:e}))))}),j6e="RadioGroupItem",D6e=p.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...s}=t,i=M6e(j6e,r),o=i.disabled||n,a=TH(r),c=OH(r),l=p.useRef(null),f=Ft(e,l),u=i.value===s.value,d=p.useRef(!1);return p.useEffect(()=>{const h=y=>{T6e.includes(y.key)&&(d.current=!0)},v=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),p.createElement(KW,Tr({asChild:!0},a,{focusable:!o,active:u}),p.createElement($6e,Tr({disabled:o,required:i.required,checked:u},c,s,{name:i.name,ref:f,onCheck:()=>i.onValueChange(s.value),onKeyDown:Te(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Te(s.onFocus,()=>{var h;d.current&&((h=l.current)===null||h===void 0||h.click())})})))}),L6e=p.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,s=OH(r);return p.createElement(P6e,Tr({},s,n,{ref:e}))}),B6e=N6e,F6e=D6e,z6e=L6e;var q6e=Nr({defaultClassName:"io59uy3 io59uy0 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1so fyvr1uk fyvr1wg fyvr1yc fyvr12nd fyvr12g1 fyvr121d fyvr128p fyvr12nj fyvr12g7 fyvr121j fyvr128v fyvr11od fyvr12v7 fyvr12v3 fyvr12vz fyvr12vr",variantClassNames:{size:{sm:"io59uy4 io59uy1 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy5 io59uy2 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]}),U6e=Nr({defaultClassName:"io59uy8 io59uy7 io59uy6 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12s1",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]});const W6e=t=>{const{id:e,label:r,size:n="sm",value:s,disabled:i}=t;return ae.jsx(ge,{alignItems:"center",children:ae.jsx(F1,{disabled:i,display:"flex",id:e,label:r,labelLocation:"right",children:ae.jsx(F6e,{className:q6e({size:n}),value:s,id:e,disabled:i,children:ae.jsx(z6e,{className:U6e({size:n})})})})})};p.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:s="2",name:i,options:o,size:a="sm",...c}=t;return ae.jsx(B6e,{disabled:n,name:i,ref:e,...c,children:ae.jsx(ge,{flexDirection:r,gap:s,children:o.map(({label:l,value:f,disabled:u})=>ae.jsx(W6e,{id:`${i}-${f}`,label:l,size:a,value:f,disabled:u},f))})})});function OI(t,[e,r]){return Math.min(r,Math.max(e,t))}const t9=p.forwardRef((t,e)=>p.createElement(pt.span,Ie({},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}}))),H6e=t9,V6e=[" ","Enter","ArrowUp","ArrowDown"],G6e=[" ","Enter"],Ix="Select",[Tx,r9,K6e]=Cx(Ix),[G1,wFe]=Fn(Ix,[K6e,W1]),n9=W1(),[Y6e,fu]=G1(Ix),[Q6e,J6e]=G1(Ix),X6e=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:c,dir:l,name:f,autoComplete:u,disabled:d,required:h}=t,v=n9(e),[y,m]=p.useState(null),[g,b]=p.useState(null),[x,k]=p.useState(!1),$=q7(l),[I=!1,M]=hl({prop:n,defaultProp:s,onChange:i}),[D,H]=hl({prop:o,defaultProp:a,onChange:c}),G=p.useRef(null),V=y?!!y.closest("form"):!0,[Q,F]=p.useState(new Set),C=Array.from(Q).map(S=>S.props.value).join(";");return p.createElement(qW,v,p.createElement(Y6e,{required:h,scope:e,trigger:y,onTriggerChange:m,valueNode:g,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:k,contentId:ga(),value:D,onValueChange:H,open:I,onOpenChange:M,dir:$,triggerPointerDownPosRef:G,disabled:d},p.createElement(Tx.Provider,{scope:e},p.createElement(Q6e,{scope:t.__scopeSelect,onNativeOptionAdd:p.useCallback(S=>{F(T=>new Set(T).add(S))},[]),onNativeOptionRemove:p.useCallback(S=>{F(T=>{const R=new Set(T);return R.delete(S),R})},[])},r)),V?p.createElement(NH,{key:C,"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:u,value:D,onChange:S=>H(S.target.value),disabled:d},D===void 0?p.createElement("option",{value:""}):null,Array.from(Q)):null))},Z6e="SelectTrigger",eCe=p.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=n9(r),o=fu(Z6e,r),a=o.disabled||n,c=Ft(e,o.onTriggerChange),l=r9(r),[f,u,d]=jH(v=>{const y=l().filter(b=>!b.disabled),m=y.find(b=>b.value===o.value),g=DH(y,v,m);g!==void 0&&o.onValueChange(g.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return p.createElement(UW,Ie({asChild:!0},i),p.createElement(pt.button,Ie({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":MH(o.value)?"":void 0},s,{ref:c,onClick:Te(s.onClick,v=>{v.currentTarget.focus()}),onPointerDown:Te(s.onPointerDown,v=>{const y=v.target;y.hasPointerCapture(v.pointerId)&&y.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&(h(),o.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)},v.preventDefault())}),onKeyDown:Te(s.onKeyDown,v=>{const y=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&u(v.key),!(y&&v.key===" ")&&V6e.includes(v.key)&&(h(),v.preventDefault())})})))}),tCe="SelectValue",rCe=p.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o="",...a}=t,c=fu(tCe,r),{onValueNodeHasChildrenChange:l}=c,f=i!==void 0,u=Ft(e,c.onValueNodeChange);return Ls(()=>{l(f)},[l,f]),p.createElement(pt.span,Ie({},a,{ref:u,style:{pointerEvents:"none"}}),MH(c.value)?p.createElement(p.Fragment,null,o):i)}),nCe=p.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return p.createElement(pt.span,Ie({"aria-hidden":!0},s,{ref:e}),n||"▼")}),f1="SelectContent",sCe=p.forwardRef((t,e)=>{const r=fu(f1,t.__scopeSelect),[n,s]=p.useState();if(Ls(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?bn.createPortal(p.createElement(RH,{scope:t.__scopeSelect},p.createElement(Tx.Slot,{scope:t.__scopeSelect},p.createElement("div",null,t.children))),i):null}return p.createElement(iCe,Ie({},t,{ref:e}))}),ra=10,[RH,Ox]=G1(f1),iCe=p.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:c,align:l,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:m,...g}=t,b=fu(f1,r),[x,k]=p.useState(null),[$,I]=p.useState(null),M=Ft(e,W=>k(W)),[D,H]=p.useState(null),[G,V]=p.useState(null),Q=r9(r),[F,C]=p.useState(!1),S=p.useRef(!1);p.useEffect(()=>{if(x)return QW(x)},[x]),SW();const T=p.useCallback(W=>{const[J,...X]=Q().map(se=>se.ref.current),[re]=X.slice(-1),ee=document.activeElement;for(const se of W)if(se===ee||(se==null||se.scrollIntoView({block:"nearest"}),se===J&&$&&($.scrollTop=0),se===re&&$&&($.scrollTop=$.scrollHeight),se==null||se.focus(),document.activeElement!==ee))return},[Q,$]),R=p.useCallback(()=>T([D,x]),[T,D,x]);p.useEffect(()=>{F&&R()},[F,R]);const{onOpenChange:A,triggerPointerDownPosRef:N}=b;p.useEffect(()=>{if(x){let W={x:0,y:0};const J=re=>{var ee,se,xe,de;W={x:Math.abs(Math.round(re.pageX)-((ee=(se=N.current)===null||se===void 0?void 0:se.x)!==null&&ee!==void 0?ee:0)),y:Math.abs(Math.round(re.pageY)-((xe=(de=N.current)===null||de===void 0?void 0:de.y)!==null&&xe!==void 0?xe:0))}},X=re=>{W.x<=10&&W.y<=10?re.preventDefault():x.contains(re.target)||A(!1),document.removeEventListener("pointermove",J),N.current=null};return N.current!==null&&(document.addEventListener("pointermove",J),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",X,{capture:!0})}}},[x,A,N]),p.useEffect(()=>{const W=()=>A(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[A]);const[B,P]=jH(W=>{const J=Q().filter(ee=>!ee.disabled),X=J.find(ee=>ee.ref.current===document.activeElement),re=DH(J,W,X);re&&setTimeout(()=>re.ref.current.focus())}),E=p.useCallback((W,J,X)=>{const re=!S.current&&!X;(b.value!==void 0&&b.value===J||re)&&(H(W),re&&(S.current=!0))},[b.value]),L=p.useCallback(()=>x==null?void 0:x.focus(),[x]),q=p.useCallback((W,J,X)=>{const re=!S.current&&!X;(b.value!==void 0&&b.value===J||re)&&V(W)},[b.value]),_=n==="popper"?RI:oCe,U=_===RI?{side:a,sideOffset:c,align:l,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:m}:{};return p.createElement(RH,{scope:r,content:x,viewport:$,onViewportChange:I,itemRefCallback:E,selectedItem:D,onItemLeave:L,itemTextRefCallback:q,focusSelectedItem:R,selectedItemText:G,position:n,isPositioned:F,searchRef:B},p.createElement(iH,{as:c1,allowPinchZoom:!0},p.createElement(AW,{asChild:!0,trapped:b.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:Te(s,W=>{var J;(J=b.trigger)===null||J===void 0||J.focus({preventScroll:!0}),W.preventDefault()})},p.createElement(Ex,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>b.onOpenChange(!1)},p.createElement(_,Ie({role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:W=>W.preventDefault()},g,U,{onPlaced:()=>C(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:Te(g.onKeyDown,W=>{const J=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!J&&W.key.length===1&&P(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let re=Q().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);if(["ArrowUp","End"].includes(W.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const ee=W.target,se=re.indexOf(ee);re=re.slice(se+1)}setTimeout(()=>T(re)),W.preventDefault()}})}))))))}),oCe=p.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=fu(f1,r),o=Ox(f1,r),[a,c]=p.useState(null),[l,f]=p.useState(null),u=Ft(e,M=>f(M)),d=r9(r),h=p.useRef(!1),v=p.useRef(!0),{viewport:y,selectedItem:m,selectedItemText:g,focusSelectedItem:b}=o,x=p.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&l&&y&&m&&g){const M=i.trigger.getBoundingClientRect(),D=l.getBoundingClientRect(),H=i.valueNode.getBoundingClientRect(),G=g.getBoundingClientRect();if(i.dir!=="rtl"){const ee=G.left-D.left,se=H.left-ee,xe=M.left-se,de=M.width+xe,pe=Math.max(de,D.width),$e=window.innerWidth-ra,Se=OI(se,[ra,$e-pe]);a.style.minWidth=de+"px",a.style.left=Se+"px"}else{const ee=D.right-G.right,se=window.innerWidth-H.right-ee,xe=window.innerWidth-M.right-se,de=M.width+xe,pe=Math.max(de,D.width),$e=window.innerWidth-ra,Se=OI(se,[ra,$e-pe]);a.style.minWidth=de+"px",a.style.right=Se+"px"}const V=d(),Q=window.innerHeight-ra*2,F=y.scrollHeight,C=window.getComputedStyle(l),S=parseInt(C.borderTopWidth,10),T=parseInt(C.paddingTop,10),R=parseInt(C.borderBottomWidth,10),A=parseInt(C.paddingBottom,10),N=S+T+F+A+R,B=Math.min(m.offsetHeight*5,N),P=window.getComputedStyle(y),E=parseInt(P.paddingTop,10),L=parseInt(P.paddingBottom,10),q=M.top+M.height/2-ra,_=Q-q,U=m.offsetHeight/2,W=m.offsetTop+U,J=S+T+W,X=N-J;if(J<=q){const ee=m===V[V.length-1].ref.current;a.style.bottom="0px";const se=l.clientHeight-y.offsetTop-y.offsetHeight,xe=Math.max(_,U+(ee?L:0)+se+R),de=J+xe;a.style.height=de+"px"}else{const ee=m===V[0].ref.current;a.style.top="0px";const xe=Math.max(q,S+y.offsetTop+(ee?E:0)+U)+X;a.style.height=xe+"px",y.scrollTop=J-q+y.offsetTop}a.style.margin=`${ra}px 0`,a.style.minHeight=B+"px",a.style.maxHeight=Q+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,a,l,y,m,g,i.dir,n]);Ls(()=>x(),[x]);const[k,$]=p.useState();Ls(()=>{l&&$(window.getComputedStyle(l).zIndex)},[l]);const I=p.useCallback(M=>{M&&v.current===!0&&(x(),b==null||b(),v.current=!1)},[x,b]);return p.createElement(aCe,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:I},p.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k}},p.createElement(pt.div,Ie({},s,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}}))))}),RI=p.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=ra,...i}=t,o=n9(r);return p.createElement(WW,Ie({},o,i,{ref:e,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.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)"}}))}),[aCe,cCe]=G1(f1,{}),MI="SelectViewport",lCe=p.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Ox(MI,r),i=cCe(MI,r),o=Ft(e,s.onViewportChange),a=p.useRef(0);return p.createElement(p.Fragment,null,p.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}"}}),p.createElement(Tx.Slot,{scope:r},p.createElement(pt.div,Ie({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:Te(n.onScroll,c=>{const l=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:u}=i;if(u!=null&&u.current&&f){const d=Math.abs(a.current-l.scrollTop);if(d>0){const h=window.innerHeight-ra*2,v=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),m=Math.max(v,y);if(m0?x:0,f.style.justifyContent="flex-end")}}}a.current=l.scrollTop})}))))}),fCe="SelectGroup",[uCe,CFe]=G1(fCe),dCe=p.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=ga();return p.createElement(uCe,{scope:r,id:s},p.createElement(pt.div,Ie({role:"group","aria-labelledby":s},n,{ref:e})))}),x8="SelectItem",[hCe,vCe]=G1(x8),yCe=p.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=fu(x8,r),c=Ox(x8,r),l=a.value===n,[f,u]=p.useState(i??""),[d,h]=p.useState(!1),v=Ft(e,g=>{var b;return(b=c.itemRefCallback)===null||b===void 0?void 0:b.call(c,g,n,s)}),y=ga(),m=()=>{s||(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 p.createElement(hCe,{scope:r,value:n,disabled:s,textId:y,isSelected:l,onItemTextChange:p.useCallback(g=>{u(b=>{var x;return b||((x=g==null?void 0:g.textContent)!==null&&x!==void 0?x:"").trim()})},[])},p.createElement(Tx.ItemSlot,{scope:r,value:n,disabled:s,textValue:f},p.createElement(pt.div,Ie({role:"option","aria-labelledby":y,"data-highlighted":d?"":void 0,"aria-selected":l&&d,"data-state":l?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1},o,{ref:v,onFocus:Te(o.onFocus,()=>h(!0)),onBlur:Te(o.onBlur,()=>h(!1)),onPointerUp:Te(o.onPointerUp,m),onPointerMove:Te(o.onPointerMove,g=>{if(s){var b;(b=c.onItemLeave)===null||b===void 0||b.call(c)}else g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Te(o.onPointerLeave,g=>{if(g.currentTarget===document.activeElement){var b;(b=c.onItemLeave)===null||b===void 0||b.call(c)}}),onKeyDown:Te(o.onKeyDown,g=>{var b;((b=c.searchRef)===null||b===void 0?void 0:b.current)!==""&&g.key===" "||(G6e.includes(g.key)&&m(),g.key===" "&&g.preventDefault())})}))))}),Np="SelectItemText",pCe=p.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=fu(Np,r),a=Ox(Np,r),c=vCe(Np,r),l=J6e(Np,r),[f,u]=p.useState(null),d=Ft(e,g=>u(g),c.onItemTextChange,g=>{var b;return(b=a.itemTextRefCallback)===null||b===void 0?void 0:b.call(a,g,c.value,c.disabled)}),h=f==null?void 0:f.textContent,v=p.useMemo(()=>p.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},h),[c.disabled,c.value,h]),{onNativeOptionAdd:y,onNativeOptionRemove:m}=l;return Ls(()=>(y(v),()=>m(v)),[y,m,v]),p.createElement(p.Fragment,null,p.createElement(pt.span,Ie({id:c.textId},i,{ref:d})),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?bn.createPortal(i.children,o.valueNode):null)});function MH(t){return t===""||t===void 0}const NH=p.forwardRef((t,e)=>{const{value:r,...n}=t,s=p.useRef(null),i=Ft(e,s),o=j7(r);return p.useEffect(()=>{const a=s.current,c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==r&&f){const u=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(u)}},[o,r]),p.createElement(t9,{asChild:!0},p.createElement("select",Ie({},n,{ref:i,defaultValue:r})))});NH.displayName="BubbleSelect";function jH(t){const e=bi(t),r=p.useRef(""),n=p.useRef(0),s=p.useCallback(o=>{const a=r.current+o;e(a),function c(l){r.current=l,window.clearTimeout(n.current),l!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(a)},[e]),i=p.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function DH(t,e,r){const s=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=mCe(t,Math.max(i,0));s.length===1&&(o=o.filter(l=>l!==r));const c=o.find(l=>l.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function mCe(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const gCe=X6e,bCe=eCe,xCe=rCe,wCe=nCe,CCe=sCe,ECe=lCe,kCe=dCe,SCe=yCe,ACe=pCe;var $Ce="gohwum1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 gohwum0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11od fyvr11hc fyvr11f4 fyvr12s1 fyvr118c fyvr11jw fyvr11n4 fyvr12v7 fyvr12o1",_Ce=Nr({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:[]}),PCe="gohwuma gohwum9 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11tv fyvr12s1 fyvr11nl",ICe="gohwume _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 gohwumd fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12ws fyvr12wt fyvr12wm fyvr12wn fyvr11h0 fyvr11jw fyvr11ko fyvr12v7 fyvr12v3 fyvr12s1 fyvr12w1 fyvr12vr";const TCe=p.forwardRef(({children:t,className:e,...r},n)=>ae.jsx(SCe,{className:xs(ICe,e),...r,ref:n,children:ae.jsx(ACe,{children:t})}));p.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:s,label:i="",description:o,labelLocation:a="hidden",name:c,options:l,placeholder:f,...u}=t;return ae.jsx(F1,{disabled:n,display:"grid",id:s??c,label:i,labelLocation:a,description:o,whiteSpace:"nowrap",children:ae.jsxs(gCe,{disabled:n,name:c,...u,children:[ae.jsxs(bCe,{id:s??c,className:xs($Ce,_Ce({borderRadius:r})),ref:e,children:[ae.jsx(xCe,{placeholder:f}),ae.jsx(ge,{as:wCe,display:"inline-flex",children:ae.jsx(wW,{})})]}),ae.jsx(CCe,{className:PCe,children:ae.jsx(ECe,{children:ae.jsx(kCe,{children:l.map(({value:d,label:h,...v})=>ae.jsx(TCe,{value:d,...v,children:h},d))})})})]})})});p.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:s="Search",name:i="search",value:o,...a}=t,c=o?ae.jsx(_x,{icon:B7,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return ae.jsx(e9,{ref:e,name:i,leftIcon:S2e,controls:r||c,placeholder:s,value:o,onChange:l=>n==null?void 0:n(l),...a})});var OCe=Nr({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});const NI=p.forwardRef((t,e)=>{const{size:r="md",...n}=t;return ae.jsx(ge,{className:OCe({size:r}),color:"text50",ref:e,...n,children:ae.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[ae.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),ae.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});p.forwardRef(({children:t},e)=>ae.jsx(ge,{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 LH="Switch",[RCe,EFe]=Fn(LH);RCe(LH);Nr({defaultClassName:"nwwh3z8",variantClassNames:{variant:{pill:"nwwh3z9",line:"nwwh3za nwwh3z1 fyvr11g0"},active:{true:"nwwh3zb nwwh3z2 fyvr12w5",false:"nwwh3zc"},disabled:{true:"nwwh3zd nwwh3z3 fyvr12vp"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"nwwh3z4 fyvr11u7 fyvr12sj"],[{active:!1,variant:"pill"},"nwwh3z5 fyvr11od fyvr12s7"],[{active:!0,variant:"line"},"nwwh3z6 fyvr12s1"],[{active:!1,variant:"line"},"nwwh3z7 fyvr12s7"]]});const BH="Tabs",[MCe,kFe]=Fn(BH,[H1]);H1();MCe(BH);var NCe="_1ppqbnx1 _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc _1ppqbnx0 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n9";p.forwardRef((t,e)=>{const{icon:r,label:n,...s}=t;return ae.jsxs(ge,{className:NCe,ref:e,background:"buttonGlass",color:"text80",...s,children:[r&&ae.jsx(r,{size:"xs"}),ae.jsx(at,{children:n})]})});const jCe="ToastProvider",[DCe,SFe,LCe]=Cx("Toast"),[FH,AFe]=Fn("Toast",[LCe]),[$Fe,zH]=FH(jCe),jI="toast.viewportPause",DI="toast.viewportResume",Rx="Toast",BCe="toast.swipeStart",FCe="toast.swipeMove",zCe="toast.swipeCancel",qCe="toast.swipeEnd",[UCe,WCe]=FH(Rx,{onClose(){}}),HCe=p.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:c,onResume:l,onSwipeStart:f,onSwipeMove:u,onSwipeCancel:d,onSwipeEnd:h,...v}=t,y=zH(Rx,r),[m,g]=p.useState(null),b=Ft(e,C=>g(C)),x=p.useRef(null),k=p.useRef(null),$=s||y.duration,I=p.useRef(0),M=p.useRef($),D=p.useRef(0),{onToastAdd:H,onToastRemove:G}=y,V=bi(()=>{var C;(m==null?void 0:m.contains(document.activeElement))&&((C=y.viewport)===null||C===void 0||C.focus()),o()}),Q=p.useCallback(C=>{!C||C===1/0||(window.clearTimeout(D.current),I.current=new Date().getTime(),D.current=window.setTimeout(V,C))},[V]);p.useEffect(()=>{const C=y.viewport;if(C){const S=()=>{Q(M.current),l==null||l()},T=()=>{const R=new Date().getTime()-I.current;M.current=M.current-R,window.clearTimeout(D.current),c==null||c()};return C.addEventListener(jI,T),C.addEventListener(DI,S),()=>{C.removeEventListener(jI,T),C.removeEventListener(DI,S)}}},[y.viewport,$,c,l,Q]),p.useEffect(()=>{i&&!y.isClosePausedRef.current&&Q($)},[i,$,y.isClosePausedRef,Q]),p.useEffect(()=>(H(),()=>G()),[H,G]);const F=p.useMemo(()=>m?UH(m):null,[m]);return y.viewport?p.createElement(p.Fragment,null,F&&p.createElement(VCe,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},F),p.createElement(UCe,{scope:r,onClose:V},bn.createPortal(p.createElement(DCe.ItemSlot,{scope:r},p.createElement(Z2e,{asChild:!0,onEscapeKeyDown:Te(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||V(),y.isFocusedToastEscapeKeyDownRef.current=!1})},p.createElement(pt.li,Ie({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection},v,{ref:b,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Te(t.onKeyDown,C=>{C.key==="Escape"&&(a==null||a(C.nativeEvent),C.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,V()))}),onPointerDown:Te(t.onPointerDown,C=>{C.button===0&&(x.current={x:C.clientX,y:C.clientY})}),onPointerMove:Te(t.onPointerMove,C=>{if(!x.current)return;const S=C.clientX-x.current.x,T=C.clientY-x.current.y,R=!!k.current,A=["left","right"].includes(y.swipeDirection),N=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,B=A?N(0,S):0,P=A?0:N(0,T),E=C.pointerType==="touch"?10:2,L={x:B,y:P},q={originalEvent:C,delta:L};R?(k.current=L,jp(FCe,u,q,{discrete:!1})):LI(L,y.swipeDirection,E)?(k.current=L,jp(BCe,f,q,{discrete:!1}),C.target.setPointerCapture(C.pointerId)):(Math.abs(S)>E||Math.abs(T)>E)&&(x.current=null)}),onPointerUp:Te(t.onPointerUp,C=>{const S=k.current,T=C.target;if(T.hasPointerCapture(C.pointerId)&&T.releasePointerCapture(C.pointerId),k.current=null,x.current=null,S){const R=C.currentTarget,A={originalEvent:C,delta:S};LI(S,y.swipeDirection,y.swipeThreshold)?jp(qCe,h,A,{discrete:!0}):jp(zCe,d,A,{discrete:!0}),R.addEventListener("click",N=>N.preventDefault(),{once:!0})}})})))),y.viewport))):null});HCe.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${Rx}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const VCe=t=>{const{__scopeToast:e,children:r,...n}=t,s=zH(Rx,e),[i,o]=p.useState(!1),[a,c]=p.useState(!1);return JCe(()=>o(!0)),p.useEffect(()=>{const l=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:p.createElement(HW,{asChild:!0},p.createElement(t9,n,i&&p.createElement(p.Fragment,null,s.label," ",r)))},GCe="ToastAction",KCe=p.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?p.createElement(qH,{altText:r,asChild:!0},p.createElement(QCe,Ie({},n,{ref:e}))):null});KCe.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${GCe}\``)}};const YCe="ToastClose",QCe=p.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=WCe(YCe,r);return p.createElement(qH,{asChild:!0},p.createElement(pt.button,Ie({type:"button"},n,{ref:e,onClick:Te(t.onClick,s.onClose)})))}),qH=p.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return p.createElement(pt.div,Ie({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},s,{ref:e}))});function UH(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),XCe(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...UH(n))}}),e}function jp(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?L7(s,i):s.dispatchEvent(i)}const LI=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function JCe(t=()=>{}){const e=bi(t);Ls(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function XCe(t){return t.nodeType===t.ELEMENT_NODE}Nr({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});p.createContext(null);var ZCe="_15pztn1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 _15pztn0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11od fyvr12s1 fyvr12o1 fyvr12wj fyvr128 fyvr11h0",e3e="_15pztn2";p.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",name:f,rows:u,resize:d=!1,...h}=t;return ae.jsx(F1,{description:i,disabled:o,display:"grid",id:a??f,label:c,labelLocation:l,children:ae.jsx(ge,{as:r,autoComplete:n,spellCheck:"false",className:xs(ZCe,d&&e3e),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:s,...h})})});var t3e=Nr({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:[]}),r3e="bnrrebf",n3e="bnrrebh bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11sj fyvr128 fyvr15o fyvr11h0";p.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:s,src:i,symbol:o,size:a="md",...c}=t;return ae.jsx(ge,{className:xs(r,t3e({borderRadius:e,size:a})),style:s,flexShrink:"0",...c,children:i?ae.jsx(V1,{className:r3e,disableAnimation:n,src:i}):ae.jsx(at,{className:n3e,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})});const[Mx,_Fe]=Fn("Tooltip",[W1]),Nx=W1(),s3e="TooltipProvider",i3e=700,w8="tooltip.open",[o3e,s9]=Mx(s3e),a3e=t=>{const{__scopeTooltip:e,delayDuration:r=i3e,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=t,[o,a]=p.useState(!0),c=p.useRef(!1),l=p.useRef(0);return p.useEffect(()=>{const f=l.current;return()=>window.clearTimeout(f)},[]),p.createElement(o3e,{scope:e,isOpenDelayed:o,delayDuration:r,onOpen:p.useCallback(()=>{window.clearTimeout(l.current),a(!1)},[]),onClose:p.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a(!0),n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:p.useCallback(f=>{c.current=f},[]),disableHoverableContent:s},i)},i9="Tooltip",[c3e,jx]=Mx(i9),l3e=t=>{const{__scopeTooltip:e,children:r,open:n,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=t,c=s9(i9,t.__scopeTooltip),l=Nx(e),[f,u]=p.useState(null),d=ga(),h=p.useRef(0),v=o??c.disableHoverableContent,y=a??c.delayDuration,m=p.useRef(!1),[g=!1,b]=hl({prop:n,defaultProp:s,onChange:M=>{M?(c.onOpen(),document.dispatchEvent(new CustomEvent(w8))):c.onClose(),i==null||i(M)}}),x=p.useMemo(()=>g?m.current?"delayed-open":"instant-open":"closed",[g]),k=p.useCallback(()=>{window.clearTimeout(h.current),m.current=!1,b(!0)},[b]),$=p.useCallback(()=>{window.clearTimeout(h.current),b(!1)},[b]),I=p.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{m.current=!0,b(!0)},y)},[y,b]);return p.useEffect(()=>()=>window.clearTimeout(h.current),[]),p.createElement(qW,l,p.createElement(c3e,{scope:e,contentId:d,open:g,stateAttribute:x,trigger:f,onTriggerChange:u,onTriggerEnter:p.useCallback(()=>{c.isOpenDelayed?I():k()},[c.isOpenDelayed,I,k]),onTriggerLeave:p.useCallback(()=>{v?$():window.clearTimeout(h.current)},[$,v]),onOpen:k,onClose:$,disableHoverableContent:v},r))},BI="TooltipTrigger",f3e=p.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=jx(BI,r),i=s9(BI,r),o=Nx(r),a=p.useRef(null),c=Ft(e,a,s.onTriggerChange),l=p.useRef(!1),f=p.useRef(!1),u=p.useCallback(()=>l.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),p.createElement(UW,Ie({asChild:!0},o),p.createElement(pt.button,Ie({"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute},n,{ref:c,onPointerMove:Te(t.onPointerMove,d=>{d.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),f.current=!0)}),onPointerLeave:Te(t.onPointerLeave,()=>{s.onTriggerLeave(),f.current=!1}),onPointerDown:Te(t.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:Te(t.onFocus,()=>{l.current||s.onOpen()}),onBlur:Te(t.onBlur,s.onClose),onClick:Te(t.onClick,s.onClose)})))}),u3e="TooltipPortal",[PFe,d3e]=Mx(u3e,{forceMount:void 0}),gv="TooltipContent",h3e=p.forwardRef((t,e)=>{const r=d3e(gv,t.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=t,o=jx(gv,t.__scopeTooltip);return p.createElement(tc,{present:n||o.open},o.disableHoverableContent?p.createElement(WH,Ie({side:s},i,{ref:e})):p.createElement(v3e,Ie({side:s},i,{ref:e})))}),v3e=p.forwardRef((t,e)=>{const r=jx(gv,t.__scopeTooltip),n=s9(gv,t.__scopeTooltip),s=p.useRef(null),i=Ft(e,s),[o,a]=p.useState(null),{trigger:c,onClose:l}=r,f=s.current,{onPointerInTransitChange:u}=n,d=p.useCallback(()=>{a(null),u(!1)},[u]),h=p.useCallback((v,y)=>{const m=v.currentTarget,g={x:v.clientX,y:v.clientY},b=b3e(g,m.getBoundingClientRect()),x=x3e(g,b),k=w3e(y.getBoundingClientRect()),$=E3e([...x,...k]);a($),u(!0)},[u]);return p.useEffect(()=>()=>d(),[d]),p.useEffect(()=>{if(c&&f){const v=m=>h(m,f),y=m=>h(m,c);return c.addEventListener("pointerleave",v),f.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",y)}}},[c,f,h,d]),p.useEffect(()=>{if(o){const v=y=>{const m=y.target,g={x:y.clientX,y:y.clientY},b=(c==null?void 0:c.contains(m))||(f==null?void 0:f.contains(m)),x=!C3e(g,o);b?d():x&&(d(),l())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,f,o,l,d]),p.createElement(WH,Ie({},t,{ref:i}))}),[y3e,p3e]=Mx(i9,{isInside:!1}),WH=p.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,c=jx(gv,r),l=Nx(r),{onClose:f}=c;return p.useEffect(()=>(document.addEventListener(w8,f),()=>document.removeEventListener(w8,f)),[f]),p.useEffect(()=>{if(c.trigger){const u=d=>{const h=d.target;h!=null&&h.contains(c.trigger)&&f()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[c.trigger,f]),p.createElement(Ex,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:u=>u.preventDefault(),onDismiss:f},p.createElement(WW,Ie({"data-state":c.stateAttribute},l,a,{ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),p.createElement(mW,null,n),p.createElement(y3e,{scope:r,isInside:!0},p.createElement(H6e,{id:c.contentId,role:"tooltip"},s||n))))}),m3e="TooltipArrow",g3e=p.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Nx(r);return p3e(m3e,r).isInside?null:p.createElement(nwe,Ie({},s,n,{ref:e}))});function b3e(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function x3e(t,e,r=5){const n=[];switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function w3e(t){const{top:e,right:r,bottom:n,left:s}=t;return[{x:s,y:e},{x:r,y:e},{x:r,y:n},{x:s,y:n}]}function C3e(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,o=e.length-1;in!=f>n&&r<(l-a)*(n-c)/(f-c)+a&&(s=!s)}return s}function E3e(t){const e=t.slice();return e.sort((r,n)=>r.xn.x?1:r.yn.y?1:0),k3e(e)}function k3e(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const s=t[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}const S3e=a3e,A3e=l3e,$3e=f3e,_3e=h3e,P3e=g3e;var I3e="q888p21 q888p20 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr1ww fyvr1ys fyvr11ms fyvr11tp fyvr1uw fyvr1sw";const T3e=t=>{const{align:e="center",children:r,delayDuration:n=0,disabled:s=!1,hOffset:i=0,message:o,side:a="top",vOffset:c=0}=t;return s?ae.jsx(ae.Fragment,{children:r}):ae.jsx(S3e,{children:ae.jsxs(A3e,{delayDuration:n,children:[ae.jsx($3e,{asChild:!0,children:r}),ae.jsxs(_3e,{className:I3e,side:a,align:e,sideOffset:c,alignOffset:i,children:[ae.jsx(at,{variant:"small",fontWeight:"medium",color:"text80",children:o}),ae.jsx(P3e,{offset:12,width:10,height:5})]})]})})},O3e="2.7.9",R3e=t=>t,o9=t=>t,M3e=()=>`viem@${O3e}`;let be=class C8 extends Error{constructor(e,r={}){var i;super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:M3e()});const n=r.cause instanceof C8?r.cause.details:(i=r.cause)!=null&&i.message?r.cause.message:r.details,s=r.cause instanceof C8&&r.cause.docsPath||r.docsPath;this.message=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: https://viem.sh${s}${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(` +`),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=s,this.metaMessages=r.metaMessages,this.shortMessage=e}walk(e){return HH(this,e)}};function HH(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t?HH(t.cause,e):e?null:t}class N3e extends be{constructor({max:e,min:r,signed:n,size:s,value:i}){super(`Number "${i}" is not in safe ${s?`${s*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class j3e extends be{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidBytesBooleanError"})}}class D3e extends be{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}class L3e extends be{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}class VH extends be{constructor({offset:e,position:r,size:n}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}class GH extends be{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${r}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}class FI extends be{constructor({size:e,targetSize:r,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${r} ${n} long, but is ${e} ${n} long.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidBytesLengthError"})}}function K1(t,{dir:e,size:r=32}={}){return typeof t=="string"?Qc(t,{dir:e,size:r}):B3e(t,{dir:e,size:r})}function Qc(t,{dir:e,size:r=32}={}){if(r===null)return t;const n=t.replace("0x","");if(n.length>r*2)throw new GH({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](r*2,"0")}`}function B3e(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new GH({size:t.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let s=0;s=Qo.zero&&t<=Qo.nine)return t-Qo.zero;if(t>=Qo.A&&t<=Qo.F)return t-(Qo.A-10);if(t>=Qo.a&&t<=Qo.f)return t-(Qo.a-10)}function by(t,e={}){let r=t;e.size&&(Ai(r,{size:e.size}),r=K1(r,{dir:"right",size:e.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);const s=n.length/2,i=new Uint8Array(s);for(let o=0,a=0;oe)throw new L3e({givenSize:tn(t),maxSize:e})}function qI(t,e){const r=typeof e=="string"?{to:e}:e,n=r.to;return n==="number"?ja(t,r):n==="bigint"?xy(t,r):n==="string"?W3e(t,r):n==="boolean"?U3e(t,r):by(t,r)}function xy(t,e={}){const{signed:r}=e;e.size&&Ai(t,{size:e.size});const n=BigInt(t);if(!r)return n;const s=(t.length-2)/2,i=(1n<e.toString(16).padStart(2,"0"));function nc(t,e={}){return typeof t=="number"||typeof t=="bigint"?Le(t,e):typeof t=="string"?a9(t,e):typeof t=="boolean"?KH(t,e):ro(t,e)}function KH(t,e={}){const r=`0x${Number(t)}`;return typeof e.size=="number"?(Ai(r,{size:e.size}),K1(r,{size:e.size})):r}function ro(t,e={}){let r="";for(let s=0;si||sa):void 0}]},{retryCount:0})}function Da(t,{includeName:e=!1}={}){if(t.type!=="function"&&t.type!=="event"&&t.type!=="error")throw new o8e(t.type);return`${t.name}(${Dx(t.inputs,{includeName:e})})`}function Dx(t,{includeName:e=!1}={}){return t?t.map(r=>K3e(r,{includeName:e})).join(e?", ":","):""}function K3e(t,{includeName:e}){return t.type.startsWith("tuple")?`(${Dx(t.components,{includeName:e})})${t.type.slice(5)}`:t.type+(e&&t.name?` ${t.name}`:"")}class Y3e extends be{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` +`),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class UI extends be{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` +`),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}class YH extends be{constructor({data:e,params:r,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(` +`),{metaMessages:[`Params: (${Dx(r,{includeName:!0})})`,`Data: ${e} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=r,this.size=n}}class Lx extends be{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class Q3e extends be{constructor({expectedLength:e,givenLength:r,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${r}`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}class J3e extends be{constructor({expectedSize:e,value:r}){super(`Size of bytes "${r}" (bytes${tn(r)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class X3e extends be{constructor({expectedLength:e,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${r}`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}class QH extends be{constructor(e,{docsPath:r}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class Z3e extends be{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}class JH extends be{constructor(e,{docsPath:r}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}class WI extends be{constructor(e,{docsPath:r}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}class Cb extends be{constructor(e,{docsPath:r}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}class e8e extends be{constructor(e,{docsPath:r}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}class t8e extends be{constructor(e,r){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${Da(e.abiItem)}\`, and`,`\`${r.type}\` in \`${Da(r.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItemAmbiguityError"})}}class r8e extends be{constructor({expectedSize:e,givenSize:r}){super(`Expected bytes${e}, got bytes${r}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}class bv extends be{constructor({abiItem:e,data:r,params:n,size:s}){super([`Data size of ${s} bytes is too small for non-indexed event parameters.`].join(` +`),{metaMessages:[`Params: (${Dx(n,{includeName:!0})})`,`Data: ${r} (${s} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=r,this.params=n,this.size=s}}class Bx extends be{constructor({abiItem:e,param:r}){super([`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${Da(e,{includeName:!0})}".`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class n8e extends be{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class s8e extends be{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class i8e extends be{constructor(e){super([`Value "${e}" is not a valid array.`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class o8e extends be{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}function La(t){return typeof t[0]=="string"?c9(t):a8e(t)}function a8e(t){let e=0;for(const s of t)e+=s.length;const r=new Uint8Array(e);let n=0;for(const s of t)r.set(s,n),n+=s.length;return r}function c9(t){return`0x${t.reduce((e,r)=>e+r.replace("0x",""),"")}`}class u1 extends be{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}const c8e=/^0x[a-fA-F0-9]{40}$/;function Ba(t){return c8e.test(t)}function Eb(t,e,r,{strict:n}={}){return Ho(t,{strict:!1})?l8e(t,e,r,{strict:n}):eV(t,e,r,{strict:n})}function XH(t,e){if(typeof e=="number"&&e>0&&e>tn(t)-1)throw new VH({offset:e,position:"start",size:tn(t)})}function ZH(t,e,r){if(typeof e=="number"&&typeof r=="number"&&tn(t)!==r-e)throw new VH({offset:r,position:"end",size:tn(t)})}function eV(t,e,r,{strict:n}={}){XH(t,e);const s=t.slice(e,r);return n&&ZH(s,e,r),s}function l8e(t,e,r,{strict:n}={}){XH(t,e);const s=`0x${t.replace("0x","").slice((e??0)*2,(r??t.length)*2)}`;return n&&ZH(s,e,r),s}function wy(t,e){if(t.length!==e.length)throw new X3e({expectedLength:t.length,givenLength:e.length});const r=f8e({params:t,values:e}),n=f9(r);return n.length===0?"0x":n}function f8e({params:t,values:e}){const r=[];for(let n=0;n0?La([a,o]):a}}if(s)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:La(i.map(({encoded:o})=>o))}}function h8e(t,{param:e}){const[,r]=e.type.split("bytes"),n=tn(t);if(!r){let s=t;return n%32!==0&&(s=Qc(s,{dir:"right",size:Math.ceil((t.length-2)/2/32)*32})),{dynamic:!0,encoded:La([Qc(Le(n,{size:32})),s])}}if(n!==parseInt(r))throw new J3e({expectedSize:parseInt(r),value:t});return{dynamic:!1,encoded:Qc(t,{dir:"right"})}}function v8e(t){return{dynamic:!1,encoded:Qc(KH(t))}}function y8e(t,{signed:e}){return{dynamic:!1,encoded:Le(t,{size:32,signed:e})}}function p8e(t){const e=a9(t),r=Math.ceil(tn(e)/32),n=[];for(let s=0;ss))}}function u9(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}const d6="/docs/contract/encodeDeployData";function tV(t){const{abi:e,args:r,bytecode:n}=t;if(!r||r.length===0)return n;const s=e.find(o=>"type"in o&&o.type==="constructor");if(!s)throw new Y3e({docsPath:d6});if(!("inputs"in s))throw new UI({docsPath:d6});if(!s.inputs||s.inputs.length===0)throw new UI({docsPath:d6});const i=wy(s.inputs,r);return c9([n,i])}function Hs(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}class Fx extends be{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join(` +`),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}class E8 extends be{constructor({blockNumber:e,chain:r,contract:n}){super(`Chain "${r.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class g8e extends be{constructor({chain:e,currentChainId:r}){super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${e.id} – ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class b8e extends be{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class rV extends be{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}function nV({chain:t,currentChainId:e}){if(!t)throw new b8e;if(e!==t.id)throw new g8e({chain:t,currentChainId:e})}const x8e={gwei:9,wei:18},w8e={ether:-9,wei:9};function sV(t,e){let r=t.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(e,"0");let[s,i]=[r.slice(0,r.length-e),r.slice(r.length-e)];return i=i.replace(/(0+)$/,""),`${n?"-":""}${s||"0"}${i?`.${i}`:""}`}function ys(t,e="wei"){return sV(t,w8e[e])}class dd extends be{constructor({cause:e,message:r}={}){var s;const n=(s=r==null?void 0:r.replace("execution reverted: ",""))==null?void 0:s.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(dd,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(dd,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class kb extends be{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ys(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(kb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class k8 extends be{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ys(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(k8,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class S8 extends be{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(S8,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class A8 extends be{constructor({cause:e,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` +`),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(A8,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class $8 extends be{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty($8,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class _8 extends be{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` +`),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(_8,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class P8 extends be{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(P8,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class I8 extends be{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(I8,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class T8 extends be{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(T8,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class Sb extends be{constructor({cause:e,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${ys(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${ys(n)} gwei`:""}).`].join(` +`),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(Sb,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class zx extends be{constructor({cause:e}){super(`An error occurred while executing: ${e==null?void 0:e.shortMessage}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}function d9(t,e="wei"){return sV(t,x8e[e])}function Cy(t){const e=Object.entries(t).map(([n,s])=>s===void 0||s===!1?null:[n,s]).filter(Boolean),r=e.reduce((n,[s])=>Math.max(n,s.length),0);return e.map(([n,s])=>` ${`${n}:`.padEnd(r+1)} ${s}`).join(` +`)}class C8e extends be{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class E8e extends be{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Cy(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class k8e extends be{constructor(e,{account:r,docsPath:n,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:f,to:u,value:d}){var v;const h=Cy({chain:s&&`${s==null?void 0:s.name} (id: ${s==null?void 0:s.id})`,from:r==null?void 0:r.address,to:u,value:typeof d<"u"&&`${d9(d)} ${((v=s==null?void 0:s.nativeCurrency)==null?void 0:v.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${ys(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ys(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${ys(l)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",h].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}class iV extends be{constructor({blockHash:e,blockNumber:r,blockTag:n,hash:s,index:i}){let o="Transaction";n&&i!==void 0&&(o=`Transaction at block time "${n}" at index "${i}"`),e&&i!==void 0&&(o=`Transaction at block hash "${e}" at index "${i}"`),r&&i!==void 0&&(o=`Transaction at block number "${r}" at index "${i}"`),s&&(o=`Transaction with hash "${s}"`),super(`${o} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class oV extends be{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class S8e extends be{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}const ps=(t,e,r)=>JSON.stringify(t,(n,s)=>{const i=typeof s=="bigint"?s.toString():s;return typeof e=="function"?e(n,i):i},r);class S0 extends be{constructor({body:e,details:r,headers:n,status:s,url:i}){super("HTTP request failed.",{details:r,metaMessages:[s&&`Status: ${s}`,`URL: ${o9(i)}`,e&&`Request body: ${ps(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=s,this.url=i}}class h9 extends be{constructor({body:e,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${o9(n)}`,`Request body: ${ps(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code}}class HI extends be{constructor({body:e,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${o9(r)}`,`Request body: ${ps(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}const A8e=-1;class ws extends be{constructor(e,{code:r,docsPath:n,metaMessages:s,shortMessage:i}){super(i,{cause:e,docsPath:n,metaMessages:s||(e==null?void 0:e.metaMessages)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof h9?e.code:r??A8e}}class Y1 extends ws{constructor(e,r){super(e,r),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}}class xv extends ws{constructor(e){super(e,{code:xv.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(xv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class wv extends ws{constructor(e){super(e,{code:wv.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(wv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class Cv extends ws{constructor(e){super(e,{code:Cv.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(Cv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class Ev extends ws{constructor(e){super(e,{code:Ev.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` +`)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(Ev,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Gf extends ws{constructor(e){super(e,{code:Gf.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(Gf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class Kf extends ws{constructor(e){super(e,{code:Kf.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` +`)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(Kf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class kv extends ws{constructor(e){super(e,{code:kv.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(kv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class Xc extends ws{constructor(e){super(e,{code:Xc.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(Xc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class Sv extends ws{constructor(e){super(e,{code:Sv.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(Sv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Av extends ws{constructor(e){super(e,{code:Av.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(Av,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class d1 extends ws{constructor(e){super(e,{code:d1.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(d1,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class $v extends ws{constructor(e){super(e,{code:$v.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty($v,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class zt extends Y1{constructor(e){super(e,{code:zt.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(zt,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class _v extends Y1{constructor(e){super(e,{code:_v.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(_v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class Pv extends Y1{constructor(e){super(e,{code:Pv.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(Pv,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class Iv extends Y1{constructor(e){super(e,{code:Iv.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(Iv,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Tv extends Y1{constructor(e){super(e,{code:Tv.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(Tv,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class wi extends Y1{constructor(e){super(e,{code:wi.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(wi,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class $8e extends ws{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}function v9(t,e){const r=(t.details||"").toLowerCase(),n=t instanceof be?t.walk(s=>s.code===dd.code):t;return n instanceof be?new dd({cause:t,message:n.details}):dd.nodeMessage.test(r)?new dd({cause:t,message:t.details}):kb.nodeMessage.test(r)?new kb({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):k8.nodeMessage.test(r)?new k8({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):S8.nodeMessage.test(r)?new S8({cause:t,nonce:e==null?void 0:e.nonce}):A8.nodeMessage.test(r)?new A8({cause:t,nonce:e==null?void 0:e.nonce}):$8.nodeMessage.test(r)?new $8({cause:t,nonce:e==null?void 0:e.nonce}):_8.nodeMessage.test(r)?new _8({cause:t}):P8.nodeMessage.test(r)?new P8({cause:t,gas:e==null?void 0:e.gas}):I8.nodeMessage.test(r)?new I8({cause:t,gas:e==null?void 0:e.gas}):T8.nodeMessage.test(r)?new T8({cause:t}):Sb.nodeMessage.test(r)?new Sb({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas,maxPriorityFeePerGas:e==null?void 0:e.maxPriorityFeePerGas}):new zx({cause:t})}function _8e(t,{docsPath:e,...r}){const n=(()=>{const s=v9(t,r);return s instanceof zx?t:s})();return new k8e(n,{docsPath:e,...r})}function y9(t,{format:e}){if(!e)return{};const r={};function n(i){const o=Object.keys(i);for(const a of o)a in t&&(r[a]=t[a]),i[a]&&typeof i[a]=="object"&&!Array.isArray(i[a])&&n(i[a])}const s=e(t||{});return n(s),r}const P8e={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3"};function qx(t){return{...t,gas:typeof t.gas<"u"?Le(t.gas):void 0,gasPrice:typeof t.gasPrice<"u"?Le(t.gasPrice):void 0,maxFeePerGas:typeof t.maxFeePerGas<"u"?Le(t.maxFeePerGas):void 0,maxPriorityFeePerGas:typeof t.maxPriorityFeePerGas<"u"?Le(t.maxPriorityFeePerGas):void 0,nonce:typeof t.nonce<"u"?Le(t.nonce):void 0,type:typeof t.type<"u"?P8e[t.type]:void 0,value:typeof t.value<"u"?Le(t.value):void 0}}function De(t,e,r){return n=>{var s;return((s=t[e.name||r])==null?void 0:s.call(t,n))??e(t,n)}}function Ey(t){const{account:e,gasPrice:r,maxFeePerGas:n,maxPriorityFeePerGas:s,to:i}=t,o=e?Hs(e):void 0;if(o&&!Ba(o.address))throw new u1({address:o.address});if(i&&!Ba(i))throw new u1({address:i});if(typeof r<"u"&&(typeof n<"u"||typeof s<"u"))throw new C8e;if(n&&n>2n**256n-1n)throw new kb({maxFeePerGas:n});if(s&&n&&s>n)throw new Sb({maxFeePerGas:n,maxPriorityFeePerGas:s})}async function Ov(t){const e=await t.request({method:"eth_chainId"});return ja(e)}class I8e extends be{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}}class p9 extends be{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}}class T8e extends be{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${ys(e)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}}class aV extends be{constructor({blockHash:e,blockNumber:r}){let n="Block";e&&(n=`Block at hash "${e}"`),r&&(n=`Block at number "${r}"`),super(`${n} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}const cV={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844"};function lV(t){const e={...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,chainId:t.chainId?ja(t.chainId):void 0,gas:t.gas?BigInt(t.gas):void 0,gasPrice:t.gasPrice?BigInt(t.gasPrice):void 0,maxFeePerBlobGas:t.maxFeePerBlobGas?BigInt(t.maxFeePerBlobGas):void 0,maxFeePerGas:t.maxFeePerGas?BigInt(t.maxFeePerGas):void 0,maxPriorityFeePerGas:t.maxPriorityFeePerGas?BigInt(t.maxPriorityFeePerGas):void 0,nonce:t.nonce?ja(t.nonce):void 0,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,type:t.type?cV[t.type]:void 0,typeHex:t.type?t.type:void 0,value:t.value?BigInt(t.value):void 0,v:t.v?BigInt(t.v):void 0};return e.yParity=(()=>{if(t.yParity)return Number(t.yParity);if(typeof e.v=="bigint"){if(e.v===0n||e.v===27n)return 0;if(e.v===1n||e.v===28n)return 1;if(e.v>=35n)return e.v%2n===0n?1:0}})(),e.type==="legacy"&&(delete e.accessList,delete e.maxFeePerBlobGas,delete e.maxFeePerGas,delete e.maxPriorityFeePerGas,delete e.yParity),e.type==="eip2930"&&(delete e.maxFeePerBlobGas,delete e.maxFeePerGas,delete e.maxPriorityFeePerGas),e.type==="eip1559"&&delete e.maxFeePerBlobGas,e}function fV(t){var r;const e=(r=t.transactions)==null?void 0:r.map(n=>typeof n=="string"?n:lV(n));return{...t,baseFeePerGas:t.baseFeePerGas?BigInt(t.baseFeePerGas):null,blobGasUsed:t.blobGasUsed?BigInt(t.blobGasUsed):void 0,difficulty:t.difficulty?BigInt(t.difficulty):void 0,excessBlobGas:t.excessBlobGas?BigInt(t.excessBlobGas):void 0,gasLimit:t.gasLimit?BigInt(t.gasLimit):void 0,gasUsed:t.gasUsed?BigInt(t.gasUsed):void 0,hash:t.hash?t.hash:null,logsBloom:t.logsBloom?t.logsBloom:null,nonce:t.nonce?t.nonce:null,number:t.number?BigInt(t.number):null,size:t.size?BigInt(t.size):void 0,timestamp:t.timestamp?BigInt(t.timestamp):void 0,transactions:e,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}async function ml(t,{blockHash:e,blockNumber:r,blockTag:n,includeTransactions:s}={}){var f,u,d;const i=n??"latest",o=s??!1,a=r!==void 0?Le(r):void 0;let c=null;if(e?c=await t.request({method:"eth_getBlockByHash",params:[e,o]}):c=await t.request({method:"eth_getBlockByNumber",params:[a||i,o]}),!c)throw new aV({blockHash:e,blockNumber:r});return(((d=(u=(f=t.chain)==null?void 0:f.formatters)==null?void 0:u.block)==null?void 0:d.format)||fV)(c)}async function m9(t){const e=await t.request({method:"eth_gasPrice"});return BigInt(e)}async function O8e(t,e){return uV(t,e)}async function uV(t,e){var i,o,a;const{block:r,chain:n=t.chain,request:s}=e||{};if(typeof((i=n==null?void 0:n.fees)==null?void 0:i.defaultPriorityFee)=="function"){const c=r||await De(t,ml,"getBlock")({});return n.fees.defaultPriorityFee({block:c,client:t,request:s})}if(typeof((o=n==null?void 0:n.fees)==null?void 0:o.defaultPriorityFee)<"u")return(a=n==null?void 0:n.fees)==null?void 0:a.defaultPriorityFee;try{const c=await t.request({method:"eth_maxPriorityFeePerGas"});return xy(c)}catch{const[c,l]=await Promise.all([r?Promise.resolve(r):De(t,ml,"getBlock")({}),De(t,m9,"getGasPrice")({})]);if(typeof c.baseFeePerGas!="bigint")throw new p9;const f=l-c.baseFeePerGas;return f<0n?0n:f}}async function R8e(t,e){return O8(t,e)}async function O8(t,e){var d,h;const{block:r,chain:n=t.chain,request:s,type:i="eip1559"}=e||{},o=await(async()=>{var v,y;return typeof((v=n==null?void 0:n.fees)==null?void 0:v.baseFeeMultiplier)=="function"?n.fees.baseFeeMultiplier({block:r,client:t,request:s}):((y=n==null?void 0:n.fees)==null?void 0:y.baseFeeMultiplier)??1.2})();if(o<1)throw new I8e;const c=10**(((d=o.toString().split(".")[1])==null?void 0:d.length)??0),l=v=>v*BigInt(Math.ceil(o*c))/BigInt(c),f=r||await De(t,ml,"getBlock")({});if(typeof((h=n==null?void 0:n.fees)==null?void 0:h.estimateFeesPerGas)=="function")return n.fees.estimateFeesPerGas({block:r,client:t,multiply:l,request:s,type:i});if(i==="eip1559"){if(typeof f.baseFeePerGas!="bigint")throw new p9;const v=typeof(s==null?void 0:s.maxPriorityFeePerGas)=="bigint"?s.maxPriorityFeePerGas:await uV(t,{block:f,chain:n,request:s}),y=l(f.baseFeePerGas);return{maxFeePerGas:(s==null?void 0:s.maxFeePerGas)??y+v,maxPriorityFeePerGas:v}}return{gasPrice:(s==null?void 0:s.gasPrice)??l(await De(t,m9,"getGasPrice")({}))}}class M8e extends be{constructor(e,{account:r,docsPath:n,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:f,to:u,value:d}){var v;const h=Cy({from:r==null?void 0:r.address,to:u,value:typeof d<"u"&&`${d9(d)} ${((v=s==null?void 0:s.nativeCurrency)==null?void 0:v.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${ys(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ys(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${ys(l)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}function N8e(t,{docsPath:e,...r}){const n=(()=>{const s=v9(t,r);return s instanceof zx?t:s})();return new M8e(n,{docsPath:e,...r})}async function Ux(t,e){var s,i,o;const r=e.account??t.account,n=r?Hs(r):void 0;try{const{accessList:a,blockNumber:c,blockTag:l,data:f,gas:u,gasPrice:d,maxFeePerGas:h,maxPriorityFeePerGas:v,nonce:y,to:m,value:g,...b}=(n==null?void 0:n.type)==="local"?await Wx(t,e):e,k=(c?Le(c):void 0)||l;Ey(e);const $=(o=(i=(s=t.chain)==null?void 0:s.formatters)==null?void 0:i.transactionRequest)==null?void 0:o.format,M=($||qx)({...y9(b,{format:$}),from:n==null?void 0:n.address,accessList:a,data:f,gas:u,gasPrice:d,maxFeePerGas:h,maxPriorityFeePerGas:v,nonce:y,to:m,value:g}),D=await t.request({method:"eth_estimateGas",params:k?[M,k]:[M]});return BigInt(D)}catch(a){throw N8e(a,{...e,account:n,chain:t.chain})}}async function dV(t,{address:e,blockTag:r="latest",blockNumber:n}){const s=await t.request({method:"eth_getTransactionCount",params:[e,n?Le(n):r]});return ja(s)}function j8e(t){if(t.type)return t.type;if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")return"eip1559";if(typeof t.gasPrice<"u")return typeof t.accessList<"u"?"eip2930":"legacy";throw new E8e({transaction:t})}async function Wx(t,e){const{account:r=t.account,chain:n,gas:s,nonce:i,parameters:o=["fees","gas","nonce","type"],type:a}=e,c=r?Hs(r):void 0,l=await De(t,ml,"getBlock")({blockTag:"latest"}),f={...e,...c?{from:c==null?void 0:c.address}:{}};if(o.includes("nonce")&&typeof i>"u"&&c&&(f.nonce=await De(t,dV,"getTransactionCount")({address:c.address,blockTag:"pending"})),(o.includes("fees")||o.includes("type"))&&typeof a>"u")try{f.type=j8e(f)}catch{f.type=typeof l.baseFeePerGas=="bigint"?"eip1559":"legacy"}if(o.includes("fees"))if(f.type==="eip1559"){const{maxFeePerGas:u,maxPriorityFeePerGas:d}=await O8(t,{block:l,chain:n,request:f});if(typeof e.maxPriorityFeePerGas>"u"&&e.maxFeePerGas&&e.maxFeePerGas"u"&&(f.gas=await De(t,Ux,"estimateGas")({...f,account:c?{address:c.address,type:"json-rpc"}:void 0})),Ey(f),delete f.parameters,f}async function g9(t,{serializedTransaction:e}){return t.request({method:"eth_sendRawTransaction",params:[e]},{retryCount:0})}async function Hx(t,e){var y,m,g,b;const{account:r=t.account,chain:n=t.chain,accessList:s,data:i,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:f,to:u,value:d,...h}=e;if(!r)throw new Fx({docsPath:"/docs/actions/wallet/sendTransaction"});const v=Hs(r);try{Ey(e);let x;if(n!==null&&(x=await De(t,Ov,"getChainId")({}),nV({currentChainId:x,chain:n})),v.type==="local"){const M=await De(t,Wx,"prepareTransactionRequest")({account:v,accessList:s,chain:n,data:i,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:f,to:u,value:d,...h});x||(x=await De(t,Ov,"getChainId")({}));const D=(y=n==null?void 0:n.serializers)==null?void 0:y.transaction,H=await v.signTransaction({...M,chainId:x},{serializer:D});return await De(t,g9,"sendRawTransaction")({serializedTransaction:H})}const k=(b=(g=(m=t.chain)==null?void 0:m.formatters)==null?void 0:g.transactionRequest)==null?void 0:b.format,I=(k||qx)({...y9(h,{format:k}),accessList:s,data:i,from:v.address,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:f,to:u,value:d});return await t.request({method:"eth_sendTransaction",params:[I]},{retryCount:0})}catch(x){throw _8e(x,{...e,account:v,chain:e.chain||void 0})}}function D8e(t,e){const{abi:r,args:n,bytecode:s,...i}=e,o=tV({abi:r,args:n,bytecode:s});return Hx(t,{...i,data:o})}const R8=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],hV=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],vV=[...hV,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],L8e=[...hV,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],VI=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],GI=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],B8e=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}];function KI(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function yV(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function YI(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 F8e(t,e){yV(t);const r=e.outputLen;if(t.length>QI&Dp)}:{h:Number(t>>QI&Dp)|0,l:Number(t&Dp)|0}}function q8e(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let s=0;st<>>32-r,W8e=(t,e,r)=>e<>>32-r,H8e=(t,e,r)=>e<>>64-r,V8e=(t,e,r)=>t<>>64-r;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const G8e=t=>t instanceof Uint8Array,K8e=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),Y8e=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Y8e)throw new Error("Non little-endian hardware is not supported");function Q8e(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function pV(t){if(typeof t=="string"&&(t=Q8e(t)),!G8e(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}class J8e{clone(){return this._cloneInto()}}function X8e(t){const e=n=>t().update(pV(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}const[mV,gV,bV]=[[],[],[]],Z8e=BigInt(0),Ih=BigInt(1),eEe=BigInt(2),tEe=BigInt(7),rEe=BigInt(256),nEe=BigInt(113);for(let t=0,e=Ih,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],mV.push(2*(5*n+r)),gV.push((t+1)*(t+2)/2%64);let s=Z8e;for(let i=0;i<7;i++)e=(e<>tEe)*nEe)%rEe,e&eEe&&(s^=Ih<<(Ih<r>32?H8e(t,e,r):U8e(t,e,r),XI=(t,e,r)=>r>32?V8e(t,e,r):W8e(t,e,r);function oEe(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],f=r[c+1],u=JI(l,f,1)^r[a],d=XI(l,f,1)^r[a+1];for(let h=0;h<50;h+=10)t[o+h]^=u,t[o+h+1]^=d}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=gV[o],c=JI(s,i,a),l=XI(s,i,a),f=mV[o];s=t[f],i=t[f+1],t[f]=c,t[f+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=sEe[n],t[1]^=iEe[n]}r.fill(0)}class b9 extends J8e{constructor(e,r,n,s=!1,i=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=s,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,KI(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=K8e(this.state)}keccak(){oEe(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){YI(this);const{blockLen:r,state:n}=this;e=pV(e);const s=e.length;for(let i=0;i=n&&this.keccak();const o=Math.min(n-this.posOut,i-s);e.set(r.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return KI(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(F8e(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new b9(r,n,s,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=s,e.enableXOF=o,e.destroyed=this.destroyed,e}}const aEe=(t,e,r)=>X8e(()=>new b9(e,t,r)),cEe=aEe(1,136,256/8);function ls(t,e){const r=e||"hex",n=cEe(Ho(t,{strict:!1})?Vf(t):t);return r==="bytes"?n:nc(n)}function x9(t,e){const r=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),n=ls(ba(r),"bytes"),s=(e?r.substring(`${e}0x`.length):r).split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&s[i]&&(s[i]=s[i].toUpperCase()),(n[i>>1]&15)>=8&&s[i+1]&&(s[i+1]=s[i+1].toUpperCase());return`0x${s.join("")}`}function fs(t,e){if(!Ba(t))throw new u1({address:t});return x9(t,e)}class ZI extends be{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NegativeOffsetError"})}}class xV extends be{constructor({length:e,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PositionOutOfBoundsError"})}}class lEe extends be{constructor({count:e,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RecursiveReadLimitExceededError"})}}const fEe={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:1/0,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new lEe({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(t){if(t<0||t>this.bytes.length-1)throw new xV({length:this.bytes.length,position:t})},decrementPosition(t){if(t<0)throw new ZI({offset:t});const e=this.position-t;this.assertPosition(e),this.position=e},getReadCount(t){return this.positionReadCount.get(t||this.position)||0},incrementPosition(t){if(t<0)throw new ZI({offset:t});const e=this.position+t;this.assertPosition(e),this.position=e},inspectByte(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectBytes(t,e){const r=e??this.position;return this.assertPosition(r+t-1),this.bytes.subarray(r,r+t)},inspectUint8(t){const e=t??this.position;return this.assertPosition(e),this.bytes[e]},inspectUint16(t){const e=t??this.position;return this.assertPosition(e+1),this.dataView.getUint16(e)},inspectUint24(t){const e=t??this.position;return this.assertPosition(e+2),(this.dataView.getUint16(e)<<8)+this.dataView.getUint8(e+2)},inspectUint32(t){const e=t??this.position;return this.assertPosition(e+3),this.dataView.getUint32(e)},pushByte(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushBytes(t){this.assertPosition(this.position+t.length-1),this.bytes.set(t,this.position),this.position+=t.length},pushUint8(t){this.assertPosition(this.position),this.bytes[this.position]=t,this.position++},pushUint16(t){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,t),this.position+=2},pushUint24(t){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,t>>8),this.dataView.setUint8(this.position+2,t&255),this.position+=3},pushUint32(t){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,t),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const t=this.inspectByte();return this.position++,t},readBytes(t,e){this.assertReadLimit(),this._touch();const r=this.inspectBytes(t);return this.position+=e??t,r},readUint8(){this.assertReadLimit(),this._touch();const t=this.inspectUint8();return this.position+=1,t},readUint16(){this.assertReadLimit(),this._touch();const t=this.inspectUint16();return this.position+=2,t},readUint24(){this.assertReadLimit(),this._touch();const t=this.inspectUint24();return this.position+=3,t},readUint32(){this.assertReadLimit(),this._touch();const t=this.inspectUint32();return this.position+=4,t},setPosition(t){const e=this.position;return this.assertPosition(t),this.position=t,()=>this.position=e},_touch(){if(this.recursiveReadLimit===1/0)return;const t=this.getReadCount();this.positionReadCount.set(this.position,t+1),t>0&&this.recursiveReadCount++}};function uEe(t,{recursiveReadLimit:e=8192}={}){const r=Object.create(fEe);return r.bytes=t,r.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=e,r}function dEe(t,e={}){typeof e.size<"u"&&Ai(t,{size:e.size});const r=ro(t,e);return xy(r,e)}function hEe(t,e={}){let r=t;if(typeof e.size<"u"&&(Ai(r,{size:e.size}),r=Jc(r)),r.length>1||r[0]>1)throw new j3e(r);return!!r[0]}function xa(t,e={}){typeof e.size<"u"&&Ai(t,{size:e.size});const r=ro(t,e);return ja(r,e)}function vEe(t,e={}){let r=t;return typeof e.size<"u"&&(Ai(r,{size:e.size}),r=Jc(r,{dir:"right"})),new TextDecoder().decode(r)}function Vx(t,e){const r=typeof e=="string"?by(e):e,n=uEe(r);if(tn(r)===0&&t.length>0)throw new Lx;if(tn(e)&&tn(e)<32)throw new YH({data:typeof e=="string"?e:ro(e),params:t,size:tn(e)});let s=0;const i=[];for(let o=0;o48?dEe(s,{signed:r}):xa(s,{signed:r}),32]}function xEe(t,e,{staticPosition:r}){const n=e.components.length===0||e.components.some(({name:o})=>!o),s=n?[]:{};let i=0;if(Rv(e)){const o=xa(t.readBytes(M8)),a=r+o;for(let c=0;c(\[(\d*)\])*)$/;function N8(t){let e=t.type;if(tT.test(t.type)&&"components"in t){e="(";const r=t.components.length;for(let s=0;sls(Vf(t));function SEe(t){return kEe(t)}function AEe(t){let e=!0,r="",n=0,s="",i=!1;for(let o=0;o{const e=typeof t=="string"?t:EEe(t);return AEe(e)};function wV(t){return SEe($Ee(t))}const w9=wV,C9=t=>Eb(wV(t),0,4);function ky(t){const{abi:e,args:r=[],name:n}=t,s=Ho(n,{strict:!1}),i=e.filter(a=>s?a.type==="function"?C9(a)===n:a.type==="event"?w9(a)===n:!1:"name"in a&&a.name===n);if(i.length===0)return;if(i.length===1)return i[0];let o;for(const a of i){if(!("inputs"in a))continue;if(!r||r.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==r.length)continue;if(r.every((l,f)=>{const u="inputs"in a&&a.inputs[f];return u?j8(l,u):!1})){if(o&&"inputs"in o&&o.inputs){const l=CV(a.inputs,o.inputs,r);if(l)throw new t8e({abiItem:a,type:l[0]},{abiItem:o,type:l[1]})}o=a}}return o||i[0]}function j8(t,e){const r=typeof t,n=e.type;switch(n){case"address":return Ba(t);case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in e?Object.values(e.components).every((s,i)=>j8(Object.values(t)[i],s)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(t)&&t.every(s=>j8(s,{...e,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function CV(t,e,r){for(const n in t){const s=t[n],i=e[n];if(s.type==="tuple"&&i.type==="tuple"&&"components"in s&&"components"in i)return CV(s.components,i.components,r[n]);const o=[s.type,i.type];if(o.includes("address")&&o.includes("bytes20")?!0:o.includes("address")&&o.includes("string")||o.includes("address")&&o.includes("bytes")?Ba(r[n]):!1)return o}}const h6="/docs/contract/decodeFunctionResult";function Q1(t){const{abi:e,args:r,functionName:n,data:s}=t;let i=e[0];if(n){const a=ky({abi:e,args:r,name:n});if(!a)throw new Cb(n,{docsPath:h6});i=a}if(i.type!=="function")throw new Cb(void 0,{docsPath:h6});if(!i.outputs)throw new e8e(i.name,{docsPath:h6});const o=Vx(i.outputs,s);if(o&&o.length>1)return o;if(o&&o.length===1)return o[0]}const rT="/docs/contract/encodeFunctionData";function jl(t){const{abi:e,args:r,functionName:n}=t;let s=e[0];if(n){const c=ky({abi:e,args:r,name:n});if(!c)throw new Cb(n,{docsPath:rT});s=c}if(s.type!=="function")throw new Cb(void 0,{docsPath:rT});const i=Da(s),o=C9(i),a="inputs"in s&&s.inputs?wy(s.inputs,r??[]):void 0;return c9([o,a??"0x"])}function J1({blockNumber:t,chain:e,contract:r}){var s;const n=(s=e==null?void 0:e.contracts)==null?void 0:s[r];if(!n)throw new E8({chain:e,contract:{name:r}});if(t&&n.blockCreated&&n.blockCreated>t)throw new E8({blockNumber:t,chain:e,contract:{name:r,blockCreated:n.blockCreated}});return n.address}const EV={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},_Ee={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},PEe={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function IEe(t){const{abi:e,data:r}=t,n=Eb(r,0,4);if(n==="0x")throw new Lx;const i=[...e||[],_Ee,PEe].find(o=>o.type==="error"&&n===C9(Da(o)));if(!i)throw new QH(n,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:i,args:"inputs"in i&&i.inputs&&i.inputs.length>0?Vx(i.inputs,Eb(r,4)):void 0,errorName:i.name}}function kV({abiItem:t,args:e,includeFunctionName:r=!0,includeName:n=!1}){if("name"in t&&"inputs"in t&&t.inputs)return`${r?t.name:""}(${t.inputs.map((s,i)=>`${n&&s.name?`${s.name}: `:""}${typeof e[i]=="object"?ps(e[i]):e[i]}`).join(", ")})`}class TEe extends be{constructor({address:e}){super(`State for account "${e}" is set multiple times.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountStateConflictError"})}}class OEe extends be{constructor(){super("state and stateDiff are set on the same account."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"StateAssignmentConflictError"})}}function nT(t){return t.reduce((e,{slot:r,value:n})=>`${e} ${r}: ${n} +`,"")}function REe(t){return t.reduce((e,{address:r,...n})=>{let s=`${e} ${r}: +`;return n.nonce&&(s+=` nonce: ${n.nonce} +`),n.balance&&(s+=` balance: ${n.balance} +`),n.code&&(s+=` code: ${n.code} +`),n.state&&(s+=` state: +`,s+=nT(n.state)),n.stateDiff&&(s+=` stateDiff: +`,s+=nT(n.stateDiff)),s},` State Override: +`).slice(0,-1)}class SV extends be{constructor(e,{account:r,docsPath:n,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:f,to:u,value:d,stateOverride:h}){var m;const v=r?Hs(r):void 0;let y=Cy({from:v==null?void 0:v.address,to:u,value:typeof d<"u"&&`${d9(d)} ${((m=s==null?void 0:s.nativeCurrency)==null?void 0:m.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${ys(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ys(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${ys(l)} gwei`,nonce:f});h&&(y+=` +${REe(h)}`),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",y].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}class MEe extends be{constructor(e,{abi:r,args:n,contractAddress:s,docsPath:i,functionName:o,sender:a}){const c=ky({abi:r,args:n,name:o}),l=c?kV({abiItem:c,args:n,includeFunctionName:!1,includeName:!1}):void 0,f=c?Da(c,{includeName:!0}):void 0,u=Cy({address:s&&R3e(s),function:f,args:l&&l!=="()"&&`${[...Array((o==null?void 0:o.length)??0).keys()].map(()=>" ").join("")}${l}`,sender:a});super(e.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",u].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=r,this.args=n,this.cause=e,this.contractAddress=s,this.functionName=o,this.sender=a}}class D8 extends be{constructor({abi:e,data:r,functionName:n,message:s}){let i,o,a,c;if(r&&r!=="0x")try{o=IEe({abi:e,data:r});const{abiItem:f,errorName:u,args:d}=o;if(u==="Error")c=d[0];else if(u==="Panic"){const[h]=d;c=EV[h]}else{const h=f?Da(f,{includeName:!0}):void 0,v=f&&d?kV({abiItem:f,args:d,includeFunctionName:!1,includeName:!1}):void 0;a=[h?`Error: ${h}`:"",v&&v!=="()"?` ${[...Array((u==null?void 0:u.length)??0).keys()].map(()=>" ").join("")}${v}`:""]}}catch(f){i=f}else s&&(c=s);let l;i instanceof QH&&(l=i.signature,a=[`Unable to decode signature "${l}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${l}.`]),super(c&&c!=="execution reverted"||l?[`The contract function "${n}" reverted with the following ${l?"signature":"reason"}:`,c||l].join(` +`):`The contract function "${n}" reverted.`,{cause:i,metaMessages:a}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=o,this.reason=c,this.signature=l}}class NEe extends be{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class E9 extends be{constructor({data:e,message:r}){super(r||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}function k9(t,e){var n,s,i,o,a,c;if(!(t instanceof be))return!1;const r=t.walk(l=>l instanceof D8);return r instanceof D8?!!(((n=r.data)==null?void 0:n.errorName)==="ResolverNotFound"||((s=r.data)==null?void 0:s.errorName)==="ResolverWildcardNotSupported"||((i=r.data)==null?void 0:i.errorName)==="ResolverNotContract"||((o=r.data)==null?void 0:o.errorName)==="ResolverError"||((a=r.data)==null?void 0:a.errorName)==="HttpError"||(c=r.reason)!=null&&c.includes("Wildcard on non-extended resolvers is not supported")||e==="reverse"&&r.reason===EV[50]):!1}function AV(t){if(t.length!==66||t.indexOf("[")!==0||t.indexOf("]")!==65)return null;const e=`0x${t.slice(1,65)}`;return Ho(e)?e:null}function Dm(t){let e=new Uint8Array(32).fill(0);if(!t)return ro(e);const r=t.split(".");for(let n=r.length-1;n>=0;n-=1){const s=AV(r[n]),i=s?Vf(s):ls(ba(r[n]),"bytes");e=ls(La([e,i]),"bytes")}return ro(e)}function jEe(t){return`[${t.slice(2)}]`}function DEe(t){const e=new Uint8Array(32).fill(0);return t?AV(t)||ls(ba(t)):ro(e)}function Gx(t){const e=t.replace(/^\.|\.$/gm,"");if(e.length===0)return new Uint8Array(1);const r=new Uint8Array(ba(e).byteLength+2);let n=0;const s=e.split(".");for(let i=0;i255&&(o=ba(jEe(DEe(s[i])))),r[n]=o.length,r.set(o,n+1),n+=o.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}const LEe=3;function Mv(t,{abi:e,address:r,args:n,docsPath:s,functionName:i,sender:o}){const{code:a,data:c,message:l,shortMessage:f}=t instanceof E9?t:t instanceof be?t.walk(d=>"data"in d)||t.walk():{},u=t instanceof Lx?new NEe({functionName:i}):[LEe,Gf.code].includes(a)&&(c||l||f)?new D8({abi:e,data:typeof c=="object"?c.data:c,functionName:i,message:f??l}):t;return new MEe(u,{abi:e,args:n,contractAddress:r,docsPath:s,functionName:i,sender:o})}const BEe="modulepreload",FEe=function(t,e){return new URL(t,e).href},sT={},S9=function(e,r,n){let s=Promise.resolve();if(r&&r.length>0){const i=document.getElementsByTagName("link");s=Promise.all(r.map(o=>{if(o=FEe(o,n),o in sT)return;sT[o]=!0;const a=o.endsWith(".css"),c=a?'[rel="stylesheet"]':"";if(!!n)for(let u=i.length-1;u>=0;u--){const d=i[u];if(d.href===o&&(!a||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${c}`))return;const f=document.createElement("link");if(f.rel=a?"stylesheet":BEe,a||(f.as="script",f.crossOrigin=""),f.href=o,document.head.appendChild(f),a)return new Promise((u,d)=>{f.addEventListener("load",u),f.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${o}`)))})}))}return s.then(()=>e()).catch(i=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=i,window.dispatchEvent(o),!o.defaultPrevented)throw i})},zEe="0x82ad56cb";function qEe(t,{docsPath:e,...r}){const n=(()=>{const s=v9(t,r);return s instanceof zx?t:s})();return new SV(n,{docsPath:e,...r})}const v6=new Map;function $V({fn:t,id:e,shouldSplitBatch:r,wait:n=0,sort:s}){const i=async()=>{const f=c();o();const u=f.map(({args:d})=>d);u.length!==0&&t(u).then(d=>{var h;s&&Array.isArray(d)&&d.sort(s);for(let v=0;v{var h;for(let v=0;vv6.delete(e),a=()=>c().map(({args:f})=>f),c=()=>v6.get(e)||[],l=f=>v6.set(e,[...c(),f]);return{flush:o,async schedule(f){const u={},d=new Promise((y,m)=>{u.resolve=y,u.reject=m});return(r==null?void 0:r([...a(),f]))&&i(),c().length>0?(l({args:f,pendingPromise:u}),d):(l({args:f,pendingPromise:u}),setTimeout(i,n),d)}}}async function Kx(t,e){var b,x,k,$;const{account:r=t.account,batch:n=!!((b=t.batch)!=null&&b.multicall),blockNumber:s,blockTag:i="latest",accessList:o,data:a,gas:c,gasPrice:l,maxFeePerGas:f,maxPriorityFeePerGas:u,nonce:d,to:h,value:v,stateOverride:y,...m}=e,g=r?Hs(r):void 0;try{Ey(e);const M=(s?Le(s):void 0)||i,D=GEe(y),H=($=(k=(x=t.chain)==null?void 0:x.formatters)==null?void 0:k.transactionRequest)==null?void 0:$.format,V=(H||qx)({...y9(m,{format:H}),from:g==null?void 0:g.address,accessList:o,data:a,gas:c,gasPrice:l,maxFeePerGas:f,maxPriorityFeePerGas:u,nonce:d,to:h,value:v});if(n&&UEe({request:V})&&!D)try{return await WEe(t,{...V,blockNumber:s,blockTag:i})}catch(F){if(!(F instanceof rV)&&!(F instanceof E8))throw F}const Q=await t.request({method:"eth_call",params:D?[V,M,D]:[V,M]});return Q==="0x"?{data:void 0}:{data:Q}}catch(I){const M=HEe(I),{offchainLookup:D,offchainLookupSignature:H}=await S9(()=>import("./ccip-BckqeGfk.js"),__vite__mapDeps([]),import.meta.url);if((M==null?void 0:M.slice(0,10))===H&&h)return{data:await D(t,{data:M,to:h})};throw qEe(I,{...e,account:g,chain:t.chain})}}function UEe({request:t}){const{data:e,to:r,...n}=t;return!(!e||e.startsWith(zEe)||!r||Object.values(n).filter(s=>typeof s<"u").length>0)}async function WEe(t,e){var y;const{batchSize:r=1024,wait:n=0}=typeof((y=t.batch)==null?void 0:y.multicall)=="object"?t.batch.multicall:{},{blockNumber:s,blockTag:i="latest",data:o,multicallAddress:a,to:c}=e;let l=a;if(!l){if(!t.chain)throw new rV;l=J1({blockNumber:s,chain:t.chain,contract:"multicall3"})}const u=(s?Le(s):void 0)||i,{schedule:d}=$V({id:`${t.uid}.${u}`,wait:n,shouldSplitBatch(m){return m.reduce((b,{data:x})=>b+(x.length-2),0)>r*2},fn:async m=>{const g=m.map(k=>({allowFailure:!0,callData:k.data,target:k.to})),b=jl({abi:R8,args:[g],functionName:"aggregate3"}),x=await t.request({method:"eth_call",params:[{data:b,to:l},u]});return Q1({abi:R8,args:[g],functionName:"aggregate3",data:x||"0x"})}}),[{returnData:h,success:v}]=await d({data:o,to:c});if(!v)throw new E9({data:h});return h==="0x"?{data:void 0}:{data:h}}function HEe(t){if(!(t instanceof be))return;const e=t.walk();return typeof e.data=="object"?e.data.data:e.data}function iT(t){if(!(!t||t.length===0))return t.reduce((e,{slot:r,value:n})=>{if(r.length!==66)throw new FI({size:r.length,targetSize:66,type:"hex"});if(n.length!==66)throw new FI({size:n.length,targetSize:66,type:"hex"});return e[r]=n,e},{})}function VEe(t){const{balance:e,nonce:r,state:n,stateDiff:s,code:i}=t,o={};if(i!==void 0&&(o.code=i),e!==void 0&&(o.balance=Le(e,{size:32})),r!==void 0&&(o.nonce=Le(r,{size:8})),n!==void 0&&(o.state=iT(n)),s!==void 0){if(o.state)throw new OEe;o.stateDiff=iT(s)}return o}function GEe(t){if(!t)return;const e={};for(const{address:r,...n}of t){if(!Ba(r))throw new u1({address:r});if(e[r])throw new TEe({address:r});e[r]=VEe(n)}return e}async function gl(t,e){const{abi:r,address:n,args:s,functionName:i,...o}=e,a=jl({abi:r,args:s,functionName:i});try{const{data:c}=await De(t,Kx,"call")({...o,data:a,to:n});return Q1({abi:r,args:s,functionName:i,data:c||"0x"})}catch(c){throw Mv(c,{abi:r,address:n,args:s,docsPath:"/docs/contract/readContract",functionName:i})}}async function KEe(t,{blockNumber:e,blockTag:r,coinType:n,name:s,gatewayUrls:i,strict:o,universalResolverAddress:a}){let c=a;if(!c){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");c=J1({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const l=jl({abi:GI,functionName:"addr",...n!=null?{args:[Dm(s),BigInt(n)]}:{args:[Dm(s)]}}),f={address:c,abi:vV,functionName:"resolve",args:[nc(Gx(s)),l],blockNumber:e,blockTag:r},u=De(t,gl,"readContract"),d=i?await u({...f,args:[...f.args,i]}):await u(f);if(d[0]==="0x")return null;const h=Q1({abi:GI,args:n!=null?[Dm(s),BigInt(n)]:void 0,functionName:"addr",data:d[0]});return h==="0x"||Jc(h)==="0x00"?null:h}catch(l){if(o)throw l;if(k9(l,"resolve"))return null;throw l}}class YEe extends be{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class Oh extends be{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class A9 extends be{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class QEe extends be{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}const JEe=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,XEe=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,ZEe=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,e4e=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function t4e(t){try{const e=await fetch(t,{method:"HEAD"});if(e.status===200){const r=e.headers.get("content-type");return r==null?void 0:r.startsWith("image/")}return!1}catch(e){return typeof e=="object"&&typeof e.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(r=>{const n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=t})}}function oT(t,e){return t?t.endsWith("/")?t.slice(0,-1):t:e}function _V({uri:t,gatewayUrls:e}){const r=ZEe.test(t);if(r)return{uri:t,isOnChain:!0,isEncoded:r};const n=oT(e==null?void 0:e.ipfs,"https://ipfs.io"),s=oT(e==null?void 0:e.arweave,"https://arweave.net"),i=t.match(JEe),{protocol:o,subpath:a,target:c,subtarget:l=""}=(i==null?void 0:i.groups)||{},f=o==="ipns:/"||a==="ipns/",u=o==="ipfs:/"||a==="ipfs/"||XEe.test(t);if(t.startsWith("http")&&!f&&!u){let h=t;return e!=null&&e.arweave&&(h=t.replace(/https:\/\/arweave.net/g,e==null?void 0:e.arweave)),{uri:h,isOnChain:!1,isEncoded:!1}}if((f||u)&&c)return{uri:`${n}/${f?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if(o==="ar:/"&&c)return{uri:`${s}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let d=t.replace(e4e,"");if(d.startsWith("s.json());return await $9({gatewayUrls:t,uri:PV(r)})}catch{throw new A9({uri:e})}}async function $9({gatewayUrls:t,uri:e}){const{uri:r,isOnChain:n}=_V({uri:e,gatewayUrls:t});if(n||await t4e(r))return r;throw new A9({uri:e})}function n4e(t){let e=t;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[r,n,s]=e.split("/"),[i,o]=r.split(":"),[a,c]=n.split(":");if(!i||i.toLowerCase()!=="eip155")throw new Oh({reason:"Only EIP-155 supported"});if(!o)throw new Oh({reason:"Chain ID not found"});if(!c)throw new Oh({reason:"Contract address not found"});if(!s)throw new Oh({reason:"Token ID not found"});if(!a)throw new Oh({reason:"ERC namespace not found"});return{chainID:parseInt(o),namespace:a.toLowerCase(),contractAddress:c,tokenID:s}}async function s4e(t,{nft:e}){if(e.namespace==="erc721")return gl(t,{address:e.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(e.tokenID)]});if(e.namespace==="erc1155")return gl(t,{address:e.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(e.tokenID)]});throw new QEe({namespace:e.namespace})}async function i4e(t,{gatewayUrls:e,record:r}){return/eip155:/i.test(r)?o4e(t,{gatewayUrls:e,record:r}):$9({uri:r,gatewayUrls:e})}async function o4e(t,{gatewayUrls:e,record:r}){const n=n4e(r),s=await s4e(t,{nft:n}),{uri:i,isOnChain:o,isEncoded:a}=_V({uri:s,gatewayUrls:e});if(o&&(i.includes("data:application/json;base64,")||i.startsWith("{"))){const l=a?atob(i.replace("data:application/json;base64,","")):i,f=JSON.parse(l);return $9({uri:PV(f),gatewayUrls:e})}let c=n.tokenID;return n.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),r4e({gatewayUrls:e,uri:i.replace(/(?:0x)?{id}/,c)})}async function IV(t,{blockNumber:e,blockTag:r,name:n,key:s,gatewayUrls:i,strict:o,universalResolverAddress:a}){let c=a;if(!c){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");c=J1({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const l={address:c,abi:vV,functionName:"resolve",args:[nc(Gx(n)),jl({abi:VI,functionName:"text",args:[Dm(n),s]})],blockNumber:e,blockTag:r},f=De(t,gl,"readContract"),u=i?await f({...l,args:[...l.args,i]}):await f(l);if(u[0]==="0x")return null;const d=Q1({abi:VI,functionName:"text",data:u[0]});return d===""?null:d}catch(l){if(o)throw l;if(k9(l,"resolve"))return null;throw l}}async function a4e(t,{blockNumber:e,blockTag:r,assetGatewayUrls:n,name:s,gatewayUrls:i,strict:o,universalResolverAddress:a}){const c=await De(t,IV,"getEnsText")({blockNumber:e,blockTag:r,key:"avatar",name:s,universalResolverAddress:a,gatewayUrls:i,strict:o});if(!c)return null;try{return await i4e(t,{record:c,gatewayUrls:n})}catch{return null}}async function c4e(t,{address:e,blockNumber:r,blockTag:n,gatewayUrls:s,strict:i,universalResolverAddress:o}){let a=o;if(!a){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");a=J1({blockNumber:r,chain:t.chain,contract:"ensUniversalResolver"})}const c=`${e.toLowerCase().substring(2)}.addr.reverse`;try{const l={address:a,abi:L8e,functionName:"reverse",args:[nc(Gx(c))],blockNumber:r,blockTag:n},f=De(t,gl,"readContract"),[u,d]=s?await f({...l,args:[...l.args,s]}):await f(l);return e.toLowerCase()!==d.toLowerCase()?null:u}catch(l){if(i)throw l;if(k9(l,"reverse"))return null;throw l}}async function l4e(t,{blockNumber:e,blockTag:r,name:n,universalResolverAddress:s}){let i=s;if(!i){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");i=J1({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}const[o]=await De(t,gl,"readContract")({address:i,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[nc(Gx(n))],blockNumber:e,blockTag:r});return o}function Yx(t,{method:e}){var n,s;const r={};return t.transport.type==="fallback"&&((s=(n=t.transport).onResponse)==null||s.call(n,({method:i,response:o,status:a,transport:c})=>{a==="success"&&e===i&&(r[o]=c.request)})),i=>r[i]||t.request}async function f4e(t){const e=Yx(t,{method:"eth_newBlockFilter"}),r=await t.request({method:"eth_newBlockFilter"});return{id:r,request:e(r),type:"block"}}class u4e extends be{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}const aT="/docs/contract/encodeEventTopics";function Sy(t){var c;const{abi:e,eventName:r,args:n}=t;let s=e[0];if(r){const l=ky({abi:e,name:r});if(!l)throw new WI(r,{docsPath:aT});s=l}if(s.type!=="event")throw new WI(void 0,{docsPath:aT});const i=Da(s),o=w9(i);let a=[];if(n&&"inputs"in s){const l=(c=s.inputs)==null?void 0:c.filter(u=>"indexed"in u&&u.indexed),f=Array.isArray(n)?n:Object.values(n).length>0?(l==null?void 0:l.map(u=>n[u.name]))??[]:[];f.length>0&&(a=(l==null?void 0:l.map((u,d)=>Array.isArray(f[d])?f[d].map((h,v)=>cT({param:u,value:f[d][v]})):f[d]?cT({param:u,value:f[d]}):null))??[])}return[o,...a]}function cT({param:t,value:e}){if(t.type==="string"||t.type==="bytes")return ls(Vf(e));if(t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/))throw new u4e(t.type);return wy([t],[e])}async function TV(t,e){const{address:r,abi:n,args:s,eventName:i,fromBlock:o,strict:a,toBlock:c}=e,l=Yx(t,{method:"eth_newFilter"}),f=i?Sy({abi:n,args:s,eventName:i}):void 0,u=await t.request({method:"eth_newFilter",params:[{address:r,fromBlock:typeof o=="bigint"?Le(o):o,toBlock:typeof c=="bigint"?Le(c):c,topics:f}]});return{abi:n,args:s,eventName:i,id:u,request:l(u),strict:!!a,type:"event"}}async function OV(t,{address:e,args:r,event:n,events:s,fromBlock:i,strict:o,toBlock:a}={}){const c=s??(n?[n]:void 0),l=Yx(t,{method:"eth_newFilter"});let f=[];c&&(f=[c.flatMap(d=>Sy({abi:[d],eventName:d.name,args:r}))],n&&(f=f[0]));const u=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof i=="bigint"?Le(i):i,toBlock:typeof a=="bigint"?Le(a):a,...f.length?{topics:f}:{}}]});return{abi:c,args:r,eventName:n?n.name:void 0,fromBlock:i,id:u,request:l(u),strict:!!o,toBlock:a,type:"event"}}async function RV(t){const e=Yx(t,{method:"eth_newPendingTransactionFilter"}),r=await t.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:e(r),type:"transaction"}}async function d4e(t,e){const{abi:r,address:n,args:s,functionName:i,...o}=e,a=jl({abi:r,args:s,functionName:i});try{return await De(t,Ux,"estimateGas")({data:a,to:n,...o})}catch(c){const l=o.account?Hs(o.account):void 0;throw Mv(c,{abi:r,address:n,args:s,docsPath:"/docs/contract/estimateContractGas",functionName:i,sender:l==null?void 0:l.address})}}async function h4e(t,{address:e,blockNumber:r,blockTag:n="latest"}){const s=r?Le(r):void 0,i=await t.request({method:"eth_getBalance",params:[e,s||n]});return BigInt(i)}const v4e=new Map,y4e=new Map;function p4e(t){const e=(s,i)=>({clear:()=>i.delete(s),get:()=>i.get(s),set:o=>i.set(s,o)}),r=e(t,v4e),n=e(t,y4e);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function m4e(t,{cacheKey:e,cacheTime:r=1/0}){const n=p4e(e),s=n.response.get();if(s&&r>0&&new Date().getTime()-s.created.getTime()`blockNumber.${t}`;async function Ay(t,{cacheTime:e=t.cacheTime}={}){const r=await m4e(()=>t.request({method:"eth_blockNumber"}),{cacheKey:g4e(t.uid),cacheTime:e});return BigInt(r)}async function b4e(t,{blockHash:e,blockNumber:r,blockTag:n="latest"}={}){const s=r!==void 0?Le(r):void 0;let i;return e?i=await t.request({method:"eth_getBlockTransactionCountByHash",params:[e]}):i=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[s||n]}),ja(i)}async function x4e(t,{address:e,blockNumber:r,blockTag:n="latest"}){const s=r!==void 0?Le(r):void 0,i=await t.request({method:"eth_getCode",params:[e,s||n]});if(i!=="0x")return i}const lT="/docs/contract/decodeEventLog";function _9(t){const{abi:e,data:r,strict:n,topics:s}=t,i=n??!0,[o,...a]=s;if(!o)throw new Z3e({docsPath:lT});const c=e.find(y=>y.type==="event"&&o===w9(Da(y)));if(!(c&&"name"in c)||c.type!=="event")throw new JH(o,{docsPath:lT});const{name:l,inputs:f}=c,u=f==null?void 0:f.some(y=>!("name"in y&&y.name));let d=u?[]:{};const h=f.filter(y=>"indexed"in y&&y.indexed);for(let y=0;y!("indexed"in y&&y.indexed));if(v.length>0){if(r&&r!=="0x")try{const y=Vx(v,r);if(y)if(u)d=[...d,...y];else for(let m=0;m0?d:void 0}}function w4e({param:t,value:e}){return t.type==="string"||t.type==="bytes"||t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/)?e:(Vx([t],e)||[])[0]}async function MV(t,e){const{abi:r,address:n,args:s,dataSuffix:i,functionName:o,...a}=e,c=a.account?Hs(a.account):t.account,l=jl({abi:r,args:s,functionName:o});try{const{data:f}=await De(t,Kx,"call")({batch:!1,data:`${l}${i?i.replace("0x",""):""}`,to:n,...a,account:c}),u=Q1({abi:r,args:s,functionName:o,data:f||"0x"}),d=r.filter(h=>"name"in h&&h.name===e.functionName);return{result:u,request:{abi:d,address:n,args:s,dataSuffix:i,functionName:o,...a,account:c}}}catch(f){throw Mv(f,{abi:r,address:n,args:s,docsPath:"/docs/contract/simulateContract",functionName:o,sender:c==null?void 0:c.address})}}function bl(t,{args:e,eventName:r}={}){return{...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,logIndex:t.logIndex?Number(t.logIndex):null,transactionHash:t.transactionHash?t.transactionHash:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,...r?{args:e,eventName:r}:{}}}const y6=new Map,fT=new Map;let C4e=0;function X1(t,e,r){const n=++C4e,s=()=>y6.get(t)||[],i=()=>{const f=s();y6.set(t,f.filter(u=>u.id!==n))},o=()=>{const f=fT.get(t);s().length===1&&f&&f(),i()},a=s();if(y6.set(t,[...a,{id:n,fns:e}]),a&&a.length>0)return o;const c={};for(const f in e)c[f]=(...u)=>{var h,v;const d=s();if(d.length!==0)for(const y of d)(v=(h=y.fns)[f])==null||v.call(h,...u)};const l=r(c);return typeof l=="function"&&fT.set(t,l),o}async function L8(t){return new Promise(e=>setTimeout(e,t))}function $y(t,{emitOnBegin:e,initialWaitTime:r,interval:n}){let s=!0;const i=()=>s=!1;return(async()=>{let a;e&&(a=await t({unpoll:i}));const c=await(r==null?void 0:r(a))??n;await L8(c);const l=async()=>{s&&(await t({unpoll:i}),await L8(n),l())};l()})(),i}async function Qx(t,{filter:e}){const r="strict"in e&&e.strict,n=await e.request({method:"eth_getFilterChanges",params:[e.id]});if(typeof n[0]=="string")return n;const s=n.map(i=>bl(i));return!("abi"in e)||!e.abi?s:I9({abi:e.abi,logs:s,strict:r})}async function Jx(t,{filter:e}){return e.request({method:"eth_uninstallFilter",params:[e.id]})}function E4e(t,e){const{abi:r,address:n,args:s,batch:i=!0,eventName:o,onError:a,onLogs:c,poll:l,pollingInterval:f=t.pollingInterval,strict:u}=e;return(typeof l<"u"?l:t.transport.type!=="webSocket")?(()=>{const y=ps(["watchContractEvent",n,s,i,t.uid,o,f]),m=u??!1;return X1(y,{onLogs:c,onError:a},g=>{let b,x,k=!1;const $=$y(async()=>{var I;if(!k){try{x=await De(t,TV,"createContractEventFilter")({abi:r,address:n,args:s,eventName:o,strict:m})}catch{}k=!0;return}try{let M;if(x)M=await De(t,Qx,"getFilterChanges")({filter:x});else{const D=await De(t,Ay,"getBlockNumber")({});b&&b!==D?M=await De(t,YV,"getContractEvents")({abi:r,address:n,args:s,eventName:o,fromBlock:b+1n,toBlock:D,strict:m}):M=[],b=D}if(M.length===0)return;if(i)g.onLogs(M);else for(const D of M)g.onLogs([D])}catch(M){x&&M instanceof Kf&&(k=!1),(I=g.onError)==null||I.call(g,M)}},{emitOnBegin:!0,interval:f});return async()=>{x&&await De(t,Jx,"uninstallFilter")({filter:x}),$()}})})():(()=>{let y=!0,m=()=>y=!1;return(async()=>{try{const g=o?Sy({abi:r,eventName:o,args:s}):[],{unsubscribe:b}=await t.transport.subscribe({params:["logs",{address:n,topics:g}],onData(x){var $;if(!y)return;const k=x.result;try{const{eventName:I,args:M}=_9({abi:r,data:k.data,topics:k.topics,strict:u}),D=bl(k,{args:M,eventName:I});c([D])}catch(I){let M,D;if(I instanceof bv||I instanceof Bx){if(u)return;M=I.abiItem.name,D=($=I.abiItem.inputs)==null?void 0:$.some(G=>!("name"in G&&G.name))}const H=bl(k,{args:D?[]:{},eventName:M});c([H])}},onError(x){a==null||a(x)}});m=b,y||m()}catch(g){a==null||a(g)}})(),m})()}async function NV(t,e){const{abi:r,address:n,args:s,dataSuffix:i,functionName:o,...a}=e,c=jl({abi:r,args:s,functionName:o});return De(t,Hx,"sendTransaction")({data:`${c}${i?i.replace("0x",""):""}`,to:n,...a})}const B8=256;let Lp=B8,Bp;function k4e(t=11){if(!Bp||Lp+t>B8*2){Bp="",Lp=0;for(let e=0;e{const g=m(y);for(const x in h)delete g[x];const b={...y,...g};return Object.assign(b,{extend:v(b)})}}return Object.assign(h,{extend:v(h)})}function Ab(t,{delay:e=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((s,i)=>{const o=async({count:a=0}={})=>{const c=async({error:l})=>{const f=typeof e=="function"?e({count:a,error:l}):e;f&&await L8(f),o({count:a+1})};try{const l=await t();s(l)}catch(l){if(a{const{retryDelay:s=150,retryCount:i=3}={...e,...n};return Ab(async()=>{try{return await t(r)}catch(o){const a=o;switch(a.code){case xv.code:throw new xv(a);case wv.code:throw new wv(a);case Cv.code:throw new Cv(a);case Ev.code:throw new Ev(a);case Gf.code:throw new Gf(a);case Kf.code:throw new Kf(a);case kv.code:throw new kv(a);case Xc.code:throw new Xc(a);case Sv.code:throw new Sv(a);case Av.code:throw new Av(a);case d1.code:throw new d1(a);case $v.code:throw new $v(a);case zt.code:throw new zt(a);case _v.code:throw new _v(a);case Pv.code:throw new Pv(a);case Iv.code:throw new Iv(a);case Tv.code:throw new Tv(a);case wi.code:throw new wi(a);case 5e3:throw new zt(a);default:throw o instanceof be?o:new $8e(a)}}},{delay:({count:o,error:a})=>{var c;if(a&&a instanceof S0){const l=(c=a==null?void 0:a.headers)==null?void 0:c.get("Retry-After");if(l!=null&&l.match(/\d/))return parseInt(l)*1e3}return~~(1<A4e(o)})}}function A4e(t){return"code"in t&&typeof t.code=="number"?t.code===-1||t.code===d1.code||t.code===Gf.code:t instanceof S0&&t.status?t.status===403||t.status===408||t.status===413||t.status===429||t.status===500||t.status===502||t.status===503||t.status===504:!0}function DV({key:t,name:e,request:r,retryCount:n=3,retryDelay:s=150,timeout:i,type:o},a){return{config:{key:t,name:e,request:r,retryCount:n,retryDelay:s,timeout:i,type:o},request:S4e(r,{retryCount:n,retryDelay:s}),value:a}}function LV(t,e={}){const{key:r="custom",name:n="Custom Provider",retryDelay:s}=e;return({retryCount:i})=>DV({key:r,name:n,request:t.request.bind(t),retryCount:e.retryCount??i,retryDelay:s,type:"custom"})}class $4e extends be{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}function BV(t,{errorInstance:e=new Error("timed out"),timeout:r,signal:n}){return new Promise((s,i)=>{(async()=>{let o;try{const a=new AbortController;r>0&&(o=setTimeout(()=>{n?a.abort():i(e)},r)),s(await t({signal:a==null?void 0:a.signal}))}catch(a){a.name==="AbortError"&&i(e),i(a)}finally{clearTimeout(o)}})()})}function _4e(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const uT=_4e();function FV(t,e={}){return{async request(r){var l;const{body:n,fetchOptions:s={},timeout:i=e.timeout??1e4}=r,{headers:o,method:a,signal:c}={...e.fetchOptions,...s};try{const f=await BV(async({signal:d})=>await fetch(t,{...s,body:Array.isArray(n)?ps(n.map(v=>({jsonrpc:"2.0",id:v.id??uT.take(),...v}))):ps({jsonrpc:"2.0",id:n.id??uT.take(),...n}),headers:{...o,"Content-Type":"application/json"},method:a||"POST",signal:c||(i>0?d:void 0)}),{errorInstance:new HI({body:n,url:t}),timeout:i,signal:!0});let u;if((l=f.headers.get("Content-Type"))!=null&&l.startsWith("application/json")?u=await f.json():u=await f.text(),!f.ok)throw new S0({body:n,details:ps(u.error)||f.statusText,headers:f.headers,status:f.status,url:t});return u}catch(f){throw f instanceof S0||f instanceof HI?f:new S0({body:n,details:f.message,url:t})}}}}function P4e(t,e={}){const{batch:r,fetchOptions:n,key:s="http",name:i="HTTP JSON-RPC",retryDelay:o}=e;return({chain:a,retryCount:c,timeout:l})=>{const{batchSize:f=1e3,wait:u=0}=typeof r=="object"?r:{},d=e.retryCount??c,h=l??e.timeout??1e4,v=t||(a==null?void 0:a.rpcUrls.default.http[0]);if(!v)throw new $4e;const y=FV(v,{fetchOptions:n,timeout:h});return DV({key:s,name:i,async request({method:m,params:g}){const b={method:m,params:g},{schedule:x}=$V({id:`${t}`,wait:u,shouldSplitBatch(M){return M.length>f},fn:M=>y.request({body:M}),sort:(M,D)=>M.id-D.id}),k=async M=>r?x(M):[await y.request({body:M})],[{error:$,result:I}]=await k(b);if($)throw new h9({body:b,error:$,url:v});return I},retryCount:d,retryDelay:o,timeout:h,type:"http"},{fetchOptions:n,url:v})}}function I4e(t){var e;return{baseFeePerGas:t.baseFeePerGas.map(r=>BigInt(r)),gasUsedRatio:t.gasUsedRatio,oldestBlock:BigInt(t.oldestBlock),reward:(e=t.reward)==null?void 0:e.map(r=>r.map(n=>BigInt(n)))}}async function T4e(t,{blockCount:e,blockNumber:r,blockTag:n="latest",rewardPercentiles:s}){const i=r?Le(r):void 0,o=await t.request({method:"eth_feeHistory",params:[Le(e),i||n,s]});return I4e(o)}async function O4e(t,{filter:e}){const r=e.strict??!1,s=(await e.request({method:"eth_getFilterLogs",params:[e.id]})).map(i=>bl(i));return e.abi?I9({abi:e.abi,logs:s,strict:r}):s}function Xx(t){return{formatters:void 0,fees:void 0,serializers:void 0,...t}}const R4e=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,M4e=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function N4e(t,{body:e,onError:r,onResponse:n}){return t.request({body:e,onError:r,onResponse:n}),t}async function j4e(t,{body:e,timeout:r=1e4}){return t.requestAsync({body:e,timeout:r})}const D4e={http(t,e){return FV(t).request(e)},webSocket:N4e,webSocketAsync:j4e};function L4e(t){const{domain:e={},message:r,primaryType:n}=t,s={EIP712Domain:VV({domain:e}),...t.types};HV({domain:e,message:r,primaryType:n,types:s});const i=["0x1901"];return e&&i.push(B4e({domain:e,types:s})),n!=="EIP712Domain"&&i.push(zV({data:r,primaryType:n,types:s})),ls(La(i))}function B4e({domain:t,types:e}){return zV({data:t,primaryType:"EIP712Domain",types:e})}function zV({data:t,primaryType:e,types:r}){const n=qV({data:t,primaryType:e,types:r});return ls(n)}function qV({data:t,primaryType:e,types:r}){const n=[{type:"bytes32"}],s=[F4e({primaryType:e,types:r})];for(const i of r[e]){const[o,a]=WV({types:r,name:i.name,type:i.type,value:t[i.name]});n.push(o),s.push(a)}return wy(n,s)}function F4e({primaryType:t,types:e}){const r=nc(z4e({primaryType:t,types:e}));return ls(r)}function z4e({primaryType:t,types:e}){let r="";const n=UV({primaryType:t,types:e});n.delete(t);const s=[t,...Array.from(n).sort()];for(const i of s)r+=`${i}(${e[i].map(({name:o,type:a})=>`${a} ${o}`).join(",")})`;return r}function UV({primaryType:t,types:e},r=new Set){const n=t.match(/^\w*/u),s=n==null?void 0:n[0];if(r.has(s)||e[s]===void 0)return r;r.add(s);for(const i of e[s])UV({primaryType:i.type,types:e},r);return r}function WV({types:t,name:e,type:r,value:n}){if(t[r]!==void 0)return[{type:"bytes32"},ls(qV({data:n,primaryType:r,types:t}))];if(r==="bytes")return n=`0x${(n.length%2?"0":"")+n.slice(2)}`,[{type:"bytes32"},ls(n)];if(r==="string")return[{type:"bytes32"},ls(nc(n))];if(r.lastIndexOf("]")===r.length-1){const s=r.slice(0,r.lastIndexOf("[")),i=n.map(o=>WV({name:e,type:s,types:t,value:o}));return[{type:"bytes32"},ls(wy(i.map(([o])=>o),i.map(([,o])=>o)))]}return[{type:r},n]}function HV(t){const{domain:e,message:r,primaryType:n,types:s}=t,i=(o,a)=>{for(const c of o){const{name:l,type:f}=c,u=a[l],d=f.match(M4e);if(d&&(typeof u=="number"||typeof u=="bigint")){const[y,m,g]=d;Le(u,{signed:m==="int",size:parseInt(g)/8})}if(f==="address"&&typeof u=="string"&&!Ba(u))throw new u1({address:u});const h=f.match(R4e);if(h){const[y,m]=h;if(m&&tn(u)!==parseInt(m))throw new r8e({expectedSize:parseInt(m),givenSize:tn(u)})}const v=s[f];v&&i(v,u)}};if(s.EIP712Domain&&e&&i(s.EIP712Domain,e),n!=="EIP712Domain"){const o=s[n];i(o,r)}}function VV({domain:t}){return[typeof(t==null?void 0:t.name)=="string"&&{name:"name",type:"string"},(t==null?void 0:t.version)&&{name:"version",type:"string"},typeof(t==null?void 0:t.chainId)=="number"&&{name:"chainId",type:"uint256"},(t==null?void 0:t.verifyingContract)&&{name:"verifyingContract",type:"address"},(t==null?void 0:t.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}const q4e={"0x0":"reverted","0x1":"success"};function U4e(t){const e={...t,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,contractAddress:t.contractAddress?t.contractAddress:null,cumulativeGasUsed:t.cumulativeGasUsed?BigInt(t.cumulativeGasUsed):null,effectiveGasPrice:t.effectiveGasPrice?BigInt(t.effectiveGasPrice):null,gasUsed:t.gasUsed?BigInt(t.gasUsed):null,logs:t.logs?t.logs.map(r=>bl(r)):null,to:t.to?t.to:null,transactionIndex:t.transactionIndex?ja(t.transactionIndex):null,status:t.status?q4e[t.status]:null,type:t.type?cV[t.type]||t.type:null};return t.blobGasPrice&&(e.blobGasPrice=BigInt(t.blobGasPrice)),t.blobGasUsed&&(e.blobGasUsed=BigInt(t.blobGasUsed)),e}const W4e=`Ethereum Signed Message: +`;function H4e(t,e){const r=typeof t=="string"?ba(t):t.raw instanceof Uint8Array?t.raw:Vf(t.raw),n=ba(`${W4e}${r.length}`);return ls(La([n,r]),e)}function V4e(t){return t.map(e=>({...e,value:BigInt(e.value)}))}function G4e(t){return{...t,balance:t.balance?BigInt(t.balance):void 0,nonce:t.nonce?ja(t.nonce):void 0,storageProof:t.storageProof?V4e(t.storageProof):void 0}}async function K4e(t,{address:e,blockNumber:r,blockTag:n,storageKeys:s}){const i=n??"latest",o=r!==void 0?Le(r):void 0,a=await t.request({method:"eth_getProof",params:[e,s,o||i]});return G4e(a)}async function Y4e(t,{address:e,blockNumber:r,blockTag:n="latest",slot:s}){const i=r!==void 0?Le(r):void 0;return await t.request({method:"eth_getStorageAt",params:[e,s,i||n]})}async function P9(t,{blockHash:e,blockNumber:r,blockTag:n,hash:s,index:i}){var f,u,d;const o=n||"latest",a=r!==void 0?Le(r):void 0;let c=null;if(s?c=await t.request({method:"eth_getTransactionByHash",params:[s]}):e?c=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[e,Le(i)]}):(a||o)&&(c=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||o,Le(i)]})),!c)throw new iV({blockHash:e,blockNumber:r,blockTag:o,hash:s,index:i});return(((d=(u=(f=t.chain)==null?void 0:f.formatters)==null?void 0:u.transaction)==null?void 0:d.format)||lV)(c)}async function Q4e(t,{hash:e,transactionReceipt:r}){const[n,s]=await Promise.all([De(t,Ay,"getBlockNumber")({}),e?De(t,P9,"getBlockNumber")({hash:e}):void 0]),i=(r==null?void 0:r.blockNumber)||(s==null?void 0:s.blockNumber);return i?n-i+1n:0n}async function F8(t,{hash:e}){var s,i,o;const r=await t.request({method:"eth_getTransactionReceipt",params:[e]});if(!r)throw new oV({hash:e});return(((o=(i=(s=t.chain)==null?void 0:s.formatters)==null?void 0:i.transactionReceipt)==null?void 0:o.format)||U4e)(r)}async function J4e(t,e){var m;const{allowFailure:r=!0,batchSize:n,blockNumber:s,blockTag:i,multicallAddress:o,stateOverride:a}=e,c=e.contracts,l=n??(typeof((m=t.batch)==null?void 0:m.multicall)=="object"&&t.batch.multicall.batchSize||1024);let f=o;if(!f){if(!t.chain)throw new Error("client chain not configured. multicallAddress is required.");f=J1({blockNumber:s,chain:t.chain,contract:"multicall3"})}const u=[[]];let d=0,h=0;for(let g=0;g0&&h>l&&u[d].length>0&&(d++,h=(I.length-2)/2,u[d]=[]),u[d]=[...u[d],{allowFailure:!0,callData:I,target:x}]}catch(I){const M=Mv(I,{abi:b,address:x,args:k,docsPath:"/docs/contract/multicall",functionName:$});if(!r)throw M;u[d]=[...u[d],{allowFailure:!0,callData:"0x",target:x}]}}const v=await Promise.allSettled(u.map(g=>De(t,gl,"readContract")({abi:R8,address:f,args:[g],blockNumber:s,blockTag:i,functionName:"aggregate3",stateOverride:a}))),y=[];for(let g=0;g{const u=ps(["watchBlockNumber",t.uid,e,r,o]);return X1(u,{onBlockNumber:n,onError:s},d=>$y(async()=>{var h;try{const v=await De(t,Ay,"getBlockNumber")({cacheTime:0});if(c){if(v===c)return;if(v-c>1&&r)for(let y=c+1n;yc)&&(d.onBlockNumber(v,c),c=v)}catch(v){(h=d.onError)==null||h.call(d,v)}},{emitOnBegin:e,interval:o}))})():(()=>{let u=!0,d=()=>u=!1;return(async()=>{try{const{unsubscribe:h}=await t.transport.subscribe({params:["newHeads"],onData(v){var m;if(!u)return;const y=xy((m=v.result)==null?void 0:m.number);n(y,c),c=y},onError(v){s==null||s(v)}});d=h,u||d()}catch(h){s==null||s(h)}})(),d})()}async function nke(t,{confirmations:e=1,hash:r,onReplaced:n,pollingInterval:s=t.pollingInterval,retryCount:i=6,retryDelay:o=({count:c})=>~~(1<{a&&setTimeout(()=>v(new S8e({hash:r})),a);const y=X1(c,{onReplaced:n,resolve:h,reject:v},m=>{const g=De(t,KV,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:s,async onBlockNumber(b){if(d)return;let x=b;const k=$=>{g(),$(),y()};try{if(u){if(e>1&&(!u.blockNumber||x-u.blockNumber+1nm.resolve(u));return}if(l||(d=!0,await Ab(async()=>{l=await De(t,P9,"getTransaction")({hash:r}),l.blockNumber&&(x=l.blockNumber)},{delay:o,retryCount:i}),d=!1),u=await De(t,F8,"getTransactionReceipt")({hash:r}),e>1&&(!u.blockNumber||x-u.blockNumber+1nm.resolve(u))}catch($){if($ instanceof iV||$ instanceof oV){if(!l){d=!1;return}try{f=l,d=!0;const I=await Ab(()=>De(t,ml,"getBlock")({blockNumber:x,includeTransactions:!0}),{delay:o,retryCount:i,shouldRetry:({error:H})=>H instanceof aV});d=!1;const M=I.transactions.find(({from:H,nonce:G})=>H===f.from&&G===f.nonce);if(!M||(u=await De(t,F8,"getTransactionReceipt")({hash:M.hash}),e>1&&(!u.blockNumber||x-u.blockNumber+1n{var H;(H=m.onReplaced)==null||H.call(m,{reason:D,replacedTransaction:f,transaction:M,transactionReceipt:u}),m.resolve(u)})}catch(I){k(()=>m.reject(I))}}else k(()=>m.reject($))}}})})})}function ske(t,{blockTag:e="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:s,onError:i,includeTransactions:o,poll:a,pollingInterval:c=t.pollingInterval}){const l=typeof a<"u"?a:t.transport.type!=="webSocket",f=o??!1;let u;return l?(()=>{const v=ps(["watchBlocks",t.uid,r,n,f,c]);return X1(v,{onBlock:s,onError:i},y=>$y(async()=>{var m;try{const g=await De(t,ml,"getBlock")({blockTag:e,includeTransactions:f});if(g.number&&(u!=null&&u.number)){if(g.number===u.number)return;if(g.number-u.number>1&&r)for(let b=(u==null?void 0:u.number)+1n;bu.number)&&(y.onBlock(g,u),u=g)}catch(g){(m=y.onError)==null||m.call(y,g)}},{emitOnBegin:n,interval:c}))})():(()=>{let v=!0,y=()=>v=!1;return(async()=>{try{const{unsubscribe:m}=await t.transport.subscribe({params:["newHeads"],onData(g){var k,$,I;if(!v)return;const x=(((I=($=(k=t.chain)==null?void 0:k.formatters)==null?void 0:$.block)==null?void 0:I.format)||fV)(g.result);s(x,u),u=x},onError(g){i==null||i(g)}});y=m,v||y()}catch(m){i==null||i(m)}})(),y})()}function ike(t,{address:e,args:r,batch:n=!0,event:s,events:i,onError:o,onLogs:a,poll:c,pollingInterval:l=t.pollingInterval,strict:f}){const u=typeof c<"u"?c:t.transport.type!=="webSocket",d=f??!1;return u?(()=>{const y=ps(["watchEvent",e,r,n,t.uid,s,l]);return X1(y,{onLogs:a,onError:o},m=>{let g,b,x=!1;const k=$y(async()=>{var $;if(!x){try{b=await De(t,OV,"createEventFilter")({address:e,args:r,event:s,events:i,strict:d})}catch{}x=!0;return}try{let I;if(b)I=await De(t,Qx,"getFilterChanges")({filter:b});else{const M=await De(t,Ay,"getBlockNumber")({});g&&g!==M?I=await De(t,T9,"getLogs")({address:e,args:r,event:s,events:i,fromBlock:g+1n,toBlock:M}):I=[],g=M}if(I.length===0)return;if(n)m.onLogs(I);else for(const M of I)m.onLogs([M])}catch(I){b&&I instanceof Kf&&(x=!1),($=m.onError)==null||$.call(m,I)}},{emitOnBegin:!0,interval:l});return async()=>{b&&await De(t,Jx,"uninstallFilter")({filter:b}),k()}})})():(()=>{let y=!0,m=()=>y=!1;return(async()=>{try{const g=i??(s?[s]:void 0);let b=[];g&&(b=[g.flatMap(k=>Sy({abi:[k],eventName:k.name,args:r}))],s&&(b=b[0]));const{unsubscribe:x}=await t.transport.subscribe({params:["logs",{address:e,topics:b}],onData(k){var I;if(!y)return;const $=k.result;try{const{eventName:M,args:D}=_9({abi:g??[],data:$.data,topics:$.topics,strict:d}),H=bl($,{args:D,eventName:M});a([H])}catch(M){let D,H;if(M instanceof bv||M instanceof Bx){if(f)return;D=M.abiItem.name,H=(I=M.abiItem.inputs)==null?void 0:I.some(V=>!("name"in V&&V.name))}const G=bl($,{args:H?[]:{},eventName:D});a([G])}},onError(k){o==null||o(k)}});m=x,y||m()}catch(g){o==null||o(g)}})(),m})()}function oke(t,{batch:e=!0,onError:r,onTransactions:n,poll:s,pollingInterval:i=t.pollingInterval}){return(typeof s<"u"?s:t.transport.type!=="webSocket")?(()=>{const l=ps(["watchPendingTransactions",t.uid,e,i]);return X1(l,{onTransactions:n,onError:r},f=>{let u;const d=$y(async()=>{var h;try{if(!u)try{u=await De(t,RV,"createPendingTransactionFilter")({});return}catch(y){throw d(),y}const v=await De(t,Qx,"getFilterChanges")({filter:u});if(v.length===0)return;if(e)f.onTransactions(v);else for(const y of v)f.onTransactions([y])}catch(v){(h=f.onError)==null||h.call(f,v)}},{emitOnBegin:!0,interval:i});return async()=>{u&&await De(t,Jx,"uninstallFilter")({filter:u}),d()}})})():(()=>{let l=!0,f=()=>l=!1;return(async()=>{try{const{unsubscribe:u}=await t.transport.subscribe({params:["newPendingTransactions"],onData(d){if(!l)return;const h=d.result;n([h])},onError(d){r==null||r(d)}});f=u,l||f()}catch(u){r==null||r(u)}})(),f})()}function ake(t){return{call:e=>Kx(t,e),createBlockFilter:()=>f4e(t),createContractEventFilter:e=>TV(t,e),createEventFilter:e=>OV(t,e),createPendingTransactionFilter:()=>RV(t),estimateContractGas:e=>d4e(t,e),estimateGas:e=>Ux(t,e),getBalance:e=>h4e(t,e),getBlock:e=>ml(t,e),getBlockNumber:e=>Ay(t,e),getBlockTransactionCount:e=>b4e(t,e),getBytecode:e=>x4e(t,e),getChainId:()=>Ov(t),getContractEvents:e=>YV(t,e),getEnsAddress:e=>KEe(t,e),getEnsAvatar:e=>a4e(t,e),getEnsName:e=>c4e(t,e),getEnsResolver:e=>l4e(t,e),getEnsText:e=>IV(t,e),getFeeHistory:e=>T4e(t,e),estimateFeesPerGas:e=>R8e(t,e),getFilterChanges:e=>Qx(t,e),getFilterLogs:e=>O4e(t,e),getGasPrice:()=>m9(t),getLogs:e=>T9(t,e),getProof:e=>K4e(t,e),estimateMaxPriorityFeePerGas:e=>O8e(t,e),getStorageAt:e=>Y4e(t,e),getTransaction:e=>P9(t,e),getTransactionConfirmations:e=>Q4e(t,e),getTransactionCount:e=>dV(t,e),getTransactionReceipt:e=>F8(t,e),multicall:e=>J4e(t,e),prepareTransactionRequest:e=>Wx(t,e),readContract:e=>gl(t,e),sendRawTransaction:e=>g9(t,e),simulateContract:e=>MV(t,e),verifyMessage:e=>tke(t,e),verifyTypedData:e=>rke(t,e),uninstallFilter:e=>Jx(t,e),waitForTransactionReceipt:e=>nke(t,e),watchBlocks:e=>ske(t,e),watchBlockNumber:e=>KV(t,e),watchContractEvent:e=>E4e(t,e),watchEvent:e=>ike(t,e),watchPendingTransactions:e=>oke(t,e)}}async function cke(t){var r;return((r=t.account)==null?void 0:r.type)==="local"?[t.account.address]:(await t.request({method:"eth_accounts"})).map(n=>x9(n))}async function lke(t){return await t.request({method:"wallet_getPermissions"})}async function fke(t){return(await t.request({method:"eth_requestAccounts"},{retryCount:0})).map(r=>fs(r))}async function uke(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}async function dke(t,{account:e=t.account,message:r}){if(!e)throw new Fx({docsPath:"/docs/actions/wallet/signMessage"});const n=Hs(e);if(n.type==="local")return n.signMessage({message:r});const s=typeof r=="string"?a9(r):r.raw instanceof Uint8Array?nc(r.raw):r.raw;return t.request({method:"personal_sign",params:[s,n.address]},{retryCount:0})}async function hke(t,e){var l,f,u,d;const{account:r=t.account,chain:n=t.chain,...s}=e;if(!r)throw new Fx({docsPath:"/docs/actions/wallet/signTransaction"});const i=Hs(r);Ey({account:i,...e});const o=await De(t,Ov,"getChainId")({});n!==null&&nV({currentChainId:o,chain:n});const a=(n==null?void 0:n.formatters)||((l=t.chain)==null?void 0:l.formatters),c=((f=a==null?void 0:a.transactionRequest)==null?void 0:f.format)||qx;return i.type==="local"?i.signTransaction({...s,chainId:o},{serializer:(d=(u=t.chain)==null?void 0:u.serializers)==null?void 0:d.transaction}):await t.request({method:"eth_signTransaction",params:[{...c(s),chainId:Le(o),from:i.address}]},{retryCount:0})}async function vke(t,e){const{account:r=t.account,domain:n,message:s,primaryType:i}=e;if(!r)throw new Fx({docsPath:"/docs/actions/wallet/signTypedData"});const o=Hs(r),a={EIP712Domain:VV({domain:n}),...e.types};if(HV({domain:n,message:s,primaryType:i,types:a}),o.type==="local")return o.signTypedData({domain:n,message:s,primaryType:i,types:a});const c=ps({domain:n??{},message:s,primaryType:i,types:a},(l,f)=>Ho(f)?f.toLowerCase():f);return t.request({method:"eth_signTypedData_v4",params:[o.address,c]},{retryCount:0})}async function yke(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:Le(e)}]},{retryCount:0})}async function pke(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}function dT(t){return{addChain:e=>G3e(t,e),deployContract:e=>D8e(t,e),getAddresses:()=>cke(t),getChainId:()=>Ov(t),getPermissions:()=>lke(t),prepareTransactionRequest:e=>Wx(t,e),requestAddresses:()=>fke(t),requestPermissions:e=>uke(t,e),sendRawTransaction:e=>g9(t,e),sendTransaction:e=>Hx(t,e),signMessage:e=>dke(t,e),signTransaction:e=>hke(t,e),signTypedData:e=>vke(t,e),switchChain:e=>yke(t,e),watchAsset:e=>pke(t,e),writeContract:e=>NV(t,e)}}function I9({abi:t,eventName:e,logs:r,strict:n=!0}){return r.map(s=>{var i;try{const o=_9({...s,abi:t,strict:n});return e&&!e.includes(o.eventName)?null:{...o,...s}}catch(o){let a,c;if(o instanceof JH)return null;if(o instanceof bv||o instanceof Bx){if(n)return null;a=o.abiItem.name,c=(i=o.abiItem.inputs)==null?void 0:i.some(l=>!("name"in l&&l.name))}return{...s,args:c?[]:{},eventName:a}}}).filter(Boolean)}async function T9(t,{address:e,blockHash:r,fromBlock:n,toBlock:s,event:i,events:o,args:a,strict:c}={}){const l=c??!1,f=o??(i?[i]:void 0);let u=[];f&&(u=[f.flatMap(v=>Sy({abi:[v],eventName:v.name,args:a}))],i&&(u=u[0]));let d;r?d=await t.request({method:"eth_getLogs",params:[{address:e,topics:u,blockHash:r}]}):d=await t.request({method:"eth_getLogs",params:[{address:e,topics:u,fromBlock:typeof n=="bigint"?Le(n):n,toBlock:typeof s=="bigint"?Le(s):s}]});const h=d.map(v=>bl(v));return f?I9({abi:f,logs:h,strict:l}):h}async function YV(t,e){const{abi:r,address:n,args:s,blockHash:i,eventName:o,fromBlock:a,toBlock:c,strict:l}=e,f=o?ky({abi:r,name:o}):void 0,u=f?void 0:r.filter(d=>d.type==="event");return De(t,T9,"getLogs")({address:n,args:s,blockHash:i,event:f,events:u,fromBlock:a,toBlock:c,strict:l})}function mke(t){const e=r=>t(r.detail);return window.addEventListener("eip6963:announceProvider",e),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",e)}function gke(){const t=new Set;let e=[];const r=()=>mke(s=>{e.some(({info:i})=>i.uuid===s.info.uuid)||(e=[...e,s],t.forEach(i=>i(e,{added:[s]})))});let n=r();return{_listeners(){return t},clear(){t.forEach(s=>s([],{removed:[...e]})),e=[]},destroy(){this.clear(),t.clear(),n()},findProvider({rdns:s}){return e.find(i=>i.info.rdns===s)},getProviders(){return e},reset(){this.clear(),n(),n=r()},subscribe(s,{emitImmediately:i}={}){return t.add(s),i&&s(e,{added:e}),()=>t.delete(s)}}}var bke={BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const xke=t=>(e,r,n)=>{const s=n.subscribe;return n.subscribe=(o,a,c)=>{let l=o;if(a){const f=(c==null?void 0:c.equalityFn)||Object.is;let u=o(n.getState());l=d=>{const h=o(d);if(!f(u,h)){const v=u;a(u=h,v)}},c!=null&&c.fireImmediately&&a(u,u)}return s(l)},t(e,r,n)},wke=xke;function Cke(t,e){let r;try{r=t()}catch{return}return{getItem:s=>{var i;const o=c=>c===null?null:JSON.parse(c,e==null?void 0:e.reviver),a=(i=r.getItem(s))!=null?i:null;return a instanceof Promise?a.then(o):o(a)},setItem:(s,i)=>r.setItem(s,JSON.stringify(i,e==null?void 0:e.replacer)),removeItem:s=>r.removeItem(s)}}const Nv=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(n){return Nv(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return Nv(n)(r)}}}},Eke=(t,e)=>(r,n,s)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:m=>m,version:0,merge:(m,g)=>({...g,...m}),...e},o=!1;const a=new Set,c=new Set;let l;try{l=i.getStorage()}catch{}if(!l)return t((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...m)},n,s);const f=Nv(i.serialize),u=()=>{const m=i.partialize({...n()});let g;const b=f({state:m,version:i.version}).then(x=>l.setItem(i.name,x)).catch(x=>{g=x});if(g)throw g;return b},d=s.setState;s.setState=(m,g)=>{d(m,g),u()};const h=t((...m)=>{r(...m),u()},n,s);let v;const y=()=>{var m;if(!l)return;o=!1,a.forEach(b=>b(n()));const g=((m=i.onRehydrateStorage)==null?void 0:m.call(i,n()))||void 0;return Nv(l.getItem.bind(l))(i.name).then(b=>{if(b)return i.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==i.version){if(i.migrate)return i.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var x;return v=i.merge(b,(x=n())!=null?x:h),r(v,!0),u()}).then(()=>{g==null||g(v,void 0),o=!0,c.forEach(b=>b(v))}).catch(b=>{g==null||g(void 0,b)})};return s.persist={setOptions:m=>{i={...i,...m},m.getStorage&&(l=m.getStorage())},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>y(),hasHydrated:()=>o,onHydrate:m=>(a.add(m),()=>{a.delete(m)}),onFinishHydration:m=>(c.add(m),()=>{c.delete(m)})},y(),v||h},kke=(t,e)=>(r,n,s)=>{let i={storage:Cke(()=>localStorage),partialize:y=>y,version:0,merge:(y,m)=>({...m,...y}),...e},o=!1;const a=new Set,c=new Set;let l=i.storage;if(!l)return t((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...y)},n,s);const f=()=>{const y=i.partialize({...n()});return l.setItem(i.name,{state:y,version:i.version})},u=s.setState;s.setState=(y,m)=>{u(y,m),f()};const d=t((...y)=>{r(...y),f()},n,s);let h;const v=()=>{var y,m;if(!l)return;o=!1,a.forEach(b=>{var x;return b((x=n())!=null?x:d)});const g=((m=i.onRehydrateStorage)==null?void 0:m.call(i,(y=n())!=null?y:d))||void 0;return Nv(l.getItem.bind(l))(i.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==i.version){if(i.migrate)return i.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var x;return h=i.merge(b,(x=n())!=null?x:d),r(h,!0),f()}).then(()=>{g==null||g(h,void 0),h=n(),o=!0,c.forEach(b=>b(h))}).catch(b=>{g==null||g(void 0,b)})};return s.persist={setOptions:y=>{i={...i,...y},y.storage&&(l=y.storage)},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>v(),hasHydrated:()=>o,onHydrate:y=>(a.add(y),()=>{a.delete(y)}),onFinishHydration:y=>(c.add(y),()=>{c.delete(y)})},i.skipHydration||v(),h||d},Ske=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((bke?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Eke(t,e)):kke(t,e),Ake=Ske;var $ke={BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const hT=t=>{let e;const r=new Set,n=(c,l)=>{const f=typeof c=="function"?c(e):c;if(!Object.is(f,e)){const u=e;e=l??typeof f!="object"?f:Object.assign({},e,f),r.forEach(d=>d(e,u))}},s=()=>e,a={setState:n,getState:s,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{($ke?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return e=t(n,s,a),a},p6=t=>t?hT(t):hT;var QV={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function s(c,l,f){this.fn=c,this.context=l,this.once=f||!1}function i(c,l,f,u,d){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new s(f,u||c,d),v=r?r+l:l;return c._events[v]?c._events[v].fn?c._events[v]=[c._events[v],h]:c._events[v].push(h):(c._events[v]=h,c._eventsCount++),c}function o(c,l){--c._eventsCount===0?c._events=new n:delete c._events[l]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],f,u;if(this._eventsCount===0)return l;for(u in f=this._events)e.call(f,u)&&l.push(r?u.slice(1):u);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(f)):l},a.prototype.listeners=function(l){var f=r?r+l:l,u=this._events[f];if(!u)return[];if(u.fn)return[u.fn];for(var d=0,h=u.length,v=new Array(h);d{let s=n;return(s==null?void 0:s.__type)==="bigint"&&(s=BigInt(s.value)),(s==null?void 0:s.__type)==="Map"&&(s=new Map(s.value)),(e==null?void 0:e(r,s))??s})}function vT(t,e){return t.slice(0,e).join(".")||"."}function yT(t,e){const{length:r}=t;for(let n=0;n{let o=i;return typeof o=="bigint"&&(o={__type:"bigint",value:i.toString()}),o instanceof Map&&(o={__type:"Map",value:Array.from(i.entries())}),(e==null?void 0:e(s,o))??o},n),r??void 0)}function Nke(t){const{deserialize:e=Oke,key:r="wagmi",serialize:n=Mke,storage:s=JV}=t;function i(o){return o instanceof Promise?o.then(a=>a).catch(()=>null):o}return{...s,key:r,async getItem(o,a){const c=s.getItem(`${r}.${o}`),l=await i(c);return l?e(l)??null:a??null},async setItem(o,a){const c=`${r}.${o}`;a===null?await i(s.removeItem(c)):await i(s.setItem(c,n(a)))},async removeItem(o){await i(s.removeItem(`${r}.${o}`))}}}const JV={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};const Lm="2.6.5",jke=()=>`@wagmi/core@${Lm}`;var XV=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},$b,ZV;let uu=class z8 extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return jke()}constructor(e,r={}){var i;super(),$b.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const n=r.cause instanceof z8?r.cause.details:(i=r.cause)!=null&&i.message?r.cause.message:r.details,s=r.cause instanceof z8&&r.cause.docsPath||r.docsPath;this.message=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: ${this.docsBaseUrl}${s}.html${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(` +`),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=s,this.metaMessages=r.metaMessages,this.shortMessage=e}walk(e){return XV(this,$b,"m",ZV).call(this,this,e)}};$b=new WeakSet,ZV=function t(e,r){return r!=null&&r(e)?e:e.cause?XV(this,$b,"m",t).call(this,e.cause,r):e};class Yf extends uu{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class Dke extends uu{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class eG extends uu{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class Lke extends uu{constructor({address:e,connector:r}){super(`Account "${e}" not found for connector "${r.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class rf extends uu{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class Bke extends uu{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}function Zc(t){if(typeof t=="string")return Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10);if(typeof t=="bigint")return Number(t);if(typeof t=="number")return t;throw new Error(`Cannot normalize chainId "${t}" of type "${typeof t}"`)}const Fke={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(t){return t!=null&&t.coinbaseWalletExtension?t.coinbaseWalletExtension:Bm(t,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(t){return Bm(t,e=>{if(!e.isMetaMask||e.isBraveWallet&&!e._events&&!e._state)return!1;const r=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPortal","isRabby","isTokenPocket","isTokenary","isZerion"];for(const n of r)if(e[n])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(t){var e,r;return(e=t==null?void 0:t.phantom)!=null&&e.ethereum?(r=t.phantom)==null?void 0:r.ethereum:Bm(t,"isPhantom")}}};Zx.type="injected";function Zx(t={}){const{shimDisconnect:e=!0,unstable_shimAsyncInject:r}=t;function n(){const s=t.target;if(typeof s=="function"){const i=s();if(i)return i}return typeof s=="object"?s:typeof s=="string"?{...Fke[s]??{id:s,name:`${s[0].toUpperCase()}${s.slice(1)}`,provider:`is${s[0].toUpperCase()}${s.slice(1)}`}}:{id:"injected",name:"Injected",provider(i){return i==null?void 0:i.ethereum}}}return s=>({get icon(){return n().icon},get id(){return n().id},get name(){return n().name},type:Zx.type,async setup(){const i=await this.getProvider();i&&t.target&&i.on("connect",this.onConnect.bind(this))},async connect({chainId:i,isReconnecting:o}={}){var l,f,u,d,h,v;const a=await this.getProvider();if(!a)throw new rf;let c=null;if(!o&&(c=await this.getAccounts().catch(()=>null),!!(c!=null&&c.length)))try{c=(d=(u=(f=(l=(await a.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0])==null?void 0:l.caveats)==null?void 0:f[0])==null?void 0:u.value)==null?void 0:d.map(g=>fs(g))}catch(m){const g=m;if(g.code===zt.code)throw new zt(g);if(g.code===Xc.code)throw g}try{c!=null&&c.length||(c=(await a.request({method:"eth_requestAccounts"})).map(g=>fs(g))),a.removeListener("connect",this.onConnect.bind(this)),a.on("accountsChanged",this.onAccountsChanged.bind(this)),a.on("chainChanged",this.onChainChanged),a.on("disconnect",this.onDisconnect.bind(this));let y=await this.getChainId();if(i&&y!==i){const m=await this.switchChain({chainId:i}).catch(g=>{if(g.code===zt.code)throw g;return{id:y}});y=(m==null?void 0:m.id)??y}return e&&(await((h=s.storage)==null?void 0:h.removeItem(`${this.id}.disconnected`)),t.target||await((v=s.storage)==null?void 0:v.setItem("injected.connected",!0))),{accounts:c,chainId:y}}catch(y){const m=y;throw m.code===zt.code?new zt(m):m.code===Xc.code?new Xc(m):m}},async disconnect(){var o,a;const i=await this.getProvider();if(!i)throw new rf;i.removeListener("accountsChanged",this.onAccountsChanged.bind(this)),i.removeListener("chainChanged",this.onChainChanged),i.removeListener("disconnect",this.onDisconnect.bind(this)),i.on("connect",this.onConnect.bind(this)),e&&(await((o=s.storage)==null?void 0:o.setItem(`${this.id}.disconnected`,!0)),t.target||await((a=s.storage)==null?void 0:a.removeItem("injected.connected")))},async getAccounts(){const i=await this.getProvider();if(!i)throw new rf;return(await i.request({method:"eth_accounts"})).map(a=>fs(a))},async getChainId(){const i=await this.getProvider();if(!i)throw new rf;const o=await i.request({method:"eth_chainId"});return Zc(o)},async getProvider(){if(typeof window>"u")return;let i;const o=n();return typeof o.provider=="function"?i=o.provider(window):typeof o.provider=="string"?i=Bm(window,o.provider):i=o.provider,i&&!i.removeListener&&("off"in i&&typeof i.off=="function"?i.removeListener=i.off:i.removeListener=()=>{}),i},async isAuthorized(){var i,o;try{if(e&&await((i=s.storage)==null?void 0:i.getItem(`${this.id}.disconnected`))||!t.target&&!await((o=s.storage)==null?void 0:o.getItem("injected.connected")))return!1;if(!await this.getProvider()){if(r!==void 0&&r!==!1){const f=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",f),!!await this.getProvider()),u=typeof r=="number"?r:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(h=>window.addEventListener("ethereum#initialized",()=>h(f()),{once:!0}))]:[],new Promise(h=>setTimeout(()=>h(f()),u))]))return!0}throw new rf}return!!(await Ab(()=>BV(()=>this.getAccounts(),{timeout:100}))).length}catch{return!1}},async switchChain({chainId:i}){var c,l,f;const o=await this.getProvider();if(!o)throw new rf;const a=s.chains.find(u=>u.id===i);if(!a)throw new wi(new Yf);try{return await Promise.all([o.request({method:"wallet_switchEthereumChain",params:[{chainId:Le(i)}]}),new Promise(u=>s.emitter.once("change",({chainId:d})=>{d===i&&u()}))]),a}catch(u){const d=u;if(d.code===4902||((l=(c=d==null?void 0:d.data)==null?void 0:c.originalError)==null?void 0:l.code)===4902)try{const{default:h,...v}=a.blockExplorers??{};let y=[];if(h&&(y=[h.url,...Object.values(v).map(g=>g.url)]),await o.request({method:"wallet_addEthereumChain",params:[{chainId:Le(i),chainName:a.name,nativeCurrency:a.nativeCurrency,rpcUrls:[((f=a.rpcUrls.default)==null?void 0:f.http[0])??""],blockExplorerUrls:y}]}),await this.getChainId()!==i)throw new zt(new Error("User rejected switch after adding network."));return a}catch(h){throw new zt(h)}throw d.code===zt.code?new zt(d):new wi(d)}},async onAccountsChanged(i){var o;if(i.length===0)this.onDisconnect();else if(s.emitter.listenerCount("connect")){const a=(await this.getChainId()).toString();this.onConnect({chainId:a}),e&&await((o=s.storage)==null?void 0:o.removeItem(`${this.id}.disconnected`))}else s.emitter.emit("change",{accounts:i.map(a=>fs(a))})},onChainChanged(i){const o=Zc(i);s.emitter.emit("change",{chainId:o})},async onConnect(i){const o=await this.getAccounts();if(o.length===0)return;const a=Zc(i.chainId);s.emitter.emit("connect",{accounts:o,chainId:a});const c=await this.getProvider();c&&(c.removeListener("connect",this.onConnect.bind(this)),c.on("accountsChanged",this.onAccountsChanged.bind(this)),c.on("chainChanged",this.onChainChanged),c.on("disconnect",this.onDisconnect.bind(this)))},async onDisconnect(i){const o=await this.getProvider();i&&i.code===1013&&o&&(await this.getAccounts()).length||(s.emitter.emit("disconnect"),o&&(o.removeListener("accountsChanged",this.onAccountsChanged.bind(this)),o.removeListener("chainChanged",this.onChainChanged),o.removeListener("disconnect",this.onDisconnect.bind(this)),o.on("connect",this.onConnect.bind(this))))}})}function Bm(t,e){function r(s){return typeof e=="function"?e(s):typeof e=="string"?s[e]:!0}const n=t.ethereum;if(n!=null&&n.providers)return n.providers.find(s=>r(s));if(n&&r(n))return n}const q8=256;let Fp=q8,zp;function zke(t=11){if(!zp||Fp+t>q8*2){zp="",Fp=0;for(let e=0;ei.chains),c=p6(()=>[...i.connectors??[],...s?[]:(o==null?void 0:o.getProviders().map(f))??[]].map(l));function l(k){var M;const $=Tke(zke()),I={...k({emitter:$,chains:a.getState(),storage:r}),emitter:$,uid:$.uid};return $.on("connect",b),(M=I.setup)==null||M.call(I),I}function f(k){const{info:$}=k,I=k.provider;return Zx({target:{...$,id:$.rdns,provider:I}})}const u=new Map;function d(k={}){const $=k.chainId??m.getState().chainId,I=a.getState().find(D=>D.id===$);if(k.chainId&&!I)throw new Yf;{const D=u.get(m.getState().chainId);if(D&&!I)return D;if(!I)throw new Yf}{const D=u.get($);if(D)return D}let M;if(i.client)M=i.client({chain:I});else{const D=I.id,H=a.getState().map(Q=>Q.id),G={},V=Object.entries(i);for(const[Q,F]of V)if(!(Q==="chains"||Q==="client"||Q==="connectors"||Q==="transports"))if(typeof F=="object")if(D in F)G[Q]=F[D];else{if(H.some(S=>S in F))continue;G[Q]=F}else G[Q]=F;M=jV({...G,chain:I,batch:G.batch??{multicall:!0},transport:Q=>i.transports[D]({...Q,connectors:c})})}return u.set($,M),M}function h(){return{chainId:a.getState()[0].id,connections:new Map,current:void 0,status:"disconnected"}}let v;const y="0.0.0-canary-";Lm.startsWith(y)?v=parseInt(Lm.replace(y,"")):v=parseInt(Lm.split(".")[0]??"0");const m=p6(wke(r?Ake(h,{migrate(k,$){if($===v)return k;const I=h(),M=k&&typeof k=="object"&&"chainId"in k&&typeof k.chainId=="number"?k.chainId:I.chainId;return{...I,chainId:M}},name:"store",partialize(k){return{connections:{__type:"Map",value:Array.from(k.connections.entries()).map(([$,I])=>{const{id:M,name:D,type:H,uid:G}=I.connector;return[$,{...I,connector:{id:M,name:D,type:H,uid:G}}]})},chainId:k.chainId,current:k.current}},skipHydration:s,storage:r,version:v}):h));n&&m.subscribe(({connections:k,current:$})=>{var I;return $?(I=k.get($))==null?void 0:I.chainId:void 0},k=>{if(a.getState().some(I=>I.id===k))return m.setState(I=>({...I,chainId:k??I.chainId}))}),o==null||o.subscribe(k=>{const $=new Map;for(const M of c.getState())$.set(M.id,!0);const I=[];for(const M of k){const D=l(f(M));$.has(D.id)||I.push(D)}c.setState(M=>[...M,...I],!0)});function g(k){m.setState($=>{const I=$.connections.get(k.uid);return I?{...$,connections:new Map($.connections).set(k.uid,{accounts:k.accounts??I.accounts,chainId:k.chainId??I.chainId,connector:I.connector})}:$})}function b(k){m.getState().status==="connecting"||m.getState().status==="reconnecting"||m.setState($=>{const I=c.getState().find(M=>M.uid===k.uid);return I?{...$,connections:new Map($.connections).set(k.uid,{accounts:k.accounts,chainId:k.chainId,connector:I}),current:k.uid,status:"connected"}:$})}function x(k){m.setState($=>{const I=$.connections.get(k.uid);if(I&&(I.connector.emitter.off("change",g),I.connector.emitter.off("disconnect",x),I.connector.emitter.on("connect",b)),$.connections.delete(k.uid),$.connections.size===0)return{...$,connections:new Map,current:void 0,status:"disconnected"};const M=$.connections.values().next().value;return{...$,connections:new Map($.connections),current:M.connector.uid}})}return{get chains(){return a.getState()},get connectors(){return c.getState()},storage:r,getClient:d,get state(){return m.getState()},setState(k){let $;typeof k=="function"?$=k(m.getState()):$=k;const I=h();typeof $!="object"&&($=I),Object.keys(I).some(D=>!(D in $))&&($=I),m.setState($,!0)},subscribe(k,$,I){return m.subscribe(k,$,I?{...I,fireImmediately:I.emitImmediately}:void 0)},_internal:{mipd:o,store:m,ssr:!!s,syncConnectedChain:n,transports:i.transports,chains:{setState(k){const $=typeof k=="function"?k(a.getState()):k;if($.length!==0)return a.setState($,!0)},subscribe(k){return a.subscribe(k)}},connectors:{providerDetailToConnector:f,setup:l,setState(k){return c.setState(typeof k=="function"?k(c.getState()):k,!0)},subscribe(k){return c.subscribe(k)}},events:{change:g,connect:b,disconnect:x}}}}function _b(t,e,r){const n=t[e.name??r];return typeof n=="function"?n:s=>e(t,s)}async function Uke(t,e){var n;let r;if(typeof e.connector=="function"?r=t._internal.connectors.setup(e.connector):r=e.connector,r.uid===t.state.current)throw new Dke;try{t.setState(o=>({...o,status:"connecting"})),r.emitter.emit("message",{type:"connecting"});const s=await r.connect({chainId:e.chainId}),i=s.accounts;return r.emitter.off("connect",t._internal.events.connect),r.emitter.on("change",t._internal.events.change),r.emitter.on("disconnect",t._internal.events.disconnect),await((n=t.storage)==null?void 0:n.setItem("recentConnectorId",r.id)),t.setState(o=>({...o,connections:new Map(o.connections).set(r.uid,{accounts:i,chainId:s.chainId,connector:r}),current:r.uid,status:"connected"})),{accounts:i,chainId:s.chainId}}catch(s){throw t.setState(i=>({...i,status:i.current?"connected":"disconnected"})),s}}async function Wke(t,e={}){var s,i;let r;if(e.connector)r=e.connector;else{const{connections:o,current:a}=t.state,c=o.get(a);r=c==null?void 0:c.connector}const n=t.state.connections;r&&(await r.disconnect(),r.emitter.off("change",t._internal.events.change),r.emitter.off("disconnect",t._internal.events.disconnect),r.emitter.on("connect",t._internal.events.connect),n.delete(r.uid)),t.setState(o=>{if(n.size===0)return{...o,connections:new Map,current:void 0,status:"disconnected"};const a=n.values().next().value;return{...o,connections:new Map(n),current:a.connector.uid}});{const o=t.state.current;if(!o)return;const a=(s=t.state.connections.get(o))==null?void 0:s.connector;if(!a)return;await((i=t.storage)==null?void 0:i.setItem("recentConnectorId",a.id))}}async function ew(t,e={}){let r;if(e.connector){const{connector:c}=e,[l,f]=await Promise.all([c.getAccounts(),c.getChainId()]);r={accounts:l,chainId:f,connector:c}}else r=t.state.connections.get(t.state.current);if(!r)throw new eG;const n=e.chainId??r.chainId,s=r.connector;if(s.getClient)return s.getClient({chainId:n});const i=Hs(e.account??r.accounts[0]),o=t.chains.find(c=>c.id===n),a=await r.connector.getProvider({chainId:n});if(e.account&&!r.accounts.includes(i.address))throw new Lke({address:i.address,connector:s});return jV({account:i,chain:o,name:"Connector Client",transport:c=>LV(a)({...c,retryCount:0})})}function tG(t){const e=t.state.current,r=t.state.connections.get(e),n=r==null?void 0:r.accounts,s=n==null?void 0:n[0],i=t.chains.find(a=>a.id===(r==null?void 0:r.chainId)),o=t.state.status;switch(o){case"connected":return{address:s,addresses:n,chain:i,chainId:r==null?void 0:r.chainId,connector:r==null?void 0:r.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:o};case"reconnecting":return{address:s,addresses:n,chain:i,chainId:r==null?void 0:r.chainId,connector:r==null?void 0:r.connector,isConnected:!!s,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:o};case"connecting":return{address:s,addresses:n,chain:i,chainId:r==null?void 0:r.chainId,connector:r==null?void 0:r.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:o};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:o}}}function pT(t){return t.state.chainId}function xl(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)&&Array.isArray(e)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!xl(t[n],e[n]))return!1;return!0}if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const s=Object.keys(t);if(r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(i&&!xl(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}let m6=[];function mT(t){const e=t.chains;return xl(m6,e)?m6:(m6=e,e)}function Hke(t,e={}){let r;try{r=t.getClient(e)}catch{}return r}let qp=[];function U8(t){const e=[...t.state.connections.values()];return t.state.status==="reconnecting"||xl(qp,e)?qp:(qp=e,e)}let g6=[];function gT(t){const e=t.connectors;return xl(g6,e)?g6:(g6=e,e)}function W8(t,e={}){const r=Hke(t,e);return r==null?void 0:r.extend(ake)}async function Vke(t,e={}){const r=await ew(t,e);return r.extend(dT),r.extend(dT)}let b6=!1;async function Gke(t,e={}){var l,f;if(b6)return[];b6=!0,t.setState(u=>({...u,status:u.current?"reconnecting":"connecting"}));const r=[];if((l=e.connectors)!=null&&l.length)for(const u of e.connectors){let d;typeof u=="function"?d=t._internal.connectors.setup(u):d=u,r.push(d)}else r.push(...t.connectors);let n;try{n=await((f=t.storage)==null?void 0:f.getItem("recentConnectorId"))}catch{}const s={};for(const[,u]of t.state.connections)s[u.connector.id]=1;n&&(s[n]=0);const i=Object.keys(s).length>0?[...r].sort((u,d)=>(s[u.id]??10)-(s[d.id]??10)):r;let o=!1;const a=[],c=[];for(const u of i){const d=await u.getProvider();if(!d||c.some(y=>y===d)||!await u.isAuthorized())continue;const v=await u.connect({isReconnecting:!0}).catch(()=>null);v&&(u.emitter.off("connect",t._internal.events.connect),u.emitter.on("change",t._internal.events.change),u.emitter.on("disconnect",t._internal.events.disconnect),t.setState(y=>{const m=new Map(o?y.connections:new Map).set(u.uid,{accounts:v.accounts,chainId:v.chainId,connector:u});return{...y,current:o?y.current:u.uid,connections:m}}),a.push({accounts:v.accounts,chainId:v.chainId,connector:u}),c.push(d),o=!0)}return o?t.setState(u=>({...u,status:"connected"})):t.setState(u=>({...u,connections:new Map,current:void 0,status:"disconnected"})),b6=!1,a}async function Kke(t,e){const{account:r,chainId:n,connector:s,gas:i,...o}=e;let a;typeof r=="object"&&r.type==="local"?a=t.getClient({chainId:n}):a=await ew(t,{account:r,chainId:n,connector:s});const c=await(async()=>{if(i!==null)return i===void 0?_b(a,Ux,"estimateGas")({...o,account:r,chain:n?{id:n}:null}):i})();return await _b(a,Hx,"sendTransaction")({...o,...r?{account:r}:{},gas:c,chain:n?{id:n}:null})}async function Yke(t,e){const{abi:r,chainId:n,connector:s,...i}=e;let o;e.account?o=e.account:o=(await ew(t,{chainId:n,connector:s})).account;const a=t.getClient({chainId:n}),c=_b(a,MV,"simulateContract"),{result:l,request:f}=await c({...i,abi:r,account:o});return{chainId:a.chain.id,result:l,request:{__mode:"prepared",...f,chainId:n}}}async function Qke(t,e){var i;const{chainId:r}=e,n=t.state.connections.get(((i=e.connector)==null?void 0:i.uid)??t.state.current);if(n){const o=n.connector;if(!o.switchChain)throw new Bke({connector:o});return await o.switchChain({chainId:r})}const s=t.chains.find(o=>o.id===r);if(!s)throw new Yf;return t.setState(o=>({...o,chainId:r})),s}function Jke(t,e){const{onChange:r}=e;return t.subscribe(()=>tG(t),r,{equalityFn(n,s){const{connector:i,...o}=n,{connector:a,...c}=s;return xl(o,c)&&(i==null?void 0:i.id)===(a==null?void 0:a.id)&&(i==null?void 0:i.uid)===(a==null?void 0:a.uid)}})}function Xke(t,e){const{onChange:r}=e;return t.subscribe(n=>n.chainId,r)}function Zke(t,e){const{onChange:r}=e;return t.subscribe(()=>U8(t),r,{equalityFn:xl})}function e7e(t,e){const{onChange:r}=e;return t._internal.connectors.subscribe((n,s)=>{r(Object.values(n),s)})}function t7e(t,e){const{onChange:r}=e;return t.subscribe(()=>W8(t),r,{equalityFn(n,s){return(n==null?void 0:n.uid)===(s==null?void 0:s.uid)}})}async function r7e(t,e){const{account:r,chainId:n,connector:s,__mode:i,...o}=e;let a;typeof r=="object"&&r.type==="local"?a=t.getClient({chainId:n}):a=await ew(t,{account:r,chainId:n,connector:s});let c;if(i==="prepared")c=o;else{const{request:u}=await Yke(t,{...o,account:r});c=u}return await _b(a,NV,"writeContract")({...c,...r?{account:r}:{},chain:n?{id:n}:null})}O9.type="mock";function O9(t){const e=t.features??{};let r=!1,n;return s=>({id:"mock",name:"Mock Connector",type:O9.type,async setup(){n=s.chains[0].id},async connect({chainId:i}={}){if(e.connectError)throw typeof e.connectError=="boolean"?new zt(new Error("Failed to connect.")):e.connectError;const a=await(await this.getProvider()).request({method:"eth_requestAccounts"});let c=await this.getChainId();return i&&c!==i&&(c=(await this.switchChain({chainId:i})).id),r=!0,{accounts:a,chainId:c}},async disconnect(){r=!1},async getAccounts(){if(!r)throw new eG;return(await(await this.getProvider()).request({method:"eth_accounts"})).map(a=>fs(a))},async getChainId(){const o=await(await this.getProvider()).request({method:"eth_chainId"});return qI(o,"number")},async isAuthorized(){return!e.reconnect||!r?!1:!!(await this.getAccounts()).length},async switchChain({chainId:i}){const o=await this.getProvider(),a=s.chains.find(c=>c.id===i);if(!a)throw new wi(new Yf);return await o.request({method:"wallet_switchEthereumChain",params:[{chainId:Le(i)}]}),a},onAccountsChanged(i){i.length===0?this.onDisconnect():s.emitter.emit("change",{accounts:i.map(o=>fs(o))})},onChainChanged(i){const o=Zc(i);s.emitter.emit("change",{chainId:o})},async onDisconnect(i){s.emitter.emit("disconnect"),r=!1},async getProvider({chainId:i}={}){const a=(s.chains.find(l=>l.id===i)??s.chains[0]).rpcUrls.default.http[0];return LV({request:async({method:l,params:f})=>{if(l==="eth_chainId")return Le(n);if(l==="eth_requestAccounts")return t.accounts;if(l==="eth_signTypedData_v4"&&e.signTypedDataError)throw typeof e.signTypedDataError=="boolean"?new zt(new Error("Failed to sign typed data.")):e.signTypedDataError;if(l==="wallet_switchEthereumChain"){if(e.switchChainError)throw typeof e.switchChainError=="boolean"?new zt(new Error("Failed to switch chain.")):e.switchChainError;n=qI(f[0].chainId,"number"),this.onChainChanged(n.toString());return}if(l==="personal_sign"){if(e.signMessageError)throw typeof e.signMessageError=="boolean"?new zt(new Error("Failed to sign message.")):e.signMessageError;l="eth_sign",f=[f[1],f[0]]}const u={method:l,params:f},{error:d,result:h}=await D4e.http(a,{body:u});if(d)throw new h9({body:u,error:d,url:a});return h}})({retryCount:0})}})}function n7e(t,e){const{initialState:r,reconnectOnMount:n}=e;return r&&t.setState({...r,connections:n?r.connections:new Map,status:n?"reconnecting":"disconnected"}),{async onMount(){var s;if(t._internal.ssr){await t._internal.store.persist.rehydrate();const i=(s=t._internal.mipd)==null?void 0:s.getProviders().map(t._internal.connectors.providerDetailToConnector).map(t._internal.connectors.setup);t._internal.connectors.setState(o=>[...o,...i??[]])}n?Gke(t):t.storage&&t.setState(i=>({...i,connections:new Map}))}}}function s7e(t){const{children:e,config:r,initialState:n,reconnectOnMount:s=!0}=t,{onMount:i}=n7e(r,{initialState:n,reconnectOnMount:s});r._internal.ssr||i();const o=p.useRef(!0);return p.useEffect(()=>{if(o.current&&r._internal.ssr)return i(),()=>{o.current=!1}},[]),e}const rG=p.createContext(void 0);function i7e(t){const{children:e,config:r}=t,n={value:r};return p.createElement(s7e,t,p.createElement(rG.Provider,n,e))}const o7e="2.5.7",a7e=()=>`wagmi@${o7e}`;class c7e extends uu{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiError"})}get docsBaseUrl(){return"https://wagmi.sh/react"}get version(){return a7e()}}class l7e extends c7e{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"https://wagmi.sh/react/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}class Z1{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const r={listener:e};return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const jv=typeof window>"u"||"Deno"in window;function Zs(){}function f7e(t,e){return typeof t=="function"?t(e):t}function H8(t){return typeof t=="number"&&t>=0&&t!==1/0}function nG(t,e){return Math.max(t+(e||0)-Date.now(),0)}function hd(t,e,r){return _y(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function u7e(t,e,r){return _y(t)?typeof e=="function"?{...r,mutationKey:t,mutationFn:e}:{...e,mutationKey:t}:typeof t=="function"?{...e,mutationFn:t}:{...t}}function $c(t,e,r){return _y(t)?[{...e,queryKey:t},r]:[t||{},e]}function bT(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(_y(o)){if(n){if(e.queryHash!==R9(o,e.options))return!1}else if(!Pb(e.queryKey,o))return!1}if(r!=="all"){const c=e.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||typeof s<"u"&&s!==e.state.fetchStatus||i&&!i(e))}function xT(t,e){const{exact:r,fetching:n,predicate:s,mutationKey:i}=t;if(_y(i)){if(!e.options.mutationKey)return!1;if(r){if(mf(e.options.mutationKey)!==mf(i))return!1}else if(!Pb(e.options.mutationKey,i))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||s&&!s(e))}function R9(t,e){return((e==null?void 0:e.queryKeyHashFn)||mf)(t)}function mf(t){return JSON.stringify(t,(e,r)=>V8(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Pb(t,e){return sG(t,e)}function sG(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!sG(t[r],e[r])):!1}function iG(t,e){if(t===e)return t;const r=wT(t)&&wT(e);if(r||V8(t)&&V8(e)){const n=r?t.length:Object.keys(t).length,s=r?e:Object.keys(e),i=s.length,o=r?[]:{};let a=0;for(let c=0;c"u")return!0;const r=e.prototype;return!(!CT(r)||!r.hasOwnProperty("isPrototypeOf"))}function CT(t){return Object.prototype.toString.call(t)==="[object Object]"}function _y(t){return Array.isArray(t)}function oG(t){return new Promise(e=>{setTimeout(e,t)})}function ET(t){oG(0).then(t)}function d7e(){if(typeof AbortController=="function")return new AbortController}function G8(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?iG(t,e):e}class h7e extends Z1{constructor(){super(),this.setup=e=>{if(!jv&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Tb=new h7e,kT=["online","offline"];class v7e extends Z1{constructor(){super(),this.setup=e=>{if(!jv&&window.addEventListener){const r=()=>e();return kT.forEach(n=>{window.addEventListener(n,r,!1)}),()=>{kT.forEach(n=>{window.removeEventListener(n,r)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Ob=new v7e;function y7e(t){return Math.min(1e3*2**t,3e4)}function tw(t){return(t??"online")==="online"?Ob.isOnline():!0}class aG{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Fm(t){return t instanceof aG}function cG(t){let e=!1,r=0,n=!1,s,i,o;const a=new Promise((m,g)=>{i=m,o=g}),c=m=>{n||(h(new aG(m)),t.abort==null||t.abort())},l=()=>{e=!0},f=()=>{e=!1},u=()=>!Tb.isFocused()||t.networkMode!=="always"&&!Ob.isOnline(),d=m=>{n||(n=!0,t.onSuccess==null||t.onSuccess(m),s==null||s(),i(m))},h=m=>{n||(n=!0,t.onError==null||t.onError(m),s==null||s(),o(m))},v=()=>new Promise(m=>{s=g=>{const b=n||!u();return b&&m(g),b},t.onPause==null||t.onPause()}).then(()=>{s=void 0,n||t.onContinue==null||t.onContinue()}),y=()=>{if(n)return;let m;try{m=t.fn()}catch(g){m=Promise.reject(g)}Promise.resolve(m).then(d).catch(g=>{var b,x;if(n)return;const k=(b=t.retry)!=null?b:3,$=(x=t.retryDelay)!=null?x:y7e,I=typeof $=="function"?$(r,g):$,M=k===!0||typeof k=="number"&&r{if(u())return v()}).then(()=>{e?h(g):y()})})};return tw(t.networkMode)?y():v().then(y),{promise:a,cancel:c,continue:()=>(s==null?void 0:s())?a:Promise.resolve(),cancelRetry:l,continueRetry:f}}const M9=console;function p7e(){let t=[],e=0,r=f=>{f()},n=f=>{f()};const s=f=>{let u;e++;try{u=f()}finally{e--,e||a()}return u},i=f=>{e?t.push(f):ET(()=>{r(f)})},o=f=>(...u)=>{i(()=>{f(...u)})},a=()=>{const f=t;t=[],f.length&&ET(()=>{n(()=>{f.forEach(u=>{r(u)})})})};return{batch:s,batchCalls:o,schedule:i,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{n=f}}}const $r=p7e();class lG{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),H8(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(jv?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class m7e extends lG{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||M9,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||g7e(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,r){const n=G8(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){this.dispatch({type:"setState",state:e,setStateOptions:r})}cancel(e){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(e),n?n.then(Zs).catch(Zs):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!nG(this.state.dataUpdatedAt,e)}onFocus(){var e;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,r){var n,s;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(v=>v.options.queryFn);h&&this.setOptions(h.options)}const o=d7e(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};c(a);const l=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),f={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:l};if(c(f),(n=this.options.behavior)==null||n.onFetch(f),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((s=f.fetchOptions)==null?void 0:s.meta)){var u;this.dispatch({type:"fetch",meta:(u=f.fetchOptions)==null?void 0:u.meta})}const d=h=>{if(Fm(h)&&h.silent||this.dispatch({type:"error",error:h}),!Fm(h)){var v,y,m,g;(v=(y=this.cache.config).onError)==null||v.call(y,h,this),(m=(g=this.cache.config).onSettled)==null||m.call(g,this.state.data,h,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=cG({fn:f.fetchFn,abort:o==null?void 0:o.abort.bind(o),onSuccess:h=>{var v,y,m,g;if(typeof h>"u"){d(new Error(this.queryHash+" data is undefined"));return}this.setData(h),(v=(y=this.cache.config).onSuccess)==null||v.call(y,h,this),(m=(g=this.cache.config).onSettled)==null||m.call(g,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(h,v)=>{this.dispatch({type:"failed",failureCount:h,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var s,i;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(s=e.meta)!=null?s:null,fetchStatus:tw(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(i=e.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=e.error;return Fm(o)&&o.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),$r.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function g7e(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=typeof e<"u",n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class b7e extends Z1{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var s;const i=r.queryKey,o=(s=r.queryHash)!=null?s:R9(i,r);let a=this.get(o);return a||(a=new m7e({cache:this,logger:e.getLogger(),queryKey:i,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(a)),a}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const r=this.queriesMap[e.queryHash];r&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),r===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){$r.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=$c(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(s=>bT(n,s))}findAll(e,r){const[n]=$c(e,r);return Object.keys(n).length>0?this.queries.filter(s=>bT(n,s)):this.queries}notify(e){$r.batch(()=>{this.listeners.forEach(({listener:r})=>{r(e)})})}onFocus(){$r.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){$r.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class x7e extends lG{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||M9,this.observers=[],this.state=e.state||fG(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(r=>r!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,r;return(e=(r=this.retryer)==null?void 0:r.continue())!=null?e:this.execute()}async execute(){const e=()=>{var M;return this.retryer=cG({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(D,H)=>{this.dispatch({type:"failed",failureCount:D,error:H})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(M=this.options.retry)!=null?M:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,s,i,o,a,c,l,f;if(!r){var u,d,h,v;this.dispatch({type:"loading",variables:this.options.variables}),await((u=(d=this.mutationCache.config).onMutate)==null?void 0:u.call(d,this.state.variables,this));const D=await((h=(v=this.options).onMutate)==null?void 0:h.call(v,this.state.variables));D!==this.state.context&&this.dispatch({type:"loading",context:D,variables:this.state.variables})}const M=await e();return await((n=(s=this.mutationCache.config).onSuccess)==null?void 0:n.call(s,M,this.state.variables,this.state.context,this)),await((i=(o=this.options).onSuccess)==null?void 0:i.call(o,M,this.state.variables,this.state.context)),await((a=(c=this.mutationCache.config).onSettled)==null?void 0:a.call(c,M,null,this.state.variables,this.state.context,this)),await((l=(f=this.options).onSettled)==null?void 0:l.call(f,M,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:M}),M}catch(M){try{var y,m,g,b,x,k,$,I;throw await((y=(m=this.mutationCache.config).onError)==null?void 0:y.call(m,M,this.state.variables,this.state.context,this)),await((g=(b=this.options).onError)==null?void 0:g.call(b,M,this.state.variables,this.state.context)),await((x=(k=this.mutationCache.config).onSettled)==null?void 0:x.call(k,void 0,M,this.state.variables,this.state.context,this)),await(($=(I=this.options).onSettled)==null?void 0:$.call(I,void 0,M,this.state.variables,this.state.context)),M}finally{this.dispatch({type:"error",error:M})}}}dispatch(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!tw(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}};this.state=r(this.state),$r.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function fG(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class w7e extends Z1{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const s=new x7e({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(r),state:n,defaultOptions:r.mutationKey?e.getMutationDefaults(r.mutationKey):void 0});return this.add(s),s}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(r=>r!==e),this.notify({type:"removed",mutation:e})}clear(){$r.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(r=>xT(e,r))}findAll(e){return this.mutations.filter(r=>xT(e,r))}notify(e){$r.batch(()=>{this.listeners.forEach(({listener:r})=>{r(e)})})}resumePausedMutations(){var e;return this.resuming=((e=this.resuming)!=null?e:Promise.resolve()).then(()=>{const r=this.mutations.filter(n=>n.state.isPaused);return $r.batch(()=>r.reduce((n,s)=>n.then(()=>s.continue().catch(Zs)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function K8(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,s,i,o;const a=(e=t.fetchOptions)==null||(r=e.meta)==null?void 0:r.refetchPage,c=(n=t.fetchOptions)==null||(s=n.meta)==null?void 0:s.fetchMore,l=c==null?void 0:c.pageParam,f=(c==null?void 0:c.direction)==="forward",u=(c==null?void 0:c.direction)==="backward",d=((i=t.state.data)==null?void 0:i.pages)||[],h=((o=t.state.data)==null?void 0:o.pageParams)||[];let v=h,y=!1;const m=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>{var M;if((M=t.signal)!=null&&M.aborted)y=!0;else{var D;(D=t.signal)==null||D.addEventListener("abort",()=>{y=!0})}return t.signal}})},g=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),b=(I,M,D,H)=>(v=H?[M,...v]:[...v,M],H?[D,...I]:[...I,D]),x=(I,M,D,H)=>{if(y)return Promise.reject("Cancelled");if(typeof D>"u"&&!M&&I.length)return Promise.resolve(I);const G={queryKey:t.queryKey,pageParam:D,meta:t.options.meta};m(G);const V=g(G);return Promise.resolve(V).then(F=>b(I,D,F,H))};let k;if(!d.length)k=x([]);else if(f){const I=typeof l<"u",M=I?l:Y8(t.options,d);k=x(d,I,M)}else if(u){const I=typeof l<"u",M=I?l:uG(t.options,d);k=x(d,I,M,!0)}else{v=[];const I=typeof t.options.getNextPageParam>"u";k=(a&&d[0]?a(d[0],0,d):!0)?x([],I,h[0]):Promise.resolve(b([],h[0],d[0]));for(let D=1;D{if(a&&d[D]?a(d[D],D,d):!0){const V=I?h[D]:Y8(t.options,H);return x(H,I,V)}return Promise.resolve(b(H,h[D],d[D]))})}return k.then(I=>({pages:I,pageParams:v}))}}}}function Y8(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function uG(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}function C7e(t,e){if(t.getNextPageParam&&Array.isArray(e)){const r=Y8(t,e);return typeof r<"u"&&r!==null&&r!==!1}}function E7e(t,e){if(t.getPreviousPageParam&&Array.isArray(e)){const r=uG(t,e);return typeof r<"u"&&r!==null&&r!==!1}}class N9{constructor(e={}){this.queryCache=e.queryCache||new b7e,this.mutationCache=e.mutationCache||new w7e,this.logger=e.logger||M9,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Tb.subscribe(()=>{Tb.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Ob.subscribe(()=>{Ob.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,r;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(e,r){const[n]=$c(e,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state.data}ensureQueryData(e,r,n){const s=hd(e,r,n),i=this.getQueryData(s.queryKey);return i?Promise.resolve(i):this.fetchQuery(s)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const s=n.data;return[r,s]})}setQueryData(e,r,n){const s=this.queryCache.find(e),i=s==null?void 0:s.state.data,o=f7e(r,i);if(typeof o>"u")return;const a=hd(e),c=this.defaultQueryOptions(a);return this.queryCache.build(this,c).setData(o,{...n,manual:!0})}setQueriesData(e,r,n){return $r.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=$c(e,r),s=this.queryCache;$r.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(e,r,n){const[s,i]=$c(e,r,n),o=this.queryCache,a={type:"active",...s};return $r.batch(()=>(o.findAll(s).forEach(c=>{c.reset()}),this.refetchQueries(a,i)))}cancelQueries(e,r,n){const[s,i={}]=$c(e,r,n);typeof i.revert>"u"&&(i.revert=!0);const o=$r.batch(()=>this.queryCache.findAll(s).map(a=>a.cancel(i)));return Promise.all(o).then(Zs).catch(Zs)}invalidateQueries(e,r,n){const[s,i]=$c(e,r,n);return $r.batch(()=>{var o,a;if(this.queryCache.findAll(s).forEach(l=>{l.invalidate()}),s.refetchType==="none")return Promise.resolve();const c={...s,type:(o=(a=s.refetchType)!=null?a:s.type)!=null?o:"active"};return this.refetchQueries(c,i)})}refetchQueries(e,r,n){const[s,i]=$c(e,r,n),o=$r.batch(()=>this.queryCache.findAll(s).filter(c=>!c.isDisabled()).map(c=>{var l;return c.fetch(void 0,{...i,cancelRefetch:(l=i==null?void 0:i.cancelRefetch)!=null?l:!0,meta:{refetchPage:s.refetchPage}})}));let a=Promise.all(o).then(Zs);return i!=null&&i.throwOnError||(a=a.catch(Zs)),a}fetchQuery(e,r,n){const s=hd(e,r,n),i=this.defaultQueryOptions(s);typeof i.retry>"u"&&(i.retry=!1);const o=this.queryCache.build(this,i);return o.isStaleByTime(i.staleTime)?o.fetch(i):Promise.resolve(o.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(Zs).catch(Zs)}fetchInfiniteQuery(e,r,n){const s=hd(e,r,n);return s.behavior=K8(),this.fetchQuery(s)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(Zs).catch(Zs)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,r){const n=this.queryDefaults.find(s=>mf(e)===mf(s.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>Pb(e,n.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(e,r){const n=this.mutationDefaults.find(s=>mf(e)===mf(s.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>Pb(e,n.mutationKey));return r==null?void 0:r.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const r={...this.defaultOptions.queries,...this.getQueryDefaults(e==null?void 0:e.queryKey),...e,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=R9(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e==null?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class dG extends Z1{constructor(e,r){super(),this.client=e,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),ST(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Q8(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Q8(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,r){const n=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),Ib(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const i=this.hasListeners();i&&AT(this.currentQuery,s,this.options,n)&&this.executeFetch(),this.updateResult(r),i&&(this.currentQuery!==s||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const o=this.computeRefetchInterval();i&&(this.currentQuery!==s||this.options.enabled!==n.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(e){const r=this.client.getQueryCache().build(this.client,e),n=this.createResult(r,e);return S7e(this,n,e)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(e){const r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...r}={}){return this.fetch({...r,meta:{refetchPage:e}})}fetchOptimistic(e){const r=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(e){var r;return this.executeFetch({...e,cancelRefetch:(r=e.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let r=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(Zs)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),jv||this.currentResult.isStale||!H8(this.options.staleTime))return;const r=nG(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(jv||this.options.enabled===!1||!H8(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Tb.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,r){const n=this.currentQuery,s=this.options,i=this.currentResult,o=this.currentResultState,a=this.currentResultOptions,c=e!==n,l=c?e.state:this.currentQueryInitialState,f=c?this.currentResult:this.previousQueryResult,{state:u}=e;let{dataUpdatedAt:d,error:h,errorUpdatedAt:v,fetchStatus:y,status:m}=u,g=!1,b=!1,x;if(r._optimisticResults){const D=this.hasListeners(),H=!D&&ST(e,r),G=D&&AT(e,n,r,s);(H||G)&&(y=tw(e.options.networkMode)?"fetching":"paused",d||(m="loading")),r._optimisticResults==="isRestoring"&&(y="idle")}if(r.keepPreviousData&&!u.dataUpdatedAt&&f!=null&&f.isSuccess&&m!=="error")x=f.data,d=f.dataUpdatedAt,m=f.status,g=!0;else if(r.select&&typeof u.data<"u")if(i&&u.data===(o==null?void 0:o.data)&&r.select===this.selectFn)x=this.selectResult;else try{this.selectFn=r.select,x=r.select(u.data),x=G8(i==null?void 0:i.data,x,r),this.selectResult=x,this.selectError=null}catch(D){this.selectError=D}else x=u.data;if(typeof r.placeholderData<"u"&&typeof x>"u"&&m==="loading"){let D;if(i!=null&&i.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData))D=i.data;else if(D=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof D<"u")try{D=r.select(D),this.selectError=null}catch(H){this.selectError=H}typeof D<"u"&&(m="success",x=G8(i==null?void 0:i.data,D,r),b=!0)}this.selectError&&(h=this.selectError,x=this.selectResult,v=Date.now(),m="error");const k=y==="fetching",$=m==="loading",I=m==="error";return{status:m,fetchStatus:y,isLoading:$,isSuccess:m==="success",isError:I,isInitialLoading:$&&k,data:x,dataUpdatedAt:d,error:h,errorUpdatedAt:v,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>l.dataUpdateCount||u.errorUpdateCount>l.errorUpdateCount,isFetching:k,isRefetching:k&&!$,isLoadingError:I&&u.dataUpdatedAt===0,isPaused:y==="paused",isPlaceholderData:b,isPreviousData:g,isRefetchError:I&&u.dataUpdatedAt!==0,isStale:j9(e,r),refetch:this.refetch,remove:this.remove}}updateResult(e){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Ib(n,r))return;this.currentResult=n;const s={cache:!0},i=()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.trackedProps.size)return!0;const c=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&c.add("error"),Object.keys(this.currentResult).some(l=>{const f=l;return this.currentResult[f]!==r[f]&&c.has(f)})};(e==null?void 0:e.listeners)!==!1&&i()&&(s.listeners=!0),this.notify({...s,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const r={};e.type==="success"?r.onSuccess=!e.manual:e.type==="error"&&!Fm(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){$r.batch(()=>{if(e.onSuccess){var r,n,s,i;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(s=(i=this.options).onSettled)==null||s.call(i,this.currentResult.data,null)}else if(e.onError){var o,a,c,l;(o=(a=this.options).onError)==null||o.call(a,this.currentResult.error),(c=(l=this.options).onSettled)==null||c.call(l,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:f})=>{f(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function k7e(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function ST(t,e){return k7e(t,e)||t.state.dataUpdatedAt>0&&Q8(t,e,e.refetchOnMount)}function Q8(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&j9(t,e)}return!1}function AT(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&j9(t,r)}function j9(t,e){return t.isStaleByTime(e.staleTime)}function S7e(t,e,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?e.isPlaceholderData:!Ib(t.getCurrentResult(),e)}class A7e extends dG{constructor(e,r){super(e,r)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,r){super.setOptions({...e,behavior:K8()},r)}getOptimisticResult(e){return e.behavior=K8(),super.getOptimisticResult(e)}fetchNextPage({pageParam:e,...r}={}){return this.fetch({...r,meta:{fetchMore:{direction:"forward",pageParam:e}}})}fetchPreviousPage({pageParam:e,...r}={}){return this.fetch({...r,meta:{fetchMore:{direction:"backward",pageParam:e}}})}createResult(e,r){var n,s,i,o,a,c;const{state:l}=e,f=super.createResult(e,r),{isFetching:u,isRefetching:d}=f,h=u&&((n=l.fetchMeta)==null||(s=n.fetchMore)==null?void 0:s.direction)==="forward",v=u&&((i=l.fetchMeta)==null||(o=i.fetchMore)==null?void 0:o.direction)==="backward";return{...f,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:C7e(r,(a=l.data)==null?void 0:a.pages),hasPreviousPage:E7e(r,(c=l.data)==null?void 0:c.pages),isFetchingNextPage:h,isFetchingPreviousPage:v,isRefetching:d&&!h&&!v}}}let $7e=class extends Z1{constructor(e,r){super(),this.client=e,this.setOptions(r),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var r;const n=this.options;this.options=this.client.defaultMutationOptions(e),Ib(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(r=this.currentMutation)==null||r.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.currentMutation)==null||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();const r={listeners:!0};e.type==="success"?r.onSuccess=!0:e.type==="error"&&(r.onError=!0),this.notify(r)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,r){return this.mutateOptions=r,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof e<"u"?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:fG(),r={...e,isLoading:e.status==="loading",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=r}notify(e){$r.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(e.onSuccess){var r,n,s,i;(r=(n=this.mutateOptions).onSuccess)==null||r.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(s=(i=this.mutateOptions).onSettled)==null||s.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var o,a,c,l;(o=(a=this.mutateOptions).onError)==null||o.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(c=(l=this.mutateOptions).onSettled)==null||c.call(l,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(({listener:f})=>{f(this.currentResult)})})}};var hG={exports:{}},vG={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var h1=p;function _7e(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var P7e=typeof Object.is=="function"?Object.is:_7e,I7e=h1.useState,T7e=h1.useEffect,O7e=h1.useLayoutEffect,R7e=h1.useDebugValue;function M7e(t,e){var r=e(),n=I7e({inst:{value:r,getSnapshot:e}}),s=n[0].inst,i=n[1];return O7e(function(){s.value=r,s.getSnapshot=e,x6(s)&&i({inst:s})},[t,r,e]),T7e(function(){return x6(s)&&i({inst:s}),t(function(){x6(s)&&i({inst:s})})},[t]),R7e(r),r}function x6(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!P7e(t,r)}catch{return!0}}function N7e(t,e){return e()}var j7e=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?N7e:M7e;vG.useSyncExternalStore=h1.useSyncExternalStore!==void 0?h1.useSyncExternalStore:j7e;hG.exports=vG;var yG=hG.exports;const pG=yG.useSyncExternalStore,$T=p.createContext(void 0),mG=p.createContext(!1);function gG(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=$T),window.ReactQueryClientContext):$T)}const D9=({context:t}={})=>{const e=p.useContext(gG(t,p.useContext(mG)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},L9=({client:t,children:e,context:r,contextSharing:n=!1})=>{p.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);const s=gG(r,n);return p.createElement(mG.Provider,{value:!r&&n},p.createElement(s.Provider,{value:t},e))},bG=p.createContext(!1),D7e=()=>p.useContext(bG);bG.Provider;function L7e(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const B7e=p.createContext(L7e()),F7e=()=>p.useContext(B7e);function xG(t,e){return typeof t=="function"?t(...e):!!t}const z7e=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},q7e=t=>{p.useEffect(()=>{t.clearReset()},[t])},U7e=({result:t,errorResetBoundary:e,useErrorBoundary:r,query:n})=>t.isError&&!e.isReset()&&!t.isFetching&&xG(r,[t.error,n]),W7e=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},H7e=(t,e)=>t.isLoading&&t.isFetching&&!e,V7e=(t,e,r)=>(t==null?void 0:t.suspense)&&H7e(e,r),G7e=(t,e,r)=>e.fetchOptimistic(t).then(({data:n})=>{t.onSuccess==null||t.onSuccess(n),t.onSettled==null||t.onSettled(n,null)}).catch(n=>{r.clearReset(),t.onError==null||t.onError(n),t.onSettled==null||t.onSettled(void 0,n)});function wG(t,e){const r=D9({context:t.context}),n=D7e(),s=F7e(),i=r.defaultQueryOptions(t);i._optimisticResults=n?"isRestoring":"optimistic",i.onError&&(i.onError=$r.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=$r.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=$r.batchCalls(i.onSettled)),W7e(i),z7e(i,s),q7e(s);const[o]=p.useState(()=>new e(r,i)),a=o.getOptimisticResult(i);if(pG(p.useCallback(c=>{const l=n?()=>{}:o.subscribe($r.batchCalls(c));return o.updateResult(),l},[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),p.useEffect(()=>{o.setOptions(i,{listeners:!1})},[i,o]),V7e(i,a,n))throw G7e(i,o,s);if(U7e({result:a,errorResetBoundary:s,useErrorBoundary:i.useErrorBoundary,query:o.getCurrentQuery()}))throw a.error;return i.notifyOnChangeProps?a:o.trackResult(a)}function wn(t,e,r){const n=hd(t,e,r);return wG(n,dG)}function Py(t,e,r){const n=u7e(t,e,r),s=D9({context:n.context}),[i]=p.useState(()=>new $7e(s,n));p.useEffect(()=>{i.setOptions(n)},[i,n]);const o=pG(p.useCallback(c=>i.subscribe($r.batchCalls(c)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),a=p.useCallback((c,l)=>{i.mutate(c,l).catch(K7e)},[i]);if(o.error&&xG(i.options.useErrorBoundary,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}function K7e(){}function Y7e(t,e,r){const n=hd(t,e,r);return wG(n,A7e)}function Q7e(t,e){const{onChange:r}=e;return t._internal.chains.subscribe((n,s)=>{r(n,s)})}function Ct(t={}){const e=t.config??p.useContext(rG);if(!e)throw new l7e;return e}var CG={exports:{}},EG={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var rw=p,J7e=yG;function X7e(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Z7e=typeof Object.is=="function"?Object.is:X7e,e9e=J7e.useSyncExternalStore,t9e=rw.useRef,r9e=rw.useEffect,n9e=rw.useMemo,s9e=rw.useDebugValue;EG.useSyncExternalStoreWithSelector=function(t,e,r,n,s){var i=t9e(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=n9e(function(){function c(h){if(!l){if(l=!0,f=h,h=n(h),s!==void 0&&o.hasValue){var v=o.value;if(s(v,h))return u=v}return u=h}if(v=u,Z7e(f,h))return v;var y=n(h);return s!==void 0&&s(v,y)?v:(f=h,u=y)}var l=!1,f,u,d=r===void 0?null:r;return[function(){return c(e())},d===null?void 0:function(){return c(d())}]},[e,r,n,s]);var a=e9e(t,i[0],i[1]);return r9e(function(){o.hasValue=!0,o.value=a},[a]),s9e(a),a};CG.exports=EG;var kG=CG.exports;const w6=t=>typeof t=="object"&&!Array.isArray(t);function i9e(t,e,r=e,n=xl){const s=p.useRef([]),i=kG.useSyncExternalStoreWithSelector(t,e,r,o=>o,(o,a)=>{if(w6(o)&&w6(a)&&s.current.length){for(const c of s.current)if(!n(o[c],a[c]))return!1;return!0}return n(o,a)});if(w6(i)){const o={...i};return Object.defineProperties(o,Object.entries(o).reduce((a,[c,l])=>({...a,[c]:{configurable:!1,enumerable:!0,get:()=>(s.current.includes(c)||s.current.push(c),l)}}),{})),o}return i}function Cn(t={}){const e=Ct(t);return i9e(r=>Jke(e,{onChange:r}),()=>tG(e))}function o9e(t){return JSON.stringify(t,(e,r)=>a9e(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):typeof r=="bigint"?r.toString():r)}function a9e(t){if(!_T(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!_T(r)||!r.hasOwnProperty("isPrototypeOf"))}function _T(t){return Object.prototype.toString.call(t)==="[object Object]"}function c9e(t){const{_defaulted:e,behavior:r,gcTime:n,initialData:s,initialDataUpdatedAt:i,maxPages:o,meta:a,networkMode:c,queryFn:l,queryHash:f,queryKey:u,queryKeyHashFn:d,retry:h,retryDelay:v,structuralSharing:y,getPreviousPageParam:m,getNextPageParam:g,initialPageParam:b,_optimisticResults:x,enabled:k,notifyOnChangeProps:$,placeholderData:I,refetchInterval:M,refetchIntervalInBackground:D,refetchOnMount:H,refetchOnReconnect:G,refetchOnWindowFocus:V,retryOnMount:Q,select:F,staleTime:C,suspense:S,throwOnError:T,config:R,connector:A,query:N,...B}=t;return B}function l9e(t){return{mutationFn(e){return Uke(t,e)},mutationKey:["connect"]}}function f9e(t){return{mutationFn(e){return Wke(t,e)},mutationKey:["disconnect"]}}function u9e(t,e={}){return{gcTime:0,async queryFn({queryKey:r}){const{connector:n}=e,{connectorUid:s,scopeKey:i,...o}=r[1];return Vke(t,{...o,connector:n})},queryKey:d9e(e)}}function d9e(t={}){const{connector:e,...r}=t;return["walletClient",{...c9e(r),connectorUid:e==null?void 0:e.uid}]}function h9e(t){return{mutationFn(e){return Kke(t,e)},mutationKey:["sendTransaction"]}}function v9e(t){return{mutationFn(e){return Qke(t,e)},mutationKey:["switchChain"]}}function y9e(t){return{mutationFn(e){return r7e(t,e)},mutationKey:["writeContract"]}}function p9e(t){const e=wn({...t,queryKeyHashFn:o9e});return e.queryKey=t.queryKey,e}function nw(t={}){const e=Ct(t);return p.useSyncExternalStore(r=>Xke(e,{onChange:r}),()=>pT(e),()=>pT(e))}function m9e(t={}){const e=Ct(t);return p.useSyncExternalStore(r=>Q7e(e,{onChange:r}),()=>mT(e),()=>mT(e))}function g9e(t={}){const e=Ct(t);return p.useSyncExternalStore(r=>e7e(e,{onChange:r}),()=>gT(e),()=>gT(e))}function SG(t={}){const{mutation:e}=t,r=Ct(t),n=g9e({config:r}),s=l9e(r),{mutate:i,mutateAsync:o,...a}=Py({...e,...s});return p.useEffect(()=>r.subscribe(({status:c})=>c,(c,l)=>{l==="connected"&&c==="disconnected"&&a.reset()}),[r,a]),{...a,connect:i,connectAsync:o,connectors:n}}function sw(t={}){const e=Ct(t);return p.useSyncExternalStore(r=>Zke(e,{onChange:r}),()=>U8(e),()=>U8(e))}function AG(t={}){const{mutation:e}=t,r=Ct(t),n=f9e(r),{mutate:s,mutateAsync:i,...o}=Py({...e,...n});return{...o,connectors:sw({config:r}).map(a=>a.connector),disconnect:s,disconnectAsync:i}}function b9e(t={}){const e=Ct(t);return kG.useSyncExternalStoreWithSelector(r=>t7e(e,{onChange:r}),()=>W8(e,t),()=>W8(e,t),r=>r,(r,n)=>(r==null?void 0:r.uid)===(n==null?void 0:n.uid))}function B9(t={}){const{mutation:e}=t,r=Ct(t),n=h9e(r),{mutate:s,mutateAsync:i,...o}=Py({...e,...n});return{...o,sendTransaction:s,sendTransactionAsync:i}}function F9(t={}){const{mutation:e}=t,r=Ct(t),n=v9e(r),{mutate:s,mutateAsync:i,...o}=Py({...e,...n});return{...o,chains:m9e({config:r}),switchChain:s,switchChainAsync:i}}function x9e(t={}){const{query:e={},...r}=t,n=Ct(r),s=D9(),{address:i,connector:o,status:a}=Cn(),c=nw(),{queryKey:l,...f}=u9e(n,{...t,chainId:t.chainId??c,connector:t.connector??o}),u=!!(a!=="disconnected"&&(e.enabled??!0));return p.useEffect(()=>{i?s.invalidateQueries({queryKey:l}):s.removeQueries({queryKey:l})},[i,s]),p9e({...e,...f,queryKey:l,enabled:u,staleTime:1/0})}function w9e(t={}){const{mutation:e}=t,r=Ct(t),n=y9e(r),{mutate:s,mutateAsync:i,...o}=Py({...e,...n});return{...o,writeContract:s,writeContractAsync:i}}class C9e extends Error{}C9e.prototype.name="InvalidTokenError";const E9e=Object.entries(gt).reduce((t,[e,r])=>(t[r.name]=r.chainId,t),{});Object.entries(E9e).reduce((t,[e,r])=>(t[r]=e,t),{});z9.type="coinbaseWallet";function z9(t){let r,n;return s=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",type:z9.type,async connect({chainId:i}={}){try{const o=await this.getProvider(),a=(await o.request({method:"eth_requestAccounts"})).map(l=>fs(l));o.on("accountsChanged",this.onAccountsChanged),o.on("chainChanged",this.onChainChanged),o.on("disconnect",this.onDisconnect.bind(this));let c=await this.getChainId();if(i&&c!==i){const l=await this.switchChain({chainId:i}).catch(f=>{if(f.code===zt.code)throw f;return{id:c}});c=(l==null?void 0:l.id)??c}return{accounts:a,chainId:c}}catch(o){throw/(user closed modal|accounts received is empty|user denied account)/i.test(o.message)?new zt(o):o}},async disconnect(){const i=await this.getProvider();i.removeListener("accountsChanged",this.onAccountsChanged),i.removeListener("chainChanged",this.onChainChanged),i.removeListener("disconnect",this.onDisconnect.bind(this)),i.disconnect(),i.close()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(o=>fs(o))},async getChainId(){const o=await(await this.getProvider()).request({method:"eth_chainId"});return Zc(o)},async getProvider(){var i;if(!n){const{default:o}=await S9(()=>import("./index-D3eN1ASu.js").then(d=>d.i),__vite__mapDeps([0,1]),import.meta.url);let a;typeof o!="function"&&typeof o.default=="function"?a=o.default:a=o,r=new a({reloadOnDisconnect:!1,...t});const c=(i=r.walletExtension)==null?void 0:i.getChainId(),l=s.chains.find(d=>t.chainId?d.id===t.chainId:d.id===c)||s.chains[0],f=t.chainId||(l==null?void 0:l.id),u=t.jsonRpcUrl||(l==null?void 0:l.rpcUrls.default.http[0]);n=r.makeWeb3Provider(u,f)}return n},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({chainId:i}){var l,f;const o=s.chains.find(u=>u.id===i);if(!o)throw new wi(new Yf);const a=await this.getProvider(),c=Le(o.id);try{return await a.request({method:"wallet_switchEthereumChain",params:[{chainId:c}]}),o}catch(u){if(u.code===4902)try{return await a.request({method:"wallet_addEthereumChain",params:[{chainId:c,chainName:o.name,nativeCurrency:o.nativeCurrency,rpcUrls:[((l=o.rpcUrls.default)==null?void 0:l.http[0])??""],blockExplorerUrls:[(f=o.blockExplorers)==null?void 0:f.default.url]}]}),o}catch(d){throw new zt(d)}throw new wi(u)}},onAccountsChanged(i){i.length===0?s.emitter.emit("disconnect"):s.emitter.emit("change",{accounts:i.map(o=>fs(o))})},onChainChanged(i){const o=Zc(i);s.emitter.emit("change",{chainId:o})},async onDisconnect(i){s.emitter.emit("disconnect");const o=await this.getProvider();o.removeListener("accountsChanged",this.onAccountsChanged),o.removeListener("chainChanged",this.onChainChanged),o.removeListener("disconnect",this.onDisconnect.bind(this))}})}q9.type="walletConnect";function q9(t){const e=t.isNewChainsStale??!0;let r,n;const s="eip155";return i=>({id:"walletConnect",name:"WalletConnect",type:q9.type,async setup(){const o=await this.getProvider().catch(()=>null);o&&(o.on("connect",this.onConnect.bind(this)),o.on("session_delete",this.onSessionDelete.bind(this)))},async connect({chainId:o,...a}={}){var c,l;try{const f=await this.getProvider();if(!f)throw new rf;f.on("display_uri",this.onDisplayUri);let u=o;if(!u){const y=await((c=i.storage)==null?void 0:c.getItem("state"))??{};i.chains.some(g=>g.id===y.chainId)?u=y.chainId:u=(l=i.chains[0])==null?void 0:l.id}if(!u)throw new Error("No chains found on connector.");const d=await this.isChainsStale();if(f.session&&d&&await f.disconnect(),!f.session||d){const y=i.chains.filter(m=>m.id!==u).map(m=>m.id);await f.connect({optionalChains:[u,...y],..."pairingTopic"in a?{pairingTopic:a.pairingTopic}:{}}),this.setRequestedChainsIds(i.chains.map(m=>m.id))}const h=(await f.enable()).map(y=>fs(y)),v=await this.getChainId();return f.removeListener("display_uri",this.onDisplayUri),f.removeListener("connect",this.onConnect.bind(this)),f.on("accountsChanged",this.onAccountsChanged.bind(this)),f.on("chainChanged",this.onChainChanged),f.on("disconnect",this.onDisconnect.bind(this)),f.on("session_delete",this.onSessionDelete.bind(this)),{accounts:h,chainId:v}}catch(f){throw/(user rejected|connection request reset)/i.test(f==null?void 0:f.message)?new zt(f):f}},async disconnect(){const o=await this.getProvider();try{await(o==null?void 0:o.disconnect())}catch(a){if(!/No matching key/i.test(a.message))throw a}finally{o==null||o.removeListener("accountsChanged",this.onAccountsChanged.bind(this)),o==null||o.removeListener("chainChanged",this.onChainChanged),o==null||o.removeListener("disconnect",this.onDisconnect.bind(this)),o==null||o.removeListener("session_delete",this.onSessionDelete.bind(this)),o==null||o.on("connect",this.onConnect.bind(this)),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(a=>fs(a))},async getProvider({chainId:o}={}){var c;async function a(){const l=i.chains.map(u=>u.id);if(!l.length)return;const{EthereumProvider:f}=await S9(()=>import("./index.es-nspLMTrL.js"),__vite__mapDeps([2,1]),import.meta.url);return await f.init({...t,disableProviderPing:!0,optionalChains:l,projectId:t.projectId,rpcMap:Object.fromEntries(i.chains.map(u=>[u.id,u.rpcUrls.default.http[0]])),showQrModal:t.showQrModal??!0})}return r||(n||(n=a()),r=await n,r==null||r.events.setMaxListeners(1/0)),o&&await((c=this.switchChain)==null?void 0:c.call(this,{chainId:o})),r},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{const[o,a]=await Promise.all([this.getAccounts(),this.getProvider()]);return o.length?await this.isChainsStale()&&a.session?(await a.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({chainId:o}){var c;const a=i.chains.find(l=>l.id===o);if(!a)throw new wi(new Yf);try{const l=await this.getProvider(),f=this.getNamespaceChainsIds(),u=this.getNamespaceMethods();if(!f.includes(o)&&u.includes("wallet_addEthereumChain")){await l.request({method:"wallet_addEthereumChain",params:[{chainId:Le(a.id),blockExplorerUrls:[(c=a.blockExplorers)==null?void 0:c.default.url],chainName:a.name,nativeCurrency:a.nativeCurrency,rpcUrls:[...a.rpcUrls.default.http]}]});const h=await this.getRequestedChainsIds();this.setRequestedChainsIds([...h,o])}return await l.request({method:"wallet_switchEthereumChain",params:[{chainId:Le(o)}]}),a}catch(l){const f=typeof l=="string"?l:l==null?void 0:l.message;throw/user rejected request/i.test(f)?new zt(l):new wi(l)}},onAccountsChanged(o){o.length===0?this.onDisconnect():i.emitter.emit("change",{accounts:o.map(a=>fs(a))})},onChainChanged(o){const a=Zc(o);i.emitter.emit("change",{chainId:a})},async onConnect(o){const a=Zc(o.chainId),c=await this.getAccounts();i.emitter.emit("connect",{accounts:c,chainId:a})},async onDisconnect(o){this.setRequestedChainsIds([]),i.emitter.emit("disconnect");const a=await this.getProvider();a.removeListener("accountsChanged",this.onAccountsChanged.bind(this)),a.removeListener("chainChanged",this.onChainChanged),a.removeListener("disconnect",this.onDisconnect.bind(this)),a.removeListener("session_delete",this.onSessionDelete.bind(this)),a.on("connect",this.onConnect.bind(this))},onDisplayUri(o){i.emitter.emit("message",{type:"display_uri",data:o})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){var a,c,l;return r?((l=(c=(a=r.session)==null?void 0:a.namespaces[s])==null?void 0:c.chains)==null?void 0:l.map(f=>parseInt(f.split(":")[1]||"")))??[]:[]},getNamespaceMethods(){var a,c;return r?((c=(a=r.session)==null?void 0:a.namespaces[s])==null?void 0:c.methods)??[]:[]},async getRequestedChainsIds(){var o;return await((o=i.storage)==null?void 0:o.getItem(this.requestedChainsStorageKey))??[]},async isChainsStale(){if(this.getNamespaceMethods().includes("wallet_addEthereumChain")||!e)return!1;const a=i.chains.map(f=>f.id),c=this.getNamespaceChainsIds();if(c.length&&!c.some(f=>a.includes(f)))return!1;const l=await this.getRequestedChainsIds();return!a.every(f=>l.includes(f))},async setRequestedChainsIds(o){var a;await((a=i.storage)==null?void 0:a.setItem(this.requestedChainsStorageKey,o))},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}})}function Ue(){return Ue=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const e=t?"white":"black";return n=>{let s=Ue({},($i(n),n));return w.createElement(w.Fragment,null,w.createElement("svg",Ue({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 29 34",fill:"none"},s),w.createElement("path",{d:"M27.702 11.5918C27.5049 11.7448 24.0243 13.7068 24.0243 18.0694C24.0243 23.1155 28.4532 24.9007 28.5858 24.9449C28.5654 25.0537 27.8822 27.3897 26.2506 29.77C24.7958 31.8646 23.2765 33.9558 20.9651 33.9558C18.6538 33.9558 18.0589 32.6127 15.3907 32.6127C12.7904 32.6127 11.8659 34 9.75169 34C7.63748 34 6.1623 32.0618 4.46618 29.6816C2.50154 26.8865 0.914185 22.5443 0.914185 18.423C0.914185 11.8128 5.21057 8.30703 9.43897 8.30703C11.6857 8.30703 13.5586 9.78278 14.9692 9.78278C16.3118 9.78278 18.4056 8.21862 20.9617 8.21862C21.9304 8.21862 25.4111 8.30703 27.702 11.5918ZM19.7483 5.42014C20.8054 4.16542 21.5532 2.42444 21.5532 0.683468C21.5532 0.442044 21.5328 0.19722 21.4886 0C19.7687 0.0646065 17.7224 1.14591 16.4886 2.57746C15.5199 3.67917 14.6157 5.42014 14.6157 7.18492C14.6157 7.45014 14.6599 7.71537 14.6803 7.80038C14.7891 7.82078 14.9658 7.84458 15.1426 7.84458C16.6857 7.84458 18.6266 6.81088 19.7483 5.42014Z",fill:e})))}},IT=({isDarkMode:t})=>{const e=t?"#FFFFFF":"#000000";return n=>{let s=Ue({},($i(n),n));return w.createElement(w.Fragment,null,w.createElement("svg",Ue({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},s),w.createElement("path",{d:"M27.166 20.8774C27.1338 17.335 30.0617 15.633 30.1936 15.5493C28.5463 13.1395 25.9852 12.8113 25.0714 12.7727C22.8932 12.5507 20.8179 14.0565 19.7111 14.0565C18.6043 14.0565 16.8991 12.8049 15.0909 12.8403C12.7131 12.8757 10.5221 14.2205 9.2962 16.3505C6.8284 20.6297 8.66557 26.9777 11.0722 30.4557C12.2498 32.1545 13.6494 34.0689 15.493 33.9981C17.2691 33.9273 17.9383 32.8495 20.0811 32.8495C22.224 32.8495 22.8289 33.9981 24.7014 33.9627C26.6094 33.9241 27.8191 32.2253 28.9871 30.5201C30.3352 28.5478 30.8918 26.6366 30.924 26.5369C30.8822 26.5208 27.2046 25.1116 27.166 20.8774Z",fill:e}),w.createElement("path",{d:"M23.6429 10.4722C24.621 9.28822 25.2806 7.64089 25.1004 6C23.6911 6.05791 21.9859 6.93949 20.9756 8.12351C20.0715 9.16917 19.2768 10.8455 19.4923 12.4542C21.0592 12.5764 22.6648 11.653 23.6429 10.4722Z",fill:e})))}};Dl.type="sequence";function Dl(t){var e,r,n;const{defaultNetwork:s,connect:i,walletAppURL:o}=t;let a="sequence";const c=(t==null||(e=t.connect)==null||(e=e.settings)==null?void 0:e.signInOptions)||[],l=t==null||(r=t.connect)==null||(r=r.settings)==null?void 0:r.signInWith;if(t==null||(n=t.connect)==null||(n=n.settings)==null?void 0:n.signInWithEmail)a="email";else if(l)a=l,`${l[0].toUpperCase()}${l.slice(1)}`;else if(c.length>0){const u=c[0];`${a[0].toUpperCase()}${a.slice(1)}`,a=u}return u=>({id:"sequence",name:"Sequence",type:Dl.type,async setup(){const d=await this.getProvider();d.on("chainChanged",h=>{u.emitter.emit("change",{chainId:Gu(h)})}),d.on("disconnect",()=>{this.onDisconnect()})},async connect(){const d=await this.getProvider();if(!d.isConnected()){var h,v;const m=localStorage.getItem(ur.Theme),g=localStorage.getItem(ur.EthAuthSettings),b=g?JSON.parse(g):{},x=Ue({authorize:!0},b,i,{settings:Ue({theme:m||"dark"},i==null?void 0:i.settings)}),k=await d.connect(x);if(k.error)throw new zt(new Error(k.error));if(!k.connected)throw new zt(new Error("Wallet connection rejected"));const $=(h=k.proof)==null?void 0:h.proofString,I=(v=k.proof)==null?void 0:v.typedData;if($){const M=JSON.stringify({proofString:$,typedData:I});localStorage.setItem(ur.EthAuthProof,M)}}return{accounts:[...await this.getAccounts()],chainId:d.getChainId()}},async disconnect(){(await this.getProvider()).disconnect()},async getAccounts(){const d=await this.getProvider();return[fs(await d.getSigner().getAddress())]},async getProvider(){try{return Uf.getWallet()}catch{const h=localStorage.getItem(ur.ProjectAccessKey);if(!h)throw"projectAccessKey not found";const v=Uf.initWallet(h,{defaultNetwork:s,transports:{walletAppURL:o||"https://sequence.app"},defaultEIP6492:!0,analytics:!1}),y=await v.getChainId();return u.emitter.emit("change",{chainId:Gu(y)}),v}},async isAuthorized(){try{return!!await this.getAccounts()}catch{return!1}},async switchChain({chainId:d}){const h=await this.getProvider(),v=u.chains.find(y=>y.id===d)||u.chains[0];return h.setDefaultChainId(Gu(d)),u.emitter.emit("change",{chainId:d}),v},async getChainId(){return(await this.getProvider()).getChainId()},async onAccountsChanged(d){return{account:d[0]}},async onChainChanged(d){const h=await this.getProvider();u.emitter.emit("change",{chainId:Gu(d)}),h.setDefaultChainId(Gu(d))},async onConnect(d){},async onDisconnect(){localStorage.removeItem(ur.EthAuthProof),u.emitter.emit("disconnect")}})}function Gu(t){return typeof t=="object"?Gu(t.chainId):typeof t=="string"?Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10):typeof t=="bigint"?Number(t):t}const k9e=t=>({id:"apple",isSequenceBased:!0,logoDark:PT({isDarkMode:!0}),logoLight:PT({isDarkMode:!1}),monochromeLogoDark:IT({isDarkMode:!0}),monochromeLogoLight:IT({isDarkMode:!1}),name:"Apple",createConnector:()=>{var e;return Dl(Ue({},t,{connect:Ue({},t==null?void 0:t.connect,{settings:Ue({},t==null||(e=t.connect)==null?void 0:e.settings,{signInWith:"apple"})})}))}}),TT=t=>{let e=Ue({},($i(t),t));return w.createElement(w.Fragment,null,w.createElement("svg",Ue({viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),w.createElement("rect",{width:"28",height:"28",fill:"#2C5FF6"}),w.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 23.8C19.4124 23.8 23.8 19.4124 23.8 14C23.8 8.58761 19.4124 4.2 14 4.2C8.58761 4.2 4.2 8.58761 4.2 14C4.2 19.4124 8.58761 23.8 14 23.8ZM11.55 10.8C11.1358 10.8 10.8 11.1358 10.8 11.55V16.45C10.8 16.8642 11.1358 17.2 11.55 17.2H16.45C16.8642 17.2 17.2 16.8642 17.2 16.45V11.55C17.2 11.1358 16.8642 10.8 16.45 10.8H11.55Z",fill:"white"})))},S9e=t=>({id:"coinbase-wallet",logoDark:TT,logoLight:TT,name:"Coinbase Wallet",createConnector:()=>z9(Ue({},t))}),OT=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let s=Ue({},($i(n),n));return w.createElement(w.Fragment,null,w.createElement("svg",Ue({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35 34",fill:"none"},s),w.createElement("path",{d:"M17.0826 16.3805C17.1802 16.4598 17.32 16.4598 17.4176 16.3805L30.1401 6.04341C30.5283 5.72801 30.3053 5.09985 29.8051 5.09985H4.69499C4.19482 5.09985 3.9718 5.72801 4.35998 6.04341L17.0826 16.3805Z",fill:e}),w.createElement("path",{d:"M19.7626 19.2667L33.3838 8.19943C33.731 7.91735 34.2501 8.16441 34.2501 8.61174V24.2249C34.2501 26.5721 32.3473 28.4749 30.0001 28.4749H4.50006C2.15285 28.4749 0.250061 26.5721 0.250061 24.2249V8.61174C0.250061 8.16441 0.769134 7.91735 1.11631 8.19943L14.7375 19.2667C16.2014 20.4561 18.2987 20.4561 19.7626 19.2667Z",fill:e})))}},J8="@sequence.kit.connector.email",A9e=t=>({id:"email",isSequenceBased:!0,logoDark:OT({isDarkMode:!0}),logoLight:OT({isDarkMode:!1}),name:"Email",createConnector:()=>{var e;const r=localStorage.getItem(J8);return Dl(Ue({},t,{connect:Ue({},t==null?void 0:t.connect,{settings:Ue({},t==null||(e=t.connect)==null?void 0:e.settings,{signInOptions:["email"],signInWithEmail:r||""})})}))}}),RT=t=>{let e=Ue({},($i(t),t));return w.createElement(w.Fragment,null,w.createElement("svg",Ue({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},e),w.createElement("path",{d:"M17.4214 36.9716C9.27855 35.5145 3.10712 28.4859 3.10712 20.0001C3.10712 10.5715 10.8214 2.85718 20.25 2.85718C29.6785 2.85718 37.3928 10.5715 37.3928 20.0001C37.3928 28.4859 31.2214 35.5145 23.0785 36.9716L22.1357 36.2002H18.3643L17.4214 36.9716Z",fill:"url(#paint0_linear_193_14528)"}),w.createElement("path",{d:"M26.9357 24.7999L27.7072 19.9999H23.1643V16.657C23.1643 15.2856 23.6786 14.257 25.7357 14.257H27.9643V9.88558C26.7643 9.71415 25.3929 9.54272 24.1929 9.54272C20.25 9.54272 17.5071 11.9427 17.5071 16.2285V19.9999H13.2214V24.7999H17.5071V36.8857C18.45 37.0571 19.3929 37.1429 20.3357 37.1429C21.2786 37.1429 22.2214 37.0571 23.1643 36.8857V24.7999H26.9357Z",fill:"white"}),w.createElement("defs",null,w.createElement("linearGradient",{id:"paint0_linear_193_14528",x1:"20.2508",y1:"35.9507",x2:"20.2508",y2:"2.85086",gradientUnits:"userSpaceOnUse"},w.createElement("stop",{"stop-color":"#0062E0"}),w.createElement("stop",{offset:"1","stop-color":"#19AFFF"})))))},MT=({isDarkMode:t})=>{const e=t?"#FFFFFF":"#000000";return n=>{let s=Ue({},($i(n),n));return w.createElement(w.Fragment,null,w.createElement("svg",Ue({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},s),w.createElement("path",{d:"M25.8582 10.4398C24.1222 10.4398 23.6288 11.2098 23.6288 12.9073V15.709H28.246L27.791 20.2476H23.6279V34H18.1024V20.2468H14.375V15.7081H18.1042V12.9851C18.1042 8.40625 19.9399 6 25.0891 6C26.1942 6 27.5163 6.0875 28.3055 6.19775V10.459",fill:e})))}},$9e=t=>({id:"facebook",isSequenceBased:!0,logoDark:RT,logoLight:RT,monochromeLogoDark:MT({isDarkMode:!0}),monochromeLogoLight:MT({isDarkMode:!1}),name:"Facebook",createConnector:()=>{var e;return Dl(Ue({},t,{connect:Ue({},t==null?void 0:t.connect,{settings:Ue({},t==null||(e=t.connect)==null?void 0:e.settings,{signInWith:"facebook"})})}))}}),NT=t=>{let e=Ue({},($i(t),t));return w.createElement(w.Fragment,null,w.createElement("svg",Ue({viewBox:"0 0 41 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),w.createElement("g",{id:"Frame 2114"},w.createElement("g",{id:"Group"},w.createElement("path",{id:"Vector",d:"M20.7497 16.8828V23.5218H29.9756C29.5705 25.6568 28.3548 27.4647 26.5314 28.6803L32.095 32.9972C35.3366 30.0051 37.2068 25.6102 37.2068 20.3895C37.2068 19.1739 37.0977 18.005 36.895 16.883L20.7497 16.8828Z",fill:"#4285F4"}),w.createElement("path",{id:"Vector_2",d:"M11.1424 23.2627L9.88756 24.2232L5.44592 27.6829C8.2667 33.2777 14.0481 37.1427 20.7493 37.1427C25.3778 37.1427 29.2583 35.6154 32.0947 32.9973L26.5311 28.6803C25.0038 29.7089 23.0557 30.3324 20.7493 30.3324C16.2922 30.3324 12.5053 27.3246 11.1494 23.2726L11.1424 23.2627Z",fill:"#34A853"}),w.createElement("path",{id:"Vector_3",d:"M5.44594 12.3169C4.27718 14.6233 3.60712 17.2259 3.60712 19.9999C3.60712 22.7739 4.27718 25.3765 5.44594 27.6829C5.44594 27.6984 11.1499 23.2569 11.1499 23.2569C10.8071 22.2284 10.6044 21.1375 10.6044 19.9997C10.6044 18.8619 10.8071 17.7711 11.1499 16.7425L5.44594 12.3169Z",fill:"#FBBC05"}),w.createElement("path",{id:"Vector_4",d:"M20.7497 9.6829C23.2744 9.6829 25.5185 10.5556 27.3107 12.2387L32.2198 7.32972C29.2431 4.55574 25.3783 2.85693 20.7497 2.85693C14.0484 2.85693 8.2667 6.70628 5.44592 12.3167L11.1497 16.7427C12.5055 12.6907 16.2926 9.6829 20.7497 9.6829Z",fill:"#EA4335"})))))},jT=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let s=Ue({},($i(n),n));return w.createElement("svg",Ue({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},s),w.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25.8355 14.7613C24.5584 13.5329 22.9441 12.9032 21.1356 12.9032C17.9377 12.9032 15.2302 15.0813 14.2595 18.0232L14.2593 18.023C14.0142 18.7662 13.8712 19.5609 13.8712 20.3866C13.8712 21.2124 14.004 22.0072 14.2594 22.7504L14.2587 22.751H14.2595C15.2302 25.6929 17.9377 27.871 21.1356 27.871C22.7907 27.871 24.1904 27.4168 25.2939 26.6736V26.6732C26.5812 25.7958 27.4497 24.5055 27.746 22.9777H21.1355V18.3223H32.6808C32.8034 19.0758 32.875 19.85 32.875 20.6655C32.875 24.4332 31.5467 27.6126 29.2377 29.77L29.2378 29.7703C27.2148 31.6594 24.446 32.7742 21.1356 32.7742C16.3438 32.7742 12.2059 29.9871 10.1931 25.9407V25.94L10.193 25.9401C9.35521 24.2678 8.875 22.3891 8.875 20.3866C8.875 18.384 9.35521 16.5053 10.193 14.833H10.1934C12.2063 10.7869 16.344 8 21.1356 8C24.446 8 27.2148 9.22839 29.3298 11.231L25.8355 14.7613Z",fill:e}))}},_9e=t=>({id:"google",isSequenceBased:!0,logoDark:NT,logoLight:NT,monochromeLogoDark:jT({isDarkMode:!0}),monochromeLogoLight:jT({isDarkMode:!1}),name:"Google",createConnector:()=>{var e;return Dl(Ue({},t,{connect:Ue({},t==null?void 0:t.connect,{settings:Ue({},t==null||(e=t.connect)==null?void 0:e.settings,{signInWith:"google"})})}))}}),DT=t=>{let e=Ue({},($i(t),t));return w.createElement(w.Fragment,null,w.createElement("svg",Ue({viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),w.createElement("rect",{width:"28",height:"28"}),w.createElement("path",{d:"M24.0891 3.1199L15.3446 9.61456L16.9617 5.7828L24.0891 3.1199Z",fill:"#E2761B",stroke:"#E2761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M3.90207 3.1199L12.5763 9.67608L11.0383 5.7828L3.90207 3.1199Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M20.9429 18.1745L18.6139 21.7426L23.597 23.1136L25.0295 18.2536L20.9429 18.1745Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M2.97929 18.2536L4.40301 23.1136L9.38607 21.7426L7.05713 18.1745L2.97929 18.2536Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M9.10483 12.1456L7.71626 14.2461L12.6642 14.4658L12.4884 9.14877L9.10483 12.1456Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M18.8864 12.1456L15.4589 9.08725L15.3446 14.4658L20.2837 14.2461L18.8864 12.1456Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M9.38606 21.7426L12.3566 20.2925L9.79033 18.2888L9.38606 21.7426Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M15.6347 20.2925L18.6139 21.7426L18.2009 18.2888L15.6347 20.2925Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M18.6139 21.7426L15.6347 20.2925L15.8719 22.2348L15.8456 23.0521L18.6139 21.7426Z",fill:"#D7C1B3",stroke:"#D7C1B3",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M9.38606 21.7426L12.1544 23.0521L12.1368 22.2348L12.3566 20.2925L9.38606 21.7426Z",fill:"#D7C1B3",stroke:"#D7C1B3",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M12.1984 17.0056L9.72002 16.2762L11.4689 15.4765L12.1984 17.0056Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M15.7928 17.0056L16.5223 15.4765L18.28 16.2762L15.7928 17.0056Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M9.38606 21.7426L9.80791 18.1745L7.05712 18.2536L9.38606 21.7426Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M18.1921 18.1745L18.6139 21.7426L20.9429 18.2536L18.1921 18.1745Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M20.2837 14.2461L15.3446 14.4658L15.8016 17.0057L16.5311 15.4765L18.2888 16.2762L20.2837 14.2461Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M9.72002 16.2762L11.4777 15.4765L12.1984 17.0057L12.6642 14.4658L7.71626 14.2461L9.72002 16.2762Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M7.71626 14.2461L9.79033 18.2888L9.72002 16.2762L7.71626 14.2461Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M18.2888 16.2762L18.2009 18.2888L20.2837 14.2461L18.2888 16.2762Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M12.6642 14.4658L12.1984 17.0057L12.7784 20.0025L12.9102 16.0565L12.6642 14.4658Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M15.3446 14.4658L15.1073 16.0477L15.2128 20.0025L15.8016 17.0057L15.3446 14.4658Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M15.8016 17.0056L15.2128 20.0025L15.6347 20.2925L18.2009 18.2888L18.2888 16.2762L15.8016 17.0056Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M9.72002 16.2762L9.79033 18.2888L12.3566 20.2925L12.7784 20.0025L12.1984 17.0056L9.72002 16.2762Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M15.8456 23.0521L15.8719 22.2348L15.6522 22.0414H12.339L12.1368 22.2348L12.1544 23.0521L9.38606 21.7426L10.3528 22.5336L12.3126 23.8958H15.6786L17.6472 22.5336L18.6139 21.7426L15.8456 23.0521Z",fill:"#C0AD9E",stroke:"#C0AD9E",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M15.6347 20.2925L15.2128 20.0025H12.7784L12.3566 20.2925L12.1368 22.2348L12.339 22.0414H15.6522L15.8719 22.2348L15.6347 20.2925Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M24.4583 10.0364L25.2053 6.45072L24.0891 3.1199L15.6347 9.39485L18.8864 12.1456L23.4827 13.4903L24.5022 12.3038L24.0628 11.9874L24.7658 11.3459L24.221 10.924L24.924 10.3879L24.4583 10.0364Z",fill:"#763D16",stroke:"#763D16",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M2.79472 6.45072L3.54174 10.0364L3.06717 10.3879L3.77024 10.924L3.23415 11.3459L3.93722 11.9874L3.4978 12.3038L4.50847 13.4903L9.10483 12.1456L12.3566 9.39485L3.90207 3.1199L2.79472 6.45072Z",fill:"#763D16",stroke:"#763D16",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M23.4827 13.4903L18.8864 12.1456L20.2837 14.2461L18.2009 18.2888L20.9429 18.2536H25.0295L23.4827 13.4903Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M9.10484 12.1456L4.50848 13.4903L2.97929 18.2536H7.05713L9.79033 18.2888L7.71626 14.2461L9.10484 12.1456Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),w.createElement("path",{d:"M15.3446 14.4658L15.6347 9.39485L16.9705 5.7828H11.0383L12.3566 9.39485L12.6642 14.4658L12.7696 16.0653L12.7784 20.0025H15.2128L15.2304 16.0653L15.3446 14.4658Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"})))},P9e=()=>({id:"metamask",logoDark:DT,logoLight:DT,name:"Metamask",createConnector:()=>Zx({target:"metaMask"})}),Rb=t=>{let e=Ue({},($i(t),t));return w.createElement(w.Fragment,null,w.createElement("svg",Ue({xmlns:"http://www.w3.org/2000/svg",style:{fill:"none"},id:"svg1316",version:"1.1",viewBox:"0 0 396 396"},e),w.createElement("g",{transform:"translate(0,38)",id:"g1256",clipPath:"url(#clip0_5_131)"},w.createElement("g",{id:"g1254",clipPath:"url(#clip1_5_131)"},w.createElement("path",{style:{fill:"#111111"},id:"path1232",d:"M 0,67.5049 V 250.165 c 0,37.282 30.1402,67.505 67.32,67.505 h 261.36 c 37.18,0 67.32,-30.223 67.32,-67.505 V 67.5049 C 396,30.223 365.86,0 328.68,0 H 67.32 C 30.1402,0 0,30.223 0,67.5049 Z"}),w.createElement("path",{style:{fill:"url(#paint0_linear_5_13"},id:"path1234",d:"M 0,67.5049 V 250.165 c 0,37.282 30.1402,67.505 67.32,67.505 h 261.36 c 37.18,0 67.32,-30.223 67.32,-67.505 V 67.5049 C 396,30.223 365.86,0 328.68,0 H 67.32 C 30.1402,0 0,30.223 0,67.5049 Z"}),w.createElement("path",{style:{fill:"url(#paint1_linear_5_131"},id:"path1236",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),w.createElement("path",{style:{fill:"url(#paint2_linear_5_131)"},id:"path1238",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),w.createElement("path",{style:{fill:"url(#paint3_linear_5_131)"},id:"path1240",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),w.createElement("path",{style:{fill:"url(#paint4_linear_5_131)"},id:"path1242",d:"m 98.9999,238.126 c 0,-10.965 -8.8648,-19.854 -19.8,-19.854 -10.9352,0 -19.8,8.889 -19.8,19.854 0,10.966 8.8648,19.855 19.8,19.855 10.9352,0 19.8,-8.889 19.8,-19.855 z"}),w.createElement("path",{style:{fill:"url(#paint5_linear_5_131)"},id:"path1244",d:"m 336.6,158.835 c 0,-10.965 -8.865,-19.854 -19.8,-19.854 -10.935,0 -19.8,8.889 -19.8,19.854 0,10.965 8.865,19.855 19.8,19.855 10.935,0 19.8,-8.89 19.8,-19.855 z"}),w.createElement("path",{style:{fill:"url(#paint6_linear_5_131)"},id:"path1246",d:"m 336.6,158.835 c 0,-10.965 -8.865,-19.854 -19.8,-19.854 -10.935,0 -19.8,8.889 -19.8,19.854 0,10.965 8.865,19.855 19.8,19.855 10.935,0 19.8,-8.89 19.8,-19.855 z"}),w.createElement("path",{style:{fill:"url(#paint7_linear_5_131)"},id:"path1248",d:"M 316.8,59.5632 H 158.4 c -10.935,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.865,19.8544 19.8,19.8544 h 158.4 c 10.935,0 19.8,-8.8892 19.8,-19.8544 0,-10.9653 -8.865,-19.8544 -19.8,-19.8544 z"}),w.createElement("path",{style:{fill:"url(#paint8_linear_5_131)"},id:"path1250",d:"M 316.8,218.272 H 158.4 c -10.935,0 -19.8,8.889 -19.8,19.854 0,10.966 8.865,19.855 19.8,19.855 h 158.4 c 10.935,0 19.8,-8.889 19.8,-19.855 0,-10.965 -8.865,-19.854 -19.8,-19.854 z"}),w.createElement("path",{style:{fill:"url(#paint9_linear_5_131)"},id:"path1252",d:"M 237.6,138.981 H 79.2 c -10.9352,0 -19.8,8.889 -19.8,19.854 0,10.965 8.8648,19.855 19.8,19.855 h 158.4 c 10.935,0 19.8,-8.89 19.8,-19.855 0,-10.965 -8.865,-19.854 -19.8,-19.854 z"}))),w.createElement("defs",{id:"defs1314"},w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"318",x2:"198",y1:"4.0585401e-05",x1:"198",id:"paint0_linear_5_131"},w.createElement("stop",{id:"stop1258",stopColor:"#1D273D"}),w.createElement("stop",{id:"stop1260",stopColor:"#0D0F13",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"63",x2:"92.5",y1:"99",x1:"65.5",id:"paint1_linear_5_131"},w.createElement("stop",{id:"stop1263",stopColor:"#4462FE"}),w.createElement("stop",{id:"stop1265",stopColor:"#7D69FA",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"97.591103",x2:"96.137703",y1:"99.291199",x1:"62.879902",id:"paint2_linear_5_131"},w.createElement("stop",{id:"stop1268",stopColor:"#3757FD"}),w.createElement("stop",{id:"stop1270",stopColor:"#6980FA",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"97.591103",x2:"96.137703",y1:"99.291199",x1:"62.879902",id:"paint3_linear_5_131"},w.createElement("stop",{id:"stop1273",stopColor:"#2447FF"}),w.createElement("stop",{id:"stop1275",stopColor:"#6980FA",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"223.5",x2:"91.5",y1:"251.5",x1:"65",id:"paint4_linear_5_131"},w.createElement("stop",{id:"stop1278",stopColor:"#BC3EE6"}),w.createElement("stop",{id:"stop1280",stopColor:"#D972F1",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"146",x2:"329.5",y1:"172",x1:"305",id:"paint5_linear_5_131"},w.createElement("stop",{id:"stop1283",stopColor:"#29BDFF"}),w.createElement("stop",{id:"stop1285",stopColor:"#96E7FB",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"176.772",x2:"334.56699",y1:"178.418",x1:"300.17999",id:"paint6_linear_5_131"},w.createElement("stop",{id:"stop1288",stopColor:"#23BBFF"}),w.createElement("stop",{id:"stop1290",stopColor:"#85E7FF",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"60",x2:"317.5",y1:"99",x1:"154.5",id:"paint7_linear_5_131"},w.createElement("stop",{id:"stop1293",stopColor:"#23BBFF"}),w.createElement("stop",{id:"stop1295",stopColor:"#85E7FF",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"218",x2:"312.5",y1:"258",x1:"156",id:"paint8_linear_5_131"},w.createElement("stop",{id:"stop1298",stopColor:"#2447FF"}),w.createElement("stop",{id:"stop1300",stopColor:"#6980FA",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"139",x2:"235.5",y1:"179",x1:"86.000099",id:"paint9_linear_5_131"},w.createElement("stop",{id:"stop1303",stopColor:"#6634FF"}),w.createElement("stop",{id:"stop1305",stopColor:"#9C6DFF",offset:"1"})),w.createElement("clipPath",{id:"clip0_5_131"},w.createElement("rect",{style:{fill:"#ffffff"},y:"0",x:"0",id:"rect1308",height:"317.67001",width:"396"})),w.createElement("clipPath",{id:"clip1_5_131"},w.createElement("rect",{style:{fill:"#ffffff"},y:"0",x:"0",id:"rect1311",height:"317.67001",width:"396"})))))},I9e=t=>({id:"mock",isSequenceBased:!0,logoDark:Rb,logoLight:Rb,name:"Mock",createConnector:()=>O9(t)}),T9e=t=>({id:"sequence",isSequenceBased:!0,logoDark:Rb,logoLight:Rb,name:"Sequence",createConnector:()=>Dl(Ue({},t))}),Up=({isDarkMode:t})=>{let e;return t===void 0?e="#9146FF":e=t?"white":"black",n=>(Ue({},($i(n),n)),w.createElement(w.Fragment,null,w.createElement("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 2400 2800",transform:"scale(0.80)"},w.createElement("g",null,w.createElement("g",{id:"Layer_1-2"},w.createElement("path",{fill:e,d:"M500,0L0,500v1800h600v500l500-500h400l900-900V0H500z M2200,1300l-400,400h-400l-350,350v-350H600V200h1600 V1300z"}),w.createElement("rect",{x:"1700",y:"550",fill:e,width:"200",height:"600"}),w.createElement("rect",{x:"1150",y:"550",fill:e,width:"200",height:"600"}))))))},O9e=t=>({id:"twitch",isSequenceBased:!0,logoDark:Up({}),logoLight:Up({}),monochromeLogoDark:Up({isDarkMode:!0}),monochromeLogoLight:Up({isDarkMode:!1}),name:"Twitch",createConnector:()=>{var e;return Dl(Ue({},t,{connect:Ue({},t==null?void 0:t.connect,{settings:Ue({},t==null||(e=t.connect)==null?void 0:e.settings,{signInWith:"twitch"})})}))}}),LT=t=>{let e=Ue({},($i(t),t));return w.createElement(w.Fragment,null,w.createElement("svg",Ue({fill:"none",viewBox:"0 0 480 332",xmlns:"http://www.w3.org/2000/svg"},e),w.createElement("path",{d:"m126.613 93.9842c62.622-61.3123 164.152-61.3123 226.775 0l7.536 7.3788c3.131 3.066 3.131 8.036 0 11.102l-25.781 25.242c-1.566 1.533-4.104 1.533-5.67 0l-10.371-10.154c-43.687-42.7734-114.517-42.7734-158.204 0l-11.107 10.874c-1.565 1.533-4.103 1.533-5.669 0l-25.781-25.242c-3.132-3.066-3.132-8.036 0-11.102zm280.093 52.2038 22.946 22.465c3.131 3.066 3.131 8.036 0 11.102l-103.463 101.301c-3.131 3.065-8.208 3.065-11.339 0l-73.432-71.896c-.783-.767-2.052-.767-2.835 0l-73.43 71.896c-3.131 3.065-8.208 3.065-11.339 0l-103.4657-101.302c-3.1311-3.066-3.1311-8.036 0-11.102l22.9456-22.466c3.1311-3.065 8.2077-3.065 11.3388 0l73.4333 71.897c.782.767 2.051.767 2.834 0l73.429-71.897c3.131-3.065 8.208-3.065 11.339 0l73.433 71.897c.783.767 2.052.767 2.835 0l73.431-71.895c3.132-3.066 8.208-3.066 11.339 0z",fill:"#3396ff"})))},R9e=t=>({id:"wallet-connect",logoDark:LT,logoLight:LT,name:"Walletconnect",createConnector:()=>q9(Ue({},t))}),M9e=({walletConnectProjectId:t,defaultChainId:e,projectAccessKey:r,appName:n})=>pY(r,[A9e({defaultNetwork:e,connect:{app:n,projectAccessKey:r}}),_9e({defaultNetwork:e,connect:{app:n,projectAccessKey:r}}),$9e({defaultNetwork:e,connect:{app:n,projectAccessKey:r}}),O9e({defaultNetwork:e,connect:{app:n}}),k9e({defaultNetwork:e,connect:{app:n}}),T9e({defaultNetwork:e,connect:{app:n,projectAccessKey:r}}),R9e({projectId:t}),P9e(),S9e({appName:n})]);var zm={},iw={},Iy={};Object.defineProperty(Iy,"__esModule",{value:!0});Iy.default=void 0;var N9e=p;function j9e(t){(0,N9e.useEffect)(function(){if(t){var e=document.querySelectorAll('script[src="'.concat(t,'"]'))[0];e||(e=document.createElement("script"),e.src=t,e.async=!0,document.body.appendChild(e))}},[t])}var D9e=j9e;Iy.default=D9e;var Ty={},ow={};Object.defineProperty(ow,"__esModule",{value:!0});ow.default=void 0;var L9e=function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{pollFrequency:1e3,retries:100,parent:window},n=r.pollFrequency,s=n===void 0?1e3:n,i=r.retries,o=i===void 0?100:i,a=r.parent,c=a===void 0?window:a;if(c&&c.hasOwnProperty(e))return Promise.resolve(c[e]);if(!o)return Promise.resolve(void 0);var l=o-1;return new Promise(function(f){return setTimeout(f,typeof s=="function"?s({retries:l}):s)}).then(function(){return t(e,{pollFrequency:s,parent:c,retries:l})})},B9e=L9e;ow.default=B9e;Object.defineProperty(Ty,"__esModule",{value:!0});Ty.default=void 0;var F9e=z9e(ow);function z9e(t){return t&&t.__esModule?t:{default:t}}var q9e="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js",U9e=function(e){var r=e.authOptions,n=e.onSuccess,s=e.onError;return(0,F9e.default)("AppleID").then(function(){return window.AppleID||console.error(new Error("Error loading apple script")),window.AppleID.auth.init(r),window.AppleID.auth.signIn().then(function(i){return n&&n(i),i}).catch(function(i){return s?s(i):console.error(i),null})}).catch(function(i){return s?s(i):console.error(i),null})},W9e={APPLE_SCRIPT_SRC:q9e,signIn:U9e};Ty.default=W9e;Object.defineProperty(iw,"__esModule",{value:!0});iw.default=void 0;var co=U9(p),H9e=U9(Iy),BT=U9(Ty),V9e=["onSuccess","onError","skipScript","authOptions","iconProps","render","uiType","className","noDefaultStyle","buttonExtraChildren"];function U9(t){return t&&t.__esModule?t:{default:t}}function Mb(){return Mb=Object.assign||function(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Q9e(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i=0)&&(r[s]=t[s]);return r}var J9e=` +.react-apple-signin-auth-btn { + background-color: transparent; + border: none; + padding: 0; + cursor: pointer; + border-radius: 4px; + padding: 0 8px 0 2px; + font-size: 14px; + font-size: 1em; + line-height: 1; + border: 1px solid #000; + overflow: hidden; + display: inline-flex; + justify-content: center; + align-items: center; +} +.react-apple-signin-auth-btn-light { + background-color: #FFF; + color: #000; + border-color: #000; +} +.react-apple-signin-auth-btn-dark { + background-color: #000; + color: #FFF; + border-color: #FFF; +}`.replace(/ {2}|\n/g,""),X9e=function(e){var r=e.onSuccess,n=e.onError,s=e.skipScript,i=s===void 0?!1:s,o=e.authOptions,a=e.iconProps,c=e.render,l=e.uiType,f=l===void 0?"dark":l,u=e.className,d=e.noDefaultStyle,h=d===void 0?!1:d,v=e.buttonExtraChildren,y=v===void 0?"Continue with Apple":v,m=Y9e(e,V9e);(0,H9e.default)(i?null:BT.default.APPLE_SCRIPT_SRC);var g=function(k){k&&(k.preventDefault(),k.stopPropagation()),BT.default.signIn({authOptions:o,onSuccess:r,onError:n})},b=G9e({children:co.default.createElement(co.default.Fragment,null,co.default.createElement("svg",Mb({width:"24px",height:"44px",viewBox:"0 0 24 44"},a),co.default.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},co.default.createElement("rect",{fill:f==="light"?"#FFF":"#000",x:"0",y:"0",width:"24",height:"44"}),co.default.createElement("path",{d:"M12.2337427,16.9879688 C12.8896607,16.9879688 13.7118677,16.5445313 14.2014966,15.9532812 C14.6449341,15.4174609 14.968274,14.6691602 14.968274,13.9208594 C14.968274,13.8192383 14.9590357,13.7176172 14.9405591,13.6344727 C14.2107349,13.6621875 13.3330982,14.1241016 12.8065162,14.7430664 C12.3907935,15.2142188 12.012024,15.9532812 12.012024,16.7108203 C12.012024,16.8216797 12.0305005,16.9325391 12.0397388,16.9694922 C12.0859302,16.9787305 12.1598365,16.9879688 12.2337427,16.9879688 Z M9.92417241,28.1662891 C10.8202857,28.1662891 11.2175318,27.5658008 12.3353638,27.5658008 C13.4716724,27.5658008 13.721106,28.1478125 14.7188404,28.1478125 C15.6980982,28.1478125 16.3540162,27.2424609 16.972981,26.3555859 C17.6658521,25.339375 17.9522388,24.3416406 17.9707154,24.2954492 C17.9060474,24.2769727 16.0306763,23.5101953 16.0306763,21.3576758 C16.0306763,19.491543 17.5088013,18.6508594 17.5919459,18.5861914 C16.612688,17.1819727 15.1253248,17.1450195 14.7188404,17.1450195 C13.6194849,17.1450195 12.7233716,17.8101758 12.1598365,17.8101758 C11.5501099,17.8101758 10.7463794,17.1819727 9.79483648,17.1819727 C7.98413335,17.1819727 6.14571538,18.6785742 6.14571538,21.5054883 C6.14571538,23.2607617 6.8293482,25.1176563 7.67003179,26.3186328 C8.39061773,27.3348438 9.01882085,28.1662891 9.92417241,28.1662891 Z",fill:f==="light"?"#000":"#FFF",fillRule:"nonzero"}))),y),onClick:g},m);return c?c(b):co.default.createElement(co.default.Fragment,null,co.default.createElement("button",Mb({className:"".concat(h?"":"react-apple-signin-auth-btn react-apple-signin-auth-btn-".concat(f)).concat(u?" ".concat(u):""),type:"button","aria-label":"Signin with apple ID"},b)),h?null:co.default.createElement("style",null,J9e))},Z9e=X9e;iw.default=Z9e;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"appleAuthHelpers",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"useScript",{enumerable:!0,get:function(){return n.default}}),t.default=void 0;var e=s(iw),r=s(Ty),n=s(Iy);function s(o){return o&&o.__esModule?o:{default:o}}var i=e.default;t.default=i})(zm);function W9(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function Wp(){}function zT(){return typeof WeakMap<"u"?new WeakMap:eSe()}function eSe(){return{add:Wp,delete:Wp,get:Wp,set:Wp,has:function(t){return!1}}}var tSe=Object.prototype.hasOwnProperty,X8=function(t,e){return tSe.call(t,e)};function C6(t,e){for(var r in e)X8(e,r)&&(t[r]=e[r]);return t}var rSe=/^[ \t]*(?:\r\n|\r|\n)/,nSe=/(?:\r\n|\r|\n)[ \t]*$/,sSe=/^(?:[\r\n]|$)/,iSe=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,oSe=/^[ \t]*[\r\n][ \t\r\n]*$/;function qT(t,e,r){var n=0,s=t[0].match(iSe);s&&(n=s[1].length);var i="(\\r\\n|\\r|\\n).{0,"+n+"}",o=new RegExp(i,"g");e&&(t=t.slice(1));var a=r.newline,c=r.trimLeadingNewline,l=r.trimTrailingNewline,f=typeof a=="string",u=t.length,d=t.map(function(h,v){return h=h.replace(o,"$1"),v===0&&c&&(h=h.replace(rSe,"")),v===u-1&&l&&(h=h.replace(nSe,"")),f&&(h=h.replace(/\r\n|\n|\r/g,function(y){return a})),h});return d}function aSe(t,e){for(var r="",n=0,s=t.length;n{},registerClassName:()=>{},onEndFileScope:()=>{},registerComposition:()=>{},markCompositionUsed:()=>{},getIdentOption:()=>"short"},qm=[lSe],du=()=>{if(qm.length<1)throw new Error("No adapter configured");return qm[qm.length-1]},_G=!1,fSe=t=>{_G||uSe(t)},uSe=t=>{if(!t)throw new Error('No adapter provided when calling "setAdapter"');_G=!0,qm.push(t)},aw=function(){return du().appendCss(...arguments)},PG=function(){return du().registerClassName(...arguments)},dSe=function(){return du().registerComposition(...arguments)},IG=function(){return du().markCompositionUsed(...arguments)},hSe=function(){for(var e,r,n=arguments.length,s=new Array(n),i=0;i{var{fileScope:e,css:r}=t,n=e.packageName?[e.packageName,e.filePath].join("/"):e.filePath,s=WT[n];if(!s){var i=document.createElement("style");e.packageName&&i.setAttribute("data-package",e.packageName),i.setAttribute("data-file",e.filePath),i.setAttribute("type","text/css"),s=WT[n]=i,document.head.appendChild(i)}s.innerHTML=r};function gSe(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}/*! https://mths.be/cssesc v3.0.0 by @mathias */var bSe={},xSe=bSe.hasOwnProperty,wSe=function(e,r){if(!e)return r;var n={};for(var s in r)n[s]=xSe.call(e,s)?e[s]:r[s];return n},CSe=/[ -,\.\/:-@\[-\^`\{-~]/,ESe=/[ -,\.\/:-@\[\]\^`\{-~]/,kSe=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,K9=function t(e,r){r=wSe(r,t.options),r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");for(var n=r.quotes=="double"?'"':"'",s=r.isIdentifier,i=e.charAt(0),o="",a=0,c=e.length;a126){if(f>=55296&&f<=56319&&a0;){const a=o.shift();if(a!==void 0)for(const c in r[a]){const l=r[a][c];o.push(l);let f=i[a];for(;f>0&&!(c in r[f]);)f=i[f];if(c in r[f]){const u=r[f][c];i[l]=u,n[l]=[...n[l],...n[u]]}else i[l]=0}}return{gotoFn:r,output:n,failure:i}}search(e){let r=0;const n=[];for(let s=0;s0&&!(i in this.gotoFn[r]);)r=this.failure[r];if(i in this.gotoFn[r]&&(r=this.gotoFn[r][i],this.output[r].length>0)){const o=this.output[r];n.push([s,o])}}return n}}var br;(function(t){t.Attribute="attribute",t.Pseudo="pseudo",t.PseudoElement="pseudo-element",t.Tag="tag",t.Universal="universal",t.Adjacent="adjacent",t.Child="child",t.Descendant="descendant",t.Parent="parent",t.Sibling="sibling",t.ColumnCombinator="column-combinator"})(br||(br={}));var ri;(function(t){t.Any="any",t.Element="element",t.End="end",t.Equals="equals",t.Exists="exists",t.Hyphen="hyphen",t.Not="not",t.Start="start"})(ri||(ri={}));const HT=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,ASe=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,$Se=new Map([[126,ri.Element],[94,ri.Start],[36,ri.End],[42,ri.Any],[33,ri.Not],[124,ri.Hyphen]]),_Se=new Set(["has","not","matches","is","where","host","host-context"]);function PSe(t){switch(t.type){case br.Adjacent:case br.Child:case br.Descendant:case br.Parent:case br.Sibling:case br.ColumnCombinator:return!0;default:return!1}}const ISe=new Set(["contains","icontains"]);function TSe(t,e,r){const n=parseInt(e,16)-65536;return n!==n||r?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320)}function Mh(t){return t.replace(ASe,TSe)}function E6(t){return t===39||t===34}function VT(t){return t===32||t===9||t===10||t===12||t===13}function OG(t){const e=[],r=RG(e,`${t}`,0);if(r0&&r0&&PSe(n[n.length-1]))throw new Error("Did not expect successive traversals.")}function l(d){if(n.length>0&&n[n.length-1].type===br.Descendant){n[n.length-1].type=d;return}c(),n.push({type:d})}function f(d,h){n.push({type:br.Attribute,name:d,action:h,value:s(1),namespace:null,ignoreCase:"quirks"})}function u(){if(n.length&&n[n.length-1].type===br.Descendant&&n.pop(),n.length===0)throw new Error("Empty sub-selector");t.push(n)}if(i(0),e.length===r)return r;e:for(;r=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xr(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),s,i=[],o;try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i}var RSe=/(\u000D|\u000C|\u000D\u000A)/g,MSe=/[\u0000\uD800-\uDFFF]/g,NSe=/(\/\*)[\s\S]*?(\*\/)/g,jSe=function(e,r){r===void 0&&(r=0),e=e.replace(RSe,` +`).replace(MSe,"�"),e=e.replace(NSe,"");for(var n=[];r"})}else if(s===34){var o=GT(e,r);if(o===null)return null;var a=Xr(o,2),c=a[0],l=a[1];n.push({type:"",value:l}),r=c}else if(s===35){if(r+1=65&&f<=90||f>=97&&f<=122||f>=128||f>=48&&f<=57||f===92&&r+2",value:l.toLowerCase(),flag:u}),r=c;continue}}}n.push({type:"",value:s})}else if(s===39){var o=GT(e,r);if(o===null)return null;var h=Xr(o,2),c=h[0],l=h[1];n.push({type:"",value:l}),r=c}else if(s===40)n.push({type:"<(-token>"});else if(s===41)n.push({type:"<)-token>"});else if(s===43){var v=Hp(e,r);if(v===null)n.push({type:"",value:s});else{var y=Xr(v,2),c=y[0],m=y[1];m[0]===""?n.push({type:"",value:m[1],unit:m[2].toLowerCase(),flag:"number"}):m[0]===""?n.push({type:m[0],value:m[1],flag:m[2]}):n.push({type:m[0],value:m[1],flag:"number"}),r=c}}else if(s===44)n.push({type:""});else if(s===45){var g=Hp(e,r);if(g!==null){var b=Xr(g,2),c=b[0],m=b[1];m[0]===""?n.push({type:"",value:m[1],unit:m[2].toLowerCase(),flag:"number"}):m[0]===""?n.push({type:m[0],value:m[1],flag:m[2]}):n.push({type:m[0],value:m[1],flag:"number"}),r=c;continue}if(r+2"}),r+=2;continue}}var o=KT(e,r);if(o!==null){var k=Xr(o,3),c=k[0],l=k[1],$=k[2];n.push({type:$,value:l}),r=c;continue}n.push({type:"",value:s})}else if(s===46){var g=Hp(e,r);if(g===null)n.push({type:"",value:s});else{var I=Xr(g,2),c=I[0],m=I[1];m[0]===""?n.push({type:"",value:m[1],unit:m[2].toLowerCase(),flag:"number"}):m[0]===""?n.push({type:m[0],value:m[1],flag:m[2]}):n.push({type:m[0],value:m[1],flag:"number"}),r=c;continue}}else if(s===58)n.push({type:""});else if(s===59)n.push({type:""});else if(s===60){if(r+3"}),r+=3;continue}}n.push({type:"",value:s})}else if(s===64){var o=Y9(e,r+1);if(o!==null){var D=Xr(o,2),c=D[0],l=D[1];n.push({type:"",value:l.toLowerCase()}),r=c;continue}n.push({type:"",value:s})}else if(s===91)n.push({type:"<[-token>"});else if(s===92){var o=Oy(e,r);if(o===null)return null;var H=Xr(o,2),c=H[0],l=H[1];e=e.slice(0,r)+l+e.slice(c+1),r-=1}else if(s===93)n.push({type:"<]-token>"});else if(s===123)n.push({type:"<{-token>"});else if(s===125)n.push({type:"<}-token>"});else if(s>=48&&s<=57){var o=Hp(e,r),G=Xr(o,2),c=G[0],m=G[1];m[0]===""?n.push({type:"",value:m[1],unit:m[2].toLowerCase(),flag:"number"}):m[0]===""?n.push({type:m[0],value:m[1],flag:m[2]}):n.push({type:m[0],value:m[1],flag:"number"}),r=c}else if(s===95||s>=65&&s<=90||s>=97&&s<=122||s>=128){var o=KT(e,r);if(o===null)return null;var V=Xr(o,3),c=V[0],l=V[1],$=V[2];n.push({type:$,value:l}),r=c}else n.push({type:"",value:s})}return n.push({type:""}),n},GT=function(e,r){if(e.length<=r+1)return null;for(var n=e.charCodeAt(r),s=[],i=r+1;i=65&&s<=90||s>=97&&s<=122||s>=128)return!0;if(s===92){if(e.length<=r+2)return!1;var i=e.charCodeAt(r+2);return i!==10}else return!1}else{if(n===95||n>=65&&n<=90||n>=97&&n<=122||n>=128)return!0;if(n===92){if(e.length<=r+1)return!1;var s=e.charCodeAt(r+1);return s!==10}else return!1}},Oy=function(e,r){if(e.length<=r+1||e.charCodeAt(r)!==92)return null;var n=e.charCodeAt(r+1);if(n===10)return null;if(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102){for(var s=[n],i=Math.min(r+7,e.length),o=r+2;o=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102)s.push(a);else break}if(o",o,u]]}return i+1",o]]:[i,["",o,a]]},DSe=function(e,r){if(e.length<=r)return null;var n="integer",s=[],i=e.charCodeAt(r);for((i===43||i===45)&&(r+=1,i===45&&s.push(45));r=48&&o<=57)s.push(o),r+=1;else break}if(r+1=48&&c<=57)for(s.push(a,c),n="number",r+=2;r=48&&o<=57)s.push(o),r+=1;else break}}if(r+1=48&&c<=57;if(f||(c===43||c===45)&&l>=48&&l<=57)for(n="number",f?(s.push(69,c),r+=2):c===45?(s.push(69,45,l),r+=3):(s.push(69,l),r+=3);r=48&&o<=57)s.push(o),r+=1;else break}}}var u=String.fromCharCode.apply(null,s),d=n==="number"?parseFloat(u):parseInt(u);return d===-0&&(d=0),Number.isNaN(d)?null:[r-1,d,n]},LSe=function(e,r){if(e.length<=r)return null;for(var n=[],s=e.charCodeAt(r);r=65&&s<=90||s>=97&&s<=122||s>=128||s>=48&&s<=57){n.push(s);continue}else{var i=Oy(e,r);if(i!==null){var o=Xr(i,2),a=o[0],c=o[1];n.push(c),r=a;continue}}break}return r===0?null:[r-1,String.fromCharCode.apply(null,n)]},Y9=function(e,r){if(e.length<=r||!MG(e,r))return null;for(var n=[],s=e.charCodeAt(r);r=65&&s<=90||s>=97&&s<=122||s>=128||s>=48&&s<=57){n.push(s);continue}else{var i=Oy(e,r);if(i!==null){var o=Xr(i,2),a=o[0],c=o[1];n.push(c),r=a;continue}}break}return[r-1,String.fromCharCode.apply(null,n)]},BSe=function(e,r){for(var n=e.charCodeAt(r);n===9||n===32||n===10;)n=e.charCodeAt(++r);for(var s=[],i=!1;ri+1){var a=e.charCodeAt(i+1);if(a===40){for(var c=2;i+c"];if(l!==9&&l!==32&&l!==10){var f=BSe(e,i+c);if(f===null)return null;var u=Xr(f,2),d=u[0],h=u[1];return[d,h,""]}}return[i+1,o.toLowerCase(),""]}}}else if(e.length>i+1){var a=e.charCodeAt(i+1);if(a===40)return[i+1,o.toLowerCase(),""]}return[i,o.toLowerCase(),""]},FSe=function(e){for(var r=e.length-1;r>=0;r--)e[r]=zSe(e[r]);return e},zSe=function(e){if(e.mediaCondition===null)return e;var r=qSe(e.mediaCondition);return r.operator===null&&r.children.length===1&&"children"in r.children[0]&&(r=r.children[0]),{mediaPrefix:e.mediaPrefix,mediaType:e.mediaType,mediaCondition:r}},qSe=function t(e){for(var r=e.children.length-1;r>=0;r--){var n=e.children[r];if(!("context"in n)){var s=t(n);if(s.operator===null&&s.children.length===1)e.children[r]=s.children[0];else if(s.operator===e.operator&&(s.operator==="and"||s.operator==="or")){for(var i=[r,1],o=0;o"&&r[0].value==="media"){if(r[1].type!=="")throw ns("Expected whitespace after media");n=2;for(var i=2;i"){s=i;break}else if(o.type==="")throw ns("Expected '{' in media query but found ';'")}}return r=r.slice(n,s),HSe(r)},WSe=function(e){for(var r=[],n=!1,s=0;s"?(n=!0,r.length>0&&(r[r.length-1].wsAfter=!0)):(r.push(jb(jb({},e[s]),{wsBefore:n,wsAfter:!1})),n=!1);return r},HSe=function(e){for(var r,n,s=[[]],i=0;i"?s.push([]):s[s.length-1].push(o)}var a=s.map(WSe);if(a.length===1&&a[0].length===0)return[{mediaCondition:null,mediaPrefix:null,mediaType:"all"}];var c=a.map(function(h){return h.length===0?null:VSe(h)}),l=[];try{for(var f=OSe(c),u=f.next();!u.done;u=f.next()){var d=u.value;d!==null&&l.push(d)}}catch(h){r={error:h}}finally{try{u&&!u.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}if(l.length===0)throw ns("No valid media queries");return l},VSe=function(e){var r=e[0];if(r.type==="<(-token>")try{return{mediaPrefix:null,mediaType:"all",mediaCondition:k6(e,!0)}}catch(u){throw ns("Expected media condition after '('",u)}else if(r.type===""){var n=null,s=void 0,i=r.value;(i==="only"||i==="not")&&(n=i);var o=n===null?0:1;if(e.length<=o)throw ns("Expected extra token in media query");var a=e[o];if(a.type===""){var c=a.value;if(c==="all")s="all";else if(c==="print"||c==="screen")s=c;else if(c==="tty"||c==="tv"||c==="projection"||c==="handheld"||c==="braille"||c==="embossed"||c==="aural"||c==="speech")n=n==="not"?null:"not",s="all";else throw ns("Unknown ident '".concat(c,"' in media query"))}else if(n==="not"&&a.type==="<(-token>"){var l=[{type:"<(-token>",wsBefore:!1,wsAfter:!1}];l.push.apply(l,e),l.push({type:"<)-token>",wsBefore:!1,wsAfter:!1});try{return{mediaPrefix:null,mediaType:"all",mediaCondition:k6(l,!0)}}catch(u){throw ns("Expected media condition after '('",u)}}else throw ns("Invalid media query");if(o+1===e.length)return{mediaPrefix:n,mediaType:s,mediaCondition:null};if(o+4"&&f.value==="and")try{return{mediaPrefix:n,mediaType:s,mediaCondition:k6(e.slice(o+2),!1)}}catch(u){throw ns("Expected media condition after 'and'",u)}else throw ns("Expected 'and' after media prefix")}else throw ns("Expected media condition after media prefix")}else throw ns("Expected media condition or media prefix")},k6=function t(e,r,n){if(n===void 0&&(n=null),e.length<3||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid media condition");for(var s=e.length-1,i=0,o=0,a=0;a"?(o+=1,i=Math.max(i,o)):c.type==="<)-token>"&&(o-=1),o===0){s=a;break}}if(o!==0)throw new Error(`Mismatched parens +Invalid media condition`);var l,f=e.slice(0,s+1);if(i===1?l=GSe(f):f[1].type===""&&f[1].value==="not"?l=t(f.slice(2,-1),!0,"not"):l=t(f.slice(1,-1),!0),s===e.length-1)return{operator:n,children:[l]};var u=e[s+1];if(u.type!=="")throw new Error(`Invalid operator +Invalid media condition`);if(n!==null&&n!==u.value)throw new Error("'".concat(u.value,"' and '").concat(n,`' must not be at same level +Invalid media condition`));if(u.value==="or"&&!r)throw new Error(`Cannot use 'or' at top level of a media query +Invalid media condition`);if(u.value!=="and"&&u.value!=="or")throw new Error("Invalid operator: '".concat(u.value,`' +Invalid media condition`));var d=t(e.slice(s+2),r,u.value);return{operator:u.value,children:[l].concat(d.children)}},GSe=function(e){if(e.length<3||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid media feature");for(var r=[e[0]],n=1;n"&&s.value>0&&i.type===""&&i.value===47&&o.type===""&&o.value>0){r.push({type:"",numerator:s.value,denominator:o.value,wsBefore:s.wsBefore,wsAfter:o.wsAfter}),n+=2;continue}}r.push(e[n])}var a=r[1];if(a.type===""&&r.length===3)return{context:"boolean",feature:a.value};if(r.length===5&&r[1].type===""&&r[2].type===""){var c=r[3];if(c.type===""||c.type===""||c.type===""||c.type===""){var l=r[1].value,f=null,u=l.slice(0,4);u==="min-"?(f="min",l=l.slice(4)):u==="max-"&&(f="max",l=l.slice(4)),c.wsBefore,c.wsAfter;var d=Z8(c,["wsBefore","wsAfter"]);return{context:"value",prefix:f,feature:l,value:d}}}else if(r.length>=5)try{var h=KSe(r);return{context:"range",feature:h.featureName,range:h}}catch(v){throw ns("Invalid media feature",v)}throw new Error("Invalid media feature")},KSe=function(e){var r,n,s,i;if(e.length<5||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid range");var o={leftToken:null,leftOp:null,featureName:"",rightOp:null,rightToken:null},a=e[1].type===""||e[1].type===""||e[1].type===""||e[1].type===""&&e[1].value==="infinite";if(e[2].type===""){if(e[2].value===60)e[3].type===""&&e[3].value===61&&!e[3].wsBefore?o[a?"leftOp":"rightOp"]="<=":o[a?"leftOp":"rightOp"]="<";else if(e[2].value===62)e[3].type===""&&e[3].value===61&&!e[3].wsBefore?o[a?"leftOp":"rightOp"]=">=":o[a?"leftOp":"rightOp"]=">";else if(e[2].value===61)o[a?"leftOp":"rightOp"]="=";else throw new Error("Invalid range");if(a)o.leftToken=e[1];else if(e[1].type==="")o.featureName=e[1].value;else throw new Error("Invalid range");var c=2+((n=(r=o[a?"leftOp":"rightOp"])===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0),l=e[c];if(a)if(l.type===""){if(o.featureName=l.value,e.length>=7){var f=e[c+1],u=e[c+2];if(f.type===""){var d=f.value;if(d===60)u.type===""&&u.value===61&&!u.wsBefore?o.rightOp="<=":o.rightOp="<";else if(d===62)u.type===""&&u.value===61&&!u.wsBefore?o.rightOp=">=":o.rightOp=">";else throw new Error("Invalid range");var h=e[c+1+((i=(s=o.rightOp)===null||s===void 0?void 0:s.length)!==null&&i!==void 0?i:0)];o.rightToken=h}else throw new Error("Invalid range")}else if(c+2!==e.length)throw new Error("Invalid range")}else throw new Error("Invalid range");else o.rightToken=l;var v=null,y=o.leftToken,m=o.leftOp,g=o.featureName,b=o.rightOp,x=o.rightToken,k=null;if(y!==null){if(y.type===""){var $=y.type,I=y.value;I==="infinite"&&(k={type:$,value:I})}else if(y.type===""||y.type===""||y.type===""){y.wsBefore,y.wsAfter;var M=Z8(y,["wsBefore","wsAfter"]);k=M}}var D=null;if(x!==null){if(x.type===""){var $=x.type,I=x.value;I==="infinite"&&(D={type:$,value:I})}else if(x.type===""||x.type===""||x.type===""){x.wsBefore,x.wsAfter;var H=Z8(x,["wsBefore","wsAfter"]);D=H}}if(k!==null&&D!==null)if((m==="<"||m==="<=")&&(b==="<"||b==="<="))v={leftToken:k,leftOp:m,featureName:g,rightOp:b,rightToken:D};else if((m===">"||m===">=")&&(b===">"||b===">="))v={leftToken:k,leftOp:m,featureName:g,rightOp:b,rightToken:D};else throw new Error("Invalid range");else k===null&&m===null&&b!==null&&D!==null?v={leftToken:k,leftOp:m,featureName:g,rightOp:b,rightToken:D}:k!==null&&m!==null&&b===null&&D===null&&(v={leftToken:k,leftOp:m,featureName:g,rightOp:b,rightToken:D});return v}else throw new Error("Invalid range")};function YSe(t,e){if(typeof t!="object"||!t)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 QSe(t){var e=YSe(t,"string");return typeof e=="symbol"?e:String(e)}function JSe(t,e,r){return e=QSe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function YT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function A0(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}function QT(t,e){if(t==null)return{};var r=XSe(t,e),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Nh(t,e){for(var r in t)e(t[r],r)}function Ou(t,e){var r={};for(var n in t)e.indexOf(n)===-1&&(r[n]=t[n]);return r}function ZSe(t,e){var r={};for(var n in t)r[e(t[n],n)]=t[n];return r}function eE(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n{var r=()=>{var s=new RegExp(".".concat(tAe(eh(e,{isIdentifier:!0}))),"g");return t.replace(s,"&")},n;try{n=OG(t)}catch{throw new Error("Invalid selector: ".concat(r()))}n.forEach(s=>{try{for(var i=s.length-1;i>=-1;i--){if(!s[i])throw new Error;var o=s[i];if(o.type==="child"||o.type==="parent"||o.type==="sibling"||o.type==="adjacent"||o.type==="descendant")throw new Error;if(o.type==="attribute"&&o.name==="class"&&o.value===e)return}}catch{throw new Error($s(JT||(JT=W9([` + Invalid selector: `,` + + Style selectors must target the '&' character (along with any modifiers), e.g. `," or ",`. + + This is to ensure that each style block only affects the styling of a single class. + + If your selector is targeting another class, you should move it to the style definition for that class, e.g. given we have styles for 'parent' and 'child' elements, instead of adding a selector of `,") to 'parent', you should add ",` to 'child'). + + If your selector is targeting something global, use the 'globalStyle' function instead, e.g. if you wanted to write `,", you should instead write 'globalStyle(",`, { ... })' + `])),r(),"`${parent} &`","`${parent} &:hover`","`& ${child}`","`${parent} &`","`& h1`","`${parent} h1`"))}})};let XT=class jG{constructor(){this.ruleset=new Map,this.precedenceLookup=new Map}findOrCreateCondition(e){var r=this.ruleset.get(e);return r||(r={query:e,rules:[],children:new jG},this.ruleset.set(e,r)),r}getConditionalRulesetByPath(e){var r=this;for(var n of e){var s=r.findOrCreateCondition(n);r=s.children}return r}addRule(e,r,n){var s=this.getConditionalRulesetByPath(n),i=s.findOrCreateCondition(r);if(!i)throw new Error("Failed to add conditional rule");i.rules.push(e)}addConditionPrecedence(e,r){for(var n=this.getConditionalRulesetByPath(e),s=0;sa.has(f.query));l>-1?r.splice(l,0,c):r.push(c)};for(var[s,i]of this.precedenceLookup.entries())n(i);return r}renderToArray(){var e=[];for(var{query:r,rules:n,children:s}of this.getSortedRuleset()){var i={};for(var o of n)i[o.selector]=o.rule;Object.assign(i,...s.renderToArray()),e.push({[r]:i})}return e}};var DG={":-moz-any-link":!0,":-moz-full-screen":!0,":-moz-placeholder":!0,":-moz-read-only":!0,":-moz-read-write":!0,":-ms-fullscreen":!0,":-ms-input-placeholder":!0,":-webkit-any-link":!0,":-webkit-full-screen":!0,"::-moz-color-swatch":!0,"::-moz-list-bullet":!0,"::-moz-list-number":!0,"::-moz-page-sequence":!0,"::-moz-page":!0,"::-moz-placeholder":!0,"::-moz-progress-bar":!0,"::-moz-range-progress":!0,"::-moz-range-thumb":!0,"::-moz-range-track":!0,"::-moz-scrolled-page-sequence":!0,"::-moz-selection":!0,"::-ms-backdrop":!0,"::-ms-browse":!0,"::-ms-check":!0,"::-ms-clear":!0,"::-ms-fill-lower":!0,"::-ms-fill-upper":!0,"::-ms-fill":!0,"::-ms-reveal":!0,"::-ms-thumb":!0,"::-ms-ticks-after":!0,"::-ms-ticks-before":!0,"::-ms-tooltip":!0,"::-ms-track":!0,"::-ms-value":!0,"::-webkit-backdrop":!0,"::-webkit-inner-spin-button":!0,"::-webkit-input-placeholder":!0,"::-webkit-meter-bar":!0,"::-webkit-meter-even-less-good-value":!0,"::-webkit-meter-inner-element":!0,"::-webkit-meter-optimum-value":!0,"::-webkit-meter-suboptimum-value":!0,"::-webkit-outer-spin-button":!0,"::-webkit-progress-bar":!0,"::-webkit-progress-inner-element":!0,"::-webkit-progress-inner-value":!0,"::-webkit-progress-value":!0,"::-webkit-resizer":!0,"::-webkit-scrollbar-button":!0,"::-webkit-scrollbar-corner":!0,"::-webkit-scrollbar-thumb":!0,"::-webkit-scrollbar-track-piece":!0,"::-webkit-scrollbar-track":!0,"::-webkit-scrollbar":!0,"::-webkit-search-cancel-button":!0,"::-webkit-search-results-button":!0,"::-webkit-slider-runnable-track":!0,"::-webkit-slider-thumb":!0,"::after":!0,"::backdrop":!0,"::before":!0,"::cue":!0,"::file-selector-button":!0,"::first-letter":!0,"::first-line":!0,"::grammar-error":!0,"::marker":!0,"::placeholder":!0,"::selection":!0,"::spelling-error":!0,"::target-text":!0,"::view-transition-group":!0,"::view-transition-image-pair":!0,"::view-transition-new":!0,"::view-transition-old":!0,"::view-transition":!0,":active":!0,":after":!0,":any-link":!0,":before":!0,":blank":!0,":checked":!0,":default":!0,":defined":!0,":disabled":!0,":empty":!0,":enabled":!0,":first-child":!0,":first-letter":!0,":first-line":!0,":first-of-type":!0,":first":!0,":focus-visible":!0,":focus-within":!0,":focus":!0,":fullscreen":!0,":hover":!0,":in-range":!0,":indeterminate":!0,":invalid":!0,":last-child":!0,":last-of-type":!0,":left":!0,":link":!0,":only-child":!0,":only-of-type":!0,":optional":!0,":out-of-range":!0,":placeholder-shown":!0,":read-only":!0,":read-write":!0,":required":!0,":right":!0,":root":!0,":scope":!0,":target":!0,":valid":!0,":visited":!0},nAe=Object.keys(DG),sAe=DG,ZT,eO=(t,e)=>new Error($s(ZT||(ZT=W9([` + Invalid media query: "`,`" + + `,` + + Read more on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries + `])),t,e)),iAe=t=>{if(t==="@media ")throw eO(t,"Query is empty");try{NG(t)}catch(e){throw eO(t,e.message)}},oAe=["vars"],aAe=["content"],LG="__DECLARATION",cAe={animationIterationCount:!0,borderImage:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,initialLetter:!0,lineClamp:!0,lineHeight:!0,maxLines:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,WebkitLineClamp:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,maskBorder:!0,maskBorderOutset:!0,maskBorderSlice:!0,maskBorderWidth:!0,shapeImageThreshold:!0,stopOpacity:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function lAe(t){return t.replace(/([A-Z])/g,"-$1").replace(/^ms-/,"-ms-").toLowerCase()}function fAe(t,e,r,n){var s=t.slice(0,e),i=t.slice(r);return"".concat(s).concat(n).concat(i)}var uAe=" ",Ru=[...nAe,"@layer","@media","@supports","@container","selectors"];let dAe=class{constructor(e,r){this.rules=[],this.conditionalRulesets=[new XT],this.fontFaceRules=[],this.keyframesRules=[],this.localClassNamesMap=new Map(e.map(n=>[n,n])),this.localClassNamesSearch=new TG(e),this.layers=new Map,this.composedClassLists=r.map(n=>{var{identifier:s,classList:i}=n;return{identifier:s,regex:RegExp("(".concat(i,")"),"g")}}).reverse()}processCssObj(e){if(e.type==="fontFace"){this.fontFaceRules.push(e.rule);return}if(e.type==="keyframes"){e.rule=Object.fromEntries(Object.entries(e.rule).map(i=>{var[o,a]=i;return[o,this.transformProperties(a)]})),this.keyframesRules.push(e);return}if(this.currConditionalRuleset=new XT,e.type==="layer"){var r="@layer ".concat(e.name);this.addLayer([r])}else{var n=Ou(e.rule,Ru);this.addRule({selector:e.selector,rule:n}),this.transformLayer(e,e.rule["@layer"]),this.transformMedia(e,e.rule["@media"]),this.transformSupports(e,e.rule["@supports"]),this.transformContainer(e,e.rule["@container"]),this.transformSimplePseudos(e,e.rule),this.transformSelectors(e,e.rule)}var s=this.conditionalRulesets[this.conditionalRulesets.length-1];s.mergeIfCompatible(this.currConditionalRuleset)||this.conditionalRulesets.push(this.currConditionalRuleset)}addConditionalRule(e,r){var n=this.transformVars(this.transformProperties(e.rule)),s=this.transformSelector(e.selector);if(!this.currConditionalRuleset)throw new Error("Couldn't add conditional rule");var i=r[r.length-1],o=r.slice(0,r.length-1);this.currConditionalRuleset.addRule({selector:s,rule:n},i,o)}addRule(e){var r=this.transformVars(this.transformProperties(e.rule)),n=this.transformSelector(e.selector);this.rules.push({selector:n,rule:r})}addLayer(e){var r=e.join(" - ");this.layers.set(r,e)}transformProperties(e){return this.transformContent(this.pixelifyProperties(e))}pixelifyProperties(e){return Nh(e,(r,n)=>{typeof r=="number"&&r!==0&&!cAe[n]&&(e[n]="".concat(r,"px"))}),e}transformVars(e){var{vars:r}=e,n=QT(e,oAe);return r?A0(A0({},ZSe(r,(s,i)=>gSe(i))),n):n}transformContent(e){var{content:r}=e,n=QT(e,aAe);if(typeof r>"u")return n;var s=Array.isArray(r)?r:[r];return A0({content:s.map(i=>i&&(i.includes('"')||i.includes("'")||/^([A-Za-z\-]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)(\s|$)/.test(i))?i:'"'.concat(i,'"'))},n)}transformClassname(e){return".".concat(eh(e,{isIdentifier:!0}))}transformSelector(e){var r=e,n=function(h){r=r.replace(i,()=>(IG(h),h))};for(var{identifier:s,regex:i}of this.composedClassLists)n(s);if(this.localClassNamesMap.has(r))return this.transformClassname(r);for(var o=this.localClassNamesSearch.search(r),a=r.length,c=o.length-1;c>=0;c--){var[l,[f]]=o[c],u=l-f.length+1;u>=a||(a=u,r[u-1]!=="."&&(r=fAe(r,u,l+1,this.transformClassname(f))))}return r}transformSelectors(e,r,n){Nh(r.selectors,(s,i)=>{if(e.type!=="local")throw new Error("Selectors are not allowed within ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));var o=this.transformSelector(i.replace(RegExp("&","g"),e.selector));rAe(o,e.selector);var a={selector:o,rule:Ou(s,Ru)};n?this.addConditionalRule(a,n):this.addRule(a);var c={type:"selector",selector:o,rule:s};this.transformLayer(c,s["@layer"],n),this.transformSupports(c,s["@supports"],n),this.transformMedia(c,s["@media"],n)})}transformMedia(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(l=>"@media ".concat(l)));for(var[i,o]of Object.entries(r)){var a="@media ".concat(i);iAe(a);var c=[...n,a];this.addConditionalRule({selector:e.selector,rule:Ou(o,Ru)},c),e.type==="local"&&(this.transformSimplePseudos(e,o,c),this.transformSelectors(e,o,c)),this.transformLayer(e,o["@layer"],c),this.transformSupports(e,o["@supports"],c),this.transformContainer(e,o["@container"],c)}}}transformContainer(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@container ".concat(i))),Nh(r,(i,o)=>{var a="@container ".concat(o),c=[...n,a];this.addConditionalRule({selector:e.selector,rule:Ou(i,Ru)},c),e.type==="local"&&(this.transformSimplePseudos(e,i,c),this.transformSelectors(e,i,c)),this.transformLayer(e,i["@layer"],c),this.transformSupports(e,i["@supports"],c),this.transformMedia(e,i["@media"],c)})}}transformLayer(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@layer ".concat(i))),Nh(r,(i,o)=>{var a=[...n,"@layer ".concat(o)];this.addLayer(a),this.addConditionalRule({selector:e.selector,rule:Ou(i,Ru)},a),e.type==="local"&&(this.transformSimplePseudos(e,i,a),this.transformSelectors(e,i,a)),this.transformMedia(e,i["@media"],a),this.transformSupports(e,i["@supports"],a),this.transformContainer(e,i["@container"],a)})}}transformSupports(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@supports ".concat(i))),Nh(r,(i,o)=>{var a=[...n,"@supports ".concat(o)];this.addConditionalRule({selector:e.selector,rule:Ou(i,Ru)},a),e.type==="local"&&(this.transformSimplePseudos(e,i,a),this.transformSelectors(e,i,a)),this.transformLayer(e,i["@layer"],a),this.transformMedia(e,i["@media"],a),this.transformContainer(e,i["@container"],a)})}}transformSimplePseudos(e,r,n){for(var s of Object.keys(r))if(sAe[s]){if(e.type!=="local")throw new Error("Simple pseudos are not valid in ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));n?this.addConditionalRule({selector:"".concat(e.selector).concat(s),rule:r[s]},n):this.addRule({conditions:n,selector:"".concat(e.selector).concat(s),rule:r[s]})}}toCss(){var e=[];for(var r of this.fontFaceRules)e.push(cf({"@font-face":r}));for(var n of this.keyframesRules)e.push(cf({["@keyframes ".concat(n.name)]:n.rule}));for(var s of this.layers.values()){var[i,...o]=s.reverse(),a={[i]:LG};for(var c of o)a={[c]:a};e.push(cf(a))}for(var l of this.rules)e.push(cf({[l.selector]:l.rule}));for(var f of this.conditionalRulesets)for(var u of f.renderToArray())e.push(cf(u));return e.filter(Boolean)}};function cf(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=[],n=function(o){var a=t[o];if(a&&Array.isArray(a))r.push(...a.map(l=>cf({[o]:l},e)));else if(a&&typeof a=="object"){var c=Object.keys(a).length===0;c||r.push("".concat(e).concat(o,` { +`).concat(cf(a,e+uAe),` +`).concat(e,"}"))}else a===LG?r.push("".concat(e).concat(o,";")):r.push("".concat(e).concat(o.startsWith("--")?o:lAe(o),": ").concat(a,";"))};for(var s of Object.keys(t))n(s);return r.join(` +`)}function hAe(t){var{localClassNames:e,cssObjs:r,composedClassLists:n}=t,s=new dAe(e,n);for(var i of r)s.processCssObj(i);return s.toCss()}function Q9(t){for(var e=0,r,n=0,s=t.length;s>=4;++n,s-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(s){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var J9={exports:{}},S6,tO;function vAe(){return tO||(tO=1,S6={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),S6}var A6,rO;function BG(){if(rO)return A6;rO=1;const t=vAe(),e={};for(const s of Object.keys(t))e[t[s]]=s;const r={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};A6=r;for(const s of Object.keys(r)){if(!("channels"in r[s]))throw new Error("missing channels property: "+s);if(!("labels"in r[s]))throw new Error("missing channel labels property: "+s);if(r[s].labels.length!==r[s].channels)throw new Error("channel and label counts mismatch: "+s);const{channels:i,labels:o}=r[s];delete r[s].channels,delete r[s].labels,Object.defineProperty(r[s],"channels",{value:i}),Object.defineProperty(r[s],"labels",{value:o})}r.rgb.hsl=function(s){const i=s[0]/255,o=s[1]/255,a=s[2]/255,c=Math.min(i,o,a),l=Math.max(i,o,a),f=l-c;let u,d;l===c?u=0:i===l?u=(o-a)/f:o===l?u=2+(a-i)/f:a===l&&(u=4+(i-o)/f),u=Math.min(u*60,360),u<0&&(u+=360);const h=(c+l)/2;return l===c?d=0:h<=.5?d=f/(l+c):d=f/(2-l-c),[u,d*100,h*100]},r.rgb.hsv=function(s){let i,o,a,c,l;const f=s[0]/255,u=s[1]/255,d=s[2]/255,h=Math.max(f,u,d),v=h-Math.min(f,u,d),y=function(m){return(h-m)/6/v+1/2};return v===0?(c=0,l=0):(l=v/h,i=y(f),o=y(u),a=y(d),f===h?c=a-o:u===h?c=1/3+i-a:d===h&&(c=2/3+o-i),c<0?c+=1:c>1&&(c-=1)),[c*360,l*100,h*100]},r.rgb.hwb=function(s){const i=s[0],o=s[1];let a=s[2];const c=r.rgb.hsl(s)[0],l=1/255*Math.min(i,Math.min(o,a));return a=1-1/255*Math.max(i,Math.max(o,a)),[c,l*100,a*100]},r.rgb.cmyk=function(s){const i=s[0]/255,o=s[1]/255,a=s[2]/255,c=Math.min(1-i,1-o,1-a),l=(1-i-c)/(1-c)||0,f=(1-o-c)/(1-c)||0,u=(1-a-c)/(1-c)||0;return[l*100,f*100,u*100,c*100]};function n(s,i){return(s[0]-i[0])**2+(s[1]-i[1])**2+(s[2]-i[2])**2}return r.rgb.keyword=function(s){const i=e[s];if(i)return i;let o=1/0,a;for(const c of Object.keys(t)){const l=t[c],f=n(s,l);f.04045?((i+.055)/1.055)**2.4:i/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;const c=i*.4124+o*.3576+a*.1805,l=i*.2126+o*.7152+a*.0722,f=i*.0193+o*.1192+a*.9505;return[c*100,l*100,f*100]},r.rgb.lab=function(s){const i=r.rgb.xyz(s);let o=i[0],a=i[1],c=i[2];o/=95.047,a/=100,c/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,c=c>.008856?c**(1/3):7.787*c+16/116;const l=116*a-16,f=500*(o-a),u=200*(a-c);return[l,f,u]},r.hsl.rgb=function(s){const i=s[0]/360,o=s[1]/100,a=s[2]/100;let c,l,f;if(o===0)return f=a*255,[f,f,f];a<.5?c=a*(1+o):c=a+o-a*o;const u=2*a-c,d=[0,0,0];for(let h=0;h<3;h++)l=i+1/3*-(h-1),l<0&&l++,l>1&&l--,6*l<1?f=u+(c-u)*6*l:2*l<1?f=c:3*l<2?f=u+(c-u)*(2/3-l)*6:f=u,d[h]=f*255;return d},r.hsl.hsv=function(s){const i=s[0];let o=s[1]/100,a=s[2]/100,c=o;const l=Math.max(a,.01);a*=2,o*=a<=1?a:2-a,c*=l<=1?l:2-l;const f=(a+o)/2,u=a===0?2*c/(l+c):2*o/(a+o);return[i,u*100,f*100]},r.hsv.rgb=function(s){const i=s[0]/60,o=s[1]/100;let a=s[2]/100;const c=Math.floor(i)%6,l=i-Math.floor(i),f=255*a*(1-o),u=255*a*(1-o*l),d=255*a*(1-o*(1-l));switch(a*=255,c){case 0:return[a,d,f];case 1:return[u,a,f];case 2:return[f,a,d];case 3:return[f,u,a];case 4:return[d,f,a];case 5:return[a,f,u]}},r.hsv.hsl=function(s){const i=s[0],o=s[1]/100,a=s[2]/100,c=Math.max(a,.01);let l,f;f=(2-o)*a;const u=(2-o)*c;return l=o*c,l/=u<=1?u:2-u,l=l||0,f/=2,[i,l*100,f*100]},r.hwb.rgb=function(s){const i=s[0]/360;let o=s[1]/100,a=s[2]/100;const c=o+a;let l;c>1&&(o/=c,a/=c);const f=Math.floor(6*i),u=1-a;l=6*i-f,f&1&&(l=1-l);const d=o+l*(u-o);let h,v,y;switch(f){default:case 6:case 0:h=u,v=d,y=o;break;case 1:h=d,v=u,y=o;break;case 2:h=o,v=u,y=d;break;case 3:h=o,v=d,y=u;break;case 4:h=d,v=o,y=u;break;case 5:h=u,v=o,y=d;break}return[h*255,v*255,y*255]},r.cmyk.rgb=function(s){const i=s[0]/100,o=s[1]/100,a=s[2]/100,c=s[3]/100,l=1-Math.min(1,i*(1-c)+c),f=1-Math.min(1,o*(1-c)+c),u=1-Math.min(1,a*(1-c)+c);return[l*255,f*255,u*255]},r.xyz.rgb=function(s){const i=s[0]/100,o=s[1]/100,a=s[2]/100;let c,l,f;return c=i*3.2406+o*-1.5372+a*-.4986,l=i*-.9689+o*1.8758+a*.0415,f=i*.0557+o*-.204+a*1.057,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,f=f>.0031308?1.055*f**(1/2.4)-.055:f*12.92,c=Math.min(Math.max(0,c),1),l=Math.min(Math.max(0,l),1),f=Math.min(Math.max(0,f),1),[c*255,l*255,f*255]},r.xyz.lab=function(s){let i=s[0],o=s[1],a=s[2];i/=95.047,o/=100,a/=108.883,i=i>.008856?i**(1/3):7.787*i+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;const c=116*o-16,l=500*(i-o),f=200*(o-a);return[c,l,f]},r.lab.xyz=function(s){const i=s[0],o=s[1],a=s[2];let c,l,f;l=(i+16)/116,c=o/500+l,f=l-a/200;const u=l**3,d=c**3,h=f**3;return l=u>.008856?u:(l-16/116)/7.787,c=d>.008856?d:(c-16/116)/7.787,f=h>.008856?h:(f-16/116)/7.787,c*=95.047,l*=100,f*=108.883,[c,l,f]},r.lab.lch=function(s){const i=s[0],o=s[1],a=s[2];let c;c=Math.atan2(a,o)*360/2/Math.PI,c<0&&(c+=360);const f=Math.sqrt(o*o+a*a);return[i,f,c]},r.lch.lab=function(s){const i=s[0],o=s[1],c=s[2]/360*2*Math.PI,l=o*Math.cos(c),f=o*Math.sin(c);return[i,l,f]},r.rgb.ansi16=function(s,i=null){const[o,a,c]=s;let l=i===null?r.rgb.hsv(s)[2]:i;if(l=Math.round(l/50),l===0)return 30;let f=30+(Math.round(c/255)<<2|Math.round(a/255)<<1|Math.round(o/255));return l===2&&(f+=60),f},r.hsv.ansi16=function(s){return r.rgb.ansi16(r.hsv.rgb(s),s[2])},r.rgb.ansi256=function(s){const i=s[0],o=s[1],a=s[2];return i===o&&o===a?i<8?16:i>248?231:Math.round((i-8)/247*24)+232:16+36*Math.round(i/255*5)+6*Math.round(o/255*5)+Math.round(a/255*5)},r.ansi16.rgb=function(s){let i=s%10;if(i===0||i===7)return s>50&&(i+=3.5),i=i/10.5*255,[i,i,i];const o=(~~(s>50)+1)*.5,a=(i&1)*o*255,c=(i>>1&1)*o*255,l=(i>>2&1)*o*255;return[a,c,l]},r.ansi256.rgb=function(s){if(s>=232){const l=(s-232)*10+8;return[l,l,l]}s-=16;let i;const o=Math.floor(s/36)/5*255,a=Math.floor((i=s%36)/6)/5*255,c=i%6/5*255;return[o,a,c]},r.rgb.hex=function(s){const o=(((Math.round(s[0])&255)<<16)+((Math.round(s[1])&255)<<8)+(Math.round(s[2])&255)).toString(16).toUpperCase();return"000000".substring(o.length)+o},r.hex.rgb=function(s){const i=s.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!i)return[0,0,0];let o=i[0];i[0].length===3&&(o=o.split("").map(u=>u+u).join(""));const a=parseInt(o,16),c=a>>16&255,l=a>>8&255,f=a&255;return[c,l,f]},r.rgb.hcg=function(s){const i=s[0]/255,o=s[1]/255,a=s[2]/255,c=Math.max(Math.max(i,o),a),l=Math.min(Math.min(i,o),a),f=c-l;let u,d;return f<1?u=l/(1-f):u=0,f<=0?d=0:c===i?d=(o-a)/f%6:c===o?d=2+(a-i)/f:d=4+(i-o)/f,d/=6,d%=1,[d*360,f*100,u*100]},r.hsl.hcg=function(s){const i=s[1]/100,o=s[2]/100,a=o<.5?2*i*o:2*i*(1-o);let c=0;return a<1&&(c=(o-.5*a)/(1-a)),[s[0],a*100,c*100]},r.hsv.hcg=function(s){const i=s[1]/100,o=s[2]/100,a=i*o;let c=0;return a<1&&(c=(o-a)/(1-a)),[s[0],a*100,c*100]},r.hcg.rgb=function(s){const i=s[0]/360,o=s[1]/100,a=s[2]/100;if(o===0)return[a*255,a*255,a*255];const c=[0,0,0],l=i%1*6,f=l%1,u=1-f;let d=0;switch(Math.floor(l)){case 0:c[0]=1,c[1]=f,c[2]=0;break;case 1:c[0]=u,c[1]=1,c[2]=0;break;case 2:c[0]=0,c[1]=1,c[2]=f;break;case 3:c[0]=0,c[1]=u,c[2]=1;break;case 4:c[0]=f,c[1]=0,c[2]=1;break;default:c[0]=1,c[1]=0,c[2]=u}return d=(1-o)*a,[(o*c[0]+d)*255,(o*c[1]+d)*255,(o*c[2]+d)*255]},r.hcg.hsv=function(s){const i=s[1]/100,o=s[2]/100,a=i+o*(1-i);let c=0;return a>0&&(c=i/a),[s[0],c*100,a*100]},r.hcg.hsl=function(s){const i=s[1]/100,a=s[2]/100*(1-i)+.5*i;let c=0;return a>0&&a<.5?c=i/(2*a):a>=.5&&a<1&&(c=i/(2*(1-a))),[s[0],c*100,a*100]},r.hcg.hwb=function(s){const i=s[1]/100,o=s[2]/100,a=i+o*(1-i);return[s[0],(a-i)*100,(1-a)*100]},r.hwb.hcg=function(s){const i=s[1]/100,a=1-s[2]/100,c=a-i;let l=0;return c<1&&(l=(a-c)/(1-c)),[s[0],c*100,l*100]},r.apple.rgb=function(s){return[s[0]/65535*255,s[1]/65535*255,s[2]/65535*255]},r.rgb.apple=function(s){return[s[0]/255*65535,s[1]/255*65535,s[2]/255*65535]},r.gray.rgb=function(s){return[s[0]/100*255,s[0]/100*255,s[0]/100*255]},r.gray.hsl=function(s){return[0,0,s[0]]},r.gray.hsv=r.gray.hsl,r.gray.hwb=function(s){return[0,100,s[0]]},r.gray.cmyk=function(s){return[0,0,0,s[0]]},r.gray.lab=function(s){return[s[0],0,0]},r.gray.hex=function(s){const i=Math.round(s[0]/100*255)&255,a=((i<<16)+(i<<8)+i).toString(16).toUpperCase();return"000000".substring(a.length)+a},r.rgb.gray=function(s){return[(s[0]+s[1]+s[2])/3/255*100]},A6}var $6,nO;function yAe(){if(nO)return $6;nO=1;const t=BG();function e(){const i={},o=Object.keys(t);for(let a=o.length,c=0;c1&&(c=l),o(c))};return"conversion"in o&&(a.conversion=o.conversion),a}function i(o){const a=function(...c){const l=c[0];if(l==null)return l;l.length>1&&(c=l);const f=o(c);if(typeof f=="object")for(let u=f.length,d=0;d{r[o]={},Object.defineProperty(r[o],"channels",{value:t[o].channels}),Object.defineProperty(r[o],"labels",{value:t[o].labels});const a=e(o);Object.keys(a).forEach(l=>{const f=a[l];r[o][l]=i(f),r[o][l].raw=s(f)})}),_6=r,_6}J9.exports;(function(t){const e=(f,u)=>(...d)=>`\x1B[${f(...d)+u}m`,r=(f,u)=>(...d)=>{const h=f(...d);return`\x1B[${38+u};5;${h}m`},n=(f,u)=>(...d)=>{const h=f(...d);return`\x1B[${38+u};2;${h[0]};${h[1]};${h[2]}m`},s=f=>f,i=(f,u,d)=>[f,u,d],o=(f,u,d)=>{Object.defineProperty(f,u,{get:()=>{const h=d();return Object.defineProperty(f,u,{value:h,enumerable:!0,configurable:!0}),h},enumerable:!0,configurable:!0})};let a;const c=(f,u,d,h)=>{a===void 0&&(a=pAe());const v=h?10:0,y={};for(const[m,g]of Object.entries(a)){const b=m==="ansi16"?"ansi":m;m===u?y[b]=f(d,v):typeof g=="object"&&(y[b]=f(g[u],v))}return y};function l(){const f=new Map,u={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};u.color.gray=u.color.blackBright,u.bgColor.bgGray=u.bgColor.bgBlackBright,u.color.grey=u.color.blackBright,u.bgColor.bgGrey=u.bgColor.bgBlackBright;for(const[d,h]of Object.entries(u)){for(const[v,y]of Object.entries(h))u[v]={open:`\x1B[${y[0]}m`,close:`\x1B[${y[1]}m`},h[v]=u[v],f.set(y[0],y[1]);Object.defineProperty(u,d,{value:h,enumerable:!1})}return Object.defineProperty(u,"codes",{value:f,enumerable:!1}),u.color.close="\x1B[39m",u.bgColor.close="\x1B[49m",o(u.color,"ansi",()=>c(e,"ansi16",s,!1)),o(u.color,"ansi256",()=>c(r,"ansi256",s,!1)),o(u.color,"ansi16m",()=>c(n,"rgb",i,!1)),o(u.bgColor,"ansi",()=>c(e,"ansi16",s,!0)),o(u.bgColor,"ansi256",()=>c(r,"ansi256",s,!0)),o(u.bgColor,"ansi16m",()=>c(n,"rgb",i,!0)),u}Object.defineProperty(t,"exports",{enumerable:!0,get:l})})(J9);var mAe=J9.exports,gAe={stdout:!1,stderr:!1};const bAe=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;const s=e.length;let i=0,o="";do o+=t.substr(i,n-i)+e+r,i=n+s,n=t.indexOf(e,i);while(n!==-1);return o+=t.substr(i),o},xAe=(t,e,r,n)=>{let s=0,i="";do{const o=t[n-1]==="\r";i+=t.substr(s,(o?n-1:n)-s)+e+(o?`\r +`:` +`)+r,s=n+1,n=t.indexOf(` +`,s)}while(n!==-1);return i+=t.substr(s),i};var wAe={stringReplaceAll:bAe,stringEncaseCRLFWithFirstIndex:xAe},P6,iO;function CAe(){if(iO)return P6;iO=1;const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,e=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,r=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,n=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,s=new Map([["n",` +`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function i(l){const f=l[0]==="u",u=l[1]==="{";return f&&!u&&l.length===5||l[0]==="x"&&l.length===3?String.fromCharCode(parseInt(l.slice(1),16)):f&&u?String.fromCodePoint(parseInt(l.slice(2,-1),16)):s.get(l)||l}function o(l,f){const u=[],d=f.trim().split(/\s*,\s*/g);let h;for(const v of d){const y=Number(v);if(!Number.isNaN(y))u.push(y);else if(h=v.match(r))u.push(h[2].replace(n,(m,g,b)=>g?i(g):b));else throw new Error(`Invalid Chalk template style argument: ${v} (in style '${l}')`)}return u}function a(l){e.lastIndex=0;const f=[];let u;for(;(u=e.exec(l))!==null;){const d=u[1];if(u[2]){const h=o(d,u[2]);f.push([d].concat(h))}else f.push([d])}return f}function c(l,f){const u={};for(const h of f)for(const v of h.styles)u[v[0]]=h.inverse?null:v.slice(1);let d=l;for(const[h,v]of Object.entries(u))if(Array.isArray(v)){if(!(h in d))throw new Error(`Unknown Chalk style: ${h}`);d=v.length>0?d[h](...v):d[h]}return d}return P6=(l,f)=>{const u=[],d=[];let h=[];if(f.replace(t,(v,y,m,g,b,x)=>{if(y)h.push(i(y));else if(g){const k=h.join("");h=[],d.push(u.length===0?k:c(l,u)(k)),u.push({inverse:m,styles:a(g)})}else if(b){if(u.length===0)throw new Error("Found extraneous } in Chalk template literal");d.push(c(l,u)(h.join(""))),h=[],u.pop()}else h.push(x)}),d.push(h.join("")),u.length>0){const v=`Chalk template literal is missing ${u.length} closing bracket${u.length===1?"":"s"} (\`}\`)`;throw new Error(v)}return d.join("")},P6}const Dv=mAe,{stdout:tE,stderr:rE}=gAe,{stringReplaceAll:EAe,stringEncaseCRLFWithFirstIndex:kAe}=wAe,{isArray:Db}=Array,FG=["ansi","ansi","ansi256","ansi16m"],th=Object.create(null),SAe=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const r=tE?tE.level:0;t.level=e.level===void 0?r:e.level};class AAe{constructor(e){return zG(e)}}const zG=t=>{const e={};return SAe(e,t),e.template=(...r)=>UG(e.template,...r),Object.setPrototypeOf(e,cw.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=AAe,e.template};function cw(t){return zG(t)}for(const[t,e]of Object.entries(Dv))th[t]={get(){const r=lw(this,X9(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};th.visible={get(){const t=lw(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};const qG=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const t of qG)th[t]={get(){const{level:e}=this;return function(...r){const n=X9(Dv.color[FG[e]][t](...r),Dv.color.close,this._styler);return lw(this,n,this._isEmpty)}}};for(const t of qG){const e="bg"+t[0].toUpperCase()+t.slice(1);th[e]={get(){const{level:r}=this;return function(...n){const s=X9(Dv.bgColor[FG[r]][t](...n),Dv.bgColor.close,this._styler);return lw(this,s,this._isEmpty)}}}}const $Ae=Object.defineProperties(()=>{},{...th,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),X9=(t,e,r)=>{let n,s;return r===void 0?(n=t,s=e):(n=r.openAll+t,s=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:s,parent:r}},lw=(t,e,r)=>{const n=(...s)=>Db(s[0])&&Db(s[0].raw)?oO(n,UG(n,...s)):oO(n,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(n,$Ae),n._generator=t,n._styler=e,n._isEmpty=r,n},oO=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;const{openAll:n,closeAll:s}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=EAe(e,r.close,r.open),r=r.parent;const i=e.indexOf(` +`);return i!==-1&&(e=kAe(e,s,n,i)),n+e+s};let I6;const UG=(t,...e)=>{const[r]=e;if(!Db(r)||!Db(r.raw))return e.join(" ");const n=e.slice(1),s=[r.raw[0]];for(let i=1;i{T6.push(t)},registerClassName:t=>{cO.add(t)},registerComposition:t=>{lO.push(t)},markCompositionUsed:()=>{},onEndFileScope:t=>{var e=hAe({localClassNames:Array.from(cO),composedClassLists:lO,cssObjs:T6}).join(` +`);mSe({fileScope:t,css:e}),T6=[]},getIdentOption:()=>"short"};fSe(qAe);function Lb(t,e){return Lb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},Lb(t,e)}function UAe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lb(t,e)}function nE(){nE=function(s,i){return new r(s,void 0,i)};var t=RegExp.prototype,e=new WeakMap;function r(s,i,o){var a=new RegExp(s,i);return e.set(a,o||e.get(s)),Lb(a,r.prototype)}function n(s,i){var o=e.get(i);return Object.keys(o).reduce(function(a,c){var l=o[c];if(typeof l=="number")a[c]=s[l];else{for(var f=0;s[l[f]]===void 0&&f+1]+)>/g,function(c,l){var f=o[l];return"$"+(Array.isArray(f)?f.join("$"):f)}))}if(typeof i=="function"){var a=this;return t[Symbol.replace].call(this,s,function(){var c=arguments;return typeof c[c.length-1]!="object"&&(c=[].slice.call(c)).push(n(c,a)),i.apply(this,c)})}return t[Symbol.replace].call(this,s,i)},nE.apply(this,arguments)}function WAe(t){var{debugId:e,debugFileName:r}=t,n=e?[e.replace(/\s/g,"_")]:[];if(r){var{filePath:s}=Mo(),i=s.match(nE(/([^\/\\]*)?[\/\\]?([^\/\\]*)\.css\.(ts|js|tsx|jsx|cjs|mjs)$/,{dir:1,file:2}));if(i&&i.groups){var{dir:o,file:a}=i.groups;n.unshift(a&&a!=="index"?a:o)}}return n.join("_")}function fO(t){return t.match(/^[0-9]/)?"_".concat(t):t}function eS(t){var e=ySe(),{debugId:r,debugFileName:n=!0}=A0(A0({},typeof t=="string"?{debugId:t}:null),typeof t=="object"?t:null),s=pSe().toString(36),{filePath:i,packageName:o}=Mo(),a=Q9(o?"".concat(o).concat(i):i),c="".concat(a).concat(s);if(e==="debug"){var l=WAe({debugId:r,debugFileName:n});return l&&(c="".concat(l,"__").concat(c)),fO(c)}if(typeof e=="function"){if(c=e({hash:c,debugId:r,filePath:i,packageName:o}),!c.match(/^[A-Z_][0-9A-Z_-]+$/i))throw new Error('Identifier function returned invalid indentifier: "'.concat(c,'"'));return c}return fO(c)}function HAe(t,e){var r=eS(e);PG(r,Mo());var n=[],s=[];for(var i of t)typeof i=="string"?n.push(i):s.push(i);var o=r;if(n.length>0&&(o="".concat(r," ").concat(eAe(n)),dSe({identifier:r,classList:o},Mo()),s.length>0&&IG(r)),s.length>0){var a=HG.all(s,{arrayMerge:(c,l)=>l});aw({type:"local",selector:r,rule:a},Mo())}return o}function no(t,e){if(Array.isArray(t))return HAe(t,e);var r=eS(e);return PG(r,Mo()),aw({type:"local",selector:r,rule:t},Mo()),r}function Ry(t,e){aw({type:"global",selector:t,rule:e},Mo())}function VAe(t,e){var r=eh(eS(e),{isIdentifier:!0});return aw({type:"keyframes",name:r,rule:t},Mo()),r}function GAe(t,e,r){return t===t&&(r!==void 0&&(t=t<=r?t:r),e!==void 0&&(t=t>=e?t:e)),t}var VG=GAe;function KAe(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r-1&&t%1==0&&t-1&&t%1==0&&t<=J$e}var tK=X$e,Z$e=fw,e_e=tK,t_e=uw,r_e="[object Arguments]",n_e="[object Array]",s_e="[object Boolean]",i_e="[object Date]",o_e="[object Error]",a_e="[object Function]",c_e="[object Map]",l_e="[object Number]",f_e="[object Object]",u_e="[object RegExp]",d_e="[object Set]",h_e="[object String]",v_e="[object WeakMap]",y_e="[object ArrayBuffer]",p_e="[object DataView]",m_e="[object Float32Array]",g_e="[object Float64Array]",b_e="[object Int8Array]",x_e="[object Int16Array]",w_e="[object Int32Array]",C_e="[object Uint8Array]",E_e="[object Uint8ClampedArray]",k_e="[object Uint16Array]",S_e="[object Uint32Array]",cr={};cr[m_e]=cr[g_e]=cr[b_e]=cr[x_e]=cr[w_e]=cr[C_e]=cr[E_e]=cr[k_e]=cr[S_e]=!0;cr[r_e]=cr[n_e]=cr[y_e]=cr[s_e]=cr[p_e]=cr[i_e]=cr[o_e]=cr[a_e]=cr[c_e]=cr[l_e]=cr[f_e]=cr[u_e]=cr[d_e]=cr[h_e]=cr[v_e]=!1;function A_e(t){return t_e(t)&&e_e(t.length)&&!!cr[Z$e(t)]}var $_e=A_e;function __e(t){return function(e){return t(e)}}var P_e=__e,Fb={exports:{}};Fb.exports;(function(t,e){var r=KG,n=e&&!e.nodeType&&e,s=n&&!0&&t&&!t.nodeType&&t,i=s&&s.exports===n,o=i&&r.process,a=function(){try{var c=s&&s.require&&s.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();t.exports=a})(Fb,Fb.exports);var I_e=Fb.exports,T_e=$_e,O_e=P_e,yO=I_e,pO=yO&&yO.isTypedArray,R_e=pO?O_e(pO):T_e,M_e=R_e,N_e=h$e,j_e=U$e,D_e=ZG,L_e=G$e,B_e=eK,F_e=M_e,z_e=Object.prototype,q_e=z_e.hasOwnProperty;function U_e(t,e){var r=D_e(t),n=!r&&j_e(t),s=!r&&!n&&L_e(t),i=!r&&!n&&!s&&F_e(t),o=r||n||s||i,a=o?N_e(t.length,String):[],c=a.length;for(var l in t)(e||q_e.call(t,l))&&!(o&&(l=="length"||s&&(l=="offset"||l=="parent")||i&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||B_e(l,c)))&&a.push(l);return a}var W_e=U_e,H_e=Object.prototype;function V_e(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||H_e;return t===r}var G_e=V_e;function K_e(t,e){return function(r){return t(e(r))}}var Y_e=K_e,Q_e=Y_e,J_e=Q_e(Object.keys,Object),X_e=J_e,Z_e=G_e,ePe=X_e,tPe=Object.prototype,rPe=tPe.hasOwnProperty;function nPe(t){if(!Z_e(t))return ePe(t);var e=[];for(var r in Object(t))rPe.call(t,r)&&r!="constructor"&&e.push(r);return e}var sPe=nPe;function iPe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var tS=iPe,oPe=fw,aPe=tS,cPe="[object AsyncFunction]",lPe="[object Function]",fPe="[object GeneratorFunction]",uPe="[object Proxy]";function dPe(t){if(!aPe(t))return!1;var e=oPe(t);return e==lPe||e==fPe||e==cPe||e==uPe}var hPe=dPe,vPe=hPe,yPe=tK;function pPe(t){return t!=null&&yPe(t.length)&&!vPe(t)}var rK=pPe,mPe=W_e,gPe=sPe,bPe=rK;function xPe(t){return bPe(t)?mPe(t):gPe(t)}var wPe=xPe,CPe=u$e,EPe=wPe;function kPe(t){return t==null?[]:CPe(t,EPe(t))}var SPe=kPe,APe=VG,$Pe=GG,_Pe=SPe;function PPe(t,e){var r=_Pe(t);return $Pe(r,APe(e,0,r.length))}var IPe=PPe;function TPe(t,e){return t===e||t!==t&&e!==e}var OPe=TPe,RPe=OPe,MPe=rK,NPe=eK,jPe=tS;function DPe(t,e,r){if(!jPe(r))return!1;var n=typeof e;return(n=="number"?MPe(r)&&NPe(e,r.length):n=="string"&&e in r)?RPe(r[e],t):!1}var LPe=DPe,BPe=/\s/;function FPe(t){for(var e=t.length;e--&&BPe.test(t.charAt(e)););return e}var zPe=FPe,qPe=zPe,UPe=/^\s+/;function WPe(t){return t&&t.slice(0,qPe(t)+1).replace(UPe,"")}var HPe=WPe,VPe=fw,GPe=uw,KPe="[object Symbol]";function YPe(t){return typeof t=="symbol"||GPe(t)&&VPe(t)==KPe}var QPe=YPe,JPe=HPe,mO=tS,XPe=QPe,gO=NaN,ZPe=/^[-+]0x[0-9a-f]+$/i,eIe=/^0b[01]+$/i,tIe=/^0o[0-7]+$/i,rIe=parseInt;function nIe(t){if(typeof t=="number")return t;if(XPe(t))return gO;if(mO(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=mO(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=JPe(t);var r=eIe.test(t);return r||tIe.test(t)?rIe(t.slice(2),r?2:8):ZPe.test(t)?gO:+t}var sIe=nIe,iIe=sIe,bO=1/0,oIe=17976931348623157e292;function aIe(t){if(!t)return t===0?t:0;if(t=iIe(t),t===bO||t===-bO){var e=t<0?-1:1;return e*oIe}return t===t?t:0}var cIe=aIe,lIe=cIe;function fIe(t){var e=lIe(t),r=e%1;return e===e?r?e-r:e:0}var uIe=fIe,dIe=o$e,hIe=IPe,vIe=ZG,yIe=LPe,pIe=uIe;function mIe(t,e,r){(r?yIe(t,e,r):e===void 0)?e=1:e=pIe(e);var n=vIe(t)?dIe:hIe;return n(t,e)}var gIe=mIe;const bIe=Fs(gIe);var dw={},xIe=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],n=0;n"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var u=xO[e.format]||xO.default;window.clipboardData.setData(u,t)}else f.clipboardData.clearData(),f.clipboardData.setData(e.format,t);e.onCopy&&(f.preventDefault(),e.onCopy(f.clipboardData))}),document.body.appendChild(a),i.selectNodeContents(a),o.addRange(i);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");c=!0}catch(f){r&&console.error("unable to copy using execCommand: ",f),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),c=!0}catch(u){r&&console.error("unable to copy using clipboardData: ",u),r&&console.error("falling back to prompt"),n=EIe("message"in e?e.message:CIe),window.prompt(n,t)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(i):o.removeAllRanges()),a&&document.body.removeChild(a),s()}return c}var SIe=kIe;function sE(t){"@babel/helpers - typeof";return sE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sE(t)}Object.defineProperty(dw,"__esModule",{value:!0});dw.CopyToClipboard=void 0;var Vp=nK(p),AIe=nK(SIe),$Ie=["text","onCopy","options","children"];function nK(t){return t&&t.__esModule?t:{default:t}}function wO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function CO(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function PIe(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i=0)&&(r[s]=t[s]);return r}function IIe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function EO(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zb(t){return zb=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},zb(t)}function rS(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var iK=function(t){OIe(r,t);var e=RIe(r);function r(){var n;IIe(this,r);for(var s=arguments.length,i=new Array(s),o=0;oe in t?DIe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Bv=(t,e)=>{for(var r in e||(e={}))aK.call(e,r)&&kO(t,r,e[r]);if(qb)for(var r of qb(e))cK.call(e,r)&&kO(t,r,e[r]);return t},nS=(t,e)=>{var r={};for(var n in t)aK.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&qb)for(var n of qb(t))e.indexOf(n)<0&&cK.call(t,n)&&(r[n]=t[n]);return r};/** + * @license QR Code generator library (TypeScript) + * Copyright (c) Project Nayuki. + * SPDX-License-Identifier: MIT + */var Qf;(t=>{const e=class{constructor(c,l,f,u){if(this.version=c,this.errorCorrectionLevel=l,this.modules=[],this.isFunction=[],ce.MAX_VERSION)throw new RangeError("Version value out of range");if(u<-1||u>7)throw new RangeError("Mask value out of range");this.size=c*4+17;let d=[];for(let v=0;v7)throw new RangeError("Invalid value");let v,y;for(v=f;;v++){const x=e.getNumDataCodewords(v,l)*8,k=a.getTotalBits(c,v);if(k<=x){y=k;break}if(v>=u)throw new RangeError("Data too long")}for(const x of[e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])h&&y<=e.getNumDataCodewords(v,x)*8&&(l=x);let m=[];for(const x of c){n(x.mode.modeBits,4,m),n(x.numChars,x.mode.numCharCountBits(v),m);for(const k of x.getData())m.push(k)}i(m.length==y);const g=e.getNumDataCodewords(v,l)*8;i(m.length<=g),n(0,Math.min(4,g-m.length),m),n(0,(8-m.length%8)%8,m),i(m.length%8==0);for(let x=236;m.lengthb[k>>>3]|=x<<7-(k&7)),new e(v,l,b,d)}getModule(c,l){return 0<=c&&c>>9)*1335;const u=(l<<10|f)^21522;i(u>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,s(u,d));this.setFunctionModule(8,7,s(u,6)),this.setFunctionModule(8,8,s(u,7)),this.setFunctionModule(7,8,s(u,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,s(u,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,s(u,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,s(u,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let c=this.version;for(let f=0;f<12;f++)c=c<<1^(c>>>11)*7973;const l=this.version<<12|c;i(l>>>18==0);for(let f=0;f<18;f++){const u=s(l,f),d=this.size-11+f%3,h=Math.floor(f/3);this.setFunctionModule(d,h,u),this.setFunctionModule(h,d,u)}}drawFinderPattern(c,l){for(let f=-4;f<=4;f++)for(let u=-4;u<=4;u++){const d=Math.max(Math.abs(u),Math.abs(f)),h=c+u,v=l+f;0<=h&&h{(x!=y-d||$>=v)&&b.push(k[x])});return i(b.length==h),b}drawCodewords(c){if(c.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let l=0;for(let f=this.size-1;f>=1;f-=2){f==6&&(f=5);for(let u=0;u>>3],7-(l&7)),l++)}}i(l==c.length*8)}applyMask(c){if(c<0||c>7)throw new RangeError("Mask value out of range");for(let l=0;l5&&c++):(this.finderPenaltyAddHistory(v,y),h||(c+=this.finderPenaltyCountPatterns(y)*e.PENALTY_N3),h=this.modules[d][m],v=1);c+=this.finderPenaltyTerminateAndCount(h,v,y)*e.PENALTY_N3}for(let d=0;d5&&c++):(this.finderPenaltyAddHistory(v,y),h||(c+=this.finderPenaltyCountPatterns(y)*e.PENALTY_N3),h=this.modules[m][d],v=1);c+=this.finderPenaltyTerminateAndCount(h,v,y)*e.PENALTY_N3}for(let d=0;dh+(v?1:0),l);const f=this.size*this.size,u=Math.ceil(Math.abs(l*20-f*10)/f)-1;return i(0<=u&&u<=9),c+=u*e.PENALTY_N4,i(0<=c&&c<=2568888),c}getAlignmentPatternPositions(){if(this.version==1)return[];{const c=Math.floor(this.version/7)+2,l=this.version==32?26:Math.ceil((this.version*4+4)/(c*2-2))*2;let f=[6];for(let u=this.size-7;f.lengthe.MAX_VERSION)throw new RangeError("Version number out of range");let l=(16*c+128)*c+64;if(c>=2){const f=Math.floor(c/7)+2;l-=(25*f-10)*f-55,c>=7&&(l-=36)}return i(208<=l&&l<=29648),l}static getNumDataCodewords(c,l){return Math.floor(e.getNumRawDataModules(c)/8)-e.ECC_CODEWORDS_PER_BLOCK[l.ordinal][c]*e.NUM_ERROR_CORRECTION_BLOCKS[l.ordinal][c]}static reedSolomonComputeDivisor(c){if(c<1||c>255)throw new RangeError("Degree out of range");let l=[];for(let u=0;u0);for(const u of c){const d=u^f.shift();f.push(0),l.forEach((h,v)=>f[v]^=e.reedSolomonMultiply(h,d))}return f}static reedSolomonMultiply(c,l){if(c>>>8||l>>>8)throw new RangeError("Byte out of range");let f=0;for(let u=7;u>=0;u--)f=f<<1^(f>>>7)*285,f^=(l>>>u&1)*c;return i(f>>>8==0),f}finderPenaltyCountPatterns(c){const l=c[1];i(l<=this.size*3);const f=l>0&&c[2]==l&&c[3]==l*3&&c[4]==l&&c[5]==l;return(f&&c[0]>=l*4&&c[6]>=l?1:0)+(f&&c[6]>=l*4&&c[0]>=l?1:0)}finderPenaltyTerminateAndCount(c,l,f){return c&&(this.finderPenaltyAddHistory(l,f),l=0),l+=this.size,this.finderPenaltyAddHistory(l,f),this.finderPenaltyCountPatterns(f)}finderPenaltyAddHistory(c,l){l[0]==0&&(c+=this.size),l.pop(),l.unshift(c)}};let r=e;r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],t.QrCode=r;function n(c,l,f){if(l<0||l>31||c>>>l)throw new RangeError("Value out of range");for(let u=l-1;u>=0;u--)f.push(c>>>u&1)}function s(c,l){return(c>>>l&1)!=0}function i(c){if(!c)throw new Error("Assertion error")}const o=class{constructor(c,l,f){if(this.mode=c,this.numChars=l,this.bitData=f,l<0)throw new RangeError("Invalid argument");this.bitData=f.slice()}static makeBytes(c){let l=[];for(const f of c)n(f,8,l);return new o(o.Mode.BYTE,c.length,l)}static makeNumeric(c){if(!o.isNumeric(c))throw new RangeError("String contains non-numeric characters");let l=[];for(let f=0;f=1<{(e=>{const r=class{constructor(s,i){this.ordinal=s,this.formatBits=i}};let n=r;n.LOW=new r(0,1),n.MEDIUM=new r(1,0),n.QUARTILE=new r(2,3),n.HIGH=new r(3,2),e.Ecc=n})(t.QrCode||(t.QrCode={}))})(Qf||(Qf={}));(t=>{(e=>{const r=class{constructor(s,i){this.modeBits=s,this.numBitsCharCount=i}numCharCountBits(s){return this.numBitsCharCount[Math.floor((s+7)/17)]}};let n=r;n.NUMERIC=new r(1,[10,12,14]),n.ALPHANUMERIC=new r(2,[9,11,13]),n.BYTE=new r(4,[8,16,16]),n.KANJI=new r(8,[8,10,12]),n.ECI=new r(7,[0,0,0]),e.Mode=n})(t.QrSegment||(t.QrSegment={}))})(Qf||(Qf={}));var vd=Qf;/** + * @license qrcode.react + * Copyright (c) Paul O'Shannessy + * SPDX-License-Identifier: ISC + */var lK={L:vd.QrCode.Ecc.LOW,M:vd.QrCode.Ecc.MEDIUM,Q:vd.QrCode.Ecc.QUARTILE,H:vd.QrCode.Ecc.HIGH},fK=128,uK="L",dK="#FFFFFF",hK="#000000",vK=!1,sS=4,LIe=.1;function yK(t,e=0){const r=[];return t.forEach(function(n,s){let i=null;n.forEach(function(o,a){if(!o&&i!==null){r.push(`M${i+e} ${s+e}h${a-i}v1H${i+e}z`),i=null;return}if(a===n.length-1){if(!o)return;i===null?r.push(`M${a+e},${s+e} h1v1H${a+e}z`):r.push(`M${i+e},${s+e} h${a+1-i}v1H${i+e}z`);return}o&&i===null&&(i=a)})}),r.join("")}function pK(t,e){return t.slice().map((r,n)=>n=e.y+e.h?r:r.map((s,i)=>i=e.x+e.w?s:!1))}function mK(t,e,r,n){if(n==null)return null;const s=r?sS:0,i=t.length+s*2,o=Math.floor(e*LIe),a=i/e,c=(n.width||o)*a,l=(n.height||o)*a,f=n.x==null?t.length/2-c/2:n.x*a,u=n.y==null?t.length/2-l/2:n.y*a;let d=null;if(n.excavate){let h=Math.floor(f),v=Math.floor(u),y=Math.ceil(c+f-h),m=Math.ceil(l+u-v);d={x:h,y:v,w:y,h:m}}return{x:f,y:u,h:l,w:c,excavation:d}}var BIe=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}();function FIe(t){const e=t,{value:r,size:n=fK,level:s=uK,bgColor:i=dK,fgColor:o=hK,includeMargin:a=vK,style:c,imageSettings:l}=e,f=nS(e,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),u=l==null?void 0:l.src,d=p.useRef(null),h=p.useRef(null),[v,y]=p.useState(!1);p.useEffect(()=>{if(d.current!=null){const b=d.current,x=b.getContext("2d");if(!x)return;let k=vd.QrCode.encodeText(r,lK[s]).getModules();const $=a?sS:0,I=k.length+$*2,M=mK(k,n,a,l),D=h.current,H=M!=null&&D!==null&&D.complete&&D.naturalHeight!==0&&D.naturalWidth!==0;H&&M.excavation!=null&&(k=pK(k,M.excavation));const G=window.devicePixelRatio||1;b.height=b.width=n*G;const V=n/I*G;x.scale(V,V),x.fillStyle=i,x.fillRect(0,0,I,I),x.fillStyle=o,BIe?x.fill(new Path2D(yK(k,$))):k.forEach(function(Q,F){Q.forEach(function(C,S){C&&x.fillRect(S+$,F+$,1,1)})}),H&&x.drawImage(D,M.x+$,M.y+$,M.w,M.h)}}),p.useEffect(()=>{y(!1)},[u]);const m=Bv({height:n,width:n},c);let g=null;return u!=null&&(g=w.createElement("img",{src:u,key:u,style:{display:"none"},onLoad:()=>{y(!0)},ref:h})),w.createElement(w.Fragment,null,w.createElement("canvas",Bv({style:m,height:n,width:n,ref:d},f)),g)}function zIe(t){const e=t,{value:r,size:n=fK,level:s=uK,bgColor:i=dK,fgColor:o=hK,includeMargin:a=vK,imageSettings:c}=e,l=nS(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let f=vd.QrCode.encodeText(r,lK[s]).getModules();const u=a?sS:0,d=f.length+u*2,h=mK(f,n,a,c);let v=null;c!=null&&h!=null&&(h.excavation!=null&&(f=pK(f,h.excavation)),v=w.createElement("image",{xlinkHref:c.src,height:h.h,width:h.w,x:h.x+u,y:h.y+u,preserveAspectRatio:"none"}));const y=yK(f,u);return w.createElement("svg",Bv({height:n,width:n,viewBox:`0 0 ${d} ${d}`},l),w.createElement("path",{fill:i,d:`M0,0 h${d}v${d}H0z`,shapeRendering:"crispEdges"}),w.createElement("path",{fill:o,d:y,shapeRendering:"crispEdges"}),v)}var qIe=t=>{const e=t,{renderAs:r}=e,n=nS(e,["renderAs"]);return r==="svg"?w.createElement(zIe,Bv({},n)):w.createElement(FIe,Bv({},n))},gK={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ks,function(){var r=1e3,n=6e4,s=36e5,i="millisecond",o="second",a="minute",c="hour",l="day",f="week",u="month",d="quarter",h="year",v="date",y="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(C){var S=["th","st","nd","rd"],T=C%100;return"["+C+(S[(T-20)%10]||S[T]||S[0])+"]"}},x=function(C,S,T){var R=String(C);return!R||R.length>=S?C:""+Array(S+1-R.length).join(T)+C},k={s:x,z:function(C){var S=-C.utcOffset(),T=Math.abs(S),R=Math.floor(T/60),A=T%60;return(S<=0?"+":"-")+x(R,2,"0")+":"+x(A,2,"0")},m:function C(S,T){if(S.date()1)return C(B[0])}else{var P=S.name;I[P]=S,A=P}return!R&&A&&($=A),A||!R&&$},G=function(C,S){if(D(C))return C.clone();var T=typeof S=="object"?S:{};return T.date=C,T.args=arguments,new Q(T)},V=k;V.l=H,V.i=D,V.w=function(C,S){return G(C,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var Q=function(){function C(T){this.$L=H(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[M]=!0}var S=C.prototype;return S.parse=function(T){this.$d=function(R){var A=R.date,N=R.utc;if(A===null)return new Date(NaN);if(V.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var B=A.match(m);if(B){var P=B[2]-1||0,E=(B[7]||"0").substring(0,3);return N?new Date(Date.UTC(B[1],P,B[3]||1,B[4]||0,B[5]||0,B[6]||0,E)):new Date(B[1],P,B[3]||1,B[4]||0,B[5]||0,B[6]||0,E)}}return new Date(A)}(T),this.init()},S.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},S.$utils=function(){return V},S.isValid=function(){return this.$d.toString()!==y},S.isSame=function(T,R){var A=G(T);return this.startOf(R)<=A&&A<=this.endOf(R)},S.isAfter=function(T,R){return G(T)`Invalid value for key ${t}`,JIe=t=>`Pattern length exceeds max of ${t}.`,XIe=t=>`Missing ${t} property in key`,ZIe=t=>`Property 'weight' in key '${t}' must be a positive integer`,SO=Object.prototype.hasOwnProperty;class eTe{constructor(e){this._keys=[],this._keyMap={};let r=0;e.forEach(n=>{let s=EK(n);r+=s.weight,this._keys.push(s),this._keyMap[s.id]=s,r+=s.weight}),this._keys.forEach(n=>{n.weight/=r})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function EK(t){let e=null,r=null,n=null,s=1,i=null;if($o(t)||Fa(t))n=t,e=AO(t),r=aE(t);else{if(!SO.call(t,"name"))throw new Error(XIe("name"));const o=t.name;if(n=o,SO.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(ZIe(o));e=AO(o),r=aE(o),i=t.getFn}return{path:e,id:r,weight:s,src:n,getFn:i}}function AO(t){return Fa(t)?t:t.split(".")}function aE(t){return Fa(t)?t.join("."):t}function tTe(t,e){let r=[],n=!1;const s=(i,o,a)=>{if(_s(i))if(!o[a])r.push(i);else{let c=o[a];const l=i[c];if(!_s(l))return;if(a===o.length-1&&($o(l)||xK(l)||GIe(l)))r.push(VIe(l));else if(Fa(l)){n=!0;for(let f=0,u=l.length;ft.score===e.score?t.idx{this._keysMap[r.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,$o(this.docs[0])?this.docs.forEach((e,r)=>{this._addString(e,r)}):this.docs.forEach((e,r)=>{this._addObject(e,r)}),this.norm.clear())}add(e){const r=this.size();$o(e)?this._addString(e,r):this._addObject(e,r)}removeAt(e){this.records.splice(e,1);for(let r=e,n=this.size();r{let o=s.getFn?s.getFn(e):this.getFn(e,s.path);if(_s(o)){if(Fa(o)){let a=[];const c=[{nestedArrIndex:-1,value:o}];for(;c.length;){const{nestedArrIndex:l,value:f}=c.pop();if(_s(f))if($o(f)&&!O6(f)){let u={v:f,i:l,n:this.norm.get(f)};a.push(u)}else Fa(f)&&f.forEach((u,d)=>{c.push({nestedArrIndex:d,value:u})})}n.$[i]=a}else if($o(o)&&!O6(o)){let a={v:o,n:this.norm.get(o)};n.$[i]=a}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function kK(t,e,{getFn:r=qe.getFn,fieldNormWeight:n=qe.fieldNormWeight}={}){const s=new iS({getFn:r,fieldNormWeight:n});return s.setKeys(t.map(EK)),s.setSources(e),s.create(),s}function cTe(t,{getFn:e=qe.getFn,fieldNormWeight:r=qe.fieldNormWeight}={}){const{keys:n,records:s}=t,i=new iS({getFn:e,fieldNormWeight:r});return i.setKeys(n),i.setIndexRecords(s),i}function Gp(t,{errors:e=0,currentLocation:r=0,expectedLocation:n=0,distance:s=qe.distance,ignoreLocation:i=qe.ignoreLocation}={}){const o=e/t.length;if(i)return o;const a=Math.abs(n-r);return s?o+a/s:a?1:o}function lTe(t=[],e=qe.minMatchCharLength){let r=[],n=-1,s=-1,i=0;for(let o=t.length;i=e&&r.push([n,s]),n=-1)}return t[i-1]&&i-n>=e&&r.push([n,i-1]),r}const lf=32;function fTe(t,e,r,{location:n=qe.location,distance:s=qe.distance,threshold:i=qe.threshold,findAllMatches:o=qe.findAllMatches,minMatchCharLength:a=qe.minMatchCharLength,includeMatches:c=qe.includeMatches,ignoreLocation:l=qe.ignoreLocation}={}){if(e.length>lf)throw new Error(JIe(lf));const f=e.length,u=t.length,d=Math.max(0,Math.min(n,u));let h=i,v=d;const y=a>1||c,m=y?Array(u):[];let g;for(;(g=t.indexOf(e,v))>-1;){let M=Gp(e,{currentLocation:g,expectedLocation:d,distance:s,ignoreLocation:l});if(h=Math.min(M,h),v=g+f,y){let D=0;for(;D=G;C-=1){let S=C-1,T=r[t.charAt(S)];if(y&&(m[S]=+!!T),Q[C]=(Q[C+1]<<1|1)&T,M&&(Q[C]|=(b[C+1]|b[C])<<1|1|b[C+1]),Q[C]&$&&(x=Gp(e,{errors:M,currentLocation:S,expectedLocation:d,distance:s,ignoreLocation:l}),x<=h)){if(h=x,v=S,v<=d)break;G=Math.max(1,2*d-v)}}if(Gp(e,{errors:M+1,currentLocation:d,expectedLocation:d,distance:s,ignoreLocation:l})>h)break;b=Q}const I={isMatch:v>=0,score:Math.max(.001,x)};if(y){const M=lTe(m,a);M.length?c&&(I.indices=M):I.isMatch=!1}return I}function uTe(t){let e={};for(let r=0,n=t.length;r{this.chunks.push({pattern:d,alphabet:uTe(d),startIndex:h})},u=this.pattern.length;if(u>lf){let d=0;const h=u%lf,v=u-h;for(;d{const{isMatch:g,score:b,indices:x}=fTe(e,v,y,{location:s+m,distance:i,threshold:o,findAllMatches:a,minMatchCharLength:c,includeMatches:n,ignoreLocation:l});g&&(d=!0),u+=b,g&&x&&(f=[...f,...x])});let h={isMatch:d,score:d?u/this.chunks.length:1};return d&&n&&(h.indices=f),h}}class Ll{constructor(e){this.pattern=e}static isMultiMatch(e){return $O(e,this.multiRegex)}static isSingleMatch(e){return $O(e,this.singleRegex)}search(){}}function $O(t,e){const r=t.match(e);return r?r[1]:null}class dTe extends Ll{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const r=e===this.pattern;return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class hTe extends Ll{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class vTe extends Ll{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const r=e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class yTe extends Ll{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const r=!e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class pTe extends Ll{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const r=e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class mTe extends Ll{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const r=!e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class AK extends Ll{constructor(e,{location:r=qe.location,threshold:n=qe.threshold,distance:s=qe.distance,includeMatches:i=qe.includeMatches,findAllMatches:o=qe.findAllMatches,minMatchCharLength:a=qe.minMatchCharLength,isCaseSensitive:c=qe.isCaseSensitive,ignoreLocation:l=qe.ignoreLocation}={}){super(e),this._bitapSearch=new SK(e,{location:r,threshold:n,distance:s,includeMatches:i,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:c,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class $K extends Ll{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let r=0,n;const s=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,r))>-1;)r=n+i,s.push([n,r-1]);const o=!!s.length;return{isMatch:o,score:o?0:1,indices:s}}}const cE=[dTe,$K,vTe,yTe,mTe,pTe,hTe,AK],_O=cE.length,gTe=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,bTe="|";function xTe(t,e={}){return t.split(bTe).map(r=>{let n=r.trim().split(gTe).filter(i=>i&&!!i.trim()),s=[];for(let i=0,o=n.length;i!!(t[Ub.AND]||t[Ub.OR]),kTe=t=>!!t[uE.PATH],STe=t=>!Fa(t)&&wK(t)&&!dE(t),PO=t=>({[Ub.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function _K(t,e,{auto:r=!0}={}){const n=s=>{let i=Object.keys(s);const o=kTe(s);if(!o&&i.length>1&&!dE(s))return n(PO(s));if(STe(s)){const c=o?s[uE.PATH]:i[0],l=o?s[uE.PATTERN]:s[c];if(!$o(l))throw new Error(QIe(c));const f={keyId:aE(c),pattern:l};return r&&(f.searcher=fE(l,e)),f}let a={children:[],operator:i[0]};return i.forEach(c=>{const l=s[c];Fa(l)&&l.forEach(f=>{a.children.push(n(f))})}),a};return dE(t)||(t=PO(t)),n(t)}function ATe(t,{ignoreFieldNorm:e=qe.ignoreFieldNorm}){t.forEach(r=>{let n=1;r.matches.forEach(({key:s,norm:i,score:o})=>{const a=s?s.weight:null;n*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(e?1:i))}),r.score=n})}function $Te(t,e){const r=t.matches;e.matches=[],_s(r)&&r.forEach(n=>{if(!_s(n.indices)||!n.indices.length)return;const{indices:s,value:i}=n;let o={indices:s,value:i};n.key&&(o.key=n.key.src),n.idx>-1&&(o.refIndex=n.idx),e.matches.push(o)})}function _Te(t,e){e.score=t.score}function PTe(t,e,{includeMatches:r=qe.includeMatches,includeScore:n=qe.includeScore}={}){const s=[];return r&&s.push($Te),n&&s.push(_Te),t.map(i=>{const{idx:o}=i,a={item:e[o],refIndex:o};return s.length&&s.forEach(c=>{c(i,a)}),a})}class za{constructor(e,r={},n){this.options={...qe,...r},this.options.useExtendedSearch,this._keyStore=new eTe(this.options.keys),this.setCollection(e,n)}setCollection(e,r){if(this._docs=e,r&&!(r instanceof iS))throw new Error(YIe);this._myIndex=r||kK(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){_s(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const r=[];for(let n=0,s=this._docs.length;n-1&&(c=c.slice(0,r)),PTe(c,this._docs,{includeMatches:n,includeScore:s})}_searchStringList(e){const r=fE(e,this.options),{records:n}=this._myIndex,s=[];return n.forEach(({v:i,i:o,n:a})=>{if(!_s(i))return;const{isMatch:c,score:l,indices:f}=r.searchIn(i);c&&s.push({item:i,idx:o,matches:[{score:l,value:i,norm:a,indices:f}]})}),s}_searchLogical(e){const r=_K(e,this.options),n=(a,c,l)=>{if(!a.children){const{keyId:u,searcher:d}=a,h=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(c,u),searcher:d});return h&&h.length?[{idx:l,item:c,matches:h}]:[]}const f=[];for(let u=0,d=a.children.length;u{if(_s(a)){let l=n(r,a,c);l.length&&(i[c]||(i[c]={idx:c,item:a,matches:[]},o.push(i[c])),l.forEach(({matches:f})=>{i[c].matches.push(...f)}))}}),o}_searchObjectList(e){const r=fE(e,this.options),{keys:n,records:s}=this._myIndex,i=[];return s.forEach(({$:o,i:a})=>{if(!_s(o))return;let c=[];n.forEach((l,f)=>{c.push(...this._findMatches({key:l,value:o[f],searcher:r}))}),c.length&&i.push({idx:a,item:o,matches:c})}),i}_findMatches({key:e,value:r,searcher:n}){if(!_s(r))return[];let s=[];if(Fa(r))r.forEach(({v:i,i:o,n:a})=>{if(!_s(i))return;const{isMatch:c,score:l,indices:f}=n.searchIn(i);c&&s.push({score:l,key:e,value:i,idx:o,norm:a,indices:f})});else{const{v:i,n:o}=r,{isMatch:a,score:c,indices:l}=n.searchIn(i);a&&s.push({score:c,key:e,value:i,norm:o,indices:l})}return s}}za.version="6.6.2";za.createIndex=kK;za.parseIndex=cTe;za.config=qe;za.parseQuery=_K;ETe(CTe);function PK(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;et.forEach(r=>TTe(r,e))}function hu(...t){return p.useCallback(IK(...t),t)}function TK(t,e=[]){let r=[];function n(i,o){const a=p.createContext(o),c=r.length;r=[...r,o];function l(u){const{scope:d,children:h,...v}=u,y=(d==null?void 0:d[t][c])||a,m=p.useMemo(()=>v,Object.values(v));return p.createElement(y.Provider,{value:m},h)}function f(u,d){const h=(d==null?void 0:d[t][c])||a,v=p.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,f]}const s=()=>{const i=r.map(o=>p.createContext(o));return function(a){const c=(a==null?void 0:a[t])||i;return p.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return s.scopeName=t,[n,OTe(s,...e)]}function OTe(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:c,scopeName:l})=>{const u=c(i)[`__scope${l}`];return{...a,...u}},{});return p.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}const oS=p.forwardRef((t,e)=>{const{children:r,...n}=t,s=p.Children.toArray(r),i=s.find(MTe);if(i){const o=i.props.children,a=s.map(c=>c===i?p.Children.count(o)>1?p.Children.only(null):p.isValidElement(o)?o.props.children:null:c);return p.createElement(hE,Jn({},n,{ref:e}),p.isValidElement(o)?p.cloneElement(o,void 0,a):null)}return p.createElement(hE,Jn({},n,{ref:e}),r)});oS.displayName="Slot";const hE=p.forwardRef((t,e)=>{const{children:r,...n}=t;return p.isValidElement(r)?p.cloneElement(r,{...NTe(n,r.props),ref:e?IK(e,r.ref):r.ref}):p.Children.count(r)>1?p.Children.only(null):null});hE.displayName="SlotClone";const RTe=({children:t})=>p.createElement(p.Fragment,null,t);function MTe(t){return p.isValidElement(t)&&t.type===RTe}function NTe(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}const jTe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],My=jTe.reduce((t,e)=>{const r=p.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?oS:e;return p.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),p.createElement(a,Jn({},o,{ref:s}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function DTe(t,e){t&&bn.flushSync(()=>t.dispatchEvent(e))}function wl(t){const e=p.useRef(t);return p.useEffect(()=>{e.current=t}),p.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function LTe(t,e=globalThis==null?void 0:globalThis.document){const r=wl(t);p.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const vE="dismissableLayer.update",BTe="dismissableLayer.pointerDownOutside",FTe="dismissableLayer.focusOutside";let IO;const zTe=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qTe=p.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:c,...l}=t,f=p.useContext(zTe),[u,d]=p.useState(null),h=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,v]=p.useState({}),y=hu(e,D=>d(D)),m=Array.from(f.layers),[g]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(g),x=u?m.indexOf(u):-1,k=f.layersWithOutsidePointerEventsDisabled.size>0,$=x>=b,I=UTe(D=>{const H=D.target,G=[...f.branches].some(V=>V.contains(H));!$||G||(i==null||i(D),a==null||a(D),D.defaultPrevented||c==null||c())},h),M=WTe(D=>{const H=D.target;[...f.branches].some(V=>V.contains(H))||(o==null||o(D),a==null||a(D),D.defaultPrevented||c==null||c())},h);return LTe(D=>{x===f.layers.size-1&&(s==null||s(D),!D.defaultPrevented&&c&&(D.preventDefault(),c()))},h),p.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(IO=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),TO(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=IO)}},[u,h,n,f]),p.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),TO())},[u,f]),p.useEffect(()=>{const D=()=>v({});return document.addEventListener(vE,D),()=>document.removeEventListener(vE,D)},[]),p.createElement(My.div,Jn({},l,{ref:y,style:{pointerEvents:k?$?"auto":"none":void 0,...t.style},onFocusCapture:_f(t.onFocusCapture,M.onFocusCapture),onBlurCapture:_f(t.onBlurCapture,M.onBlurCapture),onPointerDownCapture:_f(t.onPointerDownCapture,I.onPointerDownCapture)}))});function UTe(t,e=globalThis==null?void 0:globalThis.document){const r=wl(t),n=p.useRef(!1),s=p.useRef(()=>{});return p.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){OK(BTe,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function WTe(t,e=globalThis==null?void 0:globalThis.document){const r=wl(t),n=p.useRef(!1);return p.useEffect(()=>{const s=i=>{i.target&&!n.current&&OK(FTe,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function TO(){const t=new CustomEvent(vE);document.dispatchEvent(t)}function OK(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?DTe(s,i):s.dispatchEvent(i)}let R6=0;function HTe(){p.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:OO()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:OO()),R6++,()=>{R6===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),R6--}},[])}function OO(){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 M6="focusScope.autoFocusOnMount",N6="focusScope.autoFocusOnUnmount",RO={bubbles:!1,cancelable:!0},VTe=p.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,c]=p.useState(null),l=wl(s),f=wl(i),u=p.useRef(null),d=hu(e,y=>c(y)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){let y=function(x){if(h.paused||!a)return;const k=x.target;a.contains(k)?u.current=k:gc(u.current,{select:!0})},m=function(x){if(h.paused||!a)return;const k=x.relatedTarget;k!==null&&(a.contains(k)||gc(u.current,{select:!0}))},g=function(x){if(document.activeElement===document.body)for(const $ of x)$.removedNodes.length>0&&gc(a)};document.addEventListener("focusin",y),document.addEventListener("focusout",m);const b=new MutationObserver(g);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",m),b.disconnect()}}},[n,a,h.paused]),p.useEffect(()=>{if(a){NO.add(h);const y=document.activeElement;if(!a.contains(y)){const g=new CustomEvent(M6,RO);a.addEventListener(M6,l),a.dispatchEvent(g),g.defaultPrevented||(GTe(XTe(RK(a)),{select:!0}),document.activeElement===y&&gc(a))}return()=>{a.removeEventListener(M6,l),setTimeout(()=>{const g=new CustomEvent(N6,RO);a.addEventListener(N6,f),a.dispatchEvent(g),g.defaultPrevented||gc(y??document.body,{select:!0}),a.removeEventListener(N6,f),NO.remove(h)},0)}}},[a,l,f,h]);const v=p.useCallback(y=>{if(!r&&!n||h.paused)return;const m=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,g=document.activeElement;if(m&&g){const b=y.currentTarget,[x,k]=KTe(b);x&&k?!y.shiftKey&&g===k?(y.preventDefault(),r&&gc(x,{select:!0})):y.shiftKey&&g===x&&(y.preventDefault(),r&&gc(k,{select:!0})):g===b&&y.preventDefault()}},[r,n,h.paused]);return p.createElement(My.div,Jn({tabIndex:-1},o,{ref:d,onKeyDown:v}))});function GTe(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(gc(n,{select:e}),document.activeElement!==r)return}function KTe(t){const e=RK(t),r=MO(e,t),n=MO(e.reverse(),t);return[r,n]}function RK(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function MO(t,e){for(const r of t)if(!YTe(r,{upTo:e}))return r}function YTe(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 QTe(t){return t instanceof HTMLInputElement&&"select"in t}function gc(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&QTe(t)&&e&&t.select()}}const NO=JTe();function JTe(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=jO(t,e),t.unshift(e)},remove(e){var r;t=jO(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function jO(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function XTe(t){return t.filter(e=>e.tagName!=="A")}const y1=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},ZTe=PE.useId||(()=>{});let eOe=0;function tOe(t){const[e,r]=p.useState(ZTe());return y1(()=>{t||r(n=>n??String(eOe++))},[t]),t||(e?`radix-${e}`:"")}function Wb(){return Wb=Object.assign?Object.assign.bind():function(t){for(var e=1;e({x:t,y:t}),nOe={left:"right",right:"left",bottom:"top",top:"bottom"},sOe={start:"end",end:"start"};function yE(t,e,r){return Ps(t,Cl(e,r))}function qa(t,e){return typeof t=="function"?t(e):t}function Ua(t){return t.split("-")[0]}function rh(t){return t.split("-")[1]}function aS(t){return t==="x"?"y":"x"}function cS(t){return t==="y"?"height":"width"}function nh(t){return["top","bottom"].includes(Ua(t))?"y":"x"}function lS(t){return aS(nh(t))}function iOe(t,e,r){r===void 0&&(r=!1);const n=rh(t),s=lS(t),i=cS(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=Vb(o)),[o,Vb(o)]}function oOe(t){const e=Vb(t);return[pE(t),e,pE(e)]}function pE(t){return t.replace(/start|end/g,e=>sOe[e])}function aOe(t,e,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?s:n:e?n:s;case"left":case"right":return e?i:o;default:return[]}}function cOe(t,e,r,n){const s=rh(t);let i=aOe(Ua(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(pE)))),i}function Vb(t){return t.replace(/left|right|bottom|top/g,e=>nOe[e])}function lOe(t){return{top:0,right:0,bottom:0,left:0,...t}}function MK(t){return typeof t!="number"?lOe(t):{top:t,right:t,bottom:t,left:t}}function Gb(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function DO(t,e,r){let{reference:n,floating:s}=t;const i=nh(e),o=lS(e),a=cS(o),c=Ua(e),l=i==="y",f=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,d=n[a]/2-s[a]/2;let h;switch(c){case"top":h={x:f,y:n.y-s.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-s.width,y:u};break;default:h={x:n.x,y:n.y}}switch(rh(e)){case"start":h[o]-=d*(r&&l?-1:1);break;case"end":h[o]+=d*(r&&l?-1:1);break}return h}const fOe=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=DO(l,n,c),d=n,h={},v=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:c}=e,{element:l,padding:f=0}=qa(t,e)||{};if(l==null)return{};const u=MK(f),d={x:r,y:n},h=lS(s),v=cS(h),y=await o.getDimensions(l),m=h==="y",g=m?"top":"left",b=m?"bottom":"right",x=m?"clientHeight":"clientWidth",k=i.reference[v]+i.reference[h]-d[h]-i.floating[v],$=d[h]-i.reference[h],I=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let M=I?I[x]:0;(!M||!await(o.isElement==null?void 0:o.isElement(I)))&&(M=a.floating[x]||i.floating[v]);const D=k/2-$/2,H=M/2-y[v]/2-1,G=Cl(u[g],H),V=Cl(u[b],H),Q=G,F=M-y[v]-V,C=M/2-y[v]/2+D,S=yE(Q,C,F),T=!c.arrow&&rh(s)!=null&&C!==S&&i.reference[v]/2-(CQ<=0)){var H,G;const Q=(((H=i.flip)==null?void 0:H.index)||0)+1,F=$[Q];if(F)return{data:{index:Q,overflows:D},reset:{placement:F}};let C=(G=D.filter(S=>S.overflows[0]<=0).sort((S,T)=>S.overflows[1]-T.overflows[1])[0])==null?void 0:G.placement;if(!C)switch(h){case"bestFit":{var V;const S=(V=D.map(T=>[T.placement,T.overflows.filter(R=>R>0).reduce((R,A)=>R+A,0)]).sort((T,R)=>T[1]-R[1])[0])==null?void 0:V[0];S&&(C=S);break}case"initialPlacement":C=a;break}if(s!==C)return{reset:{placement:C}}}return{}}}};function LO(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function BO(t){return rOe.some(e=>t[e]>=0)}const hOe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=qa(t,e);switch(n){case"referenceHidden":{const i=await Fv(e,{...s,elementContext:"reference"}),o=LO(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:BO(o)}}}case"escaped":{const i=await Fv(e,{...s,altBoundary:!0}),o=LO(i,r.floating);return{data:{escapedOffsets:o,escaped:BO(o)}}}default:return{}}}}};async function vOe(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Ua(r),a=rh(r),c=nh(r)==="y",l=["left","top"].includes(o)?-1:1,f=i&&c?-1:1,u=qa(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),c?{x:h*f,y:d*l}:{x:d*l,y:h*f}}const yOe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=e,c=await vOe(e,t);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:o}}}}},pOe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:m=>{let{x:g,y:b}=m;return{x:g,y:b}}},...c}=qa(t,e),l={x:r,y:n},f=await Fv(e,c),u=nh(Ua(s)),d=aS(u);let h=l[d],v=l[u];if(i){const m=d==="y"?"top":"left",g=d==="y"?"bottom":"right",b=h+f[m],x=h-f[g];h=yE(b,h,x)}if(o){const m=u==="y"?"top":"left",g=u==="y"?"bottom":"right",b=v+f[m],x=v-f[g];v=yE(b,v,x)}const y=a.fn({...e,[d]:h,[u]:v});return{...y,data:{x:y.x-r,y:y.y-n}}}}},mOe=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=qa(t,e),f={x:r,y:n},u=nh(s),d=aS(u);let h=f[d],v=f[u];const y=qa(a,e),m=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const x=d==="y"?"height":"width",k=i.reference[d]-i.floating[x]+m.mainAxis,$=i.reference[d]+i.reference[x]-m.mainAxis;h$&&(h=$)}if(l){var g,b;const x=d==="y"?"width":"height",k=["top","left"].includes(Ua(s)),$=i.reference[u]-i.floating[x]+(k&&((g=o.offset)==null?void 0:g[u])||0)+(k?0:m.crossAxis),I=i.reference[u]+i.reference[x]+(k?0:((b=o.offset)==null?void 0:b[u])||0)-(k?m.crossAxis:0);v<$?v=$:v>I&&(v=I)}return{[d]:h,[u]:v}}}},gOe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=qa(t,e),c=await Fv(e,a),l=Ua(r),f=rh(r),u=nh(r)==="y",{width:d,height:h}=n.floating;let v,y;l==="top"||l==="bottom"?(v=l,y=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=l,v=f==="end"?"top":"bottom");const m=h-c[v],g=d-c[y],b=!e.middlewareData.shift;let x=m,k=g;if(u){const I=d-c.left-c.right;k=f||b?Cl(g,I):I}else{const I=h-c.top-c.bottom;x=f||b?Cl(m,I):I}if(b&&!f){const I=Ps(c.left,0),M=Ps(c.right,0),D=Ps(c.top,0),H=Ps(c.bottom,0);u?k=d-2*(I!==0||M!==0?I+M:Ps(c.left,c.right)):x=h-2*(D!==0||H!==0?D+H:Ps(c.top,c.bottom))}await o({...e,availableWidth:k,availableHeight:x});const $=await s.getDimensions(i.floating);return d!==$.width||h!==$.height?{reset:{rects:!0}}:{}}}};function kl(t){return NK(t)?(t.nodeName||"").toLowerCase():"#document"}function Ms(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function sc(t){var e;return(e=(NK(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function NK(t){return t instanceof Node||t instanceof Ms(t).Node}function Wa(t){return t instanceof Element||t instanceof Ms(t).Element}function Vo(t){return t instanceof HTMLElement||t instanceof Ms(t).HTMLElement}function FO(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ms(t).ShadowRoot}function Ny(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=Ci(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function bOe(t){return["table","td","th"].includes(kl(t))}function fS(t){const e=uS(),r=Ci(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 xOe(t){let e=p1(t);for(;Vo(e)&&!hw(e);){if(fS(e))return e;e=p1(e)}return null}function uS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function hw(t){return["html","body","#document"].includes(kl(t))}function Ci(t){return Ms(t).getComputedStyle(t)}function vw(t){return Wa(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function p1(t){if(kl(t)==="html")return t;const e=t.assignedSlot||t.parentNode||FO(t)&&t.host||sc(t);return FO(e)?e.host:e}function jK(t){const e=p1(t);return hw(e)?t.ownerDocument?t.ownerDocument.body:t.body:Vo(e)&&Ny(e)?e:jK(e)}function zv(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=jK(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=Ms(s);return i?e.concat(o,o.visualViewport||[],Ny(s)?s:[],o.frameElement&&r?zv(o.frameElement):[]):e.concat(s,zv(s,[],r))}function DK(t){const e=Ci(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=Vo(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=Hb(r)!==i||Hb(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function dS(t){return Wa(t)?t:t.contextElement}function Dd(t){const e=dS(t);if(!Vo(e))return El(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=DK(e);let o=(i?Hb(r.width):r.width)/n,a=(i?Hb(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const wOe=El(0);function LK(t){const e=Ms(t);return!uS()||!e.visualViewport?wOe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function COe(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Ms(t)?!1:e}function Jf(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=dS(t);let o=El(1);e&&(n?Wa(n)&&(o=Dd(n)):o=Dd(t));const a=COe(i,r,n)?LK(i):El(0);let c=(s.left+a.x)/o.x,l=(s.top+a.y)/o.y,f=s.width/o.x,u=s.height/o.y;if(i){const d=Ms(i),h=n&&Wa(n)?Ms(n):n;let v=d,y=v.frameElement;for(;y&&n&&h!==v;){const m=Dd(y),g=y.getBoundingClientRect(),b=Ci(y),x=g.left+(y.clientLeft+parseFloat(b.paddingLeft))*m.x,k=g.top+(y.clientTop+parseFloat(b.paddingTop))*m.y;c*=m.x,l*=m.y,f*=m.x,u*=m.y,c+=x,l+=k,v=Ms(y),y=v.frameElement}}return Gb({width:f,height:u,x:c,y:l})}const EOe=[":popover-open",":modal"];function BK(t){return EOe.some(e=>{try{return t.matches(e)}catch{return!1}})}function kOe(t){let{elements:e,rect:r,offsetParent:n,strategy:s}=t;const i=s==="fixed",o=sc(n),a=e?BK(e.floating):!1;if(n===o||a&&i)return r;let c={scrollLeft:0,scrollTop:0},l=El(1);const f=El(0),u=Vo(n);if((u||!u&&!i)&&((kl(n)!=="body"||Ny(o))&&(c=vw(n)),Vo(n))){const d=Jf(n);l=Dd(n),f.x=d.x+n.clientLeft,f.y=d.y+n.clientTop}return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+f.x,y:r.y*l.y-c.scrollTop*l.y+f.y}}function SOe(t){return Array.from(t.getClientRects())}function FK(t){return Jf(sc(t)).left+vw(t).scrollLeft}function AOe(t){const e=sc(t),r=vw(t),n=t.ownerDocument.body,s=Ps(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Ps(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+FK(t);const a=-r.scrollTop;return Ci(n).direction==="rtl"&&(o+=Ps(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function $Oe(t,e){const r=Ms(t),n=sc(t),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,c=0;if(s){i=s.width,o=s.height;const l=uS();(!l||l&&e==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:a,y:c}}function _Oe(t,e){const r=Jf(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=Vo(t)?Dd(t):El(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,c=s*i.x,l=n*i.y;return{width:o,height:a,x:c,y:l}}function zO(t,e,r){let n;if(e==="viewport")n=$Oe(t,r);else if(e==="document")n=AOe(sc(t));else if(Wa(e))n=_Oe(e,r);else{const s=LK(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return Gb(n)}function zK(t,e){const r=p1(t);return r===e||!Wa(r)||hw(r)?!1:Ci(r).position==="fixed"||zK(r,e)}function POe(t,e){const r=e.get(t);if(r)return r;let n=zv(t,[],!1).filter(a=>Wa(a)&&kl(a)!=="body"),s=null;const i=Ci(t).position==="fixed";let o=i?p1(t):t;for(;Wa(o)&&!hw(o);){const a=Ci(o),c=fS(o);!c&&a.position==="fixed"&&(s=null),(i?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Ny(o)&&!c&&zK(t,o))?n=n.filter(f=>f!==o):s=a,o=p1(o)}return e.set(t,n),n}function IOe(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?POe(e,this._c):[].concat(r),n],a=o[0],c=o.reduce((l,f)=>{const u=zO(e,f,s);return l.top=Ps(u.top,l.top),l.right=Cl(u.right,l.right),l.bottom=Cl(u.bottom,l.bottom),l.left=Ps(u.left,l.left),l},zO(e,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function TOe(t){const{width:e,height:r}=DK(t);return{width:e,height:r}}function OOe(t,e,r){const n=Vo(e),s=sc(e),i=r==="fixed",o=Jf(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=El(0);if(n||!n&&!i)if((kl(e)!=="body"||Ny(s))&&(a=vw(e)),n){const u=Jf(e,!0,i,e);c.x=u.x+e.clientLeft,c.y=u.y+e.clientTop}else s&&(c.x=FK(s));const l=o.left+a.scrollLeft-c.x,f=o.top+a.scrollTop-c.y;return{x:l,y:f,width:o.width,height:o.height}}function qO(t,e){return!Vo(t)||Ci(t).position==="fixed"?null:e?e(t):t.offsetParent}function qK(t,e){const r=Ms(t);if(!Vo(t)||BK(t))return r;let n=qO(t,e);for(;n&&bOe(n)&&Ci(n).position==="static";)n=qO(n,e);return n&&(kl(n)==="html"||kl(n)==="body"&&Ci(n).position==="static"&&!fS(n))?r:n||xOe(t)||r}const ROe=async function(t){const e=this.getOffsetParent||qK,r=this.getDimensions;return{reference:OOe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await r(t.floating)}}};function MOe(t){return Ci(t).direction==="rtl"}const NOe={convertOffsetParentRelativeRectToViewportRelativeRect:kOe,getDocumentElement:sc,getClippingRect:IOe,getOffsetParent:qK,getElementRects:ROe,getClientRects:SOe,getDimensions:TOe,getScale:Dd,isElement:Wa,isRTL:MOe};function jOe(t,e){let r=null,n;const s=sc(t);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:f,width:u,height:d}=t.getBoundingClientRect();if(a||e(),!u||!d)return;const h=Kp(f),v=Kp(s.clientWidth-(l+u)),y=Kp(s.clientHeight-(f+d)),m=Kp(l),b={rootMargin:-h+"px "+-v+"px "+-y+"px "+-m+"px",threshold:Ps(0,Cl(1,c))||1};let x=!0;function k($){const I=$[0].intersectionRatio;if(I!==c){if(!x)return o();I?o(!1,I):n=setTimeout(()=>{o(!1,1e-7)},100)}x=!1}try{r=new IntersectionObserver(k,{...b,root:s.ownerDocument})}catch{r=new IntersectionObserver(k,b)}r.observe(t)}return o(!0),i}function DOe(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=dS(t),f=s||i?[...l?zv(l):[],...zv(e)]:[];f.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const u=l&&a?jOe(l,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(g=>{let[b]=g;b&&b.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(e)})),r()}),l&&!c&&h.observe(l),h.observe(e));let v,y=c?Jf(t):null;c&&m();function m(){const g=Jf(t);y&&(g.x!==y.x||g.y!==y.y||g.width!==y.width||g.height!==y.height)&&r(),y=g,v=requestAnimationFrame(m)}return r(),()=>{var g;f.forEach(b=>{s&&b.removeEventListener("scroll",r),i&&b.removeEventListener("resize",r)}),u==null||u(),(g=h)==null||g.disconnect(),h=null,c&&cancelAnimationFrame(v)}}const LOe=pOe,BOe=dOe,FOe=gOe,zOe=hOe,UO=uOe,qOe=mOe,UOe=(t,e,r)=>{const n=new Map,s={platform:NOe,...r},i={...s.platform,_c:n};return fOe(t,e,{...s,platform:i})},WOe=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?UO({element:n.current,padding:s}).fn(r):{}:n?UO({element:n,padding:s}).fn(r):{}}}};var Um=typeof document<"u"?p.useLayoutEffect:p.useEffect;function Kb(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,s;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(!Kb(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!Kb(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function UK(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function WO(t,e){const r=UK(t);return Math.round(e*r)/r}function HO(t){const e=p.useRef(t);return Um(()=>{e.current=t}),e}function HOe(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=t,[f,u]=p.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=p.useState(n);Kb(d,n)||h(n);const[v,y]=p.useState(null),[m,g]=p.useState(null),b=p.useCallback(R=>{R!==I.current&&(I.current=R,y(R))},[]),x=p.useCallback(R=>{R!==M.current&&(M.current=R,g(R))},[]),k=i||v,$=o||m,I=p.useRef(null),M=p.useRef(null),D=p.useRef(f),H=c!=null,G=HO(c),V=HO(s),Q=p.useCallback(()=>{if(!I.current||!M.current)return;const R={placement:e,strategy:r,middleware:d};V.current&&(R.platform=V.current),UOe(I.current,M.current,R).then(A=>{const N={...A,isPositioned:!0};F.current&&!Kb(D.current,N)&&(D.current=N,bn.flushSync(()=>{u(N)}))})},[d,e,r,V]);Um(()=>{l===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[l]);const F=p.useRef(!1);Um(()=>(F.current=!0,()=>{F.current=!1}),[]),Um(()=>{if(k&&(I.current=k),$&&(M.current=$),k&&$){if(G.current)return G.current(k,$,Q);Q()}},[k,$,Q,G,H]);const C=p.useMemo(()=>({reference:I,floating:M,setReference:b,setFloating:x}),[b,x]),S=p.useMemo(()=>({reference:k,floating:$}),[k,$]),T=p.useMemo(()=>{const R={position:r,left:0,top:0};if(!S.floating)return R;const A=WO(S.floating,f.x),N=WO(S.floating,f.y);return a?{...R,transform:"translate("+A+"px, "+N+"px)",...UK(S.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:A,top:N}},[r,a,S.floating,f.x,f.y]);return p.useMemo(()=>({...f,update:Q,refs:C,elements:S,floatingStyles:T}),[f,Q,C,S,T])}function VOe(t){const[e,r]=p.useState(void 0);return y1(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.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}const WK="Popper",[HK,VK]=TK(WK),[GOe,GK]=HK(WK),KOe=t=>{const{__scopePopper:e,children:r}=t,[n,s]=p.useState(null);return p.createElement(GOe,{scope:e,anchor:n,onAnchorChange:s},r)},YOe="PopperAnchor",QOe=p.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=GK(YOe,r),o=p.useRef(null),a=hu(e,o);return p.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:p.createElement(My.div,Wb({},s,{ref:a}))}),KK="PopperContent",[JOe,OFe]=HK(KK),XOe=p.forwardRef((t,e)=>{var r,n,s,i,o,a,c,l;const{__scopePopper:f,side:u="bottom",sideOffset:d=0,align:h="center",alignOffset:v=0,arrowPadding:y=0,avoidCollisions:m=!0,collisionBoundary:g=[],collisionPadding:b=0,sticky:x="partial",hideWhenDetached:k=!1,updatePositionStrategy:$="optimized",onPlaced:I,...M}=t,D=GK(KK,f),[H,G]=p.useState(null),V=hu(e,pe=>G(pe)),[Q,F]=p.useState(null),C=VOe(Q),S=(r=C==null?void 0:C.width)!==null&&r!==void 0?r:0,T=(n=C==null?void 0:C.height)!==null&&n!==void 0?n:0,R=u+(h!=="center"?"-"+h:""),A=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},N=Array.isArray(g)?g:[g],B=N.length>0,P={padding:A,boundary:N.filter(ZOe),altBoundary:B},{refs:E,floatingStyles:L,placement:q,isPositioned:_,middlewareData:U}=HOe({strategy:"fixed",placement:R,whileElementsMounted:(...pe)=>DOe(...pe,{animationFrame:$==="always"}),elements:{reference:D.anchor},middleware:[yOe({mainAxis:d+T,alignmentAxis:v}),m&&LOe({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?qOe():void 0,...P}),m&&BOe({...P}),FOe({...P,apply:({elements:pe,rects:$e,availableWidth:Se,availableHeight:_e})=>{const{width:Ye,height:it}=$e.reference,ze=pe.floating.style;ze.setProperty("--radix-popper-available-width",`${Se}px`),ze.setProperty("--radix-popper-available-height",`${_e}px`),ze.setProperty("--radix-popper-anchor-width",`${Ye}px`),ze.setProperty("--radix-popper-anchor-height",`${it}px`)}}),Q&&WOe({element:Q,padding:y}),eRe({arrowWidth:S,arrowHeight:T}),k&&zOe({strategy:"referenceHidden",...P})]}),[W,J]=YK(q),X=wl(I);y1(()=>{_&&(X==null||X())},[_,X]);const re=(s=U.arrow)===null||s===void 0?void 0:s.x,ee=(i=U.arrow)===null||i===void 0?void 0:i.y,se=((o=U.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[xe,de]=p.useState();return y1(()=>{H&&de(window.getComputedStyle(H).zIndex)},[H]),p.createElement("div",{ref:E.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:_?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[(a=U.transformOrigin)===null||a===void 0?void 0:a.x,(c=U.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:t.dir},p.createElement(JOe,{scope:f,placedSide:W,onArrowChange:F,arrowX:re,arrowY:ee,shouldHideArrow:se},p.createElement(My.div,Wb({"data-side":W,"data-align":J},M,{ref:V,style:{...M.style,animation:_?void 0:"none",opacity:(l=U.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))});function ZOe(t){return t!==null}const eRe=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s,i,o;const{placement:a,rects:c,middlewareData:l}=e,u=((r=l.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[v,y]=YK(a),m={start:"0%",center:"50%",end:"100%"}[y],g=((n=(s=l.arrow)===null||s===void 0?void 0:s.x)!==null&&n!==void 0?n:0)+d/2,b=((i=(o=l.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+h/2;let x="",k="";return v==="bottom"?(x=u?m:`${g}px`,k=`${-h}px`):v==="top"?(x=u?m:`${g}px`,k=`${c.floating.height+h}px`):v==="right"?(x=`${-h}px`,k=u?m:`${b}px`):v==="left"&&(x=`${c.floating.width+h}px`,k=u?m:`${b}px`),{data:{x,y:k}}}});function YK(t){const[e,r="center"]=t.split("-");return[e,r]}const tRe=KOe,QK=QOe,rRe=XOe;function nRe(t,e){return p.useReducer((r,n)=>{const s=e[r][n];return s??r},t)}const JK=t=>{const{present:e,children:r}=t,n=sRe(e),s=typeof r=="function"?r({present:n.isPresent}):p.Children.only(r),i=hu(n.ref,s.ref);return typeof r=="function"||n.isPresent?p.cloneElement(s,{ref:i}):null};JK.displayName="Presence";function sRe(t){const[e,r]=p.useState(),n=p.useRef({}),s=p.useRef(t),i=p.useRef("none"),o=t?"mounted":"unmounted",[a,c]=nRe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const l=Yp(n.current);i.current=a==="mounted"?l:"none"},[a]),y1(()=>{const l=n.current,f=s.current;if(f!==t){const d=i.current,h=Yp(l);t?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),y1(()=>{if(e){const l=u=>{const h=Yp(n.current).includes(u.animationName);u.target===e&&h&&bn.flushSync(()=>c("ANIMATION_END"))},f=u=>{u.target===e&&(i.current=Yp(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:p.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function Yp(t){return(t==null?void 0:t.animationName)||"none"}function iRe({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=oRe({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=wl(r),c=p.useCallback(l=>{if(i){const u=typeof l=="function"?l(t):l;u!==t&&a(u)}else s(l)},[i,t,s,a]);return[o,c]}function oRe({defaultProp:t,onChange:e}){const r=p.useState(t),[n]=r,s=p.useRef(n),i=wl(e);return p.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}var aRe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Mu=new WeakMap,Qp=new WeakMap,Jp={},j6=0,XK=function(t){return t&&(t.host||XK(t.parentNode))},cRe=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=XK(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})},lRe=function(t,e,r,n){var s=cRe(e,Array.isArray(t)?t:[t]);Jp[r]||(Jp[r]=new WeakMap);var i=Jp[r],o=[],a=new Set,c=new Set(s),l=function(u){!u||a.has(u)||(a.add(u),l(u.parentNode))};s.forEach(l);var f=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else{var h=d.getAttribute(n),v=h!==null&&h!=="false",y=(Mu.get(d)||0)+1,m=(i.get(d)||0)+1;Mu.set(d,y),i.set(d,m),o.push(d),y===1&&v&&Qp.set(d,!0),m===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}})};return f(e),a.clear(),j6++,function(){o.forEach(function(u){var d=Mu.get(u)-1,h=i.get(u)-1;Mu.set(u,d),i.set(u,h),d||(Qp.has(u)||u.removeAttribute(n),Qp.delete(u)),h||u.removeAttribute(r)}),j6--,j6||(Mu=new WeakMap,Mu=new WeakMap,Qp=new WeakMap,Jp={})}},fRe=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=e||aRe(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),lRe(n,s,r,"aria-hidden")):function(){return null}},Wm="right-scroll-bar-position",Hm="width-before-scroll-bar",uRe="with-scroll-bars-hidden",dRe="--removed-body-scroll-bar-size";function D6(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function hRe(t,e){var r=p.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=e,r.facade}var VO=new WeakMap;function vRe(t,e){var r=hRe(e||null,function(n){return t.forEach(function(s){return D6(s,n)})});return p.useLayoutEffect(function(){var n=VO.get(r);if(n){var s=new Set(n),i=new Set(t),o=r.current;s.forEach(function(a){i.has(a)||D6(a,null)}),i.forEach(function(a){s.has(a)||D6(a,o)})}VO.set(r,t)},[t]),r}function yRe(t){return t}function pRe(t,e){e===void 0&&(e=yRe);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(i){var o=e(i,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(i),o=r}var c=function(){var f=o;o=[],f.forEach(i)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(f){o.push(f),l()},filter:function(f){return o=o.filter(f),r}}}};return s}function mRe(t){t===void 0&&(t={});var e=pRe(null);return e.options=ai({async:!0,ssr:!1},t),e}var ZK=function(t){var e=t.sideCar,r=nx(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return p.createElement(n,ai({},r))};ZK.isSideCarExport=!0;function gRe(t,e){return t.useMedium(e),ZK}var eY=mRe(),L6=function(){},yw=p.forwardRef(function(t,e){var r=p.useRef(null),n=p.useState({onScrollCapture:L6,onWheelCapture:L6,onTouchMoveCapture:L6}),s=n[0],i=n[1],o=t.forwardProps,a=t.children,c=t.className,l=t.removeScrollBar,f=t.enabled,u=t.shards,d=t.sideCar,h=t.noIsolation,v=t.inert,y=t.allowPinchZoom,m=t.as,g=m===void 0?"div":m,b=nx(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=d,k=vRe([r,e]),$=ai(ai({},b),s);return p.createElement(p.Fragment,null,f&&p.createElement(x,{sideCar:eY,removeScrollBar:l,shards:u,noIsolation:h,inert:v,setCallbacks:i,allowPinchZoom:!!y,lockRef:r}),o?p.cloneElement(p.Children.only(a),ai(ai({},$),{ref:k})):p.createElement(g,ai({},$,{className:c,ref:k}),a))});yw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yw.classNames={fullWidth:Hm,zeroRight:Wm};var bRe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function xRe(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=bRe();return e&&t.setAttribute("nonce",e),t}function wRe(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function CRe(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var ERe=function(){var t=0,e=null;return{add:function(r){t==0&&(e=xRe())&&(wRe(e,r),CRe(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},kRe=function(){var t=ERe();return function(e,r){p.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},tY=function(){var t=kRe(),e=function(r){var n=r.styles,s=r.dynamic;return t(n,s),null};return e},SRe={left:0,top:0,right:0,gap:0},B6=function(t){return parseInt(t||"",10)||0},ARe=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[B6(r),B6(n),B6(s)]},$Re=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return SRe;var e=ARe(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])}},_Re=tY(),PRe=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + .`.concat(uRe,` { + 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(s,`px; + padding-top: `).concat(i,`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(Wm,` { + right: `).concat(a,"px ").concat(n,`; + } + + .`).concat(Hm,` { + margin-right: `).concat(a,"px ").concat(n,`; + } + + .`).concat(Wm," .").concat(Wm,` { + right: 0 `).concat(n,`; + } + + .`).concat(Hm," .").concat(Hm,` { + margin-right: 0 `).concat(n,`; + } + + body { + `).concat(dRe,": ").concat(a,`px; + } +`)},IRe=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n,i=p.useMemo(function(){return $Re(s)},[s]);return p.createElement(_Re,{styles:PRe(i,!e,s,r?"":"!important")})},mE=!1;if(typeof window<"u")try{var Xp=Object.defineProperty({},"passive",{get:function(){return mE=!0,!0}});window.addEventListener("test",Xp,Xp),window.removeEventListener("test",Xp,Xp)}catch{mE=!1}var Nu=mE?{passive:!1}:!1,TRe=function(t){return t.tagName==="TEXTAREA"},rY=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!TRe(t)&&r[e]==="visible")},ORe=function(t){return rY(t,"overflowY")},RRe=function(t){return rY(t,"overflowX")},GO=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=nY(t,r);if(n){var s=sY(t,r),i=s[1],o=s[2];if(i>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},MRe=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},NRe=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},nY=function(t,e){return t==="v"?ORe(e):RRe(e)},sY=function(t,e){return t==="v"?MRe(e):NRe(e)},jRe=function(t,e){return t==="h"&&e==="rtl"?-1:1},DRe=function(t,e,r,n,s){var i=jRe(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,c=e.contains(a),l=!1,f=o>0,u=0,d=0;do{var h=sY(t,a),v=h[0],y=h[1],m=h[2],g=y-m-i*v;(v||g)&&nY(t,a)&&(u+=g,d+=v),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(f&&(s&&u===0||!s&&o>u)||!f&&(s&&d===0||!s&&-o>d))&&(l=!0),l},Zp=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},KO=function(t){return[t.deltaX,t.deltaY]},YO=function(t){return t&&"current"in t?t.current:t},LRe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},BRe=function(t){return` + .block-interactivity-`.concat(t,` {pointer-events: none;} + .allow-interactivity-`).concat(t,` {pointer-events: all;} +`)},FRe=0,ju=[];function zRe(t){var e=p.useRef([]),r=p.useRef([0,0]),n=p.useRef(),s=p.useState(FRe++)[0],i=p.useState(function(){return tY()})[0],o=p.useRef(t);p.useEffect(function(){o.current=t},[t]),p.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=p7([t.lockRef.current],(t.shards||[]).map(YO),!0).filter(Boolean);return y.forEach(function(m){return m.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=p.useCallback(function(y,m){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var g=Zp(y),b=r.current,x="deltaX"in y?y.deltaX:b[0]-g[0],k="deltaY"in y?y.deltaY:b[1]-g[1],$,I=y.target,M=Math.abs(x)>Math.abs(k)?"h":"v";if("touches"in y&&M==="h"&&I.type==="range")return!1;var D=GO(M,I);if(!D)return!0;if(D?$=M:($=M==="v"?"h":"v",D=GO(M,I)),!D)return!1;if(!n.current&&"changedTouches"in y&&(x||k)&&(n.current=$),!$)return!0;var H=n.current||$;return DRe(H,m,y,H==="h"?x:k,!0)},[]),c=p.useCallback(function(y){var m=y;if(!(!ju.length||ju[ju.length-1]!==i)){var g="deltaY"in m?KO(m):Zp(m),b=e.current.filter(function($){return $.name===m.type&&$.target===m.target&&LRe($.delta,g)})[0];if(b&&b.should){m.cancelable&&m.preventDefault();return}if(!b){var x=(o.current.shards||[]).map(YO).filter(Boolean).filter(function($){return $.contains(m.target)}),k=x.length>0?a(m,x[0]):!o.current.noIsolation;k&&m.cancelable&&m.preventDefault()}}},[]),l=p.useCallback(function(y,m,g,b){var x={name:y,delta:m,target:g,should:b};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(k){return k!==x})},1)},[]),f=p.useCallback(function(y){r.current=Zp(y),n.current=void 0},[]),u=p.useCallback(function(y){l(y.type,KO(y),y.target,a(y,t.lockRef.current))},[]),d=p.useCallback(function(y){l(y.type,Zp(y),y.target,a(y,t.lockRef.current))},[]);p.useEffect(function(){return ju.push(i),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Nu),document.addEventListener("touchmove",c,Nu),document.addEventListener("touchstart",f,Nu),function(){ju=ju.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Nu),document.removeEventListener("touchmove",c,Nu),document.removeEventListener("touchstart",f,Nu)}},[]);var h=t.removeScrollBar,v=t.inert;return p.createElement(p.Fragment,null,v?p.createElement(i,{styles:BRe(s)}):null,h?p.createElement(IRe,{gapMode:"margin"}):null)}const qRe=gRe(eY,zRe);var iY=p.forwardRef(function(t,e){return p.createElement(yw,ai({},t,{ref:e,sideCar:qRe}))});iY.classNames=yw.classNames;const URe=iY,oY="Popover",[aY,RFe]=TK(oY,[VK]),pw=VK(),[WRe,sh]=aY(oY),HRe=t=>{const{__scopePopover:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!1}=t,a=pw(e),c=p.useRef(null),[l,f]=p.useState(!1),[u=!1,d]=iRe({prop:n,defaultProp:s,onChange:i});return p.createElement(tRe,a,p.createElement(WRe,{scope:e,contentId:tOe(),triggerRef:c,open:u,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(h=>!h),[d]),hasCustomAnchor:l,onCustomAnchorAdd:p.useCallback(()=>f(!0),[]),onCustomAnchorRemove:p.useCallback(()=>f(!1),[]),modal:o},r))},VRe="PopoverAnchor",GRe=p.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,s=sh(VRe,r),i=pw(r),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=s;return p.useEffect(()=>(o(),()=>a()),[o,a]),p.createElement(QK,Jn({},i,n,{ref:e}))}),KRe="PopoverTrigger",YRe=p.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,s=sh(KRe,r),i=pw(r),o=hu(e,s.triggerRef),a=p.createElement(My.button,Jn({type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":lY(s.open)},n,{ref:o,onClick:_f(t.onClick,s.onOpenToggle)}));return s.hasCustomAnchor?a:p.createElement(QK,Jn({asChild:!0},i),a)}),QRe="PopoverPortal",[MFe,JRe]=aY(QRe,{forceMount:void 0}),qv="PopoverContent",XRe=p.forwardRef((t,e)=>{const r=JRe(qv,t.__scopePopover),{forceMount:n=r.forceMount,...s}=t,i=sh(qv,t.__scopePopover);return p.createElement(JK,{present:n||i.open},i.modal?p.createElement(ZRe,Jn({},s,{ref:e})):p.createElement(eMe,Jn({},s,{ref:e})))}),ZRe=p.forwardRef((t,e)=>{const r=sh(qv,t.__scopePopover),n=p.useRef(null),s=hu(e,n),i=p.useRef(!1);return p.useEffect(()=>{const o=n.current;if(o)return fRe(o)},[]),p.createElement(URe,{as:oS,allowPinchZoom:!0},p.createElement(cY,Jn({},t,{ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_f(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),i.current||(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:_f(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;i.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:_f(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})))}),eMe=p.forwardRef((t,e)=>{const r=sh(qv,t.__scopePopover),n=p.useRef(!1),s=p.useRef(!1);return p.createElement(cY,Jn({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,i),!i.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}n.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=i.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}}))}),cY=p.forwardRef((t,e)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:f,...u}=t,d=sh(qv,r),h=pw(r);return HTe(),p.createElement(VTe,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i},p.createElement(qTe,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>d.onOpenChange(!1)},p.createElement(rRe,Jn({"data-state":lY(d.open),role:"dialog",id:d.contentId},h,u,{ref:e,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))});function lY(t){return t?"open":"closed"}const tMe=HRe,rMe=GRe,nMe=YRe,sMe=XRe,fY=()=>{const t=w.createContext(void 0);return[()=>{const r=w.useContext(t);if(!r)throw new Error("useGenericContext must be used within a Provider");return r},t.Provider]};fY();function Uv(){return Uv=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}const oMe=(t,e)=>t.toLowerCase()===e.toLowerCase();var bc=function(t){return t[t.VERY_LARGE=0]="VERY_LARGE",t[t.FRACTION=1]="FRACTION",t[t.VERY_TINY=2]="VERY_TINY",t[t.MIXED=3]="MIXED",t}(bc||{});const aMe=t=>{if(isNaN(Number(t)))return console.error(`display format error ${t} is not a number`),"NaN";const e=Number(t);if(e===0)return"0";let r;e>1e8?r=bc.VERY_LARGE:e<1e-10?r=bc.VERY_TINY:e<1?r=bc.FRACTION:r=bc.MIXED;let n,s;switch(r){case bc.VERY_LARGE:n="compact",s={maximumFractionDigits:4};break;case bc.VERY_TINY:n="scientific",s={maximumFractionDigits:4};break;case bc.FRACTION:n="standard",s={maximumSignificantDigits:4};break;default:n="standard",s={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",Uv({notation:n},s)).format(e)},cMe=t=>t.charAt(0).toUpperCase()+t.slice(1),lMe=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=pr(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:Lt,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:oi.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},fMe=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await pr(e),n=await r.getCoinPrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},uMe=async({accountAddress:t,chainId:e,contractAddress:r},{hideUnlistedTokens:n,hideCollectibles:s,includeMetadata:i=!0,verifiedOnly:o})=>{try{const{indexerClient:a}=pr(e),c=await a.getTokenBalances(Uv({accountAddress:t,includeMetadata:i,metadataOptions:{verifiedOnly:o??!0}},r?{contractAddress:r}:{}));let l=(c==null?void 0:c.balances)||[];if(n&&l.length>0){const f=await fMe({tokens:l.map(u=>({chainId:u.chainId,contractAddress:u.contractAddress,tokenId:u.tokenID}))});l=l.filter(u=>{const d=f==null?void 0:f.find(h=>oMe(h.token.contractAddress,u.contractAddress)&&h.token.chainId===u.chainId);return u.contractType!=="ERC20"||!!d&&d.price!==null})}return s&&l.length>0&&(l=l.filter(f=>f.contractType!=="ERC721"&&f.contractType!=="ERC1155")),l}catch(a){return console.error(a),[]}},dMe=async({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})=>{try{return(await Promise.all([lMe({accountAddress:t,chainId:e}),uMe({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})])).flat()}catch(s){return console.error(s),[]}},hMe=async({tokens:t})=>{const{metadataClient:e}=pr(t.chainId);return(await e.getTokenMetadata({chainID:t.chainId.toString(),contractAddress:t.contractAddress,tokenIDs:t.tokenIds})).tokenMetadata},vMe=["chainIds"],uY={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},yMe=(t,e)=>wn({queryKey:["balances",t,e],queryFn:async()=>{const{chainIds:r}=t,n=iMe(t,vMe);return(await Promise.all(r.map(i=>dMe(Uv({},n,{chainId:i}),e)))).flat()},retry:!0,staleTime:uY.oneSecond*30,enabled:t.chainIds.length>0&&!!t.accountAddress}),pMe=t=>wn({queryKey:["useTokenMetadata",t],queryFn:()=>hMe(t),retry:!0,staleTime:uY.oneMinute*10,enabled:!!t.tokens.chainId&&!!t.tokens.contractAddress});fY();const mMe=({size:t=30})=>w.createElement(ge,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",flexShrink:"0",style:{width:`${t}px`,height:`${t}px`}},w.createElement(at,{variant:"large",color:"textInverse100"},"?")),gMe=({imageUrl:t,size:e=30})=>t?w.createElement(V1,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):w.createElement(mMe,{size:e}),dY=({imageUrl:t})=>w.createElement(a1,{padding:"0",aspectRatio:"1/1",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:"sm",background:"backgroundSecondary"},w.createElement(V1,{style:{height:"100%"},src:t}));V9("packages/wallet/src/shared/Skeleton/styles.css.ts","kit");const bMe=VAe({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),xMe=no({height:"76px",backgroundColor:"#909090",animation:`${bMe} 2s ease-in-out infinite`},"skeleton");G9();const Dh=({width:t="100%",height:e="100%",borderRadius:r="md",aspectRatio:n})=>w.createElement(ge,{className:xMe,borderRadius:r,aspectRatio:n,style:{width:t,height:e}});V9("packages/wallet/src/shared/styles.css.ts","kit");no({":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"clickable");no({"> div":{overflowY:"scroll"}},"scrollbar");no({},"walletContent");G9();const wMe=({chainId:t})=>{var e;const{chains:r}=Ct(),{network:n}=pr(t),s=Pr(t,r),i=mY(t),o=gY(t);return w.createElement(ge,{height:"6",paddingY:"1",paddingLeft:"1.5",paddingRight:"2",gap:"1",style:{background:o},borderRadius:"xs",flexDirection:"row",justifyContent:"center",alignItems:"center",width:"fit"},w.createElement(V1,{style:{width:"14px"},src:s.logoURI}),w.createElement(at,{fontWeight:"bold",fontSize:"xsmall",style:{color:i}},cMe((e=n.title)!=null?e:n.name)))};var Li={};const CMe=Or(pte),EMe=Or(oee),kMe=Or(Pj),SMe=Or(Sne),AMe=Or(MZ),$Me=Or(hte),_Me=Or(Dne),PMe=Or(Qne),IMe=Or(tee),TMe=Or(OZ),QO=Or(_ne),OMe=Or(Vse),RMe=Or(Fne),MMe=Or(UZ),NMe=Or(dj),jMe=Or(cne),JO=Or(Oee),DMe=Or(pne),LMe=Or(Kse),BMe=Or(ese),FMe=Or(lse);(function(t){var e=ks&&ks.__createBinding||(Object.create?function(V,Q,F,C){C===void 0&&(C=F),Object.defineProperty(V,C,{enumerable:!0,get:function(){return Q[F]}})}:function(V,Q,F,C){C===void 0&&(C=F),V[C]=Q[F]}),r=ks&&ks.__setModuleDefault||(Object.create?function(V,Q){Object.defineProperty(V,"default",{enumerable:!0,value:Q})}:function(V,Q){V.default=Q}),n=ks&&ks.__importStar||function(V){if(V&&V.__esModule)return V;var Q={};if(V!=null)for(var F in V)F!=="default"&&Object.prototype.hasOwnProperty.call(V,F)&&e(Q,V,F);return r(Q,V),Q};Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=t.nameprep=t.hexDataSlice=t.hexDataLength=t.hexZeroPad=t.hexValue=t.hexStripZeros=t.hexConcat=t.isHexString=t.hexlify=t.base64=t.base58=t.TransactionDescription=t.LogDescription=t.Interface=t.SigningKey=t.HDNode=t.defaultPath=t.isBytesLike=t.isBytes=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.shallowCopy=t.resolveProperties=t.getStatic=t.defineReadOnly=t.deepCopy=t.checkProperties=t.poll=t.fetchJson=t._fetchData=t.RLP=t.Logger=t.checkResultErrors=t.FormatTypes=t.ParamType=t.FunctionFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.Fragment=t.defaultAbiCoder=t.AbiCoder=void 0,t.Indexed=t.Utf8ErrorReason=t.UnicodeNormalizationForm=t.SupportedAlgorithm=t.mnemonicToSeed=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.getAccountPath=t.verifyTypedData=t.verifyMessage=t.recoverPublicKey=t.computePublicKey=t.recoverAddress=t.computeAddress=t.getJsonWalletAddress=t.TransactionTypes=t.serializeTransaction=t.parseTransaction=t.accessListify=t.joinSignature=t.splitSignature=t.soliditySha256=t.solidityKeccak256=t.solidityPack=t.shuffled=t.randomBytes=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.computeHmac=t.commify=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.isAddress=t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.getAddress=t._TypedDataEncoder=t.id=t.isValidName=t.namehash=t.hashMessage=t.dnsEncode=t.parseBytes32String=void 0;var s=CMe;Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return s.AbiCoder}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return s.checkResultErrors}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return s.ConstructorFragment}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return s.defaultAbiCoder}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return s.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return s.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return s.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return s.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return s.FunctionFragment}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return s.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return s.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return s.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return s.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return s.TransactionDescription}});var i=EMe;Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return i.getAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return i.getCreate2Address}}),Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return i.getContractAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return i.getIcapAddress}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return i.isAddress}});var o=n(kMe);t.base64=o;var a=SMe;Object.defineProperty(t,"base58",{enumerable:!0,get:function(){return a.Base58}});var c=AMe;Object.defineProperty(t,"arrayify",{enumerable:!0,get:function(){return c.arrayify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return c.concat}}),Object.defineProperty(t,"hexConcat",{enumerable:!0,get:function(){return c.hexConcat}}),Object.defineProperty(t,"hexDataSlice",{enumerable:!0,get:function(){return c.hexDataSlice}}),Object.defineProperty(t,"hexDataLength",{enumerable:!0,get:function(){return c.hexDataLength}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return c.hexlify}}),Object.defineProperty(t,"hexStripZeros",{enumerable:!0,get:function(){return c.hexStripZeros}}),Object.defineProperty(t,"hexValue",{enumerable:!0,get:function(){return c.hexValue}}),Object.defineProperty(t,"hexZeroPad",{enumerable:!0,get:function(){return c.hexZeroPad}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return c.isBytes}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return c.isBytesLike}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return c.isHexString}}),Object.defineProperty(t,"joinSignature",{enumerable:!0,get:function(){return c.joinSignature}}),Object.defineProperty(t,"zeroPad",{enumerable:!0,get:function(){return c.zeroPad}}),Object.defineProperty(t,"splitSignature",{enumerable:!0,get:function(){return c.splitSignature}}),Object.defineProperty(t,"stripZeros",{enumerable:!0,get:function(){return c.stripZeros}});var l=$Me;Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return l._TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return l.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return l.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return l.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return l.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return l.namehash}});var f=_Me;Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return f.defaultPath}}),Object.defineProperty(t,"entropyToMnemonic",{enumerable:!0,get:function(){return f.entropyToMnemonic}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return f.getAccountPath}}),Object.defineProperty(t,"HDNode",{enumerable:!0,get:function(){return f.HDNode}}),Object.defineProperty(t,"isValidMnemonic",{enumerable:!0,get:function(){return f.isValidMnemonic}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return f.mnemonicToEntropy}}),Object.defineProperty(t,"mnemonicToSeed",{enumerable:!0,get:function(){return f.mnemonicToSeed}});var u=PMe;Object.defineProperty(t,"getJsonWalletAddress",{enumerable:!0,get:function(){return u.getJsonWalletAddress}});var d=IMe;Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return d.keccak256}});var h=TMe;Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return h.Logger}});var v=QO;Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return v.computeHmac}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return v.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return v.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return v.sha512}});var y=OMe;Object.defineProperty(t,"solidityKeccak256",{enumerable:!0,get:function(){return y.keccak256}}),Object.defineProperty(t,"solidityPack",{enumerable:!0,get:function(){return y.pack}}),Object.defineProperty(t,"soliditySha256",{enumerable:!0,get:function(){return y.sha256}});var m=RMe;Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return m.randomBytes}}),Object.defineProperty(t,"shuffled",{enumerable:!0,get:function(){return m.shuffled}});var g=MMe;Object.defineProperty(t,"checkProperties",{enumerable:!0,get:function(){return g.checkProperties}}),Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return g.deepCopy}}),Object.defineProperty(t,"defineReadOnly",{enumerable:!0,get:function(){return g.defineReadOnly}}),Object.defineProperty(t,"getStatic",{enumerable:!0,get:function(){return g.getStatic}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return g.resolveProperties}}),Object.defineProperty(t,"shallowCopy",{enumerable:!0,get:function(){return g.shallowCopy}});var b=n(NMe);t.RLP=b;var x=jMe;Object.defineProperty(t,"computePublicKey",{enumerable:!0,get:function(){return x.computePublicKey}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return x.recoverPublicKey}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return x.SigningKey}});var k=JO;Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return k.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return k.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return k.parseBytes32String}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return k._toEscapedUtf8String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return k.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return k.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return k.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return k.Utf8ErrorFuncs}});var $=DMe;Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return $.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return $.computeAddress}}),Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return $.parse}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return $.recoverAddress}}),Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return $.serialize}}),Object.defineProperty(t,"TransactionTypes",{enumerable:!0,get:function(){return $.TransactionTypes}});var I=LMe;Object.defineProperty(t,"commify",{enumerable:!0,get:function(){return I.commify}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return I.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return I.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return I.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return I.parseUnits}});var M=BMe;Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return M.verifyMessage}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return M.verifyTypedData}});var D=FMe;Object.defineProperty(t,"_fetchData",{enumerable:!0,get:function(){return D._fetchData}}),Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return D.fetchJson}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return D.poll}});var H=QO;Object.defineProperty(t,"SupportedAlgorithm",{enumerable:!0,get:function(){return H.SupportedAlgorithm}});var G=JO;Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return G.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return G.Utf8ErrorReason}})})(Li);const zMe=(t,e)=>t.toLowerCase()===e.toLowerCase();function On(){return On=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{theme:r}=Z7(),{isPending:n}=SG();return w.createElement(ge,{flexDirection:"column",gap:"2",marginTop:"5"},e.map(s=>{const i=r==="dark"?s._wallet.logoDark:s._wallet.logoLight,o=s._wallet.name,a=s._wallet.id;return w.createElement(Af,{key:a,width:"full",shape:"square",leftIcon:()=>w.createElement(ge,{justifyContent:"center",alignItems:"center",style:{backgroundColor:s._wallet.iconBackground},className:hY,width:"8",height:"8",overflow:"hidden"},w.createElement(i,null)),onClick:()=>t(s),label:w.createElement(at,null,o,n)})}))},VMe=({config:t={}})=>{const{signIn:e={}}=t,{logoUrl:r}=e;return w.createElement(w.Fragment,null,r&&w.createElement(ge,{marginTop:"5",justifyContent:"center",alignItems:"center"},w.createElement(V1,{src:r,style:{height:"110px"}})))};let ur=function(t){return t.Settings="@kit.settings",t.Theme="@kit.theme",t.EthAuthProof="@kit.ethAuthProof",t.EthAuthSettings="@kit.ethAuthSettings",t.ProjectAccessKey="@kit.projectAccessKey",t.WaasGoogleClientID="@kit.waasGoogleClientId",t.WaasGoogleIdToken="@kit.waasGoogleIdToken",t.WaasAppleClientID="@kit.waasAppleClientId",t.WaasAppleRedirectURI="@kit.waasAppleRedirectURI",t.WaasAppleIdToken="@kit.waasAppleIdToken",t.WaasSessionHash="@kit.waasSessionHash",t.WaasActiveLoginType="@kit.waasActiveLoginType",t.WaasEmailIdToken="@kit.waasEmailIdToken",t}({});const F6={showEmailInput:!0,walletAuthOptions:["sequence","sequence-waas","metamask","wallet-connect","coinbase-wallet"],socialAuthOptions:["google","facebook","twitch","apple","google-waas","apple-waas"]},yY=60*60*24*7;function GMe(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i=0)&&(r[s]=t[s]);return r}const KMe=["createConnector"],pY=(t,e)=>{localStorage.setItem(ur.ProjectAccessKey,t);const r=[];return e.forEach(n=>{const{createConnector:s}=n,i=GMe(n,KMe),o=On({},i),a=c=>{const f=s()(c);return f._wallet=On({},o),f};r.push(a)}),r},YMe=t=>/^\S+@\S+\.\S{2,}$/.test(t),gE={1:{name:"Ethereum",symbol:"ETH",logoURI:"https://assets.coingecko.com/coins/images/279/thumb/ethereum.png",decimals:18,blockExplorerName:"Etherscan",blockExplorerUrl:"https://etherscan.io"},5:{name:"Goerli",symbol:"ETH",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/279/thumb/ethereum.png",blockExplorerName:"Etherscan (Goerli)",blockExplorerUrl:"https://goerli.etherscan.io"},10:{name:"Optimism",symbol:"OP",logoURI:"https://assets.coingecko.com/coins/images/25244/small/Optimism.png",decimals:18,blockExplorerName:"Etherscan (Optimism)",blockExplorerUrl:"https://optimistic.etherscan.io"},56:{name:"BNB",symbol:"BNB",logoURI:"https://assets.coingecko.com/coins/images/825/thumb/bnb-icon2_2x.png",decimals:18,blockExplorerName:"BscScan",blockExplorerUrl:"https://bscscan.com"},100:{name:"Gnosis",symbol:"GNO",logoURI:"https://assets.coingecko.com/coins/images/662/small/logo_square_simple_300px.png",decimals:18,blockExplorerUrl:"https://gnosisscan.io",blockExplorerName:"Gnosis Scan"},137:{name:"Polygon",symbol:"MATIC",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"Polyscan",blockExplorerUrl:"https://polygonscan.com"},1101:{name:"Polygon zkEVM",symbol:"ETH",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"PolygonScan",blockExplorerUrl:"https://zkevm.polygonscan.com"},42161:{name:"Arbitrum",symbol:"ARB",logoURI:"https://assets.coingecko.com/asset_platforms/images/33/small/arbitrum-one.png",decimals:18,blockExplorerName:"Arbiscan",blockExplorerUrl:"https://arbiscan.io"},43114:{name:"Avalanche",symbol:"AVAX",logoURI:"https://assets.coingecko.com/coins/images/12559/small/Avalanche_Circle_RedWhite_Trans.png",decimals:18,blockExplorerName:"Snowtrace",blockExplorerUrl:"https://snowtrace.io"},80001:{name:"Mumbai",symbol:"MATIC",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"Polyscan (Mumbai)",blockExplorerUrl:"https://mumbai.polygonscan.com"}},QMe=(t,e)=>{const r=e.find(i=>i.id===t);if(r){var n,s;return{name:r.nativeCurrency.name,symbol:r.nativeCurrency.symbol,decimals:r.nativeCurrency.decimals,logoURI:gE[1].logoURI,blockExplorerName:(n=r.blockExplorers)==null?void 0:n.default.name,blockExplorerUrl:(s=r.blockExplorers)==null?void 0:s.default.url}}},Pr=(t,e)=>gE[t]||QMe(t,e)||gE[1],ih=()=>{const t=w.createContext(void 0);return[()=>{const r=w.useContext(t);if(!r)throw new Error("useGenericContext must be used within a Provider");return r},t.Provider]},Yb=t=>{switch(t){case"top-right":return{top:"0px",right:"0px"};case"top-left":return{top:"0px",left:"0px"};case"top-center":return{top:"0px"};case"bottom-right":return{bottom:"0px",right:"0px"};case"bottom-left":return{bottom:"0px",left:"0px"};case"bottom-center":return{bottom:"0px"};case"middle-right":return{right:"0px"};case"middle-left":return{left:"0px"};case"center":default:return{}}},mY=(t,e="light")=>{switch(t){case 1:return"#abf";case 137:return"#c7a6ff";case 42161:return"#52A7E6";case 10:return"#DB3132";case 56:return e==="light"?"#CB9C1D":"#EEB445";case 43114:return"#E84142";case 100:return e==="light"?"#00193C":"#D8E8FF";case 5:return e==="light"?"#A77A00":"#FFA700";case 80001:return e==="light"?"#D68828":"#FFA700";default:return"#abf"}},gY=(t,e="light")=>{switch(t){case 1:return"#132362";case 137:return"#350881";case 42161:return e==="light"?"#EDF7FF":"#0C3754";case 10:return e==="light"?"#FFEAE9":"#390B0C";case 56:return e==="light"?"#FFE8AB":"#554018";case 43114:return e==="light"?"#FBDFDF":"#390B0C";case 100:return e==="light"?"#D8E8FF":"#00193C";case 5:return e==="light"?"#FFD871":"#554018";case 80001:return e==="light"?"#FFE8CD":"#554018";default:return"#132362"}};function JMe(t){var e;const{account:r,chain:n,transport:s}=t,i={chainId:n.id,name:n.name,ensAddress:(e=n.contracts)==null||(e=e.ensRegistry)==null?void 0:e.address};return new FD(s,i).getSigner(r.address)}function XMe(t){var e;const{chain:r,transport:n}=t,s={chainId:r.id,name:r.name,ensAddress:(e=r.contracts)==null||(e=e.ensRegistry)==null?void 0:e.address};return n.type==="fallback"?new Lse(n.transports.map(({value:i})=>new $a(i==null?void 0:i.url,s))):new $a(n.url,s)}const ZMe=async t=>{const e=localStorage.getItem(ur.EthAuthProof);if(e)return JSON.parse(e);const r=localStorage.getItem(ur.EthAuthSettings);if(!r)throw new Error("No ETHAuth settings found");const n=JSON.parse(r),s=t.account.address,i=new j2;i.address=s,i.claims.app=n.app||"app",i.claims.ogn=n.origin,i.claims.n=n.nonce,i.setExpiryIn(n.expiry?Math.max(n.expiry,200):yY);const o=i.messageTypedData();o.domain.verifyingContract;const c=await JMe(t)._signTypedData(o.domain,o.types,o.message);i.signature=c;const f=await new rv().encodeProof(i,!0);return{typedData:o,proofString:f}},eNe=async(t,e,r)=>{const n=t.account.address,i=await new rv().decodeProof(r.proofString,!0),o=XMe(e);return await Uf.utils.isValidTypedDataSignature(n,r.typedData,i.signature,o)},pr=t=>{const e=gt[t];if(!e)throw"invalid network";const r=localStorage.getItem(ur.ProjectAccessKey)||void 0,n=new Pk("https://metadata.sequence.app",r),s=new _k(ck(e.name),r),i=new s0("https://api.sequence.app",r);return{network:e,metadataClient:n,indexerClient:s,apiClient:i}};function tNe({connector:t,onSuccess:e}){if(!t)return{inProgress:!1,loading:!1,error:void 0,initiateAuth:async d=>{},sendChallengeAnswer:async d=>{}};const[r,n]=p.useState(""),[s,i]=p.useState(),[o,a]=p.useState(!1),[c,l]=p.useState("");return{inProgress:o||!!c,loading:o,error:s,initiateAuth:async d=>{a(!0);try{var h;const v=t,{instance:y}=await((h=v.sequenceWaas)==null?void 0:h.email.initiateAuth({email:d}));l(y),n(d)}catch(v){i(v.message||"Unknown error")}finally{a(!1)}},sendChallengeAnswer:c?async d=>{a(!0);try{var h,v;const y=t,m=await((h=y.sequenceWaas)==null?void 0:h.getSessionHash()),{idToken:g}=await((v=y.sequenceWaas)==null?void 0:v.email.finalizeAuth({instance:c,answer:d,email:r,sessionHash:m}));e(g)}catch(y){i(y.message||"Unknown error"),a(!1)}}:void 0}}const rNe=t=>{const{value:e,digits:r=6,onChange:n,disabled:s=!1}=t,i=p.useMemo(()=>ZO(0,r).map(()=>p.createRef()),[]);p.useEffect(()=>{var l;(l=i[0])==null||(l=l.current)==null||l.focus()},[]);const o=(l,f)=>{/^\d$/.test(f)||(f="");const u=[...e];if(u[l]=f,f!==""){var d;(d=i[l+1])==null||(d=d.current)==null||d.focus()}n(u)},a=(l,f)=>{var u,d;const h=i[l].current,v=(u=i[l-1])==null?void 0:u.current,y=(d=i[l+1])==null?void 0:d.current;switch(f.key){case"Backspace":f.preventDefault(),h&&(h.value="",o(l,"")),v==null||v.focus();break;case"ArrowLeft":f.preventDefault(),v==null||v.focus();break;case"ArrowRight":f.preventDefault(),y==null||y.focus();break;default:(h==null?void 0:h.value)===f.key&&(f.preventDefault(),o(l,f.key))}},c=(l,f)=>{const d=f.clipboardData.getData("text/plain").replace(/\D/g,"");if(/^\d{6}$/.test(d)){var h;(h=i[0])==null||(h=h.current)==null||h.focus(),n(d.split("")),setTimeout(()=>{var v;(v=i[i.length-1])==null||(v=v.current)==null||v.focus()})}};return w.createElement(ge,{gap:"2"},ZO(0,r).map(l=>w.createElement(p.Fragment,{key:l},l===r/2&&w.createElement("span",null),w.createElement(ge,{as:"input",className:WMe,value:e[l]||"",ref:i[l],type:"text",inputMode:"numeric",maxLength:1,disabled:s,onFocus:f=>f.target.select(),onPaste:f=>c(l,f),onChange:f=>o(l,f.target.value),onKeyDown:f=>{a(l,f)}}))))},ZO=(t,e)=>Array.from({length:e-t},(r,n)=>n+t),nNe=t=>{zm.useScript(zm.appleAuthHelpers.APPLE_SCRIPT_SRC);const{isConnected:e}=Cn(),{config:r={}}=t,{signIn:n={}}=r,{showEmailInput:s=F6.showEmailInput,socialAuthOptions:i=F6.socialAuthOptions,walletAuthOptions:o=F6.walletAuthOptions}=n,{openConnectModal:a,setOpenConnectModal:c}=t,[l,f]=p.useState(""),[u,d]=p.useState(!1),[h,v]=p.useState([]),{connectors:y,connect:m}=SG(),g=y.filter(R=>R.type==="injected"&&!R.hasOwnProperty("_wallet")).map(R=>{const A=()=>w.createElement(V1,{src:R.icon,alt:R.name,disableAnimation:!0,width:"full",height:"full"});return On({},R,{_wallet:{id:R.id,name:R.name,logoLight:A,logoDark:A}})}),b=y.filter(R=>!!(R!=null&&R._wallet)),[x,k]=p.useState(!1),$=b.find(R=>R._wallet.id==="mock"),I=b.find(R=>R._wallet.id.includes("email")),M=[...b.filter(R=>!!(o.find(N=>N===R._wallet.id)&&!g.some(N=>N.name===R.name))).sort((R,A)=>o.indexOf(R._wallet.id)-o.indexOf(A._wallet.id)),...g],D=b.filter(R=>!!i.find(N=>N===R._wallet.id)).sort((R,A)=>i.indexOf(R._wallet.id)-i.indexOf(A._wallet.id)),H=M.length>7,G=R=>{f(R.target.value)},{inProgress:V,loading:Q,initiateAuth:F,sendChallengeAnswer:C}=tNe({connector:b.find(R=>R._wallet.id==="email-waas"),onSuccess:async R=>{localStorage.setItem(ur.WaasEmailIdToken,R),I&&m({connector:I})}});p.useEffect(()=>{e&&a&&c(!1)},[e,a]);const S=R=>{if(n.useMock&&$){m({connector:$});return}if(R._wallet.id==="email"){const N=prompt("Auto-email login, please specify the email address:");localStorage.setItem(J8,N||"")}if(R._wallet.id==="metamask"&&typeof window<"u"){var A;if(!!!((A=window)!=null&&(A=A.ethereum)!=null&&A._metamask)){window.open("https://metamask.io/download/");return}}m({connector:R})},T=async R=>{if(R.preventDefault(),n.useMock&&$){m({connector:$});return}if(I)if(localStorage.setItem(J8,l),I._wallet.id==="email-waas")try{await F(l),d(!0)}catch(A){console.log(A)}else m({connector:I})};return u?w.createElement(w.Fragment,null,w.createElement(ge,{paddingY:"6",alignItems:"center",justifyContent:"center",flexDirection:"column"},w.createElement(at,{marginTop:"5",marginBottom:"4",variant:"normal",color:"text80"},"Enter code received in email."),w.createElement(rNe,{value:h,digits:6,onChange:v}),w.createElement(ge,{gap:"2",marginY:"4",alignItems:"center",justifyContent:"center",style:{height:"44px"}},Q?w.createElement(NI,null):w.createElement(Af,{variant:"primary",disabled:h.includes(""),label:"Verify",onClick:()=>C==null?void 0:C(h.join("")),"data-id":"verifyButton"})))):x?w.createElement(w.Fragment,null,w.createElement(ge,{position:"absolute",top:"4"},w.createElement(_x,{icon:w2e,onClick:()=>k(!1),size:"xs"})),w.createElement(HMe,{connectors:M,onConnect:S})):w.createElement(w.Fragment,null,w.createElement(VMe,{config:r}),w.createElement(ge,{marginTop:"6"},I&&s&&w.createElement("form",{onSubmit:T},w.createElement(e9,{onChange:G,value:l,name:"email",placeholder:"Enter email","data-1p-ignore":!0}),w.createElement(ge,{alignItems:"center",justifyContent:"center",marginTop:"4"},!V&&w.createElement(Af,{type:"submit",disabled:!YMe(l),width:"full",label:"Continue",rightIcon:iI}),V&&w.createElement(NI,null))),D.length>0&&w.createElement(w.Fragment,null,I&&s&&w.createElement(w.Fragment,null,w.createElement(sI,{color:"backgroundSecondary"}),w.createElement(ge,{justifyContent:"center",alignItems:"center"},w.createElement(at,{variant:"small",color:"text50"},"or sign in via"))),w.createElement(ge,{marginTop:"2",gap:"2",flexDirection:"row",justifyContent:"center",alignItems:"center",flexWrap:"wrap"},D.map(R=>{var A;return w.createElement(ge,{key:R.uid,aspectRatio:"1/1",alignItems:"center",justifyContent:"center"},R._wallet.id==="google-waas"&&w.createElement(ge,{className:vY},w.createElement(Nbe,{type:"icon",size:"large",nonce:(A=localStorage.getItem(ur.WaasSessionHash))!=null?A:void 0,onSuccess:N=>{N.credential&&(localStorage.setItem(ur.WaasGoogleIdToken,N.credential),S(R))},onError:()=>{console.log("Login Failed")}})),R._wallet.id==="apple-waas"&&w.createElement(z6,{connector:R,onConnect:()=>{const N=localStorage.getItem(ur.WaasAppleClientID)||"",B=localStorage.getItem(ur.WaasAppleRedirectURI)||"",P=localStorage.getItem(ur.WaasSessionHash)||"";zm.appleAuthHelpers.signIn({authOptions:{clientId:N,scope:"openid email",redirectURI:B,usePopup:!0,nonce:P},onSuccess:E=>{var L;(L=E.authorization)!=null&&L.id_token?(localStorage.setItem(ur.WaasAppleIdToken,E.authorization.id_token),S(R)):console.log("Apple login error: No id_token found")},onError:E=>console.error(E)})}}),!R._wallet.id.includes("waas")&&w.createElement(z6,{connector:R,onConnect:S}))}))),M.length>0&&w.createElement(w.Fragment,null,(I&&s||D.length>0)&&w.createElement(w.Fragment,null,w.createElement(sI,{color:"backgroundSecondary"}),w.createElement(ge,{justifyContent:"center",alignItems:"center"},w.createElement(at,{variant:"small",color:"text50"},"or select a wallet"))),w.createElement(ge,{marginTop:"2",gap:"2",flexDirection:"row",justifyContent:"center",alignItems:"center"},M.slice(0,7).map(R=>w.createElement(z6,{key:R.uid,connector:R,onConnect:S}))),H&&w.createElement(ge,{marginTop:"4",justifyContent:"center"},w.createElement(Af,{shape:"square",size:"xs",onClick:()=>k(!0),label:"More options",rightIcon:iI})))))},z6=t=>{const{connector:e,label:r,onConnect:n}=t,{theme:s}=Z7(),i=e._wallet,o=s==="dark"?i.monochromeLogoDark||i.logoDark:i.monochromeLogoLight||i.logoLight;return w.createElement(T3e,{message:r||i.name},w.createElement(a1,{clickable:!0,width:"10",height:"10",padding:"2",borderRadius:"xs",justifyContent:"center",alignItems:"center",onClick:()=>n(e)},w.createElement(o,null)))};function sNe(t){if(t==null)throw new TypeError("Cannot destructure "+t)}const eR=t=>{let e=On({},(sNe(t),t));return w.createElement(w.Fragment,null,w.createElement("svg",On({xmlns:"http://www.w3.org/2000/svg",style:{fill:"none"},id:"svg1316",version:"1.1",viewBox:"0 0 396 396"},e),w.createElement("g",{transform:"translate(0,38)",id:"g1256",clipPath:"url(#clip0_5_131)"},w.createElement("g",{id:"g1254",clipPath:"url(#clip1_5_131)"},w.createElement("path",{style:{fill:"#111111"},id:"path1232",d:"M 0,67.5049 V 250.165 c 0,37.282 30.1402,67.505 67.32,67.505 h 261.36 c 37.18,0 67.32,-30.223 67.32,-67.505 V 67.5049 C 396,30.223 365.86,0 328.68,0 H 67.32 C 30.1402,0 0,30.223 0,67.5049 Z"}),w.createElement("path",{style:{fill:"url(#paint0_linear_5_13"},id:"path1234",d:"M 0,67.5049 V 250.165 c 0,37.282 30.1402,67.505 67.32,67.505 h 261.36 c 37.18,0 67.32,-30.223 67.32,-67.505 V 67.5049 C 396,30.223 365.86,0 328.68,0 H 67.32 C 30.1402,0 0,30.223 0,67.5049 Z"}),w.createElement("path",{style:{fill:"url(#paint1_linear_5_131"},id:"path1236",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),w.createElement("path",{style:{fill:"url(#paint2_linear_5_131)"},id:"path1238",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),w.createElement("path",{style:{fill:"url(#paint3_linear_5_131)"},id:"path1240",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),w.createElement("path",{style:{fill:"url(#paint4_linear_5_131)"},id:"path1242",d:"m 98.9999,238.126 c 0,-10.965 -8.8648,-19.854 -19.8,-19.854 -10.9352,0 -19.8,8.889 -19.8,19.854 0,10.966 8.8648,19.855 19.8,19.855 10.9352,0 19.8,-8.889 19.8,-19.855 z"}),w.createElement("path",{style:{fill:"url(#paint5_linear_5_131)"},id:"path1244",d:"m 336.6,158.835 c 0,-10.965 -8.865,-19.854 -19.8,-19.854 -10.935,0 -19.8,8.889 -19.8,19.854 0,10.965 8.865,19.855 19.8,19.855 10.935,0 19.8,-8.89 19.8,-19.855 z"}),w.createElement("path",{style:{fill:"url(#paint6_linear_5_131)"},id:"path1246",d:"m 336.6,158.835 c 0,-10.965 -8.865,-19.854 -19.8,-19.854 -10.935,0 -19.8,8.889 -19.8,19.854 0,10.965 8.865,19.855 19.8,19.855 10.935,0 19.8,-8.89 19.8,-19.855 z"}),w.createElement("path",{style:{fill:"url(#paint7_linear_5_131)"},id:"path1248",d:"M 316.8,59.5632 H 158.4 c -10.935,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.865,19.8544 19.8,19.8544 h 158.4 c 10.935,0 19.8,-8.8892 19.8,-19.8544 0,-10.9653 -8.865,-19.8544 -19.8,-19.8544 z"}),w.createElement("path",{style:{fill:"url(#paint8_linear_5_131)"},id:"path1250",d:"M 316.8,218.272 H 158.4 c -10.935,0 -19.8,8.889 -19.8,19.854 0,10.966 8.865,19.855 19.8,19.855 h 158.4 c 10.935,0 19.8,-8.889 19.8,-19.855 0,-10.965 -8.865,-19.854 -19.8,-19.854 z"}),w.createElement("path",{style:{fill:"url(#paint9_linear_5_131)"},id:"path1252",d:"M 237.6,138.981 H 79.2 c -10.9352,0 -19.8,8.889 -19.8,19.854 0,10.965 8.8648,19.855 19.8,19.855 h 158.4 c 10.935,0 19.8,-8.89 19.8,-19.855 0,-10.965 -8.865,-19.854 -19.8,-19.854 z"}))),w.createElement("defs",{id:"defs1314"},w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"318",x2:"198",y1:"4.0585401e-05",x1:"198",id:"paint0_linear_5_131"},w.createElement("stop",{id:"stop1258",stopColor:"#1D273D"}),w.createElement("stop",{id:"stop1260",stopColor:"#0D0F13",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"63",x2:"92.5",y1:"99",x1:"65.5",id:"paint1_linear_5_131"},w.createElement("stop",{id:"stop1263",stopColor:"#4462FE"}),w.createElement("stop",{id:"stop1265",stopColor:"#7D69FA",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"97.591103",x2:"96.137703",y1:"99.291199",x1:"62.879902",id:"paint2_linear_5_131"},w.createElement("stop",{id:"stop1268",stopColor:"#3757FD"}),w.createElement("stop",{id:"stop1270",stopColor:"#6980FA",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"97.591103",x2:"96.137703",y1:"99.291199",x1:"62.879902",id:"paint3_linear_5_131"},w.createElement("stop",{id:"stop1273",stopColor:"#2447FF"}),w.createElement("stop",{id:"stop1275",stopColor:"#6980FA",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"223.5",x2:"91.5",y1:"251.5",x1:"65",id:"paint4_linear_5_131"},w.createElement("stop",{id:"stop1278",stopColor:"#BC3EE6"}),w.createElement("stop",{id:"stop1280",stopColor:"#D972F1",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"146",x2:"329.5",y1:"172",x1:"305",id:"paint5_linear_5_131"},w.createElement("stop",{id:"stop1283",stopColor:"#29BDFF"}),w.createElement("stop",{id:"stop1285",stopColor:"#96E7FB",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"176.772",x2:"334.56699",y1:"178.418",x1:"300.17999",id:"paint6_linear_5_131"},w.createElement("stop",{id:"stop1288",stopColor:"#23BBFF"}),w.createElement("stop",{id:"stop1290",stopColor:"#85E7FF",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"60",x2:"317.5",y1:"99",x1:"154.5",id:"paint7_linear_5_131"},w.createElement("stop",{id:"stop1293",stopColor:"#23BBFF"}),w.createElement("stop",{id:"stop1295",stopColor:"#85E7FF",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"218",x2:"312.5",y1:"258",x1:"156",id:"paint8_linear_5_131"},w.createElement("stop",{id:"stop1298",stopColor:"#2447FF"}),w.createElement("stop",{id:"stop1300",stopColor:"#6980FA",offset:"1"})),w.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"139",x2:"235.5",y1:"179",x1:"86.000099",id:"paint9_linear_5_131"},w.createElement("stop",{id:"stop1303",stopColor:"#6634FF"}),w.createElement("stop",{id:"stop1305",stopColor:"#9C6DFF",offset:"1"})),w.createElement("clipPath",{id:"clip0_5_131"},w.createElement("rect",{style:{fill:"#ffffff"},y:"0",x:"0",id:"rect1308",height:"317.67001",width:"396"})),w.createElement("clipPath",{id:"clip1_5_131"},w.createElement("rect",{style:{fill:"#ffffff"},y:"0",x:"0",id:"rect1311",height:"317.67001",width:"396"})))))},[bY,iNe]=ih(),[oNe,aNe]=ih(),[cNe,lNe]=ih(),[fNe,uNe]=ih();class bE{constructor(){this._resolve=()=>{},this._reject=()=>{},this._promise=new Promise((e,r)=>{this._reject=r,this._resolve=e})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}}let Du;function dNe(t){const[e,r]=p.useState();function n(i){var o;(o=Du)==null||o.resolve({id:i,confirmed:!0}),r(void 0),Du=void 0}function s(i){var o;(o=Du)==null||o.resolve({id:i,confirmed:!1}),r(void 0),Du=void 0}return p.useEffect(()=>{async function i(){if(!t)return;const o=t.sequenceWaasProvider;o&&(o.requestConfirmationHandler={confirmSignTransactionRequest(a,c,l){const f=new bE;return r({id:a,type:"signTransaction",txs:Array.isArray(c)?c:[c],chainId:l}),Du=f,f.promise},confirmSignMessageRequest(a,c,l){const f=new bE;return r({id:a,type:"signMessage",message:c,chainId:l}),Du=f,f.promise}})}i()}),[e,n,s]}let xc=function(t){return t.APPROVE="approve",t.TRANSFER="transfer",t.SWAP="swap",t.AWARD_ITEM="awardItem",t.UNIMPLEMENTED="unimplemented",t.UNKNOWN="unknown",t}({});const xY=t=>Object.fromEntries(t.map((e,r)=>[e.name&&!e.name.startsWith("unnamed")?e.name:`_${r}`,Array.isArray(e.value)&&e.type.startsWith("(")&&(e.type.endsWith(")")||e.type.endsWith(")[]"))?xY(e.value):e.value])),wY=(t,e,r,n)=>{const s=xY(e.args),i=fr(n,0,4);let o=[];switch(e.signature){case"execute((bool,bool,uint256,address,uint256,bytes)[],uint256,bytes)":case"selfExecute((bool,bool,uint256,address,uint256,bytes)[])":o=e.args[0].value.map(c=>c.call?wY(c.target,c.call,c.value,c.data):{to:c.target,signature:"",byteSignature:fr(c.data,0,4),methodName:"",args:{},objs:[],value:ne.from(c.value).toString(),data:le(c.data)})}return{to:t,signature:e.signature,byteSignature:i,methodName:e.function,args:s,objs:o,value:ne.from(r).toString(),data:le(n)}},hNe=t=>t.map(e=>"target"in e?e:On({},e,{target:e.to})).map(e=>{var r,n,s,i,o,a;return{delegateCall:(r=e.delegateCall)!=null?r:!1,revertOnError:(n=e.revertOnError)!=null?n:!1,gasLimit:(s=e.gasLimit)!=null?s:0,target:(i=e.target)!=null?i:"0x0000000000000000000000000000000000000000",value:(o=e.value)!=null?o:0,data:(a=e.data)!=null?a:"0x"}});let Lu=function(t){return t.SEQUENCE_DEPLOY="0x32c02a14",t.SEQUENCE_PUBLISH_CONFIG="0x44d466c2",t.SEQUENCE_UPDATE_IMAGE_HASH="0x29561426",t.SEQUENCE_UPDATE_IMPLEMENTATION="0x025b22bc",t.SEQUENCE_REQUIRE_SESSION_NONCE="0x8853baa0",t.EXECUTE="0x7a9a1628",t.SELF_EXECUTE="0x61c2926c",t.APPROVE="0x095ea7b3",t.TRANSFER="0xa9059cbb",t.DEPOSIT="0xd0e30db0",t.WITHDRAW="0x2e1a7d4d",t.ERC721_SAFE_TRANSFER_FROM="0x42842e0e",t.ERC721_SAFE_TRANSFER_FROM_WITH_DATA="0xb88d4fde",t.ERC1155_SAFE_TRANSFER_FROM="0xf242432a",t.ERC1155_SAFE_BATCH_TRANSFER_FROM="0x2eb2c2d6",t.NIFTYSWAP_BUY_TOKENS="0xd93e8aaa",t.TRANSFORM_ERC20="0x415565b0",t.OUTBOUND_TRANSFER_TO="0xa44bbb15",t.CELER_SEND="0xa5977fbb",t.UNISWAPV3_MULTICALL="0x5ae401dc",t.UNISWAPV2_SWAP_EXACT_TOKENS_FOR_TOKENS="0x38ed1739",t.UNISWAPV2_SWAP_TOKENS_FOR_EXACT_TOKENS="0x8803dbee",t.UNISWAPV2_SWAP_EXACT_ETH_FOR_TOKENS="0x7ff36ab5",t.UNISWAPV2_SWAP_ETH_FOR_EXACT_TOKENS="0xfb3bdb41",t.UNISWAPV2_SWAP_TOKENS_FOR_EXACT_ETH="0x4a25d94a",t.UNISWAPV2_SWAP_EXACT_TOKENS_FOR_ETH="0x18cbafe5",t.AWARD_ITEM="0xcf378343",t}({});const vNe=async t=>{const r=new Ir(pNe).encodeFunctionData("selfExecute",[t]);try{const{apiClient:n}=pr(1),{call:s}=await n.decodeContractCall({callData:r});return wY("",s,0,r)}catch(n){throw new Error(n)}},yNe=async(t,e)=>{const r=hNe(e),n=(await vNe(r)).objs,s=Li.getAddress(t);return r.map((o,a)=>{const c=n[a],l=o.data.toString(),f=ne.from(o.value).toString(),u=o.target;if(l==="0x"||!l)return{signature:"",byteSignature:"",type:xc.TRANSFER,methodName:"nativeTokenTransfer",transferType:$n.SEND,contractAddress:Lt,contractType:oi.UNKNOWN,from:s,to:Li.getAddress(o.target),tokenIds:["0"],amounts:[f],target:u,value:f};if(!c)return;const d=Li.getAddress(o.target),h={type:xc.UNIMPLEMENTED,signature:c.signature,byteSignature:c.byteSignature,methodName:c.methodName,target:u,value:f};switch(c.byteSignature){case Lu.TRANSFER:{const{args:v}=c;return On({},h,{type:xc.TRANSFER,transferType:$n.SEND,contractAddress:d,contractType:oi.ERC20,from:s,to:Li.getAddress(v.recipient),tokenIds:["0"],amounts:[String(v.amount)]})}case Lu.ERC721_SAFE_TRANSFER_FROM:case Lu.ERC721_SAFE_TRANSFER_FROM_WITH_DATA:{const v=c.args;return On({},h,{type:xc.TRANSFER,transferType:$n.SEND,contractAddress:d,contractType:oi.ERC721,from:s,to:Li.getAddress(v.to),tokenIds:[v.tokenId],amounts:["1"]})}case Lu.ERC1155_SAFE_TRANSFER_FROM:{const v=c.args;return On({},h,{type:xc.TRANSFER,transferType:$n.SEND,contractAddress:d,contractType:oi.ERC1155,from:s,to:Li.getAddress(v._to),tokenIds:[v._id],amounts:[v._amount]})}case Lu.ERC1155_SAFE_BATCH_TRANSFER_FROM:{const{args:v}=c;return On({},h,{type:xc.TRANSFER,transferType:$n.SEND,contractAddress:d,contractType:oi.ERC1155,from:s,to:Li.getAddress(v._to),tokenIds:v._ids,amounts:v._amounts})}case Lu.AWARD_ITEM:{const{args:v}=c;return On({},h,{type:xc.AWARD_ITEM,contractAddress:d,to:Li.getAddress(v._0),amount:"1"})}}}).flatMap(o=>o?[o]:[])},pNe=[{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"}],mNe=()=>w.createElement(ge,{alignItems:"center",justifyContent:"space-between"},w.createElement(ge,{justifyContent:"center",alignItems:"center",gap:"2"},w.createElement(Dh,{width:30,height:30,borderRadius:"circle"}),w.createElement(ge,{flexDirection:"column",gap:"2",alignItems:"flex-start"},w.createElement(Dh,{width:100,height:14}),w.createElement(Dh,{width:75,height:14}))),w.createElement(ge,{flexDirection:"column",gap:"2",alignItems:"flex-end"},w.createElement(Dh,{width:100,height:14}),w.createElement(Dh,{width:50,height:12}))),gNe=({address:t,txs:e,chainId:r})=>{Ct();const[n,s]=p.useState(void 0),[i,o]=p.useState([]),[a,c]=p.useState([]),l=async()=>{const f=await yNe(t,e);s(f[0].type),f[0].type==="transfer"&&o(f),f[0].type==="awardItem"&&c(f)};if(p.useEffect(()=>{l()},[]),!n)return w.createElement(mNe,null);if(n===xc.UNKNOWN)return w.createElement(w.Fragment,null);if(i.length>=1)return w.createElement(bNe,{address:t,transferProps:i,chainId:r});if(a.length>=1)return w.createElement(xNe,{awardItemProps:a[0]})},bNe=({address:t,transferProps:e,chainId:r})=>{var n,s,i,o,a,c,l,f,u,d,h,v,y,m,g,b,x,k,$;const{chains:I}=Ct(),M=(n=e[0])==null?void 0:n.contractAddress,D=(s=e[0])==null?void 0:s.to,H=M?zMe(M,Lt):!0,G=((i=e[0])==null?void 0:i.contractType)===oi.ERC1155,V=((o=e[0])==null?void 0:o.contractType)===oi.ERC1155||((a=e[0])==null?void 0:a.contractType)===oi.ERC721,Q=Pr(r,I),{data:F=[],isLoading:C}=yMe({accountAddress:t,chainIds:[r],contractAddress:M},{hideUnlistedTokens:!1}),{data:S,isLoading:T}=pMe({tokens:{chainId:r,contractAddress:M,tokenIds:(c=(l=e[0])==null?void 0:l.tokenIds)!=null?c:[]}}),R=M?F.find(_=>Li.getAddress(_.contractAddress)===Li.getAddress(M)):void 0,A=H?Q.decimals:(R==null||(f=R.contractInfo)==null?void 0:f.decimals)||18,N=H?Q.logoURI:V?S==null||(u=S[0])==null?void 0:u.image:R==null||(d=R.contractInfo)==null?void 0:d.logoURI,B=H?Q.name:V?S==null||(h=S[0])==null?void 0:h.name:(R==null||(v=R.contractInfo)==null?void 0:v.name)||"",P=H?Q.symbol:V?"":(R==null||(y=R.contractInfo)==null?void 0:y.symbol)||"",E=R!==void 0?Dt(R.balance,A):"";aMe(E);const L=(m=(g=e[0])==null||(g=g.amounts)==null?void 0:g[0])!=null?m:(b=e[0])==null?void 0:b.value,q=V;return w.createElement(a1,null,w.createElement(ge,{marginBottom:"2"},w.createElement(at,{variant:"medium",color:"text100"},wNe((x=(k=e[0])==null?void 0:k.type)!=null?x:""))),w.createElement(ge,{alignItems:"flex-end",justifyContent:"space-between",marginBottom:"2"},w.createElement(ge,{justifyContent:"space-between",alignItems:"center",gap:"2"},q?w.createElement(ge,{style:{width:"40px"}},w.createElement(dY,{imageUrl:N})):w.createElement(gMe,{imageUrl:N,size:40}),w.createElement(ge,{flexDirection:"column",alignItems:"flex-start"},w.createElement(ge,{flexDirection:"row",alignItems:"center",gap:"1"},w.createElement(at,{variant:"medium",color:"text100"},B)),w.createElement(at,{color:"text50",variant:"normal"}," ",`${Dt(L,G?S==null||($=S[0])==null?void 0:$.decimals:V?0:A)} ${P} `)))),D!==void 0&&w.createElement(ge,null,w.createElement(at,{fontSize:"normal",color:"text50"},"To"),w.createElement(ge,{marginTop:"2",borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",style:{height:"52px"}},w.createElement(ge,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},w.createElement(yH,{address:D,style:{width:"20px"}}),w.createElement(at,{color:"text100"},`0x${CY(D.substring(2),12)}`)))))},xNe=({awardItemProps:t})=>w.createElement(a1,null,w.createElement(ge,{marginBottom:"2"},w.createElement(at,{variant:"medium",color:"text100"},"Mint")),w.createElement(ge,{alignItems:"flex-end",justifyContent:"space-between",marginBottom:"2"},w.createElement(ge,{justifyContent:"space-between",alignItems:"center",gap:"2"},w.createElement(ge,{style:{width:"40px"}},w.createElement(dY,{imageUrl:"https://dev-metadata.sequence.app/projects/277/collections/62/tokens/0/image.jpeg"})),w.createElement(ge,{flexDirection:"column",alignItems:"flex-start"},w.createElement(ge,{flexDirection:"row",alignItems:"center",gap:"1"},w.createElement(at,{variant:"medium",color:"text100"},"Waas Demo NFT")),w.createElement(at,{color:"text50",variant:"normal"},t.amount)))),t.to!==void 0&&w.createElement(ge,null,w.createElement(at,{fontSize:"normal",color:"text50"},"To"),w.createElement(ge,{marginTop:"2",borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",style:{height:"52px"}},w.createElement(ge,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},w.createElement(yH,{address:t.to,style:{width:"20px"}}),w.createElement(at,{color:"text100"},`0x${CY(t.to.substring(2),12)}`))))),wNe=t=>t.charAt(0).toUpperCase()+t.slice(1),CY=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},CNe={dark:"dark",light:"light"},ENe=t=>{var e,r,n,s;const{config:i,children:o}=t,{defaultTheme:a="dark",signIn:c={},position:l="center",displayedAssets:f=[],ethAuth:u={},disableAnalytics:d=!1}=i,h=c.projectName||"app",{expiry:v=yY,app:y=h,origin:m=location.origin,nonce:g}=u,{projectName:b}=c,[x,k]=p.useState(!1),[$,I]=p.useState(a||CNe.dark),[M,D]=p.useState(l),[H,G]=p.useState(f),[V,Q]=p.useState(),{address:F,isConnected:C}=Cn(),T=(e=sw().find(L=>L.connector.id.includes("waas")))==null?void 0:e.connector,[R,A,N]=dNe(T),B=localStorage.getItem(ur.WaasGoogleClientID)||"",P=L=>{const _=Uf.initWallet(L).client.analytics;Q(_)};p.useEffect(()=>{if(!C){V==null||V.reset();return}F&&(V==null||V.identify(F.toLowerCase()))},[V,F,C]);const E=()=>{typeof window<"u"&&window.open("https://sequence.xyz")};return p.useEffect(()=>{const L=localStorage.getItem(ur.ProjectAccessKey)||"";d||P(L)},[]),p.useEffect(()=>{$!==a&&I(a)},[a]),p.useEffect(()=>{M!==l&&D(l)},[l]),p.useEffect(()=>{typeof $=="object"||localStorage.setItem(ur.Theme,$),localStorage.setItem(ur.EthAuthSettings,JSON.stringify({expiry:v,app:y,origin:m,nonce:g}))},[$,u]),p.useEffect(()=>{G(H)},[f]),w.createElement(lNe,{value:{theme:$,setTheme:I,position:M,setPosition:D}},w.createElement(Tbe,{clientId:B},w.createElement(aNe,{value:{setOpenConnectModal:k,openConnectModalState:x}},w.createElement(uNe,{value:{setDisplayedAssets:G,displayedAssets:H}},w.createElement(iNe,{value:{setAnalytics:Q,analytics:V}},w.createElement("div",{id:"kit-provider"},w.createElement(a6e,{root:"#kit-provider",scope:"kit",theme:$},w.createElement(r1,null,x&&w.createElement(TI,{scroll:!1,backdropColor:"backgroundBackdrop",size:"sm",contentProps:{style:On({maxWidth:"364px"},Yb(l))},onClose:()=>k(!1)},w.createElement(ge,{padding:"4",className:XO},w.createElement(ge,{justifyContent:"center",color:"text100",alignItems:"center",fontWeight:"medium",style:{marginTop:"4px"}},w.createElement(at,null,"Sign in ",b?`to ${b}`:"")),w.createElement(nNe,On({openConnectModal:x,setOpenConnectModal:k},t)),w.createElement(ge,{onClick:E,className:qMe,gap:"1",marginTop:"4",flexDirection:"row",alignItems:"center",justifyContent:"center"},w.createElement(at,{fontSize:"small",color:"text100"},"Powered by Sequence"),w.createElement(ge,{height:"5",width:"5"},w.createElement(eR,null)))))),w.createElement(r1,null,R&&w.createElement(TI,{scroll:!1,backdropColor:"backgroundBackdrop",size:"sm",contentProps:{style:On({maxWidth:"364px"},Yb(l))},isDismissible:!1,onClose:()=>{N("")}},w.createElement(ge,{paddingX:"4",paddingTop:"4",paddingBottom:"2",className:XO},w.createElement(ge,{flexDirection:"column",justifyContent:"center",color:"text100",alignItems:"center",fontWeight:"medium",style:{marginTop:"4px"}},w.createElement(at,{as:"h1",variant:"large",marginBottom:"5"},"Confirm ",R.type==="signMessage"?"signing message":"transaction"),R.type==="signMessage"&&w.createElement(ge,{flexDirection:"column",width:"full"},w.createElement(at,{fontSize:"normal",color:"text50"},"Message"),w.createElement(a1,{marginTop:"2",paddingY:"6"},w.createElement(at,{variant:"normal",marginBottom:"4"},Ei((r=R.message)!=null?r:"")))),R.type==="signTransaction"&&w.createElement(ge,{flexDirection:"column",width:"full"},w.createElement(gNe,{address:F??"",txs:(n=R.txs)!=null?n:[],chainId:(s=R.chainId)!=null?s:137}),w.createElement(H2e,{label:"Transaction data",marginTop:"4"},w.createElement(a1,{overflowX:"scroll",marginY:"3"},w.createElement(at,{variant:"code",marginBottom:"4"},JSON.stringify(R.txs,null,2))))),R.chainId&&w.createElement(ge,{width:"full",marginTop:"3",justifyContent:"flex-end",alignItems:"center"},w.createElement(ge,{width:"1/2",justifyContent:"flex-start"},w.createElement(at,{variant:"small",color:"text50"},"Network")),w.createElement(ge,{width:"1/2",justifyContent:"flex-end"},w.createElement(wMe,{chainId:R.chainId}))),w.createElement(ge,{flexDirection:"row",gap:"2",width:"full",marginTop:"5"},w.createElement(Af,{width:"full",shape:"square",size:"lg",label:"Reject",onClick:()=>{N(R==null?void 0:R.id)}}),w.createElement(Af,{alignItems:"center",textAlign:"center",width:"full",shape:"square",size:"lg",label:"Confirm",variant:"primary",onClick:()=>{A(R==null?void 0:R.id)}}))),w.createElement(ge,{gap:"1",marginTop:"4",flexDirection:"row",alignItems:"center",justifyContent:"center"},w.createElement(at,{fontSize:"small",color:"text80"},"Powered by Sequence"),w.createElement(ge,{height:"4",width:"4",marginTop:"1"},w.createElement(eR,null)))))))),o)))))},kNe=()=>{const{setOpenConnectModal:t,openConnectModalState:e}=oNe();return{setOpenConnectModal:t,openConnectModalState:e}},jy=()=>{const{setTheme:t,theme:e,position:r,setPosition:n}=cNe();return{setTheme:t,theme:e,position:r,setPosition:n}},SNe=()=>{const{setDisplayedAssets:t,displayedAssets:e}=fNe();return{displayedAssets:e,setDisplayedAssets:t}};let Lh;function ANe(){var t;const r=(t=sw().find(a=>a.connector.id.includes("waas")))==null?void 0:t.connector,[n,s]=p.useState();function i(a,c){var l;(l=Lh)==null||l.resolve({id:a,feeTokenAddress:c,confirmed:!0}),s(void 0),Lh=void 0}function o(a){var c;(c=Lh)==null||c.resolve({id:a,feeTokenAddress:void 0,confirmed:!1}),s(void 0),Lh=void 0}return p.useEffect(()=>{async function a(){if(!r)return;const c=r.sequenceWaasProvider;c&&(c.feeConfirmationHandler={confirmFeeOption(l,f,u,d){const h=new bE;return s({id:l,options:f,chainId:d}),Lh=h,h.promise}})}a()}),[n,i,o]}function hS(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var $Ne={appendCss:()=>{},registerClassName:()=>{},onEndFileScope:()=>{},registerComposition:()=>{},markCompositionUsed:()=>{},getIdentOption:()=>"short"},Vm=[$Ne],vu=()=>{if(Vm.length<1)throw new Error("No adapter configured");return Vm[Vm.length-1]},EY=!1,_Ne=t=>{EY||PNe(t)},PNe=t=>{if(!t)throw new Error('No adapter provided when calling "setAdapter"');EY=!0,Vm.push(t)},mw=function(){return vu().appendCss(...arguments)},kY=function(){return vu().registerClassName(...arguments)},INe=function(){return vu().registerComposition(...arguments)},SY=function(){return vu().markCompositionUsed(...arguments)},TNe=function(){for(var e,r,n=arguments.length,s=new Array(n),i=0;i{var{fileScope:e,css:r}=t,n=e.packageName?[e.packageName,e.filePath].join("/"):e.filePath,s=rR[n];if(!s){var i=document.createElement("style");e.packageName&&i.setAttribute("data-package",e.packageName),i.setAttribute("data-file",e.filePath),i.setAttribute("type","text/css"),s=rR[n]=i,document.head.appendChild(i)}s.innerHTML=r};function jNe(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function DNe(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 LNe(t){var e=DNe(t,"string");return typeof e=="symbol"?e:String(e)}function BNe(t,e,r){return e=LNe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nR(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function $0(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}function sR(t,e){if(t==null)return{};var r=FNe(t,e),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Bh(t,e){for(var r in t)e(t[r],r)}function Bu(t,e){var r={};for(var n in t)e.indexOf(n)===-1&&(r[n]=t[n]);return r}function zNe(t,e){var r={};for(var n in t)r[e(t[n],n)]=t[n];return r}function xE(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n{var r=()=>{var s=new RegExp(".".concat(UNe(eh(e,{isIdentifier:!0}))),"g");return t.replace(s,"&")},n;try{n=OG(t)}catch{throw new Error("Invalid selector: ".concat(r()))}n.forEach(s=>{try{for(var i=s.length-1;i>=-1;i--){if(!s[i])throw new Error;var o=s[i];if(o.type==="child"||o.type==="parent"||o.type==="sibling"||o.type==="adjacent"||o.type==="descendant")throw new Error;if(o.type==="attribute"&&o.name==="class"&&o.value===e)return}}catch{throw new Error($s(iR||(iR=hS([` + Invalid selector: `,` + + Style selectors must target the '&' character (along with any modifiers), e.g. `," or ",`. + + This is to ensure that each style block only affects the styling of a single class. + + If your selector is targeting another class, you should move it to the style definition for that class, e.g. given we have styles for 'parent' and 'child' elements, instead of adding a selector of `,") to 'parent', you should add ",` to 'child'). + + If your selector is targeting something global, use the 'globalStyle' function instead, e.g. if you wanted to write `,", you should instead write 'globalStyle(",`, { ... })' + `])),r(),"`${parent} &`","`${parent} &:hover`","`& ${child}`","`${parent} &`","`& h1`","`${parent} h1`"))}})};class Jb{constructor(){this.ruleset=new Map,this.precedenceLookup=new Map}findOrCreateCondition(e){var r=this.ruleset.get(e);return r||(r={query:e,rules:[],children:new Jb},this.ruleset.set(e,r)),r}getConditionalRulesetByPath(e){var r=this;for(var n of e){var s=r.findOrCreateCondition(n);r=s.children}return r}addRule(e,r,n){var s=this.getConditionalRulesetByPath(n),i=s.findOrCreateCondition(r);if(!i)throw new Error("Failed to add conditional rule");i.rules.push(e)}addConditionPrecedence(e,r){for(var n=this.getConditionalRulesetByPath(e),s=0;sa.has(f.query));l>-1?r.splice(l,0,c):r.push(c)};for(var[s,i]of this.precedenceLookup.entries())n(i);return r}renderToArray(){var e=[];for(var{query:r,rules:n,children:s}of this.getSortedRuleset()){var i={};for(var o of n)i[o.selector]=o.rule;Object.assign(i,...s.renderToArray()),e.push({[r]:i})}return e}}var AY={":-moz-any-link":!0,":-moz-full-screen":!0,":-moz-placeholder":!0,":-moz-read-only":!0,":-moz-read-write":!0,":-ms-fullscreen":!0,":-ms-input-placeholder":!0,":-webkit-any-link":!0,":-webkit-full-screen":!0,"::-moz-color-swatch":!0,"::-moz-list-bullet":!0,"::-moz-list-number":!0,"::-moz-page-sequence":!0,"::-moz-page":!0,"::-moz-placeholder":!0,"::-moz-progress-bar":!0,"::-moz-range-progress":!0,"::-moz-range-thumb":!0,"::-moz-range-track":!0,"::-moz-scrolled-page-sequence":!0,"::-moz-selection":!0,"::-ms-backdrop":!0,"::-ms-browse":!0,"::-ms-check":!0,"::-ms-clear":!0,"::-ms-fill-lower":!0,"::-ms-fill-upper":!0,"::-ms-fill":!0,"::-ms-reveal":!0,"::-ms-thumb":!0,"::-ms-ticks-after":!0,"::-ms-ticks-before":!0,"::-ms-tooltip":!0,"::-ms-track":!0,"::-ms-value":!0,"::-webkit-backdrop":!0,"::-webkit-inner-spin-button":!0,"::-webkit-input-placeholder":!0,"::-webkit-meter-bar":!0,"::-webkit-meter-even-less-good-value":!0,"::-webkit-meter-inner-element":!0,"::-webkit-meter-optimum-value":!0,"::-webkit-meter-suboptimum-value":!0,"::-webkit-outer-spin-button":!0,"::-webkit-progress-bar":!0,"::-webkit-progress-inner-element":!0,"::-webkit-progress-inner-value":!0,"::-webkit-progress-value":!0,"::-webkit-resizer":!0,"::-webkit-scrollbar-button":!0,"::-webkit-scrollbar-corner":!0,"::-webkit-scrollbar-thumb":!0,"::-webkit-scrollbar-track-piece":!0,"::-webkit-scrollbar-track":!0,"::-webkit-scrollbar":!0,"::-webkit-search-cancel-button":!0,"::-webkit-search-results-button":!0,"::-webkit-slider-runnable-track":!0,"::-webkit-slider-thumb":!0,"::after":!0,"::backdrop":!0,"::before":!0,"::cue":!0,"::file-selector-button":!0,"::first-letter":!0,"::first-line":!0,"::grammar-error":!0,"::marker":!0,"::placeholder":!0,"::selection":!0,"::spelling-error":!0,"::target-text":!0,"::view-transition-group":!0,"::view-transition-image-pair":!0,"::view-transition-new":!0,"::view-transition-old":!0,"::view-transition":!0,":active":!0,":after":!0,":any-link":!0,":before":!0,":blank":!0,":checked":!0,":default":!0,":defined":!0,":disabled":!0,":empty":!0,":enabled":!0,":first-child":!0,":first-letter":!0,":first-line":!0,":first-of-type":!0,":first":!0,":focus-visible":!0,":focus-within":!0,":focus":!0,":fullscreen":!0,":hover":!0,":in-range":!0,":indeterminate":!0,":invalid":!0,":last-child":!0,":last-of-type":!0,":left":!0,":link":!0,":only-child":!0,":only-of-type":!0,":optional":!0,":out-of-range":!0,":placeholder-shown":!0,":read-only":!0,":read-write":!0,":required":!0,":right":!0,":root":!0,":scope":!0,":target":!0,":valid":!0,":visited":!0},HNe=Object.keys(AY),VNe=AY,oR,aR=(t,e)=>new Error($s(oR||(oR=hS([` + Invalid media query: "`,`" + + `,` + + Read more on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries + `])),t,e)),GNe=t=>{if(t==="@media ")throw aR(t,"Query is empty");try{NG(t)}catch(e){throw aR(t,e.message)}},KNe=["vars"],YNe=["content"],$Y="__DECLARATION",QNe={animationIterationCount:!0,borderImage:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,initialLetter:!0,lineClamp:!0,lineHeight:!0,maxLines:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,WebkitLineClamp:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,maskBorder:!0,maskBorderOutset:!0,maskBorderSlice:!0,maskBorderWidth:!0,shapeImageThreshold:!0,stopOpacity:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function JNe(t){return t.replace(/([A-Z])/g,"-$1").replace(/^ms-/,"-ms-").toLowerCase()}function XNe(t,e,r,n){var s=t.slice(0,e),i=t.slice(r);return"".concat(s).concat(n).concat(i)}var ZNe=" ",Fu=[...HNe,"@layer","@media","@supports","@container","selectors"];class eje{constructor(e,r){this.rules=[],this.conditionalRulesets=[new Jb],this.fontFaceRules=[],this.keyframesRules=[],this.localClassNamesMap=new Map(e.map(n=>[n,n])),this.localClassNamesSearch=new TG(e),this.layers=new Map,this.composedClassLists=r.map(n=>{var{identifier:s,classList:i}=n;return{identifier:s,regex:RegExp("(".concat(i,")"),"g")}}).reverse()}processCssObj(e){if(e.type==="fontFace"){this.fontFaceRules.push(e.rule);return}if(e.type==="keyframes"){e.rule=Object.fromEntries(Object.entries(e.rule).map(i=>{var[o,a]=i;return[o,this.transformProperties(a)]})),this.keyframesRules.push(e);return}if(this.currConditionalRuleset=new Jb,e.type==="layer"){var r="@layer ".concat(e.name);this.addLayer([r])}else{var n=Bu(e.rule,Fu);this.addRule({selector:e.selector,rule:n}),this.transformLayer(e,e.rule["@layer"]),this.transformMedia(e,e.rule["@media"]),this.transformSupports(e,e.rule["@supports"]),this.transformContainer(e,e.rule["@container"]),this.transformSimplePseudos(e,e.rule),this.transformSelectors(e,e.rule)}var s=this.conditionalRulesets[this.conditionalRulesets.length-1];s.mergeIfCompatible(this.currConditionalRuleset)||this.conditionalRulesets.push(this.currConditionalRuleset)}addConditionalRule(e,r){var n=this.transformVars(this.transformProperties(e.rule)),s=this.transformSelector(e.selector);if(!this.currConditionalRuleset)throw new Error("Couldn't add conditional rule");var i=r[r.length-1],o=r.slice(0,r.length-1);this.currConditionalRuleset.addRule({selector:s,rule:n},i,o)}addRule(e){var r=this.transformVars(this.transformProperties(e.rule)),n=this.transformSelector(e.selector);this.rules.push({selector:n,rule:r})}addLayer(e){var r=e.join(" - ");this.layers.set(r,e)}transformProperties(e){return this.transformContent(this.pixelifyProperties(e))}pixelifyProperties(e){return Bh(e,(r,n)=>{typeof r=="number"&&r!==0&&!QNe[n]&&(e[n]="".concat(r,"px"))}),e}transformVars(e){var{vars:r}=e,n=sR(e,KNe);return r?$0($0({},zNe(r,(s,i)=>jNe(i))),n):n}transformContent(e){var{content:r}=e,n=sR(e,YNe);if(typeof r>"u")return n;var s=Array.isArray(r)?r:[r];return $0({content:s.map(i=>i&&(i.includes('"')||i.includes("'")||/^([A-Za-z\-]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)(\s|$)/.test(i))?i:'"'.concat(i,'"'))},n)}transformClassname(e){return".".concat(eh(e,{isIdentifier:!0}))}transformSelector(e){var r=e,n=function(h){r=r.replace(i,()=>(SY(h),h))};for(var{identifier:s,regex:i}of this.composedClassLists)n(s);if(this.localClassNamesMap.has(r))return this.transformClassname(r);for(var o=this.localClassNamesSearch.search(r),a=r.length,c=o.length-1;c>=0;c--){var[l,[f]]=o[c],u=l-f.length+1;u>=a||(a=u,r[u-1]!=="."&&(r=XNe(r,u,l+1,this.transformClassname(f))))}return r}transformSelectors(e,r,n){Bh(r.selectors,(s,i)=>{if(e.type!=="local")throw new Error("Selectors are not allowed within ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));var o=this.transformSelector(i.replace(RegExp("&","g"),e.selector));WNe(o,e.selector);var a={selector:o,rule:Bu(s,Fu)};n?this.addConditionalRule(a,n):this.addRule(a);var c={type:"selector",selector:o,rule:s};this.transformLayer(c,s["@layer"],n),this.transformSupports(c,s["@supports"],n),this.transformMedia(c,s["@media"],n)})}transformMedia(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(l=>"@media ".concat(l)));for(var[i,o]of Object.entries(r)){var a="@media ".concat(i);GNe(a);var c=[...n,a];this.addConditionalRule({selector:e.selector,rule:Bu(o,Fu)},c),e.type==="local"&&(this.transformSimplePseudos(e,o,c),this.transformSelectors(e,o,c)),this.transformLayer(e,o["@layer"],c),this.transformSupports(e,o["@supports"],c),this.transformContainer(e,o["@container"],c)}}}transformContainer(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@container ".concat(i))),Bh(r,(i,o)=>{var a="@container ".concat(o),c=[...n,a];this.addConditionalRule({selector:e.selector,rule:Bu(i,Fu)},c),e.type==="local"&&(this.transformSimplePseudos(e,i,c),this.transformSelectors(e,i,c)),this.transformLayer(e,i["@layer"],c),this.transformSupports(e,i["@supports"],c),this.transformMedia(e,i["@media"],c)})}}transformLayer(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@layer ".concat(i))),Bh(r,(i,o)=>{var a=[...n,"@layer ".concat(o)];this.addLayer(a),this.addConditionalRule({selector:e.selector,rule:Bu(i,Fu)},a),e.type==="local"&&(this.transformSimplePseudos(e,i,a),this.transformSelectors(e,i,a)),this.transformMedia(e,i["@media"],a),this.transformSupports(e,i["@supports"],a),this.transformContainer(e,i["@container"],a)})}}transformSupports(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@supports ".concat(i))),Bh(r,(i,o)=>{var a=[...n,"@supports ".concat(o)];this.addConditionalRule({selector:e.selector,rule:Bu(i,Fu)},a),e.type==="local"&&(this.transformSimplePseudos(e,i,a),this.transformSelectors(e,i,a)),this.transformLayer(e,i["@layer"],a),this.transformMedia(e,i["@media"],a),this.transformContainer(e,i["@container"],a)})}}transformSimplePseudos(e,r,n){for(var s of Object.keys(r))if(VNe[s]){if(e.type!=="local")throw new Error("Simple pseudos are not valid in ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));n?this.addConditionalRule({selector:"".concat(e.selector).concat(s),rule:r[s]},n):this.addRule({conditions:n,selector:"".concat(e.selector).concat(s),rule:r[s]})}}toCss(){var e=[];for(var r of this.fontFaceRules)e.push(ff({"@font-face":r}));for(var n of this.keyframesRules)e.push(ff({["@keyframes ".concat(n.name)]:n.rule}));for(var s of this.layers.values()){var[i,...o]=s.reverse(),a={[i]:$Y};for(var c of o)a={[c]:a};e.push(ff(a))}for(var l of this.rules)e.push(ff({[l.selector]:l.rule}));for(var f of this.conditionalRulesets)for(var u of f.renderToArray())e.push(ff(u));return e.filter(Boolean)}}function ff(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=[],n=function(o){var a=t[o];if(a&&Array.isArray(a))r.push(...a.map(l=>ff({[o]:l},e)));else if(a&&typeof a=="object"){var c=Object.keys(a).length===0;c||r.push("".concat(e).concat(o,` { +`).concat(ff(a,e+ZNe),` +`).concat(e,"}"))}else a===$Y?r.push("".concat(e).concat(o,";")):r.push("".concat(e).concat(o.startsWith("--")?o:JNe(o),": ").concat(a,";"))};for(var s of Object.keys(t))n(s);return r.join(` +`)}function tje(t){var{localClassNames:e,cssObjs:r,composedClassLists:n}=t,s=new eje(e,n);for(var i of r)s.processCssObj(i);return s.toCss()}var cR=new Set,lR=[],q6=[],rje={appendCss:t=>{q6.push(t)},registerClassName:t=>{cR.add(t)},registerComposition:t=>{lR.push(t)},markCompositionUsed:()=>{},onEndFileScope:t=>{var e=tje({localClassNames:Array.from(cR),composedClassLists:lR,cssObjs:q6}).join(` +`);NNe({fileScope:t,css:e}),q6=[]},getIdentOption:()=>"short"};_Ne(rje);function Xb(t,e){return Xb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},Xb(t,e)}function nje(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xb(t,e)}function wE(){wE=function(s,i){return new r(s,void 0,i)};var t=RegExp.prototype,e=new WeakMap;function r(s,i,o){var a=new RegExp(s,i);return e.set(a,o||e.get(s)),Xb(a,r.prototype)}function n(s,i){var o=e.get(i);return Object.keys(o).reduce(function(a,c){var l=o[c];if(typeof l=="number")a[c]=s[l];else{for(var f=0;s[l[f]]===void 0&&f+1]+)>/g,function(c,l){var f=o[l];return"$"+(Array.isArray(f)?f.join("$"):f)}))}if(typeof i=="function"){var a=this;return t[Symbol.replace].call(this,s,function(){var c=arguments;return typeof c[c.length-1]!="object"&&(c=[].slice.call(c)).push(n(c,a)),i.apply(this,c)})}return t[Symbol.replace].call(this,s,i)},wE.apply(this,arguments)}function sje(t){var{debugId:e,debugFileName:r}=t,n=e?[e.replace(/\s/g,"_")]:[];if(r){var{filePath:s}=No(),i=s.match(wE(/([^\/\\]*)?[\/\\]?([^\/\\]*)\.css\.(ts|js|tsx|jsx|cjs|mjs)$/,{dir:1,file:2}));if(i&&i.groups){var{dir:o,file:a}=i.groups;n.unshift(a&&a!=="index"?a:o)}}return n.join("_")}function fR(t){return t.match(/^[0-9]/)?"_".concat(t):t}function yS(t){var e=RNe(),{debugId:r,debugFileName:n=!0}=$0($0({},typeof t=="string"?{debugId:t}:null),typeof t=="object"?t:null),s=MNe().toString(36),{filePath:i,packageName:o}=No(),a=Q9(o?"".concat(o).concat(i):i),c="".concat(a).concat(s);if(e==="debug"){var l=sje({debugId:r,debugFileName:n});return l&&(c="".concat(l,"__").concat(c)),fR(c)}if(typeof e=="function"){if(c=e({hash:c,debugId:r,filePath:i,packageName:o}),!c.match(/^[A-Z_][0-9A-Z_-]+$/i))throw new Error('Identifier function returned invalid indentifier: "'.concat(c,'"'));return c}return fR(c)}function ije(t,e){var r=yS(e);kY(r,No());var n=[],s=[];for(var i of t)typeof i=="string"?n.push(i):s.push(i);var o=r;if(n.length>0&&(o="".concat(r," ").concat(qNe(n)),INe({identifier:r,classList:o},No()),s.length>0&&SY(r)),s.length>0){var a=HG.all(s,{arrayMerge:(c,l)=>l});mw({type:"local",selector:r,rule:a},No())}return o}function yu(t,e){if(Array.isArray(t))return ije(t,e);var r=yS(e);return kY(r,No()),mw({type:"local",selector:r,rule:t},No()),r}function oje(t,e){mw({type:"global",selector:t,rule:e},No())}function _Y(t,e){var r=eh(yS(e),{isIdentifier:!0});return mw({type:"keyframes",name:r,rule:t},No()),r}const PY=()=>{const t=w.createContext(void 0);return[()=>{const r=w.useContext(t);if(!r)throw new Error("useGenericContext must be used within a Provider");return r},t.Provider]},[aje,cje]=PY(),By=()=>{const{setOpenWalletModal:t,openWalletModalState:e}=aje();return{setOpenWalletModal:t,openWalletModalState:e}};function Rn(){return Rn=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}const wr=(t,e)=>t.toLowerCase()===e.toLowerCase(),pS=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},IY=t=>`0x${pS((t==null?void 0:t.substring(2))||"",8)}`;var wc=function(t){return t[t.VERY_LARGE=0]="VERY_LARGE",t[t.FRACTION=1]="FRACTION",t[t.VERY_TINY=2]="VERY_TINY",t[t.MIXED=3]="MIXED",t}(wc||{});const Ha=t=>{if(isNaN(Number(t)))return console.error(`display format error ${t} is not a number`),"NaN";const e=Number(t);if(e===0)return"0";let r;e>1e8?r=wc.VERY_LARGE:e<1e-10?r=wc.VERY_TINY:e<1?r=wc.FRACTION:r=wc.MIXED;let n,s;switch(r){case wc.VERY_LARGE:n="compact",s={maximumFractionDigits:4};break;case wc.VERY_TINY:n="scientific",s={maximumFractionDigits:4};break;case wc.FRACTION:n="standard",s={maximumSignificantDigits:4};break;default:n="standard",s={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",Rn({notation:n},s)).format(e)},lje=t=>t.charAt(0).toUpperCase()+t.slice(1),TY=(t,e)=>{const r=t.split(".");return r.length===1?t:`${r[0]}.${r[1].slice(0,e)}`},Zb=t=>/0x[a-fA-F0-9]{40}/.test(t),fje=t=>t>0?rt.colors.positive:t<0?rt.colors.negative:rt.colors.text50,uR=(t,e)=>{var r;const n=e.find(i=>wr(i.token.contractAddress,t.contractAddress));return n&&(n==null||(r=n.price24hChange)==null?void 0:r.value)||0},Go=({balance:t,prices:e,decimals:r,conversionRate:n})=>{var s;let i=0;const o=e.find(u=>wr(u.token.contractAddress,t.contractAddress));if(!o)return"0.00";const a=((s=o.price)==null?void 0:s.value)||0,c=Dt(t.balance,r),l=parseFloat(c)*a;return i+=l,`${(i*n).toFixed(2)}`},OY=t=>{const e=[],r=[],n=[];t.forEach(a=>{a.contractAddress===Lt?e.push(a):a.contractType==="ERC20"?r.push(a):(a.contractType==="ERC721"||a.contractType==="ERC1155")&&n.push(a)});const s=e.sort((a,c)=>a.tokenID.localeCompare(c.tokenID)),i=r.sort((a,c)=>a.tokenID.localeCompare(c.tokenID)),o=n.sort((a,c)=>a.tokenID.localeCompare(c.tokenID));return{nativeTokens:s,erc20Tokens:i,collectibles:o}},RY=t=>{const e=[];return t==null||t.pages.forEach(r=>{e.push(...r.transactions)}),e},e2=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=pr(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:Lt,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:oi.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},mS=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await pr(e),n=await r.getCoinPrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},t2=async({accountAddress:t,chainId:e,contractAddress:r},{hideUnlistedTokens:n,hideCollectibles:s,includeMetadata:i=!0,verifiedOnly:o})=>{try{const{indexerClient:a}=pr(e),c=await a.getTokenBalances(Rn({accountAddress:t,includeMetadata:i,metadataOptions:{verifiedOnly:o??!0}},r?{contractAddress:r}:{}));let l=(c==null?void 0:c.balances)||[];if(n&&l.length>0){const f=await mS({tokens:l.map(u=>({chainId:u.chainId,contractAddress:u.contractAddress,tokenId:u.tokenID}))});l=l.filter(u=>{const d=f==null?void 0:f.find(h=>wr(h.token.contractAddress,u.contractAddress)&&h.token.chainId===u.chainId);return u.contractType!=="ERC20"||!!d&&d.price!==null})}return s&&l.length>0&&(l=l.filter(f=>f.contractType!=="ERC721"&&f.contractType!=="ERC1155")),l}catch(a){return console.error(a),[]}},uje=async({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})=>{try{return(await Promise.all([e2({accountAddress:t,chainId:e}),t2({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})])).flat()}catch(s){return console.error(s),[]}},MY=async({accountAddress:t,chainId:e,collectionAddress:r,includeMetadata:n=!0,verifiedOnly:s})=>{try{const{indexerClient:i}=await pr(e),o=await i.getTokenBalances({accountAddress:t,includeMetadata:n,contractAddress:r,metadataOptions:{verifiedOnly:s??!0}});return(o==null?void 0:o.balances)||[]}catch(i){return console.error(i),[]}},dje=async({accountAddress:t,chainIds:e,displayAssets:r},{hideUnlistedTokens:n,hideCollectibles:s})=>{let o=[];const a=r.length>0;try{if(a){const k=r.filter(D=>wr(D.contractAddress,Lt)),$=r.filter(D=>!wr(D.contractAddress,Lt)),I={},M={};k.forEach(D=>{I[D.chainId]||(I[D.chainId]=[]),I[D.chainId].push(D)}),$.forEach(D=>{M[D.chainId]||(M[D.chainId]=[]),M[D.chainId].push(D)}),o=(await Promise.all([...Object.keys(I).map(D=>e2({accountAddress:t,chainId:Number(D)})),...Object.keys(M).map(D=>M[Number(D)].map(H=>t2({accountAddress:t,chainId:Number(D),contractAddress:H.contractAddress},{hideUnlistedTokens:n,hideCollectibles:s,includeMetadata:!1}))).flat()])).flat()}else o=(await Promise.all([...e.map(k=>e2({accountAddress:t,chainId:k})),...e.map(k=>t2({accountAddress:t,chainId:k},{hideUnlistedTokens:n,hideCollectibles:s,includeMetadata:!1}))])).flat();const{nativeTokens:c,erc20Tokens:l,collectibles:f}=OY(o),u=new Promise(async(k,$)=>{if(l.length>0){const I=l.map(D=>({chainId:D.chainId,contractAddress:D.contractAddress})),M=await mS({tokens:I})||[];k(M)}else k([])}),d=f.map(async k=>a?k:await MY({accountAddress:t,chainId:k.chainId,collectionAddress:k.contractAddress,includeMetadata:!1})),h=async()=>{const k={},$={};l.forEach(M=>{$[M.chainId]?$[M.chainId].push(M):$[M.chainId]=[M]});const I=Object.keys($).map(async M=>{const{metadataClient:D}=pr(M),G=$[Number(M)].map(Q=>Q.contractAddress),V=await D.getContractInfoBatch({chainID:String(M),contractAddresses:G});k[Number(M)]=V});return await Promise.all([...I]),k},[v,y,...m]=await Promise.all([u,h(),...d]),g=l.sort((k,$)=>{var I,M;const D=v.find(A=>wr(A.token.contractAddress,k.contractAddress)),H=v.find(A=>wr(A.token.contractAddress,$.contractAddress)),G=D!=null&&D.price?D.price.value:0,V=H!=null&&H.price?H.price.value:0,Q=(I=y[k.chainId].contractInfoMap[k.contractAddress])==null?void 0:I.decimals,F=(M=y[$.chainId].contractInfoMap[$.contractAddress])==null?void 0:M.decimals,C=Q===void 0?0:Number(Dt(k.balance,Q)),S=F===void 0?0:Number(Dt($.balance,F)),T=C*G;return S*V-T}),b=bIe(m.flat(),10).sort((k,$)=>k.contractAddress.localeCompare($.contractAddress));return s?[...c.length>0?[c[0]]:[],...g.length>0?g.slice(0,11):[]]:[...c.length>0?[c[0]]:[],...g.length>0?[g[0]]:[],...b.length>0?[...b]:[]]}catch(c){return console.error(c),[]}},hje=async({accountAddress:t,chainId:e,collectionAddress:r,tokenId:n,verifiedOnly:s})=>{const{indexerClient:i}=pr(e);return(await i.getTokenBalances({accountAddress:t,includeMetadata:!0,contractAddress:r,tokenID:n,metadataOptions:{verifiedOnly:s??!0}})).balances[0]},vje=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await pr(e),n=await r.getCollectiblePrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},NY=async({chainId:t,contractAddress:e,accountAddress:r,tokenId:n,page:s})=>{const{indexerClient:i}=pr(t);return i.getTransactionHistory({includeMetadata:!0,page:s,filter:{accountAddress:r,contractAddress:e,tokenID:n}})},yje=async({chainIds:t,accountAddress:e})=>(await Promise.all([...t.map(i=>NY({chainId:i,accountAddress:e,page:{page:1}}))])).map(i=>i.transactions).flat().sort((i,o)=>{const a=new Date(i.timestamp).getTime();return new Date(o.timestamp).getTime()-a}),pje=async({toCurrency:t})=>{if(t==="USD")return 1;const{apiClient:e}=pr(137);return(await e.getExchangeRate({toCurrency:t})).exchangeRate.value},mje=async({tokens:t})=>{const{metadataClient:e}=pr(t.chainId);return(await e.getTokenMetadata({chainID:t.chainId.toString(),contractAddress:t.contractAddress,tokenIDs:t.tokenIds})).tokenMetadata},gje=async t=>{const{metadataClient:e}=pr(Number(t.chainID));return(await e.getContractInfo(t)).contractInfo},bje=["chainIds"],xje=["disabled"],Bs={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},gS=(t,e)=>wn({queryKey:["balances",t,e],queryFn:async()=>{const{chainIds:r}=t,n=gw(t,bje);return(await Promise.all(r.map(i=>uje(Rn({},n,{chainId:i}),e)))).flat()},retry:!0,staleTime:Bs.oneSecond*30,enabled:t.chainIds.length>0&&!!t.accountAddress}),wje=t=>wn({queryKey:["collectionBalance",t],queryFn:()=>MY(t),retry:!0,staleTime:Bs.oneSecond*30,enabled:!!t.chainId&&!!t.accountAddress&&!!t.collectionAddress}),pu=t=>{let{disabled:e}=t,r=gw(t,xje);return wn({queryKey:["coinPrices",r],queryFn:()=>mS(r),retry:!0,staleTime:Bs.oneSecond*30,enabled:r.tokens.length>0&&!e})},Cje=(t,e)=>wn({queryKey:["balancesAssetsSummary",t,e],queryFn:()=>dje(t,e),retry:!0,refetchInterval:Bs.oneSecond*4,refetchOnMount:!0,staleTime:Bs.oneSecond,enabled:t.chainIds.length>0&&!!t.accountAddress}),Eje=(t,e)=>wn({queryKey:["coinBalance",t,e],queryFn:()=>wr((t==null?void 0:t.contractAddress)||"",Lt)?e2({accountAddress:t.accountAddress,chainId:t.chainId}).then(s=>s[0]):t2(t,e).then(n=>n[0]),retry:!0,staleTime:Bs.oneSecond*30,enabled:!!t.chainId&&!!t.accountAddress}),jY=t=>wn({queryKey:["collectibleBalance",t],queryFn:()=>hje(t),retry:!0,staleTime:Bs.oneSecond*30,enabled:!!t.chainId&&!!t.accountAddress&&!!t.collectionAddress&&!!t.tokenId}),DY=t=>wn({queryKey:["useCollectiblePrices",t],queryFn:()=>vje(t),retry:!0,staleTime:Bs.oneMinute,enabled:t.tokens.length>0}),LY=t=>Y7e({queryKey:["transactionHistory",t],queryFn:({pageParam:e})=>NY(Rn({},t,e?{page:{page:e}}:{page:{page:1}})),getNextPageParam:({page:e})=>{if(e.more)return(e==null?void 0:e.page)||1},retry:!0,staleTime:Bs.oneSecond*30,enabled:!!t.chainId&&!t.disabled&&!!t.accountAddress}),kje=t=>wn({queryKey:["transactionHistorySummary",t],queryFn:()=>yje(t),retry:!0,staleTime:Bs.oneSecond,refetchOnMount:!0,enabled:t.chainIds.length>0&&!!t.accountAddress}),Bl=t=>wn({queryKey:["useConversionRate",t],queryFn:()=>pje(t),retry:!0,staleTime:Bs.oneMinute*10}),Sje=t=>wn({queryKey:["useTokenMetadata",t],queryFn:()=>mje(t),retry:!0,staleTime:Bs.oneMinute*10,enabled:!!t.tokens.chainId&&!!t.tokens.contractAddress}),Aje=t=>wn({queryKey:["useContractInfo",t],queryFn:()=>gje(t),retry:!0,staleTime:Bs.oneMinute*10,enabled:!!t.chainID&&!!t.contractAddress}),[$je,_je]=PY(),Vs=()=>{const{setHistory:t,history:e}=$je();return{setNavigation:s=>{const i=document.getElementById("sequence-kit-wallet-content"),o=i==null?void 0:i.parentElement;o==null||o.scrollTo(0,0);const a=s.location==="home"?[]:[...e,s];t(a)},history:e,setHistory:t,goBack:()=>{const s=[...e];s.pop(),t(s)}}},Pje=[{inputs:[{internalType:"address",name:"_from",type:"address"},{internalType:"address",name:"_to",type:"address"},{internalType:"uint256[]",name:"_ids",type:"uint256[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],Ije=[{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"}],Tje=[{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],BY=[{symbol:"USD",sign:"$",name:{message:"US Dollar"},decimals:2},{symbol:"CAD",sign:"$",name:{message:"Canadian Dollar"},decimals:2},{symbol:"GBP",sign:"£",name:{message:"British Pound Sterling"},decimals:2},{symbol:"EUR",sign:"€",name:{message:"Euro"},decimals:2},{symbol:"CNY",sign:"¥",name:{message:"Chinese Yuan"},decimals:2},{symbol:"JPY",sign:"¥",name:{message:"Japanese Yen"},decimals:2},{symbol:"KRW",sign:"₩",name:{message:"South Korean Won"},decimals:2},{symbol:"SGD",sign:"$",name:{message:"Singapore Dollar"},decimals:2},{symbol:"CHF",sign:"CHF ",name:{message:"Swiss Franc"},decimals:2},{symbol:"AUD",sign:"$",name:{message:"Australian Dollar"},decimals:2},{symbol:"NZD",sign:"$",name:{message:"New Zealand Dollar"},decimals:2},{symbol:"SEK",sign:"kr ",name:{message:"Swedish Krona"},decimals:2},{symbol:"NOK",sign:"kr ",name:{message:"Norwegian Krone"},decimals:2},{symbol:"MXN",sign:"$",name:{message:"Mexican Peso"},decimals:2},{symbol:"INR",sign:"₹",name:{message:"Indian Rupee"},decimals:2},{symbol:"ZAR",sign:"R ",name:{message:"South African Rand"},decimals:2},{symbol:"TRY",sign:"₺",name:{message:"Turkish Lira"},decimals:2},{symbol:"BRL",sign:"R$",name:{message:"Brazilian Real"},decimals:2},{symbol:"DKK",sign:"kr ",name:{message:"Danish Krone"},decimals:2},{symbol:"PLN",sign:"zł ",name:{message:"Polish Zloty"},decimals:2},{symbol:"THB",sign:"฿",name:{message:"Thai Baht"},decimals:2},{symbol:"IDR",sign:"Rp",name:{message:"Indonesian Rupiah"},decimals:2}],Oje=BY[0],Gs="54px",es=()=>{const{chains:t}=Ct(),e=()=>{let l=!0,f=!1,u=Oje,d=t.map(h=>h.id);try{const h=localStorage.getItem(ur.Settings),v=JSON.parse(h||"{}");if((v==null?void 0:v.hideUnlistedTokens)!==void 0&&(l=v==null?void 0:v.hideUnlistedTokens),(v==null?void 0:v.hideCollectibles)!==void 0&&(f=v==null?void 0:v.hideCollectibles),(v==null?void 0:v.fiatCurrency)!==void 0&&(u=v==null?void 0:v.fiatCurrency),(v==null?void 0:v.selectedNetworks)!==void 0){let y=!0;v.selectedNetworks.forEach(m=>{t.find(g=>g.id===m)===void 0&&(y=!1)}),y&&(d=v==null?void 0:v.selectedNetworks)}}catch(h){console.error(h,"Failed to fetch settings")}return{hideUnlistedTokens:l,hideCollectibles:f,fiatCurrency:u,selectedNetworks:d}},r=e(),[n,s]=p.useState(r);return Rn({},n,{setFiatCurrency:l=>{const f=e(),u=Rn({},f,{fiatCurrency:l});localStorage.setItem(ur.Settings,JSON.stringify(u)),s(u)},setHideCollectibles:l=>{const f=e(),u=Rn({},f,{hideCollectibles:l});localStorage.setItem(ur.Settings,JSON.stringify(u)),s(u)},setHideUnlistedTokens:l=>{const f=e(),u=Rn({},f,{hideUnlistedTokens:l});localStorage.setItem(ur.Settings,JSON.stringify(u)),s(u)},setSelectedNetworks:l=>{const f=e(),u=Rn({},f,{selectedNetworks:l});localStorage.setItem(ur.Settings,JSON.stringify(u)),s(u)}})},Rje=({size:t=30})=>w.createElement(K,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",flexShrink:"0",style:{width:`${t}px`,height:`${t}px`}},w.createElement(he,{variant:"large",color:"textInverse100"},"?")),Xf=({imageUrl:t,size:e=30})=>t?w.createElement(Fr,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):w.createElement(Rje,{size:e}),dR=({networkLogoUrl:t,logoUrl:e,tokenName:r,balance:n,balanceFiat:s,priceChangePercentage:i,symbol:o})=>{const{fiatCurrency:a}=es(),c=i>0?"+":"";return w.createElement(K,{background:"backgroundSecondary",width:"full",height:"full",borderRadius:"md",padding:"4",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"1"},w.createElement(K,{marginBottom:"1"},w.createElement(Xf,{size:36,imageUrl:e})),w.createElement(K,{marginBottom:"3"},w.createElement(K,{flexDirection:"row",gap:"1",justifyContent:"flex-start",alignItems:"center"},w.createElement(he,{fontWeight:"bold",whiteSpace:"nowrap",color:"text100",style:{maxWidth:"130px",textOverflow:"ellipsis",overflow:"hidden"}},r),w.createElement(Xf,{size:12,imageUrl:t})),w.createElement(he,{color:"text50",whiteSpace:"nowrap",style:{display:"block",maxWidth:"150px",textOverflow:"ellipsis",overflow:"hidden"}},`${n} ${o}`)),w.createElement(K,null,w.createElement(K,null,w.createElement(he,{fontWeight:"bold",color:"text100"},`${a.sign}${s}`)),w.createElement(he,{style:{color:fje(i)}},`${c}${i.toFixed(2)}%`)))},hR=({balance:t})=>{var e;const{chains:r}=Ct(),{fiatCurrency:n}=es(),s=wr(t.contractAddress,Lt),i=Pr(t.chainId,r),{data:o=[],isLoading:a}=pu({tokens:[{chainId:t.chainId,contractAddress:t.contractAddress}]}),{data:c=1,isLoading:l}=Bl({toCurrency:n.symbol}),{data:f,isLoading:u}=Aje({chainID:String(t.chainId),contractAddress:t.contractAddress});if(a||l||u)return w.createElement(K,{background:"backgroundSecondary",width:"full",height:"full",borderRadius:"md"});if(s){const $=Go({balance:t,prices:o,conversionRate:c,decimals:i.decimals}),I=uR(t,o),M=Dt(t.balance,i.decimals),D=Ha(M);return w.createElement(dR,{networkLogoUrl:i.logoURI,logoUrl:i.logoURI,tokenName:i.name,balance:D,balanceFiat:$,priceChangePercentage:I,symbol:i.symbol})}const h=(e=f==null?void 0:f.decimals)!=null?e:18,v=Go({balance:t,prices:o,conversionRate:c,decimals:h}),y=uR(t,o),m=Dt(t.balance,h),g=Ha(m),b=(f==null?void 0:f.name)||"Unknown",x=(f==null?void 0:f.name)||"TOKEN",k=f==null?void 0:f.logoURI;return w.createElement(dR,{networkLogoUrl:i.logoURI,logoUrl:k,tokenName:b,balance:g,balanceFiat:v,priceChangePercentage:y,symbol:x})},bS=({imageUrl:t})=>w.createElement(Pa,{padding:"0",aspectRatio:"1/1",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:"sm",background:"backgroundSecondary"},w.createElement(Fr,{style:{height:"100%"},src:t})),Mje=({balance:t})=>{var e;const{data:r}=Sje({tokens:{chainId:t.chainId,contractAddress:t.contractAddress,tokenIds:[t.tokenID]}}),n=r==null||(e=r[0])==null?void 0:e.image;return w.createElement(bS,{imageUrl:n})};Dy("packages/wallet/src/shared/Skeleton/styles.css.ts","kit");const Nje=_Y({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),jje=yu({height:"76px",backgroundColor:"#909090",animation:`${Nje} 2s ease-in-out infinite`},"skeleton");Ly();const Wt=({width:t="100%",height:e="100%",borderRadius:r="md",aspectRatio:n})=>w.createElement(K,{className:jje,borderRadius:r,aspectRatio:n,style:{width:t,height:e}}),Dje=()=>w.createElement(K,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${rt.space[1]}) calc(50% - ${rt.space[1]})`,gap:rt.space[2]}},Array(12).fill(null).map((t,e)=>w.createElement(K,{key:e},w.createElement(Wt,{height:"100%",width:"100%",aspectRatio:"1/1"}))));Dy("packages/wallet/src/shared/styles.css.ts","kit");const jo=yu({":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"clickable"),Lje=yu({"> div":{overflowY:"scroll"}},"scrollbar"),Bje=yu({},"walletContent");Ly();const Fje=()=>{const{address:t}=Cn(),{setNavigation:e}=Vs(),{displayedAssets:r}=SNe(),{hideUnlistedTokens:n,hideCollectibles:s,selectedNetworks:i}=es(),{data:o=[],isLoading:a}=Cje({accountAddress:t||"",chainIds:i,displayAssets:r},{hideUnlistedTokens:n,hideCollectibles:s});if(a)return w.createElement(Dje,null);const{nativeTokens:c,erc20Tokens:l,collectibles:f}=OY(o),u=d=>{d.contractType==="ERC1155"||d.contractType==="ERC721"?e&&e({location:"collectible-details",params:{contractAddress:d.contractAddress,chainId:d.chainId,tokenId:d.tokenID}}):d.contractType==="ERC20"?e&&e({location:"coin-details",params:{contractAddress:d.contractAddress,chainId:d.chainId}}):e&&e({location:"coin-details",params:{contractAddress:d.contractAddress,chainId:d.chainId}})};return w.createElement(K,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${rt.space[1]}) calc(50% - ${rt.space[1]})`,gap:rt.space[2]}},c.map((d,h)=>w.createElement(K,{key:h,className:jo,aspectRatio:"1/1",onClick:()=>u(d)},w.createElement(hR,{balance:d}))),l.map((d,h)=>w.createElement(K,{className:jo,key:h,aspectRatio:"1/1",onClick:()=>u(d)},w.createElement(hR,{balance:d}))),f.map((d,h)=>w.createElement(K,{className:jo,aspectRatio:"1/1",key:h,onClick:()=>u(d)},w.createElement(Mje,{balance:d}))))},so=()=>{const[t,e]=p.useState("0px");return p.useEffect(()=>{e(navigator.userAgent.match(/chrome|chromium|crios/i)?"13px":"0px")},[]),t},zje=()=>(so(),w.createElement(K,{paddingX:"4",paddingBottom:"5",gap:"4",flexDirection:"column"},w.createElement(Fje,null))),qje=()=>{const{address:t,chain:e}=Cn(),{chains:r}=Ct(),[n,s]=p.useState(!1),i=Pr((e==null?void 0:e.id)||1,r);p.useEffect(()=>{n&&setTimeout(()=>{s(!1)},4e3)},[n]);const o=()=>{s(!0)},a=()=>{typeof window<"u"&&window.open(`https://twitter.com/intent/tweet?text=Here%20is%20my%20address%20${t}`)};return w.createElement(K,{style:{paddingTop:Gs}},w.createElement(K,{padding:"5",paddingTop:"3",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"4"},w.createElement(K,{marginTop:"1",width:"fit",background:"white",borderRadius:"md",alignItems:"center",justifyContent:"center",padding:"4"},w.createElement(qIe,{value:t||"",size:200,bgColor:"white",fgColor:"black","data-id":"receiveQR"})),w.createElement(K,null,w.createElement(K,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},w.createElement(he,{variant:"medium",color:"text100",textAlign:"center",lineHeight:"inherit",style:{fontWeight:"700"}},"My Wallet"),w.createElement(Fr,{width:"5",src:i.logoURI,alt:"icon"})),w.createElement(K,{marginTop:"2",style:{maxWidth:"180px",textAlign:"center"}},w.createElement(he,{textAlign:"center",color:"text50",style:{fontSize:"14px",maxWidth:"180px",overflowWrap:"anywhere"}},t))),w.createElement(K,{gap:"3"},w.createElement(oK.CopyToClipboard,{text:t||""},w.createElement(bt,{onClick:o,leftIcon:ax,label:n?"Copied!":"Copy"})),w.createElement(bt,{onClick:a,leftIcon:L0e,label:"Share"})),w.createElement(K,{justifyContent:"center",alignItems:"center",style:{maxWidth:"260px",textAlign:"center"}},w.createElement(he,{color:"text100",variant:"small",style:{maxWidth:"260px",overflowWrap:"anywhere"}},`This is a ${i.name} address. Please only send assets on the ${i.name} network.`))))},FY=({imageUrl:t,name:e,decimals:r,balance:n,symbol:s,fiatValue:i,chainId:o,showSquareImage:a})=>{const{chains:c}=Ct(),{fiatCurrency:l}=es(),f=Dt(n,r),u=Ha(f),d=Pr(o,c);return w.createElement(K,{alignItems:"flex-end",justifyContent:"space-between"},w.createElement(K,{justifyContent:"space-between",alignItems:"center",gap:"2"},a?w.createElement(K,{style:{width:"40px"}},w.createElement(bS,{imageUrl:t})):w.createElement(Xf,{imageUrl:t,size:40}),w.createElement(K,{flexDirection:"column",alignItems:"flex-start"},w.createElement(K,{flexDirection:"row",alignItems:"center",gap:"1"},w.createElement(he,{variant:"medium",color:"text100"},e),w.createElement(Xf,{imageUrl:d.logoURI,size:12})),w.createElement(he,{color:"text50",variant:"normal"}," ",`${u} ${s} available`))),w.createElement(K,{flexDirection:"column",alignItems:"flex-end",justifyContent:"flex-end"},i&&w.createElement(he,{variant:"normal",color:"text100"},`${l.sign}${i}`)))},Uje=({chainId:t,contractAddress:e})=>{var r,n,s,i,o;const{setNavigation:a}=Vs(),{analytics:c}=bY(),{chains:l}=Ct(),f=nw(),{address:u="",connector:d}=Cn(),h=!!(d!=null&&(r=d._wallet)!=null&&r.isSequenceBased),v=f===t,y=!v&&!h,{switchChainAsync:m}=F9(),g=p.useRef(null);By();const{fiatCurrency:b}=es(),[x,k]=p.useState("0"),[$,I]=p.useState(""),{sendTransaction:M}=B9(),[D,H]=p.useState(!1),{data:G=[],isLoading:V}=gS({accountAddress:u,chainIds:[t],contractAddress:e},{hideUnlistedTokens:!1}),Q=Pr(t,l),F=G.find(de=>de.contractAddress===e),{data:C=[],isLoading:S}=pu({tokens:[{chainId:t,contractAddress:e}]}),{data:T=1,isLoading:R}=Bl({toCurrency:b.symbol});if(V||S||R)return null;const N=wr(e,Lt),B=N?Q.decimals:(F==null||(n=F.contractInfo)==null?void 0:n.decimals)||18,P=N?Q.name:(F==null||(s=F.contractInfo)==null?void 0:s.name)||"",E=N?Q.logoURI:F==null||(i=F.contractInfo)==null?void 0:i.logoURI,L=N?Q.symbol:(F==null||(o=F.contractInfo)==null?void 0:o.symbol)||"",q=x===""?"0":x,_=_a(q,B),U=Go({balance:Rn({},F,{balance:_.toString()}),prices:C,conversionRate:T,decimals:B}),W=_.gt((F==null?void 0:F.balance)||"0"),J=_.gt(0),X=de=>{const{value:pe}=de.target,$e=TY(pe,B);k($e)},re=()=>{var de;(de=g.current)==null||de.focus();const pe=Dt((F==null?void 0:F.balance)||0,B).toString();k(pe)},ee=async()=>{const de=await navigator.clipboard.readText();I(de)},se=()=>{I("")},xe=async de=>{!v&&h&&await m({chainId:t}),de.preventDefault();const pe=_a(q,B);if(N){var $e;c==null||c.track({event:"SEND_TRANSACTION_REQUEST",props:{walletClient:(d==null||($e=d._wallet)==null?void 0:$e.id)||"unknown",source:"sequence-kit/wallet"}}),H(!0),M({to:$,value:BigInt(pe.toString()),gas:null},{onSettled:(_e,Ye)=>{_e&&a({location:"home"}),H(!1)}})}else{var Se;c==null||c.track({event:"SEND_TRANSACTION_REQUEST",props:{walletClient:(d==null||(Se=d._wallet)==null?void 0:Se.id)||"unknown",source:"sequence-kit/wallet"}}),H(!0),M({to:F==null?void 0:F.contractAddress,data:new Ir(Ije).encodeFunctionData("transfer",[$,pe.toHexString()]),gas:null},{onSettled:(_e,Ye)=>{_e&&a({location:"home"}),H(!1)}})}};return w.createElement(K,{padding:"5",paddingTop:"3",style:{marginTop:Gs},gap:"2",flexDirection:"column",as:"form",onSubmit:xe,pointerEvents:D?"none":"auto"},w.createElement(K,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},w.createElement(FY,{imageUrl:E,decimals:B,name:P,symbol:L,balance:(F==null?void 0:F.balance)||"0",fiatValue:Go({balance:F,prices:C,conversionRate:T,decimals:B}),chainId:t}),w.createElement(DU,{ref:g,style:{fontSize:rt.fontSizes.xlarge,fontWeight:rt.fontWeights.bold},name:"amount",value:x,onChange:X,controls:w.createElement(w.Fragment,null,w.createElement(he,{variant:"small",color:"text50",whiteSpace:"nowrap"},`~${b.sign}${U}`),w.createElement(bt,{size:"xs",shape:"square",label:"Max",onClick:re,"data-id":"maxCoin",flexShrink:"0"}),w.createElement(he,{fontSize:"xlarge",fontWeight:"bold",color:"text100"},L))}),W&&w.createElement(he,{as:"div",variant:"normal",color:"negative",marginTop:"2"},"Insufficient Funds")),w.createElement(K,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},w.createElement(he,{fontSize:"normal",color:"text50"},"To"),Zb($)?w.createElement(K,{borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",className:jo,onClick:se,style:{height:"52px"}},w.createElement(K,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},w.createElement(my,{address:$,style:{width:"20px"}}),w.createElement(he,{color:"text100"},`0x${pS($.substring(2),8)}`)),w.createElement(iu,{size:"xs"})):w.createElement(au,{value:$,onChange:de=>I(de.target.value),placeholder:`${Q.name} Address (0x...)`,name:"to-address","data-1p-ignore":!0,controls:w.createElement(bt,{size:"xs",shape:"square",label:"Paste",onClick:ee,"data-id":"to-address",flexShrink:"0",leftIcon:ax})})),y&&w.createElement(K,{marginTop:"3"},w.createElement(he,{variant:"small",color:"negative",marginBottom:"2"},"The wallet is connected to the wrong network. Please switch network before proceeding"),w.createElement(bt,{marginTop:"2",width:"full",variant:"primary",type:"button",label:"Switch Network",onClick:async()=>await m({chainId:t}),disabled:v,style:{height:"52px",borderRadius:rt.radii.md}})),w.createElement(K,{style:{height:"52px"},alignItems:"center",justifyContent:"center"},D?w.createElement(B1,null):w.createElement(bt,{color:"text100",marginTop:"3",width:"full",variant:"primary",type:"submit",disabled:!J||!Zb($)||W||!v&&!h,label:"Send",rightIcon:Kc,style:{height:"52px",borderRadius:rt.radii.md}})))},Wje=({chainId:t,contractAddress:e,tokenId:r})=>{var n,s,i,o,a;const{setNavigation:c}=Vs(),{analytics:l}=bY(),{chains:f}=Ct(),u=nw(),{address:d="",connector:h}=Cn(),v=!!(h!=null&&(n=h._wallet)!=null&&n.isSequenceBased),y=u===t,m=!y&&!v,{switchChain:g}=F9(),b=p.useRef(null);By();const[x,k]=p.useState("0"),[$,I]=p.useState(""),[M,D]=p.useState(!1),{sendTransaction:H}=B9(),[G,V]=p.useState(!1),{data:Q,isLoading:F}=jY({accountAddress:d,chainId:t,collectionAddress:e,tokenId:r,verifiedOnly:!1}),{contractType:C}=Q;p.useEffect(()=>{Q&&(C==="ERC721"?(k("1"),D(!1)):C==="ERC1155"&&(Number(Dt((Q==null?void 0:Q.balance)||0,R))>=1&&k("1"),D(!0)))},[Q]);const S=Pr(t,f);if(F)return null;const R=(Q==null||(s=Q.tokenMetadata)==null?void 0:s.decimals)||0,A=(Q==null||(i=Q.tokenMetadata)==null?void 0:i.name)||"Unknown",N=(Q==null||(o=Q.tokenMetadata)==null?void 0:o.image)||(Q==null||(a=Q.contractInfo)==null?void 0:a.logoURI)||"",B=x===""?"0":x,P=_a(B,R),E=P.gt((Q==null?void 0:Q.balance)||"0"),L=P.gt(0),q=de=>{const{value:pe}=de.target,$e=TY(pe,R);k($e)},_=()=>{var de;(de=b.current)==null||de.focus();const pe=Number(x)-1,$e=Math.max(pe,0).toString();k($e)},U=()=>{var de;(de=b.current)==null||de.focus();const pe=Number(x)+1,$e=Number(Dt((Q==null?void 0:Q.balance)||0,R)),Se=Math.min(pe,$e).toString();k(Se)},W=()=>{var de;(de=b.current)==null||de.focus();const pe=Dt((Q==null?void 0:Q.balance)||0,R).toString();k(pe)},J=async()=>{const de=await navigator.clipboard.readText();I(de)},X=()=>{I("")},re=async de=>{var pe,$e;de.preventDefault(),!y&&v&&g({chainId:t});const Se=_a(B,R);switch(C){case"ERC721":l==null||l.track({event:"SEND_TRANSACTION_REQUEST",props:{walletClient:(h==null||(pe=h._wallet)==null?void 0:pe.id)||"unknown",source:"sequence-kit/wallet"}}),V(!0),H({to:Q.contractAddress,data:new Ir(Tje).encodeFunctionData("safeTransferFrom",[d,$,r]),gas:null},{onSettled:(_e,Ye)=>{_e&&c({location:"home"}),V(!1)}});break;case"ERC1155":default:l==null||l.track({event:"SEND_TRANSACTION_REQUEST",props:{walletClient:(h==null||($e=h._wallet)==null?void 0:$e.id)||"unknown",source:"sequence-kit/wallet"}}),V(!0),H({to:Q.contractAddress,data:new Ir(Pje).encodeFunctionData("safeBatchTransferFrom",[d,$,[r],[Se.toHexString()],[]]),gas:null},{onSettled:(_e,Ye)=>{_e&&c({location:"home"}),V(!1)}})}},ee=Dt((Q==null?void 0:Q.balance)||0,R).toString(),se=Number(x)===0,xe=Number(x)>=Number(ee);return w.createElement(K,{padding:"5",paddingTop:"3",style:{marginTop:Gs},gap:"2",flexDirection:"column",as:"form",onSubmit:re,pointerEvents:G?"none":"auto"},w.createElement(K,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},w.createElement(FY,{imageUrl:N,showSquareImage:!0,decimals:R,name:A,symbol:"",balance:(Q==null?void 0:Q.balance)||"0",chainId:t}),w.createElement(DU,{ref:b,style:{fontSize:rt.fontSizes.xlarge,fontWeight:rt.fontWeights.bold},name:"amount",value:x,onChange:q,disabled:!M,controls:w.createElement(w.Fragment,null,M&&w.createElement(K,{gap:"2"},w.createElement(bt,{disabled:se,size:"xs",onClick:_,leftIcon:z0e}),w.createElement(bt,{disabled:xe,size:"xs",onClick:U,leftIcon:v0e}),w.createElement(bt,{size:"xs",shape:"square",label:"Max",onClick:W,"data-id":"maxCoin",flexShrink:"0"})))}),E&&w.createElement(he,{as:"div",variant:"normal",color:"negative",marginTop:"2"},"Insufficient Balance")),w.createElement(K,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},w.createElement(he,{fontSize:"normal",color:"text50"},"To"),Zb($)?w.createElement(K,{borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",className:jo,onClick:X,style:{height:"52px"}},w.createElement(K,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},w.createElement(my,{address:$,style:{width:"20px"}}),w.createElement(he,{color:"text100"},`0x${pS($.substring(2),8)}`)),w.createElement(iu,{size:"xs"})):w.createElement(au,{value:$,onChange:de=>I(de.target.value),placeholder:`${S.name} Address (0x...)`,name:"to-address","data-1p-ignore":!0,controls:w.createElement(bt,{size:"xs",shape:"square",label:"Paste",onClick:J,"data-id":"to-address",flexShrink:"0",leftIcon:ax})})),m&&w.createElement(K,{marginTop:"3"},w.createElement(he,{variant:"small",color:"negative",marginBottom:"2"},"The wallet is connected to the wrong network. Please switch network before proceeding"),w.createElement(bt,{marginTop:"2",width:"full",variant:"primary",type:"button",label:"Switch Network",onClick:()=>g({chainId:t}),disabled:y,style:{height:"52px",borderRadius:rt.radii.md}})),w.createElement(K,{style:{height:"52px"},alignItems:"center",justifyContent:"center"},G?w.createElement(B1,null):w.createElement(bt,{color:"text100",marginTop:"3",width:"full",variant:"primary",type:"submit",disabled:!L||!Zb($)||E||!y&&!v,label:"Send",rightIcon:Kc,style:{height:"52px",borderRadius:rt.radii.md}})))},Hje=({transaction:t})=>{var e;const{chains:r}=Ct(),{fiatCurrency:n}=es(),{setNavigation:s}=Vs(),i=()=>{s({location:"transaction-details",params:{transaction:t}})};let o=[];(e=t.transfers)==null||e.forEach(b=>{const x=b.contractAddress;o.includes(x)||o.push(x)});const{data:a=[],isLoading:c}=pu({tokens:o.map(b=>({contractAddress:b,chainId:t.chainId}))}),{data:l=1,isLoading:f}=Bl({toCurrency:n.symbol}),u=c||f,{transfers:d}=t,h=Pr(t.chainId,r),v=b=>{switch(b){case $n.SEND:return w.createElement(J3,{style:{transform:"rotate(270deg)",width:"16px"}});case $n.RECEIVE:return w.createElement(J3,{style:{transform:"rotate(90deg)",width:"16px"}});case $n.UNKNOWN:default:return w.createElement(jq,{style:{width:"14px"}})}},y=b=>{switch(b){case $n.SEND:return"Sent";case $n.RECEIVE:return"Received";case $n.UNKNOWN:default:return"Transacted"}},m=(b,x,k)=>{let $="";k===$n.SEND?$="-":k===$n.RECEIVE&&($="+");let I="text50";return k===$n.SEND?I=rt.colors.negative:k===$n.RECEIVE&&(I=rt.colors.positive),w.createElement(he,{fontWeight:"bold",fontSize:"normal",style:{color:I}},`${$}${b} ${x}`)},g=({transfer:b,isFirstItem:x})=>{const{amounts:k}=b,$=bK(t.timestamp).format("MMM DD, YYYY");return w.createElement(K,{gap:"2",width:"full",flexDirection:"column",justifyContent:"space-between"},w.createElement(K,{flexDirection:"row",justifyContent:"space-between"},w.createElement(K,{color:"text50",gap:"1",flexDirection:"row",justifyContent:"center",alignItems:"center"},v(b.transferType),w.createElement(he,{fontWeight:"medium",fontSize:"normal",color:"text100"},y(b.transferType)),w.createElement(Fr,{src:h.logoURI,width:"3"})),x&&w.createElement(K,null,w.createElement(he,{fontWeight:"medium",fontSize:"normal",color:"text50"},$))),k.map((I,M)=>{var D,H,G,V,Q,F;const C=Pr(t.chainId,r),S=wr(b.contractAddress,Lt),T=((D=b.contractInfo)==null?void 0:D.type)==="ERC721"||((H=b.contractInfo)==null?void 0:H.type)==="ERC1155";let R;const A=(G=b.tokenIds)==null?void 0:G[M];if(T&&A){var N;R=((N=b.tokenMetadata)==null||(N=N[A])==null?void 0:N.decimals)||0}else{var B;R=S?C.decimals:(B=b.contractInfo)==null?void 0:B.decimals}const P=Dt(I,R),E=S?C.symbol:((V=b.contractInfo)==null?void 0:V.symbol)||"",L=S?C.logoURI:(Q=b.contractInfo)==null?void 0:Q.logoURI,q=(F=a.find(_=>wr(_.token.contractAddress,b.contractAddress)))==null||(F=F.price)==null?void 0:F.value;return w.createElement(K,{key:M,flexDirection:"row",justifyContent:"space-between"},w.createElement(K,{flexDirection:"row",gap:"2",justifyContent:"center",alignItems:"center"},L&&w.createElement(Fr,{src:L,width:"5",alt:"token logo"}),m(Ha(P),E,b.transferType)),u&&w.createElement(Wt,{width:"35px",height:"20px"}),q&&w.createElement(he,{fontWeight:"medium",fontSize:"normal",color:"text50"},`${n.sign}${(Number(P)*q*l).toFixed(2)}`))}))};return w.createElement(K,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",className:jo,onClick:()=>i()},d==null?void 0:d.map((b,x)=>w.createElement(K,{key:`${t.txnHash}-${x}`,width:"full"},g({transfer:b,isFirstItem:x===0}))))},xS=()=>{const t=()=>w.createElement(K,{flexDirection:"column",gap:"2",width:"full",justifyContent:"space-between"},w.createElement(K,{flexDirection:"row",justifyContent:"space-between"},w.createElement(Wt,{width:"65px",height:"20px"}),w.createElement(Wt,{width:"75px",height:"17px"})),w.createElement(K,{flexDirection:"row",justifyContent:"space-between"},w.createElement(Wt,{width:"120px",height:"20px"}),w.createElement(Wt,{width:"35px",height:"17px"})));return w.createElement(K,{flexDirection:"column",gap:"3"},w.createElement(Wt,{width:"70px",height:"17px"}),w.createElement(K,{flexDirection:"column",gap:"2"},Array(8).fill(null).map((e,r)=>w.createElement(K,{borderRadius:"md",padding:"4",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",background:"backgroundSecondary",key:r},t()))))},wS=({transactions:t,isLoading:e,isFetchingNextPage:r})=>{const n=[{id:"today",label:"Today"},{id:"yesterday",label:"Yesterday"},{id:"week",label:"Last Week"},{id:"month",label:"Last Month"},{id:"year",label:"Last Year"},{id:"years",label:"Past Years"}],s=p.useMemo(()=>{const a=new Date(new Date().setHours(0,0,0,0)).getTime(),c=new Date(new Date().setDate(new Date(a).getDate()-1)).getTime(),l=new Date(new Date().setDate(new Date().getDate()-7)).getTime(),f=new Date(new Date().setDate(new Date().getDate()-30)).getTime(),u=new Date(new Date().setDate(new Date().getDate()-365)).getTime(),d={today:[],yesterday:[],week:[],month:[],year:[],years:[]};return t.forEach(h=>{const v=new Date(h.timestamp).getTime();v>a?d.today.push(h):v>c?d.yesterday.push(h):v>l?d.week.push(h):v>f?d.month.push(h):v>u?d.year.push(h):d.years.push(h)}),d},[t]);if(e)return w.createElement(K,{flexDirection:"column",gap:"2"},w.createElement(xS,null));const i=({label:a})=>w.createElement(K,null,w.createElement(he,{color:"text50",fontWeight:"medium",fontSize:"normal"},a)),o=({transactions:a})=>w.createElement(K,{flexDirection:"column",gap:"2"},a.map((c,l)=>w.createElement(K,{key:`${c.txnHash}-${l}`,flexDirection:"column",gap:"2"},w.createElement(Hje,{transaction:c}))));return w.createElement(K,{flexDirection:"column",gap:"5"},n.map(a=>{const c=s[a.id];return c.length===0?null:w.createElement(K,{key:a.id,flexDirection:"column",gap:"3"},w.createElement(i,{label:a.label}),w.createElement(o,{transactions:c}))}),t.length===0&&w.createElement(K,{flexDirection:"column",gap:"3"},w.createElement(i,{label:"History"}),w.createElement(he,{color:"text100"},"No Recent Transaction History Found")),r&&w.createElement(K,{margin:"4",alignItems:"center",justifyContent:"center"},w.createElement(B1,null)))},Vje=()=>{const{selectedNetworks:t}=es(),{address:e}=Cn();so();const{data:r=[],isLoading:n}=kje({accountAddress:e||"",chainIds:t});return w.createElement(K,null,w.createElement(K,{paddingX:"4",paddingBottom:"5",paddingTop:"3"},w.createElement(wS,{transactions:r,isLoading:n,isFetchingNextPage:!1})))},r2=({balance:t})=>{var e,r;const{chains:n}=Ct(),{setNavigation:s}=Vs(),i=wr(t.contractAddress,Lt),o=Pr(t.chainId,n),a=i?o.logoURI:t==null||(e=t.contractInfo)==null?void 0:e.logoURI,c=i?o.name:(t==null||(r=t.contractInfo)==null?void 0:r.name)||"Unknown",l=()=>{var u,d;if(t.contractType==="ERC721"||t.contractType==="ERC1155")return t.balance;const h=i?o.decimals:t==null||(u=t.contractInfo)==null?void 0:u.decimals,v=Dt(t.balance,h||0),y=Ha(v),m=i?o.symbol:t==null||(d=t.contractInfo)==null?void 0:d.symbol;return`${y} ${m}`},f=()=>{const u=t.contractType==="ERC721"||t.contractType==="ERC1155";s(u?{location:"collection-details",params:{contractAddress:t.contractAddress,chainId:t.chainId}}:{location:"coin-details",params:{contractAddress:t.contractAddress,chainId:t.chainId}})};return w.createElement(K,{key:t.contractAddress,onClick:f,width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",className:jo},w.createElement(K,{gap:"3",flexDirection:"row",alignItems:"center",justifyContent:"center"},w.createElement(Xf,{imageUrl:a,size:30}),w.createElement(K,{gap:"1",flexDirection:"row",alignItems:"center",justifyContent:"center"},w.createElement(he,{color:"text100",fontWeight:"bold",fontSize:"normal",style:{textOverflow:"ellipsis",overflow:"hidden",maxWidth:"250px",textWrap:"nowrap"}},c),w.createElement(Fr,{src:o.logoURI,alt:"network logo",style:{width:"12px",height:"12px"}}))),w.createElement(K,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"1"},w.createElement(he,{color:"text50",fontWeight:"bold",fontSize:"normal"},l()),w.createElement(Kc,{color:"text50"})))},vR=({toLocation:t,label:e})=>{const{setNavigation:r}=Vs(),n=()=>{r(t)};return w.createElement(K,{onClick:n,width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",className:jo},w.createElement(he,{color:"text50",fontSize:"normal",fontWeight:"medium"},e),w.createElement(K,{flexDirection:"row",justifyContent:"center",alignItems:"center"},w.createElement(he,{color:"text50",fontSize:"normal",fontWeight:"medium"},"View all"),w.createElement(Kc,{color:"text50",size:"sm"})))},Gje=()=>{const{chains:t}=Ct(),{fiatCurrency:e,hideUnlistedTokens:r,selectedNetworks:n}=es(),[s,i]=p.useState(""),{address:o}=Cn();so();const{data:a,isLoading:c}=gS({accountAddress:o||"",chainIds:n},{hideUnlistedTokens:r}),l=(a==null?void 0:a.filter(G=>G.contractType==="ERC20"||wr(G.contractAddress,Lt)))||[],{data:f=[],isLoading:u}=pu({tokens:l.map(G=>({chainId:G.chainId,contractAddress:G.contractAddress}))}),{data:d=1,isLoading:h}=Bl({toCurrency:e.symbol}),v=l.sort((G,V)=>{var Q,F;return Number(Go({balance:V,prices:f,conversionRate:d,decimals:((Q=V.contractInfo)==null?void 0:Q.decimals)||18}))-Number(Go({balance:G,prices:f,conversionRate:d,decimals:((F=V.contractInfo)==null?void 0:F.decimals)||18}))}),m=((a==null?void 0:a.filter(G=>G.contractType==="ERC721"||G.contractType==="ERC1155"))||[]).sort((G,V)=>Number(V.balance)-Number(G.balance)),g=c||u||h,b=m.map((G,V)=>{var Q;return{index:V,name:((Q=G.contractInfo)==null?void 0:Q.name)||"Unknown"}}),x=v.map((G,V)=>{if(wr(G.contractAddress,Lt)){const F=Pr(G.chainId,t);return{index:V,name:F.name}}else{var Q;return{index:V,name:((Q=G.contractInfo)==null?void 0:Q.name)||"Unknown"}}}),k=v.length,$=m.length,I=new za(x,{keys:["name"]}),M=new za(b,{keys:["name"]}),D=(s===""?x:I.search(s).map(G=>G.item)).slice(0,5),H=(s===""?b:M.search(s).map(G=>G.item)).slice(0,5);return w.createElement(K,{paddingX:"4",paddingBottom:"5",paddingTop:"3",flexDirection:"column",gap:"10",alignItems:"center",justifyContent:"center"},w.createElement(K,{width:"full"},w.createElement(au,{autoFocus:!0,name:"search wallet",leftIcon:cx,value:s,onChange:G=>i(G.target.value),placeholder:"Search your wallet","data-1p-ignore":!0})),w.createElement(K,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5"},w.createElement(vR,{toLocation:{location:"search-view-all",params:{defaultTab:"collections"}},label:`Collections (${$})`}),g?Array(5).fill(null).map((G,V)=>w.createElement(Wt,{key:V,width:"100%",height:"32px"})):H.length===0?w.createElement(he,{color:"text100"},"No collections found"):H.map((G,V)=>{const Q=m[G.index];return w.createElement(r2,{key:V,balance:Q})})),w.createElement(K,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5"},w.createElement(vR,{toLocation:{location:"search-view-all",params:{defaultTab:"coins"}},label:`Coins (${k})`}),g?Array(5).fill(null).map((G,V)=>w.createElement(Wt,{key:V,width:"100%",height:"32px"})):D.length===0?w.createElement(he,{color:"text100"},"No coins found"):D.map((G,V)=>{const Q=v[G.index];return w.createElement(r2,{key:V,balance:Q})})))},Kje=({defaultTab:t})=>{const{chains:e}=Ct(),{fiatCurrency:r,hideUnlistedTokens:n,selectedNetworks:s}=es(),[i,o]=p.useState(""),[a,c]=p.useState(t);so(),p.useEffect(()=>{o("")},[a]);const{address:l}=Cn(),{data:f,isLoading:u}=gS({accountAddress:l||"",chainIds:s},{hideUnlistedTokens:n}),d=(f==null?void 0:f.filter(S=>S.contractType==="ERC20"||wr(S.contractAddress,Lt)))||[],{data:h=[],isLoading:v}=pu({tokens:d.map(S=>({chainId:S.chainId,contractAddress:S.contractAddress}))}),{data:y=1,isLoading:m}=Bl({toCurrency:r.symbol}),g=d.sort((S,T)=>{var R,A;return Number(Go({balance:T,prices:h,conversionRate:y,decimals:((R=T.contractInfo)==null?void 0:R.decimals)||18}))-Number(Go({balance:S,prices:h,conversionRate:y,decimals:((A=S.contractInfo)==null?void 0:A.decimals)||18}))}),x=((f==null?void 0:f.filter(S=>S.contractType==="ERC721"||S.contractType==="ERC1155"))||[]).sort((S,T)=>Number(T.balance)-Number(S.balance)),k=g.length,$=x.length,I=u||v||m,M=x.map((S,T)=>{var R;return{index:T,name:((R=S.contractInfo)==null?void 0:R.name)||"Unknown"}}),D=g.map((S,T)=>{if(wr(S.contractAddress,Lt)){const A=Pr(S.chainId,e);return{index:T,name:A.name}}else{var R;return{index:T,name:((R=S.contractInfo)==null?void 0:R.name)||"Unknown"}}}),H=new za(D,{keys:["name"]}),G=new za(M,{keys:["name"]}),V=i===""?D:H.search(i).map(S=>S.item),Q=i===""?M:G.search(i).map(S=>S.item),F=()=>w.createElement(Wt,{width:"360px",height:"48px"}),C=()=>w.createElement(w.Fragment,null,Array(8).fill(null).map((S,T)=>w.createElement(Wt,{key:T,width:"full",height:"32px"})));return w.createElement(K,{paddingX:"4",paddingBottom:"5",paddingTop:"3",flexDirection:"column",gap:"5",alignItems:"center",justifyContent:"center"},w.createElement(K,{width:"full"},w.createElement(au,{autoFocus:!0,name:"search wallet",leftIcon:cx,value:i,onChange:S=>o(S.target.value),placeholder:"Search your wallet","data-1p-ignore":!0})),w.createElement(K,{width:"full"},w.createElement(sbe,{value:a,onValueChange:S=>c(S)},w.createElement(K,{marginBottom:"5"},!I&&w.createElement(nbe,{value:a,tabs:[{label:`Collections (${$})`,value:"collections"},{label:`Coins (${k})`,value:"coins"}]}),I&&w.createElement(F,null)),w.createElement(KP,{value:"collections"},w.createElement(K,{flexDirection:"column",gap:"3"},I&&w.createElement(C,null),!I&&Q.length===0&&w.createElement(he,{color:"text100"},"No Collectibles Found"),!I&&Q.length>0&&Q.map((S,T)=>{const R=x[S.index];return w.createElement(r2,{key:T,balance:R})}))),w.createElement(KP,{value:"coins"},w.createElement(K,{flexDirection:"column",gap:"3"},I&&w.createElement(C,null),!I&&g.length==0&&w.createElement(he,{color:"text100"},"No Coins Found"),!I&&V.length>0&&V.map((S,T)=>{const R=g[S.index];return w.createElement(r2,{key:T,balance:R})}))))))},Yje=()=>{const{setNavigation:t}=Vs(),e=()=>{t({location:"settings-general"})},r=()=>{t({location:"settings-currency"})},n=()=>{t({location:"settings-networks"})};return w.createElement(K,{style:{paddingTop:Gs}},w.createElement(K,{padding:"5",paddingTop:"3"},w.createElement(K,{flexDirection:"column",gap:"2"},w.createElement(bt,{onClick:e,leftIcon:Mq,rightIcon:Kc,width:"full",label:"General",style:{height:"52px",borderRadius:rt.radii.md}}),w.createElement(bt,{onClick:r,leftIcon:E0e,rightIcon:Kc,width:"full",label:"Currency",style:{height:"52px",borderRadius:rt.radii.md}}),w.createElement(bt,{onClick:n,leftIcon:T0e,rightIcon:Kc,width:"full",label:"Networks",style:{height:"52px",borderRadius:rt.radii.md}}))))},Qje=()=>{jy();const{hideUnlistedTokens:t,setHideUnlistedTokens:e,hideCollectibles:r,setHideCollectibles:n}=es(),s=()=>{e(!t)},i=()=>{n(!r)};return w.createElement(K,{style:{paddingTop:Gs}},w.createElement(K,{gap:"2",padding:"5",paddingTop:"3",flexDirection:"column"},w.createElement(Pa,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},w.createElement(he,{color:"text100",fontWeight:"bold"},"Hide unlisted tokens"),w.createElement(c8,{checked:t,onCheckedChange:s})),w.createElement(Pa,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},w.createElement(he,{color:"text100",fontWeight:"bold"},"Hide collectibles"),w.createElement(c8,{checked:r,onCheckedChange:i}))))},Jje=t=>{const{selected:e,className:r,squareIndicator:n=!1}=t;return w.createElement(K,{borderStyle:"solid",borderColor:n&&e?"transparent":"borderNormal",borderWidth:"thin",position:"relative",alignItems:"center",justifyContent:"center",flexShrink:"0",className:r,style:{borderRadius:n?"4px":rt.radii.circle,width:"20px",height:"20px"}},w.createElement(K,{as:Yi.div,background:n?"borderNormal":"backgroundInverse",position:"absolute",color:"textInverse100",initial:{opacity:e?1:0,scale:e?1:.5},animate:{opacity:e?1:0,scale:e?1:.5},transition:{ease:"backOut"},style:{borderRadius:n?"4px":rt.radii.circle,width:n?"20px":"14px",height:n?"20px":"14px"},justifyContent:"center",alignItems:"center"},n&&w.createElement(R1,{color:"white",style:{width:"14px",height:"14px"}})))},Xje=["value","selected","children","disabled","onClick","className","hideIndicator","squareIndicator"],zY=t=>{const{value:e,selected:r,children:n,disabled:s,onClick:i,className:o,hideIndicator:a,squareIndicator:c=!1}=t,l=gw(t,Xje);return w.createElement(Pa,Rn({as:"button",clickable:!0,className:ITe(o),disabled:s,onClick:()=>i(e),userSelect:"none",alignItems:"center",justifyContent:"space-between",textAlign:"left",width:"full",style:{appearance:"none"}},l),n,!a&&w.createElement(Jje,{selected:r,squareIndicator:c}))},Zje=()=>{const{fiatCurrency:t,setFiatCurrency:e}=es();return so(),w.createElement(K,{paddingBottom:"5",paddingX:"4",paddingTop:"3"},w.createElement(K,{flexDirection:"column",gap:"2"},BY.map(r=>w.createElement(zY,{key:r.symbol,value:r.symbol,selected:r.symbol===t.symbol,onClick:()=>e&&e(r)},w.createElement(K,{gap:"2",justifyContent:"flex-start",alignItems:"center"},w.createElement(he,{color:"text100",fontWeight:"bold"},r.symbol),w.createElement(he,{color:"text50"},r.name.message))))))},eDe=()=>{const{selectedNetworks:t,setSelectedNetworks:e}=es(),{chains:r}=Ct(),n=s=>{if(t.includes(s)){if(t.length===1)return;e(t.filter(i=>i!==s))}else e([...t,s])};return w.createElement(K,{style:{paddingTop:Gs}},w.createElement(K,{padding:"5",paddingTop:"3"},w.createElement(he,{variant:"small",color:"text50"},"Networks"),w.createElement(K,{flexDirection:"column",gap:"2"},r.map(s=>{const i=Pr(s.id,r);return w.createElement(zY,{disabled:t.length===1&&t.includes(s.id),key:s.id,selected:t.includes(s.id),onClick:()=>n(s.id),value:s.id,squareIndicator:!0},w.createElement(K,{gap:"2",justifyContent:"center",alignItems:"center"},w.createElement(Fr,{width:"3",height:"3",src:i.logoURI,alt:"network"}),w.createElement(he,{color:"text100",variant:"small"},i.name)))}))))},Fy=({chainId:t})=>{var e;const{chains:r}=Ct(),{network:n}=pr(t),s=Pr(t,r),i=mY(t),o=gY(t);return w.createElement(K,{height:"6",paddingY:"1",paddingLeft:"1.5",paddingRight:"2",gap:"1",style:{background:o},borderRadius:"xs",flexDirection:"row",justifyContent:"center",alignItems:"center",width:"fit"},w.createElement(Fr,{style:{width:"14px"},src:s.logoURI}),w.createElement(he,{fontWeight:"bold",fontSize:"xsmall",style:{color:i}},lje((e=n.title)!=null?e:n.name)))},tDe=({chainId:t})=>(so(),w.createElement(K,{style:{paddingTop:Gs}},w.createElement(K,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingX:"4",paddingTop:"0",style:{marginTop:"-20px"}},w.createElement(K,{marginBottom:"10",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column"},w.createElement(Wt,{width:"32px",height:"32px"}),w.createElement(Wt,{height:"24px",width:"70px"}),w.createElement(Fy,{chainId:t})),w.createElement(K,null,w.createElement(he,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),w.createElement(K,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},w.createElement(Wt,{width:"150px",height:"36px"}),w.createElement(Wt,{width:"33px",height:"17px"}))),w.createElement(bt,{color:"text100",marginTop:"4",marginBottom:"10",width:"full",variant:"primary",leftIcon:lx,label:"Send",disabled:!0,onClick:()=>{}}),w.createElement(K,null,w.createElement(xS,null))))),rDe=(t,e)=>{var r;const[n,s]=p.useState(null),i=p.useMemo(()=>new IntersectionObserver(([o])=>s(o),e),[]);return p.useEffect(()=>(t.current&&i.observe(t.current),()=>{t.current&&i.disconnect()}),[t.current,i]),(r=n==null?void 0:n.isIntersecting)!=null?r:!1},qY=t=>{const{onLoad:e,hasMore:r=!0,children:n}=t,[s,i]=p.useState(0),[o,a]=p.useState(!1),c=p.useRef(null),l=rDe(c);p.useEffect(()=>{l&&r&&!o&&f()},[l]);const f=async()=>{a(!0),await e(s),i(u=>u+1),a(!1)};return w.createElement(w.Fragment,null,n,w.createElement("div",{ref:c}))},nDe=({contractAddress:t,chainId:e})=>{var r,n,s,i;const{chains:o}=Ct(),{setNavigation:a}=Vs(),{fiatCurrency:c,hideUnlistedTokens:l}=es();so();const{address:f}=Cn(),{data:u,isLoading:d,fetchNextPage:h,hasNextPage:v,isFetchingNextPage:y}=LY({chainId:e,accountAddress:f||"",contractAddress:t}),m=RY(u),{data:g,isLoading:b}=Eje({accountAddress:f||"",contractAddress:t,chainId:e},{hideUnlistedTokens:l}),{data:x,isLoading:k}=pu({tokens:[{chainId:e,contractAddress:t}]}),{data:$=1,isLoading:I}=Bl({toCurrency:c.symbol});if(b||k||I)return w.createElement(tDe,{chainId:e});const D=wr(t,Lt),H=D?Pr(e,o).logoURI:g==null||(r=g.contractInfo)==null?void 0:r.logoURI,G=D?Pr(e,o).symbol:g==null||(n=g.contractInfo)==null?void 0:n.symbol,V=D?Pr(e,o).name:g==null||(s=g.contractInfo)==null?void 0:s.name,Q=D?Pr(e,o).decimals:g==null||(i=g.contractInfo)==null?void 0:i.decimals,F=Dt((g==null?void 0:g.balance)||"0",Q),C=Ha(F),S=g?Go({balance:g,prices:x||[],conversionRate:$,decimals:Q||0}):"0",T=()=>{a({location:"send-coin",params:{chainId:e,contractAddress:t}})};return w.createElement(K,{style:{paddingTop:Gs}},w.createElement(K,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingX:"4",paddingTop:"0",style:{marginTop:"-20px"}},w.createElement(K,{marginBottom:"10",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column"},w.createElement(Fr,{width:"8",src:H,alt:"logo"}),w.createElement(he,{color:"text100",fontWeight:"bold",fontSize:"large"},V),w.createElement(Fy,{chainId:e})),w.createElement(K,null,w.createElement(he,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),w.createElement(K,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},w.createElement(he,{fontWeight:"bold",color:"text100",fontSize:"xlarge"},`${C} ${G}`),w.createElement(he,{fontWeight:"medium",color:"text50",fontSize:"normal"},`${c.sign}${S}`))),w.createElement(bt,{width:"full",variant:"primary",leftIcon:lx,color:"text100",label:"Send",onClick:T}),w.createElement(K,null,w.createElement(qY,{onLoad:()=>h(),hasMore:v},w.createElement(wS,{transactions:m,isLoading:d,isFetchingNextPage:y})))))},sDe=({chainId:t})=>(so(),w.createElement(K,{paddingX:"4",paddingBottom:"5",paddingTop:"3",marginTop:"8",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10"},w.createElement(K,{flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"center"},w.createElement(Wt,{width:"32px",height:"32px"}),w.createElement(Wt,{width:"100px",height:"24px"}),w.createElement(Fy,{chainId:t}),w.createElement(Wt,{width:"142px",height:"17px"})),w.createElement(K,{width:"full"},w.createElement(Wt,{width:"168px",height:"20px"}),w.createElement(K,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${rt.space[1]}) calc(50% - ${rt.space[1]})`,gap:rt.space[2]},width:"full",marginTop:"3"},Array(8).fill(null).map((e,r)=>w.createElement(Wt,{key:r,width:"full",aspectRatio:"1/1"})))))),iDe=({chainId:t,contractAddress:e})=>{var r;const{setNavigation:n}=Vs(),{address:s}=Cn(),{data:i,isLoading:o}=wje({chainId:t,accountAddress:s||"",collectionAddress:e});so();const a=i==null||(r=i[0])==null?void 0:r.contractInfo,c=a==null?void 0:a.logoURI;if(o)return w.createElement(sDe,{chainId:t});const l=f=>{n&&n({location:"collectible-details",params:{contractAddress:f.contractAddress,chainId:f.chainId,tokenId:f.tokenID}})};return w.createElement(K,{paddingX:"4",paddingBottom:"5",paddingTop:"3",marginTop:"8",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10"},w.createElement(K,{flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"center"},w.createElement(Xf,{imageUrl:c,size:32}),w.createElement(he,{fontWeight:"bold",fontSize:"large",color:"text100"},(a==null?void 0:a.name)||"Unknown"),w.createElement(Fy,{chainId:t}),w.createElement(he,{fontWeight:"medium",fontSize:"normal",color:"text50"},`${(i==null?void 0:i.length)||0} Unique Collectibles`)),w.createElement(K,{width:"full"},w.createElement(he,{fontWeight:"medium",fontSize:"normal",color:"text50"},`Owned (${(i==null?void 0:i.length)||0})`),w.createElement(K,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${rt.space[1]}) calc(50% - ${rt.space[1]})`,gap:rt.space[2]},width:"full",marginTop:"3"},i==null?void 0:i.map((f,u)=>{var d,h,v;const y=f.balance,m=(f==null||(d=f.tokenMetadata)==null?void 0:d.decimals)||0,g=Ha(Dt(y,m));return w.createElement(K,{key:u,onClick:()=>l(f),className:jo},w.createElement(K,{background:"backgroundSecondary",aspectRatio:"1/1",width:"full",borderRadius:"md",justifyContent:"center",alignItems:"center",marginBottom:"2"},w.createElement(Fr,{style:{height:"100%"},src:(h=f.tokenMetadata)==null?void 0:h.image})),w.createElement(K,null,w.createElement(he,{fontWeight:"bold",fontSize:"normal",color:"text100"},`${(v=f.tokenMetadata)==null?void 0:v.name}`)),w.createElement(K,null,w.createElement(he,{marginTop:"1",fontWeight:"medium",fontSize:"normal",color:"text50"},g," Owned")))}))))},oDe=()=>(so(),w.createElement(K,{style:{paddingTop:Gs}},w.createElement(K,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingX:"4",paddingTop:"0",style:{marginTop:"-20px"}},w.createElement(K,{gap:"3",alignItems:"center",justifyContent:"center",flexDirection:"column"},w.createElement(Wt,{width:"120px",height:"30px"}),w.createElement(Wt,{width:"140px",height:"40px"})),w.createElement(K,null,w.createElement(Wt,{width:"347px",height:"347px"})),w.createElement(K,null,w.createElement(K,null,w.createElement(he,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),w.createElement(K,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},w.createElement(Wt,{width:"44px",height:"36px"}),w.createElement(Wt,{width:"34px",height:"17px"}))),w.createElement(bt,{color:"text100",marginTop:"4",width:"full",variant:"primary",leftIcon:lx,label:"Send",onClick:()=>{}})),w.createElement(K,null,w.createElement(he,{fontSize:"normal",color:"text50",fontWeight:"medium"},"This week"),w.createElement(xS,null))))),aDe=({contractAddress:t,chainId:e,tokenId:r})=>{var n,s,i,o,a,c;const{chains:l}=Ct(),{address:f}=Cn(),{fiatCurrency:u}=es(),{setNavigation:d}=Vs();so();const{data:h,isLoading:v,fetchNextPage:y,hasNextPage:m,isFetchingNextPage:g}=LY({chainId:e,accountAddress:f||"",contractAddress:t,tokenId:r}),b=RY(h),{data:x,isLoading:k}=jY({accountAddress:f||"",collectionAddress:t,chainId:e,tokenId:r,verifiedOnly:!1}),{data:$,isLoading:I}=DY({tokens:[{chainId:e,contractAddress:t,tokenId:r}]}),{data:M=1,isLoading:D}=Bl({toCurrency:u.symbol});if(k||I||D)return w.createElement(oDe,null);const G=()=>{d({location:"send-collectible",params:{chainId:e,contractAddress:t,tokenId:r}})},V=Pr(e,l),Q=x==null||(n=x.contractInfo)==null?void 0:n.logoURI,F=(x==null||(s=x.contractInfo)==null?void 0:s.name)||"Unknown Collection",C=(x==null||(i=x.tokenMetadata)==null?void 0:i.decimals)||0,S=(x==null?void 0:x.balance)||"0",T=Dt(S,C),R=Ha(Number(T)),A=x?Go({balance:x,prices:$||[],conversionRate:M,decimals:C}):"0";return w.createElement(K,{style:{paddingTop:Gs}},w.createElement(K,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingX:"4",paddingTop:"0",style:{marginTop:"-20px"}},w.createElement(K,{gap:"3",alignItems:"center",justifyContent:"center",flexDirection:"column"},w.createElement(K,{flexDirection:"row",gap:"2",justifyContent:"center",alignItems:"center"},w.createElement(Fr,{borderRadius:"circle",width:"8",src:Q,alt:"collection logo",style:{objectFit:"cover"}}),w.createElement(K,{gap:"1",flexDirection:"row",justifyContent:"center",alignItems:"center"},w.createElement(he,{fontWeight:"bold",fontSize:"small",color:"text100"},F),w.createElement(Fr,{width:"3",src:V.logoURI,alt:"collection logo"}))),w.createElement(K,{flexDirection:"column",justifyContent:"center",alignItems:"center"},w.createElement(he,{color:"text100",fontWeight:"bold",fontSize:"large"},(x==null||(o=x.tokenMetadata)==null?void 0:o.name)||"Unknown Collectible"),w.createElement(he,{color:"text50",fontSize:"small",fontWeight:"medium"},`#${r}`))),w.createElement(K,null,w.createElement(bS,{imageUrl:x==null||(a=x.tokenMetadata)==null?void 0:a.image})),w.createElement(K,null,w.createElement(K,null,w.createElement(he,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),w.createElement(K,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},w.createElement(he,{fontWeight:"bold",color:"text100",fontSize:"xlarge"},R),$&&((c=$[0].price)==null?void 0:c.value)&&w.createElement(he,{fontWeight:"medium",color:"text50",fontSize:"normal"},`${u.symbol} ${A}`))),w.createElement(bt,{color:"text100",marginTop:"4",width:"full",variant:"primary",leftIcon:lx,label:"Send",onClick:G})),w.createElement(K,null,w.createElement(qY,{onLoad:()=>y(),hasMore:m},w.createElement(wS,{transactions:b,isLoading:v,isFetchingNextPage:g})))))},cDe=["buttonVariant","text","size"],UY=t=>{const{buttonVariant:e="icon",text:r,size:n="xs"}=t,s=gw(t,cDe),[i,o]=p.useState(!1);p.useEffect(()=>{i&&setTimeout(()=>{o(!1)},4e3)},[i]);const a=()=>{o(!0)},c=i?"Copied!":"Copy",l=e==="icon"?"rgba(0,0,0,0)":rt.colors.buttonGlass;return w.createElement(oK.CopyToClipboard,{text:r,onCopy:a},w.createElement(Uo,Rn({size:n,icon:i?R1:ax},s,{style:Rn({background:l},t==null?void 0:t.style),label:e==="with-label"?c:void 0})))},lDe=({transaction:t})=>{var e,r;const{chains:n}=Ct(),{fiatCurrency:s}=es(),i=[],o=[];(e=t.transfers)==null||e.forEach(b=>{var x,k;if(((x=b.contractInfo)==null?void 0:x.type)==="ERC721"||((k=b.contractInfo)==null?void 0:k.type)==="ERC1155"){var $;($=b.tokenIds)==null||$.forEach(M=>{if(!o.find(G=>{var V;return G.chainId===t.chainId&&wr(G.contractAddress,((V=b.contractInfo)==null?void 0:V.address)||"")&&G.tokenId===M})){var H;o.push({chainId:t.chainId,contractAddress:((H=b.contractInfo)==null?void 0:H.address)||"",tokenId:M})}})}else{var I;const M=(b==null||(I=b.contractInfo)==null?void 0:I.address)||Lt;i.find(H=>H.chainId===t.chainId&&wr(H.contractAddress,M))||i.push({chainId:t.chainId,contractAddress:M})}});const{data:a,isLoading:c}=pu({tokens:i}),{data:l,isLoading:f}=DY({tokens:o}),{data:u=1,isLoading:d}=Bl({toCurrency:s.symbol}),h=i.length>0&&c||o.length>0&&f||d,v=Pr(t.chainId,n),y=bK(t.timestamp).format("ddd MMM DD YYYY, h:m:s a"),m=()=>{typeof window<"u"&&window.open(`${v.blockExplorerUrl}/tx/${t.txnHash}`,"_blank")},g=({transfer:b})=>{var x,k,$,I;const M=b.to,D=M.substring(0,10)+"..."+M.substring(b.to.length-4,b.to.length),H=wr((b==null||(x=b.contractInfo)==null?void 0:x.address)||"",Lt),G=H?v.logoURI:b==null||(k=b.contractInfo)==null?void 0:k.logoURI,V=H?v.symbol:(b==null||($=b.contractInfo)==null?void 0:$.symbol)||"";return w.createElement(w.Fragment,null,(I=b.amounts)==null?void 0:I.map((Q,F)=>{var C,S,T,R,A;const N=b.contractType==="ERC721"||b.contractType==="ERC1155",B=((C=b.tokenIds)==null?void 0:C[F])||"0",P=(b==null||(S=b.tokenMetadata)==null||(S=S[B])==null?void 0:S.decimals)||0,E=H?v.decimals:(b==null||(T=b.contractInfo)==null?void 0:T.decimals)||0,q=Dt(Q,N?P:E),_=Ha(q),U=N?l==null||(R=l.find(J=>{var X,re;return wr(J.token.contractAddress,((X=b.contractInfo)==null?void 0:X.address)||"")&&J.token.tokenId===((re=b.tokenIds)==null?void 0:re[F])&&J.token.chainId===t.chainId}))==null||(R=R.price)==null?void 0:R.value:a==null||(A=a.find(J=>{var X;return wr(J.token.contractAddress,((X=b.contractInfo)==null?void 0:X.address)||Lt)&&J.token.chainId===t.chainId}))==null||(A=A.price)==null?void 0:A.value,W=(parseFloat(q)*(u*(U||0))).toFixed(2);return w.createElement(K,{key:F,width:"full",flexDirection:"row",gap:"2",justifyContent:"space-between",alignItems:"center"},w.createElement(K,{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:"2",height:"12",borderRadius:"md",background:"buttonGlass",padding:"2",style:{flexBasis:"100%"}},w.createElement(Xf,{imageUrl:G,size:20}),w.createElement(K,{gap:"0.5",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},w.createElement(he,{fontWeight:"bold",fontSize:"xsmall",color:"text100"},`${_} ${V}`),h?w.createElement(Wt,{width:"44px",height:"12px"}):w.createElement(he,{fontWeight:"bold",fontSize:"xsmall",color:"text50"},U?`${s.sign}${W}`:""))),w.createElement(J3,{color:"text50",style:{width:"16px"}}),w.createElement(K,{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:"2",height:"12",borderRadius:"md",background:"buttonGlass",padding:"2",style:{flexBasis:"100%"}},w.createElement(my,{address:M,style:{width:"20px"}}),w.createElement(he,{fontWeight:"bold",fontSize:"xsmall",color:"text100"},D)))}))};return w.createElement(K,{padding:"5",paddingTop:"3",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",marginTop:"5"},w.createElement(K,{marginTop:"6",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"1"},w.createElement(he,{fontSize:"normal",fontWeight:"medium"},"Transaction details"),w.createElement(he,{marginBottom:"1",fontSize:"small",fontWeight:"medium",color:"text50"},y),w.createElement(Fy,{chainId:t.chainId})),w.createElement(K,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"4",width:"full",padding:"4",background:"backgroundSecondary",borderRadius:"md"},w.createElement(K,{width:"full",gap:"1",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},w.createElement(he,{fontSize:"normal",fontWeight:"medium",color:"text50"},"Transfer"),w.createElement(Fr,{width:"3",src:v.logoURI,alt:"network logo"})),(r=t.transfers)==null?void 0:r.map((b,x)=>w.createElement(K,{width:"full",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"4",key:`transfer-${x}`},w.createElement(g,{transfer:b})))),w.createElement(bt,{onClick:m,width:"full",borderRadius:"md",rightIcon:$0e,label:`View on ${v.blockExplorerName}`}),w.createElement(K,null,w.createElement(K,{width:"full",flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"flex-start"},w.createElement(Y3,{width:"full",margin:"0",style:{marginBottom:"-4px"}}),w.createElement(he,{color:"text50",fontSize:"normal",fontWeight:"medium"},"Status"),w.createElement(he,{fontSize:"normal",fontWeight:"medium",color:"text100"},"Complete")),w.createElement(K,{width:"full",flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"flex-start"},w.createElement(Y3,{width:"full",margin:"0",style:{marginBottom:"-4px"}}),w.createElement(he,{color:"text50",fontSize:"normal",fontWeight:"medium"},"Transaction Hash"),w.createElement(he,{color:"text100",fontSize:"normal",fontWeight:"medium",style:{overflowWrap:"anywhere"}},t.txnHash),w.createElement(UY,{marginTop:"2",buttonVariant:"with-label",text:t.txnHash}))))},fDe=p.forwardRef(({onClickAccount:t},e)=>{const{address:r}=Cn();return w.createElement(K,{gap:"2",alignItems:"center"},w.createElement(K,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center"},w.createElement(K,{onClick:t,gap:"2",alignItems:"center",justifyContent:"center",className:jo,position:"relative",ref:e},w.createElement(my,{size:"sm",address:r||""}),w.createElement(he,{color:"text100",fontWeight:"medium",variant:"normal"},IY(r||"")),w.createElement(Rq,{color:"text100"}))))}),uDe=p.forwardRef(({setOpenWalletDropdown:t},e)=>{const{setNavigation:r}=Vs(),{setOpenWalletModal:n}=By(),{address:s}=Cn(),{disconnect:i}=AG(),{theme:o}=jy(),a=()=>{t(!1),r({location:"receive"})},c=()=>{t(!1),r({location:"history"})},l=()=>{t(!1),r({location:"settings"})},f=()=>{n(!1),t(!1),i()},u=()=>{switch(o){case"dark":return"rgba(38, 38, 38, 0.85)";case"light":return"rgba(217, 217, 217, 0.85)";default:return rt.colors.transparent}};return w.createElement(K,{padding:"3",ref:e,zIndex:"30",borderRadius:"md",style:{position:"relative",pointerEvents:"auto",width:"370px",backdropFilter:"blur(12.5px)",top:"16px",left:"15px",background:u()}},w.createElement(K,{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},w.createElement(K,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"3",marginLeft:"2",color:"text100"},w.createElement(my,{style:{width:"28px"},size:"md",address:s||""}),w.createElement(he,{fontSize:"large",style:{fontWeight:"700"},color:"text100"},IY(s||"")),w.createElement(UY,{buttonVariant:"icon",size:"md",text:s||"",color:"text100",style:{marginLeft:"-16px"}})),w.createElement(Uo,{onClick:()=>t(!1),size:"xs",background:"buttonGlass",icon:iu})),w.createElement(K,{gap:"2",marginTop:"3",flexDirection:"column"},w.createElement(bt,{variant:"glass",style:{borderRadius:rt.radii.md},width:"full",leftIcon:R0e,label:"Receive",onClick:a}),w.createElement(bt,{style:{borderRadius:rt.radii.md},width:"full",leftIcon:jq,label:"History",onClick:c}),w.createElement(bt,{style:{borderRadius:rt.radii.md},width:"full",leftIcon:Mq,label:"Settings",onClick:l}),w.createElement(bt,{label:"Sign Out",style:{borderRadius:rt.radii.md},width:"full",leftIcon:Nq,onClick:f})))}),U6=()=>{const{openWalletModalState:t}=By(),[e,r]=p.useState(!1),{goBack:n,history:s,setNavigation:i}=Vs(),o=p.useRef(!1);p.useEffect(()=>{t||r(!1)},[t]),p.useEffect(()=>{e?o.current?r(!1):o.current=!0:o.current=!1},[s.length,e]);const a=()=>{r(!0)},c=()=>{n()},l=()=>{i({location:"search"})};return w.createElement(K,{as:Yi.div},w.createElement(tMe,{open:e},w.createElement(rMe,null),w.createElement(K,{background:"backgroundPrimary",zIndex:"20",position:"fixed",flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"full",paddingX:"4",style:{height:Gs,paddingTop:"6px"}},s.length>0?w.createElement(Uo,{onClick:c,icon:g7,size:"xs"}):w.createElement(Uo,{onClick:l,icon:cx,size:"xs"}),w.createElement(nMe,{asChild:!0},w.createElement(fDe,{onClickAccount:a})),w.createElement(K,{style:{width:"44px"}})),w.createElement(r1,null,e&&w.createElement(sMe,{asChild:!0,side:"bottom",align:"start"},w.createElement(uDe,{setOpenWalletDropdown:r})))))},lo=({secondaryText:t,primaryText:e})=>{const{goBack:r,history:n}=Vs(),s=()=>{r()};return w.createElement(K,{background:"backgroundPrimary",zIndex:"20",position:"fixed",width:"full",flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingX:"4",style:{height:Gs,paddingTop:"6px"}},n.length>0?w.createElement(Uo,{onClick:s,icon:g7,size:"xs"}):w.createElement(K,null),w.createElement(K,null,w.createElement(he,{fontWeight:"medium",variant:"small",color:"text50"},t),w.createElement(he,{fontWeight:"medium",variant:"small",color:"text100"},e)),w.createElement(K,{style:{width:"44px"}}))},yR=t=>{const{location:e}=t;switch(e){case"send-coin":return w.createElement(Uje,{chainId:t.params.chainId,contractAddress:t.params.contractAddress});case"send-collectible":return w.createElement(Wje,{chainId:t.params.chainId,contractAddress:t.params.contractAddress,tokenId:t.params.tokenId});case"receive":return w.createElement(qje,null);case"history":return w.createElement(Vje,null);case"search":return w.createElement(Gje,null);case"search-view-all":return w.createElement(Kje,{defaultTab:t.params.defaultTab});case"settings":return w.createElement(Yje,null);case"settings-general":return w.createElement(Qje,null);case"settings-currency":return w.createElement(Zje,null);case"settings-networks":return w.createElement(eDe,null);case"coin-details":return w.createElement(nDe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId});case"collectible-details":return w.createElement(aDe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId,tokenId:t.params.tokenId});case"collection-details":return w.createElement(iDe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId});case"transaction-details":return w.createElement(lDe,{transaction:t.params.transaction});case"home":default:return w.createElement(zje,null)}},dDe=t=>{const{location:e}=t;switch(e){case"search":return w.createElement(lo,{primaryText:"Search wallet"});case"search-view-all":return w.createElement(lo,{secondaryText:"Search wallet / ",primaryText:"View all"});case"settings":return w.createElement(lo,{secondaryText:"Wallet / ",primaryText:"Settings"});case"settings-general":return w.createElement(lo,{secondaryText:"Wallet / Settings / ",primaryText:"General"});case"settings-currency":return w.createElement(lo,{secondaryText:"Wallet / Settings / ",primaryText:"Currency"});case"settings-networks":return w.createElement(lo,{secondaryText:"Wallet / Settings / ",primaryText:"Networks"});case"receive":return w.createElement(lo,{secondaryText:"Wallet / ",primaryText:"Receive"});case"history":return w.createElement(lo,{secondaryText:"Wallet / ",primaryText:"History"});case"coin-details":return w.createElement(U6,null);case"collectible-details":return w.createElement(U6,null);case"transaction-details":return w.createElement(lo,{secondaryText:"",primaryText:""});case"send-collectible":case"send-coin":return w.createElement(lo,{secondaryText:"Wallet / ",primaryText:"Send"});case"home":default:return w.createElement(U6,null)}},hDe={location:"home"},vDe=t=>{const e=new N9;return w.createElement(L9,{client:e},w.createElement(yDe,t))},yDe=({children:t})=>{const{theme:e,position:r}=jy(),[n,s]=p.useState(!1),[i,o]=p.useState([]),a=i.length>0?i[i.length-1]:hDe,c=a.location==="home"||a.location==="collection-details"||a.location==="collectible-details"||a.location==="coin-details"||a.location==="history"||a.location==="search"||a.location==="search-view-all"||a.location==="settings-currency";return p.useEffect(()=>{n&&o([])},[n]),w.createElement(cje,{value:{setOpenWalletModal:s,openWalletModalState:n}},w.createElement(_je,{value:{setHistory:o,history:i}},w.createElement("div",{id:"kit-provider"},w.createElement(T7,{root:"#kit-provider",scope:"kit",theme:e},w.createElement(r1,null,n&&w.createElement(jU,{contentProps:{style:Rn({maxWidth:"400px",height:"fit-content"},Yb(r))},scroll:!1,backdropColor:"backgroundBackdrop",onClose:()=>s(!1)},w.createElement(K,{className:Bje,id:"sequence-kit-wallet-content"},dDe(a),c?w.createElement(OU,{className:Lje,style:{paddingTop:Gs,height:"min(800px, 80vh)"}},yR(a)):yR(a)))))),t))};var pDe=()=>typeof window<"u"&&window.localStorage.getItem("IS_PAPER_DEV")==="true",mDe=()=>typeof window<"u"&&window.location.origin.includes("paper.xyz"),gDe=()=>typeof window<"u"&&window.location.origin.includes("thirdweb.com"),WY=()=>{var t;return pDe()?(t=window.localStorage.getItem("PAPER_DEV_URL"))!=null?t:"http://localhost:3000":mDe()||gDe()?window.location.origin:"https://withpaper.com"},HY={colorPrimary:"#cf3781",colorBackground:"#ffffff",colorText:"#1a202c",borderRadius:12,fontFamily:"Open Sans"},bDe=Object.defineProperty,xDe=Object.defineProperties,wDe=Object.getOwnPropertyDescriptors,pR=Object.getOwnPropertySymbols,CDe=Object.prototype.hasOwnProperty,EDe=Object.prototype.propertyIsEnumerable,mR=(t,e,r)=>e in t?bDe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,rs=(t,e)=>{for(var r in e||(e={}))CDe.call(e,r)&&mR(t,r,e[r]);if(pR)for(var r of pR(e))EDe.call(e,r)&&mR(t,r,e[r]);return t},gR=(t,e)=>xDe(t,wDe(e)),kDe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),VY=kDe((t,e)=>{e.exports={name:"@paperxyz/js-client-sdk",description:"Paper JS SDK for Checkout Elements",version:"0.2.7",license:"Apache-2.0",main:"dist/index.js",module:"dist/index.mjs",types:"dist/index.d.ts",files:["dist/**"],bugs:{url:"https://github.com/paperxyz/js-sdk/issues"},homepage:"https://github.com/paperxyz/js-sdk",repository:{type:"git",url:"git+https://github.com/paperxyz/js-sdk.git"},author:"Paper ",scripts:{build:"tsup src/index.ts --env.NODE_ENV production","build-package-checkout":"yarn build","dev-checkout":"tsup src/index.ts --env.NODE_ENV development --watch",lint:'eslint "src/**/*.ts*"',"lint:fix":"yarn lint --fix",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",prepare:"cd ../../ && node ./scripts/postInstall && cd ./packages/js-client-sdk"},keywords:[],devDependencies:{"@paperxyz/tsconfig":"*","eslint-config-paperxyz":"*",typescript:"^4.7.4"},dependencies:{"@paperxyz/sdk-common-utilities":"*",ethers:"^5.7.2"},publishConfig:{access:"public"}}}),GY=WY(),SDe="/sdk/2022-08-12/checkout-with-card",ADe=(t=>(t.UserAbandonedCheckout="User abandoned the checkout",t.UserLoginFailed="User login failed",t.InvalidProps="The props you passed in to this component are not valid.",t.InvalidCard="The card information is invalid. Please double check that the Card, CVC, and Zip code are all correct.",t.EmailNotVerified="The email was unable to be verified.",t.NotEnoughSupply="There is not enough supply to claim.",t.AddressNotAllowed="This address is not on the allowlist.",t.NoActiveClaimPhase="There is no active claim phase at the moment.",t))(ADe||{}),$De=(t=>(t.ErrorConnectingToWallet="Error connecting to wallet",t.ErrorSendingTransaction="Something went wrong sending transaction",t.InsufficientBalance="Insufficient ETH",t.TransactionCancelled="Transaction Cancelled",t.WrongChain="Wrong Chain Detected",t.ChainSwitchUnderway="There is a network switch already underway",t.PendingSignature="Pending Signature",t))($De||{}),_De=class{constructor(t){this.link=t}addStylingOptions(t){t.colorPrimary&&this.link.searchParams.set("colorPrimary",t.colorPrimary),t.colorBackground&&this.link.searchParams.set("colorBackground",t.colorBackground),t.colorText&&this.link.searchParams.set("colorText",t.colorText),t.borderRadius!==void 0&&this.link.searchParams.set("borderRadius",t.borderRadius.toString()),t.fontFamily&&this.link.searchParams.set("fontFamily",t.fontFamily),t.inputBackgroundColor&&this.link.searchParams.set("inputBackgroundColor",t.inputBackgroundColor),t.inputBorderColor&&this.link.searchParams.set("inputBorderColor",t.inputBorderColor)}addClientSecret(t){this.link.searchParams.set("sdkClientSecret",t)}addLocale(t){t&&this.link.searchParams.set("locale",t.toString())}addOTP(){this.link.searchParams.set("withOTP","true")}addAppName(t){t&&this.link.searchParams.set("appName",t)}addShowConnectWalletOptions(t){this.link.searchParams.append("showConnectWalletOptions",t.toString())}addReceivingWalletType(t){this.link.searchParams.append("walletType",t||"Preset")}addRecipientWalletAddress(t){this.link.searchParams.set("recipientWalletAddress",t)}addPayerWalletAddress(t){this.link.searchParams.append("payerWalletAddress",t)}addDate(t){this.link.searchParams.set("date",t?t.toString():Date.now().toString())}getLink(){return this.link}},PDe=({url:t,width:e=440,height:r=700})=>{if(!(window!=null&&window.top))return null;let n=window.top.outerHeight/2+window.top.screenY-r/2,s=window.top.outerWidth/2+window.top.screenX-e/2;return window.open(t,"_blank",`popup=true,width=${e},height=${r},top=${n},left=${s}`)};function bR(t,e,r){var n;(n=t.contentWindow)==null||n.postMessage(rs({eventType:e},r),"*")}var IDe=VY(),TDe=class{constructor({elementOrId:e,onLoad:r}){this.elementOrId=e,this.onLoad=r}createPaymentElement({handler:e,link:r,iframeId:n}){let s=document.createElement("iframe");if(s.src=r.href,s.id=n,s.allow="payment",s.setAttribute("style","margin-left:auto; margin-right:auto; width:100%; height: 100%; min-height:375px; transition-property:all; transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1); transition-duration:150ms; color-scheme: light;"),s.onload=a=>{this.onLoad&&this.onLoad(a)},s.setAttribute("data-paper-sdk-version",`@paperxyz/js-client-sdk@${IDe.version}`),!this.elementOrId)return window.addEventListener("message",e(s)),s;let i=this.elementOrId;if(typeof i=="string"){let a=document.getElementById(i);if(!a)throw new Error("Invalid id given");i=a}let o=i.querySelector("#"+n);return o?(o.src===r.href||(o.src=r.href),o):(window.addEventListener("message",e(s)),i.appendChild(s))}},xR={top:"0px",left:"0px",right:"0px",bottom:"0px"},ODe=()=>({main:gR(rs({},xR),{position:"fixed",zIndex:"10000",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"auto"}),overlay:gR(rs({},xR),{position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.33)",pointerEvents:"auto"}),body:{background:"transparent",borderRadius:"12px",position:"relative",overflow:"hidden",width:"100%",maxWidth:"500px",height:"700px",maxHeight:"80%",animation:"pew-modal-slideIn 0.2s forwards",pointerEvents:"auto"},spinner:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0",margin:"auto",borderWidth:"3px",borderColor:"#2D3748 #2D3748 transparent transparent",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite"},iframe:{position:"relative",height:"100%",width:"100%",border:"none",background:"transparent"}}),RDe=` + @keyframes pew-modal-slideIn { + from {opacity: 0; transform: translate3d(0, 20px, 0);} + to {opacity: 1; transform: translate3d(0, 0, 0);} + } + + @keyframes pew-modal-slideOut { + from {opacity: 1; transform: translate3d(0, 0, 0);} + to {opacity: 0; transform: translate3d(0, 20px, 0);} + } + + @keyframes spin { + to { transform: rotate(360deg); } + } +`,Fh="paper-js-sdk-modal",MDe=class{constructor(t,e){this.styles=ODe(),this.container=t||document.body,e&&this.mergeStyles(e),this.main=document.createElement("div"),this.main.id=Fh,this.overlay=document.createElement("div"),this.overlay.id=`${Fh}-overlay`,this.body=document.createElement("div"),this.body.id=`${Fh}-body`,this.spinner=document.createElement("div"),this.spinner.id=`${Fh}-spinner`,this.iframe=document.createElement("iframe"),this.iframe.id=`${Fh}-iframe`,this.iframe.allow="camera; microphone; payment",this.style=document.createElement("style"),this.style.innerHTML=RDe,this.assignStyles(this.main,this.styles.main),this.assignStyles(this.overlay,this.styles.overlay),this.assignStyles(this.body,this.styles.body),this.assignStyles(this.spinner,this.styles.spinner),this.assignStyles(this.iframe,this.styles.iframe)}open({iframeUrl:t}={}){t&&(this.body.appendChild(this.spinner),this.iframe.src=t,this.iframe.onload=()=>this.body.removeChild(this.spinner),this.body.appendChild(this.iframe)),this.addAccessibility(),this.main.appendChild(this.overlay),this.main.appendChild(this.style),this.main.appendChild(this.body),this.container.appendChild(this.main),document.body.style.overflow="hidden"}close(){this.body.style.animation="pew-modal-slideOut 0.2s forwards",window.setTimeout(()=>this.main.remove(),250)}mergeStyles(t){this.styles.body=rs(rs({},this.styles.body),t.body||{}),this.styles.spinner=rs(rs({},this.styles.spinner),t.spinner||{}),this.styles.overlay=rs(rs({},this.styles.overlay),t.overlay||{}),this.styles.main=rs(rs({},this.styles.main),t.main||{}),this.styles.iframe=rs(rs({},this.styles.iframe),t.iframe||{})}addAccessibility(){this.main.setAttribute("aria-hidden","true"),this.overlay.setAttribute("aria-hidden","true"),this.body.setAttribute("aria-modal","true"),this.body.setAttribute("role","dialog")}assignStyles(t,e){Object.assign(t.style,e)}};function NDe({sdkClientSecret:t,appName:e,options:r=rs({},HY),locale:n,configs:s}){let i=new URL(SDe,GY),o=t;if(!o&&s&&(o=btoa(JSON.stringify(s))),!o){let c="/error?errorMessage=Must have either sdkClientSecret or configs field set. Received neither",l=WY();return new URL(c,l)}let a=new _De(i);return a.addClientSecret(o??""),a.addStylingOptions(r),a.addLocale(n),a.addAppName(e),a.getLink()}function jDe({iframe:t,onError:e,onReview:r,onPaymentSuccess:n,onBeforeModalOpen:s,onPriceUpdate:i}){let o;return a=>{if(!a.origin.startsWith(GY))return;let{data:c}=a;switch(c.eventType){case"checkoutWithCardError":e&&e({code:c.code,error:c.error});break;case"paymentSuccess":n&&n({transactionId:c.id,id:c.id}),c.postToIframe&&bR(t,c.eventType,c);break;case"reviewComplete":r&&r({id:c.id,cardholderName:c.cardholderName});break;case"openModalWithUrl":s&&c.url&&c.url.includes("promptKYCModal")?s({url:c.url}):(o=new MDe(void 0,{body:{colorScheme:"light"}}),o.open({iframeUrl:c.url}));break;case"completedSDKModal":o.close(),c.postToIframe&&bR(t,c.eventType,c);break;case"requestedPopup":{PDe({url:c.url,width:c.width,height:c.height})||console.error("CheckoutWithCard: Unable to open popup.");break}case"sizing":t.style.height=c.height+"px",t.style.maxHeight=c.height+"px";break;case"onPriceUpdate":{i==null||i(c);break}}}}function DDe({onCloseKycModal:t,onOpenKycModal:e,sdkClientSecret:r,appName:n,elementOrId:s,onLoad:i,onError:o,locale:a,options:c,onPaymentSuccess:l,onReview:f,onBeforeModalOpen:u,onPriceUpdate:d,useAltDomain:h=!0,configs:v}){let y="checkout-with-card-iframe",m=b=>jDe({iframe:b,onCloseKycModal:t,onOpenKycModal:e,onError:o,onPaymentSuccess:l,onReview:f,onBeforeModalOpen:u,onPriceUpdate:d,useAltDomain:h}),g=NDe({sdkClientSecret:r,appName:n,locale:a,options:c,useAltDomain:h,configs:v});return new TDe({onLoad:i,elementOrId:s}).createPaymentElement({handler:m,iframeId:y,link:g})}VY();function LDe(t){if(t.sheet)return t.sheet;for(var e=0;e0?yn(oh,--bs):0,m1--,Gr===10&&(m1=1,xw--),Gr}function Ns(){return Gr=bs2||Hv(Gr)>3?"":" "}function JDe(t,e){for(;--e&&Ns()&&!(Gr<48||Gr>102||Gr>57&&Gr<65||Gr>70&&Gr<97););return zy(t,Gm()+(e<6&&Do()==32&&Ns()==32))}function EE(t){for(;Ns();)switch(Gr){case t:return bs;case 34:case 39:t!==34&&t!==39&&EE(Gr);break;case 40:t===41&&EE(t);break;case 92:Ns();break}return bs}function XDe(t,e){for(;Ns()&&t+Gr!==57;)if(t+Gr===84&&Do()===47)break;return"/*"+zy(e,bs-1)+"*"+bw(t===47?t:Ns())}function ZDe(t){for(;!Hv(Do());)Ns();return zy(t,bs)}function eLe(t){return ZY(Ym("",null,null,null,[""],t=XY(t),0,[0],t))}function Ym(t,e,r,n,s,i,o,a,c){for(var l=0,f=0,u=o,d=0,h=0,v=0,y=1,m=1,g=1,b=0,x="",k=s,$=i,I=n,M=x;m;)switch(v=b,b=Ns()){case 40:if(v!=108&&yn(M,u-1)==58){CE(M+=At(Km(b),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:M+=Km(b);break;case 9:case 10:case 13:case 32:M+=QDe(v);break;case 92:M+=JDe(Gm()-1,7);continue;case 47:switch(Do()){case 42:case 47:em(tLe(XDe(Ns(),Gm()),e,r),c);break;default:M+="/"}break;case 123*y:a[l++]=go(M)*g;case 125*y:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+f:g==-1&&(M=At(M,/\f/g,"")),h>0&&go(M)-u&&em(h>32?CR(M+";",n,r,u-1):CR(At(M," ","")+";",n,r,u-2),c);break;case 59:M+=";";default:if(em(I=wR(M,e,r,l,f,s,a,x,k=[],$=[],u),i),b===123)if(f===0)Ym(M,e,I,I,k,i,u,a,$);else switch(d===99&&yn(M,3)===110?100:d){case 100:case 108:case 109:case 115:Ym(t,I,I,n&&em(wR(t,I,I,0,0,s,a,x,s,k=[],u),$),s,$,u,a,n?k:$);break;default:Ym(M,I,I,I,[""],$,0,a,$)}}l=f=h=0,y=g=1,x=M="",u=o;break;case 58:u=1+go(M),h=v;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&YDe()==125)continue}switch(M+=bw(b),b*y){case 38:g=f>0?1:(M+="\f",-1);break;case 44:a[l++]=(go(M)-1)*g,g=1;break;case 64:Do()===45&&(M+=Km(Ns())),d=Do(),f=u=go(x=M+=ZDe(Gm())),b++;break;case 45:v===45&&go(M)==2&&(y=0)}}return i}function wR(t,e,r,n,s,i,o,a,c,l,f){for(var u=s-1,d=s===0?i:[""],h=kS(d),v=0,y=0,m=0;v0?d[g]+" "+b:At(b,/&\f/g,d[g])))&&(c[m++]=x);return ww(t,e,r,s===0?CS:a,c,l,f)}function tLe(t,e,r){return ww(t,e,r,KY,bw(KDe()),Wv(t,2,-2),0)}function CR(t,e,r,n){return ww(t,e,r,ES,Wv(t,0,n),Wv(t,n+1,-1),n)}function Ld(t,e){for(var r="",n=kS(t),s=0;s6)switch(yn(t,e+1)){case 109:if(yn(t,e+4)!==45)break;case 102:return At(t,/(.+:)(.+)-([^]+)/,"$1"+St+"$2-$3$1"+n2+(yn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~CE(t,"stretch")?eQ(At(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(yn(t,e+1)!==115)break;case 6444:switch(yn(t,go(t)-3-(~CE(t,"!important")&&10))){case 107:return At(t,":",":"+St)+t;case 101:return At(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+St+(yn(t,14)===45?"inline-":"")+"box$3$1"+St+"$2$3$1"+An+"$2box$3")+t}break;case 5936:switch(yn(t,e+11)){case 114:return St+t+An+At(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return St+t+An+At(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return St+t+An+At(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return St+t+An+t+t}return t}var uLe=function(e,r,n,s){if(e.length>-1&&!e.return)switch(e.type){case ES:e.return=eQ(e.value,e.length);break;case YY:return Ld([zh(e,{value:At(e.value,"@","@"+St)})],s);case CS:if(e.length)return GDe(e.props,function(i){switch(VDe(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ld([zh(e,{props:[At(i,/:(read-\w+)/,":"+n2+"$1")]})],s);case"::placeholder":return Ld([zh(e,{props:[At(i,/:(plac\w+)/,":"+St+"input-$1")]}),zh(e,{props:[At(i,/:(plac\w+)/,":"+n2+"$1")]}),zh(e,{props:[At(i,/:(plac\w+)/,An+"input-$1")]})],s)}return""})}},dLe=[uLe],hLe=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(y){var m=y.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var s=e.stylisPlugins||dLe,i={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var m=y.getAttribute("data-emotion").split(" "),g=1;ge in t?SLe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_Le=(t,e)=>{for(var r in e||(e={}))ALe.call(e,r)&&IR(t,r,e[r]);if(PR)for(var r of PR(e))$Le.call(e,r)&&IR(t,r,e[r]);return t},PLe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),AS=PLe((t,e)=>{e.exports={name:"@paperxyz/react-client-sdk",version:"1.1.5",description:"Paper React Client SDK for Checkout Elements",license:"Apache-2.0",main:"dist/index.js",types:"./dist/index.d.ts",type:"module",files:["dist/**"],exports:{".":{import:"./dist/index.js",types:"./dist/index.d.ts"}},bugs:{url:"https://github.com/paperxyz/js-sdk/issues"},homepage:"https://github.com/paperxyz/js-sdk",repository:{type:"git",url:"git+https://github.com/paperxyz/js-sdk.git"},author:"Paper ",keywords:[],scripts:{build:"tsup-node src/index.ts --env.NODE_ENV production --env.ESM_ONLY true ","build-package-checkout":"yarn build","dev-checkout":"tsup-node src/index.ts --env.NODE_ENV development --watch --env.ESM_ONLY true",lint:'eslint "src/**/*.ts*"',"lint:fix":"yarn lint --fix",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",prepare:"cd ../../ && node ./scripts/postInstall && cd ./packages/react-client-sdk"},peerDependencies:{react:">=16.0.0","react-dom":">=16.0.0"},devDependencies:{"@paperxyz/tsconfig":"*","@types/react":"18.0.26","eslint-config-paperxyz":"*",react:"^18.2.0","react-dom":"^18.2.0",typescript:"^4.7.4"},dependencies:{"@emotion/css":"11.10.5","@headlessui/react":"1.7.6","@paperxyz/js-client-sdk":"*","@paperxyz/sdk-common-utilities":"*"}}}),ILe=p.createContext({chainName:"Polygon",setChainName:()=>{},clientId:"",appName:""}),TLe=()=>p.useContext(ILe);io` + opacity: 0; +`;io` + opacity: 1; +`;var OLe=io` + position: relative; + width: 100%; + height: 100%; +`;io` + display: grid; + position: relative; + width: 100%; +`;io` + transition-delay: 150ms; + transition-property: opacity; + transition-duration: 75ms; +`;io` + transition-property: opacity; + transition-duration: 150ms; +`;io` + background-color: transparent; + grid-column-start: 1; + grid-row-start: 1; +`;var RLe=({className:t})=>ye.jsx("div",{id:"loader",className:ELe(NLe,t)}),MLe=kLe` + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +`,NLe=io` + border: 0.15rem solid #f3f3f300; + border-top: 0.15rem solid #000000; + border-left: 0.15rem solid #000000; + border-radius: 50%; + width: 4rem; + height: 4rem; + animation: ${MLe} 1s linear infinite; +`,jLe=()=>ye.jsx("div",{className:DLe,children:ye.jsx(RLe,{className:LLe})}),DLe=io` + position: absolute; + top: 50%; + left: 50%; + transform: translate3d(-50%, -50%, 0); +`,LLe=io` + color: #000000; + width: 2rem; + height: 2rem; +`,BLe=AS(),FLe=({sdkClientSecret:t,appName:e,options:r=_Le({},HY),onPaymentSuccess:n,onReview:s,onError:i,onBeforeModalOpen:o,onPriceUpdate:a,locale:c,configs:l})=>{let{appName:f}=TLe(),[u,d]=p.useState(!0),h=p.useCallback(()=>{d(!1)},[]),v=p.useRef(null),y=e||f;return p.useEffect(()=>{let m=setTimeout(()=>{d(!1)},1e3);return()=>{clearTimeout(m)}},[]),p.useEffect(()=>{v.current&&DDe({sdkClientSecret:t,appName:y,elementOrId:v.current,locale:c,onError:i,onLoad:h,onPaymentSuccess:n,onReview:s,onBeforeModalOpen:o,onPriceUpdate:a,options:r,configs:l})},[v.current]),ye.jsx(ye.Fragment,{children:ye.jsx("div",{className:OLe,ref:v,"data-paper-sdk-version":`@paperxyz/react-client-sdk@${BLe.version}`,children:u&&ye.jsx(jLe,{})})})};io` + padding-top: 0.625rem; + padding-bottom: 0.625rem; + padding-left: 1.25rem; + padding-right: 1.25rem; + background-color: #1f2937; + color: #ffffff; + font-size: 0.875rem; + line-height: 1.25rem; + font-weight: 600; + justify-content: flex-start; + align-items: center; + border-radius: 0.5rem; + border: none; + cursor: pointer; +`;AS();AS();var zLe=(t=>(t.THIRDWEB_NFT_DROP_V2="THIRDWEB_NFT_DROP_V2",t.THIRDWEB_EDITION_DROP_V2="THIRDWEB_EDITION_DROP_V2",t.THIRDWEB_SIGNATURE="THIRDWEB_SIGNATURE",t.CANDY_MACHINE="CANDY_MACHINE",t.AUCTION_HOUSE="AUCTION_HOUSE",t))(zLe||{}),qLe=(t=>(t.POPUP="POPUP",t.NEW_TAB="NEW_TAB",t.MODAL="MODAL",t.DRAWER="DRAWER",t.EMBED="EMBED",t))(qLe||{});const[ULe,WLe]=ih(),qy=()=>{const{triggerCheckout:t,closeCheckout:e,settings:r}=ULe();return{triggerCheckout:t,closeCheckout:e,settings:r}};function Zf(){return Zf=Object.assign?Object.assign.bind():function(t){for(var e=1;et.toLowerCase()===e.toLowerCase();var Cc=function(t){return t[t.VERY_LARGE=0]="VERY_LARGE",t[t.FRACTION=1]="FRACTION",t[t.VERY_TINY=2]="VERY_TINY",t[t.MIXED=3]="MIXED",t}(Cc||{});const kE=t=>{if(isNaN(Number(t)))return console.error(`display format error ${t} is not a number`),"NaN";const e=Number(t);if(e===0)return"0";let r;e>1e8?r=Cc.VERY_LARGE:e<1e-10?r=Cc.VERY_TINY:e<1?r=Cc.FRACTION:r=Cc.MIXED;let n,s;switch(r){case Cc.VERY_LARGE:n="compact",s={maximumFractionDigits:4};break;case Cc.VERY_TINY:n="scientific",s={maximumFractionDigits:4};break;case Cc.FRACTION:n="standard",s={maximumSignificantDigits:4};break;default:n="standard",s={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",Zf({notation:n},s)).format(e)},HLe=t=>t.charAt(0).toUpperCase()+t.slice(1),VLe=t=>t.chainId===1?"Ethereum":HLe(t.name),GLe=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=pr(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:Lt,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:oi.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},KLe=async({accountAddress:t,chainId:e,verifiedOnly:r})=>{try{const{indexerClient:n}=pr(e),s=await n.getTokenBalances({accountAddress:t,includeMetadata:!0,metadataOptions:{verifiedOnly:r??!0}});return(s==null?void 0:s.balances)||[]}catch(n){return console.error(n),[]}},YLe=async({accountAddress:t,chainId:e})=>{try{return(await Promise.all([GLe({accountAddress:t,chainId:e}),KLe({accountAddress:t,chainId:e})])).flat()}catch(r){return console.error(r),[]}},QLe=async({chainId:t,tokenId:e,contractAddress:r})=>{const{metadataClient:n}=pr(t);return(await n.getTokenMetadata({chainID:String(t),contractAddress:r,tokenIDs:[e]})).tokenMetadata[0]},JLe=async({chainID:t,contractAddress:e})=>{const{metadataClient:r}=pr(t);return(await r.getContractInfo({chainID:t,contractAddress:e})).contractInfo},XLe=async({chainId:t,email:e,contractAddress:r,abi:n,receiptTitle:s,collectionContractAddress:i,methodArguments:o,currency:a,currencyAmount:c,methodName:l,recipientAddress:f})=>{const{network:u,apiClient:d}=await pr(t),h=VLe(u),v=JSON.stringify(Zf({title:s,email:e,limitPerTransaction:1,quantity:1,mintMethod:{args:o,payment:{currency:a,value:`${c} * $QUANTITY`},name:l},walletAddress:f},i?{contractArgs:{collectionContractAddress:i}}:{})),{secret:y}=await d.paperSessionSecret2({chainName:h,contractAddress:r,abi:n,paramsJson:v});return y},$S={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},ZLe=t=>wn({queryKey:["balances",t],queryFn:()=>YLe(t),retry:!0,staleTime:10*$S.oneMinute,enabled:!!t.chainId&&!!t.accountAddress}),eBe=t=>wn({queryKey:["useTokenMetadata",t],queryFn:()=>QLe(t),retry:!0,staleTime:10*$S.oneMinute,enabled:!!t.chainId&&!!t.contractAddress}),nQ=t=>wn({queryKey:["useContractInfo",t],queryFn:()=>JLe(t),retry:!0,staleTime:60*$S.oneMinute,enabled:!!t.chainID&&!!t.contractAddress}),[tBe,rBe]=ih(),nBe=({settings:t})=>{var e,r;const[n,s]=p.useState(!0),[i,o]=p.useState(((e=t.creditCardCheckout)==null?void 0:e.email)||""),[a,c]=p.useState(i),[l,f]=p.useState(null),[u,d]=p.useState(!1),{setNavigation:h}=ah(),v=()=>{n&&o(a||""),n||c(i),s(!n)},y=async()=>{d(!0);try{if(!i)throw"No email address found";if(!t.creditCardCheckout)throw"No credit card checkout settings found";const $=await XLe(Zf({email:i},t.creditCardCheckout));f($)}catch($){console.error("Failed to fetch paper secret",$),h({location:"transaction-error",params:{error:$}})}d(!1)};p.useEffect(()=>{const $=setInterval(()=>{const I=document.getElementById("paper-js-sdk-modal");I&&(I.style.pointerEvents="visible")},100);return()=>{clearInterval($)}},[]),p.useEffect(()=>{i!==""&&y()},[i]);const m=()=>/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/.test(a||""),g=$=>{c($.target.value)},b=$=>{h({location:"transaction-pending",params:{transactionId:$}})},x=$=>{h({location:"transaction-error",params:{error:$}})},k=()=>n?w.createElement(K,{as:"form",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",onSubmit:v},w.createElement(K,{flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"2"},w.createElement(he,{fontSize:"normal",fontWeight:"normal",color:"text50"},"Receipt email address"),w.createElement(au,{autoFocus:!0,name:"email",type:"email",placeholder:"Email Address",value:a,onChange:g,"data-1p-ignore":!0})),w.createElement(bt,{size:"xs",label:"Save",leftIcon:R1,disabled:!m(),type:"submit"})):w.createElement(K,{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},w.createElement(K,{flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"2"},w.createElement(he,{fontSize:"normal",fontWeight:"normal",color:"text50"},"Receipt email address"),w.createElement(he,{fontSize:"normal",fontWeight:"bold",color:"text100"},i)),w.createElement(bt,{size:"xs",label:"Edit",leftIcon:S0e,onClick:v}));return w.createElement(K,null,k(),u&&w.createElement(K,{width:"full",height:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",style:{height:"200px"}},w.createElement(B1,{size:"lg",style:{width:"60px",height:"60px"}})),l&&!u&&w.createElement(Pa,{marginY:"4",flexDirection:"column"},w.createElement(FLe,{sdkClientSecret:l,appName:t==null||(r=t.creditCardCheckout)==null?void 0:r.receiptTitle,onReview:()=>{},onPaymentSuccess:$=>{b($.id)},onError:$=>{console.error("Payment error:",$),x($.error)},options:{colorPrimary:"#447dd1",colorText:"#ffffff",borderRadius:12}})))},_S="54px",sBe=()=>{const{settings:t}=qy();return w.createElement(K,{paddingX:"4",paddingBottom:"8",gap:"4",flexDirection:"column",style:{marginTop:_S}},t&&w.createElement(nBe,{settings:t}))},iBe=10*1e3,oBe=()=>{const t=ah(),{params:{transactionId:e}}=t.navigation,{setNavigation:r}=t,n=`https://withpaper.com/api/v1/transaction-status/${e}`,s=async()=>{try{console.log("Polling for transaction status");const i=await fetch(n,{method:"GET",headers:{accept:"application/json"}}).then(c=>c.json()),o=i.result.status,a=i.result.transactionHash;if(console.log("transaction status poll response:",o),o==="PENDING")return;if(o==="TRANSFER_SUCCEEDED"){r&&r({location:"transaction-success",params:{transactionHash:a}});return}if(o==="TRANSFER_FAILED"||o==="PAYMENT_FAILED"){r&&r({location:"transaction-error",params:{error:new Error("Failed to transfer collectible")}});return}}catch(i){console.error("An error occurred while fetching the transaction status"),r&&r({location:"transaction-error",params:{error:i}})}};return p.useEffect(()=>{const i=setInterval(()=>{s()},iBe);return()=>{clearInterval(i)}},[]),w.createElement(K,{style:{height:"500px"}},w.createElement(K,{position:"absolute",top:"0",left:"0",width:"full",height:"full",flexDirection:"column",alignItems:"center",justifyContent:"center"},w.createElement(B1,{size:"lg",style:{width:"60px",height:"60px"}}),w.createElement(he,{variant:"medium",color:"text50",textAlign:"center",marginTop:"8"},"Transaction in progress. ",w.createElement("br",null),"This may take a few minutes.")))},aBe=()=>{const{closeCheckout:t,settings:e}=qy(),n=ah().navigation;return p.useEffect(()=>{setTimeout(()=>{var s,i;t(),!(e==null||(s=e.creditCardCheckout)==null)&&s.onSuccess&&(e==null||(i=e.creditCardCheckout)==null||i.onSuccess(n.params.transactionHash))},3e3)},[]),w.createElement(K,{style:{height:"500px"}},w.createElement(K,{flexDirection:"column",alignItems:"center",position:"absolute",style:{top:"50%",right:"50%",transform:"translate(50%, -50%)"}},w.createElement(cBe,null),w.createElement(he,{fontSize:"xlarge"},"Success!"),w.createElement(he,{textAlign:"center",variant:"normal",color:"text80"},"The transaction was successful.")))},cBe=()=>w.createElement(K,{color:"white",background:"positive",alignItems:"center",justifyContent:"center",width:"16",height:"16",borderRadius:"circle",marginBottom:"2"},w.createElement(R1,{size:"xl"})),lBe=()=>{const{closeCheckout:t,settings:e}=qy(),n=ah().navigation;return p.useEffect(()=>{setTimeout(()=>{var s,i;t(),!(e==null||(s=e.creditCardCheckout)==null)&&s.onError&&(e==null||(i=e.creditCardCheckout)==null||i.onError(n.params.error))},3e3)},[]),w.createElement(K,{style:{height:"500px"}},w.createElement(K,{flexDirection:"column",alignItems:"center",position:"absolute",style:{top:"50%",right:"50%",transform:"translate(50%, -50%)"}},w.createElement(fBe,null),w.createElement(he,{fontSize:"xlarge"},"Error"),w.createElement(he,{textAlign:"center",variant:"normal",color:"text80"},"An error occurred while processing the transaction.")))},fBe=()=>w.createElement(K,{color:"white",alignItems:"center",justifyContent:"center",width:"16",height:"16",borderRadius:"circle",marginBottom:"2",background:"negative"},w.createElement(iu,{size:"xl"})),uBe=({size:t=30})=>w.createElement(K,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",style:{width:`${t}px`,height:`${t}px`}},w.createElement(he,{style:{fontSize:`${t-4}px`},display:"inline-block",variant:"large",color:"textInverse100"},"?")),_0=({imageUrl:t,size:e=30})=>t?w.createElement(Fr,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):w.createElement(uBe,{size:e});Dy("packages/checkout/src/shared/components/Skeleton/styles.css.ts","kit");const dBe=_Y({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),hBe=yu({height:"76px",backgroundColor:"#909090",animation:`${dBe} 2s ease-in-out infinite`},"skeleton");Ly();const yd=({width:t="100%",height:e="100%",borderRadius:r="md"})=>w.createElement(K,{className:hBe,borderRadius:r,style:{width:t,height:e}}),vBe=({contractAddress:t,tokenId:e,quantityRaw:r,chainId:n})=>{const{chains:s}=Ct(),{data:i,isLoading:o}=eBe({chainId:n,contractAddress:t,tokenId:e}),{data:a,isLoading:c}=nQ({chainID:String(n),contractAddress:t});if(o||c)return w.createElement(yBe,null);const f=Pr(n,[...s]),{name:u="unknown",image:d,decimals:h=0}=i||{},{logoURI:v,name:y="Unknown Collection"}=a||{},m=Dt(r,h);return w.createElement(Pa,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between"},w.createElement(K,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},w.createElement(K,{aspectRatio:"1/1",height:"full",justifyContent:"center",alignItems:"center",style:{width:"80px"}},w.createElement(Fr,{src:d,borderRadius:"md",style:{height:"80px"}})),w.createElement(K,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"2"},w.createElement(K,{gap:"1",alignItems:"center"},w.createElement(_0,{size:12,imageUrl:v}),w.createElement(he,{marginLeft:"1",fontSize:"small",color:"text80",fontWeight:"bold"},y),w.createElement(_0,{size:12,imageUrl:f.logoURI})),w.createElement(K,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",style:{width:"180px"}},w.createElement(he,{color:"text100",fontSize:"normal",fontWeight:"normal"},u),w.createElement(he,{color:"text50",fontSize:"normal",fontWeight:"normal"},`#${e}`)))),w.createElement(K,{height:"full",fontSize:"small",color:"text50",fontWeight:"bold"},`x${kE(m)}`))},yBe=()=>w.createElement(Pa,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between"},w.createElement(K,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},w.createElement(yd,{height:"80px",width:"80px"}),w.createElement(K,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"2"},w.createElement(yd,{width:"100px",height:"14px"}),w.createElement(yd,{width:"180px",height:"34px"}))),w.createElement(yd,{height:"14px",width:"14px"}));Dy("packages/checkout/src/views/CheckoutSelection/styles.css.ts","kit");const sQ=yu({},"insufficientBalanceButton");oje(`${sQ} > div`,{justifyContent:"center"});Ly();const pBe=()=>{var t,e,r,n;const{chains:s}=Ct();ah();const{closeCheckout:i,settings:o}=qy(),{address:a}=Cn(),c=o==null?void 0:o.cryptoCheckout,l=!!c,{data:f,isLoading:u}=nQ({contractAddress:(c==null||(t=c.coinQuantity)==null?void 0:t.contractAddress)||"",chainID:String((c==null?void 0:c.chainId)||1)}),{data:d,isLoading:h}=ZLe({accountAddress:a||"",chainId:(c==null?void 0:c.chainId)||1}),v=(u||h)&&c,y=TR((c==null||(e=c.coinQuantity)==null?void 0:e.contractAddress)||"",Lt),m=Pr((c==null?void 0:c.chainId)||1,s),g=y?m.decimals:(f==null?void 0:f.decimals)||0,b=y?m.symbol:(f==null?void 0:f.symbol)||"COIN",x=y?m.logoURI:(f==null?void 0:f.logoURI)||"",k=d==null?void 0:d.find(F=>{var C;return TR(F.contractAddress,(c==null||(C=c.coinQuantity)==null?void 0:C.contractAddress)||"")}),$=k?k.balance:"0",I=(c==null||(r=c.coinQuantity)==null?void 0:r.amountRequiredRaw)||"0",M=Dt($,g),D=Dt(I,g),H=ne.from($).lt(ne.from(I)),G=(o==null?void 0:o.orderSummaryItems)||[],V=(o==null||(n=o.cryptoCheckout)==null?void 0:n.chainId)||1,Q=()=>{var F;console.log("trigger transaction");const C=o==null||(F=o.cryptoCheckout)==null?void 0:F.triggerTransaction;C&&C(),i()};return w.createElement(K,{paddingX:"5",paddingBottom:"5",style:{marginTop:_S},flexDirection:"column",gap:"3"},G.length>0&&w.createElement(w.Fragment,null,w.createElement(he,{fontWeight:"normal",fontSize:"normal",color:"text50"},"Order summary"),w.createElement(K,{flexDirection:"column",gap:"2"},G.map((F,C)=>w.createElement(vBe,Zf({key:C},F,{chainId:V})))),w.createElement(K,{marginTop:"2"},w.createElement(Y3,{color:"backgroundSecondary",style:{margin:"0px"}}))),l&&w.createElement(K,{justifyContent:"space-between",alignItems:"center"},w.createElement(he,{fontWeight:"normal",fontSize:"normal",color:"text50"},"Total"),v?w.createElement(yd,{width:"100px",height:"17px"}):w.createElement(K,{flexDirection:"row",gap:"1",alignItems:"center"},w.createElement(_0,{imageUrl:x,size:12}),w.createElement(he,{fontWeight:"normal",fontSize:"normal",color:"text100"},`${kE(D)} ${b}`))),w.createElement(K,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"2"},l&&!H&&!v&&w.createElement(bt,{style:{borderRadius:rt.radii.md,height:"56px"},width:"full",leftIcon:()=>w.createElement(_0,{size:20,imageUrl:x}),variant:"primary",label:`Pay with ${b}`,rightIcon:Kc,onClick:Q}),l&&(H||v)&&w.createElement(bt,{className:sQ,style:{borderRadius:rt.radii.md,height:"56px",justifyContent:"center"},width:"full",leftIcon:()=>w.createElement(_0,{size:20,imageUrl:x}),variant:"glass",label:`Insufficient ${b}`,onClick:Q,disabled:!0})),l&&w.createElement(K,{width:"full",justifyContent:"flex-end"},v?w.createElement(yd,{width:"102px",height:"14px"}):w.createElement(he,{fontWeight:"bold",fontSize:"small",color:"text50"},"Balance: ",`${kE(M)} ${b}`)))},V6=({secondaryText:t,primaryText:e,disableBack:r=!1})=>{const{goBack:n,history:s}=ah(),i=()=>{n()};return w.createElement(K,{background:"backgroundPrimary",zIndex:"20",position:"fixed",width:"full",flexDirection:"row",alignItems:"center",justifyContent:"space-between",style:{height:_S,paddingTop:"6px",backgroundColor:rt.colors.backgroundPrimary}},s.length>0&&!r?w.createElement(Uo,{onClick:i,icon:g7,size:"sm",style:{background:"rgba(0,0,0,0)",width:"44px"}}):w.createElement(K,null),w.createElement(K,null,w.createElement(he,{fontWeight:"medium",variant:"small",color:"text50"},t),w.createElement(he,{fontWeight:"medium",variant:"small",color:"text100"},e)),w.createElement(K,{style:{width:"44px"}}))};Dy("packages/checkout/src/shared/styles.css.ts","kit");const mBe=yu({},"walletContent");Ly();const iQ={location:"select-method-checkout"},gBe=t=>{const e=new N9;return w.createElement(L9,{client:e},w.createElement(bBe,t))},bBe=({children:t})=>{const{theme:e,position:r}=jy(),[n,s]=p.useState(!1),[i,o]=p.useState(),[a,c]=p.useState([]),l=a.length>0?a[a.length-1]:iQ,f=v=>{o(v),s(!0)},u=()=>{s(!1)},d=()=>{const{location:v}=l;switch(v){case"select-method-checkout":return w.createElement(pBe,null);case"transaction-pending":return w.createElement(oBe,null);case"transaction-success":return w.createElement(aBe,null);case"transaction-error":return w.createElement(lBe,null);case"transaction-form":default:return w.createElement(sBe,null)}},h=()=>{const{location:v}=l;switch(v){case"select-method-checkout":return w.createElement(V6,{primaryText:"Checkout"});case"transaction-success":case"transaction-error":case"transaction-pending":return w.createElement(V6,{disableBack:!0,primaryText:"Pay with credit or debit card"});case"transaction-form":default:return w.createElement(V6,{primaryText:"Pay with credit or debit card"})}};return p.useEffect(()=>{n&&c([])},[n]),w.createElement(WLe,{value:{triggerCheckout:f,closeCheckout:u,settings:i,theme:e}},w.createElement(rBe,{value:{history:a,setHistory:c}},w.createElement("div",{id:"kit-checkout"},w.createElement(T7,{root:"#kit-checkout",scope:"kit",theme:e},w.createElement(r1,null,n&&w.createElement(jU,{contentProps:{style:Zf({maxWidth:"400px",height:"auto"},Yb(r))},scroll:!1,backdropColor:"backgroundBackdrop",onClose:()=>s(!1)},w.createElement(K,{id:"sequence-kit-checkout-content",className:mBe},h(),d()))))),t))},ah=()=>{const{setHistory:t,history:e}=tBe(),r=i=>{const o=document.getElementById("sequence-kit-wallet-content"),a=o==null?void 0:o.parentElement;a==null||a.scrollTo(0,0);const c=[...e,i];t(c)},n=()=>{const i=[...e];i.pop(),t(i)},s=e.length>0?e[e.length-1]:iQ;return{setNavigation:r,history:e,setHistory:t,goBack:n,navigation:s}},OR="Two roads diverged in a yellow wood",xBe=[{label:"Terms",url:"https://sequence.xyz/terms"},{label:"About",url:"https://github.com/0xsequence/kit"},{label:"Blog",url:"https://sequence.xyz/blog"},{label:"Builder",url:"https://sequence.build"},{label:"Docs",url:"https://docs.sequence.xyz/wallet/connectors/kit/kit/overview"}],wBe=[{id:"discord",url:"https://discord.gg/sequence",icon:"img/social/discord.svg"},{id:"twitter",url:"https://www.twitter.com/0xsequence",icon:"img/social/twitter.svg"},{id:"youtube",url:"https://www.youtube.com/channel/UC1zHgUyV-doddTcnFNqt62Q",icon:"img/social/youtube.svg"},{id:"github",url:"https://github.com/0xsequence",icon:"img/social/github.svg"}];var RR="u3q5o00";const CBe=()=>{const{theme:t}=O7(),e=lW("isMobile"),r=i=>{typeof window<"u"&&window.open(i)},n=()=>ye.jsx(K,{flexDirection:"row",gap:"4",children:xBe.map((i,o)=>ye.jsx(K,{onClick:()=>r(i.url),className:RR,gap:"4",children:ye.jsx(he,{fontWeight:"normal",fontSize:"small",color:"text50",children:i.label})},o))}),s=()=>ye.jsx(K,{gap:"4",justifyContent:"center",alignItems:"center",children:wBe.map((i,o)=>ye.jsx(K,{className:RR,onClick:()=>{typeof window<"u"&&window.open(i.url)},children:ye.jsx(Fr,{height:"3",src:i.icon,alt:i.id,style:{filter:t==="dark"?"invert(0)":"invert(1)"}})},o))});return e?ye.jsxs(K,{flexDirection:"column",padding:"5",gap:"2",style:{height:"60px"},position:"fixed",bottom:"0",width:"full",justifyContent:"center",alignItems:"center",children:[ye.jsx(n,{}),ye.jsx(s,{})]}):ye.jsxs(K,{padding:"5",style:{height:"60px"},position:"fixed",bottom:"0",width:"full",justifyContent:"space-between",children:[ye.jsx(n,{}),ye.jsx(s,{})]})},EBe=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},kBe=t=>`0x${EBe((t==null?void 0:t.substring(2))||"",8)}`,SBe=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],name:"ERC721IncorrectOwner",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721InsufficientApproval",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC721InvalidApprover",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC721InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"ERC721InvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC721InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC721InvalidSender",type:"error"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC721NonexistentToken",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"_fromTokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"_toTokenId",type:"uint256"}],name:"BatchMetadataUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"_tokenId",type:"uint256"}],name:"MetadataUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"player",type:"address"},{internalType:"string",name:"tokenURI",type:"string"}],name:"awardItem",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],ABe=({title:t,description:e,secondaryDescription:r,variant:n,buttonProps:s,children:i})=>ye.jsx(K,{borderRadius:"md",background:n,children:ye.jsxs(K,{background:"backgroundOverlay",borderRadius:"md",paddingX:{sm:"4",md:"5"},paddingY:"4",width:"full",flexDirection:"column",gap:"3",children:[ye.jsxs(K,{width:"full",flexDirection:{sm:"column",md:"row"},gap:"2",justifyContent:"space-between",children:[ye.jsxs(K,{flexDirection:"column",gap:"1",children:[ye.jsx(he,{variant:"normal",color:"text100",fontWeight:"medium",children:t}),ye.jsx(he,{variant:"normal",color:"text50",fontWeight:"medium",children:e}),r&&ye.jsx(he,{variant:"normal",color:"text80",fontWeight:"medium",children:r})]}),s?ye.jsx(K,{background:n,borderRadius:"sm",width:"min",height:"min",children:ye.jsx(bt,{variant:"emphasis",shape:"square",flexShrink:"0",...s})}):null]}),i]})});function $Be(){var Et;const{theme:t,setTheme:e}=O7(),{setTheme:r}=jy(),{address:n,connector:s,isConnected:i}=Cn(),{setOpenConnectModal:o}=kNe(),{setOpenWalletModal:a}=By();qy();const{disconnect:c}=AG(),{data:l}=x9e(),{switchChain:f}=F9(),d=sw().find(we=>we.connector.id.includes("waas"))!==void 0,h=lW("isMobile"),{data:v,sendTransaction:y,isLoading:m,error:g}=B9(),{data:b,isLoading:x,writeContract:k}=w9e(),[$,I]=w.useState(!1),[M,D]=w.useState(),[H,G]=w.useState(),[V,Q]=w.useState(),[F,C]=w.useState(),[S,T]=w.useState(localStorage.getItem("confirmationEnabled")==="true"),[R,A,N]=ANe(),[B,P]=w.useState();p.useEffect(()=>{R&&P(R.options[0].token.name)},[R]),p.useEffect(()=>{console.log(g==null?void 0:g.message)},[g]);const E=nw(),{indexerClient:L}=pr(E),[q,_]=w.useState([]),[U,W]=w.useState(void 0);p.useEffect(()=>{J()},[R]);const J=async()=>{if(R){const[we]=await l.getAddresses(),nt=await L.getEtherBalance({accountAddress:we}),Be=await L.getTokenBalances({accountAddress:we});console.log("feeOptions",R.options),console.log("nativeTokenBalance",nt),console.log("tokenBalances",Be);const Qe=R.options.map(Nt=>{var wt;return Nt.token.contractAddress===null?{tokenName:Nt.token.name,decimals:Nt.token.decimals,balance:nt.balance.balanceWei}:{tokenName:Nt.token.name,decimals:Nt.token.decimals,balance:((wt=Be.balances.find(z=>z.contractAddress.toLowerCase()===Nt.token.contractAddress.toLowerCase()))==null?void 0:wt.balance)||"0"}});_(Qe)}},X=Uf.network.allNetworks.find(we=>we.chainId===E),re=b9e({chainId:E}),{debug:ee}=VF.parse(location.search),se=ee==="true",xe=async()=>{if(!(!l||!re))try{const we=await ZMe(l);console.log("proof:",we);const nt=await eNe(l,re,we);console.log("isValid?:",nt)}catch(we){console.error(we)}};p.useEffect(()=>{v&&Q(v.hash??v),b&&C(b.hash??v)},[v,b]);const de=async()=>{if(l){I(!0);try{const we=OR,nt=await l.signMessage({account:n||"",message:we});console.log("address",n),console.log("signature:",nt),console.log("chainId in homepage",E);const[Be]=await l.getAddresses(),Qe=await re.verifyMessage({address:Be,message:we,signature:nt});I(!1),D(Qe),G(nt),console.log("isValid?",Qe)}catch(we){I(!1),console.error(we)}}},pe=async()=>{if(!l)return;const[we]=await l.getAddresses();y({to:we,value:"0",gas:null})},$e=async()=>{if(!l)return;const[we]=await l.getAddresses();k({address:"0x0d402C63cAe0200F0723B3e6fa0914627a48462E",abi:SBe,functionName:"awardItem",args:[we,"https://dev-metadata.sequence.app/projects/277/collections/62/tokens/0.json"]})},Se=()=>{e(t==="dark"?"light":"dark"),r(t==="dark"?"light":"dark")},_e=()=>i?ye.jsxs(K,{padding:"5",justifyContent:"space-between",children:[ye.jsxs(K,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:[ye.jsx(Fr,{style:{width:"36px"},src:"kit-logo.svg"}),ye.jsx(Fr,{style:{width:"24px",filter:t==="dark"?"invert(0)":"invert(1)"},src:"kit-logo-text.svg"})]}),ye.jsx(K,{children:ye.jsxs(K,{flexDirection:"column",children:[ye.jsxs(K,{flexDirection:"row",gap:"2",justifyContent:"flex-end",alignItems:"center",children:[ye.jsx(ze,{}),ye.jsx(he,{fontWeight:"medium",fontSize:"normal",color:"text100",children:h?kBe(n||""):n})]}),ye.jsx(K,{alignItems:"center",justifyContent:"flex-end",flexDirection:"row",children:ye.jsx(he,{fontWeight:"medium",fontSize:"normal",color:"text50",children:s==null?void 0:s.name})})]})})]}):ye.jsx(K,{padding:"5",justifyContent:"flex-end",children:ye.jsx(ze,{})}),Ye=({title:we,description:nt,disabled:Be,isLoading:Qe,onClick:Nt})=>ye.jsxs(Pa,{style:{width:"332px"},clickable:!Be,onClick:Be?()=>{}:Nt,opacity:Be?"50":"100",children:[ye.jsx(he,{color:"text100",lineHeight:"5",fontSize:"normal",fontWeight:"bold",children:we}),ye.jsx(K,{marginTop:"1",children:ye.jsx(he,{fontWeight:"medium",lineHeight:"5",color:"text50",fontSize:"normal",children:nt})}),Qe&&ye.jsx(B1,{marginTop:"3",size:"sm",color:"text100"})]}),it=()=>{o(!0)},ze=()=>ye.jsx(Uo,{onClick:Se,icon:t==="dark"?U0e:P0e}),_i=()=>{f(E===421614?{chainId:42170}:{chainId:421614}),Q(void 0),C(void 0),D(void 0)};return ye.jsxs(K,{background:"backgroundPrimary",children:[se&&ye.jsx(K,{justifyContent:"center",alignItems:"center",children:ye.jsx(he,{children:"Debug mode"})}),ye.jsx(K,{style:{height:"72px"},position:"fixed",width:"full",top:"0",children:ye.jsx(_e,{})}),ye.jsx(K,{style:h?{paddingTop:"85px",paddingBottom:"80px"}:{height:"100vh"},flexDirection:"column",justifyContent:"center",alignItems:"center",children:i?ye.jsxs(K,{flexDirection:"column",gap:"4",children:[ye.jsxs(K,{flexDirection:"column",gap:"2",children:[ye.jsx(he,{color:"text50",fontSize:"small",fontWeight:"medium",children:"Demos"}),ye.jsx(Ye,{title:"Embedded wallet",description:"Connect a Sequence wallet to view, swap, send, and receive collections",onClick:()=>a(!0)}),ye.jsx(Ye,{title:"Send transaction",description:"Send a transaction with your wallet",isLoading:m,onClick:pe}),V&&((v==null?void 0:v.chainId)===E||v)&&ye.jsxs(he,{as:"a",marginLeft:"4",variant:"small",underline:!0,href:`${X.blockExplorer.rootUrl}/tx/${v.hash??v}`,target:"_blank",rel:"noreferrer",children:["View on ",X.blockExplorer.name]}),ye.jsx(Ye,{title:"Sign message",description:"Sign a message with your wallet",onClick:de,isLoading:$}),M&&ye.jsxs(Pa,{style:{width:"332px"},color:"text100",flexDirection:"column",gap:"2",children:[ye.jsx(he,{variant:"medium",children:"Signed message:"}),ye.jsx(he,{children:OR}),ye.jsx(he,{variant:"medium",children:"Signature:"}),ye.jsx(he,{variant:"code",as:"p",ellipsis:!0,children:H}),ye.jsxs(he,{variant:"medium",children:["isValid: ",ye.jsx(he,{variant:"code",children:M.toString()})]})]}),ye.jsx(Ye,{title:"Mint an NFT",description:"Test minting an NFT to your wallet",isLoading:x,onClick:$e}),F&&((b==null?void 0:b.chainId)===E||b)&&ye.jsxs(he,{as:"a",marginLeft:"4",variant:"small",underline:!0,href:`${X.blockExplorer.rootUrl}/tx/${b.hash??b}`,target:"_blank",rel:"noreferrer",children:["View on ",X.blockExplorer.name]}),se&&ye.jsx(Ye,{title:"Generate EthAuth proof",description:"Generate EthAuth proof",onClick:xe}),ye.jsx(Ye,{title:"Switch network",description:`Current network: ${X.title}`,onClick:_i})]}),R&&q.length>0&&ye.jsxs(K,{marginY:"3",children:[ye.jsx(Pge,{name:"feeOption",labelLocation:"top",label:"Pick a fee option",onValueChange:we=>{var Be;const nt=(Be=R==null?void 0:R.options)==null?void 0:Be.find(Qe=>Qe.token.name===we);nt&&(P(nt.token.name),W(void 0))},value:B,options:[...(Et=R==null?void 0:R.options)==null?void 0:Et.map(we=>{var nt;return{label:ye.jsxs(K,{alignItems:"flex-start",flexDirection:"column",fontSize:"xsmall",children:[ye.jsxs(K,{flexDirection:"row",children:[ye.jsxs(he,{children:["Fee (in ",we.token.name,"): "]})," ",ye.jsx(he,{children:Dt(we.value,we.token.decimals)})]}),ye.jsxs(K,{flexDirection:"row",children:[ye.jsxs(he,{children:["Wallet balance for ",we.token.name,": "]})," ",ye.jsx(he,{children:Dt((nt=q.find(Be=>Be.tokenName===we.token.name))==null?void 0:nt.balance,we.token.decimals)})]})]}),value:we.token.name}})]}),ye.jsxs(K,{marginY:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",children:[ye.jsx(bt,{onClick:()=>{var nt,Be;const we=(nt=R==null?void 0:R.options)==null?void 0:nt.find(Qe=>Qe.token.name===B);if(we.token.contractAddress!==void 0){const Qe=_a((Be=q.find(wt=>wt.tokenName===we.token.name))==null?void 0:Be.balance,we.token.decimals),Nt=_a(we.value,we.token.decimals);if(Qe&&Qe.lt(Nt)){W({title:"Insufficient balance",description:`You do not have enough balance to pay the fee with ${we.token.name}, please make sure you have enough balance in your wallet for the selected fee option.`,secondaryDescription:"You can also switch network to Arbitrum Sepolia to test a gasless transaction.",variant:"warning"});return}A(R==null?void 0:R.id,we.token.contractAddress)}},label:"Confirm fee option"}),U&&ye.jsx(K,{marginTop:"3",style:{maxWidth:"332px"},children:ye.jsx(ABe,{title:U.title,description:U.description,secondaryDescription:U.secondaryDescription,variant:U.variant,buttonProps:U.buttonProps})})]})]}),d&&ye.jsx(K,{marginY:"3",children:ye.jsxs(K,{as:"label",flexDirection:"row",alignItems:"center",justifyContent:"space-between",children:[ye.jsx(he,{fontWeight:"semibold",variant:"small",color:"text50",children:"Confirmations"}),ye.jsx(K,{alignItems:"center",gap:"2",children:ye.jsx(c8,{name:"confirmations",checked:S,onCheckedChange:async we=>{we?(localStorage.setItem("confirmationEnabled","true"),T(!0)):(localStorage.removeItem("confirmationEnabled"),T(!1)),await _Be(300),window.location.reload()}})})]})}),ye.jsx(K,{width:"full",gap:"2",flexDirection:"row",justifyContent:"flex-end",children:ye.jsx(bt,{onClick:()=>{c(),Q(void 0),C(void 0),D(void 0)},leftIcon:Nq,label:"Sign out"})})]}):ye.jsx(K,{children:ye.jsxs(K,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5",children:[ye.jsxs(K,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:[ye.jsx(Fr,{style:{width:"48px"},src:"kit-logo.svg"}),ye.jsx(Fr,{style:{width:"32px",filter:t==="dark"?"invert(0)":"invert(1)"},src:"kit-logo-text.svg"})]}),ye.jsx(K,{gap:"2",flexDirection:"row",alignItems:"center",children:ye.jsx(bt,{onClick:it,variant:"feature",label:"Connect"})})]})})}),!h&&ye.jsx(CBe,{})]})}function _Be(t){return new Promise(e=>setTimeout(e,t))}const PBe=Xx({id:42170,name:"Arbitrum Nova",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://nova.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://nova.arbiscan.io",apiUrl:"https://api-nova.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1746963}}}),IBe=Xx({id:421614,name:"Arbitrum Sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io",apiUrl:"https://sepolia.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0}),TBe=Xx({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://cloudflare-eth.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x8cab227b1162f03b8338331adaad7aadc83b895e",blockCreated:18958930},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),OBe=Xx({id:137,name:"Polygon",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{default:{http:["https://polygon-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.polygonscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),RBe=new N9;function MBe(){const{debug:t}=VF.parse(location.search),e=t==="true",r=[PBe,IBe,TBe,OBe],n="AQAAAAAAAEGvyZiWA9FMslYeG_yayXaHnSI",s=[...M9e({walletConnectProjectId:"c65a6cb1aa83c4e24500130f23a437d8",defaultChainId:42170,appName:"demo app",projectAccessKey:n}),...e?pY(n,[I9e({accounts:["0xCb88b6315507e9d8c35D81AFB7F190aB6c3227C9"]})]):[]],i={};r.forEach(c=>{const l=Uf.network.findNetworkConfig(Uf.network.allNetworks,c.id);l&&(i[c.id]=P4e(l.rpcUrl))});const o=qke({transports:i,chains:r,connectors:s}),a={defaultTheme:"dark",signIn:{projectName:"Kit Demo",useMock:e},displayedAssets:[{contractAddress:Lt,chainId:42170},{contractAddress:Lt,chainId:421614},{contractAddress:"0x0d402c63cae0200f0723b3e6fa0914627a48462e",chainId:42170},{contractAddress:"0x0d402c63cae0200f0723b3e6fa0914627a48462e",chainId:421614},{contractAddress:"0x631998e91476da5b870d741192fc5cbc55f5a52e",chainId:137}]};return ye.jsx(i7e,{config:o,children:ye.jsx(L9,{client:RBe,children:ye.jsx(ENe,{config:a,children:ye.jsx(vDe,{children:ye.jsx(gBe,{children:ye.jsx("div",{id:"app",children:ye.jsx(T7,{root:"#app",scope:"app",theme:"dark",children:ye.jsx($Be,{})})})})})})})})}const NBe=G6.createRoot(document.getElementById("root"));NBe.render(ye.jsx(w.StrictMode,{children:ye.jsx(MBe,{})}));export{_l as B,S0 as H,u1 as I,S9 as _,Fs as a,PZ as b,ks as c,Yn as d,_ke as e,be as f,Or as g,o9 as h,kte as i,Ba as j,IEe as k,Kx as l,La as m,wy as n,Ho as o,hn as p,_Z as r,ps as s,UBe as t}; +function __vite__mapDeps(indexes) { + if (!__vite__mapDeps.viteFileDeps) { + __vite__mapDeps.viteFileDeps = ["./index-D3eN1ASu.js","./___vite-browser-external_commonjs-proxy-BL634x_A.js","./index.es-nspLMTrL.js"] + } + return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) +} diff --git a/assets/index.es-DhIOr3n6.js b/assets/index.es-nspLMTrL.js similarity index 99% rename from assets/index.es-DhIOr3n6.js rename to assets/index.es-nspLMTrL.js index 1528bd43..90d04fc4 100644 --- a/assets/index.es-DhIOr3n6.js +++ b/assets/index.es-nspLMTrL.js @@ -1,4 +1,4 @@ -import{g as Pu,p as si,d as st,B as Cu,c as Jr,a as Au,_ as P_}from"./index-BQEVheXL.js";import{r as C_,e as zr,U as Tu}from"./___vite-browser-external_commonjs-proxy-CJWxu3iC.js";/*! ***************************************************************************** +import{g as Pu,p as si,d as st,B as Cu,c as Jr,a as Au,_ as P_}from"./index-DWoPfkS0.js";import{r as C_,e as zr,U as Tu}from"./___vite-browser-external_commonjs-proxy-BL634x_A.js";/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -43,10 +43,10 @@ __p += '`),Ze&&(ne+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+ne+`return __p -}`;var ze=Yl(function(){return rt(w,ye+"return "+ne).apply(t,x)});if(ze.source=ne,xc(ze))throw ze;return ze}function $w(r){return it(r).toLowerCase()}function Lw(r){return it(r).toUpperCase()}function Mw(r,n,a){if(r=it(r),r&&(a||n===t))return nh(r);if(!r||!(n=Sr(n)))return r;var h=Kr(r),p=Kr(n),w=sh(h,p),x=oh(h,p)+1;return Mi(h,w,x).join("")}function jw(r,n,a){if(r=it(r),r&&(a||n===t))return r.slice(0,ch(r)+1);if(!r||!(n=Sr(n)))return r;var h=Kr(r),p=oh(h,Kr(n))+1;return Mi(h,0,p).join("")}function qw(r,n,a){if(r=it(r),r&&(a||n===t))return r.replace(Pt,"");if(!r||!(n=Sr(n)))return r;var h=Kr(r),p=sh(h,Kr(n));return Mi(h,p).join("")}function Fw(r,n){var a=W,h=se;if(Dt(n)){var p="separator"in n?n.separator:p;a="length"in n?je(n.length):a,h="omission"in n?Sr(n.omission):h}r=it(r);var w=r.length;if(Sn(r)){var x=Kr(r);w=x.length}if(a>=w)return r;var N=a-In(h);if(N<1)return h;var q=x?Mi(x,0,N).join(""):r.slice(0,N);if(p===t)return q+h;if(x&&(N+=q.length-N),Oc(p)){if(r.slice(N).search(p)){var X,Z=q;for(p.global||(p=Ha(p.source,it(Tr.exec(p))+"g")),p.lastIndex=0;X=p.exec(Z);)var ne=X.index;q=q.slice(0,ne===t?N:ne)}}else if(r.indexOf(Sr(p),N)!=N){var he=q.lastIndexOf(p);he>-1&&(q=q.slice(0,he))}return q+h}function zw(r){return r=it(r),r&&St.test(r)?r.replace(Pi,yg):r}var Bw=Rn(function(r,n,a){return r+(a?" ":"")+n.toUpperCase()}),Ac=Jh("toUpperCase");function Wl(r,n,a){return r=it(r),n=a?t:n,n===t?lg(r)?wg(r):rg(r):r.match(n)||[]}var Yl=Ke(function(r,n){try{return kt(r,t,n)}catch(a){return xc(a)?a:new Ae(a)}}),Hw=gi(function(r,n){return Nr(n,function(a){a=ri(a),di(r,a,Sc(r[a],r))}),r});function Kw(r){var n=r==null?0:r.length,a=we();return r=n?wt(r,function(h){if(typeof h[1]!="function")throw new Ur(d);return[a(h[0]),h[1]]}):[],Ke(function(h){for(var p=-1;++pk)return[];var a=re,h=Xt(r,re);n=we(n),r-=re;for(var p=Fa(h,n);++a0||n<0)?new Ye(a):(r<0?a=a.takeRight(-r):r&&(a=a.drop(r)),n!==t&&(n=je(n),a=n<0?a.dropRight(-n):a.take(n-r)),a)},Ye.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},Ye.prototype.toArray=function(){return this.take(re)},ei(Ye.prototype,function(r,n){var a=/^(?:filter|find|map|reject)|While$/.test(n),h=/^(?:head|last)$/.test(n),p=v[h?"take"+(n=="last"?"Right":""):n],w=h||/^find/.test(n);p&&(v.prototype[n]=function(){var x=this.__wrapped__,N=h?[1]:arguments,q=x instanceof Ye,X=N[0],Z=q||Re(x),ne=function(Ge){var Ze=p.apply(v,Ti([Ge],N));return h&&he?Ze[0]:Ze};Z&&a&&typeof X=="function"&&X.length!=1&&(q=Z=!1);var he=this.__chain__,ye=!!this.__actions__.length,Ee=w&&!he,ze=q&&!ye;if(!w&&Z){x=ze?x:new Ye(this);var De=r.apply(x,N);return De.__actions__.push({func:Ro,args:[ne],thisArg:t}),new $r(De,he)}return Ee&&ze?r.apply(this,N):(De=this.thru(ne),Ee?h?De.value()[0]:De.value():De)})}),Nr(["pop","push","shift","sort","splice","unshift"],function(r){var n=io[r],a=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",h=/^(?:pop|shift)$/.test(r);v.prototype[r]=function(){var p=arguments;if(h&&!this.__chain__){var w=this.value();return n.apply(Re(w)?w:[],p)}return this[a](function(x){return n.apply(Re(x)?x:[],p)})}}),ei(Ye.prototype,function(r,n){var a=v[n];if(a){var h=a.name+"";nt.call(Cn,h)||(Cn[h]=[]),Cn[h].push({name:n,func:a})}}),Cn[Io(t,ie).name]=[{name:"wrapper",func:t}],Ye.prototype.clone=zg,Ye.prototype.reverse=Bg,Ye.prototype.value=Hg,v.prototype.at=mv,v.prototype.chain=wv,v.prototype.commit=_v,v.prototype.next=bv,v.prototype.plant=Dv,v.prototype.reverse=Sv,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=Iv,v.prototype.first=v.prototype.head,Zn&&(v.prototype[Zn]=Ev),v},xn=_g();Rt?((Rt.exports=xn)._=xn,ut._=xn):Xe._=xn}).call(ws)})(Iu,Iu.exports);var bI=Object.defineProperty,EI=Object.defineProperties,DI=Object.getOwnPropertyDescriptors,Pd=Object.getOwnPropertySymbols,SI=Object.prototype.hasOwnProperty,II=Object.prototype.propertyIsEnumerable,Cd=(i,e,t)=>e in i?bI(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ko=(i,e)=>{for(var t in e||(e={}))SI.call(e,t)&&Cd(i,t,e[t]);if(Pd)for(var t of Pd(e))II.call(e,t)&&Cd(i,t,e[t]);return i},xI=(i,e)=>EI(i,DI(e));function zi(i,e,t){var s;const o=wE(i);return((s=e.rpcMap)==null?void 0:s[o.reference])||`${_I}?chainId=${o.namespace}:${o.reference}&projectId=${t}`}function gn(i){return i.includes(":")?i.split(":")[1]:i}function Yp(i){return i.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function OI(i,e){const t=Object.keys(e.namespaces).filter(o=>o.includes(i));if(!t.length)return[];const s=[];return t.forEach(o=>{const c=e.namespaces[o].accounts;s.push(...c)}),s}function Ad(i={},e={}){const t=Td(i),s=Td(e);return Iu.exports.merge(t,s)}function Td(i){var e,t,s,o;const c={};if(!Os(i))return c;for(const[d,f]of Object.entries(i)){const y=Bu(d)?[d]:f.chains,g=f.methods||[],m=f.events||[],D=f.rpcMap||{},I=_s(d);c[I]=xI(Ko(Ko({},c[I]),f),{chains:Bc(y,(e=c[I])==null?void 0:e.chains),methods:Bc(g,(t=c[I])==null?void 0:t.methods),events:Bc(m,(s=c[I])==null?void 0:s.events),rpcMap:Ko(Ko({},D),(o=c[I])==null?void 0:o.rpcMap)})}return c}function PI(i){return i.includes(":")?i.split(":")[2]:i}function CI(i){const e={};for(const[t,s]of Object.entries(i)){const o=s.methods||[],c=s.events||[],d=s.accounts||[],f=Bu(t)?[t]:s.chains?s.chains:Yp(s.accounts);e[t]={chains:f,methods:o,events:c,accounts:d}}return e}function ru(i){return typeof i=="number"?i:i.includes("0x")?parseInt(i,16):(i=i.includes(":")?i.split(":")[1]:i,isNaN(Number(i))?i:Number(i))}const Jp={},bt=i=>Jp[i],iu=(i,e)=>{Jp[i]=e};class AI{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=bt("events"),this.client=bt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var s;const o=gn(t);e[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const s=this.createHttpProvider(e,t);s&&(this.httpProviders[e]=s)}createHttpProvider(e,t){const s=t||zi(e,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new xi(new Hi(s,bt("disableProviderPing")))}}class TI{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=bt("events"),this.client=bt("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(Oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const s=t||zi(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new xi(new Hi(s,bt("disableProviderPing")))}setHttpProvider(e,t){const s=this.createHttpProvider(e,t);s&&(this.httpProviders[e]=s)}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var s;const o=parseInt(gn(t));e[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[t])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,s;let o=e.request.params?(t=e.request.params[0])==null?void 0:t.chainId:"0x0";o=o.startsWith("0x")?o:`0x${o}`;const c=parseInt(o,16);if(this.isChainApproved(c))this.setDefaultChain(`${c}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:o}]},chainId:(s=this.namespace.chains)==null?void 0:s[0]}),this.setDefaultChain(`${c}`);else throw new Error(`Failed to switch to chain 'eip155:${c}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class RI{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=bt("events"),this.client=bt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var s;const o=gn(t);e[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const s=this.createHttpProvider(e,t);s&&(this.httpProviders[e]=s)}createHttpProvider(e,t){const s=t||zi(e,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new xi(new Hi(s,bt("disableProviderPing")))}}class NI{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=bt("events"),this.client=bt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var s;const o=gn(t);e[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const s=this.createHttpProvider(e,t);s&&(this.httpProviders[e]=s)}createHttpProvider(e,t){const s=t||zi(e,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new xi(new Hi(s,bt("disableProviderPing")))}}class UI{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=bt("events"),this.client=bt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{const s=this.getCardanoRPCUrl(t),o=gn(t);e[o]=this.createHttpProvider(o,s)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const s=this.createHttpProvider(e,t);s&&(this.httpProviders[e]=s)}createHttpProvider(e,t){const s=t||this.getCardanoRPCUrl(e);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new xi(new Hi(s,bt("disableProviderPing")))}}class $I{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=bt("events"),this.client=bt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var s;const o=gn(t);e[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const s=this.createHttpProvider(e,t);s&&(this.httpProviders[e]=s)}createHttpProvider(e,t){const s=t||zi(e,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new xi(new Hi(s,bt("disableProviderPing")))}}class LI{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=bt("events"),this.client=bt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var s;const o=gn(t);e[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const s=this.createHttpProvider(e,t);s&&(this.httpProviders[e]=s)}createHttpProvider(e,t){const s=t||zi(e,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new xi(new Hi(s,bt("disableProviderPing")))}}class MI{constructor(e){this.name="near",this.namespace=e.namespace,this.events=bt("events"),this.client=bt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const s=t||zi(`${this.name}:${e}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,s)}this.events.emit(Oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var s;e[t]=this.createHttpProvider(t,(s=this.namespace.rpcMap)==null?void 0:s[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const s=this.createHttpProvider(e,t);s&&(this.httpProviders[e]=s)}createHttpProvider(e,t){const s=t||zi(e,this.namespace);return typeof s>"u"?void 0:new xi(new Hi(s,bt("disableProviderPing")))}}var jI=Object.defineProperty,qI=Object.defineProperties,FI=Object.getOwnPropertyDescriptors,Rd=Object.getOwnPropertySymbols,zI=Object.prototype.hasOwnProperty,BI=Object.prototype.propertyIsEnumerable,Nd=(i,e,t)=>e in i?jI(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ko=(i,e)=>{for(var t in e||(e={}))zI.call(e,t)&&Nd(i,t,e[t]);if(Rd)for(var t of Rd(e))BI.call(e,t)&&Nd(i,t,e[t]);return i},nu=(i,e)=>qI(i,FI(e));class Qu{constructor(e){this.events=new Tu,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:Je.pino(Je.getDefaultLoggerOptions({level:(e==null?void 0:e.logger)||xd})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const t=new Qu(e);return await t.initialize(),t}async request(e,t,s){const[o,c]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(o).request({request:ko({},e),chainId:`${o}:${c}`,topic:this.session.topic,expiry:s})}sendAsync(e,t,s,o){const c=new Date().getTime();this.request(e,s,o).then(d=>t(null,ca(c,d))).catch(d=>t(d,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:_t("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:s,approval:o}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});s&&(this.uri=s,this.events.emit("display_uri",s)),await o().then(c=>{this.session=c;const d=CI(c.namespaces);this.namespaces=Ad(this.namespaces,d),this.persist("namespaces",this.namespaces)}).catch(c=>{if(c.message!==Gp)throw c;t++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[s,o]=this.validateChain(e);this.getProvider(s).setDefaultChain(o,t)}catch(s){if(!/Please call connect/.test(s.message))throw s}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(oi(t)){for(const s of t)e.deletePairings?this.client.core.expirer.set(s.topic,0):await this.client.core.relayer.subscriber.unsubscribe(s.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await dI.init({logger:this.providerOpts.logger||xd,relayUrl:this.providerOpts.relayUrl||vI,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map(t=>_s(t)))];iu("client",this.client),iu("events",this.events),iu("disableProviderPing",this.disableProviderPing),e.forEach(t=>{if(!this.session)return;const s=OI(t,this.session),o=Yp(s),c=Ad(this.namespaces,this.optionalNamespaces),d=nu(ko({},c[t]),{accounts:s,chains:o});switch(t){case"eip155":this.rpcProviders[t]=new TI({namespace:d});break;case"solana":this.rpcProviders[t]=new RI({namespace:d});break;case"cosmos":this.rpcProviders[t]=new NI({namespace:d});break;case"polkadot":this.rpcProviders[t]=new AI({namespace:d});break;case"cip34":this.rpcProviders[t]=new UI({namespace:d});break;case"elrond":this.rpcProviders[t]=new $I({namespace:d});break;case"multiversx":this.rpcProviders[t]=new LI({namespace:d});break;case"near":this.rpcProviders[t]=new MI({namespace:d});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{const{params:t}=e,{event:s}=t;if(s.name==="accountsChanged"){const o=s.data;o&&oi(o)&&this.events.emit("accountsChanged",o.map(PI))}else if(s.name==="chainChanged"){const o=t.chainId,c=t.event.data,d=_s(o),f=ru(o)!==ru(c)?`${d}:${ru(c)}`:o;this.onChainChanged(f)}else this.events.emit(s.name,s.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:t})=>{var s;const{namespaces:o}=t,c=(s=this.client)==null?void 0:s.session.get(e);this.session=nu(ko({},c),{namespaces:o}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",nu(ko({},_t("USER_DISCONNECTED")),{data:e.topic}))}),this.on(Oi.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var t;this.getProvider(e).updateNamespace((t=this.session)==null?void 0:t.namespaces[e])})}setNamespaces(e){const{namespaces:t,optionalNamespaces:s,sessionProperties:o}=e;t&&Object.keys(t).length&&(this.namespaces=t),s&&Object.keys(s).length&&(this.optionalNamespaces=s),this.sessionProperties=o,this.persist("namespaces",t),this.persist("optionalNamespaces",s)}validateChain(e){const[t,s]=(e==null?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,s];if(t&&!Object.keys(this.namespaces||{}).map(d=>_s(d)).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&s)return[t,s];const o=_s(Object.keys(this.namespaces)[0]),c=this.rpcProviders[o].getDefaultChain();return[o,c]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){if(!this.namespaces)return;const[s,o]=this.validateChain(e);o&&(t||this.getProvider(s).setDefaultChain(o),this.namespaces[s]?this.namespaces[s].defaultChain=o:this.namespaces[`${s}:${o}`]?this.namespaces[`${s}:${o}`].defaultChain=o:this.namespaces[`${s}:${o}`]={defaultChain:o},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",o))}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${Od}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${Od}/${e}`)}}const HI=Qu,KI="wc",kI="ethereum_provider",VI=`${KI}@2:${kI}:`,GI="https://rpc.walletconnect.com/v1/",xu=["eth_sendTransaction","personal_sign"],WI=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],Ou=["chainChanged","accountsChanged"],YI=["chainChanged","accountsChanged","message","disconnect","connect"];var JI=Object.defineProperty,QI=Object.defineProperties,XI=Object.getOwnPropertyDescriptors,Ud=Object.getOwnPropertySymbols,ZI=Object.prototype.hasOwnProperty,e5=Object.prototype.propertyIsEnumerable,$d=(i,e,t)=>e in i?JI(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Es=(i,e)=>{for(var t in e||(e={}))ZI.call(e,t)&&$d(i,t,e[t]);if(Ud)for(var t of Ud(e))e5.call(e,t)&&$d(i,t,e[t]);return i},Ld=(i,e)=>QI(i,XI(e));function ta(i){return Number(i[0].split(":")[1])}function su(i){return`0x${i.toString(16)}`}function t5(i){const{chains:e,optionalChains:t,methods:s,optionalMethods:o,events:c,optionalEvents:d,rpcMap:f}=i;if(!oi(e))throw new Error("Invalid chains");const y={chains:e,methods:s||xu,events:c||Ou,rpcMap:Es({},e.length?{[ta(e)]:f[ta(e)]}:{})},g=c==null?void 0:c.filter(T=>!Ou.includes(T)),m=s==null?void 0:s.filter(T=>!xu.includes(T));if(!t&&!d&&!o&&!(g!=null&&g.length)&&!(m!=null&&m.length))return{required:e.length?y:void 0};const D=(g==null?void 0:g.length)&&(m==null?void 0:m.length)||!t,I={chains:[...new Set(D?y.chains.concat(t||[]):t)],methods:[...new Set(y.methods.concat(o!=null&&o.length?o:WI))],events:[...new Set(y.events.concat(d!=null&&d.length?d:YI))],rpcMap:f};return{required:e.length?y:void 0,optional:t.length?I:void 0}}class Xu{constructor(){this.events=new zr.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=VI,this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const t=new Xu;return await t.initialize(e),t}async request(e,t){return await this.signer.request(e,this.formatChainId(this.chainId),t)}sendAsync(e,t,s){this.signer.sendAsync(e,t,this.formatChainId(this.chainId),s)}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:s}=t5(this.rpc);try{const o=await new Promise(async(d,f)=>{var y;this.rpc.showQrModal&&((y=this.modal)==null||y.subscribeModal(g=>{!g.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),f(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(Ld(Es({namespaces:Es({},t&&{[this.namespace]:t})},s&&{optionalNamespaces:{[this.namespace]:s}}),{pairingTopic:e==null?void 0:e.pairingTopic})).then(g=>{d(g)}).catch(g=>{f(new Error(g.message))})});if(!o)return;const c=_E(o.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:c),this.setAccounts(c),this.events.emit("connect",{chainId:su(this.chainId)})}catch(o){throw this.signer.logger.error(o),o}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{const{params:t}=e,{event:s}=t;s.name==="accountsChanged"?(this.accounts=this.parseAccounts(s.data),this.events.emit("accountsChanged",this.accounts)):s.name==="chainChanged"?this.setChainId(this.formatChainId(s.data)):this.events.emit(s.name,s.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",su(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Ld(Es({},_t("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var t,s;this.rpc.showQrModal&&((t=this.modal)==null||t.closeModal(),(s=this.modal)==null||s.openModal({uri:e})),this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e=="string"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter(s=>this.isCompatibleChainId(s)).map(s=>this.parseChainId(s));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",su(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,s,o]=e.split(":");return{chainId:`${t}:${s}`,address:o}}setAccounts(e){this.accounts=e.filter(t=>this.parseChainId(this.parseAccountId(t).chainId)===this.chainId).map(t=>this.parseAccountId(t).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,s;const o=(t=e==null?void 0:e.chains)!=null?t:[],c=(s=e==null?void 0:e.optionalChains)!=null?s:[],d=o.concat(c);if(!d.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const f=o.length?(e==null?void 0:e.methods)||xu:[],y=o.length?(e==null?void 0:e.events)||Ou:[],g=(e==null?void 0:e.optionalMethods)||[],m=(e==null?void 0:e.optionalEvents)||[],D=(e==null?void 0:e.rpcMap)||this.buildRpcMap(d,e.projectId),I=(e==null?void 0:e.qrModalOptions)||void 0;return{chains:o==null?void 0:o.map(T=>this.formatChainId(T)),optionalChains:c.map(T=>this.formatChainId(T)),methods:f,events:y,optionalMethods:g,optionalEvents:m,rpcMap:D,showQrModal:!!(e!=null&&e.showQrModal),qrModalOptions:I,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const s={};return e.forEach(o=>{s[o]=this.getRpcUrl(o,t)}),s}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?ta(this.rpc.chains):ta(this.rpc.optionalChains),this.signer=await HI.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let t;try{const{WalletConnectModal:s}=await P_(()=>import("./index-DyNK9CaR.js").then(o=>o.i),__vite__mapDeps([0,1,2]),import.meta.url);t=s}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(t)try{this.modal=new t(Es({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(s){throw this.signer.logger.error(s),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:s,rpcMap:o}=e;t&&oi(t)&&(this.rpc.chains=t.map(c=>this.formatChainId(c)),t.forEach(c=>{this.rpc.rpcMap[c]=(o==null?void 0:o[c])||this.getRpcUrl(c)})),s&&oi(s)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=s==null?void 0:s.map(c=>this.formatChainId(c)),s.forEach(c=>{this.rpc.rpcMap[c]=(o==null?void 0:o[c])||this.getRpcUrl(c)}))}getRpcUrl(e,t){var s;return((s=this.rpc.rpcMap)==null?void 0:s[e])||`${GI}?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t==null?void 0:t.accounts),this.setAccounts(t==null?void 0:t.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return typeof e=="string"||e instanceof String?[this.parseAccount(e)]:e.map(t=>this.parseAccount(t))}}const _5=Xu;export{_5 as EthereumProvider,YI as OPTIONAL_EVENTS,WI as OPTIONAL_METHODS,Ou as REQUIRED_EVENTS,xu as REQUIRED_METHODS,Xu as default}; +}`;var ze=Yl(function(){return rt(w,ye+"return "+ne).apply(t,x)});if(ze.source=ne,xc(ze))throw ze;return ze}function $w(r){return it(r).toLowerCase()}function Lw(r){return it(r).toUpperCase()}function Mw(r,n,a){if(r=it(r),r&&(a||n===t))return nh(r);if(!r||!(n=Sr(n)))return r;var h=Kr(r),p=Kr(n),w=sh(h,p),x=oh(h,p)+1;return Mi(h,w,x).join("")}function jw(r,n,a){if(r=it(r),r&&(a||n===t))return r.slice(0,ch(r)+1);if(!r||!(n=Sr(n)))return r;var h=Kr(r),p=oh(h,Kr(n))+1;return Mi(h,0,p).join("")}function qw(r,n,a){if(r=it(r),r&&(a||n===t))return r.replace(Pt,"");if(!r||!(n=Sr(n)))return r;var h=Kr(r),p=sh(h,Kr(n));return Mi(h,p).join("")}function Fw(r,n){var a=W,h=se;if(Dt(n)){var p="separator"in n?n.separator:p;a="length"in n?je(n.length):a,h="omission"in n?Sr(n.omission):h}r=it(r);var w=r.length;if(Sn(r)){var x=Kr(r);w=x.length}if(a>=w)return r;var N=a-In(h);if(N<1)return h;var q=x?Mi(x,0,N).join(""):r.slice(0,N);if(p===t)return q+h;if(x&&(N+=q.length-N),Oc(p)){if(r.slice(N).search(p)){var X,Z=q;for(p.global||(p=Ha(p.source,it(Tr.exec(p))+"g")),p.lastIndex=0;X=p.exec(Z);)var ne=X.index;q=q.slice(0,ne===t?N:ne)}}else if(r.indexOf(Sr(p),N)!=N){var he=q.lastIndexOf(p);he>-1&&(q=q.slice(0,he))}return q+h}function zw(r){return r=it(r),r&&St.test(r)?r.replace(Pi,yg):r}var Bw=Rn(function(r,n,a){return r+(a?" ":"")+n.toUpperCase()}),Ac=Jh("toUpperCase");function Wl(r,n,a){return r=it(r),n=a?t:n,n===t?lg(r)?wg(r):rg(r):r.match(n)||[]}var Yl=Ke(function(r,n){try{return kt(r,t,n)}catch(a){return xc(a)?a:new Ae(a)}}),Hw=gi(function(r,n){return Nr(n,function(a){a=ri(a),di(r,a,Sc(r[a],r))}),r});function Kw(r){var n=r==null?0:r.length,a=we();return r=n?wt(r,function(h){if(typeof h[1]!="function")throw new Ur(d);return[a(h[0]),h[1]]}):[],Ke(function(h){for(var p=-1;++pk)return[];var a=re,h=Xt(r,re);n=we(n),r-=re;for(var p=Fa(h,n);++a0||n<0)?new Ye(a):(r<0?a=a.takeRight(-r):r&&(a=a.drop(r)),n!==t&&(n=je(n),a=n<0?a.dropRight(-n):a.take(n-r)),a)},Ye.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},Ye.prototype.toArray=function(){return this.take(re)},ei(Ye.prototype,function(r,n){var a=/^(?:filter|find|map|reject)|While$/.test(n),h=/^(?:head|last)$/.test(n),p=v[h?"take"+(n=="last"?"Right":""):n],w=h||/^find/.test(n);p&&(v.prototype[n]=function(){var x=this.__wrapped__,N=h?[1]:arguments,q=x instanceof Ye,X=N[0],Z=q||Re(x),ne=function(Ge){var Ze=p.apply(v,Ti([Ge],N));return h&&he?Ze[0]:Ze};Z&&a&&typeof X=="function"&&X.length!=1&&(q=Z=!1);var he=this.__chain__,ye=!!this.__actions__.length,Ee=w&&!he,ze=q&&!ye;if(!w&&Z){x=ze?x:new Ye(this);var De=r.apply(x,N);return De.__actions__.push({func:Ro,args:[ne],thisArg:t}),new $r(De,he)}return Ee&&ze?r.apply(this,N):(De=this.thru(ne),Ee?h?De.value()[0]:De.value():De)})}),Nr(["pop","push","shift","sort","splice","unshift"],function(r){var n=io[r],a=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",h=/^(?:pop|shift)$/.test(r);v.prototype[r]=function(){var p=arguments;if(h&&!this.__chain__){var w=this.value();return n.apply(Re(w)?w:[],p)}return this[a](function(x){return n.apply(Re(x)?x:[],p)})}}),ei(Ye.prototype,function(r,n){var a=v[n];if(a){var h=a.name+"";nt.call(Cn,h)||(Cn[h]=[]),Cn[h].push({name:n,func:a})}}),Cn[Io(t,ie).name]=[{name:"wrapper",func:t}],Ye.prototype.clone=zg,Ye.prototype.reverse=Bg,Ye.prototype.value=Hg,v.prototype.at=mv,v.prototype.chain=wv,v.prototype.commit=_v,v.prototype.next=bv,v.prototype.plant=Dv,v.prototype.reverse=Sv,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=Iv,v.prototype.first=v.prototype.head,Zn&&(v.prototype[Zn]=Ev),v},xn=_g();Rt?((Rt.exports=xn)._=xn,ut._=xn):Xe._=xn}).call(ws)})(Iu,Iu.exports);var bI=Object.defineProperty,EI=Object.defineProperties,DI=Object.getOwnPropertyDescriptors,Pd=Object.getOwnPropertySymbols,SI=Object.prototype.hasOwnProperty,II=Object.prototype.propertyIsEnumerable,Cd=(i,e,t)=>e in i?bI(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ko=(i,e)=>{for(var t in e||(e={}))SI.call(e,t)&&Cd(i,t,e[t]);if(Pd)for(var t of Pd(e))II.call(e,t)&&Cd(i,t,e[t]);return i},xI=(i,e)=>EI(i,DI(e));function zi(i,e,t){var s;const o=wE(i);return((s=e.rpcMap)==null?void 0:s[o.reference])||`${_I}?chainId=${o.namespace}:${o.reference}&projectId=${t}`}function gn(i){return i.includes(":")?i.split(":")[1]:i}function Yp(i){return i.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function OI(i,e){const t=Object.keys(e.namespaces).filter(o=>o.includes(i));if(!t.length)return[];const s=[];return t.forEach(o=>{const c=e.namespaces[o].accounts;s.push(...c)}),s}function Ad(i={},e={}){const t=Td(i),s=Td(e);return Iu.exports.merge(t,s)}function Td(i){var e,t,s,o;const c={};if(!Os(i))return c;for(const[d,f]of Object.entries(i)){const y=Bu(d)?[d]:f.chains,g=f.methods||[],m=f.events||[],D=f.rpcMap||{},I=_s(d);c[I]=xI(Ko(Ko({},c[I]),f),{chains:Bc(y,(e=c[I])==null?void 0:e.chains),methods:Bc(g,(t=c[I])==null?void 0:t.methods),events:Bc(m,(s=c[I])==null?void 0:s.events),rpcMap:Ko(Ko({},D),(o=c[I])==null?void 0:o.rpcMap)})}return c}function PI(i){return i.includes(":")?i.split(":")[2]:i}function CI(i){const e={};for(const[t,s]of Object.entries(i)){const o=s.methods||[],c=s.events||[],d=s.accounts||[],f=Bu(t)?[t]:s.chains?s.chains:Yp(s.accounts);e[t]={chains:f,methods:o,events:c,accounts:d}}return e}function ru(i){return typeof i=="number"?i:i.includes("0x")?parseInt(i,16):(i=i.includes(":")?i.split(":")[1]:i,isNaN(Number(i))?i:Number(i))}const Jp={},bt=i=>Jp[i],iu=(i,e)=>{Jp[i]=e};class AI{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=bt("events"),this.client=bt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var s;const o=gn(t);e[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const s=this.createHttpProvider(e,t);s&&(this.httpProviders[e]=s)}createHttpProvider(e,t){const s=t||zi(e,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new xi(new Hi(s,bt("disableProviderPing")))}}class TI{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=bt("events"),this.client=bt("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t),this.chainId=parseInt(e),this.events.emit(Oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const s=t||zi(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new xi(new Hi(s,bt("disableProviderPing")))}setHttpProvider(e,t){const s=this.createHttpProvider(e,t);s&&(this.httpProviders[e]=s)}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var s;const o=parseInt(gn(t));e[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[t])}),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,s;let o=e.request.params?(t=e.request.params[0])==null?void 0:t.chainId:"0x0";o=o.startsWith("0x")?o:`0x${o}`;const c=parseInt(o,16);if(this.isChainApproved(c))this.setDefaultChain(`${c}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:o}]},chainId:(s=this.namespace.chains)==null?void 0:s[0]}),this.setDefaultChain(`${c}`);else throw new Error(`Failed to switch to chain 'eip155:${c}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class RI{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=bt("events"),this.client=bt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var s;const o=gn(t);e[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const s=this.createHttpProvider(e,t);s&&(this.httpProviders[e]=s)}createHttpProvider(e,t){const s=t||zi(e,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new xi(new Hi(s,bt("disableProviderPing")))}}class NI{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=bt("events"),this.client=bt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var s;const o=gn(t);e[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const s=this.createHttpProvider(e,t);s&&(this.httpProviders[e]=s)}createHttpProvider(e,t){const s=t||zi(e,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new xi(new Hi(s,bt("disableProviderPing")))}}class UI{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=bt("events"),this.client=bt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{const s=this.getCardanoRPCUrl(t),o=gn(t);e[o]=this.createHttpProvider(o,s)}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const s=this.createHttpProvider(e,t);s&&(this.httpProviders[e]=s)}createHttpProvider(e,t){const s=t||this.getCardanoRPCUrl(e);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new xi(new Hi(s,bt("disableProviderPing")))}}class $I{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=bt("events"),this.client=bt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var s;const o=gn(t);e[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const s=this.createHttpProvider(e,t);s&&(this.httpProviders[e]=s)}createHttpProvider(e,t){const s=t||zi(e,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new xi(new Hi(s,bt("disableProviderPing")))}}class LI{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=bt("events"),this.client=bt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t),this.chainId=e,this.events.emit(Oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${e}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2]))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var s;const o=gn(t);e[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const s=this.createHttpProvider(e,t);s&&(this.httpProviders[e]=s)}createHttpProvider(e,t){const s=t||zi(e,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);return new xi(new Hi(s,bt("disableProviderPing")))}}class MI{constructor(e){this.name="near",this.namespace=e.namespace,this.events=bt("events"),this.client=bt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const s=t||zi(`${this.name}:${e}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,s)}this.events.emit(Oi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?e.filter(t=>t.split(":")[1]===this.chainId.toString()).map(t=>t.split(":")[2])||[]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach(t=>{var s;e[t]=this.createHttpProvider(t,(s=this.namespace.rpcMap)==null?void 0:s[t])}),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const s=this.createHttpProvider(e,t);s&&(this.httpProviders[e]=s)}createHttpProvider(e,t){const s=t||zi(e,this.namespace);return typeof s>"u"?void 0:new xi(new Hi(s,bt("disableProviderPing")))}}var jI=Object.defineProperty,qI=Object.defineProperties,FI=Object.getOwnPropertyDescriptors,Rd=Object.getOwnPropertySymbols,zI=Object.prototype.hasOwnProperty,BI=Object.prototype.propertyIsEnumerable,Nd=(i,e,t)=>e in i?jI(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ko=(i,e)=>{for(var t in e||(e={}))zI.call(e,t)&&Nd(i,t,e[t]);if(Rd)for(var t of Rd(e))BI.call(e,t)&&Nd(i,t,e[t]);return i},nu=(i,e)=>qI(i,FI(e));class Qu{constructor(e){this.events=new Tu,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof(e==null?void 0:e.logger)<"u"&&typeof(e==null?void 0:e.logger)!="string"?e.logger:Je.pino(Je.getDefaultLoggerOptions({level:(e==null?void 0:e.logger)||xd})),this.disableProviderPing=(e==null?void 0:e.disableProviderPing)||!1}static async init(e){const t=new Qu(e);return await t.initialize(),t}async request(e,t,s){const[o,c]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(o).request({request:ko({},e),chainId:`${o}:${c}`,topic:this.session.topic,expiry:s})}sendAsync(e,t,s,o){const c=new Date().getTime();this.request(e,s,o).then(d=>t(null,ca(c,d))).catch(d=>t(d,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(e=this.session)==null?void 0:e.topic,reason:_t("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:s,approval:o}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});s&&(this.uri=s,this.events.emit("display_uri",s)),await o().then(c=>{this.session=c;const d=CI(c.namespaces);this.namespaces=Ad(this.namespaces,d),this.persist("namespaces",this.namespaces)}).catch(c=>{if(c.message!==Gp)throw c;t++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[s,o]=this.validateChain(e);this.getProvider(s).setDefaultChain(o,t)}catch(s){if(!/Please call connect/.test(s.message))throw s}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(oi(t)){for(const s of t)e.deletePairings?this.client.core.expirer.set(s.topic,0):await this.client.core.relayer.subscriber.unsubscribe(s.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await dI.init({logger:this.providerOpts.logger||xd,relayUrl:this.providerOpts.relayUrl||vI,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map(t=>_s(t)))];iu("client",this.client),iu("events",this.events),iu("disableProviderPing",this.disableProviderPing),e.forEach(t=>{if(!this.session)return;const s=OI(t,this.session),o=Yp(s),c=Ad(this.namespaces,this.optionalNamespaces),d=nu(ko({},c[t]),{accounts:s,chains:o});switch(t){case"eip155":this.rpcProviders[t]=new TI({namespace:d});break;case"solana":this.rpcProviders[t]=new RI({namespace:d});break;case"cosmos":this.rpcProviders[t]=new NI({namespace:d});break;case"polkadot":this.rpcProviders[t]=new AI({namespace:d});break;case"cip34":this.rpcProviders[t]=new UI({namespace:d});break;case"elrond":this.rpcProviders[t]=new $I({namespace:d});break;case"multiversx":this.rpcProviders[t]=new LI({namespace:d});break;case"near":this.rpcProviders[t]=new MI({namespace:d});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",e=>{this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{const{params:t}=e,{event:s}=t;if(s.name==="accountsChanged"){const o=s.data;o&&oi(o)&&this.events.emit("accountsChanged",o.map(PI))}else if(s.name==="chainChanged"){const o=t.chainId,c=t.event.data,d=_s(o),f=ru(o)!==ru(c)?`${d}:${ru(c)}`:o;this.onChainChanged(f)}else this.events.emit(s.name,s.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:t})=>{var s;const{namespaces:o}=t,c=(s=this.client)==null?void 0:s.session.get(e);this.session=nu(ko({},c),{namespaces:o}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})}),this.client.on("session_delete",async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",nu(ko({},_t("USER_DISCONNECTED")),{data:e.topic}))}),this.on(Oi.DEFAULT_CHAIN_CHANGED,e=>{this.onChainChanged(e,!0)})}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var t;this.getProvider(e).updateNamespace((t=this.session)==null?void 0:t.namespaces[e])})}setNamespaces(e){const{namespaces:t,optionalNamespaces:s,sessionProperties:o}=e;t&&Object.keys(t).length&&(this.namespaces=t),s&&Object.keys(s).length&&(this.optionalNamespaces=s),this.sessionProperties=o,this.persist("namespaces",t),this.persist("optionalNamespaces",s)}validateChain(e){const[t,s]=(e==null?void 0:e.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,s];if(t&&!Object.keys(this.namespaces||{}).map(d=>_s(d)).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&s)return[t,s];const o=_s(Object.keys(this.namespaces)[0]),c=this.rpcProviders[o].getDefaultChain();return[o,c]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){if(!this.namespaces)return;const[s,o]=this.validateChain(e);o&&(t||this.getProvider(s).setDefaultChain(o),this.namespaces[s]?this.namespaces[s].defaultChain=o:this.namespaces[`${s}:${o}`]?this.namespaces[`${s}:${o}`].defaultChain=o:this.namespaces[`${s}:${o}`]={defaultChain:o},this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",o))}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${Od}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${Od}/${e}`)}}const HI=Qu,KI="wc",kI="ethereum_provider",VI=`${KI}@2:${kI}:`,GI="https://rpc.walletconnect.com/v1/",xu=["eth_sendTransaction","personal_sign"],WI=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],Ou=["chainChanged","accountsChanged"],YI=["chainChanged","accountsChanged","message","disconnect","connect"];var JI=Object.defineProperty,QI=Object.defineProperties,XI=Object.getOwnPropertyDescriptors,Ud=Object.getOwnPropertySymbols,ZI=Object.prototype.hasOwnProperty,e5=Object.prototype.propertyIsEnumerable,$d=(i,e,t)=>e in i?JI(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Es=(i,e)=>{for(var t in e||(e={}))ZI.call(e,t)&&$d(i,t,e[t]);if(Ud)for(var t of Ud(e))e5.call(e,t)&&$d(i,t,e[t]);return i},Ld=(i,e)=>QI(i,XI(e));function ta(i){return Number(i[0].split(":")[1])}function su(i){return`0x${i.toString(16)}`}function t5(i){const{chains:e,optionalChains:t,methods:s,optionalMethods:o,events:c,optionalEvents:d,rpcMap:f}=i;if(!oi(e))throw new Error("Invalid chains");const y={chains:e,methods:s||xu,events:c||Ou,rpcMap:Es({},e.length?{[ta(e)]:f[ta(e)]}:{})},g=c==null?void 0:c.filter(T=>!Ou.includes(T)),m=s==null?void 0:s.filter(T=>!xu.includes(T));if(!t&&!d&&!o&&!(g!=null&&g.length)&&!(m!=null&&m.length))return{required:e.length?y:void 0};const D=(g==null?void 0:g.length)&&(m==null?void 0:m.length)||!t,I={chains:[...new Set(D?y.chains.concat(t||[]):t)],methods:[...new Set(y.methods.concat(o!=null&&o.length?o:WI))],events:[...new Set(y.events.concat(d!=null&&d.length?d:YI))],rpcMap:f};return{required:e.length?y:void 0,optional:t.length?I:void 0}}class Xu{constructor(){this.events=new zr.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=VI,this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static async init(e){const t=new Xu;return await t.initialize(e),t}async request(e,t){return await this.signer.request(e,this.formatChainId(this.chainId),t)}sendAsync(e,t,s){this.signer.sendAsync(e,t,this.formatChainId(this.chainId),s)}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(e){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:s}=t5(this.rpc);try{const o=await new Promise(async(d,f)=>{var y;this.rpc.showQrModal&&((y=this.modal)==null||y.subscribeModal(g=>{!g.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),f(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(Ld(Es({namespaces:Es({},t&&{[this.namespace]:t})},s&&{optionalNamespaces:{[this.namespace]:s}}),{pairingTopic:e==null?void 0:e.pairingTopic})).then(g=>{d(g)}).catch(g=>{f(new Error(g.message))})});if(!o)return;const c=_E(o.namespaces,[this.namespace]);this.setChainIds(this.rpc.chains.length?this.rpc.chains:c),this.setAccounts(c),this.events.emit("connect",{chainId:su(this.chainId)})}catch(o){throw this.signer.logger.error(o),o}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",e=>{const{params:t}=e,{event:s}=t;s.name==="accountsChanged"?(this.accounts=this.parseAccounts(s.data),this.events.emit("accountsChanged",this.accounts)):s.name==="chainChanged"?this.setChainId(this.formatChainId(s.data)):this.events.emit(s.name,s.data),this.events.emit("session_event",e)}),this.signer.on("chainChanged",e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",su(this.chainId)),this.persist()}),this.signer.on("session_update",e=>{this.events.emit("session_update",e)}),this.signer.on("session_delete",e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Ld(Es({},_t("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",e=>{var t,s;this.rpc.showQrModal&&((t=this.modal)==null||t.closeModal(),(s=this.modal)==null||s.openModal({uri:e})),this.events.emit("display_uri",e)})}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return typeof e=="string"?e.startsWith(`${this.namespace}:`):!1}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter(s=>this.isCompatibleChainId(s)).map(s=>this.parseChainId(s));t.length&&(this.chainId=t[0],this.events.emit("chainChanged",su(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,s,o]=e.split(":");return{chainId:`${t}:${s}`,address:o}}setAccounts(e){this.accounts=e.filter(t=>this.parseChainId(this.parseAccountId(t).chainId)===this.chainId).map(t=>this.parseAccountId(t).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t,s;const o=(t=e==null?void 0:e.chains)!=null?t:[],c=(s=e==null?void 0:e.optionalChains)!=null?s:[],d=o.concat(c);if(!d.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const f=o.length?(e==null?void 0:e.methods)||xu:[],y=o.length?(e==null?void 0:e.events)||Ou:[],g=(e==null?void 0:e.optionalMethods)||[],m=(e==null?void 0:e.optionalEvents)||[],D=(e==null?void 0:e.rpcMap)||this.buildRpcMap(d,e.projectId),I=(e==null?void 0:e.qrModalOptions)||void 0;return{chains:o==null?void 0:o.map(T=>this.formatChainId(T)),optionalChains:c.map(T=>this.formatChainId(T)),methods:f,events:y,optionalMethods:g,optionalEvents:m,rpcMap:D,showQrModal:!!(e!=null&&e.showQrModal),qrModalOptions:I,projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const s={};return e.forEach(o=>{s[o]=this.getRpcUrl(o,t)}),s}async initialize(e){if(this.rpc=this.getRpcConfig(e),this.chainId=this.rpc.chains.length?ta(this.rpc.chains):ta(this.rpc.optionalChains),this.signer=await HI.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let t;try{const{WalletConnectModal:s}=await P_(()=>import("./index-D4Oq7CAa.js").then(o=>o.i),__vite__mapDeps([0,1,2]),import.meta.url);t=s}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(t)try{this.modal=new t(Es({projectId:this.rpc.projectId},this.rpc.qrModalOptions))}catch(s){throw this.signer.logger.error(s),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:s,rpcMap:o}=e;t&&oi(t)&&(this.rpc.chains=t.map(c=>this.formatChainId(c)),t.forEach(c=>{this.rpc.rpcMap[c]=(o==null?void 0:o[c])||this.getRpcUrl(c)})),s&&oi(s)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=s==null?void 0:s.map(c=>this.formatChainId(c)),s.forEach(c=>{this.rpc.rpcMap[c]=(o==null?void 0:o[c])||this.getRpcUrl(c)}))}getRpcUrl(e,t){var s;return((s=this.rpc.rpcMap)==null?void 0:s[e])||`${GI}?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const e=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:t==null?void 0:t.accounts),this.setAccounts(t==null?void 0:t.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return typeof e=="string"||e instanceof String?[this.parseAccount(e)]:e.map(t=>this.parseAccount(t))}}const _5=Xu;export{_5 as EthereumProvider,YI as OPTIONAL_EVENTS,WI as OPTIONAL_METHODS,Ou as REQUIRED_EVENTS,xu as REQUIRED_METHODS,Xu as default}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./index-DyNK9CaR.js","./index-BQEVheXL.js","./index-hzRzMXhE.css"] + __vite__mapDeps.viteFileDeps = ["./index-D4Oq7CAa.js","./index-DWoPfkS0.js","./index-hzRzMXhE.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/index.html b/index.html index ccde47ce..6b2f3d29 100644 --- a/index.html +++ b/index.html @@ -24,7 +24,7 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Sequence Kit Demo - +